The main class of this package. Can be used as a state manager under a library like zustand.

Hierarchy (View Summary)

Constructors

Properties

envs: SuperSet<Env>
name?: string
networks: SuperSet<Network>
secrets: SuperSet<Secret>
services: SuperSet<Service>
version?: ComposeVersion
volumes: SuperSet<Volume>

Methods

  • Stable, structural string representation usable as an equality key.

    Object keys are sorted, generated ids are dropped and set-derived collections are order-normalised, so two independently built but structurally identical compositions hash the same. A plain JSON.stringify does not: it leaks random UUIDs and insertion order.

    Returns string