@knpkv/alchemy-console 0.4.2 → 0.5.1
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/README.md +117 -15
- package/dist/api.d.ts +87 -16
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +7 -0
- package/dist/api.js.map +1 -1
- package/dist/client/assets/{index-CHwWf6VU.css → index-D5bP19PT.css} +1 -1
- package/dist/client/assets/index-D9T2ytki.js +58 -0
- package/dist/client/index.html +2 -2
- package/dist/main.js +2 -1
- package/dist/main.js.map +1 -1
- package/dist/plan.d.ts +109 -0
- package/dist/plan.d.ts.map +1 -0
- package/dist/plan.js +40 -0
- package/dist/plan.js.map +1 -0
- package/dist/presentation/PlanView.d.ts +10 -0
- package/dist/presentation/PlanView.d.ts.map +1 -0
- package/dist/presentation/PlanView.js +70 -0
- package/dist/presentation/PlanView.js.map +1 -0
- package/dist/presentation/StackDetailView.d.ts +4 -1
- package/dist/presentation/StackDetailView.d.ts.map +1 -1
- package/dist/presentation/StackDetailView.js +9 -3
- package/dist/presentation/StackDetailView.js.map +1 -1
- package/dist/presentation/detail-model.d.ts +1 -1
- package/dist/presentation/detail-model.d.ts.map +1 -1
- package/dist/server/Catalog.d.ts +1 -0
- package/dist/server/Catalog.d.ts.map +1 -1
- package/dist/server/Catalog.js +7 -1
- package/dist/server/Catalog.js.map +1 -1
- package/dist/server/HttpApplication.d.ts +2 -1
- package/dist/server/HttpApplication.d.ts.map +1 -1
- package/dist/server/HttpApplication.js +3 -1
- package/dist/server/HttpApplication.js.map +1 -1
- package/dist/server/Launch.d.ts +1 -1
- package/dist/server/Launch.d.ts.map +1 -1
- package/dist/server/PlanReader.d.ts +19 -0
- package/dist/server/PlanReader.d.ts.map +1 -0
- package/dist/server/PlanReader.js +202 -0
- package/dist/server/PlanReader.js.map +1 -0
- package/dist/server/Server.d.ts +1 -1
- package/dist/server/Server.d.ts.map +1 -1
- package/dist/server/plan/archive.d.ts +10 -0
- package/dist/server/plan/archive.d.ts.map +1 -0
- package/dist/server/plan/archive.js +62 -0
- package/dist/server/plan/archive.js.map +1 -0
- package/dist/server/plan/github.d.ts +106 -0
- package/dist/server/plan/github.d.ts.map +1 -0
- package/dist/server/plan/github.js +157 -0
- package/dist/server/plan/github.js.map +1 -0
- package/dist/server/plan/receipt.d.ts +153 -0
- package/dist/server/plan/receipt.d.ts.map +1 -0
- package/dist/server/plan/receipt.js +112 -0
- package/dist/server/plan/receipt.js.map +1 -0
- package/dist/views/index.js +547 -264
- package/dist/views/style.css +1 -1
- package/dist/views.d.ts +3 -0
- package/dist/views.d.ts.map +1 -1
- package/dist/views.js +1 -0
- package/dist/views.js.map +1 -1
- package/package.json +3 -3
- package/dist/client/assets/index-DbklFcSg.js +0 -58
package/dist/views/index.js
CHANGED
|
@@ -1,33 +1,307 @@
|
|
|
1
|
-
import { Button as e, Notice as t, Skeleton as n,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
//#region src/presentation/
|
|
7
|
-
var
|
|
1
|
+
import { Button as e, Notice as t, Skeleton as n, StateLabel as r, Tabs as i, Text as a } from "@knpkv/rly/primitives";
|
|
2
|
+
import { DateTime as o, Option as s, Schema as c } from "effect";
|
|
3
|
+
import { useId as l, useMemo as u, useState as d } from "react";
|
|
4
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
5
|
+
import { Icon as h } from "@knpkv/rly/foundations";
|
|
6
|
+
//#region src/presentation/PlanView.tsx
|
|
7
|
+
var g = ({ href: e }) => /* @__PURE__ */ m("a", {
|
|
8
|
+
className: "ac-detail-link ac-plan-run",
|
|
9
|
+
href: e,
|
|
10
|
+
target: "_blank",
|
|
11
|
+
rel: "noopener noreferrer",
|
|
12
|
+
"aria-label": "View run on GitHub, opens in a new tab",
|
|
13
|
+
children: ["View run on GitHub ", /* @__PURE__ */ p("span", {
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
children: "↗"
|
|
16
|
+
})]
|
|
17
|
+
}), _ = (e, t) => {
|
|
18
|
+
if (t) return `${e.ageDays} days ago`;
|
|
19
|
+
let n = s.getOrNull(c.decodeUnknownOption(c.DateTimeUtcFromString)(e.publishedAt));
|
|
20
|
+
if (n === null) return "Unknown";
|
|
21
|
+
let r = o.format(n, {
|
|
22
|
+
hour: "2-digit",
|
|
23
|
+
minute: "2-digit",
|
|
24
|
+
hourCycle: "h23",
|
|
25
|
+
timeZone: "UTC",
|
|
26
|
+
locale: "en-GB"
|
|
27
|
+
});
|
|
28
|
+
return e.ageDays === 0 ? `${r} today` : `${o.format(n, {
|
|
29
|
+
day: "numeric",
|
|
30
|
+
month: "short",
|
|
31
|
+
timeZone: "UTC",
|
|
32
|
+
locale: "en-GB"
|
|
33
|
+
})} · ${r}`;
|
|
34
|
+
}, v = ({ expired: e = !1, showBase: t = !0, source: n }) => /* @__PURE__ */ m("p", {
|
|
35
|
+
className: "ac-plan-source",
|
|
36
|
+
children: [
|
|
37
|
+
n.pr === null ? null : /* @__PURE__ */ m("span", { children: ["PR #", n.pr] }),
|
|
38
|
+
/* @__PURE__ */ m("span", { children: ["· head ", n.head] }),
|
|
39
|
+
t && n.base !== null ? /* @__PURE__ */ m("span", { children: ["· base ", n.base] }) : null,
|
|
40
|
+
t || e ? /* @__PURE__ */ m("span", { children: ["· published ", _(n, e)] }) : null
|
|
41
|
+
]
|
|
42
|
+
}), y = ({ children: e }) => /* @__PURE__ */ p("small", {
|
|
43
|
+
className: "ac-plan-mobile-label",
|
|
44
|
+
"aria-hidden": "true",
|
|
45
|
+
children: e
|
|
46
|
+
}), b = ({ plan: e, title: t }) => {
|
|
47
|
+
let n = l(), i = e.rows.filter((e) => e.action === "update").length, o = e.rows.length - i;
|
|
48
|
+
return /* @__PURE__ */ m(f, { children: [
|
|
49
|
+
/* @__PURE__ */ m("div", {
|
|
50
|
+
className: "ac-plan-heading",
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ p(a, {
|
|
53
|
+
as: "h2",
|
|
54
|
+
id: n,
|
|
55
|
+
className: "ac-plan-title",
|
|
56
|
+
children: t
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ m("div", {
|
|
59
|
+
className: "ac-plan-source-row",
|
|
60
|
+
children: [/* @__PURE__ */ p(v, { source: e.source }), /* @__PURE__ */ p(g, { href: e.source.runHref })]
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ p("small", {
|
|
63
|
+
className: "ac-plan-assurance",
|
|
64
|
+
children: "Published by CI. Plan data was produced by the pull request’s code; this console doesn’t run it."
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
}),
|
|
68
|
+
e.stale === null ? null : /* @__PURE__ */ m("div", {
|
|
69
|
+
className: "ac-plan-notice",
|
|
70
|
+
role: "note",
|
|
71
|
+
children: [/* @__PURE__ */ p("b", { children: "This plan may be out of date" }), /* @__PURE__ */ p("span", {
|
|
72
|
+
className: "ac-plan-reason",
|
|
73
|
+
children: e.stale === "base" ? "Its base doesn’t match the latest main commit CI has seen." : e.stale === "failed" ? "A newer plan run failed." : `Published ${e.source.ageDays} ${e.source.ageDays === 1 ? "day" : "days"} ago.`
|
|
74
|
+
})]
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ p("div", {
|
|
77
|
+
className: "ac-plan-summary",
|
|
78
|
+
children: i === 0 ? "No changes in this plan." : `${i} ${i === 1 ? "update" : "updates"} · ${o} unchanged`
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ m("table", {
|
|
81
|
+
role: "table",
|
|
82
|
+
className: "ac-plan-table",
|
|
83
|
+
"aria-labelledby": n,
|
|
84
|
+
children: [/* @__PURE__ */ p("thead", {
|
|
85
|
+
role: "rowgroup",
|
|
86
|
+
children: /* @__PURE__ */ m("tr", {
|
|
87
|
+
role: "row",
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ p("th", {
|
|
90
|
+
role: "columnheader",
|
|
91
|
+
scope: "col",
|
|
92
|
+
children: "Resource"
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ p("th", {
|
|
95
|
+
role: "columnheader",
|
|
96
|
+
scope: "col",
|
|
97
|
+
children: "Type"
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ p("th", {
|
|
100
|
+
role: "columnheader",
|
|
101
|
+
scope: "col",
|
|
102
|
+
children: "Change"
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ p("th", {
|
|
105
|
+
role: "columnheader",
|
|
106
|
+
scope: "col",
|
|
107
|
+
children: "Changed properties"
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
})
|
|
111
|
+
}), /* @__PURE__ */ p("tbody", {
|
|
112
|
+
role: "rowgroup",
|
|
113
|
+
children: e.rows.map((e) => /* @__PURE__ */ m("tr", {
|
|
114
|
+
role: "row",
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ m("th", {
|
|
117
|
+
role: "rowheader",
|
|
118
|
+
scope: "row",
|
|
119
|
+
children: [/* @__PURE__ */ p(y, { children: "Resource" }), /* @__PURE__ */ p("b", {
|
|
120
|
+
className: "ac-plan-resource",
|
|
121
|
+
children: e.fqn
|
|
122
|
+
})]
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ m("td", {
|
|
125
|
+
role: "cell",
|
|
126
|
+
children: [/* @__PURE__ */ p(y, { children: "Type" }), /* @__PURE__ */ p("span", {
|
|
127
|
+
className: "ac-plan-type",
|
|
128
|
+
title: e.resourceType,
|
|
129
|
+
children: e.resourceType
|
|
130
|
+
})]
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ m("td", {
|
|
133
|
+
role: "cell",
|
|
134
|
+
children: [/* @__PURE__ */ p(y, { children: "Change" }), /* @__PURE__ */ p("span", { children: /* @__PURE__ */ p(r, {
|
|
135
|
+
label: e.action === "update" ? "Update" : "No change",
|
|
136
|
+
tone: e.action === "update" ? "caution" : "neutral",
|
|
137
|
+
size: "compact"
|
|
138
|
+
}) })]
|
|
139
|
+
}),
|
|
140
|
+
/* @__PURE__ */ m("td", {
|
|
141
|
+
role: "cell",
|
|
142
|
+
children: [/* @__PURE__ */ p(y, { children: "Changed properties" }), e.changedKeys.length === 0 ? /* @__PURE__ */ p("span", {
|
|
143
|
+
className: "ac-plan-muted",
|
|
144
|
+
"aria-label": "None",
|
|
145
|
+
children: "—"
|
|
146
|
+
}) : /* @__PURE__ */ p("span", {
|
|
147
|
+
className: "ac-plan-keys",
|
|
148
|
+
children: e.changedKeys.map((e, t) => /* @__PURE__ */ p("code", { children: e }, `${e}-${t}`))
|
|
149
|
+
})]
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
}, e.fqn))
|
|
153
|
+
})]
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ m("footer", {
|
|
156
|
+
className: "ac-plan-footer",
|
|
157
|
+
children: [/* @__PURE__ */ p("span", { children: "CI publishes property names only; values aren’t shown." }), /* @__PURE__ */ m("span", {
|
|
158
|
+
className: "ac-plan-digest",
|
|
159
|
+
children: ["Digest ", e.digest]
|
|
160
|
+
})]
|
|
161
|
+
})
|
|
162
|
+
] });
|
|
163
|
+
}, x = {
|
|
164
|
+
NotPublished: ["No CI plan for this stack yet.", "A plan appears here after CI plans a pull request that touches this stack."],
|
|
165
|
+
NotPublishing: ["CI isn’t publishing plans right now.", "Plans resume here once infrastructure CI publishes them again."],
|
|
166
|
+
NotConnected: ["CI plans aren’t connected for this stack.", "Plans can be shown for stacks that infrastructure CI plans. Set up CI plan reading to see them here."],
|
|
167
|
+
Expired: ["The latest CI plan has expired.", "CI keeps plans for 14 days. A new one appears after the next pull request plan."],
|
|
168
|
+
Unverified: ["This CI plan couldn’t be verified, so it isn’t shown.", "Its contents didn’t match what CI recorded."],
|
|
169
|
+
Unreachable: ["Couldn’t reach CI to read plans.", "No plan is shown until CI can be read."],
|
|
170
|
+
Refused: ["CI refused access to plans.", "Ask whoever manages this console’s CI access."]
|
|
171
|
+
}, S = ({ onReadAgain: t, state: i }) => {
|
|
172
|
+
if (i._tag === "Ready") return /* @__PURE__ */ p("section", {
|
|
173
|
+
className: "ac-plan",
|
|
174
|
+
"aria-label": "Latest CI plan",
|
|
175
|
+
children: /* @__PURE__ */ p(b, {
|
|
176
|
+
plan: i.plan,
|
|
177
|
+
title: "Latest CI plan"
|
|
178
|
+
})
|
|
179
|
+
});
|
|
180
|
+
if (i._tag === "Loading") return /* @__PURE__ */ m("section", {
|
|
181
|
+
className: "ac-plan",
|
|
182
|
+
"aria-label": "Latest CI plan",
|
|
183
|
+
"aria-busy": "true",
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ m("div", {
|
|
186
|
+
className: "ac-plan-loading-heading",
|
|
187
|
+
children: [
|
|
188
|
+
/* @__PURE__ */ p(a, {
|
|
189
|
+
as: "h2",
|
|
190
|
+
className: "ac-plan-title",
|
|
191
|
+
children: "Latest CI plan"
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ p(n, {
|
|
194
|
+
variant: "text",
|
|
195
|
+
width: "18rem",
|
|
196
|
+
decorative: !0
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ p(n, {
|
|
199
|
+
variant: "text",
|
|
200
|
+
width: "10rem",
|
|
201
|
+
decorative: !0
|
|
202
|
+
})
|
|
203
|
+
]
|
|
204
|
+
}),
|
|
205
|
+
/* @__PURE__ */ p("p", {
|
|
206
|
+
role: "status",
|
|
207
|
+
className: "ac-plan-loading-copy",
|
|
208
|
+
children: "Reading the latest CI plan…"
|
|
209
|
+
}),
|
|
210
|
+
/* @__PURE__ */ p("div", {
|
|
211
|
+
className: "ac-plan-skeletons",
|
|
212
|
+
children: [
|
|
213
|
+
1,
|
|
214
|
+
2,
|
|
215
|
+
3,
|
|
216
|
+
4
|
|
217
|
+
].map((e) => /* @__PURE__ */ p(n, {
|
|
218
|
+
variant: "block",
|
|
219
|
+
height: "3.5rem",
|
|
220
|
+
decorative: !0
|
|
221
|
+
}, e))
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
});
|
|
225
|
+
if (i._tag === "Failed") return /* @__PURE__ */ m("section", {
|
|
226
|
+
className: "ac-plan",
|
|
227
|
+
"aria-label": "Latest CI plan",
|
|
228
|
+
children: [
|
|
229
|
+
/* @__PURE__ */ p(a, {
|
|
230
|
+
as: "h2",
|
|
231
|
+
className: "ac-plan-title",
|
|
232
|
+
children: "Latest CI plan"
|
|
233
|
+
}),
|
|
234
|
+
/* @__PURE__ */ m("div", {
|
|
235
|
+
className: "ac-plan-notice ac-plan-failed",
|
|
236
|
+
role: "status",
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ p(r, {
|
|
239
|
+
label: "Failed",
|
|
240
|
+
tone: "critical",
|
|
241
|
+
size: "compact"
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ p("b", { children: "The latest CI plan run failed." }),
|
|
244
|
+
/* @__PURE__ */ p(g, { href: i.runHref })
|
|
245
|
+
]
|
|
246
|
+
}),
|
|
247
|
+
i.lastPublished === null ? null : /* @__PURE__ */ p(b, {
|
|
248
|
+
plan: i.lastPublished,
|
|
249
|
+
title: "Last published plan"
|
|
250
|
+
})
|
|
251
|
+
]
|
|
252
|
+
});
|
|
253
|
+
let [o, s] = x[i._tag], c = i._tag === "Expired" || i._tag === "Unverified" ? i.source : null;
|
|
254
|
+
return /* @__PURE__ */ m("section", {
|
|
255
|
+
className: "ac-plan",
|
|
256
|
+
"aria-label": "Latest CI plan",
|
|
257
|
+
children: [/* @__PURE__ */ p(a, {
|
|
258
|
+
as: "h2",
|
|
259
|
+
className: "ac-plan-title",
|
|
260
|
+
children: "Latest CI plan"
|
|
261
|
+
}), /* @__PURE__ */ m("div", {
|
|
262
|
+
className: "ac-plan-empty",
|
|
263
|
+
role: "status",
|
|
264
|
+
children: [
|
|
265
|
+
/* @__PURE__ */ p("h3", { children: o }),
|
|
266
|
+
/* @__PURE__ */ p("p", { children: s }),
|
|
267
|
+
c === null ? null : /* @__PURE__ */ p(v, {
|
|
268
|
+
source: c,
|
|
269
|
+
expired: i._tag === "Expired",
|
|
270
|
+
showBase: !1
|
|
271
|
+
}),
|
|
272
|
+
i._tag === "Unverified" && c !== null ? /* @__PURE__ */ p(g, { href: c.runHref }) : null,
|
|
273
|
+
i._tag === "Unreachable" ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(e, {
|
|
274
|
+
variant: "secondary",
|
|
275
|
+
onClick: t,
|
|
276
|
+
children: "Retry"
|
|
277
|
+
}), /* @__PURE__ */ p("small", { children: "Retry reads again. It never runs a plan." })] }) : null
|
|
278
|
+
]
|
|
279
|
+
})]
|
|
280
|
+
});
|
|
281
|
+
}, C = () => /* @__PURE__ */ p("span", {
|
|
8
282
|
className: "ac-detail-muted",
|
|
9
283
|
children: "Not available yet"
|
|
10
|
-
}),
|
|
284
|
+
}), w = ({ children: e, title: t, unavailable: n = !1 }) => /* @__PURE__ */ m("div", {
|
|
11
285
|
className: n ? "ac-detail-panel ac-detail-unavailable" : "ac-detail-panel",
|
|
12
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ p(a, {
|
|
13
287
|
as: "p",
|
|
14
288
|
className: "ac-detail-panel-title",
|
|
15
289
|
children: t
|
|
16
|
-
}), e === void 0 ? null : /* @__PURE__ */
|
|
290
|
+
}), e === void 0 ? null : /* @__PURE__ */ p(a, {
|
|
17
291
|
as: "p",
|
|
18
292
|
tone: "secondary",
|
|
19
293
|
children: e
|
|
20
294
|
})]
|
|
21
|
-
}),
|
|
22
|
-
if (e === null) return /* @__PURE__ */
|
|
295
|
+
}), T = ({ status: e }) => {
|
|
296
|
+
if (e === null) return /* @__PURE__ */ p("span", {
|
|
23
297
|
className: "ac-detail-muted",
|
|
24
298
|
children: "Unknown"
|
|
25
299
|
});
|
|
26
300
|
let t = e === "created" || e === "updated" || e === "replaced";
|
|
27
|
-
return /* @__PURE__ */
|
|
301
|
+
return /* @__PURE__ */ m("span", {
|
|
28
302
|
className: `ac-resource-status ${t ? "ac-resource-success" : e === "failed" ? "ac-resource-failed" : "ac-resource-working"}`,
|
|
29
303
|
children: [
|
|
30
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ p(h, {
|
|
31
305
|
name: t ? "check" : e === "failed" ? "alert" : "loader",
|
|
32
306
|
decorative: !0,
|
|
33
307
|
size: "small"
|
|
@@ -36,18 +310,18 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
36
310
|
e.slice(1)
|
|
37
311
|
]
|
|
38
312
|
});
|
|
39
|
-
},
|
|
40
|
-
let t =
|
|
41
|
-
return t === null ? /* @__PURE__ */
|
|
42
|
-
dateTime:
|
|
313
|
+
}, E = ({ value: e }) => {
|
|
314
|
+
let t = s.getOrNull(c.decodeUnknownOption(c.DateTimeUtcFromString)(e));
|
|
315
|
+
return t === null ? /* @__PURE__ */ p(C, {}) : /* @__PURE__ */ p("time", {
|
|
316
|
+
dateTime: o.formatIso(t),
|
|
43
317
|
children: new Intl.DateTimeFormat("en-GB", {
|
|
44
318
|
day: "numeric",
|
|
45
319
|
month: "short",
|
|
46
320
|
hour: "2-digit",
|
|
47
321
|
minute: "2-digit"
|
|
48
|
-
}).format(
|
|
322
|
+
}).format(o.toEpochMillis(t))
|
|
49
323
|
});
|
|
50
|
-
},
|
|
324
|
+
}, D = ({ resource: e }) => e.consoleUrl === null ? null : /* @__PURE__ */ m("a", {
|
|
51
325
|
"data-rly-hit-area": !0,
|
|
52
326
|
className: "ac-detail-link ac-provider-link",
|
|
53
327
|
href: e.consoleUrl,
|
|
@@ -58,11 +332,11 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
58
332
|
e.resourceType.startsWith("Cloudflare.") ? "Cloudflare" : "AWS",
|
|
59
333
|
" console",
|
|
60
334
|
" ",
|
|
61
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ p("span", {
|
|
62
336
|
"aria-hidden": "true",
|
|
63
337
|
children: "↗"
|
|
64
338
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ m("span", {
|
|
66
340
|
className: "ac-sr-only",
|
|
67
341
|
children: [
|
|
68
342
|
" for ",
|
|
@@ -71,48 +345,48 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
71
345
|
]
|
|
72
346
|
})
|
|
73
347
|
]
|
|
74
|
-
}),
|
|
348
|
+
}), O = ({ copy: t, onReadAgain: r, state: i }) => i._tag === "Loading" ? /* @__PURE__ */ m("div", {
|
|
75
349
|
"aria-busy": "true",
|
|
76
350
|
className: "ac-detail-loading",
|
|
77
351
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ p("span", {
|
|
79
353
|
className: "ac-sr-only",
|
|
80
354
|
role: "status",
|
|
81
355
|
children: "Reading stack state…"
|
|
82
356
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ p(n, { className: "ac-detail-title-skeleton" }),
|
|
358
|
+
/* @__PURE__ */ p(n, {
|
|
85
359
|
variant: "block",
|
|
86
360
|
className: "ac-detail-body-skeleton"
|
|
87
361
|
})
|
|
88
362
|
]
|
|
89
|
-
}) : /* @__PURE__ */
|
|
363
|
+
}) : /* @__PURE__ */ m("section", {
|
|
90
364
|
className: "ac-state-panel",
|
|
91
365
|
role: "status",
|
|
92
366
|
children: [
|
|
93
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ p(a, {
|
|
94
368
|
as: "h1",
|
|
95
369
|
className: "ac-state-title",
|
|
96
370
|
variant: "section-title",
|
|
97
|
-
children:
|
|
371
|
+
children: i._tag === "Unauthorized" ? i.reason === "bootstrap" ? "Sign-in failed or link already used." : `Your ${t.product} session has ended.` : i._tag === "NotFound" ? "This stack is no longer available." : "Stack state is unavailable right now."
|
|
98
372
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ p(a, {
|
|
100
374
|
as: "p",
|
|
101
375
|
tone: "secondary",
|
|
102
|
-
children:
|
|
376
|
+
children: i._tag === "Unauthorized" ? "Sign in again to see stacks." : i._tag === "NotFound" ? "Return to Stacks and Read again. Nothing was changed." : "The stack state couldn’t be read, so no resources are shown. Nothing was changed."
|
|
103
377
|
}),
|
|
104
|
-
|
|
378
|
+
i._tag === "Unauthorized" ? /* @__PURE__ */ p(a, {
|
|
105
379
|
as: "p",
|
|
106
380
|
variant: "meta",
|
|
107
381
|
tone: "secondary",
|
|
108
382
|
children: t.signInInstruction
|
|
109
|
-
}) :
|
|
383
|
+
}) : i._tag === "Failed" ? /* @__PURE__ */ p(e, {
|
|
110
384
|
className: "ac-read",
|
|
111
385
|
onClick: r,
|
|
112
386
|
children: "Retry"
|
|
113
387
|
}) : null
|
|
114
388
|
]
|
|
115
|
-
}),
|
|
389
|
+
}), k = (e) => {
|
|
116
390
|
if (e.length > 5e4 || new Map(e.map((e) => [e.fqn, e])).size !== e.length) return null;
|
|
117
391
|
let t = new Map(e.map((e) => [e.fqn, []])), n = 0;
|
|
118
392
|
for (let r of e) {
|
|
@@ -124,15 +398,15 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
124
398
|
}
|
|
125
399
|
}
|
|
126
400
|
return t;
|
|
127
|
-
},
|
|
128
|
-
let
|
|
129
|
-
return /* @__PURE__ */
|
|
401
|
+
}, A = ({ copy: e, resource: t, resourceHref: n, stack: r, stackHref: i }) => {
|
|
402
|
+
let o = u(() => k(r.resources), [r.resources])?.get(t.fqn) ?? null;
|
|
403
|
+
return /* @__PURE__ */ m("div", {
|
|
130
404
|
className: "ac-detail ac-resource-detail",
|
|
131
405
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ m("a", {
|
|
133
407
|
"data-rly-hit-area": !0,
|
|
134
408
|
className: "ac-detail-link ac-resource-back",
|
|
135
|
-
href:
|
|
409
|
+
href: i,
|
|
136
410
|
children: [
|
|
137
411
|
"← ",
|
|
138
412
|
r.app,
|
|
@@ -140,86 +414,86 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
140
414
|
r.stage
|
|
141
415
|
]
|
|
142
416
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ m("header", {
|
|
144
418
|
className: "ac-detail-header",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
419
|
+
children: [/* @__PURE__ */ p(a, {
|
|
146
420
|
as: "h1",
|
|
147
421
|
variant: "page-title",
|
|
148
422
|
className: "ac-title",
|
|
149
423
|
children: t.logicalId
|
|
150
|
-
}), /* @__PURE__ */
|
|
424
|
+
}), /* @__PURE__ */ p(a, {
|
|
151
425
|
as: "p",
|
|
152
426
|
tone: "secondary",
|
|
153
427
|
children: t.resourceType
|
|
154
428
|
})]
|
|
155
429
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ m("div", {
|
|
157
431
|
className: "ac-resource-identity",
|
|
158
432
|
children: [
|
|
159
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ m("dl", {
|
|
160
434
|
className: "ac-identity-table",
|
|
161
435
|
children: [
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Logical name" }), /* @__PURE__ */ p("dd", { children: t.logicalId })] }),
|
|
437
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Type" }), /* @__PURE__ */ p("dd", {
|
|
164
438
|
className: "ac-resource-id",
|
|
165
439
|
children: t.resourceType
|
|
166
440
|
})] }),
|
|
167
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Physical ID" }), /* @__PURE__ */ p("dd", {
|
|
168
442
|
className: "ac-resource-id",
|
|
169
|
-
children: t.providerId ?? /* @__PURE__ */
|
|
443
|
+
children: t.providerId ?? /* @__PURE__ */ p(C, {})
|
|
170
444
|
})] }),
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Region" }), /* @__PURE__ */ p("dd", { children: t.region ?? /* @__PURE__ */ p(C, {}) })] }),
|
|
446
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Account" }), /* @__PURE__ */ p("dd", {
|
|
173
447
|
className: "ac-resource-id",
|
|
174
|
-
children: t.account ?? /* @__PURE__ */
|
|
448
|
+
children: t.account ?? /* @__PURE__ */ p(C, {})
|
|
175
449
|
})] }),
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Status" }), /* @__PURE__ */ p("dd", { children: /* @__PURE__ */ p(T, { status: t.status }) })] }),
|
|
451
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Last updated" }), /* @__PURE__ */ p("dd", { children: /* @__PURE__ */ p(E, { value: t.updatedAt }) })] }),
|
|
452
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Construct" }), /* @__PURE__ */ p("dd", { children: t.parent ?? /* @__PURE__ */ p(C, {}) })] })
|
|
179
453
|
]
|
|
180
454
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ p(a, {
|
|
182
456
|
as: "p",
|
|
183
457
|
variant: "meta",
|
|
184
458
|
tone: "secondary",
|
|
185
459
|
children: "Identity comes from this resource’s own state and is shown only to the signed-in owner."
|
|
186
460
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ p(D, { resource: t })
|
|
188
462
|
]
|
|
189
463
|
}),
|
|
190
|
-
|
|
464
|
+
o !== null && o.length > 0 ? /* @__PURE__ */ m("section", {
|
|
191
465
|
className: "ac-detail-section",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
466
|
+
children: [/* @__PURE__ */ p(a, {
|
|
193
467
|
as: "h2",
|
|
194
468
|
variant: "section-title",
|
|
195
469
|
children: "Dependencies"
|
|
196
|
-
}), /* @__PURE__ */
|
|
470
|
+
}), /* @__PURE__ */ p("ul", {
|
|
197
471
|
className: "ac-dependencies",
|
|
198
|
-
children:
|
|
472
|
+
children: o.map((e) => /* @__PURE__ */ m("li", { children: [/* @__PURE__ */ p("a", {
|
|
199
473
|
"data-rly-hit-area": !0,
|
|
200
474
|
className: "ac-detail-link ac-resource-name",
|
|
201
475
|
href: n(e),
|
|
202
476
|
children: e.logicalId
|
|
203
|
-
}), /* @__PURE__ */
|
|
477
|
+
}), /* @__PURE__ */ p("span", {
|
|
204
478
|
className: "ac-resource-type",
|
|
205
479
|
children: e.resourceType
|
|
206
480
|
})] }, e.fqn))
|
|
207
481
|
})]
|
|
208
482
|
}) : null,
|
|
209
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ m("section", {
|
|
210
484
|
className: "ac-detail-section",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
485
|
+
children: [/* @__PURE__ */ p(a, {
|
|
212
486
|
as: "h2",
|
|
213
487
|
variant: "section-title",
|
|
214
488
|
children: "Properties"
|
|
215
|
-
}), /* @__PURE__ */
|
|
489
|
+
}), /* @__PURE__ */ m(w, {
|
|
216
490
|
title: "Not available yet",
|
|
217
491
|
children: [e.product, " shows resource identity only for now. Properties come later."]
|
|
218
492
|
})]
|
|
219
493
|
})
|
|
220
494
|
]
|
|
221
495
|
});
|
|
222
|
-
},
|
|
496
|
+
}, j = new URL(new URL("empty-state-creature.svg", import.meta.url).href, "" + import.meta.url).href, M = (e) => {
|
|
223
497
|
let t = /* @__PURE__ */ new Map();
|
|
224
498
|
for (let n of e) {
|
|
225
499
|
let e = t.get(n.parent);
|
|
@@ -232,44 +506,44 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
232
506
|
r === void 0 ? e.types.set(n.resourceType, [n]) : r.push(n);
|
|
233
507
|
}
|
|
234
508
|
return [...t.values()];
|
|
235
|
-
},
|
|
236
|
-
let
|
|
237
|
-
return /* @__PURE__ */
|
|
509
|
+
}, N = ({ app: e, resourceHref: t, resources: n, stage: r }) => {
|
|
510
|
+
let i = l(), o = M(n);
|
|
511
|
+
return /* @__PURE__ */ m("section", {
|
|
238
512
|
className: "ac-detail-section",
|
|
239
|
-
"aria-labelledby":
|
|
240
|
-
children: [/* @__PURE__ */
|
|
513
|
+
"aria-labelledby": i,
|
|
514
|
+
children: [/* @__PURE__ */ m("div", {
|
|
241
515
|
className: "ac-detail-section-heading",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
516
|
+
children: [/* @__PURE__ */ p(a, {
|
|
243
517
|
as: "h2",
|
|
244
518
|
variant: "section-title",
|
|
245
|
-
id:
|
|
519
|
+
id: i,
|
|
246
520
|
children: "Resources"
|
|
247
|
-
}), /* @__PURE__ */
|
|
521
|
+
}), /* @__PURE__ */ m(a, {
|
|
248
522
|
variant: "meta",
|
|
249
523
|
tone: "secondary",
|
|
250
524
|
children: [
|
|
251
525
|
n.length,
|
|
252
526
|
" ",
|
|
253
527
|
n.length === 1 ? "resource" : "resources",
|
|
254
|
-
|
|
528
|
+
o.length === 0 ? "" : ` · ${o.filter((e) => e.parent !== null).length} constructs`
|
|
255
529
|
]
|
|
256
530
|
})]
|
|
257
|
-
}), n.length === 0 ? /* @__PURE__ */
|
|
531
|
+
}), n.length === 0 ? /* @__PURE__ */ m("div", {
|
|
258
532
|
className: "ac-detail-panel ac-empty-state",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
533
|
+
children: [/* @__PURE__ */ p("img", {
|
|
260
534
|
className: "ac-empty-state-creature",
|
|
261
|
-
src:
|
|
535
|
+
src: j,
|
|
262
536
|
alt: "",
|
|
263
537
|
"aria-hidden": "true",
|
|
264
538
|
width: "56",
|
|
265
539
|
height: "56"
|
|
266
|
-
}), /* @__PURE__ */
|
|
540
|
+
}), /* @__PURE__ */ m("div", {
|
|
267
541
|
className: "ac-empty-state-copy",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
542
|
+
children: [/* @__PURE__ */ p(a, {
|
|
269
543
|
as: "p",
|
|
270
544
|
className: "ac-detail-panel-title",
|
|
271
545
|
children: "No resources in state"
|
|
272
|
-
}), /* @__PURE__ */
|
|
546
|
+
}), /* @__PURE__ */ m(a, {
|
|
273
547
|
as: "p",
|
|
274
548
|
tone: "secondary",
|
|
275
549
|
children: [
|
|
@@ -280,32 +554,32 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
280
554
|
]
|
|
281
555
|
})]
|
|
282
556
|
})]
|
|
283
|
-
}) : /* @__PURE__ */
|
|
557
|
+
}) : /* @__PURE__ */ p("div", {
|
|
284
558
|
className: "ac-resource-tree",
|
|
285
|
-
children:
|
|
559
|
+
children: o.map((e, n) => /* @__PURE__ */ p(P, {
|
|
286
560
|
construct: e,
|
|
287
|
-
initiallyOpen: n === 0 ||
|
|
561
|
+
initiallyOpen: n === 0 || o.length > 2 && n === 1,
|
|
288
562
|
resourceHref: t
|
|
289
563
|
}, e.parent ?? ""))
|
|
290
564
|
})]
|
|
291
565
|
});
|
|
292
|
-
},
|
|
293
|
-
let [r, i] =
|
|
294
|
-
return /* @__PURE__ */
|
|
566
|
+
}, P = ({ construct: e, initiallyOpen: t, resourceHref: n }) => {
|
|
567
|
+
let [r, i] = d(t);
|
|
568
|
+
return /* @__PURE__ */ m("details", {
|
|
295
569
|
open: r,
|
|
296
570
|
onToggle: (e) => i(e.currentTarget.open),
|
|
297
571
|
className: "ac-construct",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
299
|
-
/* @__PURE__ */
|
|
572
|
+
children: [/* @__PURE__ */ m("summary", { children: [
|
|
573
|
+
/* @__PURE__ */ p(h, {
|
|
300
574
|
name: r ? "chevron-down" : "chevron-right",
|
|
301
575
|
decorative: !0,
|
|
302
576
|
size: "small"
|
|
303
577
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ p("span", {
|
|
305
579
|
className: "ac-construct-name",
|
|
306
580
|
children: e.parent ?? "No construct"
|
|
307
581
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ m("span", {
|
|
309
583
|
className: "ac-construct-count",
|
|
310
584
|
children: [
|
|
311
585
|
e.resources.length,
|
|
@@ -313,22 +587,22 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
313
587
|
e.resources.length === 1 ? "resource" : "resources"
|
|
314
588
|
]
|
|
315
589
|
})
|
|
316
|
-
] }), /* @__PURE__ */
|
|
590
|
+
] }), /* @__PURE__ */ p("div", {
|
|
317
591
|
className: "ac-construct-types",
|
|
318
|
-
children: [...e.types].map(([e, t]) => /* @__PURE__ */
|
|
592
|
+
children: [...e.types].map(([e, t]) => /* @__PURE__ */ m("section", {
|
|
319
593
|
className: "ac-type-group",
|
|
320
594
|
"aria-label": e,
|
|
321
|
-
children: [/* @__PURE__ */
|
|
595
|
+
children: [/* @__PURE__ */ m("div", {
|
|
322
596
|
className: "ac-tree-type",
|
|
323
597
|
children: [
|
|
324
598
|
e,
|
|
325
599
|
" ",
|
|
326
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ p("span", { children: t.length })
|
|
327
601
|
]
|
|
328
|
-
}), /* @__PURE__ */
|
|
602
|
+
}), /* @__PURE__ */ p("ul", { children: t.map((e) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("a", {
|
|
329
603
|
href: n(e),
|
|
330
604
|
className: "ac-tree-resource ac-detail-link",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
605
|
+
children: [/* @__PURE__ */ p("span", { children: e.logicalId }), /* @__PURE__ */ p(h, {
|
|
332
606
|
name: "chevron-right",
|
|
333
607
|
decorative: !0,
|
|
334
608
|
size: "small"
|
|
@@ -337,23 +611,23 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
337
611
|
}, e))
|
|
338
612
|
})]
|
|
339
613
|
});
|
|
340
|
-
},
|
|
614
|
+
}, F = ({ children: e }) => /* @__PURE__ */ p("span", {
|
|
341
615
|
className: "ac-detail-mobile-label",
|
|
342
616
|
"aria-hidden": "true",
|
|
343
617
|
children: e
|
|
344
|
-
}),
|
|
345
|
-
let n =
|
|
346
|
-
return /* @__PURE__ */
|
|
618
|
+
}), I = ({ resourceHref: e, stack: t }) => {
|
|
619
|
+
let n = l(), r = t.resources.filter((e) => e.status === "failed").length, i = t.resources.filter((e) => e.status === null).length;
|
|
620
|
+
return /* @__PURE__ */ m("section", {
|
|
347
621
|
className: "ac-detail-section",
|
|
348
622
|
"aria-labelledby": n,
|
|
349
|
-
children: [/* @__PURE__ */
|
|
623
|
+
children: [/* @__PURE__ */ m("div", {
|
|
350
624
|
className: "ac-detail-section-heading",
|
|
351
|
-
children: [/* @__PURE__ */
|
|
625
|
+
children: [/* @__PURE__ */ p(a, {
|
|
352
626
|
as: "h2",
|
|
353
627
|
variant: "section-title",
|
|
354
628
|
id: n,
|
|
355
629
|
children: "Resources"
|
|
356
|
-
}), t.resources.length > 0 ? /* @__PURE__ */
|
|
630
|
+
}), t.resources.length > 0 ? /* @__PURE__ */ m(a, {
|
|
357
631
|
variant: "meta",
|
|
358
632
|
tone: "secondary",
|
|
359
633
|
children: [
|
|
@@ -361,92 +635,92 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
361
635
|
" ",
|
|
362
636
|
t.resources.length === 1 ? "resource" : "resources",
|
|
363
637
|
r > 0 ? ` · ${r} failed` : "",
|
|
364
|
-
|
|
638
|
+
i > 0 ? ` · ${i} Unknown` : ""
|
|
365
639
|
]
|
|
366
640
|
}) : null]
|
|
367
|
-
}), t.resources.length === 0 ? /* @__PURE__ */
|
|
641
|
+
}), t.resources.length === 0 ? /* @__PURE__ */ p(w, {
|
|
368
642
|
title: "No resources in this stack’s state.",
|
|
369
643
|
children: "Resources appear here once a deployment records them."
|
|
370
|
-
}) : /* @__PURE__ */
|
|
644
|
+
}) : /* @__PURE__ */ p("div", {
|
|
371
645
|
className: "ac-detail-table-wrap",
|
|
372
|
-
children: /* @__PURE__ */
|
|
646
|
+
children: /* @__PURE__ */ m("table", {
|
|
373
647
|
className: "ac-detail-table ac-resource-table",
|
|
374
648
|
"aria-labelledby": n,
|
|
375
|
-
children: [/* @__PURE__ */
|
|
376
|
-
/* @__PURE__ */
|
|
649
|
+
children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ m("tr", { children: [
|
|
650
|
+
/* @__PURE__ */ p("th", {
|
|
377
651
|
scope: "col",
|
|
378
652
|
children: "Logical name"
|
|
379
653
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ p("th", {
|
|
381
655
|
scope: "col",
|
|
382
656
|
children: "Type"
|
|
383
657
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ p("th", {
|
|
385
659
|
scope: "col",
|
|
386
660
|
children: "Physical ID"
|
|
387
661
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ p("th", {
|
|
389
663
|
scope: "col",
|
|
390
664
|
children: "Status"
|
|
391
665
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ p("th", {
|
|
393
667
|
scope: "col",
|
|
394
668
|
children: "Last updated"
|
|
395
669
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ p("th", {
|
|
397
671
|
scope: "col",
|
|
398
|
-
children: /* @__PURE__ */
|
|
672
|
+
children: /* @__PURE__ */ p("span", {
|
|
399
673
|
className: "ac-sr-only",
|
|
400
674
|
children: "Provider console"
|
|
401
675
|
})
|
|
402
676
|
})
|
|
403
|
-
] }) }), /* @__PURE__ */
|
|
404
|
-
/* @__PURE__ */
|
|
677
|
+
] }) }), /* @__PURE__ */ p("tbody", { children: t.resources.map((t) => /* @__PURE__ */ m("tr", { children: [
|
|
678
|
+
/* @__PURE__ */ m("th", {
|
|
405
679
|
scope: "row",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
680
|
+
children: [/* @__PURE__ */ p(F, { children: "Logical name" }), /* @__PURE__ */ p("a", {
|
|
407
681
|
"data-rly-hit-area": !0,
|
|
408
682
|
className: "ac-detail-link ac-resource-name",
|
|
409
683
|
href: e(t),
|
|
410
684
|
children: t.logicalId
|
|
411
685
|
})]
|
|
412
686
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ m("td", {
|
|
414
688
|
className: "ac-resource-type",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
689
|
+
children: [/* @__PURE__ */ p(F, { children: "Type" }), t.resourceType]
|
|
416
690
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
691
|
+
/* @__PURE__ */ m("td", {
|
|
418
692
|
className: "ac-resource-id",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
693
|
+
children: [/* @__PURE__ */ p(F, { children: "Physical ID" }), t.providerId ?? /* @__PURE__ */ p(C, {})]
|
|
420
694
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ m("td", {
|
|
422
696
|
className: "ac-resource-status-cell",
|
|
423
|
-
children: [/* @__PURE__ */
|
|
697
|
+
children: [/* @__PURE__ */ p(F, { children: "Status" }), /* @__PURE__ */ p(T, { status: t.status })]
|
|
424
698
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ m("td", {
|
|
426
700
|
className: "ac-resource-time",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
701
|
+
children: [/* @__PURE__ */ p(F, { children: "Last updated" }), /* @__PURE__ */ p(E, { value: t.updatedAt })]
|
|
428
702
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ p("td", {
|
|
430
704
|
className: "ac-resource-console",
|
|
431
|
-
children: /* @__PURE__ */
|
|
705
|
+
children: /* @__PURE__ */ p(D, { resource: t })
|
|
432
706
|
})
|
|
433
707
|
] }, t.fqn)) })]
|
|
434
708
|
})
|
|
435
709
|
})]
|
|
436
710
|
});
|
|
437
|
-
},
|
|
438
|
-
let t =
|
|
439
|
-
return /* @__PURE__ */
|
|
711
|
+
}, L = ({ outputs: e }) => {
|
|
712
|
+
let t = l(), n = e?.filter((e) => e.value._tag === "Hidden").length ?? 0;
|
|
713
|
+
return /* @__PURE__ */ m("section", {
|
|
440
714
|
className: "ac-detail-section",
|
|
441
715
|
"aria-labelledby": t,
|
|
442
|
-
children: [/* @__PURE__ */
|
|
716
|
+
children: [/* @__PURE__ */ m("div", {
|
|
443
717
|
className: "ac-detail-section-heading",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
718
|
+
children: [/* @__PURE__ */ p(a, {
|
|
445
719
|
as: "h2",
|
|
446
720
|
variant: "section-title",
|
|
447
721
|
id: t,
|
|
448
722
|
children: "Outputs"
|
|
449
|
-
}), e !== null && e.length > 0 ? /* @__PURE__ */
|
|
723
|
+
}), e !== null && e.length > 0 ? /* @__PURE__ */ m(a, {
|
|
450
724
|
variant: "meta",
|
|
451
725
|
tone: "secondary",
|
|
452
726
|
children: [
|
|
@@ -458,134 +732,143 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
458
732
|
" hidden"
|
|
459
733
|
]
|
|
460
734
|
}) : null]
|
|
461
|
-
}), e === null ? /* @__PURE__ */
|
|
735
|
+
}), e === null ? /* @__PURE__ */ p(w, {
|
|
462
736
|
title: "Not available yet",
|
|
463
737
|
unavailable: !0,
|
|
464
738
|
children: "The outputs in this stack’s state can’t be read yet."
|
|
465
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
739
|
+
}) : e.length === 0 ? /* @__PURE__ */ p(w, { title: "This stack has no outputs." }) : /* @__PURE__ */ p("div", {
|
|
466
740
|
className: "ac-detail-table-wrap",
|
|
467
|
-
children: /* @__PURE__ */
|
|
741
|
+
children: /* @__PURE__ */ m("table", {
|
|
468
742
|
className: "ac-detail-table ac-output-table",
|
|
469
743
|
"aria-labelledby": t,
|
|
470
|
-
children: [/* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
744
|
+
children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ m("tr", { children: [
|
|
745
|
+
/* @__PURE__ */ p("th", {
|
|
472
746
|
scope: "col",
|
|
473
747
|
children: "Key"
|
|
474
748
|
}),
|
|
475
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ p("th", {
|
|
476
750
|
scope: "col",
|
|
477
751
|
children: "Value"
|
|
478
752
|
}),
|
|
479
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ p("th", {
|
|
480
754
|
scope: "col",
|
|
481
755
|
children: "Description"
|
|
482
756
|
})
|
|
483
|
-
] }) }), /* @__PURE__ */
|
|
484
|
-
/* @__PURE__ */
|
|
757
|
+
] }) }), /* @__PURE__ */ p("tbody", { children: e.map((e) => /* @__PURE__ */ m("tr", { children: [
|
|
758
|
+
/* @__PURE__ */ m("th", {
|
|
485
759
|
scope: "row",
|
|
486
|
-
children: [/* @__PURE__ */
|
|
760
|
+
children: [/* @__PURE__ */ p(F, { children: "Key" }), /* @__PURE__ */ p("span", {
|
|
487
761
|
className: "ac-output-key",
|
|
488
762
|
children: e.key
|
|
489
763
|
})]
|
|
490
764
|
}),
|
|
491
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ m("td", { children: [/* @__PURE__ */ p(F, { children: "Value" }), e.value._tag === "Hidden" ? /* @__PURE__ */ p("span", {
|
|
492
766
|
className: "ac-detail-muted",
|
|
493
767
|
children: "Hidden"
|
|
494
|
-
}) : /* @__PURE__ */
|
|
768
|
+
}) : /* @__PURE__ */ p("span", {
|
|
495
769
|
className: "ac-output-value",
|
|
496
770
|
children: e.value.text
|
|
497
771
|
})] }),
|
|
498
|
-
/* @__PURE__ */
|
|
772
|
+
/* @__PURE__ */ m("td", {
|
|
499
773
|
className: "ac-detail-muted",
|
|
500
|
-
children: [/* @__PURE__ */
|
|
774
|
+
children: [/* @__PURE__ */ p(F, { children: "Description" }), e.description ?? /* @__PURE__ */ p(C, {})]
|
|
501
775
|
})
|
|
502
776
|
] }, e.key)) })]
|
|
503
777
|
})
|
|
504
778
|
})]
|
|
505
779
|
});
|
|
506
|
-
},
|
|
507
|
-
if (
|
|
780
|
+
}, R = ({ copy: e, onReadAgain: t, onReadPlanAgain: n, onTabChange: r, planState: o = { _tag: "NotConnected" }, resourceHref: s, state: c, tab: l }) => {
|
|
781
|
+
if (c._tag !== "Ready") return /* @__PURE__ */ p("div", {
|
|
508
782
|
className: "ac-detail",
|
|
509
|
-
children: /* @__PURE__ */
|
|
510
|
-
state:
|
|
783
|
+
children: /* @__PURE__ */ p(O, {
|
|
784
|
+
state: c,
|
|
511
785
|
copy: e,
|
|
512
786
|
onReadAgain: t
|
|
513
787
|
})
|
|
514
788
|
});
|
|
515
|
-
let
|
|
516
|
-
return /* @__PURE__ */
|
|
789
|
+
let u = c.stack;
|
|
790
|
+
return /* @__PURE__ */ m("div", {
|
|
517
791
|
className: "ac-detail",
|
|
792
|
+
"data-plan": l === "plan" ? "true" : void 0,
|
|
518
793
|
children: [
|
|
519
|
-
/* @__PURE__ */
|
|
794
|
+
/* @__PURE__ */ m("header", {
|
|
520
795
|
className: "ac-detail-header",
|
|
521
|
-
children: [/* @__PURE__ */
|
|
796
|
+
children: [/* @__PURE__ */ m("div", {
|
|
522
797
|
className: "ac-detail-title-row",
|
|
523
|
-
children: [/* @__PURE__ */
|
|
798
|
+
children: [/* @__PURE__ */ p(a, {
|
|
524
799
|
as: "h1",
|
|
525
800
|
variant: "page-title",
|
|
526
801
|
className: "ac-title",
|
|
527
|
-
children:
|
|
528
|
-
}), /* @__PURE__ */
|
|
802
|
+
children: u.app
|
|
803
|
+
}), /* @__PURE__ */ p("span", {
|
|
529
804
|
className: "ac-stage-badge",
|
|
530
|
-
children:
|
|
805
|
+
children: u.stage
|
|
531
806
|
})]
|
|
532
|
-
}), /* @__PURE__ */
|
|
807
|
+
}), /* @__PURE__ */ p(a, {
|
|
533
808
|
as: "p",
|
|
534
809
|
tone: "secondary",
|
|
535
810
|
className: "ac-description",
|
|
536
811
|
children: "Infrastructure state. Read-only."
|
|
537
812
|
})]
|
|
538
813
|
}),
|
|
539
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ m("dl", {
|
|
540
815
|
className: "ac-stack-metadata",
|
|
541
816
|
children: [
|
|
542
|
-
/* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Region" }), /* @__PURE__ */ p("dd", { children: "Unknown" })] }),
|
|
818
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Backend" }), /* @__PURE__ */ p("dd", { children: u.backend === "s3" ? "State bucket" : "Local" })] }),
|
|
819
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Alchemy version" }), /* @__PURE__ */ p("dd", {
|
|
545
820
|
className: "ac-resource-id",
|
|
546
|
-
children:
|
|
821
|
+
children: u.alchemyVersion ?? "Unknown"
|
|
547
822
|
})] }),
|
|
548
|
-
/* @__PURE__ */
|
|
823
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", { children: "Last deploy" }), /* @__PURE__ */ p("dd", { children: u.lastDeploy === null ? "Unknown" : /* @__PURE__ */ p(E, { value: u.lastDeploy }) })] })
|
|
549
824
|
]
|
|
550
825
|
}),
|
|
551
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ p(i, {
|
|
552
827
|
className: "ac-detail-tabs",
|
|
553
828
|
"aria-label": "Stack state",
|
|
554
829
|
size: "large",
|
|
555
|
-
value:
|
|
830
|
+
value: l,
|
|
556
831
|
"data-mobile-layout": "single-row",
|
|
557
832
|
onValueChange: (e) => {
|
|
558
|
-
(e === "resources" || e === "outputs" || e === "state") &&
|
|
833
|
+
(e === "resources" || e === "outputs" || e === "state" || e === "plan") && r(e);
|
|
559
834
|
},
|
|
560
835
|
items: [
|
|
561
836
|
{
|
|
562
837
|
value: "resources",
|
|
563
838
|
label: "Resources",
|
|
564
|
-
content: /* @__PURE__ */
|
|
565
|
-
stack:
|
|
566
|
-
resourceHref:
|
|
839
|
+
content: /* @__PURE__ */ p(I, {
|
|
840
|
+
stack: u,
|
|
841
|
+
resourceHref: s
|
|
567
842
|
})
|
|
568
843
|
},
|
|
569
844
|
{
|
|
570
845
|
value: "outputs",
|
|
571
846
|
label: "Outputs",
|
|
572
|
-
content: /* @__PURE__ */
|
|
847
|
+
content: /* @__PURE__ */ p(L, { outputs: u.outputs })
|
|
573
848
|
},
|
|
574
849
|
{
|
|
575
850
|
value: "state",
|
|
576
851
|
label: "State",
|
|
577
|
-
content: /* @__PURE__ */
|
|
578
|
-
app:
|
|
579
|
-
stage:
|
|
580
|
-
resources:
|
|
581
|
-
resourceHref:
|
|
852
|
+
content: /* @__PURE__ */ p(N, {
|
|
853
|
+
app: u.app,
|
|
854
|
+
stage: u.stage,
|
|
855
|
+
resources: u.resources,
|
|
856
|
+
resourceHref: s
|
|
857
|
+
})
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
value: "plan",
|
|
861
|
+
label: "Plan",
|
|
862
|
+
content: /* @__PURE__ */ p(S, {
|
|
863
|
+
state: o,
|
|
864
|
+
onReadAgain: n ?? t
|
|
582
865
|
})
|
|
583
866
|
}
|
|
584
867
|
]
|
|
585
868
|
})
|
|
586
869
|
]
|
|
587
870
|
});
|
|
588
|
-
},
|
|
871
|
+
}, z = new URL(new URL("empty-creature.svg", import.meta.url).href, "" + import.meta.url).href, B = (e) => e.source === "s3" ? e.reason === "denied" ? {
|
|
589
872
|
tone: "critical",
|
|
590
873
|
title: "State bucket access denied.",
|
|
591
874
|
body: "Discovery is incomplete — stacks that could be read are listed.",
|
|
@@ -605,32 +888,32 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
605
888
|
title: "Local discovery is incomplete.",
|
|
606
889
|
body: "A local state file couldn’t be read, so some local stacks may be missing. The stacks below were read normally.",
|
|
607
890
|
hint: "Discovery only reads state; it doesn’t repair it. Check local state, then Read again."
|
|
608
|
-
},
|
|
609
|
-
let n =
|
|
610
|
-
return /* @__PURE__ */
|
|
891
|
+
}, V = ({ issue: e }) => {
|
|
892
|
+
let n = B(e);
|
|
893
|
+
return /* @__PURE__ */ m(t, {
|
|
611
894
|
className: "ac-notice",
|
|
612
895
|
tone: n.tone,
|
|
613
|
-
children: [/* @__PURE__ */
|
|
614
|
-
/* @__PURE__ */
|
|
896
|
+
children: [/* @__PURE__ */ m("p", { children: [
|
|
897
|
+
/* @__PURE__ */ p("strong", { children: n.title }),
|
|
615
898
|
" ",
|
|
616
899
|
n.body
|
|
617
|
-
] }), /* @__PURE__ */
|
|
900
|
+
] }), /* @__PURE__ */ p("p", {
|
|
618
901
|
className: "ac-notice-hint",
|
|
619
902
|
children: n.hint
|
|
620
903
|
})]
|
|
621
904
|
});
|
|
622
|
-
},
|
|
623
|
-
let r =
|
|
624
|
-
return /* @__PURE__ */
|
|
905
|
+
}, H = ({ app: e, stackHref: t, stacks: n }) => {
|
|
906
|
+
let r = l();
|
|
907
|
+
return /* @__PURE__ */ m("section", {
|
|
625
908
|
className: "ac-group",
|
|
626
|
-
children: [/* @__PURE__ */
|
|
909
|
+
children: [/* @__PURE__ */ m("div", {
|
|
627
910
|
className: "ac-group-heading",
|
|
628
|
-
children: [/* @__PURE__ */
|
|
911
|
+
children: [/* @__PURE__ */ p(a, {
|
|
629
912
|
as: "h2",
|
|
630
913
|
id: r,
|
|
631
914
|
variant: "section-title",
|
|
632
915
|
children: e
|
|
633
|
-
}), /* @__PURE__ */
|
|
916
|
+
}), /* @__PURE__ */ m(a, {
|
|
634
917
|
variant: "meta",
|
|
635
918
|
tone: "secondary",
|
|
636
919
|
children: [
|
|
@@ -639,72 +922,72 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
639
922
|
n.length === 1 ? "stage" : "stages"
|
|
640
923
|
]
|
|
641
924
|
})]
|
|
642
|
-
}), /* @__PURE__ */
|
|
925
|
+
}), /* @__PURE__ */ p("div", {
|
|
643
926
|
className: "ac-table-wrap",
|
|
644
|
-
children: /* @__PURE__ */
|
|
927
|
+
children: /* @__PURE__ */ m("table", {
|
|
645
928
|
className: "ac-table",
|
|
646
929
|
"aria-labelledby": r,
|
|
647
|
-
children: [/* @__PURE__ */
|
|
648
|
-
/* @__PURE__ */
|
|
930
|
+
children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ m("tr", { children: [
|
|
931
|
+
/* @__PURE__ */ p("th", {
|
|
649
932
|
scope: "col",
|
|
650
933
|
children: "Stage"
|
|
651
934
|
}),
|
|
652
|
-
/* @__PURE__ */
|
|
935
|
+
/* @__PURE__ */ p("th", {
|
|
653
936
|
scope: "col",
|
|
654
937
|
children: "Backend"
|
|
655
938
|
}),
|
|
656
|
-
/* @__PURE__ */
|
|
939
|
+
/* @__PURE__ */ p("th", {
|
|
657
940
|
scope: "col",
|
|
658
941
|
children: "Alchemy"
|
|
659
942
|
}),
|
|
660
|
-
/* @__PURE__ */
|
|
943
|
+
/* @__PURE__ */ p("th", {
|
|
661
944
|
scope: "col",
|
|
662
945
|
children: "Last deploy"
|
|
663
946
|
}),
|
|
664
|
-
/* @__PURE__ */
|
|
947
|
+
/* @__PURE__ */ p("th", {
|
|
665
948
|
scope: "col",
|
|
666
949
|
children: "Resources"
|
|
667
950
|
})
|
|
668
|
-
] }) }), /* @__PURE__ */
|
|
669
|
-
/* @__PURE__ */
|
|
951
|
+
] }) }), /* @__PURE__ */ p("tbody", { children: n.map((n) => /* @__PURE__ */ m("tr", { children: [
|
|
952
|
+
/* @__PURE__ */ p("th", {
|
|
670
953
|
scope: "row",
|
|
671
|
-
children: t === void 0 ? /* @__PURE__ */
|
|
954
|
+
children: t === void 0 ? /* @__PURE__ */ m("span", {
|
|
672
955
|
className: "ac-stage",
|
|
673
|
-
children: [/* @__PURE__ */
|
|
956
|
+
children: [/* @__PURE__ */ m("span", {
|
|
674
957
|
className: "ac-sr-only",
|
|
675
958
|
children: [e, " "]
|
|
676
959
|
}), n.stage]
|
|
677
|
-
}) : /* @__PURE__ */
|
|
960
|
+
}) : /* @__PURE__ */ m("a", {
|
|
678
961
|
className: "ac-stage ac-list-link",
|
|
679
962
|
"data-rly-hit-area": !0,
|
|
680
963
|
href: t(n),
|
|
681
|
-
children: [/* @__PURE__ */
|
|
964
|
+
children: [/* @__PURE__ */ m("span", {
|
|
682
965
|
className: "ac-sr-only",
|
|
683
966
|
children: [e, " "]
|
|
684
967
|
}), n.stage]
|
|
685
968
|
})
|
|
686
969
|
}),
|
|
687
|
-
/* @__PURE__ */
|
|
970
|
+
/* @__PURE__ */ m("td", { children: [/* @__PURE__ */ p("span", {
|
|
688
971
|
className: "ac-sr-only",
|
|
689
972
|
children: "Backend: "
|
|
690
973
|
}), n.backend === "s3" ? "State bucket" : "Local"] }),
|
|
691
|
-
/* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ m("td", {
|
|
692
975
|
className: "ac-version",
|
|
693
|
-
children: [/* @__PURE__ */
|
|
976
|
+
children: [/* @__PURE__ */ p("span", {
|
|
694
977
|
className: "ac-mobile-label",
|
|
695
978
|
children: "Alchemy "
|
|
696
979
|
}), n.alchemyVersion ?? "Unknown"]
|
|
697
980
|
}),
|
|
698
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ m("td", { children: [/* @__PURE__ */ p("span", {
|
|
699
982
|
className: "ac-mobile-label",
|
|
700
983
|
children: "Last deploy "
|
|
701
984
|
}), n.lastDeploy ?? "Unknown"] }),
|
|
702
|
-
/* @__PURE__ */
|
|
985
|
+
/* @__PURE__ */ m("td", {
|
|
703
986
|
className: t === void 0 ? void 0 : "ac-list-count",
|
|
704
|
-
children: [/* @__PURE__ */
|
|
987
|
+
children: [/* @__PURE__ */ p("span", {
|
|
705
988
|
className: "ac-mobile-label",
|
|
706
989
|
children: "Resources "
|
|
707
|
-
}), n.resourceCount === null ? "Unknown" : t === void 0 ? n.resourceCount : /* @__PURE__ */
|
|
990
|
+
}), n.resourceCount === null ? "Unknown" : t === void 0 ? n.resourceCount : /* @__PURE__ */ p("a", {
|
|
708
991
|
className: "ac-list-link",
|
|
709
992
|
"data-rly-hit-area": !0,
|
|
710
993
|
href: t(n),
|
|
@@ -716,81 +999,81 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
716
999
|
})
|
|
717
1000
|
})]
|
|
718
1001
|
});
|
|
719
|
-
},
|
|
1002
|
+
}, U = () => /* @__PURE__ */ p("div", {
|
|
720
1003
|
className: "ac-skeletons",
|
|
721
1004
|
"aria-hidden": "true",
|
|
722
1005
|
children: [
|
|
723
1006
|
"first",
|
|
724
1007
|
"second",
|
|
725
1008
|
"third"
|
|
726
|
-
].map((e) => /* @__PURE__ */
|
|
1009
|
+
].map((e) => /* @__PURE__ */ m("div", {
|
|
727
1010
|
className: `ac-skeleton-group ac-skeleton-${e}`,
|
|
728
|
-
children: [/* @__PURE__ */
|
|
1011
|
+
children: [/* @__PURE__ */ p(n, { className: "ac-skeleton-heading" }), /* @__PURE__ */ p(n, {
|
|
729
1012
|
className: "ac-skeleton-body",
|
|
730
1013
|
variant: "block"
|
|
731
1014
|
})]
|
|
732
1015
|
}, e))
|
|
733
|
-
}),
|
|
734
|
-
let
|
|
735
|
-
return /* @__PURE__ */
|
|
1016
|
+
}), W = ({ copy: t, onReadAgain: n, stackHref: r, state: i }) => {
|
|
1017
|
+
let o = l(), s = i._tag === "Ready" && i.list.stacks.length === 0 && i.list.issues.length === 0, c = i._tag === "Ready" ? i.list.issues.filter((e, t, n) => n.findIndex((t) => t.source === e.source && t.reason === e.reason) === t) : [], u = i._tag === "Ready" ? [...new Set(i.list.stacks.map((e) => e.app))].sort() : [], d = i._tag === "Loading" ? "Looking in local state and the state bucket…" : i._tag === "Ready" ? c.length > 0 ? `${i.list.stacks.length} stacks found · discovery incomplete` : `${i.list.stacks.length} ${i.list.stacks.length === 1 ? "stack" : "stacks"} · ${u.length} ${u.length === 1 ? "app" : "apps"}` : i._tag === "Unauthorized" ? i.reason === "bootstrap" ? "Sign-in failed or link already used." : `Your ${t.product} session has ended.` : "Stacks are unavailable right now.";
|
|
1018
|
+
return /* @__PURE__ */ m("div", {
|
|
736
1019
|
className: "ac-stacks",
|
|
737
1020
|
children: [
|
|
738
|
-
/* @__PURE__ */
|
|
1021
|
+
/* @__PURE__ */ m("header", {
|
|
739
1022
|
className: "ac-list-header",
|
|
740
|
-
children: [/* @__PURE__ */
|
|
1023
|
+
children: [/* @__PURE__ */ p(a, {
|
|
741
1024
|
as: "h1",
|
|
742
1025
|
className: "ac-title",
|
|
743
1026
|
variant: "page-title",
|
|
744
1027
|
children: "Stacks"
|
|
745
|
-
}), /* @__PURE__ */
|
|
1028
|
+
}), /* @__PURE__ */ m("div", {
|
|
746
1029
|
className: "ac-list-lead",
|
|
747
|
-
children: [/* @__PURE__ */
|
|
1030
|
+
children: [/* @__PURE__ */ p(a, {
|
|
748
1031
|
as: "p",
|
|
749
1032
|
className: "ac-description",
|
|
750
1033
|
tone: "secondary",
|
|
751
1034
|
children: "Infrastructure state from local discovery and the state bucket. Read-only."
|
|
752
|
-
}),
|
|
1035
|
+
}), s || i._tag === "Unauthorized" || i._tag === "Failed" ? null : /* @__PURE__ */ p(e, {
|
|
753
1036
|
className: "ac-read",
|
|
754
|
-
disabled:
|
|
1037
|
+
disabled: i._tag === "Loading",
|
|
755
1038
|
onClick: n,
|
|
756
|
-
children:
|
|
1039
|
+
children: i._tag === "Loading" ? "Reading…" : "Read again"
|
|
757
1040
|
})]
|
|
758
1041
|
})]
|
|
759
1042
|
}),
|
|
760
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ p("div", {
|
|
761
1044
|
className: "ac-sr-only",
|
|
762
1045
|
role: "status",
|
|
763
1046
|
"aria-live": "polite",
|
|
764
1047
|
"aria-atomic": "true",
|
|
765
|
-
children:
|
|
1048
|
+
children: d
|
|
766
1049
|
}),
|
|
767
|
-
|
|
768
|
-
|
|
1050
|
+
c.map((e) => /* @__PURE__ */ p(V, { issue: e }, `${e.source}-${e.reason}`)),
|
|
1051
|
+
i._tag === "Unauthorized" ? /* @__PURE__ */ m("section", {
|
|
769
1052
|
className: "ac-state-panel",
|
|
770
|
-
"aria-labelledby":
|
|
1053
|
+
"aria-labelledby": o,
|
|
771
1054
|
children: [
|
|
772
|
-
/* @__PURE__ */
|
|
1055
|
+
/* @__PURE__ */ m("div", {
|
|
773
1056
|
className: "ac-state-label ac-state-caution",
|
|
774
|
-
children: [/* @__PURE__ */
|
|
1057
|
+
children: [/* @__PURE__ */ p(h, {
|
|
775
1058
|
name: "alert",
|
|
776
1059
|
size: "small",
|
|
777
1060
|
decorative: !0
|
|
778
|
-
}), /* @__PURE__ */
|
|
1061
|
+
}), /* @__PURE__ */ p("span", { children: i.reason === "bootstrap" ? "Sign-in failed" : "Signed out" })]
|
|
779
1062
|
}),
|
|
780
|
-
/* @__PURE__ */
|
|
1063
|
+
/* @__PURE__ */ p(a, {
|
|
781
1064
|
as: "h2",
|
|
782
|
-
id:
|
|
1065
|
+
id: o,
|
|
783
1066
|
className: "ac-state-title",
|
|
784
1067
|
variant: "section-title",
|
|
785
|
-
children:
|
|
1068
|
+
children: i.reason === "bootstrap" ? "Sign-in failed or link already used." : `Your ${t.product} session has ended.`
|
|
786
1069
|
}),
|
|
787
|
-
/* @__PURE__ */
|
|
1070
|
+
/* @__PURE__ */ p(a, {
|
|
788
1071
|
as: "p",
|
|
789
1072
|
className: "ac-state-body",
|
|
790
1073
|
tone: "secondary",
|
|
791
1074
|
children: "Sign in again to see stacks."
|
|
792
1075
|
}),
|
|
793
|
-
/* @__PURE__ */
|
|
1076
|
+
/* @__PURE__ */ p(a, {
|
|
794
1077
|
as: "p",
|
|
795
1078
|
className: "ac-state-instruction",
|
|
796
1079
|
variant: "meta",
|
|
@@ -798,93 +1081,93 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
798
1081
|
children: t.signInInstruction
|
|
799
1082
|
})
|
|
800
1083
|
]
|
|
801
|
-
}) :
|
|
1084
|
+
}) : i._tag === "Failed" ? /* @__PURE__ */ m("section", {
|
|
802
1085
|
className: "ac-state-panel",
|
|
803
|
-
"aria-labelledby":
|
|
1086
|
+
"aria-labelledby": o,
|
|
804
1087
|
children: [
|
|
805
|
-
/* @__PURE__ */
|
|
1088
|
+
/* @__PURE__ */ m("div", {
|
|
806
1089
|
className: "ac-state-label ac-state-critical",
|
|
807
|
-
children: [/* @__PURE__ */
|
|
1090
|
+
children: [/* @__PURE__ */ p(h, {
|
|
808
1091
|
name: "alert",
|
|
809
1092
|
size: "small",
|
|
810
1093
|
decorative: !0
|
|
811
|
-
}), /* @__PURE__ */
|
|
1094
|
+
}), /* @__PURE__ */ p("span", { children: "Unavailable" })]
|
|
812
1095
|
}),
|
|
813
|
-
/* @__PURE__ */
|
|
1096
|
+
/* @__PURE__ */ p(a, {
|
|
814
1097
|
as: "h2",
|
|
815
|
-
id:
|
|
1098
|
+
id: o,
|
|
816
1099
|
className: "ac-state-title",
|
|
817
1100
|
variant: "section-title",
|
|
818
1101
|
children: "Stacks are unavailable right now."
|
|
819
1102
|
}),
|
|
820
|
-
/* @__PURE__ */
|
|
1103
|
+
/* @__PURE__ */ p(a, {
|
|
821
1104
|
as: "p",
|
|
822
1105
|
className: "ac-state-body",
|
|
823
1106
|
tone: "secondary",
|
|
824
1107
|
children: "The stack list couldn’t be read, so no stacks are shown. Nothing was changed."
|
|
825
1108
|
}),
|
|
826
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ p(e, {
|
|
827
1110
|
className: "ac-read",
|
|
828
1111
|
onClick: n,
|
|
829
1112
|
children: "Retry"
|
|
830
1113
|
})
|
|
831
1114
|
]
|
|
832
|
-
}) :
|
|
1115
|
+
}) : s ? /* @__PURE__ */ m("div", {
|
|
833
1116
|
className: "ac-empty",
|
|
834
1117
|
children: [
|
|
835
|
-
/* @__PURE__ */
|
|
1118
|
+
/* @__PURE__ */ p("img", {
|
|
836
1119
|
className: "ac-empty-creature",
|
|
837
|
-
src:
|
|
1120
|
+
src: z,
|
|
838
1121
|
alt: "",
|
|
839
1122
|
width: "88",
|
|
840
1123
|
height: "88"
|
|
841
1124
|
}),
|
|
842
|
-
/* @__PURE__ */
|
|
1125
|
+
/* @__PURE__ */ p(a, {
|
|
843
1126
|
as: "h2",
|
|
844
1127
|
className: "ac-empty-title",
|
|
845
1128
|
variant: "section-title",
|
|
846
1129
|
children: "No stacks found in local state or the state bucket."
|
|
847
1130
|
}),
|
|
848
|
-
/* @__PURE__ */
|
|
1131
|
+
/* @__PURE__ */ p(a, {
|
|
849
1132
|
as: "p",
|
|
850
1133
|
className: "ac-empty-description",
|
|
851
1134
|
tone: "secondary",
|
|
852
1135
|
children: "Local discovery and the state bucket returned no stack state."
|
|
853
1136
|
}),
|
|
854
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ p(e, {
|
|
855
1138
|
className: "ac-read",
|
|
856
1139
|
onClick: n,
|
|
857
1140
|
children: "Read again"
|
|
858
1141
|
}),
|
|
859
|
-
/* @__PURE__ */
|
|
1142
|
+
/* @__PURE__ */ m(a, {
|
|
860
1143
|
as: "p",
|
|
861
1144
|
className: "ac-empty-foot",
|
|
862
1145
|
variant: "meta",
|
|
863
1146
|
tone: "secondary",
|
|
864
1147
|
children: [
|
|
865
1148
|
"Checked ",
|
|
866
|
-
|
|
1149
|
+
i.checkedAt,
|
|
867
1150
|
" · stacks appear here after their first deployment from the CLI."
|
|
868
1151
|
]
|
|
869
1152
|
})
|
|
870
1153
|
]
|
|
871
|
-
}) : /* @__PURE__ */
|
|
1154
|
+
}) : /* @__PURE__ */ m("div", {
|
|
872
1155
|
className: "ac-results",
|
|
873
|
-
"aria-busy":
|
|
1156
|
+
"aria-busy": i._tag === "Loading",
|
|
874
1157
|
children: [
|
|
875
|
-
/* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ p(a, {
|
|
876
1159
|
as: "p",
|
|
877
1160
|
className: "ac-summary",
|
|
878
1161
|
variant: "meta",
|
|
879
1162
|
tone: "secondary",
|
|
880
|
-
children:
|
|
1163
|
+
children: d
|
|
881
1164
|
}),
|
|
882
|
-
|
|
1165
|
+
i._tag === "Loading" ? /* @__PURE__ */ p(U, {}) : i._tag === "Ready" ? u.map((e) => /* @__PURE__ */ p(H, {
|
|
883
1166
|
app: e,
|
|
884
|
-
stacks:
|
|
1167
|
+
stacks: i.list.stacks.filter((t) => t.app === e),
|
|
885
1168
|
stackHref: r
|
|
886
1169
|
}, e)) : null,
|
|
887
|
-
|
|
1170
|
+
i._tag === "Ready" && i.list.stacks.length === 0 ? /* @__PURE__ */ p(a, {
|
|
888
1171
|
as: "p",
|
|
889
1172
|
tone: "secondary",
|
|
890
1173
|
children: "No stacks could be read. Discovery is incomplete."
|
|
@@ -895,4 +1178,4 @@ var m = () => /* @__PURE__ */ f("span", {
|
|
|
895
1178
|
});
|
|
896
1179
|
};
|
|
897
1180
|
//#endregion
|
|
898
|
-
export {
|
|
1181
|
+
export { S as PlanView, A as ResourceDetailView, R as StackDetailView, W as StackListView };
|