@intentius/chant 0.124.44 → 0.124.45
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/ci-identity.d.ts +183 -12
- package/dist/ci-identity.d.ts.map +1 -1
- package/dist/ci-identity.js +362 -53
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +17 -1
- package/dist/cli/handlers/pr-env.d.ts +8 -2
- package/dist/cli/handlers/pr-env.d.ts.map +1 -1
- package/dist/cli/handlers/pr-env.js +126 -225
- package/dist/cli/handlers/pr.d.ts +3 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +1 -0
- package/dist/components/cli-support.d.ts +2 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +4 -2
- package/dist/components/fan-out-support.d.ts +3 -0
- package/dist/components/fan-out-support.d.ts.map +1 -1
- package/dist/components/fan-out-support.js +1 -1
- package/dist/components/pr-env-run.d.ts +270 -0
- package/dist/components/pr-env-run.d.ts.map +1 -0
- package/dist/components/pr-env-run.js +440 -0
- package/dist/components/pr-environment.d.ts +89 -14
- package/dist/components/pr-environment.d.ts.map +1 -1
- package/dist/components/pr-environment.js +94 -8
- package/dist/components/pr-pipeline.d.ts +10 -1
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/op/op-waves.d.ts +17 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +23 -1
- package/dist/pr-forge.d.ts +15 -1
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +28 -16
- package/dist/pr-requires.d.ts +5 -1
- package/dist/pr-requires.d.ts.map +1 -1
- package/dist/wave-runtime.mjs +179 -179
- package/dist/workspace/ci-cloud-identity.d.ts +3 -1
- package/dist/workspace/ci-cloud-identity.d.ts.map +1 -1
- package/dist/workspace/ci-cloud-identity.js +16 -1
- package/dist/workspace/ci-run.d.ts +35 -8
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +95 -21
- package/dist/workspace/ci-secrets.d.ts.map +1 -1
- package/dist/workspace/ci-secrets.js +4 -3
- package/dist/workspace/declaration.d.ts +10 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +17 -1
- package/dist/workspace/declaration.schema.json +36 -1
- package/package.json +1 -1
- package/src/ci-identity-targets.test.ts +275 -0
- package/src/ci-identity.ts +394 -61
- package/src/cli/handlers/build.ts +15 -1
- package/src/cli/handlers/pr-env.ts +136 -227
- package/src/cli/handlers/pr.ts +4 -0
- package/src/components/cli-support.ts +6 -1
- package/src/components/fan-out-support.ts +4 -1
- package/src/components/pr-env-run.test.ts +290 -0
- package/src/components/pr-env-run.ts +634 -0
- package/src/components/pr-environment.ts +159 -12
- package/src/components/pr-pipeline.ts +10 -1
- package/src/op/op-waves.ts +38 -1
- package/src/pr-forge-bundle.test.ts +1 -1
- package/src/pr-forge.ts +44 -17
- package/src/pr-requires.test.ts +43 -6
- package/src/pr-requires.ts +5 -1
- package/src/workspace/ci-cloud-identity.test.ts +20 -0
- package/src/workspace/ci-cloud-identity.ts +14 -1
- package/src/workspace/ci-run.test.ts +74 -1
- package/src/workspace/ci-run.ts +122 -29
- package/src/workspace/ci-secrets.test.ts +1 -1
- package/src/workspace/ci-secrets.ts +4 -3
- package/src/workspace/declaration.schema.json +36 -1
- package/src/workspace/declaration.test.ts +7 -0
- package/src/workspace/declaration.ts +24 -2
|
@@ -335,6 +335,12 @@ export interface CiPrEnvironment {
|
|
|
335
335
|
template: string;
|
|
336
336
|
/** How long the environment lives after its last apply: `72h` when absent. */
|
|
337
337
|
ttl: string;
|
|
338
|
+
/**
|
|
339
|
+
* A command that tears down what no lexicon does (#4330), such as a
|
|
340
|
+
* Terraform root's copy: run by `pr-env down` and `pr-env sweep` after the
|
|
341
|
+
* ownership check (../components/pr-env-run.ts, `commandTeardownAdapter`).
|
|
342
|
+
*/
|
|
343
|
+
teardown?: { name?: string; command: string[]; lexicons?: string[] };
|
|
338
344
|
}
|
|
339
345
|
|
|
340
346
|
/** The default `ci.prEnvironment.ttl`. */
|
|
@@ -1260,7 +1266,7 @@ function cloudIdentityOf(raw: CloudIdentityDeclaration, at: (pointer: string, ke
|
|
|
1260
1266
|
|
|
1261
1267
|
function ciOf(raw: unknown, at: (pointer: string, key?: boolean) => ErrorLocation): CiDeclaration | null {
|
|
1262
1268
|
if (raw === undefined) return null;
|
|
1263
|
-
const block = raw as { reportUrl?: string; workflow?: CiWorkflow; hooks?: unknown; identity?: { cloud?: CloudIdentityDeclaration }; branches?: Record<string, string[]>; labels?: Record<string, string[]>; locks?: CiLocks; policy?: unknown; prEnvironment?: { template: string; ttl?: string }; green?: { branch: string; window?: string; phases: Record<string, string[] | { runs: string[]; skipped?: CiSkipped; build?: CiBuild }>; require: string[]; preMerge?: string[]; signedSince?: string; source?: CiSource } };
|
|
1269
|
+
const block = raw as { reportUrl?: string; workflow?: CiWorkflow; hooks?: unknown; identity?: { cloud?: CloudIdentityDeclaration }; branches?: Record<string, string[]>; labels?: Record<string, string[]>; locks?: CiLocks; policy?: unknown; prEnvironment?: { template: string; ttl?: string; teardown?: { name?: string; command: string[]; lexicons?: string[] } }; green?: { branch: string; window?: string; phases: Record<string, string[] | { runs: string[]; skipped?: CiSkipped; build?: CiBuild }>; require: string[]; preMerge?: string[]; signedSince?: string; source?: CiSource } };
|
|
1264
1270
|
const hooks = ciHooksOf(block.hooks, "/ci/hooks", at);
|
|
1265
1271
|
const policy = ciPolicyOf(block.policy, at);
|
|
1266
1272
|
const workflow = {
|
|
@@ -1271,7 +1277,23 @@ function ciOf(raw: unknown, at: (pointer: string, key?: boolean) => ErrorLocatio
|
|
|
1271
1277
|
...(block.locks !== undefined ? { locks: block.locks } : {}),
|
|
1272
1278
|
...(policy ? { policy } : {}),
|
|
1273
1279
|
...(block.identity?.cloud !== undefined ? { identity: { cloud: cloudIdentityOf(block.identity.cloud, at) } } : {}),
|
|
1274
|
-
...(block.prEnvironment !== undefined
|
|
1280
|
+
...(block.prEnvironment !== undefined
|
|
1281
|
+
? {
|
|
1282
|
+
prEnvironment: {
|
|
1283
|
+
template: block.prEnvironment.template,
|
|
1284
|
+
ttl: block.prEnvironment.ttl ?? DEFAULT_PR_ENVIRONMENT_TTL,
|
|
1285
|
+
...(block.prEnvironment.teardown !== undefined
|
|
1286
|
+
? {
|
|
1287
|
+
teardown: {
|
|
1288
|
+
...(block.prEnvironment.teardown.name !== undefined ? { name: block.prEnvironment.teardown.name } : {}),
|
|
1289
|
+
command: [...block.prEnvironment.teardown.command],
|
|
1290
|
+
...(block.prEnvironment.teardown.lexicons !== undefined ? { lexicons: [...block.prEnvironment.teardown.lexicons] } : {}),
|
|
1291
|
+
},
|
|
1292
|
+
}
|
|
1293
|
+
: {}),
|
|
1294
|
+
},
|
|
1295
|
+
}
|
|
1296
|
+
: {}),
|
|
1275
1297
|
};
|
|
1276
1298
|
let reportUrl: string | null = null;
|
|
1277
1299
|
if (block.reportUrl !== undefined) {
|