@intentius/chant 0.124.27 → 0.124.29
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 +1 -1
- package/dist/__golden__/wave-loop/fan-out-gated.json +8 -0
- package/dist/__golden__/wave-loop/fan-out-no-members.json +4 -0
- package/dist/__golden__/wave-loop/fan-out-only.json +6 -0
- package/dist/__golden__/wave-loop/op-by-apply-hold.json +2 -0
- package/dist/__golden__/wave-loop/op-cost-member.json +3 -0
- package/dist/__golden__/wave-loop/op-held-on-before-apply.json +1 -0
- package/dist/__golden__/wave-loop/op-held-on.json +2 -0
- package/dist/__golden__/wave-loop/op-hooks-held.json +2 -0
- package/dist/__golden__/wave-loop/op-hooks-hold-before-apply.json +2 -0
- package/dist/__golden__/wave-loop/op-hooks-refused-at-base.json +3 -0
- package/dist/__golden__/wave-loop/op-hooks-share.json +3 -0
- package/dist/__golden__/wave-loop/op-per-run.json +7 -0
- package/dist/__golden__/wave-loop/op-pr-review.json +7 -0
- package/dist/__golden__/wave-loop/op-sealed.json +3 -0
- package/dist/__golden__/wave-loop/op-spend.json +3 -0
- package/dist/__golden__/wave-loop/op-wave-commands.json +7 -0
- package/dist/__golden__/wave-loop/op-wide-waiting.json +4 -0
- package/dist/build-params.d.ts +34 -1
- package/dist/build-params.d.ts.map +1 -1
- package/dist/build-params.js +31 -1
- package/dist/change-set-graph.d.ts +63 -0
- package/dist/change-set-graph.d.ts.map +1 -0
- package/dist/change-set-graph.js +130 -0
- package/dist/change-set.d.ts +62 -3
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +36 -4
- package/dist/chant-version.d.ts +9 -0
- package/dist/chant-version.d.ts.map +1 -0
- package/dist/chant-version.js +16 -0
- package/dist/cli/build-params-cli.d.ts +7 -1
- package/dist/cli/build-params-cli.d.ts.map +1 -1
- package/dist/cli/build-params-cli.js +17 -8
- package/dist/cli/commands/build.d.ts +8 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +15 -11
- package/dist/cli/commands/check-lexicon-docs.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon-docs.js +30 -2
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon.js +13 -2
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts +4 -1
- package/dist/cli/commands/init-lexicon/templates/docs.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon/templates/docs.js +6 -6
- package/dist/cli/commands/init-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon.js +17 -8
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +64 -4
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +43 -4
- package/dist/cli/handlers/change-set.d.ts +10 -0
- package/dist/cli/handlers/change-set.d.ts.map +1 -1
- package/dist/cli/handlers/change-set.js +51 -1
- package/dist/cli/handlers/fan-out.d.ts +10 -1
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +54 -6
- package/dist/cli/handlers/lifecycle-gc.d.ts +19 -0
- package/dist/cli/handlers/lifecycle-gc.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle-gc.js +143 -0
- package/dist/cli/handlers/pr.d.ts +16 -2
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +269 -37
- package/dist/cli/handlers/promote.d.ts +7 -0
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +440 -28
- package/dist/cli/handlers/release.d.ts +91 -0
- package/dist/cli/handlers/release.d.ts.map +1 -0
- package/dist/cli/handlers/release.js +589 -0
- package/dist/cli/handlers/run.d.ts +38 -2
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +234 -16
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +143 -17
- package/dist/cli/mcp/workspace-tools.js +1 -1
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +73 -5
- package/dist/cli/registry.d.ts +43 -5
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cli/run-events.d.ts +30 -0
- package/dist/cli/run-events.d.ts.map +1 -0
- package/dist/cli/run-events.js +49 -0
- package/dist/cli/version.d.ts +3 -5
- package/dist/cli/version.d.ts.map +1 -1
- package/dist/cli/version.js +3 -13
- package/dist/codegen/docs-in-site.d.ts +71 -0
- package/dist/codegen/docs-in-site.d.ts.map +1 -0
- package/dist/codegen/docs-in-site.js +177 -0
- package/dist/codegen/docs-types.d.ts +14 -1
- package/dist/codegen/docs-types.d.ts.map +1 -1
- package/dist/codegen/docs.d.ts +18 -1
- package/dist/codegen/docs.d.ts.map +1 -1
- package/dist/codegen/docs.js +40 -7
- package/dist/codegen/rehype-base-url.mjs +15 -9
- package/dist/components/auto-release.d.ts +6 -1
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +3 -0
- package/dist/components/capability.d.ts +9 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +6 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +10 -9
- package/dist/components/driver.d.ts +50 -9
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +116 -54
- package/dist/components/fan-out-inputs.d.ts +69 -0
- package/dist/components/fan-out-inputs.d.ts.map +1 -0
- package/dist/components/fan-out-inputs.js +169 -0
- package/dist/components/fan-out-record.d.ts +13 -0
- package/dist/components/fan-out-record.d.ts.map +1 -1
- package/dist/components/fan-out-record.js +16 -0
- package/dist/components/fan-out-run.d.ts +7 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +85 -26
- package/dist/components/fan-out.d.ts +4 -0
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/pr-pipeline.d.ts +25 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +22 -4
- package/dist/components/pr-run.d.ts +11 -0
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +20 -1
- package/dist/components/promote-order.d.ts +38 -0
- package/dist/components/promote-order.d.ts.map +1 -0
- package/dist/components/promote-order.js +62 -0
- package/dist/components/promote.d.ts +38 -2
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +77 -2
- package/dist/components/release-compile.d.ts +142 -0
- package/dist/components/release-compile.d.ts.map +1 -0
- package/dist/components/release-compile.js +382 -0
- package/dist/components/release-gate.d.ts +135 -0
- package/dist/components/release-gate.d.ts.map +1 -0
- package/dist/components/release-gate.js +288 -0
- package/dist/components/release-promote.d.ts +96 -0
- package/dist/components/release-promote.d.ts.map +1 -0
- package/dist/components/release-promote.js +204 -0
- package/dist/components/run-progress.d.ts +7 -0
- package/dist/components/run-progress.d.ts.map +1 -1
- package/dist/components/wave-plan.d.ts +8 -1
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +11 -3
- package/dist/config.d.ts +45 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +3 -0
- package/dist/flag-params.d.ts +54 -0
- package/dist/flag-params.d.ts.map +1 -0
- package/dist/flag-params.js +130 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +120 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts.map +1 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.js +304 -0
- package/dist/lifecycle/change-set-store.d.ts +68 -0
- package/dist/lifecycle/change-set-store.d.ts.map +1 -0
- package/dist/lifecycle/change-set-store.js +97 -0
- package/dist/lifecycle/commit-sha.d.ts +13 -0
- package/dist/lifecycle/commit-sha.d.ts.map +1 -0
- package/dist/lifecycle/commit-sha.js +21 -0
- package/dist/lifecycle/delivery-metrics.d.ts +139 -0
- package/dist/lifecycle/delivery-metrics.d.ts.map +1 -0
- package/dist/lifecycle/delivery-metrics.js +145 -0
- package/dist/lifecycle/deploy-outcome.d.ts +81 -0
- package/dist/lifecycle/deploy-outcome.d.ts.map +1 -0
- package/dist/lifecycle/deploy-outcome.js +101 -0
- package/dist/lifecycle/gate-change-set.d.ts +78 -0
- package/dist/lifecycle/gate-change-set.d.ts.map +1 -0
- package/dist/lifecycle/gate-change-set.js +138 -0
- package/dist/lifecycle/gate-ledger.d.ts +51 -4
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +18 -0
- package/dist/lifecycle/git.d.ts +30 -1
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +31 -5
- package/dist/lifecycle/index.d.ts +4 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/index.js +4 -0
- package/dist/lifecycle/mixed-environment.d.ts +95 -0
- package/dist/lifecycle/mixed-environment.d.ts.map +1 -0
- package/dist/lifecycle/mixed-environment.js +154 -0
- package/dist/lifecycle/publish-attachments.d.ts +79 -0
- package/dist/lifecycle/publish-attachments.d.ts.map +1 -0
- package/dist/lifecycle/publish-attachments.js +179 -0
- package/dist/lifecycle/publish-credentials.d.ts +37 -0
- package/dist/lifecycle/publish-credentials.d.ts.map +1 -0
- package/dist/lifecycle/publish-credentials.js +69 -0
- package/dist/lifecycle/publish-declaration.d.ts +97 -0
- package/dist/lifecycle/publish-declaration.d.ts.map +1 -0
- package/dist/lifecycle/publish-declaration.js +83 -0
- package/dist/lifecycle/publish-forge.d.ts +53 -0
- package/dist/lifecycle/publish-forge.d.ts.map +1 -0
- package/dist/lifecycle/publish-forge.js +298 -0
- package/dist/lifecycle/publish-npm.d.ts +61 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -0
- package/dist/lifecycle/publish-npm.js +242 -0
- package/dist/lifecycle/publish-oci.d.ts +64 -0
- package/dist/lifecycle/publish-oci.d.ts.map +1 -0
- package/dist/lifecycle/publish-oci.js +383 -0
- package/dist/lifecycle/publish-record.d.ts +66 -0
- package/dist/lifecycle/publish-record.d.ts.map +1 -0
- package/dist/lifecycle/publish-record.js +84 -0
- package/dist/lifecycle/publish-targets.d.ts +45 -0
- package/dist/lifecycle/publish-targets.d.ts.map +1 -0
- package/dist/lifecycle/publish-targets.js +85 -0
- package/dist/lifecycle/release-cut.d.ts +154 -0
- package/dist/lifecycle/release-cut.d.ts.map +1 -0
- package/dist/lifecycle/release-cut.js +366 -0
- package/dist/lifecycle/release-join.d.ts +95 -0
- package/dist/lifecycle/release-join.d.ts.map +1 -0
- package/dist/lifecycle/release-join.js +139 -0
- package/dist/lifecycle/release-ledger.d.ts +54 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +53 -20
- package/dist/lifecycle/release-publish.d.ts +312 -0
- package/dist/lifecycle/release-publish.d.ts.map +1 -0
- package/dist/lifecycle/release-publish.js +335 -0
- package/dist/lifecycle/release-revocation.d.ts +80 -0
- package/dist/lifecycle/release-revocation.d.ts.map +1 -0
- package/dist/lifecycle/release-revocation.js +123 -0
- package/dist/lifecycle/release-store.d.ts +200 -0
- package/dist/lifecycle/release-store.d.ts.map +1 -0
- package/dist/lifecycle/release-store.js +320 -0
- package/dist/lifecycle/release-verify.d.ts +61 -0
- package/dist/lifecycle/release-verify.d.ts.map +1 -0
- package/dist/lifecycle/release-verify.js +92 -0
- package/dist/lifecycle/release-workstation.d.ts +91 -0
- package/dist/lifecycle/release-workstation.d.ts.map +1 -0
- package/dist/lifecycle/release-workstation.js +180 -0
- package/dist/lifecycle/retention-policy.d.ts +45 -0
- package/dist/lifecycle/retention-policy.d.ts.map +1 -0
- package/dist/lifecycle/retention-policy.js +43 -0
- package/dist/lifecycle/retention.d.ts +185 -0
- package/dist/lifecycle/retention.d.ts.map +1 -0
- package/dist/lifecycle/retention.js +400 -0
- package/dist/lifecycle/run-ledger.d.ts +4 -0
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/lifecycle/run-ledger.js +2 -0
- package/dist/op/activities/change-coverage.d.ts.map +1 -1
- package/dist/op/activities/change-coverage.js +4 -2
- package/dist/op/activities/source-release.d.ts.map +1 -1
- package/dist/op/activities/source-release.js +7 -3
- package/dist/op/activities/source-rollback.d.ts.map +1 -1
- package/dist/op/activities/source-rollback.js +7 -3
- package/dist/op/gate-name.d.ts +11 -2
- package/dist/op/gate-name.d.ts.map +1 -1
- package/dist/op/gate-name.js +12 -3
- package/dist/op/gate-run-locator.d.ts +22 -0
- package/dist/op/gate-run-locator.d.ts.map +1 -1
- package/dist/op/gate-run-locator.js +31 -0
- package/dist/op/gate.d.ts +27 -3
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +57 -3
- package/dist/op/local-executor.d.ts +36 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-executor.js +158 -52
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +4 -0
- package/dist/op/run-live.d.ts +2 -0
- package/dist/op/run-live.d.ts.map +1 -1
- package/dist/op/run-live.js +1 -1
- package/dist/op/runtime.d.ts +46 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtimes/local.d.ts.map +1 -1
- package/dist/op/runtimes/local.js +8 -0
- package/dist/plan-summary.d.ts.map +1 -1
- package/dist/plan-summary.js +8 -2
- package/dist/point-decision.d.ts +2 -0
- package/dist/point-decision.d.ts.map +1 -1
- package/dist/point-decision.js +9 -2
- package/dist/pr-loop.d.ts +7 -0
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +23 -4
- package/dist/pr-report-url.d.ts +82 -0
- package/dist/pr-report-url.d.ts.map +1 -0
- package/dist/pr-report-url.js +174 -0
- package/dist/provenance.d.ts +2 -2
- package/dist/provenance.d.ts.map +1 -1
- package/dist/run-event-store.d.ts +104 -0
- package/dist/run-event-store.d.ts.map +1 -0
- package/dist/run-event-store.js +251 -0
- package/dist/run-event-stream.d.ts +133 -0
- package/dist/run-event-stream.d.ts.map +1 -0
- package/dist/run-event-stream.js +242 -0
- package/dist/run-event.d.ts +285 -0
- package/dist/run-event.d.ts.map +1 -0
- package/dist/run-event.js +209 -0
- package/dist/wave-runtime.mjs +262 -226
- package/dist/workspace/__fixtures__/flag-workspace.d.ts +31 -0
- package/dist/workspace/__fixtures__/flag-workspace.d.ts.map +1 -0
- package/dist/workspace/__fixtures__/flag-workspace.js +114 -0
- package/dist/workspace/__fixtures__/run-event-check.d.ts +19 -0
- package/dist/workspace/__fixtures__/run-event-check.d.ts.map +1 -0
- package/dist/workspace/__fixtures__/run-event-check.js +59 -0
- package/dist/workspace/change-set-show.d.ts +56 -0
- package/dist/workspace/change-set-show.d.ts.map +1 -0
- package/dist/workspace/change-set-show.js +54 -0
- package/dist/workspace/change-set-show.schema.json +102 -0
- package/dist/workspace/change-set.schema.json +32 -1
- package/dist/workspace/changes-cli.d.ts.map +1 -1
- package/dist/workspace/changes-cli.js +10 -1
- package/dist/workspace/changes.d.ts +37 -0
- package/dist/workspace/changes.d.ts.map +1 -1
- package/dist/workspace/changes.js +49 -2
- package/dist/workspace/changes.schema.json +135 -0
- package/dist/workspace/check.schema.json +4 -2
- package/dist/workspace/checks/records.d.ts +9 -1
- package/dist/workspace/checks/records.d.ts.map +1 -1
- package/dist/workspace/checks/records.js +35 -1
- package/dist/workspace/checks.d.ts +1 -0
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/checks.js +2 -1
- package/dist/workspace/ci-green-cli.d.ts +19 -4
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +75 -12
- package/dist/workspace/ci-green-forge.d.ts +20 -3
- package/dist/workspace/ci-green-forge.d.ts.map +1 -1
- package/dist/workspace/ci-green-forge.js +6 -4
- package/dist/workspace/ci-green-workflow.d.ts +11 -0
- package/dist/workspace/ci-green-workflow.d.ts.map +1 -1
- package/dist/workspace/ci-green-workflow.js +6 -0
- package/dist/workspace/ci-green.d.ts +281 -13
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +456 -38
- package/dist/workspace/ci-last-green.schema.json +32 -2
- package/dist/workspace/ci-list.schema.json +525 -0
- package/dist/workspace/commit-links.d.ts +85 -0
- package/dist/workspace/commit-links.d.ts.map +1 -0
- package/dist/workspace/commit-links.js +163 -0
- package/dist/workspace/declaration.d.ts +35 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +27 -1
- package/dist/workspace/declaration.schema.json +76 -0
- package/dist/workspace/declared-kinds.d.ts +16 -0
- package/dist/workspace/declared-kinds.d.ts.map +1 -1
- package/dist/workspace/declared-kinds.js +25 -0
- package/dist/workspace/delivery-metrics.d.ts +91 -0
- package/dist/workspace/delivery-metrics.d.ts.map +1 -0
- package/dist/workspace/delivery-metrics.js +217 -0
- package/dist/workspace/delivery-metrics.schema.json +519 -0
- package/dist/workspace/flags-read.d.ts +37 -0
- package/dist/workspace/flags-read.d.ts.map +1 -0
- package/dist/workspace/flags-read.js +103 -0
- package/dist/workspace/flags.d.ts +100 -0
- package/dist/workspace/flags.d.ts.map +1 -0
- package/dist/workspace/flags.js +98 -0
- package/dist/workspace/graph-cli.js +1 -1
- package/dist/workspace/identity-gate-rule.d.ts +37 -0
- package/dist/workspace/identity-gate-rule.d.ts.map +1 -1
- package/dist/workspace/identity-gate-rule.js +72 -7
- package/dist/workspace/identity.d.ts +12 -0
- package/dist/workspace/identity.d.ts.map +1 -1
- package/dist/workspace/identity.js +13 -1
- package/dist/workspace/intent-cli.d.ts +11 -2
- package/dist/workspace/intent-cli.d.ts.map +1 -1
- package/dist/workspace/intent-cli.js +54 -5
- package/dist/workspace/intent-trace.d.ts +219 -0
- package/dist/workspace/intent-trace.d.ts.map +1 -0
- package/dist/workspace/intent-trace.js +314 -0
- package/dist/workspace/intent.d.ts +36 -7
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/intent.js +192 -22
- package/dist/workspace/intent.schema.json +702 -6
- package/dist/workspace/ls.d.ts +4 -0
- package/dist/workspace/ls.d.ts.map +1 -1
- package/dist/workspace/ls.js +2 -0
- package/dist/workspace/ls.schema.json +3 -1
- package/dist/workspace/member-pipeline.d.ts +6 -0
- package/dist/workspace/member-pipeline.d.ts.map +1 -1
- package/dist/workspace/member-pipeline.js +6 -0
- package/dist/workspace/overlap.d.ts +146 -0
- package/dist/workspace/overlap.d.ts.map +1 -0
- package/dist/workspace/overlap.js +276 -0
- package/dist/workspace/promotion-order.d.ts +41 -0
- package/dist/workspace/promotion-order.d.ts.map +1 -0
- package/dist/workspace/promotion-order.js +95 -0
- package/dist/workspace/reason-codes.d.ts +4 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +7 -1
- package/dist/workspace/records.d.ts +15 -2
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/records.js +32 -0
- package/dist/workspace/records.schema.json +21 -2
- package/dist/workspace/reference-kinds/flag/flag.kind.mjs +32 -0
- package/dist/workspace/reference-kinds/flag/flag.schema.json +53 -0
- package/dist/workspace/releases.d.ts +81 -0
- package/dist/workspace/releases.d.ts.map +1 -0
- package/dist/workspace/releases.js +103 -0
- package/dist/workspace/releases.schema.json +513 -0
- package/dist/workspace/run-event.schema.json +295 -0
- package/dist/workspace/status-gates.d.ts +34 -1
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/status-gates.js +31 -2
- package/dist/workspace/status-stewards.d.ts +4 -0
- package/dist/workspace/status-stewards.d.ts.map +1 -1
- package/dist/workspace/status-stewards.js +2 -0
- package/dist/workspace/status.d.ts +117 -0
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/status.js +218 -4
- package/dist/workspace/status.schema.json +268 -2
- package/dist/workspace/trust/ci-tag-statement.d.ts +102 -0
- package/dist/workspace/trust/ci-tag-statement.d.ts.map +1 -0
- package/dist/workspace/trust/ci-tag-statement.js +123 -0
- package/dist/workspace/trust/op-run-statement.d.ts +91 -0
- package/dist/workspace/trust/op-run-statement.d.ts.map +1 -0
- package/dist/workspace/trust/op-run-statement.js +143 -0
- package/dist/workspace/trust/rotation.d.ts +18 -2
- package/dist/workspace/trust/rotation.d.ts.map +1 -1
- package/dist/workspace/trust/rotation.js +65 -16
- package/dist/workspace/trust/seal.d.ts +11 -0
- package/dist/workspace/trust/seal.d.ts.map +1 -1
- package/dist/workspace/trust/seal.js +9 -0
- package/dist/workspace/trust/ssh-commit.d.ts.map +1 -1
- package/dist/workspace/trust/ssh-commit.js +10 -10
- package/dist/workspace/wip.d.ts.map +1 -1
- package/dist/workspace/wip.js +11 -3
- package/package.json +1 -1
- package/src/__golden__/wave-loop/fan-out-gated.json +8 -0
- package/src/__golden__/wave-loop/fan-out-no-members.json +4 -0
- package/src/__golden__/wave-loop/fan-out-only.json +6 -0
- package/src/__golden__/wave-loop/op-by-apply-hold.json +2 -0
- package/src/__golden__/wave-loop/op-cost-member.json +3 -0
- package/src/__golden__/wave-loop/op-held-on-before-apply.json +1 -0
- package/src/__golden__/wave-loop/op-held-on.json +2 -0
- package/src/__golden__/wave-loop/op-hooks-held.json +2 -0
- package/src/__golden__/wave-loop/op-hooks-hold-before-apply.json +2 -0
- package/src/__golden__/wave-loop/op-hooks-refused-at-base.json +3 -0
- package/src/__golden__/wave-loop/op-hooks-share.json +3 -0
- package/src/__golden__/wave-loop/op-per-run.json +7 -0
- package/src/__golden__/wave-loop/op-pr-review.json +7 -0
- package/src/__golden__/wave-loop/op-sealed.json +3 -0
- package/src/__golden__/wave-loop/op-spend.json +3 -0
- package/src/__golden__/wave-loop/op-wave-commands.json +7 -0
- package/src/__golden__/wave-loop/op-wide-waiting.json +4 -0
- package/src/build-params.test.ts +46 -0
- package/src/build-params.ts +55 -1
- package/src/change-set-graph.test.ts +72 -0
- package/src/change-set-graph.ts +141 -0
- package/src/change-set.ts +87 -6
- package/src/chant-version.ts +16 -0
- package/src/cli/build-params-cli.ts +22 -9
- package/src/cli/commands/build.ts +25 -11
- package/src/cli/commands/check-lexicon-docs.test.ts +51 -0
- package/src/cli/commands/check-lexicon-docs.ts +39 -2
- package/src/cli/commands/check-lexicon.ts +14 -2
- package/src/cli/commands/init-lexicon/templates/docs.ts +7 -6
- package/src/cli/commands/init-lexicon.test.ts +25 -0
- package/src/cli/commands/init-lexicon.ts +18 -8
- package/src/cli/handlers/approve-release.test.ts +84 -0
- package/src/cli/handlers/approve-revoked.test.ts +155 -0
- package/src/cli/handlers/approve.ts +65 -2
- package/src/cli/handlers/build.test.ts +67 -0
- package/src/cli/handlers/build.ts +46 -4
- package/src/cli/handlers/change-set.ts +49 -1
- package/src/cli/handlers/fan-out.test.ts +228 -1
- package/src/cli/handlers/fan-out.ts +53 -6
- package/src/cli/handlers/intent-trace.e2e.test.ts +201 -0
- package/src/cli/handlers/lifecycle-gc.test.ts +126 -0
- package/src/cli/handlers/lifecycle-gc.ts +146 -0
- package/src/cli/handlers/operator.test.ts +37 -0
- package/src/cli/handlers/pr.test.ts +341 -0
- package/src/cli/handlers/pr.ts +292 -47
- package/src/cli/handlers/promote.test.ts +669 -7
- package/src/cli/handlers/promote.ts +464 -29
- package/src/cli/handlers/release-implicit.e2e.test.ts +161 -0
- package/src/cli/handlers/release-join.e2e.test.ts +185 -0
- package/src/cli/handlers/release-publish-targets.e2e.test.ts +295 -0
- package/src/cli/handlers/release-verify.e2e.test.ts +117 -0
- package/src/cli/handlers/release-workstation-ci.e2e.test.ts +135 -0
- package/src/cli/handlers/release.e2e.test.ts +199 -0
- package/src/cli/handlers/release.ts +593 -0
- package/src/cli/handlers/run-auto-release.test.ts +80 -0
- package/src/cli/handlers/run-events-cmd.test.ts +92 -0
- package/src/cli/handlers/run-release.test.ts +55 -0
- package/src/cli/handlers/run.test.ts +30 -0
- package/src/cli/handlers/run.ts +243 -18
- package/src/cli/main.test.ts +8 -0
- package/src/cli/main.ts +143 -17
- package/src/cli/mcp/never-over-mcp.test.ts +2 -0
- package/src/cli/mcp/workspace-tools.ts +1 -1
- package/src/cli/parse-args.ts +56 -5
- package/src/cli/registry.ts +43 -5
- package/src/cli/run-events.ts +57 -0
- package/src/cli/version.ts +3 -13
- package/src/codegen/docs-in-site.test.ts +166 -0
- package/src/codegen/docs-in-site.ts +182 -0
- package/src/codegen/docs-site/AgentPrompt.astro +26 -1
- package/src/codegen/docs-types.ts +14 -1
- package/src/codegen/docs.ts +60 -7
- package/src/codegen/rehype-base-url.d.mts +3 -1
- package/src/codegen/rehype-base-url.mjs +15 -9
- package/src/codegen/rehype-base-url.test.ts +34 -0
- package/src/components/auto-release.test.ts +30 -0
- package/src/components/auto-release.ts +9 -1
- package/src/components/capability.ts +9 -0
- package/src/components/cli-support.test.ts +82 -0
- package/src/components/cli-support.ts +16 -9
- package/src/components/driver.test.ts +24 -0
- package/src/components/driver.ts +165 -56
- package/src/components/fan-out-inputs.test.ts +85 -0
- package/src/components/fan-out-inputs.ts +192 -0
- package/src/components/fan-out-record.test.ts +10 -0
- package/src/components/fan-out-record.ts +19 -0
- package/src/components/fan-out-run.ts +104 -35
- package/src/components/fan-out.ts +4 -0
- package/src/components/pr-pipeline.ts +35 -4
- package/src/components/pr-run.ts +30 -1
- package/src/components/promote-order.test.ts +90 -0
- package/src/components/promote-order.ts +75 -0
- package/src/components/promote.test.ts +10 -1
- package/src/components/promote.ts +94 -3
- package/src/components/release-compile.test.ts +147 -0
- package/src/components/release-compile.ts +459 -0
- package/src/components/release-gate.test.ts +215 -0
- package/src/components/release-gate.ts +355 -0
- package/src/components/release-promote.test.ts +159 -0
- package/src/components/release-promote.ts +232 -0
- package/src/components/run-progress.ts +7 -0
- package/src/components/wave-plan.ts +16 -3
- package/src/config.ts +15 -1
- package/src/flag-params.test.ts +144 -0
- package/src/flag-params.ts +134 -0
- package/src/index.ts +2 -0
- package/src/lifecycle/__fixtures__/publish-fakes.ts +351 -0
- package/src/lifecycle/change-set-store.test.ts +217 -0
- package/src/lifecycle/change-set-store.ts +113 -0
- package/src/lifecycle/commit-sha.ts +23 -0
- package/src/lifecycle/delivery-metrics.ts +263 -0
- package/src/lifecycle/deploy-outcome.ts +147 -0
- package/src/lifecycle/gate-change-set.e2e.test.ts +122 -0
- package/src/lifecycle/gate-change-set.ts +164 -0
- package/src/lifecycle/gate-ledger.test.ts +33 -0
- package/src/lifecycle/gate-ledger.ts +68 -3
- package/src/lifecycle/git.ts +61 -8
- package/src/lifecycle/index.ts +4 -0
- package/src/lifecycle/mixed-environment.test.ts +97 -0
- package/src/lifecycle/mixed-environment.ts +204 -0
- package/src/lifecycle/publish-attachments.ts +196 -0
- package/src/lifecycle/publish-credentials.ts +84 -0
- package/src/lifecycle/publish-declaration.ts +95 -0
- package/src/lifecycle/publish-forge.ts +325 -0
- package/src/lifecycle/publish-npm.ts +259 -0
- package/src/lifecycle/publish-oci.ts +396 -0
- package/src/lifecycle/publish-record.ts +113 -0
- package/src/lifecycle/publish-resume.test.ts +168 -0
- package/src/lifecycle/publish-targets.test.ts +494 -0
- package/src/lifecycle/publish-targets.ts +100 -0
- package/src/lifecycle/release-cut-signed.test.ts +180 -0
- package/src/lifecycle/release-cut.test.ts +483 -0
- package/src/lifecycle/release-cut.ts +503 -0
- package/src/lifecycle/release-flag.test.ts +112 -0
- package/src/lifecycle/release-join.test.ts +68 -0
- package/src/lifecycle/release-join.ts +182 -0
- package/src/lifecycle/release-ledger.test.ts +14 -0
- package/src/lifecycle/release-ledger.ts +85 -17
- package/src/lifecycle/release-publish.test.ts +225 -0
- package/src/lifecycle/release-publish.ts +568 -0
- package/src/lifecycle/release-revocation.ts +147 -0
- package/src/lifecycle/release-store.ts +434 -0
- package/src/lifecycle/release-verify.test.ts +110 -0
- package/src/lifecycle/release-verify.ts +120 -0
- package/src/lifecycle/release-workstation.test.ts +204 -0
- package/src/lifecycle/release-workstation.ts +216 -0
- package/src/lifecycle/retention-growth.e2e.test.ts +279 -0
- package/src/lifecycle/retention-policy.ts +63 -0
- package/src/lifecycle/retention.test.ts +363 -0
- package/src/lifecycle/retention.ts +508 -0
- package/src/lifecycle/run-ledger.test.ts +10 -0
- package/src/lifecycle/run-ledger.ts +6 -0
- package/src/op/activities/change-coverage.ts +4 -1
- package/src/op/activities/source-release.ts +8 -3
- package/src/op/activities/source-rollback.ts +8 -4
- package/src/op/commit-run-gate-deploy-join.test.ts +117 -0
- package/src/op/gate-name.ts +13 -3
- package/src/op/gate-release.test.ts +126 -0
- package/src/op/gate-run-locator.test.ts +110 -0
- package/src/op/gate-run-locator.ts +35 -0
- package/src/op/gate.ts +88 -6
- package/src/op/local-executor.ts +207 -52
- package/src/op/op-waves-run.ts +4 -0
- package/src/op/run-events.test.ts +166 -0
- package/src/op/run-live.ts +1 -1
- package/src/op/runtime.ts +39 -0
- package/src/op/runtimes/local.test.ts +16 -0
- package/src/op/runtimes/local.ts +9 -0
- package/src/plan-summary.test.ts +20 -0
- package/src/plan-summary.ts +8 -1
- package/src/point-decision.ts +12 -2
- package/src/pr-loop.ts +25 -4
- package/src/pr-report-url.test.ts +131 -0
- package/src/pr-report-url.ts +209 -0
- package/src/provenance.ts +2 -2
- package/src/run-event-store.test.ts +144 -0
- package/src/run-event-store.ts +273 -0
- package/src/run-event-stream.test.ts +175 -0
- package/src/run-event-stream.ts +309 -0
- package/src/run-event.test.ts +277 -0
- package/src/run-event.ts +471 -0
- package/src/wave-loop-golden.test.ts +9 -0
- package/src/workspace/__fixtures__/flag-workspace.ts +132 -0
- package/src/workspace/__fixtures__/older-records/change-set-984534ea9.json +100 -0
- package/src/workspace/__fixtures__/older-records/older-records.json +326 -0
- package/src/workspace/__fixtures__/run-event-check.ts +58 -0
- package/src/workspace/ancestry-index.test.ts +93 -0
- package/src/workspace/change-set-show.schema.json +102 -0
- package/src/workspace/change-set-show.ts +72 -0
- package/src/workspace/change-set.schema.json +32 -1
- package/src/workspace/changes-cli.ts +10 -1
- package/src/workspace/changes.schema.json +135 -0
- package/src/workspace/changes.test.ts +1 -1
- package/src/workspace/changes.ts +84 -2
- package/src/workspace/check.schema.json +4 -2
- package/src/workspace/checks/records.ts +35 -1
- package/src/workspace/checks.ts +2 -1
- package/src/workspace/ci-green-cli.ts +75 -13
- package/src/workspace/ci-green-forge.ts +24 -4
- package/src/workspace/ci-green-runs.test.ts +242 -0
- package/src/workspace/ci-green-signed.test.ts +302 -0
- package/src/workspace/ci-green-workflow.test.ts +16 -0
- package/src/workspace/ci-green-workflow.ts +12 -0
- package/src/workspace/ci-green.test.ts +131 -2
- package/src/workspace/ci-green.ts +635 -42
- package/src/workspace/ci-last-green.schema.json +32 -2
- package/src/workspace/ci-list.schema.json +525 -0
- package/src/workspace/commit-links.test.ts +279 -0
- package/src/workspace/commit-links.ts +183 -0
- package/src/workspace/declaration.schema.json +76 -0
- package/src/workspace/declaration.test.ts +28 -0
- package/src/workspace/declaration.ts +60 -2
- package/src/workspace/declared-kinds.ts +40 -1
- package/src/workspace/delivery-metrics.schema.json +519 -0
- package/src/workspace/delivery-metrics.test.ts +236 -0
- package/src/workspace/delivery-metrics.ts +286 -0
- package/src/workspace/flags-read.ts +121 -0
- package/src/workspace/flags.test.ts +141 -0
- package/src/workspace/flags.ts +157 -0
- package/src/workspace/graph-cli.ts +1 -1
- package/src/workspace/identity-gate-rule.ts +91 -7
- package/src/workspace/identity.ts +14 -1
- package/src/workspace/intent-cli.ts +46 -5
- package/src/workspace/intent-trace.test.ts +173 -0
- package/src/workspace/intent-trace.ts +484 -0
- package/src/workspace/intent.schema.json +702 -6
- package/src/workspace/intent.ts +196 -26
- package/src/workspace/ls.schema.json +3 -1
- package/src/workspace/ls.ts +6 -0
- package/src/workspace/member-pipeline.test.ts +17 -0
- package/src/workspace/member-pipeline.ts +9 -0
- package/src/workspace/older-records.test.ts +412 -0
- package/src/workspace/overlap.test.ts +165 -0
- package/src/workspace/overlap.ts +340 -0
- package/src/workspace/promotion-order.ts +97 -0
- package/src/workspace/read-contract.e2e.test.ts +5 -1
- package/src/workspace/reason-codes.test.ts +7 -1
- package/src/workspace/reason-codes.ts +7 -1
- package/src/workspace/record-assets.test.ts +2 -1
- package/src/workspace/records-contract.e2e.test.ts +2 -1
- package/src/workspace/records.schema.json +21 -2
- package/src/workspace/records.ts +36 -2
- package/src/workspace/reference-kinds/flag/flag.kind.mjs +32 -0
- package/src/workspace/reference-kinds/flag/flag.schema.json +53 -0
- package/src/workspace/releases.schema.json +513 -0
- package/src/workspace/releases.test.ts +108 -0
- package/src/workspace/releases.ts +133 -0
- package/src/workspace/run-event.schema.json +295 -0
- package/src/workspace/status-contract.test.ts +81 -1
- package/src/workspace/status-gates.ts +64 -1
- package/src/workspace/status-mixed.test.ts +152 -0
- package/src/workspace/status-revoked.test.ts +153 -0
- package/src/workspace/status-stewards.ts +6 -0
- package/src/workspace/status.schema.json +268 -2
- package/src/workspace/status.ts +334 -4
- package/src/workspace/trust/ci-tag-statement.ts +151 -0
- package/src/workspace/trust/op-run-statement.ts +148 -0
- package/src/workspace/trust/rotation.ts +61 -14
- package/src/workspace/trust/seal.ts +10 -0
- package/src/workspace/trust/ssh-commit.ts +10 -9
- package/src/workspace/wip.ts +11 -2
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/astro.config.mjs +0 -14
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/package.json +0 -16
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/src/content/docs/index.mdx +0 -8
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/src/content.config.ts +0 -15
- package/src/cli/commands/__fixtures__/init-lexicon-output/docs/tsconfig.json +0 -10
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compiling a release (#4026, ws-104 question 5): what one environment
|
|
3
|
+
* compiles to, and the artifacts built once.
|
|
4
|
+
*
|
|
5
|
+
* A template is synthesized for one environment per invocation: `--env` sets
|
|
6
|
+
* `CHANT_ENV` before the project is imported, and `*.component.ts` files are
|
|
7
|
+
* imported with a plain `import()`, which caches the module. So each
|
|
8
|
+
* environment is compiled in a child process of its own
|
|
9
|
+
* ({@link spawnTargetCompiler}), running `chant release compile --env <env>`,
|
|
10
|
+
* which calls {@link compileEnvironment} in that process and prints the
|
|
11
|
+
* result as JSON. The artifacts are built in one more child, for the first
|
|
12
|
+
* environment in which each component is enabled ({@link buildReleaseArtifacts}).
|
|
13
|
+
*
|
|
14
|
+
* What counts as a template is data, as the build and publish kinds are in
|
|
15
|
+
* ./promote.ts: a literal path in a deploy step's `template`, `manifest` or
|
|
16
|
+
* `values` field ({@link TEMPLATE_FIELDS}), read after the environment's build
|
|
17
|
+
* command has run. A path with the `archive:` prefix names the file after it.
|
|
18
|
+
* A path that names a directory, such as a chart, is not a template.
|
|
19
|
+
*
|
|
20
|
+
* A project with no components (#4046) is compiled the way `chant build --env
|
|
21
|
+
* <env> -o <output>` builds it ({@link compileBuildOutput}): every file that
|
|
22
|
+
* build writes is a template with `component: null`, and the target's params
|
|
23
|
+
* are the build's `buildParams`. The files are kept in memory rather than read
|
|
24
|
+
* back from disk, so a file an earlier build left behind is never recorded.
|
|
25
|
+
*/
|
|
26
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
27
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
28
|
+
import { isAbsolute, relative, resolve } from "node:path";
|
|
29
|
+
import { loadChantConfig } from "../config.js";
|
|
30
|
+
import { resolveFlaggedBuildParams } from "../flag-params.js";
|
|
31
|
+
import { discoverComponents } from "./discover.js";
|
|
32
|
+
import { withoutDisabled } from "./cli-support.js";
|
|
33
|
+
import { applyConfigDefaults } from "./config-defaults.js";
|
|
34
|
+
import { fanOutRegistry } from "./fan-out-support.js";
|
|
35
|
+
import { ARCHIVE_STEP_KINDS, BUILD_STEP_KINDS, PUBLISH_STEP_KINDS } from "./promote.js";
|
|
36
|
+
import { DriverRunFailure, runInterpretDriver } from "./driver.js";
|
|
37
|
+
import { memoryGateLedgerPort } from "../op/gate.js";
|
|
38
|
+
/** The deploy step fields whose literal file paths are a component's templates. */
|
|
39
|
+
export const TEMPLATE_FIELDS = ["template", "manifest", "values"];
|
|
40
|
+
/** The prefix a step may write before an archive-relative template path. */
|
|
41
|
+
const ARCHIVE_PREFIX = "archive:";
|
|
42
|
+
function isGate(step) {
|
|
43
|
+
return step.kind === "gate";
|
|
44
|
+
}
|
|
45
|
+
function isPhase(step) {
|
|
46
|
+
return typeof step.phase === "string" && Array.isArray(step.steps);
|
|
47
|
+
}
|
|
48
|
+
/** Every step of a composition with the phase it sits in, nested phases included, in order. */
|
|
49
|
+
function stepsOf(phases) {
|
|
50
|
+
const out = [];
|
|
51
|
+
const walk = (phase) => {
|
|
52
|
+
for (const step of phase.steps) {
|
|
53
|
+
if (isPhase(step))
|
|
54
|
+
walk(step);
|
|
55
|
+
else if (!isGate(step))
|
|
56
|
+
out.push({ phase: phase.phase, step });
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
phases.forEach(walk);
|
|
60
|
+
return out;
|
|
61
|
+
}
|
|
62
|
+
const isLiteralPath = (v) => typeof v === "string" && v !== "" && !v.startsWith("@") && !v.startsWith("$");
|
|
63
|
+
/** The templates a component's deploy reads: literal paths in {@link TEMPLATE_FIELDS} of its steps other than build and publish steps. */
|
|
64
|
+
export function templateRefs(component) {
|
|
65
|
+
const out = [];
|
|
66
|
+
for (const { phase, step } of stepsOf(component.deploy)) {
|
|
67
|
+
if (BUILD_STEP_KINDS.includes(step.kind) || PUBLISH_STEP_KINDS.includes(step.kind))
|
|
68
|
+
continue;
|
|
69
|
+
for (const field of TEMPLATE_FIELDS) {
|
|
70
|
+
const raw = step[field];
|
|
71
|
+
const values = Array.isArray(raw) ? raw : [raw];
|
|
72
|
+
for (const value of values) {
|
|
73
|
+
if (!isLiteralPath(value))
|
|
74
|
+
continue;
|
|
75
|
+
const path = value.startsWith(ARCHIVE_PREFIX) ? value.slice(ARCHIVE_PREFIX.length) : value;
|
|
76
|
+
out.push({ component: component.name, phase, kind: step.kind, field, value, path });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
82
|
+
/** A component's build-time steps ({@link BUILD_STEP_KINDS}), each as declared, in composition order. */
|
|
83
|
+
export function buildStepsOf(component) {
|
|
84
|
+
return stepsOf(component.deploy).map((s) => s.step).filter((s) => BUILD_STEP_KINDS.includes(s.kind));
|
|
85
|
+
}
|
|
86
|
+
/** A component's publish steps ({@link PUBLISH_STEP_KINDS}), each as declared, in composition order. */
|
|
87
|
+
export function publishStepsOf(component) {
|
|
88
|
+
return stepsOf(component.deploy).map((s) => s.step).filter((s) => PUBLISH_STEP_KINDS.includes(s.kind));
|
|
89
|
+
}
|
|
90
|
+
/** The literal paths a component's archive steps read: `docker-build`'s `context` and `dockerfile`, `zip-package`'s `source`, `jvm-build`'s `path`. */
|
|
91
|
+
export function buildInputPaths(component) {
|
|
92
|
+
const out = [];
|
|
93
|
+
for (const step of buildStepsOf(component)) {
|
|
94
|
+
if (step.kind === "docker-build") {
|
|
95
|
+
if (isLiteralPath(step.context)) {
|
|
96
|
+
out.push(step.context);
|
|
97
|
+
out.push(isLiteralPath(step.dockerfile) ? `${step.context}/${step.dockerfile}` : `${step.context}/Dockerfile`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
else if (step.kind === "zip-package" && isLiteralPath(step.source))
|
|
101
|
+
out.push(step.source);
|
|
102
|
+
else if (step.kind === "jvm-build" && isLiteralPath(step.path))
|
|
103
|
+
out.push(step.path);
|
|
104
|
+
}
|
|
105
|
+
return [...new Set(out)];
|
|
106
|
+
}
|
|
107
|
+
/** A component's composition with only its archive steps ({@link ARCHIVE_STEP_KINDS}) left, gates and every other step taken out. */
|
|
108
|
+
export function withOnlyArchiveSteps(component) {
|
|
109
|
+
const keep = (phase) => {
|
|
110
|
+
const steps = [];
|
|
111
|
+
for (const step of phase.steps) {
|
|
112
|
+
if (isPhase(step)) {
|
|
113
|
+
const nested = keep(step);
|
|
114
|
+
if (nested)
|
|
115
|
+
steps.push(nested);
|
|
116
|
+
}
|
|
117
|
+
else if (!isGate(step) && ARCHIVE_STEP_KINDS.includes(step.kind))
|
|
118
|
+
steps.push(step);
|
|
119
|
+
}
|
|
120
|
+
return steps.length > 0 ? { phase: phase.phase, steps } : undefined;
|
|
121
|
+
};
|
|
122
|
+
const deploy = component.deploy.map(keep).filter((p) => p !== undefined);
|
|
123
|
+
return deploy.length > 0 ? { name: component.name, dependsOn: [], deploy } : undefined;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Where a project with no components writes its build output when the cut
|
|
127
|
+
* names no `-o`. YAML, since the k8s and helm serializers write YAML whatever
|
|
128
|
+
* the extension, and a JSON output converts to it.
|
|
129
|
+
*/
|
|
130
|
+
export const DEFAULT_BUILD_OUTPUT = "dist/build.yaml";
|
|
131
|
+
/** Thrown when an environment can't be compiled. */
|
|
132
|
+
export class ReleaseCompileError extends Error {
|
|
133
|
+
constructor(message) {
|
|
134
|
+
super(message);
|
|
135
|
+
this.name = "ReleaseCompileError";
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
async function loadComponents(inputs, env) {
|
|
139
|
+
const { config } = await loadChantConfig(inputs.projectDir).catch(() => ({ config: {} }));
|
|
140
|
+
// #4024: a workspace member's flag records back their parameters, so a flag's value is a param with source flag:<name>.
|
|
141
|
+
const resolved = await resolveFlaggedBuildParams(inputs.projectDir, config.buildParams, {
|
|
142
|
+
...(inputs.params ? { cli: inputs.params } : {}),
|
|
143
|
+
...(inputs.paramsFile ? { paramsFile: inputs.paramsFile.replaceAll("{env}", env) } : {}),
|
|
144
|
+
}, env);
|
|
145
|
+
if (!resolved.success)
|
|
146
|
+
throw new ReleaseCompileError(`build parameters for "${env}" did not resolve:\n${resolved.errors.join("\n")}`);
|
|
147
|
+
const discovered = await discoverComponents(inputs.projectDir, { buildParams: resolved.provenance });
|
|
148
|
+
if (discovered.errors.length > 0)
|
|
149
|
+
throw new ReleaseCompileError(discovered.errors.map((e) => e.message).join("\n"));
|
|
150
|
+
const all = [...discovered.components.values()];
|
|
151
|
+
const plain = all.map(({ component }) => ({
|
|
152
|
+
name: component.name,
|
|
153
|
+
dependsOn: component.dependsOn,
|
|
154
|
+
deploy: component.deploy,
|
|
155
|
+
...(component.rollback ? { rollback: component.rollback } : {}),
|
|
156
|
+
}));
|
|
157
|
+
const enabled = withoutDisabled(all.map((d) => d.component), plain);
|
|
158
|
+
const fileOf = new Map(all.map((d) => [d.component.name, d.filePath]));
|
|
159
|
+
return {
|
|
160
|
+
config,
|
|
161
|
+
params: resolved.provenance.map(({ name, value, source }) => ({ name, value, source })),
|
|
162
|
+
declared: all.length,
|
|
163
|
+
components: enabled.map((c) => ({ component: applyConfigDefaults(c, config), file: fileOf.get(c.name) })),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Compile the member for `env` in this process: run the build command, resolve
|
|
168
|
+
* the build parameters, discover the components enabled under them, and read
|
|
169
|
+
* the templates their deploys name. Call it once per process, with
|
|
170
|
+
* `CHANT_ENV` already set to `env`, since component modules are cached.
|
|
171
|
+
*/
|
|
172
|
+
export async function compileEnvironment(inputs, env) {
|
|
173
|
+
if (inputs.buildCommand) {
|
|
174
|
+
const run = spawnSync(inputs.buildCommand, {
|
|
175
|
+
cwd: inputs.projectDir,
|
|
176
|
+
shell: true,
|
|
177
|
+
stdio: ["ignore", 2, 2],
|
|
178
|
+
env: { ...process.env, CHANT_ENV: env },
|
|
179
|
+
});
|
|
180
|
+
if (run.status !== 0)
|
|
181
|
+
throw new ReleaseCompileError(`the build command for "${env}" exited ${run.status ?? "with a signal"}: ${inputs.buildCommand}`);
|
|
182
|
+
}
|
|
183
|
+
const { config, params, declared, components } = await loadComponents(inputs, env);
|
|
184
|
+
if (declared === 0)
|
|
185
|
+
return compileBuildOutput(inputs, env, config);
|
|
186
|
+
const rel = (p) => (isAbsolute(p) ? relative(inputs.projectDir, p) : p);
|
|
187
|
+
const templates = [];
|
|
188
|
+
const seen = new Set();
|
|
189
|
+
for (const { component } of components) {
|
|
190
|
+
for (const ref of templateRefs(component)) {
|
|
191
|
+
const key = `${ref.component}\u0000${ref.path}`;
|
|
192
|
+
if (seen.has(key))
|
|
193
|
+
continue;
|
|
194
|
+
seen.add(key);
|
|
195
|
+
const file = resolve(inputs.projectDir, ref.path);
|
|
196
|
+
if (!existsSync(file)) {
|
|
197
|
+
throw new ReleaseCompileError(`component "${ref.component}": its ${ref.kind} step in phase "${ref.phase}" reads ${ref.field} "${ref.value}", ` +
|
|
198
|
+
`and no such file exists after the build for "${env}"`);
|
|
199
|
+
}
|
|
200
|
+
if (!statSync(file).isFile())
|
|
201
|
+
continue;
|
|
202
|
+
templates.push({ component: ref.component, path: ref.path, content: readFileSync(file, "utf-8") });
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return {
|
|
206
|
+
env,
|
|
207
|
+
params,
|
|
208
|
+
components: components.map((c) => c.component.name),
|
|
209
|
+
buildSteps: Object.fromEntries(components.map(({ component }) => [component.name, buildStepsOf(component)])),
|
|
210
|
+
publishSteps: Object.fromEntries(components.map(({ component }) => [component.name, publishStepsOf(component)])),
|
|
211
|
+
buildInputs: Object.fromEntries(components.map(({ component }) => [component.name, buildInputPaths(component)])),
|
|
212
|
+
componentFiles: Object.fromEntries(components.map(({ component, file }) => [component.name, rel(file)])),
|
|
213
|
+
templates,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Compile a project with no components for `env` (#4046, ws-104 question 5):
|
|
218
|
+
* build it as `chant build <src> --env <env> -o <output>` would, and record
|
|
219
|
+
* each file that build writes as a template with `component: null`, by its
|
|
220
|
+
* path relative to the member's directory. The params are the build's own
|
|
221
|
+
* `buildParams`. Nothing is written to disk.
|
|
222
|
+
*/
|
|
223
|
+
export async function compileBuildOutput(inputs, env, config) {
|
|
224
|
+
if (!inputs.src && config.stacks && config.stacks.length > 0) {
|
|
225
|
+
throw new ReleaseCompileError(`this project declares ${config.stacks.length} stack(s) in chant.config.ts and no component, and a release of a project with no components compiles one build root; ` +
|
|
226
|
+
"name it with --src <dir>");
|
|
227
|
+
}
|
|
228
|
+
const projectDir = resolve(inputs.projectDir);
|
|
229
|
+
const root = resolve(projectDir, inputs.src ?? config.sourceDir ?? ".");
|
|
230
|
+
const output = resolve(projectDir, inputs.output ?? DEFAULT_BUILD_OUTPUT);
|
|
231
|
+
const rel = relative(projectDir, output);
|
|
232
|
+
if (rel === "" || rel.startsWith("..") || isAbsolute(rel)) {
|
|
233
|
+
throw new ReleaseCompileError(`the build output "${inputs.output}" is outside the member's directory; name a file inside it`);
|
|
234
|
+
}
|
|
235
|
+
// Loaded here: a project with components never needs the lexicon plugins in this process.
|
|
236
|
+
const { loadPlugins, resolveProjectLexicons } = await import("../cli/plugins.js");
|
|
237
|
+
const { buildCommand, printWarnings, resolveBuildFormat } = await import("../cli/commands/build.js");
|
|
238
|
+
const plugins = await loadPlugins(await resolveProjectLexicons(projectDir, inputs.lexicon ? { lexicon: inputs.lexicon } : {}));
|
|
239
|
+
const serializers = plugins.map((p) => p.serializer).filter((s) => !inputs.lexicon || s.name === inputs.lexicon);
|
|
240
|
+
if (serializers.length === 0) {
|
|
241
|
+
throw new ReleaseCompileError(inputs.lexicon ? `no serializer found for lexicon "${inputs.lexicon}"` : "this project has no component and no lexicon, so there is nothing to compile a release from");
|
|
242
|
+
}
|
|
243
|
+
const files = new Map();
|
|
244
|
+
const result = await buildCommand({
|
|
245
|
+
path: root,
|
|
246
|
+
output,
|
|
247
|
+
format: resolveBuildFormat(undefined, output).format,
|
|
248
|
+
serializers,
|
|
249
|
+
plugins,
|
|
250
|
+
env,
|
|
251
|
+
...(inputs.params ? { params: inputs.params } : {}),
|
|
252
|
+
...(inputs.paramsFile ? { paramsFile: inputs.paramsFile.replaceAll("{env}", env) } : {}),
|
|
253
|
+
writeFile: (path, content) => files.set(path, content),
|
|
254
|
+
});
|
|
255
|
+
printWarnings(result.warnings);
|
|
256
|
+
if (!result.success) {
|
|
257
|
+
throw new ReleaseCompileError(`the build for "${env}" failed:\n${result.errors.join("\n")}`);
|
|
258
|
+
}
|
|
259
|
+
if (result.fileCount === 0 && result.resourceCount === 0) {
|
|
260
|
+
throw new ReleaseCompileError(`no source files were found under ${relative(projectDir, root) || "."}, so there is nothing to compile a release from`);
|
|
261
|
+
}
|
|
262
|
+
const templates = [];
|
|
263
|
+
for (const [path, content] of files) {
|
|
264
|
+
const p = relative(projectDir, path);
|
|
265
|
+
if (p.startsWith("..") || isAbsolute(p)) {
|
|
266
|
+
throw new ReleaseCompileError(`the build for "${env}" writes ${path}, outside the member's directory, so the release can't record it`);
|
|
267
|
+
}
|
|
268
|
+
templates.push({ component: null, path: p.split("\\").join("/"), content });
|
|
269
|
+
}
|
|
270
|
+
templates.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0));
|
|
271
|
+
return {
|
|
272
|
+
env,
|
|
273
|
+
params: (result.buildParams ?? []).map(({ name, value, source }) => ({ name, value, source })),
|
|
274
|
+
components: [],
|
|
275
|
+
buildSteps: {},
|
|
276
|
+
buildInputs: {},
|
|
277
|
+
componentFiles: {},
|
|
278
|
+
templates,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Build the artifacts of `names` once, for `env`: run each component's archive
|
|
283
|
+
* steps, and nothing else, through the driver. `docker-build` gives an `image`
|
|
284
|
+
* entry, `zip-package` and `jvm-build` an `asset` entry, each with the path it
|
|
285
|
+
* wrote and its digest.
|
|
286
|
+
*/
|
|
287
|
+
export async function buildReleaseArtifacts(inputs, env, names, registry) {
|
|
288
|
+
const { config, components } = await loadComponents(inputs, env);
|
|
289
|
+
const wanted = new Set(names);
|
|
290
|
+
const targets = components
|
|
291
|
+
.filter(({ component }) => wanted.has(component.name))
|
|
292
|
+
.map(({ component }) => withOnlyArchiveSteps(component))
|
|
293
|
+
.filter((c) => c !== undefined);
|
|
294
|
+
if (targets.length === 0)
|
|
295
|
+
return [];
|
|
296
|
+
const reg = registry ?? (await fanOutRegistry(inputs.projectDir, config));
|
|
297
|
+
let run;
|
|
298
|
+
try {
|
|
299
|
+
run = await runInterpretDriver(targets, reg, { env, gates: memoryGateLedgerPort() });
|
|
300
|
+
}
|
|
301
|
+
catch (err) {
|
|
302
|
+
if (err instanceof DriverRunFailure) {
|
|
303
|
+
const failed = err.result.results.find((r) => r.status === "fail");
|
|
304
|
+
const step = failed?.records.find((r) => r.status === "fail");
|
|
305
|
+
throw new ReleaseCompileError(`building the artifacts of "${failed?.component ?? "?"}" failed${step?.error ? `: ${step.error}` : ""}`);
|
|
306
|
+
}
|
|
307
|
+
throw err;
|
|
308
|
+
}
|
|
309
|
+
const artifacts = [];
|
|
310
|
+
for (const result of run.results) {
|
|
311
|
+
for (const record of result.records) {
|
|
312
|
+
if (record.status !== "ok" || !ARCHIVE_STEP_KINDS.includes(record.kind))
|
|
313
|
+
continue;
|
|
314
|
+
const out = record.output;
|
|
315
|
+
if (typeof out?.archivePath !== "string" || typeof out.digest !== "string") {
|
|
316
|
+
throw new ReleaseCompileError(`component "${result.component}": its ${record.kind} step returned no archive path and digest`);
|
|
317
|
+
}
|
|
318
|
+
artifacts.push({ component: result.component, kind: record.kind === "docker-build" ? "image" : "asset", path: out.archivePath, digest: out.digest });
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
return artifacts;
|
|
322
|
+
}
|
|
323
|
+
/** How {@link spawnTargetCompiler} starts this chant. */
|
|
324
|
+
export function ownChantCommand() {
|
|
325
|
+
const main = process.argv[1] ?? "";
|
|
326
|
+
return [process.execPath, ...process.execArgv, main];
|
|
327
|
+
}
|
|
328
|
+
function runChild(command, args, cwd, env) {
|
|
329
|
+
return new Promise((resolvePromise, reject) => {
|
|
330
|
+
const [bin, ...lead] = command;
|
|
331
|
+
const child = spawn(bin, [...lead, ...args], { cwd, stdio: ["ignore", "pipe", "pipe"], env: { ...process.env, CHANT_ENV: env } });
|
|
332
|
+
const out = [];
|
|
333
|
+
const err = [];
|
|
334
|
+
child.stdout.on("data", (c) => out.push(c));
|
|
335
|
+
child.stderr.on("data", (c) => {
|
|
336
|
+
err.push(c);
|
|
337
|
+
process.stderr.write(c);
|
|
338
|
+
});
|
|
339
|
+
child.on("error", reject);
|
|
340
|
+
child.on("close", (code) => resolvePromise({ code: code ?? 1, stdout: Buffer.concat(out).toString("utf-8"), stderr: Buffer.concat(err).toString("utf-8") }));
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* The compiler the CLI uses: each environment in a child process of this same
|
|
345
|
+
* chant (`chant release compile --env <env> --json`), with `CHANT_ENV` set to
|
|
346
|
+
* that environment before anything imports the project.
|
|
347
|
+
*/
|
|
348
|
+
export function spawnTargetCompiler(inputs, command = ownChantCommand()) {
|
|
349
|
+
const common = () => {
|
|
350
|
+
const args = [];
|
|
351
|
+
if (inputs.src)
|
|
352
|
+
args.push("--src", inputs.src);
|
|
353
|
+
if (inputs.output)
|
|
354
|
+
args.push("--output", inputs.output);
|
|
355
|
+
if (inputs.lexicon)
|
|
356
|
+
args.push("--lexicon", inputs.lexicon);
|
|
357
|
+
for (const [k, v] of Object.entries(inputs.params ?? {}))
|
|
358
|
+
args.push("--param", `${k}=${v}`);
|
|
359
|
+
if (inputs.paramsFile)
|
|
360
|
+
args.push("--params-file", inputs.paramsFile);
|
|
361
|
+
return args;
|
|
362
|
+
};
|
|
363
|
+
const call = async (env, extra) => {
|
|
364
|
+
const run = await runChild(command, ["release", "compile", "--env", env, ...common(), ...extra, "--json"], inputs.projectDir, env);
|
|
365
|
+
if (run.code !== 0)
|
|
366
|
+
throw new ReleaseCompileError(`compiling "${env}" failed (exit ${run.code})`);
|
|
367
|
+
try {
|
|
368
|
+
return JSON.parse(run.stdout);
|
|
369
|
+
}
|
|
370
|
+
catch {
|
|
371
|
+
throw new ReleaseCompileError(`compiling "${env}" printed something that is not JSON`);
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
return {
|
|
375
|
+
async compile(env) {
|
|
376
|
+
return (await call(env, inputs.buildCommand ? ["--build", inputs.buildCommand] : []));
|
|
377
|
+
},
|
|
378
|
+
async buildArtifacts(env, components) {
|
|
379
|
+
return (await call(env, ["--artifacts", "--component", components.join(",")])).artifacts;
|
|
380
|
+
},
|
|
381
|
+
};
|
|
382
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The release gate (#4045, ws-104 questions 2 and 6): the gate `chant
|
|
3
|
+
* components promote --release` passes for an environment.
|
|
4
|
+
*
|
|
5
|
+
* ## What it binds
|
|
6
|
+
*
|
|
7
|
+
* A promote under a release plans the release's change set for the
|
|
8
|
+
* environment it deploys to ({@link planReleaseChangeSet}), stores it on
|
|
9
|
+
* `chant/lifecycle` under its digest (`../lifecycle/gate-change-set.ts`), and
|
|
10
|
+
* decides every gate its components reach against three values:
|
|
11
|
+
*
|
|
12
|
+
* - the change-set document's `digest`, in `planDigest`;
|
|
13
|
+
* - the release, in `releaseDigest`;
|
|
14
|
+
* - the environment, in `environment`.
|
|
15
|
+
*
|
|
16
|
+
* An approval counts only when all three match (`evaluateGate` in
|
|
17
|
+
* `../op/gate.ts`). The document itself names the release and the environment
|
|
18
|
+
* it was planned for, and both are part of its digest, so a stored document
|
|
19
|
+
* names the one release its gate bound and two releases never share a digest.
|
|
20
|
+
*
|
|
21
|
+
* Every gate a promote under a release reaches is recorded in one ledger,
|
|
22
|
+
* {@link RELEASE_GATE_OP}, rather than in each component's. The gate name a
|
|
23
|
+
* composition authors is kept, so components that share a gate name share one
|
|
24
|
+
* gate per environment, and one approval of the release's change set passes
|
|
25
|
+
* each of them. A promote of one component (`--component`) plans that
|
|
26
|
+
* component's subset, which has its own digest and needs its own approval.
|
|
27
|
+
*
|
|
28
|
+
* ## Empty change sets
|
|
29
|
+
*
|
|
30
|
+
* When the change set changes nothing ({@link isEmptyChangeSet}), the
|
|
31
|
+
* promote writes an `empty: true` resolution for each gate, with the actor
|
|
32
|
+
* running it in `resolvedBy` ({@link emptyResolution}). A gate counts it only
|
|
33
|
+
* after it reads the stored document back and finds it empty
|
|
34
|
+
* ({@link emptyVerifier}). Quorum and signing rules don't apply to it.
|
|
35
|
+
*
|
|
36
|
+
* ## The members
|
|
37
|
+
*
|
|
38
|
+
* A component with a step whose capability can plan (`terraform-apply`) is
|
|
39
|
+
* planned by that capability, as a pull request's plan is. A plan that
|
|
40
|
+
* returns no change-set part is a hole, since nothing says what it changes.
|
|
41
|
+
*
|
|
42
|
+
* Any other component is a `chant` member compared with what the
|
|
43
|
+
* environment runs now: its latest deploy record and the release that record
|
|
44
|
+
* names. The artifact digest, each template the release's target records for
|
|
45
|
+
* the component, and the target's parameters are compared, and each one that
|
|
46
|
+
* differs is an attribute of one `update` entry (a `create` when the
|
|
47
|
+
* environment has no deploy of the component). When they are all equal the
|
|
48
|
+
* member has no entries. When the environment's deploy names no release, or
|
|
49
|
+
* the release it names can't be read, the member has a hole: nothing says
|
|
50
|
+
* what the environment runs, so the change can't be shown empty. So does a
|
|
51
|
+
* component a promote, rollback or redeploy left failed or gated with nothing
|
|
52
|
+
* recorded since (#4035): its record names what ran before that run.
|
|
53
|
+
*/
|
|
54
|
+
import type { CapabilityRegistry } from "./capability.js";
|
|
55
|
+
import { type DriverComponent } from "./driver.js";
|
|
56
|
+
import { RELEASE_GATE_OP } from "../op/gate-name.js";
|
|
57
|
+
import { type ChangeSetDocument, type ChangeSetPart } from "../change-set.js";
|
|
58
|
+
import type { Release } from "../lifecycle/release-store.js";
|
|
59
|
+
import type { ReleaseRecord } from "../lifecycle/release-ledger.js";
|
|
60
|
+
import type { GateResolutionInput } from "../lifecycle/gate-ledger.js";
|
|
61
|
+
import type { StoredChangeSetRead } from "../lifecycle/change-set-store.js";
|
|
62
|
+
/** The gate ledger every release gate is recorded in: `_gates/release.jsonl`, under the member's prefix. */
|
|
63
|
+
export { RELEASE_GATE_OP };
|
|
64
|
+
/** The address and type a `chant` member's one entry has. */
|
|
65
|
+
export declare const RELEASE_COMPONENT_ENTRY_TYPE = "chant:component";
|
|
66
|
+
/** The name of every gate the compositions declare, nested phases included, sorted and distinct. */
|
|
67
|
+
export declare function gateNamesOf(components: readonly DriverComponent[]): string[];
|
|
68
|
+
/** What an environment runs of one component now: its latest deploy record, and the release that record names when it can be read. */
|
|
69
|
+
export interface CurrentDeploy {
|
|
70
|
+
record: ReleaseRecord;
|
|
71
|
+
release: Release | null;
|
|
72
|
+
}
|
|
73
|
+
export interface ReleaseChangeSetInput {
|
|
74
|
+
release: Release;
|
|
75
|
+
/** The environment promoted to. */
|
|
76
|
+
env: string;
|
|
77
|
+
/** The promoted compositions, with build steps taken out and templates pinned to the release. */
|
|
78
|
+
components: readonly DriverComponent[];
|
|
79
|
+
/** The artifact digest each component is promoted at. */
|
|
80
|
+
digests: ReadonlyMap<string, string>;
|
|
81
|
+
registry: CapabilityRegistry;
|
|
82
|
+
/** Per component, what `env` runs now. A component missing here has never been deployed to it. */
|
|
83
|
+
current: ReadonlyMap<string, CurrentDeploy>;
|
|
84
|
+
/**
|
|
85
|
+
* Components a promote, rollback or redeploy left failed or gated in `env`
|
|
86
|
+
* with nothing recorded since (#4035), each with why. What they run is not
|
|
87
|
+
* known, so each is a hole whatever its ledger record says.
|
|
88
|
+
*/
|
|
89
|
+
unsettled?: ReadonlyMap<string, string>;
|
|
90
|
+
/** Outputs supplied by the caller (`--seed-outputs`). */
|
|
91
|
+
seededOutputs?: Record<string, Record<string, unknown>>;
|
|
92
|
+
/** The chant version to record in the document. */
|
|
93
|
+
chant?: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A component no capability plans, as a `chant` member: what the release
|
|
97
|
+
* deploys compared with what the environment runs now. See the module doc.
|
|
98
|
+
*/
|
|
99
|
+
export declare function chantComponentPart(input: {
|
|
100
|
+
component: DriverComponent;
|
|
101
|
+
release: Release;
|
|
102
|
+
env: string;
|
|
103
|
+
digest: string;
|
|
104
|
+
current: CurrentDeploy | undefined;
|
|
105
|
+
/** Why the component is unsettled in `env` (#4035), when it is. */
|
|
106
|
+
unsettled?: string;
|
|
107
|
+
}): ChangeSetPart;
|
|
108
|
+
/**
|
|
109
|
+
* Plan the release's change set for `env`: one part per promoted component
|
|
110
|
+
* (or per member its planning capability names), composed into a document
|
|
111
|
+
* that names the release and the environment. Never throws for a component
|
|
112
|
+
* that fails to plan: it becomes a failed member.
|
|
113
|
+
*/
|
|
114
|
+
export declare function planReleaseChangeSet(input: ReleaseChangeSetInput): Promise<ChangeSetDocument>;
|
|
115
|
+
/** The members a release gate refuses: provisional ones, which no approval of the document covers (`change-set.mdx`). */
|
|
116
|
+
export declare function provisionalMembers(doc: ChangeSetDocument): string[];
|
|
117
|
+
/**
|
|
118
|
+
* The `verifyEmpty` a release gate decides with: the document stored under
|
|
119
|
+
* the digest, read back and checked against its digest by `read`, is the
|
|
120
|
+
* one planned for this release and environment, and it is empty.
|
|
121
|
+
*/
|
|
122
|
+
export declare function emptyVerifier(read: (digest: string) => Promise<StoredChangeSetRead>, planned: {
|
|
123
|
+
releaseDigest: string;
|
|
124
|
+
environment: string;
|
|
125
|
+
}): (digest: string) => Promise<boolean>;
|
|
126
|
+
/** The `empty: true` resolution a promote writes for one release gate over an empty change set. */
|
|
127
|
+
export declare function emptyResolution(input: {
|
|
128
|
+
gate: string;
|
|
129
|
+
doc: ChangeSetDocument;
|
|
130
|
+
actor: string;
|
|
131
|
+
timestamp: string;
|
|
132
|
+
gitSha?: string;
|
|
133
|
+
runId?: string;
|
|
134
|
+
}): GateResolutionInput;
|
|
135
|
+
//# sourceMappingURL=release-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-gate.d.ts","sourceRoot":"","sources":["../../src/components/release-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAA0D,KAAK,eAAe,EAAsD,MAAM,UAAU,CAAC;AAE5J,OAAO,EAAY,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,4GAA4G;AAC5G,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,6DAA6D;AAC7D,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAU9D,oGAAoG;AACpG,wBAAgB,WAAW,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,EAAE,CAU5E;AAED,sIAAsI;AACtI,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,iGAAiG;IACjG,UAAU,EAAE,SAAS,eAAe,EAAE,CAAC;IACvC,yDAAyD;IACzD,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,kGAAkG;IAClG,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC5C;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACxD,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA0BD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,SAAS,EAAE,eAAe,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IACnC,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,aAAa,CAsEhB;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA4DnG;AAED,yHAAyH;AACzH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,EACtD,OAAO,EAAE;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACtD,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAUtC;AAED,mGAAmG;AACnG,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,iBAAiB,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,mBAAmB,CAkBtB"}
|