@vitejs/devtools 0.0.0-alpha.19 → 0.0.0-alpha.20
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/{cli-commands-DRuCf81B.js → cli-commands-BBPbCd8A.js} +2 -2
- package/dist/cli-commands.js +2 -3
- package/dist/cli.js +2 -3
- package/dist/client/inject.js +5 -12
- package/dist/client/standalone/assets/{index-BdwMlRiX.css → index-CsLZ-29s.css} +1 -1
- package/dist/client/standalone/assets/index-g0E0pe2M.js +7 -0
- package/dist/client/standalone/index.html +2 -2
- package/dist/client/webcomponents.d.ts +2 -2
- package/dist/client/webcomponents.js +8 -8
- package/dist/dirs.js +1 -1
- package/dist/{docks-j8O6WvbD.js → docks-B3cDUs1u.js} +22 -35
- package/dist/{index-Wdefo_Ne.d.ts → index-C5iw-7QZ.d.ts} +56 -15
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -2
- package/dist/{plugins-l6D28NJB.js → plugins-DfJlAQ2j.js} +133 -120
- package/package.json +14 -13
- package/dist/client/standalone/assets/index-Brys-GL2.js +0 -7
- /package/dist/{dirs-DcSK9l9L.js → dirs-C0s1Ghvy.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as dirDist, t as dirClientStandalone } from "./dirs-
|
|
1
|
+
import { n as dirDist, t as dirClientStandalone } from "./dirs-C0s1Ghvy.js";
|
|
2
2
|
import Debug from "debug";
|
|
3
3
|
import { debounce } from "perfect-debounce";
|
|
4
4
|
import { toDataURL } from "mlly";
|
|
@@ -23,16 +23,18 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
23
23
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
24
24
|
var __getProtoOf = Object.getPrototypeOf;
|
|
25
25
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
26
|
-
var
|
|
27
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
28
|
-
};
|
|
26
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
29
27
|
var __copyProps = (to, from, except, desc) => {
|
|
30
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
30
|
+
key = keys[i];
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
32
|
+
__defProp(to, key, {
|
|
33
|
+
get: ((k) => from[k]).bind(null, key),
|
|
34
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
return to;
|
|
38
40
|
};
|
|
@@ -80,10 +82,17 @@ var DevToolsDockHost = class {
|
|
|
80
82
|
//#endregion
|
|
81
83
|
//#region src/node/host-functions.ts
|
|
82
84
|
var RpcFunctionsHost = class extends RpcFunctionsCollectorBase {
|
|
83
|
-
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
rpcGroup = void 0;
|
|
84
89
|
constructor(context) {
|
|
85
90
|
super(context);
|
|
86
91
|
}
|
|
92
|
+
boardcast(name, ...args) {
|
|
93
|
+
if (!this.rpcGroup) throw new Error("RpcFunctionsHost.rpcGroup is not set, it likely to be an internal bug of Vite DevTools");
|
|
94
|
+
return this.rpcGroup.broadcast.$callOptional(name, ...args);
|
|
95
|
+
}
|
|
87
96
|
};
|
|
88
97
|
|
|
89
98
|
//#endregion
|
|
@@ -295,12 +304,12 @@ const terminalsList = defineRpcFunction({
|
|
|
295
304
|
type: "static",
|
|
296
305
|
setup: (context) => {
|
|
297
306
|
return { async handler() {
|
|
298
|
-
return Array.from(context.terminals.sessions.values()).map((i
|
|
307
|
+
return Array.from(context.terminals.sessions.values()).map((i) => {
|
|
299
308
|
return {
|
|
300
|
-
id: i
|
|
301
|
-
title: i
|
|
302
|
-
description: i
|
|
303
|
-
status: i
|
|
309
|
+
id: i.id,
|
|
310
|
+
title: i.title,
|
|
311
|
+
description: i.description,
|
|
312
|
+
status: i.status
|
|
304
313
|
};
|
|
305
314
|
});
|
|
306
315
|
} };
|
|
@@ -331,7 +340,7 @@ const openInEditor = defineRpcFunction({
|
|
|
331
340
|
type: "action",
|
|
332
341
|
setup: () => {
|
|
333
342
|
return { handler: async (path) => {
|
|
334
|
-
await import("launch-editor").then((r$
|
|
343
|
+
await import("launch-editor").then((r$1) => r$1.default(path));
|
|
335
344
|
} };
|
|
336
345
|
}
|
|
337
346
|
});
|
|
@@ -343,7 +352,7 @@ const openInFinder = defineRpcFunction({
|
|
|
343
352
|
type: "action",
|
|
344
353
|
setup: () => {
|
|
345
354
|
return { handler: async (path) => {
|
|
346
|
-
await import("open").then((r$
|
|
355
|
+
await import("open").then((r$1) => r$1.default(path));
|
|
347
356
|
} };
|
|
348
357
|
}
|
|
349
358
|
});
|
|
@@ -385,14 +394,14 @@ async function createDevToolsContext(viteConfig, viteServer) {
|
|
|
385
394
|
context.terminals = terminalsHost;
|
|
386
395
|
for (const fn of builtinRpcDecalrations) rpcHost.register(fn);
|
|
387
396
|
docksHost.events.on("dock:entry:updated", debounce(() => {
|
|
388
|
-
rpcHost.boardcast
|
|
397
|
+
rpcHost.boardcast("vite:internal:docks:updated");
|
|
389
398
|
}, 10));
|
|
390
399
|
terminalsHost.events.on("terminal:session:updated", debounce(() => {
|
|
391
|
-
rpcHost.boardcast
|
|
392
|
-
rpcHost.boardcast
|
|
400
|
+
rpcHost.boardcast("vite:internal:terminals:updated");
|
|
401
|
+
rpcHost.boardcast("vite:internal:docks:updated");
|
|
393
402
|
}, 10));
|
|
394
403
|
terminalsHost.events.on("terminal:session:stream-chunk", (data) => {
|
|
395
|
-
rpcHost.boardcast
|
|
404
|
+
rpcHost.boardcast("vite:internal:terminals:stream-chunk", data);
|
|
396
405
|
});
|
|
397
406
|
const plugins = viteConfig.plugins.filter((plugin) => "devtools" in plugin);
|
|
398
407
|
for (const plugin of plugins) {
|
|
@@ -429,7 +438,7 @@ function DevToolsInjection() {
|
|
|
429
438
|
|
|
430
439
|
//#endregion
|
|
431
440
|
//#region ../../node_modules/.pnpm/ufo@1.6.1/node_modules/ufo/dist/index.mjs
|
|
432
|
-
const r
|
|
441
|
+
const r = String.fromCharCode;
|
|
433
442
|
const PROTOCOL_STRICT_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/;
|
|
434
443
|
const PROTOCOL_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{2})?/;
|
|
435
444
|
const PROTOCOL_RELATIVE_REGEX = /^([/\\]\s*){2,}[^/\\]/;
|
|
@@ -454,8 +463,8 @@ function withoutTrailingSlash(input = "", respectQueryAndFragment) {
|
|
|
454
463
|
path = input.slice(0, fragmentIndex);
|
|
455
464
|
fragment = input.slice(fragmentIndex);
|
|
456
465
|
}
|
|
457
|
-
const [s0, ...s
|
|
458
|
-
return ((s0.endsWith("/") ? s0.slice(0, -1) : s0) || "/") + (s
|
|
466
|
+
const [s0, ...s] = path.split("?");
|
|
467
|
+
return ((s0.endsWith("/") ? s0.slice(0, -1) : s0) || "/") + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
|
|
459
468
|
}
|
|
460
469
|
function withTrailingSlash(input = "", respectQueryAndFragment) {
|
|
461
470
|
if (!respectQueryAndFragment) return input.endsWith("/") ? input : input + "/";
|
|
@@ -468,8 +477,8 @@ function withTrailingSlash(input = "", respectQueryAndFragment) {
|
|
|
468
477
|
fragment = input.slice(fragmentIndex);
|
|
469
478
|
if (!path) return fragment;
|
|
470
479
|
}
|
|
471
|
-
const [s0, ...s
|
|
472
|
-
return s0 + "/" + (s
|
|
480
|
+
const [s0, ...s] = path.split("?");
|
|
481
|
+
return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
|
|
473
482
|
}
|
|
474
483
|
function isNonEmptyURL(url) {
|
|
475
484
|
return url && url !== "/";
|
|
@@ -546,7 +555,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
|
546
555
|
return object;
|
|
547
556
|
}
|
|
548
557
|
function createDefu(merger) {
|
|
549
|
-
return (...arguments_) => arguments_.reduce((p
|
|
558
|
+
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
|
550
559
|
}
|
|
551
560
|
const defu = createDefu();
|
|
552
561
|
const defuFn = createDefu((object, key, currentValue) => {
|
|
@@ -628,7 +637,7 @@ function sendError(event, error, debug$1) {
|
|
|
628
637
|
stack: [],
|
|
629
638
|
data: h3Error.data
|
|
630
639
|
};
|
|
631
|
-
if (debug$1) responseBody.stack = (h3Error.stack || "").split("\n").map((l
|
|
640
|
+
if (debug$1) responseBody.stack = (h3Error.stack || "").split("\n").map((l) => l.trim());
|
|
632
641
|
if (event.handled) return;
|
|
633
642
|
setResponseStatus(event, Number.parseInt(h3Error.statusCode), h3Error.statusMessage);
|
|
634
643
|
event.node.res.setHeader("content-type", MIMES.json);
|
|
@@ -654,7 +663,7 @@ function sanitizeStatusCode(statusCode, defaultStatusCode = 200) {
|
|
|
654
663
|
return statusCode;
|
|
655
664
|
}
|
|
656
665
|
function splitCookiesString(cookiesString) {
|
|
657
|
-
if (Array.isArray(cookiesString)) return cookiesString.flatMap((c
|
|
666
|
+
if (Array.isArray(cookiesString)) return cookiesString.flatMap((c) => splitCookiesString(c));
|
|
658
667
|
if (typeof cookiesString !== "string") return [];
|
|
659
668
|
const cookiesStrings = [];
|
|
660
669
|
let pos = 0;
|
|
@@ -777,7 +786,6 @@ function sendWebResponse(event, response) {
|
|
|
777
786
|
}
|
|
778
787
|
return sendStream(event, response.body);
|
|
779
788
|
}
|
|
780
|
-
const getSessionPromise = Symbol("getSession");
|
|
781
789
|
var H3Event = class {
|
|
782
790
|
"__is_event__" = true;
|
|
783
791
|
node;
|
|
@@ -881,17 +889,17 @@ function defineLazyEventHandler(factory) {
|
|
|
881
889
|
let _resolved;
|
|
882
890
|
const resolveHandler = () => {
|
|
883
891
|
if (_resolved) return Promise.resolve(_resolved);
|
|
884
|
-
if (!_promise) _promise = Promise.resolve(factory()).then((r$
|
|
885
|
-
const handler2 = r$
|
|
892
|
+
if (!_promise) _promise = Promise.resolve(factory()).then((r$1) => {
|
|
893
|
+
const handler2 = r$1.default || r$1;
|
|
886
894
|
if (typeof handler2 !== "function") throw new TypeError("Invalid lazy handler result. It should be a function:", handler2);
|
|
887
|
-
_resolved = { handler: toEventHandler(r$
|
|
895
|
+
_resolved = { handler: toEventHandler(r$1.default || r$1) };
|
|
888
896
|
return _resolved;
|
|
889
897
|
});
|
|
890
898
|
return _promise;
|
|
891
899
|
};
|
|
892
900
|
const handler = eventHandler((event) => {
|
|
893
901
|
if (_resolved) return _resolved.handler(event);
|
|
894
|
-
return resolveHandler().then((r$
|
|
902
|
+
return resolveHandler().then((r$1) => r$1.handler(event));
|
|
895
903
|
});
|
|
896
904
|
handler.__resolve__ = resolveHandler;
|
|
897
905
|
return handler;
|
|
@@ -918,8 +926,8 @@ function createApp(options = {}) {
|
|
|
918
926
|
return app;
|
|
919
927
|
}
|
|
920
928
|
function use(app, arg1, arg2, arg3) {
|
|
921
|
-
if (Array.isArray(arg1)) for (const i
|
|
922
|
-
else if (Array.isArray(arg2)) for (const i
|
|
929
|
+
if (Array.isArray(arg1)) for (const i of arg1) use(app, i, arg2, arg3);
|
|
930
|
+
else if (Array.isArray(arg2)) for (const i of arg2) use(app, arg1, i, arg3);
|
|
923
931
|
else if (typeof arg1 === "string") app.stack.push(normalizeLayer({
|
|
924
932
|
...arg3,
|
|
925
933
|
route: arg1,
|
|
@@ -1104,85 +1112,85 @@ function callNodeListener(handler, req, res) {
|
|
|
1104
1112
|
|
|
1105
1113
|
//#endregion
|
|
1106
1114
|
//#region ../../node_modules/.pnpm/ansis@4.2.0/node_modules/ansis/index.cjs
|
|
1107
|
-
var require_ansis = /* @__PURE__ */
|
|
1108
|
-
let e, t, r, { defineProperty: l, setPrototypeOf: n, create: o, keys: s } = Object, i = "", { round: c, max: a
|
|
1109
|
-
let t
|
|
1115
|
+
var require_ansis = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1116
|
+
let e, t, r, { defineProperty: l, setPrototypeOf: n, create: o, keys: s } = Object, i = "", { round: c, max: a } = Math, p = (e) => {
|
|
1117
|
+
let t = /([a-f\d]{3,6})/i.exec(e)?.[1], r$1 = t?.length, l = parseInt(6 ^ r$1 ? 3 ^ r$1 ? "0" : t[0] + t[0] + t[1] + t[1] + t[2] + t[2] : t, 16);
|
|
1110
1118
|
return [
|
|
1111
|
-
l
|
|
1112
|
-
l
|
|
1113
|
-
255 & l
|
|
1119
|
+
l >> 16 & 255,
|
|
1120
|
+
l >> 8 & 255,
|
|
1121
|
+
255 & l
|
|
1114
1122
|
];
|
|
1115
|
-
}, u = (e
|
|
1116
|
-
let t
|
|
1117
|
-
return 8 > e
|
|
1123
|
+
}, u = (e, t, r$1) => e ^ t || t ^ r$1 ? 16 + 36 * c(e / 51) + 6 * c(t / 51) + c(r$1 / 51) : 8 > e ? 16 : e > 248 ? 231 : c(24 * (e - 8) / 247) + 232, d = (e) => {
|
|
1124
|
+
let t, r$1, l, n, o;
|
|
1125
|
+
return 8 > e ? 30 + e : 16 > e ? e - 8 + 90 : (232 > e ? (o = (e -= 16) % 36, t = (e / 36 | 0) / 5, r$1 = (o / 6 | 0) / 5, l = o % 6 / 5) : t = r$1 = l = (10 * (e - 232) + 8) / 255, n = 2 * a(t, r$1, l), n ? 30 + (c(l) << 2 | c(r$1) << 1 | c(t)) + (2 ^ n ? 0 : 60) : 30);
|
|
1118
1126
|
}, f = (() => {
|
|
1119
|
-
let r$
|
|
1127
|
+
let r$1 = (e) => o.some(((t) => e.test(t))), l = globalThis, n = l.process ?? {}, o = n.argv ?? [], i = n.env ?? {}, c = -1;
|
|
1120
1128
|
try {
|
|
1121
|
-
e = "," + s(i
|
|
1122
|
-
} catch (e
|
|
1123
|
-
i
|
|
1129
|
+
e = "," + s(i).join(",");
|
|
1130
|
+
} catch (e) {
|
|
1131
|
+
i = {}, c = 0;
|
|
1124
1132
|
}
|
|
1125
|
-
let a$
|
|
1133
|
+
let a$1 = "FORCE_COLOR", p = {
|
|
1126
1134
|
false: 0,
|
|
1127
1135
|
0: 0,
|
|
1128
1136
|
1: 1,
|
|
1129
1137
|
2: 2,
|
|
1130
1138
|
3: 3
|
|
1131
|
-
}[i
|
|
1132
|
-
return u
|
|
1139
|
+
}[i[a$1]] ?? -1, u = a$1 in i && p || r$1(/^--color=?(true|always)?$/);
|
|
1140
|
+
return u && (c = p), ~c || (c = ((r$2, l$1, n$1) => (t = r$2.TERM, {
|
|
1133
1141
|
"24bit": 3,
|
|
1134
1142
|
truecolor: 3,
|
|
1135
1143
|
ansi256: 2,
|
|
1136
1144
|
ansi: 1
|
|
1137
|
-
}[r$
|
|
1145
|
+
}[r$2.COLORTERM] || (r$2.CI ? /,GITHUB/.test(e) ? 3 : 1 : l$1 && "dumb" !== t ? n$1 ? 3 : /-256/.test(t) ? 2 : 1 : 0)))(i, !!i.PM2_HOME || i.NEXT_RUNTIME?.includes("edge") || !!n.stdout?.isTTY, "win32" === n.platform)), !p || i.NO_COLOR || r$1(/^--(no-color|color=(false|never))$/) ? 0 : l.window?.chrome || u && !c ? 3 : c;
|
|
1138
1146
|
})(), g = {
|
|
1139
1147
|
open: i,
|
|
1140
1148
|
close: i
|
|
1141
|
-
}, h = 39, b = 49, O = {}, m = ({ p: e
|
|
1142
|
-
let o
|
|
1143
|
-
if (!e$
|
|
1144
|
-
if (t
|
|
1145
|
-
if ((e$
|
|
1149
|
+
}, h = 39, b = 49, O = {}, m = ({ p: e }, { open: t, close: l }) => {
|
|
1150
|
+
let o = (e$1, ...r$1) => {
|
|
1151
|
+
if (!e$1) {
|
|
1152
|
+
if (t && t === l) return t;
|
|
1153
|
+
if ((e$1 ?? i) === i) return i;
|
|
1146
1154
|
}
|
|
1147
|
-
let n
|
|
1148
|
-
if (s$
|
|
1149
|
-
let { open: e$
|
|
1150
|
-
if (r$
|
|
1151
|
-
s$
|
|
1155
|
+
let n, s$1 = e$1.raw ? String.raw({ raw: e$1 }, ...r$1) : i + e$1, c$1 = o.p, a$1 = c$1.o, p = c$1.c;
|
|
1156
|
+
if (s$1.includes("\x1B")) for (; c$1; c$1 = c$1.p) {
|
|
1157
|
+
let { open: e$2, close: t$1 } = c$1, r$2 = t$1.length, l$1 = i, o$1 = 0;
|
|
1158
|
+
if (r$2) for (; ~(n = s$1.indexOf(t$1, o$1)); o$1 = n + r$2) l$1 += s$1.slice(o$1, n) + e$2;
|
|
1159
|
+
s$1 = l$1 + s$1.slice(o$1);
|
|
1152
1160
|
}
|
|
1153
|
-
return a$
|
|
1154
|
-
}, s
|
|
1155
|
-
return e
|
|
1156
|
-
open: t
|
|
1157
|
-
close: l
|
|
1158
|
-
o: s
|
|
1159
|
-
c
|
|
1160
|
-
p: e
|
|
1161
|
-
}, o
|
|
1161
|
+
return a$1 + (s$1.includes("\n") ? s$1.replace(/(\r?\n)/g, p + "$1" + a$1) : s$1) + p;
|
|
1162
|
+
}, s = t, c = l;
|
|
1163
|
+
return e && (s = e.o + t, c = l + e.c), n(o, r), o.p = {
|
|
1164
|
+
open: t,
|
|
1165
|
+
close: l,
|
|
1166
|
+
o: s,
|
|
1167
|
+
c,
|
|
1168
|
+
p: e
|
|
1169
|
+
}, o.open = s, o.close = c, o;
|
|
1162
1170
|
};
|
|
1163
|
-
const w = new function e
|
|
1164
|
-
let s
|
|
1165
|
-
Ansis: e
|
|
1166
|
-
level: t
|
|
1167
|
-
isSupported: () => a$
|
|
1168
|
-
strip: (e$
|
|
1169
|
-
extend(e$
|
|
1170
|
-
for (let t$
|
|
1171
|
-
let r$
|
|
1172
|
-
"s" === l
|
|
1171
|
+
const w = new function e(t = f) {
|
|
1172
|
+
let s = {
|
|
1173
|
+
Ansis: e,
|
|
1174
|
+
level: t,
|
|
1175
|
+
isSupported: () => a$1,
|
|
1176
|
+
strip: (e$1) => e$1.replace(/[][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, i),
|
|
1177
|
+
extend(e$1) {
|
|
1178
|
+
for (let t$1 in e$1) {
|
|
1179
|
+
let r$1 = e$1[t$1], l = (typeof r$1)[0];
|
|
1180
|
+
"s" === l ? (c(t$1, T(...p(r$1))), c(_(t$1), v(...p(r$1)))) : c(t$1, r$1, "f" === l);
|
|
1173
1181
|
}
|
|
1174
|
-
return r = o({}, O), n(s
|
|
1182
|
+
return r = o({}, O), n(s, r), s;
|
|
1175
1183
|
}
|
|
1176
|
-
}, c
|
|
1177
|
-
O[e$
|
|
1178
|
-
let n
|
|
1179
|
-
return l(this, e$
|
|
1184
|
+
}, c = (e$1, t$1, r$1) => {
|
|
1185
|
+
O[e$1] = { get() {
|
|
1186
|
+
let n = r$1 ? (...e$2) => m(this, t$1(...e$2)) : m(this, t$1);
|
|
1187
|
+
return l(this, e$1, { value: n }), n;
|
|
1180
1188
|
} };
|
|
1181
|
-
}, a$
|
|
1182
|
-
open: `[${e$
|
|
1183
|
-
close: `[${t$
|
|
1184
|
-
} : g, y = (e$
|
|
1185
|
-
2 === t
|
|
1189
|
+
}, a$1 = t > 0, w = (e$1, t$1) => a$1 ? {
|
|
1190
|
+
open: `[${e$1}m`,
|
|
1191
|
+
close: `[${t$1}m`
|
|
1192
|
+
} : g, y = (e$1) => (t$1) => e$1(...p(t$1)), R = (e$1, t$1) => (r$1, l, n) => w(`${e$1}8;2;${r$1};${l};${n}`, t$1), $ = (e$1, t$1) => (r$1, l, n) => w(((e$2, t$2, r$2) => d(u(e$2, t$2, r$2)))(r$1, l, n) + e$1, t$1), x = (e$1) => (t$1, r$1, l) => e$1(u(t$1, r$1, l)), T = R(3, h), v = R(4, b), C = (e$1) => w("38;5;" + e$1, h), E = (e$1) => w("48;5;" + e$1, b);
|
|
1193
|
+
2 === t ? (T = x(C), v = x(E)) : 1 === t && (T = $(0, h), v = $(10, b), C = (e$1) => w(d(e$1), h), E = (e$1) => w(d(e$1) + 10, b));
|
|
1186
1194
|
let M, I = {
|
|
1187
1195
|
fg: C,
|
|
1188
1196
|
bg: E,
|
|
@@ -1191,21 +1199,21 @@ var require_ansis = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansis
|
|
|
1191
1199
|
hex: y(T),
|
|
1192
1200
|
bgHex: y(v),
|
|
1193
1201
|
visible: g,
|
|
1194
|
-
reset: w
|
|
1195
|
-
bold: w
|
|
1196
|
-
dim: w
|
|
1197
|
-
italic: w
|
|
1198
|
-
underline: w
|
|
1199
|
-
inverse: w
|
|
1200
|
-
hidden: w
|
|
1201
|
-
strikethrough: w
|
|
1202
|
-
}, _ = (e$
|
|
1203
|
-
return "black,red,green,yellow,blue,magenta,cyan,white,gray".split(",").map(((e$
|
|
1204
|
-
M = _(e$
|
|
1205
|
-
})), s
|
|
1202
|
+
reset: w(0, 0),
|
|
1203
|
+
bold: w(1, 22),
|
|
1204
|
+
dim: w(2, 22),
|
|
1205
|
+
italic: w(3, 23),
|
|
1206
|
+
underline: w(4, 24),
|
|
1207
|
+
inverse: w(7, 27),
|
|
1208
|
+
hidden: w(8, 28),
|
|
1209
|
+
strikethrough: w(9, 29)
|
|
1210
|
+
}, _ = (e$1) => "bg" + e$1[0].toUpperCase() + e$1.slice(1), k = "Bright";
|
|
1211
|
+
return "black,red,green,yellow,blue,magenta,cyan,white,gray".split(",").map(((e$1, t$1) => {
|
|
1212
|
+
M = _(e$1), 8 > t$1 ? (I[e$1 + k] = w(90 + t$1, h), I[M + k] = w(100 + t$1, b)) : t$1 = 60, I[e$1] = w(30 + t$1, h), I[M] = w(40 + t$1, b);
|
|
1213
|
+
})), s.extend(I);
|
|
1206
1214
|
}();
|
|
1207
1215
|
module.exports = w, w.default = w;
|
|
1208
|
-
})
|
|
1216
|
+
}));
|
|
1209
1217
|
|
|
1210
1218
|
//#endregion
|
|
1211
1219
|
//#region ../../node_modules/.pnpm/ansis@4.2.0/node_modules/ansis/index.mjs
|
|
@@ -1315,9 +1323,9 @@ function _log(verbose, message) {
|
|
|
1315
1323
|
}
|
|
1316
1324
|
function _generateRange(from, to) {
|
|
1317
1325
|
if (to < from) return [];
|
|
1318
|
-
const r$
|
|
1319
|
-
for (let index = from; index <= to; index++) r$
|
|
1320
|
-
return r$
|
|
1326
|
+
const r$1 = [];
|
|
1327
|
+
for (let index = from; index <= to; index++) r$1.push(index);
|
|
1328
|
+
return r$1;
|
|
1321
1329
|
}
|
|
1322
1330
|
function _tryPort(port, host) {
|
|
1323
1331
|
return new Promise((resolve) => {
|
|
@@ -1344,8 +1352,8 @@ function _getLocalHosts(additional) {
|
|
|
1344
1352
|
}
|
|
1345
1353
|
async function _findPort(ports, host) {
|
|
1346
1354
|
for (const port of ports) {
|
|
1347
|
-
const r$
|
|
1348
|
-
if (r$
|
|
1355
|
+
const r$1 = await _tryPort(port, host);
|
|
1356
|
+
if (r$1) return r$1;
|
|
1349
1357
|
}
|
|
1350
1358
|
}
|
|
1351
1359
|
function _fmtOnHost(hostname) {
|
|
@@ -1457,15 +1465,20 @@ async function createWsServer(options) {
|
|
|
1457
1465
|
console.log(ansis_default.red`${MARK_CHECK} Websocket client disconnected`);
|
|
1458
1466
|
}
|
|
1459
1467
|
});
|
|
1460
|
-
const
|
|
1468
|
+
const rpcGroup = createRpcServer(rpcHost.functions, {
|
|
1461
1469
|
preset,
|
|
1462
|
-
rpcOptions: {
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1470
|
+
rpcOptions: {
|
|
1471
|
+
onFunctionError(error, name) {
|
|
1472
|
+
console.error(ansis_default.red`⬢ RPC error on executing "${ansis_default.bold(name)}":`);
|
|
1473
|
+
console.error(error);
|
|
1474
|
+
},
|
|
1475
|
+
onGeneralError(error) {
|
|
1476
|
+
console.error(ansis_default.red`⬢ RPC error on executing rpc`);
|
|
1477
|
+
console.error(error);
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1467
1480
|
});
|
|
1468
|
-
rpcHost.
|
|
1481
|
+
rpcHost.rpcGroup = rpcGroup;
|
|
1469
1482
|
const getConnectionMeta = async () => {
|
|
1470
1483
|
return {
|
|
1471
1484
|
backend: "websocket",
|
|
@@ -1474,7 +1487,7 @@ async function createWsServer(options) {
|
|
|
1474
1487
|
};
|
|
1475
1488
|
return {
|
|
1476
1489
|
port,
|
|
1477
|
-
rpc,
|
|
1490
|
+
rpc: rpcGroup,
|
|
1478
1491
|
rpcHost,
|
|
1479
1492
|
getConnectionMeta
|
|
1480
1493
|
};
|
|
@@ -1549,7 +1562,7 @@ function DevToolsServer() {
|
|
|
1549
1562
|
async function DevTools(options = {}) {
|
|
1550
1563
|
const { builtinDevTools = true } = options;
|
|
1551
1564
|
const plugins = [DevToolsInjection(), DevToolsServer()];
|
|
1552
|
-
if (builtinDevTools) plugins.push(await import("@vitejs/devtools-vite").then((m
|
|
1565
|
+
if (builtinDevTools) plugins.push(await import("@vitejs/devtools-vite").then((m) => m.DevToolsViteUI()));
|
|
1553
1566
|
return plugins;
|
|
1554
1567
|
}
|
|
1555
1568
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-alpha.
|
|
4
|
+
"version": "0.0.0-alpha.20",
|
|
5
5
|
"description": "Vite DevTools",
|
|
6
6
|
"author": "VoidZero Inc.",
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"vite": "*"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"birpc": "^
|
|
45
|
-
"birpc-x": "0.0.
|
|
44
|
+
"birpc": "^4.0.0",
|
|
45
|
+
"birpc-x": "0.0.6",
|
|
46
46
|
"cac": "^6.7.14",
|
|
47
47
|
"debug": "^4.4.3",
|
|
48
48
|
"launch-editor": "^2.12.0",
|
|
@@ -53,22 +53,23 @@
|
|
|
53
53
|
"sirv": "^3.0.2",
|
|
54
54
|
"tinyexec": "^1.0.2",
|
|
55
55
|
"ws": "^8.18.3",
|
|
56
|
-
"@vitejs/devtools-
|
|
57
|
-
"@vitejs/devtools-
|
|
58
|
-
"@vitejs/devtools-vite": "0.0.0-alpha.
|
|
56
|
+
"@vitejs/devtools-kit": "0.0.0-alpha.20",
|
|
57
|
+
"@vitejs/devtools-rpc": "0.0.0-alpha.20",
|
|
58
|
+
"@vitejs/devtools-vite": "0.0.0-alpha.20"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@
|
|
61
|
+
"@clack/prompts": "^0.11.0",
|
|
62
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
62
63
|
"@xterm/addon-fit": "^0.10.0",
|
|
63
64
|
"@xterm/xterm": "^5.5.0",
|
|
64
|
-
"tsdown": "^0.
|
|
65
|
+
"tsdown": "^0.17.4",
|
|
65
66
|
"typescript": "^5.9.3",
|
|
66
|
-
"unplugin-vue": "^7.0
|
|
67
|
-
"vite": "
|
|
67
|
+
"unplugin-vue": "^7.1.0",
|
|
68
|
+
"vite": "^8.0.0-beta.2",
|
|
68
69
|
"vue": "^3.5.25",
|
|
69
|
-
"vue-tsc": "^3.1.
|
|
70
|
-
"@vitejs/devtools
|
|
71
|
-
"@vitejs/devtools": "0.0.0-alpha.
|
|
70
|
+
"vue-tsc": "^3.1.8",
|
|
71
|
+
"@vitejs/devtools": "0.0.0-alpha.20",
|
|
72
|
+
"@vitejs/devtools-vite": "0.0.0-alpha.20"
|
|
72
73
|
},
|
|
73
74
|
"scripts": {
|
|
74
75
|
"build": "pnpm build:js && pnpm build:standalone",
|