@mauroandre/velojs 0.0.59 → 0.0.61
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 +182 -1
- package/agent/AGENTS.md +84 -0
- package/agent/skills/velojs-actions/SKILL.md +32 -0
- package/agent/skills/velojs-hooks/SKILL.md +26 -0
- package/agent/skills/velojs-live-actions/SKILL.md +211 -0
- package/agent/skills/velojs-telemetry/SKILL.md +6 -1
- package/agent/skills/velojs-type-reference/SKILL.md +1 -0
- package/agent/skills/velojs-vite-plugin/SKILL.md +51 -2
- package/dist/channels.d.ts +117 -11
- package/dist/channels.js +459 -284
- package/dist/config.d.ts +8 -0
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +34 -32
- package/dist/leak-diagnostic.d.ts +77 -0
- package/dist/leak-diagnostic.js +14 -0
- package/dist/live-action.d.ts +86 -0
- package/dist/live-action.js +52 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.js +165 -143
- package/dist/telemetry-cli.d.ts +1 -0
- package/dist/telemetry-cli.js +116 -113
- package/dist/telemetry.d.ts +3 -3
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +500 -453
- package/dist/testing/subscription.d.ts +7 -0
- package/dist/testing/types.d.ts +43 -2
- package/dist/types.d.ts +12 -0
- package/dist/vite.d.ts +47 -1
- package/dist/vite.js +869 -401
- package/package.json +1 -1
package/dist/telemetry-cli.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import
|
|
1
|
+
import $ from "node:fs";
|
|
2
2
|
import a from "node:path";
|
|
3
|
-
import { expandTelemetryValue as
|
|
3
|
+
import { expandTelemetryValue as g } from "./telemetry.js";
|
|
4
4
|
import { readProjectEnv as k } from "./telemetry-node.js";
|
|
5
5
|
function j(e) {
|
|
6
|
-
const
|
|
7
|
-
if (!
|
|
6
|
+
const r = e.trim().match(/^(\d+(?:\.\d+)?)\s*(ms|s|m|h|d)?$/);
|
|
7
|
+
if (!r)
|
|
8
8
|
throw new Error(
|
|
9
9
|
`[velojs] invalid duration "${e}" — use a unit: 500ms, 30s, 60m, 2h, 7d.`
|
|
10
10
|
);
|
|
11
|
-
const n = Number(
|
|
11
|
+
const n = Number(r[1]), i = r[2] ?? "s";
|
|
12
12
|
return n * (i === "ms" ? 1 : i === "s" ? 1e3 : i === "m" ? 6e4 : i === "h" ? 36e5 : 864e5);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function x(e) {
|
|
15
15
|
try {
|
|
16
|
-
return
|
|
16
|
+
return $.statSync(e);
|
|
17
17
|
} catch {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const n =
|
|
21
|
+
function L(e, r) {
|
|
22
|
+
const n = x(e);
|
|
23
23
|
if (n?.isDirectory())
|
|
24
|
-
return
|
|
24
|
+
return $.readdirSync(e).filter((c) => c.includes(".jsonl")).sort().map((c) => a.join(e, c));
|
|
25
25
|
if (n?.isFile()) return [e];
|
|
26
|
-
if (!
|
|
26
|
+
if (!r)
|
|
27
27
|
throw new Error(`[velojs] velojs telemetry: file not found — ${e}`);
|
|
28
|
-
const i = a.dirname(e), t = a.basename(e),
|
|
29
|
-
if (!
|
|
28
|
+
const i = a.dirname(e), t = a.basename(e), o = t.lastIndexOf("."), s = o > 0 ? t.slice(0, o) : t, l = o > 0 ? t.slice(o) : "";
|
|
29
|
+
if (!x(i))
|
|
30
30
|
throw new Error(
|
|
31
31
|
`[velojs] velojs telemetry: no telemetry files at ${e} — the directory does not exist.`
|
|
32
32
|
);
|
|
33
|
-
const h =
|
|
33
|
+
const h = $.readdirSync(i).filter((c) => c === t ? !0 : c.startsWith(`${s}.`) ? l === "" || c.includes(l) : !1).sort().map((c) => a.join(i, c));
|
|
34
34
|
if (h.length === 0)
|
|
35
35
|
throw new Error(
|
|
36
36
|
`[velojs] velojs telemetry: no telemetry files found for ${e} — set VELO_TELEMETRY_FILE (see .env.example) or pass the JSONL path explicitly.`
|
|
37
37
|
);
|
|
38
38
|
return h;
|
|
39
39
|
}
|
|
40
|
-
function M(e,
|
|
40
|
+
function M(e, r, n, i) {
|
|
41
41
|
if (e) {
|
|
42
|
-
const l =
|
|
43
|
-
return
|
|
42
|
+
const l = g(e, { ...n, ...r }), h = a.isAbsolute(l) ? l : a.resolve(i, l);
|
|
43
|
+
return L(h, !1);
|
|
44
44
|
}
|
|
45
|
-
const t =
|
|
45
|
+
const t = r.VELO_TELEMETRY_FILE ?? n.VELO_TELEMETRY_FILE ?? "";
|
|
46
46
|
if (!t.trim())
|
|
47
47
|
throw new Error(
|
|
48
48
|
"[velojs] velojs telemetry: no destination — set VELO_TELEMETRY_FILE in the environment or in the project's .env (see .env.example), or pass the JSONL path as an argument."
|
|
49
49
|
);
|
|
50
|
-
const
|
|
51
|
-
return
|
|
50
|
+
const o = g(t.trim(), { ...n, ...r }), s = a.isAbsolute(o) ? o : a.resolve(i, o);
|
|
51
|
+
return L(s, !0);
|
|
52
52
|
}
|
|
53
53
|
function O(e) {
|
|
54
|
-
const
|
|
54
|
+
const r = [];
|
|
55
55
|
for (const n of e) {
|
|
56
56
|
let i;
|
|
57
57
|
try {
|
|
58
|
-
i =
|
|
58
|
+
i = $.readFileSync(n, "utf-8");
|
|
59
59
|
} catch (t) {
|
|
60
60
|
throw new Error(
|
|
61
61
|
`[velojs] velojs telemetry: cannot read ${n} — ${t instanceof Error ? t.message : String(t)}`
|
|
@@ -63,56 +63,56 @@ function O(e) {
|
|
|
63
63
|
}
|
|
64
64
|
for (const t of i.split(`
|
|
65
65
|
`)) {
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
66
|
+
const o = t.trim();
|
|
67
|
+
if (o)
|
|
68
68
|
try {
|
|
69
|
-
const s = JSON.parse(
|
|
70
|
-
s && typeof s == "object" && typeof s.type == "string" &&
|
|
69
|
+
const s = JSON.parse(o);
|
|
70
|
+
s && typeof s == "object" && typeof s.type == "string" && r.push(s);
|
|
71
71
|
} catch {
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
return
|
|
76
|
-
const t = Date.parse(n.ts ?? ""),
|
|
77
|
-
return (Number.isFinite(t) ? t : 0) - (Number.isFinite(
|
|
78
|
-
}),
|
|
75
|
+
return r.sort((n, i) => {
|
|
76
|
+
const t = Date.parse(n.ts ?? ""), o = Date.parse(i.ts ?? "");
|
|
77
|
+
return (Number.isFinite(t) ? t : 0) - (Number.isFinite(o) ? o : 0);
|
|
78
|
+
}), r;
|
|
79
79
|
}
|
|
80
|
-
function N(e,
|
|
81
|
-
if (
|
|
82
|
-
const i = n -
|
|
80
|
+
function N(e, r, n) {
|
|
81
|
+
if (r === null) return e;
|
|
82
|
+
const i = n - r;
|
|
83
83
|
return e.filter((t) => {
|
|
84
|
-
const
|
|
85
|
-
return Number.isFinite(
|
|
84
|
+
const o = Date.parse(t.ts ?? "");
|
|
85
|
+
return Number.isFinite(o) && o >= i;
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function T(e, r) {
|
|
89
89
|
if (e.length === 0) return null;
|
|
90
90
|
const n = [...e].sort((s, l) => s - l);
|
|
91
91
|
if (n.length === 1) return n[0];
|
|
92
|
-
const i = (n.length - 1) *
|
|
93
|
-
return t ===
|
|
92
|
+
const i = (n.length - 1) * r, t = Math.floor(i), o = Math.ceil(i);
|
|
93
|
+
return t === o ? n[t] : n[t] + (n[o] - n[t]) * (i - t);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function m(e, r, n) {
|
|
96
96
|
const i = /* @__PURE__ */ new Map();
|
|
97
97
|
for (const t of e) {
|
|
98
|
-
if (!
|
|
99
|
-
const
|
|
100
|
-
let s = i.get(
|
|
101
|
-
s || (s = { durations: [], count: 0, errors: 0, bytes: 0 }, i.set(
|
|
98
|
+
if (!r(t)) continue;
|
|
99
|
+
const o = n(t);
|
|
100
|
+
let s = i.get(o);
|
|
101
|
+
s || (s = { durations: [], count: 0, errors: 0, bytes: 0 }, i.set(o, s)), s.count += 1, t.status === "error" && (s.errors += 1), typeof t.duration == "number" && Number.isFinite(t.duration) && s.durations.push(t.duration), typeof t.bytes == "number" && Number.isFinite(t.bytes) && (s.bytes += t.bytes);
|
|
102
102
|
}
|
|
103
|
-
return [...i.entries()].map(([t,
|
|
103
|
+
return [...i.entries()].map(([t, o]) => ({
|
|
104
104
|
key: t,
|
|
105
|
-
count:
|
|
106
|
-
errors:
|
|
107
|
-
p50:
|
|
108
|
-
p95:
|
|
109
|
-
bytes:
|
|
110
|
-
})).sort((t,
|
|
105
|
+
count: o.count,
|
|
106
|
+
errors: o.errors,
|
|
107
|
+
p50: T(o.durations, 0.5),
|
|
108
|
+
p95: T(o.durations, 0.95),
|
|
109
|
+
bytes: o.bytes
|
|
110
|
+
})).sort((t, o) => o.count - t.count || (t.key < o.key ? -1 : t.key > o.key ? 1 : 0));
|
|
111
111
|
}
|
|
112
112
|
const R = (e) => e.type === "page" || e.type === "data" || e.type === "endpoint", D = (e) => {
|
|
113
|
-
const
|
|
114
|
-
return e.type === "endpoint" && e.method ? `${e.method} ${
|
|
115
|
-
},
|
|
113
|
+
const r = e.route ?? "(no route)";
|
|
114
|
+
return e.type === "endpoint" && e.method ? `${e.method} ${r}` : r;
|
|
115
|
+
}, d = (e) => `${e.module ?? "(no module)"}/${e.name ?? "(no name)"}`, _ = (e) => typeof e.channel == "string", v = (e) => e.type === "live-action-connect" || (e.type === "delivery" || e.type === "close") && typeof e.name == "string";
|
|
116
116
|
function B(e) {
|
|
117
117
|
switch (e.type) {
|
|
118
118
|
case "page":
|
|
@@ -120,13 +120,15 @@ function B(e) {
|
|
|
120
120
|
case "endpoint":
|
|
121
121
|
return `${e.method ? `${e.method} ` : ""}${e.route ?? "(no route)"}`;
|
|
122
122
|
case "action":
|
|
123
|
-
return
|
|
123
|
+
return d(e);
|
|
124
|
+
case "live-action-connect":
|
|
125
|
+
return `${d(e)} (live)`;
|
|
124
126
|
case "emit":
|
|
125
127
|
return `${e.channel ?? "?"} (${e.mode ?? "?"}${e.connections !== void 0 ? `, ${e.connections} conn` : ""})`;
|
|
126
128
|
case "delivery":
|
|
127
|
-
return `${e.channel ?? "?"} #${e.deliveries ?? "?"}`;
|
|
129
|
+
return e.channel === void 0 && e.name !== void 0 ? `${d(e)} #${e.deliveries ?? "?"}` : `${e.channel ?? "?"} #${e.deliveries ?? "?"}`;
|
|
128
130
|
case "close":
|
|
129
|
-
return `${e.channel ?? "?"} ${e.deliveries ?? 0} deliveries`;
|
|
131
|
+
return e.channel === void 0 && e.name !== void 0 ? `${d(e)} ${e.deliveries ?? 0} deliveries` : `${e.channel ?? "?"} ${e.deliveries ?? 0} deliveries`;
|
|
130
132
|
case "stream-connect":
|
|
131
133
|
return `${e.route ?? "?"}${e.channel ? ` [${e.channel}]` : ""}`;
|
|
132
134
|
case "socket-connect":
|
|
@@ -139,14 +141,15 @@ function B(e) {
|
|
|
139
141
|
return e.route ?? e.channel ?? "?";
|
|
140
142
|
}
|
|
141
143
|
}
|
|
142
|
-
function
|
|
144
|
+
function A(e, r) {
|
|
143
145
|
return {
|
|
144
146
|
files: e,
|
|
145
|
-
events:
|
|
146
|
-
routes:
|
|
147
|
-
actions:
|
|
148
|
-
channels:
|
|
149
|
-
|
|
147
|
+
events: r,
|
|
148
|
+
routes: m(r, R, D),
|
|
149
|
+
actions: m(r, (n) => n.type === "action", d),
|
|
150
|
+
channels: m(r, _, (n) => n.channel),
|
|
151
|
+
liveActions: m(r, v, d),
|
|
152
|
+
timeline: r.map((n) => ({
|
|
150
153
|
ts: n.ts ?? "",
|
|
151
154
|
type: n.type,
|
|
152
155
|
label: B(n),
|
|
@@ -157,59 +160,59 @@ function I(e, o) {
|
|
|
157
160
|
}))
|
|
158
161
|
};
|
|
159
162
|
}
|
|
160
|
-
const
|
|
163
|
+
const I = "—";
|
|
161
164
|
function p(e) {
|
|
162
|
-
return e === null ?
|
|
165
|
+
return e === null ? I : e >= 1e3 ? `${(e / 1e3).toFixed(2)}s` : `${e.toFixed(1)}ms`;
|
|
163
166
|
}
|
|
164
|
-
function
|
|
167
|
+
function w(e) {
|
|
165
168
|
return e <= 0 ? "0" : e >= 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)}MB` : e >= 1024 ? `${(e / 1024).toFixed(1)}KB` : `${e}B`;
|
|
166
169
|
}
|
|
167
|
-
function
|
|
170
|
+
function y(e, r) {
|
|
168
171
|
const n = [e];
|
|
169
|
-
if (
|
|
172
|
+
if (r.length === 0)
|
|
170
173
|
return n.push(" (nothing)"), n;
|
|
171
174
|
const i = {
|
|
172
|
-
key: Math.max(3, ...
|
|
173
|
-
count: Math.max(5, ...
|
|
174
|
-
errors: Math.max(6, ...
|
|
175
|
-
p50: Math.max(4, ...
|
|
176
|
-
p95: Math.max(4, ...
|
|
177
|
-
bytes: Math.max(5, ...
|
|
178
|
-
}, t = (s, l) => s.padEnd(l),
|
|
175
|
+
key: Math.max(3, ...r.map((s) => s.key.length)),
|
|
176
|
+
count: Math.max(5, ...r.map((s) => String(s.count).length)),
|
|
177
|
+
errors: Math.max(6, ...r.map((s) => String(s.errors).length)),
|
|
178
|
+
p50: Math.max(4, ...r.map((s) => p(s.p50).length)),
|
|
179
|
+
p95: Math.max(4, ...r.map((s) => p(s.p95).length)),
|
|
180
|
+
bytes: Math.max(5, ...r.map((s) => w(s.bytes).length))
|
|
181
|
+
}, t = (s, l) => s.padEnd(l), o = (s, l) => s.padStart(l);
|
|
179
182
|
n.push(
|
|
180
|
-
` ${t("key", i.key)} ${
|
|
183
|
+
` ${t("key", i.key)} ${o("count", i.count)} ${o("errors", i.errors)} ${o("p50", i.p50)} ${o("p95", i.p95)} ${o("bytes", i.bytes)}`
|
|
181
184
|
);
|
|
182
|
-
for (const s of
|
|
185
|
+
for (const s of r)
|
|
183
186
|
n.push(
|
|
184
|
-
` ${t(s.key, i.key)} ${
|
|
187
|
+
` ${t(s.key, i.key)} ${o(String(s.count), i.count)} ${o(String(s.errors), i.errors)} ${o(p(s.p50), i.p50)} ${o(p(s.p95), i.p95)} ${o(w(s.bytes), i.bytes)}`
|
|
185
188
|
);
|
|
186
189
|
return n;
|
|
187
190
|
}
|
|
188
|
-
function
|
|
189
|
-
const
|
|
191
|
+
function V(e) {
|
|
192
|
+
const r = ["Timeline"];
|
|
190
193
|
if (e.length === 0)
|
|
191
|
-
return
|
|
194
|
+
return r.push(" (nothing)"), r;
|
|
192
195
|
for (const n of e) {
|
|
193
|
-
const i = n.ts.replace("T", " ").replace("Z", ""), t = n.duration === null ? "" : ` ${p(n.duration)}`,
|
|
194
|
-
|
|
196
|
+
const i = n.ts.replace("T", " ").replace("Z", ""), t = n.duration === null ? "" : ` ${p(n.duration)}`, o = n.status ? ` ${n.status}` : "", s = n.bytes === null ? "" : ` ${w(n.bytes)}`;
|
|
197
|
+
r.push(` ${i} ${n.type.padEnd(15)} ${n.label}${t}${o}${s}`);
|
|
195
198
|
}
|
|
196
|
-
return
|
|
199
|
+
return r;
|
|
197
200
|
}
|
|
198
|
-
function
|
|
201
|
+
function J(e, r, n, i) {
|
|
199
202
|
const t = ["VeloJS telemetry"];
|
|
200
203
|
t.push(`files: ${e.files.length}`);
|
|
201
204
|
for (const s of e.files) t.push(` ${s}`);
|
|
202
|
-
const
|
|
203
|
-
return t.push(`window: ${
|
|
205
|
+
const o = r === null ? "the whole file" : `last ${i ?? W(r)} — since ${new Date(n - r).toISOString()}`;
|
|
206
|
+
return t.push(`window: ${o}`), t.push(`events: ${e.events.length}`), t.push(""), t.push(...y("By route", e.routes)), t.push(""), t.push(...y("By action", e.actions)), t.push(""), t.push(...y("By channel", e.channels)), t.push(""), t.push(...y("By live action", e.liveActions)), t.push(""), t.push(...V(e.timeline)), t.join(`
|
|
204
207
|
`);
|
|
205
208
|
}
|
|
206
209
|
function W(e) {
|
|
207
210
|
return e % 864e5 === 0 ? `${e / 864e5}d` : e % 36e5 === 0 ? `${e / 36e5}h` : e % 6e4 === 0 ? `${e / 6e4}m` : e % 1e3 === 0 ? `${e / 1e3}s` : `${e}ms`;
|
|
208
211
|
}
|
|
209
|
-
const
|
|
212
|
+
const E = `Usage: velojs telemetry [path] [--last <duration>]
|
|
210
213
|
|
|
211
214
|
Ranks the JSONL written by the native telemetry (count, errors, p50/p95,
|
|
212
|
-
bytes) by route, action and
|
|
215
|
+
bytes) by route, action, channel and live action, and prints the timeline.
|
|
213
216
|
|
|
214
217
|
path JSONL file copied from production (or a directory of them).
|
|
215
218
|
Without it, VELO_TELEMETRY_FILE from the environment or the
|
|
@@ -221,45 +224,45 @@ Examples:
|
|
|
221
224
|
velojs telemetry
|
|
222
225
|
velojs telemetry --last 60m
|
|
223
226
|
velojs telemetry ./telemetry.prod.jsonl`;
|
|
224
|
-
async function
|
|
225
|
-
const n =
|
|
226
|
-
let
|
|
227
|
+
async function q(e, r = {}) {
|
|
228
|
+
const n = r.cwd ?? process.cwd(), i = r.env ?? process.env, t = r.write ?? ((f) => console.log(f));
|
|
229
|
+
let o = null, s = null, l;
|
|
227
230
|
for (let f = 0; f < e.length; f += 1) {
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
230
|
-
t(
|
|
231
|
+
const u = e[f];
|
|
232
|
+
if (u === "--help" || u === "-h") {
|
|
233
|
+
t(E);
|
|
231
234
|
return;
|
|
232
235
|
}
|
|
233
|
-
if (
|
|
234
|
-
const
|
|
235
|
-
if (
|
|
236
|
+
if (u === "--last") {
|
|
237
|
+
const b = e[f + 1];
|
|
238
|
+
if (b === void 0)
|
|
236
239
|
throw new Error("[velojs] velojs telemetry: --last requires a duration (e.g. --last 60m).");
|
|
237
|
-
s = j(
|
|
240
|
+
s = j(b), l = b, f += 1;
|
|
238
241
|
continue;
|
|
239
242
|
}
|
|
240
|
-
if (
|
|
241
|
-
l =
|
|
243
|
+
if (u.startsWith("--last=")) {
|
|
244
|
+
l = u.slice(7), s = j(l);
|
|
242
245
|
continue;
|
|
243
246
|
}
|
|
244
|
-
if (
|
|
245
|
-
throw new Error(`[velojs] velojs telemetry: unknown flag "${
|
|
247
|
+
if (u.startsWith("-"))
|
|
248
|
+
throw new Error(`[velojs] velojs telemetry: unknown flag "${u}".
|
|
246
249
|
|
|
247
|
-
${
|
|
248
|
-
if (
|
|
249
|
-
throw new Error(`[velojs] velojs telemetry: unexpected argument "${
|
|
250
|
+
${E}`);
|
|
251
|
+
if (o !== null)
|
|
252
|
+
throw new Error(`[velojs] velojs telemetry: unexpected argument "${u}".
|
|
250
253
|
|
|
251
|
-
${
|
|
252
|
-
|
|
254
|
+
${E}`);
|
|
255
|
+
o = u;
|
|
253
256
|
}
|
|
254
|
-
const h = k(n),
|
|
255
|
-
t(
|
|
257
|
+
const h = k(n), c = M(o, i, h, n), S = N(O(c), s, Date.now()), F = A(c, S);
|
|
258
|
+
t(J(F, s, Date.now(), l));
|
|
256
259
|
}
|
|
257
260
|
export {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
+
A as buildTelemetryReport,
|
|
262
|
+
L as collectTelemetryFiles,
|
|
263
|
+
J as formatTelemetryReport,
|
|
261
264
|
j as parseDuration,
|
|
262
265
|
O as readTelemetryEvents,
|
|
263
|
-
|
|
266
|
+
q as runTelemetryCli,
|
|
264
267
|
N as windowEvents
|
|
265
268
|
};
|
package/dist/telemetry.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Native telemetry — boundary traces, first-class JSONL (client-safe core).
|
|
3
3
|
*
|
|
4
4
|
* The framework owns a finite set of bottlenecks (page SSR, `?_data=1` refetch,
|
|
5
|
-
* action, declarative endpoint, stream connect, socket setup, channel connect
|
|
6
|
-
* plus the emit chain that runs outside any request. This module turns each of
|
|
5
|
+
* action, declarative endpoint, stream connect, socket setup, channel connect,
|
|
6
|
+
* live action connect) plus the emit chain that runs outside any request. This module turns each of
|
|
7
7
|
* them into one JSONL event with duration, status, response bytes, child spans
|
|
8
8
|
* and — on long connections — one delivery line per frame delivered and a final
|
|
9
9
|
* close line. The file is the production artifact; `velojs telemetry` ranks it.
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* injected at boot — the client bundle never reaches it.
|
|
23
23
|
*/
|
|
24
24
|
/** Every line of the JSONL carries one of these types. */
|
|
25
|
-
export type TelemetryEventType = "boot" | "page" | "data" | "action" | "endpoint" | "stream-connect" | "socket-connect" | "channel-connect" | "emit" | "delivery" | "close";
|
|
25
|
+
export type TelemetryEventType = "boot" | "page" | "data" | "action" | "endpoint" | "stream-connect" | "socket-connect" | "channel-connect" | "live-action-connect" | "emit" | "delivery" | "close";
|
|
26
26
|
export type TelemetryStatus = "ok" | "error";
|
|
27
27
|
/** One child span: name, start relative to the trace, own duration and status. */
|
|
28
28
|
export interface TelemetrySpan {
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
* snapshot — no sleep, no retry.
|
|
22
22
|
*/
|
|
23
23
|
export { createTestApp } from "./createTestApp.js";
|
|
24
|
-
export type { TestApp, TestResponse, TestSubscription, TestChannelSubscription, ChannelEvent, ChannelModuleRef, CreateTestAppOptions, RequestOptions, BodyRequestOptions, LoaderRequestOptions, SubscribeOptions, ChannelSubscribeOptions, NextOptions, MockContextOptions, Cookies, Headers, Query, Params, } from "./types.js";
|
|
24
|
+
export type { TestApp, TestResponse, TestSubscription, TestChannelSubscription, ChannelEvent, ChannelModuleRef, CreateTestAppOptions, RequestOptions, BodyRequestOptions, LoaderRequestOptions, SubscribeOptions, ChannelSubscribeOptions, LiveActionSubscribeOptions, NextOptions, MockContextOptions, Cookies, Headers, Query, Params, } from "./types.js";
|