@intentius/chant 0.124.88 → 0.124.90
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/actor.d.ts +36 -1
- package/dist/actor.d.ts.map +1 -1
- package/dist/actor.js +39 -1
- package/dist/chant-install.d.ts.map +1 -1
- package/dist/chant-install.js +1 -2
- package/dist/ci-base.d.ts +30 -0
- package/dist/ci-base.d.ts.map +1 -0
- package/dist/ci-base.js +33 -0
- package/dist/ci-comment-commands.d.ts +193 -0
- package/dist/ci-comment-commands.d.ts.map +1 -0
- package/dist/ci-comment-commands.js +353 -0
- package/dist/ci-comment-replies.d.ts +40 -0
- package/dist/ci-comment-replies.d.ts.map +1 -0
- package/dist/ci-comment-replies.js +59 -0
- package/dist/ci-evidence-from-job.d.ts +25 -0
- package/dist/ci-evidence-from-job.d.ts.map +1 -1
- package/dist/ci-evidence-from-job.js +43 -2
- package/dist/ci-evidence-jobs.d.ts +30 -1
- package/dist/ci-evidence-jobs.d.ts.map +1 -1
- package/dist/ci-evidence-jobs.js +46 -3
- package/dist/ci-image.d.ts +21 -4
- package/dist/ci-image.d.ts.map +1 -1
- package/dist/ci-image.js +62 -10
- package/dist/ci-job-guard.d.ts +42 -45
- package/dist/ci-job-guard.d.ts.map +1 -1
- package/dist/ci-job-guard.js +206 -3
- package/dist/ci-note-commands.d.ts +104 -4
- package/dist/ci-note-commands.d.ts.map +1 -1
- package/dist/ci-note-commands.js +131 -38
- package/dist/ci-product-words.d.ts +42 -0
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +25 -0
- package/dist/ci-product.d.ts +72 -1
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +73 -6
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +29 -2
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +2 -1
- package/dist/cli/handlers/ci-check.d.ts +1 -1
- package/dist/cli/handlers/ci-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-check.js +17 -7
- package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
- package/dist/cli/handlers/ci-evidence.js +33 -7
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/components.js +3 -1
- package/dist/cli/handlers/generated-check.d.ts +8 -0
- package/dist/cli/handlers/generated-check.d.ts.map +1 -1
- package/dist/cli/handlers/generated-check.js +31 -1
- package/dist/cli/handlers/lock.d.ts.map +1 -1
- package/dist/cli/handlers/lock.js +121 -4
- package/dist/cli/handlers/pr-comment.d.ts +33 -0
- package/dist/cli/handlers/pr-comment.d.ts.map +1 -0
- package/dist/cli/handlers/pr-comment.js +201 -0
- package/dist/cli/handlers/pr-env.d.ts.map +1 -1
- package/dist/cli/handlers/pr-env.js +6 -3
- package/dist/cli/handlers/pr-notes.d.ts.map +1 -1
- package/dist/cli/handlers/pr-notes.js +23 -1
- package/dist/cli/handlers/pr.d.ts +23 -1
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +71 -23
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +2 -1
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +11 -2
- package/dist/cli/handlers/run-wave.d.ts.map +1 -1
- package/dist/cli/handlers/run-wave.js +180 -4
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +2 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +41 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +31 -0
- package/dist/cli/registry.d.ts +19 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +2 -1
- package/dist/components/pr-checks.d.ts +97 -6
- package/dist/components/pr-checks.d.ts.map +1 -1
- package/dist/components/pr-checks.js +107 -13
- package/dist/components/pr-pipeline.d.ts +19 -14
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +7 -13
- package/dist/components/product-pipeline.d.ts +96 -3
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +120 -14
- package/dist/components/product-plan.d.ts +203 -6
- package/dist/components/product-plan.d.ts.map +1 -1
- package/dist/components/product-plan.js +250 -43
- package/dist/drift-record.d.ts +7 -0
- package/dist/drift-record.d.ts.map +1 -1
- package/dist/drift-record.js +19 -0
- package/dist/floor-table.data.d.ts.map +1 -1
- package/dist/floor-table.data.js +63 -31
- package/dist/forge-check/contract.d.ts +11 -1
- 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/gate-resume-run.d.ts +9 -1
- package/dist/gate-resume-run.d.ts.map +1 -1
- package/dist/gate-resume-run.js +26 -3
- package/dist/generated-check.d.ts +18 -4
- package/dist/generated-check.d.ts.map +1 -1
- package/dist/generated-check.js +37 -5
- package/dist/image-pins.d.ts +26 -0
- package/dist/image-pins.d.ts.map +1 -0
- package/dist/image-pins.js +19 -0
- package/dist/lexicon.d.ts +93 -4
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/gate-applied.d.ts +9 -0
- package/dist/lifecycle/gate-applied.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +11 -0
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +30 -3
- package/dist/lifecycle/publish-npm.d.ts +11 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.js +27 -1
- package/dist/lifecycle/reach-locks.d.ts +131 -0
- package/dist/lifecycle/reach-locks.d.ts.map +1 -0
- package/dist/lifecycle/reach-locks.js +118 -0
- package/dist/lifecycle/release-cut.d.ts +3 -1
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +15 -0
- package/dist/lifecycle/release-images.d.ts.map +1 -1
- package/dist/lifecycle/release-images.js +1 -2
- package/dist/notify-product.d.ts +12 -3
- package/dist/notify-product.d.ts.map +1 -1
- package/dist/notify-product.js +10 -6
- package/dist/op/activities/source-release.d.ts.map +1 -1
- package/dist/op/activities/source-release.js +2 -1
- package/dist/op/activities/source-rollback.d.ts.map +1 -1
- package/dist/op/activities/source-rollback.js +2 -1
- package/dist/op/apply-status.d.ts +84 -0
- package/dist/op/apply-status.d.ts.map +1 -0
- package/dist/op/apply-status.js +106 -0
- package/dist/op/before-merge-decide.d.ts +102 -0
- package/dist/op/before-merge-decide.d.ts.map +1 -0
- package/dist/op/before-merge-decide.js +142 -0
- package/dist/op/before-merge-done.d.ts +56 -0
- package/dist/op/before-merge-done.d.ts.map +1 -0
- package/dist/op/before-merge-done.js +69 -0
- package/dist/op/before-merge-store.d.ts +20 -0
- package/dist/op/before-merge-store.d.ts.map +1 -0
- package/dist/op/before-merge-store.js +48 -0
- package/dist/op/before-merge.d.ts +150 -0
- package/dist/op/before-merge.d.ts.map +1 -0
- package/dist/op/before-merge.js +207 -0
- package/dist/op/follow-on-run.d.ts +117 -0
- package/dist/op/follow-on-run.d.ts.map +1 -0
- package/dist/op/follow-on-run.js +154 -0
- package/dist/op/follow-on-store.d.ts +17 -0
- package/dist/op/follow-on-store.d.ts.map +1 -0
- package/dist/op/follow-on-store.js +54 -0
- package/dist/op/gate.d.ts +6 -0
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +10 -1
- package/dist/op/index.d.ts +5 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +2 -0
- package/dist/op/op-waves-after-plan.d.ts +13 -0
- package/dist/op/op-waves-after-plan.d.ts.map +1 -1
- package/dist/op/op-waves-evidence-jobs.d.ts +10 -2
- package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -1
- package/dist/op/op-waves-evidence-jobs.js +19 -5
- package/dist/op/op-waves-follow-on.d.ts +162 -0
- package/dist/op/op-waves-follow-on.d.ts.map +1 -0
- package/dist/op/op-waves-follow-on.js +355 -0
- package/dist/op/op-waves-render-spec.d.ts +100 -0
- package/dist/op/op-waves-render-spec.d.ts.map +1 -0
- package/dist/op/op-waves-render-spec.js +162 -0
- package/dist/op/op-waves-run.d.ts +148 -6
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +873 -100
- package/dist/op/op-waves-split.d.ts +122 -0
- package/dist/op/op-waves-split.d.ts.map +1 -0
- package/dist/op/op-waves-split.js +166 -0
- package/dist/op/op-waves.d.ts +24 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +18 -1
- package/dist/op/schedule-overdue.d.ts +15 -1
- package/dist/op/schedule-overdue.d.ts.map +1 -1
- package/dist/op/schedule-overdue.js +77 -5
- package/dist/op/stage-hooks.d.ts +36 -1
- package/dist/op/stage-hooks.d.ts.map +1 -1
- package/dist/op/stage-hooks.js +17 -3
- package/dist/op/wave-stop.d.ts +67 -0
- package/dist/op/wave-stop.d.ts.map +1 -0
- package/dist/op/wave-stop.js +129 -0
- package/dist/planned-files.d.ts +76 -0
- package/dist/planned-files.d.ts.map +1 -0
- package/dist/planned-files.js +108 -0
- package/dist/pr-forge-job.d.ts +22 -0
- package/dist/pr-forge-job.d.ts.map +1 -0
- package/dist/pr-forge-job.js +46 -0
- package/dist/pr-loop.d.ts +3 -6
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +4 -81
- package/dist/pr-plan-note.d.ts +97 -0
- package/dist/pr-plan-note.d.ts.map +1 -1
- package/dist/pr-plan-note.js +94 -1
- package/dist/pr-post.d.ts +28 -3
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +146 -13
- package/dist/pr-status.d.ts +16 -0
- package/dist/pr-status.d.ts.map +1 -0
- package/dist/pr-status.js +90 -0
- package/dist/ref-gate-init.d.ts +16 -2
- package/dist/ref-gate-init.d.ts.map +1 -1
- package/dist/ref-gate-init.js +24 -13
- package/dist/release-floors.d.ts +39 -1
- package/dist/release-floors.d.ts.map +1 -1
- package/dist/release-floors.js +63 -25
- package/dist/render-module.d.ts +15 -0
- package/dist/render-module.d.ts.map +1 -0
- package/dist/render-module.js +73 -0
- package/dist/state-migration.d.ts.map +1 -1
- package/dist/state-migration.js +1 -2
- package/dist/wave-blocked.d.ts +7 -1
- package/dist/wave-blocked.d.ts.map +1 -1
- package/dist/wave-blocked.js +7 -2
- package/dist/wave-runtime.mjs +366 -350
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +3 -2
- package/dist/workspace/release-train.d.ts.map +1 -1
- package/dist/workspace/release-train.js +2 -1
- package/dist/workspace/release-workflow.d.ts +4 -3
- package/dist/workspace/release-workflow.d.ts.map +1 -1
- package/dist/workspace/release-workflow.js +10 -7
- package/dist/workspace/trust/check-evidence-report.d.ts +7 -2
- package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence-report.js +15 -8
- package/dist/workspace/trust/ref-gate-cli.d.ts +10 -1
- package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate-cli.js +30 -10
- package/dist/workspace/workspace-run.d.ts.map +1 -1
- package/dist/workspace/workspace-run.js +2 -1
- package/package.json +1 -1
- package/src/actor.test.ts +68 -2
- package/src/actor.ts +61 -1
- package/src/chant-install.test.ts +2 -3
- package/src/chant-install.ts +1 -2
- package/src/ci-base.test.ts +41 -0
- package/src/ci-base.ts +43 -0
- package/src/ci-comment-commands.test.ts +439 -0
- package/src/ci-comment-commands.ts +428 -0
- package/src/ci-comment-replies.ts +78 -0
- package/src/ci-commit.test.ts +2 -3
- package/src/ci-evidence-from-job.test.ts +18 -0
- package/src/ci-evidence-from-job.ts +58 -2
- package/src/ci-evidence-jobs.ts +50 -5
- package/src/ci-image.test.ts +130 -10
- package/src/ci-image.ts +85 -12
- package/src/ci-job-guard.before-merge.test.ts +148 -0
- package/src/ci-job-guard.follow-on-record.test.ts +137 -0
- package/src/ci-job-guard.follow-on.test.ts +144 -0
- package/src/ci-job-guard.ts +221 -3
- package/src/ci-note-commands.test.ts +76 -1
- package/src/ci-note-commands.ts +198 -46
- package/src/ci-product-words.ts +59 -0
- package/src/ci-product.ts +90 -6
- package/src/cli/commands/build.test.ts +41 -0
- package/src/cli/commands/build.ts +27 -2
- package/src/cli/handlers/approve.ts +2 -1
- package/src/cli/handlers/ci-check.ts +19 -7
- package/src/cli/handlers/ci-evidence.ts +29 -8
- package/src/cli/handlers/components.ts +3 -1
- package/src/cli/handlers/generated-check.ts +31 -1
- package/src/cli/handlers/lock-reach.test.ts +103 -0
- package/src/cli/handlers/lock.ts +100 -4
- package/src/cli/handlers/pr-comment.ts +187 -0
- package/src/cli/handlers/pr-env.ts +6 -3
- package/src/cli/handlers/pr-notes.ts +30 -6
- package/src/cli/handlers/pr-record.test.ts +1 -1
- package/src/cli/handlers/pr.ts +64 -21
- package/src/cli/handlers/promote.ts +2 -1
- package/src/cli/handlers/release.e2e.test.ts +35 -0
- package/src/cli/handlers/release.ts +14 -2
- package/src/cli/handlers/run-wave.ts +170 -4
- package/src/cli/handlers/run.ts +2 -1
- package/src/cli/main.ts +41 -2
- package/src/cli/parse-args.ts +23 -0
- package/src/cli/registry.ts +19 -1
- package/src/components/auto-release.ts +2 -1
- package/src/components/pr-checks.ts +165 -17
- package/src/components/pr-pipeline.ts +22 -18
- package/src/components/product-pipeline.apply-status.test.ts +50 -0
- package/src/components/product-pipeline.ts +204 -17
- package/src/components/product-plan.test.ts +60 -4
- package/src/components/product-plan.ts +367 -50
- package/src/drift-record.test.ts +20 -0
- package/src/drift-record.ts +16 -0
- package/src/floor-table.data.ts +63 -31
- package/src/forge-check/contract.ts +12 -1
- package/src/forge-check/forge-check.test.ts +17 -0
- package/src/forge-check/index.ts +2 -0
- package/src/gate-resume-run.ts +27 -3
- package/src/generated-check.e2e.test.ts +21 -1
- package/src/generated-check.test.ts +66 -0
- package/src/generated-check.ts +51 -10
- package/src/image-pins.ts +31 -0
- package/src/lexicon.ts +89 -1
- package/src/lifecycle/gate-applied.ts +7 -0
- package/src/lifecycle/git.test.ts +48 -0
- package/src/lifecycle/git.ts +27 -4
- package/src/lifecycle/publish-npm.ts +31 -1
- package/src/lifecycle/reach-locks.test.ts +87 -0
- package/src/lifecycle/reach-locks.ts +169 -0
- package/src/lifecycle/release-cut.ts +17 -1
- package/src/lifecycle/release-images.test.ts +56 -0
- package/src/lifecycle/release-images.ts +1 -2
- package/src/notify-product.ts +19 -8
- package/src/op/activities/source-release.ts +2 -1
- package/src/op/activities/source-rollback.ts +2 -1
- package/src/op/apply-status.test.ts +83 -0
- package/src/op/apply-status.ts +132 -0
- package/src/op/before-merge-decide.ts +190 -0
- package/src/op/before-merge-done.ts +99 -0
- package/src/op/before-merge-store.ts +44 -0
- package/src/op/before-merge.test.ts +201 -0
- package/src/op/before-merge.ts +266 -0
- package/src/op/follow-on-run.ts +206 -0
- package/src/op/follow-on-store.ts +54 -0
- package/src/op/gate-resume.test.ts +27 -0
- package/src/op/gate.ts +16 -1
- package/src/op/index.ts +15 -0
- package/src/op/op-waves-after-plan.ts +13 -0
- package/src/op/op-waves-evidence-jobs.ts +21 -7
- package/src/op/op-waves-follow-on-record.test.ts +152 -0
- package/src/op/op-waves-follow-on.test.ts +247 -0
- package/src/op/op-waves-follow-on.ts +385 -0
- package/src/op/op-waves-notify-words.test.ts +18 -0
- package/src/op/op-waves-render-spec.test.ts +159 -0
- package/src/op/op-waves-render-spec.ts +171 -0
- package/src/op/op-waves-run.ts +973 -94
- package/src/op/op-waves-split-product.test.ts +288 -0
- package/src/op/op-waves-split-step.test.ts +298 -0
- package/src/op/op-waves-split.test.ts +196 -0
- package/src/op/op-waves-split.ts +189 -0
- package/src/op/op-waves.ts +31 -3
- package/src/op/schedule-overdue.test.ts +72 -1
- package/src/op/schedule-overdue.ts +84 -6
- package/src/op/stage-hooks.ts +52 -4
- package/src/op/wave-stop.test.ts +72 -0
- package/src/op/wave-stop.ts +139 -0
- package/src/planned-files.test.ts +80 -0
- package/src/planned-files.ts +134 -0
- package/src/pr-forge-job.test.ts +53 -0
- package/src/pr-forge-job.ts +46 -0
- package/src/pr-loop-narrowed.test.ts +2 -1
- package/src/pr-loop-words.test.ts +2 -1
- package/src/pr-loop.test.ts +1 -2
- package/src/pr-loop.ts +4 -80
- package/src/pr-plan-note.ts +155 -3
- package/src/pr-post-replan.test.ts +144 -0
- package/src/pr-post-subject.test.ts +230 -0
- package/src/pr-post.test.ts +2 -1
- package/src/pr-post.ts +151 -15
- package/src/pr-status.ts +91 -0
- package/src/ref-gate-init.ts +30 -11
- package/src/release-floors.ts +81 -25
- package/src/render-module.ts +73 -0
- package/src/state-migration-record.test.ts +2 -3
- package/src/state-migration.ts +1 -2
- package/src/wave-blocked.ts +9 -4
- package/src/workspace/ci-green-cli.ts +3 -2
- package/src/workspace/ci-green-workflow.test.ts +32 -1
- package/src/workspace/release-train.ts +2 -1
- package/src/workspace/release-workflow.test.ts +36 -5
- package/src/workspace/release-workflow.ts +10 -7
- package/src/workspace/trust/check-evidence-report.ts +15 -8
- package/src/workspace/trust/check-evidence.test.ts +5 -0
- package/src/workspace/trust/ref-gate-cli.ts +30 -8
- package/src/workspace/trust/ref-gate-pieces.test.ts +46 -1
- package/src/workspace/trust/ref-gate.test.ts +10 -0
- package/src/workspace/workspace-run.ts +2 -1
|
@@ -25,25 +25,77 @@
|
|
|
25
25
|
* target's own variables and secrets, and an optional write probe before the
|
|
26
26
|
* plan. A target is the note's and the status's member: `pr-post --member
|
|
27
27
|
* <target>`, so each target has its note and its `<product>/plan/<target>`.
|
|
28
|
+
* With `evidence`, a target's note job (GitLab: `<target>-plan-evidence`)
|
|
29
|
+
* signs `plan:<target>` and `policy:<target>` (#4978,
|
|
30
|
+
* `targetEvidenceCheck`): one target's plan says nothing of another's.
|
|
28
31
|
*
|
|
29
32
|
* The forge lexicons render these descriptors
|
|
30
33
|
* (`generateProductPlanPipeline` in each): the products call them in
|
|
31
34
|
* process, with no component graph.
|
|
32
35
|
*/
|
|
33
36
|
import { assertPipelineEvidence, evidenceIdTokens, evidenceKeyEnv, evidenceKeyless, gitlabOpenEvidenceDir, openEvidenceLines, planEvidenceLines } from "../ci-evidence-jobs.js";
|
|
34
|
-
import { gitlabPlanJobName, PR_LOOP_REPORT_DIR, PR_PLAN_NOTE_JOB, prLoopPassedEnv, prLoopPostJob, prLoopRunner } from "./pr-pipeline.js";
|
|
37
|
+
import { gitlabPlanJobName, PR_LOCK_JOB, PR_LOOP_REPORT_DIR, PR_PLAN_NOTE_JOB, prLoopPassedEnv, prLoopPostJob, prLoopRunner, withProductBin } from "./pr-pipeline.js";
|
|
38
|
+
import { LOCK_REACH_ENV } from "../lifecycle/reach-locks.js";
|
|
35
39
|
import { GITHUB_JOB_TOKEN } from "../ci-jobs.js";
|
|
36
40
|
import { cloudLogin } from "../ci-login.js";
|
|
37
41
|
import { controlNoteCheckout } from "../control/dispatch.js";
|
|
38
42
|
import { commentLine, productStatusContext } from "../ci-product-words.js";
|
|
39
43
|
import { PLAN_WATCHES_ENV, scheduledWatchProblem } from "../op/schedule-overdue.js";
|
|
40
44
|
import { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE } from "../pr-plan-record.js";
|
|
45
|
+
import { idTokenVar, tradedClouds } from "../ci-identity.js";
|
|
46
|
+
import { prNoteMarker } from "../pr-loop.js";
|
|
47
|
+
import { PRODUCT_MARKER_NAME } from "../pr-plan-note.js";
|
|
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";
|
|
50
|
+
/**
|
|
51
|
+
* The one word a comment re-plan takes after the command (#4899): letters,
|
|
52
|
+
* digits and `_./@+=,:-`, and (#4984) never starting with `-`, so a flag
|
|
53
|
+
* such as `--target=x` is refused rather than read as a root. The source
|
|
54
|
+
* of a regular expression, without anchors.
|
|
55
|
+
*/
|
|
56
|
+
export const REPLAN_WORD_SOURCE = "[A-Za-z0-9_.\\/@+=,:][A-Za-z0-9_.\\/@+=,:-]*";
|
|
57
|
+
/** {@link REPLAN_WORD_SOURCE} anchored, as the re-plan's `node -e` program writes it between slashes. */
|
|
58
|
+
const REPLAN_WORD_JS = `^${REPLAN_WORD_SOURCE}$`;
|
|
59
|
+
/** Whether `word` is one a re-plan takes (#4984). */
|
|
60
|
+
export function isReplanWord(word) {
|
|
61
|
+
return new RegExp(`^${REPLAN_WORD_SOURCE}$`).test(word);
|
|
62
|
+
}
|
|
43
63
|
/** The variable a comment re-plan's one argument reaches the plan verb in (#4899). Empty on a pull request's own plan. */
|
|
44
64
|
export const PLAN_ARGUMENT_ENV = "CHANT_PLAN_ARGUMENT";
|
|
45
65
|
/** 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
66
|
export const PLAN_NOTE_NOTICES_ENV = "CHANT_PLAN_NOTE_NOTICES";
|
|
67
|
+
/**
|
|
68
|
+
* The reach lock job (#4979), under `locks: "plan"` with `reach`: `chant lock
|
|
69
|
+
* --reach` through the words' bin, with the reach line as
|
|
70
|
+
* {@link LOCK_REACH_ENV}. On GitHub and Forgejo it locks the pull request of
|
|
71
|
+
* the event; on GitLab every open merge request into the branch.
|
|
72
|
+
*/
|
|
73
|
+
export function productPlanReachLock(forge, loop, words) {
|
|
74
|
+
const reach = loop.plan.reach;
|
|
75
|
+
if (!reach)
|
|
76
|
+
return undefined;
|
|
77
|
+
if (loop.locks !== "plan")
|
|
78
|
+
throw new Error("the product plan's reach says what the lock job locks, and there is none without locks: \"plan\"; set locks: \"plan\", or drop reach");
|
|
79
|
+
if (!reach.command.trim())
|
|
80
|
+
throw new Error("the product plan's reach.command is empty; give the line that prints the targets a change reaches");
|
|
81
|
+
if (/[\r\n]/.test(reach.command))
|
|
82
|
+
throw new Error("the product plan's reach.command is one shell line");
|
|
83
|
+
if (reach.gate !== undefined) {
|
|
84
|
+
// The lock file's name, as ../lifecycle/target-lock.ts takes it.
|
|
85
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$/.test(reach.gate))
|
|
86
|
+
throw new Error(`the product plan's reach.gate ${JSON.stringify(reach.gate)} is not a lock file name: letters, digits, '.', '_' and '-', starting with a letter or digit`);
|
|
87
|
+
}
|
|
88
|
+
const gate = reach.gate !== undefined ? ["--gate", reach.gate] : [];
|
|
89
|
+
const github = forge !== "gitlab";
|
|
90
|
+
const line = github
|
|
91
|
+
? ["chant", "lock", "--reach", "--pr", '"$PR_NUMBER"', "--head", '"$HEAD_SHA"', "--base", '"$BASE_SHA"', "--stage", "plan", ...gate, "--forge", forge]
|
|
92
|
+
: ["chant", "lock", "--reach", "--open", "--base", '"$CI_COMMIT_SHA"', "--stage", "plan", ...gate, "--forge", "gitlab"];
|
|
93
|
+
const env = github
|
|
94
|
+
? { PR_NUMBER: "${{ github.event.pull_request.number }}", HEAD_SHA: "${{ github.event.pull_request.head.sha }}", BASE_SHA: "${{ github.event.pull_request.base.sha }}", GITHUB_TOKEN: GITHUB_JOB_TOKEN, [LOCK_REACH_ENV]: reach.command }
|
|
95
|
+
: { [LOCK_REACH_ENV]: reach.command };
|
|
96
|
+
const runner = prLoopRunner(loop, "default");
|
|
97
|
+
return { jobName: PR_LOCK_JOB, command: withProductBin(line.join(" "), words.bin), env, ...(runner !== undefined ? { runner } : {}) };
|
|
98
|
+
}
|
|
47
99
|
/** 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
100
|
export { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE } from "../pr-plan-record.js";
|
|
49
101
|
/** The variable the plan step reads the record's op, environment and labels from (#4899), as JSON. */
|
|
@@ -51,13 +103,11 @@ export const PLAN_RUN_RECORD_ENV = "CHANT_PLAN_RECORD";
|
|
|
51
103
|
const TARGET_NAME = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
52
104
|
/** The pull request loop's options the product plan's jobs do not carry, and what each needs. Each is refused with `plan` (#4799). */
|
|
53
105
|
const NOT_WITH_PLAN = [
|
|
54
|
-
["applyBeforeMerge", "the apply before merge runs pr-apply on pr-plan's report"],
|
|
106
|
+
["applyBeforeMerge", "the apply before merge runs pr-apply on pr-plan's report; give wavesBeforeMerge to run the waves on an open pull request's head (#4984)"],
|
|
55
107
|
["applyOnMerge", "the apply on merge runs on op waves, from the waves spec"],
|
|
56
108
|
["waveGate", "the apply on merge runs on op waves, from the waves spec"],
|
|
57
|
-
["locks", "the lock job reads pr-plan's report"],
|
|
58
109
|
["previewComment", "the comment preview re-runs pr-plan"],
|
|
59
|
-
["
|
|
60
|
-
["identity", "the identity trade runs before pr-plan's checkout; give the product plan's login (or a target's) instead"],
|
|
110
|
+
["identity", "the identity trade runs before pr-plan's checkout; give the product plan's trade or login (or a target's) instead"],
|
|
61
111
|
["build", "the plan verb builds what it plans"],
|
|
62
112
|
["buildCommand", "the plan verb builds what it plans"],
|
|
63
113
|
["refresh", "--refresh is a pr-plan flag"],
|
|
@@ -83,6 +133,10 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
|
|
|
83
133
|
if (value !== undefined && value !== false)
|
|
84
134
|
throw new Error(`the product plan (plan) takes no ${key}: ${why}`);
|
|
85
135
|
}
|
|
136
|
+
// #4946: GitHub's and Forgejo's product plan writes the lock jobs around the plan verb's PrReport.
|
|
137
|
+
// #4979: GitLab's locks what each open merge request reaches, from the plan notes pipeline, so it needs the reach line.
|
|
138
|
+
if (loop.locks && forge === "gitlab" && !plan.reach)
|
|
139
|
+
throw new Error("the product plan (plan) takes locks on GitLab only with reach: a merge request's pipeline is built from its own files, so the lock job runs in the target branch's plan notes pipeline and locks what reach prints for each open merge request");
|
|
86
140
|
// #4899: GitLab's comment commands start the re-plan, so the note-commands job comes with it.
|
|
87
141
|
if (loop.noteCommands && !plan.replan)
|
|
88
142
|
throw new Error("the product plan (plan) takes no noteCommands without replan: the note-commands job starts its comment re-plan");
|
|
@@ -115,6 +169,23 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
|
|
|
115
169
|
if (plan.concurrency?.group !== undefined && !/^[A-Za-z0-9][A-Za-z0-9_.-]*$/.test(plan.concurrency.group))
|
|
116
170
|
throw new Error(`the product plan's concurrency group ${JSON.stringify(plan.concurrency.group)} is not a name of letters, digits, ., - and _`);
|
|
117
171
|
const replanComments = plan.replan ? replanCommentsOf(words) : undefined;
|
|
172
|
+
// #4963: what the re-plan does besides the plan command.
|
|
173
|
+
const replanOpts = typeof plan.replan === "object" ? plan.replan : {};
|
|
174
|
+
const dispatchArg = replanOpts.dispatch ? (typeof replanOpts.dispatch === "object" && replanOpts.dispatch.argument !== undefined ? replanOpts.dispatch.argument : "argument") : undefined;
|
|
175
|
+
if (dispatchArg !== undefined && (dispatchArg === "pr" || !/^[a-z][a-z0-9_-]*$/.test(dispatchArg)))
|
|
176
|
+
throw new Error(`the product plan's replan.dispatch.argument ${JSON.stringify(dispatchArg)} is not an input name of lowercase letters, digits, - and _ other than pr`);
|
|
177
|
+
const others = typeof replanOpts.reply === "object" ? (replanOpts.reply.others ?? []) : [];
|
|
178
|
+
for (const o of others) {
|
|
179
|
+
if (!o.startsWith(`/${words.product} `) && !o.startsWith(`/${words.product}\t`) && o !== `/${words.product}`)
|
|
180
|
+
throw new Error(`the product plan's replan.reply.others ${JSON.stringify(o)} is not a /${words.product} comment`);
|
|
181
|
+
if (/['\r\n]/.test(o))
|
|
182
|
+
throw new Error(`the product plan's replan.reply.others ${JSON.stringify(o)} holds a quote or a line break`);
|
|
183
|
+
}
|
|
184
|
+
if (plan.previousMarker && !github)
|
|
185
|
+
throw new Error("the product plan's previousMarker reads the pull request's note before the checkout, with the job's token, and GitLab's plan job holds no token to read a merge request's notes with; leave previousMarker out on GitLab");
|
|
186
|
+
const productMarker = plan.noteWords?.productMarker;
|
|
187
|
+
if (plan.previousMarker && (productMarker === undefined || !PRODUCT_MARKER_NAME.test(productMarker)))
|
|
188
|
+
throw new Error("the product plan's previousMarker reads the note's product marker, and the note words name none; give noteWords.productMarker");
|
|
118
189
|
if (plan.noteSteps && !github && ((plan.noteSteps.before?.length ?? 0) > 0 || (plan.noteSteps.after?.length ?? 0) > 0)) {
|
|
119
190
|
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
191
|
}
|
|
@@ -127,6 +198,11 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
|
|
|
127
198
|
const problem = scheduledWatchProblem(w);
|
|
128
199
|
if (problem)
|
|
129
200
|
throw new Error(`the product plan's watches: ${problem}`);
|
|
201
|
+
// #4988: a watch scoped to targets names the plan's own.
|
|
202
|
+
for (const t of w.targets ?? []) {
|
|
203
|
+
if (!seen.has(t))
|
|
204
|
+
throw new Error(`the product plan's watch ${w.op} names target ${t}, which the plan ${targets?.length ? "does not have" : "cannot scope to: it has no targets"}`);
|
|
205
|
+
}
|
|
130
206
|
}
|
|
131
207
|
if (new Set((plan.watches ?? []).map((w) => w.op)).size !== (plan.watches ?? []).length)
|
|
132
208
|
throw new Error("the product plan's watches name an Op twice");
|
|
@@ -148,7 +224,8 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
|
|
|
148
224
|
if (key in jobEnv)
|
|
149
225
|
throw new Error(`target ${name}'s ${key} is the product plan's env too; give it once`);
|
|
150
226
|
}
|
|
151
|
-
|
|
227
|
+
// #4987: with staleNotes each target's note carries the target branch's commit, so the waves' push can mark it stale.
|
|
228
|
+
const post0 = prLoopPostJob(forge, env, name, words, loop.staleNotes ? { staleNotes: true } : {});
|
|
152
229
|
// #4899: the note job records the plan job's run, named by that job.
|
|
153
230
|
const post1 = plan.record ? { ...post0, command: `${post0.command} --record-run ${jobName}` } : post0;
|
|
154
231
|
// #4914: on GitLab the signing job of the same pipeline keeps each merge request's evidence, which the note's checks line reads.
|
|
@@ -156,8 +233,16 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
|
|
|
156
233
|
// The note job reads its own plan job's result, by that job's name.
|
|
157
234
|
const postEnv = github ? { ...post.env, PLAN_RESULT: `\${{ needs.${jobName}.result }}`, ...noteWords } : { ...post.env, ...noteWords };
|
|
158
235
|
// #4931: the target's login, else the plan's, from the OIDC token file (ci-login, #4788).
|
|
159
|
-
|
|
236
|
+
// #4963: a target's own login or trade stands in for both of the plan's.
|
|
237
|
+
const own2 = target?.login !== undefined || target?.trade !== undefined;
|
|
238
|
+
const loginSpec = own2 ? target?.login : plan.login;
|
|
239
|
+
const tradeSpec = own2 ? target?.trade : plan.trade;
|
|
240
|
+
if (loginSpec && tradeSpec)
|
|
241
|
+
throw new Error(`the product plan${name ? `'s target ${name}` : ""} gives both login and trade; the trade leaves no token for a login to read, so give one`);
|
|
242
|
+
if (tradeSpec && tradedClouds(tradeSpec).length === 0)
|
|
243
|
+
throw new Error(`the product plan${name ? `'s target ${name}` : ""} trades for no identity; give the trade a cloud`);
|
|
160
244
|
const login = loginSpec ? cloudLogin(forge, loginSpec) : undefined;
|
|
245
|
+
const tradeTokens = tradeSpec ? Object.fromEntries(tradedClouds(tradeSpec).map((c) => [idTokenVar(c), tradeSpec[c].audience])) : {};
|
|
161
246
|
const ownTokens = target?.idTokens ?? plan.idTokens;
|
|
162
247
|
for (const [v, aud] of Object.entries(ownTokens ?? {})) {
|
|
163
248
|
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(v))
|
|
@@ -166,10 +251,22 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
|
|
|
166
251
|
throw new Error(`the product plan's id token ${v} names no audience`);
|
|
167
252
|
if (login && v in login.idTokens && login.idTokens[v] !== aud)
|
|
168
253
|
throw new Error(`the product plan's id token ${v} is the login's, with another audience`);
|
|
254
|
+
if (v in tradeTokens && tradeTokens[v] !== aud)
|
|
255
|
+
throw new Error(`the product plan's id token ${v} is the trade's, with another audience`);
|
|
169
256
|
}
|
|
170
|
-
const idTokens = { ...(login?.idTokens ?? {}), ...(ownTokens ?? {}) };
|
|
257
|
+
const idTokens = { ...(login?.idTokens ?? {}), ...tradeTokens, ...(ownTokens ?? {}) };
|
|
171
258
|
const artifact = plan.artifact ? (name ? `${plan.artifact}-${name}` : plan.artifact) : name ? `chant-pr-plan-${name}` : "chant-pr-plan";
|
|
172
|
-
|
|
259
|
+
// #4963: on GitHub and Forgejo the first re-plan job replies to the comments no other job takes.
|
|
260
|
+
const replies = github && Boolean(replanOpts.reply) && (targets === undefined || target === targets[0]);
|
|
261
|
+
const replan0 = replanComments
|
|
262
|
+
? {
|
|
263
|
+
...replanJobOf(forge, env, words, name, artifact, noteWords, { notAffected: replanOpts.notAffected === true, ...(loop.staleNotes ? { staleNotes: true } : {}) }),
|
|
264
|
+
...replanComments,
|
|
265
|
+
...(github && dispatchArg !== undefined ? { dispatch: { argument: dispatchArg } } : {}),
|
|
266
|
+
...(replies ? { reply: { prefix: `/${words.product}`, others } } : {}),
|
|
267
|
+
...(replanOpts.notAffected ? { notAffected: true } : {}),
|
|
268
|
+
}
|
|
269
|
+
: undefined;
|
|
173
270
|
const replan = replan0 && plan.record ? { ...replan0, post: { ...replan0.post, command: `${replan0.post.command} --record-run ${replan0.jobName}` } } : replan0;
|
|
174
271
|
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
272
|
const noteBefore = plan.noteSteps?.before ?? [];
|
|
@@ -185,7 +282,8 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
|
|
|
185
282
|
artifact,
|
|
186
283
|
...(planRunner !== undefined ? { runner: planRunner } : {}),
|
|
187
284
|
...(noteRunner !== undefined ? { noteRunner } : {}),
|
|
188
|
-
|
|
285
|
+
// #4978: a target's plan job plans that target alone, so its checks are `plan:<target>` and `policy:<target>`.
|
|
286
|
+
...(evidence ? { evidence: planEvidenceOf(forge, evidence, words, jobName, { ...(plan.forks === "skip" ? { noForks: true } : {}), ...(name ? { member: { name, reportPath: PR_LOOP_REPORT_DIR } } : {}) }) } : {}),
|
|
189
287
|
...(Object.keys(jobEnv).length > 0 ? { jobEnv } : {}),
|
|
190
288
|
...(login && login.steps.length > 0 ? { login: login.steps } : {}),
|
|
191
289
|
...(Object.keys(idTokens).length > 0 ? { idTokens } : {}),
|
|
@@ -194,8 +292,10 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
|
|
|
194
292
|
...(plan.setup?.length ? { setup: plan.setup } : {}),
|
|
195
293
|
...(plan.report ? { report: fill(plan.report, name) } : {}),
|
|
196
294
|
...(replan ? { replan } : {}),
|
|
197
|
-
...(noteBefore.length > 0 || noteAfter.length > 0 ? { noteSteps: { before: noteBefore, after: noteAfter } } : {}),
|
|
295
|
+
...(noteBefore.length > 0 || noteAfter.length > 0 ? { noteSteps: { before: noteBefore, after: noteAfter, ...(plan.noteSteps?.pullRequest ? { pullRequest: true } : {}) } } : {}),
|
|
198
296
|
...(record ? { record } : {}),
|
|
297
|
+
...(tradeSpec ? { trade: tradeSpec } : {}),
|
|
298
|
+
...(plan.previousMarker && productMarker ? { previous: { marker: prNoteMarker(env, name), name: productMarker } } : {}),
|
|
199
299
|
};
|
|
200
300
|
};
|
|
201
301
|
return targets ? targets.map(one) : [one()];
|
|
@@ -209,12 +309,18 @@ function replanCommentsOf(words) {
|
|
|
209
309
|
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
310
|
}
|
|
211
311
|
/** The re-plan's jobs for one target (#4899), its comments filled in by the caller. */
|
|
212
|
-
function replanJobOf(forge, env, words, name, artifact,
|
|
312
|
+
function replanJobOf(forge, env, words, name, artifact, noteWords0, opts = {}) {
|
|
213
313
|
const github = forge !== "gitlab";
|
|
214
314
|
const jobName = github ? (name ? `${REPLAN_JOB}-${name}` : REPLAN_JOB) : name ? `${name}-${REPLAN_JOB}` : REPLAN_JOB;
|
|
215
315
|
const noteJobName = github ? (name ? `${REPLAN_NOTE_JOB}-${name}` : REPLAN_NOTE_JOB) : name ? `${name}-${REPLAN_NOTE_JOB}` : REPLAN_NOTE_JOB;
|
|
216
316
|
// 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
|
-
|
|
317
|
+
// #4987: with staleNotes the note's tip line is the target branch's commit the re-plan ran at, as the comment preview's is.
|
|
318
|
+
const stale = opts.staleNotes ? { staleNotes: true } : {};
|
|
319
|
+
const command0 = github ? prLoopPostJob(forge, env, name, words, stale).command : prLoopPostJob("github", env, name, words, stale).command.replace(" --forge github ", " --forge gitlab ");
|
|
320
|
+
// #4963: the argument the re-plan was narrowed to, which pr-post answers "not affected" for when the change does not reach it.
|
|
321
|
+
const command = opts.notAffected ? `${command0} --not-affected "$${PLAN_ARGUMENT_ENV}"` : command0;
|
|
322
|
+
const noteWords1 = opts.notAffected && github ? { ...noteWords0, [PLAN_ARGUMENT_ENV]: `\${{ needs.${jobName}.outputs.argument }}` } : noteWords0;
|
|
323
|
+
const noteWords = opts.staleNotes ? { ...noteWords1, TIP_SHA: github ? "${{ github.sha }}" : "$CI_COMMIT_SHA" } : noteWords1;
|
|
218
324
|
const post = github
|
|
219
325
|
? {
|
|
220
326
|
command,
|
|
@@ -254,7 +360,8 @@ function literal(text) {
|
|
|
254
360
|
* a target, the command with at most one word after it.
|
|
255
361
|
*/
|
|
256
362
|
export function gitlabReplanCommentIf(replan, target) {
|
|
257
|
-
|
|
363
|
+
// #4984: the one word never starts with `-`, so a flag such as `--target=x` starts no re-plan.
|
|
364
|
+
const arg = target ? `( +${literal(target)})?` : `( +${REPLAN_WORD_SOURCE})?`;
|
|
258
365
|
const one = (c) => `$${GITLAB_REPLAN_COMMENT_VAR} =~ /^${literal(c)}${arg} *$/`;
|
|
259
366
|
return [...replan.comments.map(one), ...replan.gated.map((g) => `($${g.when} && ${one(g.comment)})`)].join(" || ");
|
|
260
367
|
}
|
|
@@ -268,35 +375,127 @@ export function gitlabReplanCommentIf(replan, target) {
|
|
|
268
375
|
* commenter), whether the commenter can write. It writes `go=1`, `pr`,
|
|
269
376
|
* `head`, `base` and `argument` to the step's outputs.
|
|
270
377
|
*/
|
|
271
|
-
export const REPLAN_DECIDE_JS =
|
|
378
|
+
export const REPLAN_DECIDE_JS = replanDecideJs();
|
|
379
|
+
/**
|
|
380
|
+
* The re-plan's decision script (#4899) with what `replan`'s options add
|
|
381
|
+
* (#4963). With neither it is {@link REPLAN_DECIDE_JS}, as before.
|
|
382
|
+
*
|
|
383
|
+
* - `dispatch`: on `workflow_dispatch` the pull request is the `pr` input
|
|
384
|
+
* and the argument the input `CHANT_REPLAN_DISPATCH_ARGUMENT` names;
|
|
385
|
+
* a `pr` that is not a number, or an argument that is not one plain
|
|
386
|
+
* word, fails the job. No permission is asked: only a writer dispatches.
|
|
387
|
+
* - `reply`: a comment that starts with `CHANT_REPLAN_PRODUCT` and is not
|
|
388
|
+
* the plan command, nor one of `CHANT_REPLAN_OTHERS`, a target that is
|
|
389
|
+
* none of the plan's, and a fork's pull request with `forks: "skip"`
|
|
390
|
+
* get a reply comment with the reason, once the commenter's permission
|
|
391
|
+
* is known (Forgejo). A dispatch's reason goes to the log alone.
|
|
392
|
+
*/
|
|
393
|
+
export function replanDecideJs(opts = {}) {
|
|
394
|
+
const { dispatch = false, reply = false } = opts;
|
|
395
|
+
const replyLine = reply
|
|
396
|
+
? [
|
|
397
|
+
// The reply, as the product: on a dispatch the log alone.
|
|
398
|
+
`const post=async(t)=>{say(t);${dispatch ? "if(dispatch)return;" : ""}const r=await fetch(api+"/repos/"+repo+"/issues/"+n+"/comments",{method:"POST",headers:{authorization:"token "+process.env.CHANT_REPLAN_TOKEN,accept:"application/json","content-type":"application/json"},body:JSON.stringify({body:product.slice(1)+": "+t})});if(!r.ok)console.error("chant: the reply was not posted: the forge answered "+r.status)};`,
|
|
399
|
+
]
|
|
400
|
+
: [];
|
|
401
|
+
return [
|
|
402
|
+
'const fs=require("fs");',
|
|
403
|
+
'const say=(m)=>console.log("chant: "+m);',
|
|
404
|
+
'const out=(k,v)=>fs.appendFileSync(process.env.GITHUB_OUTPUT,k+"="+v+"\\n");',
|
|
405
|
+
"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)}",
|
|
406
|
+
...(dispatch ? ['const dispatch=process.env.GITHUB_EVENT_NAME==="workflow_dispatch",inputs=e.inputs&&typeof e.inputs==="object"?e.inputs:{};'] : []),
|
|
407
|
+
'const body=String((e.comment&&e.comment.body)||"").trim();',
|
|
408
|
+
'const cmds=JSON.parse(process.env.CHANT_REPLAN_COMMANDS||"[]");',
|
|
409
|
+
'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)}',
|
|
410
|
+
"let arg,flag;",
|
|
411
|
+
...(reply ? ['let refusal;const product=process.env.CHANT_REPLAN_PRODUCT||"",others=JSON.parse(process.env.CHANT_REPLAN_OTHERS||"[]");const says=(c)=>body===c||body.startsWith(c+" ")||body.startsWith(c+"\\t");'] : []),
|
|
412
|
+
...(dispatch
|
|
413
|
+
? [
|
|
414
|
+
'if(dispatch){const pv=String(inputs.pr==null?"":inputs.pr).trim();if(!pv){say("the dispatch names no pull request");process.exit(0)}if(!/^[1-9][0-9]{0,9}$/.test(pv)){console.error("chant: the dispatch\\u0027s pr input is a pull request number, like 42");process.exit(1)}',
|
|
415
|
+
`const k=process.env.CHANT_REPLAN_DISPATCH_ARGUMENT||"argument",a=String(inputs[k]==null?"":inputs[k]).trim();if(a&&!/${REPLAN_WORD_JS}/.test(a)){console.error("chant: the dispatch\\u0027s "+k+" input is one word of letters, digits and _./@+=,:-, not starting with -");process.exit(1)}arg=a}else `,
|
|
416
|
+
]
|
|
417
|
+
: []),
|
|
418
|
+
// #4984: a word that starts with `-` is a flag (`--target=x`), which the re-plan does not take.
|
|
419
|
+
`for(const c of cmds){if(body===c){arg="";break}if(body.startsWith(c+" ")){const r=body.slice(c.length).trim();if(r.startsWith("-")){flag=r.split(/\\s/)[0];break}if(/${REPLAN_WORD_JS}/.test(r)){arg=r;break}}}`,
|
|
420
|
+
reply
|
|
421
|
+
? 'if(flag!==undefined){refusal="the re-plan takes no flags, and "+flag+" is one: write the command alone, or with one word that does not start with -";arg=""}'
|
|
422
|
+
: 'if(flag!==undefined){say("the re-plan takes no flags, and "+flag+" is one, so nothing is planned again");process.exit(0)}',
|
|
423
|
+
reply
|
|
424
|
+
? 'if(arg===undefined){if(product&&says(product)&&!others.some(says)){refusal="the commands are "+cmds.concat(others).map((c)=>"`"+c+"`").join(", ")}else{say("the comment asks for no plan");process.exit(0)}}'
|
|
425
|
+
: 'if(arg===undefined){say("the comment asks for no plan");process.exit(0)}',
|
|
426
|
+
'const target=process.env.CHANT_REPLAN_TARGET||"",targets=JSON.parse(process.env.CHANT_REPLAN_TARGETS||"[]");',
|
|
427
|
+
reply
|
|
428
|
+
? 'if(targets.length&&arg&&!targets.includes(arg)){refusal=arg+" is none of "+targets.join(", ")+", so nothing is planned again";arg=""}'
|
|
429
|
+
: 'if(targets.length&&arg&&!targets.includes(arg)){say(arg+" is none of "+targets.join(", ")+", so nothing is planned again");process.exit(0)}',
|
|
430
|
+
'if(targets.length&&arg&&arg!==target){say("the comment plans "+arg+" again, not "+target);process.exit(0)}',
|
|
431
|
+
dispatch
|
|
432
|
+
? 'const n=dispatch?Number(String(inputs.pr).trim()):e.issue&&e.issue.number;if(!dispatch&&(!Number.isInteger(n)||!(e.issue.pull_request||e.is_pull))){say("the comment is not on a pull request");process.exit(0)}'
|
|
433
|
+
: '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)}',
|
|
434
|
+
'const api=String(process.env.GITHUB_API_URL||"").replace(/\\/+$/,""),repo=process.env.GITHUB_REPOSITORY;',
|
|
435
|
+
'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()};',
|
|
436
|
+
...replyLine,
|
|
437
|
+
"(async()=>{",
|
|
438
|
+
...(reply
|
|
439
|
+
? [
|
|
440
|
+
// Who asked comes first: a commenter who cannot write gets no reply.
|
|
441
|
+
`if(process.env.CHANT_REPLAN_PERMISSION${dispatch ? "&&!dispatch" : ""}){const who=e.comment&&e.comment.user&&e.comment.user.login;const p=who?await get("/collaborators/"+encodeURIComponent(who)+"/permission"):{};`,
|
|
442
|
+
'if(!["owner","admin","maintain","write"].includes(p.permission)){say((who||"the commenter")+" cannot write to "+repo+", so nothing is planned again");return}}',
|
|
443
|
+
"if(refusal){await post(refusal);return}",
|
|
444
|
+
'const pr=await get("/pulls/"+n);',
|
|
445
|
+
'if(pr.state!=="open"){say("pull request "+n+" is not open, so it is not planned again");return}',
|
|
446
|
+
'const same=Boolean(pr.head&&pr.head.repo&&pr.head.repo.full_name===repo);',
|
|
447
|
+
'if(!same&&process.env.CHANT_REPLAN_FORKS==="skip"){await post("pull request "+n+" is from a fork, and its code never runs with this repository\\u0027s credentials, so it is not planned again");return}',
|
|
448
|
+
]
|
|
449
|
+
: [
|
|
450
|
+
'const pr=await get("/pulls/"+n);',
|
|
451
|
+
'if(pr.state!=="open"){say("pull request "+n+" is not open, so it is not planned again");return}',
|
|
452
|
+
'const same=Boolean(pr.head&&pr.head.repo&&pr.head.repo.full_name===repo);',
|
|
453
|
+
'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}',
|
|
454
|
+
`if(process.env.CHANT_REPLAN_PERMISSION${dispatch ? "&&!dispatch" : ""}){const who=e.comment&&e.comment.user&&e.comment.user.login;const p=who?await get("/collaborators/"+encodeURIComponent(who)+"/permission"):{};`,
|
|
455
|
+
'if(!["owner","admin","maintain","write"].includes(p.permission)){say((who||"the commenter")+" cannot write to "+repo+", so nothing is planned again");return}}',
|
|
456
|
+
]),
|
|
457
|
+
'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");',
|
|
458
|
+
'out("go","1");out("pr",String(n));out("head",pr.head.sha);out("base",pr.base.sha);out("argument",arg);',
|
|
459
|
+
'say("planning pull request "+n+" again at "+pr.head.sha.slice(0,12)+(arg?" for "+arg:""))',
|
|
460
|
+
'})().catch((err)=>{console.error("chant: the re-plan could not decide: "+(err&&err.message?err.message:String(err)));process.exit(1)});',
|
|
461
|
+
].join("");
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* The previous note's read step on GitHub and Forgejo (#4963): `node -e`,
|
|
465
|
+
* from `/`, with the job's token in `CHANT_PREVIOUS_TOKEN` alone. It pages
|
|
466
|
+
* through pull request `CHANT_PREVIOUS_PR`'s comments for the one whose
|
|
467
|
+
* first line is `CHANT_PREVIOUS_NOTE` (chant's marker), takes its second
|
|
468
|
+
* line's body when it is `<!-- <CHANT_PREVIOUS_NAME> <body> -->` and the
|
|
469
|
+
* body is plain words, and appends `CHANT_PLAN_PREVIOUS_MARKER=<body>` to
|
|
470
|
+
* `$GITHUB_ENV`, empty when there is none. A forge that refuses is a
|
|
471
|
+
* warning: the plan verb plans without it.
|
|
472
|
+
*/
|
|
473
|
+
export const PREVIOUS_MARKER_JS = [
|
|
272
474
|
'const fs=require("fs");',
|
|
273
|
-
'const
|
|
274
|
-
'const
|
|
275
|
-
|
|
276
|
-
'const
|
|
277
|
-
'const
|
|
278
|
-
'
|
|
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()};',
|
|
475
|
+
'const api=String(process.env.GITHUB_API_URL||"").replace(/\\/+$/,""),repo=process.env.GITHUB_REPOSITORY,n=process.env.CHANT_PREVIOUS_PR||"";',
|
|
476
|
+
'const note=process.env.CHANT_PREVIOUS_NOTE||"",name=process.env.CHANT_PREVIOUS_NAME||"";',
|
|
477
|
+
'const put=(v)=>fs.appendFileSync(process.env.GITHUB_ENV,"CHANT_PLAN_PREVIOUS_MARKER="+v+"\\n");',
|
|
478
|
+
'const esc=(s)=>s.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&");',
|
|
479
|
+
'const own=new RegExp("^<!-- "+esc(name)+"(?: ([A-Za-z0-9_.,\\\\/@+=:-]+(?: [A-Za-z0-9_.,\\\\/@+=:-]+)*))? -->$");',
|
|
480
|
+
'if(!/^[0-9]+$/.test(n)){console.log("chant: no pull request to read the previous note of");put("");process.exit(0)}',
|
|
288
481
|
"(async()=>{",
|
|
289
|
-
|
|
290
|
-
'
|
|
291
|
-
'
|
|
292
|
-
|
|
293
|
-
'
|
|
294
|
-
|
|
295
|
-
'
|
|
296
|
-
'
|
|
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)});',
|
|
482
|
+
"for(let page=1;page<=50;page++){",
|
|
483
|
+
'const r=await fetch(api+"/repos/"+repo+"/issues/"+n+"/comments?per_page=100&limit=50&page="+page,{headers:{authorization:"token "+process.env.CHANT_PREVIOUS_TOKEN,accept:"application/json"}});',
|
|
484
|
+
'if(!r.ok)throw new Error("the forge answered "+r.status);',
|
|
485
|
+
"const list=await r.json();if(!Array.isArray(list)||list.length===0)break;",
|
|
486
|
+
'for(const c of list){const lines=String(c&&c.body||"").replace(/\\r\\n/g,"\\n").split("\\n");if(lines[0]!==note)continue;const m=own.exec(lines[1]||"");const v=m&&m[1]&&m[1].length<=4096?m[1]:"";put(v);console.log("chant: the previous note"+(v?" carries "+name:" carries no "+name));return}',
|
|
487
|
+
"}",
|
|
488
|
+
'put("");console.log("chant: the pull request has no note yet")',
|
|
489
|
+
'})().catch((err)=>{put("");console.log("chant: the previous note was not read: "+(err&&err.message?err.message:String(err)))});',
|
|
299
490
|
].join("");
|
|
491
|
+
/** The GitLab re-plan's lines that set {@link PLAN_ARGUMENT_ENV} from the comment's one word after the command (#4899), which the rule already held to plain characters. */
|
|
492
|
+
export function gitlabReplanArgumentLines(replan) {
|
|
493
|
+
const byLength = [...replan.comments, ...replan.gated.map((g) => g.comment)].sort((a, b) => b.length - a.length);
|
|
494
|
+
return [
|
|
495
|
+
`case "$${GITLAB_REPLAN_COMMENT_VAR}" in ${byLength.map((c) => `"${c}"*) chant_rest="\${${GITLAB_REPLAN_COMMENT_VAR}#"${c}"}" ;;`).join(" ")} *) chant_rest="" ;; esac`,
|
|
496
|
+
`${PLAN_ARGUMENT_ENV}="$(printf '%s' "$chant_rest" | tr -d ' ')" && export ${PLAN_ARGUMENT_ENV}`,
|
|
497
|
+
];
|
|
498
|
+
}
|
|
300
499
|
/**
|
|
301
500
|
* The pending step's script on GitHub and Forgejo (#4899): `node -e`, from
|
|
302
501
|
* `/`, posting the plan status pending at `CHANT_PENDING_SHA` with the token
|
|
@@ -346,25 +545,33 @@ export const PLAN_RECORD_JS = [
|
|
|
346
545
|
'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
546
|
`fs.mkdirSync(dir,{recursive:true});fs.writeFileSync(path.join(dir,"${PLAN_RUN_RECORD_FILE}"),JSON.stringify(rec)+"\\n");`,
|
|
348
547
|
].join("");
|
|
349
|
-
/**
|
|
548
|
+
/**
|
|
549
|
+
* The evidence step of one plan job (#4870), as {@link ProductPlanJob.evidence}.
|
|
550
|
+
* #4964: for a workspace member's pipeline (`member`) the checks are signed
|
|
551
|
+
* as `plan:<member>` and `policy:<member>` (`--member`), and on GitLab the
|
|
552
|
+
* report is read from the plan job's artifact at the member's `reportPath`.
|
|
553
|
+
* #4978: a product plan target's plan job is signed the same way, under the
|
|
554
|
+
* target's name.
|
|
555
|
+
*/
|
|
350
556
|
export function planEvidenceOf(forge, evidence, words, planJob, opts = {}) {
|
|
351
557
|
assertPipelineEvidence(evidence);
|
|
352
558
|
const key = evidenceKeyEnv(forge, evidence);
|
|
353
559
|
const bin = words.bin;
|
|
560
|
+
const member = opts.member ? { member: opts.member.name } : {};
|
|
354
561
|
if (forge === "gitlab") {
|
|
355
562
|
// #4914: the job runs in the target branch's plan notes pipeline, before the note job, and signs every open
|
|
356
563
|
// merge request's settled plan job from its artifact; no job of a merge request pipeline holds the key.
|
|
357
564
|
const dir = gitlabOpenEvidenceDir(planJob);
|
|
358
565
|
return {
|
|
359
566
|
jobName: `${planJob}-evidence`,
|
|
360
|
-
lines: openEvidenceLines({ job: planJob, dir: PR_LOOP_REPORT_DIR, out: dir, ...(bin ? { bin } : {}), ...(opts.noForks ? { noForks: true } : {}) }),
|
|
567
|
+
lines: openEvidenceLines({ job: planJob, dir: opts.member?.reportPath ?? PR_LOOP_REPORT_DIR, out: dir, ...(bin ? { bin } : {}), ...(opts.noForks ? { noForks: true } : {}), ...member }),
|
|
361
568
|
env: key,
|
|
362
569
|
dir,
|
|
363
570
|
...(evidenceKeyless(evidence) ? { idTokens: evidenceIdTokens(evidence) } : {}),
|
|
364
571
|
};
|
|
365
572
|
}
|
|
366
573
|
return {
|
|
367
|
-
lines: planEvidenceLines({ dir: PR_LOOP_REPORT_DIR, at: '"$HEAD_SHA"', base: '"$BASE_SHA"', result: '"$PLAN_RESULT"', ...(bin ? { bin } : {}) }),
|
|
574
|
+
lines: planEvidenceLines({ dir: PR_LOOP_REPORT_DIR, at: '"$HEAD_SHA"', base: '"$BASE_SHA"', result: '"$PLAN_RESULT"', ...(bin ? { bin } : {}), ...member }),
|
|
368
575
|
env: { HEAD_SHA: "${{ github.sha }}", BASE_SHA: "${{ github.event.pull_request.base.sha }}", PLAN_RESULT: `\${{ needs.${planJob}.result }}`, ...key },
|
|
369
576
|
...(evidenceKeyless(evidence) ? { idToken: true } : {}),
|
|
370
577
|
};
|
package/dist/drift-record.d.ts
CHANGED
|
@@ -489,6 +489,13 @@ export interface DeepDiffDriftInput extends DriftAdapterBase {
|
|
|
489
489
|
* `undeclaredEntities` undeclared. Accepted and held paths are not drift and
|
|
490
490
|
* are left out. To lay these over the thin read's records, so a deep hole
|
|
491
491
|
* stays on the attribute surface, use {@link mergeDeepDrift}.
|
|
492
|
+
*
|
|
493
|
+
* A pending change (`pending`: a privilege granted by hand, a column the
|
|
494
|
+
* declaration does not have) is drift too (#4944), as `lifecycle diff
|
|
495
|
+
* --live` counts it: an attribute on each entity behind it, its path the
|
|
496
|
+
* change's subject and its after what an apply would do, the entity's record
|
|
497
|
+
* drifted unless it is not-observed. A pending change that names no entity
|
|
498
|
+
* is a drifted record of its own, addressed by its subject.
|
|
492
499
|
*/
|
|
493
500
|
export declare function deepDiffDriftRecords(input: DeepDiffDriftInput): DriftRecord[];
|
|
494
501
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drift-record.d.ts","sourceRoot":"","sources":["../src/drift-record.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAEH,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAG1E,sDAAsD;AACtD,eAAO,MAAM,eAAe,4EAA4E,CAAC;AAEzG,8BAA8B;AAC9B,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,QAAQ,CAAC;AAEtD,sGAAsG;AACtG,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,CAElE;AAaD,wDAAwD;AACxD,eAAO,MA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,GAAG;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,oBAAoB,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC"}
|
package/dist/drift-record.js
CHANGED
|
@@ -783,6 +783,13 @@ export function liveDiffDriftRecords(input) {
|
|
|
783
783
|
* `undeclaredEntities` undeclared. Accepted and held paths are not drift and
|
|
784
784
|
* are left out. To lay these over the thin read's records, so a deep hole
|
|
785
785
|
* stays on the attribute surface, use {@link mergeDeepDrift}.
|
|
786
|
+
*
|
|
787
|
+
* A pending change (`pending`: a privilege granted by hand, a column the
|
|
788
|
+
* declaration does not have) is drift too (#4944), as `lifecycle diff
|
|
789
|
+
* --live` counts it: an attribute on each entity behind it, its path the
|
|
790
|
+
* change's subject and its after what an apply would do, the entity's record
|
|
791
|
+
* drifted unless it is not-observed. A pending change that names no entity
|
|
792
|
+
* is a drifted record of its own, addressed by its subject.
|
|
786
793
|
*/
|
|
787
794
|
export function deepDiffDriftRecords(input) {
|
|
788
795
|
const { diff } = input;
|
|
@@ -810,6 +817,18 @@ export function deepDiffDriftRecords(input) {
|
|
|
810
817
|
})),
|
|
811
818
|
});
|
|
812
819
|
}
|
|
820
|
+
for (const p of diff.pending ?? []) {
|
|
821
|
+
const attribute = { path: p.subject, after: p.change };
|
|
822
|
+
for (const name of p.entities && p.entities.length > 0 ? p.entities : [p.subject]) {
|
|
823
|
+
const had = out.get(name);
|
|
824
|
+
if (had?.status === "not-observed")
|
|
825
|
+
continue;
|
|
826
|
+
if (had)
|
|
827
|
+
out.set(name, driftRecord({ ...had, status: "drifted", attributes: [...(had.attributes ?? []), attribute] }));
|
|
828
|
+
else
|
|
829
|
+
put(name, { status: "drifted", attributes: [attribute] });
|
|
830
|
+
}
|
|
831
|
+
}
|
|
813
832
|
for (const name of diff.undeclaredEntities ?? [])
|
|
814
833
|
put(name, { status: "undeclared" });
|
|
815
834
|
for (const name of diff.unchanged ?? [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floor-table.data.d.ts","sourceRoot":"","sources":["../src/floor-table.data.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,
|
|
1
|
+
{"version":3,"file":"floor-table.data.d.ts","sourceRoot":"","sources":["../src/floor-table.data.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAkPzC,CAAC"}
|