@intentius/behold 0.30.2 → 0.32.0
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/AGENTS.md +791 -16
- package/README.md +78 -23
- package/THIRD_PARTY.md +6 -5
- package/demos.json +14 -9
- package/dist/cli.js +51926 -20221
- package/example-carve/README.md +19 -23
- package/example-carve/app/package.json +1 -1
- package/example-carve/app/src/carved.ts +3 -3
- package/example-carve/carve-report.json +1 -1
- package/example-carve/{legacy-tf → tf-root}/terraform.tfstate +1 -1
- package/example-choudoufu-estate/README.md +7 -0
- package/example-choudoufu-estate/chant.workspace.json +1 -1
- package/example-choudoufu-estate/scripts/choudoufu-down.sh +2 -1
- package/example-choudoufu-estate/scripts/choudoufu-up.sh +10 -3
- package/example-terraform-estate/README.md +32 -5
- package/example-terraform-estate/chant.workspace.json +1 -1
- package/example-terraform-estate/recorded/adoption/platform.json +72 -0
- package/example-terraform-estate/recorded/adoption/prod.json +224 -0
- package/example-three-cloud/README.md +111 -18
- package/example-three-cloud/aws/Pulumi.yaml +15 -0
- package/example-three-cloud/aws/index.ts +174 -0
- package/example-three-cloud/aws/package-lock.json +2725 -0
- package/example-three-cloud/aws/package.json +14 -0
- package/example-three-cloud/aws/tsconfig.json +17 -0
- package/example-three-cloud/azure/main.tf +48 -0
- package/example-three-cloud/azure/site.tf +104 -0
- package/example-three-cloud/chant.config.json +9 -0
- package/example-three-cloud/chant.workspace.json +30 -4
- package/example-three-cloud/dns/chant.config.ts +26 -1
- package/example-three-cloud/dns/src/records.component.ts +32 -6
- package/example-three-cloud/package-lock.json +48 -27
- package/example-three-cloud/package.json +8 -6
- package/example-three-cloud/scripts/emulators-up.sh +28 -1
- package/example-three-cloud/scripts/front-door.ts +679 -86
- package/package.json +26 -8
- package/schemas/graph/v1/graph.schema.json +140 -0
- package/web/adopt-pulumi.js +114 -0
- package/web/adopt-pulumi.test.js +28 -0
- package/web/adopt.js +203 -0
- package/web/adopt.test.js +27 -0
- package/web/app.js +367 -14
- package/web/boot-motion.js +6 -0
- package/web/carve-steps.js +1 -1
- package/web/carve-steps.test.js +2 -2
- package/web/change-set-overlay.js +12 -5
- package/web/change-set-overlay.test.js +22 -0
- package/web/cut-around.d.ts +30 -0
- package/web/cut-around.js +138 -0
- package/web/drift-stream.js +241 -0
- package/web/drift-stream.test.js +146 -0
- package/web/edge-weight.d.ts +8 -2
- package/web/edge-weight.js +38 -4
- package/web/edge-weight.test.js +55 -1
- package/web/graph-query.js +180 -0
- package/web/graph-query.test.js +49 -0
- package/web/graph.html +107 -0
- package/web/index-diff.js +109 -0
- package/web/index-diff.test.js +39 -0
- package/web/index.html +45 -20
- package/web/kiosk-ask-tips.js +15 -5
- package/web/kiosk-ask-tips.test.js +14 -1
- package/web/kiosk-estate-scene.js +72 -8
- package/web/kiosk-light-frame.js +1 -0
- package/web/kiosk-light.js +41 -3
- package/web/kiosk-member-kind.test.js +140 -0
- package/web/kiosk-popover.js +4 -1
- package/web/kiosk-side.js +296 -0
- package/web/kiosk-side.test.js +249 -0
- package/web/kiosk-watch.js +12 -0
- package/web/kiosk-watch.test.js +15 -1
- package/web/kiosk.html +47 -1
- package/web/kiosk.js +106 -7
- package/web/member-kind.js +31 -0
- package/web/neighbourhood.js +105 -0
- package/web/neighbourhood.test.js +131 -0
- package/web/outside-refs.js +515 -0
- package/web/outside-refs.test.js +249 -0
- package/web/template-apps.js +245 -0
- package/web/template-apps.test.js +252 -0
- package/web/templates.js +285 -0
- package/web/templates.test.js +155 -0
- package/web/terragucci-lifecycle.js +112 -62
- package/web/terragucci-lifecycle.test.js +29 -1
- package/web/terragucci-timeline.js +39 -2
- package/web/terragucci-timeline.test.js +42 -1
- package/web/theme-paint.js +14 -0
- package/example-three-cloud/aws/chant.config.ts +0 -8
- package/example-three-cloud/aws/site.component.ts +0 -13
- package/example-three-cloud/aws/src/site.ts +0 -27
- package/example-three-cloud/azure/chant.config.ts +0 -1
- package/example-three-cloud/azure/src/site.component.ts +0 -13
- package/example-three-cloud/azure/src/site.ts +0 -18
- /package/example-carve/{legacy-tf → tf-root}/cdn.tf +0 -0
- /package/example-carve/{legacy-tf → tf-root}/compute.tf +0 -0
- /package/example-carve/{legacy-tf → tf-root}/floci-override.tf.disabled +0 -0
- /package/example-carve/{legacy-tf → tf-root}/modules/cdn/main.tf +0 -0
- /package/example-carve/{legacy-tf → tf-root}/naming.tf +0 -0
- /package/example-carve/{legacy-tf → tf-root}/network.tf +0 -0
- /package/example-carve/{legacy-tf → tf-root}/observability.tf +0 -0
- /package/example-carve/{legacy-tf → tf-root}/outputs.tf +0 -0
- /package/example-carve/{legacy-tf → tf-root}/storage.tf +0 -0
- /package/example-carve/{legacy-tf → tf-root}/versions.tf +0 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
// behold#1035: the Templates tab. The pure half is tested as data; the form is
|
|
2
|
+
// drawn into a small stand-in document (no DOM library in this repo), enough
|
|
3
|
+
// to read each control's tag and type, type into it and press Submit.
|
|
4
|
+
import { describe, expect, it } from "vitest";
|
|
5
|
+
import { canSubmit, fieldControl, formInputs, renderTemplates, requestWords, REQUESTED_WORDS, rowFacts, startTemplates } from "./templates.js";
|
|
6
|
+
|
|
7
|
+
class Node {
|
|
8
|
+
constructor(tag) {
|
|
9
|
+
this.tagName = tag.toUpperCase();
|
|
10
|
+
this.children = [];
|
|
11
|
+
this.listeners = {};
|
|
12
|
+
this.textContent = "";
|
|
13
|
+
this.className = "";
|
|
14
|
+
this.value = "";
|
|
15
|
+
this.checked = false;
|
|
16
|
+
this.disabled = false;
|
|
17
|
+
}
|
|
18
|
+
appendChild(n) {
|
|
19
|
+
this.children.push(n);
|
|
20
|
+
return n;
|
|
21
|
+
}
|
|
22
|
+
replaceChildren(...n) {
|
|
23
|
+
this.children = n;
|
|
24
|
+
}
|
|
25
|
+
addEventListener(type, f) {
|
|
26
|
+
(this.listeners[type] ||= []).push(f);
|
|
27
|
+
}
|
|
28
|
+
fire(type) {
|
|
29
|
+
for (const f of this.listeners[type] || []) f({ preventDefault() {} });
|
|
30
|
+
}
|
|
31
|
+
/** Every node below this one, depth first. */
|
|
32
|
+
all() {
|
|
33
|
+
return this.children.flatMap((c) => [c, ...c.all()]);
|
|
34
|
+
}
|
|
35
|
+
text() {
|
|
36
|
+
return [this.textContent, ...this.children.map((c) => c.text())].join("");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const doc = { createElement: (tag) => new Node(tag) };
|
|
40
|
+
|
|
41
|
+
const row = {
|
|
42
|
+
template: "acme/bucket/aws",
|
|
43
|
+
kind: "app",
|
|
44
|
+
description: "A private bucket for one app's data",
|
|
45
|
+
latest: "1.2.0",
|
|
46
|
+
versions: [{ version: "1.2.0", attestation: "signed" }],
|
|
47
|
+
fields: [
|
|
48
|
+
{ name: "bucket_name", kind: "string", label: "Bucket name", required: true },
|
|
49
|
+
{ name: "retention_days", kind: "number", label: "Days to keep objects", default: 30, required: false },
|
|
50
|
+
{ name: "versioned", kind: "bool", label: "Keep old versions", default: false, required: false },
|
|
51
|
+
{ name: "kms_key", kind: "string", label: "KMS key", required: false, sensitive: true },
|
|
52
|
+
],
|
|
53
|
+
};
|
|
54
|
+
const answer = { schema: 1, command: "templates", exit: 0, status: "ok", results: [row] };
|
|
55
|
+
|
|
56
|
+
const inputs = (host) => host.all().filter((n) => n.tagName === "INPUT" || n.tagName === "TEXTAREA");
|
|
57
|
+
const submitOf = (host) => host.all().find((n) => n.className === "tp-submit");
|
|
58
|
+
const formOf = (host) => host.all().find((n) => n.tagName === "FORM");
|
|
59
|
+
|
|
60
|
+
/** fetchJson answering the catalog, the dispatch's 202 and the run's record. */
|
|
61
|
+
function server(record) {
|
|
62
|
+
const posts = [];
|
|
63
|
+
const fetchJson = async (url, init) => {
|
|
64
|
+
if (url === "/api/templates") return answer;
|
|
65
|
+
if (url === "/api/templates/request") {
|
|
66
|
+
posts.push(JSON.parse(init.body));
|
|
67
|
+
return { dispatched: true, id: "r1", branch: "request/bucket/orders" };
|
|
68
|
+
}
|
|
69
|
+
if (url === "/api/templates/requests/r1") return record();
|
|
70
|
+
throw new Error(url);
|
|
71
|
+
};
|
|
72
|
+
return { fetchJson, posts };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
describe("the Templates tab (behold#1035)", () => {
|
|
76
|
+
it("lists a row with the template's title, kind, newest version and attestation", () => {
|
|
77
|
+
expect(rowFacts(row)).toEqual({ title: "A private bucket for one app's data", template: "acme/bucket/aws", kind: "app", version: "1.2.0", attestation: "signed" });
|
|
78
|
+
const host = new Node("section");
|
|
79
|
+
renderTemplates(host, { answer, open: null, raw: {} }, { open() {} }, doc);
|
|
80
|
+
expect(host.text()).toContain("acme/bucket/aws · app · 1.2.0 · signed");
|
|
81
|
+
expect(host.all().some((n) => n.tagName === "BUTTON" && n.textContent === "Request")).toBe(true);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it("draws a text input for a string, a number input for a number and a checkbox for a bool, and no field for a sensitive input", async () => {
|
|
85
|
+
const host = new Node("section");
|
|
86
|
+
const { fetchJson } = server(() => ({}));
|
|
87
|
+
const t = startTemplates(host, { fetchJson, doc });
|
|
88
|
+
await new Promise((r) => setTimeout(r, 0));
|
|
89
|
+
t.ui.open("acme/bucket/aws");
|
|
90
|
+
const fields = inputs(host).filter((n) => n.name !== "name");
|
|
91
|
+
expect(fields.map((n) => [n.name, n.tagName, n.type])).toEqual([
|
|
92
|
+
["bucket_name", "INPUT", "text"],
|
|
93
|
+
["retention_days", "INPUT", "number"],
|
|
94
|
+
["versioned", "INPUT", "checkbox"],
|
|
95
|
+
]);
|
|
96
|
+
expect(host.text()).toContain("Bucket name (required)");
|
|
97
|
+
expect(host.text()).not.toContain("KMS key");
|
|
98
|
+
expect(fieldControl({ kind: "list", of: "string" })).toBe("lines");
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it("keeps Submit disabled until the required field has a value, then posts typed inputs; a 202 and a run with pull_request 7 show a link to #7", async () => {
|
|
102
|
+
let record = { id: "r1", state: "dispatched", branch: "request/bucket/orders" };
|
|
103
|
+
const host = new Node("section");
|
|
104
|
+
const { fetchJson, posts } = server(() => record);
|
|
105
|
+
const t = startTemplates(host, { fetchJson, doc });
|
|
106
|
+
await new Promise((r) => setTimeout(r, 0));
|
|
107
|
+
t.ui.open("acme/bucket/aws");
|
|
108
|
+
const byName = (n) => inputs(host).find((x) => x.name === n);
|
|
109
|
+
const type = (n, v) => {
|
|
110
|
+
byName(n).value = v;
|
|
111
|
+
byName(n).fire("input");
|
|
112
|
+
};
|
|
113
|
+
expect(submitOf(host).disabled).toBe(true);
|
|
114
|
+
type("name", "orders");
|
|
115
|
+
expect(submitOf(host).disabled).toBe(true);
|
|
116
|
+
type("bucket_name", "orders-data");
|
|
117
|
+
expect(submitOf(host).disabled).toBe(false);
|
|
118
|
+
type("bucket_name", "");
|
|
119
|
+
expect(submitOf(host).disabled).toBe(true);
|
|
120
|
+
type("bucket_name", "orders-data");
|
|
121
|
+
type("retention_days", "7");
|
|
122
|
+
|
|
123
|
+
formOf(host).fire("submit");
|
|
124
|
+
await new Promise((r) => setTimeout(r, 0));
|
|
125
|
+
expect(posts).toEqual([{ template: "acme/bucket/aws", version: "1.2.0", name: "orders", inputs: { bucket_name: "orders-data", retention_days: 7 } }]);
|
|
126
|
+
expect(host.text()).toContain(REQUESTED_WORDS);
|
|
127
|
+
|
|
128
|
+
record = { id: "r1", state: "ended", conclusion: "success", branch: "request/bucket/orders", pull_request: 7, url: "https://github.com/acme/infra/pull/7" };
|
|
129
|
+
const listeners = {};
|
|
130
|
+
// The run's end arrives as a template-request event naming the request.
|
|
131
|
+
const events = { addEventListener: (type, f) => (listeners[type] = f) };
|
|
132
|
+
const host2 = new Node("section");
|
|
133
|
+
const t2 = startTemplates(host2, { fetchJson, events, doc });
|
|
134
|
+
await new Promise((r) => setTimeout(r, 0));
|
|
135
|
+
t2.ui.open("acme/bucket/aws");
|
|
136
|
+
Object.assign(t2.state, { name: "orders", raw: { bucket_name: "orders-data" } });
|
|
137
|
+
await t2.ui.submit(row, { bucket_name: "orders-data" });
|
|
138
|
+
listeners["template-request"]({ data: "r1" });
|
|
139
|
+
await new Promise((r) => setTimeout(r, 0));
|
|
140
|
+
const link = host2.all().find((n) => n.tagName === "A");
|
|
141
|
+
expect(link.textContent).toBe("#7");
|
|
142
|
+
expect(link.href).toBe("https://github.com/acme/infra/pull/7");
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it("words a refusal with its reason code", () => {
|
|
146
|
+
expect(requestWords({ error: "inputs.bucket_name is required", code: "missing-input" }, null)).toEqual({ text: "missing-input: inputs.bucket_name is required", refused: true });
|
|
147
|
+
expect(requestWords({ dispatched: true, id: "r1" }, { state: "running" })).toEqual({ text: REQUESTED_WORDS });
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it("reads the form's values by kind, leaving an empty optional field to its default", () => {
|
|
151
|
+
const f = [...row.fields, { name: "readers", kind: "list", of: "string", required: false }];
|
|
152
|
+
expect(formInputs(f, { bucket_name: "b", retention_days: "", versioned: true, readers: "a\n\n b \n" })).toEqual({ bucket_name: "b", versioned: true, readers: ["a", "b"] });
|
|
153
|
+
expect(canSubmit(f, { bucket_name: "b" }, "Orders")).toBe(false);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
@@ -126,6 +126,53 @@ export function laneGateCards(lane, now = new Date()) {
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
const ACTION_TITLE = {
|
|
130
|
+
waiting: (a) => `${a.name} on ${a.root} waits for an approval${a.requester ? ` by someone other than ${a.requester}` : ""}`,
|
|
131
|
+
expired: (a) => `${a.name} on ${a.root}: the request for an approval expired`,
|
|
132
|
+
approved: (a) => `${a.name} on ${a.root} approved by ${a.approval.by}, not run yet`,
|
|
133
|
+
applied: (a) => (a.applied && a.applied.result ? `${a.name} on ${a.root} ran: ${a.applied.result}` : `${a.name} on ${a.root} ran (outcome not recorded)`),
|
|
134
|
+
failed: (a) => `${a.name} on ${a.root} failed`,
|
|
135
|
+
refused: (a) => `${a.name} on ${a.root} refused: an approval stands for another plan`,
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const ACTION_NOTE = "An action runs only once a person other than the one who asked approves its plan digest: that person runs the line at their shell. behold does not approve, and does not run the action.";
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* behold#1037: each day-2 action's gate as a card, in the shape of a wave's:
|
|
142
|
+
* who asked, its state, the digest, who approved and how the run ended, and
|
|
143
|
+
* while it waits the `terragucci approve action` line a second person runs.
|
|
144
|
+
* `root` keeps one app's. No button but Copy.
|
|
145
|
+
*/
|
|
146
|
+
export function laneActionCards(lane, now = new Date(), { root = null } = {}) {
|
|
147
|
+
if (!lane || !lane.found || !Array.isArray(lane.actions)) return [];
|
|
148
|
+
return lane.actions
|
|
149
|
+
.filter((a) => !root || a.root === root)
|
|
150
|
+
.map((a) => {
|
|
151
|
+
const facts = [];
|
|
152
|
+
if (a.pending) facts.push(`asked${a.requester ? ` by ${a.requester}` : ""} ${clock(a.pending.timestamp, now)}, ${ago(a.pending.timestamp, now)}`);
|
|
153
|
+
if (a.approval) facts.push(`${a.state === "refused" ? `approved for plan ${short(a.refused && a.refused.digest) || "(none)"} by` : "approved by"} ${approvalWords(a.approval, now)}`);
|
|
154
|
+
if (a.applied) facts.push(`${a.applied.result === "failed" ? "failed" : "ran"} ${clock(a.applied.finished || a.applied.at, now)}, ${ago(a.applied.finished || a.applied.at, now)}${typeof a.applied.exit === "number" ? `, exit ${a.applied.exit}` : ""}`);
|
|
155
|
+
if (a.digest) facts.push(`plan ${short(a.digest)}`);
|
|
156
|
+
facts.push(a.address);
|
|
157
|
+
if (modeWords(a)) facts.push(modeWords(a));
|
|
158
|
+
const uncounted = (a.uncounted || []).map((u) => `${u.approval.by}'s approval of this plan does not count: ${u.reason}`);
|
|
159
|
+
const job = a.pending && a.pending.url ? a.pending.url : null;
|
|
160
|
+
return {
|
|
161
|
+
gate: a.gate,
|
|
162
|
+
root: a.root,
|
|
163
|
+
name: a.name,
|
|
164
|
+
state: a.state,
|
|
165
|
+
tone: a.state === "waiting" ? "wave" : a.state === "failed" || a.state === "refused" ? "failed" : a.state === "expired" ? "none" : "ok",
|
|
166
|
+
title: ACTION_TITLE[a.state] ? ACTION_TITLE[a.state](a) : `${a.name} on ${a.root}: ${a.state}`,
|
|
167
|
+
facts: facts.join(" · "),
|
|
168
|
+
...(uncounted.length ? { uncounted } : {}),
|
|
169
|
+
source: sourceWords(a.source, now),
|
|
170
|
+
...(a.command ? { command: a.command, note: ACTION_NOTE } : {}),
|
|
171
|
+
...(job ? { job } : {}),
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
129
176
|
/** Each locked root: who holds it and since when, and the commit it was read from. */
|
|
130
177
|
export function laneLockRows(lane, now = new Date()) {
|
|
131
178
|
if (!lane || !lane.found) return [];
|
|
@@ -158,68 +205,7 @@ export function renderLane(host, lane, polled, now, ui) {
|
|
|
158
205
|
e.textContent = `the reports' index could not be checked: ${polled.reports.error}`;
|
|
159
206
|
host.appendChild(e);
|
|
160
207
|
}
|
|
161
|
-
for (const g of laneGateCards(lane, now))
|
|
162
|
-
const box = document.createElement("div");
|
|
163
|
-
box.className = `ws-gate tg-lane-gate tg-${g.tone}`;
|
|
164
|
-
const title = document.createElement("div");
|
|
165
|
-
title.className = "ws-gate-title";
|
|
166
|
-
title.textContent = g.title;
|
|
167
|
-
const facts = document.createElement("div");
|
|
168
|
-
facts.className = "ws-gate-facts";
|
|
169
|
-
facts.textContent = g.facts;
|
|
170
|
-
const src = document.createElement("div");
|
|
171
|
-
src.className = "ws-gate-note";
|
|
172
|
-
src.textContent = `from ${g.source}`;
|
|
173
|
-
box.append(title, facts);
|
|
174
|
-
for (const u of g.uncounted || []) {
|
|
175
|
-
const why = document.createElement("div");
|
|
176
|
-
why.className = "ws-gate-note";
|
|
177
|
-
why.textContent = u;
|
|
178
|
-
box.appendChild(why);
|
|
179
|
-
}
|
|
180
|
-
box.appendChild(src);
|
|
181
|
-
for (const o of g.overrides || []) {
|
|
182
|
-
const what = document.createElement("div");
|
|
183
|
-
what.className = "ws-gate-note";
|
|
184
|
-
what.textContent = o.text;
|
|
185
|
-
const cmd = document.createElement("code");
|
|
186
|
-
cmd.className = "tg-command";
|
|
187
|
-
cmd.textContent = o.command;
|
|
188
|
-
const copy = ui.button("Copy", "", () => ui.copy(o.command, copy));
|
|
189
|
-
copy.title = "Copy the line. Run it at your shell, with your reason: the override is yours.";
|
|
190
|
-
box.append(what, cmd, copy);
|
|
191
|
-
if (o.job) {
|
|
192
|
-
const links = document.createElement("div");
|
|
193
|
-
links.className = "ws-gate-note";
|
|
194
|
-
links.appendChild(ui.link("job", o.job));
|
|
195
|
-
box.appendChild(links);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
if (g.overrideNote) {
|
|
199
|
-
const n = document.createElement("div");
|
|
200
|
-
n.className = "ws-gate-note";
|
|
201
|
-
n.textContent = g.overrideNote;
|
|
202
|
-
box.appendChild(n);
|
|
203
|
-
}
|
|
204
|
-
if (g.command) {
|
|
205
|
-
const cmd = document.createElement("code");
|
|
206
|
-
cmd.className = "tg-command";
|
|
207
|
-
cmd.textContent = g.command;
|
|
208
|
-
const copy = ui.button("Copy", "", () => ui.copy(g.command, copy));
|
|
209
|
-
copy.title = "Copy the line. Run it at your shell: the approval or answer is yours.";
|
|
210
|
-
const note = document.createElement("div");
|
|
211
|
-
note.className = "ws-gate-note";
|
|
212
|
-
note.textContent = g.note;
|
|
213
|
-
box.append(cmd, copy, note);
|
|
214
|
-
}
|
|
215
|
-
if (g.job) {
|
|
216
|
-
const links = document.createElement("div");
|
|
217
|
-
links.className = "ws-gate-note";
|
|
218
|
-
links.appendChild(ui.link("job", g.job));
|
|
219
|
-
box.appendChild(links);
|
|
220
|
-
}
|
|
221
|
-
host.appendChild(box);
|
|
222
|
-
}
|
|
208
|
+
for (const g of [...laneGateCards(lane, now), ...laneActionCards(lane, now)]) host.appendChild(gateCardElement(g, ui));
|
|
223
209
|
for (const l of laneLockRows(lane, now)) {
|
|
224
210
|
const row = document.createElement("div");
|
|
225
211
|
row.className = "tg-root tg-lock";
|
|
@@ -233,3 +219,67 @@ export function renderLane(host, lane, polled, now, ui) {
|
|
|
233
219
|
host.appendChild(row);
|
|
234
220
|
}
|
|
235
221
|
}
|
|
222
|
+
|
|
223
|
+
/** One card from laneGateCards or laneActionCards as DOM: title, facts, source, and the line to copy. `doc` is the document (a test hands in its own). */
|
|
224
|
+
export function gateCardElement(g, ui, doc = document) {
|
|
225
|
+
const box = doc.createElement("div");
|
|
226
|
+
box.className = `ws-gate tg-lane-gate tg-${g.tone}`;
|
|
227
|
+
const title = doc.createElement("div");
|
|
228
|
+
title.className = "ws-gate-title";
|
|
229
|
+
title.textContent = g.title;
|
|
230
|
+
const facts = doc.createElement("div");
|
|
231
|
+
facts.className = "ws-gate-facts";
|
|
232
|
+
facts.textContent = g.facts;
|
|
233
|
+
const src = doc.createElement("div");
|
|
234
|
+
src.className = "ws-gate-note";
|
|
235
|
+
src.textContent = `from ${g.source}`;
|
|
236
|
+
box.append(title, facts);
|
|
237
|
+
for (const u of g.uncounted || []) {
|
|
238
|
+
const why = doc.createElement("div");
|
|
239
|
+
why.className = "ws-gate-note";
|
|
240
|
+
why.textContent = u;
|
|
241
|
+
box.appendChild(why);
|
|
242
|
+
}
|
|
243
|
+
box.appendChild(src);
|
|
244
|
+
for (const o of g.overrides || []) {
|
|
245
|
+
const what = doc.createElement("div");
|
|
246
|
+
what.className = "ws-gate-note";
|
|
247
|
+
what.textContent = o.text;
|
|
248
|
+
const cmd = doc.createElement("code");
|
|
249
|
+
cmd.className = "tg-command";
|
|
250
|
+
cmd.textContent = o.command;
|
|
251
|
+
const copy = ui.button("Copy", "", () => ui.copy(o.command, copy));
|
|
252
|
+
copy.title = "Copy the line. Run it at your shell, with your reason: the override is yours.";
|
|
253
|
+
box.append(what, cmd, copy);
|
|
254
|
+
if (o.job) {
|
|
255
|
+
const links = doc.createElement("div");
|
|
256
|
+
links.className = "ws-gate-note";
|
|
257
|
+
links.appendChild(ui.link("job", o.job));
|
|
258
|
+
box.appendChild(links);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if (g.overrideNote) {
|
|
262
|
+
const n = doc.createElement("div");
|
|
263
|
+
n.className = "ws-gate-note";
|
|
264
|
+
n.textContent = g.overrideNote;
|
|
265
|
+
box.appendChild(n);
|
|
266
|
+
}
|
|
267
|
+
if (g.command) {
|
|
268
|
+
const cmd = doc.createElement("code");
|
|
269
|
+
cmd.className = "tg-command";
|
|
270
|
+
cmd.textContent = g.command;
|
|
271
|
+
const copy = ui.button("Copy", "", () => ui.copy(g.command, copy));
|
|
272
|
+
copy.title = "Copy the line. Run it at your shell: the approval or answer is yours.";
|
|
273
|
+
const note = doc.createElement("div");
|
|
274
|
+
note.className = "ws-gate-note";
|
|
275
|
+
note.textContent = g.note;
|
|
276
|
+
box.append(cmd, copy, note);
|
|
277
|
+
}
|
|
278
|
+
if (g.job) {
|
|
279
|
+
const links = doc.createElement("div");
|
|
280
|
+
links.className = "ws-gate-note";
|
|
281
|
+
links.appendChild(ui.link("job", g.job));
|
|
282
|
+
box.appendChild(links);
|
|
283
|
+
}
|
|
284
|
+
return box;
|
|
285
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { holderWords, laneGateCards, laneLegend, laneLockRows, sourceWords } from "./terragucci-lifecycle.js";
|
|
2
|
+
import { holderWords, laneActionCards, laneGateCards, laneLegend, laneLockRows, sourceWords } from "./terragucci-lifecycle.js";
|
|
3
3
|
|
|
4
4
|
const NOW = new Date("2026-10-09T12:00:00Z");
|
|
5
5
|
const source = { branch: "chant/lifecycle", commit: "1a2b3c4d5e6f7a8b", committed: "2026-10-09T10:00:00Z", path: "_gates/tf-apply.jsonl" };
|
|
@@ -93,3 +93,31 @@ describe("the chant/lifecycle lane, dated (#505)", () => {
|
|
|
93
93
|
expect(l.title).toContain("chant/lifecycle 1a2b3c4d5e6f");
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
|
+
|
|
97
|
+
describe("a day-2 action's gate card (behold#1037)", () => {
|
|
98
|
+
const DA = `sha256:${"a".repeat(64)}`;
|
|
99
|
+
const base = { op: "tf-action", gate: "apps/orders:module.app.action.aws_lambda_invoke.rotate", root: "apps/orders", address: "module.app.action.aws_lambda_invoke.rotate", name: "rotate", requester: "lee", digest: DA, approvalMode: { mode: "ledger", from: "base" }, source: { ...source, path: "_gates/tf-action.jsonl" } };
|
|
100
|
+
const waiting = { ...base, state: "waiting", pending: { timestamp: "2026-10-09T10:00:00Z", expiresAt: "2099-01-01T00:00:00Z", url: "https://github.com/acme/shop/actions/runs/401" }, command: `npx terragucci approve action apps/orders --plan ${DA}`, uncounted: [{ approval: { by: "lee", at: "2026-10-09T10:30:00Z", signed: false }, reason: "the requester's own approval never counts" }] };
|
|
101
|
+
const applied = { ...base, gate: "apps/search:module.app.action.aws_lambda_invoke.rotate", root: "apps/search", state: "applied", approval: { by: "dana", at: "2026-10-09T11:00:00Z", signed: false }, applied: { at: "2026-10-09T11:05:00Z", approvedAt: "2026-10-09T11:00:00Z", approvedBy: "dana", result: "ok", finished: "2026-10-09T11:06:00Z", exit: 0 } };
|
|
102
|
+
|
|
103
|
+
it("shows the digest, the waiting state and the approve line for a second person, with no button but Copy", () => {
|
|
104
|
+
const [c] = laneActionCards(lane({ actions: [waiting, applied] }), NOW, { root: "apps/orders" });
|
|
105
|
+
expect(c.title).toBe("rotate on apps/orders waits for an approval by someone other than lee");
|
|
106
|
+
expect(c.tone).toBe("wave");
|
|
107
|
+
expect(c.command).toBe(`npx terragucci approve action apps/orders --plan ${DA}`);
|
|
108
|
+
expect(c.note).toContain("a person other than the one who asked");
|
|
109
|
+
expect(c.facts).toContain(`plan ${"a".repeat(12)}`);
|
|
110
|
+
expect(c.uncounted).toEqual(["lee's approval of this plan does not count: the requester's own approval never counts"]);
|
|
111
|
+
expect(c.job).toBe("https://github.com/acme/shop/actions/runs/401");
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it("shows a finished run's ok, and nothing for a lane without actions", () => {
|
|
115
|
+
const cards = laneActionCards(lane({ actions: [waiting, applied] }), NOW);
|
|
116
|
+
expect(cards.map((c) => c.root)).toEqual(["apps/orders", "apps/search"]);
|
|
117
|
+
expect(cards[1]).toMatchObject({ title: "rotate on apps/search ran: ok", tone: "ok" });
|
|
118
|
+
expect(cards[1].command).toBeUndefined();
|
|
119
|
+
expect(cards[1].facts).toContain("ran 11:06 UTC, 54m ago, exit 0");
|
|
120
|
+
expect(laneActionCards(lane(), NOW)).toEqual([]);
|
|
121
|
+
expect(laneActionCards(lane({ found: false, actions: [waiting] }), NOW)).toEqual([]);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
@@ -24,18 +24,54 @@ const KIND_WORDS = {
|
|
|
24
24
|
"state-export": "state exported",
|
|
25
25
|
"ephemeral-apply": "ephemeral copy applied",
|
|
26
26
|
"ephemeral-destroy": "ephemeral copy destroyed",
|
|
27
|
+
"unrecorded-write": "write no run recorded",
|
|
28
|
+
"agent-run": "agent run",
|
|
29
|
+
request: "app requested",
|
|
30
|
+
"action-requested": "action requested",
|
|
31
|
+
action: "action",
|
|
27
32
|
};
|
|
28
33
|
|
|
34
|
+
/** behold#1037: an action entry's name, root and address, from its detail, else its gate `<root>:<address>`. */
|
|
35
|
+
export function actionOf(entry) {
|
|
36
|
+
const d = entry.detail || {};
|
|
37
|
+
const gate = String(entry.what || "");
|
|
38
|
+
const address = typeof d.address === "string" ? d.address : gate.slice(gate.indexOf(":") + 1);
|
|
39
|
+
const root = typeof d.root === "string" ? d.root : gate.endsWith(`:${address}`) ? gate.slice(0, -address.length - 1) : (entry.roots || [])[0] || "";
|
|
40
|
+
return { name: address.split(".").pop() || address, root, address };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The page of the CI run behind an entry, when the record names its run id
|
|
45
|
+
* and its ledger commit is on a forge page: `<repo>/actions/runs/<id>`, as
|
|
46
|
+
* GitHub and Forgejo both lay it out.
|
|
47
|
+
*/
|
|
48
|
+
export function runUrlOf(entry) {
|
|
49
|
+
const id = entry.run && entry.run.run_id;
|
|
50
|
+
const url = entry.evidence && entry.evidence.url;
|
|
51
|
+
if (!id || !/^\d+$/.test(String(id)) || typeof url !== "string") return null;
|
|
52
|
+
const m = /^(https?:\/\/[^/]+\/[^/]+\/[^/]+)\/commit\/[0-9a-f]+$/i.exec(url);
|
|
53
|
+
return m ? `${m[1]}/actions/runs/${id}` : null;
|
|
54
|
+
}
|
|
55
|
+
|
|
29
56
|
/** The tone an entry is drawn in: a refusal or a failure stands out, a wait is pending, the rest is quiet. */
|
|
30
57
|
export function toneOf(entry) {
|
|
31
58
|
if (entry.kind === "refused" || entry.result === "failed" || entry.result === "denied") return "failed";
|
|
32
|
-
if (entry.result === "waiting" || entry.kind === "approval-requested" || entry.kind === "override-requested") return "wave";
|
|
59
|
+
if (entry.result === "waiting" || entry.kind === "approval-requested" || entry.kind === "override-requested" || entry.kind === "action-requested") return "wave";
|
|
33
60
|
if (entry.kind.endsWith("-revoked")) return "drift";
|
|
34
61
|
return "ok";
|
|
35
62
|
}
|
|
36
63
|
|
|
37
|
-
/** One entry as a line: "approved wave-2 by dana · plan 4be1…". */
|
|
64
|
+
/** One entry as a line: "approved wave-2 by dana · plan 4be1…", or for an action "rotate on apps/orders, approved by dana, ok". */
|
|
38
65
|
export function entryLine(entry) {
|
|
66
|
+
if (entry.kind === "action") {
|
|
67
|
+
const a = actionOf(entry);
|
|
68
|
+
return `${a.name} on ${a.root}${entry.who ? `, approved by ${entry.who}` : ""}${entry.result ? `, ${entry.result}` : ""}`;
|
|
69
|
+
}
|
|
70
|
+
if (entry.kind === "action-requested") {
|
|
71
|
+
const a = actionOf(entry);
|
|
72
|
+
const digest = entry.digest ? ` · plan ${entry.digest.replace(/^(jcs1-)?sha256:/, "").slice(0, 12)}` : "";
|
|
73
|
+
return `${a.name} on ${a.root} requested${entry.who ? ` by ${entry.who}` : ""}${entry.result ? `, ${entry.result}` : ""}${digest}`;
|
|
74
|
+
}
|
|
39
75
|
const what = KIND_WORDS[entry.kind] || entry.kind;
|
|
40
76
|
const by = entry.who ? ` by ${entry.who}` : "";
|
|
41
77
|
// Signing is opt-in: an unsigned approval is the normal case and goes unmarked.
|
|
@@ -63,6 +99,7 @@ export function laneRows(answer, { root = null, now = new Date() } = {}) {
|
|
|
63
99
|
const links = [];
|
|
64
100
|
if (e.run && e.run.report) links.push({ text: "report", href: hrefOf(answer, e.run.report) });
|
|
65
101
|
if (e.run && e.run.job_url) links.push({ text: "job", href: e.run.job_url });
|
|
102
|
+
else if (runUrlOf(e)) links.push({ text: "run", href: runUrlOf(e) });
|
|
66
103
|
if (e.evidence && e.evidence.source === "ledger" && /^https?:\/\//.test(e.evidence.url || "")) links.push({ text: "ledger commit", href: e.evidence.url });
|
|
67
104
|
return {
|
|
68
105
|
id: e.id,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { entryLine, laneLegend, laneRows, rootOfCard, toneOf } from "./terragucci-timeline.js";
|
|
2
|
+
import { actionOf, entryLine, laneLegend, laneRows, rootOfCard, runUrlOf, toneOf } from "./terragucci-timeline.js";
|
|
3
3
|
|
|
4
4
|
// #506: the lane's words, from answers shaped like /api/terragucci/timeline.
|
|
5
5
|
const NOW = new Date("2026-10-08T13:31:00Z");
|
|
@@ -54,3 +54,44 @@ describe("the timeline lane (#506)", () => {
|
|
|
54
54
|
expect(laneLegend({ error: "audit.jsonl in /r, line 2, is not JSON.", code: "terragucci-report" })).toContain("line 2");
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
|
+
|
|
58
|
+
describe("a day-2 action's history (behold#1037)", () => {
|
|
59
|
+
const GATE = "apps/orders:module.app.action.aws_lambda_invoke.rotate";
|
|
60
|
+
const DIGEST = `sha256:${"a1".repeat(32)}`;
|
|
61
|
+
const action = {
|
|
62
|
+
id: "act",
|
|
63
|
+
kind: "action",
|
|
64
|
+
at: "2026-10-08T10:30:00.000Z",
|
|
65
|
+
who: "dana",
|
|
66
|
+
what: GATE,
|
|
67
|
+
digest: DIGEST,
|
|
68
|
+
result: "ok",
|
|
69
|
+
roots: ["apps/orders"],
|
|
70
|
+
run: { run_id: "402" },
|
|
71
|
+
evidence: { source: "ledger", path: "_gates/tf-action/applied.jsonl", url: `https://github.com/acme/shop/commit/${"b".repeat(40)}` },
|
|
72
|
+
detail: { root: "apps/orders", address: "module.app.action.aws_lambda_invoke.rotate", approved_by: "dana", requester: "lee" },
|
|
73
|
+
};
|
|
74
|
+
const asked = { ...action, id: "ask", kind: "action-requested", at: "2026-10-08T10:00:00.000Z", who: "lee", result: "waiting", run: { run_id: "401" }, evidence: { ...action.evidence, path: "_gates/tf-action.jsonl" } };
|
|
75
|
+
|
|
76
|
+
it("renders an action entry as its name on its root, who approved it and how it ended, with its run link", () => {
|
|
77
|
+
expect(entryLine(action)).toBe("rotate on apps/orders, approved by dana, ok");
|
|
78
|
+
const rows = laneRows({ ...answer, entries: [action, asked] }, { root: "apps/orders", now: NOW });
|
|
79
|
+
expect(rows[0].text).toBe("rotate on apps/orders, approved by dana, ok");
|
|
80
|
+
expect(rows[0].tone).toBe("ok");
|
|
81
|
+
expect(rows[0].links).toEqual([
|
|
82
|
+
{ text: "run", href: "https://github.com/acme/shop/actions/runs/402" },
|
|
83
|
+
{ text: "ledger commit", href: action.evidence.url },
|
|
84
|
+
]);
|
|
85
|
+
expect(runUrlOf(action)).toBe("https://github.com/acme/shop/actions/runs/402");
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it("renders the request as who asked, waiting, with its digest, and a failed run as failed", () => {
|
|
89
|
+
expect(entryLine(asked)).toBe(`rotate on apps/orders requested by lee, waiting · plan ${"a1".repeat(6)}`);
|
|
90
|
+
expect(toneOf(asked)).toBe("wave");
|
|
91
|
+
expect(toneOf({ ...action, result: "failed" })).toBe("failed");
|
|
92
|
+
expect(entryLine({ ...action, result: "failed" })).toBe("rotate on apps/orders, approved by dana, failed");
|
|
93
|
+
// An entry with no detail still reads from its gate.
|
|
94
|
+
expect(actionOf({ what: GATE, roots: [] })).toEqual({ name: "rotate", root: "apps/orders", address: "module.app.action.aws_lambda_invoke.rotate" });
|
|
95
|
+
expect(runUrlOf({ ...action, evidence: { source: "ledger" } })).toBeNull();
|
|
96
|
+
});
|
|
97
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// behold#1068: the pre-paint theme, a classic script so it runs in <head> before the first frame.
|
|
2
|
+
// Loaded by <script src> (index.html), because a webview's content security policy blocks an inline one.
|
|
3
|
+
// The kiosk's frame (?bare=1) paints nothing until its theme is applied, so the kiosk's own ground shows through:
|
|
4
|
+
// the stylesheet's default --bg is white, and a first load with no stored paint flashed it over a dark pane.
|
|
5
|
+
try { if (/[?&]bare=1(&|$)/.test(location.search)) document.documentElement.style.setProperty("--bg", "transparent"); } catch (e) { /* the default paints */ }
|
|
6
|
+
try {
|
|
7
|
+
var beholdTheme = localStorage.getItem("behold.theme");
|
|
8
|
+
var beholdPaint = beholdTheme && JSON.parse(localStorage.getItem("behold.theme.paint") || "null");
|
|
9
|
+
if (beholdPaint && beholdPaint.name === beholdTheme && beholdPaint.vars) {
|
|
10
|
+
var beholdRoot = document.documentElement;
|
|
11
|
+
for (var k in beholdPaint.vars) if (k.slice(0, 2) === "--") beholdRoot.style.setProperty(k, beholdPaint.vars[k]);
|
|
12
|
+
if (beholdPaint.scheme) beholdRoot.style.setProperty("color-scheme", beholdPaint.scheme);
|
|
13
|
+
}
|
|
14
|
+
} catch (e) { /* private mode or a bad record: the default paints */ }
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// The aws member's stack is named for the workspace, so it doesn't share the
|
|
2
|
-
// stack named after the environment ("local") with the dns member.
|
|
3
|
-
export default {
|
|
4
|
-
lexicons: ["aws"],
|
|
5
|
-
sourceDir: "src",
|
|
6
|
-
environments: [{ name: "local", endpoint: "http://localhost:4566" }],
|
|
7
|
-
stacks: [{ name: "three-cloud-aws", src: "src" }],
|
|
8
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { phase, type Component } from "@intentius/chant/components";
|
|
2
|
-
|
|
3
|
-
// The aws member as one component: build its template, then apply it as the
|
|
4
|
-
// stack three-cloud-aws, the name the dns member reads its output from.
|
|
5
|
-
export const site: Component = {
|
|
6
|
-
name: "site",
|
|
7
|
-
archetype: "infra",
|
|
8
|
-
dependsOn: [],
|
|
9
|
-
deploy: [
|
|
10
|
-
phase("Build", [{ kind: "shell", cmd: "npx chant build src -o dist/site.json", reason: "the template cfn-deploy applies is this member's own build" }]),
|
|
11
|
-
phase("Apply", [{ kind: "cfn-deploy", stack: "three-cloud-aws", template: "dist/site.json" }]),
|
|
12
|
-
],
|
|
13
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { FargateAlb, VpcDefault, output } from "@intentius/chant-lexicon-aws";
|
|
2
|
-
|
|
3
|
-
// The website on ECS Fargate in us-east-1, behind its own load balancer: the
|
|
4
|
-
// ALB's DNS name is the stable hostname Route 53 points at. The network is
|
|
5
|
-
// declared here as production has it: a VPC across two zones, public subnets
|
|
6
|
-
// for the load balancer and private ones for the tasks, which reach out
|
|
7
|
-
// through a NAT gateway.
|
|
8
|
-
export const network = VpcDefault({
|
|
9
|
-
cidr: "10.20.0.0/16",
|
|
10
|
-
publicSubnet1Cidr: "10.20.0.0/24",
|
|
11
|
-
publicSubnet2Cidr: "10.20.1.0/24",
|
|
12
|
-
privateSubnet1Cidr: "10.20.10.0/24",
|
|
13
|
-
privateSubnet2Cidr: "10.20.11.0/24",
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
export const web = FargateAlb({
|
|
17
|
-
image: "traefik/whoami:v1.10",
|
|
18
|
-
containerPort: 80,
|
|
19
|
-
desiredCount: 1,
|
|
20
|
-
vpcId: network.vpc.VpcId,
|
|
21
|
-
publicSubnetIds: [network.publicSubnet1.SubnetId, network.publicSubnet2.SubnetId],
|
|
22
|
-
privateSubnetIds: [network.privateSubnet1.SubnetId, network.privateSubnet2.SubnetId],
|
|
23
|
-
logRetentionDays: 7,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
// The dns member reads this as its `awsEndpoint` parameter.
|
|
27
|
-
export const awsEndpoint = output(web.alb.DNSName, "awsEndpoint");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default { lexicons: ["azure"], sourceDir: "src", environments: [{ name: "local", endpoint: "http://localhost:4577" }] };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { phase, type Component } from "@intentius/chant/components";
|
|
2
|
-
|
|
3
|
-
// The azure member as one component: build its ARM template, then deploy it
|
|
4
|
-
// into the resource group named after the environment.
|
|
5
|
-
export const site: Component = {
|
|
6
|
-
name: "site",
|
|
7
|
-
archetype: "infra",
|
|
8
|
-
dependsOn: [],
|
|
9
|
-
deploy: [
|
|
10
|
-
phase("Build", [{ kind: "shell", cmd: "npx chant build src -o dist/site.json", reason: "the template arm-deploy applies is this member's own build" }]),
|
|
11
|
-
phase("Apply", [{ kind: "arm-deploy", template: "dist/site.json", resourceGroup: "local", location: "westeurope", noRollback: "a failed deploy is fixed forward by deploying the template again" }]),
|
|
12
|
-
],
|
|
13
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ContainerAppNetwork, ContainerAppSite, output } from "@intentius/chant-lexicon-azure";
|
|
2
|
-
|
|
3
|
-
// The website on Azure Container Apps in West Europe, from the lexicon's
|
|
4
|
-
// composites: its network, and the site in it.
|
|
5
|
-
export const network = ContainerAppNetwork({ name: "three-cloud", location: "westeurope", addressSpace: "10.40.0.0/16", subnetPrefix: "10.40.0.0/23" });
|
|
6
|
-
|
|
7
|
-
export const web = ContainerAppSite({
|
|
8
|
-
name: "three-cloud",
|
|
9
|
-
app: "web",
|
|
10
|
-
location: "westeurope",
|
|
11
|
-
subnetId: network.subnet.id as unknown as string,
|
|
12
|
-
image: "traefik/whoami:v1.10",
|
|
13
|
-
port: 80,
|
|
14
|
-
replicas: 1,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
// The dns member reads this as its `azureEndpoint` parameter.
|
|
18
|
-
export const azureEndpoint = output(web.containerApp.configuration_ingress_fqdn, "azureEndpoint");
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|