@intentius/chant 0.124.86 → 0.124.88
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 +12 -0
- package/dist/actor.d.ts.map +1 -0
- package/dist/actor.js +18 -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 +204 -2
- 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 +103 -0
- package/dist/ci-evidence-from-job.d.ts.map +1 -0
- package/dist/ci-evidence-from-job.js +162 -0
- package/dist/ci-evidence-jobs.d.ts +69 -10
- package/dist/ci-evidence-jobs.d.ts.map +1 -1
- package/dist/ci-evidence-jobs.js +72 -8
- 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 +47 -9
- package/dist/ci-image.d.ts.map +1 -1
- package/dist/ci-image.js +45 -18
- 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-product-words.d.ts +20 -1
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +27 -1
- package/dist/ci-product.d.ts +20 -1
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +21 -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/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.map +1 -1
- package/dist/cli/handlers/ci-check.js +38 -14
- package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
- package/dist/cli/handlers/ci-evidence.js +238 -26
- 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/generated-check.d.ts +3 -0
- package/dist/cli/handlers/generated-check.d.ts.map +1 -0
- package/dist/cli/handlers/generated-check.js +41 -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/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +42 -5
- package/dist/cli/handlers/run-wave.js +8 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +38 -4
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +66 -0
- package/dist/cli/registry.d.ts +24 -0
- package/dist/cli/registry.d.ts.map +1 -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 +21 -3
- package/dist/components/check-steps.js +1 -1
- package/dist/components/pr-checks.d.ts +105 -0
- package/dist/components/pr-checks.d.ts.map +1 -0
- package/dist/components/pr-checks.js +119 -0
- package/dist/components/pr-pipeline.d.ts +34 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +14 -1
- package/dist/components/product-pipeline.d.ts +16 -1
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +17 -2
- package/dist/components/product-plan.d.ts +262 -3
- package/dist/components/product-plan.d.ts.map +1 -1
- package/dist/components/product-plan.js +243 -11
- 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 +45 -5
- package/dist/drift-record.d.ts.map +1 -1
- package/dist/drift-record.js +27 -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 +58 -20
- package/dist/floor-table.js +10 -7
- package/dist/forge-check/contract.d.ts +8 -0
- package/dist/forge-check/contract.d.ts.map +1 -1
- package/dist/forge-check/contract.js +4 -1
- package/dist/forge-check/index.d.ts +2 -0
- package/dist/forge-check/index.d.ts.map +1 -1
- package/dist/forge-check/index.js +2 -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/generated-check.d.ts +74 -0
- package/dist/generated-check.d.ts.map +1 -0
- package/dist/generated-check.js +216 -0
- package/dist/lexicon.d.ts +16 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.d.ts +15 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.js +49 -3
- 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 +27 -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/op/op-waves-evidence-jobs.d.ts +92 -0
- package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -0
- package/dist/op/op-waves-evidence-jobs.js +112 -0
- package/dist/op/op-waves-evidence.d.ts +17 -4
- package/dist/op/op-waves-evidence.d.ts.map +1 -1
- package/dist/op/op-waves-evidence.js +32 -10
- package/dist/op/op-waves-run.d.ts +12 -1
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +54 -3
- package/dist/op/op-waves.d.ts +8 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +10 -0
- 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 +89 -7
- 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-plan-note.d.ts +24 -0
- package/dist/pr-plan-note.d.ts.map +1 -1
- package/dist/pr-plan-note.js +11 -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 +40 -0
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +79 -6
- 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/ref-gate-init.d.ts +76 -0
- package/dist/ref-gate-init.d.ts.map +1 -0
- package/dist/ref-gate-init.js +144 -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 +51 -1
- package/dist/release-floors.d.ts.map +1 -1
- package/dist/release-floors.js +66 -16
- package/dist/state-migration.d.ts +23 -0
- package/dist/state-migration.d.ts.map +1 -1
- package/dist/state-migration.js +39 -3
- 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 +310 -303
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +13 -7
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +4 -3
- 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-workflow.d.ts +26 -3
- package/dist/workspace/release-workflow.d.ts.map +1 -1
- package/dist/workspace/release-workflow.js +48 -6
- package/dist/workspace/trust/check-evidence-report.d.ts +25 -0
- package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence-report.js +20 -0
- package/dist/workspace/trust/check-evidence.d.ts +59 -13
- package/dist/workspace/trust/check-evidence.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence.js +101 -24
- package/dist/workspace/trust/ci-tag-statement.d.ts +2 -2
- package/dist/workspace/trust/ci-tag-statement.d.ts.map +1 -1
- package/dist/workspace/trust/dsse.d.ts +40 -2
- package/dist/workspace/trust/dsse.d.ts.map +1 -1
- package/dist/workspace/trust/dsse.js +34 -2
- package/dist/workspace/trust/evidence.d.ts +7 -2
- package/dist/workspace/trust/evidence.d.ts.map +1 -1
- package/dist/workspace/trust/evidence.js +5 -0
- package/dist/workspace/trust/keyless-fixture.d.ts +41 -0
- package/dist/workspace/trust/keyless-fixture.d.ts.map +1 -0
- package/dist/workspace/trust/keyless-fixture.js +161 -0
- package/dist/workspace/trust/keyless.d.ts +202 -0
- package/dist/workspace/trust/keyless.d.ts.map +1 -0
- package/dist/workspace/trust/keyless.js +488 -0
- package/dist/workspace/trust/local-evidence.d.ts +3 -0
- package/dist/workspace/trust/local-evidence.d.ts.map +1 -1
- package/dist/workspace/trust/op-run-statement.d.ts +2 -2
- package/dist/workspace/trust/op-run-statement.d.ts.map +1 -1
- 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/policy.d.ts +56 -1
- package/dist/workspace/trust/policy.d.ts.map +1 -1
- package/dist/workspace/trust/policy.js +103 -2
- package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate-cli.js +65 -3
- package/dist/workspace/trust/ref-gate.d.ts +62 -3
- package/dist/workspace/trust/ref-gate.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate.js +75 -8
- package/dist/workspace/trust/run-statement.d.ts +3 -3
- package/dist/workspace/trust/run-statement.d.ts.map +1 -1
- package/dist/workspace/trust/runner-identity.d.ts +56 -0
- package/dist/workspace/trust/runner-identity.d.ts.map +1 -0
- package/dist/workspace/trust/runner-identity.js +65 -0
- package/dist/workspace/trust/trust-files.d.ts.map +1 -1
- package/dist/workspace/trust/trust-files.js +8 -1
- package/package.json +1 -1
- package/src/action-pins.ts +2 -0
- package/src/actor.test.ts +12 -0
- package/src/actor.ts +19 -0
- package/src/bundle-check.test.ts +22 -0
- package/src/bundle-check.ts +33 -5
- package/src/chant-install.test.ts +109 -1
- package/src/chant-install.ts +243 -2
- package/src/ci-commit.test.ts +51 -5
- 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 +147 -0
- package/src/ci-evidence-from-job.ts +195 -0
- package/src/ci-evidence-jobs.ts +85 -10
- 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 +60 -10
- package/src/ci-image.ts +78 -19
- 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-product-words.ts +30 -0
- package/src/ci-product.ts +26 -1
- package/src/cli/commands/__fixtures__/source-dir-root/migrations/0001-init/backfill.ts +3 -0
- package/src/cli/handlers/approve-confirm.test.ts +35 -0
- package/src/cli/handlers/approve-confirm.ts +44 -0
- 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 +35 -13
- package/src/cli/handlers/ci-evidence-open.test.ts +164 -0
- package/src/cli/handlers/ci-evidence.ts +223 -24
- package/src/cli/handlers/ci-forge-check.ts +22 -9
- package/src/cli/handlers/generated-check.ts +39 -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/pr.ts +43 -5
- package/src/cli/handlers/run-wave.ts +7 -0
- package/src/cli/main.ts +38 -4
- package/src/cli/parse-args.ts +46 -0
- package/src/cli/registry.ts +24 -0
- package/src/components/check-hooks.ts +25 -3
- package/src/components/check-report-summary.test.ts +78 -0
- package/src/components/check-steps.ts +1 -1
- package/src/components/pr-checks.ts +159 -0
- package/src/components/pr-pipeline.ts +41 -1
- package/src/components/product-pipeline.ts +25 -3
- package/src/components/product-plan.test.ts +102 -1
- package/src/components/product-plan.ts +419 -14
- 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 +25 -0
- package/src/drift-record.ts +55 -6
- package/src/floor-table.data.ts +58 -20
- package/src/floor-table.ts +12 -9
- package/src/forge-check/contract.ts +11 -1
- package/src/forge-check/forge-check.test.ts +8 -0
- package/src/forge-check/index.ts +2 -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/generated-check.e2e.test.ts +98 -0
- package/src/generated-check.test.ts +104 -0
- package/src/generated-check.ts +269 -0
- package/src/lexicon.ts +17 -0
- package/src/lifecycle/publish-npm.ts +56 -3
- package/src/lifecycle/release-catalog.test.ts +2 -2
- package/src/lifecycle/release-images-dockerfile.test.ts +20 -0
- package/src/lifecycle/release-images.test.ts +44 -0
- package/src/lifecycle/release-images.ts +39 -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/op/op-waves-evidence-jobs.ts +134 -0
- package/src/op/op-waves-evidence.test.ts +37 -4
- package/src/op/op-waves-evidence.ts +32 -11
- package/src/op/op-waves-run.ts +57 -2
- package/src/op/op-waves.ts +11 -0
- package/src/op/schedule-overdue.test.ts +83 -1
- package/src/op/schedule-overdue.ts +107 -9
- 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-plan-note.ts +32 -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.test.ts +30 -0
- package/src/pr-post.ts +110 -6
- package/src/pr-requires.test.ts +20 -0
- package/src/pr-requires.ts +10 -1
- package/src/ref-gate-init.ts +189 -0
- package/src/ref-gate-rules.ts +26 -0
- package/src/release-floors.ts +88 -16
- package/src/state-migration-record.test.ts +90 -0
- package/src/state-migration.test.ts +1 -1
- package/src/state-migration.ts +52 -3
- package/src/state-unlock.test.ts +33 -1
- package/src/state-unlock.ts +49 -1
- package/src/workspace/ci-green-cli.ts +12 -6
- package/src/workspace/ci-green.ts +4 -3
- 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-workflow.test.ts +70 -0
- package/src/workspace/release-workflow.ts +56 -8
- package/src/workspace/trust/check-evidence-report.ts +33 -0
- package/src/workspace/trust/check-evidence.test.ts +3 -3
- package/src/workspace/trust/check-evidence.ts +110 -28
- package/src/workspace/trust/ci-tag-statement.ts +2 -2
- package/src/workspace/trust/dsse.ts +48 -4
- package/src/workspace/trust/evidence.ts +7 -2
- package/src/workspace/trust/keyless-fixture.ts +214 -0
- package/src/workspace/trust/keyless.test.ts +220 -0
- package/src/workspace/trust/keyless.ts +557 -0
- package/src/workspace/trust/local-evidence.ts +3 -1
- package/src/workspace/trust/op-run-statement.ts +2 -2
- package/src/workspace/trust/open-evidence.ts +129 -0
- package/src/workspace/trust/policy.ts +129 -2
- package/src/workspace/trust/ref-gate-cli.ts +59 -3
- package/src/workspace/trust/ref-gate-pieces.test.ts +175 -0
- package/src/workspace/trust/ref-gate.e2e.test.ts +17 -0
- package/src/workspace/trust/ref-gate.ts +90 -8
- package/src/workspace/trust/run-statement.ts +3 -3
- package/src/workspace/trust/runner-identity.ts +92 -0
- package/src/workspace/trust/trust-files.test.ts +6 -0
- package/src/workspace/trust/trust-files.ts +14 -1
|
@@ -30,10 +30,24 @@
|
|
|
30
30
|
* (`generateProductPlanPipeline` in each): the products call them in
|
|
31
31
|
* process, with no component graph.
|
|
32
32
|
*/
|
|
33
|
-
import { assertPipelineEvidence, evidenceKeyEnv, planEvidenceLines } from "../ci-evidence-jobs.js";
|
|
33
|
+
import { assertPipelineEvidence, evidenceIdTokens, evidenceKeyEnv, evidenceKeyless, gitlabOpenEvidenceDir, openEvidenceLines, planEvidenceLines } from "../ci-evidence-jobs.js";
|
|
34
34
|
import { gitlabPlanJobName, PR_LOOP_REPORT_DIR, PR_PLAN_NOTE_JOB, prLoopPassedEnv, prLoopPostJob, prLoopRunner } from "./pr-pipeline.js";
|
|
35
|
+
import { GITHUB_JOB_TOKEN } from "../ci-jobs.js";
|
|
36
|
+
import { cloudLogin } from "../ci-login.js";
|
|
37
|
+
import { controlNoteCheckout } from "../control/dispatch.js";
|
|
38
|
+
import { commentLine, productStatusContext } from "../ci-product-words.js";
|
|
39
|
+
import { PLAN_WATCHES_ENV, scheduledWatchProblem } from "../op/schedule-overdue.js";
|
|
40
|
+
import { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE } from "../pr-plan-record.js";
|
|
35
41
|
/** The variable the plan-note job reads the product's note words from (#4799), as JSON. Set from the pipeline, never from the report. */
|
|
36
42
|
export const PR_PLAN_NOTE_WORDS_ENV = "CHANT_PLAN_NOTE_WORDS";
|
|
43
|
+
/** The variable a comment re-plan's one argument reaches the plan verb in (#4899). Empty on a pull request's own plan. */
|
|
44
|
+
export const PLAN_ARGUMENT_ENV = "CHANT_PLAN_ARGUMENT";
|
|
45
|
+
/** The file the note job's own lines write extra notices to, one a line (#4931): `pr-post` adds them under the note's counts. */
|
|
46
|
+
export const PLAN_NOTE_NOTICES_ENV = "CHANT_PLAN_NOTE_NOTICES";
|
|
47
|
+
/** The file a product plan job writes its run record to under the hand-off directory, and the Op it is recorded under: `pr-plan`'s (#4899, ../pr-plan-record.ts). */
|
|
48
|
+
export { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE } from "../pr-plan-record.js";
|
|
49
|
+
/** The variable the plan step reads the record's op, environment and labels from (#4899), as JSON. */
|
|
50
|
+
export const PLAN_RUN_RECORD_ENV = "CHANT_PLAN_RECORD";
|
|
37
51
|
const TARGET_NAME = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
38
52
|
/** The pull request loop's options the product plan's jobs do not carry, and what each needs. Each is refused with `plan` (#4799). */
|
|
39
53
|
const NOT_WITH_PLAN = [
|
|
@@ -43,7 +57,7 @@ const NOT_WITH_PLAN = [
|
|
|
43
57
|
["locks", "the lock job reads pr-plan's report"],
|
|
44
58
|
["previewComment", "the comment preview re-runs pr-plan"],
|
|
45
59
|
["staleNotes", "the stale marking names one note per pipeline"],
|
|
46
|
-
["identity", "
|
|
60
|
+
["identity", "the identity trade runs before pr-plan's checkout; give the product plan's login (or a target's) instead"],
|
|
47
61
|
["build", "the plan verb builds what it plans"],
|
|
48
62
|
["buildCommand", "the plan verb builds what it plans"],
|
|
49
63
|
["refresh", "--refresh is a pr-plan flag"],
|
|
@@ -52,7 +66,6 @@ const NOT_WITH_PLAN = [
|
|
|
52
66
|
["events", "--events-json is a pr-plan flag"],
|
|
53
67
|
["reportUrl", "--report-url is a pr-plan flag"],
|
|
54
68
|
["prEnvironment", "the pull request environment jobs run pr-env"],
|
|
55
|
-
["noteCommands", "the note-commands job starts pr-plan's comment jobs"],
|
|
56
69
|
["actionJob", "the action job is in chant build --pr-loop's workflow"],
|
|
57
70
|
["control", "the control read is the pr-plan report's cross-stack edges"],
|
|
58
71
|
["decide", "the description check reads pr-plan's report"],
|
|
@@ -70,6 +83,9 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
|
|
|
70
83
|
if (value !== undefined && value !== false)
|
|
71
84
|
throw new Error(`the product plan (plan) takes no ${key}: ${why}`);
|
|
72
85
|
}
|
|
86
|
+
// #4899: GitLab's comment commands start the re-plan, so the note-commands job comes with it.
|
|
87
|
+
if (loop.noteCommands && !plan.replan)
|
|
88
|
+
throw new Error("the product plan (plan) takes no noteCommands without replan: the note-commands job starts its comment re-plan");
|
|
73
89
|
if (!plan.command.trim())
|
|
74
90
|
throw new Error("the product plan's command is empty; give the product's plan verb");
|
|
75
91
|
const targets = plan.targets;
|
|
@@ -85,12 +101,42 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
|
|
|
85
101
|
}
|
|
86
102
|
const github = forge !== "gitlab";
|
|
87
103
|
const shared = prLoopPassedEnv(forge, loop);
|
|
104
|
+
const jobEnv = plan.env ? prLoopPassedEnv(forge, { variables: plan.env }) : {};
|
|
105
|
+
for (const key of Object.keys(jobEnv)) {
|
|
106
|
+
if (key in shared)
|
|
107
|
+
throw new Error(`the product plan's env ${key} is the pipeline's too; give it once`);
|
|
108
|
+
}
|
|
109
|
+
for (const s of plan.setup ?? []) {
|
|
110
|
+
if ((s.run === undefined) === (s.uses === undefined))
|
|
111
|
+
throw new Error(`the product plan's setup step ${JSON.stringify(s.name ?? s.run ?? s.uses ?? "")} gives one of run and uses`);
|
|
112
|
+
if (s.run !== undefined && s.with !== undefined)
|
|
113
|
+
throw new Error(`the product plan's setup step ${JSON.stringify(s.name ?? s.run)} runs a line, and only a uses step takes with`);
|
|
114
|
+
}
|
|
115
|
+
if (plan.concurrency?.group !== undefined && !/^[A-Za-z0-9][A-Za-z0-9_.-]*$/.test(plan.concurrency.group))
|
|
116
|
+
throw new Error(`the product plan's concurrency group ${JSON.stringify(plan.concurrency.group)} is not a name of letters, digits, ., - and _`);
|
|
117
|
+
const replanComments = plan.replan ? replanCommentsOf(words) : undefined;
|
|
118
|
+
if (plan.noteSteps && !github && ((plan.noteSteps.before?.length ?? 0) > 0 || (plan.noteSteps.after?.length ?? 0) > 0)) {
|
|
119
|
+
throw new Error("the product plan's noteSteps run in the note job of one pull request, and GitLab's note job posts every open merge request's note in one run (pr-post --open); leave noteSteps out on GitLab");
|
|
120
|
+
}
|
|
88
121
|
const planRunner = prLoopRunner(loop, "plan");
|
|
89
122
|
const noteRunner = prLoopRunner(loop, "default");
|
|
90
123
|
const base = github
|
|
91
124
|
? { BASE_SHA: "${{ github.event.pull_request.base.sha }}", PR_NUMBER: "${{ github.event.pull_request.number }}" }
|
|
92
125
|
: { BASE_SHA: "$CI_MERGE_REQUEST_DIFF_BASE_SHA", PR_NUMBER: "$CI_MERGE_REQUEST_IID" };
|
|
93
|
-
const
|
|
126
|
+
for (const w of plan.watches ?? []) {
|
|
127
|
+
const problem = scheduledWatchProblem(w);
|
|
128
|
+
if (problem)
|
|
129
|
+
throw new Error(`the product plan's watches: ${problem}`);
|
|
130
|
+
}
|
|
131
|
+
if (new Set((plan.watches ?? []).map((w) => w.op)).size !== (plan.watches ?? []).length)
|
|
132
|
+
throw new Error("the product plan's watches name an Op twice");
|
|
133
|
+
// The note job's variables from the pipeline: the note words, and the product's watches (#4888).
|
|
134
|
+
const noteWords = {
|
|
135
|
+
...(plan.noteWords ? { [PR_PLAN_NOTE_WORDS_ENV]: JSON.stringify(plan.noteWords) } : {}),
|
|
136
|
+
...(plan.watches?.length ? { [PLAN_WATCHES_ENV]: JSON.stringify(plan.watches) } : {}),
|
|
137
|
+
};
|
|
138
|
+
const fill = (line, name) => line.replaceAll("{target}", name ?? env).replaceAll("{output}", PR_LOOP_REPORT_DIR);
|
|
139
|
+
const control = plan.controlRead ? controlNoteCheckout(forge, plan.controlRead, words) : undefined;
|
|
94
140
|
const one = (target) => {
|
|
95
141
|
const name = target?.name;
|
|
96
142
|
const jobName = github ? (name ? `plan-${name}` : "plan") : gitlabPlanJobName(name);
|
|
@@ -99,42 +145,228 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
|
|
|
99
145
|
for (const key of Object.keys(own)) {
|
|
100
146
|
if (key in shared)
|
|
101
147
|
throw new Error(`target ${name}'s ${key} is the pipeline's too; give it on the target or on the pipeline`);
|
|
148
|
+
if (key in jobEnv)
|
|
149
|
+
throw new Error(`target ${name}'s ${key} is the product plan's env too; give it once`);
|
|
102
150
|
}
|
|
103
|
-
const
|
|
151
|
+
const post0 = prLoopPostJob(forge, env, name, words);
|
|
152
|
+
// #4899: the note job records the plan job's run, named by that job.
|
|
153
|
+
const post1 = plan.record ? { ...post0, command: `${post0.command} --record-run ${jobName}` } : post0;
|
|
154
|
+
// #4914: on GitLab the signing job of the same pipeline keeps each merge request's evidence, which the note's checks line reads.
|
|
155
|
+
const post = evidence && !github ? { ...post1, command: `${post1.command} --evidence-dir ${gitlabOpenEvidenceDir(jobName)}` } : post1;
|
|
104
156
|
// The note job reads its own plan job's result, by that job's name.
|
|
105
157
|
const postEnv = github ? { ...post.env, PLAN_RESULT: `\${{ needs.${jobName}.result }}`, ...noteWords } : { ...post.env, ...noteWords };
|
|
158
|
+
// #4931: the target's login, else the plan's, from the OIDC token file (ci-login, #4788).
|
|
159
|
+
const loginSpec = target?.login ?? plan.login;
|
|
160
|
+
const login = loginSpec ? cloudLogin(forge, loginSpec) : undefined;
|
|
161
|
+
const ownTokens = target?.idTokens ?? plan.idTokens;
|
|
162
|
+
for (const [v, aud] of Object.entries(ownTokens ?? {})) {
|
|
163
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(v))
|
|
164
|
+
throw new Error(`the product plan's id token ${JSON.stringify(v)} is not a variable name`);
|
|
165
|
+
if (!aud.trim() || /\s/.test(aud))
|
|
166
|
+
throw new Error(`the product plan's id token ${v} names no audience`);
|
|
167
|
+
if (login && v in login.idTokens && login.idTokens[v] !== aud)
|
|
168
|
+
throw new Error(`the product plan's id token ${v} is the login's, with another audience`);
|
|
169
|
+
}
|
|
170
|
+
const idTokens = { ...(login?.idTokens ?? {}), ...(ownTokens ?? {}) };
|
|
171
|
+
const artifact = plan.artifact ? (name ? `${plan.artifact}-${name}` : plan.artifact) : name ? `chant-pr-plan-${name}` : "chant-pr-plan";
|
|
172
|
+
const replan0 = replanComments ? { ...replanJobOf(forge, env, words, name, artifact, noteWords), ...replanComments } : undefined;
|
|
173
|
+
const replan = replan0 && plan.record ? { ...replan0, post: { ...replan0.post, command: `${replan0.post.command} --record-run ${replan0.jobName}` } } : replan0;
|
|
174
|
+
const record = plan.record ? { env: { [PLAN_RUN_RECORD_ENV]: JSON.stringify({ op: PLAN_RUN_OP, env, labels: { Env: env, Pipeline: "pr", Job: "plan", ...(name ? { Target: name } : {}) } }) } } : undefined;
|
|
175
|
+
const noteBefore = plan.noteSteps?.before ?? [];
|
|
176
|
+
const noteAfter = plan.noteSteps?.after ?? [];
|
|
106
177
|
return {
|
|
107
178
|
...(name ? { target: name } : {}),
|
|
108
179
|
jobName,
|
|
109
180
|
noteJobName,
|
|
110
|
-
command: plan.command
|
|
181
|
+
command: fill(plan.command, name),
|
|
111
182
|
env: { ...base, ...shared, ...own },
|
|
112
183
|
...(target?.writeProbe ? { writeProbe: target.writeProbe } : {}),
|
|
113
184
|
post: { command: post.command, env: postEnv },
|
|
114
|
-
artifact
|
|
185
|
+
artifact,
|
|
115
186
|
...(planRunner !== undefined ? { runner: planRunner } : {}),
|
|
116
187
|
...(noteRunner !== undefined ? { noteRunner } : {}),
|
|
117
|
-
...(evidence ? { evidence: planEvidenceOf(forge, evidence, words, jobName) } : {}),
|
|
188
|
+
...(evidence ? { evidence: planEvidenceOf(forge, evidence, words, jobName, plan.forks === "skip" ? { noForks: true } : {}) } : {}),
|
|
189
|
+
...(Object.keys(jobEnv).length > 0 ? { jobEnv } : {}),
|
|
190
|
+
...(login && login.steps.length > 0 ? { login: login.steps } : {}),
|
|
191
|
+
...(Object.keys(idTokens).length > 0 ? { idTokens } : {}),
|
|
192
|
+
...(plan.pending && github ? { pending: { context: productStatusContext(words, "plan", name), description: "planning" } } : {}),
|
|
193
|
+
...(control ? { control } : {}),
|
|
194
|
+
...(plan.setup?.length ? { setup: plan.setup } : {}),
|
|
195
|
+
...(plan.report ? { report: fill(plan.report, name) } : {}),
|
|
196
|
+
...(replan ? { replan } : {}),
|
|
197
|
+
...(noteBefore.length > 0 || noteAfter.length > 0 ? { noteSteps: { before: noteBefore, after: noteAfter } } : {}),
|
|
198
|
+
...(record ? { record } : {}),
|
|
118
199
|
};
|
|
119
200
|
};
|
|
120
201
|
return targets ? targets.map(one) : [one()];
|
|
121
202
|
}
|
|
203
|
+
/** The comments the re-plan answers (#4899): the plan command, then the words' aliases for it. Refused when the words name no plan command. */
|
|
204
|
+
function replanCommentsOf(words) {
|
|
205
|
+
const command = commentLine(words, "plan");
|
|
206
|
+
if (!command)
|
|
207
|
+
throw new Error(`the product plan's replan answers /${words.product} <plan command>, and the words name no plan command; name one in the words' commands, or drop replan`);
|
|
208
|
+
const aliases = words.aliases.filter((a) => a.command === "plan");
|
|
209
|
+
return { comments: [command, ...aliases.filter((a) => a.when === undefined).map((a) => a.from)], gated: aliases.filter((a) => a.when !== undefined).map((a) => ({ comment: a.from, when: a.when })) };
|
|
210
|
+
}
|
|
211
|
+
/** The re-plan's jobs for one target (#4899), its comments filled in by the caller. */
|
|
212
|
+
function replanJobOf(forge, env, words, name, artifact, noteWords) {
|
|
213
|
+
const github = forge !== "gitlab";
|
|
214
|
+
const jobName = github ? (name ? `${REPLAN_JOB}-${name}` : REPLAN_JOB) : name ? `${name}-${REPLAN_JOB}` : REPLAN_JOB;
|
|
215
|
+
const noteJobName = github ? (name ? `${REPLAN_NOTE_JOB}-${name}` : REPLAN_NOTE_JOB) : name ? `${name}-${REPLAN_NOTE_JOB}` : REPLAN_NOTE_JOB;
|
|
216
|
+
// pr-post reads the pull request and the head from the re-plan job, never the comment. GitLab's is GitHub's line with its own --forge.
|
|
217
|
+
const command = github ? prLoopPostJob(forge, env, name, words).command : prLoopPostJob("github", env, name, words).command.replace(" --forge github ", " --forge gitlab ");
|
|
218
|
+
const post = github
|
|
219
|
+
? {
|
|
220
|
+
command,
|
|
221
|
+
env: {
|
|
222
|
+
PR_NUMBER: `\${{ needs.${jobName}.outputs.pr }}`,
|
|
223
|
+
HEAD_SHA: `\${{ needs.${jobName}.outputs.head }}`,
|
|
224
|
+
PLAN_RESULT: `\${{ needs.${jobName}.result }}`,
|
|
225
|
+
GITHUB_TOKEN: GITHUB_JOB_TOKEN,
|
|
226
|
+
...noteWords,
|
|
227
|
+
},
|
|
228
|
+
}
|
|
229
|
+
: {
|
|
230
|
+
// GitLab: the merge request from the pipeline's variable, its head again from the remote, and the re-plan job's result from its artifact.
|
|
231
|
+
command: command.replace(' --result "$PLAN_RESULT"', ""),
|
|
232
|
+
env: { PR_NUMBER: `$${GITLAB_REPLAN_PR_VAR}`, ...noteWords },
|
|
233
|
+
setup: ['HEAD_SHA="$(git ls-remote origin "refs/merge-requests/$PR_NUMBER/head" | cut -f1)" && export HEAD_SHA'],
|
|
234
|
+
};
|
|
235
|
+
return { jobName, noteJobName, post, artifact: `${artifact}-replan` };
|
|
236
|
+
}
|
|
237
|
+
/** The comment re-plan's job and its note job (#4899). */
|
|
238
|
+
export const REPLAN_JOB = "replan";
|
|
239
|
+
export const REPLAN_NOTE_JOB = "replan-note";
|
|
240
|
+
/**
|
|
241
|
+
* The GitLab variables the note-commands job starts a re-plan's pipeline
|
|
242
|
+
* with (#4899): the comment preview's (`CHANT_PREVIEW_PR`,
|
|
243
|
+
* `CHANT_PREVIEW_COMMENT`), so `pr-notes --preview-comment` starts it.
|
|
244
|
+
*/
|
|
245
|
+
export const GITLAB_REPLAN_PR_VAR = "CHANT_PREVIEW_PR";
|
|
246
|
+
export const GITLAB_REPLAN_COMMENT_VAR = "CHANT_PREVIEW_COMMENT";
|
|
247
|
+
/** A regular expression's body that matches `text` literally, for a GitLab rule's `/.../`. */
|
|
248
|
+
function literal(text) {
|
|
249
|
+
return text.replace(/[.*+?^${}()|[\]\\\/]/g, "\\$&");
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* The GitLab rule condition that the re-plan pipeline's comment asks for
|
|
253
|
+
* `target` (#4899): the command alone, or with the target's name. Without
|
|
254
|
+
* a target, the command with at most one word after it.
|
|
255
|
+
*/
|
|
256
|
+
export function gitlabReplanCommentIf(replan, target) {
|
|
257
|
+
const arg = target ? `( +${literal(target)})?` : "( +[A-Za-z0-9_.\\/@+=,:-]+)?";
|
|
258
|
+
const one = (c) => `$${GITLAB_REPLAN_COMMENT_VAR} =~ /^${literal(c)}${arg} *$/`;
|
|
259
|
+
return [...replan.comments.map(one), ...replan.gated.map((g) => `($${g.when} && ${one(g.comment)})`)].join(" || ");
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* The re-plan job's first step on GitHub and Forgejo (#4899), with the job's
|
|
263
|
+
* token in its environment alone, before anything is checked out: it reads
|
|
264
|
+
* the comment from the event file (never as an expression in a script),
|
|
265
|
+
* decides whether it asks this job to plan, asks the forge for the pull
|
|
266
|
+
* request (open; from this repository with `forks: "skip"`) and, with
|
|
267
|
+
* `CHANT_REPLAN_PERMISSION` set (Forgejo, whose payload says nothing of the
|
|
268
|
+
* commenter), whether the commenter can write. It writes `go=1`, `pr`,
|
|
269
|
+
* `head`, `base` and `argument` to the step's outputs.
|
|
270
|
+
*/
|
|
271
|
+
export const REPLAN_DECIDE_JS = [
|
|
272
|
+
'const fs=require("fs");',
|
|
273
|
+
'const say=(m)=>console.log("chant: "+m);',
|
|
274
|
+
'const out=(k,v)=>fs.appendFileSync(process.env.GITHUB_OUTPUT,k+"="+v+"\\n");',
|
|
275
|
+
"let e;try{e=JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH,\"utf8\"))}catch{say(\"the event file does not read, so nothing is planned again\");process.exit(0)}",
|
|
276
|
+
'const body=String((e.comment&&e.comment.body)||"").trim();',
|
|
277
|
+
'const cmds=JSON.parse(process.env.CHANT_REPLAN_COMMANDS||"[]");',
|
|
278
|
+
'for(const g of JSON.parse(process.env.CHANT_REPLAN_GATED||"[]")){const v=process.env[g.when]||"";if(v&&v!=="0"&&v!=="false")cmds.push(g.comment)}',
|
|
279
|
+
"let arg;",
|
|
280
|
+
'for(const c of cmds){if(body===c){arg="";break}if(body.startsWith(c+" ")){const r=body.slice(c.length).trim();if(/^[A-Za-z0-9_.\\/@+=,:-]+$/.test(r)){arg=r;break}}}',
|
|
281
|
+
'if(arg===undefined){say("the comment asks for no plan");process.exit(0)}',
|
|
282
|
+
'const target=process.env.CHANT_REPLAN_TARGET||"",targets=JSON.parse(process.env.CHANT_REPLAN_TARGETS||"[]");',
|
|
283
|
+
'if(targets.length&&arg&&!targets.includes(arg)){say(arg+" is none of "+targets.join(", ")+", so nothing is planned again");process.exit(0)}',
|
|
284
|
+
'if(targets.length&&arg&&arg!==target){say("the comment plans "+arg+" again, not "+target);process.exit(0)}',
|
|
285
|
+
'const n=e.issue&&e.issue.number;if(!Number.isInteger(n)||!(e.issue.pull_request||e.is_pull)){say("the comment is not on a pull request");process.exit(0)}',
|
|
286
|
+
'const api=String(process.env.GITHUB_API_URL||"").replace(/\\/+$/,""),repo=process.env.GITHUB_REPOSITORY;',
|
|
287
|
+
'const get=async(p)=>{const r=await fetch(api+"/repos/"+repo+p,{headers:{authorization:"token "+process.env.CHANT_REPLAN_TOKEN,accept:"application/json"}});if(!r.ok)throw new Error(p+" answered "+r.status);return r.json()};',
|
|
288
|
+
"(async()=>{",
|
|
289
|
+
'const pr=await get("/pulls/"+n);',
|
|
290
|
+
'if(pr.state!=="open"){say("pull request "+n+" is not open, so it is not planned again");return}',
|
|
291
|
+
'const same=Boolean(pr.head&&pr.head.repo&&pr.head.repo.full_name===repo);',
|
|
292
|
+
'if(!same&&process.env.CHANT_REPLAN_FORKS==="skip"){say("pull request "+n+" is from a fork, and its code never runs with this repository\\u0027s credentials");return}',
|
|
293
|
+
'if(process.env.CHANT_REPLAN_PERMISSION){const who=e.comment&&e.comment.user&&e.comment.user.login;const p=who?await get("/collaborators/"+encodeURIComponent(who)+"/permission"):{};',
|
|
294
|
+
'if(!["owner","admin","maintain","write"].includes(p.permission)){say((who||"the commenter")+" cannot write to "+repo+", so nothing is planned again");return}}',
|
|
295
|
+
'const sha=/^[0-9a-f]{40}$/;if(!sha.test(String(pr.head&&pr.head.sha))||!sha.test(String(pr.base&&pr.base.sha)))throw new Error("the pull request names no head or base commit");',
|
|
296
|
+
'out("go","1");out("pr",String(n));out("head",pr.head.sha);out("base",pr.base.sha);out("argument",arg);',
|
|
297
|
+
'say("planning pull request "+n+" again at "+pr.head.sha.slice(0,12)+(arg?" for "+arg:""))',
|
|
298
|
+
'})().catch((err)=>{console.error("chant: the re-plan could not decide: "+(err&&err.message?err.message:String(err)));process.exit(1)});',
|
|
299
|
+
].join("");
|
|
300
|
+
/**
|
|
301
|
+
* The pending step's script on GitHub and Forgejo (#4899): `node -e`, from
|
|
302
|
+
* `/`, posting the plan status pending at `CHANT_PENDING_SHA` with the token
|
|
303
|
+
* in `CHANT_PENDING_TOKEN`. A forge that refuses it is a warning: the note
|
|
304
|
+
* job sets the status the plan ends with.
|
|
305
|
+
*/
|
|
306
|
+
export const PENDING_JS = [
|
|
307
|
+
'const api=String(process.env.GITHUB_API_URL||"").replace(/\\/+$/,""),repo=process.env.GITHUB_REPOSITORY,sha=process.env.CHANT_PENDING_SHA||"";',
|
|
308
|
+
'if(!/^[0-9a-f]{40}$/.test(sha)){console.log("chant: no commit to say the plan started on");process.exit(0)}',
|
|
309
|
+
'const run=process.env.GITHUB_SERVER_URL&&process.env.GITHUB_RUN_ID?process.env.GITHUB_SERVER_URL+"/"+repo+"/actions/runs/"+process.env.GITHUB_RUN_ID:undefined;',
|
|
310
|
+
'fetch(api+"/repos/"+repo+"/statuses/"+sha,{method:"POST",headers:{authorization:"token "+process.env.CHANT_PENDING_TOKEN,accept:"application/json","content-type":"application/json"},body:JSON.stringify({state:"pending",context:process.env.CHANT_PENDING_CONTEXT,description:process.env.CHANT_PENDING_DESCRIPTION,...(run?{target_url:run}:{})})})',
|
|
311
|
+
'.then((r)=>console.log(r.ok?"chant: "+process.env.CHANT_PENDING_CONTEXT+" is pending":"chant: the forge answered "+r.status+" to the pending status"),(err)=>console.log("chant: the pending status was not posted: "+err.message));',
|
|
312
|
+
].join("");
|
|
313
|
+
/**
|
|
314
|
+
* The plan step's lines for the plan verb (#4899): the verb, then the
|
|
315
|
+
* report line whatever the verb's exit, then the step exits with the verb's
|
|
316
|
+
* status. Without a report line, the verb alone.
|
|
317
|
+
*/
|
|
318
|
+
export function planVerbLines(p) {
|
|
319
|
+
if (!p.report && !p.record)
|
|
320
|
+
return [p.command];
|
|
321
|
+
return [
|
|
322
|
+
...(p.record ? ['chant_plan_started="$(date -u +%Y-%m-%dT%H:%M:%SZ)"'] : []),
|
|
323
|
+
"chant_plan_exit=0",
|
|
324
|
+
`${p.command} || chant_plan_exit=$?`,
|
|
325
|
+
...(p.report ? [`${p.report} || echo "chant: the report line exited $?" >&2`] : []),
|
|
326
|
+
// #4899: the run record goes into the hand-off, for the note job to keep on chant/lifecycle.
|
|
327
|
+
...(p.record ? [`CHANT_PLAN_EXIT="$chant_plan_exit" CHANT_PLAN_STARTED="$chant_plan_started" node -e '${PLAN_RECORD_JS}' ${PR_LOOP_REPORT_DIR} || echo "chant: the plan's run record was not written" >&2`] : []),
|
|
328
|
+
'[ "$chant_plan_exit" -eq 0 ] || exit "$chant_plan_exit"',
|
|
329
|
+
];
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* The plan step's record line (#4899): `node -e`, writing the run record of
|
|
333
|
+
* the plan verb into the directory it is given, {@link PLAN_RUN_RECORD_FILE}.
|
|
334
|
+
* It reads the op, environment and labels from {@link PLAN_RUN_RECORD_ENV},
|
|
335
|
+
* the verb's exit from `CHANT_PLAN_EXIT`, its start from
|
|
336
|
+
* `CHANT_PLAN_STARTED`, and the commit from git. The shape is an
|
|
337
|
+
* `OpRunRecordInput` (../op/runtime.ts) with no run origin, which the note
|
|
338
|
+
* job names.
|
|
339
|
+
*/
|
|
340
|
+
export const PLAN_RECORD_JS = [
|
|
341
|
+
'const fs=require("fs"),path=require("path"),cp=require("child_process"),crypto=require("crypto");',
|
|
342
|
+
"const c=JSON.parse(process.env.CHANT_PLAN_RECORD||\"{}\"),dir=process.argv[1];",
|
|
343
|
+
'const code=Number(process.env.CHANT_PLAN_EXIT||"1"),ended=new Date().toISOString(),started=new Date(Date.parse(process.env.CHANT_PLAN_STARTED||"")||Date.now()).toISOString();',
|
|
344
|
+
'let sha="";try{sha=cp.execFileSync("git",["rev-parse","HEAD"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{}',
|
|
345
|
+
'const ok=code===0,status=ok?"ok":"fail",ms=Math.max(0,Date.parse(ended)-Date.parse(started));',
|
|
346
|
+
'const rec={id:crypto.randomUUID(),op:c.op,env:c.env,started,ended,status,labels:c.labels||{},outcomes:{},phases:[{name:"plan",status,steps:[{fn:"shellCmd",status,durationMs:ms,...(ok?{}:{error:"command exited "+code})}]}],...(sha?{gitSha:sha}:{}),...(ok?{}:{failure:{code:"command-failed",reason:"the plan verb exited "+code,phase:"plan",exitCode:code}})};',
|
|
347
|
+
`fs.mkdirSync(dir,{recursive:true});fs.writeFileSync(path.join(dir,"${PLAN_RUN_RECORD_FILE}"),JSON.stringify(rec)+"\\n");`,
|
|
348
|
+
].join("");
|
|
122
349
|
/** The evidence step of one plan job (#4870), as {@link ProductPlanJob.evidence}. */
|
|
123
|
-
export function planEvidenceOf(forge, evidence, words, planJob) {
|
|
350
|
+
export function planEvidenceOf(forge, evidence, words, planJob, opts = {}) {
|
|
124
351
|
assertPipelineEvidence(evidence);
|
|
125
352
|
const key = evidenceKeyEnv(forge, evidence);
|
|
126
353
|
const bin = words.bin;
|
|
127
354
|
if (forge === "gitlab") {
|
|
128
|
-
//
|
|
355
|
+
// #4914: the job runs in the target branch's plan notes pipeline, before the note job, and signs every open
|
|
356
|
+
// merge request's settled plan job from its artifact; no job of a merge request pipeline holds the key.
|
|
357
|
+
const dir = gitlabOpenEvidenceDir(planJob);
|
|
129
358
|
return {
|
|
130
359
|
jobName: `${planJob}-evidence`,
|
|
131
|
-
lines:
|
|
360
|
+
lines: openEvidenceLines({ job: planJob, dir: PR_LOOP_REPORT_DIR, out: dir, ...(bin ? { bin } : {}), ...(opts.noForks ? { noForks: true } : {}) }),
|
|
132
361
|
env: key,
|
|
362
|
+
dir,
|
|
363
|
+
...(evidenceKeyless(evidence) ? { idTokens: evidenceIdTokens(evidence) } : {}),
|
|
133
364
|
};
|
|
134
365
|
}
|
|
135
366
|
return {
|
|
136
367
|
lines: planEvidenceLines({ dir: PR_LOOP_REPORT_DIR, at: '"$HEAD_SHA"', base: '"$BASE_SHA"', result: '"$PLAN_RESULT"', ...(bin ? { bin } : {}) }),
|
|
137
368
|
env: { HEAD_SHA: "${{ github.sha }}", BASE_SHA: "${{ github.event.pull_request.base.sha }}", PLAN_RESULT: `\${{ needs.${planJob}.result }}`, ...key },
|
|
369
|
+
...(evidenceKeyless(evidence) ? { idToken: true } : {}),
|
|
138
370
|
};
|
|
139
371
|
}
|
|
140
372
|
/** The GitHub and Forgejo condition that a pull request is from this repository, not a fork (#4799). */
|
package/dist/config.d.ts
CHANGED
|
@@ -155,6 +155,7 @@ export declare const ChantConfigSchema: z.ZodObject<{
|
|
|
155
155
|
name: z.ZodString;
|
|
156
156
|
build: z.ZodString;
|
|
157
157
|
archive: z.ZodString;
|
|
158
|
+
platforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
158
159
|
}, z.core.$strict>, z.ZodObject<{
|
|
159
160
|
name: z.ZodString;
|
|
160
161
|
dockerfile: z.ZodString;
|
|
@@ -162,6 +163,7 @@ export declare const ChantConfigSchema: z.ZodObject<{
|
|
|
162
163
|
platforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
163
164
|
archive: z.ZodOptional<z.ZodString>;
|
|
164
165
|
prepare: z.ZodOptional<z.ZodString>;
|
|
166
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
165
167
|
}, z.core.$strict>]>>>;
|
|
166
168
|
lane: z.ZodOptional<z.ZodString>;
|
|
167
169
|
version: z.ZodOptional<z.ZodObject<{
|
|
@@ -518,8 +520,8 @@ export interface ChantConfig {
|
|
|
518
520
|
* digest and hands every digest to the build through `CHANT_RELEASE_DIGESTS`,
|
|
519
521
|
* so a package can pin the images it ships with. An `oci` target pushes
|
|
520
522
|
* the archive. An entry may name a `dockerfile` (with `context`,
|
|
521
|
-
* `platforms`, `archive` and `
|
|
522
|
-
* runs the reproducible build itself (#4819). See
|
|
523
|
+
* `platforms`, `archive`, `prepare` and `args`) in place of `build`, and
|
|
524
|
+
* chant runs the reproducible build itself (#4819, #4908). See
|
|
523
525
|
* ./lifecycle/release-images.ts.
|
|
524
526
|
*/
|
|
525
527
|
images?: import("./lifecycle/release-images.js").ReleaseImageDeclaration[];
|
|
@@ -810,10 +812,12 @@ export declare function resolveSourceDir(projectDir: string, config: {
|
|
|
810
812
|
/**
|
|
811
813
|
* The top-level directories a root build leaves out (#4794): a project with
|
|
812
814
|
* no `sourceDir`, built from its own root, does not load `scripts/`, where a
|
|
813
|
-
* script that runs on load (prints and exits) would take the build's place
|
|
814
|
-
*
|
|
815
|
-
*
|
|
816
|
-
*
|
|
815
|
+
* script that runs on load (prints and exits) would take the build's place,
|
|
816
|
+
* nor `migrations/` (#4921), whose `.sql` files are `ALTER`s of objects
|
|
817
|
+
* declared elsewhere and whose backfill scripts run on load too. Matched
|
|
818
|
+
* against the path relative to the project root, so only the project's own
|
|
819
|
+
* top-level directories are skipped. The config's `include` brings one back.
|
|
820
|
+
* Test and spec files are left out of every build already
|
|
817
821
|
* (`isSourceFileName`).
|
|
818
822
|
*/
|
|
819
823
|
export declare const ROOT_SOURCE_EXCLUDES: readonly string[];
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACn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EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACtB,6RAA6R;IAC7R,sBAAsB,EAAE;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG,uBAAuB,CAanF;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAiB1E;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAEpF;AAED;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IACnB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM;IAAlD,YAAY,OAAO,EAAE,MAAM,EAAW,GAAG,CAAC,EAAE,MAAM,YAAA,EAEjD;CACF"}
|
package/dist/config.js
CHANGED
|
@@ -83,7 +83,8 @@ export const ChantConfigSchema = z.object({
|
|
|
83
83
|
publish: z.array(PublishDeclarationSchema).optional(),
|
|
84
84
|
images: z
|
|
85
85
|
.array(z.union([
|
|
86
|
-
|
|
86
|
+
// #4876: `platforms`, what the command builds, for the release workflow's QEMU setup.
|
|
87
|
+
z.object({ name: z.string().min(1), build: z.string().min(1), archive: z.string().min(1), platforms: z.array(z.string().min(1)).min(1).optional() }).strict(),
|
|
87
88
|
// #4819: chant builds the Dockerfile as the reproducible OCI archive itself.
|
|
88
89
|
z
|
|
89
90
|
.object({
|
|
@@ -93,6 +94,8 @@ export const ChantConfigSchema = z.object({
|
|
|
93
94
|
platforms: z.array(z.string().min(1)).min(1).optional(),
|
|
94
95
|
archive: z.string().min(1).optional(),
|
|
95
96
|
prepare: z.string().min(1).optional(),
|
|
97
|
+
// #4908: build arguments beside the two chant passes.
|
|
98
|
+
args: z.record(z.string(), z.string()).optional(),
|
|
96
99
|
})
|
|
97
100
|
.strict(),
|
|
98
101
|
]))
|
|
@@ -280,13 +283,15 @@ export function resolveSourceDir(projectDir, config, explicit) {
|
|
|
280
283
|
/**
|
|
281
284
|
* The top-level directories a root build leaves out (#4794): a project with
|
|
282
285
|
* no `sourceDir`, built from its own root, does not load `scripts/`, where a
|
|
283
|
-
* script that runs on load (prints and exits) would take the build's place
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
286
|
+
* script that runs on load (prints and exits) would take the build's place,
|
|
287
|
+
* nor `migrations/` (#4921), whose `.sql` files are `ALTER`s of objects
|
|
288
|
+
* declared elsewhere and whose backfill scripts run on load too. Matched
|
|
289
|
+
* against the path relative to the project root, so only the project's own
|
|
290
|
+
* top-level directories are skipped. The config's `include` brings one back.
|
|
291
|
+
* Test and spec files are left out of every build already
|
|
287
292
|
* (`isSourceFileName`).
|
|
288
293
|
*/
|
|
289
|
-
export const ROOT_SOURCE_EXCLUDES = ["scripts"];
|
|
294
|
+
export const ROOT_SOURCE_EXCLUDES = ["scripts", "migrations"];
|
|
290
295
|
/**
|
|
291
296
|
* The `exclude`/`include` globs of the project `startDir` belongs to, found by
|
|
292
297
|
* the same upward walk as {@link loadChantConfigUpward}. `undefined` when the
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import type { CatalogConsumersInput } from "../lifecycle/release-catalog.js";
|
|
22
22
|
import type { ControlEntry } from "./records.js";
|
|
23
|
+
/**
|
|
24
|
+
* The first chant with the consumers join, {@link joinControlConsumers} and
|
|
25
|
+
* {@link readControlConsumers} on `@intentius/chant/ci-control` (#4600).
|
|
26
|
+
* #4916 declared it after the fact, for `chant dev dead-guards`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const CONTROL_CONSUMERS_FLOOR = "0.124.55";
|
|
23
29
|
/** The file each project keeps its consumers in. */
|
|
24
30
|
export declare const CONSUMERS_FILE = "consumers.json";
|
|
25
31
|
/** The contract version of {@link ConsumersDocument}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consumers.d.ts","sourceRoot":"","sources":["../../src/control/consumers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAmB,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,oDAAoD;AACpD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,kBAAkB,CAAC;IACpC,SAAS,EAAE,qBAAqB,EAAE,CAAC;CACpC;AAED,yDAAyD;AACzD,MAAM,WAAW,gBAAgB;IAC/B,wFAAwF;IACxF,OAAO,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED,yFAAyF;AACzF,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,qBAAqB,EAAE,CAAC;IACnC,qDAAqD;IACrD,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAcD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG;IAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAoC7H;AAED,kJAAkJ;AAClJ,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,qBAAqB,EAAE,GAAG,MAAM,CAQrF;AAMD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GAAG,eAAe,C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wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG;IAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAoC7H;AAED,kJAAkJ;AAClJ,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,qBAAqB,EAAE,GAAG,MAAM,CAQrF;AAMD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GAAG,eAAe,CA8B3F;AAED,2FAA2F;AAC3F,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAEtG,6FAA6F;AAC7F,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,8EAA8E;IAC9E,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiBpI"}
|
|
@@ -18,6 +18,12 @@
|
|
|
18
18
|
* reader for one project's file, so it reads neither git nor the network
|
|
19
19
|
* itself. Core carries no engine word.
|
|
20
20
|
*/
|
|
21
|
+
/**
|
|
22
|
+
* The first chant with the consumers join, {@link joinControlConsumers} and
|
|
23
|
+
* {@link readControlConsumers} on `@intentius/chant/ci-control` (#4600).
|
|
24
|
+
* #4916 declared it after the fact, for `chant dev dead-guards`.
|
|
25
|
+
*/
|
|
26
|
+
export const CONTROL_CONSUMERS_FLOOR = "0.124.55";
|
|
21
27
|
/** The file each project keeps its consumers in. */
|
|
22
28
|
export const CONSUMERS_FILE = "consumers.json";
|
|
23
29
|
/** The contract version of {@link ConsumersDocument}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dead-guards.d.ts","sourceRoot":"","sources":["../src/dead-guards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dead-guards.d.ts","sourceRoot":"","sources":["../src/dead-guards.ts"],"names":[],"mappings":"AAuCA,OAAO,EAAqC,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEjF,wCAAwC;AACxC,MAAM,WAAW,SAAS;IACxB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,eAAe,CAAC;IAC3C,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,OAAO,CAAC;IACZ,kDAAkD;IAClD,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,iGAAiG;IACjG,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,2EAA2E;IAC3E,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtC,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAQD,0HAA0H;AAC1H,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIvD;AAgBD,yGAAyG;AACzG,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CA2B3D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,UAAU,CAAA;CAAE,CA8F9E;AAoBD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAoB/D;AAED,0DAA0D;AAC1D,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,SAAS,QAAQ,EAAgB,GAAG,KAAK,EAAE,CAmGvF;AAgBD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CAyB3E;AAED,kDAAkD;AAClD,wBAAgB,aAAa,CAAC,CAAC,EAAE,SAAS,GAAG,MAAM,CAGlD"}
|
package/dist/dead-guards.js
CHANGED
|
@@ -19,10 +19,13 @@
|
|
|
19
19
|
* (`CI_CONTROL_FLOOR: string;`), or destructured from a dynamic import. A
|
|
20
20
|
* floor the file imports statically is the product using the part, so it
|
|
21
21
|
* is not a check.
|
|
22
|
-
* - `module`: a chant subpath
|
|
23
|
-
* (
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* - `module`: a chant subpath, or a lexicon's
|
|
23
|
+
* (`@intentius/chant-lexicon-terraform/registry`, #4916), loaded with
|
|
24
|
+
* `import()` where a `catch` is near (`try { await import(specifier) }
|
|
25
|
+
* catch { return undefined }`, or `.catch(`), the shape of a chant-next.ts
|
|
26
|
+
* loader. Its floor is the lowest floor the subpath serves: a chant with
|
|
27
|
+
* that floor has the subpath. Lexicons release with chant at the same
|
|
28
|
+
* version, so a lexicon subpath is checked against the chant pin too.
|
|
26
29
|
* - `product-floor`: a product's own constant for the chant it needs,
|
|
27
30
|
* `const CHANT_CI_FLOOR = "0.124.67"`, whose checks the pin meets.
|
|
28
31
|
*
|
|
@@ -345,8 +348,8 @@ export function guardsIn(src, table = FLOOR_TABLE) {
|
|
|
345
348
|
continue;
|
|
346
349
|
push(at, "floor", name, version);
|
|
347
350
|
}
|
|
348
|
-
// module: a chant subpath loaded with import() inside a try, or with .catch( on the load.
|
|
349
|
-
for (const m of src.matchAll(/(["'`])(@intentius\/chant(?:\/[A-Za-z0-9_./-]+)?)\1/g)) {
|
|
351
|
+
// module: a chant or lexicon subpath loaded with import() inside a try, or with .catch( on the load.
|
|
352
|
+
for (const m of src.matchAll(/(["'`])(@intentius\/chant(?:-lexicon-[a-z0-9-]+)?(?:\/[A-Za-z0-9_./-]+)?)\1/g)) {
|
|
350
353
|
const at = m.index;
|
|
351
354
|
const spec = m[2];
|
|
352
355
|
const version = modules.get(spec);
|
|
@@ -55,7 +55,7 @@ export declare function isSourceFileName(name: string): boolean;
|
|
|
55
55
|
* discovery walk (`./walk.ts`, #2527): test and spec files, chant-generated
|
|
56
56
|
* files, skip-marked files and whatever the walk's rules and the project's
|
|
57
57
|
* globs skip are left out. Walked from the root of a project with no
|
|
58
|
-
* `sourceDir`, its top-level `scripts/`
|
|
58
|
+
* `sourceDir`, its top-level `scripts/` and `migrations/` are left out too (#4794, #4921,
|
|
59
59
|
* `ROOT_SOURCE_EXCLUDES`), unless `include` brings it back.
|
|
60
60
|
*/
|
|
61
61
|
export declare function findInfraFiles(path: string, options?: FindInfraFilesOptions): Promise<string[]>;
|
package/dist/discovery/files.js
CHANGED
|
@@ -91,7 +91,7 @@ export function isSourceFileName(name) {
|
|
|
91
91
|
* discovery walk (`./walk.ts`, #2527): test and spec files, chant-generated
|
|
92
92
|
* files, skip-marked files and whatever the walk's rules and the project's
|
|
93
93
|
* globs skip are left out. Walked from the root of a project with no
|
|
94
|
-
* `sourceDir`, its top-level `scripts/`
|
|
94
|
+
* `sourceDir`, its top-level `scripts/` and `migrations/` are left out too (#4794, #4921,
|
|
95
95
|
* `ROOT_SOURCE_EXCLUDES`), unless `include` brings it back.
|
|
96
96
|
*/
|
|
97
97
|
export async function findInfraFiles(path, options) {
|
package/dist/drift-issue.d.ts
CHANGED
|
@@ -104,9 +104,11 @@ export interface DriftIssueInput {
|
|
|
104
104
|
match?: MarkerMatch;
|
|
105
105
|
/**
|
|
106
106
|
* The statuses that are drift. Default {@link DRIFT_ISSUE_STATUSES}. A
|
|
107
|
-
* read with no snapshot
|
|
108
|
-
*
|
|
109
|
-
*
|
|
107
|
+
* read with no snapshot gives a declared object the provider lacks as
|
|
108
|
+
* `pending`, not deployed yet, unless its lexicon says such an object is
|
|
109
|
+
* gone: the sql lexicon does since #4896, so its records say `missing`
|
|
110
|
+
* and the default covers them. A caller that passes `pending` here (SQL
|
|
111
|
+
* Yodeler did, for a chant before #4896) still gets the same issue.
|
|
110
112
|
*/
|
|
111
113
|
statuses?: readonly DriftStatus[];
|
|
112
114
|
}
|
|
@@ -142,6 +144,21 @@ export declare function driftIssueRecords(records: readonly DriftIssueRecord[],
|
|
|
142
144
|
* SHA-256.
|
|
143
145
|
*/
|
|
144
146
|
export declare function driftIssueFingerprint(records: readonly DriftIssueRecord[], statuses?: readonly DriftStatus[]): string;
|
|
147
|
+
/** One stack's (or environment's) drift records, for {@link driftRunFingerprint}. */
|
|
148
|
+
export interface DriftRunStack {
|
|
149
|
+
stack: string;
|
|
150
|
+
records: readonly DriftIssueRecord[];
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* A run's fingerprint over several stacks (#4896), for the drift notice a
|
|
154
|
+
* run sends (`driftNotifyFields`'s `fingerprint` on
|
|
155
|
+
* `@intentius/chant/ci-product`): each stack that has drift, as its name and
|
|
156
|
+
* its {@link driftIssueFingerprint}, sorted and hashed. A stack with no
|
|
157
|
+
* drift record is left out, so a clean stack, or one whose read failed and
|
|
158
|
+
* gave no records, does not move it. 16 hex digits of a SHA-256, the value
|
|
159
|
+
* plywood's notices carried before chant computed it.
|
|
160
|
+
*/
|
|
161
|
+
export declare function driftRunFingerprint(stacks: readonly DriftRunStack[], statuses?: readonly DriftStatus[]): string;
|
|
145
162
|
/** The issue's body: the marker, the product's intro, the table, what could not be read, the notes, the advice, the run, the fingerprint. */
|
|
146
163
|
export declare function driftIssueBody(input: DriftIssueInput, fingerprint?: string): string;
|
|
147
164
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drift-issue.d.ts","sourceRoot":"","sources":["../src/drift-issue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,KAAK,EAAkB,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEpE,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,EAAE,SAAS,WAAW,EAA2B,CAAC;AAEnF,wEAAwE;AACxE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,CAAC,CAAC,CAAC;AAE5K,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACrC,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,sFAAsF;AACtF,MAAM,WAAW,eAAe;IAC9B,6HAA6H;IAC7H,OAAO,EAAE,MAAM,CA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