@voltro/devtools 0.89.2 → 0.91.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/CHANGELOG.md +1943 -0
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/dist/Devtools.js +170 -169
- package/dist/components/dockMenu.js +46 -46
- package/dist/console/Capsule.js +137 -68
- package/dist/console/Console.js +204 -199
- package/dist/console/InspectRefusals.js +12 -12
- package/dist/console/sources.js +13 -13
- package/dist/index.d.ts +10 -0
- package/dist/index.js +3 -3
- package/dist/inspectFetch.js +19 -19
- package/dist/inspectStream.js +9 -9
- package/dist/panels/desktop.js +18 -18
- package/dist/panels/indexes.js +71 -71
- package/dist/panels/pwa.js +22 -22
- package/dist/panels/routes.js +13 -13
- package/dist/panels/runtimes.js +15 -15
- package/dist/panels/stores.js +35 -35
- package/dist/panels/traces.js +42 -42
- package/dist/panels/webhooks.js +242 -117
- package/dist/panels/workflows.js +146 -146
- package/dist/strings.js +13 -3
- package/dist/styles.css +11 -3
- package/dist/useCapsuleClearance.js +6 -6
- package/package.json +4 -4
package/dist/panels/workflows.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Badge as e, Button as t, Card as n, Empty as r, SectionTitle as i } from "../components/primitives.js";
|
|
2
|
+
import { Workflow as a } from "../components/icons.js";
|
|
3
|
+
import { useDocumentVisible as o } from "../useDocumentVisible.js";
|
|
4
4
|
import { useInspectToken as s } from "../inspectAuth.js";
|
|
5
5
|
import { fetchInspect as c, postInspect as l } from "../inspectFetch.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { useInspectChangeEpoch as u } from "../inspectStream.js";
|
|
7
|
+
import { useDevtoolsStrings as d } from "../strings.js";
|
|
8
8
|
import { useEffect as f, useMemo as p, useState as m } from "react";
|
|
9
9
|
import { useFrameworkRuntimes as h, useWorkflow as g } from "@voltro/client";
|
|
10
10
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
@@ -42,12 +42,12 @@ var b = {
|
|
|
42
42
|
let n = await c(`${e}/_voltro/inspect/workflows/runs?limit=${S}`, t);
|
|
43
43
|
return n !== null && Array.isArray(n.runs) ? n.runs : null;
|
|
44
44
|
}, j = (e) => {
|
|
45
|
-
let t =
|
|
45
|
+
let t = o(), n = s(), r = t && e !== "", i = u(e, ["workflowRuns"], r), [a, c] = m([]), [l, d] = m(!1);
|
|
46
46
|
return f(() => {
|
|
47
47
|
if (!r) return;
|
|
48
48
|
let t = !1, i = async () => {
|
|
49
49
|
let r = await A(e, n);
|
|
50
|
-
t || (r === null ?
|
|
50
|
+
t || (r === null ? d(!0) : (d(!1), c(r)));
|
|
51
51
|
};
|
|
52
52
|
i();
|
|
53
53
|
let a = setInterval(i, C);
|
|
@@ -61,20 +61,20 @@ var b = {
|
|
|
61
61
|
i
|
|
62
62
|
]), {
|
|
63
63
|
runs: a,
|
|
64
|
-
failed:
|
|
64
|
+
failed: l
|
|
65
65
|
};
|
|
66
66
|
}, M = (e, t) => {
|
|
67
|
-
let n =
|
|
67
|
+
let n = o(), r = s(), i = u(e, ["workflowSteps", "workflowEvents"], n && e !== ""), [a, l] = m([]), [d, p] = m([]);
|
|
68
68
|
return f(() => {
|
|
69
69
|
if (!n || e === "") return;
|
|
70
|
-
let i = !1, a = `${e}/_voltro/inspect/workflows/runs/${encodeURIComponent(t)}`,
|
|
70
|
+
let i = !1, a = `${e}/_voltro/inspect/workflows/runs/${encodeURIComponent(t)}`, o = async () => {
|
|
71
71
|
let [e, t] = await Promise.all([c(`${a}/steps`, r), c(`${a}/events`, r)]);
|
|
72
|
-
i || (e !== null && Array.isArray(e.steps) &&
|
|
72
|
+
i || (e !== null && Array.isArray(e.steps) && l(e.steps), t !== null && Array.isArray(t.events) && p(t.events));
|
|
73
73
|
};
|
|
74
|
-
|
|
75
|
-
let
|
|
74
|
+
o();
|
|
75
|
+
let s = setInterval(o, C);
|
|
76
76
|
return () => {
|
|
77
|
-
i = !0, clearInterval(
|
|
77
|
+
i = !0, clearInterval(s);
|
|
78
78
|
};
|
|
79
79
|
}, [
|
|
80
80
|
e,
|
|
@@ -84,146 +84,146 @@ var b = {
|
|
|
84
84
|
i
|
|
85
85
|
]), {
|
|
86
86
|
steps: a,
|
|
87
|
-
events:
|
|
87
|
+
events: d
|
|
88
88
|
};
|
|
89
89
|
}, N = (e) => {
|
|
90
|
-
let t = h(), n =
|
|
90
|
+
let t = h(), n = o(), r = s(), i = t.names.join(","), [a, c] = m(0), l = e && n, d = i === "" ? "" : t.get(i.split(",")[0]).inspectBaseUrl ?? "", p = u(d, ["workflowRuns"], l);
|
|
91
91
|
return f(() => {
|
|
92
|
-
if (!
|
|
93
|
-
|
|
92
|
+
if (!l) {
|
|
93
|
+
c(0);
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
96
|
let e = i === "" ? [] : i.split(",").map((e) => t.get(e).inspectBaseUrl).filter((e) => e !== "");
|
|
97
97
|
if (e.length === 0) {
|
|
98
|
-
|
|
98
|
+
c(0);
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
let n = !1, a = async () => {
|
|
102
102
|
let t = await Promise.all(e.map((e) => A(e, r)));
|
|
103
|
-
n ||
|
|
103
|
+
n || c(t.reduce((e, t) => e + (t === null ? 0 : t.filter((e) => D(e.status)).length), 0));
|
|
104
104
|
};
|
|
105
105
|
a();
|
|
106
|
-
let
|
|
106
|
+
let o = setInterval(a, C);
|
|
107
107
|
return () => {
|
|
108
|
-
n = !0, clearInterval(
|
|
108
|
+
n = !0, clearInterval(o);
|
|
109
109
|
};
|
|
110
110
|
}, [
|
|
111
111
|
t,
|
|
112
112
|
i,
|
|
113
|
-
|
|
113
|
+
l,
|
|
114
114
|
r,
|
|
115
115
|
p
|
|
116
116
|
]), a;
|
|
117
117
|
}, P = () => {
|
|
118
|
-
let e = h(),
|
|
119
|
-
return e.names.length === 0 ? /* @__PURE__ */ v(
|
|
118
|
+
let e = h(), t = d().workflows;
|
|
119
|
+
return e.names.length === 0 ? /* @__PURE__ */ v(r, { children: t.noApi }) : /* @__PURE__ */ v("div", {
|
|
120
120
|
className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
|
|
121
121
|
children: e.names.map((e) => /* @__PURE__ */ v(F, { apiName: e }, e))
|
|
122
122
|
});
|
|
123
|
-
}, F = ({ apiName:
|
|
124
|
-
let
|
|
123
|
+
}, F = ({ apiName: t }) => {
|
|
124
|
+
let r = h(), o = d().workflows, s = r.get(t), c = s.inspectBaseUrl, l = p(() => Object.entries(s.descriptors).filter(([, e]) => e.kind === "workflow").map(([e]) => e).sort(), [s.descriptors]), { runs: u, failed: g } = j(c), _ = u.filter((e) => D(e.status)).length, [x, S] = m(null), [C, E] = m(() => Date.now());
|
|
125
125
|
return f(() => {
|
|
126
126
|
if (_ === 0) return;
|
|
127
127
|
let e = setInterval(() => E(Date.now()), 1e3);
|
|
128
128
|
return () => clearInterval(e);
|
|
129
|
-
}, [_]), /* @__PURE__ */ y(
|
|
130
|
-
/* @__PURE__ */ v(
|
|
131
|
-
Icon:
|
|
132
|
-
right: _ > 0 ? /* @__PURE__ */ v(
|
|
129
|
+
}, [_]), /* @__PURE__ */ y(n, { children: [
|
|
130
|
+
/* @__PURE__ */ v(i, {
|
|
131
|
+
Icon: a,
|
|
132
|
+
right: _ > 0 ? /* @__PURE__ */ v(e, {
|
|
133
133
|
tone: "info",
|
|
134
|
-
children:
|
|
135
|
-
}) : /* @__PURE__ */ v(
|
|
134
|
+
children: o.runningBadge(_)
|
|
135
|
+
}) : /* @__PURE__ */ v(e, {
|
|
136
136
|
tone: "neutral",
|
|
137
|
-
children:
|
|
137
|
+
children: o.runsBadge(u.length)
|
|
138
138
|
}),
|
|
139
|
-
children:
|
|
139
|
+
children: t
|
|
140
140
|
}),
|
|
141
141
|
/* @__PURE__ */ v(I, {
|
|
142
|
-
apiName:
|
|
143
|
-
definitions:
|
|
144
|
-
runs:
|
|
142
|
+
apiName: t,
|
|
143
|
+
definitions: l,
|
|
144
|
+
runs: u
|
|
145
145
|
}),
|
|
146
146
|
/* @__PURE__ */ y("div", {
|
|
147
147
|
className: "vdt:px-3 vdt:py-2 vdt:border-t vdt:border-border",
|
|
148
148
|
children: [/* @__PURE__ */ v("div", {
|
|
149
149
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1.5",
|
|
150
|
-
children:
|
|
150
|
+
children: o.runs(u.length)
|
|
151
151
|
}), g ? /* @__PURE__ */ v("div", {
|
|
152
152
|
className: "vdt:text-xs vdt:text-danger",
|
|
153
|
-
children:
|
|
154
|
-
}) :
|
|
153
|
+
children: o.runsUnavailable
|
|
154
|
+
}) : u.length === 0 ? /* @__PURE__ */ v("div", {
|
|
155
155
|
className: "vdt:text-xs vdt:text-foreground-subtle",
|
|
156
|
-
children:
|
|
156
|
+
children: l.length === 0 ? o.noDefinitions : o.noRuns
|
|
157
157
|
}) : /* @__PURE__ */ v("div", {
|
|
158
158
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5",
|
|
159
|
-
children:
|
|
160
|
-
"data-run-id":
|
|
161
|
-
"data-run-status":
|
|
159
|
+
children: u.map((t) => /* @__PURE__ */ y("div", {
|
|
160
|
+
"data-run-id": t.id,
|
|
161
|
+
"data-run-status": t.status,
|
|
162
162
|
children: [/* @__PURE__ */ y("button", {
|
|
163
163
|
type: "button",
|
|
164
|
-
"aria-expanded": x ===
|
|
165
|
-
onClick: () => S(x ===
|
|
164
|
+
"aria-expanded": x === t.id,
|
|
165
|
+
onClick: () => S(x === t.id ? null : t.id),
|
|
166
166
|
className: "vdt:w-full vdt:flex vdt:items-center vdt:gap-2 vdt:text-left vdt:text-xs vdt:px-1.5 vdt:py-1 vdt:rounded-sm vdt:hover:bg-muted",
|
|
167
167
|
children: [
|
|
168
168
|
/* @__PURE__ */ v("span", {
|
|
169
169
|
className: "vdt:text-foreground-subtle vdt:w-2",
|
|
170
|
-
children: x ===
|
|
170
|
+
children: x === t.id ? "▾" : "▸"
|
|
171
171
|
}),
|
|
172
|
-
/* @__PURE__ */ v(
|
|
173
|
-
tone: b[
|
|
174
|
-
children:
|
|
172
|
+
/* @__PURE__ */ v(e, {
|
|
173
|
+
tone: b[t.status] ?? "neutral",
|
|
174
|
+
children: t.status
|
|
175
175
|
}),
|
|
176
176
|
/* @__PURE__ */ v("code", {
|
|
177
177
|
className: "vdt:font-mono vdt:text-foreground vdt:truncate",
|
|
178
|
-
children:
|
|
178
|
+
children: t.tag
|
|
179
179
|
}),
|
|
180
|
-
|
|
180
|
+
t.parentExecutionId === null ? null : /* @__PURE__ */ v(e, {
|
|
181
181
|
tone: "neutral",
|
|
182
|
-
children:
|
|
182
|
+
children: o.child
|
|
183
183
|
}),
|
|
184
|
-
|
|
184
|
+
t.errorMessage === null ? null : /* @__PURE__ */ y("span", {
|
|
185
185
|
className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
|
|
186
|
-
children: [
|
|
186
|
+
children: [t.errorTag === null ? "" : `${t.errorTag} · `, t.errorMessage]
|
|
187
187
|
}),
|
|
188
188
|
/* @__PURE__ */ v("span", {
|
|
189
189
|
className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted vdt:whitespace-nowrap",
|
|
190
|
-
children: w(O(
|
|
190
|
+
children: w(O(t, C))
|
|
191
191
|
}),
|
|
192
192
|
/* @__PURE__ */ v("span", {
|
|
193
193
|
className: "vdt:tabular-nums vdt:text-foreground-subtle vdt:whitespace-nowrap",
|
|
194
|
-
children: T(
|
|
194
|
+
children: T(t.startedAt)
|
|
195
195
|
})
|
|
196
196
|
]
|
|
197
|
-
}), x ===
|
|
198
|
-
baseUrl:
|
|
199
|
-
run:
|
|
197
|
+
}), x === t.id ? /* @__PURE__ */ v(L, {
|
|
198
|
+
baseUrl: c,
|
|
199
|
+
run: t
|
|
200
200
|
}) : null]
|
|
201
|
-
},
|
|
201
|
+
}, t.id))
|
|
202
202
|
})]
|
|
203
203
|
})
|
|
204
204
|
] });
|
|
205
|
-
}, I = ({ apiName: e, definitions: n, runs:
|
|
206
|
-
let
|
|
205
|
+
}, I = ({ apiName: e, definitions: n, runs: r }) => {
|
|
206
|
+
let i = d().workflows, [a, o] = m(n[0] ?? "");
|
|
207
207
|
f(() => {
|
|
208
|
-
|
|
209
|
-
}, [n,
|
|
210
|
-
let
|
|
211
|
-
let e =
|
|
208
|
+
a === "" && n.length > 0 && o(n[0]);
|
|
209
|
+
}, [n, a]);
|
|
210
|
+
let s = p(() => {
|
|
211
|
+
let e = r.find((e) => e.tag === a);
|
|
212
212
|
return e === void 0 ? "{}" : E(e.payload);
|
|
213
|
-
}, [
|
|
213
|
+
}, [r, a]), [c, l] = m(s), [u, h] = m(!1);
|
|
214
214
|
f(() => {
|
|
215
|
-
|
|
216
|
-
}, [
|
|
217
|
-
let [_, b] = m(null), x = g(e,
|
|
215
|
+
u || l(s);
|
|
216
|
+
}, [s, u]);
|
|
217
|
+
let [_, b] = m(null), x = g(e, a === "" ? "__voltro.devtools.none" : a);
|
|
218
218
|
if (n.length === 0) return null;
|
|
219
219
|
let S = async () => {
|
|
220
220
|
let e;
|
|
221
221
|
try {
|
|
222
|
-
e =
|
|
222
|
+
e = c.trim() === "" ? {} : JSON.parse(c);
|
|
223
223
|
} catch (e) {
|
|
224
224
|
b({
|
|
225
225
|
tone: "danger",
|
|
226
|
-
text:
|
|
226
|
+
text: i.invalidJson(e instanceof Error ? e.message : String(e))
|
|
227
227
|
});
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
@@ -232,12 +232,12 @@ var b = {
|
|
|
232
232
|
let t = await x.start(e);
|
|
233
233
|
b({
|
|
234
234
|
tone: "success",
|
|
235
|
-
text:
|
|
235
|
+
text: i.started(t.executionId ?? t.id, t.status)
|
|
236
236
|
}), h(!1);
|
|
237
237
|
} catch (e) {
|
|
238
238
|
b({
|
|
239
239
|
tone: "danger",
|
|
240
|
-
text:
|
|
240
|
+
text: i.startFailed(e instanceof Error ? e.message : String(e))
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
};
|
|
@@ -249,13 +249,13 @@ var b = {
|
|
|
249
249
|
children: [
|
|
250
250
|
/* @__PURE__ */ v("span", {
|
|
251
251
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider",
|
|
252
|
-
children:
|
|
252
|
+
children: i.start
|
|
253
253
|
}),
|
|
254
254
|
/* @__PURE__ */ v("select", {
|
|
255
|
-
"aria-label":
|
|
256
|
-
value:
|
|
255
|
+
"aria-label": i.workflowLabel,
|
|
256
|
+
value: a,
|
|
257
257
|
onChange: (e) => {
|
|
258
|
-
|
|
258
|
+
o(e.target.value), h(!1), b(null);
|
|
259
259
|
},
|
|
260
260
|
className: "vdt:text-xs vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground",
|
|
261
261
|
children: n.map((e) => /* @__PURE__ */ v("option", {
|
|
@@ -264,28 +264,28 @@ var b = {
|
|
|
264
264
|
}, e))
|
|
265
265
|
}),
|
|
266
266
|
/* @__PURE__ */ v("span", { className: "vdt:sp" }),
|
|
267
|
-
/* @__PURE__ */ v(
|
|
267
|
+
/* @__PURE__ */ v(t, {
|
|
268
268
|
onClick: () => {
|
|
269
269
|
S();
|
|
270
270
|
},
|
|
271
|
-
disabled: x.pending ||
|
|
272
|
-
children: x.pending ?
|
|
271
|
+
disabled: x.pending || a === "",
|
|
272
|
+
children: x.pending ? i.starting : i.start
|
|
273
273
|
})
|
|
274
274
|
]
|
|
275
275
|
}),
|
|
276
276
|
/* @__PURE__ */ v("textarea", {
|
|
277
|
-
"aria-label":
|
|
278
|
-
value:
|
|
277
|
+
"aria-label": i.payloadLabel,
|
|
278
|
+
value: c,
|
|
279
279
|
onChange: (e) => {
|
|
280
|
-
|
|
280
|
+
l(e.target.value), h(!0);
|
|
281
281
|
},
|
|
282
282
|
spellCheck: !1,
|
|
283
|
-
rows: Math.min(8, Math.max(2,
|
|
283
|
+
rows: Math.min(8, Math.max(2, c.split("\n").length)),
|
|
284
284
|
className: "vdt:w-full vdt:text-[11px] vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-2 vdt:py-1 vdt:text-foreground vdt:resize-y"
|
|
285
285
|
}),
|
|
286
286
|
/* @__PURE__ */ v("div", {
|
|
287
287
|
className: "vdt:text-[10px] vdt:text-foreground-subtle",
|
|
288
|
-
children:
|
|
288
|
+
children: i.payloadHint
|
|
289
289
|
}),
|
|
290
290
|
_ === null ? null : /* @__PURE__ */ v("div", {
|
|
291
291
|
role: _.tone === "danger" ? "alert" : "status",
|
|
@@ -294,12 +294,12 @@ var b = {
|
|
|
294
294
|
})
|
|
295
295
|
]
|
|
296
296
|
});
|
|
297
|
-
}, L = ({ baseUrl:
|
|
298
|
-
let
|
|
297
|
+
}, L = ({ baseUrl: n, run: r }) => {
|
|
298
|
+
let i = d().workflows, a = s(), { steps: o, events: c } = M(n, r.id), u = p(() => k(c), [c]), [h, g] = m(""), [b, S] = m("{}"), [C, E] = m(!1), [D, O] = m(null);
|
|
299
299
|
f(() => {
|
|
300
|
-
h === "" &&
|
|
301
|
-
}, [
|
|
302
|
-
let [A, j] = m(null), N =
|
|
300
|
+
h === "" && u.length > 0 && g(u[0]);
|
|
301
|
+
}, [u, h]);
|
|
302
|
+
let [A, j] = m(null), N = r.status === "running" || r.status === "queued" || r.status === "suspended", P = `${n}/_voltro/inspect/workflows/runs/${encodeURIComponent(r.id)}`, F = async (e, t) => {
|
|
303
303
|
O(null), E(!0);
|
|
304
304
|
try {
|
|
305
305
|
O({
|
|
@@ -309,25 +309,25 @@ var b = {
|
|
|
309
309
|
} catch (t) {
|
|
310
310
|
O({
|
|
311
311
|
tone: "danger",
|
|
312
|
-
text:
|
|
312
|
+
text: i.actionFailed(e, t instanceof Error ? t.message : String(t))
|
|
313
313
|
});
|
|
314
314
|
} finally {
|
|
315
315
|
E(!1);
|
|
316
316
|
}
|
|
317
|
-
}, I = () => F(
|
|
318
|
-
let e = await l(`${P}/cancel`,
|
|
319
|
-
return
|
|
320
|
-
}), L = () => F(
|
|
317
|
+
}, I = () => F(i.cancel, async () => {
|
|
318
|
+
let e = await l(`${P}/cancel`, a, {});
|
|
319
|
+
return i.cancelResult(typeof e.kind == "string" ? e.kind : e.cancelled === !0 ? "confirmed" : "submitted");
|
|
320
|
+
}), L = () => F(i.sendSignal, async () => {
|
|
321
321
|
let e;
|
|
322
322
|
try {
|
|
323
323
|
e = b.trim() === "" ? void 0 : JSON.parse(b);
|
|
324
324
|
} catch (e) {
|
|
325
|
-
throw Error(
|
|
325
|
+
throw Error(i.invalidJson(e instanceof Error ? e.message : String(e)));
|
|
326
326
|
}
|
|
327
|
-
return await l(`${P}/signal`,
|
|
327
|
+
return await l(`${P}/signal`, a, e === void 0 ? { signalName: h } : {
|
|
328
328
|
signalName: h,
|
|
329
329
|
payload: e
|
|
330
|
-
}),
|
|
330
|
+
}), i.signalSent(h);
|
|
331
331
|
});
|
|
332
332
|
return /* @__PURE__ */ y("div", {
|
|
333
333
|
className: "vdt:ml-4 vdt:pl-2 vdt:border-l vdt:border-border vdt:py-1 vdt:flex vdt:flex-col vdt:gap-2 vdt:text-xs",
|
|
@@ -335,70 +335,70 @@ var b = {
|
|
|
335
335
|
/* @__PURE__ */ y("div", {
|
|
336
336
|
className: "vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2",
|
|
337
337
|
children: [/* @__PURE__ */ v(R, {
|
|
338
|
-
label:
|
|
339
|
-
value:
|
|
338
|
+
label: i.payloadLabel,
|
|
339
|
+
value: r.payload
|
|
340
340
|
}), /* @__PURE__ */ v(R, {
|
|
341
|
-
label:
|
|
342
|
-
value:
|
|
343
|
-
tag:
|
|
344
|
-
message:
|
|
345
|
-
} :
|
|
341
|
+
label: r.status === "failed" ? i.error : i.output,
|
|
342
|
+
value: r.status === "failed" ? {
|
|
343
|
+
tag: r.errorTag,
|
|
344
|
+
message: r.errorMessage
|
|
345
|
+
} : r.output
|
|
346
346
|
})]
|
|
347
347
|
}),
|
|
348
348
|
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
|
|
349
349
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
|
|
350
|
-
children:
|
|
351
|
-
}),
|
|
350
|
+
children: i.steps(o.length)
|
|
351
|
+
}), o.length === 0 ? /* @__PURE__ */ v("div", {
|
|
352
352
|
className: "vdt:text-foreground-subtle",
|
|
353
|
-
children:
|
|
353
|
+
children: i.noSteps
|
|
354
354
|
}) : /* @__PURE__ */ v("div", {
|
|
355
355
|
className: "vdt:flex vdt:flex-col vdt:gap-0.5",
|
|
356
|
-
children:
|
|
356
|
+
children: o.map((t) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("button", {
|
|
357
357
|
type: "button",
|
|
358
|
-
onClick: () => j(A ===
|
|
358
|
+
onClick: () => j(A === t.id ? null : t.id),
|
|
359
359
|
className: "vdt:w-full vdt:flex vdt:items-center vdt:gap-2 vdt:text-left vdt:px-1 vdt:py-0.5 vdt:rounded-sm vdt:hover:bg-muted",
|
|
360
360
|
children: [
|
|
361
|
-
/* @__PURE__ */ v(
|
|
362
|
-
tone: x[
|
|
363
|
-
children:
|
|
361
|
+
/* @__PURE__ */ v(e, {
|
|
362
|
+
tone: x[t.status] ?? "info",
|
|
363
|
+
children: t.status
|
|
364
364
|
}),
|
|
365
365
|
/* @__PURE__ */ v("code", {
|
|
366
366
|
className: "vdt:font-mono vdt:text-foreground",
|
|
367
|
-
children:
|
|
367
|
+
children: t.stepName
|
|
368
368
|
}),
|
|
369
|
-
|
|
369
|
+
t.attempt > 1 ? /* @__PURE__ */ v("span", {
|
|
370
370
|
className: "vdt:text-warning",
|
|
371
|
-
children:
|
|
371
|
+
children: i.attempt(t.attempt)
|
|
372
372
|
}) : null,
|
|
373
|
-
|
|
373
|
+
t.errorMessage === null ? null : /* @__PURE__ */ v("span", {
|
|
374
374
|
className: "vdt:text-danger vdt:truncate vdt:font-mono vdt:text-[11px]",
|
|
375
|
-
children:
|
|
375
|
+
children: t.errorMessage
|
|
376
376
|
}),
|
|
377
377
|
/* @__PURE__ */ v("span", {
|
|
378
378
|
className: "vdt:ml-auto vdt:tabular-nums vdt:text-foreground-muted",
|
|
379
|
-
children: w(
|
|
379
|
+
children: w(t.durationMs)
|
|
380
380
|
})
|
|
381
381
|
]
|
|
382
|
-
}), A ===
|
|
382
|
+
}), A === t.id ? /* @__PURE__ */ y("div", {
|
|
383
383
|
className: "vdt:ml-3 vdt:grid vdt:grid-cols-1 vdt:sm:grid-cols-2 vdt:gap-2 vdt:py-1",
|
|
384
384
|
children: [/* @__PURE__ */ v(R, {
|
|
385
|
-
label:
|
|
386
|
-
value:
|
|
385
|
+
label: i.input,
|
|
386
|
+
value: t.input
|
|
387
387
|
}), /* @__PURE__ */ v(R, {
|
|
388
|
-
label:
|
|
389
|
-
value:
|
|
390
|
-
tag:
|
|
391
|
-
message:
|
|
392
|
-
} :
|
|
388
|
+
label: t.status === "failed" ? i.error : i.output,
|
|
389
|
+
value: t.status === "failed" ? t.errorCause ?? {
|
|
390
|
+
tag: t.errorTag,
|
|
391
|
+
message: t.errorMessage
|
|
392
|
+
} : t.output
|
|
393
393
|
})]
|
|
394
|
-
}) : null] },
|
|
394
|
+
}) : null] }, t.id))
|
|
395
395
|
})] }),
|
|
396
|
-
|
|
396
|
+
c.length > 0 ? /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
|
|
397
397
|
className: "vdt:text-foreground-muted vdt:text-[10px] vdt:uppercase vdt:tracking-wider vdt:mb-1",
|
|
398
|
-
children:
|
|
398
|
+
children: i.events(c.length)
|
|
399
399
|
}), /* @__PURE__ */ v("div", {
|
|
400
400
|
className: "vdt:flex vdt:flex-wrap vdt:gap-1",
|
|
401
|
-
children:
|
|
401
|
+
children: c.map((e) => /* @__PURE__ */ y("span", {
|
|
402
402
|
title: T(e.occurredAt),
|
|
403
403
|
className: "vdt:inline-flex vdt:items-center vdt:gap-1 vdt:text-[10px] vdt:font-mono vdt:text-foreground-muted vdt:border vdt:border-border vdt:rounded-sm vdt:px-1",
|
|
404
404
|
children: [e.eventType, e.stepName === null ? "" : ` · ${e.stepName}`]
|
|
@@ -407,49 +407,49 @@ var b = {
|
|
|
407
407
|
/* @__PURE__ */ y("div", {
|
|
408
408
|
className: "vdt:flex vdt:flex-wrap vdt:items-center vdt:gap-2",
|
|
409
409
|
children: [
|
|
410
|
-
N ? /* @__PURE__ */ v(
|
|
410
|
+
N ? /* @__PURE__ */ v(t, {
|
|
411
411
|
onClick: () => {
|
|
412
412
|
I();
|
|
413
413
|
},
|
|
414
414
|
disabled: C,
|
|
415
|
-
children:
|
|
415
|
+
children: i.cancel
|
|
416
416
|
}) : null,
|
|
417
|
-
|
|
417
|
+
u.length > 0 && r.status === "running" ? /* @__PURE__ */ y(_, { children: [
|
|
418
418
|
/* @__PURE__ */ v("span", {
|
|
419
419
|
className: "vdt:text-foreground-muted",
|
|
420
|
-
children:
|
|
420
|
+
children: i.awaiting
|
|
421
421
|
}),
|
|
422
422
|
/* @__PURE__ */ v("select", {
|
|
423
|
-
"aria-label":
|
|
423
|
+
"aria-label": i.signalName,
|
|
424
424
|
value: h,
|
|
425
425
|
onChange: (e) => g(e.target.value),
|
|
426
426
|
className: "vdt:text-xs vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground",
|
|
427
|
-
children:
|
|
427
|
+
children: u.map((e) => /* @__PURE__ */ v("option", {
|
|
428
428
|
value: e,
|
|
429
429
|
children: e
|
|
430
430
|
}, e))
|
|
431
431
|
}),
|
|
432
432
|
/* @__PURE__ */ v("input", {
|
|
433
|
-
"aria-label":
|
|
433
|
+
"aria-label": i.signalPayload,
|
|
434
434
|
value: b,
|
|
435
435
|
onChange: (e) => S(e.target.value),
|
|
436
436
|
spellCheck: !1,
|
|
437
437
|
className: "vdt:text-[11px] vdt:font-mono vdt:bg-background vdt:border vdt:border-border vdt:rounded-sm vdt:px-1.5 vdt:py-0.5 vdt:text-foreground vdt:min-w-32"
|
|
438
438
|
}),
|
|
439
|
-
/* @__PURE__ */ v(
|
|
439
|
+
/* @__PURE__ */ v(t, {
|
|
440
440
|
onClick: () => {
|
|
441
441
|
L();
|
|
442
442
|
},
|
|
443
443
|
disabled: C || h === "",
|
|
444
|
-
children:
|
|
444
|
+
children: i.sendSignal
|
|
445
445
|
})
|
|
446
446
|
] }) : null,
|
|
447
|
-
|
|
447
|
+
r.traceId === null ? null : /* @__PURE__ */ y("span", {
|
|
448
448
|
className: "vdt:text-[10px] vdt:font-mono vdt:text-foreground-subtle",
|
|
449
449
|
children: [
|
|
450
|
-
|
|
450
|
+
i.trace,
|
|
451
451
|
" · ",
|
|
452
|
-
|
|
452
|
+
r.traceId
|
|
453
453
|
]
|
|
454
454
|
})
|
|
455
455
|
]
|
package/dist/strings.js
CHANGED
|
@@ -193,13 +193,23 @@ var o = {
|
|
|
193
193
|
empty: "No api processes connected — webhooks discover from `*.webhook.tsx`.",
|
|
194
194
|
outgoing: (e) => `Outgoing events (${e})`,
|
|
195
195
|
incoming: (e) => `Incoming routes (${e})`,
|
|
196
|
-
targets: (e) => `
|
|
197
|
-
deliveries: (e) => `
|
|
196
|
+
targets: (e) => `Targets on this page (${e})`,
|
|
197
|
+
deliveries: (e) => `Delivery attempts on this page (${e})`,
|
|
198
198
|
signed: "signed",
|
|
199
199
|
unsigned: "unsigned",
|
|
200
200
|
active: "active",
|
|
201
201
|
paused: "paused",
|
|
202
|
-
attempt: (e) => `attempt ${e}
|
|
202
|
+
attempt: (e) => `attempt ${e}`,
|
|
203
|
+
targetPages: "Targets",
|
|
204
|
+
deliveryPages: "Delivery history",
|
|
205
|
+
pageRange: (e, t) => `Rows ${e}–${t}`,
|
|
206
|
+
pageLoading: "Loading page…",
|
|
207
|
+
pageError: "This page could not be loaded. Refresh or return to the first page.",
|
|
208
|
+
pageFirst: "First page",
|
|
209
|
+
pagePrevious: "Previous",
|
|
210
|
+
pageNext: "Next",
|
|
211
|
+
pageRefresh: "Refresh",
|
|
212
|
+
pageLiveHint: "Live view: rows can move between pages as data changes."
|
|
203
213
|
},
|
|
204
214
|
mutations: {
|
|
205
215
|
emptyTitle: "No mutations yet.",
|
package/dist/styles.css
CHANGED
|
@@ -393,12 +393,20 @@
|
|
|
393
393
|
font-weight: 600;
|
|
394
394
|
color: var(--foreground);
|
|
395
395
|
}
|
|
396
|
+
/* One line. The verb never shrinks; the path's head gives way first (cut with
|
|
397
|
+
* an ellipsis), the last segments only once the head is gone — a middle cut,
|
|
398
|
+
* so the end of the route stays readable. As wide as 60ch where the viewport
|
|
399
|
+
* allows: the capsule's inset, mark, gaps, padding and dots take ~120px. */
|
|
396
400
|
.vdt-scope .vdt-capsule-label {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
401
|
+
display: inline-flex;
|
|
402
|
+
min-width: 0;
|
|
403
|
+
max-width: min(60ch, calc(100vw - 120px));
|
|
400
404
|
white-space: nowrap;
|
|
401
405
|
}
|
|
406
|
+
.vdt-scope .vdt-capsule-label > span { overflow: hidden; text-overflow: ellipsis; }
|
|
407
|
+
.vdt-scope .vdt-capsule-label-verb { flex: none; white-space: pre; }
|
|
408
|
+
.vdt-scope .vdt-capsule-label-head { flex: 0 10000 auto; min-width: 1.5ch; }
|
|
409
|
+
.vdt-scope .vdt-capsule-label-tail { flex: 0 1 auto; min-width: 0; }
|
|
402
410
|
|
|
403
411
|
/* A dense host can leave no free space for the full face. Keep a reachable
|
|
404
412
|
* status mark; the accessible label and title still carry the complete state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { clearCapsulePlacement as e, hasCapsuleClearance as t } from "./capsuleClearance.js";
|
|
2
|
+
import { isSamePlacement as n } from "./capsulePlacement.js";
|
|
3
3
|
import { useLayoutEffect as r, useRef as i, useState as a } from "react";
|
|
4
4
|
// src/useCapsuleClearance.ts
|
|
5
5
|
var o = "a[href],button,input,select,textarea,label,legend,summary,th,td,[role=\"button\"],[role=\"link\"],[role=\"checkbox\"],[role=\"switch\"],[role=\"tab\"],[role=\"alert\"],[role=\"status\"],[role=\"cell\"],[role=\"gridcell\"],[role=\"columnheader\"],[role=\"rowheader\"],[aria-live]:not([aria-live=\"off\"]),[contenteditable=\"true\"],[tabindex]:not([tabindex=\"-1\"]),h1,h2,h3,h4,h5,h6,p", s = (s, c, l) => {
|
|
@@ -27,14 +27,14 @@ var o = "a[href],button,input,select,textarea,label,legend,summary,th,td,[role=\
|
|
|
27
27
|
let t = e.getBoundingClientRect();
|
|
28
28
|
t.width === 0 || t.height === 0 || t.right <= 0 || t.bottom <= 0 || t.left >= u.width || t.top >= u.height || a.getComputedStyle(e).visibility !== "hidden" && p.push(t);
|
|
29
29
|
}
|
|
30
|
-
let m =
|
|
30
|
+
let m = n(f.current.preferred, c), h = m ? f.current.placement : c, g = {
|
|
31
31
|
w: l.width,
|
|
32
32
|
h: l.height
|
|
33
|
-
}, _ =
|
|
33
|
+
}, _ = e(c, h, g, u, p), v = !t(_, g, u, p), y = v ? e(c, h, {
|
|
34
34
|
w: 44,
|
|
35
35
|
h: 44
|
|
36
36
|
}, u, p) : _;
|
|
37
|
-
m &&
|
|
37
|
+
m && n(f.current.placement, y) && f.current.compact === v || (f.current = {
|
|
38
38
|
preferred: c,
|
|
39
39
|
placement: y,
|
|
40
40
|
compact: v
|
|
@@ -76,7 +76,7 @@ var o = "a[href],button,input,select,textarea,label,legend,summary,th,td,[role=\
|
|
|
76
76
|
c.x,
|
|
77
77
|
c.y,
|
|
78
78
|
l
|
|
79
|
-
]), l &&
|
|
79
|
+
]), l && n(u.preferred, c) ? u : {
|
|
80
80
|
placement: c,
|
|
81
81
|
compact: u.compact
|
|
82
82
|
};
|