@intentius/chant 0.124.87 → 0.124.89
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/dist/action-pins.d.ts +1 -0
- package/dist/action-pins.d.ts.map +1 -1
- package/dist/action-pins.js +2 -0
- package/dist/actor.d.ts +47 -0
- package/dist/actor.d.ts.map +1 -0
- package/dist/actor.js +56 -0
- package/dist/bundle-check.d.ts +20 -5
- package/dist/bundle-check.d.ts.map +1 -1
- package/dist/bundle-check.js +20 -5
- package/dist/chant-install.d.ts +98 -0
- package/dist/chant-install.d.ts.map +1 -1
- package/dist/chant-install.js +203 -2
- package/dist/ci-base.d.ts +30 -0
- package/dist/ci-base.d.ts.map +1 -0
- package/dist/ci-base.js +33 -0
- package/dist/ci-comment-commands.d.ts +177 -0
- package/dist/ci-comment-commands.d.ts.map +1 -0
- package/dist/ci-comment-commands.js +325 -0
- package/dist/ci-comment-replies.d.ts +40 -0
- package/dist/ci-comment-replies.d.ts.map +1 -0
- package/dist/ci-comment-replies.js +59 -0
- package/dist/ci-commit.d.ts +1 -1
- package/dist/ci-commit.d.ts.map +1 -1
- package/dist/ci-commit.js +1 -2
- package/dist/ci-control.d.ts +1 -1
- package/dist/ci-control.d.ts.map +1 -1
- package/dist/ci-control.js +1 -1
- package/dist/ci-evidence-claims.d.ts +59 -0
- package/dist/ci-evidence-claims.d.ts.map +1 -0
- package/dist/ci-evidence-claims.js +87 -0
- package/dist/ci-evidence-from-job.d.ts +128 -0
- package/dist/ci-evidence-from-job.d.ts.map +1 -0
- package/dist/ci-evidence-from-job.js +203 -0
- package/dist/ci-evidence-jobs.d.ts +68 -4
- package/dist/ci-evidence-jobs.d.ts.map +1 -1
- package/dist/ci-evidence-jobs.js +82 -5
- package/dist/ci-handover.d.ts +12 -0
- package/dist/ci-handover.d.ts.map +1 -1
- package/dist/ci-handover.js +15 -3
- package/dist/ci-identity.d.ts +32 -6
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +40 -8
- package/dist/ci-image.d.ts +65 -10
- package/dist/ci-image.d.ts.map +1 -1
- package/dist/ci-image.js +101 -22
- package/dist/ci-jobs.d.ts +1 -1
- package/dist/ci-jobs.d.ts.map +1 -1
- package/dist/ci-jobs.js +7 -2
- package/dist/ci-login.d.ts +75 -13
- package/dist/ci-login.d.ts.map +1 -1
- package/dist/ci-login.js +89 -37
- package/dist/ci-note-commands.d.ts +63 -3
- package/dist/ci-note-commands.d.ts.map +1 -1
- package/dist/ci-note-commands.js +69 -35
- package/dist/ci-product-words.d.ts +62 -1
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +52 -1
- package/dist/ci-product.d.ts +52 -2
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +51 -2
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +29 -2
- package/dist/cli/handlers/approve-confirm.d.ts +14 -0
- package/dist/cli/handlers/approve-confirm.d.ts.map +1 -1
- package/dist/cli/handlers/approve-confirm.js +46 -0
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +2 -1
- package/dist/cli/handlers/build.d.ts +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +22 -1
- package/dist/cli/handlers/ci-check.d.ts +1 -1
- package/dist/cli/handlers/ci-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-check.js +37 -7
- package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
- package/dist/cli/handlers/ci-evidence.js +255 -20
- package/dist/cli/handlers/ci-forge-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-forge-check.js +34 -17
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/components.js +3 -1
- package/dist/cli/handlers/generated-check.d.ts +11 -0
- package/dist/cli/handlers/generated-check.d.ts.map +1 -0
- package/dist/cli/handlers/generated-check.js +71 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +3 -0
- package/dist/cli/handlers/local-chant.d.ts +13 -0
- package/dist/cli/handlers/local-chant.d.ts.map +1 -1
- package/dist/cli/handlers/local-chant.js +42 -1
- package/dist/cli/handlers/lock.d.ts.map +1 -1
- package/dist/cli/handlers/lock.js +121 -4
- package/dist/cli/handlers/pr-comment.d.ts +21 -0
- package/dist/cli/handlers/pr-comment.d.ts.map +1 -0
- package/dist/cli/handlers/pr-comment.js +112 -0
- package/dist/cli/handlers/pr-env.d.ts.map +1 -1
- package/dist/cli/handlers/pr-env.js +6 -3
- package/dist/cli/handlers/pr.d.ts +23 -1
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +97 -14
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +2 -1
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +11 -2
- package/dist/cli/handlers/run-wave.d.ts.map +1 -1
- package/dist/cli/handlers/run-wave.js +36 -2
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +2 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +60 -4
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +82 -0
- package/dist/cli/registry.d.ts +35 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +2 -1
- package/dist/components/check-hooks.d.ts +10 -0
- package/dist/components/check-hooks.d.ts.map +1 -1
- package/dist/components/check-hooks.js +18 -0
- package/dist/components/pr-checks.d.ts +169 -0
- package/dist/components/pr-checks.d.ts.map +1 -0
- package/dist/components/pr-checks.js +180 -0
- package/dist/components/pr-pipeline.d.ts +38 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +6 -1
- package/dist/components/product-pipeline.d.ts +58 -2
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +76 -9
- package/dist/components/product-plan.d.ts +445 -7
- package/dist/components/product-plan.d.ts.map +1 -1
- package/dist/components/product-plan.js +426 -15
- package/dist/config.d.ts +10 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -6
- package/dist/control/consumers.d.ts +6 -0
- package/dist/control/consumers.d.ts.map +1 -1
- package/dist/control/consumers.js +6 -0
- package/dist/dead-guards.d.ts.map +1 -1
- package/dist/dead-guards.js +9 -6
- package/dist/discovery/files.d.ts +1 -1
- package/dist/discovery/files.js +1 -1
- package/dist/drift-issue.d.ts +20 -3
- package/dist/drift-issue.d.ts.map +1 -1
- package/dist/drift-issue.js +16 -0
- package/dist/drift-record.d.ts +52 -5
- package/dist/drift-record.d.ts.map +1 -1
- package/dist/drift-record.js +46 -6
- package/dist/floor-table.d.ts +6 -6
- package/dist/floor-table.d.ts.map +1 -1
- package/dist/floor-table.data.d.ts.map +1 -1
- package/dist/floor-table.data.js +81 -21
- package/dist/floor-table.js +10 -7
- package/dist/forge-check/contract.d.ts +19 -1
- package/dist/forge-check/contract.d.ts.map +1 -1
- package/dist/forge-check/contract.js +8 -2
- package/dist/forge-check/index.d.ts +4 -0
- package/dist/forge-check/index.d.ts.map +1 -1
- package/dist/forge-check/index.js +4 -0
- package/dist/forge-flags.d.ts +10 -0
- package/dist/forge-flags.d.ts.map +1 -1
- package/dist/forge-flags.js +31 -0
- package/dist/forge-remote.d.ts +47 -0
- package/dist/forge-remote.d.ts.map +1 -0
- package/dist/forge-remote.js +69 -0
- package/dist/gate-resume-run.d.ts +9 -1
- package/dist/gate-resume-run.d.ts.map +1 -1
- package/dist/gate-resume-run.js +26 -3
- package/dist/generated-check.d.ts +88 -0
- package/dist/generated-check.d.ts.map +1 -0
- package/dist/generated-check.js +248 -0
- package/dist/image-pins.d.ts +26 -0
- package/dist/image-pins.d.ts.map +1 -0
- package/dist/image-pins.js +19 -0
- package/dist/lexicon.d.ts +27 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +11 -0
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +30 -3
- package/dist/lifecycle/publish-npm.d.ts +26 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.js +76 -4
- package/dist/lifecycle/reach-locks.d.ts +131 -0
- package/dist/lifecycle/reach-locks.d.ts.map +1 -0
- package/dist/lifecycle/reach-locks.js +118 -0
- package/dist/lifecycle/release-cut.d.ts +3 -1
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +15 -0
- package/dist/lifecycle/release-images.d.ts +22 -1
- package/dist/lifecycle/release-images.d.ts.map +1 -1
- package/dist/lifecycle/release-images.js +26 -3
- package/dist/lifecycle/release-ledger.d.ts +4 -3
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +3 -2
- package/dist/local-chant.d.ts +57 -3
- package/dist/local-chant.d.ts.map +1 -1
- package/dist/local-chant.js +122 -13
- package/dist/notify-product.d.ts +12 -3
- package/dist/notify-product.d.ts.map +1 -1
- package/dist/notify-product.js +10 -6
- package/dist/op/activities/source-release.d.ts.map +1 -1
- package/dist/op/activities/source-release.js +2 -1
- package/dist/op/activities/source-rollback.d.ts.map +1 -1
- package/dist/op/activities/source-rollback.js +2 -1
- package/dist/op/index.d.ts +2 -0
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -0
- package/dist/op/op-waves-evidence-jobs.d.ts +97 -0
- package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -0
- package/dist/op/op-waves-evidence-jobs.js +118 -0
- package/dist/op/op-waves-evidence.d.ts +12 -1
- package/dist/op/op-waves-evidence.d.ts.map +1 -1
- package/dist/op/op-waves-evidence.js +23 -2
- package/dist/op/op-waves-render-spec.d.ts +100 -0
- package/dist/op/op-waves-render-spec.d.ts.map +1 -0
- package/dist/op/op-waves-render-spec.js +162 -0
- package/dist/op/op-waves-run.d.ts +14 -1
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +56 -4
- package/dist/op/op-waves.d.ts +12 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +14 -1
- package/dist/op/schedule-overdue.d.ts +39 -2
- package/dist/op/schedule-overdue.d.ts.map +1 -1
- package/dist/op/schedule-overdue.js +148 -10
- package/dist/op/wave-stop.d.ts +64 -0
- package/dist/op/wave-stop.d.ts.map +1 -0
- package/dist/op/wave-stop.js +127 -0
- package/dist/planned-files.d.ts +76 -0
- package/dist/planned-files.d.ts.map +1 -0
- package/dist/planned-files.js +108 -0
- package/dist/pr-forge-job.d.ts +22 -0
- package/dist/pr-forge-job.d.ts.map +1 -0
- package/dist/pr-forge-job.js +46 -0
- package/dist/pr-forge-reads.d.ts +21 -1
- package/dist/pr-forge-reads.d.ts.map +1 -1
- package/dist/pr-forge-reads.js +19 -1
- package/dist/pr-forge.d.ts +7 -1
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +7 -2
- package/dist/pr-loop.d.ts +3 -6
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +4 -81
- package/dist/pr-plan-note.d.ts +121 -0
- package/dist/pr-plan-note.d.ts.map +1 -1
- package/dist/pr-plan-note.js +104 -1
- package/dist/pr-plan-record.d.ts +47 -0
- package/dist/pr-plan-record.d.ts.map +1 -0
- package/dist/pr-plan-record.js +89 -0
- package/dist/pr-post.d.ts +68 -3
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +218 -13
- package/dist/pr-requires.d.ts +8 -0
- package/dist/pr-requires.d.ts.map +1 -1
- package/dist/pr-requires.js +3 -1
- package/dist/pr-status.d.ts +16 -0
- package/dist/pr-status.d.ts.map +1 -0
- package/dist/pr-status.js +90 -0
- package/dist/ref-gate-init.d.ts +90 -0
- package/dist/ref-gate-init.d.ts.map +1 -0
- package/dist/ref-gate-init.js +155 -0
- package/dist/ref-gate-rules.d.ts +19 -0
- package/dist/ref-gate-rules.d.ts.map +1 -0
- package/dist/ref-gate-rules.js +17 -0
- package/dist/release-floors.d.ts +100 -16
- package/dist/release-floors.d.ts.map +1 -1
- package/dist/release-floors.js +101 -17
- package/dist/render-module.d.ts +15 -0
- package/dist/render-module.d.ts.map +1 -0
- package/dist/render-module.js +73 -0
- package/dist/state-migration.d.ts +24 -1
- package/dist/state-migration.d.ts.map +1 -1
- package/dist/state-migration.js +39 -4
- package/dist/state-unlock.d.ts +32 -1
- package/dist/state-unlock.d.ts.map +1 -1
- package/dist/state-unlock.js +31 -0
- package/dist/wave-runtime.mjs +307 -297
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +15 -8
- package/dist/workspace/drift-cli.d.ts +1 -1
- package/dist/workspace/drift-cli.d.ts.map +1 -1
- package/dist/workspace/drift-cli.js +5 -12
- package/dist/workspace/forge-work.d.ts +3 -2
- package/dist/workspace/forge-work.d.ts.map +1 -1
- package/dist/workspace/forge-work.js +7 -17
- package/dist/workspace/lexicon-outputs.js +2 -2
- package/dist/workspace/release-train.d.ts.map +1 -1
- package/dist/workspace/release-train.js +2 -1
- package/dist/workspace/release-workflow.d.ts +27 -3
- package/dist/workspace/release-workflow.d.ts.map +1 -1
- package/dist/workspace/release-workflow.js +52 -7
- package/dist/workspace/trust/check-evidence-report.d.ts +25 -2
- package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence-report.js +28 -8
- package/dist/workspace/trust/check-evidence.d.ts +13 -1
- package/dist/workspace/trust/check-evidence.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence.js +8 -3
- package/dist/workspace/trust/evidence.d.ts +5 -0
- package/dist/workspace/trust/evidence.d.ts.map +1 -1
- package/dist/workspace/trust/evidence.js +5 -0
- package/dist/workspace/trust/open-evidence.d.ts +67 -0
- package/dist/workspace/trust/open-evidence.d.ts.map +1 -0
- package/dist/workspace/trust/open-evidence.js +92 -0
- package/dist/workspace/trust/ref-gate-cli.d.ts +10 -1
- package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate-cli.js +93 -11
- package/dist/workspace/trust/ref-gate.d.ts +61 -2
- package/dist/workspace/trust/ref-gate.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate.js +72 -7
- package/dist/workspace/workspace-run.d.ts.map +1 -1
- package/dist/workspace/workspace-run.js +2 -1
- package/package.json +1 -1
- package/src/action-pins.ts +2 -0
- package/src/actor.test.ts +78 -0
- package/src/actor.ts +79 -0
- package/src/bundle-check.test.ts +22 -0
- package/src/bundle-check.ts +33 -5
- package/src/chant-install.test.ts +108 -1
- package/src/chant-install.ts +242 -2
- package/src/ci-base.test.ts +41 -0
- package/src/ci-base.ts +43 -0
- package/src/ci-comment-commands.test.ts +376 -0
- package/src/ci-comment-commands.ts +389 -0
- package/src/ci-comment-replies.ts +78 -0
- package/src/ci-commit.test.ts +51 -6
- package/src/ci-commit.ts +1 -2
- package/src/ci-control.ts +1 -0
- package/src/ci-evidence-claims.ts +102 -0
- package/src/ci-evidence-from-job.test.ts +165 -0
- package/src/ci-evidence-from-job.ts +251 -0
- package/src/ci-evidence-jobs.ts +88 -6
- package/src/ci-handover.ts +16 -3
- package/src/ci-identity.test.ts +3 -3
- package/src/ci-identity.ts +51 -11
- package/src/ci-image.test.ts +187 -16
- package/src/ci-image.ts +157 -25
- package/src/ci-jobs.ts +7 -2
- package/src/ci-login.test.ts +131 -3
- package/src/ci-login.token-drop.test.ts +204 -0
- package/src/ci-login.ts +137 -39
- package/src/ci-note-commands.ts +104 -41
- package/src/ci-product-words.ts +89 -0
- package/src/ci-product.ts +62 -1
- package/src/cli/commands/__fixtures__/source-dir-root/migrations/0001-init/backfill.ts +3 -0
- package/src/cli/commands/build.test.ts +41 -0
- package/src/cli/commands/build.ts +27 -2
- package/src/cli/handlers/approve-confirm.test.ts +35 -0
- package/src/cli/handlers/approve-confirm.ts +44 -0
- package/src/cli/handlers/approve.ts +2 -1
- package/src/cli/handlers/build-source-dir.test.ts +4 -0
- package/src/cli/handlers/build.ts +20 -2
- package/src/cli/handlers/ci-check.ts +37 -7
- package/src/cli/handlers/ci-evidence-open.test.ts +164 -0
- package/src/cli/handlers/ci-evidence.ts +233 -18
- package/src/cli/handlers/ci-forge-check.ts +22 -9
- package/src/cli/handlers/components.ts +3 -1
- package/src/cli/handlers/generated-check.ts +69 -0
- package/src/cli/handlers/lifecycle.test.ts +20 -0
- package/src/cli/handlers/lifecycle.ts +4 -0
- package/src/cli/handlers/local-chant.ts +39 -1
- package/src/cli/handlers/lock-reach.test.ts +103 -0
- package/src/cli/handlers/lock.ts +100 -4
- package/src/cli/handlers/pr-comment.ts +104 -0
- package/src/cli/handlers/pr-env.ts +6 -3
- package/src/cli/handlers/pr-record.test.ts +1 -1
- package/src/cli/handlers/pr.ts +93 -15
- package/src/cli/handlers/promote.ts +2 -1
- package/src/cli/handlers/release.e2e.test.ts +35 -0
- package/src/cli/handlers/release.ts +14 -2
- package/src/cli/handlers/run-wave.ts +35 -2
- package/src/cli/handlers/run.ts +2 -1
- package/src/cli/main.ts +60 -4
- package/src/cli/parse-args.ts +58 -0
- package/src/cli/registry.ts +35 -0
- package/src/components/auto-release.ts +2 -1
- package/src/components/check-hooks.ts +22 -0
- package/src/components/check-report-summary.test.ts +78 -0
- package/src/components/pr-checks.ts +254 -0
- package/src/components/pr-pipeline.ts +43 -1
- package/src/components/product-pipeline.ts +113 -9
- package/src/components/product-plan.test.ts +140 -1
- package/src/components/product-plan.ts +707 -20
- package/src/config.ts +13 -8
- package/src/control/consumers.ts +7 -0
- package/src/dead-guards.test.ts +27 -5
- package/src/dead-guards.ts +9 -6
- package/src/discovery/files.ts +1 -1
- package/src/drift-issue.test.ts +29 -1
- package/src/drift-issue.ts +28 -3
- package/src/drift-record.test.ts +45 -0
- package/src/drift-record.ts +71 -6
- package/src/floor-table.data.ts +81 -21
- package/src/floor-table.ts +12 -9
- package/src/forge-check/contract.ts +23 -2
- package/src/forge-check/forge-check.test.ts +25 -0
- package/src/forge-check/index.ts +4 -0
- package/src/forge-flags.test.ts +25 -1
- package/src/forge-flags.ts +34 -0
- package/src/forge-remote.test.ts +37 -0
- package/src/forge-remote.ts +79 -0
- package/src/gate-resume-run.ts +27 -3
- package/src/generated-check.e2e.test.ts +118 -0
- package/src/generated-check.test.ts +170 -0
- package/src/generated-check.ts +310 -0
- package/src/image-pins.ts +31 -0
- package/src/lexicon.ts +28 -0
- package/src/lifecycle/git.test.ts +48 -0
- package/src/lifecycle/git.ts +27 -4
- package/src/lifecycle/publish-npm.ts +87 -4
- package/src/lifecycle/reach-locks.test.ts +87 -0
- package/src/lifecycle/reach-locks.ts +169 -0
- package/src/lifecycle/release-catalog.test.ts +2 -2
- package/src/lifecycle/release-cut.ts +17 -1
- package/src/lifecycle/release-images-dockerfile.test.ts +20 -0
- package/src/lifecycle/release-images.test.ts +100 -0
- package/src/lifecycle/release-images.ts +38 -3
- package/src/lifecycle/release-ledger.ts +4 -3
- package/src/local-chant.e2e.test.ts +81 -6
- package/src/local-chant.test.ts +22 -3
- package/src/local-chant.ts +130 -13
- package/src/notify-product.ts +19 -8
- package/src/op/activities/source-release.ts +2 -1
- package/src/op/activities/source-rollback.ts +2 -1
- package/src/op/gate-resume.test.ts +27 -0
- package/src/op/index.ts +10 -0
- package/src/op/op-waves-evidence-jobs.ts +140 -0
- package/src/op/op-waves-evidence.test.ts +36 -3
- package/src/op/op-waves-evidence.ts +23 -3
- package/src/op/op-waves-notify-words.test.ts +18 -0
- package/src/op/op-waves-render-spec.test.ts +160 -0
- package/src/op/op-waves-render-spec.ts +171 -0
- package/src/op/op-waves-run.ts +59 -3
- package/src/op/op-waves.ts +16 -2
- package/src/op/schedule-overdue.test.ts +126 -1
- package/src/op/schedule-overdue.ts +164 -12
- package/src/op/wave-stop.test.ts +72 -0
- package/src/op/wave-stop.ts +137 -0
- package/src/planned-files.test.ts +80 -0
- package/src/planned-files.ts +134 -0
- package/src/pr-forge-job.test.ts +53 -0
- package/src/pr-forge-job.ts +46 -0
- package/src/pr-forge-reads-compare.test.ts +2 -1
- package/src/pr-forge-reads.ts +37 -1
- package/src/pr-forge.ts +14 -3
- package/src/pr-loop-narrowed.test.ts +2 -1
- package/src/pr-loop-words.test.ts +2 -1
- package/src/pr-loop.test.ts +1 -2
- package/src/pr-loop.ts +4 -80
- package/src/pr-plan-note.ts +184 -3
- package/src/pr-plan-record.test.ts +75 -0
- package/src/pr-plan-record.ts +101 -0
- package/src/pr-post-plan-note.test.ts +60 -0
- package/src/pr-post-replan.test.ts +144 -0
- package/src/pr-post-subject.test.ts +230 -0
- package/src/pr-post.test.ts +32 -1
- package/src/pr-post.ts +254 -15
- package/src/pr-requires.test.ts +20 -0
- package/src/pr-requires.ts +10 -1
- package/src/pr-status.ts +91 -0
- package/src/ref-gate-init.ts +208 -0
- package/src/ref-gate-rules.ts +26 -0
- package/src/release-floors.ts +139 -17
- package/src/render-module.ts +73 -0
- package/src/state-migration-record.test.ts +89 -0
- package/src/state-migration.test.ts +1 -1
- package/src/state-migration.ts +52 -4
- package/src/state-unlock.test.ts +33 -1
- package/src/state-unlock.ts +49 -1
- package/src/workspace/ci-green-cli.ts +14 -7
- package/src/workspace/ci-green-workflow.test.ts +32 -1
- package/src/workspace/drift-cli.ts +6 -18
- package/src/workspace/forge-work.ts +7 -14
- package/src/workspace/lexicon-outputs.ts +2 -2
- package/src/workspace/release-train.ts +2 -1
- package/src/workspace/release-workflow.test.ts +104 -3
- package/src/workspace/release-workflow.ts +60 -9
- package/src/workspace/trust/check-evidence-report.ts +39 -8
- package/src/workspace/trust/check-evidence.test.ts +5 -0
- package/src/workspace/trust/check-evidence.ts +17 -5
- package/src/workspace/trust/evidence.ts +5 -0
- package/src/workspace/trust/open-evidence.ts +129 -0
- package/src/workspace/trust/ref-gate-cli.ts +88 -10
- package/src/workspace/trust/ref-gate-pieces.test.ts +220 -0
- package/src/workspace/trust/ref-gate.e2e.test.ts +17 -0
- package/src/workspace/trust/ref-gate.test.ts +10 -0
- package/src/workspace/trust/ref-gate.ts +87 -6
- package/src/workspace/workspace-run.ts +2 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The forge a checkout's origin remote names (#4920): its kind, host, web
|
|
3
|
+
* origin and repository, for a command run on a laptop with no CI variables
|
|
4
|
+
* and no repository setting, such as plywood's `cancel`.
|
|
5
|
+
*
|
|
6
|
+
* It is the reading chant's own laptop paths make when the environment
|
|
7
|
+
* names no forge (`forgeWorkReader` in ./workspace/forge-work.ts): the
|
|
8
|
+
* host from the remote's URL, the kind from the host's name, and the
|
|
9
|
+
* repository path. Kept out of `pr-forge.ts`, which is in the pr-forge and
|
|
10
|
+
* pr-loop bundles.
|
|
11
|
+
*/
|
|
12
|
+
import { execFileSync } from "node:child_process";
|
|
13
|
+
import { remoteRepoPath } from "./op/activities/forge-pull-request.js";
|
|
14
|
+
import { remoteHost } from "./op/activities/gh-host.js";
|
|
15
|
+
export { remoteRepoPath, remoteHost };
|
|
16
|
+
/** The forge kind a remote host is: github.com and hosts named for GitHub, GitLab, or Forgejo and Gitea (codeberg.org too). Null for any other. */
|
|
17
|
+
export function forgeKindOfHost(host) {
|
|
18
|
+
const h = host.toLowerCase().replace(/:\d+$/, "");
|
|
19
|
+
if (h === "github.com" || /(^|[.-])github([.-]|$)/.test(h))
|
|
20
|
+
return "github";
|
|
21
|
+
if (h === "gitlab.com" || /(^|[.-])gitlab([.-]|$)/.test(h))
|
|
22
|
+
return "gitlab";
|
|
23
|
+
if (h === "codeberg.org" || /(^|[.-])(forgejo|gitea)([.-]|$)/.test(h))
|
|
24
|
+
return "forgejo";
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The forge a remote URL names (`https://host/o/r.git`, `ssh://git@host/o/r`,
|
|
29
|
+
* `git@host:o/r`), or undefined when it names no repository path or its host
|
|
30
|
+
* is none {@link forgeKindOfHost} knows. `kind` stands in for the host's
|
|
31
|
+
* guess, for a self-hosted forge whose name says nothing.
|
|
32
|
+
*/
|
|
33
|
+
export function forgeOfRemote(remoteUrl, opts = {}) {
|
|
34
|
+
const host = remoteHost(remoteUrl);
|
|
35
|
+
const repo = remoteRepoPath(remoteUrl);
|
|
36
|
+
if (!host || !repo)
|
|
37
|
+
return undefined;
|
|
38
|
+
const kind = opts.kind ?? forgeKindOfHost(host);
|
|
39
|
+
if (!kind)
|
|
40
|
+
return undefined;
|
|
41
|
+
let url = `https://${host.replace(/:\d+$/, "")}`;
|
|
42
|
+
try {
|
|
43
|
+
const u = new URL(remoteUrl.trim());
|
|
44
|
+
if (u.protocol === "http:" || u.protocol === "https:")
|
|
45
|
+
url = `${u.protocol}//${u.host.toLowerCase()}`;
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
// An scp-style remote is ssh, whose port is not the web's.
|
|
49
|
+
}
|
|
50
|
+
return { kind, host, url, repo };
|
|
51
|
+
}
|
|
52
|
+
/** `git remote get-url <remote>` in `cwd`, or undefined when there is none. */
|
|
53
|
+
function gitRemoteUrl(cwd, remote) {
|
|
54
|
+
try {
|
|
55
|
+
return execFileSync("git", ["remote", "get-url", remote], { cwd, encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim() || undefined;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The forge the checkout at `cwd` names by its `origin` remote (or
|
|
63
|
+
* `remote`), as {@link forgeOfRemote} reads it. Undefined outside a
|
|
64
|
+
* checkout, with no such remote, or for a host no forge kind is known for.
|
|
65
|
+
*/
|
|
66
|
+
export function forgeOfCheckout(cwd, opts = {}) {
|
|
67
|
+
const url = (opts.remoteUrl ?? gitRemoteUrl)(cwd, opts.remote ?? "origin");
|
|
68
|
+
return forgeOfRemote(url, opts.kind ? { kind: opts.kind } : {});
|
|
69
|
+
}
|
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
* | Forgejo | `POST /repos/{repo}/actions/workflows/{file}/dispatches` on the run's branch | a token with the `write:repository` scope; Forgejo has no API to re-run a run, so it starts a new run of the workflow |
|
|
20
20
|
*
|
|
21
21
|
* GitHub re-runs the failed job and the jobs that need it, at the same
|
|
22
|
-
* commit. GitLab retries the job, and the jobs it skipped run after it
|
|
22
|
+
* commit. GitLab retries the job, and the jobs it skipped run after it; a
|
|
23
|
+
* job that already ran is not run again, so a waves job's
|
|
24
|
+
* `<wave job>-evidence` that ran after the stopped try is retried with it
|
|
25
|
+
* (#4978), and signs from the new try once it ends. A
|
|
23
26
|
* Forgejo dispatch runs the whole workflow again at the branch's head, so the
|
|
24
27
|
* jobs before the gate run again too; they must be safe to repeat (a wave
|
|
25
28
|
* whose runs already applied plans nothing and applies nothing new).
|
|
@@ -72,6 +75,11 @@ export interface ResumeGateRunOptions {
|
|
|
72
75
|
*/
|
|
73
76
|
dryRun?: boolean;
|
|
74
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* The job that signs a GitLab Op waves job's checks (#4926, #4978):
|
|
80
|
+
* `<wave job>-evidence`, as the waves pipeline names it.
|
|
81
|
+
*/
|
|
82
|
+
export declare function gitlabEvidenceJobOf(job: string): string;
|
|
75
83
|
/**
|
|
76
84
|
* Start the job a pending fact's locator names again, or say why not. Throws
|
|
77
85
|
* {@link ForgeApiError} when the forge refuses a call, such as a token
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-resume-run.d.ts","sourceRoot":"","sources":["../src/gate-resume-run.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"gate-resume-run.d.ts","sourceRoot":"","sources":["../src/gate-resume-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAiB,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAErG,sCAAsC;AACtC,MAAM,MAAM,iBAAiB,GACzB;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAClE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE;AACvE,+FAA+F;GAC7F;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5E,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,6GAA6G;IAC7G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AA4BD;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA4E/G;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,MAAM,GAAG,SAAS,CAG9H"}
|
package/dist/gate-resume-run.js
CHANGED
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
* | Forgejo | `POST /repos/{repo}/actions/workflows/{file}/dispatches` on the run's branch | a token with the `write:repository` scope; Forgejo has no API to re-run a run, so it starts a new run of the workflow |
|
|
20
20
|
*
|
|
21
21
|
* GitHub re-runs the failed job and the jobs that need it, at the same
|
|
22
|
-
* commit. GitLab retries the job, and the jobs it skipped run after it
|
|
22
|
+
* commit. GitLab retries the job, and the jobs it skipped run after it; a
|
|
23
|
+
* job that already ran is not run again, so a waves job's
|
|
24
|
+
* `<wave job>-evidence` that ran after the stopped try is retried with it
|
|
25
|
+
* (#4978), and signs from the new try once it ends. A
|
|
23
26
|
* Forgejo dispatch runs the whole workflow again at the branch's head, so the
|
|
24
27
|
* jobs before the gate run again too; they must be safe to repeat (a wave
|
|
25
28
|
* whose runs already applied plans nothing and applies nothing new).
|
|
@@ -40,6 +43,15 @@
|
|
|
40
43
|
*/
|
|
41
44
|
import { ForgeApiError } from "./pr-forge.js";
|
|
42
45
|
export { isGateRunLocator, resolveGateRunLocator } from "./op/gate-run-locator.js";
|
|
46
|
+
/**
|
|
47
|
+
* The job that signs a GitLab Op waves job's checks (#4926, #4978):
|
|
48
|
+
* `<wave job>-evidence`, as the waves pipeline names it.
|
|
49
|
+
*/
|
|
50
|
+
export function gitlabEvidenceJobOf(job) {
|
|
51
|
+
return `${job}-evidence`;
|
|
52
|
+
}
|
|
53
|
+
/** The GitLab job statuses of a job that ran and ended; a `skipped` or `created` job GitLab runs again after a retry itself. */
|
|
54
|
+
const GITLAB_FINISHED = new Set(["success", "failed", "canceled"]);
|
|
43
55
|
const trimSlash = (s) => s.replace(/\/+$/, "");
|
|
44
56
|
const isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
45
57
|
function client(base, headers, fetchImpl) {
|
|
@@ -104,6 +116,7 @@ export async function resumeGateRun(loc, opts) {
|
|
|
104
116
|
if (!["failed", "canceled", "skipped"].includes(status))
|
|
105
117
|
return skip(`job ${loc.job} is ${status}, not finished`);
|
|
106
118
|
const name = loc.jobName ?? (typeof job.name === "string" ? job.name : undefined);
|
|
119
|
+
let evidence;
|
|
107
120
|
if (name) {
|
|
108
121
|
// The pipeline's jobs list leaves retried jobs out, so the job of this name is its newest try.
|
|
109
122
|
const jobs = await call("GET", `${project}/pipelines/${loc.run}/jobs?per_page=100`);
|
|
@@ -111,12 +124,22 @@ export async function resumeGateRun(loc, opts) {
|
|
|
111
124
|
if (isObject(newest) && String(newest.id) !== String(loc.job)) {
|
|
112
125
|
return skip(`job ${loc.job} (${name}) was already retried as job ${String(newest.id)}`);
|
|
113
126
|
}
|
|
127
|
+
// #4978: a wave job's evidence job that already ran signed for the stopped try; GitLab runs again only the jobs it skipped.
|
|
128
|
+
const found = Array.isArray(jobs) ? jobs.find((j) => isObject(j) && j.name === gitlabEvidenceJobOf(name)) : undefined;
|
|
129
|
+
if (isObject(found) && GITLAB_FINISHED.has(String(found.status)))
|
|
130
|
+
evidence = found;
|
|
114
131
|
}
|
|
115
132
|
if (opts.dryRun)
|
|
116
|
-
return wouldResume(`retry job ${loc.job}`);
|
|
133
|
+
return wouldResume(`retry job ${loc.job}${evidence ? ` and its evidence job ${String(evidence.id)}` : ""}`);
|
|
117
134
|
const retried = await call("POST", `${project}/jobs/${loc.job}/retry`);
|
|
118
135
|
const id = isObject(retried) && retried.id !== undefined ? ` as job ${String(retried.id)}` : "";
|
|
119
|
-
|
|
136
|
+
let also = "";
|
|
137
|
+
if (evidence) {
|
|
138
|
+
// It needs the wave job, so it waits for the retried one; `ci evidence sign --from-job` waits for it too, should it start first.
|
|
139
|
+
const again = await call("POST", `${project}/jobs/${String(evidence.id)}/retry`);
|
|
140
|
+
also = `, and its evidence job ${String(evidence.id)}${isObject(again) && again.id !== undefined ? ` as job ${String(again.id)}` : ""}`;
|
|
141
|
+
}
|
|
142
|
+
return { status: "resumed", forge: "gitlab", how: `retried job ${loc.job}${id}${also}`, ...url };
|
|
120
143
|
}
|
|
121
144
|
const call = client(loc.api, { Authorization: `token ${opts.token}`, Accept: "application/json" }, fetchImpl);
|
|
122
145
|
const repo = `/repos/${loc.repo}`;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/** The render tree of the running check, for chant's own writers and a product's scripts. */
|
|
2
|
+
export declare const GENERATED_OUT_ENV = "CHANT_GENERATED_OUT";
|
|
3
|
+
/** The product root the check renders for: the committed paths are relative to it. */
|
|
4
|
+
export declare const GENERATED_ROOT_ENV = "CHANT_GENERATED_ROOT";
|
|
5
|
+
/**
|
|
6
|
+
* One render: a command that writes some of the product's generated files,
|
|
7
|
+
* or (#4950) a module whose export returns them. Each render has `run`, or
|
|
8
|
+
* `module` and `export`.
|
|
9
|
+
*/
|
|
10
|
+
export interface GeneratedRender {
|
|
11
|
+
/** A short name, in the output: `ci`, `images`. */
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* A shell command run in the product root. `{out}` is the render tree,
|
|
15
|
+
* quoted for the shell; the command writes each file at its committed path
|
|
16
|
+
* below it (`npx chant build ci -o {out}/.github/workflows/ci.yml`).
|
|
17
|
+
*/
|
|
18
|
+
run?: string;
|
|
19
|
+
/**
|
|
20
|
+
* #4950: a TypeScript or JavaScript module, relative to the product root,
|
|
21
|
+
* whose {@link export} is a `{ path: text }` object, or a function that
|
|
22
|
+
* returns one. chant imports it and writes each file at its path below the
|
|
23
|
+
* render tree, as `chant dev render <module> <export>` writes it in place.
|
|
24
|
+
*/
|
|
25
|
+
module?: string;
|
|
26
|
+
/** The export of {@link module} that renders the files: `dockerfiles`. */
|
|
27
|
+
export?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The committed files it renders, relative to the product root. A `*` in a
|
|
30
|
+
* path's last segment matches within it (`images/Dockerfile.*`), and then
|
|
31
|
+
* every match on either side must have its twin. A command render with no
|
|
32
|
+
* files passes when its command exits 0 (a script with a check of its
|
|
33
|
+
* own); a module render with no files compares every file it renders.
|
|
34
|
+
*/
|
|
35
|
+
files?: string[];
|
|
36
|
+
}
|
|
37
|
+
/** `chantGenerated` in a product's root package.json (#4909). */
|
|
38
|
+
export interface GeneratedCheckConfig {
|
|
39
|
+
/** The command that writes the committed files, named in a failure: `just ci`. */
|
|
40
|
+
regenerate?: string;
|
|
41
|
+
renders: GeneratedRender[];
|
|
42
|
+
}
|
|
43
|
+
export interface GeneratedRenderResult {
|
|
44
|
+
name: string;
|
|
45
|
+
/** The command as run, `{out}` filled in. */
|
|
46
|
+
command: string;
|
|
47
|
+
exitCode: number;
|
|
48
|
+
/** Its stdout and stderr, together. */
|
|
49
|
+
output: string;
|
|
50
|
+
/** The committed files compared, relative to the product root. */
|
|
51
|
+
files: string[];
|
|
52
|
+
}
|
|
53
|
+
export interface GeneratedCheckResult {
|
|
54
|
+
ok: boolean;
|
|
55
|
+
/** The render tree, left in place. */
|
|
56
|
+
out: string;
|
|
57
|
+
problems: string[];
|
|
58
|
+
renders: GeneratedRenderResult[];
|
|
59
|
+
/** Each committed file that matched its render. */
|
|
60
|
+
matched: string[];
|
|
61
|
+
}
|
|
62
|
+
/** The `chantGenerated` field of the package.json in `productDir`, or undefined. Throws on a malformed one. */
|
|
63
|
+
export declare function readGeneratedCheckConfig(productDir: string): GeneratedCheckConfig | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Where a chant writer puts `path` (absolute): under a check, a path inside
|
|
66
|
+
* the product root moves to the same place in the render tree, so a check
|
|
67
|
+
* never writes the product's files. Outside a check, `path` itself.
|
|
68
|
+
*/
|
|
69
|
+
export declare function renderPathOf(path: string): string;
|
|
70
|
+
/** The committed path a render-tree path stands for, so a header names it; any other path is itself. */
|
|
71
|
+
export declare function committedPathOf(path: string): string;
|
|
72
|
+
/** Whether `path` (absolute) is in the render tree of a running check. */
|
|
73
|
+
export declare function isRenderPath(path: string): boolean;
|
|
74
|
+
/** A short line diff of two texts: the first lines that differ, with a little context. */
|
|
75
|
+
export declare function diffLines(committed: string, rendered: string, max?: number): string[];
|
|
76
|
+
export interface GeneratedCheckOptions {
|
|
77
|
+
/** Only these renders, by name. */
|
|
78
|
+
only?: string[];
|
|
79
|
+
/** The render tree's parent directory (default: the OS temp directory). */
|
|
80
|
+
tmpDir?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Render the product's declared generated files into a fresh directory under
|
|
84
|
+
* the OS temp directory and compare each with the committed file (#4909).
|
|
85
|
+
* The directory is left in place and named in the result.
|
|
86
|
+
*/
|
|
87
|
+
export declare function checkGenerated(productDir: string, config: GeneratedCheckConfig, opts?: GeneratedCheckOptions): Promise<GeneratedCheckResult>;
|
|
88
|
+
//# sourceMappingURL=generated-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-check.d.ts","sourceRoot":"","sources":["../src/generated-check.ts"],"names":[],"mappings":"AA2CA,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,sFAAsF;AACtF,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,iEAAiE;AACjE,MAAM,WAAW,oBAAoB;IACnC,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,mDAAmD;IACnD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,+GAA+G;AAC/G,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAwB7F;AAkBD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,wGAAwG;AACxG,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED,0EAA0E;AAC1E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGlD;AAiBD,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAK,GAAG,MAAM,EAAE,CAmBjF;AAcD,MAAM,WAAW,qBAAqB;IACpC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,IAAI,GAAE,qBAA0B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAwEtJ"}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/generated-check` (#4909): the check that a product's
|
|
3
|
+
* committed generated files are what their sources render.
|
|
4
|
+
*
|
|
5
|
+
* A product commits files that chant or its own scripts render from
|
|
6
|
+
* TypeScript: workflows GitHub reads, Dockerfiles, a JSON Schema, a stack's
|
|
7
|
+
* configs. Each product carried its own drift check for them: terragucci's
|
|
8
|
+
* `just ci-check` rendered every one into a `mktemp -d` dir, compared it with
|
|
9
|
+
* `diff -u` and cleaned up with `rm -rf`, and plywood's `build-images.mjs
|
|
10
|
+
* --check` and `build-schema.mjs --check` compared in memory. Here a product
|
|
11
|
+
* declares its renders in `chantGenerated` in its root package.json, and
|
|
12
|
+
* `chant dev generated-check` runs them:
|
|
13
|
+
*
|
|
14
|
+
* 1. make one directory under the OS temp directory, the render tree;
|
|
15
|
+
* 2. run every render's command in the product root at once, with `{out}`
|
|
16
|
+
* in the command and `CHANT_GENERATED_OUT` in its environment naming that
|
|
17
|
+
* tree, so each writes its files at their committed paths below it;
|
|
18
|
+
* 3. compare each declared file with its render, in declaration order, and
|
|
19
|
+
* fail naming every file that differs, is missing on either side, or a
|
|
20
|
+
* render that failed.
|
|
21
|
+
*
|
|
22
|
+
* The render tree is never removed: it is left for the OS to clear, and the
|
|
23
|
+
* check prints where it is, so a failure can be read there.
|
|
24
|
+
*
|
|
25
|
+
* chant's own writers read `CHANT_GENERATED_OUT` too ({@link renderPathOf},
|
|
26
|
+
* {@link committedPathOf}): under a check, `chant ci workflow` and `chant
|
|
27
|
+
* release workflow` write every file into the render tree, the trigger edits
|
|
28
|
+
* to other workflows included, and name the committed path in their header,
|
|
29
|
+
* so the render matches the file that was written without `--output`. #4950:
|
|
30
|
+
* with no `--output` they write into the render tree too.
|
|
31
|
+
*
|
|
32
|
+
* A render can also be a module and its export (#4950, `./render-module`):
|
|
33
|
+
* the check imports the module and writes the `{ path: text }` files the
|
|
34
|
+
* export returns below the render tree, with no command or bundler.
|
|
35
|
+
*
|
|
36
|
+
* This module imports only Node's own modules; a module render loads
|
|
37
|
+
* `./render-module` when it runs.
|
|
38
|
+
*/
|
|
39
|
+
import { spawn } from "node:child_process";
|
|
40
|
+
import { existsSync, mkdtempSync, readdirSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
41
|
+
import { tmpdir } from "node:os";
|
|
42
|
+
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
43
|
+
/** The render tree of the running check, for chant's own writers and a product's scripts. */
|
|
44
|
+
export const GENERATED_OUT_ENV = "CHANT_GENERATED_OUT";
|
|
45
|
+
/** The product root the check renders for: the committed paths are relative to it. */
|
|
46
|
+
export const GENERATED_ROOT_ENV = "CHANT_GENERATED_ROOT";
|
|
47
|
+
/** The `chantGenerated` field of the package.json in `productDir`, or undefined. Throws on a malformed one. */
|
|
48
|
+
export function readGeneratedCheckConfig(productDir) {
|
|
49
|
+
const f = join(productDir, "package.json");
|
|
50
|
+
if (!existsSync(f))
|
|
51
|
+
return undefined;
|
|
52
|
+
const raw = JSON.parse(readFileSync(f, "utf8")).chantGenerated;
|
|
53
|
+
if (raw === undefined)
|
|
54
|
+
return undefined;
|
|
55
|
+
const c = raw;
|
|
56
|
+
if (!c || typeof c !== "object" || !Array.isArray(c.renders))
|
|
57
|
+
throw new Error(`${f}: chantGenerated needs a renders list`);
|
|
58
|
+
const names = new Set();
|
|
59
|
+
for (const [i, r] of c.renders.entries()) {
|
|
60
|
+
if (!r || typeof r.name !== "string" || !r.name)
|
|
61
|
+
throw new Error(`${f}: chantGenerated.renders[${i}] needs a name and a run command`);
|
|
62
|
+
const isRun = r.run !== undefined;
|
|
63
|
+
const isModule = r.module !== undefined || r.export !== undefined;
|
|
64
|
+
if (isRun === isModule)
|
|
65
|
+
throw new Error(`${f}: chantGenerated.renders[${i}] needs a run command, or a module and its export`);
|
|
66
|
+
if (isRun && (typeof r.run !== "string" || !r.run))
|
|
67
|
+
throw new Error(`${f}: chantGenerated.renders[${i}] needs a name and a run command`);
|
|
68
|
+
if (isModule && (typeof r.module !== "string" || !r.module || typeof r.export !== "string" || !r.export))
|
|
69
|
+
throw new Error(`${f}: chantGenerated.renders[${i}] needs a module and the name of its export`);
|
|
70
|
+
if (isModule && (r.module.startsWith("/") || r.module.split("/").includes("..")))
|
|
71
|
+
throw new Error(`${f}: chantGenerated.renders[${i}].module must be a path inside the product`);
|
|
72
|
+
if (names.has(r.name))
|
|
73
|
+
throw new Error(`${f}: chantGenerated.renders names '${r.name}' twice`);
|
|
74
|
+
names.add(r.name);
|
|
75
|
+
if (r.files !== undefined && (!Array.isArray(r.files) || r.files.some((p) => typeof p !== "string" || p.startsWith("/") || p.split("/").includes("..")))) {
|
|
76
|
+
throw new Error(`${f}: chantGenerated.renders[${i}].files must be paths inside the product`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (c.regenerate !== undefined && typeof c.regenerate !== "string")
|
|
80
|
+
throw new Error(`${f}: chantGenerated.regenerate must be a command`);
|
|
81
|
+
return c;
|
|
82
|
+
}
|
|
83
|
+
/** Quote one argument for `sh`. */
|
|
84
|
+
const shellQuote = (s) => (/^[A-Za-z0-9._\/=:@%+,-]+$/.test(s) ? s : `'${s.replace(/'/g, `'\\''`)}'`);
|
|
85
|
+
/** The render tree and product root of the running check, or undefined outside one. */
|
|
86
|
+
function renderEnv() {
|
|
87
|
+
const out = process.env[GENERATED_OUT_ENV];
|
|
88
|
+
const root = process.env[GENERATED_ROOT_ENV];
|
|
89
|
+
return out && root ? { out: resolve(out), root: resolve(root) } : undefined;
|
|
90
|
+
}
|
|
91
|
+
/** Whether `path` is `dir` or below it. */
|
|
92
|
+
const within = (dir, path) => {
|
|
93
|
+
const r = relative(dir, resolve(path));
|
|
94
|
+
return !r.startsWith("..") && !isAbsolute(r);
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Where a chant writer puts `path` (absolute): under a check, a path inside
|
|
98
|
+
* the product root moves to the same place in the render tree, so a check
|
|
99
|
+
* never writes the product's files. Outside a check, `path` itself.
|
|
100
|
+
*/
|
|
101
|
+
export function renderPathOf(path) {
|
|
102
|
+
const env = renderEnv();
|
|
103
|
+
if (!env || within(env.out, path) || !within(env.root, path))
|
|
104
|
+
return path;
|
|
105
|
+
return join(env.out, relative(env.root, path));
|
|
106
|
+
}
|
|
107
|
+
/** The committed path a render-tree path stands for, so a header names it; any other path is itself. */
|
|
108
|
+
export function committedPathOf(path) {
|
|
109
|
+
const env = renderEnv();
|
|
110
|
+
if (!env || !within(env.out, path))
|
|
111
|
+
return path;
|
|
112
|
+
return join(env.root, relative(env.out, path));
|
|
113
|
+
}
|
|
114
|
+
/** Whether `path` (absolute) is in the render tree of a running check. */
|
|
115
|
+
export function isRenderPath(path) {
|
|
116
|
+
const env = renderEnv();
|
|
117
|
+
return env !== undefined && within(env.out, path);
|
|
118
|
+
}
|
|
119
|
+
/** The files a declared path names under `base`, relative to it: the path itself, or a last-segment `*` pattern's matches. */
|
|
120
|
+
function expand(base, path) {
|
|
121
|
+
const last = path.lastIndexOf("/");
|
|
122
|
+
const dir = last < 0 ? "" : path.slice(0, last);
|
|
123
|
+
const name = path.slice(last + 1);
|
|
124
|
+
if (!name.includes("*"))
|
|
125
|
+
return existsSync(join(base, path)) ? [path] : [];
|
|
126
|
+
const re = new RegExp(`^${name.split("*").map((p) => p.replace(/[.+?^${}()|[\]\\]/g, "\\$&")).join("[^/]*")}$`);
|
|
127
|
+
const at = join(base, dir);
|
|
128
|
+
if (!existsSync(at) || !statSync(at).isDirectory())
|
|
129
|
+
return [];
|
|
130
|
+
return readdirSync(at)
|
|
131
|
+
.filter((f) => re.test(f) && statSync(join(at, f)).isFile())
|
|
132
|
+
.sort()
|
|
133
|
+
.map((f) => (dir ? `${dir}/${f}` : f));
|
|
134
|
+
}
|
|
135
|
+
/** A short line diff of two texts: the first lines that differ, with a little context. */
|
|
136
|
+
export function diffLines(committed, rendered, max = 12) {
|
|
137
|
+
const a = committed.split("\n");
|
|
138
|
+
const b = rendered.split("\n");
|
|
139
|
+
let start = 0;
|
|
140
|
+
while (start < a.length && start < b.length && a[start] === b[start])
|
|
141
|
+
start++;
|
|
142
|
+
let endA = a.length;
|
|
143
|
+
let endB = b.length;
|
|
144
|
+
while (endA > start && endB > start && a[endA - 1] === b[endB - 1]) {
|
|
145
|
+
endA--;
|
|
146
|
+
endB--;
|
|
147
|
+
}
|
|
148
|
+
const out = [`@@ line ${start + 1} @@`];
|
|
149
|
+
for (const l of a.slice(Math.max(0, start - 2), start))
|
|
150
|
+
out.push(` ${l}`);
|
|
151
|
+
const removed = a.slice(start, endA).map((l) => `- ${l}`);
|
|
152
|
+
const added = b.slice(start, endB).map((l) => `+ ${l}`);
|
|
153
|
+
const body = [...removed, ...added];
|
|
154
|
+
out.push(...body.slice(0, max));
|
|
155
|
+
if (body.length > max)
|
|
156
|
+
out.push(` ... ${body.length - max} more changed lines`);
|
|
157
|
+
return out;
|
|
158
|
+
}
|
|
159
|
+
/** Run one render; resolves with its exit code and output. */
|
|
160
|
+
function runRender(command, cwd, env) {
|
|
161
|
+
return new Promise((done) => {
|
|
162
|
+
const child = spawn("sh", ["-c", command], { cwd, env, stdio: ["ignore", "pipe", "pipe"] });
|
|
163
|
+
const chunks = [];
|
|
164
|
+
child.stdout.on("data", (c) => chunks.push(c));
|
|
165
|
+
child.stderr.on("data", (c) => chunks.push(c));
|
|
166
|
+
child.on("error", (err) => done({ exitCode: 127, output: String(err) }));
|
|
167
|
+
child.on("close", (code, signal) => done({ exitCode: code ?? (signal ? 128 : 1), output: Buffer.concat(chunks).toString("utf8") }));
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Render the product's declared generated files into a fresh directory under
|
|
172
|
+
* the OS temp directory and compare each with the committed file (#4909).
|
|
173
|
+
* The directory is left in place and named in the result.
|
|
174
|
+
*/
|
|
175
|
+
export async function checkGenerated(productDir, config, opts = {}) {
|
|
176
|
+
const root = realpathSync(resolve(productDir));
|
|
177
|
+
const out = realpathSync(mkdtempSync(join(opts.tmpDir ?? tmpdir(), "chant-generated-")));
|
|
178
|
+
const problems = [];
|
|
179
|
+
let renders = config.renders;
|
|
180
|
+
if (opts.only?.length) {
|
|
181
|
+
const unknown = opts.only.filter((n) => !renders.some((r) => r.name === n));
|
|
182
|
+
if (unknown.length)
|
|
183
|
+
problems.push(`chantGenerated has no render named ${unknown.map((n) => `'${n}'`).join(", ")}`);
|
|
184
|
+
renders = renders.filter((r) => opts.only.includes(r.name));
|
|
185
|
+
}
|
|
186
|
+
const env = { ...process.env, [GENERATED_OUT_ENV]: out, [GENERATED_ROOT_ENV]: root };
|
|
187
|
+
const ran = await Promise.all(renders.map(async (r) => {
|
|
188
|
+
if (r.module !== undefined) {
|
|
189
|
+
// #4950: a module render runs here, in chant's process, with the
|
|
190
|
+
// TypeScript loader and chant served as itself. Exit 1 and the error
|
|
191
|
+
// stand in for a command's exit code and output.
|
|
192
|
+
const command = `chant dev render ${shellQuote(r.module)} ${shellQuote(r.export)}`;
|
|
193
|
+
try {
|
|
194
|
+
const { renderModuleFiles, writeRenderedFiles } = await import("./render-module.js");
|
|
195
|
+
const rendered = await renderModuleFiles(r.module, r.export, root);
|
|
196
|
+
writeRenderedFiles(out, rendered);
|
|
197
|
+
return { r, command, exitCode: 0, output: "", rendered: Object.keys(rendered) };
|
|
198
|
+
}
|
|
199
|
+
catch (err) {
|
|
200
|
+
return { r, command, exitCode: 1, output: err instanceof Error ? err.message : String(err) };
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
const command = r.run.split("{out}").join(shellQuote(out));
|
|
204
|
+
return { r, command, ...(await runRender(command, root, env)) };
|
|
205
|
+
}));
|
|
206
|
+
const results = [];
|
|
207
|
+
const matched = [];
|
|
208
|
+
const hint = config.regenerate ? ` Run '${config.regenerate}' and commit the result.` : "";
|
|
209
|
+
for (const { r, command, exitCode, output, rendered } of ran) {
|
|
210
|
+
const files = [];
|
|
211
|
+
results.push({ name: r.name, command, exitCode, output, files });
|
|
212
|
+
if (exitCode !== 0) {
|
|
213
|
+
problems.push(`render '${r.name}' exited ${exitCode}: ${command}${output.trim() ? `\n${output.trimEnd().split("\n").map((l) => ` ${l}`).join("\n")}` : ""}`);
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
// A module render with no files compares every file it rendered.
|
|
217
|
+
for (const path of r.files ?? rendered ?? []) {
|
|
218
|
+
const committed = expand(root, path);
|
|
219
|
+
const rendered = expand(out, path);
|
|
220
|
+
if (!path.includes("*") && rendered.length === 0) {
|
|
221
|
+
problems.push(`render '${r.name}' wrote no ${path} under the render tree`);
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
if (path.includes("*") && committed.length === 0 && rendered.length === 0) {
|
|
225
|
+
problems.push(`${path} matches no file, committed or rendered by '${r.name}'`);
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
for (const f of [...new Set([...committed, ...rendered])].sort()) {
|
|
229
|
+
files.push(f);
|
|
230
|
+
if (!rendered.includes(f)) {
|
|
231
|
+
problems.push(`${f} is committed, but '${r.name}' no longer renders it.${hint}`);
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
if (!committed.includes(f)) {
|
|
235
|
+
problems.push(`${f} is what '${r.name}' renders, but it is not committed.${hint}`);
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
const a = readFileSync(join(root, f), "utf8");
|
|
239
|
+
const b = readFileSync(join(out, f), "utf8");
|
|
240
|
+
if (a === b)
|
|
241
|
+
matched.push(f);
|
|
242
|
+
else
|
|
243
|
+
problems.push(`${f} is not what '${r.name}' renders.${hint}\n${diffLines(a, b).map((l) => ` ${l}`).join("\n")}`);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return { ok: problems.length === 0, out, problems, renders: results, matched };
|
|
248
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The container images the workflows chant generates run, each pinned by the
|
|
3
|
+
* digest of its image index (#4941), as {@link ../action-pins.ts} pins the
|
|
4
|
+
* actions by commit. A tag can move; a digest cannot. A generator takes its
|
|
5
|
+
* image reference from here, so an update is one change to this table. Each
|
|
6
|
+
* row names the tag it followed when it was resolved, which the reference
|
|
7
|
+
* keeps beside the digest so a reader sees the release.
|
|
8
|
+
*
|
|
9
|
+
* Refresh a row by resolving its tag to the index digest:
|
|
10
|
+
*
|
|
11
|
+
* docker buildx imagetools inspect tonistiigi/binfmt:qemu-v10.2.3 --format '{{.Manifest.Digest}}'
|
|
12
|
+
*/
|
|
13
|
+
export interface ImagePin {
|
|
14
|
+
/** The repository, as `docker run` names it: `tonistiigi/binfmt`. */
|
|
15
|
+
readonly repository: string;
|
|
16
|
+
/** The tag the row followed when it was resolved. */
|
|
17
|
+
readonly tag: string;
|
|
18
|
+
/** The image index digest, `sha256:<hex>`. */
|
|
19
|
+
readonly digest: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const IMAGE_PINS: {
|
|
22
|
+
readonly binfmt: ImagePin;
|
|
23
|
+
};
|
|
24
|
+
/** The reference a pin is run by: `<repository>:<tag>@<digest>`. Docker pulls by the digest and ignores the tag. */
|
|
25
|
+
export declare const imageRef: (p: ImagePin) => string;
|
|
26
|
+
//# sourceMappingURL=image-pins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-pins.d.ts","sourceRoot":"","sources":["../src/image-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,QAAQ;IACvB,qEAAqE;IACrE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,qDAAqD;IACrD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAID,eAAO,MAAM,UAAU;;CAGsB,CAAC;AAE9C,oHAAoH;AACpH,eAAO,MAAM,QAAQ,MAAO,QAAQ,KAAG,MAAgD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The container images the workflows chant generates run, each pinned by the
|
|
3
|
+
* digest of its image index (#4941), as {@link ../action-pins.ts} pins the
|
|
4
|
+
* actions by commit. A tag can move; a digest cannot. A generator takes its
|
|
5
|
+
* image reference from here, so an update is one change to this table. Each
|
|
6
|
+
* row names the tag it followed when it was resolved, which the reference
|
|
7
|
+
* keeps beside the digest so a reader sees the release.
|
|
8
|
+
*
|
|
9
|
+
* Refresh a row by resolving its tag to the index digest:
|
|
10
|
+
*
|
|
11
|
+
* docker buildx imagetools inspect tonistiigi/binfmt:qemu-v10.2.3 --format '{{.Manifest.Digest}}'
|
|
12
|
+
*/
|
|
13
|
+
const pin = (repository, tag, digest) => ({ repository, tag, digest });
|
|
14
|
+
export const IMAGE_PINS = {
|
|
15
|
+
// #4941: the GitLab release workflow's QEMU binfmt setup (#4876); `latest` pointed at this index on 2026-11-10.
|
|
16
|
+
binfmt: pin("tonistiigi/binfmt", "qemu-v10.2.3", "sha256:400a4873b838d1b89194d982c45e5fb3cda4593fbfd7e08a02e76b03b21166f0"),
|
|
17
|
+
};
|
|
18
|
+
/** The reference a pin is run by: `<repository>:<tag>@<digest>`. Docker pulls by the digest and ignores the tag. */
|
|
19
|
+
export const imageRef = (p) => `${p.repository}:${p.tag}@${p.digest}`;
|
package/dist/lexicon.d.ts
CHANGED
|
@@ -677,6 +677,8 @@ export interface OpSetupUsesStep {
|
|
|
677
677
|
* `assertSetupSteps`, which refuses both at build time.
|
|
678
678
|
*/
|
|
679
679
|
uses: string;
|
|
680
|
+
/** The step's name on GitHub and Forgejo, such as "Log in to AWS" (#4932). GitLab script lines have none. Absent: the forge names it from the action. */
|
|
681
|
+
name?: string;
|
|
680
682
|
/** The action's inputs, emitted as the step's `with:` mapping. */
|
|
681
683
|
with?: Record<string, string | number | boolean>;
|
|
682
684
|
/** Environment for this step alone, emitted as the step's `env:` mapping. */
|
|
@@ -686,6 +688,8 @@ export interface OpSetupUsesStep {
|
|
|
686
688
|
export interface OpSetupRunStep {
|
|
687
689
|
/** The shell line, emitted as the step's `run:`. */
|
|
688
690
|
run: string;
|
|
691
|
+
/** The step's name on GitHub and Forgejo, such as "Log in to AWS" (#4932). GitLab script lines have none. Absent: the forge shows the line. */
|
|
692
|
+
name?: string;
|
|
689
693
|
/** Environment for this step alone, emitted as the step's `env:` mapping. */
|
|
690
694
|
env?: Record<string, string>;
|
|
691
695
|
}
|
|
@@ -1019,6 +1023,17 @@ export interface OpWavesPipelineOptions extends Pick<ComponentPipelineOptions, "
|
|
|
1019
1023
|
* wave is planned. Absent: the jobs render as without it.
|
|
1020
1024
|
*/
|
|
1021
1025
|
evidence?: import("./ci-evidence-jobs.js").PipelineEvidence;
|
|
1026
|
+
/**
|
|
1027
|
+
* A spec the job renders at run time (#4982,
|
|
1028
|
+
* `@intentius/chant/op/op-waves-render-spec`): every wave, deciding and
|
|
1029
|
+
* share job and the policy step runs `chant run wave --render-spec`, with
|
|
1030
|
+
* `CHANT_WAVES_SPEC_COMMAND` set to `command`, which prints the spec at
|
|
1031
|
+
* the commit in `CHANT_WAVES_SPEC_AT`. The spec handed to the generator
|
|
1032
|
+
* is the pipeline's shape (its waves, shares, job groups, `cloud`,
|
|
1033
|
+
* runners, environments and `holds.policy`); the rendered one sets the
|
|
1034
|
+
* rules. Absent: the jobs read the committed spec as before.
|
|
1035
|
+
*/
|
|
1036
|
+
renderSpec?: import("./op/op-waves-render-spec.js").OpWavesRenderSpec;
|
|
1022
1037
|
}
|
|
1023
1038
|
/** A run step a product adds to a generated job (#4791): its name, and its shell lines in order. */
|
|
1024
1039
|
export interface OpWaveRunStep {
|
|
@@ -1728,6 +1743,18 @@ export interface LexiconPlugin {
|
|
|
1728
1743
|
* translate `.github/workflows/*.yml` into `.gitlab-ci.yml`.
|
|
1729
1744
|
*/
|
|
1730
1745
|
migrationSource?(from: string, to?: string): MigrationSource | undefined;
|
|
1746
|
+
/**
|
|
1747
|
+
* What a declared entity {@link describeResources} confirmed absent is,
|
|
1748
|
+
* when no snapshot says it was deployed (#4896). Left out, it is
|
|
1749
|
+
* `pending`: not deployed yet, the right reading for a cloud stack. A
|
|
1750
|
+
* lexicon whose environments always hold what is declared once they are
|
|
1751
|
+
* set up says `missing`, gone: the sql lexicon does, since a server that
|
|
1752
|
+
* lacks a declared table lost it. `chant lifecycle diff --live --json`
|
|
1753
|
+
* writes it as the lexicon section's `absent`, and the drift records
|
|
1754
|
+
* (`lexiconDriftRecords` on `@intentius/chant/drift-record`) read it from
|
|
1755
|
+
* there. The live diff's own `missing` list is unchanged.
|
|
1756
|
+
*/
|
|
1757
|
+
liveAbsentStatus?: "pending" | "missing";
|
|
1731
1758
|
/**
|
|
1732
1759
|
* Query deployed resources and return API metadata. Opt-in.
|
|
1733
1760
|
*
|