@mauroandre/velojs 0.0.54 → 0.0.56

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/dist/vite.js CHANGED
@@ -1,117 +1,118 @@
1
- import d from "node:path";
2
- import g from "node:fs";
3
- import R from "@preact/preset-vite";
4
- import $, { defaultOptions as J } from "@hono/vite-dev-server";
5
- import { parse as _ } from "@babel/parser";
6
- import j from "@babel/traverse";
7
- import L from "@babel/generator";
1
+ import { loadEnv as G } from "vite";
2
+ import m from "node:path";
3
+ import x from "node:fs";
4
+ import z from "@preact/preset-vite";
5
+ import Y, { defaultOptions as X } from "@hono/vite-dev-server";
6
+ import { parse as v } from "@babel/parser";
7
+ import P from "@babel/traverse";
8
+ import D from "@babel/generator";
8
9
  import * as e from "@babel/types";
9
- import { buildGraph as U } from "./graph.js";
10
- const m = typeof j == "function" ? j : j.default, h = typeof L == "function" ? L : L.default;
11
- function W(u, o, n, i) {
12
- const l = _(u, {
10
+ import { buildGraph as q } from "./graph.js";
11
+ const h = typeof P == "function" ? P : P.default, g = typeof D == "function" ? D : D.default;
12
+ function K(p, n, r, s) {
13
+ const c = v(p, {
13
14
  sourceType: "module",
14
15
  plugins: ["typescript", "jsx"]
15
16
  });
16
- let t = !1;
17
- if (m(l, {
17
+ let a = !1;
18
+ if (h(c, {
18
19
  // Procura: export const metadata = { ... }
19
- ExportNamedDeclaration(s) {
20
- const c = s.node.declaration;
21
- if (e.isVariableDeclaration(c) && c.declarations.length === 1) {
22
- const r = c.declarations[0];
23
- if (r && e.isIdentifier(r.id, { name: "metadata" }) && e.isObjectExpression(r.init)) {
24
- t = !0;
25
- const f = r.init.properties.filter((v) => e.isObjectProperty(v) && e.isIdentifier(v.key) ? v.key.name !== "moduleId" && v.key.name !== "fullPath" && v.key.name !== "path" : !0), y = [
20
+ ExportNamedDeclaration(i) {
21
+ const t = i.node.declaration;
22
+ if (e.isVariableDeclaration(t) && t.declarations.length === 1) {
23
+ const l = t.declarations[0];
24
+ if (l && e.isIdentifier(l.id, { name: "metadata" }) && e.isObjectExpression(l.init)) {
25
+ a = !0;
26
+ const d = l.init.properties.filter((y) => e.isObjectProperty(y) && e.isIdentifier(y.key) ? y.key.name !== "moduleId" && y.key.name !== "fullPath" && y.key.name !== "path" : !0), f = [
26
27
  e.objectProperty(
27
28
  e.identifier("moduleId"),
28
- e.stringLiteral(o)
29
+ e.stringLiteral(n)
29
30
  )
30
31
  ];
31
- n !== void 0 && y.push(
32
+ r !== void 0 && f.push(
32
33
  e.objectProperty(
33
34
  e.identifier("fullPath"),
34
- e.stringLiteral(n)
35
+ e.stringLiteral(r)
35
36
  )
36
- ), i !== void 0 && y.push(
37
+ ), s !== void 0 && f.push(
37
38
  e.objectProperty(
38
39
  e.identifier("path"),
39
- e.stringLiteral(i)
40
+ e.stringLiteral(s)
40
41
  )
41
- ), r.init.properties = [...y, ...f];
42
+ ), l.init.properties = [...f, ...d];
42
43
  }
43
44
  }
44
45
  }
45
- }), !t) {
46
- const s = [
46
+ }), !a) {
47
+ const i = [
47
48
  e.objectProperty(
48
49
  e.identifier("moduleId"),
49
- e.stringLiteral(o)
50
+ e.stringLiteral(n)
50
51
  )
51
52
  ];
52
- n !== void 0 && s.push(
53
+ r !== void 0 && i.push(
53
54
  e.objectProperty(
54
55
  e.identifier("fullPath"),
55
- e.stringLiteral(n)
56
+ e.stringLiteral(r)
56
57
  )
57
- ), i !== void 0 && s.push(
58
+ ), s !== void 0 && i.push(
58
59
  e.objectProperty(
59
60
  e.identifier("path"),
60
- e.stringLiteral(i)
61
+ e.stringLiteral(s)
61
62
  )
62
63
  );
63
- const c = e.exportNamedDeclaration(
64
+ const t = e.exportNamedDeclaration(
64
65
  e.variableDeclaration("const", [
65
66
  e.variableDeclarator(
66
67
  e.identifier("metadata"),
67
- e.objectExpression(s)
68
+ e.objectExpression(i)
68
69
  )
69
70
  ])
70
71
  );
71
- l.program.body.unshift(c);
72
+ c.program.body.unshift(t);
72
73
  }
73
- return h(l, { retainLines: !0 }).code;
74
+ return g(c, { retainLines: !0 }).code;
74
75
  }
75
- function M(u, o) {
76
- const n = _(u, {
76
+ function Q(p, n) {
77
+ const r = v(p, {
77
78
  sourceType: "module",
78
79
  plugins: ["typescript", "jsx"]
79
80
  });
80
- return m(n, {
81
- CallExpression(l) {
82
- const t = l.node.callee, a = e.isIdentifier(t, { name: "Loader" }) || e.isTSInstantiationExpression(t) && e.isIdentifier(t.expression, { name: "Loader" }), s = e.isIdentifier(t, { name: "useLoader" }) || e.isTSInstantiationExpression(t) && e.isIdentifier(t.expression, { name: "useLoader" });
83
- if (!a && !s) return;
84
- const c = l.node.arguments, r = e.stringLiteral(o), p = c[0];
85
- e.isStringLiteral(p) && p.value.includes("/") || (l.node.arguments = [r, ...c]);
81
+ return h(r, {
82
+ CallExpression(c) {
83
+ const a = c.node.callee, o = e.isIdentifier(a, { name: "Loader" }) || e.isTSInstantiationExpression(a) && e.isIdentifier(a.expression, { name: "Loader" }), i = e.isIdentifier(a, { name: "useLoader" }) || e.isTSInstantiationExpression(a) && e.isIdentifier(a.expression, { name: "useLoader" });
84
+ if (!o && !i) return;
85
+ const t = c.node.arguments, l = e.stringLiteral(n), u = t[0];
86
+ e.isStringLiteral(u) && u.value.includes("/") || (c.node.arguments = [l, ...t]);
86
87
  }
87
- }), h(n, { retainLines: !0 }).code;
88
+ }), g(r, { retainLines: !0 }).code;
88
89
  }
89
- function B(u, o) {
90
- const n = _(u, {
90
+ function Z(p, n) {
91
+ const r = v(p, {
91
92
  sourceType: "module",
92
93
  plugins: ["typescript", "jsx"]
93
94
  });
94
- return m(n, {
95
- ExportNamedDeclaration(l) {
96
- const t = l.node.declaration;
97
- if (!e.isVariableDeclaration(t)) return;
98
- const a = t.declarations[0];
99
- if (!a || !e.isIdentifier(a.id)) return;
100
- const s = a.id.name;
101
- if (!s.startsWith("action_")) return;
102
- const c = s.replace("action_", ""), r = a.init;
103
- if (!e.isArrowFunctionExpression(r) || !r.async) return;
104
- const p = r.params, f = H(o, c, p);
105
- r.body = e.blockStatement([e.returnStatement(f)]), G(r, p);
95
+ return h(r, {
96
+ ExportNamedDeclaration(c) {
97
+ const a = c.node.declaration;
98
+ if (!e.isVariableDeclaration(a)) return;
99
+ const o = a.declarations[0];
100
+ if (!o || !e.isIdentifier(o.id)) return;
101
+ const i = o.id.name;
102
+ if (!i.startsWith("action_")) return;
103
+ const t = i.replace("action_", ""), l = o.init;
104
+ if (!e.isArrowFunctionExpression(l) || !l.async) return;
105
+ const u = l.params, d = ee(n, t, u);
106
+ l.body = e.blockStatement([e.returnStatement(d)]), te(l, u);
106
107
  }
107
- }), h(n, { retainLines: !0 }).code;
108
+ }), g(r, { retainLines: !0 }).code;
108
109
  }
109
- function H(u, o, n) {
110
- const i = `/_action/${u}/${o}`;
111
- return n.length === 0 ? e.callExpression(
110
+ function ee(p, n, r) {
111
+ const s = `/_action/${p}/${n}`;
112
+ return r.length === 0 ? e.callExpression(
112
113
  e.memberExpression(
113
114
  e.callExpression(e.identifier("fetch"), [
114
- e.stringLiteral(i),
115
+ e.stringLiteral(s),
115
116
  e.objectExpression([
116
117
  e.objectProperty(
117
118
  e.identifier("method"),
@@ -136,7 +137,7 @@ function H(u, o, n) {
136
137
  ) : e.callExpression(
137
138
  e.memberExpression(
138
139
  e.callExpression(e.identifier("fetch"), [
139
- e.stringLiteral(i),
140
+ e.stringLiteral(s),
140
141
  e.objectExpression([
141
142
  e.objectProperty(
142
143
  e.identifier("method"),
@@ -176,374 +177,466 @@ function H(u, o, n) {
176
177
  ]
177
178
  );
178
179
  }
179
- function G(u, o) {
180
- if (o.length === 0) return;
181
- const n = o[0];
182
- if (e.isObjectPattern(n)) {
183
- let i = null;
184
- if (e.isTSTypeAnnotation(n.typeAnnotation) && e.isTSTypeReference(n.typeAnnotation.typeAnnotation)) {
185
- const a = n.typeAnnotation.typeAnnotation;
186
- e.isIdentifier(a.typeName, { name: "ActionArgs" }) && a.typeParameters?.params[0] && (i = a.typeParameters.params[0]);
180
+ function te(p, n) {
181
+ if (n.length === 0) return;
182
+ const r = n[0];
183
+ if (e.isObjectPattern(r)) {
184
+ let s = null;
185
+ if (e.isTSTypeAnnotation(r.typeAnnotation) && e.isTSTypeReference(r.typeAnnotation.typeAnnotation)) {
186
+ const o = r.typeAnnotation.typeAnnotation;
187
+ e.isIdentifier(o.typeName, { name: "ActionArgs" }) && o.typeParameters?.params[0] && (s = o.typeParameters.params[0]);
187
188
  }
188
- const l = e.objectProperty(
189
+ const c = e.objectProperty(
189
190
  e.identifier("body"),
190
191
  e.identifier("body"),
191
192
  !1,
192
193
  !0
193
194
  // shorthand
194
- ), t = e.objectPattern([l]);
195
- i && (t.typeAnnotation = e.tsTypeAnnotation(
195
+ ), a = e.objectPattern([c]);
196
+ s && (a.typeAnnotation = e.tsTypeAnnotation(
196
197
  e.tsTypeLiteral([
197
198
  e.tsPropertySignature(
198
199
  e.identifier("body"),
199
- e.tsTypeAnnotation(i)
200
+ e.tsTypeAnnotation(s)
200
201
  )
201
202
  ])
202
- )), u.params = [t];
203
+ )), p.params = [a];
203
204
  }
204
205
  }
205
- function z(u, o) {
206
- const n = _(u, {
206
+ function re(p, n) {
207
+ const r = v(p, {
207
208
  sourceType: "module",
208
209
  plugins: ["typescript", "jsx"]
209
210
  });
210
- return m(n, {
211
- ExportNamedDeclaration(l) {
212
- const t = l.node.declaration;
213
- if (!e.isVariableDeclaration(t)) return;
214
- const a = t.declarations[0];
215
- if (!a || !e.isIdentifier(a.id)) return;
216
- const s = a.id.name;
217
- if (!s.startsWith("stream_")) return;
218
- const c = s.replace("stream_", ""), r = `/_event/${o}/${c}`;
219
- a.init = e.objectExpression([
211
+ return h(r, {
212
+ ExportNamedDeclaration(c) {
213
+ const a = c.node.declaration;
214
+ if (!e.isVariableDeclaration(a)) return;
215
+ const o = a.declarations[0];
216
+ if (!o || !e.isIdentifier(o.id)) return;
217
+ const i = o.id.name;
218
+ if (!i.startsWith("stream_")) return;
219
+ const t = i.replace("stream_", ""), l = `/_event/${n}/${t}`;
220
+ o.init = e.objectExpression([
220
221
  e.objectProperty(
221
222
  e.identifier("__isVeloEventStream"),
222
223
  e.booleanLiteral(!0)
223
224
  ),
224
225
  e.objectProperty(
225
226
  e.identifier("__path"),
226
- e.stringLiteral(r)
227
+ e.stringLiteral(l)
227
228
  )
228
- ]), a.id.typeAnnotation = null;
229
+ ]), o.id.typeAnnotation = null;
229
230
  }
230
- }), h(n, { retainLines: !0 }).code;
231
+ }), g(r, { retainLines: !0 }).code;
231
232
  }
232
- function Y(u, o) {
233
- const n = _(u, {
233
+ function ne(p, n) {
234
+ const r = v(p, {
234
235
  sourceType: "module",
235
236
  plugins: ["typescript", "jsx"]
236
237
  });
237
- return m(n, {
238
- ExportNamedDeclaration(l) {
239
- const t = l.node.declaration;
240
- if (!e.isVariableDeclaration(t)) return;
241
- const a = t.declarations[0];
242
- if (!a || !e.isIdentifier(a.id)) return;
243
- const s = a.id.name;
244
- if (!s.startsWith("socket_")) return;
245
- const c = s.replace("socket_", ""), r = `/_socket/${o}/${c}`;
246
- a.init = e.objectExpression([
238
+ return h(r, {
239
+ ExportNamedDeclaration(c) {
240
+ const a = c.node.declaration;
241
+ if (!e.isVariableDeclaration(a)) return;
242
+ const o = a.declarations[0];
243
+ if (!o || !e.isIdentifier(o.id)) return;
244
+ const i = o.id.name;
245
+ if (!i.startsWith("socket_")) return;
246
+ const t = i.replace("socket_", ""), l = `/_socket/${n}/${t}`;
247
+ o.init = e.objectExpression([
247
248
  e.objectProperty(
248
249
  e.identifier("__isVeloSocket"),
249
250
  e.booleanLiteral(!0)
250
251
  ),
251
252
  e.objectProperty(
252
253
  e.identifier("__path"),
253
- e.stringLiteral(r)
254
+ e.stringLiteral(l)
254
255
  )
255
- ]), a.id.typeAnnotation = null;
256
+ ]), o.id.typeAnnotation = null;
256
257
  }
257
- }), h(n, { retainLines: !0 }).code;
258
+ }), g(r, { retainLines: !0 }).code;
258
259
  }
259
- function X(u) {
260
- const o = _(u, {
260
+ function se(p) {
261
+ const n = v(p, {
261
262
  sourceType: "module",
262
263
  plugins: ["typescript", "jsx"]
263
264
  });
264
- return m(o, {
265
- ExportNamedDeclaration(i) {
266
- const l = i.node.declaration;
267
- if (!e.isVariableDeclaration(l)) return;
268
- const t = l.declarations[0];
269
- !t || !e.isIdentifier(t.id) || t.id.name === "loader" && i.remove();
265
+ return h(n, {
266
+ ExportNamedDeclaration(s) {
267
+ const c = s.node.declaration;
268
+ if (!e.isVariableDeclaration(c)) return;
269
+ const a = c.declarations[0];
270
+ !a || !e.isIdentifier(a.id) || a.id.name === "loader" && s.remove();
270
271
  }
271
- }), h(o, { retainLines: !0 }).code;
272
+ }), g(n, { retainLines: !0 }).code;
272
273
  }
273
- function q(u) {
274
- const o = _(u, {
274
+ function ie(p) {
275
+ const n = v(p, {
275
276
  sourceType: "module",
276
277
  plugins: ["typescript", "jsx"]
277
- }), n = /* @__PURE__ */ new Set();
278
- x(o.program, n);
279
- let i = !1;
280
- return m(o, {
281
- ImportDeclaration(t) {
282
- const a = t.node.specifiers;
283
- if (a.length === 0) return;
284
- const s = a.filter((c) => n.has(c.local.name));
285
- s.length !== a.length && (i = !0, s.length === 0 ? t.remove() : t.node.specifiers = s);
278
+ }), r = /* @__PURE__ */ new Set();
279
+ T(n.program, r);
280
+ let s = !1;
281
+ return h(n, {
282
+ ImportDeclaration(a) {
283
+ const o = a.node.specifiers;
284
+ if (o.length === 0) return;
285
+ const i = o.filter((t) => r.has(t.local.name));
286
+ i.length !== o.length && (s = !0, i.length === 0 ? a.remove() : a.node.specifiers = i);
286
287
  }
287
- }), i ? h(o, { retainLines: !0 }).code : u;
288
+ }), s ? g(n, { retainLines: !0 }).code : p;
288
289
  }
289
- function K(u) {
290
- const o = _(u, {
290
+ function oe(p) {
291
+ const n = v(p, {
291
292
  sourceType: "module",
292
293
  plugins: ["typescript", "jsx"]
293
- }), n = [];
294
- if (m(o, {
295
- ObjectProperty(s) {
296
- e.isIdentifier(s.node.key, { name: "middlewares" }) && (n.push(s.node.value), s.remove());
294
+ }), r = [];
295
+ if (h(n, {
296
+ ObjectProperty(i) {
297
+ e.isIdentifier(i.node.key, { name: "middlewares" }) && (r.push(i.node.value), i.remove());
297
298
  }
298
- }), n.length === 0) return u;
299
- const i = /* @__PURE__ */ new Set();
300
- for (const s of n)
301
- x(s, i);
302
- const l = /* @__PURE__ */ new Set();
303
- x(o.program, l);
304
- const t = /* @__PURE__ */ new Set();
305
- for (const s of i)
306
- l.has(s) || t.add(s);
307
- return t.size > 0 && m(o, {
308
- ImportDeclaration(s) {
309
- const c = s.node.specifiers, r = c.filter((p) => !t.has(p.local.name));
310
- r.length === 0 ? s.remove() : r.length !== c.length && (s.node.specifiers = r);
299
+ }), r.length === 0) return p;
300
+ const s = /* @__PURE__ */ new Set();
301
+ for (const i of r)
302
+ T(i, s);
303
+ const c = /* @__PURE__ */ new Set();
304
+ T(n.program, c);
305
+ const a = /* @__PURE__ */ new Set();
306
+ for (const i of s)
307
+ c.has(i) || a.add(i);
308
+ return a.size > 0 && h(n, {
309
+ ImportDeclaration(i) {
310
+ const t = i.node.specifiers, l = t.filter((u) => !a.has(u.local.name));
311
+ l.length === 0 ? i.remove() : l.length !== t.length && (i.node.specifiers = l);
311
312
  }
312
- }), h(o, { retainLines: !0 }).code;
313
+ }), g(n, { retainLines: !0 }).code;
313
314
  }
314
- function x(u, o) {
315
- const n = (i) => {
316
- if (!(!i || typeof i != "object")) {
317
- if (Array.isArray(i)) {
318
- for (const l of i) n(l);
315
+ function T(p, n) {
316
+ const r = (s) => {
317
+ if (!(!s || typeof s != "object")) {
318
+ if (Array.isArray(s)) {
319
+ for (const c of s) r(c);
319
320
  return;
320
321
  }
321
- if (i.type === "Identifier") {
322
- o.add(i.name), i.typeAnnotation && n(i.typeAnnotation);
322
+ if (s.type === "Identifier") {
323
+ n.add(s.name), s.typeAnnotation && r(s.typeAnnotation);
323
324
  return;
324
325
  }
325
- if (i.type === "JSXIdentifier") {
326
- o.add(i.name);
326
+ if (s.type === "JSXIdentifier") {
327
+ n.add(s.name);
327
328
  return;
328
329
  }
329
- if (i.type === "MemberExpression") {
330
- n(i.object), i.computed && n(i.property);
330
+ if (s.type === "MemberExpression") {
331
+ r(s.object), s.computed && r(s.property);
331
332
  return;
332
333
  }
333
- if ((i.type === "ObjectProperty" || i.type === "ObjectMethod") && !i.computed) {
334
- i.type === "ObjectProperty" ? n(i.value) : n(i.body);
334
+ if ((s.type === "ObjectProperty" || s.type === "ObjectMethod") && !s.computed) {
335
+ s.type === "ObjectProperty" ? r(s.value) : r(s.body);
335
336
  return;
336
337
  }
337
- if (!(i.type === "ImportSpecifier" || i.type === "ImportDefaultSpecifier" || i.type === "ImportNamespaceSpecifier"))
338
- for (const l of Object.keys(i))
339
- l === "loc" || l === "start" || l === "end" || l === "leadingComments" || l === "trailingComments" || l === "innerComments" || n(i[l]);
338
+ if (!(s.type === "ImportSpecifier" || s.type === "ImportDefaultSpecifier" || s.type === "ImportNamespaceSpecifier"))
339
+ for (const c of Object.keys(s))
340
+ c === "loc" || c === "start" || c === "end" || c === "leadingComments" || c === "trailingComments" || c === "innerComments" || r(s[c]);
340
341
  }
341
342
  };
342
- n(u);
343
+ r(p);
343
344
  }
344
- function Q(u) {
345
- for (const o of u.properties)
346
- if (e.isObjectProperty(o) && e.isIdentifier(o.key) && o.key.name === "handler")
345
+ function ae(p) {
346
+ for (const n of p.properties)
347
+ if (e.isObjectProperty(n) && e.isIdentifier(n.key) && n.key.name === "handler")
347
348
  return !0;
348
349
  return !1;
349
350
  }
350
- function Z(u) {
351
- for (const o of u.properties)
352
- if (e.isObjectProperty(o) && e.isIdentifier(o.key) && o.key.name === "children" && e.isArrayExpression(o.value))
353
- return o.value;
351
+ function ce(p) {
352
+ for (const n of p.properties)
353
+ if (e.isObjectProperty(n) && e.isIdentifier(n.key) && n.key.name === "children" && e.isArrayExpression(n.value))
354
+ return n.value;
354
355
  return null;
355
356
  }
356
- function ee(u) {
357
- const o = _(u, {
357
+ function le(p) {
358
+ const n = v(p, {
358
359
  sourceType: "module",
359
360
  plugins: ["typescript", "jsx"]
360
- }), n = [], i = (c) => {
361
- for (let r = c.elements.length - 1; r >= 0; r--) {
362
- const p = c.elements[r];
363
- if (!e.isObjectExpression(p)) continue;
364
- if (Q(p)) {
365
- n.push(p), c.elements.splice(r, 1);
361
+ }), r = [], s = (t) => {
362
+ for (let l = t.elements.length - 1; l >= 0; l--) {
363
+ const u = t.elements[l];
364
+ if (!e.isObjectExpression(u)) continue;
365
+ if (ae(u)) {
366
+ r.push(u), t.elements.splice(l, 1);
366
367
  continue;
367
368
  }
368
- const f = Z(p);
369
- f && i(f);
369
+ const d = ce(u);
370
+ d && s(d);
370
371
  }
371
372
  };
372
- if (m(o, {
373
- ExportDefaultDeclaration(c) {
374
- const r = c.node.declaration;
375
- let p = null;
376
- e.isArrayExpression(r) ? p = r : (e.isTSSatisfiesExpression(r) && e.isArrayExpression(r.expression) || e.isTSAsExpression(r) && e.isArrayExpression(r.expression)) && (p = r.expression), p && i(p);
373
+ if (h(n, {
374
+ ExportDefaultDeclaration(t) {
375
+ const l = t.node.declaration;
376
+ let u = null;
377
+ e.isArrayExpression(l) ? u = l : (e.isTSSatisfiesExpression(l) && e.isArrayExpression(l.expression) || e.isTSAsExpression(l) && e.isArrayExpression(l.expression)) && (u = l.expression), u && s(u);
377
378
  }
378
- }), n.length === 0) return u;
379
- const l = /* @__PURE__ */ new Set();
380
- for (const c of n)
381
- x(c, l);
382
- const t = /* @__PURE__ */ new Set();
383
- x(o.program, t);
379
+ }), r.length === 0) return p;
380
+ const c = /* @__PURE__ */ new Set();
381
+ for (const t of r)
382
+ T(t, c);
384
383
  const a = /* @__PURE__ */ new Set();
385
- for (const c of l)
386
- t.has(c) || a.add(c);
387
- return a.size > 0 && m(o, {
388
- ImportDeclaration(c) {
389
- const r = c.node.specifiers, p = r.filter((f) => !a.has(f.local.name));
390
- p.length === 0 ? c.remove() : p.length !== r.length && (c.node.specifiers = p);
384
+ T(n.program, a);
385
+ const o = /* @__PURE__ */ new Set();
386
+ for (const t of c)
387
+ a.has(t) || o.add(t);
388
+ return o.size > 0 && h(n, {
389
+ ImportDeclaration(t) {
390
+ const l = t.node.specifiers, u = l.filter((d) => !o.has(d.local.name));
391
+ u.length === 0 ? t.remove() : u.length !== l.length && (t.node.specifiers = u);
391
392
  }
392
- }), h(o, { retainLines: !0 }).code;
393
+ }), g(n, { retainLines: !0 }).code;
393
394
  }
394
- function A(u) {
395
- const o = _(u, {
395
+ function F(p) {
396
+ const n = v(p, {
396
397
  sourceType: "module",
397
398
  plugins: ["typescript", "jsx"]
398
- }), n = /* @__PURE__ */ new Map();
399
- m(o, {
400
- ImportDeclaration(t) {
401
- const a = t.node.source.value;
402
- for (const s of t.node.specifiers)
403
- e.isImportNamespaceSpecifier(s) && n.set(s.local.name, a);
399
+ }), r = /* @__PURE__ */ new Map();
400
+ h(n, {
401
+ ImportDeclaration(a) {
402
+ const o = a.node.source.value;
403
+ for (const i of a.node.specifiers)
404
+ e.isImportNamespaceSpecifier(i) && r.set(i.local.name, o);
404
405
  }
405
406
  });
406
- const i = /* @__PURE__ */ new Map();
407
- m(o, {
408
- ExportDefaultDeclaration(t) {
409
- const a = t.node.declaration;
410
- let s = null;
411
- e.isArrayExpression(a) ? s = a : (e.isTSSatisfiesExpression(a) || e.isTSAsExpression(a)) && e.isArrayExpression(a.expression) && (s = a.expression), s && C(s.elements, "", i);
407
+ const s = /* @__PURE__ */ new Map();
408
+ h(n, {
409
+ ExportDefaultDeclaration(a) {
410
+ const o = a.node.declaration;
411
+ let i = null;
412
+ e.isArrayExpression(o) ? i = o : (e.isTSSatisfiesExpression(o) || e.isTSAsExpression(o)) && e.isArrayExpression(o.expression) && (i = o.expression), i && R(i.elements, "", s);
412
413
  }
413
414
  });
414
- const l = /* @__PURE__ */ new Map();
415
- for (const [t, a] of i) {
416
- const s = n.get(t);
417
- if (s) {
418
- const c = s.replace(/^\.\//, "").replace(/\.(tsx?|jsx?|js)$/, "");
419
- l.set(c, a);
415
+ const c = /* @__PURE__ */ new Map();
416
+ for (const [a, o] of s) {
417
+ const i = r.get(a);
418
+ if (i) {
419
+ const t = i.replace(/^\.\//, "").replace(/\.(tsx?|jsx?|js)$/, "");
420
+ c.set(t, o);
420
421
  }
421
422
  }
422
- return l;
423
+ return c;
423
424
  }
424
- function C(u, o, n) {
425
- for (const i of u) {
426
- if (!e.isObjectExpression(i)) continue;
427
- let l = "", t = o, a = null, s = null;
428
- for (const c of i.properties) {
429
- if (!e.isObjectProperty(c)) continue;
430
- const r = c.key, p = e.isIdentifier(r) ? r.name : null;
431
- p === "path" && e.isStringLiteral(c.value) && (l = c.value.value, l && !l.startsWith("/") ? t = o + "/" + l : t = o + l), p === "module" && e.isIdentifier(c.value) && (a = c.value.name), p === "children" && e.isArrayExpression(c.value) && (s = c.value);
425
+ function R(p, n, r) {
426
+ for (const s of p) {
427
+ if (!e.isObjectExpression(s)) continue;
428
+ let c = "", a = n, o = null, i = null;
429
+ for (const t of s.properties) {
430
+ if (!e.isObjectProperty(t)) continue;
431
+ const l = t.key, u = e.isIdentifier(l) ? l.name : null;
432
+ u === "path" && e.isStringLiteral(t.value) && (c = t.value.value, c && !c.startsWith("/") ? a = n + "/" + c : a = n + c), u === "module" && e.isIdentifier(t.value) && (o = t.value.name), u === "children" && e.isArrayExpression(t.value) && (i = t.value);
432
433
  }
433
- if (a) {
434
- const r = !s && l === "/" ? o || "/" : t;
435
- n.set(a, {
436
- fullPath: r,
437
- path: l
434
+ if (o) {
435
+ const l = !i && c === "/" ? n || "/" : a;
436
+ r.set(o, {
437
+ fullPath: l,
438
+ path: c
438
439
  });
439
440
  }
440
- s && C(s.elements, t, n);
441
+ i && R(i.elements, a, r);
442
+ }
443
+ }
444
+ function pe(p) {
445
+ const n = v(p, {
446
+ sourceType: "module",
447
+ plugins: ["typescript", "jsx"]
448
+ });
449
+ let r = null;
450
+ return h(n, {
451
+ ExportNamedDeclaration(s) {
452
+ if (r) return;
453
+ const c = s.node.declaration;
454
+ if (e.isVariableDeclaration(c))
455
+ for (const a of c.declarations) {
456
+ if (!e.isIdentifier(a.id, { name: "channels" })) continue;
457
+ let o = a.init;
458
+ if (o && (e.isTSSatisfiesExpression(o) || e.isTSAsExpression(o)) && (o = o.expression), !e.isArrayExpression(o)) continue;
459
+ const i = [];
460
+ for (const t of o.elements)
461
+ e.isStringLiteral(t) && i.push(t.value);
462
+ r = i;
463
+ }
464
+ }
465
+ }), r;
466
+ }
467
+ function ue(p) {
468
+ const n = /* @__PURE__ */ new Set();
469
+ if (!x.existsSync(p)) return n;
470
+ let r;
471
+ try {
472
+ r = v(x.readFileSync(p, "utf-8"), {
473
+ sourceType: "module",
474
+ plugins: ["typescript", "jsx"]
475
+ });
476
+ } catch {
477
+ return n;
441
478
  }
479
+ return h(r, {
480
+ ExportNamedDeclaration(s) {
481
+ const c = s.node.declaration;
482
+ if (e.isVariableDeclaration(c))
483
+ for (const a of c.declarations) {
484
+ if (!e.isIdentifier(a.id, { name: "channels" })) continue;
485
+ let o = a.init;
486
+ if (o && (e.isTSSatisfiesExpression(o) || e.isTSAsExpression(o)) && (o = o.expression), !!e.isObjectExpression(o))
487
+ for (const i of o.properties)
488
+ e.isObjectProperty(i) && (e.isIdentifier(i.key) ? n.add(i.key.name) : e.isStringLiteral(i.key) && n.add(i.key.value));
489
+ }
490
+ }
491
+ }), n;
442
492
  }
443
- const E = "virtual:velo/server-entry", b = "virtual:velo/client-entry", N = "\0" + E, P = "\0" + b;
444
- function te(u, o) {
445
- let n = d.resolve(process.cwd(), o);
446
- const i = u.routesFile ?? "routes.tsx", l = /* @__PURE__ */ new Map();
493
+ function C(p) {
494
+ return [m.join(p, "channels.ts"), m.join(p, "channels.tsx")];
495
+ }
496
+ const O = "virtual:velo/server-entry", N = "virtual:velo/client-entry", V = "\0" + O, $ = "\0" + N;
497
+ function fe(p, n) {
498
+ let r = m.resolve(process.cwd(), n);
499
+ const s = p.routesFile ?? "routes.tsx", c = /* @__PURE__ */ new Map();
500
+ let a = null;
501
+ const o = () => {
502
+ if (!a) {
503
+ const t = C(r).find((l) => x.existsSync(l));
504
+ a = t ? ue(t) : /* @__PURE__ */ new Set();
505
+ }
506
+ return a;
507
+ }, i = /* @__PURE__ */ new Set();
447
508
  return {
448
509
  name: "velo:transform",
449
510
  enforce: "pre",
450
511
  configResolved(t) {
451
- n = d.resolve(t.root, o);
512
+ r = m.resolve(t.root, n), a = null;
452
513
  },
453
514
  buildStart() {
454
- const t = d.join(n, i);
455
- if (g.existsSync(t)) {
456
- const a = g.readFileSync(t, "utf-8"), s = A(a);
457
- l.clear();
458
- for (const [c, r] of s)
459
- l.set(c, r);
515
+ a = null;
516
+ const t = m.join(r, s);
517
+ if (x.existsSync(t)) {
518
+ const l = x.readFileSync(t, "utf-8"), u = F(l);
519
+ c.clear();
520
+ for (const [d, f] of u)
521
+ c.set(d, f);
460
522
  }
461
523
  },
462
- handleHotUpdate({ file: t, server: a }) {
463
- const s = d.join(n, i);
464
- if (t === s) {
465
- const c = g.readFileSync(s, "utf-8"), r = A(c);
466
- l.clear();
467
- for (const [p, f] of r)
468
- l.set(p, f);
469
- return a.ws.send({ type: "full-reload" }), [];
524
+ handleHotUpdate({ file: t, server: l }) {
525
+ if (C(r).includes(t))
526
+ return a = null, l.ws.send({ type: "full-reload" }), [];
527
+ const u = m.join(r, s);
528
+ if (t === u) {
529
+ const d = x.readFileSync(u, "utf-8"), f = F(d);
530
+ c.clear();
531
+ for (const [y, E] of f)
532
+ c.set(y, E);
533
+ return l.ws.send({ type: "full-reload" }), [];
470
534
  }
471
535
  },
472
536
  resolveId(t) {
473
- return t === E || t.endsWith(E) ? N : t === b || t.endsWith(b) || t === "/__velo_client.js" ? P : null;
537
+ return t === O || t.endsWith(O) ? V : t === N || t.endsWith(N) || t === "/__velo_client.js" ? $ : null;
474
538
  },
475
539
  load(t) {
476
- const a = u.routesFile ?? "routes.tsx", s = u.serverInit ?? "server.tsx", c = u.clientInit ?? "client.tsx", r = d.join(n, a).replace(/\.tsx?$/, ".js"), p = d.join(n, s).replace(/\.tsx?$/, ".js"), f = d.join(n, c).replace(/\.tsx?$/, ".js");
477
- return t === N ? `
540
+ const l = p.routesFile ?? "routes.tsx", u = p.serverInit ?? "server.tsx", d = p.clientInit ?? "client.tsx", f = m.join(r, l).replace(/\.tsx?$/, ".js"), y = m.join(r, u).replace(/\.tsx?$/, ".js"), E = m.join(r, d).replace(/\.tsx?$/, ".js");
541
+ if (t === V) {
542
+ const b = C(r).find((j) => x.existsSync(j)), _ = b ? b.replace(/\.tsx?$/, ".js") : null;
543
+ return `
478
544
  globalThis.__veloBuildHash = __VELO_BUILD_HASH__;
479
545
  globalThis.__veloClientJs = __VELO_CLIENT_JS__;
480
546
  globalThis.__veloClientCss = __VELO_CLIENT_CSS__;
481
- import "${p}";
482
- import routes from "${r}";
483
- import { startServer } from "@mauroandre/velojs/server";
547
+ import "${y}";
548
+ import routes from "${f}";
549
+ import { startServer${_ ? ", registerChannels" : ""} } from "@mauroandre/velojs/server";
550
+ ${_ ? `import { channels as __veloChannelMap } from "${_}";` : ""}
551
+ ${_ ? "registerChannels(__veloChannelMap);" : ""}
484
552
 
485
553
  export { routes };
486
554
  export default await startServer({ routes, port: __VELO_CONFIG_PORT__, hostname: __VELO_CONFIG_HOSTNAME__ });
487
- ` : t === P ? `
488
- import "${f}";
489
- import routes from "${r}";
555
+ `;
556
+ }
557
+ return t === $ ? `
558
+ import "${E}";
559
+ import routes from "${f}";
490
560
  import { startClient } from "@mauroandre/velojs/client";
491
561
 
492
562
  startClient({ routes });
493
563
  ` : null;
494
564
  },
495
- transform(t, a, s) {
496
- const c = s?.ssr === !0;
497
- if (a.startsWith("\0") || a.includes("/.velojs/") || !a.endsWith(".tsx") && !a.endsWith(".ts") || !a.startsWith(n)) return null;
498
- let r = t, p = !1;
499
- const f = /middlewares:\s*\[/.test(t), y = /export\s+(const|function)\s+Component/.test(
565
+ transform(t, l, u) {
566
+ const d = u?.ssr === !0;
567
+ if (l.startsWith("\0") || l.includes("/.velojs/") || !l.endsWith(".tsx") && !l.endsWith(".ts") || !l.startsWith(r)) return null;
568
+ let f = t, y = !1;
569
+ const E = /middlewares:\s*\[/.test(t), b = /export\s+(const|function)\s+Component/.test(
500
570
  t
501
- ), v = /export\s+(const|function)\s+loader/.test(t), D = /export\s+const\s+action_\w+/.test(t), I = /export\s+const\s+stream_\w+/.test(t), T = /export\s+const\s+socket_\w+/.test(t), w = /\bLoader\s*</.test(t) || /\bLoader\s*\(/.test(t), F = /\buseLoader\s*</.test(t) || /\buseLoader\s*\(/.test(t), k = /\bhandler\s*:/.test(t), V = d.join(n, i);
502
- if (!c && f && (r = K(r), p = !0), !c && k && a === V && (r = ee(r), p = !0), y || v || D || I || T || w || F) {
503
- const S = d.relative(n, a).replace(/\.(tsx?|jsx?)$/, "").replace(/\\/g, "/"), O = l.get(S);
504
- r = W(r, S, O?.fullPath, O?.path), r = M(r, S), c || (r = B(
505
- r,
571
+ ), _ = /export\s+(const|function)\s+loader/.test(t), j = /export\s+const\s+action_\w+/.test(t), A = /export\s+const\s+stream_\w+/.test(t), L = /export\s+const\s+socket_\w+/.test(t), M = /\bLoader\s*</.test(t) || /\bLoader\s*\(/.test(t), H = /\buseLoader\s*</.test(t) || /\buseLoader\s*\(/.test(t), J = /\bhandler\s*:/.test(t), U = /export\s+(const|let|var)\s+channels\b/.test(t), S = m.relative(r, l).replace(/\.(tsx?|jsx?)$/, "").replace(/\\/g, "/");
572
+ if (U) {
573
+ const I = pe(t);
574
+ if (I) {
575
+ if (!_)
576
+ throw new Error(
577
+ `[velojs] "${S}" declares \`channels\` without a \`loader\` — there is nothing to synchronize. Add a loader or remove the export.`
578
+ );
579
+ const B = o(), k = I.filter((w) => !B.has(w));
580
+ if (k.length > 0)
581
+ throw new Error(
582
+ `[velojs] "${S}" declares channel(s) ${k.map((w) => `"${w}"`).join(", ")} with no entry in app/channels.ts — add the partition resolver for each name (a typo or a rename would otherwise be a silent no-op).`
583
+ );
584
+ process.env.VELO_STATIC && !i.has(S) && (i.add(S), console.warn(
585
+ `[velojs] "${S}" declares channels (${I.join(
586
+ ", "
587
+ )}) — inert in a static build: there is no SSE server, so no connection is opened and freshness stays "live".`
588
+ ));
589
+ }
590
+ }
591
+ const W = m.join(r, s);
592
+ if (!d && E && (f = oe(f), y = !0), !d && J && l === W && (f = le(f), y = !0), b || _ || j || A || L || M || H) {
593
+ const I = c.get(S);
594
+ f = K(f, S, I?.fullPath, I?.path), f = Q(f, S), d || (f = Z(
595
+ f,
506
596
  S
507
- )), !c && I && (r = z(
508
- r,
597
+ )), !d && A && (f = re(
598
+ f,
509
599
  S
510
- )), !c && T && (r = Y(
511
- r,
600
+ )), !d && L && (f = ne(
601
+ f,
512
602
  S
513
- )), c || (r = X(r)), c || (r = q(r)), p = !0;
603
+ )), d || (f = se(f)), d || (f = ie(f)), y = !0;
514
604
  }
515
- return p ? {
516
- code: r,
605
+ return y ? {
606
+ code: f,
517
607
  map: null
518
608
  } : null;
519
609
  }
520
610
  };
521
611
  }
522
- function re(u) {
612
+ function de(p) {
523
613
  return {
524
614
  name: "velo:config",
525
- config(o, { mode: n }) {
526
- const i = n === "server", l = n === "development", t = !!process.env.VELO_STATIC, a = o.server?.port ?? (Number(process.env.PORT) || u.port || 3e3);
527
- let s = "client.js", c = "client.css";
528
- if (i)
615
+ config(n, { mode: r }) {
616
+ const s = r === "server", c = r === "development", a = !!process.env.VELO_STATIC, o = n.server?.port ?? (Number(process.env.PORT) || p.port || 3e3), i = m.resolve(
617
+ process.cwd(),
618
+ n.root ?? "."
619
+ ), t = n.envDir ? m.resolve(i, n.envDir) : i, l = G(r, t, ""), u = process.env.HOST?.trim() || l.HOST?.trim() || void 0, d = n.server?.host ?? u ?? p.hostname, f = d === !0 || d === "0.0.0.0" || d === "::", y = n.server?.allowedHosts ?? (f ? !0 : void 0);
620
+ let E = "client.js", b = "client.css";
621
+ if (s)
529
622
  try {
530
- const p = d.resolve(process.cwd(), "dist/client/.vite/manifest.json"), y = JSON.parse(g.readFileSync(p, "utf-8"))[b];
531
- y && (s = y.file || s, y.css?.[0] && (c = y.css[0]));
623
+ const j = m.resolve(process.cwd(), "dist/client/.vite/manifest.json"), L = JSON.parse(x.readFileSync(j, "utf-8"))[N];
624
+ L && (E = L.file || E, L.css?.[0] && (b = L.css[0]));
532
625
  } catch {
533
626
  }
534
- const r = {
627
+ const _ = {
535
628
  define: {
536
- "process.env.NODE_ENV": JSON.stringify(l ? "development" : "production"),
537
- "process.env.STATIC_BASE_URL": JSON.stringify(process.env.STATIC_BASE_URL || (t ? "/client" : "")),
538
- __VELO_STATIC__: JSON.stringify(t),
629
+ "process.env.NODE_ENV": JSON.stringify(c ? "development" : "production"),
630
+ "process.env.STATIC_BASE_URL": JSON.stringify(process.env.STATIC_BASE_URL || (a ? "/client" : "")),
631
+ __VELO_STATIC__: JSON.stringify(a),
539
632
  __VELO_BUILD_HASH__: JSON.stringify(process.env.VELO_BUILD_HASH || Date.now().toString(36)),
540
- __VELO_CLIENT_JS__: JSON.stringify(s),
541
- __VELO_CLIENT_CSS__: JSON.stringify(c),
633
+ __VELO_CLIENT_JS__: JSON.stringify(E),
634
+ __VELO_CLIENT_CSS__: JSON.stringify(b),
542
635
  // Baked into the server bundle as startServer's port fallback.
543
636
  // null when unset → startServer falls back to PORT env / 3000.
544
- __VELO_CONFIG_PORT__: JSON.stringify(u.port ?? null),
637
+ __VELO_CONFIG_PORT__: JSON.stringify(p.port ?? null),
545
638
  // Same for the bind interface: null → HOST env / Node default.
546
- __VELO_CONFIG_HOSTNAME__: JSON.stringify(u.hostname ?? null)
639
+ __VELO_CONFIG_HOSTNAME__: JSON.stringify(p.hostname ?? null)
547
640
  },
548
641
  resolve: {
549
642
  alias: {
@@ -552,11 +645,15 @@ function re(u) {
552
645
  }
553
646
  },
554
647
  server: {
555
- port: a
648
+ port: o,
649
+ // Host and allowedHosts only shape the dev server; in build
650
+ // they are inert, so we keep them out of the build config.
651
+ ...c && d !== void 0 ? { host: d } : {},
652
+ ...c && y !== void 0 ? { allowedHosts: y } : {}
556
653
  }
557
654
  };
558
- return i ? r.build = {
559
- ssr: E,
655
+ return s ? _.build = {
656
+ ssr: O,
560
657
  outDir: "dist",
561
658
  emptyOutDir: !1,
562
659
  copyPublicDir: !1,
@@ -565,107 +662,109 @@ function re(u) {
565
662
  entryFileNames: "server.js"
566
663
  }
567
664
  }
568
- } : l || (r.build = {
665
+ } : c || (_.build = {
569
666
  manifest: !0,
570
667
  outDir: "dist/client",
571
668
  rollupOptions: {
572
- input: b,
669
+ input: N,
573
670
  output: {
574
671
  entryFileNames: "client.[hash].js",
575
- assetFileNames: (p) => p.names?.[0]?.endsWith(".css") ? "client.[hash].css" : "[name].[hash][extname]"
672
+ assetFileNames: (j) => j.names?.[0]?.endsWith(".css") ? "client.[hash].css" : "[name].[hash][extname]"
576
673
  }
577
674
  }
578
- }), r;
675
+ }), _;
579
676
  }
580
677
  };
581
678
  }
582
- function ne() {
679
+ function me() {
583
680
  return {
584
681
  name: "velo:static-url",
585
682
  apply: "build",
586
683
  enforce: "post",
587
- generateBundle(u, o) {
588
- const n = process.env.STATIC_BASE_URL || "";
589
- if (n)
590
- for (const i of Object.values(o))
591
- i.type === "asset" && typeof i.source == "string" && i.fileName.endsWith(".css") && (i.source = i.source.replace(
684
+ generateBundle(p, n) {
685
+ const r = process.env.STATIC_BASE_URL || "";
686
+ if (r)
687
+ for (const s of Object.values(n))
688
+ s.type === "asset" && typeof s.source == "string" && s.fileName.endsWith(".css") && (s.source = s.source.replace(
592
689
  /url\(\s*(['"]?)\/(?!\/)/g,
593
- `url($1${n}/`
690
+ `url($1${r}/`
594
691
  ));
595
692
  }
596
693
  };
597
694
  }
598
- function ie(u, o) {
599
- let n = "", i = "", l = !1, t = null;
600
- function a() {
601
- if (!n) return;
602
- const s = d.resolve(n, o);
603
- if (!g.existsSync(s)) return;
604
- const c = U(s), r = d.join(n, ".velojs");
605
- g.mkdirSync(r, { recursive: !0 }), g.writeFileSync(
606
- d.join(r, "graph.json"),
607
- JSON.stringify(c)
695
+ function ye(p, n) {
696
+ let r = "", s = "", c = !1, a = null;
697
+ function o() {
698
+ if (!r) return;
699
+ const i = m.resolve(r, n);
700
+ if (!x.existsSync(i)) return;
701
+ const t = q(i), l = m.join(r, ".velojs");
702
+ x.mkdirSync(l, { recursive: !0 }), x.writeFileSync(
703
+ m.join(l, "graph.json"),
704
+ JSON.stringify(t)
608
705
  );
609
706
  }
610
707
  return {
611
708
  name: "velo:graph",
612
- configResolved(s) {
613
- n = s.root, i = s.mode;
709
+ configResolved(i) {
710
+ r = i.root, s = i.mode;
614
711
  },
615
712
  writeBundle() {
616
- i !== "server" && a();
713
+ s !== "server" && o();
617
714
  },
618
- configureServer(s) {
619
- a(), l = !0;
620
- const c = d.resolve(n, o);
621
- s.watcher.on("all", (r, p) => {
622
- l && p.startsWith(c) && (t && clearTimeout(t), t = setTimeout(() => a(), 500));
715
+ configureServer(i) {
716
+ o(), c = !0;
717
+ const t = m.resolve(r, n);
718
+ i.watcher.on("all", (l, u) => {
719
+ c && u.startsWith(t) && (a && clearTimeout(a), a = setTimeout(() => o(), 500));
623
720
  });
624
721
  }
625
722
  };
626
723
  }
627
- function se(u) {
724
+ function he(p) {
628
725
  return [
629
- ...J.exclude,
726
+ ...X.exclude,
630
727
  /.*\.mjs$/,
631
- ...u.devServerExclude ?? []
728
+ ...p.devServerExclude ?? []
632
729
  ];
633
730
  }
634
- function ye(u) {
635
- const o = u ?? {}, n = o.appDirectory ?? "./app";
731
+ function Te(p) {
732
+ const n = p ?? {}, r = n.appDirectory ?? "./app";
636
733
  return [
637
- re(o),
638
- te(o, n),
639
- ne(),
640
- ie(o, n),
641
- R(),
642
- $({
643
- entry: E,
644
- exclude: se(o)
734
+ de(n),
735
+ fe(n, r),
736
+ me(),
737
+ ye(n, r),
738
+ z(),
739
+ Y({
740
+ entry: O,
741
+ exclude: he(n)
645
742
  }),
646
- oe()
743
+ ve()
647
744
  ];
648
745
  }
649
- function oe() {
746
+ function ve() {
650
747
  return {
651
748
  name: "velo:ws-bridge",
652
- configureServer(u) {
653
- globalThis.__veloDevServer = u.httpServer;
749
+ configureServer(p) {
750
+ globalThis.__veloDevServer = p.httpServer;
654
751
  }
655
752
  };
656
753
  }
657
754
  export {
658
- A as buildFullPathMap,
659
- C as collectFullPaths,
660
- se as devServerExcludeFor,
661
- W as injectMetadata,
662
- q as pruneClientOnlyImports,
663
- ee as removeEndpointRoutes,
664
- X as removeLoaders,
665
- K as removeMiddlewares,
666
- B as transformActionsForClient,
667
- M as transformLoaderFunctions,
668
- Y as transformSocketsForClient,
669
- z as transformStreamsForClient,
670
- ye as veloPlugin
755
+ F as buildFullPathMap,
756
+ R as collectFullPaths,
757
+ pe as declaredChannelNames,
758
+ he as devServerExcludeFor,
759
+ K as injectMetadata,
760
+ ie as pruneClientOnlyImports,
761
+ ue as readChannelMapNames,
762
+ le as removeEndpointRoutes,
763
+ se as removeLoaders,
764
+ oe as removeMiddlewares,
765
+ Z as transformActionsForClient,
766
+ Q as transformLoaderFunctions,
767
+ ne as transformSocketsForClient,
768
+ re as transformStreamsForClient,
769
+ Te as veloPlugin
671
770
  };