@intentius/chant 0.124.86 → 0.124.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-pins.d.ts +1 -0
- package/dist/action-pins.d.ts.map +1 -1
- package/dist/action-pins.js +2 -0
- package/dist/actor.d.ts +12 -0
- package/dist/actor.d.ts.map +1 -0
- package/dist/actor.js +18 -0
- package/dist/bundle-check.d.ts +20 -5
- package/dist/bundle-check.d.ts.map +1 -1
- package/dist/bundle-check.js +20 -5
- package/dist/chant-install.d.ts +98 -0
- package/dist/chant-install.d.ts.map +1 -1
- package/dist/chant-install.js +204 -2
- package/dist/ci-commit.d.ts.map +1 -1
- package/dist/ci-commit.js +1 -2
- package/dist/ci-control.d.ts +1 -1
- package/dist/ci-control.d.ts.map +1 -1
- package/dist/ci-control.js +1 -1
- package/dist/ci-evidence-claims.d.ts +59 -0
- package/dist/ci-evidence-claims.d.ts.map +1 -0
- package/dist/ci-evidence-claims.js +87 -0
- package/dist/ci-evidence-from-job.d.ts +103 -0
- package/dist/ci-evidence-from-job.d.ts.map +1 -0
- package/dist/ci-evidence-from-job.js +162 -0
- package/dist/ci-evidence-jobs.d.ts +69 -10
- package/dist/ci-evidence-jobs.d.ts.map +1 -1
- package/dist/ci-evidence-jobs.js +72 -8
- package/dist/ci-handover.d.ts +12 -0
- package/dist/ci-handover.d.ts.map +1 -1
- package/dist/ci-handover.js +15 -3
- package/dist/ci-identity.d.ts +32 -6
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +40 -8
- package/dist/ci-image.d.ts +47 -9
- package/dist/ci-image.d.ts.map +1 -1
- package/dist/ci-image.js +45 -18
- package/dist/ci-jobs.d.ts +1 -1
- package/dist/ci-jobs.d.ts.map +1 -1
- package/dist/ci-jobs.js +7 -2
- package/dist/ci-login.d.ts +75 -13
- package/dist/ci-login.d.ts.map +1 -1
- package/dist/ci-login.js +89 -37
- package/dist/ci-product-words.d.ts +20 -1
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.js +27 -1
- package/dist/ci-product.d.ts +20 -1
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +21 -2
- package/dist/cli/handlers/approve-confirm.d.ts +14 -0
- package/dist/cli/handlers/approve-confirm.d.ts.map +1 -1
- package/dist/cli/handlers/approve-confirm.js +46 -0
- package/dist/cli/handlers/build.d.ts +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +22 -1
- package/dist/cli/handlers/ci-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-check.js +38 -14
- package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
- package/dist/cli/handlers/ci-evidence.js +238 -26
- package/dist/cli/handlers/ci-forge-check.d.ts.map +1 -1
- package/dist/cli/handlers/ci-forge-check.js +34 -17
- package/dist/cli/handlers/generated-check.d.ts +3 -0
- package/dist/cli/handlers/generated-check.d.ts.map +1 -0
- package/dist/cli/handlers/generated-check.js +41 -0
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.js +3 -0
- package/dist/cli/handlers/local-chant.d.ts +13 -0
- package/dist/cli/handlers/local-chant.d.ts.map +1 -1
- package/dist/cli/handlers/local-chant.js +42 -1
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +42 -5
- package/dist/cli/handlers/run-wave.js +8 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +38 -4
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +66 -0
- package/dist/cli/registry.d.ts +24 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/check-hooks.d.ts +10 -0
- package/dist/components/check-hooks.d.ts.map +1 -1
- package/dist/components/check-hooks.js +21 -3
- package/dist/components/check-steps.js +1 -1
- package/dist/components/pr-checks.d.ts +105 -0
- package/dist/components/pr-checks.d.ts.map +1 -0
- package/dist/components/pr-checks.js +119 -0
- package/dist/components/pr-pipeline.d.ts +34 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +14 -1
- package/dist/components/product-pipeline.d.ts +16 -1
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +17 -2
- package/dist/components/product-plan.d.ts +262 -3
- package/dist/components/product-plan.d.ts.map +1 -1
- package/dist/components/product-plan.js +243 -11
- package/dist/config.d.ts +10 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -6
- package/dist/control/consumers.d.ts +6 -0
- package/dist/control/consumers.d.ts.map +1 -1
- package/dist/control/consumers.js +6 -0
- package/dist/dead-guards.d.ts.map +1 -1
- package/dist/dead-guards.js +9 -6
- package/dist/discovery/files.d.ts +1 -1
- package/dist/discovery/files.js +1 -1
- package/dist/drift-issue.d.ts +20 -3
- package/dist/drift-issue.d.ts.map +1 -1
- package/dist/drift-issue.js +16 -0
- package/dist/drift-record.d.ts +45 -5
- package/dist/drift-record.d.ts.map +1 -1
- package/dist/drift-record.js +27 -6
- package/dist/floor-table.d.ts +6 -6
- package/dist/floor-table.d.ts.map +1 -1
- package/dist/floor-table.data.d.ts.map +1 -1
- package/dist/floor-table.data.js +58 -20
- package/dist/floor-table.js +10 -7
- package/dist/forge-check/contract.d.ts +8 -0
- package/dist/forge-check/contract.d.ts.map +1 -1
- package/dist/forge-check/contract.js +4 -1
- package/dist/forge-check/index.d.ts +2 -0
- package/dist/forge-check/index.d.ts.map +1 -1
- package/dist/forge-check/index.js +2 -0
- package/dist/forge-flags.d.ts +10 -0
- package/dist/forge-flags.d.ts.map +1 -1
- package/dist/forge-flags.js +31 -0
- package/dist/forge-remote.d.ts +47 -0
- package/dist/forge-remote.d.ts.map +1 -0
- package/dist/forge-remote.js +69 -0
- package/dist/generated-check.d.ts +74 -0
- package/dist/generated-check.d.ts.map +1 -0
- package/dist/generated-check.js +216 -0
- package/dist/lexicon.d.ts +16 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.d.ts +15 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.js +49 -3
- package/dist/lifecycle/release-images.d.ts +22 -1
- package/dist/lifecycle/release-images.d.ts.map +1 -1
- package/dist/lifecycle/release-images.js +27 -3
- package/dist/lifecycle/release-ledger.d.ts +4 -3
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +3 -2
- package/dist/local-chant.d.ts +57 -3
- package/dist/local-chant.d.ts.map +1 -1
- package/dist/local-chant.js +122 -13
- package/dist/op/op-waves-evidence-jobs.d.ts +92 -0
- package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -0
- package/dist/op/op-waves-evidence-jobs.js +112 -0
- package/dist/op/op-waves-evidence.d.ts +17 -4
- package/dist/op/op-waves-evidence.d.ts.map +1 -1
- package/dist/op/op-waves-evidence.js +32 -10
- package/dist/op/op-waves-run.d.ts +12 -1
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +54 -3
- package/dist/op/op-waves.d.ts +8 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +10 -0
- package/dist/op/schedule-overdue.d.ts +39 -2
- package/dist/op/schedule-overdue.d.ts.map +1 -1
- package/dist/op/schedule-overdue.js +89 -7
- package/dist/pr-forge-reads.d.ts +21 -1
- package/dist/pr-forge-reads.d.ts.map +1 -1
- package/dist/pr-forge-reads.js +19 -1
- package/dist/pr-forge.d.ts +7 -1
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +7 -2
- package/dist/pr-plan-note.d.ts +24 -0
- package/dist/pr-plan-note.d.ts.map +1 -1
- package/dist/pr-plan-note.js +11 -1
- package/dist/pr-plan-record.d.ts +47 -0
- package/dist/pr-plan-record.d.ts.map +1 -0
- package/dist/pr-plan-record.js +89 -0
- package/dist/pr-post.d.ts +40 -0
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +79 -6
- package/dist/pr-requires.d.ts +8 -0
- package/dist/pr-requires.d.ts.map +1 -1
- package/dist/pr-requires.js +3 -1
- package/dist/ref-gate-init.d.ts +76 -0
- package/dist/ref-gate-init.d.ts.map +1 -0
- package/dist/ref-gate-init.js +144 -0
- package/dist/ref-gate-rules.d.ts +19 -0
- package/dist/ref-gate-rules.d.ts.map +1 -0
- package/dist/ref-gate-rules.js +17 -0
- package/dist/release-floors.d.ts +51 -1
- package/dist/release-floors.d.ts.map +1 -1
- package/dist/release-floors.js +66 -16
- package/dist/state-migration.d.ts +23 -0
- package/dist/state-migration.d.ts.map +1 -1
- package/dist/state-migration.js +39 -3
- package/dist/state-unlock.d.ts +32 -1
- package/dist/state-unlock.d.ts.map +1 -1
- package/dist/state-unlock.js +31 -0
- package/dist/wave-runtime.mjs +310 -303
- package/dist/workspace/ci-green-cli.d.ts.map +1 -1
- package/dist/workspace/ci-green-cli.js +13 -7
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +4 -3
- package/dist/workspace/drift-cli.d.ts +1 -1
- package/dist/workspace/drift-cli.d.ts.map +1 -1
- package/dist/workspace/drift-cli.js +5 -12
- package/dist/workspace/forge-work.d.ts +3 -2
- package/dist/workspace/forge-work.d.ts.map +1 -1
- package/dist/workspace/forge-work.js +7 -17
- package/dist/workspace/lexicon-outputs.js +2 -2
- package/dist/workspace/release-workflow.d.ts +26 -3
- package/dist/workspace/release-workflow.d.ts.map +1 -1
- package/dist/workspace/release-workflow.js +48 -6
- package/dist/workspace/trust/check-evidence-report.d.ts +25 -0
- package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence-report.js +20 -0
- package/dist/workspace/trust/check-evidence.d.ts +59 -13
- package/dist/workspace/trust/check-evidence.d.ts.map +1 -1
- package/dist/workspace/trust/check-evidence.js +101 -24
- package/dist/workspace/trust/ci-tag-statement.d.ts +2 -2
- package/dist/workspace/trust/ci-tag-statement.d.ts.map +1 -1
- package/dist/workspace/trust/dsse.d.ts +40 -2
- package/dist/workspace/trust/dsse.d.ts.map +1 -1
- package/dist/workspace/trust/dsse.js +34 -2
- package/dist/workspace/trust/evidence.d.ts +7 -2
- package/dist/workspace/trust/evidence.d.ts.map +1 -1
- package/dist/workspace/trust/evidence.js +5 -0
- package/dist/workspace/trust/keyless-fixture.d.ts +41 -0
- package/dist/workspace/trust/keyless-fixture.d.ts.map +1 -0
- package/dist/workspace/trust/keyless-fixture.js +161 -0
- package/dist/workspace/trust/keyless.d.ts +202 -0
- package/dist/workspace/trust/keyless.d.ts.map +1 -0
- package/dist/workspace/trust/keyless.js +488 -0
- package/dist/workspace/trust/local-evidence.d.ts +3 -0
- package/dist/workspace/trust/local-evidence.d.ts.map +1 -1
- package/dist/workspace/trust/op-run-statement.d.ts +2 -2
- package/dist/workspace/trust/op-run-statement.d.ts.map +1 -1
- package/dist/workspace/trust/open-evidence.d.ts +67 -0
- package/dist/workspace/trust/open-evidence.d.ts.map +1 -0
- package/dist/workspace/trust/open-evidence.js +92 -0
- package/dist/workspace/trust/policy.d.ts +56 -1
- package/dist/workspace/trust/policy.d.ts.map +1 -1
- package/dist/workspace/trust/policy.js +103 -2
- package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate-cli.js +65 -3
- package/dist/workspace/trust/ref-gate.d.ts +62 -3
- package/dist/workspace/trust/ref-gate.d.ts.map +1 -1
- package/dist/workspace/trust/ref-gate.js +75 -8
- package/dist/workspace/trust/run-statement.d.ts +3 -3
- package/dist/workspace/trust/run-statement.d.ts.map +1 -1
- package/dist/workspace/trust/runner-identity.d.ts +56 -0
- package/dist/workspace/trust/runner-identity.d.ts.map +1 -0
- package/dist/workspace/trust/runner-identity.js +65 -0
- package/dist/workspace/trust/trust-files.d.ts.map +1 -1
- package/dist/workspace/trust/trust-files.js +8 -1
- package/package.json +1 -1
- package/src/action-pins.ts +2 -0
- package/src/actor.test.ts +12 -0
- package/src/actor.ts +19 -0
- package/src/bundle-check.test.ts +22 -0
- package/src/bundle-check.ts +33 -5
- package/src/chant-install.test.ts +109 -1
- package/src/chant-install.ts +243 -2
- package/src/ci-commit.test.ts +51 -5
- package/src/ci-commit.ts +1 -2
- package/src/ci-control.ts +1 -0
- package/src/ci-evidence-claims.ts +102 -0
- package/src/ci-evidence-from-job.test.ts +147 -0
- package/src/ci-evidence-from-job.ts +195 -0
- package/src/ci-evidence-jobs.ts +85 -10
- package/src/ci-handover.ts +16 -3
- package/src/ci-identity.test.ts +3 -3
- package/src/ci-identity.ts +51 -11
- package/src/ci-image.test.ts +60 -10
- package/src/ci-image.ts +78 -19
- package/src/ci-jobs.ts +7 -2
- package/src/ci-login.test.ts +131 -3
- package/src/ci-login.token-drop.test.ts +204 -0
- package/src/ci-login.ts +137 -39
- package/src/ci-product-words.ts +30 -0
- package/src/ci-product.ts +26 -1
- package/src/cli/commands/__fixtures__/source-dir-root/migrations/0001-init/backfill.ts +3 -0
- package/src/cli/handlers/approve-confirm.test.ts +35 -0
- package/src/cli/handlers/approve-confirm.ts +44 -0
- package/src/cli/handlers/build-source-dir.test.ts +4 -0
- package/src/cli/handlers/build.ts +20 -2
- package/src/cli/handlers/ci-check.ts +35 -13
- package/src/cli/handlers/ci-evidence-open.test.ts +164 -0
- package/src/cli/handlers/ci-evidence.ts +223 -24
- package/src/cli/handlers/ci-forge-check.ts +22 -9
- package/src/cli/handlers/generated-check.ts +39 -0
- package/src/cli/handlers/lifecycle.test.ts +20 -0
- package/src/cli/handlers/lifecycle.ts +4 -0
- package/src/cli/handlers/local-chant.ts +39 -1
- package/src/cli/handlers/pr.ts +43 -5
- package/src/cli/handlers/run-wave.ts +7 -0
- package/src/cli/main.ts +38 -4
- package/src/cli/parse-args.ts +46 -0
- package/src/cli/registry.ts +24 -0
- package/src/components/check-hooks.ts +25 -3
- package/src/components/check-report-summary.test.ts +78 -0
- package/src/components/check-steps.ts +1 -1
- package/src/components/pr-checks.ts +159 -0
- package/src/components/pr-pipeline.ts +41 -1
- package/src/components/product-pipeline.ts +25 -3
- package/src/components/product-plan.test.ts +102 -1
- package/src/components/product-plan.ts +419 -14
- package/src/config.ts +13 -8
- package/src/control/consumers.ts +7 -0
- package/src/dead-guards.test.ts +27 -5
- package/src/dead-guards.ts +9 -6
- package/src/discovery/files.ts +1 -1
- package/src/drift-issue.test.ts +29 -1
- package/src/drift-issue.ts +28 -3
- package/src/drift-record.test.ts +25 -0
- package/src/drift-record.ts +55 -6
- package/src/floor-table.data.ts +58 -20
- package/src/floor-table.ts +12 -9
- package/src/forge-check/contract.ts +11 -1
- package/src/forge-check/forge-check.test.ts +8 -0
- package/src/forge-check/index.ts +2 -0
- package/src/forge-flags.test.ts +25 -1
- package/src/forge-flags.ts +34 -0
- package/src/forge-remote.test.ts +37 -0
- package/src/forge-remote.ts +79 -0
- package/src/generated-check.e2e.test.ts +98 -0
- package/src/generated-check.test.ts +104 -0
- package/src/generated-check.ts +269 -0
- package/src/lexicon.ts +17 -0
- package/src/lifecycle/publish-npm.ts +56 -3
- package/src/lifecycle/release-catalog.test.ts +2 -2
- package/src/lifecycle/release-images-dockerfile.test.ts +20 -0
- package/src/lifecycle/release-images.test.ts +44 -0
- package/src/lifecycle/release-images.ts +39 -3
- package/src/lifecycle/release-ledger.ts +4 -3
- package/src/local-chant.e2e.test.ts +81 -6
- package/src/local-chant.test.ts +22 -3
- package/src/local-chant.ts +130 -13
- package/src/op/op-waves-evidence-jobs.ts +134 -0
- package/src/op/op-waves-evidence.test.ts +37 -4
- package/src/op/op-waves-evidence.ts +32 -11
- package/src/op/op-waves-run.ts +57 -2
- package/src/op/op-waves.ts +11 -0
- package/src/op/schedule-overdue.test.ts +83 -1
- package/src/op/schedule-overdue.ts +107 -9
- package/src/pr-forge-reads-compare.test.ts +2 -1
- package/src/pr-forge-reads.ts +37 -1
- package/src/pr-forge.ts +14 -3
- package/src/pr-plan-note.ts +32 -3
- package/src/pr-plan-record.test.ts +75 -0
- package/src/pr-plan-record.ts +101 -0
- package/src/pr-post-plan-note.test.ts +60 -0
- package/src/pr-post.test.ts +30 -0
- package/src/pr-post.ts +110 -6
- package/src/pr-requires.test.ts +20 -0
- package/src/pr-requires.ts +10 -1
- package/src/ref-gate-init.ts +189 -0
- package/src/ref-gate-rules.ts +26 -0
- package/src/release-floors.ts +88 -16
- package/src/state-migration-record.test.ts +90 -0
- package/src/state-migration.test.ts +1 -1
- package/src/state-migration.ts +52 -3
- package/src/state-unlock.test.ts +33 -1
- package/src/state-unlock.ts +49 -1
- package/src/workspace/ci-green-cli.ts +12 -6
- package/src/workspace/ci-green.ts +4 -3
- package/src/workspace/drift-cli.ts +6 -18
- package/src/workspace/forge-work.ts +7 -14
- package/src/workspace/lexicon-outputs.ts +2 -2
- package/src/workspace/release-workflow.test.ts +70 -0
- package/src/workspace/release-workflow.ts +56 -8
- package/src/workspace/trust/check-evidence-report.ts +33 -0
- package/src/workspace/trust/check-evidence.test.ts +3 -3
- package/src/workspace/trust/check-evidence.ts +110 -28
- package/src/workspace/trust/ci-tag-statement.ts +2 -2
- package/src/workspace/trust/dsse.ts +48 -4
- package/src/workspace/trust/evidence.ts +7 -2
- package/src/workspace/trust/keyless-fixture.ts +214 -0
- package/src/workspace/trust/keyless.test.ts +220 -0
- package/src/workspace/trust/keyless.ts +557 -0
- package/src/workspace/trust/local-evidence.ts +3 -1
- package/src/workspace/trust/op-run-statement.ts +2 -2
- package/src/workspace/trust/open-evidence.ts +129 -0
- package/src/workspace/trust/policy.ts +129 -2
- package/src/workspace/trust/ref-gate-cli.ts +59 -3
- package/src/workspace/trust/ref-gate-pieces.test.ts +175 -0
- package/src/workspace/trust/ref-gate.e2e.test.ts +17 -0
- package/src/workspace/trust/ref-gate.ts +90 -8
- package/src/workspace/trust/run-statement.ts +3 -3
- package/src/workspace/trust/runner-identity.ts +92 -0
- package/src/workspace/trust/trust-files.test.ts +6 -0
- package/src/workspace/trust/trust-files.ts +14 -1
|
@@ -20,5 +20,7 @@ export { assertReadOnly, readOnly, ReadOnlyError, READ_ACTIONS } from "./read-on
|
|
|
20
20
|
export { read, readRepository, githubRows, gitlabRows, forgejoRows, statusReportedRows } from "./forge.js";
|
|
21
21
|
export { awsCredentials, awsRows, awsTrustPolicy, trustJobs, trustJob, issuerKey, compareTrust, rolesOf, gcpCondition, celTerms, celNarrowerOrEqual, gcpRows, federatedCredential, azureRows, AZURE_GRAPH_TOKEN_ENV, type TrustJob, type LiveValue, type FederatedCredential, } from "./trust.js";
|
|
22
22
|
export { pulumiRows, policyGrants, PULUMI_TOKEN_ENV } from "./pulumi.js";
|
|
23
|
+
/** `refGateStatus` in `pipelineContract` (#4913). */
|
|
24
|
+
export { REF_GATE_PIECES_FLOOR } from "../release-floors.js";
|
|
23
25
|
export { forgeCheck, forgeCheckExit, describeForgeCheck, countRows, forgeCheckCommand, forgeCheckSchema, forgeCheckTarget, uncheckedClouds, ForgeCheckTargetError, type ForgeCheckInput } from "./check.js";
|
|
24
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/forge-check/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACxG,OAAO,EACL,cAAc,EACd,OAAO,EACP,cAAc,EACd,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,mBAAmB,EACnB,SAAS,EACT,qBAAqB,EACrB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,mBAAmB,GACzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/forge-check/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACxG,OAAO,EACL,cAAc,EACd,OAAO,EACP,cAAc,EACd,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,mBAAmB,EACnB,SAAS,EACT,qBAAqB,EACrB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,mBAAmB,GACzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACtE,qDAAqD;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -20,4 +20,6 @@ export { assertReadOnly, readOnly, ReadOnlyError, READ_ACTIONS } from "./read-on
|
|
|
20
20
|
export { read, readRepository, githubRows, gitlabRows, forgejoRows, statusReportedRows } from "./forge.js";
|
|
21
21
|
export { awsCredentials, awsRows, awsTrustPolicy, trustJobs, trustJob, issuerKey, compareTrust, rolesOf, gcpCondition, celTerms, celNarrowerOrEqual, gcpRows, federatedCredential, azureRows, AZURE_GRAPH_TOKEN_ENV, } from "./trust.js";
|
|
22
22
|
export { pulumiRows, policyGrants, PULUMI_TOKEN_ENV } from "./pulumi.js";
|
|
23
|
+
/** `refGateStatus` in `pipelineContract` (#4913). */
|
|
24
|
+
export { REF_GATE_PIECES_FLOOR } from "../release-floors.js";
|
|
23
25
|
export { forgeCheck, forgeCheckExit, describeForgeCheck, countRows, forgeCheckCommand, forgeCheckSchema, forgeCheckTarget, uncheckedClouds, ForgeCheckTargetError } from "./check.js";
|
package/dist/forge-flags.d.ts
CHANGED
|
@@ -78,6 +78,16 @@ export declare function forgeTargetOptionsFromFlags(flags: ForgeFlags): ForgeTar
|
|
|
78
78
|
* the pieces, and {@link forgeFlagHints} names the flags that supply them.
|
|
79
79
|
*/
|
|
80
80
|
export declare function forgeTargetFromFlags(flags: ForgeFlags, env?: Record<string, string | undefined>, opts?: Pick<ForgeTargetOptions, "requirePr" | "readFile"> & Pick<ForgeOverrides, "tokenOptional">): ForgeTarget;
|
|
81
|
+
/**
|
|
82
|
+
* {@link forgeTargetFromFlags}, or undefined where it would throw
|
|
83
|
+
* {@link ForgeEnvironmentError} (#4888): the environment names no forge, or
|
|
84
|
+
* lacks the repository or the token. For a product step that does its
|
|
85
|
+
* forge work only when the job can, as terragucci's own `targetFromEnv`
|
|
86
|
+
* did: give the token the product holds as `token`, the one variable to
|
|
87
|
+
* read as `tokenEnv`, and `tokenOptional` for a read a public repository
|
|
88
|
+
* answers with none.
|
|
89
|
+
*/
|
|
90
|
+
export declare function jobForgeTarget(flags: ForgeFlags, env?: Record<string, string | undefined>, opts?: Pick<ForgeTargetOptions, "requirePr" | "readFile"> & Pick<ForgeOverrides, "tokenOptional">): ForgeTarget | undefined;
|
|
81
91
|
/**
|
|
82
92
|
* The flags that would supply what a {@link ForgeEnvironmentError} says is
|
|
83
93
|
* missing, for a product's message: `outside CI pass --repo, --pr and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forge-flags.d.ts","sourceRoot":"","sources":["../src/forge-flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAA+C,qBAAqB,EAAsB,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE/K,+DAA+D;AAC/D,MAAM,WAAW,cAAc;IAC7B,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6FAA6F;IAC7F,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4HAA4H;IAC5H,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4GAA4G;IAC5G,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;
|
|
1
|
+
{"version":3,"file":"forge-flags.d.ts","sourceRoot":"","sources":["../src/forge-flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAA+C,qBAAqB,EAAsB,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE/K,+DAA+D;AAC/D,MAAM,WAAW,cAAc;IAC7B,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6FAA6F;IAC7F,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4HAA4H;IAC5H,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4GAA4G;IAC5G,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAqBD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAK9D;AAKD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EAAE,IAAI,GAAE,kBAAkB,GAAG,cAAmB,GAAG,WAAW,CAkDlJ;AAED,mGAAmG;AACnG,MAAM,WAAW,UAAU;IACzB,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qGAAqG;IACrG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,yEAAyE;AACzE,qBAAa,cAAe,SAAQ,KAAK;IAErC,QAAQ,CAAC,IAAI,EAAE,MAAM;IADvB,YACW,IAAI,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EAIhB;CACF;AAID;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,UAAU,GAAG,kBAAkB,GAAG,cAAc,CAuBlG;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,UAAU,EACjB,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EACrD,IAAI,GAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG,IAAI,CAAC,cAAc,EAAE,eAAe,CAAM,GACpG,WAAW,CAOb;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,UAAU,EACjB,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EACrD,IAAI,GAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG,IAAI,CAAC,cAAc,EAAE,eAAe,CAAM,GACpG,WAAW,GAAG,SAAS,CAOzB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,qBAAqB,EAAE,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,EAAE,CAO5H"}
|
package/dist/forge-flags.js
CHANGED
|
@@ -17,6 +17,15 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { detectForge, FORGE_KINDS, FORGE_TOKEN_ORDER, ForgeEnvironmentError, forgeTargetFromEnv } from "./pr-forge.js";
|
|
19
19
|
const trimUrl = (u) => u?.trim().replace(/\/+$/, "") || undefined;
|
|
20
|
+
/** `scheme://host[:port]` of a URL, the path dropped. */
|
|
21
|
+
const originOf = (url) => {
|
|
22
|
+
try {
|
|
23
|
+
return new URL(url).origin;
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return url;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
20
29
|
const hostOf = (url) => {
|
|
21
30
|
try {
|
|
22
31
|
return new URL(url).host.toLowerCase();
|
|
@@ -98,6 +107,9 @@ export function forgeTargetWith(env = process.env, opts = {}) {
|
|
|
98
107
|
Object.assign(out, { token: "", tokenSource: "" });
|
|
99
108
|
if (kind !== "gitlab" && apiUrl && !url)
|
|
100
109
|
out.host = hostOf(apiUrl).replace(/^api\.github\.com$/, "github.com");
|
|
110
|
+
// #4888: the web origin, for a product's links and messages: `url`, else the job's server when it is the target's host, else https on the host.
|
|
111
|
+
const server = url ?? trimUrl(kind === "gitlab" ? e.CI_SERVER_URL : ((fj ? e.FORGEJO_SERVER_URL : undefined) ?? e.GITHUB_SERVER_URL));
|
|
112
|
+
out.origin = server && /^https?:\/\//i.test(server) && hostOf(server) === out.host ? originOf(server) : `https://${out.host}`;
|
|
101
113
|
if (kind !== "gitlab" && (repo || url)) {
|
|
102
114
|
const server = trimUrl(job("SERVER_URL"));
|
|
103
115
|
const jobRepo = job("REPOSITORY");
|
|
@@ -169,6 +181,25 @@ export function forgeTargetFromFlags(flags, env = process.env, opts = {}) {
|
|
|
169
181
|
const t = forgeTargetWith({ ...env, [GIVEN_TOKEN]: token }, { ...opts, ...fromFlags, tokenEnv: GIVEN_TOKEN });
|
|
170
182
|
return { ...t, tokenSource: "the token given" };
|
|
171
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* {@link forgeTargetFromFlags}, or undefined where it would throw
|
|
186
|
+
* {@link ForgeEnvironmentError} (#4888): the environment names no forge, or
|
|
187
|
+
* lacks the repository or the token. For a product step that does its
|
|
188
|
+
* forge work only when the job can, as terragucci's own `targetFromEnv`
|
|
189
|
+
* did: give the token the product holds as `token`, the one variable to
|
|
190
|
+
* read as `tokenEnv`, and `tokenOptional` for a read a public repository
|
|
191
|
+
* answers with none.
|
|
192
|
+
*/
|
|
193
|
+
export function jobForgeTarget(flags, env = process.env, opts = {}) {
|
|
194
|
+
try {
|
|
195
|
+
return forgeTargetFromFlags(flags, env, opts);
|
|
196
|
+
}
|
|
197
|
+
catch (err) {
|
|
198
|
+
if (err instanceof ForgeEnvironmentError)
|
|
199
|
+
return undefined;
|
|
200
|
+
throw err;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
172
203
|
/**
|
|
173
204
|
* The flags that would supply what a {@link ForgeEnvironmentError} says is
|
|
174
205
|
* missing, for a product's message: `outside CI pass --repo, --pr and
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The forge a checkout's origin remote names (#4920): its kind, host, web
|
|
3
|
+
* origin and repository, for a command run on a laptop with no CI variables
|
|
4
|
+
* and no repository setting, such as plywood's `cancel`.
|
|
5
|
+
*
|
|
6
|
+
* It is the reading chant's own laptop paths make when the environment
|
|
7
|
+
* names no forge (`forgeWorkReader` in ./workspace/forge-work.ts): the
|
|
8
|
+
* host from the remote's URL, the kind from the host's name, and the
|
|
9
|
+
* repository path. Kept out of `pr-forge.ts`, which is in the pr-forge and
|
|
10
|
+
* pr-loop bundles.
|
|
11
|
+
*/
|
|
12
|
+
import type { ForgeKind } from "./pr-forge.js";
|
|
13
|
+
import { remoteRepoPath } from "./op/activities/forge-pull-request.js";
|
|
14
|
+
import { remoteHost } from "./op/activities/gh-host.js";
|
|
15
|
+
export { remoteRepoPath, remoteHost };
|
|
16
|
+
/** The forge kind a remote host is: github.com and hosts named for GitHub, GitLab, or Forgejo and Gitea (codeberg.org too). Null for any other. */
|
|
17
|
+
export declare function forgeKindOfHost(host: string): ForgeKind | null;
|
|
18
|
+
/** The forge a git remote names. */
|
|
19
|
+
export interface RemoteForge {
|
|
20
|
+
kind: ForgeKind;
|
|
21
|
+
/** Lower-cased, with an http(s) remote's port. */
|
|
22
|
+
host: string;
|
|
23
|
+
/** The web origin, `https://host` (an http remote keeps its scheme and port), as `--url` takes it. */
|
|
24
|
+
url: string;
|
|
25
|
+
/** `owner/name`, or a GitLab group path and name. */
|
|
26
|
+
repo: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The forge a remote URL names (`https://host/o/r.git`, `ssh://git@host/o/r`,
|
|
30
|
+
* `git@host:o/r`), or undefined when it names no repository path or its host
|
|
31
|
+
* is none {@link forgeKindOfHost} knows. `kind` stands in for the host's
|
|
32
|
+
* guess, for a self-hosted forge whose name says nothing.
|
|
33
|
+
*/
|
|
34
|
+
export declare function forgeOfRemote(remoteUrl: string | undefined, opts?: {
|
|
35
|
+
kind?: ForgeKind;
|
|
36
|
+
}): RemoteForge | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The forge the checkout at `cwd` names by its `origin` remote (or
|
|
39
|
+
* `remote`), as {@link forgeOfRemote} reads it. Undefined outside a
|
|
40
|
+
* checkout, with no such remote, or for a host no forge kind is known for.
|
|
41
|
+
*/
|
|
42
|
+
export declare function forgeOfCheckout(cwd: string, opts?: {
|
|
43
|
+
remote?: string;
|
|
44
|
+
kind?: ForgeKind;
|
|
45
|
+
remoteUrl?: (cwd: string, remote: string) => string | undefined;
|
|
46
|
+
}): RemoteForge | undefined;
|
|
47
|
+
//# sourceMappingURL=forge-remote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forge-remote.d.ts","sourceRoot":"","sources":["../src/forge-remote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC;AAEtC,mJAAmJ;AACnJ,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAM9D;AAED,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,sGAAsG;IACtG,GAAG,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,SAAS,CAAA;CAAO,GAAG,WAAW,GAAG,SAAS,CAcrH;AAWD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;CAAO,GAAG,WAAW,GAAG,SAAS,CAGvL"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The forge a checkout's origin remote names (#4920): its kind, host, web
|
|
3
|
+
* origin and repository, for a command run on a laptop with no CI variables
|
|
4
|
+
* and no repository setting, such as plywood's `cancel`.
|
|
5
|
+
*
|
|
6
|
+
* It is the reading chant's own laptop paths make when the environment
|
|
7
|
+
* names no forge (`forgeWorkReader` in ./workspace/forge-work.ts): the
|
|
8
|
+
* host from the remote's URL, the kind from the host's name, and the
|
|
9
|
+
* repository path. Kept out of `pr-forge.ts`, which is in the pr-forge and
|
|
10
|
+
* pr-loop bundles.
|
|
11
|
+
*/
|
|
12
|
+
import { execFileSync } from "node:child_process";
|
|
13
|
+
import { remoteRepoPath } from "./op/activities/forge-pull-request.js";
|
|
14
|
+
import { remoteHost } from "./op/activities/gh-host.js";
|
|
15
|
+
export { remoteRepoPath, remoteHost };
|
|
16
|
+
/** The forge kind a remote host is: github.com and hosts named for GitHub, GitLab, or Forgejo and Gitea (codeberg.org too). Null for any other. */
|
|
17
|
+
export function forgeKindOfHost(host) {
|
|
18
|
+
const h = host.toLowerCase().replace(/:\d+$/, "");
|
|
19
|
+
if (h === "github.com" || /(^|[.-])github([.-]|$)/.test(h))
|
|
20
|
+
return "github";
|
|
21
|
+
if (h === "gitlab.com" || /(^|[.-])gitlab([.-]|$)/.test(h))
|
|
22
|
+
return "gitlab";
|
|
23
|
+
if (h === "codeberg.org" || /(^|[.-])(forgejo|gitea)([.-]|$)/.test(h))
|
|
24
|
+
return "forgejo";
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The forge a remote URL names (`https://host/o/r.git`, `ssh://git@host/o/r`,
|
|
29
|
+
* `git@host:o/r`), or undefined when it names no repository path or its host
|
|
30
|
+
* is none {@link forgeKindOfHost} knows. `kind` stands in for the host's
|
|
31
|
+
* guess, for a self-hosted forge whose name says nothing.
|
|
32
|
+
*/
|
|
33
|
+
export function forgeOfRemote(remoteUrl, opts = {}) {
|
|
34
|
+
const host = remoteHost(remoteUrl);
|
|
35
|
+
const repo = remoteRepoPath(remoteUrl);
|
|
36
|
+
if (!host || !repo)
|
|
37
|
+
return undefined;
|
|
38
|
+
const kind = opts.kind ?? forgeKindOfHost(host);
|
|
39
|
+
if (!kind)
|
|
40
|
+
return undefined;
|
|
41
|
+
let url = `https://${host.replace(/:\d+$/, "")}`;
|
|
42
|
+
try {
|
|
43
|
+
const u = new URL(remoteUrl.trim());
|
|
44
|
+
if (u.protocol === "http:" || u.protocol === "https:")
|
|
45
|
+
url = `${u.protocol}//${u.host.toLowerCase()}`;
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
// An scp-style remote is ssh, whose port is not the web's.
|
|
49
|
+
}
|
|
50
|
+
return { kind, host, url, repo };
|
|
51
|
+
}
|
|
52
|
+
/** `git remote get-url <remote>` in `cwd`, or undefined when there is none. */
|
|
53
|
+
function gitRemoteUrl(cwd, remote) {
|
|
54
|
+
try {
|
|
55
|
+
return execFileSync("git", ["remote", "get-url", remote], { cwd, encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim() || undefined;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The forge the checkout at `cwd` names by its `origin` remote (or
|
|
63
|
+
* `remote`), as {@link forgeOfRemote} reads it. Undefined outside a
|
|
64
|
+
* checkout, with no such remote, or for a host no forge kind is known for.
|
|
65
|
+
*/
|
|
66
|
+
export function forgeOfCheckout(cwd, opts = {}) {
|
|
67
|
+
const url = (opts.remoteUrl ?? gitRemoteUrl)(cwd, opts.remote ?? "origin");
|
|
68
|
+
return forgeOfRemote(url, opts.kind ? { kind: opts.kind } : {});
|
|
69
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/** The render tree of the running check, for chant's own writers and a product's scripts. */
|
|
2
|
+
export declare const GENERATED_OUT_ENV = "CHANT_GENERATED_OUT";
|
|
3
|
+
/** The product root the check renders for: the committed paths are relative to it. */
|
|
4
|
+
export declare const GENERATED_ROOT_ENV = "CHANT_GENERATED_ROOT";
|
|
5
|
+
/** One render: a command that writes some of the product's generated files. */
|
|
6
|
+
export interface GeneratedRender {
|
|
7
|
+
/** A short name, in the output: `ci`, `images`. */
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* A shell command run in the product root. `{out}` is the render tree,
|
|
11
|
+
* quoted for the shell; the command writes each file at its committed path
|
|
12
|
+
* below it (`npx chant build ci -o {out}/.github/workflows/ci.yml`).
|
|
13
|
+
*/
|
|
14
|
+
run: string;
|
|
15
|
+
/**
|
|
16
|
+
* The committed files it renders, relative to the product root. A `*` in a
|
|
17
|
+
* path's last segment matches within it (`images/Dockerfile.*`), and then
|
|
18
|
+
* every match on either side must have its twin. A render with no files
|
|
19
|
+
* passes when its command exits 0 (a script with a check of its own).
|
|
20
|
+
*/
|
|
21
|
+
files?: string[];
|
|
22
|
+
}
|
|
23
|
+
/** `chantGenerated` in a product's root package.json (#4909). */
|
|
24
|
+
export interface GeneratedCheckConfig {
|
|
25
|
+
/** The command that writes the committed files, named in a failure: `just ci`. */
|
|
26
|
+
regenerate?: string;
|
|
27
|
+
renders: GeneratedRender[];
|
|
28
|
+
}
|
|
29
|
+
export interface GeneratedRenderResult {
|
|
30
|
+
name: string;
|
|
31
|
+
/** The command as run, `{out}` filled in. */
|
|
32
|
+
command: string;
|
|
33
|
+
exitCode: number;
|
|
34
|
+
/** Its stdout and stderr, together. */
|
|
35
|
+
output: string;
|
|
36
|
+
/** The committed files compared, relative to the product root. */
|
|
37
|
+
files: string[];
|
|
38
|
+
}
|
|
39
|
+
export interface GeneratedCheckResult {
|
|
40
|
+
ok: boolean;
|
|
41
|
+
/** The render tree, left in place. */
|
|
42
|
+
out: string;
|
|
43
|
+
problems: string[];
|
|
44
|
+
renders: GeneratedRenderResult[];
|
|
45
|
+
/** Each committed file that matched its render. */
|
|
46
|
+
matched: string[];
|
|
47
|
+
}
|
|
48
|
+
/** The `chantGenerated` field of the package.json in `productDir`, or undefined. Throws on a malformed one. */
|
|
49
|
+
export declare function readGeneratedCheckConfig(productDir: string): GeneratedCheckConfig | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Where a chant writer puts `path` (absolute): under a check, a path inside
|
|
52
|
+
* the product root moves to the same place in the render tree, so a check
|
|
53
|
+
* never writes the product's files. Outside a check, `path` itself.
|
|
54
|
+
*/
|
|
55
|
+
export declare function renderPathOf(path: string): string;
|
|
56
|
+
/** The committed path a render-tree path stands for, so a header names it; any other path is itself. */
|
|
57
|
+
export declare function committedPathOf(path: string): string;
|
|
58
|
+
/** Whether `path` (absolute) is in the render tree of a running check. */
|
|
59
|
+
export declare function isRenderPath(path: string): boolean;
|
|
60
|
+
/** A short line diff of two texts: the first lines that differ, with a little context. */
|
|
61
|
+
export declare function diffLines(committed: string, rendered: string, max?: number): string[];
|
|
62
|
+
export interface GeneratedCheckOptions {
|
|
63
|
+
/** Only these renders, by name. */
|
|
64
|
+
only?: string[];
|
|
65
|
+
/** The render tree's parent directory (default: the OS temp directory). */
|
|
66
|
+
tmpDir?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Render the product's declared generated files into a fresh directory under
|
|
70
|
+
* the OS temp directory and compare each with the committed file (#4909).
|
|
71
|
+
* The directory is left in place and named in the result.
|
|
72
|
+
*/
|
|
73
|
+
export declare function checkGenerated(productDir: string, config: GeneratedCheckConfig, opts?: GeneratedCheckOptions): Promise<GeneratedCheckResult>;
|
|
74
|
+
//# sourceMappingURL=generated-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-check.d.ts","sourceRoot":"","sources":["../src/generated-check.ts"],"names":[],"mappings":"AAqCA,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,sFAAsF;AACtF,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAEzD,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,iEAAiE;AACjE,MAAM,WAAW,oBAAoB;IACnC,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,mDAAmD;IACnD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,+GAA+G;AAC/G,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAkB7F;AAkBD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,wGAAwG;AACxG,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED,0EAA0E;AAC1E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGlD;AAiBD,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAK,GAAG,MAAM,EAAE,CAmBjF;AAcD,MAAM,WAAW,qBAAqB;IACpC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,IAAI,GAAE,qBAA0B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAyDtJ"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@intentius/chant/generated-check` (#4909): the check that a product's
|
|
3
|
+
* committed generated files are what their sources render.
|
|
4
|
+
*
|
|
5
|
+
* A product commits files that chant or its own scripts render from
|
|
6
|
+
* TypeScript: workflows GitHub reads, Dockerfiles, a JSON Schema, a stack's
|
|
7
|
+
* configs. Each product carried its own drift check for them: terragucci's
|
|
8
|
+
* `just ci-check` rendered every one into a `mktemp -d` dir, compared it with
|
|
9
|
+
* `diff -u` and cleaned up with `rm -rf`, and plywood's `build-images.mjs
|
|
10
|
+
* --check` and `build-schema.mjs --check` compared in memory. Here a product
|
|
11
|
+
* declares its renders in `chantGenerated` in its root package.json, and
|
|
12
|
+
* `chant dev generated-check` runs them:
|
|
13
|
+
*
|
|
14
|
+
* 1. make one directory under the OS temp directory, the render tree;
|
|
15
|
+
* 2. run every render's command in the product root at once, with `{out}`
|
|
16
|
+
* in the command and `CHANT_GENERATED_OUT` in its environment naming that
|
|
17
|
+
* tree, so each writes its files at their committed paths below it;
|
|
18
|
+
* 3. compare each declared file with its render, in declaration order, and
|
|
19
|
+
* fail naming every file that differs, is missing on either side, or a
|
|
20
|
+
* render that failed.
|
|
21
|
+
*
|
|
22
|
+
* The render tree is never removed: it is left for the OS to clear, and the
|
|
23
|
+
* check prints where it is, so a failure can be read there.
|
|
24
|
+
*
|
|
25
|
+
* chant's own writers read `CHANT_GENERATED_OUT` too ({@link renderPathOf},
|
|
26
|
+
* {@link committedPathOf}): under a check, `chant ci workflow` and `chant
|
|
27
|
+
* release workflow` write every file into the render tree, the trigger edits
|
|
28
|
+
* to other workflows included, and name the committed path in their header,
|
|
29
|
+
* so the render matches the file that was written without `--output`.
|
|
30
|
+
*
|
|
31
|
+
* This module imports only Node's own modules.
|
|
32
|
+
*/
|
|
33
|
+
import { spawn } from "node:child_process";
|
|
34
|
+
import { existsSync, mkdtempSync, readdirSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
35
|
+
import { tmpdir } from "node:os";
|
|
36
|
+
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
37
|
+
/** The render tree of the running check, for chant's own writers and a product's scripts. */
|
|
38
|
+
export const GENERATED_OUT_ENV = "CHANT_GENERATED_OUT";
|
|
39
|
+
/** The product root the check renders for: the committed paths are relative to it. */
|
|
40
|
+
export const GENERATED_ROOT_ENV = "CHANT_GENERATED_ROOT";
|
|
41
|
+
/** The `chantGenerated` field of the package.json in `productDir`, or undefined. Throws on a malformed one. */
|
|
42
|
+
export function readGeneratedCheckConfig(productDir) {
|
|
43
|
+
const f = join(productDir, "package.json");
|
|
44
|
+
if (!existsSync(f))
|
|
45
|
+
return undefined;
|
|
46
|
+
const raw = JSON.parse(readFileSync(f, "utf8")).chantGenerated;
|
|
47
|
+
if (raw === undefined)
|
|
48
|
+
return undefined;
|
|
49
|
+
const c = raw;
|
|
50
|
+
if (!c || typeof c !== "object" || !Array.isArray(c.renders))
|
|
51
|
+
throw new Error(`${f}: chantGenerated needs a renders list`);
|
|
52
|
+
const names = new Set();
|
|
53
|
+
for (const [i, r] of c.renders.entries()) {
|
|
54
|
+
if (!r || typeof r.name !== "string" || !r.name || typeof r.run !== "string" || !r.run)
|
|
55
|
+
throw new Error(`${f}: chantGenerated.renders[${i}] needs a name and a run command`);
|
|
56
|
+
if (names.has(r.name))
|
|
57
|
+
throw new Error(`${f}: chantGenerated.renders names '${r.name}' twice`);
|
|
58
|
+
names.add(r.name);
|
|
59
|
+
if (r.files !== undefined && (!Array.isArray(r.files) || r.files.some((p) => typeof p !== "string" || p.startsWith("/") || p.split("/").includes("..")))) {
|
|
60
|
+
throw new Error(`${f}: chantGenerated.renders[${i}].files must be paths inside the product`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (c.regenerate !== undefined && typeof c.regenerate !== "string")
|
|
64
|
+
throw new Error(`${f}: chantGenerated.regenerate must be a command`);
|
|
65
|
+
return c;
|
|
66
|
+
}
|
|
67
|
+
/** Quote one argument for `sh`. */
|
|
68
|
+
const shellQuote = (s) => (/^[A-Za-z0-9._\/=:@%+,-]+$/.test(s) ? s : `'${s.replace(/'/g, `'\\''`)}'`);
|
|
69
|
+
/** The render tree and product root of the running check, or undefined outside one. */
|
|
70
|
+
function renderEnv() {
|
|
71
|
+
const out = process.env[GENERATED_OUT_ENV];
|
|
72
|
+
const root = process.env[GENERATED_ROOT_ENV];
|
|
73
|
+
return out && root ? { out: resolve(out), root: resolve(root) } : undefined;
|
|
74
|
+
}
|
|
75
|
+
/** Whether `path` is `dir` or below it. */
|
|
76
|
+
const within = (dir, path) => {
|
|
77
|
+
const r = relative(dir, resolve(path));
|
|
78
|
+
return !r.startsWith("..") && !isAbsolute(r);
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Where a chant writer puts `path` (absolute): under a check, a path inside
|
|
82
|
+
* the product root moves to the same place in the render tree, so a check
|
|
83
|
+
* never writes the product's files. Outside a check, `path` itself.
|
|
84
|
+
*/
|
|
85
|
+
export function renderPathOf(path) {
|
|
86
|
+
const env = renderEnv();
|
|
87
|
+
if (!env || within(env.out, path) || !within(env.root, path))
|
|
88
|
+
return path;
|
|
89
|
+
return join(env.out, relative(env.root, path));
|
|
90
|
+
}
|
|
91
|
+
/** The committed path a render-tree path stands for, so a header names it; any other path is itself. */
|
|
92
|
+
export function committedPathOf(path) {
|
|
93
|
+
const env = renderEnv();
|
|
94
|
+
if (!env || !within(env.out, path))
|
|
95
|
+
return path;
|
|
96
|
+
return join(env.root, relative(env.out, path));
|
|
97
|
+
}
|
|
98
|
+
/** Whether `path` (absolute) is in the render tree of a running check. */
|
|
99
|
+
export function isRenderPath(path) {
|
|
100
|
+
const env = renderEnv();
|
|
101
|
+
return env !== undefined && within(env.out, path);
|
|
102
|
+
}
|
|
103
|
+
/** The files a declared path names under `base`, relative to it: the path itself, or a last-segment `*` pattern's matches. */
|
|
104
|
+
function expand(base, path) {
|
|
105
|
+
const last = path.lastIndexOf("/");
|
|
106
|
+
const dir = last < 0 ? "" : path.slice(0, last);
|
|
107
|
+
const name = path.slice(last + 1);
|
|
108
|
+
if (!name.includes("*"))
|
|
109
|
+
return existsSync(join(base, path)) ? [path] : [];
|
|
110
|
+
const re = new RegExp(`^${name.split("*").map((p) => p.replace(/[.+?^${}()|[\]\\]/g, "\\$&")).join("[^/]*")}$`);
|
|
111
|
+
const at = join(base, dir);
|
|
112
|
+
if (!existsSync(at) || !statSync(at).isDirectory())
|
|
113
|
+
return [];
|
|
114
|
+
return readdirSync(at)
|
|
115
|
+
.filter((f) => re.test(f) && statSync(join(at, f)).isFile())
|
|
116
|
+
.sort()
|
|
117
|
+
.map((f) => (dir ? `${dir}/${f}` : f));
|
|
118
|
+
}
|
|
119
|
+
/** A short line diff of two texts: the first lines that differ, with a little context. */
|
|
120
|
+
export function diffLines(committed, rendered, max = 12) {
|
|
121
|
+
const a = committed.split("\n");
|
|
122
|
+
const b = rendered.split("\n");
|
|
123
|
+
let start = 0;
|
|
124
|
+
while (start < a.length && start < b.length && a[start] === b[start])
|
|
125
|
+
start++;
|
|
126
|
+
let endA = a.length;
|
|
127
|
+
let endB = b.length;
|
|
128
|
+
while (endA > start && endB > start && a[endA - 1] === b[endB - 1]) {
|
|
129
|
+
endA--;
|
|
130
|
+
endB--;
|
|
131
|
+
}
|
|
132
|
+
const out = [`@@ line ${start + 1} @@`];
|
|
133
|
+
for (const l of a.slice(Math.max(0, start - 2), start))
|
|
134
|
+
out.push(` ${l}`);
|
|
135
|
+
const removed = a.slice(start, endA).map((l) => `- ${l}`);
|
|
136
|
+
const added = b.slice(start, endB).map((l) => `+ ${l}`);
|
|
137
|
+
const body = [...removed, ...added];
|
|
138
|
+
out.push(...body.slice(0, max));
|
|
139
|
+
if (body.length > max)
|
|
140
|
+
out.push(` ... ${body.length - max} more changed lines`);
|
|
141
|
+
return out;
|
|
142
|
+
}
|
|
143
|
+
/** Run one render; resolves with its exit code and output. */
|
|
144
|
+
function runRender(command, cwd, env) {
|
|
145
|
+
return new Promise((done) => {
|
|
146
|
+
const child = spawn("sh", ["-c", command], { cwd, env, stdio: ["ignore", "pipe", "pipe"] });
|
|
147
|
+
const chunks = [];
|
|
148
|
+
child.stdout.on("data", (c) => chunks.push(c));
|
|
149
|
+
child.stderr.on("data", (c) => chunks.push(c));
|
|
150
|
+
child.on("error", (err) => done({ exitCode: 127, output: String(err) }));
|
|
151
|
+
child.on("close", (code, signal) => done({ exitCode: code ?? (signal ? 128 : 1), output: Buffer.concat(chunks).toString("utf8") }));
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Render the product's declared generated files into a fresh directory under
|
|
156
|
+
* the OS temp directory and compare each with the committed file (#4909).
|
|
157
|
+
* The directory is left in place and named in the result.
|
|
158
|
+
*/
|
|
159
|
+
export async function checkGenerated(productDir, config, opts = {}) {
|
|
160
|
+
const root = realpathSync(resolve(productDir));
|
|
161
|
+
const out = realpathSync(mkdtempSync(join(opts.tmpDir ?? tmpdir(), "chant-generated-")));
|
|
162
|
+
const problems = [];
|
|
163
|
+
let renders = config.renders;
|
|
164
|
+
if (opts.only?.length) {
|
|
165
|
+
const unknown = opts.only.filter((n) => !renders.some((r) => r.name === n));
|
|
166
|
+
if (unknown.length)
|
|
167
|
+
problems.push(`chantGenerated has no render named ${unknown.map((n) => `'${n}'`).join(", ")}`);
|
|
168
|
+
renders = renders.filter((r) => opts.only.includes(r.name));
|
|
169
|
+
}
|
|
170
|
+
const env = { ...process.env, [GENERATED_OUT_ENV]: out, [GENERATED_ROOT_ENV]: root };
|
|
171
|
+
const ran = await Promise.all(renders.map(async (r) => {
|
|
172
|
+
const command = r.run.split("{out}").join(shellQuote(out));
|
|
173
|
+
return { r, command, ...(await runRender(command, root, env)) };
|
|
174
|
+
}));
|
|
175
|
+
const results = [];
|
|
176
|
+
const matched = [];
|
|
177
|
+
const hint = config.regenerate ? ` Run '${config.regenerate}' and commit the result.` : "";
|
|
178
|
+
for (const { r, command, exitCode, output } of ran) {
|
|
179
|
+
const files = [];
|
|
180
|
+
results.push({ name: r.name, command, exitCode, output, files });
|
|
181
|
+
if (exitCode !== 0) {
|
|
182
|
+
problems.push(`render '${r.name}' exited ${exitCode}: ${command}${output.trim() ? `\n${output.trimEnd().split("\n").map((l) => ` ${l}`).join("\n")}` : ""}`);
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
for (const path of r.files ?? []) {
|
|
186
|
+
const committed = expand(root, path);
|
|
187
|
+
const rendered = expand(out, path);
|
|
188
|
+
if (!path.includes("*") && rendered.length === 0) {
|
|
189
|
+
problems.push(`render '${r.name}' wrote no ${path} under the render tree`);
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
if (path.includes("*") && committed.length === 0 && rendered.length === 0) {
|
|
193
|
+
problems.push(`${path} matches no file, committed or rendered by '${r.name}'`);
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
for (const f of [...new Set([...committed, ...rendered])].sort()) {
|
|
197
|
+
files.push(f);
|
|
198
|
+
if (!rendered.includes(f)) {
|
|
199
|
+
problems.push(`${f} is committed, but '${r.name}' no longer renders it.${hint}`);
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (!committed.includes(f)) {
|
|
203
|
+
problems.push(`${f} is what '${r.name}' renders, but it is not committed.${hint}`);
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
const a = readFileSync(join(root, f), "utf8");
|
|
207
|
+
const b = readFileSync(join(out, f), "utf8");
|
|
208
|
+
if (a === b)
|
|
209
|
+
matched.push(f);
|
|
210
|
+
else
|
|
211
|
+
problems.push(`${f} is not what '${r.name}' renders.${hint}\n${diffLines(a, b).map((l) => ` ${l}`).join("\n")}`);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return { ok: problems.length === 0, out, problems, renders: results, matched };
|
|
216
|
+
}
|
package/dist/lexicon.d.ts
CHANGED
|
@@ -677,6 +677,8 @@ export interface OpSetupUsesStep {
|
|
|
677
677
|
* `assertSetupSteps`, which refuses both at build time.
|
|
678
678
|
*/
|
|
679
679
|
uses: string;
|
|
680
|
+
/** The step's name on GitHub and Forgejo, such as "Log in to AWS" (#4932). GitLab script lines have none. Absent: the forge names it from the action. */
|
|
681
|
+
name?: string;
|
|
680
682
|
/** The action's inputs, emitted as the step's `with:` mapping. */
|
|
681
683
|
with?: Record<string, string | number | boolean>;
|
|
682
684
|
/** Environment for this step alone, emitted as the step's `env:` mapping. */
|
|
@@ -686,6 +688,8 @@ export interface OpSetupUsesStep {
|
|
|
686
688
|
export interface OpSetupRunStep {
|
|
687
689
|
/** The shell line, emitted as the step's `run:`. */
|
|
688
690
|
run: string;
|
|
691
|
+
/** The step's name on GitHub and Forgejo, such as "Log in to AWS" (#4932). GitLab script lines have none. Absent: the forge shows the line. */
|
|
692
|
+
name?: string;
|
|
689
693
|
/** Environment for this step alone, emitted as the step's `env:` mapping. */
|
|
690
694
|
env?: Record<string, string>;
|
|
691
695
|
}
|
|
@@ -1728,6 +1732,18 @@ export interface LexiconPlugin {
|
|
|
1728
1732
|
* translate `.github/workflows/*.yml` into `.gitlab-ci.yml`.
|
|
1729
1733
|
*/
|
|
1730
1734
|
migrationSource?(from: string, to?: string): MigrationSource | undefined;
|
|
1735
|
+
/**
|
|
1736
|
+
* What a declared entity {@link describeResources} confirmed absent is,
|
|
1737
|
+
* when no snapshot says it was deployed (#4896). Left out, it is
|
|
1738
|
+
* `pending`: not deployed yet, the right reading for a cloud stack. A
|
|
1739
|
+
* lexicon whose environments always hold what is declared once they are
|
|
1740
|
+
* set up says `missing`, gone: the sql lexicon does, since a server that
|
|
1741
|
+
* lacks a declared table lost it. `chant lifecycle diff --live --json`
|
|
1742
|
+
* writes it as the lexicon section's `absent`, and the drift records
|
|
1743
|
+
* (`lexiconDriftRecords` on `@intentius/chant/drift-record`) read it from
|
|
1744
|
+
* there. The live diff's own `missing` list is unchanged.
|
|
1745
|
+
*/
|
|
1746
|
+
liveAbsentStatus?: "pending" | "missing";
|
|
1731
1747
|
/**
|
|
1732
1748
|
* Query deployed resources and return API metadata. Opt-in.
|
|
1733
1749
|
*
|