@intentius/plywood 0.3.1 → 0.3.2
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/plywood.mjs +35 -12
- package/dist/plywood.mjs.map +2 -2
- package/package.json +7 -7
package/dist/plywood.mjs
CHANGED
|
@@ -432,7 +432,7 @@ var init_words = __esm({
|
|
|
432
432
|
"src/words.ts"() {
|
|
433
433
|
"use strict";
|
|
434
434
|
PRODUCT = "plywood";
|
|
435
|
-
TAGLINE = "
|
|
435
|
+
TAGLINE = "Pulumi ops and governance.";
|
|
436
436
|
OP_NAME = "pulumi-up";
|
|
437
437
|
PR_GATE = "up";
|
|
438
438
|
VERBS = [
|
|
@@ -597,13 +597,13 @@ var init_control = __esm({
|
|
|
597
597
|
var version, dependencies;
|
|
598
598
|
var init_package = __esm({
|
|
599
599
|
"package.json"() {
|
|
600
|
-
version = "0.3.
|
|
600
|
+
version = "0.3.2";
|
|
601
601
|
dependencies = {
|
|
602
|
-
"@intentius/chant": "0.124.
|
|
603
|
-
"@intentius/chant-lexicon-forgejo": "0.124.
|
|
604
|
-
"@intentius/chant-lexicon-github": "0.124.
|
|
605
|
-
"@intentius/chant-lexicon-gitlab": "0.124.
|
|
606
|
-
"@intentius/chant-lexicon-pulumi": "0.124.
|
|
602
|
+
"@intentius/chant": "0.124.67",
|
|
603
|
+
"@intentius/chant-lexicon-forgejo": "0.124.67",
|
|
604
|
+
"@intentius/chant-lexicon-github": "0.124.67",
|
|
605
|
+
"@intentius/chant-lexicon-gitlab": "0.124.67",
|
|
606
|
+
"@intentius/chant-lexicon-pulumi": "0.124.67"
|
|
607
607
|
};
|
|
608
608
|
}
|
|
609
609
|
});
|
|
@@ -613,8 +613,8 @@ var image_digests_default;
|
|
|
613
613
|
var init_image_digests = __esm({
|
|
614
614
|
"src/image-digests.json"() {
|
|
615
615
|
image_digests_default = {
|
|
616
|
-
"ghcr.io/intentius/plywood-pulumi:0.3.
|
|
617
|
-
"ghcr.io/intentius/plywood-plunge:0.3.
|
|
616
|
+
"ghcr.io/intentius/plywood-pulumi:0.3.2-pulumi3.272.0": "sha256:eeb44ac18dc594acd8a56dfc1a6ed00751154f6b6bfba8bbdff97a513f4b9f84",
|
|
617
|
+
"ghcr.io/intentius/plywood-plunge:0.3.2-plunge0.2.0": "sha256:5239ffabd5f5b7a4ffc5cbbe1628a34990bc95549cd4a1bef27953d3dfb7d8a9"
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
620
|
});
|
|
@@ -2468,7 +2468,7 @@ var init_chant_product = __esm({
|
|
|
2468
2468
|
"src/chant-product.ts"() {
|
|
2469
2469
|
"use strict";
|
|
2470
2470
|
REQUIRED2 = ["assertProductWords", "productPipelineJobs", "approveLine", "runChantInProcess"];
|
|
2471
|
-
BUILT_CHANT = true ? "0.124.
|
|
2471
|
+
BUILT_CHANT = true ? "0.124.67" : "unknown";
|
|
2472
2472
|
}
|
|
2473
2473
|
});
|
|
2474
2474
|
|
|
@@ -3503,6 +3503,7 @@ function wavesSpec(input) {
|
|
|
3503
3503
|
step: { kind: "pulumi-up" },
|
|
3504
3504
|
...input.quorum && input.quorum.length > 0 ? { approvals: { quorum: input.quorum } } : {},
|
|
3505
3505
|
...input.notify ? { notify: input.notify } : {},
|
|
3506
|
+
...input.policy ? { holds: { policy: true } } : {},
|
|
3506
3507
|
waves: waves.map((w) => {
|
|
3507
3508
|
const gate = w.stacks.map((s) => s.gate ?? input.gate).reduce((a, b) => STRICTNESS[b] > STRICTNESS[a] ? b : a);
|
|
3508
3509
|
return { name: w.name, gate, runs: w.stacks.map((s) => ({ target: s.key, input: stepInput(s) })) };
|
|
@@ -3999,7 +4000,10 @@ async function drift2(args, json, table, io) {
|
|
|
3999
4000
|
try {
|
|
4000
4001
|
const attribute = await attributionFor(doc, io);
|
|
4001
4002
|
const root = dirname6(path);
|
|
4002
|
-
for (const stack of stacks2)
|
|
4003
|
+
for (const stack of stacks2) {
|
|
4004
|
+
const backend = stacksOf(doc)[stack]?.backend ?? (typeof doc.backend === "string" ? doc.backend : void 0);
|
|
4005
|
+
results.push(await withBackend(backend, () => readStack(chant, stack, driftMember(root, doc, stack), dir, { resource: resource.value, env: envFlag.value, ...attribute ? { attribute } : {} })));
|
|
4006
|
+
}
|
|
4003
4007
|
} finally {
|
|
4004
4008
|
rmSync(dir, { recursive: true, force: true });
|
|
4005
4009
|
}
|
|
@@ -4106,9 +4110,26 @@ async function readStack(chant, stack, member, dir, opts) {
|
|
|
4106
4110
|
return { stack, ok: false, drifted: 0, rows: [], error: doc?.error ? `${doc.error.code}: ${doc.error.message}` : `chant workspace drift exited ${code}` };
|
|
4107
4111
|
}
|
|
4108
4112
|
const rows = driftRows(doc);
|
|
4113
|
+
const unread = (doc.records ?? []).filter((r) => r.status === "not-observed");
|
|
4114
|
+
if (rows.length === 0 && unread.length > 0) {
|
|
4115
|
+
const first = unread[0];
|
|
4116
|
+
const why = first.unobserved?.detail ?? first.unobserved?.reason ?? "no reason given";
|
|
4117
|
+
return { stack, ok: false, drifted: 0, rows: [], error: `${unread.length} resource${unread.length === 1 ? "" : "s"} could not be read, so the stack's drift is unknown: ${first.address}: ${why}` };
|
|
4118
|
+
}
|
|
4109
4119
|
const attribution = rows.length && opts.attribute ? await attributeStack(opts.attribute, stack, doc) : void 0;
|
|
4110
4120
|
return { stack, ok: true, drifted: rows.length, rows, observedAt: observedAt(doc), ...attribution ? { attribution } : {} };
|
|
4111
4121
|
}
|
|
4122
|
+
async function withBackend(backend, read) {
|
|
4123
|
+
if (backend === void 0) return read();
|
|
4124
|
+
const before = process.env.PULUMI_BACKEND_URL;
|
|
4125
|
+
process.env.PULUMI_BACKEND_URL = backend;
|
|
4126
|
+
try {
|
|
4127
|
+
return await read();
|
|
4128
|
+
} finally {
|
|
4129
|
+
if (before === void 0) delete process.env.PULUMI_BACKEND_URL;
|
|
4130
|
+
else process.env.PULUMI_BACKEND_URL = before;
|
|
4131
|
+
}
|
|
4132
|
+
}
|
|
4112
4133
|
async function attributionFor(doc, io) {
|
|
4113
4134
|
const logs = driftSettingsOf(doc).auditLogs;
|
|
4114
4135
|
if (!logs) return void 0;
|
|
@@ -5808,7 +5829,9 @@ async function preCommitStep(root, config2, dryRun) {
|
|
|
5808
5829
|
}
|
|
5809
5830
|
async function wavesSpecStep(chant, stacks2, doc, settings, branch, ordered, forge) {
|
|
5810
5831
|
const runner = waveRunner(chantPipelineOptions(settings.pipeline, false).runner);
|
|
5832
|
+
const rego = isObject(doc.policy) && (typeof doc.policy.rego === "string" || doc.policy.source !== void 0 || doc.policy.command !== void 0);
|
|
5811
5833
|
const base = wavesSpec({
|
|
5834
|
+
...rego ? { policy: true } : {},
|
|
5812
5835
|
stacks: stacks2,
|
|
5813
5836
|
ordered,
|
|
5814
5837
|
gate: gateOf(doc),
|
|
@@ -7928,7 +7951,7 @@ var execChild = (bin, args, opts) => new Promise((done) => {
|
|
|
7928
7951
|
|
|
7929
7952
|
// src/cli.ts
|
|
7930
7953
|
init_words();
|
|
7931
|
-
var VERSION3 = true ? "0.3.
|
|
7954
|
+
var VERSION3 = true ? "0.3.2" : "0.0.0-dev";
|
|
7932
7955
|
var stdio = {
|
|
7933
7956
|
out: (s) => process.stdout.write(s + "\n"),
|
|
7934
7957
|
err: (s) => process.stderr.write(s + "\n")
|