@intentius/chant 0.124.31 → 0.124.33
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/bin/chant +7 -2
- package/dist/ci-jobs.d.ts +4 -0
- package/dist/ci-jobs.d.ts.map +1 -1
- package/dist/ci-jobs.js +9 -2
- package/dist/cli/commands/check-lexicon-plugin.d.ts +7 -4
- package/dist/cli/commands/check-lexicon-plugin.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon-plugin.js +10 -7
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon.js +18 -12
- package/dist/cli/commands/import.d.ts +10 -0
- package/dist/cli/commands/import.d.ts.map +1 -1
- package/dist/cli/commands/import.js +37 -0
- package/dist/cli/commands/init-lexicon/templates/project.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon/templates/project.js +4 -3
- package/dist/cli/commands/onboard.d.ts.map +1 -1
- package/dist/cli/commands/onboard.js +8 -4
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +2 -1
- package/dist/cli/dependencies.d.ts +18 -0
- package/dist/cli/dependencies.d.ts.map +1 -0
- package/dist/cli/dependencies.js +120 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +38 -4
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +12 -4
- package/dist/cli/handlers/graph.d.ts.map +1 -1
- package/dist/cli/handlers/graph.js +16 -6
- package/dist/cli/handlers/lifecycle-health.d.ts +16 -0
- package/dist/cli/handlers/lifecycle-health.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle-health.js +150 -0
- package/dist/cli/handlers/lifecycle.d.ts +26 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +1 -1
- package/dist/cli/handlers/lint.d.ts.map +1 -1
- package/dist/cli/handlers/lint.js +6 -0
- package/dist/cli/handlers/operator.d.ts +2 -2
- package/dist/cli/handlers/operator.js +3 -3
- package/dist/cli/handlers/pr.d.ts +16 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +610 -32
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +19 -2
- package/dist/cli/handlers/release.d.ts +16 -1
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +83 -11
- package/dist/cli/handlers/run.d.ts +13 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +38 -15
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +121 -33
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +37 -0
- package/dist/cli/registry.d.ts +29 -6
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cli/registry.js +6 -2
- package/dist/codegen/generate-post-synth-barrel.js +2 -2
- package/dist/codegen/lexicon-regen.d.ts +4 -0
- package/dist/codegen/lexicon-regen.d.ts.map +1 -1
- package/dist/codegen/lexicon-regen.js +1 -1
- package/dist/codegen/pinned-upgrade.js +2 -2
- package/dist/components/capability.d.ts +44 -3
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/capability.js +21 -0
- package/dist/components/changed-files.d.ts +7 -1
- package/dist/components/changed-files.d.ts.map +1 -1
- package/dist/components/changed-files.js +9 -1
- package/dist/components/deploy-inputs.d.ts +91 -0
- package/dist/components/deploy-inputs.d.ts.map +1 -0
- package/dist/components/deploy-inputs.js +184 -0
- package/dist/components/driver.d.ts +38 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +56 -6
- package/dist/components/fan-out-record.d.ts +6 -1
- package/dist/components/fan-out-record.d.ts.map +1 -1
- package/dist/components/fan-out-record.js +24 -0
- package/dist/components/fan-out-run.d.ts +20 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +21 -1
- package/dist/components/gate-plan.d.ts +8 -0
- package/dist/components/gate-plan.d.ts.map +1 -1
- package/dist/components/gate-plan.js +6 -0
- package/dist/components/pr-pipeline.d.ts +98 -12
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +146 -23
- package/dist/components/pr-run.d.ts +128 -30
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +290 -70
- package/dist/components/release-compile.d.ts +37 -2
- package/dist/components/release-compile.d.ts.map +1 -1
- package/dist/components/release-compile.js +64 -8
- package/dist/components/release-promote.d.ts +17 -3
- package/dist/components/release-promote.d.ts.map +1 -1
- package/dist/components/release-promote.js +79 -18
- package/dist/components/verbs/bom-writer.d.ts +1 -1
- package/dist/components/verbs/bom-writer.d.ts.map +1 -1
- package/dist/components/verbs/lockfile-sbom-generator.d.ts +20 -0
- package/dist/components/verbs/lockfile-sbom-generator.d.ts.map +1 -1
- package/dist/components/verbs/lockfile-sbom-generator.js +41 -4
- package/dist/components/wave-plan.d.ts +15 -2
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +44 -5
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/fold-import.js +16 -6
- package/dist/discovery/sandbox/bundle.d.ts.map +1 -1
- package/dist/discovery/sandbox/bundle.js +6 -0
- package/dist/discovery/specifier-resolve.d.ts.map +1 -1
- package/dist/discovery/specifier-resolve.js +8 -2
- package/dist/fold/fold.d.ts.map +1 -1
- package/dist/fold/fold.js +68 -1
- package/dist/fold/subset.d.ts +37 -0
- package/dist/fold/subset.d.ts.map +1 -1
- package/dist/fold/subset.js +88 -0
- package/dist/graph-detail.d.ts.map +1 -1
- package/dist/graph-detail.js +32 -7
- package/dist/health.d.ts +110 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +105 -0
- package/dist/health.schema.json +191 -0
- package/dist/lexicon-module.d.ts +10 -0
- package/dist/lexicon-module.d.ts.map +1 -1
- package/dist/lexicon-module.js +53 -8
- package/dist/lexicon-plugin-helpers.d.ts.map +1 -1
- package/dist/lexicon-plugin-helpers.js +6 -4
- package/dist/lexicon.d.ts +29 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/affected.d.ts.map +1 -1
- package/dist/lifecycle/affected.js +7 -1
- package/dist/lifecycle/merge-record.d.ts +104 -0
- package/dist/lifecycle/merge-record.d.ts.map +1 -0
- package/dist/lifecycle/merge-record.js +102 -0
- package/dist/lifecycle/publish-attachments.d.ts +8 -5
- package/dist/lifecycle/publish-attachments.d.ts.map +1 -1
- package/dist/lifecycle/publish-attachments.js +27 -13
- package/dist/lifecycle/publish-npm.d.ts +3 -2
- package/dist/lifecycle/publish-npm.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.js +4 -3
- package/dist/lifecycle/release-at.d.ts +40 -0
- package/dist/lifecycle/release-at.d.ts.map +1 -0
- package/dist/lifecycle/release-at.js +83 -0
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +23 -12
- package/dist/lifecycle/release-ledger.d.ts +21 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +24 -0
- package/dist/lifecycle/release-publish.d.ts +28 -12
- package/dist/lifecycle/release-publish.d.ts.map +1 -1
- package/dist/lifecycle/release-publish.js +29 -17
- package/dist/lifecycle/release-store.d.ts +25 -2
- package/dist/lifecycle/release-store.d.ts.map +1 -1
- package/dist/lifecycle/release-store.js +40 -13
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/lifecycle/run-ledger.js +1 -0
- package/dist/lifecycle/work-dir.d.ts +45 -0
- package/dist/lifecycle/work-dir.d.ts.map +1 -0
- package/dist/lifecycle/work-dir.js +78 -0
- package/dist/lint/discover.d.ts +17 -9
- package/dist/lint/discover.d.ts.map +1 -1
- package/dist/lint/discover.js +62 -54
- package/dist/lint/rules/op/index.d.ts +2 -1
- package/dist/lint/rules/op/index.d.ts.map +1 -1
- package/dist/lint/rules/op/index.js +4 -2
- package/dist/lint/rules/op/ops018-shell-image-digest.d.ts +10 -0
- package/dist/lint/rules/op/ops018-shell-image-digest.d.ts.map +1 -0
- package/dist/lint/rules/op/ops018-shell-image-digest.js +38 -0
- package/dist/module-source.d.ts +57 -0
- package/dist/module-source.d.ts.map +1 -0
- package/dist/module-source.js +104 -0
- package/dist/op/activities/activity-contracts.d.ts +5 -0
- package/dist/op/activities/activity-contracts.d.ts.map +1 -1
- package/dist/op/activities/activity-contracts.js +3 -0
- package/dist/op/activities/factory.js +1 -1
- package/dist/op/activities/shell.d.ts +38 -0
- package/dist/op/activities/shell.d.ts.map +1 -1
- package/dist/op/activities/shell.js +89 -3
- package/dist/op/builders.d.ts +7 -0
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/builders.js +7 -0
- package/dist/op/discover.d.ts.map +1 -1
- package/dist/op/discover.js +13 -3
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +3 -0
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +20 -5
- package/dist/op/operator.d.ts +2 -2
- package/dist/op/operator.js +2 -2
- package/dist/op/runtime.d.ts +2 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/steward.d.ts +6 -4
- package/dist/op/steward.d.ts.map +1 -1
- package/dist/op/steward.js +5 -3
- package/dist/op/work-lease-run.d.ts +20 -7
- package/dist/op/work-lease-run.d.ts.map +1 -1
- package/dist/op/work-lease-run.js +56 -12
- package/dist/pr-forge.d.ts +10 -0
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +39 -0
- package/dist/pr-loop.d.ts +155 -7
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +137 -11
- package/dist/pr-report-url.d.ts +4 -4
- package/dist/pr-report-url.d.ts.map +1 -1
- package/dist/pr-report-url.js +5 -5
- package/dist/runner-start.d.ts +179 -0
- package/dist/runner-start.d.ts.map +1 -0
- package/dist/runner-start.js +277 -0
- package/dist/ts-loader.d.ts +38 -4
- package/dist/ts-loader.d.ts.map +1 -1
- package/dist/ts-loader.js +190 -16
- package/dist/wave-runtime.mjs +238 -231
- package/dist/workspace/chant-migrations/fountain-retired-kinds.d.ts +34 -0
- package/dist/workspace/chant-migrations/fountain-retired-kinds.d.ts.map +1 -0
- package/dist/workspace/chant-migrations/fountain-retired-kinds.js +176 -0
- package/dist/workspace/chant-migrations.d.ts.map +1 -1
- package/dist/workspace/chant-migrations.js +2 -0
- package/dist/workspace/check.schema.json +70 -2
- package/dist/workspace/checks/boxes.d.ts +6 -6
- package/dist/workspace/checks/boxes.js +9 -9
- package/dist/workspace/checks/security.d.ts +35 -0
- package/dist/workspace/checks/security.d.ts.map +1 -0
- package/dist/workspace/checks/security.js +305 -0
- package/dist/workspace/checks.d.ts +2 -0
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/checks.js +5 -0
- package/dist/workspace/ci-builds.d.ts +163 -0
- package/dist/workspace/ci-builds.d.ts.map +1 -0
- package/dist/workspace/ci-builds.js +315 -0
- package/dist/workspace/ci-green-cli.d.ts +2 -1
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +25 -5
- package/dist/workspace/ci-green-forge.d.ts +18 -4
- package/dist/workspace/ci-green-forge.d.ts.map +1 -1
- package/dist/workspace/ci-green-forge.js +12 -0
- package/dist/workspace/ci-green-workflow.d.ts +55 -1
- package/dist/workspace/ci-green-workflow.d.ts.map +1 -1
- package/dist/workspace/ci-green-workflow.js +128 -1
- package/dist/workspace/ci-green.d.ts +117 -16
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +358 -43
- package/dist/workspace/ci-last-green.schema.json +49 -0
- package/dist/workspace/ci-list.schema.json +47 -7
- package/dist/workspace/ci-report-url.d.ts +18 -0
- package/dist/workspace/ci-report-url.d.ts.map +1 -0
- package/dist/workspace/ci-report-url.js +33 -0
- package/dist/workspace/ci-run-index.d.ts +13 -1
- package/dist/workspace/ci-run-index.d.ts.map +1 -1
- package/dist/workspace/ci-run-index.js +6 -4
- package/dist/workspace/ci-run-index.schema.json +6 -4
- package/dist/workspace/ci-run.d.ts +85 -6
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +262 -64
- package/dist/workspace/ci-runner-key.d.ts +16 -3
- package/dist/workspace/ci-runner-key.d.ts.map +1 -1
- package/dist/workspace/ci-runner-key.js +30 -10
- package/dist/workspace/ci-runner-start.d.ts +77 -0
- package/dist/workspace/ci-runner-start.d.ts.map +1 -0
- package/dist/workspace/ci-runner-start.js +185 -0
- package/dist/workspace/ci-serve.d.ts +130 -11
- package/dist/workspace/ci-serve.d.ts.map +1 -1
- package/dist/workspace/ci-serve.js +323 -40
- package/dist/workspace/declaration.d.ts +25 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +14 -2
- package/dist/workspace/declaration.schema.json +30 -2
- package/dist/workspace/export.d.ts +1 -1
- package/dist/workspace/export.d.ts.map +1 -1
- package/dist/workspace/export.js +7 -3
- package/dist/workspace/ls.d.ts +8 -1
- package/dist/workspace/ls.d.ts.map +1 -1
- package/dist/workspace/ls.js +2 -1
- package/dist/workspace/ls.schema.json +9 -2
- package/dist/workspace/member-pipeline.d.ts +1 -0
- package/dist/workspace/member-pipeline.d.ts.map +1 -1
- package/dist/workspace/member-pipeline.js +2 -0
- package/dist/workspace/merge-record.schema.json +49 -0
- package/dist/workspace/pin-integrity.d.ts.map +1 -1
- package/dist/workspace/pin-integrity.js +3 -2
- package/dist/workspace/pr-report.schema.json +75 -8
- package/dist/workspace/reason-codes.d.ts +18 -1
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +20 -2
- package/dist/workspace/release-candidates.d.ts +129 -0
- package/dist/workspace/release-candidates.d.ts.map +1 -0
- package/dist/workspace/release-candidates.js +233 -0
- package/dist/workspace/release-candidates.schema.json +353 -0
- package/dist/workspace/run-event.schema.json +3 -1
- package/dist/workspace/security.d.ts +40 -0
- package/dist/workspace/security.d.ts.map +1 -0
- package/dist/workspace/security.js +99 -0
- package/dist/workspace/status.schema.json +3 -1
- package/dist/workspace/write-scope.d.ts +9 -0
- package/dist/workspace/write-scope.d.ts.map +1 -1
- package/dist/workspace/write-scope.js +11 -1
- package/package.json +8 -1
- package/src/__fixtures__/pr-loop/pr-apply-wave-waiting.note.golden.md +48 -0
- package/src/__fixtures__/pr-loop/pr-plan.note.golden.md +1 -1
- package/src/ci-jobs.ts +11 -2
- package/src/cli/commands/__fixtures__/init-lexicon-output/package.json +3 -3
- package/src/cli/commands/audit.test.ts +2 -2
- package/src/cli/commands/check-lexicon-plugin.test.ts +9 -0
- package/src/cli/commands/check-lexicon-plugin.ts +11 -8
- package/src/cli/commands/check-lexicon.test.ts +1 -1
- package/src/cli/commands/check-lexicon.ts +16 -11
- package/src/cli/commands/import.ts +40 -0
- package/src/cli/commands/init-lexicon/templates/project.ts +4 -3
- package/src/cli/commands/init-lexicon.test.ts +8 -5
- package/src/cli/commands/onboard.test.ts +45 -0
- package/src/cli/commands/onboard.ts +8 -4
- package/src/cli/commands/update.test.ts +6 -0
- package/src/cli/commands/update.ts +4 -1
- package/src/cli/compiled-cli.e2e.test.ts +76 -11
- package/src/cli/dependencies.e2e.test.ts +101 -0
- package/src/cli/dependencies.test.ts +93 -0
- package/src/cli/dependencies.ts +122 -0
- package/src/cli/handlers/build.test.ts +105 -0
- package/src/cli/handlers/build.ts +35 -4
- package/src/cli/handlers/fan-out.test.ts +73 -0
- package/src/cli/handlers/fan-out.ts +11 -4
- package/src/cli/handlers/graph.test.ts +76 -0
- package/src/cli/handlers/graph.ts +19 -12
- package/src/cli/handlers/lifecycle-health.test.ts +123 -0
- package/src/cli/handlers/lifecycle-health.ts +157 -0
- package/src/cli/handlers/lifecycle.ts +1 -1
- package/src/cli/handlers/lint.test.ts +42 -0
- package/src/cli/handlers/lint.ts +6 -0
- package/src/cli/handlers/operator.ts +3 -3
- package/src/cli/handlers/pr-deploy-inputs.test.ts +209 -0
- package/src/cli/handlers/pr-record.test.ts +201 -0
- package/src/cli/handlers/pr-waves.test.ts +449 -0
- package/src/cli/handlers/pr.test.ts +156 -0
- package/src/cli/handlers/pr.ts +648 -33
- package/src/cli/handlers/promote.test.ts +43 -1
- package/src/cli/handlers/promote.ts +19 -3
- package/src/cli/handlers/release-cut-at.e2e.test.ts +115 -0
- package/src/cli/handlers/release-publish-targets.e2e.test.ts +2 -2
- package/src/cli/handlers/release-verify.e2e.test.ts +12 -10
- package/src/cli/handlers/release.e2e.test.ts +19 -28
- package/src/cli/handlers/release.ts +81 -11
- package/src/cli/handlers/run-components-exit.test.ts +99 -0
- package/src/cli/handlers/run-signer.test.ts +79 -0
- package/src/cli/handlers/run.ts +34 -16
- package/src/cli/main.test.ts +18 -0
- package/src/cli/main.ts +120 -33
- package/src/cli/parse-args.ts +28 -0
- package/src/cli/registry.ts +35 -8
- package/src/codegen/generate-post-synth-barrel.ts +2 -2
- package/src/codegen/lexicon-regen.ts +1 -1
- package/src/codegen/pinned-upgrade.ts +2 -2
- package/src/codegen/post-synth-barrel-guards.test.ts +6 -11
- package/src/components/capability.ts +51 -3
- package/src/components/changed-files.test.ts +16 -1
- package/src/components/changed-files.ts +9 -1
- package/src/components/deploy-inputs.test.ts +108 -0
- package/src/components/deploy-inputs.ts +225 -0
- package/src/components/driver.test.ts +36 -1
- package/src/components/driver.ts +87 -4
- package/src/components/fan-out-record.ts +29 -1
- package/src/components/fan-out-run.test.ts +35 -0
- package/src/components/fan-out-run.ts +40 -1
- package/src/components/gate-plan.ts +9 -0
- package/src/components/pr-pipeline.test.ts +100 -0
- package/src/components/pr-pipeline.ts +184 -28
- package/src/components/pr-run.test.ts +323 -18
- package/src/components/pr-run.ts +355 -76
- package/src/components/release-compile.test.ts +34 -0
- package/src/components/release-compile.ts +89 -8
- package/src/components/release-promote.test.ts +55 -2
- package/src/components/release-promote.ts +93 -23
- package/src/components/verbs/bom-writer.ts +1 -1
- package/src/components/verbs/lockfile-sbom-generator.test.ts +36 -0
- package/src/components/verbs/lockfile-sbom-generator.ts +43 -5
- package/src/components/wave-plan.ts +48 -8
- package/src/discovery/fold-host-method.test.ts +87 -0
- package/src/discovery/fold-import.ts +15 -5
- package/src/discovery/fold-package-composite.test.ts +27 -0
- package/src/discovery/fold-specifiers.test.ts +8 -0
- package/src/discovery/sandbox/bundle.ts +6 -0
- package/src/discovery/specifier-resolve.ts +8 -2
- package/src/fold/fold.test.ts +72 -0
- package/src/fold/fold.ts +71 -0
- package/src/fold/subset.test.ts +31 -0
- package/src/fold/subset.ts +99 -0
- package/src/graph-detail.test.ts +57 -0
- package/src/graph-detail.ts +33 -7
- package/src/health.schema.json +191 -0
- package/src/health.test.ts +62 -0
- package/src/health.ts +178 -0
- package/src/lexicon-dist.e2e.test.ts +254 -0
- package/src/lexicon-module.test.ts +47 -0
- package/src/lexicon-module.ts +49 -7
- package/src/lexicon-plugin-helpers.ts +6 -4
- package/src/lexicon.ts +43 -1
- package/src/lifecycle/affected.test.ts +7 -0
- package/src/lifecycle/affected.ts +6 -1
- package/src/lifecycle/merge-record.test.ts +111 -0
- package/src/lifecycle/merge-record.ts +154 -0
- package/src/lifecycle/publish-attachments.ts +25 -13
- package/src/lifecycle/publish-npm.ts +4 -3
- package/src/lifecycle/publish-targets.test.ts +34 -4
- package/src/lifecycle/release-at.test.ts +48 -0
- package/src/lifecycle/release-at.ts +100 -0
- package/src/lifecycle/release-cut.test.ts +41 -0
- package/src/lifecycle/release-cut.ts +22 -11
- package/src/lifecycle/release-ledger.ts +34 -0
- package/src/lifecycle/release-publish.test.ts +43 -13
- package/src/lifecycle/release-publish.ts +38 -18
- package/src/lifecycle/release-store.ts +57 -13
- package/src/lifecycle/run-ledger.test.ts +13 -0
- package/src/lifecycle/run-ledger.ts +1 -0
- package/src/lifecycle/work-dir.test.ts +77 -0
- package/src/lifecycle/work-dir.ts +82 -0
- package/src/lint/discover.test.ts +46 -2
- package/src/lint/discover.ts +55 -49
- package/src/lint/rules/op/index.ts +4 -2
- package/src/lint/rules/op/ops018-shell-image-digest.test.ts +60 -0
- package/src/lint/rules/op/ops018-shell-image-digest.ts +48 -0
- package/src/module-source.test.ts +85 -0
- package/src/module-source.ts +112 -0
- package/src/op/activities/activity-contracts.ts +3 -0
- package/src/op/activities/factory.ts +1 -1
- package/src/op/activities/shell-container.e2e.test.ts +67 -0
- package/src/op/activities/shell.test.ts +44 -1
- package/src/op/activities/shell.ts +110 -3
- package/src/op/builders.ts +7 -0
- package/src/op/discover-root.test.ts +31 -2
- package/src/op/discover.ts +14 -4
- package/src/op/gate.test.ts +30 -0
- package/src/op/gate.ts +3 -0
- package/src/op/op-waves-run.ts +20 -5
- package/src/op/op-waves.test.ts +49 -0
- package/src/op/operator.ts +2 -2
- package/src/op/runtime.ts +2 -0
- package/src/op/step-console.test.ts +4 -2
- package/src/op/steward.ts +6 -4
- package/src/op/work-lease-run.test.ts +88 -2
- package/src/op/work-lease-run.ts +52 -12
- package/src/pr-forge-bundle.test.ts +2 -2
- package/src/pr-forge.test.ts +42 -0
- package/src/pr-forge.ts +40 -0
- package/src/pr-loop-bundle.test.ts +2 -1
- package/src/pr-loop.test.ts +146 -1
- package/src/pr-loop.ts +278 -17
- package/src/pr-report-url.ts +7 -7
- package/src/runner-start-bundle.test.ts +29 -0
- package/src/runner-start.test.ts +179 -0
- package/src/runner-start.ts +329 -0
- package/src/terraform/__fixtures__/advise.test.ts +21 -2
- package/src/ts-loader.test.ts +89 -1
- package/src/ts-loader.ts +180 -13
- package/src/workspace/changes.test.ts +1 -1
- package/src/workspace/chant-migrations/fountain-retired-kinds.test.ts +33 -0
- package/src/workspace/chant-migrations/fountain-retired-kinds.ts +190 -0
- package/src/workspace/chant-migrations.e2e.test.ts +5 -0
- package/src/workspace/chant-migrations.ts +2 -0
- package/src/workspace/check-contract.test.ts +3 -2
- package/src/workspace/check.schema.json +70 -2
- package/src/workspace/checks/boxes.ts +9 -9
- package/src/workspace/checks/security.test.ts +138 -0
- package/src/workspace/checks/security.ts +305 -0
- package/src/workspace/checks.ts +5 -0
- package/src/workspace/ci-builds.e2e.test.ts +208 -0
- package/src/workspace/ci-builds.test.ts +174 -0
- package/src/workspace/ci-builds.ts +385 -0
- package/src/workspace/ci-green-builds.test.ts +180 -0
- package/src/workspace/ci-green-cli.test.ts +54 -0
- package/src/workspace/ci-green-cli.ts +26 -5
- package/src/workspace/ci-green-forge.ts +30 -4
- package/src/workspace/ci-green-runs.test.ts +53 -11
- package/src/workspace/ci-green-workflow.test.ts +84 -1
- package/src/workspace/ci-green-workflow.ts +139 -2
- package/src/workspace/ci-green.test.ts +6 -3
- package/src/workspace/ci-green.ts +408 -48
- package/src/workspace/ci-last-green.schema.json +49 -0
- package/src/workspace/ci-list.schema.json +47 -7
- package/src/workspace/ci-report-url.test.ts +220 -0
- package/src/workspace/ci-report-url.ts +33 -0
- package/src/workspace/ci-run-index.schema.json +6 -4
- package/src/workspace/ci-run-index.test.ts +42 -3
- package/src/workspace/ci-run-index.ts +19 -5
- package/src/workspace/ci-run.test.ts +203 -8
- package/src/workspace/ci-run.ts +295 -63
- package/src/workspace/ci-runner-key.test.ts +55 -17
- package/src/workspace/ci-runner-key.ts +36 -11
- package/src/workspace/ci-runner-start.test.ts +151 -0
- package/src/workspace/ci-runner-start.ts +193 -0
- package/src/workspace/ci-serve-builds.test.ts +86 -0
- package/src/workspace/ci-serve.test.ts +209 -6
- package/src/workspace/ci-serve.ts +341 -42
- package/src/workspace/declaration.schema.json +30 -2
- package/src/workspace/declaration.test.ts +40 -0
- package/src/workspace/declaration.ts +40 -3
- package/src/workspace/export.ts +6 -3
- package/src/workspace/ls.schema.json +9 -2
- package/src/workspace/ls.ts +10 -4
- package/src/workspace/member-pipeline.ts +2 -1
- package/src/workspace/merge-record.schema.json +49 -0
- package/src/workspace/pin-integrity.test.ts +5 -0
- package/src/workspace/pin-integrity.ts +3 -2
- package/src/workspace/pr-report.schema.json +75 -8
- package/src/workspace/reason-codes.test.ts +2 -0
- package/src/workspace/reason-codes.ts +20 -2
- package/src/workspace/release-candidates.schema.json +353 -0
- package/src/workspace/release-candidates.test.ts +106 -0
- package/src/workspace/release-candidates.ts +315 -0
- package/src/workspace/run-event.schema.json +3 -1
- package/src/workspace/security.test.ts +70 -0
- package/src/workspace/security.ts +118 -0
- package/src/workspace/status.schema.json +3 -1
- package/src/workspace/write-scope.test.ts +29 -1
- package/src/workspace/write-scope.ts +12 -1
|
@@ -41,7 +41,9 @@ export interface DeployContext {
|
|
|
41
41
|
* (#3049), keyed by {@link CapabilityPlan.member}. Set by a gated-wave
|
|
42
42
|
* fan-out and by a pull request's apply (#3183). A capability whose `run`
|
|
43
43
|
* finds its own member here applies that plan, the one the approver
|
|
44
|
-
* approved, instead of planning again.
|
|
44
|
+
* approved, instead of planning again. A `run` that finds the target moved
|
|
45
|
+
* since that plan refuses with an error {@link isPlanMovedError} accepts
|
|
46
|
+
* (#3997), and the command that applied it exits 3, as for a moved digest.
|
|
45
47
|
*/
|
|
46
48
|
plans?: Record<string, unknown>;
|
|
47
49
|
/**
|
|
@@ -87,6 +89,26 @@ export interface CapabilityPlan {
|
|
|
87
89
|
* still counts toward the digest, with no entries.
|
|
88
90
|
*/
|
|
89
91
|
changeSet?: ChangeSetPart;
|
|
92
|
+
/**
|
|
93
|
+
* The outputs `run` will expose once it applies this plan (#3999), as far
|
|
94
|
+
* as the plan can tell. A pull request's plan reads a dependent's
|
|
95
|
+
* `stackOutput()` references into this member from here when both are in
|
|
96
|
+
* the change, instead of from the outputs standing now. Absent when the
|
|
97
|
+
* plan cannot say: every output of the step is then known only after it
|
|
98
|
+
* applies.
|
|
99
|
+
*/
|
|
100
|
+
outputs?: PlannedOutputs;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* What a plan says about the outputs its apply will leave (#3999). An
|
|
104
|
+
* output named in neither field is known only after apply, the same as one
|
|
105
|
+
* in `unknown`.
|
|
106
|
+
*/
|
|
107
|
+
export interface PlannedOutputs {
|
|
108
|
+
/** Each output whose value the plan knows, by name: what `run` will expose. */
|
|
109
|
+
known: Record<string, unknown>;
|
|
110
|
+
/** Outputs the plan names whose value is known only after apply, sorted. */
|
|
111
|
+
unknown: string[];
|
|
90
112
|
}
|
|
91
113
|
/**
|
|
92
114
|
* A typed leaf behavior. `kind` is the verb string components reference in
|
|
@@ -132,8 +154,11 @@ export interface Capability<In = unknown, Out = unknown> {
|
|
|
132
154
|
/**
|
|
133
155
|
* Optional: the outputs `run` exposed when it last ran, read without
|
|
134
156
|
* changing anything (#3183). A pull request's plan reads them for each
|
|
135
|
-
* component a planned one depends on
|
|
136
|
-
*
|
|
157
|
+
* component a planned one depends on that the change does not plan
|
|
158
|
+
* (#4104), so a `stackOutput()` wiring resolves to the value standing now.
|
|
159
|
+
* A dependency the change plans is read from its plan's
|
|
160
|
+
* {@link CapabilityPlan.outputs} instead (#3999). The shape is `run`'s
|
|
161
|
+
* `outputs` field.
|
|
137
162
|
*/
|
|
138
163
|
outputs?(ctx: DeployContext, input: In): Promise<Record<string, unknown>>;
|
|
139
164
|
/**
|
|
@@ -153,6 +178,22 @@ export type RollbackPolicy = "native" | "none-by-design" | "needs-opt-out";
|
|
|
153
178
|
export type CapabilityInput<C> = C extends Capability<infer In, unknown> ? In : never;
|
|
154
179
|
/** Extract a capability's `Out` type. */
|
|
155
180
|
export type CapabilityOutput<C> = C extends Capability<unknown, infer Out> ? Out : never;
|
|
181
|
+
/**
|
|
182
|
+
* The exit code of a command whose capability step refused a plan that moved
|
|
183
|
+
* since it was approved: 3, the code `pr-apply` gives a moved digest and a
|
|
184
|
+
* run gives a gate (#3997).
|
|
185
|
+
*/
|
|
186
|
+
export declare const PLAN_MOVED_EXIT_CODE = 3;
|
|
187
|
+
/**
|
|
188
|
+
* Whether `err` is a `run`'s refusal to apply a plan from
|
|
189
|
+
* `DeployContext.plans` because the target moved since it was planned
|
|
190
|
+
* (#3997). The mark is a `planMoved: true` property, not a class, so a
|
|
191
|
+
* lexicon built against an older core can set it. An `exitCode` of
|
|
192
|
+
* {@link PLAN_MOVED_EXIT_CODE} on the error is the same mark. Any other
|
|
193
|
+
* `exitCode` is ignored: a failed step exits 1, so a capability can't pick
|
|
194
|
+
* the process's exit code.
|
|
195
|
+
*/
|
|
196
|
+
export declare function isPlanMovedError(err: unknown): boolean;
|
|
156
197
|
/**
|
|
157
198
|
* Thrown by a stub `run`/`rollback` — the verb is specified and typed but has
|
|
158
199
|
* no cloud implementation yet. Distinguishes "not implemented" from a runtime
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../src/components/capability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,GAAG,EAAE,MAAM,CAAC;IACZ,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,qGAAqG;IACrG,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../src/components/capability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,GAAG,EAAE,MAAM,CAAC;IACZ,mEAAmE;IACnE,SAAS,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AAQ,CAAC,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,IAAI,CAMvD;IAED,6FAA6F;IAC7F,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAOhD;IAED,qDAAqD;IACrD,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEzB;IAED,oCAAoC;IACpC,KAAK,IAAI,MAAM,EAAE,CAEhB;CACF"}
|
|
@@ -11,6 +11,27 @@
|
|
|
11
11
|
* live under `./verbs/*` as typed stubs — no cloud calls, no side effects.
|
|
12
12
|
* Cloud implementations are a later phase (see epic #551, issue #554).
|
|
13
13
|
*/
|
|
14
|
+
/**
|
|
15
|
+
* The exit code of a command whose capability step refused a plan that moved
|
|
16
|
+
* since it was approved: 3, the code `pr-apply` gives a moved digest and a
|
|
17
|
+
* run gives a gate (#3997).
|
|
18
|
+
*/
|
|
19
|
+
export const PLAN_MOVED_EXIT_CODE = 3;
|
|
20
|
+
/**
|
|
21
|
+
* Whether `err` is a `run`'s refusal to apply a plan from
|
|
22
|
+
* `DeployContext.plans` because the target moved since it was planned
|
|
23
|
+
* (#3997). The mark is a `planMoved: true` property, not a class, so a
|
|
24
|
+
* lexicon built against an older core can set it. An `exitCode` of
|
|
25
|
+
* {@link PLAN_MOVED_EXIT_CODE} on the error is the same mark. Any other
|
|
26
|
+
* `exitCode` is ignored: a failed step exits 1, so a capability can't pick
|
|
27
|
+
* the process's exit code.
|
|
28
|
+
*/
|
|
29
|
+
export function isPlanMovedError(err) {
|
|
30
|
+
if (typeof err !== "object" || err === null)
|
|
31
|
+
return false;
|
|
32
|
+
const e = err;
|
|
33
|
+
return e.planMoved === true || e.exitCode === PLAN_MOVED_EXIT_CODE;
|
|
34
|
+
}
|
|
14
35
|
/**
|
|
15
36
|
* Thrown by a stub `run`/`rollback` — the verb is specified and typed but has
|
|
16
37
|
* no cloud implementation yet. Distinguishes "not implemented" from a runtime
|
|
@@ -8,11 +8,17 @@
|
|
|
8
8
|
* changed paths instead (`LexiconPlugin.changedUnits`).
|
|
9
9
|
*/
|
|
10
10
|
import type { LexiconPlugin } from "../lexicon.js";
|
|
11
|
+
/**
|
|
12
|
+
* Git's empty tree. A root commit has no parent, so a push of one is measured
|
|
13
|
+
* from this (#4004): every file it holds counts as changed.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EMPTY_TREE_SHA = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
11
16
|
/**
|
|
12
17
|
* The commit a change is measured from: the merge base of `base` and `head`.
|
|
13
18
|
* A pull request's head that branched before `base` moved is measured from
|
|
14
19
|
* where it branched, so the other changes on `base` are not counted as its
|
|
15
|
-
* own; a merge commit's first parent is its own merge base.
|
|
20
|
+
* own; a merge commit's first parent is its own merge base. The empty tree
|
|
21
|
+
* has no merge base with anything and is returned as it is.
|
|
16
22
|
*/
|
|
17
23
|
export declare function resolveMergeBase(cwd: string, base: string, head?: string): Promise<string>;
|
|
18
24
|
/** The full commit `ref` names. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changed-files.d.ts","sourceRoot":"","sources":["../../src/components/changed-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAShD
|
|
1
|
+
{"version":3,"file":"changed-files.d.ts","sourceRoot":"","sources":["../../src/components/changed-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAShD;;;GAGG;AACH,eAAO,MAAM,cAAc,6CAA6C,CAAC;AAEzE;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAWhG;AAED,mCAAmC;AACnC,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE7E;AAED;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAWrG;AAED,iEAAiE;AACjE,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,SAAS,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,EAAE,EACvD,GAAG,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,GACpF,OAAO,CAAC,MAAM,EAAE,CAAC,CAQnB"}
|
|
@@ -15,13 +15,21 @@ async function git(cwd, args) {
|
|
|
15
15
|
const { stdout } = await execFileAsync("git", args, { cwd, maxBuffer: 64 * 1024 * 1024 });
|
|
16
16
|
return stdout;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Git's empty tree. A root commit has no parent, so a push of one is measured
|
|
20
|
+
* from this (#4004): every file it holds counts as changed.
|
|
21
|
+
*/
|
|
22
|
+
export const EMPTY_TREE_SHA = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
18
23
|
/**
|
|
19
24
|
* The commit a change is measured from: the merge base of `base` and `head`.
|
|
20
25
|
* A pull request's head that branched before `base` moved is measured from
|
|
21
26
|
* where it branched, so the other changes on `base` are not counted as its
|
|
22
|
-
* own; a merge commit's first parent is its own merge base.
|
|
27
|
+
* own; a merge commit's first parent is its own merge base. The empty tree
|
|
28
|
+
* has no merge base with anything and is returned as it is.
|
|
23
29
|
*/
|
|
24
30
|
export async function resolveMergeBase(cwd, base, head = "HEAD") {
|
|
31
|
+
if (base === EMPTY_TREE_SHA)
|
|
32
|
+
return base;
|
|
25
33
|
try {
|
|
26
34
|
return (await git(cwd, ["merge-base", base, head])).trim();
|
|
27
35
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The local files a component's steps deploy from, and their content digests
|
|
3
|
+
* (#4155).
|
|
4
|
+
*
|
|
5
|
+
* A component gate approves `componentPlanDigest` (./gate-plan.ts). A step
|
|
6
|
+
* whose capability has a `plan` is bound by what it plans. Every other step
|
|
7
|
+
* was bound only by its input as written, so a Helm chart, a kustomize
|
|
8
|
+
* directory or a static site's tree could change after review without moving
|
|
9
|
+
* the digest. This module names those files and hashes them, so the digest
|
|
10
|
+
* moves when they do.
|
|
11
|
+
*
|
|
12
|
+
* Which fields name a path is data, as the template fields are in
|
|
13
|
+
* ./release-compile.ts and the unit fields in ./deploy-units.ts: a kind's
|
|
14
|
+
* fields in {@link DEPLOY_INPUT_FIELDS}, plus `template`, `manifest` and
|
|
15
|
+
* `values` on any step ({@link TEMPLATE_FIELDS}). Only a literal path counts:
|
|
16
|
+
* a value wired from another step (`@Build.uri`) or an `archive:` path is a
|
|
17
|
+
* build output, and binding it would make an approval unusable by a build
|
|
18
|
+
* that is not reproducible. The build steps' own sources are bound instead.
|
|
19
|
+
*
|
|
20
|
+
* - A file is hashed by its bytes.
|
|
21
|
+
* - A directory is hashed over the files under it that git does not ignore
|
|
22
|
+
* (`git ls-files --cached --others --exclude-standard`), each by its path
|
|
23
|
+
* and bytes, so `node_modules` and a build's `dist` inside a Docker context
|
|
24
|
+
* are left out. Outside a git repository every file is hashed except under
|
|
25
|
+
* `.git` and `node_modules`.
|
|
26
|
+
* - A directory git ignores as a whole is a build output. It is not hashed;
|
|
27
|
+
* the step is listed as unbound, with that reason.
|
|
28
|
+
* - A path that does not exist is left out. One that appears later moves the
|
|
29
|
+
* digest.
|
|
30
|
+
*
|
|
31
|
+
* A step whose kind runs content chant can't name, such as `shell`, is listed
|
|
32
|
+
* as unbound ({@link UNBOUND_KINDS}), so the plan note can show a reviewer
|
|
33
|
+
* what the approval does not cover.
|
|
34
|
+
*/
|
|
35
|
+
import type { DriverPhase, DriverStep } from "./driver.js";
|
|
36
|
+
/** The fields that name every step's deployed file, whatever its kind (as ./release-compile.ts reads them). */
|
|
37
|
+
export declare const TEMPLATE_FIELDS: readonly string[];
|
|
38
|
+
/** Per kind, the fields beyond {@link TEMPLATE_FIELDS} that name a local file or directory the step deploys or builds from. */
|
|
39
|
+
export declare const DEPLOY_INPUT_FIELDS: Readonly<Record<string, readonly string[]>>;
|
|
40
|
+
/** Kinds that deploy content chant can't name from their input: a command, an agent's work. */
|
|
41
|
+
export declare const UNBOUND_KINDS: readonly string[];
|
|
42
|
+
/** One path a step names. */
|
|
43
|
+
export interface DeployInputRef {
|
|
44
|
+
phase: string;
|
|
45
|
+
kind: string;
|
|
46
|
+
field: string;
|
|
47
|
+
/** Relative to the member's directory, as written. */
|
|
48
|
+
path: string;
|
|
49
|
+
}
|
|
50
|
+
/** A named path and the digest of what is there. */
|
|
51
|
+
export interface DeployInputDigest {
|
|
52
|
+
path: string;
|
|
53
|
+
/** `sha256:<hex>` of a file's bytes, or a plan digest over a directory's files. */
|
|
54
|
+
digest: string;
|
|
55
|
+
}
|
|
56
|
+
/** A step the digest does not cover, and why. */
|
|
57
|
+
export interface UnboundStep {
|
|
58
|
+
phase: string;
|
|
59
|
+
kind: string;
|
|
60
|
+
reason: string;
|
|
61
|
+
}
|
|
62
|
+
/** What a component's steps deploy from: the digests, and the steps they can't cover. */
|
|
63
|
+
export interface ComponentDeployInputs {
|
|
64
|
+
inputs: DeployInputDigest[];
|
|
65
|
+
unbound: UnboundStep[];
|
|
66
|
+
}
|
|
67
|
+
/** Every capability step of a composition with its phase, nested phases included, gates left out. */
|
|
68
|
+
export declare function stepsWithPhase(phases: readonly DriverPhase[]): Array<{
|
|
69
|
+
phase: string;
|
|
70
|
+
step: DriverStep;
|
|
71
|
+
}>;
|
|
72
|
+
/** The literal paths one step names, in field order. A Docker build's Dockerfile is named under its context. */
|
|
73
|
+
export declare function stepInputRefs(phase: string, step: DriverStep): DeployInputRef[];
|
|
74
|
+
/** The files under `dir` (relative to `root`) a directory digest covers, relative to `root`, sorted. */
|
|
75
|
+
export declare function directoryFiles(root: string, dir: string): string[];
|
|
76
|
+
/** Every file under `dir`, relative to `root`, sorted, leaving out `.git` and `node_modules`. What a cut records of a directory git ignores. */
|
|
77
|
+
export declare function walkFiles(root: string, dir: string): string[];
|
|
78
|
+
/** Whether git ignores `path` (relative to `root`). False outside a git repository. */
|
|
79
|
+
export declare function ignoredByGit(root: string, path: string): boolean;
|
|
80
|
+
/** `sha256:<hex>` of a file's bytes. */
|
|
81
|
+
export declare function fileDigest(file: string): string;
|
|
82
|
+
/** The digest of the files under `dir`: a plan digest over each file's path (from `dir`) and bytes. */
|
|
83
|
+
export declare function directoryDigest(root: string, dir: string): string;
|
|
84
|
+
/**
|
|
85
|
+
* What a component's steps deploy from, read under `root` (the member's
|
|
86
|
+
* directory). `include` picks the steps to read, all of them by default; the
|
|
87
|
+
* wave planner passes the steps without a `plan`, which their plan does not
|
|
88
|
+
* already cover.
|
|
89
|
+
*/
|
|
90
|
+
export declare function componentDeployInputs(phases: readonly DriverPhase[], root: string, include?: (step: DriverStep) => boolean): ComponentDeployInputs;
|
|
91
|
+
//# sourceMappingURL=deploy-inputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-inputs.d.ts","sourceRoot":"","sources":["../../src/components/deploy-inputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAOH,OAAO,KAAK,EAAc,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEpE,+GAA+G;AAC/G,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAAuC,CAAC;AAErF,+HAA+H;AAC/H,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM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AO,CAEhE;AAED,wCAAwC;AACxC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,uGAAuG;AACvG,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAOjE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,WAAW,EAAE,EAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAoB,GAClD,qBAAqB,CA4BvB"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The local files a component's steps deploy from, and their content digests
|
|
3
|
+
* (#4155).
|
|
4
|
+
*
|
|
5
|
+
* A component gate approves `componentPlanDigest` (./gate-plan.ts). A step
|
|
6
|
+
* whose capability has a `plan` is bound by what it plans. Every other step
|
|
7
|
+
* was bound only by its input as written, so a Helm chart, a kustomize
|
|
8
|
+
* directory or a static site's tree could change after review without moving
|
|
9
|
+
* the digest. This module names those files and hashes them, so the digest
|
|
10
|
+
* moves when they do.
|
|
11
|
+
*
|
|
12
|
+
* Which fields name a path is data, as the template fields are in
|
|
13
|
+
* ./release-compile.ts and the unit fields in ./deploy-units.ts: a kind's
|
|
14
|
+
* fields in {@link DEPLOY_INPUT_FIELDS}, plus `template`, `manifest` and
|
|
15
|
+
* `values` on any step ({@link TEMPLATE_FIELDS}). Only a literal path counts:
|
|
16
|
+
* a value wired from another step (`@Build.uri`) or an `archive:` path is a
|
|
17
|
+
* build output, and binding it would make an approval unusable by a build
|
|
18
|
+
* that is not reproducible. The build steps' own sources are bound instead.
|
|
19
|
+
*
|
|
20
|
+
* - A file is hashed by its bytes.
|
|
21
|
+
* - A directory is hashed over the files under it that git does not ignore
|
|
22
|
+
* (`git ls-files --cached --others --exclude-standard`), each by its path
|
|
23
|
+
* and bytes, so `node_modules` and a build's `dist` inside a Docker context
|
|
24
|
+
* are left out. Outside a git repository every file is hashed except under
|
|
25
|
+
* `.git` and `node_modules`.
|
|
26
|
+
* - A directory git ignores as a whole is a build output. It is not hashed;
|
|
27
|
+
* the step is listed as unbound, with that reason.
|
|
28
|
+
* - A path that does not exist is left out. One that appears later moves the
|
|
29
|
+
* digest.
|
|
30
|
+
*
|
|
31
|
+
* A step whose kind runs content chant can't name, such as `shell`, is listed
|
|
32
|
+
* as unbound ({@link UNBOUND_KINDS}), so the plan note can show a reviewer
|
|
33
|
+
* what the approval does not cover.
|
|
34
|
+
*/
|
|
35
|
+
import { spawnSync } from "node:child_process";
|
|
36
|
+
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
37
|
+
import { join, relative, resolve, sep } from "node:path";
|
|
38
|
+
import { sha256Hex } from "../content-digest.js";
|
|
39
|
+
import { computePlanDigest } from "../lifecycle/plan-digest.js";
|
|
40
|
+
/** The fields that name every step's deployed file, whatever its kind (as ./release-compile.ts reads them). */
|
|
41
|
+
export const TEMPLATE_FIELDS = ["template", "manifest", "values"];
|
|
42
|
+
/** Per kind, the fields beyond {@link TEMPLATE_FIELDS} that name a local file or directory the step deploys or builds from. */
|
|
43
|
+
export const DEPLOY_INPUT_FIELDS = {
|
|
44
|
+
"helm-upgrade": ["chart"],
|
|
45
|
+
"kustomize-apply": ["dir"],
|
|
46
|
+
"fly-release": ["plan"],
|
|
47
|
+
"fly-rollback": ["plan"],
|
|
48
|
+
"s3-sync": ["from"],
|
|
49
|
+
"r2-sync": ["from"],
|
|
50
|
+
"copy-to-host": ["from"],
|
|
51
|
+
"wrangler-deploy": ["config"],
|
|
52
|
+
"wrangler-versions-promote": ["config"],
|
|
53
|
+
"docker-build": ["context"],
|
|
54
|
+
"zip-package": ["source"],
|
|
55
|
+
"jvm-build": ["path"],
|
|
56
|
+
};
|
|
57
|
+
/** Kinds that deploy content chant can't name from their input: a command, an agent's work. */
|
|
58
|
+
export const UNBOUND_KINDS = ["shell", "run-agent"];
|
|
59
|
+
function isGate(step) {
|
|
60
|
+
return step.kind === "gate";
|
|
61
|
+
}
|
|
62
|
+
function isPhase(step) {
|
|
63
|
+
return typeof step.phase === "string" && Array.isArray(step.steps);
|
|
64
|
+
}
|
|
65
|
+
const isLiteralPath = (v) => typeof v === "string" && v !== "" && !v.startsWith("@") && !v.startsWith("$") && !v.startsWith("archive:");
|
|
66
|
+
/** Every capability step of a composition with its phase, nested phases included, gates left out. */
|
|
67
|
+
export function stepsWithPhase(phases) {
|
|
68
|
+
const out = [];
|
|
69
|
+
const walk = (phase) => {
|
|
70
|
+
for (const step of phase.steps) {
|
|
71
|
+
if (isPhase(step))
|
|
72
|
+
walk(step);
|
|
73
|
+
else if (!isGate(step))
|
|
74
|
+
out.push({ phase: phase.phase, step });
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
phases.forEach(walk);
|
|
78
|
+
return out;
|
|
79
|
+
}
|
|
80
|
+
/** The literal paths one step names, in field order. A Docker build's Dockerfile is named under its context. */
|
|
81
|
+
export function stepInputRefs(phase, step) {
|
|
82
|
+
const out = [];
|
|
83
|
+
for (const field of [...TEMPLATE_FIELDS, ...(DEPLOY_INPUT_FIELDS[step.kind] ?? [])]) {
|
|
84
|
+
const raw = step[field];
|
|
85
|
+
for (const value of Array.isArray(raw) ? raw : [raw]) {
|
|
86
|
+
if (isLiteralPath(value))
|
|
87
|
+
out.push({ phase, kind: step.kind, field, path: value });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (step.kind === "docker-build" && isLiteralPath(step.context) && isLiteralPath(step.dockerfile)) {
|
|
91
|
+
out.push({ phase, kind: step.kind, field: "dockerfile", path: join(step.context, step.dockerfile) });
|
|
92
|
+
}
|
|
93
|
+
return out;
|
|
94
|
+
}
|
|
95
|
+
function git(root, args) {
|
|
96
|
+
const r = spawnSync("git", ["-C", root, ...args], { encoding: "utf-8", maxBuffer: 256 * 1024 * 1024 });
|
|
97
|
+
return { ok: r.status === 0, out: r.stdout ?? "" };
|
|
98
|
+
}
|
|
99
|
+
/** The files under `dir` (relative to `root`) a directory digest covers, relative to `root`, sorted. */
|
|
100
|
+
export function directoryFiles(root, dir) {
|
|
101
|
+
const listed = git(root, ["ls-files", "-z", "--cached", "--others", "--exclude-standard", "--", dir]);
|
|
102
|
+
if (listed.ok) {
|
|
103
|
+
return [...new Set(listed.out.split("\0").filter((p) => p !== ""))]
|
|
104
|
+
.filter((p) => {
|
|
105
|
+
const full = resolve(root, p);
|
|
106
|
+
return existsSync(full) && statSync(full).isFile();
|
|
107
|
+
})
|
|
108
|
+
.sort();
|
|
109
|
+
}
|
|
110
|
+
return walkFiles(root, dir);
|
|
111
|
+
}
|
|
112
|
+
/** Every file under `dir`, relative to `root`, sorted, leaving out `.git` and `node_modules`. What a cut records of a directory git ignores. */
|
|
113
|
+
export function walkFiles(root, dir) {
|
|
114
|
+
const out = [];
|
|
115
|
+
const walk = (abs) => {
|
|
116
|
+
for (const entry of readdirSync(abs, { withFileTypes: true })) {
|
|
117
|
+
if (entry.name === ".git" || entry.name === "node_modules")
|
|
118
|
+
continue;
|
|
119
|
+
const full = join(abs, entry.name);
|
|
120
|
+
if (entry.isDirectory())
|
|
121
|
+
walk(full);
|
|
122
|
+
else if (entry.isFile())
|
|
123
|
+
out.push(relative(root, full).split(sep).join("/"));
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
walk(resolve(root, dir));
|
|
127
|
+
return out.sort();
|
|
128
|
+
}
|
|
129
|
+
/** Whether git ignores `path` (relative to `root`). False outside a git repository. */
|
|
130
|
+
export function ignoredByGit(root, path) {
|
|
131
|
+
return git(root, ["check-ignore", "-q", "--", path]).ok;
|
|
132
|
+
}
|
|
133
|
+
/** `sha256:<hex>` of a file's bytes. */
|
|
134
|
+
export function fileDigest(file) {
|
|
135
|
+
return `sha256:${sha256Hex(readFileSync(file))}`;
|
|
136
|
+
}
|
|
137
|
+
/** The digest of the files under `dir`: a plan digest over each file's path (from `dir`) and bytes. */
|
|
138
|
+
export function directoryDigest(root, dir) {
|
|
139
|
+
const base = resolve(root, dir);
|
|
140
|
+
const files = directoryFiles(root, dir).map((p) => ({
|
|
141
|
+
path: relative(base, resolve(root, p)).split(sep).join("/"),
|
|
142
|
+
digest: fileDigest(resolve(root, p)),
|
|
143
|
+
}));
|
|
144
|
+
return computePlanDigest("directory", files);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* What a component's steps deploy from, read under `root` (the member's
|
|
148
|
+
* directory). `include` picks the steps to read, all of them by default; the
|
|
149
|
+
* wave planner passes the steps without a `plan`, which their plan does not
|
|
150
|
+
* already cover.
|
|
151
|
+
*/
|
|
152
|
+
export function componentDeployInputs(phases, root, include = () => true) {
|
|
153
|
+
const inputs = new Map();
|
|
154
|
+
const unbound = [];
|
|
155
|
+
for (const { phase, step } of stepsWithPhase(phases)) {
|
|
156
|
+
if (!include(step))
|
|
157
|
+
continue;
|
|
158
|
+
if (UNBOUND_KINDS.includes(step.kind)) {
|
|
159
|
+
unbound.push({ phase, kind: step.kind, reason: `a ${step.kind} step runs content chant can't name from its input` });
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
for (const ref of stepInputRefs(phase, step)) {
|
|
163
|
+
if (inputs.has(ref.path))
|
|
164
|
+
continue;
|
|
165
|
+
const full = resolve(root, ref.path);
|
|
166
|
+
if (!existsSync(full))
|
|
167
|
+
continue;
|
|
168
|
+
if (statSync(full).isDirectory()) {
|
|
169
|
+
if (ignoredByGit(root, ref.path)) {
|
|
170
|
+
unbound.push({ phase, kind: step.kind, reason: `its ${ref.field} "${ref.path}" is a directory git ignores, so a build output; bind its sources through the step that builds it` });
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
inputs.set(ref.path, directoryDigest(root, ref.path));
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
inputs.set(ref.path, fileDigest(full));
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return {
|
|
181
|
+
inputs: [...inputs].map(([path, digest]) => ({ path, digest })).sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0)),
|
|
182
|
+
unbound,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
@@ -116,6 +116,8 @@ export interface DriverStepRecord {
|
|
|
116
116
|
durationMs: number;
|
|
117
117
|
output?: unknown;
|
|
118
118
|
error?: string;
|
|
119
|
+
/** Set on a failed step whose capability refused a plan that moved since it was approved (`isPlanMovedError`, #3997). */
|
|
120
|
+
planMoved?: true;
|
|
119
121
|
/** Set on a `gate` step that passed (#2119): who resolved it, when, and at what address. */
|
|
120
122
|
approval?: {
|
|
121
123
|
gate: string;
|
|
@@ -228,6 +230,34 @@ export declare function resolveStepInput(input: Record<string, unknown>, phaseOu
|
|
|
228
230
|
* `undefined`; a plan uses this to say whose outputs it is waiting on.
|
|
229
231
|
*/
|
|
230
232
|
export declare function unresolvedWiringSources(input: Record<string, unknown>, componentOutputs: Record<string, Record<string, unknown>>): string[];
|
|
233
|
+
/** One cross-component reference a step input makes: whose output, and which. */
|
|
234
|
+
export interface WiringReference {
|
|
235
|
+
/** The component or stack whose output it reads. */
|
|
236
|
+
source: string;
|
|
237
|
+
/** `<stack>.<name>` for `stackOutput()`, `<component>.publish.<field>` for an artifact. */
|
|
238
|
+
ref: string;
|
|
239
|
+
/**
|
|
240
|
+
* Whether it reads a published artifact's identity (#3999): an
|
|
241
|
+
* `@<component>.publish.*` reference, or a `stackOutput()` whose name is
|
|
242
|
+
* under `publish`. The driver namespaces every publish-family output there
|
|
243
|
+
* (`collectComponentOutputs`), whatever capability wrote it.
|
|
244
|
+
*/
|
|
245
|
+
publish: boolean;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Every cross-component reference in `input` that has no value in
|
|
249
|
+
* `componentOutputs`, sorted by `ref` and each once (#3999). A pull
|
|
250
|
+
* request's plan names these when the output is known only after its
|
|
251
|
+
* upstream applies.
|
|
252
|
+
*/
|
|
253
|
+
export declare function unresolvedWiringReferences(input: Record<string, unknown>, componentOutputs: Record<string, Record<string, unknown>>): WiringReference[];
|
|
254
|
+
/**
|
|
255
|
+
* The cross-component references in `input` that resolve to another value
|
|
256
|
+
* against `now` than against `read`, sorted (#3999). A pull request's apply
|
|
257
|
+
* holds back a member whose plan read `read` when its upstream applied and
|
|
258
|
+
* left `now`.
|
|
259
|
+
*/
|
|
260
|
+
export declare function movedWiringReferences(input: Record<string, unknown>, read: Record<string, Record<string, unknown>>, now: Record<string, Record<string, unknown>>): WiringReference[];
|
|
231
261
|
/** How a component's run reaches the gate ledger — see `../op/gate.ts`. */
|
|
232
262
|
export interface GateContext {
|
|
233
263
|
port: GateLedgerPort;
|
|
@@ -317,6 +347,14 @@ export declare function collectComponentOutputs(phaseOutputs: Record<string, Rec
|
|
|
317
347
|
* when the component exposed nothing.
|
|
318
348
|
*/
|
|
319
349
|
export declare function accumulateComponentOutputs(componentOutputs: Record<string, Record<string, unknown>>, componentName: string, phaseOutputs: Record<string, Record<string, unknown>>): Record<string, Record<string, unknown>>;
|
|
350
|
+
/** Whether a step in `results` refused a plan that moved since it was approved (#3997). */
|
|
351
|
+
export declare function planMovedIn(results: readonly DriverComponentResult[]): boolean;
|
|
352
|
+
/**
|
|
353
|
+
* The exit code of a run that failed: {@link PLAN_MOVED_EXIT_CODE} when a
|
|
354
|
+
* step refused a plan that moved since it was approved, 1 otherwise. Every
|
|
355
|
+
* command that runs capability steps ends a failed run with it.
|
|
356
|
+
*/
|
|
357
|
+
export declare function failedRunExitCode(results: readonly DriverComponentResult[]): number;
|
|
320
358
|
export interface InterpretRunOptions {
|
|
321
359
|
/** Target environment name, threaded into every capability's `DeployContext`. */
|
|
322
360
|
env: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/components/driver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAIH,OAAO,E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