@qwik.dev/devtools 0.2.1 → 0.2.2
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/plugin/index.d.ts +4 -1
- package/dist/plugin/index.js +1914 -463
- package/dist/ui/_virtual/browser.qwik.mjs +8 -0
- package/dist/ui/_virtual/browser.qwik2.mjs +4 -0
- package/dist/ui/components/DevtoolsButton/DevtoolsButton.qwik.mjs +1 -1
- package/dist/ui/components/DevtoolsPanel/DevtoolsPanel.qwik.mjs +1 -1
- package/dist/ui/components/Tab/Tab.qwik.mjs +1 -1
- package/dist/ui/components/TabContent/TabContent.qwik.mjs +1 -1
- package/dist/ui/components/ThemeToggle/QwikThemeToggle.qwik.mjs +1 -1
- package/dist/ui/components/Tree/Tree.qwik.mjs +1 -1
- package/dist/ui/devtools.qwik.mjs +31 -9
- package/dist/ui/features/Assets/Assets.qwik.mjs +3 -3
- package/dist/ui/features/CodeBreack/CodeBreack.qwik.mjs +4 -4
- package/dist/ui/features/CodeBreack/HtmlParser.qwik.mjs +13 -20
- package/dist/ui/features/CodeBreack/StateParser.qwik.mjs +13 -20
- package/dist/ui/features/Overview/Overview.qwik.mjs +17 -17
- package/dist/ui/features/Packages/Packages.qwik.mjs +4 -4
- package/dist/ui/features/Packages/components/DependencyCard/DependencyCard.qwik.mjs +9 -9
- package/dist/ui/features/Packages/components/PackageIcon/PackageIcon.qwik.mjs +1 -1
- package/dist/ui/features/Performance/Performance.qwik.mjs +307 -0
- package/dist/ui/features/Performance/computePerfViewModel.qwik.mjs +101 -0
- package/dist/ui/features/Performance/transformPerformanceData.qwik.mjs +34 -0
- package/dist/ui/features/RenderTree/RenderTree.qwik.mjs +38 -45
- package/dist/ui/features/RenderTree/TreeBuilder.qwik.mjs +181 -0
- package/dist/ui/features/RenderTree/data.qwik.mjs +30 -16
- package/dist/ui/features/RenderTree/formatTreeData.qwik.mjs +205 -230
- package/dist/ui/features/RenderTree/types.qwik.mjs +50 -0
- package/dist/ui/features/Routes/Routes.qwik.mjs +3 -3
- package/dist/ui/features/inspect/Inspect.qwik.mjs +1 -1
- package/dist/ui/global.css.qwik.mjs +1 -1
- package/dist/ui/lib-types/kit/src/globals.d.ts +56 -5
- package/dist/ui/lib-types/kit/src/index.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Performance/Performance.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Performance/computePerfViewModel.d.ts +33 -0
- package/dist/ui/lib-types/ui/src/features/Performance/computePerfViewModel.test.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Performance/transformPerformanceData.d.ts +22 -0
- package/dist/ui/lib-types/ui/src/features/Performance/transformPerformanceData.test.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/TreeBuilder.d.ts +60 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/data.d.ts +34 -8
- package/dist/ui/lib-types/ui/src/features/RenderTree/formatTreeData.d.ts +79 -148
- package/dist/ui/lib-types/ui/src/features/RenderTree/index.d.ts +6 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/types.d.ts +116 -0
- package/dist/ui/lib-types/ui/src/types/state.d.ts +1 -1
- package/dist/ui/lib-types/ui/src/utils/shiki.d.ts +2 -0
- package/dist/ui/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@7.1.3_@types_node@20.14.11_jiti@2.6._02d306fcbd9f637dd624291702bff9c0/node_modules/@qwikest/icons/lib/hi.qwik.qwik.mjs +19 -0
- package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/browser.qwik.mjs +177 -0
- package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/common.qwik.mjs +182 -0
- package/dist/ui/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.qwik.mjs +120 -0
- package/dist/ui/packages/kit/src/constants.qwik.mjs +0 -2
- package/dist/ui/packages/kit/src/context.qwik.mjs +5 -4
- package/dist/ui/utils/shiki.qwik.mjs +23 -0
- package/package.json +3 -3
- package/dist/ui/features/RenderTree/transfromqseq.qwik.mjs +0 -91
- package/dist/ui/lib-types/ui/src/features/RenderTree/transfromqseq.d.ts +0 -7
package/dist/plugin/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "module";
|
|
2
|
+
import VueInspector from "vite-plugin-inspect";
|
|
2
3
|
import fsp, { lstat, readFile, readdir, stat } from "node:fs/promises";
|
|
3
4
|
import path from "path";
|
|
4
5
|
import { join, relative, resolve } from "node:path/posix";
|
|
@@ -7,7 +8,6 @@ import { homedir } from "node:os";
|
|
|
7
8
|
import { createHash } from "node:crypto";
|
|
8
9
|
import { execSync } from "child_process";
|
|
9
10
|
import { parseSync } from "oxc-parser";
|
|
10
|
-
import VueInspector from "vite-plugin-inspect";
|
|
11
11
|
|
|
12
12
|
//#region rolldown:runtime
|
|
13
13
|
var __create = Object.create;
|
|
@@ -95,9 +95,9 @@ var require_fs$3 = __commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.2/node_m
|
|
|
95
95
|
var require_path = __commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.2/node_modules/fast-glob/out/utils/path.js"(exports) {
|
|
96
96
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
97
97
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
98
|
-
const os$
|
|
98
|
+
const os$2 = __require("os");
|
|
99
99
|
const path$11 = __require("path");
|
|
100
|
-
const IS_WINDOWS_PLATFORM = os$
|
|
100
|
+
const IS_WINDOWS_PLATFORM = os$2.platform() === "win32";
|
|
101
101
|
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
102
102
|
/**
|
|
103
103
|
* All non-escaped special characters.
|
|
@@ -629,7 +629,7 @@ var require_to_regex_range = __commonJS({ "../../node_modules/.pnpm/to-regex-ran
|
|
|
629
629
|
//#endregion
|
|
630
630
|
//#region ../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js
|
|
631
631
|
var require_fill_range = __commonJS({ "../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js"(exports, module) {
|
|
632
|
-
const util$
|
|
632
|
+
const util$2 = __require("util");
|
|
633
633
|
const toRegexRange = require_to_regex_range();
|
|
634
634
|
const isObject$1 = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
635
635
|
const transform = (toNumber) => {
|
|
@@ -702,7 +702,7 @@ var require_fill_range = __commonJS({ "../../node_modules/.pnpm/fill-range@7.1.1
|
|
|
702
702
|
return toRegexRange(start, end, options);
|
|
703
703
|
};
|
|
704
704
|
const rangeError = (...args) => {
|
|
705
|
-
return new RangeError("Invalid range arguments: " + util$
|
|
705
|
+
return new RangeError("Invalid range arguments: " + util$2.inspect(...args));
|
|
706
706
|
};
|
|
707
707
|
const invalidRange = (start, end, options) => {
|
|
708
708
|
if (options.strictRanges === true) throw rangeError([start, end]);
|
|
@@ -969,7 +969,7 @@ var require_parse$1 = __commonJS({ "../../node_modules/.pnpm/braces@3.0.3/node_m
|
|
|
969
969
|
/**
|
|
970
970
|
* parse
|
|
971
971
|
*/
|
|
972
|
-
const parse$
|
|
972
|
+
const parse$5 = (input, options = {}) => {
|
|
973
973
|
if (typeof input !== "string") throw new TypeError("Expected a string");
|
|
974
974
|
const opts = options || {};
|
|
975
975
|
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH$1, opts.maxLength) : MAX_LENGTH$1;
|
|
@@ -1245,7 +1245,7 @@ var require_parse$1 = __commonJS({ "../../node_modules/.pnpm/braces@3.0.3/node_m
|
|
|
1245
1245
|
push({ type: "eos" });
|
|
1246
1246
|
return ast;
|
|
1247
1247
|
};
|
|
1248
|
-
module.exports = parse$
|
|
1248
|
+
module.exports = parse$5;
|
|
1249
1249
|
} });
|
|
1250
1250
|
|
|
1251
1251
|
//#endregion
|
|
@@ -1254,7 +1254,7 @@ var require_braces = __commonJS({ "../../node_modules/.pnpm/braces@3.0.3/node_mo
|
|
|
1254
1254
|
const stringify$1 = require_stringify();
|
|
1255
1255
|
const compile = require_compile();
|
|
1256
1256
|
const expand$1 = require_expand();
|
|
1257
|
-
const parse$
|
|
1257
|
+
const parse$4 = require_parse$1();
|
|
1258
1258
|
/**
|
|
1259
1259
|
* Expand the given pattern or create a regex-compatible string.
|
|
1260
1260
|
*
|
|
@@ -1292,7 +1292,7 @@ var require_braces = __commonJS({ "../../node_modules/.pnpm/braces@3.0.3/node_mo
|
|
|
1292
1292
|
* @return {Object} Returns an AST
|
|
1293
1293
|
* @api public
|
|
1294
1294
|
*/
|
|
1295
|
-
braces$1.parse = (input, options = {}) => parse$
|
|
1295
|
+
braces$1.parse = (input, options = {}) => parse$4(input, options);
|
|
1296
1296
|
/**
|
|
1297
1297
|
* Creates a braces string from an AST, or an AST node.
|
|
1298
1298
|
*
|
|
@@ -1918,7 +1918,7 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_
|
|
|
1918
1918
|
* @param {Object} options
|
|
1919
1919
|
* @return {Object}
|
|
1920
1920
|
*/
|
|
1921
|
-
const parse$
|
|
1921
|
+
const parse$3 = (input, options) => {
|
|
1922
1922
|
if (typeof input !== "string") throw new TypeError("Expected a string");
|
|
1923
1923
|
input = REPLACEMENTS[input] || input;
|
|
1924
1924
|
const opts = { ...options };
|
|
@@ -2065,7 +2065,7 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_
|
|
|
2065
2065
|
if (token.inner && token.inner.length > 1 && token.inner.includes("/")) extglobStar = globstar(opts);
|
|
2066
2066
|
if (extglobStar !== star$2 || eos() || /^\)+$/.test(remaining())) output = token.close = `)$))${extglobStar}`;
|
|
2067
2067
|
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
2068
|
-
const expression = parse$
|
|
2068
|
+
const expression = parse$3(rest, {
|
|
2069
2069
|
...options,
|
|
2070
2070
|
fastpaths: false
|
|
2071
2071
|
}).output;
|
|
@@ -2086,10 +2086,10 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_
|
|
|
2086
2086
|
*/
|
|
2087
2087
|
if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
2088
2088
|
let backslashes = false;
|
|
2089
|
-
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars$1, first, rest, index) => {
|
|
2089
|
+
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m$1, esc, chars$1, first, rest, index) => {
|
|
2090
2090
|
if (first === "\\") {
|
|
2091
2091
|
backslashes = true;
|
|
2092
|
-
return m;
|
|
2092
|
+
return m$1;
|
|
2093
2093
|
}
|
|
2094
2094
|
if (first === "?") {
|
|
2095
2095
|
if (esc) return esc + first + (rest ? QMARK$1.repeat(rest.length) : "");
|
|
@@ -2101,11 +2101,11 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_
|
|
|
2101
2101
|
if (esc) return esc + first + (rest ? star$2 : "");
|
|
2102
2102
|
return star$2;
|
|
2103
2103
|
}
|
|
2104
|
-
return esc ? m : `\\${m}`;
|
|
2104
|
+
return esc ? m$1 : `\\${m$1}`;
|
|
2105
2105
|
});
|
|
2106
2106
|
if (backslashes === true) if (opts.unescape === true) output = output.replace(/\\/g, "");
|
|
2107
|
-
else output = output.replace(/\\+/g, (m) => {
|
|
2108
|
-
return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
|
|
2107
|
+
else output = output.replace(/\\+/g, (m$1) => {
|
|
2108
|
+
return m$1.length % 2 === 0 ? "\\\\" : m$1 ? "\\" : "";
|
|
2109
2109
|
});
|
|
2110
2110
|
if (output === input && opts.contains === true) {
|
|
2111
2111
|
state.output = input;
|
|
@@ -2323,7 +2323,7 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_
|
|
|
2323
2323
|
brace.value = brace.output = "\\{";
|
|
2324
2324
|
value = output = "\\}";
|
|
2325
2325
|
state.output = out;
|
|
2326
|
-
for (const t of toks) state.output += t.output || t.value;
|
|
2326
|
+
for (const t$1 of toks) state.output += t$1.output || t$1.value;
|
|
2327
2327
|
}
|
|
2328
2328
|
push({
|
|
2329
2329
|
type: "brace",
|
|
@@ -2703,7 +2703,7 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_
|
|
|
2703
2703
|
* This can significantly speed up processing and has very little downside
|
|
2704
2704
|
* impact when none of the fast paths match.
|
|
2705
2705
|
*/
|
|
2706
|
-
parse$
|
|
2706
|
+
parse$3.fastpaths = (input, options) => {
|
|
2707
2707
|
const opts = { ...options };
|
|
2708
2708
|
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
2709
2709
|
const len = input.length;
|
|
@@ -2748,7 +2748,7 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_
|
|
|
2748
2748
|
if (source && opts.strictSlashes !== true) source += `${SLASH_LITERAL$1}?`;
|
|
2749
2749
|
return source;
|
|
2750
2750
|
};
|
|
2751
|
-
module.exports = parse$
|
|
2751
|
+
module.exports = parse$3;
|
|
2752
2752
|
} });
|
|
2753
2753
|
|
|
2754
2754
|
//#endregion
|
|
@@ -2756,7 +2756,7 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_
|
|
|
2756
2756
|
var require_picomatch$1 = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
2757
2757
|
const path$8 = __require("path");
|
|
2758
2758
|
const scan = require_scan();
|
|
2759
|
-
const parse$
|
|
2759
|
+
const parse$2 = require_parse();
|
|
2760
2760
|
const utils$11 = require_utils$2();
|
|
2761
2761
|
const constants = require_constants$1();
|
|
2762
2762
|
const isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
|
|
@@ -2928,7 +2928,7 @@ var require_picomatch$1 = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1
|
|
|
2928
2928
|
*/
|
|
2929
2929
|
picomatch$1.parse = (pattern$1, options) => {
|
|
2930
2930
|
if (Array.isArray(pattern$1)) return pattern$1.map((p$1) => picomatch$1.parse(p$1, options));
|
|
2931
|
-
return parse$
|
|
2931
|
+
return parse$2(pattern$1, {
|
|
2932
2932
|
...options,
|
|
2933
2933
|
fastpaths: false
|
|
2934
2934
|
});
|
|
@@ -3006,8 +3006,8 @@ var require_picomatch$1 = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1
|
|
|
3006
3006
|
negated: false,
|
|
3007
3007
|
fastpaths: true
|
|
3008
3008
|
};
|
|
3009
|
-
if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) parsed.output = parse$
|
|
3010
|
-
if (!parsed.output) parsed = parse$
|
|
3009
|
+
if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) parsed.output = parse$2.fastpaths(input, options);
|
|
3010
|
+
if (!parsed.output) parsed = parse$2(input, options);
|
|
3011
3011
|
return picomatch$1.compileRe(parsed, options, returnOutput, returnState);
|
|
3012
3012
|
};
|
|
3013
3013
|
/**
|
|
@@ -3055,7 +3055,7 @@ var require_picomatch = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/n
|
|
|
3055
3055
|
//#endregion
|
|
3056
3056
|
//#region ../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js
|
|
3057
3057
|
var require_micromatch = __commonJS({ "../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js"(exports, module) {
|
|
3058
|
-
const util = __require("util");
|
|
3058
|
+
const util$1 = __require("util");
|
|
3059
3059
|
const braces = require_braces();
|
|
3060
3060
|
const picomatch = require_picomatch();
|
|
3061
3061
|
const utils$10 = require_utils$2();
|
|
@@ -3213,7 +3213,7 @@ var require_micromatch = __commonJS({ "../../node_modules/.pnpm/micromatch@4.0.8
|
|
|
3213
3213
|
* @api public
|
|
3214
3214
|
*/
|
|
3215
3215
|
micromatch$1.contains = (str, pattern$1, options) => {
|
|
3216
|
-
if (typeof str !== "string") throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
3216
|
+
if (typeof str !== "string") throw new TypeError(`Expected a string: "${util$1.inspect(str)}"`);
|
|
3217
3217
|
if (Array.isArray(pattern$1)) return pattern$1.some((p$1) => micromatch$1.contains(str, p$1, options));
|
|
3218
3218
|
if (typeof pattern$1 === "string") {
|
|
3219
3219
|
if (isEmptyString(str) || isEmptyString(pattern$1)) return false;
|
|
@@ -3334,7 +3334,7 @@ var require_micromatch = __commonJS({ "../../node_modules/.pnpm/micromatch@4.0.8
|
|
|
3334
3334
|
* @api public
|
|
3335
3335
|
*/
|
|
3336
3336
|
micromatch$1.all = (str, patterns, options) => {
|
|
3337
|
-
if (typeof str !== "string") throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
3337
|
+
if (typeof str !== "string") throw new TypeError(`Expected a string: "${util$1.inspect(str)}"`);
|
|
3338
3338
|
return [].concat(patterns).every((p$1) => picomatch(p$1, options)(str));
|
|
3339
3339
|
};
|
|
3340
3340
|
/**
|
|
@@ -4109,7 +4109,7 @@ var require_utils = __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.scandir@2
|
|
|
4109
4109
|
|
|
4110
4110
|
//#endregion
|
|
4111
4111
|
//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js
|
|
4112
|
-
var require_common$
|
|
4112
|
+
var require_common$2 = __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports) {
|
|
4113
4113
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4114
4114
|
exports.joinPathSegments = void 0;
|
|
4115
4115
|
function joinPathSegments$1(a, b, separator) {
|
|
@@ -4131,7 +4131,7 @@ var require_async$4 = __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.scandir
|
|
|
4131
4131
|
const rpl = require_run_parallel();
|
|
4132
4132
|
const constants_1$1 = require_constants();
|
|
4133
4133
|
const utils$8 = require_utils();
|
|
4134
|
-
const common$4 = require_common$
|
|
4134
|
+
const common$4 = require_common$2();
|
|
4135
4135
|
function read$1(directory, settings, callback) {
|
|
4136
4136
|
if (!settings.stats && constants_1$1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
4137
4137
|
readdirWithFileTypes$1(directory, settings, callback);
|
|
@@ -4236,7 +4236,7 @@ var require_sync$4 = __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.scandir@
|
|
|
4236
4236
|
const fsStat$4 = require_out$3();
|
|
4237
4237
|
const constants_1 = require_constants();
|
|
4238
4238
|
const utils$7 = require_utils();
|
|
4239
|
-
const common$3 = require_common$
|
|
4239
|
+
const common$3 = require_common$2();
|
|
4240
4240
|
function read(directory, settings) {
|
|
4241
4241
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) return readdirWithFileTypes(directory, settings);
|
|
4242
4242
|
return readdir$1(directory, settings);
|
|
@@ -4619,7 +4619,7 @@ var require_queue = __commonJS({ "../../node_modules/.pnpm/fastq@1.17.1/node_mod
|
|
|
4619
4619
|
|
|
4620
4620
|
//#endregion
|
|
4621
4621
|
//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js
|
|
4622
|
-
var require_common = __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js"(exports) {
|
|
4622
|
+
var require_common$1 = __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js"(exports) {
|
|
4623
4623
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4624
4624
|
exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
|
|
4625
4625
|
function isFatalError(settings, error) {
|
|
@@ -4650,7 +4650,7 @@ var require_common = __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.walk@1.2
|
|
|
4650
4650
|
//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js
|
|
4651
4651
|
var require_reader$1 = __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports) {
|
|
4652
4652
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4653
|
-
const common$2 = require_common();
|
|
4653
|
+
const common$2 = require_common$1();
|
|
4654
4654
|
var Reader$1 = class {
|
|
4655
4655
|
constructor(_root, _settings) {
|
|
4656
4656
|
this._root = _root;
|
|
@@ -4668,7 +4668,7 @@ var require_async$3 = __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.walk@1.
|
|
|
4668
4668
|
const events_1 = __require("events");
|
|
4669
4669
|
const fsScandir$2 = require_out$2();
|
|
4670
4670
|
const fastq = require_queue();
|
|
4671
|
-
const common$1 = require_common();
|
|
4671
|
+
const common$1 = require_common$1();
|
|
4672
4672
|
const reader_1$4 = require_reader$1();
|
|
4673
4673
|
var AsyncReader = class extends reader_1$4.default {
|
|
4674
4674
|
constructor(_root, _settings) {
|
|
@@ -4822,7 +4822,7 @@ var require_stream$2 = __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.walk@1
|
|
|
4822
4822
|
var require_sync$3 = __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports) {
|
|
4823
4823
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4824
4824
|
const fsScandir$1 = require_out$2();
|
|
4825
|
-
const common = require_common();
|
|
4825
|
+
const common = require_common$1();
|
|
4826
4826
|
const reader_1$3 = require_reader$1();
|
|
4827
4827
|
var SyncReader = class extends reader_1$3.default {
|
|
4828
4828
|
constructor() {
|
|
@@ -5486,12 +5486,12 @@ var require_settings = __commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.2/no
|
|
|
5486
5486
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5487
5487
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
5488
5488
|
const fs = __require("fs");
|
|
5489
|
-
const os = __require("os");
|
|
5489
|
+
const os$1 = __require("os");
|
|
5490
5490
|
/**
|
|
5491
5491
|
* The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
|
|
5492
5492
|
* https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
|
|
5493
5493
|
*/
|
|
5494
|
-
const CPU_COUNT = Math.max(os.cpus().length, 1);
|
|
5494
|
+
const CPU_COUNT = Math.max(os$1.cpus().length, 1);
|
|
5495
5495
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
5496
5496
|
lstat: fs.lstat,
|
|
5497
5497
|
lstatSync: fs.lstatSync,
|
|
@@ -5714,8 +5714,8 @@ var require_balanced_match = __commonJS({ "../../node_modules/.pnpm/balanced-mat
|
|
|
5714
5714
|
};
|
|
5715
5715
|
}
|
|
5716
5716
|
function maybeMatch(reg, str) {
|
|
5717
|
-
var m = str.match(reg);
|
|
5718
|
-
return m ? m[0] : null;
|
|
5717
|
+
var m$1 = str.match(reg);
|
|
5718
|
+
return m$1 ? m$1[0] : null;
|
|
5719
5719
|
}
|
|
5720
5720
|
balanced$1.range = range;
|
|
5721
5721
|
function range(a, b, str) {
|
|
@@ -5770,11 +5770,11 @@ var require_brace_expansion = __commonJS({ "../../node_modules/.pnpm/brace-expan
|
|
|
5770
5770
|
function parseCommaParts(str) {
|
|
5771
5771
|
if (!str) return [""];
|
|
5772
5772
|
var parts = [];
|
|
5773
|
-
var m = balanced("{", "}", str);
|
|
5774
|
-
if (!m) return str.split(",");
|
|
5775
|
-
var pre = m.pre;
|
|
5776
|
-
var body = m.body;
|
|
5777
|
-
var post = m.post;
|
|
5773
|
+
var m$1 = balanced("{", "}", str);
|
|
5774
|
+
if (!m$1) return str.split(",");
|
|
5775
|
+
var pre = m$1.pre;
|
|
5776
|
+
var body = m$1.body;
|
|
5777
|
+
var post = m$1.post;
|
|
5778
5778
|
var p$1 = pre.split(",");
|
|
5779
5779
|
p$1[p$1.length - 1] += "{" + body + "}";
|
|
5780
5780
|
var postParts = parseCommaParts(post);
|
|
@@ -5796,60 +5796,60 @@ var require_brace_expansion = __commonJS({ "../../node_modules/.pnpm/brace-expan
|
|
|
5796
5796
|
function isPadded(el) {
|
|
5797
5797
|
return /^-?0\d/.test(el);
|
|
5798
5798
|
}
|
|
5799
|
-
function lte(i, y) {
|
|
5800
|
-
return i <= y;
|
|
5799
|
+
function lte(i, y$1) {
|
|
5800
|
+
return i <= y$1;
|
|
5801
5801
|
}
|
|
5802
|
-
function gte(i, y) {
|
|
5803
|
-
return i >= y;
|
|
5802
|
+
function gte(i, y$1) {
|
|
5803
|
+
return i >= y$1;
|
|
5804
5804
|
}
|
|
5805
5805
|
function expand(str, isTop) {
|
|
5806
5806
|
var expansions = [];
|
|
5807
|
-
var m = balanced("{", "}", str);
|
|
5808
|
-
if (!m) return [str];
|
|
5809
|
-
var pre = m.pre;
|
|
5810
|
-
var post = m.post.length ? expand(m.post, false) : [""];
|
|
5811
|
-
if (/\$$/.test(m.pre)) for (var k$1 = 0; k$1 < post.length; k$1++) {
|
|
5812
|
-
var expansion = pre + "{" + m.body + "}" + post[k$1];
|
|
5807
|
+
var m$1 = balanced("{", "}", str);
|
|
5808
|
+
if (!m$1) return [str];
|
|
5809
|
+
var pre = m$1.pre;
|
|
5810
|
+
var post = m$1.post.length ? expand(m$1.post, false) : [""];
|
|
5811
|
+
if (/\$$/.test(m$1.pre)) for (var k$1 = 0; k$1 < post.length; k$1++) {
|
|
5812
|
+
var expansion = pre + "{" + m$1.body + "}" + post[k$1];
|
|
5813
5813
|
expansions.push(expansion);
|
|
5814
5814
|
}
|
|
5815
5815
|
else {
|
|
5816
|
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
5817
|
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
5816
|
+
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m$1.body);
|
|
5817
|
+
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m$1.body);
|
|
5818
5818
|
var isSequence = isNumericSequence || isAlphaSequence;
|
|
5819
|
-
var isOptions = m.body.indexOf(",") >= 0;
|
|
5819
|
+
var isOptions = m$1.body.indexOf(",") >= 0;
|
|
5820
5820
|
if (!isSequence && !isOptions) {
|
|
5821
|
-
if (m.post.match(/,.*\}/)) {
|
|
5822
|
-
str = m.pre + "{" + m.body + escClose + m.post;
|
|
5821
|
+
if (m$1.post.match(/,.*\}/)) {
|
|
5822
|
+
str = m$1.pre + "{" + m$1.body + escClose + m$1.post;
|
|
5823
5823
|
return expand(str);
|
|
5824
5824
|
}
|
|
5825
5825
|
return [str];
|
|
5826
5826
|
}
|
|
5827
5827
|
var n;
|
|
5828
|
-
if (isSequence) n = m.body.split(/\.\./);
|
|
5828
|
+
if (isSequence) n = m$1.body.split(/\.\./);
|
|
5829
5829
|
else {
|
|
5830
|
-
n = parseCommaParts(m.body);
|
|
5830
|
+
n = parseCommaParts(m$1.body);
|
|
5831
5831
|
if (n.length === 1) {
|
|
5832
5832
|
n = expand(n[0], false).map(embrace);
|
|
5833
5833
|
if (n.length === 1) return post.map(function(p$1) {
|
|
5834
|
-
return m.pre + n[0] + p$1;
|
|
5834
|
+
return m$1.pre + n[0] + p$1;
|
|
5835
5835
|
});
|
|
5836
5836
|
}
|
|
5837
5837
|
}
|
|
5838
5838
|
var N;
|
|
5839
5839
|
if (isSequence) {
|
|
5840
5840
|
var x$1 = numeric(n[0]);
|
|
5841
|
-
var y = numeric(n[1]);
|
|
5841
|
+
var y$1 = numeric(n[1]);
|
|
5842
5842
|
var width = Math.max(n[0].length, n[1].length);
|
|
5843
5843
|
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
5844
5844
|
var test = lte;
|
|
5845
|
-
var reverse = y < x$1;
|
|
5845
|
+
var reverse = y$1 < x$1;
|
|
5846
5846
|
if (reverse) {
|
|
5847
5847
|
incr *= -1;
|
|
5848
5848
|
test = gte;
|
|
5849
5849
|
}
|
|
5850
5850
|
var pad$1 = n.some(isPadded);
|
|
5851
5851
|
N = [];
|
|
5852
|
-
for (var i = x$1; test(i, y); i += incr) {
|
|
5852
|
+
for (var i = x$1; test(i, y$1); i += incr) {
|
|
5853
5853
|
var c;
|
|
5854
5854
|
if (isAlphaSequence) {
|
|
5855
5855
|
c = String.fromCharCode(i);
|
|
@@ -5911,8 +5911,8 @@ const posixClasses = {
|
|
|
5911
5911
|
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
5912
5912
|
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
5913
5913
|
};
|
|
5914
|
-
const braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
5915
|
-
const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
5914
|
+
const braceEscape = (s$1) => s$1.replace(/[[\]\\-]/g, "\\$&");
|
|
5915
|
+
const regexpEscape = (s$1) => s$1.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
5916
5916
|
const rangesToString = (ranges) => ranges.join("");
|
|
5917
5917
|
const parseClass = (glob, position) => {
|
|
5918
5918
|
const pos = position;
|
|
@@ -6031,8 +6031,8 @@ const parseClass = (glob, position) => {
|
|
|
6031
6031
|
* Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
|
|
6032
6032
|
* or unescaped.
|
|
6033
6033
|
*/
|
|
6034
|
-
const unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
6035
|
-
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
6034
|
+
const unescape = (s$1, { windowsPathsNoEscape = false } = {}) => {
|
|
6035
|
+
return windowsPathsNoEscape ? s$1.replace(/\[([^\/\\])\]/g, "$1") : s$1.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
6036
6036
|
};
|
|
6037
6037
|
|
|
6038
6038
|
//#endregion
|
|
@@ -6050,7 +6050,7 @@ const startNoDot = "(?!\\.)";
|
|
|
6050
6050
|
const addPatternStart = new Set(["[", "."]);
|
|
6051
6051
|
const justDots = new Set(["..", "."]);
|
|
6052
6052
|
const reSpecials = new Set("().*{}+?[]^$\\!");
|
|
6053
|
-
const regExpEscape$1 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
6053
|
+
const regExpEscape$1 = (s$1) => s$1.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
6054
6054
|
const qmark$1 = "[^/]";
|
|
6055
6055
|
const star$1 = qmark$1 + "*?";
|
|
6056
6056
|
const starNoEmpty = qmark$1 + "+?";
|
|
@@ -6315,12 +6315,12 @@ var AST = class AST {
|
|
|
6315
6315
|
const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
6316
6316
|
let body = this.#partsToRegExp(dot);
|
|
6317
6317
|
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
6318
|
-
const s = this.toString();
|
|
6319
|
-
this.#parts = [s];
|
|
6318
|
+
const s$1 = this.toString();
|
|
6319
|
+
this.#parts = [s$1];
|
|
6320
6320
|
this.type = null;
|
|
6321
6321
|
this.#hasMagic = void 0;
|
|
6322
6322
|
return [
|
|
6323
|
-
s,
|
|
6323
|
+
s$1,
|
|
6324
6324
|
unescape(this.toString()),
|
|
6325
6325
|
false,
|
|
6326
6326
|
false
|
|
@@ -6411,8 +6411,8 @@ var AST = class AST {
|
|
|
6411
6411
|
* that exact character. In this mode, `\` is _not_ escaped, because it is
|
|
6412
6412
|
* not interpreted as a magic character, but instead as a path separator.
|
|
6413
6413
|
*/
|
|
6414
|
-
const escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
6415
|
-
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
6414
|
+
const escape = (s$1, { windowsPathsNoEscape = false } = {}) => {
|
|
6415
|
+
return windowsPathsNoEscape ? s$1.replace(/[?*()[\]]/g, "[$&]") : s$1.replace(/[?*()[\]\\]/g, "\\$&");
|
|
6416
6416
|
};
|
|
6417
6417
|
|
|
6418
6418
|
//#endregion
|
|
@@ -6491,8 +6491,8 @@ const ext = (a, b = {}) => Object.assign({}, a, b);
|
|
|
6491
6491
|
const defaults = (def) => {
|
|
6492
6492
|
if (!def || typeof def !== "object" || !Object.keys(def).length) return minimatch;
|
|
6493
6493
|
const orig = minimatch;
|
|
6494
|
-
const m = (p$1, pattern$1, options = {}) => orig(p$1, pattern$1, ext(def, options));
|
|
6495
|
-
return Object.assign(m, {
|
|
6494
|
+
const m$1 = (p$1, pattern$1, options = {}) => orig(p$1, pattern$1, ext(def, options));
|
|
6495
|
+
return Object.assign(m$1, {
|
|
6496
6496
|
Minimatch: class Minimatch$1 extends orig.Minimatch {
|
|
6497
6497
|
constructor(pattern$1, options = {}) {
|
|
6498
6498
|
super(pattern$1, ext(def, options));
|
|
@@ -6511,8 +6511,8 @@ const defaults = (def) => {
|
|
|
6511
6511
|
return orig.AST.fromGlob(pattern$1, ext(def, options));
|
|
6512
6512
|
}
|
|
6513
6513
|
},
|
|
6514
|
-
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
6515
|
-
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
6514
|
+
unescape: (s$1, options = {}) => orig.unescape(s$1, ext(def, options)),
|
|
6515
|
+
escape: (s$1, options = {}) => orig.escape(s$1, ext(def, options)),
|
|
6516
6516
|
filter: (pattern$1, options = {}) => orig.filter(pattern$1, ext(def, options)),
|
|
6517
6517
|
defaults: (options) => orig.defaults(ext(def, options)),
|
|
6518
6518
|
makeRe: (pattern$1, options = {}) => orig.makeRe(pattern$1, ext(def, options)),
|
|
@@ -6539,7 +6539,7 @@ const match = (list, pattern$1, options = {}) => {
|
|
|
6539
6539
|
};
|
|
6540
6540
|
minimatch.match = match;
|
|
6541
6541
|
const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
6542
|
-
const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
6542
|
+
const regExpEscape = (s$1) => s$1.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
6543
6543
|
var Minimatch = class {
|
|
6544
6544
|
options;
|
|
6545
6545
|
set;
|
|
@@ -6602,20 +6602,20 @@ var Minimatch = class {
|
|
|
6602
6602
|
this.globSet = [...new Set(this.braceExpand())];
|
|
6603
6603
|
if (options.debug) this.debug = (...args) => console.error(...args);
|
|
6604
6604
|
this.debug(this.pattern, this.globSet);
|
|
6605
|
-
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
6605
|
+
const rawGlobParts = this.globSet.map((s$1) => this.slashSplit(s$1));
|
|
6606
6606
|
this.globParts = this.preprocess(rawGlobParts);
|
|
6607
6607
|
this.debug(this.pattern, this.globParts);
|
|
6608
|
-
let set = this.globParts.map((s, _, __) => {
|
|
6608
|
+
let set = this.globParts.map((s$1, _, __) => {
|
|
6609
6609
|
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
6610
|
-
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
6611
|
-
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
6612
|
-
if (isUNC) return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
|
|
6613
|
-
else if (isDrive) return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
6610
|
+
const isUNC = s$1[0] === "" && s$1[1] === "" && (s$1[2] === "?" || !globMagic.test(s$1[2])) && !globMagic.test(s$1[3]);
|
|
6611
|
+
const isDrive = /^[a-z]:/i.test(s$1[0]);
|
|
6612
|
+
if (isUNC) return [...s$1.slice(0, 4), ...s$1.slice(4).map((ss) => this.parse(ss))];
|
|
6613
|
+
else if (isDrive) return [s$1[0], ...s$1.slice(1).map((ss) => this.parse(ss))];
|
|
6614
6614
|
}
|
|
6615
|
-
return s.map((ss) => this.parse(ss));
|
|
6615
|
+
return s$1.map((ss) => this.parse(ss));
|
|
6616
6616
|
});
|
|
6617
6617
|
this.debug(this.pattern, set);
|
|
6618
|
-
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
6618
|
+
this.set = set.filter((s$1) => s$1.indexOf(false) === -1);
|
|
6619
6619
|
if (this.isWindows) for (let i = 0; i < this.set.length; i++) {
|
|
6620
6620
|
const p$1 = this.set[i];
|
|
6621
6621
|
if (p$1[0] === "" && p$1[1] === "" && this.globParts[i][2] === "?" && typeof p$1[3] === "string" && /^[a-z]:$/i.test(p$1[3])) p$1[2] = "?";
|
|
@@ -6893,13 +6893,13 @@ var Minimatch = class {
|
|
|
6893
6893
|
const options = this.options;
|
|
6894
6894
|
if (pattern$1 === "**") return GLOBSTAR;
|
|
6895
6895
|
if (pattern$1 === "") return "";
|
|
6896
|
-
let m;
|
|
6896
|
+
let m$1;
|
|
6897
6897
|
let fastTest = null;
|
|
6898
|
-
if (m = pattern$1.match(starRE)) fastTest = options.dot ? starTestDot : starTest;
|
|
6899
|
-
else if (m = pattern$1.match(starDotExtRE)) fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
|
|
6900
|
-
else if (m = pattern$1.match(qmarksRE)) fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
|
|
6901
|
-
else if (m = pattern$1.match(starDotStarRE)) fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
6902
|
-
else if (m = pattern$1.match(dotStarRE)) fastTest = dotStarTest;
|
|
6898
|
+
if (m$1 = pattern$1.match(starRE)) fastTest = options.dot ? starTestDot : starTest;
|
|
6899
|
+
else if (m$1 = pattern$1.match(starDotExtRE)) fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m$1[1]);
|
|
6900
|
+
else if (m$1 = pattern$1.match(qmarksRE)) fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m$1);
|
|
6901
|
+
else if (m$1 = pattern$1.match(starDotStarRE)) fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
6902
|
+
else if (m$1 = pattern$1.match(dotStarRE)) fastTest = dotStarTest;
|
|
6903
6903
|
const re$1 = AST.fromGlob(pattern$1, this.options).toMMPattern();
|
|
6904
6904
|
if (fastTest && typeof re$1 === "object") Reflect.defineProperty(re$1, "test", { value: fastTest });
|
|
6905
6905
|
return re$1;
|
|
@@ -7039,65 +7039,65 @@ var re = ((n) => (n.DIRECTORY = "directory", n.FILE = "file", n))(re || {}), ne
|
|
|
7039
7039
|
symbols: ie,
|
|
7040
7040
|
skipErrors: !0
|
|
7041
7041
|
};
|
|
7042
|
-
function w(r, t) {
|
|
7043
|
-
return resolve$1(t.homeShortcut ? r.replace(/^~($|\/|\\)/, homedir() + "$1") : r);
|
|
7042
|
+
function w$1(r, t$1) {
|
|
7043
|
+
return resolve$1(t$1.homeShortcut ? r.replace(/^~($|\/|\\)/, homedir() + "$1") : r);
|
|
7044
7044
|
}
|
|
7045
7045
|
function S(r) {
|
|
7046
|
-
return (Array.isArray(r) ? r : [r]).map((t) => t instanceof RegExp ? t : makeRe(t, { dot: !0 })).filter((t) => t instanceof RegExp);
|
|
7046
|
+
return (Array.isArray(r) ? r : [r]).map((t$1) => t$1 instanceof RegExp ? t$1 : makeRe(t$1, { dot: !0 })).filter((t$1) => t$1 instanceof RegExp);
|
|
7047
7047
|
}
|
|
7048
7048
|
function V(r) {
|
|
7049
|
-
let t = {};
|
|
7049
|
+
let t$1 = {};
|
|
7050
7050
|
if (r) {
|
|
7051
|
-
for (let n in p) t[n] = r[n] !== void 0 ? r[n] : p[n];
|
|
7052
|
-
t.depth < 0 && (t.depth = 0);
|
|
7053
|
-
} else t = p;
|
|
7054
|
-
return t;
|
|
7051
|
+
for (let n in p) t$1[n] = r[n] !== void 0 ? r[n] : p[n];
|
|
7052
|
+
t$1.depth < 0 && (t$1.depth = 0);
|
|
7053
|
+
} else t$1 = p;
|
|
7054
|
+
return t$1;
|
|
7055
7055
|
}
|
|
7056
7056
|
function C(r) {
|
|
7057
|
-
let t = [
|
|
7057
|
+
let t$1 = [
|
|
7058
7058
|
"B",
|
|
7059
7059
|
"KB",
|
|
7060
7060
|
"MB",
|
|
7061
7061
|
"GB",
|
|
7062
7062
|
"TB"
|
|
7063
7063
|
], n;
|
|
7064
|
-
for (n = 0; n < t.length && r > 1e3; n++) r /= 1e3;
|
|
7065
|
-
return Math.round(r * 100) / 100 + " " + t[n];
|
|
7064
|
+
for (n = 0; n < t$1.length && r > 1e3; n++) r /= 1e3;
|
|
7065
|
+
return Math.round(r * 100) / 100 + " " + t$1[n];
|
|
7066
7066
|
}
|
|
7067
|
-
function x(r, t) {
|
|
7068
|
-
return r.localeCompare(t);
|
|
7067
|
+
function x(r, t$1) {
|
|
7068
|
+
return r.localeCompare(t$1);
|
|
7069
7069
|
}
|
|
7070
|
-
function A(r, t) {
|
|
7071
|
-
return r.toLowerCase().localeCompare(t.toLowerCase());
|
|
7070
|
+
function A(r, t$1) {
|
|
7071
|
+
return r.toLowerCase().localeCompare(t$1.toLowerCase());
|
|
7072
7072
|
}
|
|
7073
|
-
function k(r, t) {
|
|
7074
|
-
if (!t) return r;
|
|
7075
|
-
if (t === !0) return r.sort(x);
|
|
7076
|
-
if (typeof t == "string") switch (t) {
|
|
7073
|
+
function k(r, t$1) {
|
|
7074
|
+
if (!t$1) return r;
|
|
7075
|
+
if (t$1 === !0) return r.sort(x);
|
|
7076
|
+
if (typeof t$1 == "string") switch (t$1) {
|
|
7077
7077
|
case "alpha": return r.sort(x);
|
|
7078
7078
|
case "antialpha": return r.sort(x).reverse();
|
|
7079
7079
|
case "alpha-insensitive": return r.sort(A);
|
|
7080
7080
|
case "antialpha-insensitive": return r.sort(A).reverse();
|
|
7081
7081
|
default: return r;
|
|
7082
7082
|
}
|
|
7083
|
-
else if (typeof t == "function") return r.sort(t);
|
|
7083
|
+
else if (typeof t$1 == "function") return r.sort(t$1);
|
|
7084
7084
|
}
|
|
7085
|
-
function z(r, t) {
|
|
7086
|
-
return x(r.name, t.name);
|
|
7085
|
+
function z(r, t$1) {
|
|
7086
|
+
return x(r.name, t$1.name);
|
|
7087
7087
|
}
|
|
7088
|
-
function Y(r, t) {
|
|
7089
|
-
return A(r.name, t.name);
|
|
7088
|
+
function Y(r, t$1) {
|
|
7089
|
+
return A(r.name, t$1.name);
|
|
7090
7090
|
}
|
|
7091
|
-
function le(r, t) {
|
|
7092
|
-
return r.type === "directory" && t.type === "file" ? -1 : r.type === "file" && t.type === "directory" ? 1 : 0;
|
|
7091
|
+
function le(r, t$1) {
|
|
7092
|
+
return r.type === "directory" && t$1.type === "file" ? -1 : r.type === "file" && t$1.type === "directory" ? 1 : 0;
|
|
7093
7093
|
}
|
|
7094
|
-
function ae(r, t) {
|
|
7095
|
-
return r.type === "file" && t.type === "directory" ? -1 : r.type === "directory" && t.type === "file" ? 1 : 0;
|
|
7094
|
+
function ae(r, t$1) {
|
|
7095
|
+
return r.type === "file" && t$1.type === "directory" ? -1 : r.type === "directory" && t$1.type === "file" ? 1 : 0;
|
|
7096
7096
|
}
|
|
7097
|
-
function $(r, t) {
|
|
7098
|
-
if (!t) return r;
|
|
7099
|
-
if (t === !0) return r.sort(z);
|
|
7100
|
-
if (typeof t == "string") switch (t) {
|
|
7097
|
+
function $(r, t$1) {
|
|
7098
|
+
if (!t$1) return r;
|
|
7099
|
+
if (t$1 === !0) return r.sort(z);
|
|
7100
|
+
if (typeof t$1 == "string") switch (t$1) {
|
|
7101
7101
|
case "alpha": return r.sort(z);
|
|
7102
7102
|
case "antialpha": return r.sort(z).reverse();
|
|
7103
7103
|
case "alpha-insensitive": return r.sort(Y);
|
|
@@ -7106,95 +7106,95 @@ function $(r, t) {
|
|
|
7106
7106
|
case "files-first": return r.sort(ae);
|
|
7107
7107
|
default: return r;
|
|
7108
7108
|
}
|
|
7109
|
-
else if (typeof t == "function") return r.sort(t);
|
|
7109
|
+
else if (typeof t$1 == "function") return r.sort(t$1);
|
|
7110
7110
|
}
|
|
7111
|
-
async function G(r, t, n, e, l, o) {
|
|
7111
|
+
async function G(r, t$1, n, e, l, o) {
|
|
7112
7112
|
if (e.depth !== void 0 && n > e.depth) return null;
|
|
7113
|
-
let a = r === t ? "." : relative$1(r, t);
|
|
7114
|
-
if (e.exclude && r !== t && S(e.exclude).some((b) => b.test(`/${a}`))) return null;
|
|
7115
|
-
let s = basename(t), h;
|
|
7113
|
+
let a = r === t$1 ? "." : relative$1(r, t$1);
|
|
7114
|
+
if (e.exclude && r !== t$1 && S(e.exclude).some((b) => b.test(`/${a}`))) return null;
|
|
7115
|
+
let s$1 = basename(t$1), h$1;
|
|
7116
7116
|
try {
|
|
7117
|
-
h = await stat(t);
|
|
7117
|
+
h$1 = await stat(t$1);
|
|
7118
7118
|
} catch (c) {
|
|
7119
7119
|
if (e.skipErrors) return null;
|
|
7120
7120
|
throw c;
|
|
7121
7121
|
}
|
|
7122
7122
|
let i;
|
|
7123
7123
|
try {
|
|
7124
|
-
i = await lstat(t);
|
|
7124
|
+
i = await lstat(t$1);
|
|
7125
7125
|
} catch (c) {
|
|
7126
7126
|
if (e.skipErrors) return null;
|
|
7127
7127
|
throw c;
|
|
7128
7128
|
}
|
|
7129
|
-
let m = i.isSymbolicLink(), g = h.isFile() ? "file" : "directory";
|
|
7130
|
-
if (!e.showHidden && s.charAt(0) === "." || !e.symbolicLinks && m) return null;
|
|
7129
|
+
let m$1 = i.isSymbolicLink(), g = h$1.isFile() ? "file" : "directory";
|
|
7130
|
+
if (!e.showHidden && s$1.charAt(0) === "." || !e.symbolicLinks && m$1) return null;
|
|
7131
7131
|
let E;
|
|
7132
7132
|
if (e.hash) {
|
|
7133
7133
|
let c = e.hashAlgorithm;
|
|
7134
|
-
E = createHash(c), E.update(s);
|
|
7134
|
+
E = createHash(c), E.update(s$1);
|
|
7135
7135
|
}
|
|
7136
7136
|
let u = {
|
|
7137
|
-
name: s,
|
|
7138
|
-
path: e.normalize ? t.replace(/\\/g, "/") : t,
|
|
7137
|
+
name: s$1,
|
|
7138
|
+
path: e.normalize ? t$1.replace(/\\/g, "/") : t$1,
|
|
7139
7139
|
relativePath: e.normalize ? a.replace(/\\/g, "/") : a,
|
|
7140
7140
|
type: g,
|
|
7141
|
-
isSymbolicLink: m,
|
|
7142
|
-
stat: e.followLinks ? h : i
|
|
7141
|
+
isSymbolicLink: m$1,
|
|
7142
|
+
stat: e.followLinks ? h$1 : i
|
|
7143
7143
|
};
|
|
7144
7144
|
switch (e.stat || delete u.stat, g) {
|
|
7145
7145
|
case "directory":
|
|
7146
7146
|
let c = [], b;
|
|
7147
|
-
if (e.followLinks || !m) {
|
|
7147
|
+
if (e.followLinks || !m$1) {
|
|
7148
7148
|
try {
|
|
7149
|
-
b = await readdir(t), b = k(b, e.sorted);
|
|
7150
|
-
} catch (d) {
|
|
7149
|
+
b = await readdir(t$1), b = k(b, e.sorted);
|
|
7150
|
+
} catch (d$1) {
|
|
7151
7151
|
if (e.skipErrors) return null;
|
|
7152
|
-
throw d;
|
|
7152
|
+
throw d$1;
|
|
7153
7153
|
}
|
|
7154
|
-
if (e.emptyDirectory && (u.isEmpty = !b.length), c = await Promise.all(b.map(async (d) => await G(r, resolve$1(t, d), n + 1, e, l, o))), c = c.filter((d) => d !== null), e.excludeEmptyDirectories && !c.length) return null;
|
|
7154
|
+
if (e.emptyDirectory && (u.isEmpty = !b.length), c = await Promise.all(b.map(async (d$1) => await G(r, resolve$1(t$1, d$1), n + 1, e, l, o))), c = c.filter((d$1) => d$1 !== null), e.excludeEmptyDirectories && !c.length) return null;
|
|
7155
7155
|
}
|
|
7156
|
-
if (e.matches && r !== t) {
|
|
7157
|
-
let d = S(e.matches);
|
|
7158
|
-
if (!c.length && d.some((f) => !f.test(`/${a}`))) return null;
|
|
7156
|
+
if (e.matches && r !== t$1) {
|
|
7157
|
+
let d$1 = S(e.matches);
|
|
7158
|
+
if (!c.length && d$1.some((f) => !f.test(`/${a}`))) return null;
|
|
7159
7159
|
}
|
|
7160
7160
|
if (e.sizeInBytes || e.size) {
|
|
7161
|
-
let d = c.reduce((f, y) => f + y.sizeInBytes, 0);
|
|
7162
|
-
u.sizeInBytes = d, u.size = e.size ? C(d) : void 0, e.sizeInBytes || c.forEach((f) => f.sizeInBytes = void 0);
|
|
7161
|
+
let d$1 = c.reduce((f, y$1) => f + y$1.sizeInBytes, 0);
|
|
7162
|
+
u.sizeInBytes = d$1, u.size = e.size ? C(d$1) : void 0, e.sizeInBytes || c.forEach((f) => f.sizeInBytes = void 0);
|
|
7163
7163
|
}
|
|
7164
7164
|
if (e.hash) {
|
|
7165
7165
|
c.forEach((f) => {
|
|
7166
7166
|
E.update(f.hash);
|
|
7167
7167
|
});
|
|
7168
|
-
let d = e.hashEncoding;
|
|
7169
|
-
u.hash = E.digest(d);
|
|
7168
|
+
let d$1 = e.hashEncoding;
|
|
7169
|
+
u.hash = E.digest(d$1);
|
|
7170
7170
|
}
|
|
7171
|
-
e.descendants && (u.descendants = c.reduce((d, f) => d + (f.type === "directory" && e.descendantsIgnoreDirectories ? 0 : 1) + (f.descendants ?? 0), 0)), c.length && (u.children = e.postSorted ? $(c, e.postSorted) : c);
|
|
7171
|
+
e.descendants && (u.descendants = c.reduce((d$1, f) => d$1 + (f.type === "directory" && e.descendantsIgnoreDirectories ? 0 : 1) + (f.descendants ?? 0), 0)), c.length && (u.children = e.postSorted ? $(c, e.postSorted) : c);
|
|
7172
7172
|
break;
|
|
7173
7173
|
case "file":
|
|
7174
|
-
if (u.extension = extname(t).replace(".", ""), e.extensions && e.extensions.indexOf(u.extension) === -1 || e.matches && r !== t && S(e.matches).some((f) => !f.test(`/${a}`))) return null;
|
|
7174
|
+
if (u.extension = extname(t$1).replace(".", ""), e.extensions && e.extensions.indexOf(u.extension) === -1 || e.matches && r !== t$1 && S(e.matches).some((f) => !f.test(`/${a}`))) return null;
|
|
7175
7175
|
if (e.sizeInBytes || e.size) {
|
|
7176
|
-
let d = e.followLinks ? h.size : i.size;
|
|
7177
|
-
u.sizeInBytes = d, u.size = e.size ? C(d) : void 0;
|
|
7176
|
+
let d$1 = e.followLinks ? h$1.size : i.size;
|
|
7177
|
+
u.sizeInBytes = d$1, u.size = e.size ? C(d$1) : void 0;
|
|
7178
7178
|
}
|
|
7179
7179
|
if (e.hash) {
|
|
7180
|
-
let d;
|
|
7180
|
+
let d$1;
|
|
7181
7181
|
try {
|
|
7182
|
-
d = await readFile(t);
|
|
7183
|
-
} catch (y) {
|
|
7182
|
+
d$1 = await readFile(t$1);
|
|
7183
|
+
} catch (y$1) {
|
|
7184
7184
|
if (e.skipErrors) return null;
|
|
7185
|
-
throw y;
|
|
7185
|
+
throw y$1;
|
|
7186
7186
|
}
|
|
7187
|
-
E.update(d);
|
|
7187
|
+
E.update(d$1);
|
|
7188
7188
|
let f = e.hashEncoding;
|
|
7189
7189
|
u.hash = E.digest(f);
|
|
7190
7190
|
}
|
|
7191
7191
|
break;
|
|
7192
7192
|
default: return null;
|
|
7193
7193
|
}
|
|
7194
|
-
return l && g === "file" ? await l(u, e.followLinks ? h : i) : o && g === "directory" && await o(u, e.followLinks ? h : i), u;
|
|
7194
|
+
return l && g === "file" ? await l(u, e.followLinks ? h$1 : i) : o && g === "directory" && await o(u, e.followLinks ? h$1 : i), u;
|
|
7195
7195
|
}
|
|
7196
|
-
async function Ie(r, t, n, e) {
|
|
7197
|
-
let l = V(t), o = w(r, l), a = await G(o, o, 0, l, n, e);
|
|
7196
|
+
async function Ie(r, t$1, n, e) {
|
|
7197
|
+
let l = V(t$1), o = w$1(r, l), a = await G(o, o, 0, l, n, e);
|
|
7198
7198
|
return a && (a.sizeInBytes = l.sizeInBytes ? a.sizeInBytes : void 0), a;
|
|
7199
7199
|
}
|
|
7200
7200
|
|
|
@@ -7208,8 +7208,828 @@ function getRouteFunctions({ config }) {
|
|
|
7208
7208
|
} };
|
|
7209
7209
|
}
|
|
7210
7210
|
|
|
7211
|
+
//#endregion
|
|
7212
|
+
//#region ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
|
7213
|
+
var require_ms = __commonJS({ "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module) {
|
|
7214
|
+
/**
|
|
7215
|
+
* Helpers.
|
|
7216
|
+
*/
|
|
7217
|
+
var s = 1e3;
|
|
7218
|
+
var m = s * 60;
|
|
7219
|
+
var h = m * 60;
|
|
7220
|
+
var d = h * 24;
|
|
7221
|
+
var w = d * 7;
|
|
7222
|
+
var y = d * 365.25;
|
|
7223
|
+
/**
|
|
7224
|
+
* Parse or format the given `val`.
|
|
7225
|
+
*
|
|
7226
|
+
* Options:
|
|
7227
|
+
*
|
|
7228
|
+
* - `long` verbose formatting [false]
|
|
7229
|
+
*
|
|
7230
|
+
* @param {String|Number} val
|
|
7231
|
+
* @param {Object} [options]
|
|
7232
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
7233
|
+
* @return {String|Number}
|
|
7234
|
+
* @api public
|
|
7235
|
+
*/
|
|
7236
|
+
module.exports = function(val, options) {
|
|
7237
|
+
options = options || {};
|
|
7238
|
+
var type = typeof val;
|
|
7239
|
+
if (type === "string" && val.length > 0) return parse$1(val);
|
|
7240
|
+
else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val);
|
|
7241
|
+
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
|
|
7242
|
+
};
|
|
7243
|
+
/**
|
|
7244
|
+
* Parse the given `str` and return milliseconds.
|
|
7245
|
+
*
|
|
7246
|
+
* @param {String} str
|
|
7247
|
+
* @return {Number}
|
|
7248
|
+
* @api private
|
|
7249
|
+
*/
|
|
7250
|
+
function parse$1(str) {
|
|
7251
|
+
str = String(str);
|
|
7252
|
+
if (str.length > 100) return;
|
|
7253
|
+
var match$1 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
|
|
7254
|
+
if (!match$1) return;
|
|
7255
|
+
var n = parseFloat(match$1[1]);
|
|
7256
|
+
var type = (match$1[2] || "ms").toLowerCase();
|
|
7257
|
+
switch (type) {
|
|
7258
|
+
case "years":
|
|
7259
|
+
case "year":
|
|
7260
|
+
case "yrs":
|
|
7261
|
+
case "yr":
|
|
7262
|
+
case "y": return n * y;
|
|
7263
|
+
case "weeks":
|
|
7264
|
+
case "week":
|
|
7265
|
+
case "w": return n * w;
|
|
7266
|
+
case "days":
|
|
7267
|
+
case "day":
|
|
7268
|
+
case "d": return n * d;
|
|
7269
|
+
case "hours":
|
|
7270
|
+
case "hour":
|
|
7271
|
+
case "hrs":
|
|
7272
|
+
case "hr":
|
|
7273
|
+
case "h": return n * h;
|
|
7274
|
+
case "minutes":
|
|
7275
|
+
case "minute":
|
|
7276
|
+
case "mins":
|
|
7277
|
+
case "min":
|
|
7278
|
+
case "m": return n * m;
|
|
7279
|
+
case "seconds":
|
|
7280
|
+
case "second":
|
|
7281
|
+
case "secs":
|
|
7282
|
+
case "sec":
|
|
7283
|
+
case "s": return n * s;
|
|
7284
|
+
case "milliseconds":
|
|
7285
|
+
case "millisecond":
|
|
7286
|
+
case "msecs":
|
|
7287
|
+
case "msec":
|
|
7288
|
+
case "ms": return n;
|
|
7289
|
+
default: return void 0;
|
|
7290
|
+
}
|
|
7291
|
+
}
|
|
7292
|
+
/**
|
|
7293
|
+
* Short format for `ms`.
|
|
7294
|
+
*
|
|
7295
|
+
* @param {Number} ms
|
|
7296
|
+
* @return {String}
|
|
7297
|
+
* @api private
|
|
7298
|
+
*/
|
|
7299
|
+
function fmtShort(ms) {
|
|
7300
|
+
var msAbs = Math.abs(ms);
|
|
7301
|
+
if (msAbs >= d) return Math.round(ms / d) + "d";
|
|
7302
|
+
if (msAbs >= h) return Math.round(ms / h) + "h";
|
|
7303
|
+
if (msAbs >= m) return Math.round(ms / m) + "m";
|
|
7304
|
+
if (msAbs >= s) return Math.round(ms / s) + "s";
|
|
7305
|
+
return ms + "ms";
|
|
7306
|
+
}
|
|
7307
|
+
/**
|
|
7308
|
+
* Long format for `ms`.
|
|
7309
|
+
*
|
|
7310
|
+
* @param {Number} ms
|
|
7311
|
+
* @return {String}
|
|
7312
|
+
* @api private
|
|
7313
|
+
*/
|
|
7314
|
+
function fmtLong(ms) {
|
|
7315
|
+
var msAbs = Math.abs(ms);
|
|
7316
|
+
if (msAbs >= d) return plural(ms, msAbs, d, "day");
|
|
7317
|
+
if (msAbs >= h) return plural(ms, msAbs, h, "hour");
|
|
7318
|
+
if (msAbs >= m) return plural(ms, msAbs, m, "minute");
|
|
7319
|
+
if (msAbs >= s) return plural(ms, msAbs, s, "second");
|
|
7320
|
+
return ms + " ms";
|
|
7321
|
+
}
|
|
7322
|
+
/**
|
|
7323
|
+
* Pluralization helper.
|
|
7324
|
+
*/
|
|
7325
|
+
function plural(ms, msAbs, n, name) {
|
|
7326
|
+
var isPlural = msAbs >= n * 1.5;
|
|
7327
|
+
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
7328
|
+
}
|
|
7329
|
+
} });
|
|
7330
|
+
|
|
7331
|
+
//#endregion
|
|
7332
|
+
//#region ../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/common.js
|
|
7333
|
+
var require_common = __commonJS({ "../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/common.js"(exports, module) {
|
|
7334
|
+
/**
|
|
7335
|
+
* This is the common logic for both the Node.js and web browser
|
|
7336
|
+
* implementations of `debug()`.
|
|
7337
|
+
*/
|
|
7338
|
+
function setup(env$1) {
|
|
7339
|
+
createDebug.debug = createDebug;
|
|
7340
|
+
createDebug.default = createDebug;
|
|
7341
|
+
createDebug.coerce = coerce;
|
|
7342
|
+
createDebug.disable = disable;
|
|
7343
|
+
createDebug.enable = enable;
|
|
7344
|
+
createDebug.enabled = enabled;
|
|
7345
|
+
createDebug.humanize = require_ms();
|
|
7346
|
+
createDebug.destroy = destroy;
|
|
7347
|
+
Object.keys(env$1).forEach((key) => {
|
|
7348
|
+
createDebug[key] = env$1[key];
|
|
7349
|
+
});
|
|
7350
|
+
/**
|
|
7351
|
+
* The currently active debug mode names, and names to skip.
|
|
7352
|
+
*/
|
|
7353
|
+
createDebug.names = [];
|
|
7354
|
+
createDebug.skips = [];
|
|
7355
|
+
/**
|
|
7356
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
7357
|
+
*
|
|
7358
|
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
7359
|
+
*/
|
|
7360
|
+
createDebug.formatters = {};
|
|
7361
|
+
/**
|
|
7362
|
+
* Selects a color for a debug namespace
|
|
7363
|
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
7364
|
+
* @return {Number|String} An ANSI color code for the given namespace
|
|
7365
|
+
* @api private
|
|
7366
|
+
*/
|
|
7367
|
+
function selectColor(namespace) {
|
|
7368
|
+
let hash = 0;
|
|
7369
|
+
for (let i = 0; i < namespace.length; i++) {
|
|
7370
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
7371
|
+
hash |= 0;
|
|
7372
|
+
}
|
|
7373
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
7374
|
+
}
|
|
7375
|
+
createDebug.selectColor = selectColor;
|
|
7376
|
+
/**
|
|
7377
|
+
* Create a debugger with the given `namespace`.
|
|
7378
|
+
*
|
|
7379
|
+
* @param {String} namespace
|
|
7380
|
+
* @return {Function}
|
|
7381
|
+
* @api public
|
|
7382
|
+
*/
|
|
7383
|
+
function createDebug(namespace) {
|
|
7384
|
+
let prevTime;
|
|
7385
|
+
let enableOverride = null;
|
|
7386
|
+
let namespacesCache;
|
|
7387
|
+
let enabledCache;
|
|
7388
|
+
function debug(...args) {
|
|
7389
|
+
if (!debug.enabled) return;
|
|
7390
|
+
const self = debug;
|
|
7391
|
+
const curr = Number(new Date());
|
|
7392
|
+
const ms = curr - (prevTime || curr);
|
|
7393
|
+
self.diff = ms;
|
|
7394
|
+
self.prev = prevTime;
|
|
7395
|
+
self.curr = curr;
|
|
7396
|
+
prevTime = curr;
|
|
7397
|
+
args[0] = createDebug.coerce(args[0]);
|
|
7398
|
+
if (typeof args[0] !== "string") args.unshift("%O");
|
|
7399
|
+
let index = 0;
|
|
7400
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match$1, format) => {
|
|
7401
|
+
if (match$1 === "%%") return "%";
|
|
7402
|
+
index++;
|
|
7403
|
+
const formatter = createDebug.formatters[format];
|
|
7404
|
+
if (typeof formatter === "function") {
|
|
7405
|
+
const val = args[index];
|
|
7406
|
+
match$1 = formatter.call(self, val);
|
|
7407
|
+
args.splice(index, 1);
|
|
7408
|
+
index--;
|
|
7409
|
+
}
|
|
7410
|
+
return match$1;
|
|
7411
|
+
});
|
|
7412
|
+
createDebug.formatArgs.call(self, args);
|
|
7413
|
+
const logFn = self.log || createDebug.log;
|
|
7414
|
+
logFn.apply(self, args);
|
|
7415
|
+
}
|
|
7416
|
+
debug.namespace = namespace;
|
|
7417
|
+
debug.useColors = createDebug.useColors();
|
|
7418
|
+
debug.color = createDebug.selectColor(namespace);
|
|
7419
|
+
debug.extend = extend;
|
|
7420
|
+
debug.destroy = createDebug.destroy;
|
|
7421
|
+
Object.defineProperty(debug, "enabled", {
|
|
7422
|
+
enumerable: true,
|
|
7423
|
+
configurable: false,
|
|
7424
|
+
get: () => {
|
|
7425
|
+
if (enableOverride !== null) return enableOverride;
|
|
7426
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
7427
|
+
namespacesCache = createDebug.namespaces;
|
|
7428
|
+
enabledCache = createDebug.enabled(namespace);
|
|
7429
|
+
}
|
|
7430
|
+
return enabledCache;
|
|
7431
|
+
},
|
|
7432
|
+
set: (v) => {
|
|
7433
|
+
enableOverride = v;
|
|
7434
|
+
}
|
|
7435
|
+
});
|
|
7436
|
+
if (typeof createDebug.init === "function") createDebug.init(debug);
|
|
7437
|
+
return debug;
|
|
7438
|
+
}
|
|
7439
|
+
function extend(namespace, delimiter) {
|
|
7440
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
7441
|
+
newDebug.log = this.log;
|
|
7442
|
+
return newDebug;
|
|
7443
|
+
}
|
|
7444
|
+
/**
|
|
7445
|
+
* Enables a debug mode by namespaces. This can include modes
|
|
7446
|
+
* separated by a colon and wildcards.
|
|
7447
|
+
*
|
|
7448
|
+
* @param {String} namespaces
|
|
7449
|
+
* @api public
|
|
7450
|
+
*/
|
|
7451
|
+
function enable(namespaces) {
|
|
7452
|
+
createDebug.save(namespaces);
|
|
7453
|
+
createDebug.namespaces = namespaces;
|
|
7454
|
+
createDebug.names = [];
|
|
7455
|
+
createDebug.skips = [];
|
|
7456
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
7457
|
+
for (const ns of split) if (ns[0] === "-") createDebug.skips.push(ns.slice(1));
|
|
7458
|
+
else createDebug.names.push(ns);
|
|
7459
|
+
}
|
|
7460
|
+
/**
|
|
7461
|
+
* Checks if the given string matches a namespace template, honoring
|
|
7462
|
+
* asterisks as wildcards.
|
|
7463
|
+
*
|
|
7464
|
+
* @param {String} search
|
|
7465
|
+
* @param {String} template
|
|
7466
|
+
* @return {Boolean}
|
|
7467
|
+
*/
|
|
7468
|
+
function matchesTemplate(search, template) {
|
|
7469
|
+
let searchIndex = 0;
|
|
7470
|
+
let templateIndex = 0;
|
|
7471
|
+
let starIndex = -1;
|
|
7472
|
+
let matchIndex = 0;
|
|
7473
|
+
while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") {
|
|
7474
|
+
starIndex = templateIndex;
|
|
7475
|
+
matchIndex = searchIndex;
|
|
7476
|
+
templateIndex++;
|
|
7477
|
+
} else {
|
|
7478
|
+
searchIndex++;
|
|
7479
|
+
templateIndex++;
|
|
7480
|
+
}
|
|
7481
|
+
else if (starIndex !== -1) {
|
|
7482
|
+
templateIndex = starIndex + 1;
|
|
7483
|
+
matchIndex++;
|
|
7484
|
+
searchIndex = matchIndex;
|
|
7485
|
+
} else return false;
|
|
7486
|
+
while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
|
|
7487
|
+
return templateIndex === template.length;
|
|
7488
|
+
}
|
|
7489
|
+
/**
|
|
7490
|
+
* Disable debug output.
|
|
7491
|
+
*
|
|
7492
|
+
* @return {String} namespaces
|
|
7493
|
+
* @api public
|
|
7494
|
+
*/
|
|
7495
|
+
function disable() {
|
|
7496
|
+
const namespaces = [...createDebug.names, ...createDebug.skips.map((namespace) => "-" + namespace)].join(",");
|
|
7497
|
+
createDebug.enable("");
|
|
7498
|
+
return namespaces;
|
|
7499
|
+
}
|
|
7500
|
+
/**
|
|
7501
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
|
7502
|
+
*
|
|
7503
|
+
* @param {String} name
|
|
7504
|
+
* @return {Boolean}
|
|
7505
|
+
* @api public
|
|
7506
|
+
*/
|
|
7507
|
+
function enabled(name) {
|
|
7508
|
+
for (const skip of createDebug.skips) if (matchesTemplate(name, skip)) return false;
|
|
7509
|
+
for (const ns of createDebug.names) if (matchesTemplate(name, ns)) return true;
|
|
7510
|
+
return false;
|
|
7511
|
+
}
|
|
7512
|
+
/**
|
|
7513
|
+
* Coerce `val`.
|
|
7514
|
+
*
|
|
7515
|
+
* @param {Mixed} val
|
|
7516
|
+
* @return {Mixed}
|
|
7517
|
+
* @api private
|
|
7518
|
+
*/
|
|
7519
|
+
function coerce(val) {
|
|
7520
|
+
if (val instanceof Error) return val.stack || val.message;
|
|
7521
|
+
return val;
|
|
7522
|
+
}
|
|
7523
|
+
/**
|
|
7524
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
|
7525
|
+
* XXX It WILL be removed in the next major release.
|
|
7526
|
+
*/
|
|
7527
|
+
function destroy() {
|
|
7528
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
7529
|
+
}
|
|
7530
|
+
createDebug.enable(createDebug.load());
|
|
7531
|
+
return createDebug;
|
|
7532
|
+
}
|
|
7533
|
+
module.exports = setup;
|
|
7534
|
+
} });
|
|
7535
|
+
|
|
7536
|
+
//#endregion
|
|
7537
|
+
//#region ../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/browser.js
|
|
7538
|
+
var require_browser = __commonJS({ "../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/browser.js"(exports, module) {
|
|
7539
|
+
/**
|
|
7540
|
+
* This is the web browser implementation of `debug()`.
|
|
7541
|
+
*/
|
|
7542
|
+
exports.formatArgs = formatArgs$1;
|
|
7543
|
+
exports.save = save$1;
|
|
7544
|
+
exports.load = load$1;
|
|
7545
|
+
exports.useColors = useColors$1;
|
|
7546
|
+
exports.storage = localstorage();
|
|
7547
|
+
exports.destroy = (() => {
|
|
7548
|
+
let warned = false;
|
|
7549
|
+
return () => {
|
|
7550
|
+
if (!warned) {
|
|
7551
|
+
warned = true;
|
|
7552
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
7553
|
+
}
|
|
7554
|
+
};
|
|
7555
|
+
})();
|
|
7556
|
+
/**
|
|
7557
|
+
* Colors.
|
|
7558
|
+
*/
|
|
7559
|
+
exports.colors = [
|
|
7560
|
+
"#0000CC",
|
|
7561
|
+
"#0000FF",
|
|
7562
|
+
"#0033CC",
|
|
7563
|
+
"#0033FF",
|
|
7564
|
+
"#0066CC",
|
|
7565
|
+
"#0066FF",
|
|
7566
|
+
"#0099CC",
|
|
7567
|
+
"#0099FF",
|
|
7568
|
+
"#00CC00",
|
|
7569
|
+
"#00CC33",
|
|
7570
|
+
"#00CC66",
|
|
7571
|
+
"#00CC99",
|
|
7572
|
+
"#00CCCC",
|
|
7573
|
+
"#00CCFF",
|
|
7574
|
+
"#3300CC",
|
|
7575
|
+
"#3300FF",
|
|
7576
|
+
"#3333CC",
|
|
7577
|
+
"#3333FF",
|
|
7578
|
+
"#3366CC",
|
|
7579
|
+
"#3366FF",
|
|
7580
|
+
"#3399CC",
|
|
7581
|
+
"#3399FF",
|
|
7582
|
+
"#33CC00",
|
|
7583
|
+
"#33CC33",
|
|
7584
|
+
"#33CC66",
|
|
7585
|
+
"#33CC99",
|
|
7586
|
+
"#33CCCC",
|
|
7587
|
+
"#33CCFF",
|
|
7588
|
+
"#6600CC",
|
|
7589
|
+
"#6600FF",
|
|
7590
|
+
"#6633CC",
|
|
7591
|
+
"#6633FF",
|
|
7592
|
+
"#66CC00",
|
|
7593
|
+
"#66CC33",
|
|
7594
|
+
"#9900CC",
|
|
7595
|
+
"#9900FF",
|
|
7596
|
+
"#9933CC",
|
|
7597
|
+
"#9933FF",
|
|
7598
|
+
"#99CC00",
|
|
7599
|
+
"#99CC33",
|
|
7600
|
+
"#CC0000",
|
|
7601
|
+
"#CC0033",
|
|
7602
|
+
"#CC0066",
|
|
7603
|
+
"#CC0099",
|
|
7604
|
+
"#CC00CC",
|
|
7605
|
+
"#CC00FF",
|
|
7606
|
+
"#CC3300",
|
|
7607
|
+
"#CC3333",
|
|
7608
|
+
"#CC3366",
|
|
7609
|
+
"#CC3399",
|
|
7610
|
+
"#CC33CC",
|
|
7611
|
+
"#CC33FF",
|
|
7612
|
+
"#CC6600",
|
|
7613
|
+
"#CC6633",
|
|
7614
|
+
"#CC9900",
|
|
7615
|
+
"#CC9933",
|
|
7616
|
+
"#CCCC00",
|
|
7617
|
+
"#CCCC33",
|
|
7618
|
+
"#FF0000",
|
|
7619
|
+
"#FF0033",
|
|
7620
|
+
"#FF0066",
|
|
7621
|
+
"#FF0099",
|
|
7622
|
+
"#FF00CC",
|
|
7623
|
+
"#FF00FF",
|
|
7624
|
+
"#FF3300",
|
|
7625
|
+
"#FF3333",
|
|
7626
|
+
"#FF3366",
|
|
7627
|
+
"#FF3399",
|
|
7628
|
+
"#FF33CC",
|
|
7629
|
+
"#FF33FF",
|
|
7630
|
+
"#FF6600",
|
|
7631
|
+
"#FF6633",
|
|
7632
|
+
"#FF9900",
|
|
7633
|
+
"#FF9933",
|
|
7634
|
+
"#FFCC00",
|
|
7635
|
+
"#FFCC33"
|
|
7636
|
+
];
|
|
7637
|
+
/**
|
|
7638
|
+
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
7639
|
+
* and the Firebug extension (any Firefox version) are known
|
|
7640
|
+
* to support "%c" CSS customizations.
|
|
7641
|
+
*
|
|
7642
|
+
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
7643
|
+
*/
|
|
7644
|
+
function useColors$1() {
|
|
7645
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return true;
|
|
7646
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false;
|
|
7647
|
+
let m$1;
|
|
7648
|
+
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m$1 = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m$1[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
7649
|
+
}
|
|
7650
|
+
/**
|
|
7651
|
+
* Colorize log arguments if enabled.
|
|
7652
|
+
*
|
|
7653
|
+
* @api public
|
|
7654
|
+
*/
|
|
7655
|
+
function formatArgs$1(args) {
|
|
7656
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
7657
|
+
if (!this.useColors) return;
|
|
7658
|
+
const c = "color: " + this.color;
|
|
7659
|
+
args.splice(1, 0, c, "color: inherit");
|
|
7660
|
+
let index = 0;
|
|
7661
|
+
let lastC = 0;
|
|
7662
|
+
args[0].replace(/%[a-zA-Z%]/g, (match$1) => {
|
|
7663
|
+
if (match$1 === "%%") return;
|
|
7664
|
+
index++;
|
|
7665
|
+
if (match$1 === "%c") lastC = index;
|
|
7666
|
+
});
|
|
7667
|
+
args.splice(lastC, 0, c);
|
|
7668
|
+
}
|
|
7669
|
+
/**
|
|
7670
|
+
* Invokes `console.debug()` when available.
|
|
7671
|
+
* No-op when `console.debug` is not a "function".
|
|
7672
|
+
* If `console.debug` is not available, falls back
|
|
7673
|
+
* to `console.log`.
|
|
7674
|
+
*
|
|
7675
|
+
* @api public
|
|
7676
|
+
*/
|
|
7677
|
+
exports.log = console.debug || console.log || (() => {});
|
|
7678
|
+
/**
|
|
7679
|
+
* Save `namespaces`.
|
|
7680
|
+
*
|
|
7681
|
+
* @param {String} namespaces
|
|
7682
|
+
* @api private
|
|
7683
|
+
*/
|
|
7684
|
+
function save$1(namespaces) {
|
|
7685
|
+
try {
|
|
7686
|
+
if (namespaces) exports.storage.setItem("debug", namespaces);
|
|
7687
|
+
else exports.storage.removeItem("debug");
|
|
7688
|
+
} catch (error) {}
|
|
7689
|
+
}
|
|
7690
|
+
/**
|
|
7691
|
+
* Load `namespaces`.
|
|
7692
|
+
*
|
|
7693
|
+
* @return {String} returns the previously persisted debug modes
|
|
7694
|
+
* @api private
|
|
7695
|
+
*/
|
|
7696
|
+
function load$1() {
|
|
7697
|
+
let r;
|
|
7698
|
+
try {
|
|
7699
|
+
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
7700
|
+
} catch (error) {}
|
|
7701
|
+
if (!r && typeof process !== "undefined" && "env" in process) r = process.env.DEBUG;
|
|
7702
|
+
return r;
|
|
7703
|
+
}
|
|
7704
|
+
/**
|
|
7705
|
+
* Localstorage attempts to return the localstorage.
|
|
7706
|
+
*
|
|
7707
|
+
* This is necessary because safari throws
|
|
7708
|
+
* when a user disables cookies/localstorage
|
|
7709
|
+
* and you attempt to access it.
|
|
7710
|
+
*
|
|
7711
|
+
* @return {LocalStorage}
|
|
7712
|
+
* @api private
|
|
7713
|
+
*/
|
|
7714
|
+
function localstorage() {
|
|
7715
|
+
try {
|
|
7716
|
+
return localStorage;
|
|
7717
|
+
} catch (error) {}
|
|
7718
|
+
}
|
|
7719
|
+
module.exports = require_common()(exports);
|
|
7720
|
+
const { formatters: formatters$1 } = module.exports;
|
|
7721
|
+
/**
|
|
7722
|
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
7723
|
+
*/
|
|
7724
|
+
formatters$1.j = function(v) {
|
|
7725
|
+
try {
|
|
7726
|
+
return JSON.stringify(v);
|
|
7727
|
+
} catch (error) {
|
|
7728
|
+
return "[UnexpectedJSONParseError]: " + error.message;
|
|
7729
|
+
}
|
|
7730
|
+
};
|
|
7731
|
+
} });
|
|
7732
|
+
|
|
7733
|
+
//#endregion
|
|
7734
|
+
//#region ../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
|
|
7735
|
+
var require_has_flag = __commonJS({ "../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports, module) {
|
|
7736
|
+
module.exports = (flag, argv) => {
|
|
7737
|
+
argv = argv || process.argv;
|
|
7738
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
7739
|
+
const pos = argv.indexOf(prefix + flag);
|
|
7740
|
+
const terminatorPos = argv.indexOf("--");
|
|
7741
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
7742
|
+
};
|
|
7743
|
+
} });
|
|
7744
|
+
|
|
7745
|
+
//#endregion
|
|
7746
|
+
//#region ../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
|
|
7747
|
+
var require_supports_color = __commonJS({ "../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports, module) {
|
|
7748
|
+
const os = __require("os");
|
|
7749
|
+
const hasFlag = require_has_flag();
|
|
7750
|
+
const env = process.env;
|
|
7751
|
+
let forceColor;
|
|
7752
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) forceColor = false;
|
|
7753
|
+
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) forceColor = true;
|
|
7754
|
+
if ("FORCE_COLOR" in env) forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
7755
|
+
function translateLevel(level) {
|
|
7756
|
+
if (level === 0) return false;
|
|
7757
|
+
return {
|
|
7758
|
+
level,
|
|
7759
|
+
hasBasic: true,
|
|
7760
|
+
has256: level >= 2,
|
|
7761
|
+
has16m: level >= 3
|
|
7762
|
+
};
|
|
7763
|
+
}
|
|
7764
|
+
function supportsColor(stream$1) {
|
|
7765
|
+
if (forceColor === false) return 0;
|
|
7766
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
|
|
7767
|
+
if (hasFlag("color=256")) return 2;
|
|
7768
|
+
if (stream$1 && !stream$1.isTTY && forceColor !== true) return 0;
|
|
7769
|
+
const min = forceColor ? 1 : 0;
|
|
7770
|
+
if (process.platform === "win32") {
|
|
7771
|
+
const osRelease = os.release().split(".");
|
|
7772
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
7773
|
+
return 1;
|
|
7774
|
+
}
|
|
7775
|
+
if ("CI" in env) {
|
|
7776
|
+
if ([
|
|
7777
|
+
"TRAVIS",
|
|
7778
|
+
"CIRCLECI",
|
|
7779
|
+
"APPVEYOR",
|
|
7780
|
+
"GITLAB_CI"
|
|
7781
|
+
].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
|
|
7782
|
+
return min;
|
|
7783
|
+
}
|
|
7784
|
+
if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
7785
|
+
if (env.COLORTERM === "truecolor") return 3;
|
|
7786
|
+
if ("TERM_PROGRAM" in env) {
|
|
7787
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
7788
|
+
switch (env.TERM_PROGRAM) {
|
|
7789
|
+
case "iTerm.app": return version >= 3 ? 3 : 2;
|
|
7790
|
+
case "Apple_Terminal": return 2;
|
|
7791
|
+
}
|
|
7792
|
+
}
|
|
7793
|
+
if (/-256(color)?$/i.test(env.TERM)) return 2;
|
|
7794
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
|
|
7795
|
+
if ("COLORTERM" in env) return 1;
|
|
7796
|
+
if (env.TERM === "dumb") return min;
|
|
7797
|
+
return min;
|
|
7798
|
+
}
|
|
7799
|
+
function getSupportLevel(stream$1) {
|
|
7800
|
+
const level = supportsColor(stream$1);
|
|
7801
|
+
return translateLevel(level);
|
|
7802
|
+
}
|
|
7803
|
+
module.exports = {
|
|
7804
|
+
supportsColor: getSupportLevel,
|
|
7805
|
+
stdout: getSupportLevel(process.stdout),
|
|
7806
|
+
stderr: getSupportLevel(process.stderr)
|
|
7807
|
+
};
|
|
7808
|
+
} });
|
|
7809
|
+
|
|
7810
|
+
//#endregion
|
|
7811
|
+
//#region ../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/node.js
|
|
7812
|
+
var require_node = __commonJS({ "../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/node.js"(exports, module) {
|
|
7813
|
+
/**
|
|
7814
|
+
* Module dependencies.
|
|
7815
|
+
*/
|
|
7816
|
+
const tty = __require("tty");
|
|
7817
|
+
const util = __require("util");
|
|
7818
|
+
/**
|
|
7819
|
+
* This is the Node.js implementation of `debug()`.
|
|
7820
|
+
*/
|
|
7821
|
+
exports.init = init;
|
|
7822
|
+
exports.log = log$5;
|
|
7823
|
+
exports.formatArgs = formatArgs;
|
|
7824
|
+
exports.save = save;
|
|
7825
|
+
exports.load = load;
|
|
7826
|
+
exports.useColors = useColors;
|
|
7827
|
+
exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
7828
|
+
/**
|
|
7829
|
+
* Colors.
|
|
7830
|
+
*/
|
|
7831
|
+
exports.colors = [
|
|
7832
|
+
6,
|
|
7833
|
+
2,
|
|
7834
|
+
3,
|
|
7835
|
+
4,
|
|
7836
|
+
5,
|
|
7837
|
+
1
|
|
7838
|
+
];
|
|
7839
|
+
try {
|
|
7840
|
+
const supportsColor$1 = require_supports_color();
|
|
7841
|
+
if (supportsColor$1 && (supportsColor$1.stderr || supportsColor$1).level >= 2) exports.colors = [
|
|
7842
|
+
20,
|
|
7843
|
+
21,
|
|
7844
|
+
26,
|
|
7845
|
+
27,
|
|
7846
|
+
32,
|
|
7847
|
+
33,
|
|
7848
|
+
38,
|
|
7849
|
+
39,
|
|
7850
|
+
40,
|
|
7851
|
+
41,
|
|
7852
|
+
42,
|
|
7853
|
+
43,
|
|
7854
|
+
44,
|
|
7855
|
+
45,
|
|
7856
|
+
56,
|
|
7857
|
+
57,
|
|
7858
|
+
62,
|
|
7859
|
+
63,
|
|
7860
|
+
68,
|
|
7861
|
+
69,
|
|
7862
|
+
74,
|
|
7863
|
+
75,
|
|
7864
|
+
76,
|
|
7865
|
+
77,
|
|
7866
|
+
78,
|
|
7867
|
+
79,
|
|
7868
|
+
80,
|
|
7869
|
+
81,
|
|
7870
|
+
92,
|
|
7871
|
+
93,
|
|
7872
|
+
98,
|
|
7873
|
+
99,
|
|
7874
|
+
112,
|
|
7875
|
+
113,
|
|
7876
|
+
128,
|
|
7877
|
+
129,
|
|
7878
|
+
134,
|
|
7879
|
+
135,
|
|
7880
|
+
148,
|
|
7881
|
+
149,
|
|
7882
|
+
160,
|
|
7883
|
+
161,
|
|
7884
|
+
162,
|
|
7885
|
+
163,
|
|
7886
|
+
164,
|
|
7887
|
+
165,
|
|
7888
|
+
166,
|
|
7889
|
+
167,
|
|
7890
|
+
168,
|
|
7891
|
+
169,
|
|
7892
|
+
170,
|
|
7893
|
+
171,
|
|
7894
|
+
172,
|
|
7895
|
+
173,
|
|
7896
|
+
178,
|
|
7897
|
+
179,
|
|
7898
|
+
184,
|
|
7899
|
+
185,
|
|
7900
|
+
196,
|
|
7901
|
+
197,
|
|
7902
|
+
198,
|
|
7903
|
+
199,
|
|
7904
|
+
200,
|
|
7905
|
+
201,
|
|
7906
|
+
202,
|
|
7907
|
+
203,
|
|
7908
|
+
204,
|
|
7909
|
+
205,
|
|
7910
|
+
206,
|
|
7911
|
+
207,
|
|
7912
|
+
208,
|
|
7913
|
+
209,
|
|
7914
|
+
214,
|
|
7915
|
+
215,
|
|
7916
|
+
220,
|
|
7917
|
+
221
|
|
7918
|
+
];
|
|
7919
|
+
} catch (error) {}
|
|
7920
|
+
/**
|
|
7921
|
+
* Build up the default `inspectOpts` object from the environment variables.
|
|
7922
|
+
*
|
|
7923
|
+
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
7924
|
+
*/
|
|
7925
|
+
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
7926
|
+
return /^debug_/i.test(key);
|
|
7927
|
+
}).reduce((obj, key) => {
|
|
7928
|
+
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k$1) => {
|
|
7929
|
+
return k$1.toUpperCase();
|
|
7930
|
+
});
|
|
7931
|
+
let val = process.env[key];
|
|
7932
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
|
7933
|
+
else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
|
|
7934
|
+
else if (val === "null") val = null;
|
|
7935
|
+
else val = Number(val);
|
|
7936
|
+
obj[prop] = val;
|
|
7937
|
+
return obj;
|
|
7938
|
+
}, {});
|
|
7939
|
+
/**
|
|
7940
|
+
* Is stdout a TTY? Colored output is enabled when `true`.
|
|
7941
|
+
*/
|
|
7942
|
+
function useColors() {
|
|
7943
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
7944
|
+
}
|
|
7945
|
+
/**
|
|
7946
|
+
* Adds ANSI color escape codes if enabled.
|
|
7947
|
+
*
|
|
7948
|
+
* @api public
|
|
7949
|
+
*/
|
|
7950
|
+
function formatArgs(args) {
|
|
7951
|
+
const { namespace: name, useColors: useColors$2 } = this;
|
|
7952
|
+
if (useColors$2) {
|
|
7953
|
+
const c = this.color;
|
|
7954
|
+
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
7955
|
+
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
|
7956
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
7957
|
+
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
|
|
7958
|
+
} else args[0] = getDate() + name + " " + args[0];
|
|
7959
|
+
}
|
|
7960
|
+
function getDate() {
|
|
7961
|
+
if (exports.inspectOpts.hideDate) return "";
|
|
7962
|
+
return new Date().toISOString() + " ";
|
|
7963
|
+
}
|
|
7964
|
+
/**
|
|
7965
|
+
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
|
|
7966
|
+
*/
|
|
7967
|
+
function log$5(...args) {
|
|
7968
|
+
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n");
|
|
7969
|
+
}
|
|
7970
|
+
/**
|
|
7971
|
+
* Save `namespaces`.
|
|
7972
|
+
*
|
|
7973
|
+
* @param {String} namespaces
|
|
7974
|
+
* @api private
|
|
7975
|
+
*/
|
|
7976
|
+
function save(namespaces) {
|
|
7977
|
+
if (namespaces) process.env.DEBUG = namespaces;
|
|
7978
|
+
else delete process.env.DEBUG;
|
|
7979
|
+
}
|
|
7980
|
+
/**
|
|
7981
|
+
* Load `namespaces`.
|
|
7982
|
+
*
|
|
7983
|
+
* @return {String} returns the previously persisted debug modes
|
|
7984
|
+
* @api private
|
|
7985
|
+
*/
|
|
7986
|
+
function load() {
|
|
7987
|
+
return process.env.DEBUG;
|
|
7988
|
+
}
|
|
7989
|
+
/**
|
|
7990
|
+
* Init logic for `debug` instances.
|
|
7991
|
+
*
|
|
7992
|
+
* Create a new `inspectOpts` object in case `useColors` is set
|
|
7993
|
+
* differently for a particular `debug` instance.
|
|
7994
|
+
*/
|
|
7995
|
+
function init(debug) {
|
|
7996
|
+
debug.inspectOpts = {};
|
|
7997
|
+
const keys = Object.keys(exports.inspectOpts);
|
|
7998
|
+
for (let i = 0; i < keys.length; i++) debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
7999
|
+
}
|
|
8000
|
+
module.exports = require_common()(exports);
|
|
8001
|
+
const { formatters } = module.exports;
|
|
8002
|
+
/**
|
|
8003
|
+
* Map %o to `util.inspect()`, all on a single line.
|
|
8004
|
+
*/
|
|
8005
|
+
formatters.o = function(v) {
|
|
8006
|
+
this.inspectOpts.colors = this.useColors;
|
|
8007
|
+
return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
8008
|
+
};
|
|
8009
|
+
/**
|
|
8010
|
+
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
|
8011
|
+
*/
|
|
8012
|
+
formatters.O = function(v) {
|
|
8013
|
+
this.inspectOpts.colors = this.useColors;
|
|
8014
|
+
return util.inspect(v, this.inspectOpts);
|
|
8015
|
+
};
|
|
8016
|
+
} });
|
|
8017
|
+
|
|
8018
|
+
//#endregion
|
|
8019
|
+
//#region ../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/index.js
|
|
8020
|
+
var require_src = __commonJS({ "../../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/index.js"(exports, module) {
|
|
8021
|
+
/**
|
|
8022
|
+
* Detect Electron renderer / nwjs process, which is node, but we should
|
|
8023
|
+
* treat as a browser.
|
|
8024
|
+
*/
|
|
8025
|
+
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) module.exports = require_browser();
|
|
8026
|
+
else module.exports = require_node();
|
|
8027
|
+
} });
|
|
8028
|
+
var import_src = __toESM(require_src(), 1);
|
|
8029
|
+
|
|
7211
8030
|
//#endregion
|
|
7212
8031
|
//#region src/npm/index.ts
|
|
8032
|
+
const log$4 = (0, import_src.debug)("qwik:devtools:npm");
|
|
7213
8033
|
const packageCache = new Map();
|
|
7214
8034
|
const CACHE_TTL = 1e3 * 60 * 30;
|
|
7215
8035
|
let preloadedDependencies = null;
|
|
@@ -7260,22 +8080,22 @@ async function detectPackageManager(projectRoot) {
|
|
|
7260
8080
|
}
|
|
7261
8081
|
const preloadDependencies = async (config) => {
|
|
7262
8082
|
if (preloadedDependencies) {
|
|
7263
|
-
|
|
8083
|
+
log$4("[Qwik DevTools] Dependencies already preloaded");
|
|
7264
8084
|
return preloadedDependencies;
|
|
7265
8085
|
}
|
|
7266
8086
|
if (isPreloading && preloadPromise) {
|
|
7267
|
-
|
|
8087
|
+
log$4("[Qwik DevTools] Preloading already in progress...");
|
|
7268
8088
|
return preloadPromise;
|
|
7269
8089
|
}
|
|
7270
8090
|
isPreloading = true;
|
|
7271
|
-
|
|
8091
|
+
log$4("[Qwik DevTools] Starting to preload dependencies...");
|
|
7272
8092
|
preloadPromise = (async () => {
|
|
7273
8093
|
const startDir = getProjectStartDirFromConfig(config);
|
|
7274
8094
|
const pathToPackageJson = await findNearestFileUp(startDir, "package.json");
|
|
7275
8095
|
if (!pathToPackageJson) {
|
|
7276
8096
|
preloadedDependencies = [];
|
|
7277
8097
|
isPreloading = false;
|
|
7278
|
-
|
|
8098
|
+
log$4("[Qwik DevTools] No package.json found");
|
|
7279
8099
|
return [];
|
|
7280
8100
|
}
|
|
7281
8101
|
try {
|
|
@@ -7306,7 +8126,7 @@ const preloadDependencies = async (config) => {
|
|
|
7306
8126
|
const batches = [];
|
|
7307
8127
|
for (let i = 0; i < uncachedDependencies.length; i += batchSize) batches.push(uncachedDependencies.slice(i, i + batchSize));
|
|
7308
8128
|
const fetchedPackages = [];
|
|
7309
|
-
|
|
8129
|
+
log$4(`[Qwik DevTools] Fetching ${uncachedDependencies.length} packages in parallel...`);
|
|
7310
8130
|
const allBatchPromises = batches.map(async (batch) => {
|
|
7311
8131
|
const batchPromises = batch.map(async ([name, version]) => {
|
|
7312
8132
|
try {
|
|
@@ -7364,10 +8184,10 @@ const preloadDependencies = async (config) => {
|
|
|
7364
8184
|
const allPackages = [...cachedPackages, ...fetchedPackages];
|
|
7365
8185
|
preloadedDependencies = allPackages;
|
|
7366
8186
|
isPreloading = false;
|
|
7367
|
-
|
|
8187
|
+
log$4(`[Qwik DevTools] ✓ Successfully preloaded ${allPackages.length} dependencies`);
|
|
7368
8188
|
return allPackages;
|
|
7369
8189
|
} catch (error) {
|
|
7370
|
-
|
|
8190
|
+
log$4("[Qwik DevTools] ✗ Failed to preload dependencies:", error);
|
|
7371
8191
|
preloadedDependencies = [];
|
|
7372
8192
|
isPreloading = false;
|
|
7373
8193
|
return [];
|
|
@@ -7377,12 +8197,12 @@ const preloadDependencies = async (config) => {
|
|
|
7377
8197
|
};
|
|
7378
8198
|
async function startPreloading({ config }) {
|
|
7379
8199
|
const startTime = Date.now();
|
|
7380
|
-
|
|
8200
|
+
log$4("[Qwik DevTools] 🚀 Initiating dependency preload (background)...");
|
|
7381
8201
|
preloadDependencies(config).then(() => {
|
|
7382
8202
|
const duration = ((Date.now() - startTime) / 1e3).toFixed(2);
|
|
7383
|
-
|
|
8203
|
+
log$4(`[Qwik DevTools] ⚡ Preload completed in ${duration}s`);
|
|
7384
8204
|
}).catch((err) => {
|
|
7385
|
-
|
|
8205
|
+
log$4("[Qwik DevTools] ✗ Preload failed:", err);
|
|
7386
8206
|
});
|
|
7387
8207
|
return Promise.resolve();
|
|
7388
8208
|
}
|
|
@@ -7402,14 +8222,14 @@ function getNpmFunctions({ config }) {
|
|
|
7402
8222
|
},
|
|
7403
8223
|
async getAllDependencies() {
|
|
7404
8224
|
if (preloadedDependencies) {
|
|
7405
|
-
|
|
8225
|
+
log$4("[Qwik DevTools] Returning preloaded dependencies");
|
|
7406
8226
|
return preloadedDependencies;
|
|
7407
8227
|
}
|
|
7408
8228
|
if (isPreloading && preloadPromise) {
|
|
7409
|
-
|
|
8229
|
+
log$4("[Qwik DevTools] Waiting for preload to complete...");
|
|
7410
8230
|
return preloadPromise;
|
|
7411
8231
|
}
|
|
7412
|
-
|
|
8232
|
+
log$4("[Qwik DevTools] Warning: Preload not started, starting now...");
|
|
7413
8233
|
return preloadDependencies(config);
|
|
7414
8234
|
},
|
|
7415
8235
|
async installPackage(packageName, isDev = true) {
|
|
@@ -7712,14 +8532,14 @@ function compositeTransformation(isApplicable, annotation, transform$1, untransf
|
|
|
7712
8532
|
untransform
|
|
7713
8533
|
};
|
|
7714
8534
|
}
|
|
7715
|
-
const symbolRule = compositeTransformation((s, superJson) => {
|
|
7716
|
-
if (isSymbol(s)) {
|
|
7717
|
-
const isRegistered = !!superJson.symbolRegistry.getIdentifier(s);
|
|
8535
|
+
const symbolRule = compositeTransformation((s$1, superJson) => {
|
|
8536
|
+
if (isSymbol(s$1)) {
|
|
8537
|
+
const isRegistered = !!superJson.symbolRegistry.getIdentifier(s$1);
|
|
7718
8538
|
return isRegistered;
|
|
7719
8539
|
}
|
|
7720
8540
|
return false;
|
|
7721
|
-
}, (s, superJson) => {
|
|
7722
|
-
const identifier = superJson.symbolRegistry.getIdentifier(s);
|
|
8541
|
+
}, (s$1, superJson) => {
|
|
8542
|
+
const identifier = superJson.symbolRegistry.getIdentifier(s$1);
|
|
7723
8543
|
return ["symbol", identifier];
|
|
7724
8544
|
}, (v) => v.description, (_, a, superJson) => {
|
|
7725
8545
|
const value = superJson.symbolRegistry.getValue(a[1]);
|
|
@@ -8029,8 +8849,8 @@ function isPlainObject(payload) {
|
|
|
8029
8849
|
function isNull(payload) {
|
|
8030
8850
|
return getType(payload) === "Null";
|
|
8031
8851
|
}
|
|
8032
|
-
function isOneOf(a, b, c, d, e) {
|
|
8033
|
-
return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);
|
|
8852
|
+
function isOneOf(a, b, c, d$1, e) {
|
|
8853
|
+
return (value) => a(value) || b(value) || !!c && c(value) || !!d$1 && d$1(value) || !!e && e(value);
|
|
8034
8854
|
}
|
|
8035
8855
|
function isUndefined(payload) {
|
|
8036
8856
|
return getType(payload) === "Undefined";
|
|
@@ -8071,7 +8891,7 @@ var SuperJSON = class {
|
|
|
8071
8891
|
*/
|
|
8072
8892
|
constructor({ dedupe = false } = {}) {
|
|
8073
8893
|
this.classRegistry = new ClassRegistry();
|
|
8074
|
-
this.symbolRegistry = new Registry((s) => s.description ?? "");
|
|
8894
|
+
this.symbolRegistry = new Registry((s$1) => s$1.description ?? "");
|
|
8075
8895
|
this.customTransformerRegistry = new CustomTransformerRegistry();
|
|
8076
8896
|
this.allowedErrorProps = [];
|
|
8077
8897
|
this.dedupe = dedupe;
|
|
@@ -8300,14 +9120,15 @@ const SERVER_RPC = "__qwik_server_rpc__";
|
|
|
8300
9120
|
|
|
8301
9121
|
//#endregion
|
|
8302
9122
|
//#region ../kit/src/context.ts
|
|
9123
|
+
const t = target;
|
|
8303
9124
|
function getViteServerContext() {
|
|
8304
|
-
return
|
|
9125
|
+
return t[SERVER_CTX];
|
|
8305
9126
|
}
|
|
8306
9127
|
function setViteServerContext(ctx) {
|
|
8307
|
-
|
|
9128
|
+
t[SERVER_CTX] = ctx;
|
|
8308
9129
|
}
|
|
8309
9130
|
function setViteServerRpc(rpc) {
|
|
8310
|
-
|
|
9131
|
+
t[SERVER_RPC] = rpc;
|
|
8311
9132
|
}
|
|
8312
9133
|
|
|
8313
9134
|
//#endregion
|
|
@@ -8327,34 +9148,60 @@ function createServerRpc(functions) {
|
|
|
8327
9148
|
//#endregion
|
|
8328
9149
|
//#region src/parse/helpers.ts
|
|
8329
9150
|
const ALL_HOOK_NAMES = new Set([...USE_HOOK_LIST]);
|
|
9151
|
+
/**
|
|
9152
|
+
* Type guard to check if a value is an AST node with a type property
|
|
9153
|
+
*/
|
|
8330
9154
|
function isAstNodeLike(value) {
|
|
8331
9155
|
return Boolean(value) && typeof value === "object" && "type" in value;
|
|
8332
9156
|
}
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
9157
|
+
/**
|
|
9158
|
+
* Extracts the name from an Identifier node
|
|
9159
|
+
*/
|
|
8336
9160
|
function getVariableIdentifierName(id) {
|
|
8337
9161
|
if (!isAstNodeLike(id)) return null;
|
|
8338
9162
|
return id.type === "Identifier" ? id.name : null;
|
|
8339
9163
|
}
|
|
8340
|
-
|
|
8341
|
-
|
|
9164
|
+
/**
|
|
9165
|
+
* Normalizes a hook name by removing the trailing $ suffix
|
|
9166
|
+
* @example normalizeHookName('useSignal$') => 'useSignal'
|
|
9167
|
+
*/
|
|
9168
|
+
function normalizeHookName(raw) {
|
|
9169
|
+
return raw.endsWith("$") ? raw.slice(0, -1) : raw;
|
|
8342
9170
|
}
|
|
9171
|
+
/**
|
|
9172
|
+
* Normalizes a hook name by removing the trailing 'Qrl' suffix
|
|
9173
|
+
* @example normalizeQrlHookName('useTaskQrl') => 'useTask'
|
|
9174
|
+
*/
|
|
8343
9175
|
function normalizeQrlHookName(hookName) {
|
|
8344
9176
|
return hookName.endsWith("Qrl") ? hookName.slice(0, -3) : hookName;
|
|
8345
9177
|
}
|
|
9178
|
+
/**
|
|
9179
|
+
* Checks if a hook name is in the known hooks list
|
|
9180
|
+
*/
|
|
9181
|
+
function isKnownHook(name) {
|
|
9182
|
+
return ALL_HOOK_NAMES.has(name);
|
|
9183
|
+
}
|
|
9184
|
+
/**
|
|
9185
|
+
* Checks if a hook name follows the custom hook naming convention (use[A-Z_])
|
|
9186
|
+
* and is not a built-in Qwik hook
|
|
9187
|
+
*/
|
|
9188
|
+
function isCustomHook(hookName) {
|
|
9189
|
+
const isBuiltIn = USE_HOOK_LIST.some((item) => item.startsWith(hookName));
|
|
9190
|
+
return !isBuiltIn && /^use[A-Z_]/.test(hookName);
|
|
9191
|
+
}
|
|
9192
|
+
/**
|
|
9193
|
+
* Finds the start position of the line containing the given index
|
|
9194
|
+
*/
|
|
8346
9195
|
function findLineStart(code, index) {
|
|
8347
|
-
let lineStart = index;
|
|
8348
9196
|
for (let i = index - 1; i >= 0; i--) {
|
|
8349
9197
|
const ch = code[i];
|
|
8350
|
-
if (ch === "\n" || ch === "\r")
|
|
8351
|
-
lineStart = i + 1;
|
|
8352
|
-
break;
|
|
8353
|
-
}
|
|
8354
|
-
if (i === 0) lineStart = 0;
|
|
9198
|
+
if (ch === "\n" || ch === "\r") return i + 1;
|
|
8355
9199
|
}
|
|
8356
|
-
return
|
|
9200
|
+
return 0;
|
|
8357
9201
|
}
|
|
9202
|
+
/**
|
|
9203
|
+
* Reads the indentation (spaces/tabs) starting from a given position
|
|
9204
|
+
*/
|
|
8358
9205
|
function readIndent(code, indexFrom) {
|
|
8359
9206
|
let indent = "";
|
|
8360
9207
|
let i = indexFrom;
|
|
@@ -8367,35 +9214,59 @@ function readIndent(code, indexFrom) {
|
|
|
8367
9214
|
}
|
|
8368
9215
|
return indent;
|
|
8369
9216
|
}
|
|
9217
|
+
/**
|
|
9218
|
+
* Removes trailing semicolon and whitespace from a code segment
|
|
9219
|
+
*/
|
|
9220
|
+
function trimStatementSemicolon(segment) {
|
|
9221
|
+
return segment.trim().replace(/;?\s*$/, "");
|
|
9222
|
+
}
|
|
9223
|
+
/**
|
|
9224
|
+
* Builds the collecthook() call code with proper indentation
|
|
9225
|
+
*/
|
|
8370
9226
|
function buildCollecthookPayload(indent, variableName, hookType, category, hookExpression) {
|
|
8371
|
-
const
|
|
9227
|
+
const dataValue = hookExpression === "undefined" ? "undefined" : hookExpression;
|
|
8372
9228
|
return `${indent}collecthook({
|
|
8373
9229
|
${indent} variableName: '${variableName}',
|
|
8374
9230
|
${indent} hookType: '${hookType}',
|
|
8375
9231
|
${indent} category: '${category}',
|
|
8376
|
-
${indent} data: ${
|
|
9232
|
+
${indent} data: ${dataValue}
|
|
8377
9233
|
${indent}});\n`;
|
|
8378
9234
|
}
|
|
9235
|
+
/**
|
|
9236
|
+
* Checks if a collecthook call already exists after the given position (by variable ID)
|
|
9237
|
+
*/
|
|
8379
9238
|
function hasCollecthookAfterByVariableId(code, fromIndex, variableId, maxLookahead = 600) {
|
|
8380
9239
|
const lookahead = code.slice(fromIndex, fromIndex + maxLookahead);
|
|
8381
|
-
const
|
|
8382
|
-
return
|
|
9240
|
+
const pattern$1 = new RegExp(`collecthook\\s*\\(\\s*\\{[\\s\\S]{0,300}?data:\\s*${variableId}\\b`);
|
|
9241
|
+
return pattern$1.test(lookahead);
|
|
8383
9242
|
}
|
|
9243
|
+
/**
|
|
9244
|
+
* Checks if a collecthook call already exists after the given position (by variable name)
|
|
9245
|
+
*/
|
|
8384
9246
|
function hasCollecthookAfterByVariableName(code, fromIndex, variableName, maxLookahead = 600) {
|
|
8385
9247
|
const lookahead = code.slice(fromIndex, fromIndex + maxLookahead);
|
|
8386
|
-
const
|
|
8387
|
-
return
|
|
8388
|
-
}
|
|
8389
|
-
function trimStatementSemicolon(segment) {
|
|
8390
|
-
return segment.trim().replace(/;?\s*$/, "");
|
|
8391
|
-
}
|
|
8392
|
-
function isCustomHook(hookName) {
|
|
8393
|
-
return !USE_HOOK_LIST.some((item) => item.startsWith(hookName)) && /^use[A-Z_]/.test(hookName);
|
|
9248
|
+
const pattern$1 = new RegExp(`collecthook\\s*\\(\\s*\\{[\\s\\S]{0,200}?variableName:\\s*'${variableName}'`);
|
|
9249
|
+
return pattern$1.test(lookahead);
|
|
8394
9250
|
}
|
|
8395
9251
|
|
|
8396
9252
|
//#endregion
|
|
8397
9253
|
//#region src/parse/traverse.ts
|
|
8398
|
-
|
|
9254
|
+
/**
|
|
9255
|
+
* Parses TypeScript/JSX code into an AST using oxc-parser
|
|
9256
|
+
*/
|
|
9257
|
+
function parseProgram(code) {
|
|
9258
|
+
const parsed = parseSync("file.tsx", code, {
|
|
9259
|
+
lang: "tsx",
|
|
9260
|
+
sourceType: "module",
|
|
9261
|
+
astType: "ts",
|
|
9262
|
+
range: true
|
|
9263
|
+
});
|
|
9264
|
+
return parsed.program;
|
|
9265
|
+
}
|
|
9266
|
+
/**
|
|
9267
|
+
* Calls the appropriate visitor function for enter/exit events
|
|
9268
|
+
*/
|
|
9269
|
+
function callVisitor(visitor, type, hook, path$12) {
|
|
8399
9270
|
if (!visitor) return;
|
|
8400
9271
|
const specific = visitor[type];
|
|
8401
9272
|
if (specific) specific(path$12);
|
|
@@ -8410,18 +9281,12 @@ function callVisitor(visitor, type, hook, path$12) {
|
|
|
8410
9281
|
if (fn) fn(path$12);
|
|
8411
9282
|
}
|
|
8412
9283
|
}
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
sourceType: "module",
|
|
8417
|
-
astType: "ts",
|
|
8418
|
-
range: true
|
|
8419
|
-
});
|
|
8420
|
-
return parsed.program;
|
|
8421
|
-
}
|
|
9284
|
+
/**
|
|
9285
|
+
* Traverses an AST program with a visitor pattern
|
|
9286
|
+
*/
|
|
8422
9287
|
function traverseProgram(program, visitor, state) {
|
|
8423
9288
|
let shouldStopAll = false;
|
|
8424
|
-
function
|
|
9289
|
+
function traverse$1(node, parent, key, index) {
|
|
8425
9290
|
if (shouldStopAll) return;
|
|
8426
9291
|
if (!isAstNodeLike(node)) return;
|
|
8427
9292
|
let shouldSkipChildren = false;
|
|
@@ -8443,215 +9308,316 @@ function traverseProgram(program, visitor, state) {
|
|
|
8443
9308
|
const record = node;
|
|
8444
9309
|
for (const k$1 of Object.keys(record)) {
|
|
8445
9310
|
const value = record[k$1];
|
|
8446
|
-
if (Array.isArray(value)) for (let i = 0; i < value.length; i++)
|
|
8447
|
-
else
|
|
9311
|
+
if (Array.isArray(value)) for (let i = 0; i < value.length; i++) traverse$1(value[i], node, k$1, i);
|
|
9312
|
+
else traverse$1(value, node, k$1, null);
|
|
8448
9313
|
}
|
|
8449
9314
|
}
|
|
8450
9315
|
callVisitor(visitor, "exit", "exit", path$12);
|
|
8451
9316
|
}
|
|
8452
|
-
|
|
9317
|
+
traverse$1(program, null, null, null);
|
|
8453
9318
|
}
|
|
9319
|
+
/**
|
|
9320
|
+
* Finds all component$ function bodies in the AST and returns their positions
|
|
9321
|
+
*/
|
|
8454
9322
|
function findAllComponentBodyRangesFromProgram(program) {
|
|
8455
9323
|
const ranges = [];
|
|
8456
9324
|
traverseProgram(program, { enter: (path$12) => {
|
|
8457
9325
|
const node = path$12.node;
|
|
8458
|
-
if (!node) return;
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
ranges.push({
|
|
8476
|
-
insertPos: start + 1,
|
|
8477
|
-
bodyStart: start,
|
|
8478
|
-
bodyEnd: end,
|
|
8479
|
-
exportName
|
|
8480
|
-
});
|
|
8481
|
-
}
|
|
8482
|
-
}
|
|
8483
|
-
}
|
|
8484
|
-
}
|
|
9326
|
+
if (!node || node.type !== "CallExpression") return;
|
|
9327
|
+
const callee = node.callee;
|
|
9328
|
+
if (!callee || callee.type !== "Identifier" || callee.name !== "component$") return;
|
|
9329
|
+
const firstArg = node.arguments?.[0];
|
|
9330
|
+
const isFunction = firstArg?.type === "ArrowFunctionExpression" || firstArg?.type === "FunctionExpression";
|
|
9331
|
+
if (!isFunction) return;
|
|
9332
|
+
const body = firstArg.body;
|
|
9333
|
+
if (body?.type !== "BlockStatement" || !Array.isArray(body.range)) return;
|
|
9334
|
+
const start = body.range[0];
|
|
9335
|
+
const end = body.range[1];
|
|
9336
|
+
const exportName = detectExportName(path$12.parent);
|
|
9337
|
+
ranges.push({
|
|
9338
|
+
insertPos: start + 1,
|
|
9339
|
+
bodyStart: start,
|
|
9340
|
+
bodyEnd: end,
|
|
9341
|
+
exportName
|
|
9342
|
+
});
|
|
8485
9343
|
} });
|
|
9344
|
+
return deduplicateAndSort(ranges);
|
|
9345
|
+
}
|
|
9346
|
+
/**
|
|
9347
|
+
* Detects the export name from the parent node context
|
|
9348
|
+
*/
|
|
9349
|
+
function detectExportName(parent) {
|
|
9350
|
+
if (!parent) return void 0;
|
|
9351
|
+
if (parent.type === "ExportDefaultDeclaration") return "";
|
|
9352
|
+
if (parent.type === "VariableDeclarator") {
|
|
9353
|
+
const id = parent.id;
|
|
9354
|
+
if (id?.type === "Identifier" && typeof id.name === "string") return id.name;
|
|
9355
|
+
}
|
|
9356
|
+
return void 0;
|
|
9357
|
+
}
|
|
9358
|
+
/**
|
|
9359
|
+
* Removes duplicate ranges and sorts by insertPos ascending
|
|
9360
|
+
*/
|
|
9361
|
+
function deduplicateAndSort(ranges) {
|
|
8486
9362
|
const seen = new Set();
|
|
8487
9363
|
const unique = ranges.filter((r) => {
|
|
8488
9364
|
if (seen.has(r.insertPos)) return false;
|
|
8489
9365
|
seen.add(r.insertPos);
|
|
8490
9366
|
return true;
|
|
8491
9367
|
});
|
|
8492
|
-
unique.sort((a, b) => a.insertPos - b.insertPos);
|
|
8493
|
-
return unique;
|
|
9368
|
+
return unique.sort((a, b) => a.insertPos - b.insertPos);
|
|
8494
9369
|
}
|
|
8495
9370
|
|
|
8496
9371
|
//#endregion
|
|
8497
|
-
//#region src/parse/
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
9372
|
+
//#region src/parse/initInjector.ts
|
|
9373
|
+
/**
|
|
9374
|
+
* Injects collecthook initialization and render stats at the beginning of each component body
|
|
9375
|
+
*/
|
|
9376
|
+
function injectInitHooks(code, bodies, options) {
|
|
9377
|
+
const tasks = [];
|
|
9378
|
+
for (const body of bodies) {
|
|
9379
|
+
const task = createInitTask(code, body, options);
|
|
9380
|
+
if (task) tasks.push(task);
|
|
9381
|
+
}
|
|
9382
|
+
return applyTasks$1(code, tasks);
|
|
9383
|
+
}
|
|
9384
|
+
/**
|
|
9385
|
+
* Creates an initialization task for a single component body
|
|
9386
|
+
*/
|
|
9387
|
+
function createInitTask(code, body, options) {
|
|
9388
|
+
const { insertPos, exportName } = body;
|
|
9389
|
+
if (hasExistingCollecthook(code, insertPos)) return null;
|
|
9390
|
+
const { insertIndex, prefixNewline } = calculateInsertPosition(code, insertPos);
|
|
9391
|
+
const indent = readIndent(code, insertIndex);
|
|
9392
|
+
const componentArg = buildComponentArg(options?.path, exportName);
|
|
9393
|
+
const initLine = `${prefixNewline}${indent}const collecthook = ${INNER_USE_HOOK}(${componentArg})\n`;
|
|
9394
|
+
return {
|
|
9395
|
+
start: insertIndex,
|
|
9396
|
+
end: insertIndex,
|
|
9397
|
+
text: initLine
|
|
9398
|
+
};
|
|
9399
|
+
}
|
|
9400
|
+
function hasExistingCollecthook(code, insertPos) {
|
|
9401
|
+
const lookahead = code.slice(insertPos, insertPos + 200);
|
|
9402
|
+
return /const\s+collecthook\s*=\s*useCollectHooks\s*\(/.test(lookahead);
|
|
9403
|
+
}
|
|
9404
|
+
function calculateInsertPosition(code, insertPos) {
|
|
9405
|
+
if (code[insertPos] === "\r" && code[insertPos + 1] === "\n") return {
|
|
9406
|
+
insertIndex: insertPos + 2,
|
|
9407
|
+
prefixNewline: ""
|
|
9408
|
+
};
|
|
9409
|
+
if (code[insertPos] === "\n") return {
|
|
9410
|
+
insertIndex: insertPos + 1,
|
|
9411
|
+
prefixNewline: ""
|
|
9412
|
+
};
|
|
9413
|
+
return {
|
|
9414
|
+
insertIndex: insertPos,
|
|
9415
|
+
prefixNewline: "\n"
|
|
9416
|
+
};
|
|
9417
|
+
}
|
|
9418
|
+
/**
|
|
9419
|
+
* Builds the component argument string for collecthook initialization
|
|
9420
|
+
*/
|
|
9421
|
+
function buildComponentArg(path$12, exportName) {
|
|
9422
|
+
const rawArg = String(path$12 ?? "");
|
|
9423
|
+
const baseArg = rawArg.split("?")[0].split("#")[0];
|
|
9424
|
+
const suffix = buildComponentSuffix(baseArg, exportName);
|
|
9425
|
+
return JSON.stringify(`${baseArg}${suffix}`);
|
|
9426
|
+
}
|
|
9427
|
+
function buildComponentSuffix(baseArg, exportName) {
|
|
9428
|
+
if (exportName && typeof exportName === "string") return `_${exportName}`;
|
|
9429
|
+
if (baseArg.endsWith("index.tsx")) {
|
|
9430
|
+
const parts = baseArg.split("/");
|
|
9431
|
+
const parent = parts.length >= 2 ? parts[parts.length - 2] : "index";
|
|
9432
|
+
return `_${parent.replace(/-/g, "_")}`;
|
|
9433
|
+
}
|
|
9434
|
+
const file = baseArg.split("/").pop() || "";
|
|
9435
|
+
const name = file.replace(/\.[^.]+$/, "");
|
|
9436
|
+
return name ? `_${name.replace(/-/g, "_")}` : "";
|
|
9437
|
+
}
|
|
9438
|
+
function applyTasks$1(code, tasks) {
|
|
9439
|
+
tasks.sort((a, b) => b.start - a.start);
|
|
8501
9440
|
let result = code;
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
const
|
|
8520
|
-
|
|
8521
|
-
const baseArg = rawArg.split("?")[0].split("#")[0];
|
|
8522
|
-
let suffix = "";
|
|
8523
|
-
if (exportName && typeof exportName === "string") suffix = `_${exportName}`;
|
|
8524
|
-
else if (baseArg.endsWith("index.tsx")) {
|
|
8525
|
-
const parts = baseArg.split("/");
|
|
8526
|
-
const parent = parts.length >= 2 ? parts[parts.length - 2] : "index";
|
|
8527
|
-
const safeParent = parent.replace(/-/g, "_");
|
|
8528
|
-
suffix = `_${safeParent}`;
|
|
8529
|
-
} else {
|
|
8530
|
-
const file = baseArg.split("/").pop() || "";
|
|
8531
|
-
const name = file.replace(/\.[^.]+$/, "");
|
|
8532
|
-
const safeName = name.replace(/-/g, "_");
|
|
8533
|
-
suffix = name ? `_${safeName}` : "";
|
|
8534
|
-
}
|
|
8535
|
-
const arg = JSON.stringify(`${baseArg}${suffix}`);
|
|
8536
|
-
const initLine = `${prefixNewline}${indent}const collecthook = ${INNER_USE_HOOK}(${arg})\n`;
|
|
8537
|
-
tasks.push({
|
|
8538
|
-
start: insertIndex,
|
|
8539
|
-
end: insertIndex,
|
|
8540
|
-
text: initLine
|
|
8541
|
-
});
|
|
9441
|
+
for (const task of tasks) result = result.slice(0, task.start) + task.text + result.slice(task.end);
|
|
9442
|
+
return result;
|
|
9443
|
+
}
|
|
9444
|
+
|
|
9445
|
+
//#endregion
|
|
9446
|
+
//#region src/parse/hookTracker.ts
|
|
9447
|
+
/**
|
|
9448
|
+
* Injects collecthook calls after each hook usage
|
|
9449
|
+
*/
|
|
9450
|
+
function injectHookTrackers(code) {
|
|
9451
|
+
const program = parseProgram(code);
|
|
9452
|
+
const tasks = [];
|
|
9453
|
+
let customHookIndex = 0;
|
|
9454
|
+
traverseProgram(program, { enter: (path$12) => {
|
|
9455
|
+
const node = path$12.node;
|
|
9456
|
+
if (!node) return;
|
|
9457
|
+
if (node.type === "VariableDeclarator") {
|
|
9458
|
+
const task = processVariableDeclarator(code, node, path$12);
|
|
9459
|
+
if (task) tasks.push(task);
|
|
8542
9460
|
}
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
const tasks = [];
|
|
8549
|
-
traverseProgram(programForInjections, { enter: (path$12) => {
|
|
8550
|
-
const node = path$12.node;
|
|
8551
|
-
if (!node) return;
|
|
8552
|
-
if (node.type === "VariableDeclarator") {
|
|
8553
|
-
const init = node.init;
|
|
8554
|
-
if (!isAstNodeLike(init) || init.type !== "CallExpression") return;
|
|
8555
|
-
const callee = init.callee;
|
|
8556
|
-
if (!isAstNodeLike(callee) || callee.type !== "Identifier") return;
|
|
8557
|
-
const hookName = normalizeHookName(callee.name);
|
|
8558
|
-
const isQrlName = normalizeQrlHookName(hookName);
|
|
8559
|
-
const variableId = getVariableIdentifierName(node.id);
|
|
8560
|
-
if (!variableId) return;
|
|
8561
|
-
if (hookName === INNER_USE_HOOK) return;
|
|
8562
|
-
if (isCustomHook(isQrlName)) {
|
|
8563
|
-
const parent$1 = path$12.parent;
|
|
8564
|
-
const parentRange$1 = parent$1 && Array.isArray(parent$1.range) ? parent$1.range : void 0;
|
|
8565
|
-
if (!parentRange$1) return;
|
|
8566
|
-
const declStart$1 = parentRange$1[0];
|
|
8567
|
-
const declEnd$1 = parentRange$1[1];
|
|
8568
|
-
const lineStart$1 = findLineStart(result, declStart$1);
|
|
8569
|
-
const indent$1 = readIndent(result, lineStart$1);
|
|
8570
|
-
const payload$1 = buildCollecthookPayload(indent$1, variableId, "customhook", "VariableDeclarator", variableId);
|
|
8571
|
-
if (hasCollecthookAfterByVariableId(result, declEnd$1, variableId)) return;
|
|
8572
|
-
tasks.push({
|
|
8573
|
-
kind: "insert",
|
|
8574
|
-
pos: declEnd$1,
|
|
8575
|
-
text: "\n" + payload$1
|
|
8576
|
-
});
|
|
8577
|
-
return;
|
|
8578
|
-
}
|
|
8579
|
-
if (!isKnownHook(isQrlName)) return;
|
|
8580
|
-
const parent = path$12.parent;
|
|
8581
|
-
const parentRange = parent && Array.isArray(parent.range) ? parent.range : void 0;
|
|
8582
|
-
if (!parentRange) return;
|
|
8583
|
-
const declStart = parentRange[0];
|
|
8584
|
-
const declEnd = parentRange[1];
|
|
8585
|
-
const lineStart = findLineStart(result, declStart);
|
|
8586
|
-
const indent = readIndent(result, lineStart);
|
|
8587
|
-
const payload = buildCollecthookPayload(indent, variableId, isQrlName, "VariableDeclarator", variableId);
|
|
8588
|
-
if (hasCollecthookAfterByVariableId(result, declEnd, variableId)) return;
|
|
8589
|
-
tasks.push({
|
|
8590
|
-
kind: "insert",
|
|
8591
|
-
pos: declEnd,
|
|
8592
|
-
text: "\n" + payload
|
|
8593
|
-
});
|
|
8594
|
-
return;
|
|
9461
|
+
if (node.type === "ExpressionStatement") {
|
|
9462
|
+
const result = processExpressionStatement(code, node, customHookIndex);
|
|
9463
|
+
if (result) {
|
|
9464
|
+
tasks.push(result.task);
|
|
9465
|
+
customHookIndex = result.newIndex;
|
|
8595
9466
|
}
|
|
8596
|
-
if (node.type === "ExpressionStatement") {
|
|
8597
|
-
const expr = node.expression;
|
|
8598
|
-
if (!isAstNodeLike(expr) || expr.type !== "CallExpression") return;
|
|
8599
|
-
const callee = expr.callee;
|
|
8600
|
-
if (!isAstNodeLike(callee) || callee.type !== "Identifier") return;
|
|
8601
|
-
const hookName = normalizeHookName(callee.name);
|
|
8602
|
-
const isQrlName = normalizeQrlHookName(hookName);
|
|
8603
|
-
const isListed = isKnownHook(isQrlName);
|
|
8604
|
-
if (hookName === INNER_USE_HOOK) return;
|
|
8605
|
-
const stmtRange = Array.isArray(node.range) ? node.range : void 0;
|
|
8606
|
-
if (!stmtRange) return;
|
|
8607
|
-
const stmtStart = stmtRange[0];
|
|
8608
|
-
const stmtEnd = stmtRange[1];
|
|
8609
|
-
const lineStart = findLineStart(result, stmtStart);
|
|
8610
|
-
const indent = readIndent(result, lineStart);
|
|
8611
|
-
if (isListed) {
|
|
8612
|
-
const payload = buildCollecthookPayload(indent, isQrlName, isQrlName, "expressionStatement", "undefined");
|
|
8613
|
-
if (hasCollecthookAfterByVariableName(result, stmtEnd, isQrlName)) return;
|
|
8614
|
-
tasks.push({
|
|
8615
|
-
kind: "insert",
|
|
8616
|
-
pos: stmtEnd,
|
|
8617
|
-
text: "\n" + payload
|
|
8618
|
-
});
|
|
8619
|
-
} else if (isCustomHook(isQrlName)) {
|
|
8620
|
-
const stmtRange$1 = Array.isArray(node.range) ? node.range : void 0;
|
|
8621
|
-
if (!stmtRange$1) return;
|
|
8622
|
-
const stmtStart$1 = stmtRange$1[0];
|
|
8623
|
-
const stmtEnd$1 = stmtRange$1[1];
|
|
8624
|
-
const callSource = result.slice(stmtStart$1, stmtEnd$1);
|
|
8625
|
-
const lineStart2 = findLineStart(result, stmtStart$1);
|
|
8626
|
-
const indent2 = readIndent(result, lineStart2);
|
|
8627
|
-
const variableName = `_customhook_${index}`;
|
|
8628
|
-
const declLine = `${indent2}let ${variableName} = ${trimStatementSemicolon(callSource)};\n`;
|
|
8629
|
-
const payload = buildCollecthookPayload(indent2, variableName, "customhook", "VariableDeclarator", variableName);
|
|
8630
|
-
index++;
|
|
8631
|
-
tasks.push({
|
|
8632
|
-
kind: "replace",
|
|
8633
|
-
start: stmtStart$1,
|
|
8634
|
-
end: stmtEnd$1,
|
|
8635
|
-
text: declLine + payload
|
|
8636
|
-
});
|
|
8637
|
-
}
|
|
8638
|
-
}
|
|
8639
|
-
} });
|
|
8640
|
-
if (tasks.length > 0) {
|
|
8641
|
-
tasks.sort((a, b) => {
|
|
8642
|
-
const apos = a.kind === "insert" ? a.pos : a.start;
|
|
8643
|
-
const bpos = b.kind === "insert" ? b.pos : b.start;
|
|
8644
|
-
return bpos - apos;
|
|
8645
|
-
});
|
|
8646
|
-
for (const t of tasks) if (t.kind === "insert") result = result.slice(0, t.pos) + t.text + result.slice(t.pos);
|
|
8647
|
-
else result = result.slice(0, t.start) + t.text + result.slice(t.end);
|
|
8648
9467
|
}
|
|
9468
|
+
} });
|
|
9469
|
+
return applyTasks(code, tasks);
|
|
9470
|
+
}
|
|
9471
|
+
/**
|
|
9472
|
+
* Processes: const x = useSignal(), const data = useCustomHook()
|
|
9473
|
+
*/
|
|
9474
|
+
function processVariableDeclarator(code, node, path$12) {
|
|
9475
|
+
const hookInfo = extractHookInfo(node);
|
|
9476
|
+
if (!hookInfo) return null;
|
|
9477
|
+
const { hookName, normalizedName, variableId } = hookInfo;
|
|
9478
|
+
if (hookName === INNER_USE_HOOK) return null;
|
|
9479
|
+
const range$1 = getParentRange(path$12.parent);
|
|
9480
|
+
if (!range$1) return null;
|
|
9481
|
+
const { declEnd, indent } = getPositionInfo(code, range$1);
|
|
9482
|
+
if (isCustomHook(normalizedName)) {
|
|
9483
|
+
if (hasCollecthookAfterByVariableId(code, declEnd, variableId)) return null;
|
|
9484
|
+
const payload$1 = buildCollecthookPayload(indent, variableId, "customhook", "VariableDeclarator", variableId);
|
|
9485
|
+
return {
|
|
9486
|
+
kind: "insert",
|
|
9487
|
+
pos: declEnd,
|
|
9488
|
+
text: "\n" + payload$1
|
|
9489
|
+
};
|
|
8649
9490
|
}
|
|
9491
|
+
if (!isKnownHook(normalizedName)) return null;
|
|
9492
|
+
if (hasCollecthookAfterByVariableId(code, declEnd, variableId)) return null;
|
|
9493
|
+
const payload = buildCollecthookPayload(indent, variableId, normalizedName, "VariableDeclarator", variableId);
|
|
9494
|
+
return {
|
|
9495
|
+
kind: "insert",
|
|
9496
|
+
pos: declEnd,
|
|
9497
|
+
text: "\n" + payload
|
|
9498
|
+
};
|
|
9499
|
+
}
|
|
9500
|
+
/**
|
|
9501
|
+
* Processes: useTask$(() => {}), useCustomHook()
|
|
9502
|
+
*/
|
|
9503
|
+
function processExpressionStatement(code, node, currentIndex) {
|
|
9504
|
+
const hookInfo = extractExpressionHookInfo(node);
|
|
9505
|
+
if (!hookInfo) return null;
|
|
9506
|
+
const { hookName, normalizedName } = hookInfo;
|
|
9507
|
+
if (hookName === INNER_USE_HOOK) return null;
|
|
9508
|
+
const stmtRange = node.range;
|
|
9509
|
+
if (!stmtRange) return null;
|
|
9510
|
+
const [stmtStart, stmtEnd] = stmtRange;
|
|
9511
|
+
const lineStart = findLineStart(code, stmtStart);
|
|
9512
|
+
const indent = readIndent(code, lineStart);
|
|
9513
|
+
if (isKnownHook(normalizedName)) {
|
|
9514
|
+
if (hasCollecthookAfterByVariableName(code, stmtEnd, normalizedName)) return null;
|
|
9515
|
+
const payload = buildCollecthookPayload(indent, normalizedName, normalizedName, "expressionStatement", "undefined");
|
|
9516
|
+
return {
|
|
9517
|
+
task: {
|
|
9518
|
+
kind: "insert",
|
|
9519
|
+
pos: stmtEnd,
|
|
9520
|
+
text: "\n" + payload
|
|
9521
|
+
},
|
|
9522
|
+
newIndex: currentIndex
|
|
9523
|
+
};
|
|
9524
|
+
}
|
|
9525
|
+
if (isCustomHook(normalizedName)) return convertToVariableDeclaration(code, stmtStart, stmtEnd, indent, currentIndex);
|
|
9526
|
+
return null;
|
|
9527
|
+
}
|
|
9528
|
+
/**
|
|
9529
|
+
* Converts a custom hook expression to a variable declaration with tracking
|
|
9530
|
+
*/
|
|
9531
|
+
function convertToVariableDeclaration(code, stmtStart, stmtEnd, indent, currentIndex) {
|
|
9532
|
+
const callSource = code.slice(stmtStart, stmtEnd);
|
|
9533
|
+
const variableName = `_customhook_${currentIndex}`;
|
|
9534
|
+
const declLine = `${indent}let ${variableName} = ${trimStatementSemicolon(callSource)};\n`;
|
|
9535
|
+
const payload = buildCollecthookPayload(indent, variableName, "customhook", "VariableDeclarator", variableName);
|
|
9536
|
+
return {
|
|
9537
|
+
task: {
|
|
9538
|
+
kind: "replace",
|
|
9539
|
+
start: stmtStart,
|
|
9540
|
+
end: stmtEnd,
|
|
9541
|
+
text: declLine + payload
|
|
9542
|
+
},
|
|
9543
|
+
newIndex: currentIndex + 1
|
|
9544
|
+
};
|
|
9545
|
+
}
|
|
9546
|
+
function extractHookInfo(node) {
|
|
9547
|
+
const init$1 = node.init;
|
|
9548
|
+
if (!isAstNodeLike(init$1) || init$1.type !== "CallExpression") return null;
|
|
9549
|
+
const callee = init$1.callee;
|
|
9550
|
+
if (!isAstNodeLike(callee) || callee.type !== "Identifier") return null;
|
|
9551
|
+
const hookName = normalizeHookName(callee.name);
|
|
9552
|
+
const normalizedName = normalizeQrlHookName(hookName);
|
|
9553
|
+
const variableId = getVariableIdentifierName(node.id);
|
|
9554
|
+
if (!variableId) return null;
|
|
9555
|
+
return {
|
|
9556
|
+
hookName,
|
|
9557
|
+
normalizedName,
|
|
9558
|
+
variableId
|
|
9559
|
+
};
|
|
9560
|
+
}
|
|
9561
|
+
function extractExpressionHookInfo(node) {
|
|
9562
|
+
const expr = node.expression;
|
|
9563
|
+
if (!isAstNodeLike(expr) || expr.type !== "CallExpression") return null;
|
|
9564
|
+
const callee = expr.callee;
|
|
9565
|
+
if (!isAstNodeLike(callee) || callee.type !== "Identifier") return null;
|
|
9566
|
+
const hookName = normalizeHookName(callee.name);
|
|
9567
|
+
const normalizedName = normalizeQrlHookName(hookName);
|
|
9568
|
+
return {
|
|
9569
|
+
hookName,
|
|
9570
|
+
normalizedName
|
|
9571
|
+
};
|
|
9572
|
+
}
|
|
9573
|
+
function getParentRange(parent) {
|
|
9574
|
+
const range$1 = parent?.range;
|
|
9575
|
+
if (!range$1) return null;
|
|
9576
|
+
return [range$1[0], range$1[1]];
|
|
9577
|
+
}
|
|
9578
|
+
function getPositionInfo(code, range$1) {
|
|
9579
|
+
const [declStart, declEnd] = range$1;
|
|
9580
|
+
const lineStart = findLineStart(code, declStart);
|
|
9581
|
+
const indent = readIndent(code, lineStart);
|
|
9582
|
+
return {
|
|
9583
|
+
declStart,
|
|
9584
|
+
declEnd,
|
|
9585
|
+
indent
|
|
9586
|
+
};
|
|
9587
|
+
}
|
|
9588
|
+
function applyTasks(code, tasks) {
|
|
9589
|
+
if (tasks.length === 0) return code;
|
|
9590
|
+
tasks.sort((a, b) => {
|
|
9591
|
+
const aPos = a.kind === "insert" ? a.pos : a.start;
|
|
9592
|
+
const bPos = b.kind === "insert" ? b.pos : b.start;
|
|
9593
|
+
return bPos - aPos;
|
|
9594
|
+
});
|
|
9595
|
+
let result = code;
|
|
9596
|
+
for (const task of tasks) if (task.kind === "insert") result = result.slice(0, task.pos) + task.text + result.slice(task.pos);
|
|
9597
|
+
else result = result.slice(0, task.start) + task.text + result.slice(task.end);
|
|
9598
|
+
return result;
|
|
9599
|
+
}
|
|
9600
|
+
|
|
9601
|
+
//#endregion
|
|
9602
|
+
//#region src/parse/parse.ts
|
|
9603
|
+
/**
|
|
9604
|
+
* Parses and transforms Qwik component code by injecting devtools hooks
|
|
9605
|
+
*
|
|
9606
|
+
* Phase 1: Inject initialization hooks (collecthook setup + render stats)
|
|
9607
|
+
* Phase 2: Inject collecthook calls for individual hooks
|
|
9608
|
+
*/
|
|
9609
|
+
function parseQwikCode(code, options) {
|
|
9610
|
+
const program = parseProgram(code);
|
|
9611
|
+
const componentBodies = findAllComponentBodyRangesFromProgram(program);
|
|
9612
|
+
if (componentBodies.length === 0) return code;
|
|
9613
|
+
let result = injectInitHooks(code, componentBodies, options);
|
|
9614
|
+
result = injectHookTrackers(result);
|
|
8650
9615
|
return result;
|
|
8651
9616
|
}
|
|
8652
9617
|
|
|
8653
9618
|
//#endregion
|
|
8654
9619
|
//#region src/inspect/index.ts
|
|
9620
|
+
const log$3 = (0, import_src.debug)("qwik:devtools:inspect");
|
|
8655
9621
|
const codeStringCache = new Map();
|
|
8656
9622
|
function parseCodeWithCache(code) {
|
|
8657
9623
|
const hit = codeStringCache.get(code);
|
|
@@ -8681,7 +9647,7 @@ function getModulesContent(ctx) {
|
|
|
8681
9647
|
modules: modules$1
|
|
8682
9648
|
};
|
|
8683
9649
|
} catch (error) {
|
|
8684
|
-
|
|
9650
|
+
log$3(`Failed to transform request for ${pathId}:`, error);
|
|
8685
9651
|
return {
|
|
8686
9652
|
pathId,
|
|
8687
9653
|
modules: null,
|
|
@@ -8727,7 +9693,7 @@ function getModulesContent(ctx) {
|
|
|
8727
9693
|
} catch {}
|
|
8728
9694
|
return [];
|
|
8729
9695
|
} catch (error) {
|
|
8730
|
-
|
|
9696
|
+
log$3(`Failed to parse qwik code for ${pathId}:`, error);
|
|
8731
9697
|
return [];
|
|
8732
9698
|
}
|
|
8733
9699
|
}
|
|
@@ -8747,30 +9713,6 @@ function getServerFunctions(ctx) {
|
|
|
8747
9713
|
};
|
|
8748
9714
|
}
|
|
8749
9715
|
|
|
8750
|
-
//#endregion
|
|
8751
|
-
//#region src/utils/useCollectHooks.ts
|
|
8752
|
-
const useCollectHooks = `import { $, useSignal, useVisibleTask$ } from "@qwik.dev/core"
|
|
8753
|
-
export const useCollectHooks = (src) => {
|
|
8754
|
-
const hooksList = useSignal(new Set())
|
|
8755
|
-
useVisibleTask$(({ track }) => {
|
|
8756
|
-
const newdata = track(() => hooksList.value);
|
|
8757
|
-
if(!window.QWIK_DEVTOOLS_GLOBAL_STATE) {
|
|
8758
|
-
window.QWIK_DEVTOOLS_GLOBAL_STATE = {}
|
|
8759
|
-
window.QWIK_DEVTOOLS_GLOBAL_STATE[src] = [...newdata]
|
|
8760
|
-
}else {
|
|
8761
|
-
window.QWIK_DEVTOOLS_GLOBAL_STATE[src] = [...newdata]
|
|
8762
|
-
}
|
|
8763
|
-
}, { strategy: 'document-ready'})
|
|
8764
|
-
return $((args) => {
|
|
8765
|
-
if(hooksList.value.has(args)) {
|
|
8766
|
-
return
|
|
8767
|
-
}
|
|
8768
|
-
hooksList.value.add(args)
|
|
8769
|
-
})
|
|
8770
|
-
}
|
|
8771
|
-
`;
|
|
8772
|
-
var useCollectHooks_default = useCollectHooks;
|
|
8773
|
-
|
|
8774
9716
|
//#endregion
|
|
8775
9717
|
//#region src/utils/updateConf.ts
|
|
8776
9718
|
function updateConf(conf) {
|
|
@@ -8796,59 +9738,328 @@ function updateConf(conf) {
|
|
|
8796
9738
|
var updateConf_default = updateConf;
|
|
8797
9739
|
|
|
8798
9740
|
//#endregion
|
|
8799
|
-
//#region src/
|
|
8800
|
-
|
|
8801
|
-
|
|
9741
|
+
//#region src/virtualmodules/useCollectHooks.ts
|
|
9742
|
+
/**
|
|
9743
|
+
* Virtual module source for devtools tracking.
|
|
9744
|
+
* Collects hooks and tracks render statistics.
|
|
9745
|
+
*/
|
|
9746
|
+
const useCollectHooks = `import { $, useSignal, useVisibleTask$ } from "@qwik.dev/core"
|
|
9747
|
+
|
|
9748
|
+
function initComponentState() {
|
|
9749
|
+
return {
|
|
9750
|
+
hooks: [],
|
|
9751
|
+
stats: {}
|
|
9752
|
+
}
|
|
9753
|
+
}
|
|
9754
|
+
|
|
9755
|
+
function getOrCreateState(src) {
|
|
9756
|
+
if (!window.QWIK_DEVTOOLS_GLOBAL_STATE) {
|
|
9757
|
+
window.QWIK_DEVTOOLS_GLOBAL_STATE = {}
|
|
9758
|
+
}
|
|
9759
|
+
if (!window.QWIK_DEVTOOLS_GLOBAL_STATE[src]) {
|
|
9760
|
+
window.QWIK_DEVTOOLS_GLOBAL_STATE[src] = initComponentState()
|
|
9761
|
+
}
|
|
9762
|
+
return window.QWIK_DEVTOOLS_GLOBAL_STATE[src]
|
|
9763
|
+
}
|
|
9764
|
+
|
|
9765
|
+
/**
|
|
9766
|
+
* Hook to collect component hooks
|
|
9767
|
+
*/
|
|
9768
|
+
export const useCollectHooks = (src) => {
|
|
9769
|
+
const hooksList = useSignal(new Set())
|
|
9770
|
+
useVisibleTask$(({ track }) => {
|
|
9771
|
+
const newHooks = track(() => hooksList.value)
|
|
9772
|
+
const state = getOrCreateState(src)
|
|
9773
|
+
state.hooks = [...newHooks]
|
|
9774
|
+
}, { strategy: 'document-ready' })
|
|
9775
|
+
|
|
9776
|
+
return $((args) => {
|
|
9777
|
+
if (hooksList.value.has(args)) {
|
|
9778
|
+
return
|
|
9779
|
+
}
|
|
9780
|
+
hooksList.value.add(args)
|
|
9781
|
+
})
|
|
9782
|
+
}
|
|
9783
|
+
`;
|
|
9784
|
+
var useCollectHooks_default = useCollectHooks;
|
|
9785
|
+
|
|
9786
|
+
//#endregion
|
|
9787
|
+
//#region src/virtualmodules/perfRuntime.ts
|
|
9788
|
+
/**
|
|
9789
|
+
* Shared runtime snippet used by perf instrumentation code.
|
|
9790
|
+
*
|
|
9791
|
+
* This file exports a **string** (not executable TS) that gets concatenated into:
|
|
9792
|
+
* - the virtual module `virtual:qwik-component-proxy`
|
|
9793
|
+
* - injected wrappers for Qwik-generated `_component_` render-function modules
|
|
9794
|
+
*
|
|
9795
|
+
* It is intentionally framework-agnostic and relies only on `window`/`process`.
|
|
9796
|
+
*/
|
|
9797
|
+
const perfRuntime = `
|
|
9798
|
+
// [qwik-perf-runtime] shared helpers (injected)
|
|
9799
|
+
const __qwik_perf_is_server__ = () => typeof window === 'undefined';
|
|
9800
|
+
|
|
9801
|
+
const __qwik_perf_init_csr__ = () => {
|
|
9802
|
+
if (typeof window === 'undefined') return;
|
|
9803
|
+
window.__QWIK_PERF__ = window.__QWIK_PERF__ || { ssr: [], csr: [] };
|
|
9804
|
+
// Map: viteId -> index in perf.csr (used for upsert)
|
|
9805
|
+
window.__QWIK_PERF__._csrByViteId = window.__QWIK_PERF__._csrByViteId || {};
|
|
9806
|
+
// Map: component -> index in perf.ssr (used for componentQrl upsert on CSR)
|
|
9807
|
+
window.__QWIK_PERF__._ssrByComponent = window.__QWIK_PERF__._ssrByComponent || {};
|
|
9808
|
+
};
|
|
9809
|
+
|
|
9810
|
+
const __qwik_perf_get_ssr_store__ = () =>
|
|
9811
|
+
typeof process !== 'undefined' && process ? process : globalThis;
|
|
9812
|
+
|
|
9813
|
+
const __qwik_perf_to_error__ = (err) => ({
|
|
9814
|
+
name: (err && err.name) || 'Error',
|
|
9815
|
+
message: err && err.message ? String(err.message) : String(err),
|
|
9816
|
+
});
|
|
9817
|
+
|
|
9818
|
+
const __qwik_perf_next_id__ = (perf) => {
|
|
9819
|
+
perf._id = (perf._id || 0) + 1;
|
|
9820
|
+
return perf._id;
|
|
9821
|
+
};
|
|
9822
|
+
|
|
9823
|
+
const __qwik_perf_next_ssr_id__ = (store) => {
|
|
9824
|
+
store.__QWIK_SSR_PERF_ID__ = (store.__QWIK_SSR_PERF_ID__ || 0) + 1;
|
|
9825
|
+
return store.__QWIK_SSR_PERF_ID__;
|
|
9826
|
+
};
|
|
9827
|
+
|
|
9828
|
+
const __qwik_perf_ssr_push__ = (store, entry) => {
|
|
9829
|
+
const id = __qwik_perf_next_ssr_id__(store);
|
|
9830
|
+
store.__QWIK_SSR_PERF__.push({ id, ...entry });
|
|
9831
|
+
return store.__QWIK_SSR_PERF__.length - 1;
|
|
9832
|
+
};
|
|
9833
|
+
|
|
9834
|
+
const __qwik_perf_commit_ssr__ = (store, entry) => {
|
|
9835
|
+
store.__QWIK_SSR_PERF__ = store.__QWIK_SSR_PERF__ || [];
|
|
9836
|
+
|
|
9837
|
+
// Upsert by key (viteId preferred, otherwise component). Keep only the latest entry per key,
|
|
9838
|
+
// but also attach an ever-increasing ssrCount so we can see how many times it rendered.
|
|
9839
|
+
store.__QWIK_SSR_PERF_INDEX__ = store.__QWIK_SSR_PERF_INDEX__ || {};
|
|
9840
|
+
store.__QWIK_SSR_PERF_COUNT__ = store.__QWIK_SSR_PERF_COUNT__ || {};
|
|
9841
|
+
|
|
9842
|
+
const key = (entry && (entry.viteId || entry.component)) || 'unknown';
|
|
9843
|
+
const nextCount = (store.__QWIK_SSR_PERF_COUNT__[key] || 0) + 1;
|
|
9844
|
+
store.__QWIK_SSR_PERF_COUNT__[key] = nextCount;
|
|
9845
|
+
|
|
9846
|
+
const next = { ...entry, ssrCount: nextCount };
|
|
9847
|
+
const existingIdx = store.__QWIK_SSR_PERF_INDEX__[key];
|
|
9848
|
+
|
|
9849
|
+
if (typeof existingIdx === 'number') {
|
|
9850
|
+
const prev = store.__QWIK_SSR_PERF__[existingIdx];
|
|
9851
|
+
store.__QWIK_SSR_PERF__[existingIdx] = { id: prev?.id, ...next };
|
|
9852
|
+
} else {
|
|
9853
|
+
store.__QWIK_SSR_PERF_INDEX__[key] = __qwik_perf_ssr_push__(store, next);
|
|
9854
|
+
}
|
|
9855
|
+
};
|
|
9856
|
+
|
|
9857
|
+
const __qwik_perf_commit_csr__ = (entry) => {
|
|
9858
|
+
__qwik_perf_init_csr__();
|
|
9859
|
+
const perf = window.__QWIK_PERF__;
|
|
9860
|
+
const next = { id: __qwik_perf_next_id__(perf), ...entry };
|
|
9861
|
+
|
|
9862
|
+
// If viteId exists we treat it as an "upsert" record (render-function modules).
|
|
9863
|
+
if (entry && entry.viteId) {
|
|
9864
|
+
const idx = perf._csrByViteId[entry.viteId];
|
|
9865
|
+
if (typeof idx === 'number') perf.csr[idx] = next;
|
|
9866
|
+
else {
|
|
9867
|
+
perf._csrByViteId[entry.viteId] = perf.csr.length;
|
|
9868
|
+
perf.csr.push(next);
|
|
9869
|
+
}
|
|
9870
|
+
return;
|
|
9871
|
+
}
|
|
9872
|
+
|
|
9873
|
+
perf.csr.push(next);
|
|
9874
|
+
};
|
|
9875
|
+
|
|
9876
|
+
// Force componentQrl entries to be treated as SSR records.
|
|
9877
|
+
// - On SSR: store into process/globalThis __QWIK_SSR_PERF__ (same as other SSR entries)
|
|
9878
|
+
// - On CSR: store into window.__QWIK_PERF__.ssr (so csr only contains render-function modules)
|
|
9879
|
+
const __qwik_perf_commit_componentqrl__ = (entry) => {
|
|
9880
|
+
const next = { ...entry, phase: 'ssr'};
|
|
9881
|
+
if (__qwik_perf_is_server__()) {
|
|
9882
|
+
const store = __qwik_perf_get_ssr_store__();
|
|
9883
|
+
__qwik_perf_commit_ssr__(store, next);
|
|
9884
|
+
return;
|
|
9885
|
+
}
|
|
9886
|
+
|
|
9887
|
+
__qwik_perf_init_csr__();
|
|
9888
|
+
const perf = window.__QWIK_PERF__;
|
|
9889
|
+
perf.ssr = perf.ssr || [];
|
|
9890
|
+
// Build index lazily from any SSR-injected snapshot
|
|
9891
|
+
if (!perf._ssrIndexBuilt) {
|
|
9892
|
+
for (let i = 0; i < perf.ssr.length; i++) {
|
|
9893
|
+
const e = perf.ssr[i];
|
|
9894
|
+
if (e && e.component && typeof perf._ssrByComponent[e.component] !== 'number') {
|
|
9895
|
+
perf._ssrByComponent[e.component] = i;
|
|
9896
|
+
}
|
|
9897
|
+
}
|
|
9898
|
+
perf._ssrIndexBuilt = true;
|
|
9899
|
+
}
|
|
9900
|
+
|
|
9901
|
+
const key = next && next.component;
|
|
9902
|
+
const idx = key ? perf._ssrByComponent[key] : undefined;
|
|
9903
|
+
if (typeof idx === 'number') {
|
|
9904
|
+
const prev = perf.ssr[idx];
|
|
9905
|
+
const prevCount = prev && typeof prev.ssrCount === 'number' ? prev.ssrCount : 0;
|
|
9906
|
+
const ssrCount = prevCount + 1;
|
|
9907
|
+
perf.ssr[idx] = { id: prev && prev.id, ...next, ssrCount };
|
|
9908
|
+
} else {
|
|
9909
|
+
const id = __qwik_perf_next_id__(perf);
|
|
9910
|
+
if (key) perf._ssrByComponent[key] = perf.ssr.length;
|
|
9911
|
+
perf.ssr.push({ id, ...next, ssrCount: 1 });
|
|
9912
|
+
}
|
|
9913
|
+
};
|
|
9914
|
+
|
|
9915
|
+
const __qwik_perf_commit__ = (entry) => {
|
|
9916
|
+
if (__qwik_perf_is_server__()) {
|
|
9917
|
+
const store = __qwik_perf_get_ssr_store__();
|
|
9918
|
+
__qwik_perf_commit_ssr__(store, entry);
|
|
9919
|
+
} else {
|
|
9920
|
+
__qwik_perf_commit_csr__(entry);
|
|
9921
|
+
}
|
|
9922
|
+
};
|
|
9923
|
+
`;
|
|
9924
|
+
var perfRuntime_default = perfRuntime;
|
|
9925
|
+
|
|
9926
|
+
//#endregion
|
|
9927
|
+
//#region src/virtualmodules/qwikComponentProxy.ts
|
|
9928
|
+
const qwikComponentProxy$1 = `${perfRuntime_default}
|
|
9929
|
+
import { componentQrl as originalComponentQrl } from '@qwik.dev/core';
|
|
9930
|
+
|
|
9931
|
+
function componentQrl(qrl, options) {
|
|
9932
|
+
const phase = __qwik_perf_is_server__() ? 'ssr' : 'csr';
|
|
9933
|
+
const start = performance.now();
|
|
9934
|
+
let viteId = null;
|
|
9935
|
+
const component = qrl?.getSymbol?.() || qrl?.$symbol$ || 'unknown';
|
|
9936
|
+
if(qrl.dev){
|
|
9937
|
+
viteId = qrl.dev.file.replace(/[^/]*$/, qrl.dev.displayName);
|
|
9938
|
+
}
|
|
9939
|
+
try {
|
|
9940
|
+
const result = originalComponentQrl(qrl, options);
|
|
9941
|
+
const duration = performance.now() - start;
|
|
9942
|
+
__qwik_perf_commit_componentqrl__({
|
|
9943
|
+
component,
|
|
9944
|
+
phase,
|
|
9945
|
+
duration,
|
|
9946
|
+
start,
|
|
9947
|
+
viteId,
|
|
9948
|
+
end: start + duration,
|
|
9949
|
+
});
|
|
9950
|
+
return result;
|
|
9951
|
+
} catch (err) {
|
|
9952
|
+
const duration = performance.now() - start;
|
|
9953
|
+
__qwik_perf_commit_componentqrl__({
|
|
9954
|
+
component,
|
|
9955
|
+
phase,
|
|
9956
|
+
duration,
|
|
9957
|
+
start,
|
|
9958
|
+
viteId,
|
|
9959
|
+
end: start + duration,
|
|
9960
|
+
error: __qwik_perf_to_error__(err),
|
|
9961
|
+
});
|
|
9962
|
+
throw err;
|
|
9963
|
+
}
|
|
9964
|
+
}
|
|
9965
|
+
|
|
9966
|
+
export { componentQrl };
|
|
9967
|
+
`;
|
|
9968
|
+
var qwikComponentProxy_default = qwikComponentProxy$1;
|
|
9969
|
+
|
|
9970
|
+
//#endregion
|
|
9971
|
+
//#region src/virtualmodules/virtualModules.ts
|
|
9972
|
+
const log$2 = (0, import_src.debug)("qwik:devtools:plugin");
|
|
9973
|
+
const VIRTUAL_MODULES = [{
|
|
9974
|
+
key: VIRTUAL_QWIK_DEVTOOLS_KEY,
|
|
9975
|
+
source: useCollectHooks_default,
|
|
9976
|
+
hookName: INNER_USE_HOOK
|
|
9977
|
+
}, {
|
|
9978
|
+
key: "virtual:qwik-component-proxy",
|
|
9979
|
+
source: qwikComponentProxy_default,
|
|
9980
|
+
hookName: ""
|
|
9981
|
+
}];
|
|
9982
|
+
function normalizeId(id) {
|
|
9983
|
+
return id.split("?")[0].split("#")[0];
|
|
9984
|
+
}
|
|
9985
|
+
function getIdVariations(key) {
|
|
9986
|
+
return [
|
|
9987
|
+
key,
|
|
9988
|
+
`/${key}`,
|
|
9989
|
+
`\u0000${key}`,
|
|
9990
|
+
`/@id/${key}`
|
|
9991
|
+
];
|
|
9992
|
+
}
|
|
9993
|
+
function isVirtualId(id, key) {
|
|
9994
|
+
return getIdVariations(key).includes(normalizeId(id));
|
|
9995
|
+
}
|
|
9996
|
+
function findVirtualModule(id) {
|
|
9997
|
+
return VIRTUAL_MODULES.find((module$1) => isVirtualId(id, module$1.key));
|
|
9998
|
+
}
|
|
9999
|
+
function injectImportIfMissing(code, key, hookName) {
|
|
10000
|
+
if (!code.includes(key)) return `import { ${hookName} } from '${key}';\n${code}`;
|
|
10001
|
+
log$2("importing virtual qwik devtools", key, code);
|
|
10002
|
+
return code;
|
|
10003
|
+
}
|
|
10004
|
+
function transformComponentFile(code, id) {
|
|
10005
|
+
code = injectImportIfMissing(code, VIRTUAL_QWIK_DEVTOOLS_KEY, INNER_USE_HOOK);
|
|
10006
|
+
return parseQwikCode(code, { path: id });
|
|
10007
|
+
}
|
|
10008
|
+
function transformRootFile(code) {
|
|
10009
|
+
const mode = process.env.MODE;
|
|
10010
|
+
const importPath = mode === "dev" ? "@devtools/ui" : "@qwik.dev/devtools/ui";
|
|
10011
|
+
if (!code.includes(importPath)) code = `import { QwikDevtools } from '${importPath}';\n${code}`;
|
|
10012
|
+
const bodyMatch = code.match(/<body[^>]*>([\s\S]*?)<\/body>/);
|
|
10013
|
+
if (bodyMatch) {
|
|
10014
|
+
const bodyContent = bodyMatch[1];
|
|
10015
|
+
const newBodyContent = `${bodyContent}\n <QwikDevtools />`;
|
|
10016
|
+
code = code.replace(bodyContent, newBodyContent);
|
|
10017
|
+
}
|
|
10018
|
+
return code;
|
|
10019
|
+
}
|
|
10020
|
+
|
|
10021
|
+
//#endregion
|
|
10022
|
+
//#region src/plugin/devtools.ts
|
|
10023
|
+
const log$1 = (0, import_src.debug)("qwik:devtools:plugin");
|
|
10024
|
+
/**
|
|
10025
|
+
* Core Qwik DevTools plugin
|
|
10026
|
+
*/
|
|
10027
|
+
function devtoolsPlugin() {
|
|
10028
|
+
let resolvedConfig;
|
|
8802
10029
|
const qwikData = new Map();
|
|
8803
10030
|
let preloadStarted = false;
|
|
8804
|
-
|
|
10031
|
+
return {
|
|
8805
10032
|
name: "vite-plugin-qwik-devtools",
|
|
8806
10033
|
apply: "serve",
|
|
8807
10034
|
resolveId(id) {
|
|
8808
|
-
const
|
|
8809
|
-
if (
|
|
10035
|
+
const virtualModule = findVirtualModule(id);
|
|
10036
|
+
if (virtualModule) return `/${virtualModule.key}`;
|
|
8810
10037
|
},
|
|
8811
10038
|
load(id) {
|
|
8812
|
-
|
|
8813
|
-
|
|
10039
|
+
const virtualModule = findVirtualModule(id);
|
|
10040
|
+
if (virtualModule) return {
|
|
10041
|
+
code: virtualModule.source,
|
|
8814
10042
|
map: { mappings: "" }
|
|
8815
10043
|
};
|
|
8816
10044
|
},
|
|
8817
10045
|
configResolved(viteConfig) {
|
|
8818
|
-
|
|
8819
|
-
updateConf_default(
|
|
10046
|
+
resolvedConfig = viteConfig;
|
|
10047
|
+
updateConf_default(resolvedConfig);
|
|
8820
10048
|
if (!preloadStarted) {
|
|
8821
10049
|
preloadStarted = true;
|
|
8822
|
-
startPreloading({ config:
|
|
8823
|
-
|
|
10050
|
+
startPreloading({ config: resolvedConfig }).catch((err) => {
|
|
10051
|
+
log$1("[Qwik DevTools] Failed to start preloading:", err);
|
|
8824
10052
|
});
|
|
8825
10053
|
}
|
|
8826
10054
|
},
|
|
8827
10055
|
transform: {
|
|
8828
10056
|
order: "pre",
|
|
8829
10057
|
handler(code, id) {
|
|
8830
|
-
|
|
8831
|
-
if (id.endsWith(".tsx")
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
} else console.log("importing virtual qwik devtools", VIRTUAL_QWIK_DEVTOOLS_KEY, code);
|
|
8836
|
-
code = parseQwikCode(code, { path: id });
|
|
8837
|
-
}
|
|
8838
|
-
if (id.endsWith("root.tsx")) {
|
|
8839
|
-
const importPath = mode === "dev" ? "@devtools/ui" : "@qwik.dev/devtools/ui";
|
|
8840
|
-
if (!code.includes(importPath)) code = `import { QwikDevtools } from '${importPath}';\n${code}`;
|
|
8841
|
-
const match$1 = code.match(/<body[^>]*>([\s\S]*?)<\/body>/);
|
|
8842
|
-
if (match$1) {
|
|
8843
|
-
const bodyContent = match$1[1];
|
|
8844
|
-
const newBodyContent = `${bodyContent}\n <QwikDevtools />`;
|
|
8845
|
-
code = code.replace(bodyContent, newBodyContent);
|
|
8846
|
-
}
|
|
8847
|
-
return {
|
|
8848
|
-
code,
|
|
8849
|
-
map: null
|
|
8850
|
-
};
|
|
8851
|
-
}
|
|
10058
|
+
if (id.endsWith(".tsx") && code.includes("component$")) code = transformComponentFile(code, id);
|
|
10059
|
+
if (id.endsWith("root.tsx")) return {
|
|
10060
|
+
code: transformRootFile(code),
|
|
10061
|
+
map: null
|
|
10062
|
+
};
|
|
8852
10063
|
return {
|
|
8853
10064
|
code,
|
|
8854
10065
|
map: { mappings: "" }
|
|
@@ -8859,13 +10070,253 @@ function qwikDevtools() {
|
|
|
8859
10070
|
setViteServerContext(server);
|
|
8860
10071
|
const rpcFunctions = getServerFunctions({
|
|
8861
10072
|
server,
|
|
8862
|
-
config:
|
|
10073
|
+
config: resolvedConfig,
|
|
8863
10074
|
qwikData
|
|
8864
10075
|
});
|
|
8865
10076
|
createServerRpc(rpcFunctions);
|
|
8866
10077
|
}
|
|
8867
10078
|
};
|
|
8868
|
-
|
|
10079
|
+
}
|
|
10080
|
+
|
|
10081
|
+
//#endregion
|
|
10082
|
+
//#region src/virtualmodules/perfLazyWrapperPreamble.ts
|
|
10083
|
+
/**
|
|
10084
|
+
* Preamble injected into Qwik-generated lazy render function modules (`_component_...`).
|
|
10085
|
+
*
|
|
10086
|
+
* It defines `__qwik_wrap__` that wraps each exported render function and records perf entries.
|
|
10087
|
+
*/
|
|
10088
|
+
const perfLazyWrapperPreamble = `${perfRuntime_default}
|
|
10089
|
+
|
|
10090
|
+
// [qwik-component-proxy] Render function wrapper
|
|
10091
|
+
const __qwik_wrap__ = (fn, name, viteId) => {
|
|
10092
|
+
let renderCount = 0;
|
|
10093
|
+
return function (...args) {
|
|
10094
|
+
renderCount += 1;
|
|
10095
|
+
const phase = __qwik_perf_is_server__() ? 'ssr' : 'csr';
|
|
10096
|
+
const start = performance.now();
|
|
10097
|
+
|
|
10098
|
+
try {
|
|
10099
|
+
const result = fn.apply(this, args);
|
|
10100
|
+
const duration = performance.now() - start;
|
|
10101
|
+
__qwik_perf_commit__({
|
|
10102
|
+
component: name,
|
|
10103
|
+
phase,
|
|
10104
|
+
duration,
|
|
10105
|
+
start,
|
|
10106
|
+
end: start + duration,
|
|
10107
|
+
viteId,
|
|
10108
|
+
renderCount,
|
|
10109
|
+
});
|
|
10110
|
+
return result;
|
|
10111
|
+
} catch (err) {
|
|
10112
|
+
const duration = performance.now() - start;
|
|
10113
|
+
__qwik_perf_commit__({
|
|
10114
|
+
component: name,
|
|
10115
|
+
phase,
|
|
10116
|
+
duration,
|
|
10117
|
+
start,
|
|
10118
|
+
end: start + duration,
|
|
10119
|
+
error: __qwik_perf_to_error__(err),
|
|
10120
|
+
viteId,
|
|
10121
|
+
renderCount,
|
|
10122
|
+
});
|
|
10123
|
+
throw err;
|
|
10124
|
+
}
|
|
10125
|
+
};
|
|
10126
|
+
};
|
|
10127
|
+
`;
|
|
10128
|
+
var perfLazyWrapperPreamble_default = perfLazyWrapperPreamble;
|
|
10129
|
+
|
|
10130
|
+
//#endregion
|
|
10131
|
+
//#region src/plugin/statistics.ts
|
|
10132
|
+
/**
|
|
10133
|
+
* Statistics plugin: collect Qwik render performance.
|
|
10134
|
+
*
|
|
10135
|
+
* Responsibilities (kept similar to `plugin/devtools.ts` structure):
|
|
10136
|
+
* - Transform: rewrite `componentQrl` imports to a virtual module
|
|
10137
|
+
* - Transform: wrap Qwik-generated lazy render modules (`_component_`) to record perf entries
|
|
10138
|
+
* - Dev SSR: inject SSR perf snapshot into final HTML
|
|
10139
|
+
*
|
|
10140
|
+
* The virtual module source for `componentQrl` is registered in:
|
|
10141
|
+
* - `packages/plugin/src/virtualmodules/qwikComponentProxy.ts`
|
|
10142
|
+
* and is served by the core devtools plugin (`plugin/devtools.ts`) via `virtualmodules/virtualModules.ts`.
|
|
10143
|
+
*
|
|
10144
|
+
* Data sinks:
|
|
10145
|
+
* - **CSR**: `window.__QWIK_PERF__ = { ssr: [], csr: [] }`
|
|
10146
|
+
* - **SSR**: stored on `process` (preferred) or `globalThis` as `__QWIK_SSR_PERF__`
|
|
10147
|
+
*/
|
|
10148
|
+
const PERF_VIRTUAL_ID = "virtual:qwik-component-proxy";
|
|
10149
|
+
const log = (0, import_src.debug)("qwik:devtools:perf");
|
|
10150
|
+
function getStoreForSSR() {
|
|
10151
|
+
return typeof process !== "undefined" && process ? process : globalThis;
|
|
10152
|
+
}
|
|
10153
|
+
function isFromNodeModules(cleanId) {
|
|
10154
|
+
return cleanId.includes("/node_modules/") || cleanId.includes("\\node_modules\\");
|
|
10155
|
+
}
|
|
10156
|
+
function isUiLibBuildOutput(cleanId) {
|
|
10157
|
+
return cleanId.includes("/packages/ui/lib/") || cleanId.includes("\\packages\\ui\\lib\\");
|
|
10158
|
+
}
|
|
10159
|
+
function shouldTransformSource(id) {
|
|
10160
|
+
const cleanId = normalizeId(id);
|
|
10161
|
+
return !isFromNodeModules(cleanId) && !isUiLibBuildOutput(cleanId);
|
|
10162
|
+
}
|
|
10163
|
+
function isPerfVirtualModuleId(id) {
|
|
10164
|
+
return isVirtualId(id, PERF_VIRTUAL_ID);
|
|
10165
|
+
}
|
|
10166
|
+
function rewriteComponentQrlImport(code, id) {
|
|
10167
|
+
if (!code.includes("@qwik.dev/core") || !code.includes("componentQrl")) return {
|
|
10168
|
+
code,
|
|
10169
|
+
changed: false
|
|
10170
|
+
};
|
|
10171
|
+
const importRe = /import\s*\{([^}]*)\}\s*from\s*['"]@qwik\.dev\/core['"]/g;
|
|
10172
|
+
let changed = false;
|
|
10173
|
+
const next = code.replace(importRe, (match$1, imports) => {
|
|
10174
|
+
const importList = String(imports).split(",").map((s$1) => s$1.trim()).filter(Boolean);
|
|
10175
|
+
const hasComponentQrl = importList.some((imp) => imp === "componentQrl" || imp.startsWith("componentQrl "));
|
|
10176
|
+
if (!hasComponentQrl) return match$1;
|
|
10177
|
+
changed = true;
|
|
10178
|
+
log("rewrite componentQrl import %O", {
|
|
10179
|
+
id,
|
|
10180
|
+
isVirtual: normalizeId(id).startsWith("\0")
|
|
10181
|
+
});
|
|
10182
|
+
const filteredImports = importList.filter((imp) => imp !== "componentQrl" && !imp.startsWith("componentQrl "));
|
|
10183
|
+
if (filteredImports.length === 0) return `import { componentQrl } from '${PERF_VIRTUAL_ID}'`;
|
|
10184
|
+
return `import { ${filteredImports.join(", ")} } from '@qwik.dev/core';\nimport { componentQrl } from '${PERF_VIRTUAL_ID}'`;
|
|
10185
|
+
});
|
|
10186
|
+
return {
|
|
10187
|
+
code: next,
|
|
10188
|
+
changed
|
|
10189
|
+
};
|
|
10190
|
+
}
|
|
10191
|
+
function findQwikLazyComponentExports(code) {
|
|
10192
|
+
const exportRe = /export\s+const\s+(\w+_component_\w+)\s*=/g;
|
|
10193
|
+
const exports$1 = [];
|
|
10194
|
+
let match$1;
|
|
10195
|
+
while ((match$1 = exportRe.exec(code)) !== null) exports$1.push(match$1[1]);
|
|
10196
|
+
return exports$1;
|
|
10197
|
+
}
|
|
10198
|
+
function replaceExportWithOriginal(code, exportName) {
|
|
10199
|
+
return code.replace(new RegExp(`export\\s+const\\s+${exportName}\\s*=`), `const __original_${exportName}__ =`);
|
|
10200
|
+
}
|
|
10201
|
+
function appendWrappedExport(code, exportName, id) {
|
|
10202
|
+
return code + `
|
|
10203
|
+
export const ${exportName} = __qwik_wrap__(__original_${exportName}__, '${exportName}', '${id}');
|
|
10204
|
+
`;
|
|
10205
|
+
}
|
|
10206
|
+
function wrapQwikLazyComponentExports(params) {
|
|
10207
|
+
const { exports: exports$1, id } = params;
|
|
10208
|
+
if (exports$1.length === 0) return {
|
|
10209
|
+
code: params.code,
|
|
10210
|
+
changed: false
|
|
10211
|
+
};
|
|
10212
|
+
log("wrap _component_ exports %O", {
|
|
10213
|
+
id,
|
|
10214
|
+
count: exports$1.length
|
|
10215
|
+
});
|
|
10216
|
+
let modifiedCode = perfLazyWrapperPreamble_default + params.code;
|
|
10217
|
+
for (const exportName of exports$1) {
|
|
10218
|
+
modifiedCode = replaceExportWithOriginal(modifiedCode, exportName);
|
|
10219
|
+
modifiedCode = appendWrappedExport(modifiedCode, exportName, id);
|
|
10220
|
+
}
|
|
10221
|
+
return {
|
|
10222
|
+
code: modifiedCode,
|
|
10223
|
+
changed: true
|
|
10224
|
+
};
|
|
10225
|
+
}
|
|
10226
|
+
function createSsrPerfInjectionScript(entries) {
|
|
10227
|
+
return `
|
|
10228
|
+
<script>
|
|
10229
|
+
window.__QWIK_PERF__ = window.__QWIK_PERF__ || { ssr: [], csr: [] };
|
|
10230
|
+
window.__QWIK_PERF__.ssr = ${JSON.stringify(entries)};
|
|
10231
|
+
window.dispatchEvent(new CustomEvent('qwik:ssr-perf', { detail: ${JSON.stringify(entries)} }));
|
|
10232
|
+
</script>`;
|
|
10233
|
+
}
|
|
10234
|
+
function attachSsrPerfInjectorMiddleware(server) {
|
|
10235
|
+
server.middlewares.use((req, res, next) => {
|
|
10236
|
+
const accept = req.headers.accept || "";
|
|
10237
|
+
if (!accept.includes("text/html")) return next();
|
|
10238
|
+
const store = getStoreForSSR();
|
|
10239
|
+
const originalWrite = res.write.bind(res);
|
|
10240
|
+
const originalEnd = res.end.bind(res);
|
|
10241
|
+
let body = "";
|
|
10242
|
+
res.write = function(chunk, encodingOrCallback, callback) {
|
|
10243
|
+
if (chunk) body += typeof chunk === "string" ? chunk : Buffer.from(chunk).toString();
|
|
10244
|
+
if (typeof encodingOrCallback === "function") encodingOrCallback();
|
|
10245
|
+
if (typeof callback === "function") callback();
|
|
10246
|
+
return true;
|
|
10247
|
+
};
|
|
10248
|
+
res.end = function(chunk, encodingOrCallback, callback) {
|
|
10249
|
+
if (chunk) body += typeof chunk === "string" ? chunk : Buffer.from(chunk).toString();
|
|
10250
|
+
if (body.includes("</head>")) {
|
|
10251
|
+
const rawArr = store.__QWIK_SSR_PERF__;
|
|
10252
|
+
const entries = Array.isArray(rawArr) ? rawArr : [];
|
|
10253
|
+
log("inject ssr perf %O", {
|
|
10254
|
+
url: req.url,
|
|
10255
|
+
total: entries.length
|
|
10256
|
+
});
|
|
10257
|
+
const script = createSsrPerfInjectionScript(entries);
|
|
10258
|
+
body = body.replace(/<head(\s[^>]*)?>/i, (m$1) => `${m$1}${script}`);
|
|
10259
|
+
}
|
|
10260
|
+
try {
|
|
10261
|
+
res.setHeader("Content-Length", Buffer.byteLength(body));
|
|
10262
|
+
} catch {}
|
|
10263
|
+
originalWrite(body);
|
|
10264
|
+
if (typeof encodingOrCallback === "function") encodingOrCallback();
|
|
10265
|
+
if (typeof callback === "function") callback();
|
|
10266
|
+
return originalEnd();
|
|
10267
|
+
};
|
|
10268
|
+
next();
|
|
10269
|
+
});
|
|
10270
|
+
}
|
|
10271
|
+
function statisticsPlugin() {
|
|
10272
|
+
return {
|
|
10273
|
+
name: "vite:qwik-component-proxy-transform",
|
|
10274
|
+
enforce: "post",
|
|
10275
|
+
transform(code, id) {
|
|
10276
|
+
if (isPerfVirtualModuleId(id)) return null;
|
|
10277
|
+
if (!shouldTransformSource(id)) return null;
|
|
10278
|
+
let modifiedCode = code;
|
|
10279
|
+
let hasChanges = false;
|
|
10280
|
+
const rewritten = rewriteComponentQrlImport(modifiedCode, id);
|
|
10281
|
+
modifiedCode = rewritten.code;
|
|
10282
|
+
hasChanges = hasChanges || rewritten.changed;
|
|
10283
|
+
const cleanId = normalizeId(id);
|
|
10284
|
+
if (cleanId.includes("_component_")) {
|
|
10285
|
+
const exports$1 = findQwikLazyComponentExports(code);
|
|
10286
|
+
const wrapped = wrapQwikLazyComponentExports({
|
|
10287
|
+
code: modifiedCode,
|
|
10288
|
+
id,
|
|
10289
|
+
exports: exports$1
|
|
10290
|
+
});
|
|
10291
|
+
modifiedCode = wrapped.code;
|
|
10292
|
+
hasChanges = hasChanges || wrapped.changed;
|
|
10293
|
+
}
|
|
10294
|
+
if (!hasChanges) return null;
|
|
10295
|
+
return {
|
|
10296
|
+
code: modifiedCode,
|
|
10297
|
+
map: null
|
|
10298
|
+
};
|
|
10299
|
+
},
|
|
10300
|
+
configureServer(server) {
|
|
10301
|
+
attachSsrPerfInjectorMiddleware(server);
|
|
10302
|
+
}
|
|
10303
|
+
};
|
|
10304
|
+
}
|
|
10305
|
+
function qwikComponentProxy() {
|
|
10306
|
+
return [statisticsPlugin()];
|
|
10307
|
+
}
|
|
10308
|
+
|
|
10309
|
+
//#endregion
|
|
10310
|
+
//#region src/plugin/index.ts
|
|
10311
|
+
/**
|
|
10312
|
+
* Main entry: combines all devtools plugins
|
|
10313
|
+
*/
|
|
10314
|
+
function qwikDevtools() {
|
|
10315
|
+
return [
|
|
10316
|
+
devtoolsPlugin(),
|
|
10317
|
+
VueInspector(),
|
|
10318
|
+
...qwikComponentProxy()
|
|
10319
|
+
];
|
|
8869
10320
|
}
|
|
8870
10321
|
|
|
8871
10322
|
//#endregion
|