@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
package/dist/commands/logs.js
CHANGED
|
@@ -1,61 +1,162 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerCommand = registerCommand;
|
|
4
|
-
|
|
4
|
+
exports.runLogs = runLogs;
|
|
5
|
+
const cli_errors_1 = require("../lib/cli-errors");
|
|
5
6
|
const exit_codes_1 = require("../lib/exit-codes");
|
|
7
|
+
const loader_1 = require("../runtime/config/loader");
|
|
8
|
+
const schema_1 = require("../runtime/config/schema");
|
|
9
|
+
const installation_1 = require("../runtime/installation");
|
|
6
10
|
const docker_cli_1 = require("../runtime/runner/docker-cli");
|
|
11
|
+
const helm_cli_1 = require("../runtime/runner/helm-cli");
|
|
12
|
+
const kube_cli_1 = require("../runtime/runner/kube-cli");
|
|
13
|
+
const stream_outcome_1 = require("../runtime/runner/stream-outcome");
|
|
7
14
|
function registerCommand(program) {
|
|
8
15
|
program
|
|
9
16
|
.command('logs')
|
|
10
|
-
.argument('[service]', 'Service
|
|
11
|
-
.summary('Show logs for a launcher-owned workload')
|
|
17
|
+
.argument('[service]', 'Service name to show logs for')
|
|
18
|
+
.summary('Show logs for a launcher-owned workload (any substrate)')
|
|
19
|
+
.description('Stream logs from a workload this installation owns, per the configured ' +
|
|
20
|
+
'substrate: container (`docker logs`), helm (`kubectl logs` in the release ' +
|
|
21
|
+
'namespace), or the foreground console notice on native. With no service, ' +
|
|
22
|
+
'lists the owned workloads you can pick from.')
|
|
12
23
|
.option('-f, --follow', 'Follow log output')
|
|
24
|
+
.option('--config <path>', 'Path to xema.config.yaml (selects the substrate)')
|
|
13
25
|
.action(async (service, opts) => {
|
|
26
|
+
let outcome;
|
|
14
27
|
try {
|
|
15
|
-
await runLogs(service, opts);
|
|
28
|
+
outcome = await runLogs(service, opts);
|
|
16
29
|
}
|
|
17
30
|
catch (err) {
|
|
18
31
|
const message = err instanceof Error ? err.message : String(err);
|
|
19
|
-
(0, exit_codes_1.exitWith)(
|
|
32
|
+
(0, exit_codes_1.exitWith)((0, cli_errors_1.lifecycleExitCode)(err), `xema logs failed: ${message}`);
|
|
20
33
|
}
|
|
34
|
+
printOutcome(outcome);
|
|
35
|
+
(0, exit_codes_1.exitWith)(outcome.exitCode);
|
|
21
36
|
});
|
|
22
37
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (!(await docker.available())) {
|
|
26
|
-
(0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.MissingDependency, 'No container runtime reachable.');
|
|
38
|
+
function printOutcome(outcome) {
|
|
39
|
+
if (outcome.lines.length === 0) {
|
|
27
40
|
return;
|
|
28
41
|
}
|
|
42
|
+
const write = outcome.exitCode === exit_codes_1.XemaCliExitCode.Ok ? console.log : console.error;
|
|
43
|
+
for (const line of outcome.lines) {
|
|
44
|
+
write(line);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function runLogs(service, opts = {}, seams = {}) {
|
|
48
|
+
const loadConfig = seams.loadConfig ?? loader_1.loadXemaConfig;
|
|
49
|
+
const loaded = (0, cli_errors_1.asConfigError)(() => loadConfig(opts.config !== undefined ? { explicit: opts.config } : {}));
|
|
50
|
+
const follow = opts.follow === true;
|
|
51
|
+
switch (loaded.config.app.substrate) {
|
|
52
|
+
case schema_1.Substrate.Helm:
|
|
53
|
+
return runHelmLogs(service, follow, (0, installation_1.installationContext)(loaded.installationIdentity).installationId, seams.helm ?? new helm_cli_1.HelmCli(), seams.kube ?? new kube_cli_1.KubeCli());
|
|
54
|
+
case schema_1.Substrate.Native:
|
|
55
|
+
return runNativeLogs();
|
|
56
|
+
case schema_1.Substrate.Container:
|
|
57
|
+
return runContainerLogs(service, follow, seams.docker ?? new docker_cli_1.DockerCli());
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function runNativeLogs() {
|
|
61
|
+
return {
|
|
62
|
+
exitCode: exit_codes_1.XemaCliExitCode.Ok,
|
|
63
|
+
lines: [
|
|
64
|
+
'Native services log to the foreground `xema up` / `xema dev` console that ' +
|
|
65
|
+
'started them — there is no log store to stream from.',
|
|
66
|
+
'Run the launch in the foreground to watch the merged, service-prefixed output.',
|
|
67
|
+
],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
async function runContainerLogs(service, follow, docker) {
|
|
71
|
+
if (!(await docker.available())) {
|
|
72
|
+
return {
|
|
73
|
+
exitCode: exit_codes_1.XemaCliExitCode.MissingDependency,
|
|
74
|
+
lines: ['No container runtime reachable.'],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
29
77
|
const containers = await docker.launcherContainers();
|
|
30
|
-
if (
|
|
78
|
+
if (service === undefined) {
|
|
31
79
|
if (containers.length === 0) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
for (const name of containers) {
|
|
37
|
-
console.log(` ${name}`);
|
|
80
|
+
return {
|
|
81
|
+
exitCode: exit_codes_1.XemaCliExitCode.Ok,
|
|
82
|
+
lines: ['No launcher-owned workloads running.'],
|
|
83
|
+
};
|
|
38
84
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
85
|
+
return {
|
|
86
|
+
exitCode: exit_codes_1.XemaCliExitCode.Ok,
|
|
87
|
+
lines: [
|
|
88
|
+
'Pick a service to show logs for:',
|
|
89
|
+
...containers.map((name) => ` ${name}`),
|
|
90
|
+
'',
|
|
91
|
+
'Usage: xema logs <service> [-f]',
|
|
92
|
+
],
|
|
93
|
+
};
|
|
42
94
|
}
|
|
43
95
|
if (!containers.includes(service)) {
|
|
44
|
-
|
|
45
|
-
|
|
96
|
+
return {
|
|
97
|
+
exitCode: exit_codes_1.XemaCliExitCode.NotFound,
|
|
98
|
+
lines: [`No launcher-owned container named "${service}".`],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
const args = ['logs'];
|
|
102
|
+
if (follow) {
|
|
103
|
+
args.push('-f');
|
|
46
104
|
}
|
|
47
|
-
|
|
105
|
+
args.push(service);
|
|
106
|
+
return {
|
|
107
|
+
exitCode: (0, stream_outcome_1.exitCodeForStream)(await docker.stream(args)),
|
|
108
|
+
lines: [],
|
|
109
|
+
};
|
|
48
110
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
111
|
+
async function runHelmLogs(service, follow, installationId, helm, kube) {
|
|
112
|
+
if (!(await helm.available())) {
|
|
113
|
+
return {
|
|
114
|
+
exitCode: exit_codes_1.XemaCliExitCode.MissingDependency,
|
|
115
|
+
lines: [
|
|
116
|
+
'helm is not reachable; cannot enumerate the releases this installation owns.',
|
|
117
|
+
],
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
const owned = (await (0, installation_1.partitionHelmReleasesByOwner)(helm, installationId)).owned.map((release) => release.name);
|
|
121
|
+
if (service === undefined) {
|
|
122
|
+
if (owned.length === 0) {
|
|
123
|
+
return {
|
|
124
|
+
exitCode: exit_codes_1.XemaCliExitCode.Ok,
|
|
125
|
+
lines: [
|
|
126
|
+
`No Helm releases owned by this installation in namespace "${helm.namespace}".`,
|
|
127
|
+
],
|
|
128
|
+
};
|
|
54
129
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
130
|
+
return {
|
|
131
|
+
exitCode: exit_codes_1.XemaCliExitCode.Ok,
|
|
132
|
+
lines: [
|
|
133
|
+
`Pick a release to show logs for (namespace "${helm.namespace}"):`,
|
|
134
|
+
...owned.map((name) => ` ${name}`),
|
|
135
|
+
'',
|
|
136
|
+
'Usage: xema logs <service> [-f]',
|
|
137
|
+
],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
if (!owned.includes(service)) {
|
|
141
|
+
return {
|
|
142
|
+
exitCode: exit_codes_1.XemaCliExitCode.NotFound,
|
|
143
|
+
lines: [
|
|
144
|
+
`No Helm release named "${service}" owned by this installation in namespace "${helm.namespace}".`,
|
|
145
|
+
],
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
try {
|
|
149
|
+
await kube.resolve();
|
|
150
|
+
}
|
|
151
|
+
catch (err) {
|
|
152
|
+
return {
|
|
153
|
+
exitCode: exit_codes_1.XemaCliExitCode.MissingDependency,
|
|
154
|
+
lines: [err instanceof Error ? err.message : String(err)],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
return {
|
|
158
|
+
exitCode: (0, stream_outcome_1.exitCodeForStream)(await kube.stream([...kube.logsArgs(service, follow)])),
|
|
159
|
+
lines: [],
|
|
160
|
+
};
|
|
60
161
|
}
|
|
61
162
|
//# sourceMappingURL=logs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/commands/logs.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/commands/logs.ts"],"names":[],"mappings":";;AA2DA,0CAwBC;AAaD,0BAwBC;AAxHD,kDAAqE;AACrE,kDAA8D;AAC9D,qDAA0D;AAC1D,qDAAqD;AAC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M,IAAI,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,QAAQ,EAAE,4BAAe,CAAC,iBAAiB;YAC3C,KAAK,EAAE,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SAC1D,CAAC;IACJ,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,IAAA,kCAAiB,EACzB,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CACvD;QACD,KAAK,EAAE,EAAE;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../src/commands/objects.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../src/commands/objects.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyBtD"}
|
package/dist/commands/objects.js
CHANGED
|
@@ -1,17 +1,96 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerCommand = registerCommand;
|
|
4
|
+
const control_plane_1 = require("../lib/control-plane");
|
|
4
5
|
const exit_codes_1 = require("../lib/exit-codes");
|
|
6
|
+
const object_registry_client_1 = require("../runtime/object-registry-client");
|
|
5
7
|
function registerCommand(program) {
|
|
6
8
|
const objects = program
|
|
7
9
|
.command('objects')
|
|
8
|
-
.summary('Browse
|
|
10
|
+
.summary('Browse Xema objects (skills, agents, biomes, capabilities, …)');
|
|
9
11
|
objects
|
|
10
|
-
.command('list
|
|
11
|
-
.description('List
|
|
12
|
-
.
|
|
13
|
-
(
|
|
14
|
-
|
|
12
|
+
.command('list')
|
|
13
|
+
.description('List Xema objects visible to your token')
|
|
14
|
+
.option('--space <ref>', 'List objects under a SpaceRef URI (e.g. xema://orgs/acme/projects/foo)')
|
|
15
|
+
.option('--type <kind>', 'Filter by XemaObjectKind (e.g. skill, agent, biome, capability)')
|
|
16
|
+
.option('--limit <n>', 'Max rows to return (1–500)')
|
|
17
|
+
.option('--endpoint <url>', 'Platform API base URL fronting object-registry-api (or env XEMA_ENDPOINT)')
|
|
18
|
+
.option('--token <jwt>', 'User bearer token (or env XEMA_TOKEN)')
|
|
19
|
+
.action(async (opts) => {
|
|
20
|
+
await runObjectsList(opts);
|
|
15
21
|
});
|
|
22
|
+
objects
|
|
23
|
+
.command('get <ref>')
|
|
24
|
+
.description('Resolve a single Xema object by canonical ref')
|
|
25
|
+
.option('--endpoint <url>', 'Platform API base URL fronting object-registry-api (or env XEMA_ENDPOINT)')
|
|
26
|
+
.option('--token <jwt>', 'User bearer token (or env XEMA_TOKEN)')
|
|
27
|
+
.action(async (ref, opts) => {
|
|
28
|
+
await runObjectsGet(ref, opts);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function parseLimit(value) {
|
|
32
|
+
if (value === undefined) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
const n = Number(value);
|
|
36
|
+
if (!Number.isInteger(n) || n < 1 || n > 500) {
|
|
37
|
+
return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.ConfigurationError, `--limit must be an integer in [1, 500], got "${value}".`);
|
|
38
|
+
}
|
|
39
|
+
return n;
|
|
40
|
+
}
|
|
41
|
+
function formatScope(scope) {
|
|
42
|
+
const segments = [scope.orgId, scope.projectId, scope.biomeId, scope.userId].filter((segment) => typeof segment === 'string' && segment.length > 0);
|
|
43
|
+
return segments.length > 0 ? `${scope.tier}:${segments.join('/')}` : scope.tier;
|
|
44
|
+
}
|
|
45
|
+
function renderTable(headers, rows) {
|
|
46
|
+
const widths = headers.map((header, col) => Math.max(header.length, ...rows.map((row) => (row[col] ?? '').length)));
|
|
47
|
+
const format = (cells) => cells.map((cell, col) => (cell ?? '').padEnd(widths[col] ?? 0)).join(' ').trimEnd();
|
|
48
|
+
const lines = [format(headers), format(widths.map((w) => '-'.repeat(w)))];
|
|
49
|
+
for (const row of rows) {
|
|
50
|
+
lines.push(format(row));
|
|
51
|
+
}
|
|
52
|
+
return lines.join('\n');
|
|
53
|
+
}
|
|
54
|
+
function printObjectsTable(objects, emptyMessage) {
|
|
55
|
+
if (objects.length === 0) {
|
|
56
|
+
console.log(emptyMessage);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const rows = objects.map((o) => [
|
|
60
|
+
o.ref,
|
|
61
|
+
o.kind,
|
|
62
|
+
o.version,
|
|
63
|
+
o.lifecycle,
|
|
64
|
+
formatScope(o.scope),
|
|
65
|
+
]);
|
|
66
|
+
console.log(renderTable(['REF', 'KIND', 'VERSION', 'LIFECYCLE', 'SCOPE'], rows));
|
|
67
|
+
}
|
|
68
|
+
async function runObjectsList(opts) {
|
|
69
|
+
if (opts.space !== undefined && opts.type !== undefined) {
|
|
70
|
+
return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.ConfigurationError, '--space and --type cannot be combined: the by-space listing does not filter by kind.');
|
|
71
|
+
}
|
|
72
|
+
const target = await (0, control_plane_1.resolveTarget)(opts);
|
|
73
|
+
const limit = parseLimit(opts.limit);
|
|
74
|
+
const query = {
|
|
75
|
+
...(opts.space !== undefined ? { space: opts.space } : {}),
|
|
76
|
+
...(opts.type !== undefined ? { kind: opts.type } : {}),
|
|
77
|
+
...(limit !== undefined ? { limit } : {}),
|
|
78
|
+
};
|
|
79
|
+
const { objects, cursor } = await (0, object_registry_client_1.listObjects)(target, query);
|
|
80
|
+
const emptyMessage = opts.space !== undefined
|
|
81
|
+
? `No objects found under space "${opts.space}".`
|
|
82
|
+
: 'No objects found.';
|
|
83
|
+
printObjectsTable(objects, emptyMessage);
|
|
84
|
+
if (objects.length > 0) {
|
|
85
|
+
console.log(`\n${objects.length} object(s)` +
|
|
86
|
+
`${cursor !== undefined ? ' — more available; raise --limit to page further.' : '.'}`);
|
|
87
|
+
}
|
|
88
|
+
(0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.Ok);
|
|
89
|
+
}
|
|
90
|
+
async function runObjectsGet(ref, opts) {
|
|
91
|
+
const target = await (0, control_plane_1.resolveTarget)(opts);
|
|
92
|
+
const object = await (0, object_registry_client_1.getObject)(target, ref);
|
|
93
|
+
console.log(JSON.stringify(object, null, 2));
|
|
94
|
+
(0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.Ok);
|
|
16
95
|
}
|
|
17
96
|
//# sourceMappingURL=objects.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.js","sourceRoot":"","sources":["../../src/commands/objects.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"objects.js","sourceRoot":"","sources":["../../src/commands/objects.ts"],"names":[],"mappings":";;AA4BA,0CAyBC;AArDD,wDAA6E;AAC7E,kDAA8D;AAC9D,8EAM2C;AAoB3C,SAAgB,eAAe,CAAC,OAAgB;IAC9C,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,SAAS,CAAC;SAClB,OAAO,CAAC,+DAA+D,CAAC,CAAC;IAE5E,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,yCAAyC,CAAC;SACtD,MAAM,CAAC,eAAe,EAAE,wEAAwE,CAAC;SACjG,MAAM,CAAC,eAAe,EAAE,iEAAiE,CAAC;SAC1F,MAAM,CAAC,aAAa,EAAE,4BAA4B,CAAC;SACnD,MAAM,CAAC,kBAAkB,EAAE,2EAA2E,CAAC;SACvG,MAAM,CAAC,eAAe,EAAE,uCAAuC,CAAC;SAChE,MAAM,CAAC,KAAK,EAAE,IAAwB,EAAE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AM,YAAY,GAChB,IAAI,CAAC,KAAK,KAAK,SAAS;QACtB,CAAC,CAAC,iCAAiC,IAAI,CAAC,KAAK,IAAI;QACjD,CAAC,CAAC,mBAAmB,CAAC;IAC1B,iBAAiB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IACzC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,GAAG,CACT,KAAK,OAAO,CAAC,MAAM,YAAY;YAC7B,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,mDAAmD,CAAC,CAAC,CAAC,GAAG,EAAE,CACxF,CAAC;IACJ,CAAC;IACD,IAAA,qBAAQ,EAAC,4BAAe,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,GAAW,EAAE,IAAuB;IAC/D,MAAM,MAAM,GAAG,MAAM,IAAA,6BAAa,EAAC,IAAI,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,MAAM,IAAA,kCAAS,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7C,IAAA,qBAAQ,EAAC,4BAAe,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuBtD"}
|
package/dist/commands/plan.js
CHANGED
|
@@ -11,12 +11,12 @@ function registerCommand(program) {
|
|
|
11
11
|
'side-effect-free plan, then prints the per-resource diff (+ create, ' +
|
|
12
12
|
'~ update, -/+ replace, - delete, = unchanged) with drift flagged. ' +
|
|
13
13
|
'Read-only: always exits 0.')
|
|
14
|
-
.requiredOption('
|
|
14
|
+
.requiredOption('--file <path>', 'path to the xema.yaml manifest')
|
|
15
15
|
.option('--stack <name>', 'stack to plan against (default: manifest stack or "default")')
|
|
16
16
|
.option('--endpoint <url>', 'control-plane endpoint (or env XEMA_ENDPOINT)')
|
|
17
17
|
.option('--token <jwt>', 'org-admin bearer token (or env XEMA_TOKEN)')
|
|
18
18
|
.action(async (opts) => {
|
|
19
|
-
const target = (0, control_plane_1.resolveTarget)(opts);
|
|
19
|
+
const target = await (0, control_plane_1.resolveTarget)(opts);
|
|
20
20
|
const manifest = await (0, control_plane_1.loadManifest)(opts.file);
|
|
21
21
|
const stack = (0, control_plane_1.resolveStack)(opts.stack, manifest);
|
|
22
22
|
const plan = await (0, control_plane_1.planStack)(target, stack, manifest);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":";;AAqBA,
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":";;AAqBA,0CAuBC;AA5CD,wDAM8B;AAC9B,oDAAgD;AAchD,SAAgB,eAAe,CAAC,OAAgB;IAC9C,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,OAAO,CAAC,uDAAuD,CAAC;SAChE,WAAW,CACV,qEAAqE;QACnE,sEAAsE;QACtE,oEAAoE;QACpE,4BAA4B,CAC/B;SAGA,cAAc,CAAC,eAAe,EAAE,gCAAgC,CAAC;SACjE,MAAM,CAAC,gBAAgB,EAAE,8DAA8D,CAAC;SACxF,MAAM,CAAC,kBAAkB,EAAE,+CAA+C,CAAC;SAC3E,MAAM,CAAC,eAAe,EAAE,4CAA4C,CAAC;SACrE,MAAM,CAAC,KAAK,EAAE,IAAiB,EAAE,EAAE;QAClC,MAAM,MAAM,GAAG,MAAM,IAAA,6BAAa,EAAC,IAAI,CAAC,CAAC;QACzC,MAAM,QAAQ,GAAG,MAAM,IAAA,4BAAY,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,IAAA,4BAAY,EAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,IAAI,GAAG,MAAM,IAAA,yBAAS,EAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,IAAA,wBAAU,EAAC,IAAI,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiBtD"}
|
package/dist/commands/run.js
CHANGED
|
@@ -1,18 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerCommand = registerCommand;
|
|
4
|
+
const control_plane_1 = require("../lib/control-plane");
|
|
4
5
|
const exit_codes_1 = require("../lib/exit-codes");
|
|
6
|
+
const capability_invoke_1 = require("../runtime/capability-invoke");
|
|
5
7
|
function registerCommand(program) {
|
|
6
8
|
program
|
|
7
|
-
.command('run <
|
|
8
|
-
.summary('Invoke a capability via the
|
|
9
|
-
.description('POSTs `{ ref, input }` to xema-capability-router
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
.option('--
|
|
13
|
-
.
|
|
14
|
-
(
|
|
15
|
-
|
|
9
|
+
.command('run <capabilityRef>')
|
|
10
|
+
.summary('Invoke a capability via the platform capability-router')
|
|
11
|
+
.description('POSTs `{ ref, subject, environment, input }` to xema-capability-router ' +
|
|
12
|
+
'(`POST /capabilities/invoke`) and prints the result. The subject is ' +
|
|
13
|
+
'the token `sub`; the environment defaults to environment:project.')
|
|
14
|
+
.option('--input <json>', 'Invocation input as inline JSON or @file.json')
|
|
15
|
+
.option('--environment <ref>', 'Execution environment ref', capability_invoke_1.DEFAULT_ENVIRONMENT)
|
|
16
|
+
.option('--org <id>', 'Tenant org id (default: resolved from the token)')
|
|
17
|
+
.option('--endpoint <url>', 'Platform API base URL fronting capability-router (or env XEMA_ENDPOINT)')
|
|
18
|
+
.option('--token <jwt>', 'Bearer token (or env XEMA_TOKEN)')
|
|
19
|
+
.action(async (capabilityRef, opts) => {
|
|
20
|
+
await runCapability(capabilityRef, opts);
|
|
16
21
|
});
|
|
17
22
|
}
|
|
23
|
+
async function runCapability(capabilityRef, opts) {
|
|
24
|
+
const target = await (0, control_plane_1.resolveTarget)(opts);
|
|
25
|
+
let subject;
|
|
26
|
+
try {
|
|
27
|
+
subject = (0, capability_invoke_1.resolveSubject)(target.token);
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.ConfigurationError, err instanceof Error ? err.message : String(err));
|
|
31
|
+
}
|
|
32
|
+
let environment;
|
|
33
|
+
try {
|
|
34
|
+
environment = (0, capability_invoke_1.parseEnvironment)(opts.environment);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.ConfigurationError, err instanceof Error ? err.message : String(err));
|
|
38
|
+
}
|
|
39
|
+
let input;
|
|
40
|
+
if (opts.input !== undefined) {
|
|
41
|
+
try {
|
|
42
|
+
input = (0, capability_invoke_1.parseInputObject)((0, capability_invoke_1.readInputSource)(opts.input));
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
return (0, exit_codes_1.exitWith)(exit_codes_1.XemaCliExitCode.ConfigurationError, `--input: ${err instanceof Error ? err.message : String(err)}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const request = {
|
|
49
|
+
ref: capabilityRef,
|
|
50
|
+
subject,
|
|
51
|
+
environment,
|
|
52
|
+
...(input !== undefined ? { input } : {}),
|
|
53
|
+
...(opts.org !== undefined ? { orgId: opts.org } : {}),
|
|
54
|
+
};
|
|
55
|
+
try {
|
|
56
|
+
const result = await (0, capability_invoke_1.invokeCapability)(target, request);
|
|
57
|
+
console.log((0, capability_invoke_1.formatInvokeResult)(result));
|
|
58
|
+
(0, exit_codes_1.exitWith)(result.status === 'denied'
|
|
59
|
+
? exit_codes_1.XemaCliExitCode.GenericError
|
|
60
|
+
: exit_codes_1.XemaCliExitCode.Ok);
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
if (err instanceof capability_invoke_1.CapabilityInvokeError) {
|
|
64
|
+
const code = err.status === 404 ? exit_codes_1.XemaCliExitCode.NotFound : exit_codes_1.XemaCliExitCode.GenericError;
|
|
65
|
+
return (0, exit_codes_1.exitWith)(code, err.message);
|
|
66
|
+
}
|
|
67
|
+
throw err;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
18
70
|
//# sourceMappingURL=run.js.map
|
package/dist/commands/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":";;AAmCA,0CAiBC;AApDD,wDAA6E;AAC7E,kDAA8D;AAC9D,oEAWsC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AC;QACb,IAAI,GAAG,YAAY,yCAAqB,EAAE,CAAC;YAIzC,MAAM,IAAI,GACR,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,4BAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,4BAAe,CAAC,YAAY,CAAC;YAC/E,OAAO,IAAA,qBAAQ,EAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0BzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoCtD"}
|
package/dist/commands/serve.js
CHANGED
|
@@ -1,60 +1,113 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerCommand = registerCommand;
|
|
4
|
+
const cli_errors_1 = require("../lib/cli-errors");
|
|
4
5
|
const exit_codes_1 = require("../lib/exit-codes");
|
|
6
|
+
const roster_profile_1 = require("../lib/roster-profile");
|
|
5
7
|
const loader_1 = require("../runtime/config/loader");
|
|
6
8
|
const schema_1 = require("../runtime/config/schema");
|
|
7
9
|
const foreground_1 = require("../runtime/foreground");
|
|
10
|
+
const installation_1 = require("../runtime/installation");
|
|
11
|
+
const launch_1 = require("../runtime/launch");
|
|
12
|
+
const launch_plan_format_1 = require("../runtime/launch-plan-format");
|
|
8
13
|
function registerCommand(program) {
|
|
9
14
|
program
|
|
10
15
|
.command('serve')
|
|
11
16
|
.summary('Boot Xema as separate processes (self-host)')
|
|
12
|
-
.description('Multi-process self-host launcher. --
|
|
17
|
+
.description('Multi-process self-host launcher. --substrate selects the substrate: ' +
|
|
13
18
|
'single-instance (native host processes) or cluster (containers).')
|
|
14
|
-
.requiredOption('--
|
|
19
|
+
.requiredOption('--substrate <substrate>', 'Deployment substrate: single-instance | cluster | appliance')
|
|
15
20
|
.option('--config <path>', 'Path to xema.config.yaml')
|
|
16
21
|
.option('--web', 'Also start the host-shell frontend')
|
|
17
22
|
.option('--only <services>', 'Boot only these comma-separated services (+ their hard prerequisites)')
|
|
23
|
+
.option('--profile <profile>', roster_profile_1.PROFILE_OPTION_DESCRIPTION)
|
|
24
|
+
.option('--dry-run', 'Preview the resolved roster, waves, and ports — do not boot anything.')
|
|
25
|
+
.option('--allow-emulated-platform', 'Authorize running images whose declared platforms do not include the container runtime\'s own (emulation). Off by default: a platform mismatch fails the preflight with a diagnostic instead.', false)
|
|
18
26
|
.action(async (opts) => {
|
|
19
27
|
try {
|
|
20
28
|
await runServe(opts);
|
|
21
29
|
}
|
|
22
30
|
catch (err) {
|
|
23
31
|
const message = err instanceof Error ? err.message : String(err);
|
|
24
|
-
(0, exit_codes_1.exitWith)(
|
|
32
|
+
(0, exit_codes_1.exitWith)((0, cli_errors_1.lifecycleExitCode)(err), `xema serve failed: ${message}`);
|
|
25
33
|
}
|
|
26
34
|
});
|
|
27
35
|
}
|
|
28
36
|
async function runServe(opts) {
|
|
29
|
-
const substrate =
|
|
30
|
-
const loaded = (0, loader_1.loadXemaConfig)({ explicit: opts.config });
|
|
37
|
+
const substrate = substrateOptionToSubstrate(opts.substrate);
|
|
38
|
+
const loaded = (0, cli_errors_1.asConfigError)(() => (0, loader_1.loadXemaConfig)({ explicit: opts.config }));
|
|
31
39
|
const appConfig = { ...loaded.config.app, substrate };
|
|
40
|
+
(0, roster_profile_1.assertProfileExclusiveWithSubset)(opts.profile !== undefined, opts.only !== undefined, '--only');
|
|
41
|
+
if (opts.profile !== undefined) {
|
|
42
|
+
appConfig.include = (0, roster_profile_1.profileToInclude)((0, roster_profile_1.parseRosterProfile)(opts.profile));
|
|
43
|
+
}
|
|
32
44
|
if (opts.only !== undefined) {
|
|
33
45
|
const services = opts.only
|
|
34
46
|
.split(',')
|
|
35
47
|
.map((s) => s.trim())
|
|
36
48
|
.filter((s) => s.length > 0);
|
|
37
49
|
if (services.length === 0) {
|
|
38
|
-
throw new
|
|
50
|
+
throw new cli_errors_1.CliConfigurationError('--only requires at least one service name.');
|
|
39
51
|
}
|
|
40
52
|
appConfig.include = services;
|
|
41
53
|
}
|
|
42
|
-
const config = {
|
|
43
|
-
|
|
54
|
+
const config = {
|
|
55
|
+
...loaded.config,
|
|
56
|
+
app: {
|
|
57
|
+
...appConfig,
|
|
58
|
+
web: {
|
|
59
|
+
...appConfig.web,
|
|
60
|
+
enabled: opts.web === true || appConfig.web.enabled,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
const desired = (0, cli_errors_1.asConfigError)(() => (0, installation_1.compileCurrentInstallation)(config, loaded.installationIdentity));
|
|
65
|
+
const installationStore = new installation_1.InstallationStateStore();
|
|
66
|
+
const installationPlan = (0, installation_1.planInstallation)(desired, installationStore);
|
|
67
|
+
const runtimeConfig = (0, cli_errors_1.asConfigError)(() => (0, installation_1.launcherConfigFromInstallation)(desired));
|
|
68
|
+
if (opts.dryRun === true) {
|
|
69
|
+
console.log((0, installation_1.formatInstallationPlan)(installationPlan));
|
|
70
|
+
console.log('');
|
|
71
|
+
console.log((0, launch_plan_format_1.formatLaunchPlan)((0, launch_1.resolveLaunchPlan)({
|
|
72
|
+
config: runtimeConfig,
|
|
73
|
+
includeWeb: runtimeConfig.app.web.enabled,
|
|
74
|
+
offline: true,
|
|
75
|
+
})));
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
console.log(`xema serve — substrate=${opts.substrate} (${substrate})`);
|
|
44
79
|
console.log(` config: ${loaded.source}`);
|
|
45
80
|
console.log('');
|
|
46
|
-
|
|
81
|
+
const rendering = (0, cli_errors_1.asConfigError)(() => (0, installation_1.renderCurrentLauncherPlan)(desired));
|
|
82
|
+
await (0, installation_1.applyInstallation)(desired, installationStore, (onReady) => (0, foreground_1.bringUpForeground)({
|
|
83
|
+
config: rendering.config,
|
|
84
|
+
includeWeb: rendering.config.app.web.enabled,
|
|
85
|
+
detach: false,
|
|
86
|
+
installationIdentity: loaded.installationIdentity,
|
|
87
|
+
installationId: desired.metadata.name,
|
|
88
|
+
planHash: desired.effectivePlanHash,
|
|
89
|
+
...(rendering.helmRelease === undefined
|
|
90
|
+
? {}
|
|
91
|
+
: { helmRelease: rendering.helmRelease }),
|
|
92
|
+
allowEmulatedPlatform: opts.allowEmulatedPlatform === true,
|
|
93
|
+
onReady: async (handle) => {
|
|
94
|
+
await onReady(await (0, installation_1.proveLocalLaunchReadiness)(handle, desired.effectivePlanHash));
|
|
95
|
+
},
|
|
96
|
+
}), {
|
|
97
|
+
forceExecution: true,
|
|
98
|
+
renderedArtifacts: rendering.renderedArtifacts,
|
|
99
|
+
});
|
|
47
100
|
}
|
|
48
|
-
function
|
|
49
|
-
if (
|
|
101
|
+
function substrateOptionToSubstrate(substrate) {
|
|
102
|
+
if (substrate === 'single-instance') {
|
|
50
103
|
return schema_1.Substrate.Native;
|
|
51
104
|
}
|
|
52
|
-
if (
|
|
105
|
+
if (substrate === 'cluster') {
|
|
53
106
|
return schema_1.Substrate.Container;
|
|
54
107
|
}
|
|
55
|
-
if (
|
|
108
|
+
if (substrate === 'appliance') {
|
|
56
109
|
return schema_1.Substrate.Helm;
|
|
57
110
|
}
|
|
58
|
-
throw new
|
|
111
|
+
throw new cli_errors_1.CliConfigurationError(`Unknown --substrate "${substrate}". Valid values: single-instance | cluster | appliance.`);
|
|
59
112
|
}
|
|
60
113
|
//# sourceMappingURL=serve.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ser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