@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
|
@@ -35,8 +35,15 @@ import type { ForgeKind } from "../pr-forge";
|
|
|
35
35
|
import type { CiRunner } from "../ci-jobs";
|
|
36
36
|
import type { CiProductWords } from "../ci-product-words";
|
|
37
37
|
import type { PrPlanNoteWords } from "../pr-plan-note";
|
|
38
|
-
import { assertPipelineEvidence, evidenceKeyEnv, planEvidenceLines, type PipelineEvidence } from "../ci-evidence-jobs";
|
|
38
|
+
import { assertPipelineEvidence, evidenceIdTokens, evidenceKeyEnv, evidenceKeyless, gitlabOpenEvidenceDir, openEvidenceLines, planEvidenceLines, type PipelineEvidence } from "../ci-evidence-jobs";
|
|
39
39
|
import { gitlabPlanJobName, PR_LOOP_REPORT_DIR, PR_PLAN_NOTE_JOB, prLoopPassedEnv, prLoopPostJob, prLoopRunner, type PrLoopPipelineOptions } from "./pr-pipeline";
|
|
40
|
+
import { GITHUB_JOB_TOKEN } from "../ci-jobs";
|
|
41
|
+
import { cloudLogin, type CloudLoginSpec } from "../ci-login";
|
|
42
|
+
import type { OpWaveRunStep } from "../lexicon";
|
|
43
|
+
import { controlNoteCheckout, type ControlNoteCheckout, type ControlTarget } from "../control/dispatch";
|
|
44
|
+
import { commentLine, productStatusContext } from "../ci-product-words";
|
|
45
|
+
import { PLAN_WATCHES_ENV, scheduledWatchProblem, type ScheduledWatch } from "../op/schedule-overdue";
|
|
46
|
+
import { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE } from "../pr-plan-record";
|
|
40
47
|
|
|
41
48
|
/** The variable the plan-note job reads the product's note words from (#4799), as JSON. Set from the pipeline, never from the report. */
|
|
42
49
|
export const PR_PLAN_NOTE_WORDS_ENV = "CHANT_PLAN_NOTE_WORDS";
|
|
@@ -56,8 +63,60 @@ export interface ProductPlanTarget {
|
|
|
56
63
|
* tokens are dropped.
|
|
57
64
|
*/
|
|
58
65
|
writeProbe?: string;
|
|
66
|
+
/**
|
|
67
|
+
* This target's cloud login (#4899, #4931), in place of the plan's
|
|
68
|
+
* {@link ProductPlanOptions.login}: chant's login from the OIDC token file
|
|
69
|
+
* (`@intentius/chant/ci-login`, #4788), run before the write probe.
|
|
70
|
+
*/
|
|
71
|
+
login?: CloudLoginSpec;
|
|
72
|
+
/** OIDC tokens this target's plan job requests besides its login's, `{ <variable>: <audience> }`, in place of the plan's {@link ProductPlanOptions.idTokens}. */
|
|
73
|
+
idTokens?: Record<string, string>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* A step a product's plan job runs before its setup lines (#4899): a shell
|
|
78
|
+
* line (`run`), or on GitHub and Forgejo an action (`uses`), such as a
|
|
79
|
+
* cache restore. A `run` step starts without the forge tokens, as every
|
|
80
|
+
* step after the checkout does. GitLab has no actions, so it leaves a
|
|
81
|
+
* `uses` step out; its generator's `cache` is GitLab's cache.
|
|
82
|
+
*/
|
|
83
|
+
export interface ProductPlanSetupStep {
|
|
84
|
+
name?: string;
|
|
85
|
+
run?: string;
|
|
86
|
+
uses?: string;
|
|
87
|
+
with?: Record<string, unknown>;
|
|
88
|
+
env?: Record<string, string>;
|
|
59
89
|
}
|
|
60
90
|
|
|
91
|
+
/**
|
|
92
|
+
* The comment re-plan (#4899): `/<product> <plan word>` (or a words' alias
|
|
93
|
+
* for the plan command) plans an open pull request again. With `targets`,
|
|
94
|
+
* `/<product> plan <target>` plans that target alone, and the bare command
|
|
95
|
+
* plans every target. Without targets, the one word after the command
|
|
96
|
+
* reaches the plan verb as {@link PLAN_ARGUMENT_ENV}, such as terragucci's
|
|
97
|
+
* root.
|
|
98
|
+
*/
|
|
99
|
+
export interface ProductPlanReplanJob {
|
|
100
|
+
/** `replan` or `replan-<target>` on GitHub and Forgejo, `replan` or `<target>-replan` on GitLab. */
|
|
101
|
+
jobName: string;
|
|
102
|
+
/** `replan-note` or `replan-note-<target>`, `<target>-replan-note` on GitLab. */
|
|
103
|
+
noteJobName: string;
|
|
104
|
+
/** The comments it answers: the plan command, then each alias for it that is on. */
|
|
105
|
+
comments: string[];
|
|
106
|
+
/** Aliases whose words name a variable that turns them on, with that variable. */
|
|
107
|
+
gated: Array<{ comment: string; when: string }>;
|
|
108
|
+
/** The note job's command and variables, which read the pull request and head from the re-plan job. */
|
|
109
|
+
post: { command: string; env: Record<string, string>; setup?: string[] };
|
|
110
|
+
/** The artifact the note job (GitHub, Forgejo) or the re-plan job (GitLab) keeps the directory as. */
|
|
111
|
+
artifact: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** The variable a comment re-plan's one argument reaches the plan verb in (#4899). Empty on a pull request's own plan. */
|
|
115
|
+
export const PLAN_ARGUMENT_ENV = "CHANT_PLAN_ARGUMENT";
|
|
116
|
+
|
|
117
|
+
/** 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. */
|
|
118
|
+
export const PLAN_NOTE_NOTICES_ENV = "CHANT_PLAN_NOTE_NOTICES";
|
|
119
|
+
|
|
61
120
|
/** The product plan (#4799): {@link ProductPipelineOptions.plan}. */
|
|
62
121
|
export interface ProductPlanOptions {
|
|
63
122
|
/**
|
|
@@ -84,8 +143,114 @@ export interface ProductPlanOptions {
|
|
|
84
143
|
noteWords?: PrPlanNoteWords;
|
|
85
144
|
/** The workflow's name (GitHub and Forgejo) or the pipeline's (GitLab). Default `chant-pr-<env>`. */
|
|
86
145
|
workflow?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Variables for the whole plan job (#4899), every step of it: the job's
|
|
148
|
+
* `env` on GitHub and Forgejo, its `variables` on GitLab. A forge token's
|
|
149
|
+
* name is refused.
|
|
150
|
+
*/
|
|
151
|
+
env?: Record<string, string>;
|
|
152
|
+
/**
|
|
153
|
+
* The plan job's cloud login (#4899, #4931), for every target without
|
|
154
|
+
* its own: chant's login from the OIDC token file
|
|
155
|
+
* (`@intentius/chant/ci-login`, #4788), after the setup lines and before
|
|
156
|
+
* the write probe. The job asks for the OIDC token: `id-token: write`
|
|
157
|
+
* (Forgejo `enable-openid-connect`), GitLab `id_tokens`.
|
|
158
|
+
*/
|
|
159
|
+
login?: CloudLoginSpec;
|
|
160
|
+
/**
|
|
161
|
+
* OIDC tokens the plan job requests for a login the product's command
|
|
162
|
+
* does itself (#4931), `{ <variable>: <audience> }`: GitLab `id_tokens`,
|
|
163
|
+
* and `id-token: write` on GitHub and Forgejo, where the command asks the
|
|
164
|
+
* forge for its token by audience.
|
|
165
|
+
*/
|
|
166
|
+
idTokens?: Record<string, string>;
|
|
167
|
+
/**
|
|
168
|
+
* Post the plan status pending ("planning") before the checkout (#4899),
|
|
169
|
+
* on GitHub and Forgejo, from a step that alone holds the job's token.
|
|
170
|
+
* The job asks for `statuses: write`. GitLab's plan job holds no token,
|
|
171
|
+
* so there the pipeline's own status says the plan runs.
|
|
172
|
+
*/
|
|
173
|
+
pending?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* The control repo the plan reads (#4899), as terragucci reads it for
|
|
176
|
+
* estate ownership: chant's read-only fetch of its `chant/lifecycle`
|
|
177
|
+
* (`controlNoteCheckout`), right after the checkout and before any of the
|
|
178
|
+
* change's code runs. It sets `CHANT_CONTROL_DIR`.
|
|
179
|
+
*/
|
|
180
|
+
controlRead?: ControlTarget;
|
|
181
|
+
/** Steps after the checkout and the control read, before the setup lines (#4899): a cache restore, an install. */
|
|
182
|
+
setup?: ProductPlanSetupStep[];
|
|
183
|
+
/**
|
|
184
|
+
* A shell line run after the plan verb whatever its exit (#4899), such as
|
|
185
|
+
* sql-yodeler's `yodel report {target} --out {output}/report`, in the plan
|
|
186
|
+
* step, so it is not a step after the change's code. `{target}` and
|
|
187
|
+
* `{output}` are filled as in `command`. The step then exits with the plan
|
|
188
|
+
* verb's status. What it writes under `{output}` is kept with the report.
|
|
189
|
+
*/
|
|
190
|
+
report?: string;
|
|
191
|
+
/**
|
|
192
|
+
* One run at a time per pull request (#4899): a workflow-level
|
|
193
|
+
* `concurrency` group `<group>-<pull request>` on GitHub and Forgejo
|
|
194
|
+
* (default group: the workflow's name), cancelling the run before it when
|
|
195
|
+
* `cancelInProgress`. A comment's run, with `replan`, is in a group of its
|
|
196
|
+
* own comment, so a comment never cancels a plan. On GitLab
|
|
197
|
+
* `cancelInProgress` makes the plan jobs `interruptible`, which GitLab's
|
|
198
|
+
* auto-cancel of redundant pipelines stops.
|
|
199
|
+
*/
|
|
200
|
+
concurrency?: { group?: string; cancelInProgress?: boolean };
|
|
201
|
+
/**
|
|
202
|
+
* The comment re-plan (#4899, {@link ProductPlanReplanJob}). The words
|
|
203
|
+
* need a plan command. On GitHub the commenter must be an owner, member or
|
|
204
|
+
* collaborator; on Forgejo the job asks the forge whether the commenter
|
|
205
|
+
* can write. On GitLab the note-commands job (`noteCommands`) starts a
|
|
206
|
+
* pipeline of the target branch for the comment, which runs the re-plan
|
|
207
|
+
* jobs whose target the comment names.
|
|
208
|
+
*/
|
|
209
|
+
replan?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Lines the note job runs (#4931), on GitHub and Forgejo, in the job that
|
|
212
|
+
* holds the token and none of the change's code: `before` after the report
|
|
213
|
+
* is taken back and before `pr-post`, `after` once it posted. A `before`
|
|
214
|
+
* line may write notices, one a line, to the file
|
|
215
|
+
* `$CHANT_PLAN_NOTE_NOTICES` names, and `pr-post` adds them under the
|
|
216
|
+
* note's counts, such as terragucci's notice naming whose review does not
|
|
217
|
+
* count. They reach the job's token as `GITHUB_TOKEN`. GitLab's note job
|
|
218
|
+
* posts every open merge request's note in one run, so it takes none.
|
|
219
|
+
*/
|
|
220
|
+
noteSteps?: { before?: string[]; after?: string[] };
|
|
221
|
+
/**
|
|
222
|
+
* The product's own scheduled jobs the note job checks for having stopped
|
|
223
|
+
* (#4888), such as terragucci's drift job: each a `ScheduledWatch` with
|
|
224
|
+
* its cron, the files the product's generator wrote it in, and on GitLab
|
|
225
|
+
* its schedule selector. The note job holds the token the plan job lacks,
|
|
226
|
+
* so `pr-post` asks the forge when each last ran, in its checkout of the
|
|
227
|
+
* target branch's commit, and adds the line for one that is overdue under
|
|
228
|
+
* the note's counts. They reach it as `CHANT_PLAN_WATCHES`, from the
|
|
229
|
+
* pipeline, never from the plan job's report.
|
|
230
|
+
*/
|
|
231
|
+
watches?: ScheduledWatch[];
|
|
232
|
+
/**
|
|
233
|
+
* A run record for the plan job (#4899), as `chant ci run plan --in-place`
|
|
234
|
+
* writes one for `pr-plan`'s: Op `pr-plan` in the run ledger,
|
|
235
|
+
* `<env>/runs__pr-plan.jsonl` on `chant/lifecycle`. The plan job holds no
|
|
236
|
+
* token, so its plan step writes the record into the hand-off
|
|
237
|
+
* ({@link PLAN_RUN_RECORD_FILE}) once the plan verb and the report line ran,
|
|
238
|
+
* and the note job, which holds the token, appends it to the ledger and
|
|
239
|
+
* pushes it with the note (`pr-post --record-run <plan job>`). The note job
|
|
240
|
+
* reads the record as data: it keeps the record's id, times and exit code,
|
|
241
|
+
* and names the op, environment, commit, run and status from what it knows
|
|
242
|
+
* itself. The note job then asks `contents: write` on GitHub and Forgejo.
|
|
243
|
+
* Unsigned, as `pr-plan`'s is (#4328). Default off.
|
|
244
|
+
*/
|
|
245
|
+
record?: boolean;
|
|
87
246
|
}
|
|
88
247
|
|
|
248
|
+
/** 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). */
|
|
249
|
+
export { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE } from "../pr-plan-record";
|
|
250
|
+
|
|
251
|
+
/** The variable the plan step reads the record's op, environment and labels from (#4899), as JSON. */
|
|
252
|
+
export const PLAN_RUN_RECORD_ENV = "CHANT_PLAN_RECORD";
|
|
253
|
+
|
|
89
254
|
/** One plan job and its note job, for one target or for the whole pipeline (#4799). */
|
|
90
255
|
export interface ProductPlanJob {
|
|
91
256
|
/** The target, when the plan has targets. Also the note's and the status's member. */
|
|
@@ -112,10 +277,35 @@ export interface ProductPlanJob {
|
|
|
112
277
|
* With the pipeline's `evidence` (#4870): the lines that sign the plan
|
|
113
278
|
* job's `plan` and `policy` checks from its report, and their variables
|
|
114
279
|
* (the runner key from its secret). GitHub and Forgejo run them in the
|
|
115
|
-
* note job before `pr-post`; GitLab in a job of their own
|
|
116
|
-
* job,
|
|
280
|
+
* note job before `pr-post`; GitLab in a job of their own, `jobName`, in
|
|
281
|
+
* the target branch's plan notes pipeline before the note job (#4914),
|
|
282
|
+
* which keeps `dir` as its artifact and names the environment
|
|
283
|
+
* `GITLAB_EVIDENCE_ENVIRONMENT`; the note job reads `dir`
|
|
284
|
+
* (`--evidence-dir`). Signing keyless (#4869), the job asks for an OIDC
|
|
285
|
+
* token: `idToken` (GitHub's `id-token: write`, Forgejo's
|
|
286
|
+
* `enable-openid-connect`) or GitLab's `idTokens`.
|
|
117
287
|
*/
|
|
118
|
-
evidence?: { lines: string[]; env: Record<string, string>; jobName?: string };
|
|
288
|
+
evidence?: { lines: string[]; env: Record<string, string>; jobName?: string; dir?: string; idToken?: true; idTokens?: Record<string, { aud: string }> };
|
|
289
|
+
/** The job's own variables (#4899), every step's. */
|
|
290
|
+
jobEnv?: Record<string, string>;
|
|
291
|
+
/** The cloud login's steps (#4931), after the setup lines and before the write probe. GitLab: their lines in the script. */
|
|
292
|
+
login?: OpWaveRunStep[];
|
|
293
|
+
/** The OIDC tokens the plan job requests (#4931), `{ <variable>: <audience> }`: the login's and the product's own. */
|
|
294
|
+
idTokens?: Record<string, string>;
|
|
295
|
+
/** The pending status posted before the checkout (#4899), on GitHub and Forgejo. */
|
|
296
|
+
pending?: { context: string; description: string };
|
|
297
|
+
/** The control repo read after the checkout (#4899). */
|
|
298
|
+
control?: ControlNoteCheckout;
|
|
299
|
+
/** The steps before the setup lines (#4899). */
|
|
300
|
+
setup?: ProductPlanSetupStep[];
|
|
301
|
+
/** The report line after the plan verb (#4899), `{target}` and `{output}` filled. */
|
|
302
|
+
report?: string;
|
|
303
|
+
/** The comment re-plan's jobs for this target (#4899). */
|
|
304
|
+
replan?: ProductPlanReplanJob;
|
|
305
|
+
/** The note job's own lines (#4931). */
|
|
306
|
+
noteSteps?: { before: string[]; after: string[] };
|
|
307
|
+
/** With `record` (#4899): the plan step writes the run record, `env` its op, environment and labels as {@link PLAN_RUN_RECORD_ENV}; the note job's command records it. */
|
|
308
|
+
record?: { env: Record<string, string> };
|
|
119
309
|
}
|
|
120
310
|
|
|
121
311
|
const TARGET_NAME = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
@@ -128,7 +318,7 @@ const NOT_WITH_PLAN: ReadonlyArray<[keyof PrLoopPipelineOptions, string]> = [
|
|
|
128
318
|
["locks", "the lock job reads pr-plan's report"],
|
|
129
319
|
["previewComment", "the comment preview re-runs pr-plan"],
|
|
130
320
|
["staleNotes", "the stale marking names one note per pipeline"],
|
|
131
|
-
["identity", "
|
|
321
|
+
["identity", "the identity trade runs before pr-plan's checkout; give the product plan's login (or a target's) instead"],
|
|
132
322
|
["build", "the plan verb builds what it plans"],
|
|
133
323
|
["buildCommand", "the plan verb builds what it plans"],
|
|
134
324
|
["refresh", "--refresh is a pr-plan flag"],
|
|
@@ -137,7 +327,6 @@ const NOT_WITH_PLAN: ReadonlyArray<[keyof PrLoopPipelineOptions, string]> = [
|
|
|
137
327
|
["events", "--events-json is a pr-plan flag"],
|
|
138
328
|
["reportUrl", "--report-url is a pr-plan flag"],
|
|
139
329
|
["prEnvironment", "the pull request environment jobs run pr-env"],
|
|
140
|
-
["noteCommands", "the note-commands job starts pr-plan's comment jobs"],
|
|
141
330
|
["actionJob", "the action job is in chant build --pr-loop's workflow"],
|
|
142
331
|
["control", "the control read is the pr-plan report's cross-stack edges"],
|
|
143
332
|
["decide", "the description check reads pr-plan's report"],
|
|
@@ -155,6 +344,8 @@ export function productPlanJobs(forge: ForgeKind, env: string, loop: PrLoopPipel
|
|
|
155
344
|
const value = loop[key];
|
|
156
345
|
if (value !== undefined && value !== false) throw new Error(`the product plan (plan) takes no ${key}: ${why}`);
|
|
157
346
|
}
|
|
347
|
+
// #4899: GitLab's comment commands start the re-plan, so the note-commands job comes with it.
|
|
348
|
+
if (loop.noteCommands && !plan.replan) throw new Error("the product plan (plan) takes no noteCommands without replan: the note-commands job starts its comment re-plan");
|
|
158
349
|
if (!plan.command.trim()) throw new Error("the product plan's command is empty; give the product's plan verb");
|
|
159
350
|
const targets = plan.targets;
|
|
160
351
|
if (targets !== undefined && targets.length === 0) throw new Error("the product plan's targets are empty; leave targets out for one plan job");
|
|
@@ -166,12 +357,36 @@ export function productPlanJobs(forge: ForgeKind, env: string, loop: PrLoopPipel
|
|
|
166
357
|
}
|
|
167
358
|
const github = forge !== "gitlab";
|
|
168
359
|
const shared = prLoopPassedEnv(forge, loop);
|
|
360
|
+
const jobEnv = plan.env ? prLoopPassedEnv(forge, { variables: plan.env }) : {};
|
|
361
|
+
for (const key of Object.keys(jobEnv)) {
|
|
362
|
+
if (key in shared) throw new Error(`the product plan's env ${key} is the pipeline's too; give it once`);
|
|
363
|
+
}
|
|
364
|
+
for (const s of plan.setup ?? []) {
|
|
365
|
+
if ((s.run === undefined) === (s.uses === undefined)) throw new Error(`the product plan's setup step ${JSON.stringify(s.name ?? s.run ?? s.uses ?? "")} gives one of run and uses`);
|
|
366
|
+
if (s.run !== undefined && s.with !== undefined) 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`);
|
|
367
|
+
}
|
|
368
|
+
if (plan.concurrency?.group !== undefined && !/^[A-Za-z0-9][A-Za-z0-9_.-]*$/.test(plan.concurrency.group)) throw new Error(`the product plan's concurrency group ${JSON.stringify(plan.concurrency.group)} is not a name of letters, digits, ., - and _`);
|
|
369
|
+
const replanComments = plan.replan ? replanCommentsOf(words) : undefined;
|
|
370
|
+
if (plan.noteSteps && !github && ((plan.noteSteps.before?.length ?? 0) > 0 || (plan.noteSteps.after?.length ?? 0) > 0)) {
|
|
371
|
+
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");
|
|
372
|
+
}
|
|
169
373
|
const planRunner = prLoopRunner(loop, "plan");
|
|
170
374
|
const noteRunner = prLoopRunner(loop, "default");
|
|
171
375
|
const base = github
|
|
172
376
|
? { BASE_SHA: "${{ github.event.pull_request.base.sha }}", PR_NUMBER: "${{ github.event.pull_request.number }}" }
|
|
173
377
|
: { BASE_SHA: "$CI_MERGE_REQUEST_DIFF_BASE_SHA", PR_NUMBER: "$CI_MERGE_REQUEST_IID" };
|
|
174
|
-
const
|
|
378
|
+
for (const w of plan.watches ?? []) {
|
|
379
|
+
const problem = scheduledWatchProblem(w);
|
|
380
|
+
if (problem) throw new Error(`the product plan's watches: ${problem}`);
|
|
381
|
+
}
|
|
382
|
+
if (new Set((plan.watches ?? []).map((w) => w.op)).size !== (plan.watches ?? []).length) throw new Error("the product plan's watches name an Op twice");
|
|
383
|
+
// The note job's variables from the pipeline: the note words, and the product's watches (#4888).
|
|
384
|
+
const noteWords: Record<string, string> = {
|
|
385
|
+
...(plan.noteWords ? { [PR_PLAN_NOTE_WORDS_ENV]: JSON.stringify(plan.noteWords) } : {}),
|
|
386
|
+
...(plan.watches?.length ? { [PLAN_WATCHES_ENV]: JSON.stringify(plan.watches) } : {}),
|
|
387
|
+
};
|
|
388
|
+
const fill = (line: string, name: string | undefined): string => line.replaceAll("{target}", name ?? env).replaceAll("{output}", PR_LOOP_REPORT_DIR);
|
|
389
|
+
const control = plan.controlRead ? controlNoteCheckout(forge, plan.controlRead, words) : undefined;
|
|
175
390
|
const one = (target?: ProductPlanTarget): ProductPlanJob => {
|
|
176
391
|
const name = target?.name;
|
|
177
392
|
const jobName = github ? (name ? `plan-${name}` : "plan") : gitlabPlanJobName(name);
|
|
@@ -179,43 +394,233 @@ export function productPlanJobs(forge: ForgeKind, env: string, loop: PrLoopPipel
|
|
|
179
394
|
const own = target ? prLoopPassedEnv(forge, { ...(target.variables ? { variables: target.variables } : {}), ...(target.secrets ? { secrets: target.secrets } : {}) }) : {};
|
|
180
395
|
for (const key of Object.keys(own)) {
|
|
181
396
|
if (key in shared) throw new Error(`target ${name}'s ${key} is the pipeline's too; give it on the target or on the pipeline`);
|
|
397
|
+
if (key in jobEnv) throw new Error(`target ${name}'s ${key} is the product plan's env too; give it once`);
|
|
182
398
|
}
|
|
183
|
-
const
|
|
399
|
+
const post0 = prLoopPostJob(forge, env, name, words);
|
|
400
|
+
// #4899: the note job records the plan job's run, named by that job.
|
|
401
|
+
const post1 = plan.record ? { ...post0, command: `${post0.command} --record-run ${jobName}` } : post0;
|
|
402
|
+
// #4914: on GitLab the signing job of the same pipeline keeps each merge request's evidence, which the note's checks line reads.
|
|
403
|
+
const post = evidence && !github ? { ...post1, command: `${post1.command} --evidence-dir ${gitlabOpenEvidenceDir(jobName)}` } : post1;
|
|
184
404
|
// The note job reads its own plan job's result, by that job's name.
|
|
185
405
|
const postEnv: Record<string, string> = github ? { ...post.env, PLAN_RESULT: `\${{ needs.${jobName}.result }}`, ...noteWords } : { ...post.env, ...noteWords };
|
|
406
|
+
// #4931: the target's login, else the plan's, from the OIDC token file (ci-login, #4788).
|
|
407
|
+
const loginSpec = target?.login ?? plan.login;
|
|
408
|
+
const login = loginSpec ? cloudLogin(forge, loginSpec) : undefined;
|
|
409
|
+
const ownTokens = target?.idTokens ?? plan.idTokens;
|
|
410
|
+
for (const [v, aud] of Object.entries(ownTokens ?? {})) {
|
|
411
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(v)) throw new Error(`the product plan's id token ${JSON.stringify(v)} is not a variable name`);
|
|
412
|
+
if (!aud.trim() || /\s/.test(aud)) throw new Error(`the product plan's id token ${v} names no audience`);
|
|
413
|
+
if (login && v in login.idTokens && login.idTokens[v] !== aud) throw new Error(`the product plan's id token ${v} is the login's, with another audience`);
|
|
414
|
+
}
|
|
415
|
+
const idTokens = { ...(login?.idTokens ?? {}), ...(ownTokens ?? {}) };
|
|
416
|
+
const artifact = plan.artifact ? (name ? `${plan.artifact}-${name}` : plan.artifact) : name ? `chant-pr-plan-${name}` : "chant-pr-plan";
|
|
417
|
+
const replan0 = replanComments ? { ...replanJobOf(forge, env, words, name, artifact, noteWords), ...replanComments } : undefined;
|
|
418
|
+
const replan = replan0 && plan.record ? { ...replan0, post: { ...replan0.post, command: `${replan0.post.command} --record-run ${replan0.jobName}` } } : replan0;
|
|
419
|
+
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;
|
|
420
|
+
const noteBefore = plan.noteSteps?.before ?? [];
|
|
421
|
+
const noteAfter = plan.noteSteps?.after ?? [];
|
|
186
422
|
return {
|
|
187
423
|
...(name ? { target: name } : {}),
|
|
188
424
|
jobName,
|
|
189
425
|
noteJobName,
|
|
190
|
-
command: plan.command
|
|
426
|
+
command: fill(plan.command, name),
|
|
191
427
|
env: { ...base, ...shared, ...own },
|
|
192
428
|
...(target?.writeProbe ? { writeProbe: target.writeProbe } : {}),
|
|
193
429
|
post: { command: post.command, env: postEnv },
|
|
194
|
-
artifact
|
|
430
|
+
artifact,
|
|
195
431
|
...(planRunner !== undefined ? { runner: planRunner } : {}),
|
|
196
432
|
...(noteRunner !== undefined ? { noteRunner } : {}),
|
|
197
|
-
...(evidence ? { evidence: planEvidenceOf(forge, evidence, words, jobName) } : {}),
|
|
433
|
+
...(evidence ? { evidence: planEvidenceOf(forge, evidence, words, jobName, plan.forks === "skip" ? { noForks: true } : {}) } : {}),
|
|
434
|
+
...(Object.keys(jobEnv).length > 0 ? { jobEnv } : {}),
|
|
435
|
+
...(login && login.steps.length > 0 ? { login: login.steps } : {}),
|
|
436
|
+
...(Object.keys(idTokens).length > 0 ? { idTokens } : {}),
|
|
437
|
+
...(plan.pending && github ? { pending: { context: productStatusContext(words, "plan", name), description: "planning" } } : {}),
|
|
438
|
+
...(control ? { control } : {}),
|
|
439
|
+
...(plan.setup?.length ? { setup: plan.setup } : {}),
|
|
440
|
+
...(plan.report ? { report: fill(plan.report, name) } : {}),
|
|
441
|
+
...(replan ? { replan } : {}),
|
|
442
|
+
...(noteBefore.length > 0 || noteAfter.length > 0 ? { noteSteps: { before: noteBefore, after: noteAfter } } : {}),
|
|
443
|
+
...(record ? { record } : {}),
|
|
198
444
|
};
|
|
199
445
|
};
|
|
200
446
|
return targets ? targets.map(one) : [one()];
|
|
201
447
|
}
|
|
202
448
|
|
|
449
|
+
/** The comments the re-plan answers (#4899): the plan command, then the words' aliases for it. Refused when the words name no plan command. */
|
|
450
|
+
function replanCommentsOf(words: CiProductWords): { comments: string[]; gated: Array<{ comment: string; when: string }> } {
|
|
451
|
+
const command = commentLine(words, "plan");
|
|
452
|
+
if (!command) 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`);
|
|
453
|
+
const aliases = words.aliases.filter((a) => a.command === "plan");
|
|
454
|
+
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! })) };
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/** The re-plan's jobs for one target (#4899), its comments filled in by the caller. */
|
|
458
|
+
function replanJobOf(forge: ForgeKind, env: string, words: CiProductWords, name: string | undefined, artifact: string, noteWords: Record<string, string>): Omit<ProductPlanReplanJob, "comments" | "gated"> {
|
|
459
|
+
const github = forge !== "gitlab";
|
|
460
|
+
const jobName = github ? (name ? `${REPLAN_JOB}-${name}` : REPLAN_JOB) : name ? `${name}-${REPLAN_JOB}` : REPLAN_JOB;
|
|
461
|
+
const noteJobName = github ? (name ? `${REPLAN_NOTE_JOB}-${name}` : REPLAN_NOTE_JOB) : name ? `${name}-${REPLAN_NOTE_JOB}` : REPLAN_NOTE_JOB;
|
|
462
|
+
// 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.
|
|
463
|
+
const command = github ? prLoopPostJob(forge, env, name, words).command : prLoopPostJob("github", env, name, words).command.replace(" --forge github ", " --forge gitlab ");
|
|
464
|
+
const post = github
|
|
465
|
+
? {
|
|
466
|
+
command,
|
|
467
|
+
env: {
|
|
468
|
+
PR_NUMBER: `\${{ needs.${jobName}.outputs.pr }}`,
|
|
469
|
+
HEAD_SHA: `\${{ needs.${jobName}.outputs.head }}`,
|
|
470
|
+
PLAN_RESULT: `\${{ needs.${jobName}.result }}`,
|
|
471
|
+
GITHUB_TOKEN: GITHUB_JOB_TOKEN,
|
|
472
|
+
...noteWords,
|
|
473
|
+
},
|
|
474
|
+
}
|
|
475
|
+
: {
|
|
476
|
+
// 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.
|
|
477
|
+
command: command.replace(' --result "$PLAN_RESULT"', ""),
|
|
478
|
+
env: { PR_NUMBER: `$${GITLAB_REPLAN_PR_VAR}`, ...noteWords },
|
|
479
|
+
setup: ['HEAD_SHA="$(git ls-remote origin "refs/merge-requests/$PR_NUMBER/head" | cut -f1)" && export HEAD_SHA'],
|
|
480
|
+
};
|
|
481
|
+
return { jobName, noteJobName, post, artifact: `${artifact}-replan` };
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/** The comment re-plan's job and its note job (#4899). */
|
|
485
|
+
export const REPLAN_JOB = "replan";
|
|
486
|
+
export const REPLAN_NOTE_JOB = "replan-note";
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* The GitLab variables the note-commands job starts a re-plan's pipeline
|
|
490
|
+
* with (#4899): the comment preview's (`CHANT_PREVIEW_PR`,
|
|
491
|
+
* `CHANT_PREVIEW_COMMENT`), so `pr-notes --preview-comment` starts it.
|
|
492
|
+
*/
|
|
493
|
+
export const GITLAB_REPLAN_PR_VAR = "CHANT_PREVIEW_PR";
|
|
494
|
+
export const GITLAB_REPLAN_COMMENT_VAR = "CHANT_PREVIEW_COMMENT";
|
|
495
|
+
|
|
496
|
+
/** A regular expression's body that matches `text` literally, for a GitLab rule's `/.../`. */
|
|
497
|
+
function literal(text: string): string {
|
|
498
|
+
return text.replace(/[.*+?^${}()|[\]\\\/]/g, "\\$&");
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* The GitLab rule condition that the re-plan pipeline's comment asks for
|
|
503
|
+
* `target` (#4899): the command alone, or with the target's name. Without
|
|
504
|
+
* a target, the command with at most one word after it.
|
|
505
|
+
*/
|
|
506
|
+
export function gitlabReplanCommentIf(replan: Pick<ProductPlanReplanJob, "comments" | "gated">, target?: string): string {
|
|
507
|
+
const arg = target ? `( +${literal(target)})?` : "( +[A-Za-z0-9_.\\/@+=,:-]+)?";
|
|
508
|
+
const one = (c: string): string => `$${GITLAB_REPLAN_COMMENT_VAR} =~ /^${literal(c)}${arg} *$/`;
|
|
509
|
+
return [...replan.comments.map(one), ...replan.gated.map((g) => `($${g.when} && ${one(g.comment)})`)].join(" || ");
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* The re-plan job's first step on GitHub and Forgejo (#4899), with the job's
|
|
514
|
+
* token in its environment alone, before anything is checked out: it reads
|
|
515
|
+
* the comment from the event file (never as an expression in a script),
|
|
516
|
+
* decides whether it asks this job to plan, asks the forge for the pull
|
|
517
|
+
* request (open; from this repository with `forks: "skip"`) and, with
|
|
518
|
+
* `CHANT_REPLAN_PERMISSION` set (Forgejo, whose payload says nothing of the
|
|
519
|
+
* commenter), whether the commenter can write. It writes `go=1`, `pr`,
|
|
520
|
+
* `head`, `base` and `argument` to the step's outputs.
|
|
521
|
+
*/
|
|
522
|
+
export const REPLAN_DECIDE_JS = [
|
|
523
|
+
'const fs=require("fs");',
|
|
524
|
+
'const say=(m)=>console.log("chant: "+m);',
|
|
525
|
+
'const out=(k,v)=>fs.appendFileSync(process.env.GITHUB_OUTPUT,k+"="+v+"\\n");',
|
|
526
|
+
"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)}",
|
|
527
|
+
'const body=String((e.comment&&e.comment.body)||"").trim();',
|
|
528
|
+
'const cmds=JSON.parse(process.env.CHANT_REPLAN_COMMANDS||"[]");',
|
|
529
|
+
'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)}',
|
|
530
|
+
"let arg;",
|
|
531
|
+
'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}}}',
|
|
532
|
+
'if(arg===undefined){say("the comment asks for no plan");process.exit(0)}',
|
|
533
|
+
'const target=process.env.CHANT_REPLAN_TARGET||"",targets=JSON.parse(process.env.CHANT_REPLAN_TARGETS||"[]");',
|
|
534
|
+
'if(targets.length&&arg&&!targets.includes(arg)){say(arg+" is none of "+targets.join(", ")+", so nothing is planned again");process.exit(0)}',
|
|
535
|
+
'if(targets.length&&arg&&arg!==target){say("the comment plans "+arg+" again, not "+target);process.exit(0)}',
|
|
536
|
+
'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)}',
|
|
537
|
+
'const api=String(process.env.GITHUB_API_URL||"").replace(/\\/+$/,""),repo=process.env.GITHUB_REPOSITORY;',
|
|
538
|
+
'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()};',
|
|
539
|
+
"(async()=>{",
|
|
540
|
+
'const pr=await get("/pulls/"+n);',
|
|
541
|
+
'if(pr.state!=="open"){say("pull request "+n+" is not open, so it is not planned again");return}',
|
|
542
|
+
'const same=Boolean(pr.head&&pr.head.repo&&pr.head.repo.full_name===repo);',
|
|
543
|
+
'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}',
|
|
544
|
+
'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"):{};',
|
|
545
|
+
'if(!["owner","admin","maintain","write"].includes(p.permission)){say((who||"the commenter")+" cannot write to "+repo+", so nothing is planned again");return}}',
|
|
546
|
+
'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");',
|
|
547
|
+
'out("go","1");out("pr",String(n));out("head",pr.head.sha);out("base",pr.base.sha);out("argument",arg);',
|
|
548
|
+
'say("planning pull request "+n+" again at "+pr.head.sha.slice(0,12)+(arg?" for "+arg:""))',
|
|
549
|
+
'})().catch((err)=>{console.error("chant: the re-plan could not decide: "+(err&&err.message?err.message:String(err)));process.exit(1)});',
|
|
550
|
+
].join("");
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* The pending step's script on GitHub and Forgejo (#4899): `node -e`, from
|
|
554
|
+
* `/`, posting the plan status pending at `CHANT_PENDING_SHA` with the token
|
|
555
|
+
* in `CHANT_PENDING_TOKEN`. A forge that refuses it is a warning: the note
|
|
556
|
+
* job sets the status the plan ends with.
|
|
557
|
+
*/
|
|
558
|
+
export const PENDING_JS = [
|
|
559
|
+
'const api=String(process.env.GITHUB_API_URL||"").replace(/\\/+$/,""),repo=process.env.GITHUB_REPOSITORY,sha=process.env.CHANT_PENDING_SHA||"";',
|
|
560
|
+
'if(!/^[0-9a-f]{40}$/.test(sha)){console.log("chant: no commit to say the plan started on");process.exit(0)}',
|
|
561
|
+
'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;',
|
|
562
|
+
'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}:{})})})',
|
|
563
|
+
'.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));',
|
|
564
|
+
].join("");
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* The plan step's lines for the plan verb (#4899): the verb, then the
|
|
568
|
+
* report line whatever the verb's exit, then the step exits with the verb's
|
|
569
|
+
* status. Without a report line, the verb alone.
|
|
570
|
+
*/
|
|
571
|
+
export function planVerbLines(p: Pick<ProductPlanJob, "command" | "report" | "record">): string[] {
|
|
572
|
+
if (!p.report && !p.record) return [p.command];
|
|
573
|
+
return [
|
|
574
|
+
...(p.record ? ['chant_plan_started="$(date -u +%Y-%m-%dT%H:%M:%SZ)"'] : []),
|
|
575
|
+
"chant_plan_exit=0",
|
|
576
|
+
`${p.command} || chant_plan_exit=$?`,
|
|
577
|
+
...(p.report ? [`${p.report} || echo "chant: the report line exited $?" >&2`] : []),
|
|
578
|
+
// #4899: the run record goes into the hand-off, for the note job to keep on chant/lifecycle.
|
|
579
|
+
...(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`] : []),
|
|
580
|
+
'[ "$chant_plan_exit" -eq 0 ] || exit "$chant_plan_exit"',
|
|
581
|
+
];
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* The plan step's record line (#4899): `node -e`, writing the run record of
|
|
586
|
+
* the plan verb into the directory it is given, {@link PLAN_RUN_RECORD_FILE}.
|
|
587
|
+
* It reads the op, environment and labels from {@link PLAN_RUN_RECORD_ENV},
|
|
588
|
+
* the verb's exit from `CHANT_PLAN_EXIT`, its start from
|
|
589
|
+
* `CHANT_PLAN_STARTED`, and the commit from git. The shape is an
|
|
590
|
+
* `OpRunRecordInput` (../op/runtime.ts) with no run origin, which the note
|
|
591
|
+
* job names.
|
|
592
|
+
*/
|
|
593
|
+
export const PLAN_RECORD_JS = [
|
|
594
|
+
'const fs=require("fs"),path=require("path"),cp=require("child_process"),crypto=require("crypto");',
|
|
595
|
+
"const c=JSON.parse(process.env.CHANT_PLAN_RECORD||\"{}\"),dir=process.argv[1];",
|
|
596
|
+
'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();',
|
|
597
|
+
'let sha="";try{sha=cp.execFileSync("git",["rev-parse","HEAD"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{}',
|
|
598
|
+
'const ok=code===0,status=ok?"ok":"fail",ms=Math.max(0,Date.parse(ended)-Date.parse(started));',
|
|
599
|
+
'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}})};',
|
|
600
|
+
`fs.mkdirSync(dir,{recursive:true});fs.writeFileSync(path.join(dir,"${PLAN_RUN_RECORD_FILE}"),JSON.stringify(rec)+"\\n");`,
|
|
601
|
+
].join("");
|
|
602
|
+
|
|
203
603
|
/** The evidence step of one plan job (#4870), as {@link ProductPlanJob.evidence}. */
|
|
204
|
-
export function planEvidenceOf(forge: ForgeKind, evidence: PipelineEvidence, words: CiProductWords, planJob: string): NonNullable<ProductPlanJob["evidence"]> {
|
|
604
|
+
export function planEvidenceOf(forge: ForgeKind, evidence: PipelineEvidence, words: CiProductWords, planJob: string, opts: { noForks?: boolean } = {}): NonNullable<ProductPlanJob["evidence"]> {
|
|
205
605
|
assertPipelineEvidence(evidence);
|
|
206
606
|
const key = evidenceKeyEnv(forge, evidence);
|
|
207
607
|
const bin = words.bin;
|
|
208
608
|
if (forge === "gitlab") {
|
|
209
|
-
//
|
|
609
|
+
// #4914: the job runs in the target branch's plan notes pipeline, before the note job, and signs every open
|
|
610
|
+
// merge request's settled plan job from its artifact; no job of a merge request pipeline holds the key.
|
|
611
|
+
const dir = gitlabOpenEvidenceDir(planJob);
|
|
210
612
|
return {
|
|
211
613
|
jobName: `${planJob}-evidence`,
|
|
212
|
-
lines:
|
|
614
|
+
lines: openEvidenceLines({ job: planJob, dir: PR_LOOP_REPORT_DIR, out: dir, ...(bin ? { bin } : {}), ...(opts.noForks ? { noForks: true } : {}) }),
|
|
213
615
|
env: key,
|
|
616
|
+
dir,
|
|
617
|
+
...(evidenceKeyless(evidence) ? { idTokens: evidenceIdTokens(evidence) } : {}),
|
|
214
618
|
};
|
|
215
619
|
}
|
|
216
620
|
return {
|
|
217
621
|
lines: planEvidenceLines({ dir: PR_LOOP_REPORT_DIR, at: '"$HEAD_SHA"', base: '"$BASE_SHA"', result: '"$PLAN_RESULT"', ...(bin ? { bin } : {}) }),
|
|
218
622
|
env: { HEAD_SHA: "${{ github.sha }}", BASE_SHA: "${{ github.event.pull_request.base.sha }}", PLAN_RESULT: `\${{ needs.${planJob}.result }}`, ...key },
|
|
623
|
+
...(evidenceKeyless(evidence) ? { idToken: true as const } : {}),
|
|
219
624
|
};
|
|
220
625
|
}
|
|
221
626
|
|
package/src/config.ts
CHANGED
|
@@ -112,7 +112,8 @@ export const ChantConfigSchema = z.object({
|
|
|
112
112
|
images: z
|
|
113
113
|
.array(
|
|
114
114
|
z.union([
|
|
115
|
-
|
|
115
|
+
// #4876: `platforms`, what the command builds, for the release workflow's QEMU setup.
|
|
116
|
+
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(),
|
|
116
117
|
// #4819: chant builds the Dockerfile as the reproducible OCI archive itself.
|
|
117
118
|
z
|
|
118
119
|
.object({
|
|
@@ -122,6 +123,8 @@ export const ChantConfigSchema = z.object({
|
|
|
122
123
|
platforms: z.array(z.string().min(1)).min(1).optional(),
|
|
123
124
|
archive: z.string().min(1).optional(),
|
|
124
125
|
prepare: z.string().min(1).optional(),
|
|
126
|
+
// #4908: build arguments beside the two chant passes.
|
|
127
|
+
args: z.record(z.string(), z.string()).optional(),
|
|
125
128
|
})
|
|
126
129
|
.strict(),
|
|
127
130
|
]),
|
|
@@ -422,8 +425,8 @@ export interface ChantConfig {
|
|
|
422
425
|
* digest and hands every digest to the build through `CHANT_RELEASE_DIGESTS`,
|
|
423
426
|
* so a package can pin the images it ships with. An `oci` target pushes
|
|
424
427
|
* the archive. An entry may name a `dockerfile` (with `context`,
|
|
425
|
-
* `platforms`, `archive` and `
|
|
426
|
-
* runs the reproducible build itself (#4819). See
|
|
428
|
+
* `platforms`, `archive`, `prepare` and `args`) in place of `build`, and
|
|
429
|
+
* chant runs the reproducible build itself (#4819, #4908). See
|
|
427
430
|
* ./lifecycle/release-images.ts.
|
|
428
431
|
*/
|
|
429
432
|
images?: import("./lifecycle/release-images").ReleaseImageDeclaration[];
|
|
@@ -758,13 +761,15 @@ export function resolveSourceDir(projectDir: string, config: { sourceDir?: unkno
|
|
|
758
761
|
/**
|
|
759
762
|
* The top-level directories a root build leaves out (#4794): a project with
|
|
760
763
|
* no `sourceDir`, built from its own root, does not load `scripts/`, where a
|
|
761
|
-
* script that runs on load (prints and exits) would take the build's place
|
|
762
|
-
*
|
|
763
|
-
*
|
|
764
|
-
*
|
|
764
|
+
* script that runs on load (prints and exits) would take the build's place,
|
|
765
|
+
* nor `migrations/` (#4921), whose `.sql` files are `ALTER`s of objects
|
|
766
|
+
* declared elsewhere and whose backfill scripts run on load too. Matched
|
|
767
|
+
* against the path relative to the project root, so only the project's own
|
|
768
|
+
* top-level directories are skipped. The config's `include` brings one back.
|
|
769
|
+
* Test and spec files are left out of every build already
|
|
765
770
|
* (`isSourceFileName`).
|
|
766
771
|
*/
|
|
767
|
-
export const ROOT_SOURCE_EXCLUDES: readonly string[] = ["scripts"];
|
|
772
|
+
export const ROOT_SOURCE_EXCLUDES: readonly string[] = ["scripts", "migrations"];
|
|
768
773
|
|
|
769
774
|
/** A project's discovery globs (#2519) and the directory they are relative to. */
|
|
770
775
|
export interface DiscoveryGlobs {
|
package/src/control/consumers.ts
CHANGED
|
@@ -22,6 +22,13 @@
|
|
|
22
22
|
import type { CatalogConsumer, CatalogConsumersInput } from "../lifecycle/release-catalog";
|
|
23
23
|
import type { ControlEntry } from "./records";
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* The first chant with the consumers join, {@link joinControlConsumers} and
|
|
27
|
+
* {@link readControlConsumers} on `@intentius/chant/ci-control` (#4600).
|
|
28
|
+
* #4916 declared it after the fact, for `chant dev dead-guards`.
|
|
29
|
+
*/
|
|
30
|
+
export const CONTROL_CONSUMERS_FLOOR = "0.124.55";
|
|
31
|
+
|
|
25
32
|
/** The file each project keeps its consumers in. */
|
|
26
33
|
export const CONSUMERS_FILE = "consumers.json";
|
|
27
34
|
/** The contract version of {@link ConsumersDocument}. */
|