@astrale-os/sdk 0.6.0-beta.2 → 0.6.0-beta.21
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 +74 -14
- package/dist/application/action/action.d.ts +6 -0
- package/dist/application/action/authoring.d.ts +1 -1
- package/dist/application/action/context.d.ts +17 -8
- package/dist/application/action/define.d.ts +3 -3
- package/dist/application/action/index.d.ts +1 -1
- package/dist/application/define.d.ts +5 -5
- package/dist/application/define.js +13 -13
- package/dist/application/dependency/index.d.ts +1 -1
- package/dist/application/dependency/invoker.d.ts +11 -6
- package/dist/application/domain.d.ts +28 -0
- package/dist/application/index.d.ts +3 -3
- package/dist/application/index.js +1 -1
- package/dist/application/mutation/authoring/properties.d.ts +5 -3
- package/dist/application/mutation/authoring/properties.js +35 -2
- package/dist/application/mutation/authoring/transition.js +4 -1
- package/dist/application/routes/admission.d.ts +2 -2
- package/dist/application/routes/admission.js +1 -1
- package/dist/application/routes/route.d.ts +2 -2
- package/dist/application/runtime/actions.js +3 -0
- package/dist/application/runtime/workflows.d.ts +2 -0
- package/dist/application/runtime/workflows.js +5 -0
- package/dist/application/workflow/authoring.d.ts +3 -2
- package/dist/application/workflow/context.d.ts +8 -2
- package/dist/application/workflow/define.d.ts +3 -3
- package/dist/application/workflow/define.js +19 -3
- package/dist/application/workflow/durable.d.ts +83 -0
- package/dist/application/workflow/index.d.ts +3 -2
- package/dist/application/workflow/runner/inline.js +3 -4
- package/dist/application/workflow/runner/runner.d.ts +2 -2
- package/dist/application/workflow/step/output.d.ts +2 -0
- package/dist/application/workflow/step/output.js +73 -0
- package/dist/application/workflow/workflow.d.ts +12 -0
- package/dist/deployment/adapter/adapter.d.ts +59 -11
- package/dist/deployment/adapter/bundle/bundle.d.ts +36 -0
- package/dist/deployment/adapter/bundle/file.d.ts +10 -0
- package/dist/deployment/adapter/bundle/index.d.ts +2 -0
- package/dist/deployment/adapter/define.d.ts +25 -3
- package/dist/deployment/adapter/define.js +101 -24
- package/dist/deployment/adapter/index.d.ts +6 -3
- package/dist/deployment/adapter/index.js +1 -0
- package/dist/deployment/adapter/legacy/adapter.d.ts +40 -0
- package/dist/deployment/adapter/{deploy → legacy/deploy}/context.d.ts +6 -2
- package/dist/deployment/adapter/legacy/deploy/index.d.ts +2 -0
- package/dist/deployment/adapter/legacy/deploy/index.js +1 -0
- package/dist/deployment/adapter/legacy/deploy/result.d.ts +89 -0
- package/dist/deployment/adapter/legacy/deploy/result.js +1 -0
- package/dist/deployment/adapter/legacy/index.d.ts +24 -0
- package/dist/deployment/adapter/legacy/index.js +1 -0
- package/dist/deployment/adapter/legacy/prepare/artifact.d.ts +43 -0
- package/dist/deployment/adapter/legacy/prepare/artifact.js +1 -0
- package/dist/deployment/adapter/legacy/prepare/context.d.ts +33 -0
- package/dist/deployment/adapter/legacy/prepare/context.js +1 -0
- package/dist/deployment/adapter/legacy/prepare/index.d.ts +2 -0
- package/dist/deployment/adapter/legacy/prepare/index.js +1 -0
- package/dist/deployment/adapter/release/context.d.ts +95 -0
- package/dist/deployment/adapter/release/context.js +1 -0
- package/dist/deployment/adapter/release/index.d.ts +3 -0
- package/dist/deployment/adapter/release/index.js +1 -0
- package/dist/deployment/adapter/release/list.d.ts +53 -0
- package/dist/deployment/adapter/release/list.js +1 -0
- package/dist/deployment/adapter/release/refusal.d.ts +10 -0
- package/dist/deployment/adapter/release/refusal.js +14 -0
- package/dist/deployment/adapter/release/result.d.ts +56 -0
- package/dist/deployment/adapter/release/result.js +1 -0
- package/dist/deployment/address/configuration.d.ts +83 -0
- package/dist/deployment/address/configuration.js +262 -0
- package/dist/deployment/address/fingerprint.d.ts +5 -0
- package/dist/deployment/address/fingerprint.js +27 -0
- package/dist/deployment/address/index.d.ts +5 -0
- package/dist/deployment/address/index.js +5 -0
- package/dist/deployment/address/label.d.ts +42 -0
- package/dist/deployment/address/label.js +80 -0
- package/dist/deployment/address/line.d.ts +29 -0
- package/dist/deployment/address/line.js +53 -0
- package/dist/deployment/address/record.d.ts +52 -0
- package/dist/deployment/address/record.js +104 -0
- package/dist/deployment/address/summary.d.ts +57 -0
- package/dist/deployment/address/summary.js +117 -0
- package/dist/deployment/address/vectors.d.ts +60 -0
- package/dist/deployment/address/vectors.js +517 -0
- package/dist/deployment/build/build.d.ts +2 -2
- package/dist/deployment/build/compile.d.ts +4 -4
- package/dist/deployment/build/compile.js +17 -17
- package/dist/deployment/build/index.d.ts +1 -0
- package/dist/deployment/build/index.js +1 -0
- package/dist/deployment/build/manifest.d.ts +59 -0
- package/dist/deployment/build/manifest.js +118 -0
- package/dist/deployment/build/material.js +2 -2
- package/dist/deployment/build/schema.d.ts +2 -2
- package/dist/deployment/deploy.d.ts +10 -10
- package/dist/deployment/deploy.js +3 -3
- package/dist/deployment/deployment.d.ts +9 -4
- package/dist/deployment/environment.d.ts +6 -0
- package/dist/deployment/environment.js +6 -0
- package/dist/deployment/index.d.ts +4 -4
- package/dist/deployment/index.js +1 -1
- package/dist/deployment/release/addressing.d.ts +9 -1
- package/dist/deployment/release/assemble.d.ts +6 -3
- package/dist/deployment/release/assemble.js +12 -10
- package/dist/deployment/release/index.d.ts +2 -0
- package/dist/deployment/release/index.js +2 -0
- package/dist/deployment/release/legacy/admission.d.ts +3 -0
- package/dist/deployment/release/legacy/admission.js +8 -0
- package/dist/deployment/release/legacy/assemble.d.ts +5 -0
- package/dist/deployment/release/legacy/assemble.js +20 -0
- package/dist/deployment/release/legacy/index.d.ts +35 -0
- package/dist/deployment/release/legacy/index.js +34 -0
- package/dist/deployment/release/legacy/release.d.ts +12 -0
- package/dist/deployment/release/legacy/release.js +1 -0
- package/dist/deployment/release/{publication → legacy}/seal.d.ts +3 -3
- package/dist/deployment/release/legacy/seal.js +17 -0
- package/dist/deployment/release/release.d.ts +16 -5
- package/dist/deployment/release/runtime.d.ts +2 -0
- package/dist/deployment/release/runtime.js +2 -0
- package/dist/deployment/release/seal.d.ts +14 -0
- package/dist/deployment/release/seal.js +22 -0
- package/dist/deployment/release/{publication → served}/callables.d.ts +2 -2
- package/dist/deployment/release/{publication → served}/callables.js +2 -2
- package/dist/deployment/release/served/index.d.ts +12 -0
- package/dist/deployment/release/served/index.js +22 -0
- package/dist/deployment/release/{publication → served}/views.d.ts +2 -2
- package/dist/deployment/runtime/admission.d.ts +2 -2
- package/dist/deployment/runtime/admission.js +5 -5
- package/dist/deployment/verify/index.d.ts +2 -1
- package/dist/deployment/verify/index.js +1 -0
- package/dist/deployment/verify/preflight/artifact.d.ts +1 -1
- package/dist/deployment/verify/preflight/bundle.d.ts +18 -0
- package/dist/deployment/verify/preflight/bundle.js +71 -0
- package/dist/deployment/verify/preflight/index.d.ts +2 -1
- package/dist/deployment/verify/preflight/index.js +1 -0
- package/dist/deployment/verify/preflight/publication.d.ts +2 -2
- package/dist/deployment/verify/preflight/publication.js +4 -3
- package/dist/deployment/verify/readiness/deployment.js +7 -15
- package/dist/deployment/verify/readiness/fetch.d.ts +13 -0
- package/dist/deployment/verify/readiness/fetch.js +26 -0
- package/dist/deployment/verify/readiness/identity.d.ts +3 -6
- package/dist/deployment/verify/readiness/identity.js +3 -3
- package/dist/deployment/verify/readiness/index.d.ts +11 -7
- package/dist/deployment/verify/readiness/index.js +15 -4
- package/dist/deployment/verify/readiness/legacy/index.d.ts +2 -0
- package/dist/deployment/verify/readiness/legacy/index.js +2 -0
- package/dist/deployment/verify/readiness/legacy/publication.d.ts +12 -0
- package/dist/deployment/verify/readiness/legacy/publication.js +23 -0
- package/dist/deployment/verify/readiness/release.d.ts +8 -0
- package/dist/deployment/verify/readiness/release.js +22 -0
- package/dist/execution/identity/authentication.d.ts +23 -2
- package/dist/execution/identity/authentication.js +64 -40
- package/dist/execution/identity/callback.d.ts +16 -15
- package/dist/execution/identity/callback.js +21 -16
- package/dist/execution/identity/delivery.d.ts +11 -4
- package/dist/execution/identity/delivery.js +47 -20
- package/dist/execution/identity/identity.d.ts +18 -3
- package/dist/execution/identity/identity.js +8 -4
- package/dist/execution/identity/jwks.js +57 -12
- package/dist/execution/index.d.ts +4 -2
- package/dist/execution/index.js +2 -1
- package/dist/execution/invocation/admission/authentication.d.ts +3 -8
- package/dist/execution/invocation/admission/authentication.js +10 -24
- package/dist/execution/invocation/admission/authority.d.ts +15 -8
- package/dist/execution/invocation/admission/authority.js +5 -0
- package/dist/execution/invocation/admission/input.d.ts +2 -2
- package/dist/execution/invocation/admission/input.js +16 -2
- package/dist/execution/invocation/dependency/bind.d.ts +1 -1
- package/dist/execution/invocation/dependency/bind.js +35 -14
- package/dist/execution/invocation/dispatch/context.d.ts +2 -1
- package/dist/execution/invocation/dispatch/context.js +1 -1
- package/dist/execution/invocation/invocation.js +58 -16
- package/dist/execution/invocation/result/project.js +41 -1
- package/dist/execution/node/serve.d.ts +2 -2
- package/dist/execution/node/serve.js +1 -1
- package/dist/execution/runtime/index.d.ts +1 -0
- package/dist/execution/runtime/index.js +1 -0
- package/dist/execution/runtime/load.d.ts +3 -3
- package/dist/execution/runtime/load.js +3 -2
- package/dist/execution/runtime/release.d.ts +22 -0
- package/dist/execution/runtime/release.js +14 -0
- package/dist/execution/serve.d.ts +10 -4
- package/dist/execution/serve.js +3 -0
- package/dist/execution/service/create.js +39 -7
- package/dist/execution/service/initialization.d.ts +4 -4
- package/dist/execution/service/initialization.js +23 -14
- package/dist/execution/service/release.d.ts +2 -2
- package/dist/execution/service/release.js +3 -2
- package/dist/execution/service/service.d.ts +15 -5
- package/dist/execution/service/serving/delivery.d.ts +6 -0
- package/dist/execution/service/{publication → serving}/delivery.js +5 -1
- package/dist/execution/service/{publication → serving}/index.d.ts +1 -1
- package/dist/execution/service/serving/installation.d.ts +4 -0
- package/dist/execution/service/serving/installation.js +9 -0
- package/dist/execution/service/serving/legacy/index.d.ts +15 -0
- package/dist/execution/service/serving/legacy/index.js +19 -0
- package/dist/execution/service/serving/source.d.ts +18 -0
- package/dist/execution/service/serving/source.js +19 -0
- package/dist/execution/workflows/discovery.d.ts +14 -0
- package/dist/execution/workflows/discovery.js +151 -0
- package/dist/execution/workflows/engine.d.ts +52 -0
- package/dist/execution/workflows/engine.js +1 -0
- package/dist/execution/workflows/envelope.d.ts +12 -0
- package/dist/execution/workflows/envelope.js +46 -0
- package/dist/execution/workflows/failure.d.ts +11 -0
- package/dist/execution/workflows/failure.js +43 -0
- package/dist/execution/workflows/index.d.ts +4 -0
- package/dist/execution/workflows/index.js +3 -0
- package/dist/execution/workflows/options.d.ts +40 -0
- package/dist/execution/workflows/options.js +83 -0
- package/dist/execution/workflows/receiver.d.ts +22 -0
- package/dist/execution/workflows/receiver.js +99 -0
- package/dist/execution/workflows/route.d.ts +14 -0
- package/dist/execution/workflows/route.js +40 -0
- package/dist/execution/workflows/run.d.ts +22 -0
- package/dist/execution/workflows/run.js +211 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/platform/release/index.d.ts +27 -0
- package/dist/platform/release/index.js +27 -0
- package/dist/platform/schema/index.d.ts +2 -1
- package/dist/platform/schema/property-input.d.ts +15 -0
- package/dist/platform/schema/property-input.js +1 -0
- package/dist/platform/schema/property.d.ts +5 -0
- package/dist/platform/versioning/dependents.d.ts +18 -0
- package/dist/platform/versioning/dependents.js +15 -0
- package/dist/platform/versioning/index.d.ts +5 -0
- package/dist/platform/versioning/index.js +5 -0
- package/dist/platform/versioning/name.d.ts +38 -0
- package/dist/platform/versioning/name.js +58 -0
- package/dist/platform/versioning/reference.d.ts +48 -0
- package/dist/platform/versioning/reference.js +95 -0
- package/dist/platform/versioning/version.d.ts +72 -0
- package/dist/platform/versioning/version.js +98 -0
- package/dist/project/admit.js +2 -2
- package/dist/project/define.d.ts +4 -4
- package/dist/project/define.js +55 -35
- package/dist/project/index.d.ts +1 -1
- package/dist/project/install-command.d.ts +10 -0
- package/dist/project/install-command.js +13 -0
- package/dist/project/project.d.ts +10 -8
- package/dist/testing/dataset/builder.d.ts +3 -3
- package/dist/testing/dataset/define.d.ts +1 -1
- package/dist/testing/load.js +1 -1
- package/dist/tooling/cli/arguments.d.ts +10 -5
- package/dist/tooling/cli/arguments.js +123 -52
- package/dist/tooling/cli/build.d.ts +55 -0
- package/dist/tooling/cli/build.js +77 -0
- package/dist/tooling/cli/bun.d.ts +0 -1
- package/dist/tooling/cli/bun.js +0 -7
- package/dist/tooling/cli/commit.d.ts +35 -0
- package/dist/tooling/cli/commit.js +235 -0
- package/dist/tooling/cli/deploy-mode.d.ts +82 -0
- package/dist/tooling/cli/deploy-mode.js +135 -0
- package/dist/tooling/cli/deploy-result.d.ts +85 -0
- package/dist/tooling/cli/deploy-result.js +64 -0
- package/dist/tooling/cli/diff/declared.d.ts +7 -0
- package/dist/tooling/cli/diff/declared.js +27 -0
- package/dist/tooling/cli/diff/index.d.ts +30 -0
- package/dist/tooling/cli/diff/index.js +58 -0
- package/dist/tooling/cli/diff/render.d.ts +15 -0
- package/dist/tooling/cli/diff/render.js +131 -0
- package/dist/tooling/cli/diff/report.d.ts +88 -0
- package/dist/tooling/cli/diff/report.js +154 -0
- package/dist/tooling/cli/dotenv.d.ts +2 -2
- package/dist/tooling/cli/dotenv.js +3 -33
- package/dist/tooling/cli/help.js +176 -59
- package/dist/tooling/cli/immutable-deployment.d.ts +83 -0
- package/dist/tooling/cli/immutable-deployment.js +135 -0
- package/dist/tooling/cli/index.d.ts +10 -4
- package/dist/tooling/cli/index.js +5 -3
- package/dist/tooling/cli/installed-on.d.ts +83 -0
- package/dist/tooling/cli/installed-on.js +156 -0
- package/dist/tooling/cli/legacy/deploy-result.d.ts +28 -0
- package/dist/tooling/cli/legacy/deploy-result.js +37 -0
- package/dist/tooling/cli/legacy/stable-target-adapter.d.ts +21 -0
- package/dist/tooling/cli/legacy/stable-target-adapter.js +14 -0
- package/dist/tooling/cli/legacy/stable-target-deploy.d.ts +40 -0
- package/dist/tooling/cli/legacy/stable-target-deploy.js +102 -0
- package/dist/tooling/cli/legacy/uploaded-build.d.ts +11 -0
- package/dist/tooling/cli/legacy/uploaded-build.js +22 -0
- package/dist/tooling/cli/list.d.ts +154 -0
- package/dist/tooling/cli/list.js +381 -0
- package/dist/tooling/cli/log.d.ts +5 -0
- package/dist/tooling/cli/log.js +9 -0
- package/dist/tooling/cli/orchestrate.d.ts +0 -6
- package/dist/tooling/cli/orchestrate.js +236 -88
- package/dist/tooling/cli/project.d.ts +3 -3
- package/dist/tooling/cli/publish/index.d.ts +73 -0
- package/dist/tooling/cli/publish/index.js +346 -0
- package/dist/tooling/cli/publish/report.d.ts +49 -0
- package/dist/tooling/cli/publish/report.js +15 -0
- package/dist/tooling/cli/registry/client.d.ts +114 -0
- package/dist/tooling/cli/registry/client.js +346 -0
- package/dist/tooling/cli/registry/error.d.ts +11 -0
- package/dist/tooling/cli/registry/error.js +17 -0
- package/dist/tooling/cli/registry/executable.d.ts +29 -0
- package/dist/tooling/cli/registry/executable.js +90 -0
- package/dist/tooling/cli/registry/index.d.ts +9 -0
- package/dist/tooling/cli/registry/index.js +8 -0
- package/dist/tooling/cli/registry/installations.d.ts +67 -0
- package/dist/tooling/cli/registry/installations.js +108 -0
- package/dist/tooling/cli/registry/process.d.ts +36 -0
- package/dist/tooling/cli/registry/process.js +119 -0
- package/dist/tooling/cli/secrets.d.ts +9 -0
- package/dist/tooling/cli/secrets.js +19 -0
- package/dist/tooling/cli/yank.d.ts +34 -0
- package/dist/tooling/cli/yank.js +32 -0
- package/dist/tooling/linter/implementations/source/callable-requirements.d.ts +1 -1
- package/dist/tooling/linter/implementations/source/callable-requirements.js +10 -10
- package/dist/tooling/linter/implementations/source/dependencies.js +12 -10
- package/dist/tooling/linter/implementations/source/global.js +1 -1
- package/dist/tooling/linter/implementations/source/mutations.js +17 -17
- package/dist/tooling/linter/implementations/source/providers.js +5 -5
- package/dist/tooling/linter/implementations/source/views.js +2 -2
- package/dist/tooling/linter/policy/generated.js +16 -16
- package/dist/tooling/packaging/declarations/ownership.js +1 -1
- package/dist/tooling/packaging/finalize.d.ts +1 -1
- package/dist/tooling/packaging/finalize.js +1 -1
- package/package.json +32 -11
- package/dist/application/application.d.ts +0 -28
- package/dist/deployment/adapter/deploy/index.d.ts +0 -2
- package/dist/deployment/adapter/deploy/result.d.ts +0 -50
- package/dist/deployment/adapter/prepare/artifact.d.ts +0 -33
- package/dist/deployment/adapter/prepare/context.d.ts +0 -23
- package/dist/deployment/adapter/prepare/index.d.ts +0 -2
- package/dist/deployment/release/publication/index.d.ts +0 -6
- package/dist/deployment/release/publication/index.js +0 -6
- package/dist/deployment/release/publication/manifest.d.ts +0 -3
- package/dist/deployment/release/publication/manifest.js +0 -5
- package/dist/deployment/release/publication/requirements.d.ts +0 -3
- package/dist/deployment/release/publication/requirements.js +0 -3
- package/dist/deployment/release/publication/seal.js +0 -39
- package/dist/deployment/verify/readiness/publication.d.ts +0 -11
- package/dist/deployment/verify/readiness/publication.js +0 -41
- package/dist/execution/service/publication/delivery.d.ts +0 -2
- package/dist/execution/service/publication/installation.d.ts +0 -3
- package/dist/execution/service/publication/installation.js +0 -8
- package/dist/execution/service/publication/source.d.ts +0 -3
- package/dist/execution/service/publication/source.js +0 -11
- package/dist/platform/publication/index.d.ts +0 -2
- package/dist/platform/publication/index.js +0 -2
- package/dist/tooling/cli/astrale/authority.d.ts +0 -5
- package/dist/tooling/cli/astrale/authority.js +0 -11
- package/dist/tooling/cli/astrale/executable.d.ts +0 -2
- package/dist/tooling/cli/astrale/executable.js +0 -47
- package/dist/tooling/cli/astrale/failure.d.ts +0 -6
- package/dist/tooling/cli/astrale/failure.js +0 -48
- package/dist/tooling/cli/astrale/instance.d.ts +0 -11
- package/dist/tooling/cli/astrale/instance.js +0 -52
- package/dist/tooling/cli/astrale/process.d.ts +0 -13
- package/dist/tooling/cli/astrale/process.js +0 -94
- package/dist/tooling/cli/astrale/version.d.ts +0 -18
- package/dist/tooling/cli/astrale/version.js +0 -55
- package/dist/tooling/cli/credential.d.ts +0 -2
- package/dist/tooling/cli/credential.js +0 -57
- package/dist/tooling/cli/development/candidate.d.ts +0 -25
- package/dist/tooling/cli/development/candidate.js +0 -176
- package/dist/tooling/cli/development/deployment.d.ts +0 -16
- package/dist/tooling/cli/development/deployment.js +0 -39
- package/dist/tooling/cli/development/develop.d.ts +0 -11
- package/dist/tooling/cli/development/develop.js +0 -243
- package/dist/tooling/cli/development/lease.d.ts +0 -18
- package/dist/tooling/cli/development/lease.js +0 -163
- package/dist/tooling/cli/development/lifecycle.d.ts +0 -9
- package/dist/tooling/cli/development/lifecycle.js +0 -43
- package/dist/tooling/cli/development/project-imports.d.ts +0 -22
- package/dist/tooling/cli/development/project-imports.js +0 -39
- package/dist/tooling/cli/development/project-lock.d.ts +0 -16
- package/dist/tooling/cli/development/project-lock.js +0 -41
- package/dist/tooling/cli/development/rebuild.d.ts +0 -13
- package/dist/tooling/cli/development/rebuild.js +0 -58
- package/dist/tooling/cli/development/release-evidence.d.ts +0 -4
- package/dist/tooling/cli/development/release-evidence.js +0 -10
- package/dist/tooling/cli/development/report.d.ts +0 -6
- package/dist/tooling/cli/development/report.js +0 -14
- package/dist/tooling/cli/development/session-file.d.ts +0 -53
- package/dist/tooling/cli/development/session-file.js +0 -337
- package/dist/tooling/cli/development/source-watch.d.ts +0 -14
- package/dist/tooling/cli/development/source-watch.js +0 -140
- package/dist/tooling/cli/development/sources.d.ts +0 -7
- package/dist/tooling/cli/development/sources.js +0 -48
- package/dist/tooling/cli/development/target-lock.d.ts +0 -16
- package/dist/tooling/cli/development/target-lock.js +0 -68
- package/dist/tooling/cli/development/view.d.ts +0 -28
- package/dist/tooling/cli/development/view.js +0 -151
- package/dist/tooling/cli/environment-release.d.ts +0 -21
- package/dist/tooling/cli/environment-release.js +0 -46
- package/dist/tooling/cli/evidence.d.ts +0 -11
- package/dist/tooling/cli/evidence.js +0 -53
- package/dist/tooling/cli/installation/index.d.ts +0 -2
- package/dist/tooling/cli/installation/index.js +0 -1
- package/dist/tooling/cli/installation/observation.d.ts +0 -10
- package/dist/tooling/cli/installation/observation.js +0 -44
- package/dist/tooling/cli/installation/reconcile.d.ts +0 -32
- package/dist/tooling/cli/installation/reconcile.js +0 -122
- /package/dist/application/{application.js → domain.js} +0 -0
- /package/dist/{deployment/adapter/deploy/context.js → application/workflow/durable.js} +0 -0
- /package/dist/deployment/adapter/{deploy/index.js → bundle/bundle.js} +0 -0
- /package/dist/deployment/adapter/{deploy/result.js → bundle/file.js} +0 -0
- /package/dist/deployment/adapter/{prepare → bundle}/index.js +0 -0
- /package/dist/deployment/adapter/{prepare/artifact.js → legacy/adapter.js} +0 -0
- /package/dist/deployment/adapter/{prepare → legacy/deploy}/context.js +0 -0
- /package/dist/deployment/release/{publication → served}/routes.d.ts +0 -0
- /package/dist/deployment/release/{publication → served}/routes.js +0 -0
- /package/dist/deployment/release/{publication → served}/views.js +0 -0
- /package/dist/execution/service/{publication → serving}/index.js +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { DomainRegistry, InstallationUnknownReason, InstanceInstallation } from './registry/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* One instance known to pin a deployment (INSTALLÉ SUR, DX [.83795]): an instance named with
|
|
4
|
+
* `--instance`, as its Kernel lists it (CT24). Admin does not say which instances pin a release
|
|
5
|
+
* (A15 is deferred, AM-241), so an instance is known only when it is asked.
|
|
6
|
+
*/
|
|
7
|
+
export interface InstalledOnV1 {
|
|
8
|
+
readonly source: 'instance';
|
|
9
|
+
/** The instance as `--instance` named it. */
|
|
10
|
+
readonly instance: string;
|
|
11
|
+
/** The instance Kernel URL that answered. */
|
|
12
|
+
readonly kernel: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Where INSTALLÉ SUR comes from and what of it is unknown. An instance whose installations are
|
|
16
|
+
* unknown is partial, never "not installed" (AM-198); an instance is known only when `--instance`
|
|
17
|
+
* names it ([.59528], AM-241).
|
|
18
|
+
*/
|
|
19
|
+
export interface InstallationSourcesV1 {
|
|
20
|
+
/**
|
|
21
|
+
* True when an instance may run a deployment that no source names: an `--instance` that could
|
|
22
|
+
* not say or whose listing is itself partial (a Kernel lists only what the caller reads, AM-83,
|
|
23
|
+
* AM-84), or no `--instance` at all. False only when every `--instance` listed all it runs.
|
|
24
|
+
*/
|
|
25
|
+
readonly partial: boolean;
|
|
26
|
+
/** One entry per distinct `--instance`, in argument order. */
|
|
27
|
+
readonly instances: readonly InstanceSourceV1[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* One `--instance`: what its Kernel answered, why that is unknown, or that it was not asked. A
|
|
31
|
+
* `read` listing names the deployments it pins; with `partial` (always, from C7) one it does not
|
|
32
|
+
* name may still run there.
|
|
33
|
+
*/
|
|
34
|
+
export type InstanceSourceV1 = {
|
|
35
|
+
readonly instance: string;
|
|
36
|
+
readonly state: 'read';
|
|
37
|
+
readonly kernel: string;
|
|
38
|
+
readonly partial: boolean;
|
|
39
|
+
} | {
|
|
40
|
+
readonly instance: string;
|
|
41
|
+
readonly state: 'unknown';
|
|
42
|
+
readonly reason: InstallationUnknownReason;
|
|
43
|
+
readonly code: string;
|
|
44
|
+
} | {
|
|
45
|
+
readonly instance: string;
|
|
46
|
+
readonly state: 'skipped';
|
|
47
|
+
};
|
|
48
|
+
/** What the sources answered, kept to join each listed deployment to the instances that pin it. */
|
|
49
|
+
export interface InstallationsRead {
|
|
50
|
+
readonly sources: InstallationSourcesV1;
|
|
51
|
+
readonly instances: readonly {
|
|
52
|
+
readonly instance: string;
|
|
53
|
+
readonly kernel: string;
|
|
54
|
+
readonly installations: readonly InstanceInstallation[];
|
|
55
|
+
}[];
|
|
56
|
+
}
|
|
57
|
+
/** Nothing was listed: no source is asked. */
|
|
58
|
+
export declare function skippedInstallations(instances: readonly string[]): InstallationsRead;
|
|
59
|
+
/**
|
|
60
|
+
* Ask every `--instance` whether it pins a deployment of the origin. An instance that cannot tell
|
|
61
|
+
* is recorded as unknown, with why, and the listing stays partial for it (AM-198); a refusal's
|
|
62
|
+
* message is never relayed, only its code. Only a stop of `signal`, the one every registry read
|
|
63
|
+
* follows, fails it: an interrupted listing is never printed as a partial one.
|
|
64
|
+
*/
|
|
65
|
+
export declare function readInstallations(registry: Pick<DomainRegistry, 'instance'>, origin: string, instances: readonly string[], signal: AbortSignal): Promise<InstallationsRead>;
|
|
66
|
+
/**
|
|
67
|
+
* The instances known to pin the deployment served at `url`: an installation whose Kernel lists
|
|
68
|
+
* its pin under that deployment URL runs that deployment, since one immutable deployment has one
|
|
69
|
+
* URL. In `--instance` argument order.
|
|
70
|
+
*/
|
|
71
|
+
export declare function installedOn(url: string, read: InstallationsRead): readonly InstalledOnV1[];
|
|
72
|
+
/**
|
|
73
|
+
* The INSTALLED ON cell: the instances known to pin the deployment, then `?` when an instance may
|
|
74
|
+
* run it unnamed (the notices say which); `—` only when every `--instance` listed all it runs and
|
|
75
|
+
* none pins it.
|
|
76
|
+
*/
|
|
77
|
+
export declare function installedOnCell(installed: readonly InstalledOnV1[], sources: InstallationSourcesV1): string;
|
|
78
|
+
/**
|
|
79
|
+
* One line for stderr per source that could not tell, or one when no instance was asked: an
|
|
80
|
+
* unknown instance is partial, never "not installed" (AM-198). Only codes the CLI reported are
|
|
81
|
+
* named, never its messages.
|
|
82
|
+
*/
|
|
83
|
+
export declare function installationNotices(sources: InstallationSourcesV1): readonly string[];
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { isAdminFailure } from './registry/index.js';
|
|
2
|
+
/** `--instance` listings run at once; each is one CLI process reading one instance Kernel. */
|
|
3
|
+
const INSTANCE_READS = 4;
|
|
4
|
+
/** Nothing was listed: no source is asked. */
|
|
5
|
+
export function skippedInstallations(instances) {
|
|
6
|
+
return Object.freeze({
|
|
7
|
+
sources: Object.freeze({
|
|
8
|
+
partial: false,
|
|
9
|
+
instances: Object.freeze(distinct(instances).map((instance) => Object.freeze({ instance, state: 'skipped' }))),
|
|
10
|
+
}),
|
|
11
|
+
instances: Object.freeze([]),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Ask every `--instance` whether it pins a deployment of the origin. An instance that cannot tell
|
|
16
|
+
* is recorded as unknown, with why, and the listing stays partial for it (AM-198); a refusal's
|
|
17
|
+
* message is never relayed, only its code. Only a stop of `signal`, the one every registry read
|
|
18
|
+
* follows, fails it: an interrupted listing is never printed as a partial one.
|
|
19
|
+
*/
|
|
20
|
+
export async function readInstallations(registry, origin, instances, signal) {
|
|
21
|
+
const listed = await mapBounded(distinct(instances), INSTANCE_READS, async (instance) => {
|
|
22
|
+
try {
|
|
23
|
+
return { instance, listing: await registry.instance(instance) };
|
|
24
|
+
}
|
|
25
|
+
catch (cause) {
|
|
26
|
+
if (signal.aborted)
|
|
27
|
+
throw cause;
|
|
28
|
+
// The CLI could not run for this instance: unknown, never a failure of the listing.
|
|
29
|
+
return {
|
|
30
|
+
instance,
|
|
31
|
+
listing: {
|
|
32
|
+
kind: 'unknown',
|
|
33
|
+
reason: 'unavailable',
|
|
34
|
+
code: 'REGISTRY_CLI_FAILED',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const instanceSources = [];
|
|
40
|
+
const read = [];
|
|
41
|
+
for (const { instance, listing } of listed) {
|
|
42
|
+
if (listing.kind === 'listed') {
|
|
43
|
+
instanceSources.push(Object.freeze({
|
|
44
|
+
instance,
|
|
45
|
+
state: 'read',
|
|
46
|
+
kernel: listing.kernel,
|
|
47
|
+
partial: listing.partial,
|
|
48
|
+
}));
|
|
49
|
+
read.push(Object.freeze({
|
|
50
|
+
instance,
|
|
51
|
+
kernel: listing.kernel,
|
|
52
|
+
installations: listing.installations.filter((entry) => entry.origin === origin),
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
instanceSources.push(Object.freeze({ instance, state: 'unknown', reason: listing.reason, code: listing.code }));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const partial = instanceSources.length === 0 ||
|
|
60
|
+
instanceSources.some((entry) => entry.state === 'unknown' || (entry.state === 'read' && entry.partial));
|
|
61
|
+
return Object.freeze({
|
|
62
|
+
sources: Object.freeze({ partial, instances: Object.freeze(instanceSources) }),
|
|
63
|
+
instances: Object.freeze(read),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The instances known to pin the deployment served at `url`: an installation whose Kernel lists
|
|
68
|
+
* its pin under that deployment URL runs that deployment, since one immutable deployment has one
|
|
69
|
+
* URL. In `--instance` argument order.
|
|
70
|
+
*/
|
|
71
|
+
export function installedOn(url, read) {
|
|
72
|
+
const deployment = urlOrigin(url);
|
|
73
|
+
if (deployment === undefined)
|
|
74
|
+
return Object.freeze([]);
|
|
75
|
+
const asked = read.instances
|
|
76
|
+
.filter((entry) => entry.installations.some((installation) => urlOrigin(installation.url) === deployment))
|
|
77
|
+
.map((entry) => Object.freeze({
|
|
78
|
+
source: 'instance',
|
|
79
|
+
instance: entry.instance,
|
|
80
|
+
kernel: entry.kernel,
|
|
81
|
+
}));
|
|
82
|
+
return Object.freeze(asked);
|
|
83
|
+
}
|
|
84
|
+
/** Names shown before the cell counts the rest; the JSON keeps them all. */
|
|
85
|
+
const CELL_NAMES = 3;
|
|
86
|
+
/**
|
|
87
|
+
* The INSTALLED ON cell: the instances known to pin the deployment, then `?` when an instance may
|
|
88
|
+
* run it unnamed (the notices say which); `—` only when every `--instance` listed all it runs and
|
|
89
|
+
* none pins it.
|
|
90
|
+
*/
|
|
91
|
+
export function installedOnCell(installed, sources) {
|
|
92
|
+
const names = distinct(installed.map((entry) => entry.instance));
|
|
93
|
+
const shown = names.length > CELL_NAMES
|
|
94
|
+
? `${names.slice(0, CELL_NAMES).join(', ')} +${names.length - CELL_NAMES}`
|
|
95
|
+
: names.join(', ');
|
|
96
|
+
if (!sources.partial)
|
|
97
|
+
return names.length === 0 ? '—' : shown;
|
|
98
|
+
return names.length === 0 ? '?' : `${shown}, ?`;
|
|
99
|
+
}
|
|
100
|
+
const INSTANCE_REASONS = {
|
|
101
|
+
timeout: 'it did not answer in time',
|
|
102
|
+
refused: 'its Kernel refused the read',
|
|
103
|
+
unavailable: 'it could not be reached',
|
|
104
|
+
unsupported: 'its Kernel does not list installed releases',
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* One line for stderr per source that could not tell, or one when no instance was asked: an
|
|
108
|
+
* unknown instance is partial, never "not installed" (AM-198). Only codes the CLI reported are
|
|
109
|
+
* named, never its messages.
|
|
110
|
+
*/
|
|
111
|
+
export function installationNotices(sources) {
|
|
112
|
+
const notices = [];
|
|
113
|
+
if (sources.instances.length === 0) {
|
|
114
|
+
notices.push('INSTALLED ON is unknown: no instance was asked, and Admin does not say which instances ' +
|
|
115
|
+
'pin a deployment. Ask an instance with --instance <name>.');
|
|
116
|
+
}
|
|
117
|
+
for (const entry of sources.instances) {
|
|
118
|
+
if (entry.state === 'read') {
|
|
119
|
+
if (entry.partial) {
|
|
120
|
+
notices.push(`INSTALLED ON is partial: instance ${entry.instance} lists only what its Kernel shows ` +
|
|
121
|
+
'this caller, so a deployment it does not list may still run there.');
|
|
122
|
+
}
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
if (entry.state !== 'unknown')
|
|
126
|
+
continue;
|
|
127
|
+
notices.push(`INSTALLED ON is partial: what instance ${entry.instance} runs is unknown (${entry.code}): ` +
|
|
128
|
+
(isAdminFailure(entry.code)
|
|
129
|
+
? "the Astrale CLI could not read Admin's registry, which names what the instance runs."
|
|
130
|
+
: `${INSTANCE_REASONS[entry.reason]}.`));
|
|
131
|
+
}
|
|
132
|
+
return Object.freeze(notices);
|
|
133
|
+
}
|
|
134
|
+
function urlOrigin(input) {
|
|
135
|
+
try {
|
|
136
|
+
return new URL(input).origin;
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function distinct(values) {
|
|
143
|
+
return [...new Set(values)];
|
|
144
|
+
}
|
|
145
|
+
async function mapBounded(inputs, limit, map) {
|
|
146
|
+
const outputs = Array.from({ length: inputs.length });
|
|
147
|
+
let next = 0;
|
|
148
|
+
const worker = async () => {
|
|
149
|
+
while (next < inputs.length) {
|
|
150
|
+
const index = next++;
|
|
151
|
+
outputs[index] = await map(inputs[index]);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
await Promise.all(Array.from({ length: Math.min(limit, inputs.length) }, worker));
|
|
155
|
+
return outputs;
|
|
156
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReadyDeployResult } from '../../../deployment/index.js';
|
|
2
|
+
import type { DeployResultV1 } from '../deploy-result.js';
|
|
3
|
+
/**
|
|
4
|
+
* The deploy result of a stable target: the legacy direct-mode path (`prepare`/`deploy` adapter
|
|
5
|
+
* operations) replaces the code its stable target runs in place and serves a v3 Publication, so
|
|
6
|
+
* the result names no release, no build digest, no provider script, no secrets state and no commit.
|
|
7
|
+
* Those operations report a provider deployment identifier (a Worker version id, a Services
|
|
8
|
+
* deployment digest), never the script they replace; that identifier stays on the stderr
|
|
9
|
+
* `Deployment:` progress line and never fills `deployment.script`. Its URL is the public URL
|
|
10
|
+
* `astrale domain install` fetches, which differs from the issuer only under adapter-cloudflare
|
|
11
|
+
* `identityIssuer`.
|
|
12
|
+
*
|
|
13
|
+
* @deprecated Stable-target deploy path only. Replacement: `deployResult`, the result of an
|
|
14
|
+
* immutable deployment. Consumers: the direct-mode configurations of domains ai-gateway, closing,
|
|
15
|
+
* grc, integrations and issues (until SV15), domains organization (until it leaves direct mode,
|
|
16
|
+
* AM-147), the Services `beta` and `prod` (until SV12), `development` (until SV9) and frozen
|
|
17
|
+
* `admin-beta` (until D19) environments, shell (until SH2) and its frozen `legacy-v3` (until D22),
|
|
18
|
+
* and ui:domain (until UI1). Deleted with the legacy deploy path (D10), once no configuration on
|
|
19
|
+
* any repository's main selects it (CT33, AM-147).
|
|
20
|
+
*/
|
|
21
|
+
export declare function stableTargetDeployResult(input: {
|
|
22
|
+
readonly environment: string;
|
|
23
|
+
readonly adapter: {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly version: string;
|
|
26
|
+
};
|
|
27
|
+
readonly deployment: ReadyDeployResult;
|
|
28
|
+
}): DeployResultV1;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The deploy result of a stable target: the legacy direct-mode path (`prepare`/`deploy` adapter
|
|
3
|
+
* operations) replaces the code its stable target runs in place and serves a v3 Publication, so
|
|
4
|
+
* the result names no release, no build digest, no provider script, no secrets state and no commit.
|
|
5
|
+
* Those operations report a provider deployment identifier (a Worker version id, a Services
|
|
6
|
+
* deployment digest), never the script they replace; that identifier stays on the stderr
|
|
7
|
+
* `Deployment:` progress line and never fills `deployment.script`. Its URL is the public URL
|
|
8
|
+
* `astrale domain install` fetches, which differs from the issuer only under adapter-cloudflare
|
|
9
|
+
* `identityIssuer`.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Stable-target deploy path only. Replacement: `deployResult`, the result of an
|
|
12
|
+
* immutable deployment. Consumers: the direct-mode configurations of domains ai-gateway, closing,
|
|
13
|
+
* grc, integrations and issues (until SV15), domains organization (until it leaves direct mode,
|
|
14
|
+
* AM-147), the Services `beta` and `prod` (until SV12), `development` (until SV9) and frozen
|
|
15
|
+
* `admin-beta` (until D19) environments, shell (until SH2) and its frozen `legacy-v3` (until D22),
|
|
16
|
+
* and ui:domain (until UI1). Deleted with the legacy deploy path (D10), once no configuration on
|
|
17
|
+
* any repository's main selects it (CT33, AM-147).
|
|
18
|
+
*/
|
|
19
|
+
export function stableTargetDeployResult(input) {
|
|
20
|
+
const { publication, addressing } = input.deployment.release;
|
|
21
|
+
return Object.freeze({
|
|
22
|
+
format: 'astrale.deploy-result',
|
|
23
|
+
version: 1,
|
|
24
|
+
origin: publication.origin,
|
|
25
|
+
environment: input.environment,
|
|
26
|
+
url: addressing.publicUrl,
|
|
27
|
+
release: null,
|
|
28
|
+
build: null,
|
|
29
|
+
schema: Object.freeze({ revision: publication.schema.revision }),
|
|
30
|
+
deployment: Object.freeze({
|
|
31
|
+
adapter: `${input.adapter.name}@${input.adapter.version}`,
|
|
32
|
+
script: null,
|
|
33
|
+
state: 'replaced',
|
|
34
|
+
}),
|
|
35
|
+
commit: null,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Adapter, LegacyAdapter } from '../../../deployment/adapter/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* An adapter that serves the legacy direct-mode path: a `LegacyAdapter`, or an adapter interface
|
|
4
|
+
* v2 that keeps `prepare` and `deploy` for its direct-mode Environments.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated Stable-target deploy path only. Replacement: `deployRelease` of adapter interface
|
|
7
|
+
* v2. Consumers: `astrale-domain deploy` on the direct-mode
|
|
8
|
+
* configurations of domains ai-gateway, closing, grc, integrations and issues (until SV15), domains
|
|
9
|
+
* organization (until it leaves direct mode, AM-147), the Services `beta` and `prod` (until SV12),
|
|
10
|
+
* `development` (until SV9) and frozen `admin-beta` (until D19) environments, shell (until SH2)
|
|
11
|
+
* and its frozen `legacy-v3` (until D22), and ui:domain (until UI1). Deleted with the legacy
|
|
12
|
+
* deploy path (D10), once no configuration on any repository's main selects it (CT33, AM-147).
|
|
13
|
+
*/
|
|
14
|
+
export type StableTargetAdapter<Parameters extends object = object> = (Adapter<Parameters> | LegacyAdapter<Parameters>) & Pick<LegacyAdapter<Parameters>, 'prepare' | 'deploy'>;
|
|
15
|
+
/**
|
|
16
|
+
* The adapter of an Environment the stable-target path deploys, with its `prepare` and `deploy`.
|
|
17
|
+
* An adapter that implements only adapter interface v2 has neither, and this path cannot deploy it.
|
|
18
|
+
*
|
|
19
|
+
* @deprecated Stable-target deploy path only; see `StableTargetAdapter`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function stableTargetAdapter<Parameters extends object>(adapter: Adapter<Parameters> | LegacyAdapter<Parameters>): StableTargetAdapter<Parameters>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The adapter of an Environment the stable-target path deploys, with its `prepare` and `deploy`.
|
|
3
|
+
* An adapter that implements only adapter interface v2 has neither, and this path cannot deploy it.
|
|
4
|
+
*
|
|
5
|
+
* @deprecated Stable-target deploy path only; see `StableTargetAdapter`.
|
|
6
|
+
*/
|
|
7
|
+
export function stableTargetAdapter(adapter) {
|
|
8
|
+
if (typeof adapter.prepare !== 'function' || typeof adapter.deploy !== 'function') {
|
|
9
|
+
throw new TypeError(`Adapter ${adapter.name}@${adapter.version} implements only adapter interface v2 ` +
|
|
10
|
+
'(deployRelease); this astrale-domain deploys through prepare and deploy, the legacy ' +
|
|
11
|
+
'direct-mode path, and never calls deployRelease.');
|
|
12
|
+
}
|
|
13
|
+
return adapter;
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Build, ResolvedRuntimeReference } from '../../../deployment/index.js';
|
|
2
|
+
import type { LegacyDirectReason } from '../deploy-mode.js';
|
|
3
|
+
import type { DeployResultV1 } from '../deploy-result.js';
|
|
4
|
+
import type { LoadedEnvironment } from '../project.js';
|
|
5
|
+
/**
|
|
6
|
+
* What a direct-mode deploy prints on stderr before any effect (AM-59): its Environment replaces
|
|
7
|
+
* one stable target in place and serves a v3 Publication only, which the deployment model
|
|
8
|
+
* replaces with one immutable deployment per release.
|
|
9
|
+
*
|
|
10
|
+
* @deprecated Stable-target deploy path only; see `deployStableTarget`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function directModeDeprecation(environment: string, reasons: readonly LegacyDirectReason[]): string;
|
|
13
|
+
/**
|
|
14
|
+
* Deploy one Environment on the legacy direct-mode path (CT33): bundle exactly as
|
|
15
|
+
* `astrale-domain build` does, let `prepare` place that Bundle at the Environment's stable target
|
|
16
|
+
* and `deploy` replace the code it runs, then verify the v3 Publication it serves. It warns first,
|
|
17
|
+
* then behaves exactly as before. The SDK never installs the deployed Domain here and makes no
|
|
18
|
+
* Kernel call of its own.
|
|
19
|
+
*
|
|
20
|
+
* Returns the deploy result, or nothing once a failure is reported on stderr.
|
|
21
|
+
*
|
|
22
|
+
* @deprecated Stable-target deploy path only. Replacement: `deployImmutable`, the immutable
|
|
23
|
+
* deployment of one sealed release through `deployRelease`. Consumers: the direct-mode
|
|
24
|
+
* configurations of domains ai-gateway, closing, grc, integrations and issues (until SV15), domains
|
|
25
|
+
* organization (until it leaves direct mode, AM-147), the Services `beta` and `prod` (until SV12),
|
|
26
|
+
* `development` (until SV9) and frozen `admin-beta` (until D19) environments, shell (until SH2)
|
|
27
|
+
* and its frozen `legacy-v3` (until D22), and ui:domain (until UI1). Deleted with the legacy deploy
|
|
28
|
+
* path (D10), once no configuration on any repository's main selects it (CT33, AM-147).
|
|
29
|
+
*/
|
|
30
|
+
export declare function deployStableTarget(input: {
|
|
31
|
+
readonly projectDir: string;
|
|
32
|
+
readonly environment: string;
|
|
33
|
+
readonly definition: LoadedEnvironment;
|
|
34
|
+
readonly reasons: readonly LegacyDirectReason[];
|
|
35
|
+
readonly build: Build;
|
|
36
|
+
readonly runtime: ResolvedRuntimeReference;
|
|
37
|
+
readonly identity?: string;
|
|
38
|
+
readonly signal: AbortSignal;
|
|
39
|
+
readonly report: (line: string) => void;
|
|
40
|
+
}): Promise<DeployResultV1 | undefined>;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { verifyDeployment, verifyPreflight } from '../../../deployment/index.js';
|
|
2
|
+
import { bundleBuild } from '../build.js';
|
|
3
|
+
import { error, warn } from '../log.js';
|
|
4
|
+
import { environmentSecrets } from '../secrets.js';
|
|
5
|
+
import { stableTargetDeployResult } from './deploy-result.js';
|
|
6
|
+
import { stableTargetAdapter } from './stable-target-adapter.js';
|
|
7
|
+
import { stableTargetBuildWarning } from './uploaded-build.js';
|
|
8
|
+
/**
|
|
9
|
+
* What a direct-mode deploy prints on stderr before any effect (AM-59): its Environment replaces
|
|
10
|
+
* one stable target in place and serves a v3 Publication only, which the deployment model
|
|
11
|
+
* replaces with one immutable deployment per release.
|
|
12
|
+
*
|
|
13
|
+
* @deprecated Stable-target deploy path only; see `deployStableTarget`.
|
|
14
|
+
*/
|
|
15
|
+
export function directModeDeprecation(environment, reasons) {
|
|
16
|
+
const selected = reasons.map((reason) => {
|
|
17
|
+
if (reason.reason === 'direct-parameter')
|
|
18
|
+
return reason.parameter;
|
|
19
|
+
return reason.reason === 'no-namespace' ? 'no namespace' : 'no deployRelease';
|
|
20
|
+
});
|
|
21
|
+
return (`Environment ${environment} deploys in direct mode (${selected.join(', ')}), which is ` +
|
|
22
|
+
'deprecated and will be removed: it replaces one stable target in place and serves a v3 ' +
|
|
23
|
+
'Publication only. Its replacement deploys one immutable deployment per release, through an ' +
|
|
24
|
+
'adapter that implements deployRelease.');
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Deploy one Environment on the legacy direct-mode path (CT33): bundle exactly as
|
|
28
|
+
* `astrale-domain build` does, let `prepare` place that Bundle at the Environment's stable target
|
|
29
|
+
* and `deploy` replace the code it runs, then verify the v3 Publication it serves. It warns first,
|
|
30
|
+
* then behaves exactly as before. The SDK never installs the deployed Domain here and makes no
|
|
31
|
+
* Kernel call of its own.
|
|
32
|
+
*
|
|
33
|
+
* Returns the deploy result, or nothing once a failure is reported on stderr.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated Stable-target deploy path only. Replacement: `deployImmutable`, the immutable
|
|
36
|
+
* deployment of one sealed release through `deployRelease`. Consumers: the direct-mode
|
|
37
|
+
* configurations of domains ai-gateway, closing, grc, integrations and issues (until SV15), domains
|
|
38
|
+
* organization (until it leaves direct mode, AM-147), the Services `beta` and `prod` (until SV12),
|
|
39
|
+
* `development` (until SV9) and frozen `admin-beta` (until D19) environments, shell (until SH2)
|
|
40
|
+
* and its frozen `legacy-v3` (until D22), and ui:domain (until UI1). Deleted with the legacy deploy
|
|
41
|
+
* path (D10), once no configuration on any repository's main selects it (CT33, AM-147).
|
|
42
|
+
*/
|
|
43
|
+
export async function deployStableTarget(input) {
|
|
44
|
+
const { build, signal, report } = input;
|
|
45
|
+
warn(directModeDeprecation(input.environment, input.reasons));
|
|
46
|
+
const adapter = stableTargetAdapter(input.definition.deployment.adapter);
|
|
47
|
+
const parameters = input.definition.deployment.parameters;
|
|
48
|
+
// `deploy` rebuilds exactly as `build` does; preparation then only places that Bundle.
|
|
49
|
+
const bundle = await bundleBuild({
|
|
50
|
+
bundler: adapter.bundler,
|
|
51
|
+
projectDir: input.projectDir,
|
|
52
|
+
build,
|
|
53
|
+
runtime: input.runtime,
|
|
54
|
+
signal,
|
|
55
|
+
});
|
|
56
|
+
const source = await adapter.prepare(parameters, {
|
|
57
|
+
projectDir: input.projectDir,
|
|
58
|
+
environment: input.environment,
|
|
59
|
+
mode: 'release',
|
|
60
|
+
signal,
|
|
61
|
+
build,
|
|
62
|
+
runtime: input.runtime,
|
|
63
|
+
bundle,
|
|
64
|
+
});
|
|
65
|
+
const artifact = verifyPreflight({ build, runtime: input.runtime, source });
|
|
66
|
+
const secrets = environmentSecrets(adapter, parameters, input.projectDir, input.runtime.runtime);
|
|
67
|
+
const deployed = await adapter.deploy(parameters, {
|
|
68
|
+
projectDir: input.projectDir,
|
|
69
|
+
environment: input.environment,
|
|
70
|
+
...(input.identity === undefined ? {} : { identity: input.identity }),
|
|
71
|
+
secrets,
|
|
72
|
+
artifact,
|
|
73
|
+
signal,
|
|
74
|
+
});
|
|
75
|
+
const result = verifyDeployment(artifact, deployed);
|
|
76
|
+
if (result.status === 'failed') {
|
|
77
|
+
error(`Deployment failed during ${result.phase}: ${result.error.message}`);
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
const uploaded = result.progress.provider.evidence.build;
|
|
81
|
+
if (uploaded !== undefined) {
|
|
82
|
+
// prepare/deploy places a stable target: a differing upload only warns.
|
|
83
|
+
const warning = stableTargetBuildWarning(bundle, uploaded);
|
|
84
|
+
if (warning !== undefined)
|
|
85
|
+
warn(warning);
|
|
86
|
+
}
|
|
87
|
+
report(`Domain: ${result.release.publication.origin}`);
|
|
88
|
+
report(`Environment: ${input.environment}`);
|
|
89
|
+
report(`Adapter: ${adapter.name}@${adapter.version}`);
|
|
90
|
+
report(`Deployment: ${result.progress.provider.evidence.deployment}`);
|
|
91
|
+
if (result.progress.provider.evidence.preflight !== undefined) {
|
|
92
|
+
report(`Preflight: ${result.progress.provider.evidence.preflight}; public readiness verified`);
|
|
93
|
+
}
|
|
94
|
+
report(`Public: ${result.release.addressing.publicUrl}`);
|
|
95
|
+
report(`Publication: ${result.release.publication.schema.revision} · ${result.release.publication.etag}`);
|
|
96
|
+
report('Ready: deployment verified');
|
|
97
|
+
return stableTargetDeployResult({
|
|
98
|
+
environment: input.environment,
|
|
99
|
+
adapter,
|
|
100
|
+
deployment: result,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Bundle, BuildDigest } from '../../../deployment/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* What a stable-target deploy prints when its upload does not carry the build digest
|
|
4
|
+
* `astrale-domain build` gives for the same tree. A stable target never serves a build digest, so
|
|
5
|
+
* the deployment proceeds with this warning where an immutable deployment refuses the upload.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated Stable-target deploy path (`prepare`/`deploy` adapter operations) only. Replacement:
|
|
8
|
+
* `verifyUploadedBuild`, which refuses the upload of an immutable deployment. Deleted with the
|
|
9
|
+
* legacy deploy path, once no supported configuration selects it (CT33).
|
|
10
|
+
*/
|
|
11
|
+
export declare function stableTargetBuildWarning(bundle: Bundle, uploaded: BuildDigest): string | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { verifyUploadedBuild } from '../../../deployment/index.js';
|
|
2
|
+
import { isBundle } from '../../../deployment/verify/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* What a stable-target deploy prints when its upload does not carry the build digest
|
|
5
|
+
* `astrale-domain build` gives for the same tree. A stable target never serves a build digest, so
|
|
6
|
+
* the deployment proceeds with this warning where an immutable deployment refuses the upload.
|
|
7
|
+
*
|
|
8
|
+
* @deprecated Stable-target deploy path (`prepare`/`deploy` adapter operations) only. Replacement:
|
|
9
|
+
* `verifyUploadedBuild`, which refuses the upload of an immutable deployment. Deleted with the
|
|
10
|
+
* legacy deploy path, once no supported configuration selects it (CT33).
|
|
11
|
+
*/
|
|
12
|
+
export function stableTargetBuildWarning(bundle, uploaded) {
|
|
13
|
+
if (!isBundle(bundle))
|
|
14
|
+
throw new TypeError('Uploaded build check requires an admitted Bundle.');
|
|
15
|
+
try {
|
|
16
|
+
verifyUploadedBuild(bundle, uploaded);
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
catch (refusal) {
|
|
20
|
+
return `${refusal.message} A stable target never serves a build digest, so this deployment proceeds; an immutable deployment refuses this upload.`;
|
|
21
|
+
}
|
|
22
|
+
}
|