@xemahq/xema 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -21
- package/dist/assets/appliance-base/distribution.lock.json +5144 -0
- package/dist/assets/appliance-base/images.lock.json +1706 -0
- package/dist/assets/appliance-lean/distribution.lock.json +2888 -0
- package/dist/assets/appliance-lean/images.lock.json +1229 -0
- package/dist/assets/boot-graph.json +380 -28
- package/dist/assets/cloud/distribution.lock.json +5278 -0
- package/dist/assets/cloud/images.lock.json +1713 -0
- package/dist/assets/core/distribution.lock.json +2401 -354
- package/dist/assets/core/images.lock.json +1208 -268
- package/dist/assets/distribution-assets.manifest.json +147 -0
- package/dist/assets/keycloak/realm-xema.json +412 -0
- package/dist/assets/minimal/distribution.lock.json +2710 -0
- package/dist/assets/minimal/images.lock.json +1149 -0
- package/dist/assets/oss/distribution.lock.json +3742 -494
- package/dist/assets/oss/images.lock.json +1591 -472
- package/dist/assets/starter/distribution.lock.json +3422 -0
- package/dist/assets/starter/images.lock.json +1404 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +40 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/apply.d.ts.map +1 -1
- package/dist/commands/apply.js +2 -2
- package/dist/commands/apply.js.map +1 -1
- package/dist/commands/biome-dev.d.ts +3 -0
- package/dist/commands/biome-dev.d.ts.map +1 -0
- package/dist/commands/biome-dev.js +176 -0
- package/dist/commands/biome-dev.js.map +1 -0
- package/dist/commands/biome-validate.d.ts +10 -0
- package/dist/commands/biome-validate.d.ts.map +1 -0
- package/dist/commands/biome-validate.js +49 -0
- package/dist/commands/biome-validate.js.map +1 -0
- package/dist/commands/biome.d.ts.map +1 -1
- package/dist/commands/biome.js +437 -26
- package/dist/commands/biome.js.map +1 -1
- package/dist/commands/canopy.d.ts +3 -0
- package/dist/commands/canopy.d.ts.map +1 -0
- package/dist/commands/canopy.js +214 -0
- package/dist/commands/canopy.js.map +1 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +78 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +92 -20
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/dist.d.ts +13 -0
- package/dist/commands/dist.d.ts.map +1 -1
- package/dist/commands/dist.js +51 -11
- package/dist/commands/dist.js.map +1 -1
- package/dist/commands/doctor.d.ts +25 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +422 -18
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts +10 -0
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +107 -33
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/export.js +1 -1
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +2 -2
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +56 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/installation.d.ts +3 -0
- package/dist/commands/installation.d.ts.map +1 -0
- package/dist/commands/installation.js +258 -0
- package/dist/commands/installation.js.map +1 -0
- package/dist/commands/license.d.ts +3 -0
- package/dist/commands/license.d.ts.map +1 -0
- package/dist/commands/license.js +97 -0
- package/dist/commands/license.js.map +1 -0
- package/dist/commands/login.d.ts +4 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +127 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logs.d.ts +21 -0
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +133 -32
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/objects.d.ts.map +1 -1
- package/dist/commands/objects.js +85 -6
- package/dist/commands/objects.js.map +1 -1
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +2 -2
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +61 -9
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +67 -14
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/shell.d.ts.map +1 -1
- package/dist/commands/shell.js +190 -6
- package/dist/commands/shell.js.map +1 -1
- package/dist/commands/source.d.ts +3 -0
- package/dist/commands/source.d.ts.map +1 -0
- package/dist/commands/source.js +120 -0
- package/dist/commands/source.js.map +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +29 -3
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +70 -5
- package/dist/commands/up.js.map +1 -1
- package/dist/dev/env-defaults.d.ts +1 -0
- package/dist/dev/env-defaults.d.ts.map +1 -1
- package/dist/dev/env-defaults.js +24 -12
- package/dist/dev/env-defaults.js.map +1 -1
- package/dist/dev/forked-worker-bootstrap-protocol.d.ts +17 -0
- package/dist/dev/forked-worker-bootstrap-protocol.d.ts.map +1 -0
- package/dist/dev/forked-worker-bootstrap-protocol.js +35 -0
- package/dist/dev/forked-worker-bootstrap-protocol.js.map +1 -0
- package/dist/dev/forked-worker-bootstrap.d.ts +18 -0
- package/dist/dev/forked-worker-bootstrap.d.ts.map +1 -0
- package/dist/dev/forked-worker-bootstrap.js +84 -0
- package/dist/dev/forked-worker-bootstrap.js.map +1 -0
- package/dist/dev/forked-worker.d.ts +29 -0
- package/dist/dev/forked-worker.d.ts.map +1 -1
- package/dist/dev/forked-worker.js +267 -42
- package/dist/dev/forked-worker.js.map +1 -1
- package/dist/dev/opa-policies.d.ts +3 -0
- package/dist/dev/opa-policies.d.ts.map +1 -0
- package/dist/dev/opa-policies.js +64 -0
- package/dist/dev/opa-policies.js.map +1 -0
- package/dist/lib/cli-errors.d.ts +7 -0
- package/dist/lib/cli-errors.d.ts.map +1 -0
- package/dist/lib/cli-errors.js +30 -0
- package/dist/lib/cli-errors.js.map +1 -0
- package/dist/lib/control-plane.d.ts +5 -1
- package/dist/lib/control-plane.d.ts.map +1 -1
- package/dist/lib/control-plane.js +61 -8
- package/dist/lib/control-plane.js.map +1 -1
- package/dist/lib/exit-codes.d.ts +3 -4
- package/dist/lib/exit-codes.d.ts.map +1 -1
- package/dist/lib/exit-codes.js +3 -4
- package/dist/lib/exit-codes.js.map +1 -1
- package/dist/lib/http-error.d.ts +2 -0
- package/dist/lib/http-error.d.ts.map +1 -0
- package/dist/lib/http-error.js +51 -0
- package/dist/lib/http-error.js.map +1 -0
- package/dist/lib/roster-profile.d.ts +10 -0
- package/dist/lib/roster-profile.d.ts.map +1 -0
- package/dist/lib/roster-profile.js +44 -0
- package/dist/lib/roster-profile.js.map +1 -0
- package/dist/runtime/asset-provenance.d.ts +17 -0
- package/dist/runtime/asset-provenance.d.ts.map +1 -0
- package/dist/runtime/asset-provenance.js +29 -0
- package/dist/runtime/asset-provenance.js.map +1 -0
- package/dist/runtime/auth/client-bootstrap.d.ts +11 -0
- package/dist/runtime/auth/client-bootstrap.d.ts.map +1 -0
- package/dist/runtime/auth/client-bootstrap.js +60 -0
- package/dist/runtime/auth/client-bootstrap.js.map +1 -0
- package/dist/runtime/auth/device-flow.d.ts +43 -0
- package/dist/runtime/auth/device-flow.d.ts.map +1 -0
- package/dist/runtime/auth/device-flow.js +201 -0
- package/dist/runtime/auth/device-flow.js.map +1 -0
- package/dist/runtime/auth/session-auth.d.ts +8 -0
- package/dist/runtime/auth/session-auth.d.ts.map +1 -0
- package/dist/runtime/auth/session-auth.js +43 -0
- package/dist/runtime/auth/session-auth.js.map +1 -0
- package/dist/runtime/auth/session-store.d.ts +19 -0
- package/dist/runtime/auth/session-store.d.ts.map +1 -0
- package/dist/runtime/auth/session-store.js +83 -0
- package/dist/runtime/auth/session-store.js.map +1 -0
- package/dist/runtime/auth/token-claims.d.ts +2 -0
- package/dist/runtime/auth/token-claims.d.ts.map +1 -0
- package/dist/runtime/auth/token-claims.js +45 -0
- package/dist/runtime/auth/token-claims.js.map +1 -0
- package/dist/runtime/biome-dev.d.ts +28 -0
- package/dist/runtime/biome-dev.d.ts.map +1 -0
- package/dist/runtime/biome-dev.js +131 -0
- package/dist/runtime/biome-dev.js.map +1 -0
- package/dist/runtime/biome-local-install.d.ts +29 -0
- package/dist/runtime/biome-local-install.d.ts.map +1 -0
- package/dist/runtime/biome-local-install.js +243 -0
- package/dist/runtime/biome-local-install.js.map +1 -0
- package/dist/runtime/biome-provenance.d.ts +26 -0
- package/dist/runtime/biome-provenance.d.ts.map +1 -0
- package/dist/runtime/biome-provenance.js +70 -0
- package/dist/runtime/biome-provenance.js.map +1 -0
- package/dist/runtime/biome-publish.d.ts +48 -0
- package/dist/runtime/biome-publish.d.ts.map +1 -0
- package/dist/runtime/biome-publish.js +278 -0
- package/dist/runtime/biome-publish.js.map +1 -0
- package/dist/runtime/biome-scaffold.d.ts +35 -0
- package/dist/runtime/biome-scaffold.d.ts.map +1 -0
- package/dist/runtime/biome-scaffold.js +151 -0
- package/dist/runtime/biome-scaffold.js.map +1 -0
- package/dist/runtime/biome-validate.d.ts +28 -0
- package/dist/runtime/biome-validate.d.ts.map +1 -0
- package/dist/runtime/biome-validate.js +452 -0
- package/dist/runtime/biome-validate.js.map +1 -0
- package/dist/runtime/boot-graph-loader.d.ts +1 -0
- package/dist/runtime/boot-graph-loader.d.ts.map +1 -1
- package/dist/runtime/boot-graph-loader.js +99 -7
- package/dist/runtime/boot-graph-loader.js.map +1 -1
- package/dist/runtime/canopy-refs.d.ts +8 -0
- package/dist/runtime/canopy-refs.d.ts.map +1 -0
- package/dist/runtime/canopy-refs.js +51 -0
- package/dist/runtime/canopy-refs.js.map +1 -0
- package/dist/runtime/canopy-replies.d.ts +14 -0
- package/dist/runtime/canopy-replies.d.ts.map +1 -0
- package/dist/runtime/canopy-replies.js +39 -0
- package/dist/runtime/canopy-replies.js.map +1 -0
- package/dist/runtime/capability-invoke.d.ts +35 -0
- package/dist/runtime/capability-invoke.d.ts.map +1 -0
- package/dist/runtime/capability-invoke.js +119 -0
- package/dist/runtime/capability-invoke.js.map +1 -0
- package/dist/runtime/cleanup.d.ts +10 -0
- package/dist/runtime/cleanup.d.ts.map +1 -0
- package/dist/runtime/cleanup.js +35 -0
- package/dist/runtime/cleanup.js.map +1 -0
- package/dist/runtime/config/dev-mode.d.ts +8 -0
- package/dist/runtime/config/dev-mode.d.ts.map +1 -0
- package/dist/runtime/config/dev-mode.js +84 -0
- package/dist/runtime/config/dev-mode.js.map +1 -0
- package/dist/runtime/config/init-presets.d.ts +1 -1
- package/dist/runtime/config/init-presets.d.ts.map +1 -1
- package/dist/runtime/config/init-presets.js +68 -13
- package/dist/runtime/config/init-presets.js.map +1 -1
- package/dist/runtime/config/loader.d.ts +1 -0
- package/dist/runtime/config/loader.d.ts.map +1 -1
- package/dist/runtime/config/loader.js +41 -5
- package/dist/runtime/config/loader.js.map +1 -1
- package/dist/runtime/config/schema.d.ts +27 -12
- package/dist/runtime/config/schema.d.ts.map +1 -1
- package/dist/runtime/config/schema.js +113 -8
- package/dist/runtime/config/schema.js.map +1 -1
- package/dist/runtime/config/sources-config.d.ts +14 -0
- package/dist/runtime/config/sources-config.d.ts.map +1 -0
- package/dist/runtime/config/sources-config.js +79 -0
- package/dist/runtime/config/sources-config.js.map +1 -0
- package/dist/runtime/distribution/available-biome.d.ts.map +1 -1
- package/dist/runtime/distribution/available-biome.js +2 -0
- package/dist/runtime/distribution/available-biome.js.map +1 -1
- package/dist/runtime/distribution/compose.d.ts +2 -1
- package/dist/runtime/distribution/compose.d.ts.map +1 -1
- package/dist/runtime/distribution/compose.js +4 -1
- package/dist/runtime/distribution/compose.js.map +1 -1
- package/dist/runtime/env-seeder.d.ts +5 -0
- package/dist/runtime/env-seeder.d.ts.map +1 -1
- package/dist/runtime/env-seeder.js +152 -19
- package/dist/runtime/env-seeder.js.map +1 -1
- package/dist/runtime/foreground.d.ts +9 -0
- package/dist/runtime/foreground.d.ts.map +1 -1
- package/dist/runtime/foreground.js +37 -3
- package/dist/runtime/foreground.js.map +1 -1
- package/dist/runtime/infra/infra-catalog.d.ts +34 -1
- package/dist/runtime/infra/infra-catalog.d.ts.map +1 -1
- package/dist/runtime/infra/infra-catalog.js +202 -10
- package/dist/runtime/infra/infra-catalog.js.map +1 -1
- package/dist/runtime/infra/infra-environment.d.ts +10 -0
- package/dist/runtime/infra/infra-environment.d.ts.map +1 -0
- package/dist/runtime/infra/infra-environment.js +76 -0
- package/dist/runtime/infra/infra-environment.js.map +1 -0
- package/dist/runtime/infra/infra-plan.d.ts +2 -1
- package/dist/runtime/infra/infra-plan.d.ts.map +1 -1
- package/dist/runtime/infra/infra-plan.js +10 -0
- package/dist/runtime/infra/infra-plan.js.map +1 -1
- package/dist/runtime/infra/infra-runner.d.ts +16 -1
- package/dist/runtime/infra/infra-runner.d.ts.map +1 -1
- package/dist/runtime/infra/infra-runner.js +245 -55
- package/dist/runtime/infra/infra-runner.js.map +1 -1
- package/dist/runtime/infra/keycloak-realm.d.ts +25 -0
- package/dist/runtime/infra/keycloak-realm.d.ts.map +1 -0
- package/dist/runtime/infra/keycloak-realm.js +116 -0
- package/dist/runtime/infra/keycloak-realm.js.map +1 -0
- package/dist/runtime/infra/postgres-endpoint.d.ts +8 -0
- package/dist/runtime/infra/postgres-endpoint.d.ts.map +1 -0
- package/dist/runtime/infra/postgres-endpoint.js +21 -0
- package/dist/runtime/infra/postgres-endpoint.js.map +1 -0
- package/dist/runtime/installation/compiler.d.ts +114 -0
- package/dist/runtime/installation/compiler.d.ts.map +1 -0
- package/dist/runtime/installation/compiler.js +456 -0
- package/dist/runtime/installation/compiler.js.map +1 -0
- package/dist/runtime/installation/contract.d.ts +296 -0
- package/dist/runtime/installation/contract.d.ts.map +1 -0
- package/dist/runtime/installation/contract.js +504 -0
- package/dist/runtime/installation/contract.js.map +1 -0
- package/dist/runtime/installation/current-launcher-renderer.d.ts +12 -0
- package/dist/runtime/installation/current-launcher-renderer.d.ts.map +1 -0
- package/dist/runtime/installation/current-launcher-renderer.js +123 -0
- package/dist/runtime/installation/current-launcher-renderer.js.map +1 -0
- package/dist/runtime/installation/diagnostics.d.ts +16 -0
- package/dist/runtime/installation/diagnostics.d.ts.map +1 -0
- package/dist/runtime/installation/diagnostics.js +21 -0
- package/dist/runtime/installation/diagnostics.js.map +1 -0
- package/dist/runtime/installation/diff.d.ts +32 -0
- package/dist/runtime/installation/diff.d.ts.map +1 -0
- package/dist/runtime/installation/diff.js +136 -0
- package/dist/runtime/installation/diff.js.map +1 -0
- package/dist/runtime/installation/format.d.ts +3 -0
- package/dist/runtime/installation/format.d.ts.map +1 -0
- package/dist/runtime/installation/format.js +22 -0
- package/dist/runtime/installation/format.js.map +1 -0
- package/dist/runtime/installation/from-current-config.d.ts +9 -0
- package/dist/runtime/installation/from-current-config.d.ts.map +1 -0
- package/dist/runtime/installation/from-current-config.js +245 -0
- package/dist/runtime/installation/from-current-config.js.map +1 -0
- package/dist/runtime/installation/helm-release-readiness.d.ts +9 -0
- package/dist/runtime/installation/helm-release-readiness.d.ts.map +1 -0
- package/dist/runtime/installation/helm-release-readiness.js +97 -0
- package/dist/runtime/installation/helm-release-readiness.js.map +1 -0
- package/dist/runtime/installation/helm-release.d.ts +24 -0
- package/dist/runtime/installation/helm-release.d.ts.map +1 -0
- package/dist/runtime/installation/helm-release.js +96 -0
- package/dist/runtime/installation/helm-release.js.map +1 -0
- package/dist/runtime/installation/index.d.ts +22 -0
- package/dist/runtime/installation/index.d.ts.map +1 -0
- package/dist/runtime/installation/index.js +38 -0
- package/dist/runtime/installation/index.js.map +1 -0
- package/dist/runtime/installation/json-schema.d.ts +4 -0
- package/dist/runtime/installation/json-schema.d.ts.map +1 -0
- package/dist/runtime/installation/json-schema.js +16 -0
- package/dist/runtime/installation/json-schema.js.map +1 -0
- package/dist/runtime/installation/kubernetes-readiness.d.ts +60 -0
- package/dist/runtime/installation/kubernetes-readiness.d.ts.map +1 -0
- package/dist/runtime/installation/kubernetes-readiness.js +384 -0
- package/dist/runtime/installation/kubernetes-readiness.js.map +1 -0
- package/dist/runtime/installation/lifecycle.d.ts +25 -0
- package/dist/runtime/installation/lifecycle.d.ts.map +1 -0
- package/dist/runtime/installation/lifecycle.js +157 -0
- package/dist/runtime/installation/lifecycle.js.map +1 -0
- package/dist/runtime/installation/readiness-proof.d.ts +72 -0
- package/dist/runtime/installation/readiness-proof.d.ts.map +1 -0
- package/dist/runtime/installation/readiness-proof.js +142 -0
- package/dist/runtime/installation/readiness-proof.js.map +1 -0
- package/dist/runtime/installation/readiness.d.ts +21 -0
- package/dist/runtime/installation/readiness.d.ts.map +1 -0
- package/dist/runtime/installation/readiness.js +418 -0
- package/dist/runtime/installation/readiness.js.map +1 -0
- package/dist/runtime/installation/serialization.d.ts +3 -0
- package/dist/runtime/installation/serialization.d.ts.map +1 -0
- package/dist/runtime/installation/serialization.js +39 -0
- package/dist/runtime/installation/serialization.js.map +1 -0
- package/dist/runtime/installation/setup-profile.d.ts +8 -0
- package/dist/runtime/installation/setup-profile.d.ts.map +1 -0
- package/dist/runtime/installation/setup-profile.js +41 -0
- package/dist/runtime/installation/setup-profile.js.map +1 -0
- package/dist/runtime/installation/setup-renderer.d.ts +31 -0
- package/dist/runtime/installation/setup-renderer.d.ts.map +1 -0
- package/dist/runtime/installation/setup-renderer.js +238 -0
- package/dist/runtime/installation/setup-renderer.js.map +1 -0
- package/dist/runtime/installation/state-store.d.ts +28 -0
- package/dist/runtime/installation/state-store.d.ts.map +1 -0
- package/dist/runtime/installation/state-store.js +377 -0
- package/dist/runtime/installation/state-store.js.map +1 -0
- package/dist/runtime/installation/status.d.ts +24 -0
- package/dist/runtime/installation/status.d.ts.map +1 -0
- package/dist/runtime/installation/status.js +52 -0
- package/dist/runtime/installation/status.js.map +1 -0
- package/dist/runtime/installation/support-bundle.d.ts +30 -0
- package/dist/runtime/installation/support-bundle.d.ts.map +1 -0
- package/dist/runtime/installation/support-bundle.js +145 -0
- package/dist/runtime/installation/support-bundle.js.map +1 -0
- package/dist/runtime/installation/to-current-config.d.ts +4 -0
- package/dist/runtime/installation/to-current-config.d.ts.map +1 -0
- package/dist/runtime/installation/to-current-config.js +171 -0
- package/dist/runtime/installation/to-current-config.js.map +1 -0
- package/dist/runtime/installation/validation.d.ts +8 -0
- package/dist/runtime/installation/validation.d.ts.map +1 -0
- package/dist/runtime/installation/validation.js +117 -0
- package/dist/runtime/installation/validation.js.map +1 -0
- package/dist/runtime/installation/validators/common.d.ts +4 -0
- package/dist/runtime/installation/validators/common.d.ts.map +1 -0
- package/dist/runtime/installation/validators/common.js +32 -0
- package/dist/runtime/installation/validators/common.js.map +1 -0
- package/dist/runtime/installation/validators/infrastructure.d.ts +4 -0
- package/dist/runtime/installation/validators/infrastructure.d.ts.map +1 -0
- package/dist/runtime/installation/validators/infrastructure.js +96 -0
- package/dist/runtime/installation/validators/infrastructure.js.map +1 -0
- package/dist/runtime/installation/validators/operational.d.ts +4 -0
- package/dist/runtime/installation/validators/operational.d.ts.map +1 -0
- package/dist/runtime/installation/validators/operational.js +68 -0
- package/dist/runtime/installation/validators/operational.js.map +1 -0
- package/dist/runtime/installation/validators/profile.d.ts +4 -0
- package/dist/runtime/installation/validators/profile.d.ts.map +1 -0
- package/dist/runtime/installation/validators/profile.js +80 -0
- package/dist/runtime/installation/validators/profile.js.map +1 -0
- package/dist/runtime/installation/validators/secrets.d.ts +4 -0
- package/dist/runtime/installation/validators/secrets.d.ts.map +1 -0
- package/dist/runtime/installation/validators/secrets.js +85 -0
- package/dist/runtime/installation/validators/secrets.js.map +1 -0
- package/dist/runtime/launch-plan-format.d.ts +3 -0
- package/dist/runtime/launch-plan-format.d.ts.map +1 -0
- package/dist/runtime/launch-plan-format.js +57 -0
- package/dist/runtime/launch-plan-format.js.map +1 -0
- package/dist/runtime/launch.d.ts +35 -3
- package/dist/runtime/launch.d.ts.map +1 -1
- package/dist/runtime/launch.js +382 -37
- package/dist/runtime/launch.js.map +1 -1
- package/dist/runtime/license/license-clock.d.ts +12 -0
- package/dist/runtime/license/license-clock.d.ts.map +1 -0
- package/dist/runtime/license/license-clock.js +57 -0
- package/dist/runtime/license/license-clock.js.map +1 -0
- package/dist/runtime/license/license-report.d.ts +19 -0
- package/dist/runtime/license/license-report.d.ts.map +1 -0
- package/dist/runtime/license/license-report.js +105 -0
- package/dist/runtime/license/license-report.js.map +1 -0
- package/dist/runtime/license/license-store.d.ts +5 -0
- package/dist/runtime/license/license-store.d.ts.map +1 -0
- package/dist/runtime/license/license-store.js +11 -0
- package/dist/runtime/license/license-store.js.map +1 -0
- package/dist/runtime/license/registry-credential.d.ts +26 -0
- package/dist/runtime/license/registry-credential.d.ts.map +1 -0
- package/dist/runtime/license/registry-credential.js +94 -0
- package/dist/runtime/license/registry-credential.js.map +1 -0
- package/dist/runtime/license/resolve-license.d.ts +30 -0
- package/dist/runtime/license/resolve-license.d.ts.map +1 -0
- package/dist/runtime/license/resolve-license.js +73 -0
- package/dist/runtime/license/resolve-license.js.map +1 -0
- package/dist/runtime/license/store-license.d.ts +18 -0
- package/dist/runtime/license/store-license.d.ts.map +1 -0
- package/dist/runtime/license/store-license.js +26 -0
- package/dist/runtime/license/store-license.js.map +1 -0
- package/dist/runtime/lock-loader.d.ts +3 -6
- package/dist/runtime/lock-loader.d.ts.map +1 -1
- package/dist/runtime/lock-loader.js +26 -20
- package/dist/runtime/lock-loader.js.map +1 -1
- package/dist/runtime/native-process-group.d.ts +46 -0
- package/dist/runtime/native-process-group.d.ts.map +1 -0
- package/dist/runtime/native-process-group.js +390 -0
- package/dist/runtime/native-process-group.js.map +1 -0
- package/dist/runtime/object-registry-client.d.ts +31 -0
- package/dist/runtime/object-registry-client.d.ts.map +1 -0
- package/dist/runtime/object-registry-client.js +54 -0
- package/dist/runtime/object-registry-client.js.map +1 -0
- package/dist/runtime/paths.d.ts +2 -0
- package/dist/runtime/paths.d.ts.map +1 -1
- package/dist/runtime/paths.js +3 -0
- package/dist/runtime/paths.js.map +1 -1
- package/dist/runtime/roster.d.ts +12 -5
- package/dist/runtime/roster.d.ts.map +1 -1
- package/dist/runtime/roster.js +89 -11
- package/dist/runtime/roster.js.map +1 -1
- package/dist/runtime/run-manifest.d.ts +52 -0
- package/dist/runtime/run-manifest.d.ts.map +1 -0
- package/dist/runtime/run-manifest.js +587 -0
- package/dist/runtime/run-manifest.js.map +1 -0
- package/dist/runtime/runner/container-preflight.d.ts +77 -0
- package/dist/runtime/runner/container-preflight.d.ts.map +1 -0
- package/dist/runtime/runner/container-preflight.js +360 -0
- package/dist/runtime/runner/container-preflight.js.map +1 -0
- package/dist/runtime/runner/container-runner.d.ts +14 -0
- package/dist/runtime/runner/container-runner.d.ts.map +1 -1
- package/dist/runtime/runner/container-runner.js +110 -14
- package/dist/runtime/runner/container-runner.js.map +1 -1
- package/dist/runtime/runner/docker-cli.d.ts +35 -2
- package/dist/runtime/runner/docker-cli.d.ts.map +1 -1
- package/dist/runtime/runner/docker-cli.js +314 -9
- package/dist/runtime/runner/docker-cli.js.map +1 -1
- package/dist/runtime/runner/health-probe.d.ts +1 -0
- package/dist/runtime/runner/health-probe.d.ts.map +1 -1
- package/dist/runtime/runner/health-probe.js +3 -2
- package/dist/runtime/runner/health-probe.js.map +1 -1
- package/dist/runtime/runner/helm-cli.d.ts +19 -1
- package/dist/runtime/runner/helm-cli.d.ts.map +1 -1
- package/dist/runtime/runner/helm-cli.js +76 -8
- package/dist/runtime/runner/helm-cli.js.map +1 -1
- package/dist/runtime/runner/helm-runner.d.ts +3 -0
- package/dist/runtime/runner/helm-runner.d.ts.map +1 -1
- package/dist/runtime/runner/helm-runner.js +23 -7
- package/dist/runtime/runner/helm-runner.js.map +1 -1
- package/dist/runtime/runner/host-platform.d.ts +39 -0
- package/dist/runtime/runner/host-platform.d.ts.map +1 -0
- package/dist/runtime/runner/host-platform.js +136 -0
- package/dist/runtime/runner/host-platform.js.map +1 -0
- package/dist/runtime/runner/kube-cli.d.ts +23 -0
- package/dist/runtime/runner/kube-cli.d.ts.map +1 -0
- package/dist/runtime/runner/kube-cli.js +112 -0
- package/dist/runtime/runner/kube-cli.js.map +1 -0
- package/dist/runtime/runner/native-runner.d.ts.map +1 -1
- package/dist/runtime/runner/native-runner.js +46 -15
- package/dist/runtime/runner/native-runner.js.map +1 -1
- package/dist/runtime/runner/service-runner.d.ts +5 -0
- package/dist/runtime/runner/service-runner.d.ts.map +1 -1
- package/dist/runtime/runner/service-runner.js.map +1 -1
- package/dist/runtime/runner/stream-outcome.d.ts +7 -0
- package/dist/runtime/runner/stream-outcome.d.ts.map +1 -0
- package/dist/runtime/runner/stream-outcome.js +13 -0
- package/dist/runtime/runner/stream-outcome.js.map +1 -0
- package/dist/runtime/secrets/managed-local-cipher.d.ts +18 -0
- package/dist/runtime/secrets/managed-local-cipher.d.ts.map +1 -0
- package/dist/runtime/secrets/managed-local-cipher.js +110 -0
- package/dist/runtime/secrets/managed-local-cipher.js.map +1 -0
- package/dist/runtime/secrets/managed-local-files.d.ts +4 -0
- package/dist/runtime/secrets/managed-local-files.d.ts.map +1 -0
- package/dist/runtime/secrets/managed-local-files.js +132 -0
- package/dist/runtime/secrets/managed-local-files.js.map +1 -0
- package/dist/runtime/secrets/managed-local-key-provider.d.ts +27 -0
- package/dist/runtime/secrets/managed-local-key-provider.d.ts.map +1 -0
- package/dist/runtime/secrets/managed-local-key-provider.js +144 -0
- package/dist/runtime/secrets/managed-local-key-provider.js.map +1 -0
- package/dist/runtime/secrets/managed-local-secret-store.d.ts +18 -0
- package/dist/runtime/secrets/managed-local-secret-store.d.ts.map +1 -0
- package/dist/runtime/secrets/managed-local-secret-store.js +82 -0
- package/dist/runtime/secrets/managed-local-secret-store.js.map +1 -0
- package/dist/runtime/secrets/managed-local-store.d.ts +33 -0
- package/dist/runtime/secrets/managed-local-store.d.ts.map +1 -0
- package/dist/runtime/secrets/managed-local-store.js +121 -0
- package/dist/runtime/secrets/managed-local-store.js.map +1 -0
- package/dist/runtime/secrets/resolver.d.ts +23 -0
- package/dist/runtime/secrets/resolver.d.ts.map +1 -0
- package/dist/runtime/secrets/resolver.js +265 -0
- package/dist/runtime/secrets/resolver.js.map +1 -0
- package/dist/runtime/secrets/url-security.d.ts +3 -0
- package/dist/runtime/secrets/url-security.d.ts.map +1 -0
- package/dist/runtime/secrets/url-security.js +13 -0
- package/dist/runtime/secrets/url-security.js.map +1 -0
- package/dist/runtime/sources/credentials.d.ts +2 -0
- package/dist/runtime/sources/credentials.d.ts.map +1 -1
- package/dist/runtime/sources/credentials.js +51 -1
- package/dist/runtime/sources/credentials.js.map +1 -1
- package/dist/runtime/sources/kinds/distribution.js +3 -3
- package/dist/runtime/sources/kinds/distribution.js.map +1 -1
- package/dist/runtime/sources/kinds/git.d.ts +6 -3
- package/dist/runtime/sources/kinds/git.d.ts.map +1 -1
- package/dist/runtime/sources/kinds/git.js +99 -22
- package/dist/runtime/sources/kinds/git.js.map +1 -1
- package/dist/runtime/sources/manifest-walk.d.ts +1 -0
- package/dist/runtime/sources/manifest-walk.d.ts.map +1 -1
- package/dist/runtime/sources/manifest-walk.js +16 -11
- package/dist/runtime/sources/manifest-walk.js.map +1 -1
- package/dist/runtime/sources/resolve-context.d.ts +7 -0
- package/dist/runtime/sources/resolve-context.d.ts.map +1 -0
- package/dist/runtime/sources/resolve-context.js +3 -0
- package/dist/runtime/sources/resolve-context.js.map +1 -0
- package/dist/runtime/sources/resolver.d.ts +2 -2
- package/dist/runtime/sources/resolver.d.ts.map +1 -1
- package/dist/runtime/sources/resolver.js +11 -5
- package/dist/runtime/sources/resolver.js.map +1 -1
- package/dist/runtime/sources/schema.d.ts.map +1 -1
- package/dist/runtime/sources/schema.js +51 -3
- package/dist/runtime/sources/schema.js.map +1 -1
- package/dist/runtime/store-client.d.ts +59 -0
- package/dist/runtime/store-client.d.ts.map +1 -0
- package/dist/runtime/store-client.js +72 -0
- package/dist/runtime/store-client.js.map +1 -0
- package/dist/runtime/store-submit.d.ts +31 -0
- package/dist/runtime/store-submit.d.ts.map +1 -0
- package/dist/runtime/store-submit.js +77 -0
- package/dist/runtime/store-submit.js.map +1 -0
- package/dist/runtime/supervisor.d.ts +18 -0
- package/dist/runtime/supervisor.d.ts.map +1 -1
- package/dist/runtime/supervisor.js +162 -15
- package/dist/runtime/supervisor.js.map +1 -1
- package/dist/runtime/waves.d.ts +1 -1
- package/dist/runtime/waves.d.ts.map +1 -1
- package/dist/runtime/waves.js +86 -19
- package/dist/runtime/waves.js.map +1 -1
- package/examples/01-local-native.yaml +4 -1
- package/examples/03-byo-infra.yaml +17 -7
- package/examples/05-appliance-helm.yaml +1 -1
- package/examples/06-biome-sources.yaml +4 -1
- package/package.json +20 -28
- package/xema.config.example.yaml +22 -18
- package/LICENSE +0 -176
- package/dist/lib/command-registry.d.ts +0 -5
- package/dist/lib/command-registry.d.ts.map +0 -1
- package/dist/lib/command-registry.js +0 -17
- package/dist/lib/command-registry.js.map +0 -1
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.LocalInstallationReadinessObserver = void 0;
|
|
18
|
+
exports.readinessExpectationFromLaunchPlan = readinessExpectationFromLaunchPlan;
|
|
19
|
+
exports.proveLocalLaunchReadiness = proveLocalLaunchReadiness;
|
|
20
|
+
const helm_release_readiness_1 = require("./helm-release-readiness");
|
|
21
|
+
const readiness_proof_1 = require("./readiness-proof");
|
|
22
|
+
const schema_1 = require("../config/schema");
|
|
23
|
+
const run_manifest_1 = require("../run-manifest");
|
|
24
|
+
const container_runner_1 = require("../runner/container-runner");
|
|
25
|
+
const docker_cli_1 = require("../runner/docker-cli");
|
|
26
|
+
const health_probe_1 = require("../runner/health-probe");
|
|
27
|
+
__exportStar(require("./readiness-proof"), exports);
|
|
28
|
+
function readinessExpectationFromLaunchPlan(plan, effectivePlanHash, installationId, executionId) {
|
|
29
|
+
if (plan.substrate === schema_1.Substrate.Helm && plan.helmNamespace === undefined) {
|
|
30
|
+
throw new Error('A Helm launch plan must resolve its Kubernetes namespace before readiness can be proved.');
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
substrate: plan.substrate,
|
|
34
|
+
distributionLockPath: plan.lock.path,
|
|
35
|
+
installationId,
|
|
36
|
+
effectivePlanHash,
|
|
37
|
+
...(executionId === undefined ? {} : { executionId }),
|
|
38
|
+
...(plan.helmNamespace === undefined
|
|
39
|
+
? {}
|
|
40
|
+
: { namespace: plan.helmNamespace }),
|
|
41
|
+
workloads: plan.roster.map((entry) => {
|
|
42
|
+
const port = plan.ports.get(entry.name);
|
|
43
|
+
if (port === undefined) {
|
|
44
|
+
throw new Error(`Resolved launch plan has no port for expected workload ${entry.name}.`);
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
name: entry.name,
|
|
48
|
+
unitType: entry.unitType,
|
|
49
|
+
port,
|
|
50
|
+
...(plan.substrate === schema_1.Substrate.Container
|
|
51
|
+
? {
|
|
52
|
+
image: (0, container_runner_1.containerImageForRosterEntry)(entry),
|
|
53
|
+
containerPort: container_runner_1.DEFAULT_CONTAINER_SERVICE_PORT,
|
|
54
|
+
}
|
|
55
|
+
: {}),
|
|
56
|
+
};
|
|
57
|
+
}),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
async function proveLocalLaunchReadiness(handle, effectivePlanHash, observer = new LocalInstallationReadinessObserver()) {
|
|
61
|
+
const observed = await observer.observe(readinessExpectationFromLaunchPlan(handle.plan, effectivePlanHash, handle.installationId, handle.executionId));
|
|
62
|
+
const handleIdentityIssue = handle.planHash === effectivePlanHash
|
|
63
|
+
? []
|
|
64
|
+
: [
|
|
65
|
+
{
|
|
66
|
+
code: readiness_proof_1.InstallationReadinessIssueCode.PlanIdentityMismatch,
|
|
67
|
+
message: `Launch handle plan ${handle.planHash} does not match effective plan ${effectivePlanHash}.`,
|
|
68
|
+
remediation: 'Discard the stale launch handle and execute the current desired plan.',
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
const running = new Set(handle.result.running.map((workload) => workload.name));
|
|
72
|
+
const executionIssues = handle.plan.roster
|
|
73
|
+
.filter((workload) => !running.has(workload.name))
|
|
74
|
+
.map((workload) => {
|
|
75
|
+
const skipped = handle.result.skipped.find((candidate) => candidate.name === workload.name);
|
|
76
|
+
return {
|
|
77
|
+
code: readiness_proof_1.InstallationReadinessIssueCode.MissingWorkload,
|
|
78
|
+
workload: workload.name,
|
|
79
|
+
message: skipped === undefined
|
|
80
|
+
? `Launch execution did not report expected workload ${workload.name} ready.`
|
|
81
|
+
: `Launch execution skipped expected workload ${workload.name}: ${skipped.reason}`,
|
|
82
|
+
remediation: 'Resolve the launch failure and re-run `xema installation apply`; an older same-name workload is not readiness evidence.',
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
return {
|
|
86
|
+
...observed,
|
|
87
|
+
ready: observed.ready &&
|
|
88
|
+
handleIdentityIssue.length === 0 &&
|
|
89
|
+
executionIssues.length === 0,
|
|
90
|
+
issues: [
|
|
91
|
+
...observed.issues,
|
|
92
|
+
...handleIdentityIssue,
|
|
93
|
+
...executionIssues,
|
|
94
|
+
],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
class LocalInstallationReadinessObserver {
|
|
98
|
+
docker;
|
|
99
|
+
readinessProbe;
|
|
100
|
+
nativeManifest;
|
|
101
|
+
processProbe;
|
|
102
|
+
nativePortOwnerProbe;
|
|
103
|
+
nativeProcessIdentityProbe;
|
|
104
|
+
helmObserver;
|
|
105
|
+
constructor(docker = new docker_cli_1.DockerCli(), readinessProbe = health_probe_1.probeReadyOnce, nativeManifest = run_manifest_1.readRunManifest, processProbe = processIsAlive, nativePortOwnerProbe = run_manifest_1.runManifestEntryOwnsPortAsync, nativeProcessIdentityProbe = run_manifest_1.runManifestEntryProcessMatchesAsync, helmObserver = new helm_release_readiness_1.HelmReleaseReadinessObserver()) {
|
|
106
|
+
this.docker = docker;
|
|
107
|
+
this.readinessProbe = readinessProbe;
|
|
108
|
+
this.nativeManifest = nativeManifest;
|
|
109
|
+
this.processProbe = processProbe;
|
|
110
|
+
this.nativePortOwnerProbe = nativePortOwnerProbe;
|
|
111
|
+
this.nativeProcessIdentityProbe = nativeProcessIdentityProbe;
|
|
112
|
+
this.helmObserver = helmObserver;
|
|
113
|
+
}
|
|
114
|
+
async observe(expectation) {
|
|
115
|
+
switch (expectation.substrate) {
|
|
116
|
+
case schema_1.Substrate.Native:
|
|
117
|
+
return this.observeNative(expectation);
|
|
118
|
+
case schema_1.Substrate.Container:
|
|
119
|
+
return this.observeContainers(expectation);
|
|
120
|
+
case schema_1.Substrate.Helm:
|
|
121
|
+
return this.helmObserver.observe(expectation);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async observeNative(expectation) {
|
|
125
|
+
const manifest = this.nativeManifest(expectation.installationId);
|
|
126
|
+
const consumed = new Set();
|
|
127
|
+
const workloads = [];
|
|
128
|
+
const issues = [];
|
|
129
|
+
const expectedResults = await (0, readiness_proof_1.mapConcurrentOrdered)(expectation.workloads, readiness_proof_1.MAX_CONCURRENT_READINESS_PROBES, async (expected) => {
|
|
130
|
+
const candidates = manifest.filter((entry) => entry.name === expected.name);
|
|
131
|
+
const entry = expectation.executionId === undefined
|
|
132
|
+
? candidates.length === 1
|
|
133
|
+
? candidates[0]
|
|
134
|
+
: undefined
|
|
135
|
+
: candidates.find((candidate) => candidate.executionId === expectation.executionId);
|
|
136
|
+
if (entry === undefined) {
|
|
137
|
+
return {
|
|
138
|
+
workloads: [],
|
|
139
|
+
issues: [(0, readiness_proof_1.missingWorkload)(expected.name)],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
consumed.add(entry);
|
|
143
|
+
const processAlive = this.processProbe(entry.pid);
|
|
144
|
+
const processFingerprintMatches = processAlive &&
|
|
145
|
+
(await this.nativeProcessIdentityProbe(entry));
|
|
146
|
+
const lifecycleReady = entry.state === run_manifest_1.RunManifestServiceState.Ready;
|
|
147
|
+
const planMatches = entry.planHash === expectation.effectivePlanHash;
|
|
148
|
+
const executionMatches = expectation.executionId === undefined ||
|
|
149
|
+
entry.executionId === expectation.executionId;
|
|
150
|
+
const portMatches = entry.port === expected.port;
|
|
151
|
+
const endpointOwned = lifecycleReady &&
|
|
152
|
+
processFingerprintMatches &&
|
|
153
|
+
portMatches &&
|
|
154
|
+
(await this.nativePortOwnerProbe(entry));
|
|
155
|
+
const serviceReady = endpointOwned &&
|
|
156
|
+
(await this.readinessProbe(`http://127.0.0.1:${String(expected.port)}/health/ready`));
|
|
157
|
+
const workload = {
|
|
158
|
+
name: expected.name,
|
|
159
|
+
state: processAlive &&
|
|
160
|
+
lifecycleReady &&
|
|
161
|
+
processFingerprintMatches &&
|
|
162
|
+
planMatches &&
|
|
163
|
+
executionMatches &&
|
|
164
|
+
portMatches &&
|
|
165
|
+
endpointOwned &&
|
|
166
|
+
serviceReady
|
|
167
|
+
? 'ready'
|
|
168
|
+
: 'unhealthy',
|
|
169
|
+
expected: true,
|
|
170
|
+
checks: {
|
|
171
|
+
processAlive,
|
|
172
|
+
lifecycleState: entry.state,
|
|
173
|
+
lifecycleReady,
|
|
174
|
+
processFingerprintMatches,
|
|
175
|
+
installationId: entry.installationId,
|
|
176
|
+
planHash: entry.planHash,
|
|
177
|
+
planMatches,
|
|
178
|
+
executionId: entry.executionId,
|
|
179
|
+
executionMatches,
|
|
180
|
+
recordedPort: entry.port,
|
|
181
|
+
expectedPort: expected.port,
|
|
182
|
+
portMatches,
|
|
183
|
+
endpointOwned,
|
|
184
|
+
serviceReady,
|
|
185
|
+
pid: entry.pid,
|
|
186
|
+
port: expected.port,
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
const workloadIssues = [];
|
|
190
|
+
if (!processAlive) {
|
|
191
|
+
workloadIssues.push({
|
|
192
|
+
code: readiness_proof_1.InstallationReadinessIssueCode.ProcessNotRunning,
|
|
193
|
+
workload: expected.name,
|
|
194
|
+
message: `Expected process ${expected.name} is not running.`,
|
|
195
|
+
remediation: 'Inspect the workload logs, then re-run `xema installation apply`.',
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
else if (!lifecycleReady) {
|
|
199
|
+
workloadIssues.push({
|
|
200
|
+
code: readiness_proof_1.InstallationReadinessIssueCode.ServiceNotReady,
|
|
201
|
+
workload: expected.name,
|
|
202
|
+
message: `Native workload ${expected.name} is still in its durable starting state.`,
|
|
203
|
+
remediation: 'Wait for the exact spawned process to pass readiness or inspect its startup failure.',
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
else if (!processFingerprintMatches) {
|
|
207
|
+
workloadIssues.push({
|
|
208
|
+
code: readiness_proof_1.InstallationReadinessIssueCode.UnexpectedWorkload,
|
|
209
|
+
workload: expected.name,
|
|
210
|
+
message: `Process ${String(entry.pid)} no longer matches the recorded birth fingerprint for ${expected.name}.`,
|
|
211
|
+
remediation: 'Treat the PID as reused/stale, leave it untouched, and launch a new exact execution.',
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
else if (!serviceReady) {
|
|
215
|
+
workloadIssues.push((0, readiness_proof_1.serviceNotReady)(expected.name));
|
|
216
|
+
}
|
|
217
|
+
if (!planMatches) {
|
|
218
|
+
workloadIssues.push((0, readiness_proof_1.planIdentityMismatch)(expected.name));
|
|
219
|
+
}
|
|
220
|
+
if (!executionMatches) {
|
|
221
|
+
workloadIssues.push((0, readiness_proof_1.executionIdentityMismatch)(expected.name));
|
|
222
|
+
}
|
|
223
|
+
if (!portMatches) {
|
|
224
|
+
workloadIssues.push({
|
|
225
|
+
code: readiness_proof_1.InstallationReadinessIssueCode.UnexpectedWorkload,
|
|
226
|
+
workload: expected.name,
|
|
227
|
+
message: `Native manifest records ${expected.name} on port ${String(entry.port)}, expected ${String(expected.port)}.`,
|
|
228
|
+
remediation: 'Stop the mismatched process and reapply the exact distribution-lock launch plan.',
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
if (processAlive && portMatches && !endpointOwned) {
|
|
232
|
+
workloadIssues.push({
|
|
233
|
+
code: readiness_proof_1.InstallationReadinessIssueCode.UnexpectedWorkload,
|
|
234
|
+
workload: expected.name,
|
|
235
|
+
message: `Process ${String(entry.pid)} does not own the recorded ready endpoint for ${expected.name}.`,
|
|
236
|
+
remediation: 'Stop the unrelated endpoint owner and reapply; health must be served by the recorded workload process tree.',
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
return { workloads: [workload], issues: workloadIssues };
|
|
240
|
+
});
|
|
241
|
+
for (const result of expectedResults) {
|
|
242
|
+
workloads.push(...result.workloads);
|
|
243
|
+
issues.push(...result.issues);
|
|
244
|
+
}
|
|
245
|
+
for (const entry of manifest) {
|
|
246
|
+
if (!consumed.has(entry)) {
|
|
247
|
+
const processAlive = this.processProbe(entry.pid);
|
|
248
|
+
workloads.push({
|
|
249
|
+
name: entry.name,
|
|
250
|
+
state: processAlive ? 'unexpected-running' : 'stale',
|
|
251
|
+
expected: false,
|
|
252
|
+
checks: {
|
|
253
|
+
processAlive,
|
|
254
|
+
pid: entry.pid,
|
|
255
|
+
installationId: entry.installationId,
|
|
256
|
+
planHash: entry.planHash,
|
|
257
|
+
executionId: entry.executionId,
|
|
258
|
+
},
|
|
259
|
+
});
|
|
260
|
+
issues.push((0, readiness_proof_1.unexpectedWorkload)(entry.name));
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return (0, readiness_proof_1.buildReadinessProof)(expectation, workloads, issues);
|
|
264
|
+
}
|
|
265
|
+
async observeContainers(expectation) {
|
|
266
|
+
if (!(await this.docker.available())) {
|
|
267
|
+
return (0, readiness_proof_1.unavailableProof)(expectation, 'The container runtime is not reachable.', 'Start the configured Docker/Podman runtime and run `xema installation status` again.');
|
|
268
|
+
}
|
|
269
|
+
let states;
|
|
270
|
+
try {
|
|
271
|
+
const names = await this.docker.launcherServiceContainersStrict(expectation.installationId);
|
|
272
|
+
states = await this.docker.inspectContainers(names);
|
|
273
|
+
}
|
|
274
|
+
catch (error) {
|
|
275
|
+
return (0, readiness_proof_1.unavailableProof)(expectation, `Container readiness observation failed: ${error instanceof Error ? error.message : String(error)}`, 'Restore the container runtime API and retry; no applied state was committed.');
|
|
276
|
+
}
|
|
277
|
+
const consumed = new Set();
|
|
278
|
+
const workloads = [];
|
|
279
|
+
const issues = [];
|
|
280
|
+
const expectedResults = await (0, readiness_proof_1.mapConcurrentOrdered)(expectation.workloads, readiness_proof_1.MAX_CONCURRENT_READINESS_PROBES, async (expected) => {
|
|
281
|
+
const candidates = states.filter((state) => state.name === expected.name);
|
|
282
|
+
const state = expectation.executionId === undefined
|
|
283
|
+
? candidates.length === 1
|
|
284
|
+
? candidates[0]
|
|
285
|
+
: undefined
|
|
286
|
+
: candidates.find((candidate) => candidate.executionId === expectation.executionId);
|
|
287
|
+
if (state === undefined) {
|
|
288
|
+
return {
|
|
289
|
+
workloads: [],
|
|
290
|
+
issues: [(0, readiness_proof_1.missingWorkload)(expected.name)],
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
consumed.add(state);
|
|
294
|
+
const portBindingMatches = expected.containerPort !== undefined &&
|
|
295
|
+
state.publishedPorts[expected.containerPort] === expected.port;
|
|
296
|
+
const serviceReady = state.running &&
|
|
297
|
+
portBindingMatches &&
|
|
298
|
+
(await this.readinessProbe(`http://127.0.0.1:${String(expected.port)}/health/ready`));
|
|
299
|
+
const healthAcceptable = state.health === undefined || state.health === 'healthy';
|
|
300
|
+
const imageMatches = expected.image !== undefined && state.image === expected.image;
|
|
301
|
+
const installationMatches = state.installationId === expectation.installationId;
|
|
302
|
+
const planMatches = state.planHash === expectation.effectivePlanHash;
|
|
303
|
+
const executionMatches = expectation.executionId === undefined ||
|
|
304
|
+
state.executionId === expectation.executionId;
|
|
305
|
+
const workload = {
|
|
306
|
+
name: expected.name,
|
|
307
|
+
state: state.running &&
|
|
308
|
+
healthAcceptable &&
|
|
309
|
+
imageMatches &&
|
|
310
|
+
installationMatches &&
|
|
311
|
+
planMatches &&
|
|
312
|
+
executionMatches &&
|
|
313
|
+
portBindingMatches &&
|
|
314
|
+
serviceReady
|
|
315
|
+
? 'ready'
|
|
316
|
+
: 'unhealthy',
|
|
317
|
+
expected: true,
|
|
318
|
+
checks: {
|
|
319
|
+
containerRunning: state.running,
|
|
320
|
+
containerHealth: state.health ?? 'not-configured',
|
|
321
|
+
expectedImage: expected.image ?? 'missing',
|
|
322
|
+
observedImage: state.image,
|
|
323
|
+
imageMatches,
|
|
324
|
+
installationId: state.installationId ?? 'missing',
|
|
325
|
+
installationMatches,
|
|
326
|
+
planHash: state.planHash ?? 'missing',
|
|
327
|
+
planMatches,
|
|
328
|
+
executionId: state.executionId ?? 'missing',
|
|
329
|
+
executionMatches,
|
|
330
|
+
expectedContainerPort: expected.containerPort ?? 'missing',
|
|
331
|
+
observedHostPort: expected.containerPort === undefined
|
|
332
|
+
? 'missing'
|
|
333
|
+
: (state.publishedPorts[expected.containerPort] ?? 'missing'),
|
|
334
|
+
portBindingMatches,
|
|
335
|
+
serviceReady,
|
|
336
|
+
port: expected.port,
|
|
337
|
+
},
|
|
338
|
+
};
|
|
339
|
+
const workloadIssues = [];
|
|
340
|
+
if (!state.running) {
|
|
341
|
+
workloadIssues.push({
|
|
342
|
+
code: readiness_proof_1.InstallationReadinessIssueCode.ContainerNotRunning,
|
|
343
|
+
workload: expected.name,
|
|
344
|
+
message: `Expected container ${expected.name} is not running.`,
|
|
345
|
+
remediation: 'Inspect the container logs and runtime state, then re-run `xema installation apply`.',
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
if (!healthAcceptable) {
|
|
349
|
+
workloadIssues.push({
|
|
350
|
+
code: readiness_proof_1.InstallationReadinessIssueCode.ContainerUnhealthy,
|
|
351
|
+
workload: expected.name,
|
|
352
|
+
message: `Container ${expected.name} reports health ${state.health ?? 'unknown'}.`,
|
|
353
|
+
remediation: 'Inspect the container healthcheck output and service logs before reapplying.',
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
if (!imageMatches) {
|
|
357
|
+
workloadIssues.push({
|
|
358
|
+
code: readiness_proof_1.InstallationReadinessIssueCode.UnexpectedWorkload,
|
|
359
|
+
workload: expected.name,
|
|
360
|
+
message: `Container ${expected.name} uses ${state.image}, not the distribution-lock image ${expected.image ?? 'missing'}.`,
|
|
361
|
+
remediation: 'Remove the stale container and re-run apply so the pinned distribution image is launched.',
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
if (!planMatches || !installationMatches) {
|
|
365
|
+
workloadIssues.push((0, readiness_proof_1.planIdentityMismatch)(expected.name));
|
|
366
|
+
}
|
|
367
|
+
if (!executionMatches) {
|
|
368
|
+
workloadIssues.push((0, readiness_proof_1.executionIdentityMismatch)(expected.name));
|
|
369
|
+
}
|
|
370
|
+
if (!portBindingMatches) {
|
|
371
|
+
workloadIssues.push({
|
|
372
|
+
code: readiness_proof_1.InstallationReadinessIssueCode.UnexpectedWorkload,
|
|
373
|
+
workload: expected.name,
|
|
374
|
+
message: `Container ${expected.name} does not publish its expected service port to host port ${String(expected.port)}.`,
|
|
375
|
+
remediation: 'Reconcile the installation so the owned container, not an unrelated host process, serves the probed endpoint.',
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
if (state.running && !serviceReady) {
|
|
379
|
+
workloadIssues.push((0, readiness_proof_1.serviceNotReady)(expected.name));
|
|
380
|
+
}
|
|
381
|
+
return { workloads: [workload], issues: workloadIssues };
|
|
382
|
+
});
|
|
383
|
+
for (const result of expectedResults) {
|
|
384
|
+
workloads.push(...result.workloads);
|
|
385
|
+
issues.push(...result.issues);
|
|
386
|
+
}
|
|
387
|
+
for (const state of states) {
|
|
388
|
+
if (!consumed.has(state)) {
|
|
389
|
+
workloads.push({
|
|
390
|
+
name: state.name,
|
|
391
|
+
state: state.running ? 'unexpected-running' : 'unexpected-stopped',
|
|
392
|
+
expected: false,
|
|
393
|
+
checks: {
|
|
394
|
+
containerRunning: state.running,
|
|
395
|
+
observedImage: state.image,
|
|
396
|
+
installationId: state.installationId ?? 'missing',
|
|
397
|
+
planHash: state.planHash ?? 'missing',
|
|
398
|
+
executionId: state.executionId ?? 'missing',
|
|
399
|
+
containerHealth: state.health ?? 'not-configured',
|
|
400
|
+
},
|
|
401
|
+
});
|
|
402
|
+
issues.push((0, readiness_proof_1.unexpectedWorkload)(state.name));
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return (0, readiness_proof_1.buildReadinessProof)(expectation, workloads, issues);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
exports.LocalInstallationReadinessObserver = LocalInstallationReadinessObserver;
|
|
409
|
+
function processIsAlive(pid) {
|
|
410
|
+
try {
|
|
411
|
+
process.kill(pid, 0);
|
|
412
|
+
return true;
|
|
413
|
+
}
|
|
414
|
+
catch (error) {
|
|
415
|
+
return error.code === 'EPERM';
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
//# sourceMappingURL=readiness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness.js","sourceRoot":"","sources":["../../../src/runtime/installation/readiness.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;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gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIvD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.serializeInstallation = serializeInstallation;
|
|
4
|
+
exports.hashInstallation = hashInstallation;
|
|
5
|
+
const node_crypto_1 = require("node:crypto");
|
|
6
|
+
function serializeInstallation(value) {
|
|
7
|
+
return serializeValue(value);
|
|
8
|
+
}
|
|
9
|
+
function hashInstallation(value) {
|
|
10
|
+
return (0, node_crypto_1.createHash)('sha256')
|
|
11
|
+
.update(serializeInstallation(value))
|
|
12
|
+
.digest('hex');
|
|
13
|
+
}
|
|
14
|
+
function serializeValue(value) {
|
|
15
|
+
if (value === null ||
|
|
16
|
+
typeof value === 'boolean' ||
|
|
17
|
+
typeof value === 'string') {
|
|
18
|
+
return JSON.stringify(value);
|
|
19
|
+
}
|
|
20
|
+
if (typeof value === 'number') {
|
|
21
|
+
if (!Number.isFinite(value)) {
|
|
22
|
+
throw new Error('Installation plans cannot contain non-finite numbers');
|
|
23
|
+
}
|
|
24
|
+
return JSON.stringify(value);
|
|
25
|
+
}
|
|
26
|
+
if (Array.isArray(value)) {
|
|
27
|
+
return `[${value.map((entry) => serializeValue(entry)).join(',')}]`;
|
|
28
|
+
}
|
|
29
|
+
if (typeof value === 'object') {
|
|
30
|
+
const record = value;
|
|
31
|
+
return `{${Object.keys(record)
|
|
32
|
+
.filter((key) => record[key] !== undefined)
|
|
33
|
+
.sort()
|
|
34
|
+
.map((key) => `${JSON.stringify(key)}:${serializeValue(record[key])}`)
|
|
35
|
+
.join(',')}}`;
|
|
36
|
+
}
|
|
37
|
+
throw new Error(`Installation plans cannot contain values of type ${typeof value}`);
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=serialization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialization.js","sourceRoot":"","sources":["../../../src/runtime/install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C,IAAI,EAAE;aACN,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;aACrE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAClB,CAAC;IACD,MAAM,IAAI,KAAK,CACb,oDAAoD,OAAO,KAAK,EAAE,CACnE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InstallationProfile, type XemaInstallation } from './contract';
|
|
2
|
+
declare const SETUP_PROFILES: readonly [InstallationProfile.Developer, InstallationProfile.Starter, InstallationProfile.SingleNodeProduction];
|
|
3
|
+
export type SetupInstallationProfile = (typeof SETUP_PROFILES)[number];
|
|
4
|
+
export declare function parseSetupInstallationProfile(value: string): SetupInstallationProfile;
|
|
5
|
+
export declare function createInstallationProfileTemplate(profile: SetupInstallationProfile, name: string, edition?: string): XemaInstallation;
|
|
6
|
+
export declare function setupInstallationProfiles(): readonly SetupInstallationProfile[];
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=setup-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-profile.d.ts","sourceRoot":"","sources":["../../../src/runtime/installation/setup-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,mBAAmB,EAInB,KAAK,gBAAgB,EACtB,MAAM,YAAY,CAAC;AAEpB,QAAA,MAAM,cAAc,iHAIV,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,MAAM,GACZ,wBAAwB,CAQ1B;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,wBAAwB,EACjC,IAAI,EAAE,MAAM,EACZ,OAAO,SAAQ,GACd,gBAAgB,CAmBlB;AAED,wBAAgB,yBAAyB,IAAI,SAAS,wBAAwB,EAAE,CAE/E"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseSetupInstallationProfile = parseSetupInstallationProfile;
|
|
4
|
+
exports.createInstallationProfileTemplate = createInstallationProfileTemplate;
|
|
5
|
+
exports.setupInstallationProfiles = setupInstallationProfiles;
|
|
6
|
+
const contract_1 = require("./contract");
|
|
7
|
+
const SETUP_PROFILES = [
|
|
8
|
+
contract_1.InstallationProfile.Developer,
|
|
9
|
+
contract_1.InstallationProfile.Starter,
|
|
10
|
+
contract_1.InstallationProfile.SingleNodeProduction,
|
|
11
|
+
];
|
|
12
|
+
function parseSetupInstallationProfile(value) {
|
|
13
|
+
const profile = SETUP_PROFILES.find((candidate) => candidate === value);
|
|
14
|
+
if (profile === undefined) {
|
|
15
|
+
throw new Error(`Unsupported setup profile "${value}". Choose ${SETUP_PROFILES.join(', ')}.`);
|
|
16
|
+
}
|
|
17
|
+
return profile;
|
|
18
|
+
}
|
|
19
|
+
function createInstallationProfileTemplate(profile, name, edition = 'oss') {
|
|
20
|
+
return {
|
|
21
|
+
apiVersion: contract_1.XEMA_INSTALLATION_API_VERSION,
|
|
22
|
+
kind: contract_1.XEMA_INSTALLATION_KIND,
|
|
23
|
+
metadata: { name },
|
|
24
|
+
spec: {
|
|
25
|
+
profile,
|
|
26
|
+
lifecycle: {
|
|
27
|
+
environment: profile === contract_1.InstallationProfile.SingleNodeProduction
|
|
28
|
+
? contract_1.LifecycleEnvironment.Production
|
|
29
|
+
: contract_1.LifecycleEnvironment.Development,
|
|
30
|
+
},
|
|
31
|
+
distribution: {
|
|
32
|
+
kind: contract_1.DistributionReferenceKind.Edition,
|
|
33
|
+
edition,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function setupInstallationProfiles() {
|
|
39
|
+
return SETUP_PROFILES;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=setup-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-profile.js","sourceRoot":"","sources":["../../../src/runtime/installation/setup-profile.ts"],"names":[],"mappings":";;AAiBA,sEAUC;AAED,8EAuBC;AAED,8DAEC;AAxDD,yCAOoB;AAEpB,MAAM,cAAc,GAAG;IACrB,8BAAmB,CAAC,SAAS;IAC7B,8BAAmB,CAAC,OAAO;IAC3B,8BAAmB,CAAC,oBAAoB;CAChC,CAAC;AAIX,SAAgB,6BAA6B,CAC3C,KAAa;IAEb,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC;IACxE,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,8BAA8B,KAAK,aAAa,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC7E,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAgB,iCAAiC,CAC/C,OAAiC,EACjC,IAAY,EACZ,OAAO,GAAG,KAAK;IAEf,OAAO;QACL,UAAU,EAAE,wCAA6B;QACzC,IAAI,EAAE,iCAAsB;QAC5B,QAAQ,EAAE,EAAE,IAAI,EAAE;QAClB,IAAI,EAAE;YACJ,OAAO;YACP,SAAS,EAAE;gBACT,WAAW,EACT,OAAO,KAAK,8BAAmB,CAAC,oBAAoB;oBAClD,CAAC,CAAC,+BAAoB,CAAC,UAAU;oBACjC,CAAC,CAAC,+BAAoB,CAAC,WAAW;aACvC;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,oCAAyB,CAAC,OAAO;gBACvC,OAAO;aACR;SACF;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,yBAAyB;IACvC,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { InstallationProfile, SecretReferenceProvider } from './contract';
|
|
2
|
+
import { InstallationRenderObligation, type InstallationRenderAcknowledgement } from './diff';
|
|
3
|
+
import type { CompiledXemaInstallation } from './compiler';
|
|
4
|
+
declare const RENDERER_ID = "xema-cli-installation-setup/v1";
|
|
5
|
+
export interface SecretProviderReadiness {
|
|
6
|
+
readonly provider: SecretReferenceProvider;
|
|
7
|
+
readonly available: boolean;
|
|
8
|
+
readonly keyRef?: string;
|
|
9
|
+
readonly resolvedEntries?: readonly string[];
|
|
10
|
+
}
|
|
11
|
+
export interface InstallationSetupRenderOptions {
|
|
12
|
+
readonly providers?: readonly SecretProviderReadiness[];
|
|
13
|
+
}
|
|
14
|
+
export interface InstallationSetupArtifact {
|
|
15
|
+
readonly path: string;
|
|
16
|
+
readonly mediaType: 'application/json';
|
|
17
|
+
readonly obligation: InstallationRenderObligation;
|
|
18
|
+
readonly effectivePlanHash: string;
|
|
19
|
+
readonly digest: string;
|
|
20
|
+
readonly content: string;
|
|
21
|
+
}
|
|
22
|
+
export interface InstallationSetupRendering {
|
|
23
|
+
readonly rendererId: typeof RENDERER_ID;
|
|
24
|
+
readonly profile: InstallationProfile;
|
|
25
|
+
readonly effectivePlanHash: string;
|
|
26
|
+
readonly artifacts: readonly InstallationSetupArtifact[];
|
|
27
|
+
readonly renderedArtifacts: readonly InstallationRenderAcknowledgement[];
|
|
28
|
+
}
|
|
29
|
+
export declare function renderInstallationSetup(installation: CompiledXemaInstallation, opts?: InstallationSetupRenderOptions): InstallationSetupRendering;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=setup-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-renderer.d.ts","sourceRoot":"","sources":["../../../src/runtime/installation/setup-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGnB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,4BAA4B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