@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
|
@@ -2,6 +2,7 @@ import { writeFileSync, mkdirSync } from "node:fs";
|
|
|
2
2
|
import { dirname, resolve } from "node:path";
|
|
3
3
|
import { buildCommand, buildCommandWatch, printErrors, printWarnings, resolveBuildFormat } from "../commands/build.js";
|
|
4
4
|
import { formatError, formatInfo, formatSuccess, formatBold } from "../format.js";
|
|
5
|
+
import { reportUninstalledDependencies } from "../dependencies.js";
|
|
5
6
|
import { generateComponentsPipeline } from "../../components/cli-support.js";
|
|
6
7
|
import { loadChantConfigUpward } from "../../config.js";
|
|
7
8
|
import { resolveCliBuildParams, parseParamFlags } from "../build-params-cli.js";
|
|
@@ -12,15 +13,23 @@ import { resolvePromotionSource } from "../../components/promote-order.js";
|
|
|
12
13
|
* and the branch, and with `--events-json` and `--report-url` (#4007) the
|
|
13
14
|
* flags the generated jobs pass to pr-plan and pr-apply. `--pr-build` and
|
|
14
15
|
* `--pr-build-command` (#4088) add the build and lint steps before both.
|
|
16
|
+
* `reportUrl` is `--report-url`, else the workspace's `ci.reportUrl` (#4160).
|
|
17
|
+
* `requireReview` is `--require-review`, or a workspace that opts into the
|
|
18
|
+
* `review-rules` security group (#4168); off otherwise. `requireRunnerStart`
|
|
19
|
+
* is `--require-runner-start`, or the `isolated-runners` group. `--apply-on-merge`
|
|
20
|
+
* (#4168) writes the apply job on merge in place of the record job.
|
|
15
21
|
*/
|
|
16
|
-
function prLoopOption(args) {
|
|
22
|
+
function prLoopOption(args, reportUrl, requireReview = false, requireRunnerStart = false) {
|
|
17
23
|
return {
|
|
18
24
|
...(args.gate ? { gate: args.gate } : {}),
|
|
19
25
|
...(args.branch ? { branch: args.branch } : {}),
|
|
20
26
|
...(args.eventsJson ? { events: true } : {}),
|
|
21
|
-
...(
|
|
27
|
+
...(reportUrl ? { reportUrl } : {}),
|
|
22
28
|
...(args.prBuild ? { build: true } : {}),
|
|
23
29
|
...(args.prBuildCommand ? { buildCommand: args.prBuildCommand } : {}),
|
|
30
|
+
...(args.requireReview === true || requireReview ? { requireReview: true } : {}),
|
|
31
|
+
...(args.requireRunnerStart === true || requireRunnerStart ? { requireRunnerStart: true } : {}),
|
|
32
|
+
...(args.applyOnMerge ? { applyOnMerge: true } : {}),
|
|
24
33
|
};
|
|
25
34
|
}
|
|
26
35
|
/**
|
|
@@ -84,6 +93,25 @@ async function runGenerateComponents(ctx) {
|
|
|
84
93
|
const found = findWorkspaceRoot(resolve(args.path));
|
|
85
94
|
let plan;
|
|
86
95
|
let memberPipeline;
|
|
96
|
+
// #4160: without --report-url, the declaration's ci.reportUrl. Read only inside a workspace.
|
|
97
|
+
let reportUrl = args.reportUrl;
|
|
98
|
+
if (found && args.prLoop && !reportUrl) {
|
|
99
|
+
try {
|
|
100
|
+
reportUrl = await (await import("../../workspace/ci-report-url.js")).declaredReportUrl(resolve(args.path));
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
console.error(formatError({ message: err instanceof Error ? err.message : String(err) }));
|
|
104
|
+
return 1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// #4168: the review-rules group turns on --require-review in the generated apply. Read only inside a workspace.
|
|
108
|
+
let reviewRules = false;
|
|
109
|
+
let isolatedRunners = false;
|
|
110
|
+
if (found && args.prLoop) {
|
|
111
|
+
const groups = (await import("../../workspace/security.js")).securityGroupsAt(resolve(args.path));
|
|
112
|
+
reviewRules = groups.has("review-rules");
|
|
113
|
+
isolatedRunners = groups.has("isolated-runners");
|
|
114
|
+
}
|
|
87
115
|
if (found) {
|
|
88
116
|
memberPipeline = await import("../../workspace/member-pipeline.js");
|
|
89
117
|
try {
|
|
@@ -98,7 +126,7 @@ async function runGenerateComponents(ctx) {
|
|
|
98
126
|
params: args.param,
|
|
99
127
|
paramsFile: args.paramsFile,
|
|
100
128
|
...(args.waveGate ? { waveGate: { gate: args.waveGate, ...(args.canary?.length ? { canary: args.canary } : {}), ...(args.base ? { base: args.base } : {}) } } : {}),
|
|
101
|
-
...(args.prLoop ? { prLoop: prLoopOption(args) } : {}),
|
|
129
|
+
...(args.prLoop ? { prLoop: prLoopOption(args, reportUrl, reviewRules, isolatedRunners) } : {}),
|
|
102
130
|
...(args.image ? { image: args.image } : {}),
|
|
103
131
|
...(args.beforeScript?.length ? { beforeScript: args.beforeScript } : {}),
|
|
104
132
|
});
|
|
@@ -125,7 +153,7 @@ async function runGenerateComponents(ctx) {
|
|
|
125
153
|
? { gatedWaves: { gate: args.waveGate, ...(args.canary?.length ? { canary: args.canary } : {}), ...(args.base ? { base: args.base } : {}) } }
|
|
126
154
|
: {}),
|
|
127
155
|
// #3183: a plan job per pull request and an apply job per merge.
|
|
128
|
-
...(args.prLoop ? { prLoop: prLoopOption(args) } : {}),
|
|
156
|
+
...(args.prLoop ? { prLoop: prLoopOption(args, reportUrl, reviewRules, isolatedRunners) } : {}),
|
|
129
157
|
// #4002: the job image and the lines that install what it lacks, chant itself included.
|
|
130
158
|
...(args.image ? { image: args.image } : {}),
|
|
131
159
|
...(args.beforeScript?.length ? { beforeScript: args.beforeScript } : {}),
|
|
@@ -257,6 +285,9 @@ export async function runBuild(ctx) {
|
|
|
257
285
|
for (const w of own)
|
|
258
286
|
seenWarnings.add(w);
|
|
259
287
|
printWarnings(own);
|
|
288
|
+
// #4116: once, before the first failing group's errors.
|
|
289
|
+
if (!result.success && !failed)
|
|
290
|
+
reportUninstalledDependencies(result.errors, resolve(args.path));
|
|
260
291
|
printErrors(result.errors);
|
|
261
292
|
if (!result.success)
|
|
262
293
|
failed = true;
|
|
@@ -304,6 +335,9 @@ export async function runBuild(ctx) {
|
|
|
304
335
|
warnings = warnings.filter((w) => !w.includes('No serializer found for lexicon'));
|
|
305
336
|
}
|
|
306
337
|
printWarnings(warnings);
|
|
338
|
+
// #4116: errors that are imports of uninstalled packages are led by the dependencies message.
|
|
339
|
+
if (!result.success)
|
|
340
|
+
reportUninstalledDependencies(result.errors, resolve(args.path));
|
|
307
341
|
printErrors(result.errors);
|
|
308
342
|
return result.success ? 0 : 1;
|
|
309
343
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fan-out.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/fan-out.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAIH,OAAO,EAA+C,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAe7F,OAAO,EAAmB,KAAK,YAAY,EAAuB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"fan-out.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/fan-out.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAIH,OAAO,EAA+C,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAe7F,OAAO,EAAmB,KAAK,YAAY,EAAuB,MAAM,0BAA0B,CAAC;AASnG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,WAAW,EACnB,IAAI,GAAE;IACJ,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,UAAU,CAAC,EAAE,OAAO,CAAC;CACjB,GACL,OAAO,CAAC;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA+ErE;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAyV9E"}
|
|
@@ -67,9 +67,10 @@ import { approveCommand, gateIsSealed } from "../../op/gate.js";
|
|
|
67
67
|
import { getHeadCommit } from "../../lifecycle/git.js";
|
|
68
68
|
import { remainingFanOut } from "../../components/fan-out.js";
|
|
69
69
|
import { readDeployedOutputs } from "../../components/wave-plan.js";
|
|
70
|
-
import { deployContext } from "../../components/driver.js";
|
|
70
|
+
import { deployContext, failedRunExitCode } from "../../components/driver.js";
|
|
71
71
|
import { resolveCliBuildParams, parseParamFlags } from "../build-params-cli.js";
|
|
72
72
|
import { formatError, formatInfo, formatWarning } from "../format.js";
|
|
73
|
+
import { reportUninstalledDependencies } from "../dependencies.js";
|
|
73
74
|
import { FAN_OUT_GATE_OP } from "../../op/gate-name.js";
|
|
74
75
|
import { resolveBuildRoot } from "./lifecycle.js";
|
|
75
76
|
import { GATED_EXIT_CODE, autoReleaseRun, recordAutoReleasesForRun } from "./run.js";
|
|
@@ -220,10 +221,15 @@ export async function runComponentsFanOut(ctx) {
|
|
|
220
221
|
catch (err) {
|
|
221
222
|
// A cycle or an unknown `dependsOn` refuses here, over the whole graph and
|
|
222
223
|
// before anything is selected (#2417). The message names the members.
|
|
223
|
-
|
|
224
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
225
|
+
reportUninstalledDependencies([message], projectPath); // #4116
|
|
226
|
+
console.error(formatError({ message }));
|
|
224
227
|
return 1;
|
|
225
228
|
}
|
|
226
229
|
if (!derived.success) {
|
|
230
|
+
// #4116: component files that import packages the project has not installed.
|
|
231
|
+
if (derived.error)
|
|
232
|
+
reportUninstalledDependencies([derived.error], projectPath);
|
|
227
233
|
console.error(formatError({ message: derived.error ?? "Could not discover components" }));
|
|
228
234
|
return 1;
|
|
229
235
|
}
|
|
@@ -486,7 +492,9 @@ export async function runComponentsFanOut(ctx) {
|
|
|
486
492
|
...(await summaryLedgerPrefix()),
|
|
487
493
|
...(pending.environment ? { environment: pending.environment } : {}),
|
|
488
494
|
});
|
|
489
|
-
return result.status === "gated" ? GATED_EXIT_CODE :
|
|
495
|
+
return result.status === "gated" ? GATED_EXIT_CODE : failedRunExitCode(result.results);
|
|
490
496
|
}
|
|
491
|
-
|
|
497
|
+
// A step that refused the wave's plan because its target moved since the
|
|
498
|
+
// approval exits 3, the code of a wave whose plan changed (#3997).
|
|
499
|
+
return result.status === "ok" ? 0 : failedRunExitCode(result.results);
|
|
492
500
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/graph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/graph.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,aAAa,CAAC;AA+H9D;;;;;;;;;GASG;AACH;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAE7D"}
|
|
@@ -19,6 +19,7 @@ import { toMermaid } from "../../graph-mermaid.js";
|
|
|
19
19
|
import { toDot } from "../../graph-dot.js";
|
|
20
20
|
import { getLayoutEngine, toLayoutInput } from "../../graph-layout.js";
|
|
21
21
|
import { lintCommand } from "../commands/lint.js";
|
|
22
|
+
import { reportUninstalledDependencies } from "../dependencies.js";
|
|
22
23
|
import { loadPlugins, resolveProjectLexicons, collectBuildRootContributors } from "../plugins.js";
|
|
23
24
|
import { isNoLexiconDetected } from "../../detectLexicon.js";
|
|
24
25
|
import { readFileSync } from "node:fs";
|
|
@@ -526,6 +527,19 @@ async function runComponentGraph(ctx) {
|
|
|
526
527
|
}
|
|
527
528
|
return 0;
|
|
528
529
|
}
|
|
530
|
+
/**
|
|
531
|
+
* The lint gate's refusal. When the lint errors are imports of packages the
|
|
532
|
+
* project has not installed (#4116), the dependencies message leads, and it
|
|
533
|
+
* stands alone when every error is one: the source is not what is wrong.
|
|
534
|
+
*/
|
|
535
|
+
function refuseLintGate(lint, projectPath) {
|
|
536
|
+
const errors = (lint.diagnostics ?? []).filter((d) => d.severity === "error").map((d) => d.message);
|
|
537
|
+
if (reportUninstalledDependencies(errors, projectPath) === "all")
|
|
538
|
+
return;
|
|
539
|
+
console.error(formatError({
|
|
540
|
+
message: "Refusing to emit graph: source has lint errors. Run `chant lint` and fix them first.",
|
|
541
|
+
}));
|
|
542
|
+
}
|
|
529
543
|
/**
|
|
530
544
|
* `chant graph --components --format ir|mermaid|dot|layout` — the component DAG
|
|
531
545
|
* projected into the renderable IR (nodes = components, `groups.byWave` = the
|
|
@@ -563,9 +577,7 @@ async function runComponentGraphView(ctx, format) {
|
|
|
563
577
|
buildParams: componentParams,
|
|
564
578
|
});
|
|
565
579
|
if (!lint.success) {
|
|
566
|
-
|
|
567
|
-
message: "Refusing to emit graph: source has lint errors. Run `chant lint` and fix them first.",
|
|
568
|
-
}));
|
|
580
|
+
refuseLintGate(lint, projectPath);
|
|
569
581
|
return 1;
|
|
570
582
|
}
|
|
571
583
|
const graph = await computeComponentGraph(projectPath, ctx.args.sandbox, componentParams);
|
|
@@ -813,9 +825,7 @@ async function runGraphView(ctx, format) {
|
|
|
813
825
|
buildParams,
|
|
814
826
|
});
|
|
815
827
|
if (!lint.success) {
|
|
816
|
-
|
|
817
|
-
message: "Refusing to emit graph: source has lint errors. Run `chant lint` and fix them first.",
|
|
818
|
-
}));
|
|
828
|
+
refuseLintGate(lint, projectPath);
|
|
819
829
|
return 1;
|
|
820
830
|
}
|
|
821
831
|
const result = await discover(projectPath, { buildParams });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant lifecycle health <env> [lexicon] [--json]` (#4177): whether each
|
|
3
|
+
* declared resource that has a health read is up, separate from drift.
|
|
4
|
+
*
|
|
5
|
+
* It builds the project as `lifecycle diff` does, so the entity names are the
|
|
6
|
+
* graph's node ids, then asks each lexicon with a health read about the
|
|
7
|
+
* entities whose types it names. An environment's declared endpoint is applied
|
|
8
|
+
* for the read, as on the other live reads (#1166).
|
|
9
|
+
*
|
|
10
|
+
* The JSON is the {@link HEALTH_SCHEMA} shape. A single-stack project prints
|
|
11
|
+
* `lexicons` at the top level; a multi-stack one nests them under `stacks`,
|
|
12
|
+
* the same split `lifecycle diff --live --json` makes.
|
|
13
|
+
*/
|
|
14
|
+
import type { CommandContext } from "../registry.js";
|
|
15
|
+
export declare function runLifecycleHealth(ctx: CommandContext): Promise<number>;
|
|
16
|
+
//# sourceMappingURL=lifecycle-health.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-health.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle-health.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAaH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiH7E"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant lifecycle health <env> [lexicon] [--json]` (#4177): whether each
|
|
3
|
+
* declared resource that has a health read is up, separate from drift.
|
|
4
|
+
*
|
|
5
|
+
* It builds the project as `lifecycle diff` does, so the entity names are the
|
|
6
|
+
* graph's node ids, then asks each lexicon with a health read about the
|
|
7
|
+
* entities whose types it names. An environment's declared endpoint is applied
|
|
8
|
+
* for the read, as on the other live reads (#1166).
|
|
9
|
+
*
|
|
10
|
+
* The JSON is the {@link HEALTH_SCHEMA} shape. A single-stack project prints
|
|
11
|
+
* `lexicons` at the top level; a multi-stack one nests them under `stacks`,
|
|
12
|
+
* the same split `lifecycle diff --live --json` makes.
|
|
13
|
+
*/
|
|
14
|
+
import { resolve } from "node:path";
|
|
15
|
+
import { build } from "../../build.js";
|
|
16
|
+
import { loadChantConfig } from "../../config.js";
|
|
17
|
+
import { isObservableDeclarable } from "../../declarable.js";
|
|
18
|
+
import { HEALTH_SCHEMA, healthApplicable, observeHealthFor, summarizeHealth } from "../../health.js";
|
|
19
|
+
import { applyLiveEndpoint } from "../../live-endpoint.js";
|
|
20
|
+
import { CHANT_VERSION } from "../version.js";
|
|
21
|
+
import { commandBuildParams } from "../build-params-cli.js";
|
|
22
|
+
import { resolveBuildModes, resolveProjectBuildOptions } from "../build-options.js";
|
|
23
|
+
import { formatBold, formatError, formatWarning } from "../format.js";
|
|
24
|
+
import { resolveStackTargets } from "./lifecycle.js";
|
|
25
|
+
export async function runLifecycleHealth(ctx) {
|
|
26
|
+
const { args, plugins } = ctx;
|
|
27
|
+
const environment = args.extraPositional;
|
|
28
|
+
const lexiconFilter = args.extraPositional2;
|
|
29
|
+
if (!environment) {
|
|
30
|
+
console.error(formatError({ message: "Environment is required: chant lifecycle health <environment> [lexicon]" }));
|
|
31
|
+
return 1;
|
|
32
|
+
}
|
|
33
|
+
const readers = plugins.filter((p) => p.observeHealth && (p.healthTypes?.length ?? 0) > 0 && (!lexiconFilter || p.name === lexiconFilter));
|
|
34
|
+
if (readers.length === 0) {
|
|
35
|
+
console.error(formatWarning({
|
|
36
|
+
message: lexiconFilter
|
|
37
|
+
? `${lexiconFilter}: no health read in this lexicon`
|
|
38
|
+
: "No configured lexicon has a health read (aws, azure and gcp do)",
|
|
39
|
+
}));
|
|
40
|
+
return 1;
|
|
41
|
+
}
|
|
42
|
+
const projectRoot = resolve(".");
|
|
43
|
+
const { config } = await loadChantConfig(projectRoot);
|
|
44
|
+
const declaredParams = await commandBuildParams(config.buildParams, args);
|
|
45
|
+
if (!declaredParams)
|
|
46
|
+
return 1;
|
|
47
|
+
const targets = resolveStackTargets(args, config);
|
|
48
|
+
const buildOptions = resolveProjectBuildOptions({
|
|
49
|
+
config,
|
|
50
|
+
configDir: projectRoot,
|
|
51
|
+
plugins,
|
|
52
|
+
modes: resolveBuildModes(config, { fold: args.fold, sandbox: args.sandbox }),
|
|
53
|
+
buildParams: declaredParams,
|
|
54
|
+
});
|
|
55
|
+
const serializers = readers.map((p) => p.serializer);
|
|
56
|
+
const endpoint = applyLiveEndpoint(config.environments, environment, readers);
|
|
57
|
+
if (endpoint.notice)
|
|
58
|
+
console.error(formatWarning({ message: endpoint.notice }));
|
|
59
|
+
const perStack = {};
|
|
60
|
+
let single;
|
|
61
|
+
let anyBuildError = false;
|
|
62
|
+
const observedAt = new Date().toISOString();
|
|
63
|
+
try {
|
|
64
|
+
for (const target of targets) {
|
|
65
|
+
const buildResult = await build(target.root, serializers, undefined, buildOptions);
|
|
66
|
+
if (buildResult.errors.length > 0) {
|
|
67
|
+
console.error(formatError({
|
|
68
|
+
message: `Build failed for ${target.stack ? `stack "${target.stack}"` : "project"}; fix errors before reading health`,
|
|
69
|
+
}));
|
|
70
|
+
anyBuildError = true;
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
const byLexicon = {};
|
|
74
|
+
for (const plugin of readers) {
|
|
75
|
+
const declared = new Map();
|
|
76
|
+
for (const [name, entity] of buildResult.entities) {
|
|
77
|
+
if (entity.lexicon === plugin.name && isObservableDeclarable(entity)) {
|
|
78
|
+
declared.set(name, {
|
|
79
|
+
entityType: entity.entityType,
|
|
80
|
+
props: (entity.props != null ? entity.props : {}),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const entities = healthApplicable(plugin, declared);
|
|
85
|
+
if (entities.size === 0)
|
|
86
|
+
continue;
|
|
87
|
+
const raw = buildResult.outputs.get(plugin.name);
|
|
88
|
+
const buildOutput = raw === undefined ? "" : typeof raw === "string" ? raw : raw.primary;
|
|
89
|
+
byLexicon[plugin.name] = await observeHealthFor(plugin, {
|
|
90
|
+
environment,
|
|
91
|
+
buildOutput,
|
|
92
|
+
entities,
|
|
93
|
+
...(target.stack ? { stack: target.stack } : {}),
|
|
94
|
+
...(target.region ? { region: target.region } : {}),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
if (target.stack)
|
|
98
|
+
perStack[target.stack] = byLexicon;
|
|
99
|
+
else
|
|
100
|
+
single = byLexicon;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
finally {
|
|
104
|
+
endpoint.restore();
|
|
105
|
+
}
|
|
106
|
+
const all = single ? [single] : Object.values(perStack);
|
|
107
|
+
const summary = summarizeHealth(all.flatMap((b) => Object.values(b)));
|
|
108
|
+
if (args.json) {
|
|
109
|
+
console.log(JSON.stringify({
|
|
110
|
+
schema: HEALTH_SCHEMA,
|
|
111
|
+
chantVersion: CHANT_VERSION,
|
|
112
|
+
environment,
|
|
113
|
+
observedAt,
|
|
114
|
+
...(single ? { lexicons: single } : { stacks: perStack }),
|
|
115
|
+
summary,
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
if (single)
|
|
120
|
+
renderHealth(single);
|
|
121
|
+
else
|
|
122
|
+
for (const [stack, byLexicon] of Object.entries(perStack)) {
|
|
123
|
+
console.log(`\n${formatBold(`■ stack ${stack}`)}`);
|
|
124
|
+
renderHealth(byLexicon);
|
|
125
|
+
}
|
|
126
|
+
const total = summary.healthy + summary.unhealthy + summary.unknown + summary.unobserved + summary.absent;
|
|
127
|
+
if (total === 0) {
|
|
128
|
+
console.error(formatWarning({ message: "No declared resource has a health read" }));
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
console.error(`${summary.healthy} healthy, ${summary.unhealthy} unhealthy, ${summary.unknown} unknown` +
|
|
132
|
+
(summary.unobserved > 0 ? `, ${summary.unobserved} not observed` : "") +
|
|
133
|
+
(summary.absent > 0 ? `, ${summary.absent} not deployed` : ""));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return anyBuildError ? 1 : 0;
|
|
137
|
+
}
|
|
138
|
+
function renderHealth(byLexicon) {
|
|
139
|
+
for (const [lexicon, result] of Object.entries(byLexicon)) {
|
|
140
|
+
console.log(formatBold(lexicon));
|
|
141
|
+
for (const [name, entry] of Object.entries(result.entities)) {
|
|
142
|
+
console.log(` ${entry.state.padEnd(9)} ${name} (${entry.type}): ${entry.detail}`);
|
|
143
|
+
}
|
|
144
|
+
for (const [name, hole] of Object.entries(result.unobserved)) {
|
|
145
|
+
console.log(` ${"not read".padEnd(9)} ${name}${hole.type ? ` (${hole.type})` : ""}: ${hole.reason}${hole.detail ? `, ${hole.detail}` : ""}`);
|
|
146
|
+
}
|
|
147
|
+
for (const name of result.absent)
|
|
148
|
+
console.log(` ${"absent".padEnd(9)} ${name}: not deployed`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -10,6 +10,31 @@ import type { ChantConfig } from "../../config.js";
|
|
|
10
10
|
* so their build digests stay consistent.
|
|
11
11
|
*/
|
|
12
12
|
export declare function resolveBuildRoot(args: ParsedArgs, config: ChantConfig): string;
|
|
13
|
+
/** One stack a lifecycle command operates on: its build root and, for a
|
|
14
|
+
* multi-stack project, the deployed CloudFormation stack name it observes
|
|
15
|
+
* against. */
|
|
16
|
+
interface StackTarget {
|
|
17
|
+
/** The deployed stack name to observe (undefined ⇒ single-stack convention:
|
|
18
|
+
* the stack named after the environment). */
|
|
19
|
+
stack?: string;
|
|
20
|
+
/** Build root to synthesize this stack from, scoped so its logical ids match
|
|
21
|
+
* what the stack actually deploys. */
|
|
22
|
+
root: string;
|
|
23
|
+
/** Region the stack is deployed in, from `stacks[].region` (#1261). Without
|
|
24
|
+
* it every stack is observed against the ambient region, so a multi-region
|
|
25
|
+
* estate snapshots only the stacks that happen to share it and reports the
|
|
26
|
+
* rest as "no valid resources or artifacts returned". */
|
|
27
|
+
region?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The stacks a lifecycle command (`snapshot`/`diff`) iterates. A multi-stack
|
|
31
|
+
* project declares them via `stacks` in chant.config (#932) — each built from
|
|
32
|
+
* its own `src` and observed against its own live stack `name`. A single-stack
|
|
33
|
+
* project (no `stacks`) resolves to one target built from `sourceDir`/root and
|
|
34
|
+
* observed as the stack named after the environment (unchanged behavior). An
|
|
35
|
+
* explicit `--src` always wins and forces a single scoped target.
|
|
36
|
+
*/
|
|
37
|
+
export declare function resolveStackTargets(args: ParsedArgs, config: ChantConfig): StackTarget[];
|
|
13
38
|
/**
|
|
14
39
|
* chant lifecycle snapshot <environment> [lexicon]
|
|
15
40
|
*/
|
|
@@ -93,4 +118,5 @@ export declare function runLifecycleUnknown(ctx: CommandContext): Promise<number
|
|
|
93
118
|
* an empty list as if it meant "nothing downstream".
|
|
94
119
|
*/
|
|
95
120
|
export declare function runLifecycleAffected(ctx: CommandContext): Promise<number>;
|
|
121
|
+
export {};
|
|
96
122
|
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAE9E;
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAE9E;AAED;;cAEc;AACd,UAAU,WAAW;IACnB;iDAC6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;0CACsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb;;;6DAGyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE,CAMxF;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAyH/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA4C3E;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8B/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA+L3E;AA+sBD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAwR3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA2L/E;AAsBD;;GAEG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiB1E;AAgBD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmE7E;AAiCD;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM9E;AAkBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8D/E"}
|
|
@@ -48,7 +48,7 @@ export function resolveBuildRoot(args, config) {
|
|
|
48
48
|
* observed as the stack named after the environment (unchanged behavior). An
|
|
49
49
|
* explicit `--src` always wins and forces a single scoped target.
|
|
50
50
|
*/
|
|
51
|
-
function resolveStackTargets(args, config) {
|
|
51
|
+
export function resolveStackTargets(args, config) {
|
|
52
52
|
if (args.src)
|
|
53
53
|
return [{ root: resolve(args.src) }];
|
|
54
54
|
if (config.stacks && config.stacks.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lint.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA0BlD,wBAAsB,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA2ClE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolve } from "node:path";
|
|
2
2
|
import { lintCommand, lintCommandWatch, printLintResult } from "../commands/lint.js";
|
|
3
3
|
import { formatError, formatInfo } from "../format.js";
|
|
4
|
+
import { reportUninstalledDependencies } from "../dependencies.js";
|
|
4
5
|
import { commandBuildParams } from "../build-params-cli.js";
|
|
5
6
|
import { loadChantConfigUpward } from "../../config.js";
|
|
6
7
|
/**
|
|
@@ -57,6 +58,11 @@ export async function runLint(ctx) {
|
|
|
57
58
|
sandbox: args.sandbox,
|
|
58
59
|
buildParams,
|
|
59
60
|
});
|
|
61
|
+
// #4116: errors that are imports of uninstalled packages are led by the dependencies message.
|
|
62
|
+
if (!result.success) {
|
|
63
|
+
const errors = result.diagnostics.filter((d) => d.severity === "error").map((d) => d.message);
|
|
64
|
+
reportUninstalledDependencies(errors, resolve(args.path));
|
|
65
|
+
}
|
|
60
66
|
printLintResult(result);
|
|
61
67
|
return result.success ? 0 : 1;
|
|
62
68
|
}
|
|
@@ -19,8 +19,8 @@ export declare function runOperator(ctx: CommandContext): Promise<number>;
|
|
|
19
19
|
*
|
|
20
20
|
* Refuses, before ticking anything:
|
|
21
21
|
* - an environment whose form is `fountain`, because there the composite's
|
|
22
|
-
* Agent and
|
|
23
|
-
* writer beside them;
|
|
22
|
+
* Agent and its conversation are the steward and this process would be a
|
|
23
|
+
* second writer beside them;
|
|
24
24
|
* - a steward whose lease another live process holds (a second local
|
|
25
25
|
* operator for it).
|
|
26
26
|
*/
|
|
@@ -190,8 +190,8 @@ export async function runOperator(ctx) {
|
|
|
190
190
|
*
|
|
191
191
|
* Refuses, before ticking anything:
|
|
192
192
|
* - an environment whose form is `fountain`, because there the composite's
|
|
193
|
-
* Agent and
|
|
194
|
-
* writer beside them;
|
|
193
|
+
* Agent and its conversation are the steward and this process would be a
|
|
194
|
+
* second writer beside them;
|
|
195
195
|
* - a steward whose lease another live process holds (a second local
|
|
196
196
|
* operator for it).
|
|
197
197
|
*/
|
|
@@ -212,7 +212,7 @@ export async function runStewardOperator(ctx) {
|
|
|
212
212
|
if (form !== "local") {
|
|
213
213
|
console.error(formatError({
|
|
214
214
|
message: `steward "${steward.name}" runs on ${form} in environment "${env}", so a local operator for it would be a second writer`,
|
|
215
|
-
hint: `Its turns run
|
|
215
|
+
hint: `Its turns run in the fountain steward "${steward.name}"'s conversation. Run this in an environment the declaration's form makes local, or change the form.`,
|
|
216
216
|
}));
|
|
217
217
|
return 1;
|
|
218
218
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* chant components pr-plan --base <ref> --pr <n> --env <env> [--forge github|gitlab|forgejo]
|
|
7
7
|
* chant approve pr-<n> pr-apply --plan <digest> --approver github:<login> --sign
|
|
8
8
|
* chant components pr-apply --base <ref> --env <env> [--pr <n>] [--forge <kind>] [--require-review] [--resume <file>]
|
|
9
|
+
* [--wave-gate <gate> [--wave <k>]]
|
|
9
10
|
* ```
|
|
10
11
|
*
|
|
11
12
|
* Both measure the change from the merge base of `--base` and `HEAD`, select
|
|
@@ -27,6 +28,13 @@
|
|
|
27
28
|
* approval still stands, applies the rest without a fresh approval. When
|
|
28
29
|
* they are not covered it says why and runs as it would without a record.
|
|
29
30
|
*
|
|
31
|
+
* `--wave-gate <gate>` (#4003) applies the approved set a wave at a time,
|
|
32
|
+
* each wave planned after the one before it applied (`prApplyWaves`). A
|
|
33
|
+
* wave whose plan the approved change set covers applies under the pull
|
|
34
|
+
* request's approval; one whose plan moved waits at `<gate>-wave-<k>` under
|
|
35
|
+
* the pull request's op (exit 3). `--wave <k>` runs one wave, reading the
|
|
36
|
+
* approved set and the waves that applied from the `--resume` record.
|
|
37
|
+
*
|
|
30
38
|
* Every run writes `pr-plan.json` or `pr-apply.json` (`pr-report.schema.json`),
|
|
31
39
|
* `change-set.json` and `pr-note.md` under `--output` (default `.chant/pr`). *
|
|
32
40
|
* `--events-json` (#4041, #4007) streams the stage's run events to stdout,
|
|
@@ -48,6 +56,12 @@
|
|
|
48
56
|
* recorded under `pr-<n>-<member>`, and the note and the statuses carry the
|
|
49
57
|
* member's name, so each member's loop on one pull request stands apart.
|
|
50
58
|
* The name must be the member that owns the current directory.
|
|
59
|
+
*
|
|
60
|
+
* `--no-status` (#4161) posts neither the stage's status nor its note: the
|
|
61
|
+
* report and the note are written under `--output` only. `chant ci run
|
|
62
|
+
* --local` passes it. pr-plan then builds no forge client, since posting is
|
|
63
|
+
* all it uses one for; pr-apply still reads the pull request and its reviews
|
|
64
|
+
* through `--forge`.
|
|
51
65
|
*/
|
|
52
66
|
import type { CommandContext } from "../registry.js";
|
|
53
67
|
/** Where the reports land unless `--output` says. */
|
|
@@ -56,4 +70,6 @@ export declare const PR_REPORT_DIR = ".chant/pr";
|
|
|
56
70
|
export declare function runComponentsPrPlan(ctx: CommandContext): Promise<number>;
|
|
57
71
|
/** chant components pr-apply --base <ref> [--pr <n>] [--env <env>] [--gate <name>] [--forge <kind>] [--require-review] [--output <dir>] [--json] [--events-json] [--report-url <url>] */
|
|
58
72
|
export declare function runComponentsPrApply(ctx: CommandContext): Promise<number>;
|
|
73
|
+
/** chant components pr-record --base <ref> [--pr <n>] [--env <env>] [--gate <name>] [--forge <kind>] [--output <dir>] [--json] [--events-json] [--report-url <url>] */
|
|
74
|
+
export declare function runComponentsPrRecord(ctx: CommandContext): Promise<number>;
|
|
59
75
|
//# sourceMappingURL=pr.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/pr.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pr.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/pr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAuDH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlD,qDAAqD;AACrD,eAAO,MAAM,aAAa,cAAc,CAAC;AAqSzC,mKAAmK;AACnK,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAGxE;AAyDD,yLAAyL;AACzL,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAGzE;AAuPD,uKAAuK;AACvK,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAG1E"}
|