@intentius/chant 0.124.88 → 0.124.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +177 -0
- package/dist/ci-comment-commands.d.ts.map +1 -0
- package/dist/ci-comment-commands.js +325 -0
- package/dist/ci-comment-replies.d.ts +40 -0
- package/dist/ci-comment-replies.d.ts.map +1 -0
- package/dist/ci-comment-replies.js +59 -0
- package/dist/ci-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-note-commands.d.ts +63 -3
- package/dist/ci-note-commands.d.ts.map +1 -1
- package/dist/ci-note-commands.js +69 -35
- package/dist/ci-product-words.d.ts +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 +31 -0
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +34 -4
- 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 +21 -0
- package/dist/cli/handlers/pr-comment.d.ts.map +1 -0
- package/dist/cli/handlers/pr-comment.js +112 -0
- package/dist/cli/handlers/pr-env.d.ts.map +1 -1
- package/dist/cli/handlers/pr-env.js +6 -3
- package/dist/cli/handlers/pr.d.ts +23 -1
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +55 -9
- 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 +28 -2
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +2 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +24 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +16 -0
- package/dist/cli/registry.d.ts +11 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +2 -1
- package/dist/components/pr-checks.d.ts +70 -6
- package/dist/components/pr-checks.d.ts.map +1 -1
- package/dist/components/pr-checks.js +74 -13
- package/dist/components/pr-pipeline.d.ts +16 -12
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +3 -11
- package/dist/components/product-pipeline.d.ts +42 -1
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +64 -12
- package/dist/components/product-plan.d.ts +190 -5
- package/dist/components/product-plan.d.ts.map +1 -1
- package/dist/components/product-plan.js +220 -39
- 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 +54 -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 +11 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +11 -0
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +30 -3
- package/dist/lifecycle/publish-npm.d.ts +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/index.d.ts +2 -0
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -0
- package/dist/op/op-waves-evidence-jobs.d.ts +6 -1
- package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -1
- package/dist/op/op-waves-evidence-jobs.js +9 -3
- 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 +2 -0
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +2 -1
- package/dist/op/op-waves.d.ts +4 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +4 -1
- package/dist/op/schedule-overdue.d.ts.map +1 -1
- package/dist/op/schedule-overdue.js +59 -3
- package/dist/op/wave-stop.d.ts +64 -0
- package/dist/op/wave-stop.d.ts.map +1 -0
- package/dist/op/wave-stop.js +127 -0
- package/dist/planned-files.d.ts +76 -0
- package/dist/planned-files.d.ts.map +1 -0
- package/dist/planned-files.js +108 -0
- package/dist/pr-forge-job.d.ts +22 -0
- package/dist/pr-forge-job.d.ts.map +1 -0
- package/dist/pr-forge-job.js +46 -0
- package/dist/pr-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 +145 -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 +37 -1
- package/dist/release-floors.d.ts.map +1 -1
- package/dist/release-floors.js +61 -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-runtime.mjs +304 -301
- 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 +376 -0
- package/src/ci-comment-commands.ts +389 -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 -9
- package/src/ci-image.ts +85 -12
- package/src/ci-note-commands.ts +104 -41
- package/src/ci-product-words.ts +59 -0
- package/src/ci-product.ts +40 -4
- 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 +104 -0
- package/src/cli/handlers/pr-env.ts +6 -3
- package/src/cli/handlers/pr-record.test.ts +1 -1
- package/src/cli/handlers/pr.ts +50 -10
- 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 +28 -2
- package/src/cli/handlers/run.ts +2 -1
- package/src/cli/main.ts +24 -2
- package/src/cli/parse-args.ts +12 -0
- package/src/cli/registry.ts +11 -0
- package/src/components/auto-release.ts +2 -1
- package/src/components/pr-checks.ts +112 -17
- package/src/components/pr-pipeline.ts +17 -15
- package/src/components/product-pipeline.ts +93 -11
- package/src/components/product-plan.test.ts +40 -2
- package/src/components/product-plan.ts +331 -45
- package/src/drift-record.test.ts +20 -0
- package/src/drift-record.ts +16 -0
- package/src/floor-table.data.ts +54 -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 +11 -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/gate-resume.test.ts +27 -0
- package/src/op/index.ts +10 -0
- package/src/op/op-waves-evidence-jobs.ts +10 -4
- package/src/op/op-waves-notify-words.test.ts +18 -0
- package/src/op/op-waves-render-spec.test.ts +160 -0
- package/src/op/op-waves-render-spec.ts +171 -0
- package/src/op/op-waves-run.ts +2 -1
- package/src/op/op-waves.ts +5 -2
- package/src/op/schedule-overdue.test.ts +43 -0
- package/src/op/schedule-overdue.ts +57 -3
- package/src/op/wave-stop.test.ts +72 -0
- package/src/op/wave-stop.ts +137 -0
- package/src/planned-files.test.ts +80 -0
- package/src/planned-files.ts +134 -0
- package/src/pr-forge-job.test.ts +53 -0
- package/src/pr-forge-job.ts +46 -0
- package/src/pr-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 +150 -15
- package/src/pr-status.ts +91 -0
- package/src/ref-gate-init.ts +30 -11
- package/src/release-floors.ts +78 -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/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
|
@@ -59,7 +59,45 @@ export interface CiProductAlias {
|
|
|
59
59
|
command: CiProductCommand;
|
|
60
60
|
/** The variable that turns the alias on in a job (terragucci's `TG_ATLANTIS_COMMENTS`). Absent: always on. */
|
|
61
61
|
when?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Flags of the other tool that the product has no counterpart for, each
|
|
64
|
+
* with the reply that refuses it (#4946), such as terragucci's `{ "-p":
|
|
65
|
+
* "a root goes by its path, not a project name: ..." }` on `atlantis
|
|
66
|
+
* plan`. A flag here is refused before the alias reads `-d`, so a product
|
|
67
|
+
* can refuse `atlantis apply -d` too. `--` refuses everything after it.
|
|
68
|
+
*/
|
|
69
|
+
refuse?: Record<string, string>;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* What a comment job replies to a command the pipeline runs no job for
|
|
73
|
+
* (#4946), in the product's own sentences. Each slot left out takes
|
|
74
|
+
* chant's. The comment job on GitHub and Forgejo and the note poll on
|
|
75
|
+
* GitLab both read these.
|
|
76
|
+
*/
|
|
77
|
+
export interface CiProductCommentReplies {
|
|
78
|
+
/** A plan comment where no job plans on a comment (GitHub and Forgejo; GitLab starts a merge request pipeline). */
|
|
79
|
+
plan?: string;
|
|
80
|
+
/** An apply comment where no job applies on a comment: neither an apply before merge nor the re-run of a merged pull request's apply. */
|
|
81
|
+
apply?: string;
|
|
82
|
+
/** A lock comment where the pipeline takes no locks. */
|
|
83
|
+
lock?: string;
|
|
84
|
+
/** An unlock comment where the pipeline takes no locks. */
|
|
85
|
+
unlock?: string;
|
|
86
|
+
/** An action comment where no workflow runs actions (GitHub and Forgejo; GitLab names the checkout to run it from). */
|
|
87
|
+
action?: string;
|
|
88
|
+
/** An agent comment where the agent is off. */
|
|
89
|
+
agent?: string;
|
|
90
|
+
/** Any command on a pull request from a fork. */
|
|
91
|
+
fork?: string;
|
|
92
|
+
/**
|
|
93
|
+
* A comment that names a member the pipeline was not written with, over
|
|
94
|
+
* `{member}` (the one named) and `{members}` (the pipeline's, each in
|
|
95
|
+
* backticks, sorted, comma separated).
|
|
96
|
+
*/
|
|
97
|
+
member?: string;
|
|
62
98
|
}
|
|
99
|
+
/** The reply slots, for checking a product's words. */
|
|
100
|
+
export declare const CI_PRODUCT_COMMENT_REPLIES: readonly (keyof CiProductCommentReplies)[];
|
|
63
101
|
/** The words a product passes. Every slot is optional; a missing one takes chant's. */
|
|
64
102
|
export interface CiProductWordsInput {
|
|
65
103
|
/** The status prefix, the note heading and the comment prefix: `chant`, `terragucci`, `plywood`. */
|
|
@@ -117,6 +155,8 @@ export interface CiProductWordsInput {
|
|
|
117
155
|
adoptMarkers?: string[];
|
|
118
156
|
/** What chant's notify sends under these words (#4610). */
|
|
119
157
|
notify?: CiProductNotifyWordsInput;
|
|
158
|
+
/** The replies to commands the pipeline runs no job for (#4946). Default: chant's. */
|
|
159
|
+
replies?: CiProductCommentReplies;
|
|
120
160
|
}
|
|
121
161
|
/** The notify slots a product passes (#4610). */
|
|
122
162
|
export interface CiProductNotifyWordsInput {
|
|
@@ -166,6 +206,8 @@ export interface CiProductWords {
|
|
|
166
206
|
bin?: string;
|
|
167
207
|
adoptMarkers: string[];
|
|
168
208
|
notify: CiProductNotifyWords;
|
|
209
|
+
/** The product's replies to commands no job runs (#4946), when it gives any. */
|
|
210
|
+
replies?: CiProductCommentReplies;
|
|
169
211
|
}
|
|
170
212
|
/** chant's own approve line. */
|
|
171
213
|
export declare const CHANT_APPROVE_TEMPLATE = "chant approve {op} {gate} --plan {digest} --approver {approver} {sign}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-product-words.d.ts","sourceRoot":"","sources":["../src/ci-product-words.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,iGAAiG;AACjG,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,QAA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CT_STAGES = ["plan", "apply", "record", "check", "drift", "lock", "approval", "control"];
|
|
27
27
|
export const CI_PRODUCT_COMMANDS = ["plan", "apply", "lock", "unlock", "agent", "action", "commit"];
|
|
28
28
|
export const CI_PRODUCT_APPLY_MODES = ["on-merge", "release", "before-merge"];
|
|
29
|
+
/** The reply slots, for checking a product's words. */
|
|
30
|
+
export const CI_PRODUCT_COMMENT_REPLIES = ["plan", "apply", "lock", "unlock", "action", "agent", "fork", "member"];
|
|
29
31
|
/** chant's own wave label in a notify summary. */
|
|
30
32
|
export const CHANT_NOTIFY_WAVE_TEMPLATE = "wave {k} ({name}) of {spec}";
|
|
31
33
|
/** chant's own approve line. */
|
|
@@ -76,6 +78,7 @@ export function resolveProductWords(input = {}) {
|
|
|
76
78
|
headers: input.notify?.headers ?? `x-${product}`,
|
|
77
79
|
...(input.notify?.message ? { message: input.notify.message } : {}),
|
|
78
80
|
},
|
|
81
|
+
...(input.replies !== undefined ? { replies: input.replies } : {}),
|
|
79
82
|
};
|
|
80
83
|
}
|
|
81
84
|
/** A word that may reach a shell line, an `if:` expression or a status context. */
|
|
@@ -131,6 +134,24 @@ export function productWordsProblems(words, options = {}) {
|
|
|
131
134
|
problems.push(`the alias ${JSON.stringify(a.from)} is lowercase words`);
|
|
132
135
|
if (!Object.values(words.commands).includes(a.command))
|
|
133
136
|
problems.push(`the alias ${JSON.stringify(a.from)} stands for ${a.command}, which no command names`);
|
|
137
|
+
// #4946: a refused flag is one word starting with -, and its reply one line.
|
|
138
|
+
for (const [flag, reason] of Object.entries(a.refuse ?? {})) {
|
|
139
|
+
if (!/^--?[A-Za-z0-9-]*$/.test(flag))
|
|
140
|
+
problems.push(`the alias ${JSON.stringify(a.from)} refuses ${JSON.stringify(flag)}, and a flag is - or -- then letters, digits and -`);
|
|
141
|
+
if (typeof reason !== "string" || reason.trim() === "" || /[\r\n]/.test(reason))
|
|
142
|
+
problems.push(`the alias ${JSON.stringify(a.from)} refuses ${flag} with no one-line reply`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// #4946: each reply is one line of text; the member reply's placeholders are {member} and {members}.
|
|
146
|
+
for (const [slot, text] of Object.entries(words.replies ?? {})) {
|
|
147
|
+
if (!CI_PRODUCT_COMMENT_REPLIES.includes(slot))
|
|
148
|
+
problems.push(`replies.${slot} is not one of ${CI_PRODUCT_COMMENT_REPLIES.join(", ")}`);
|
|
149
|
+
else if (typeof text !== "string" || text.trim() === "" || /[\r\n]/.test(text))
|
|
150
|
+
problems.push(`replies.${slot} is one line of text`);
|
|
151
|
+
else
|
|
152
|
+
for (const m of text.matchAll(/\{([^}]*)\}/g))
|
|
153
|
+
if (slot !== "member" || (m[1] !== "member" && m[1] !== "members"))
|
|
154
|
+
problems.push(`replies.${slot} names {${m[1]}}, which chant does not fill`);
|
|
134
155
|
}
|
|
135
156
|
for (const [where, template] of [["approve", words.approve], ["override", words.override]]) {
|
|
136
157
|
for (const m of template.matchAll(/\{([^}]*)\}/g))
|
|
@@ -352,6 +373,10 @@ export function parseProductComment(words, body, env = {}, commitArgs = {}, opti
|
|
|
352
373
|
const args = [];
|
|
353
374
|
for (let i = 0; i < rest.length; i++) {
|
|
354
375
|
const w = rest[i];
|
|
376
|
+
// #4946: a flag the product has no counterpart for gets the product's own reason.
|
|
377
|
+
const refused = a.refuse && Object.prototype.hasOwnProperty.call(a.refuse, w) ? a.refuse[w] : undefined;
|
|
378
|
+
if (refused !== undefined)
|
|
379
|
+
return { kind: "refused", reason: refused };
|
|
355
380
|
if (w === "-d" || w === "--dir") {
|
|
356
381
|
const dir = rest[++i];
|
|
357
382
|
if (dir === undefined)
|
package/dist/ci-product.d.ts
CHANGED
|
@@ -57,6 +57,26 @@ export { PLAN_ARGUMENT_ENV, PLAN_NOTE_NOTICES_ENV, type ProductPlanReplanJob, ty
|
|
|
57
57
|
* The first chant whose `parseProductComment` takes `leaveCommit` and that has `commitWordOf` (#4890): a comment job that is not the commit job leaves every comment for a commit word to it, a malformed one included, so the comment gets one reply.
|
|
58
58
|
*/
|
|
59
59
|
export declare const COMMENT_LEAVES_COMMIT_FLOOR = "0.124.88";
|
|
60
|
+
/**
|
|
61
|
+
* The first chant with the comment job on GitHub and Forgejo and the replies to commands no job runs (#4946): `commentJob` in the product pipeline (`chant components pr-comment`, `answerProductComment` in `@intentius/chant/ci-comment-commands`), which replies to a refusal and to a command the pipeline runs no job for, and with waves on merge starts a merged pull request's apply again; the words' `replies` and an alias's `refuse`, which the GitLab note poll reads too, as `chantNoteRuns`' `members`; `retryApply`; and `locks: "plan"` in GitHub's and Forgejo's product plan, with the lock, unlock and comment lock jobs.
|
|
62
|
+
*/
|
|
63
|
+
export declare const COMMENT_COMMANDS_FLOOR = "0.124.89";
|
|
64
|
+
export { answerProductComment, answeredElsewhere, COMMENT_JOBS_ENV, commentRuns, PR_COMMENT_JOB, RERUN_APPLY_JOBS, type CommentJobs, type CommentOutcome, type CommentRuns, type AnswerCommentOptions } from "./ci-comment-commands.js";
|
|
65
|
+
export { forkReply, memberReply, notRunReply } from "./ci-comment-replies.js";
|
|
66
|
+
export type { CiProductCommentReplies } from "./ci-product-words.js";
|
|
67
|
+
export { productCommentJob, type ProductCommentJob } from "./components/product-pipeline.js";
|
|
68
|
+
/**
|
|
69
|
+
* The first chant whose product plan locks what a change reaches (#4979): `productPlan.reach`, a reach line the lock job runs at the target branch's commit with `chant lock --reach` (`@intentius/chant/lifecycle/reach-locks`), on GitHub, Forgejo and GitLab, where the lock job runs in the plan notes pipeline with `--open` beside the comment lock and unlock jobs; and whose comment job answers a re-plan comment with flags the product plan's re-plan cannot take (`noPlanFlags`).
|
|
70
|
+
*/
|
|
71
|
+
export declare const PRODUCT_PLAN_REACH_LOCKS_FLOOR = "0.124.89";
|
|
72
|
+
export { LOCK_REACH_ENV, reachedTargets, reachOpen, type Reached, type ReachInput } from "./lifecycle/reach-locks.js";
|
|
73
|
+
export { productPlanReachLock, type ProductPlanReachLock } from "./components/product-plan.js";
|
|
74
|
+
export { planFlagsReply } from "./ci-comment-commands.js";
|
|
75
|
+
/**
|
|
76
|
+
* The first chant whose comment job stops a merged pull request's re-run at a wave (#4979): `/<product> apply wave-<n>` writes a stop for the merge commit on `chant/lifecycle` (`_waves/<op>.stops.json`, `@intentius/chant/op/wave-stop`) before GitHub's re-run or Forgejo's dispatch, and `chant run wave` leaves each wave after n waiting (exit 3).
|
|
77
|
+
*/
|
|
78
|
+
export declare const WAVE_STOP_FLOOR = "0.124.89";
|
|
79
|
+
export { setWaveStop, waveStopAt, waveStopLine, type WaveStop } from "./op/wave-stop.js";
|
|
60
80
|
/**
|
|
61
81
|
* The first chant whose product plan takes `watches`, the product's own scheduled jobs the note job's `pr-post` checks for having stopped with the job's token (#4888), and whose `checkOverdueOps` and `overdueOpsAt` take a product's `logPrefix` and `label`.
|
|
62
82
|
*/
|
|
@@ -67,6 +87,17 @@ export { PLAN_WATCHES_ENV } from "./op/schedule-overdue.js";
|
|
|
67
87
|
*/
|
|
68
88
|
export declare const PRODUCT_PLAN_RECORD_FLOOR = "0.124.88";
|
|
69
89
|
export { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE, readPlanRunRecord } from "./pr-plan-record.js";
|
|
90
|
+
/**
|
|
91
|
+
* The first chant whose product plan carries what terragucci's and sql-yodeler's plan jobs did themselves (#4963, #4951): `trade` (a plan's or a target's) before the checkout, `replan: { dispatch, reply, notAffected }` (a re-plan from `workflow_dispatch`, a reply to a comment no other job takes, `pr-post --not-affected`), `previousMarker` (`CHANT_PLAN_PREVIOUS_MARKER`), `noteSteps.pullRequest`, a `PrReport`'s `marker`, and a hand-off of the product's own note text (`planBodyHandoff`).
|
|
92
|
+
*/
|
|
93
|
+
export declare const PRODUCT_PLAN_REPLAN_FLOOR = "0.124.89";
|
|
94
|
+
export { gitlabReplanArgumentLines, PREVIOUS_MARKER_JS, replanDecideJs, type ProductPlanReplanOptions } from "./components/product-plan.js";
|
|
95
|
+
export { planBodyHandoff, PLAN_BODY_LIMIT, type PrPlanBodyHandoff } from "./pr-plan-note.js";
|
|
96
|
+
/**
|
|
97
|
+
* The first chant whose note job compares the plan's subject with the previous note's (#4972), on GitHub, Forgejo and GitLab: a plan note hand-off's `subject` (`PrPlanSubject`, an id and named parts) is kept in the note, and `pr-post` adds the note words' `sinceLast` line, naming the parts added, gone and changed (`subjectParts`), when the previous note kept another id. The plan job reads no note, and `previousMarker` is deprecated.
|
|
98
|
+
*/
|
|
99
|
+
export declare const PRODUCT_PLAN_SUBJECT_FLOOR = "0.124.89";
|
|
100
|
+
export { PLAN_SUBJECT_LIMIT, planSubjectProblem, sinceLastLine, subjectChanges, type PrPlanSubject, type PrPlanSubjectPartWords } from "./pr-plan-note.js";
|
|
70
101
|
/**
|
|
71
102
|
* Day-2 actions in the product pipeline (#4654): the `action` comment
|
|
72
103
|
* command counted as answered by the product's own workflow
|
package/dist/ci-product.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-product.d.ts","sourceRoot":"","sources":["../src/ci-product.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAIhE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAE3C,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,WAAW,EACX,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,cAAc,EACd,oBAAoB,EACpB,e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AO,MAAM,sBAAsB,aAAsB,CAAC;AAC1D,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEjF;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC5H,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EACL,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,YAAY,GAClB,MAAM,QAAQ,CAAC"}
|
package/dist/ci-product.js
CHANGED
|
@@ -50,22 +50,52 @@ export { planNoteHandoff, PR_PLAN_NOTE_FILE } from "./pr-plan-note.js";
|
|
|
50
50
|
/**
|
|
51
51
|
* The first chant whose product plan carries the plan-job steps beside the plan verb and the note job's own lines (#4899, #4931): `productPlan.login` and a target's `login` (ci-login) with the job's OIDC token, `idTokens`, `pending`, `controlRead`, `setup` steps, job-level `env`, `report`, `concurrency`, the comment re-plan `replan`, and `noteSteps`; a hand-off's `marker` kept under the note words' `productMarker`; and the note job's notices and overdue Ops under a hand-off's counts.
|
|
52
52
|
*/
|
|
53
|
-
export const PRODUCT_PLAN_STEPS_FLOOR =
|
|
53
|
+
export const PRODUCT_PLAN_STEPS_FLOOR = "0.124.88";
|
|
54
54
|
export { PLAN_ARGUMENT_ENV, PLAN_NOTE_NOTICES_ENV } from "./components/product-plan.js";
|
|
55
55
|
/**
|
|
56
56
|
* The first chant whose `parseProductComment` takes `leaveCommit` and that has `commitWordOf` (#4890): a comment job that is not the commit job leaves every comment for a commit word to it, a malformed one included, so the comment gets one reply.
|
|
57
57
|
*/
|
|
58
|
-
export const COMMENT_LEAVES_COMMIT_FLOOR =
|
|
58
|
+
export const COMMENT_LEAVES_COMMIT_FLOOR = "0.124.88";
|
|
59
|
+
/**
|
|
60
|
+
* The first chant with the comment job on GitHub and Forgejo and the replies to commands no job runs (#4946): `commentJob` in the product pipeline (`chant components pr-comment`, `answerProductComment` in `@intentius/chant/ci-comment-commands`), which replies to a refusal and to a command the pipeline runs no job for, and with waves on merge starts a merged pull request's apply again; the words' `replies` and an alias's `refuse`, which the GitLab note poll reads too, as `chantNoteRuns`' `members`; `retryApply`; and `locks: "plan"` in GitHub's and Forgejo's product plan, with the lock, unlock and comment lock jobs.
|
|
61
|
+
*/
|
|
62
|
+
export const COMMENT_COMMANDS_FLOOR = NEXT_RELEASE;
|
|
63
|
+
export { answerProductComment, answeredElsewhere, COMMENT_JOBS_ENV, commentRuns, PR_COMMENT_JOB, RERUN_APPLY_JOBS } from "./ci-comment-commands.js";
|
|
64
|
+
export { forkReply, memberReply, notRunReply } from "./ci-comment-replies.js";
|
|
65
|
+
export { productCommentJob } from "./components/product-pipeline.js";
|
|
66
|
+
/**
|
|
67
|
+
* The first chant whose product plan locks what a change reaches (#4979): `productPlan.reach`, a reach line the lock job runs at the target branch's commit with `chant lock --reach` (`@intentius/chant/lifecycle/reach-locks`), on GitHub, Forgejo and GitLab, where the lock job runs in the plan notes pipeline with `--open` beside the comment lock and unlock jobs; and whose comment job answers a re-plan comment with flags the product plan's re-plan cannot take (`noPlanFlags`).
|
|
68
|
+
*/
|
|
69
|
+
export const PRODUCT_PLAN_REACH_LOCKS_FLOOR = NEXT_RELEASE;
|
|
70
|
+
export { LOCK_REACH_ENV, reachedTargets, reachOpen } from "./lifecycle/reach-locks.js";
|
|
71
|
+
export { productPlanReachLock } from "./components/product-plan.js";
|
|
72
|
+
export { planFlagsReply } from "./ci-comment-commands.js";
|
|
73
|
+
/**
|
|
74
|
+
* The first chant whose comment job stops a merged pull request's re-run at a wave (#4979): `/<product> apply wave-<n>` writes a stop for the merge commit on `chant/lifecycle` (`_waves/<op>.stops.json`, `@intentius/chant/op/wave-stop`) before GitHub's re-run or Forgejo's dispatch, and `chant run wave` leaves each wave after n waiting (exit 3).
|
|
75
|
+
*/
|
|
76
|
+
export const WAVE_STOP_FLOOR = NEXT_RELEASE;
|
|
77
|
+
export { setWaveStop, waveStopAt, waveStopLine } from "./op/wave-stop.js";
|
|
59
78
|
/**
|
|
60
79
|
* The first chant whose product plan takes `watches`, the product's own scheduled jobs the note job's `pr-post` checks for having stopped with the job's token (#4888), and whose `checkOverdueOps` and `overdueOpsAt` take a product's `logPrefix` and `label`.
|
|
61
80
|
*/
|
|
62
|
-
export const PRODUCT_PLAN_WATCHES_FLOOR =
|
|
81
|
+
export const PRODUCT_PLAN_WATCHES_FLOOR = "0.124.88";
|
|
63
82
|
export { PLAN_WATCHES_ENV } from "./op/schedule-overdue.js";
|
|
64
83
|
/**
|
|
65
84
|
* The first chant whose product plan takes `record` (#4899): the plan step writes the plan job's run record into the hand-off, and the note job keeps it as Op `pr-plan` on `chant/lifecycle` with `pr-post --record-run <plan job>` (`--open` on GitLab), as `chant ci run plan --in-place` records `pr-plan`'s.
|
|
66
85
|
*/
|
|
67
|
-
export const PRODUCT_PLAN_RECORD_FLOOR =
|
|
86
|
+
export const PRODUCT_PLAN_RECORD_FLOOR = "0.124.88";
|
|
68
87
|
export { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE, readPlanRunRecord } from "./pr-plan-record.js";
|
|
88
|
+
/**
|
|
89
|
+
* The first chant whose product plan carries what terragucci's and sql-yodeler's plan jobs did themselves (#4963, #4951): `trade` (a plan's or a target's) before the checkout, `replan: { dispatch, reply, notAffected }` (a re-plan from `workflow_dispatch`, a reply to a comment no other job takes, `pr-post --not-affected`), `previousMarker` (`CHANT_PLAN_PREVIOUS_MARKER`), `noteSteps.pullRequest`, a `PrReport`'s `marker`, and a hand-off of the product's own note text (`planBodyHandoff`).
|
|
90
|
+
*/
|
|
91
|
+
export const PRODUCT_PLAN_REPLAN_FLOOR = NEXT_RELEASE;
|
|
92
|
+
export { gitlabReplanArgumentLines, PREVIOUS_MARKER_JS, replanDecideJs } from "./components/product-plan.js";
|
|
93
|
+
export { planBodyHandoff, PLAN_BODY_LIMIT } from "./pr-plan-note.js";
|
|
94
|
+
/**
|
|
95
|
+
* The first chant whose note job compares the plan's subject with the previous note's (#4972), on GitHub, Forgejo and GitLab: a plan note hand-off's `subject` (`PrPlanSubject`, an id and named parts) is kept in the note, and `pr-post` adds the note words' `sinceLast` line, naming the parts added, gone and changed (`subjectParts`), when the previous note kept another id. The plan job reads no note, and `previousMarker` is deprecated.
|
|
96
|
+
*/
|
|
97
|
+
export const PRODUCT_PLAN_SUBJECT_FLOOR = NEXT_RELEASE;
|
|
98
|
+
export { PLAN_SUBJECT_LIMIT, planSubjectProblem, sinceLastLine, subjectChanges } from "./pr-plan-note.js";
|
|
69
99
|
/**
|
|
70
100
|
* Day-2 actions in the product pipeline (#4654): the `action` comment
|
|
71
101
|
* command counted as answered by the product's own workflow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAepC,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAgBrF,OAAO,EAAuC,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAOrG;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,2CAA2C;IAC3C,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,8BAA8B;IAC9B,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G;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,SAAS,aAAa,EAAE,EACjC,MAAM,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAChD,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAC9C,KAAK,CAAC;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,WAAW,EAAE,mBAAmB,EAAE,CAAA;CAAE,CAAC,CAsBtE;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CA2yB9E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,CAMrF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAsBpF;AAiDD;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAIlD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAItD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,YAAY,EACrB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,GACxC,MAAM,IAAI,CAmCZ"}
|
|
@@ -22,7 +22,7 @@ import { sortedJsonReplacer } from "../../utils.js";
|
|
|
22
22
|
import { rankFoldBlockers, toCollapsedFormat } from "../../discovery/fold-rank.js";
|
|
23
23
|
import { foldExecutionCounts } from "../../discovery/fold-import.js";
|
|
24
24
|
import { formatError, formatWarning, formatSuccess, formatBold, formatInfo } from "../format.js";
|
|
25
|
-
import { writeFileSync, mkdirSync } from "fs";
|
|
25
|
+
import { existsSync, statSync, writeFileSync, mkdirSync } from "fs";
|
|
26
26
|
import { resolve, dirname, join, relative } from "path";
|
|
27
27
|
import { watchDirectory, formatTimestamp, formatChangedFiles } from "../watch.js";
|
|
28
28
|
function writeFileCreatingDir(path, content) {
|
|
@@ -725,7 +725,34 @@ export async function buildCommand(options) {
|
|
|
725
725
|
if (irWritten > 0) {
|
|
726
726
|
console.error(formatInfo(`Wrote ${irWritten} op.json file(s) under ${join(options.path ?? ".", "dist", "ops")}/`));
|
|
727
727
|
}
|
|
728
|
-
|
|
728
|
+
// #4950: `--output <dir>/` (or an existing directory) writes the
|
|
729
|
+
// additional files into that directory and no primary file, so a docker
|
|
730
|
+
// project of Dockerfiles alone renders them where they are committed
|
|
731
|
+
// (`chant build images -o images/`) with no compose file to throw away.
|
|
732
|
+
// A build whose primary output holds anything needs a file to put it in.
|
|
733
|
+
const outputDir = options.output !== undefined && (/[\\/]$/.test(options.output) || (existsSync(options.output) && statSync(options.output).isDirectory()))
|
|
734
|
+
? resolve(options.output)
|
|
735
|
+
: undefined;
|
|
736
|
+
if (outputDir !== undefined) {
|
|
737
|
+
if (output.trim() !== "") {
|
|
738
|
+
errors.push(formatError({
|
|
739
|
+
message: `--output ${options.output} names a directory, which takes a build's additional files (a docker project's Dockerfiles) but not its primary output; this build has one, so name a file for it`,
|
|
740
|
+
}));
|
|
741
|
+
}
|
|
742
|
+
else if (additionalFiles.size === 0) {
|
|
743
|
+
errors.push(formatError({ message: `--output ${options.output} names a directory, but this build has no files to write into it` }));
|
|
744
|
+
}
|
|
745
|
+
else {
|
|
746
|
+
try {
|
|
747
|
+
for (const [filename, entry] of additionalFiles)
|
|
748
|
+
writeOutput(join(outputDir, filename), entry.content);
|
|
749
|
+
}
|
|
750
|
+
catch (err) {
|
|
751
|
+
errors.push(formatError({ message: `Failed to write output file: ${err instanceof Error ? err.message : String(err)}` }));
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
else if (options.output) {
|
|
729
756
|
// Write to file — ensure parent directories exist for both the primary
|
|
730
757
|
// output path and any nested additional-file paths (e.g. ops/<name>/...).
|
|
731
758
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/approve.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACuE,KAAK,UAAU,EAC5F,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEuC,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAChG,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAiE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAO3H,OAAO,EAA4D,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAM9H,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"approve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/approve.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACuE,KAAK,UAAU,EAC5F,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEuC,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAChG,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAiE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAO3H,OAAO,EAA4D,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAM9H,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAwDlD,wBAAsB,UAAU,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoKrE;AAED,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,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AE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAGlI;AA0gBD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,oBAAoB,EAAE,EAC7B,QAAQ,EAAE,iBAAiB,GAAG,SAAS,EACvC,OAAO,GAAE,SAAS,iBAAiB,EAA+B,EAClE,KAAK,GAAE,eAAgC,GACtC,MAAM,EAAE,CAuCV"}
|
|
@@ -22,6 +22,7 @@ import { gateBindingProblem, gateStatement, readExternalSignature } from "../../
|
|
|
22
22
|
import { readFileSync } from "node:fs";
|
|
23
23
|
import { resolve as resolvePath } from "node:path";
|
|
24
24
|
import { formatError, formatWarning, formatSuccess, formatInfo } from "../format.js";
|
|
25
|
+
import { actorFromEnv } from "../../actor.js";
|
|
25
26
|
// ── chant approve <op> <gate> ───────────────────────────────────────────────
|
|
26
27
|
/**
|
|
27
28
|
* `chant approve <op> <gate> [--actor <name>] [--note <text>] [--url <url>]
|
|
@@ -480,7 +481,7 @@ async function approveGate(opName, gate, opts, statementOnly) {
|
|
|
480
481
|
// "unattested" reads as what it is; a name the model chose would read in
|
|
481
482
|
// the ledger exactly like a name a person gave.
|
|
482
483
|
? UNATTESTED_APPROVER
|
|
483
|
-
:
|
|
484
|
+
: actorFromEnv());
|
|
484
485
|
// #2508: who this is, as the gate's quorum and policy read it. A model on
|
|
485
486
|
// MCP or ACP is an agent whatever it claims, the same reasoning that gives
|
|
486
487
|
// it `UNATTESTED_APPROVER` for a name.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CommandContext } from "../registry.js";
|
|
2
|
-
export declare function runCiCheck(ctx: CommandContext): Promise<number>;
|
|
2
|
+
export declare function runCiCheck(ctx: CommandContext, env?: Record<string, string | undefined>): Promise<number>;
|
|
3
3
|
//# sourceMappingURL=ci-check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ci-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-check.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA8DlD,wBAAsB,UAAU,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAmD5H"}
|
|
@@ -24,8 +24,13 @@
|
|
|
24
24
|
* #4914: `--summary <file>` appends the report's markdown section
|
|
25
25
|
* (`checkReportSummary`) to the file, as a product's check report keeps it,
|
|
26
26
|
* and a job with `GITHUB_STEP_SUMMARY` set gets it in its summary too.
|
|
27
|
+
*
|
|
28
|
+
* #4966: `--base` defaults to the job's base (`ciBaseRef`,
|
|
29
|
+
* `@intentius/chant/ci-base`), `--branch` naming the default branch on a
|
|
30
|
+
* forge whose job does not carry it.
|
|
27
31
|
*/
|
|
28
32
|
import { resolve } from "node:path";
|
|
33
|
+
import { ciBaseRef } from "../../ci-base.js";
|
|
29
34
|
import { CHANT_EXIT } from "../../exit-codes.js";
|
|
30
35
|
import { formatError } from "../format.js";
|
|
31
36
|
/**
|
|
@@ -46,7 +51,7 @@ async function lexiconCheckSteps(ctx, cwd) {
|
|
|
46
51
|
}
|
|
47
52
|
return plugins.map((p) => p.checkSteps?.()).filter((a) => a !== undefined);
|
|
48
53
|
}
|
|
49
|
-
const USAGE = "chant ci check --base <rev> [<target>...] [--output <dir>] [--summary <file>] [--no-push] [--json]";
|
|
54
|
+
const USAGE = "chant ci check [--base <rev>] [--branch <default branch>] [<target>...] [--output <dir>] [--summary <file>] [--no-push] [--json]";
|
|
50
55
|
/**
|
|
51
56
|
* The check stage's signer (#4870), when the job has a runner identity: a
|
|
52
57
|
* runner key in `CHANT_RUNNER_KEY`, or its OIDC identity with
|
|
@@ -87,10 +92,15 @@ async function localEvidenceAt(base) {
|
|
|
87
92
|
return undefined;
|
|
88
93
|
}
|
|
89
94
|
}
|
|
90
|
-
export async function runCiCheck(ctx) {
|
|
95
|
+
export async function runCiCheck(ctx, env = process.env) {
|
|
91
96
|
const { args } = ctx;
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
// #4966: with no --base, the job's own (`ciBaseRef`): a pull request's target branch, else the default branch (--branch) for a push to another branch.
|
|
98
|
+
const base = args.base ?? ciBaseRef(env, args.branch ? { defaultBranch: args.branch } : {});
|
|
99
|
+
if (!base) {
|
|
100
|
+
console.error(formatError({
|
|
101
|
+
message: "chant ci check needs --base <rev>, the commit the change is measured from, and the job names no pull request target or default branch to take it from",
|
|
102
|
+
hint: `${USAGE}. The hooks are read at base, so a change cannot remove a required check.`,
|
|
103
|
+
}));
|
|
94
104
|
return 1;
|
|
95
105
|
}
|
|
96
106
|
const targets = (args.positionals ?? []).slice(1);
|
|
@@ -98,10 +108,10 @@ export async function runCiCheck(ctx) {
|
|
|
98
108
|
let report;
|
|
99
109
|
try {
|
|
100
110
|
const adapters = await lexiconCheckSteps(ctx, process.cwd());
|
|
101
|
-
const evidence = await checkEvidenceSigner(
|
|
111
|
+
const evidence = await checkEvidenceSigner(base, args.noPush === true);
|
|
102
112
|
// #4868: a job that signs local evidence runs every hook; any other may skip one on local evidence.
|
|
103
|
-
const local = evidence && "class" in evidence.signer ? undefined : await localEvidenceAt(
|
|
104
|
-
report = await runCheckStage({ base
|
|
113
|
+
const local = evidence && "class" in evidence.signer ? undefined : await localEvidenceAt(base);
|
|
114
|
+
report = await runCheckStage({ base, targets, adapters, ...(args.output ? { dir: args.output } : {}), ...(evidence ? { evidence } : {}), ...(local ? { localEvidence: local } : {}) });
|
|
105
115
|
}
|
|
106
116
|
catch (err) {
|
|
107
117
|
console.error(formatError({ message: err instanceof Error ? err.message : String(err), hint: USAGE }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-evidence.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-evidence.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ci-evidence.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-evidence.ts"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA+BlD,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAWxE"}
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
* `<dir>`, and `policy` when the policy evaluated inside that plan did not
|
|
15
15
|
* deny it (a `pr-plan.json`'s `policy`, a plan note hand-off's overrides).
|
|
16
16
|
* It writes `evidence.json` in `<dir>`, which `pr-post` reads to say in the
|
|
17
|
-
* note which checks were signed.
|
|
17
|
+
* note which checks were signed. With `--member <name>` (#4964), a
|
|
18
|
+
* workspace member's plan report or (#4978) a product plan target's, the
|
|
19
|
+
* two are `plan:<name>` and `policy:<name>`.
|
|
18
20
|
* - `sign --from-report <dir>` on a check job's report (#4935), a
|
|
19
21
|
* `check-hooks.json` from `chant ci check`, is the `check-evidence` job's
|
|
20
22
|
* form: it signs each hook that passed, by name, with the runs as its
|
|
@@ -50,14 +52,15 @@
|
|
|
50
52
|
import { execFileSync, spawnSync } from "node:child_process";
|
|
51
53
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
52
54
|
import { join } from "node:path";
|
|
55
|
+
import { EVIDENCE_MEMBER_NAME } from "../../ci-evidence-jobs.js";
|
|
53
56
|
import { CHANT_EXIT } from "../../exit-codes.js";
|
|
54
57
|
import { formatError } from "../format.js";
|
|
55
58
|
import { gitRoot } from "../../workspace/record-source.js";
|
|
56
59
|
import { resolveBase } from "../../workspace/trust/provenance.js";
|
|
57
60
|
import { CHECK_EVIDENCE_KEY_ENV, noRunnerIdentity, readCheckEvidence, recordChecks, RUNNER_IDENTITY_ENV, runnerEvidenceSigner, signChecks, } from "../../workspace/trust/check-evidence.js";
|
|
58
61
|
import { CHECK_EVIDENCE_FILE, LOCAL_EVIDENCE_KEY_ENV, planReportChecks } from "../../workspace/trust/check-evidence-report.js";
|
|
59
|
-
const USAGE = "chant ci evidence sign (--check-id <id>[,<id>...] | --from-report <dir> --result <result>) [--at <rev>] [--base <rev>] [--key <file>] [--claim <file>] [--no-push] [--json]\n" +
|
|
60
|
-
" chant ci evidence sign --open --job <job> --from-report <dir> -o <out> [--branch <branch>] [--base <rev>] [--key <file>] [--no-push] [--json]\n" +
|
|
62
|
+
const USAGE = "chant ci evidence sign (--check-id <id>[,<id>...] | --from-report <dir> [--member <name>] --result <result>) [--at <rev>] [--base <rev>] [--key <file>] [--claim <file>] [--no-push] [--json]\n" +
|
|
63
|
+
" chant ci evidence sign --open --job <job> --from-report <dir> [--member <name>] -o <out> [--branch <branch>] [--base <rev>] [--key <file>] [--no-push] [--json]\n" +
|
|
61
64
|
" chant ci evidence sign --from-job <job> --check-id <id>[,<id>...] [--claims <dir>] [--at <rev>] [--base <rev>] [--key <file>] [--no-push] [--json]\n" +
|
|
62
65
|
" chant ci evidence sign --local --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--key <file>] [--claim <file>] [--no-push] [--json]\n" +
|
|
63
66
|
" chant ci evidence verify [--local] --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--json]";
|
|
@@ -174,13 +177,16 @@ async function sign(ctx, repo, base, at) {
|
|
|
174
177
|
const fromReport = args.fromReport;
|
|
175
178
|
if (!fromReport && idsOf(args.checkId).length === 0)
|
|
176
179
|
return usage("sign needs --check-id <id>, or --from-report <dir> in a plan note job");
|
|
180
|
+
const member = memberOf(args.members, Boolean(fromReport));
|
|
181
|
+
if (typeof member === "object")
|
|
182
|
+
return usage(member.usage);
|
|
177
183
|
const pem = args.key ? readFileSync(args.key, "utf-8") : process.env[CHECK_EVIDENCE_KEY_ENV];
|
|
178
184
|
let wanted;
|
|
179
185
|
if (!fromReport) {
|
|
180
186
|
const claim = args.claim ? readFileSync(args.claim) : undefined;
|
|
181
187
|
wanted = idsOf(args.checkId).map((check) => ({ check, ...(claim ? { claim } : {}) }));
|
|
182
188
|
}
|
|
183
|
-
const done = await signChecksOf(repo, base, at, { ...(fromReport ? { fromReport } : {}), ...(wanted ? { wanted } : {}), ...(args.planResult ? { result: args.planResult } : {}), pem, push: !args.noPush });
|
|
189
|
+
const done = await signChecksOf(repo, base, at, { ...(fromReport ? { fromReport } : {}), ...(wanted ? { wanted } : {}), ...(args.planResult ? { result: args.planResult } : {}), ...(member ? { member } : {}), pem, push: !args.noPush });
|
|
184
190
|
if ("usage" in done)
|
|
185
191
|
return usage(done.usage);
|
|
186
192
|
if (fromReport)
|
|
@@ -189,6 +195,21 @@ async function sign(ctx, repo, base, at) {
|
|
|
189
195
|
console.log(JSON.stringify(done.note, null, 2));
|
|
190
196
|
return done.code;
|
|
191
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* `--member <name>` (#4964): the workspace member whose plan report this is,
|
|
200
|
+
* or (#4978) the product plan target whose plan job wrote it, so `plan` and
|
|
201
|
+
* `policy` are signed as `plan:<name>` and `policy:<name>`. One name, and
|
|
202
|
+
* only with a plan report.
|
|
203
|
+
*/
|
|
204
|
+
function memberOf(members, fromReport) {
|
|
205
|
+
if (!members || members.length === 0)
|
|
206
|
+
return undefined;
|
|
207
|
+
if (!fromReport)
|
|
208
|
+
return { usage: "--member names the member whose plan report --from-report signs; --check-id names its checks in full" };
|
|
209
|
+
if (members.length > 1 || !EVIDENCE_MEMBER_NAME.test(members[0]))
|
|
210
|
+
return { usage: `--member takes one member or target name, letters, digits, - and _, not ${members.join(",")}` };
|
|
211
|
+
return members[0];
|
|
212
|
+
}
|
|
192
213
|
/**
|
|
193
214
|
* Sign the checks of a report directory (`fromReport`) or the named ones
|
|
194
215
|
* (`wanted`) at `at`, against the runner identities at `base`. With
|
|
@@ -202,7 +223,9 @@ async function signChecksOf(repo, base, at, opts) {
|
|
|
202
223
|
const note = { signed: [], skipped: [] };
|
|
203
224
|
let wanted;
|
|
204
225
|
if (fromReport && isCheckReportDir(fromReport)) {
|
|
205
|
-
// #4935: a check job's report, each passed hook signed by name.
|
|
226
|
+
// #4935: a check job's report, each passed hook signed by name; #4964: a hook is the workspace's or the member's by its own name.
|
|
227
|
+
if (opts.member)
|
|
228
|
+
return { usage: `--member names a plan report's member, and ${fromReport} is a check job's report, whose hooks are signed by their own names` };
|
|
206
229
|
const decided = await checkReportChecks(fromReport, opts.result);
|
|
207
230
|
if ("error" in decided)
|
|
208
231
|
return { usage: decided.error };
|
|
@@ -210,7 +233,7 @@ async function signChecksOf(repo, base, at, opts) {
|
|
|
210
233
|
note.skipped.push(...decided.skipped);
|
|
211
234
|
}
|
|
212
235
|
else if (fromReport) {
|
|
213
|
-
const decided = planReportChecks(fromReport, opts.result);
|
|
236
|
+
const decided = planReportChecks(fromReport, opts.result, opts.member);
|
|
214
237
|
wanted = decided.sign;
|
|
215
238
|
note.skipped.push(...decided.skipped);
|
|
216
239
|
}
|
|
@@ -278,6 +301,9 @@ async function signOpen(ctx, repo, base) {
|
|
|
278
301
|
return usage("sign --open needs where to keep each merge request's evidence.json: -o .chant/evidence/<job>");
|
|
279
302
|
if (args.checkId || args.at || args.planResult)
|
|
280
303
|
return usage("sign --open finds each merge request's head and its job's result itself, so it takes no --check-id, --at or --result");
|
|
304
|
+
const member = memberOf(args.members, true);
|
|
305
|
+
if (typeof member === "object")
|
|
306
|
+
return usage(member.usage);
|
|
281
307
|
const branch = args.branch ?? process.env.CI_COMMIT_BRANCH;
|
|
282
308
|
if (!branch)
|
|
283
309
|
return usage("sign --open signs for the merge requests into a branch: run it in a branch pipeline, or pass --branch <branch>");
|
|
@@ -298,7 +324,7 @@ async function signOpen(ctx, repo, base) {
|
|
|
298
324
|
...(args.noForks ? { noForks: true } : {}),
|
|
299
325
|
fetchHead: (pr, head) => fetchMergeRequestHead(repo, pr, head),
|
|
300
326
|
sign: async (dir, head, result) => {
|
|
301
|
-
const r = await signChecksOf(repo, base, head, { fromReport: dir, result, ...(pem ? { pem } : {}), push: !args.noPush, skipCurrent: true });
|
|
327
|
+
const r = await signChecksOf(repo, base, head, { fromReport: dir, result, ...(member ? { member } : {}), ...(pem ? { pem } : {}), push: !args.noPush, skipCurrent: true });
|
|
302
328
|
if ("usage" in r)
|
|
303
329
|
throw new Error(r.usage);
|
|
304
330
|
if (r.code !== CHANT_EXIT.done)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;AAMnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAgHrF;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiH9E;AA6DD;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;6EAQ6E;AAC7E,wBAAgB,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAMzD;AAgHD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoT9E;AAED,kEAAkE;AAClE,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/E"}
|
|
@@ -47,6 +47,7 @@ import { normalizeObservation, mergeObservations, unobservedAll } from "../../ob
|
|
|
47
47
|
import { deployUnits } from "../../components/deploy-units.js";
|
|
48
48
|
import { sortedJsonReplacer } from "../../utils.js";
|
|
49
49
|
import { withoutReadFlags } from "../../lifecycle/legacy-digest.js";
|
|
50
|
+
import { actorFromEnv } from "../../actor.js";
|
|
50
51
|
/**
|
|
51
52
|
* chant components release <env> --component <name> --digest <sha256:...>
|
|
52
53
|
* [--git-sha <sha>] [--run-id <id>] [--actor <name>]
|
|
@@ -127,7 +128,8 @@ export async function runComponentsReleaseRecord(ctx) {
|
|
|
127
128
|
// Id + origin resolved together from the same environment (#2045), so the
|
|
128
129
|
// recorded runId always says which id space it lives in and how to reach it.
|
|
129
130
|
const { runId, runOrigin } = resolveRunId(args.runId);
|
|
130
|
-
|
|
131
|
+
// #4952: the fallback is actorFromEnv's; an empty answer is no actor, refused below.
|
|
132
|
+
const actor = args.actor ?? (actorFromEnv(process.env, "") || undefined);
|
|
131
133
|
// Who approved a gated change (#1035). Optional — omitted for an ungated
|
|
132
134
|
// change, and never defaulted to `actor`, since recording the approver as the
|
|
133
135
|
// triggerer would defeat the separation-of-duties the field exists to attest.
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import type { CommandContext } from "../registry.js";
|
|
2
2
|
export declare function runDevGeneratedCheck(ctx: CommandContext): Promise<number>;
|
|
3
|
+
/**
|
|
4
|
+
* `chant dev render <module> <export> [--output <root>]` (#4950): import the
|
|
5
|
+
* module, call its export (a `{ path: text }` object, or a function that
|
|
6
|
+
* returns one) and write each file at its path below the root, the working
|
|
7
|
+
* directory unless `--output` names one. Under `chant dev generated-check`
|
|
8
|
+
* a path inside the product goes to the render tree instead.
|
|
9
|
+
*/
|
|
10
|
+
export declare function runDevRender(ctx: CommandContext): Promise<number>;
|
|
3
11
|
//# sourceMappingURL=generated-check.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/generated-check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generated-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/generated-check.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAwB/E;AAID;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBvE"}
|