@voltro/devtools 0.89.1 → 0.90.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 +1835 -0
- package/dist/console/Console.js +218 -213
- package/dist/index.d.ts +10 -0
- package/dist/panels/webhooks.js +235 -110
- package/dist/strings.js +13 -3
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -244,6 +244,16 @@ export declare interface DevtoolsStrings {
|
|
|
244
244
|
readonly active: string;
|
|
245
245
|
readonly paused: string;
|
|
246
246
|
readonly attempt: (n: number) => string;
|
|
247
|
+
readonly targetPages: string;
|
|
248
|
+
readonly deliveryPages: string;
|
|
249
|
+
readonly pageRange: (from: number, to: number) => string;
|
|
250
|
+
readonly pageLoading: string;
|
|
251
|
+
readonly pageError: string;
|
|
252
|
+
readonly pageFirst: string;
|
|
253
|
+
readonly pagePrevious: string;
|
|
254
|
+
readonly pageNext: string;
|
|
255
|
+
readonly pageRefresh: string;
|
|
256
|
+
readonly pageLiveHint: string;
|
|
247
257
|
};
|
|
248
258
|
/** <MutationsPanel> empty state + section chrome. */
|
|
249
259
|
readonly mutations: {
|
package/dist/panels/webhooks.js
CHANGED
|
@@ -1,103 +1,159 @@
|
|
|
1
1
|
import { Webhook as e } from "../components/icons.js";
|
|
2
2
|
import { useDevtoolsStrings as t } from "../strings.js";
|
|
3
|
-
import { Badge as n,
|
|
4
|
-
import { useInspectToken as
|
|
5
|
-
import { fetchInspect as
|
|
6
|
-
import { useDocumentVisible as
|
|
7
|
-
import { useEffect as
|
|
8
|
-
import { useFrameworkRuntimes as
|
|
9
|
-
import { jsx as
|
|
3
|
+
import { Badge as n, Button as r, Card as i, CardBody as a, Empty as o, SectionTitle as s } from "../components/primitives.js";
|
|
4
|
+
import { useInspectToken as c } from "../inspectAuth.js";
|
|
5
|
+
import { fetchInspect as l } from "../inspectFetch.js";
|
|
6
|
+
import { useDocumentVisible as u } from "../useDocumentVisible.js";
|
|
7
|
+
import { useEffect as d, useState as f } from "react";
|
|
8
|
+
import { DEFAULT_WEBHOOK_INSPECT_LIST as p, MAX_WEBHOOK_INSPECT_OFFSET as m, isWebhookEventActivity as h, isWebhookInspectActivityStatus as g, isWebhookInspectPagination as _, useFrameworkRuntimes as v, webhookInspectListRequest as y } from "@voltro/client";
|
|
9
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
10
10
|
// src/panels/webhooks.tsx
|
|
11
|
-
var
|
|
11
|
+
var C = {
|
|
12
12
|
outgoing: [],
|
|
13
13
|
incoming: [],
|
|
14
14
|
targets: [],
|
|
15
|
-
deliveries: []
|
|
16
|
-
|
|
15
|
+
deliveries: [],
|
|
16
|
+
activityStatus: "omitted",
|
|
17
|
+
pagination: {
|
|
18
|
+
targets: {
|
|
19
|
+
offset: 0,
|
|
20
|
+
limit: 50,
|
|
21
|
+
hasMore: !1
|
|
22
|
+
},
|
|
23
|
+
deliveries: {
|
|
24
|
+
offset: 0,
|
|
25
|
+
limit: 50,
|
|
26
|
+
hasMore: !1
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}, w = 4e3, T = async (e, t, n = p) => {
|
|
17
30
|
if (e === "") return null;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
try {
|
|
32
|
+
let r = y(n), i = new URLSearchParams(Object.entries(r).map(([e, t]) => [e, String(t)])), a = await l(`${e}/_voltro/inspect/webhooks?${i}`, t);
|
|
33
|
+
return a !== null && _(a.pagination) && g(a.activityStatus) && (r.includeActivity ? a.activityStatus === "included" : a.activityStatus !== "unavailable") && Array.isArray(a.outgoing) && Array.isArray(a.incoming) && Array.isArray(a.targets) && a.targets.length <= r.limit && Array.isArray(a.deliveries) && a.deliveries.length <= r.limit && a.pagination.targets.offset === r.targetOffset && a.pagination.deliveries.offset === r.deliveryOffset && a.pagination.targets.limit === r.limit && a.pagination.deliveries.limit === r.limit && (a.eventActivity === void 0 ? !r.includeActivity : Array.isArray(a.eventActivity) && a.eventActivity.every(h)) ? a : null;
|
|
34
|
+
} catch {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
}, E = (e, t, n = !0) => {
|
|
38
|
+
let r = u(), i = c(), a = n && r && e !== "", [o, s] = f(0), l = JSON.stringify([
|
|
39
|
+
e,
|
|
40
|
+
i,
|
|
41
|
+
t.targetOffset,
|
|
42
|
+
t.deliveryOffset,
|
|
43
|
+
t.limit,
|
|
44
|
+
o
|
|
45
|
+
]), [p, m] = f();
|
|
46
|
+
d(() => {
|
|
47
|
+
if (!a) return;
|
|
48
|
+
let n = !1, r, o = async () => {
|
|
49
|
+
let a;
|
|
50
|
+
try {
|
|
51
|
+
a = await T(e, i, t);
|
|
52
|
+
} catch {
|
|
53
|
+
a = null;
|
|
54
|
+
}
|
|
55
|
+
n || (m({
|
|
56
|
+
key: l,
|
|
57
|
+
data: a
|
|
58
|
+
}), r = setTimeout(() => void o(), w));
|
|
27
59
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return () => {
|
|
31
|
-
t = !0, clearInterval(a);
|
|
60
|
+
return o(), () => {
|
|
61
|
+
n = !0, clearTimeout(r);
|
|
32
62
|
};
|
|
33
63
|
}, [
|
|
34
64
|
e,
|
|
65
|
+
a,
|
|
35
66
|
i,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
67
|
+
l,
|
|
68
|
+
t
|
|
69
|
+
]);
|
|
70
|
+
let h = p?.key === l ? p : void 0;
|
|
71
|
+
return {
|
|
72
|
+
data: a && h?.data ? h.data : C,
|
|
73
|
+
pending: a && h === void 0,
|
|
74
|
+
failed: a && h?.data === null,
|
|
75
|
+
refresh: () => s((e) => e + 1)
|
|
76
|
+
};
|
|
77
|
+
}, D = {
|
|
39
78
|
pending: "neutral",
|
|
40
79
|
inFlight: "info",
|
|
41
80
|
succeeded: "success",
|
|
42
81
|
failed: "danger",
|
|
43
82
|
retryScheduled: "warning"
|
|
44
|
-
},
|
|
83
|
+
}, O = (e) => {
|
|
45
84
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
46
85
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
47
|
-
},
|
|
48
|
-
let t =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
86
|
+
}, k = (e) => {
|
|
87
|
+
let t = v(), n = u(), r = c(), i = JSON.stringify(t.names.map((e) => t.get(e).inspectBaseUrl)), a = e && n, o = JSON.stringify([
|
|
88
|
+
i,
|
|
89
|
+
r,
|
|
90
|
+
a
|
|
91
|
+
]), [s, l] = f();
|
|
92
|
+
return d(() => {
|
|
93
|
+
if (!a) return;
|
|
94
|
+
let e = JSON.parse(i);
|
|
95
|
+
if (e.length === 0) {
|
|
96
|
+
l({
|
|
97
|
+
key: o,
|
|
98
|
+
count: 0
|
|
99
|
+
});
|
|
52
100
|
return;
|
|
53
101
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
102
|
+
if (e.some((e) => e === "")) {
|
|
103
|
+
l({
|
|
104
|
+
key: o,
|
|
105
|
+
count: null
|
|
106
|
+
});
|
|
57
107
|
return;
|
|
58
108
|
}
|
|
59
|
-
let
|
|
60
|
-
let
|
|
61
|
-
|
|
109
|
+
let t = !1, n, s = async () => {
|
|
110
|
+
let i = await Promise.all(e.map((e) => T(e, r)));
|
|
111
|
+
if (t) return;
|
|
112
|
+
let a = i.some((e) => e === null) ? void 0 : i.reduce((e, t) => e + t.outgoing.length + t.incoming.length + t.eventActivity.reduce((e, t) => e + t.targets, 0), 0);
|
|
113
|
+
l({
|
|
114
|
+
key: o,
|
|
115
|
+
count: a !== void 0 && Number.isSafeInteger(a) ? a : null
|
|
116
|
+
}), n = setTimeout(() => void s(), w);
|
|
62
117
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return () => {
|
|
66
|
-
n = !0, clearInterval(s);
|
|
118
|
+
return s(), () => {
|
|
119
|
+
t = !0, clearTimeout(n);
|
|
67
120
|
};
|
|
68
121
|
}, [
|
|
69
|
-
|
|
122
|
+
a,
|
|
123
|
+
r,
|
|
70
124
|
i,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
125
|
+
o
|
|
126
|
+
]), a && s?.key === o ? s.count : null;
|
|
127
|
+
}, A = ({ apiName: o, baseUrl: c }) => {
|
|
128
|
+
let [l, u] = f({
|
|
129
|
+
...p,
|
|
130
|
+
includeActivity: !1
|
|
131
|
+
}), d = E(c, l), h = d.data, g = t().webhooks;
|
|
132
|
+
return !(h.outgoing.length + h.incoming.length + h.targets.length + h.deliveries.length > 0) && !d.pending && !d.failed && l.targetOffset === 0 && l.deliveryOffset === 0 ? null : /* @__PURE__ */ x("div", {
|
|
77
133
|
className: "vdt:space-y-4",
|
|
78
|
-
children: /* @__PURE__ */
|
|
134
|
+
children: /* @__PURE__ */ S(i, { children: [/* @__PURE__ */ x(s, {
|
|
79
135
|
Icon: e,
|
|
80
|
-
children:
|
|
81
|
-
}), /* @__PURE__ */
|
|
82
|
-
|
|
136
|
+
children: o
|
|
137
|
+
}), /* @__PURE__ */ S(a, { children: [
|
|
138
|
+
h.outgoing.length > 0 ? /* @__PURE__ */ S("div", {
|
|
83
139
|
className: "vdt:mb-4",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ x("div", {
|
|
85
141
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
86
|
-
children:
|
|
87
|
-
}), /* @__PURE__ */
|
|
142
|
+
children: g.outgoing(h.outgoing.length)
|
|
143
|
+
}), /* @__PURE__ */ x("div", {
|
|
88
144
|
className: "vdt:space-y-1",
|
|
89
|
-
children:
|
|
145
|
+
children: h.outgoing.map((e) => /* @__PURE__ */ S("div", {
|
|
90
146
|
className: "vdt-record-row vdt:text-sm",
|
|
91
147
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ x("code", {
|
|
93
149
|
className: "vdt:text-foreground vdt:font-mono",
|
|
94
150
|
children: e.id
|
|
95
151
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ S(n, {
|
|
97
153
|
tone: "neutral",
|
|
98
154
|
children: ["v", e.version]
|
|
99
155
|
}),
|
|
100
|
-
e.description ? /* @__PURE__ */
|
|
156
|
+
e.description ? /* @__PURE__ */ x("span", {
|
|
101
157
|
className: "vdt-record-description vdt:text-foreground-muted vdt:text-xs",
|
|
102
158
|
children: e.description
|
|
103
159
|
}) : null
|
|
@@ -105,70 +161,70 @@ var h = {
|
|
|
105
161
|
}, e.id))
|
|
106
162
|
})]
|
|
107
163
|
}) : null,
|
|
108
|
-
|
|
164
|
+
h.incoming.length > 0 ? /* @__PURE__ */ S("div", {
|
|
109
165
|
className: "vdt:mb-4",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ x("div", {
|
|
111
167
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
112
|
-
children:
|
|
113
|
-
}), /* @__PURE__ */
|
|
168
|
+
children: g.incoming(h.incoming.length)
|
|
169
|
+
}), /* @__PURE__ */ x("div", {
|
|
114
170
|
className: "vdt:space-y-1",
|
|
115
|
-
children:
|
|
171
|
+
children: h.incoming.map((e) => /* @__PURE__ */ S("div", {
|
|
116
172
|
className: "vdt-record-row vdt:text-sm",
|
|
117
173
|
children: [
|
|
118
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ x("code", {
|
|
119
175
|
className: "vdt:text-foreground vdt:font-mono",
|
|
120
176
|
children: e.path
|
|
121
177
|
}),
|
|
122
|
-
e.provider ? /* @__PURE__ */
|
|
178
|
+
e.provider ? /* @__PURE__ */ x(n, {
|
|
123
179
|
tone: "info",
|
|
124
180
|
children: e.provider
|
|
125
181
|
}) : null,
|
|
126
|
-
e.signatureConfigured ? /* @__PURE__ */
|
|
182
|
+
e.signatureConfigured ? /* @__PURE__ */ x(n, {
|
|
127
183
|
tone: "success",
|
|
128
|
-
children:
|
|
129
|
-
}) : /* @__PURE__ */
|
|
184
|
+
children: g.signed
|
|
185
|
+
}) : /* @__PURE__ */ x(n, {
|
|
130
186
|
tone: "warning",
|
|
131
|
-
children:
|
|
187
|
+
children: g.unsigned
|
|
132
188
|
})
|
|
133
189
|
]
|
|
134
190
|
}, e.id))
|
|
135
191
|
})]
|
|
136
192
|
}) : null,
|
|
137
|
-
|
|
193
|
+
h.targets.length > 0 ? /* @__PURE__ */ S("div", {
|
|
138
194
|
className: "vdt:mb-4",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ x("div", {
|
|
140
196
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
141
|
-
children:
|
|
142
|
-
}), /* @__PURE__ */
|
|
197
|
+
children: g.targets(h.targets.length)
|
|
198
|
+
}), /* @__PURE__ */ x("div", {
|
|
143
199
|
className: "vdt:space-y-1",
|
|
144
|
-
children:
|
|
145
|
-
let t =
|
|
146
|
-
return /* @__PURE__ */
|
|
200
|
+
children: h.targets.map((e) => {
|
|
201
|
+
let t = h.outgoing.find((t) => t.id === e.event)?.version ?? e.payloadVersion, r = e.payloadVersion === t ? "current" : e.payloadVersion < t ? "behind" : "ahead";
|
|
202
|
+
return /* @__PURE__ */ S("div", {
|
|
147
203
|
className: "vdt-record-row vdt:text-sm",
|
|
148
204
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ x("code", {
|
|
150
206
|
className: "vdt:text-foreground vdt:font-mono",
|
|
151
207
|
children: e.event
|
|
152
208
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ x("span", {
|
|
154
210
|
className: "vdt:text-foreground-muted",
|
|
155
211
|
children: "→"
|
|
156
212
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ x("span", {
|
|
158
214
|
className: "vdt:text-foreground vdt:text-xs vdt:truncate vdt:max-w-72",
|
|
159
215
|
children: e.url
|
|
160
216
|
}),
|
|
161
|
-
e.active ? /* @__PURE__ */
|
|
217
|
+
e.active ? /* @__PURE__ */ x(n, {
|
|
162
218
|
tone: "success",
|
|
163
|
-
children:
|
|
164
|
-
}) : /* @__PURE__ */
|
|
219
|
+
children: g.active
|
|
220
|
+
}) : /* @__PURE__ */ x(n, {
|
|
165
221
|
tone: "warning",
|
|
166
|
-
children:
|
|
222
|
+
children: g.paused
|
|
167
223
|
}),
|
|
168
|
-
r === "current" ? /* @__PURE__ */
|
|
224
|
+
r === "current" ? /* @__PURE__ */ S(n, {
|
|
169
225
|
tone: "neutral",
|
|
170
226
|
children: ["v", e.payloadVersion]
|
|
171
|
-
}) : r === "behind" ? /* @__PURE__ */
|
|
227
|
+
}) : r === "behind" ? /* @__PURE__ */ S(n, {
|
|
172
228
|
tone: "warning",
|
|
173
229
|
children: [
|
|
174
230
|
"v",
|
|
@@ -176,7 +232,7 @@ var h = {
|
|
|
176
232
|
" ← current v",
|
|
177
233
|
t
|
|
178
234
|
]
|
|
179
|
-
}) : /* @__PURE__ */
|
|
235
|
+
}) : /* @__PURE__ */ S(n, {
|
|
180
236
|
tone: "danger",
|
|
181
237
|
children: [
|
|
182
238
|
"v",
|
|
@@ -190,58 +246,127 @@ var h = {
|
|
|
190
246
|
})
|
|
191
247
|
})]
|
|
192
248
|
}) : null,
|
|
193
|
-
|
|
249
|
+
h.deliveries.length > 0 ? /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("div", {
|
|
194
250
|
className: "vdt:text-foreground-muted vdt:text-xs vdt:uppercase vdt:tracking-wider vdt:mb-2",
|
|
195
|
-
children:
|
|
196
|
-
}), /* @__PURE__ */
|
|
251
|
+
children: g.deliveries(h.deliveries.length)
|
|
252
|
+
}), /* @__PURE__ */ x("div", {
|
|
197
253
|
className: "vdt:space-y-0.5 vdt:font-mono vdt:text-xs",
|
|
198
|
-
children:
|
|
254
|
+
children: h.deliveries.map((e) => /* @__PURE__ */ S("div", {
|
|
199
255
|
className: "vdt:flex vdt:items-center vdt:gap-2",
|
|
200
256
|
children: [
|
|
201
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ x("span", {
|
|
202
258
|
className: "vdt:text-foreground-subtle",
|
|
203
|
-
children:
|
|
259
|
+
children: O(e.scheduledAt)
|
|
204
260
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ x("span", {
|
|
206
262
|
className: "vdt:text-foreground vdt:min-w-32 vdt:truncate",
|
|
207
263
|
children: e.event
|
|
208
264
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
tone:
|
|
265
|
+
/* @__PURE__ */ x(n, {
|
|
266
|
+
tone: D[e.status],
|
|
211
267
|
children: e.status
|
|
212
268
|
}),
|
|
213
|
-
e.responseStatus === null ? null : /* @__PURE__ */
|
|
269
|
+
e.responseStatus === null ? null : /* @__PURE__ */ x("span", {
|
|
214
270
|
className: "vdt:text-foreground-muted",
|
|
215
271
|
children: e.responseStatus
|
|
216
272
|
}),
|
|
217
|
-
e.latencyMs === null ? null : /* @__PURE__ */
|
|
273
|
+
e.latencyMs === null ? null : /* @__PURE__ */ S("span", {
|
|
218
274
|
className: "vdt:text-foreground-subtle",
|
|
219
275
|
children: [e.latencyMs, "ms"]
|
|
220
276
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ x("span", {
|
|
222
278
|
className: "vdt:text-foreground-subtle",
|
|
223
|
-
children:
|
|
279
|
+
children: g.attempt(e.attempt)
|
|
224
280
|
}),
|
|
225
|
-
e.errorMessage ? /* @__PURE__ */
|
|
281
|
+
e.errorMessage ? /* @__PURE__ */ x("span", {
|
|
226
282
|
className: "vdt:text-danger vdt:truncate vdt:max-w-64",
|
|
227
283
|
children: e.errorMessage
|
|
228
284
|
}) : null
|
|
229
285
|
]
|
|
230
286
|
}, e.id))
|
|
231
|
-
})] }) : null
|
|
287
|
+
})] }) : null,
|
|
288
|
+
/* @__PURE__ */ S("div", {
|
|
289
|
+
className: "vdt:mt-4 vdt:space-y-3 vdt:border-t vdt:border-border vdt:pt-3",
|
|
290
|
+
children: [
|
|
291
|
+
d.failed && /* @__PURE__ */ x("p", {
|
|
292
|
+
role: "alert",
|
|
293
|
+
className: "vdt:text-sm vdt:text-danger",
|
|
294
|
+
children: g.pageError
|
|
295
|
+
}),
|
|
296
|
+
["targets", "deliveries"].map((e) => {
|
|
297
|
+
let t = e === "targets" ? l.targetOffset : l.deliveryOffset, n = h.pagination[e], i = h[e].length;
|
|
298
|
+
return /* @__PURE__ */ S("nav", {
|
|
299
|
+
"aria-label": e === "targets" ? g.targetPages : g.deliveryPages,
|
|
300
|
+
"aria-busy": d.pending,
|
|
301
|
+
className: "vdt:flex vdt:flex-wrap vdt:items-center vdt:gap-2",
|
|
302
|
+
children: [
|
|
303
|
+
/* @__PURE__ */ S("span", {
|
|
304
|
+
role: "status",
|
|
305
|
+
"aria-live": "polite",
|
|
306
|
+
className: "vdt:min-w-0 vdt:flex-1 vdt:text-sm vdt:text-foreground-muted vdt:tabular-nums",
|
|
307
|
+
children: [d.pending ? g.pageLoading : e === "targets" ? g.targetPages : g.deliveryPages, !d.pending && !d.failed && /* @__PURE__ */ S(b, { children: [" · ", g.pageRange(i === 0 ? 0 : t + 1, i === 0 ? 0 : t + i)] })]
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ x(r, {
|
|
310
|
+
className: "vdt:min-h-11",
|
|
311
|
+
variant: "outline",
|
|
312
|
+
disabled: d.pending || t === 0,
|
|
313
|
+
onClick: () => u((t) => ({
|
|
314
|
+
...t,
|
|
315
|
+
[e === "targets" ? "targetOffset" : "deliveryOffset"]: 0
|
|
316
|
+
})),
|
|
317
|
+
children: g.pageFirst
|
|
318
|
+
}),
|
|
319
|
+
/* @__PURE__ */ x(r, {
|
|
320
|
+
className: "vdt:min-h-11",
|
|
321
|
+
variant: "outline",
|
|
322
|
+
disabled: d.pending || t === 0,
|
|
323
|
+
onClick: () => u((n) => ({
|
|
324
|
+
...n,
|
|
325
|
+
[e === "targets" ? "targetOffset" : "deliveryOffset"]: Math.max(0, t - l.limit)
|
|
326
|
+
})),
|
|
327
|
+
children: g.pagePrevious
|
|
328
|
+
}),
|
|
329
|
+
/* @__PURE__ */ x(r, {
|
|
330
|
+
className: "vdt:min-h-11",
|
|
331
|
+
variant: "outline",
|
|
332
|
+
disabled: d.pending || d.failed || !n.hasMore || t > m - l.limit,
|
|
333
|
+
onClick: () => u((n) => ({
|
|
334
|
+
...n,
|
|
335
|
+
[e === "targets" ? "targetOffset" : "deliveryOffset"]: t + l.limit
|
|
336
|
+
})),
|
|
337
|
+
children: g.pageNext
|
|
338
|
+
})
|
|
339
|
+
]
|
|
340
|
+
}, e);
|
|
341
|
+
}),
|
|
342
|
+
/* @__PURE__ */ S("div", {
|
|
343
|
+
className: "vdt:flex vdt:flex-wrap vdt:items-center vdt:gap-3",
|
|
344
|
+
children: [/* @__PURE__ */ x("p", {
|
|
345
|
+
className: "vdt:min-w-0 vdt:flex-1 vdt:text-xs vdt:text-foreground-muted",
|
|
346
|
+
children: g.pageLiveHint
|
|
347
|
+
}), /* @__PURE__ */ x(r, {
|
|
348
|
+
className: "vdt:min-h-11",
|
|
349
|
+
variant: "ghost",
|
|
350
|
+
disabled: d.pending,
|
|
351
|
+
onClick: d.refresh,
|
|
352
|
+
children: g.pageRefresh
|
|
353
|
+
})]
|
|
354
|
+
})
|
|
355
|
+
]
|
|
356
|
+
})
|
|
232
357
|
] })] })
|
|
233
|
-
})
|
|
234
|
-
},
|
|
235
|
-
let e =
|
|
236
|
-
return e.names.length === 0 ? /* @__PURE__ */
|
|
358
|
+
});
|
|
359
|
+
}, j = () => {
|
|
360
|
+
let e = v(), n = t().webhooks;
|
|
361
|
+
return e.names.length === 0 ? /* @__PURE__ */ x(o, { children: n.empty }) : /* @__PURE__ */ x("div", {
|
|
237
362
|
className: "vdt:space-y-4 vdt:p-3",
|
|
238
363
|
children: e.names.map((t) => {
|
|
239
364
|
let n = e.get(t);
|
|
240
|
-
return /* @__PURE__ */
|
|
365
|
+
return /* @__PURE__ */ x(A, {
|
|
241
366
|
apiName: t,
|
|
242
367
|
baseUrl: n.inspectBaseUrl
|
|
243
|
-
}, t);
|
|
368
|
+
}, JSON.stringify([t, n.inspectBaseUrl]));
|
|
244
369
|
})
|
|
245
370
|
});
|
|
246
371
|
};
|
|
247
|
-
export {
|
|
372
|
+
export { j as WebhooksPanel, k as useWebhooksCount };
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/devtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.90.0",
|
|
4
4
|
"description": "Local admin / devtools surface over a running app's /_voltro/inspect/* — routes, RPC, workflows, schedules, cache, logs, and traces.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"node": ">=24.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@voltro/client": "0.
|
|
38
|
-
"@voltro/logger": "0.
|
|
39
|
-
"@voltro/web": "0.
|
|
37
|
+
"@voltro/client": "0.90.0",
|
|
38
|
+
"@voltro/logger": "0.90.0",
|
|
39
|
+
"@voltro/web": "0.90.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": "^19.0.0",
|