@forsakringskassan/vite-lib-config 4.3.2 → 4.3.3
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/api-extractor.js +11 -9
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/vite.config.cjs +76 -74
- package/dist/vite.config.mjs +76 -74
- package/package.json +2 -2
package/dist/api-extractor.js
CHANGED
|
@@ -2706,6 +2706,7 @@ var openPattern = /\\{/g;
|
|
|
2706
2706
|
var closePattern = /\\}/g;
|
|
2707
2707
|
var commaPattern = /\\,/g;
|
|
2708
2708
|
var periodPattern = /\\./g;
|
|
2709
|
+
var EXPANSION_MAX = 1e5;
|
|
2709
2710
|
function numeric(str) {
|
|
2710
2711
|
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
|
2711
2712
|
}
|
|
@@ -2736,14 +2737,15 @@ function parseCommaParts(str) {
|
|
|
2736
2737
|
parts.push.apply(parts, p);
|
|
2737
2738
|
return parts;
|
|
2738
2739
|
}
|
|
2739
|
-
function expand(str) {
|
|
2740
|
+
function expand(str, options = {}) {
|
|
2740
2741
|
if (!str) {
|
|
2741
2742
|
return [];
|
|
2742
2743
|
}
|
|
2744
|
+
const { max = EXPANSION_MAX } = options;
|
|
2743
2745
|
if (str.slice(0, 2) === "{}") {
|
|
2744
2746
|
str = "\\{\\}" + str.slice(2);
|
|
2745
2747
|
}
|
|
2746
|
-
return expand_(escapeBraces(str), true).map(unescapeBraces);
|
|
2748
|
+
return expand_(escapeBraces(str), max, true).map(unescapeBraces);
|
|
2747
2749
|
}
|
|
2748
2750
|
function embrace(str) {
|
|
2749
2751
|
return "{" + str + "}";
|
|
@@ -2757,15 +2759,15 @@ function lte(i, y) {
|
|
|
2757
2759
|
function gte(i, y) {
|
|
2758
2760
|
return i >= y;
|
|
2759
2761
|
}
|
|
2760
|
-
function expand_(str, isTop) {
|
|
2762
|
+
function expand_(str, max, isTop) {
|
|
2761
2763
|
const expansions = [];
|
|
2762
2764
|
const m = balanced("{", "}", str);
|
|
2763
2765
|
if (!m)
|
|
2764
2766
|
return [str];
|
|
2765
2767
|
const pre = m.pre;
|
|
2766
|
-
const post = m.post.length ? expand_(m.post, false) : [""];
|
|
2768
|
+
const post = m.post.length ? expand_(m.post, max, false) : [""];
|
|
2767
2769
|
if (/\$$/.test(m.pre)) {
|
|
2768
|
-
for (let k = 0; k < post.length; k++) {
|
|
2770
|
+
for (let k = 0; k < post.length && k < max; k++) {
|
|
2769
2771
|
const expansion = pre + "{" + m.body + "}" + post[k];
|
|
2770
2772
|
expansions.push(expansion);
|
|
2771
2773
|
}
|
|
@@ -2777,7 +2779,7 @@ function expand_(str, isTop) {
|
|
|
2777
2779
|
if (!isSequence && !isOptions) {
|
|
2778
2780
|
if (m.post.match(/,(?!,).*\}/)) {
|
|
2779
2781
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
2780
|
-
return expand_(str);
|
|
2782
|
+
return expand_(str, max, true);
|
|
2781
2783
|
}
|
|
2782
2784
|
return [str];
|
|
2783
2785
|
}
|
|
@@ -2787,7 +2789,7 @@ function expand_(str, isTop) {
|
|
|
2787
2789
|
} else {
|
|
2788
2790
|
n = parseCommaParts(m.body);
|
|
2789
2791
|
if (n.length === 1 && n[0] !== void 0) {
|
|
2790
|
-
n = expand_(n[0], false).map(embrace);
|
|
2792
|
+
n = expand_(n[0], max, false).map(embrace);
|
|
2791
2793
|
if (n.length === 1) {
|
|
2792
2794
|
return post.map((p) => m.pre + n[0] + p);
|
|
2793
2795
|
}
|
|
@@ -2833,11 +2835,11 @@ function expand_(str, isTop) {
|
|
|
2833
2835
|
} else {
|
|
2834
2836
|
N = [];
|
|
2835
2837
|
for (let j = 0; j < n.length; j++) {
|
|
2836
|
-
N.push.apply(N, expand_(n[j], false));
|
|
2838
|
+
N.push.apply(N, expand_(n[j], max, false));
|
|
2837
2839
|
}
|
|
2838
2840
|
}
|
|
2839
2841
|
for (let j = 0; j < N.length; j++) {
|
|
2840
|
-
for (let k = 0; k < post.length; k++) {
|
|
2842
|
+
for (let k = 0; k < post.length && expansions.length < max; k++) {
|
|
2841
2843
|
const expansion = pre + N[j] + post[k];
|
|
2842
2844
|
if (!isTop || isSequence || expansion) {
|
|
2843
2845
|
expansions.push(expansion);
|
package/dist/tsdoc-metadata.json
CHANGED
package/dist/vite.config.cjs
CHANGED
|
@@ -2871,7 +2871,7 @@ var import_node_fs = __toESM(require("node:fs"), 1);
|
|
|
2871
2871
|
var import_vite = require("vite");
|
|
2872
2872
|
var import_vue = require("vue");
|
|
2873
2873
|
|
|
2874
|
-
// node_modules/@rolldown/pluginutils/dist/simple-filters.js
|
|
2874
|
+
// node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js
|
|
2875
2875
|
function exactRegex(str, flags) {
|
|
2876
2876
|
return new RegExp(`^${escapeRegex(str)}$`, flags);
|
|
2877
2877
|
}
|
|
@@ -2908,7 +2908,7 @@ var import_node_path = __toESM(require("node:path"), 1);
|
|
|
2908
2908
|
var import_node_crypto = __toESM(require("node:crypto"), 1);
|
|
2909
2909
|
var import_node_tty = require("node:tty");
|
|
2910
2910
|
var import_node_util = require("node:util");
|
|
2911
|
-
var version = "6.0.
|
|
2911
|
+
var version = "6.0.4";
|
|
2912
2912
|
function resolveCompiler(root) {
|
|
2913
2913
|
const compiler = tryResolveCompiler(root) || tryResolveCompiler();
|
|
2914
2914
|
if (!compiler) throw new Error("Failed to resolve vue/compiler-sfc.\n@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.");
|
|
@@ -3005,9 +3005,9 @@ function setSrcDescriptor(filename, entry, scoped) {
|
|
|
3005
3005
|
function getHash(text) {
|
|
3006
3006
|
return import_node_crypto.default.hash("sha256", text, "hex").substring(0, 8);
|
|
3007
3007
|
}
|
|
3008
|
-
function slash(
|
|
3009
|
-
if (
|
|
3010
|
-
return
|
|
3008
|
+
function slash(path4) {
|
|
3009
|
+
if (path4.startsWith("\\\\?\\")) return path4;
|
|
3010
|
+
return path4.replace(/\\/g, "/");
|
|
3011
3011
|
}
|
|
3012
3012
|
function createRollupError(id, error) {
|
|
3013
3013
|
const { message, name, stack } = error;
|
|
@@ -3119,9 +3119,9 @@ function resolveTemplateCompilerOptions(descriptor, options, filename, ssr) {
|
|
|
3119
3119
|
}
|
|
3120
3120
|
};
|
|
3121
3121
|
}
|
|
3122
|
-
function canReuseAST(
|
|
3123
|
-
if (
|
|
3124
|
-
const [_, minor, patch] =
|
|
3122
|
+
function canReuseAST(version3) {
|
|
3123
|
+
if (version3) {
|
|
3124
|
+
const [_, minor, patch] = version3.split(".").map(Number);
|
|
3125
3125
|
if (minor >= 4 && patch >= 3) return true;
|
|
3126
3126
|
}
|
|
3127
3127
|
return false;
|
|
@@ -3370,16 +3370,16 @@ function parseAbsoluteUrl(input) {
|
|
|
3370
3370
|
}
|
|
3371
3371
|
function parseFileUrl(input) {
|
|
3372
3372
|
const match2 = fileRegex.exec(input);
|
|
3373
|
-
const
|
|
3374
|
-
return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(
|
|
3373
|
+
const path4 = match2[2];
|
|
3374
|
+
return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path4) ? path4 : "/" + path4, match2[3] || "", match2[4] || "");
|
|
3375
3375
|
}
|
|
3376
|
-
function makeUrl(scheme, user, host, port,
|
|
3376
|
+
function makeUrl(scheme, user, host, port, path4, query, hash) {
|
|
3377
3377
|
return {
|
|
3378
3378
|
scheme,
|
|
3379
3379
|
user,
|
|
3380
3380
|
host,
|
|
3381
3381
|
port,
|
|
3382
|
-
path:
|
|
3382
|
+
path: path4,
|
|
3383
3383
|
query,
|
|
3384
3384
|
hash,
|
|
3385
3385
|
type: 7
|
|
@@ -3387,17 +3387,17 @@ function makeUrl(scheme, user, host, port, path$1, query, hash) {
|
|
|
3387
3387
|
}
|
|
3388
3388
|
function parseUrl(input) {
|
|
3389
3389
|
if (isSchemeRelativeUrl(input)) {
|
|
3390
|
-
const
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
return
|
|
3390
|
+
const url2 = parseAbsoluteUrl("http:" + input);
|
|
3391
|
+
url2.scheme = "";
|
|
3392
|
+
url2.type = 6;
|
|
3393
|
+
return url2;
|
|
3394
3394
|
}
|
|
3395
3395
|
if (isAbsolutePath(input)) {
|
|
3396
|
-
const
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
return
|
|
3396
|
+
const url2 = parseAbsoluteUrl("http://foo.com" + input);
|
|
3397
|
+
url2.scheme = "";
|
|
3398
|
+
url2.host = "";
|
|
3399
|
+
url2.type = 5;
|
|
3400
|
+
return url2;
|
|
3401
3401
|
}
|
|
3402
3402
|
if (isFileUrl(input)) return parseFileUrl(input);
|
|
3403
3403
|
if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);
|
|
@@ -3407,10 +3407,10 @@ function parseUrl(input) {
|
|
|
3407
3407
|
url.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1;
|
|
3408
3408
|
return url;
|
|
3409
3409
|
}
|
|
3410
|
-
function stripPathFilename(
|
|
3411
|
-
if (
|
|
3412
|
-
const index =
|
|
3413
|
-
return
|
|
3410
|
+
function stripPathFilename(path4) {
|
|
3411
|
+
if (path4.endsWith("/..")) return path4;
|
|
3412
|
+
const index = path4.lastIndexOf("/");
|
|
3413
|
+
return path4.slice(0, index + 1);
|
|
3414
3414
|
}
|
|
3415
3415
|
function mergePaths(url, base) {
|
|
3416
3416
|
normalizePath$1(base, base.type);
|
|
@@ -3442,10 +3442,10 @@ function normalizePath$1(url, type) {
|
|
|
3442
3442
|
pieces[pointer++] = piece;
|
|
3443
3443
|
positive++;
|
|
3444
3444
|
}
|
|
3445
|
-
let
|
|
3446
|
-
for (let i = 1; i < pointer; i++)
|
|
3447
|
-
if (!
|
|
3448
|
-
url.path =
|
|
3445
|
+
let path4 = "";
|
|
3446
|
+
for (let i = 1; i < pointer; i++) path4 += "/" + pieces[i];
|
|
3447
|
+
if (!path4 || addTrailingSlash && !path4.endsWith("/..")) path4 += "/";
|
|
3448
|
+
url.path = path4;
|
|
3449
3449
|
}
|
|
3450
3450
|
function resolve(input, base) {
|
|
3451
3451
|
if (!input && !base) return "";
|
|
@@ -3478,10 +3478,10 @@ function resolve(input, base) {
|
|
|
3478
3478
|
case 3:
|
|
3479
3479
|
return queryHash;
|
|
3480
3480
|
case 4: {
|
|
3481
|
-
const
|
|
3482
|
-
if (!
|
|
3483
|
-
if (isRelative(base || input) && !isRelative(
|
|
3484
|
-
return
|
|
3481
|
+
const path4 = url.path.slice(1);
|
|
3482
|
+
if (!path4) return queryHash || ".";
|
|
3483
|
+
if (isRelative(base || input) && !isRelative(path4)) return "./" + path4 + queryHash;
|
|
3484
|
+
return path4 + queryHash;
|
|
3485
3485
|
}
|
|
3486
3486
|
case 5:
|
|
3487
3487
|
return url.path + queryHash;
|
|
@@ -3489,10 +3489,10 @@ function resolve(input, base) {
|
|
|
3489
3489
|
return url.scheme + "//" + url.user + url.host + url.port + url.path + queryHash;
|
|
3490
3490
|
}
|
|
3491
3491
|
}
|
|
3492
|
-
function stripFilename(
|
|
3493
|
-
if (!
|
|
3494
|
-
const index =
|
|
3495
|
-
return
|
|
3492
|
+
function stripFilename(path4) {
|
|
3493
|
+
if (!path4) return "";
|
|
3494
|
+
const index = path4.lastIndexOf("/");
|
|
3495
|
+
return path4.slice(0, index + 1);
|
|
3496
3496
|
}
|
|
3497
3497
|
function resolver(mapUrl, sourceRoot) {
|
|
3498
3498
|
const from = stripFilename(mapUrl);
|
|
@@ -3537,16 +3537,16 @@ var TraceMap = class {
|
|
|
3537
3537
|
const isString = typeof map === "string";
|
|
3538
3538
|
if (!isString && map._decodedMemo) return map;
|
|
3539
3539
|
const parsed = parse(map);
|
|
3540
|
-
const { version:
|
|
3541
|
-
this.version =
|
|
3540
|
+
const { version: version3, file, names: names2, sourceRoot, sources, sourcesContent } = parsed;
|
|
3541
|
+
this.version = version3;
|
|
3542
3542
|
this.file = file;
|
|
3543
|
-
this.names =
|
|
3543
|
+
this.names = names2 || [];
|
|
3544
3544
|
this.sourceRoot = sourceRoot;
|
|
3545
3545
|
this.sources = sources;
|
|
3546
3546
|
this.sourcesContent = sourcesContent;
|
|
3547
3547
|
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
|
|
3548
|
-
const
|
|
3549
|
-
this.resolvedSources = sources.map(
|
|
3548
|
+
const resolve2 = resolver(mapUrl, sourceRoot);
|
|
3549
|
+
this.resolvedSources = sources.map(resolve2);
|
|
3550
3550
|
const { mappings } = parsed;
|
|
3551
3551
|
if (typeof mappings === "string") {
|
|
3552
3552
|
this._encoded = mappings;
|
|
@@ -3570,7 +3570,7 @@ function decodedMappings(map) {
|
|
|
3570
3570
|
}
|
|
3571
3571
|
function eachMapping(map, cb) {
|
|
3572
3572
|
const decoded = decodedMappings(map);
|
|
3573
|
-
const { names:
|
|
3573
|
+
const { names: names2, resolvedSources } = map;
|
|
3574
3574
|
for (let i = 0; i < decoded.length; i++) {
|
|
3575
3575
|
const line = decoded[i];
|
|
3576
3576
|
for (let j = 0; j < line.length; j++) {
|
|
@@ -3586,7 +3586,7 @@ function eachMapping(map, cb) {
|
|
|
3586
3586
|
originalLine = seg[2] + 1;
|
|
3587
3587
|
originalColumn = seg[3];
|
|
3588
3588
|
}
|
|
3589
|
-
if (seg.length === 5) name =
|
|
3589
|
+
if (seg.length === 5) name = names2[seg[4]];
|
|
3590
3590
|
cb({
|
|
3591
3591
|
generatedLine,
|
|
3592
3592
|
generatedColumn,
|
|
@@ -3640,17 +3640,17 @@ function addMapping(map, mapping2) {
|
|
|
3640
3640
|
return addMappingInternal(false, map, mapping2);
|
|
3641
3641
|
}
|
|
3642
3642
|
function toDecodedMap(map) {
|
|
3643
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names:
|
|
3643
|
+
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names2, _ignoreList: ignoreList2 } = cast2(map);
|
|
3644
3644
|
removeEmptyFinalLines(mappings);
|
|
3645
3645
|
return {
|
|
3646
3646
|
version: 3,
|
|
3647
3647
|
file: map.file || void 0,
|
|
3648
|
-
names:
|
|
3648
|
+
names: names2.array,
|
|
3649
3649
|
sourceRoot: map.sourceRoot || void 0,
|
|
3650
3650
|
sources: sources.array,
|
|
3651
3651
|
sourcesContent,
|
|
3652
3652
|
mappings,
|
|
3653
|
-
ignoreList:
|
|
3653
|
+
ignoreList: ignoreList2.array
|
|
3654
3654
|
};
|
|
3655
3655
|
}
|
|
3656
3656
|
function toEncodedMap(map) {
|
|
@@ -3671,7 +3671,7 @@ function fromMap(input) {
|
|
|
3671
3671
|
return gen;
|
|
3672
3672
|
}
|
|
3673
3673
|
function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
3674
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names:
|
|
3674
|
+
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names2 } = cast2(map);
|
|
3675
3675
|
const line = getIndex(mappings, genLine);
|
|
3676
3676
|
const index = getColumnIndex(line, genColumn);
|
|
3677
3677
|
if (!source) {
|
|
@@ -3681,7 +3681,7 @@ function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLin
|
|
|
3681
3681
|
assert(sourceLine);
|
|
3682
3682
|
assert(sourceColumn);
|
|
3683
3683
|
const sourcesIndex = put(sources, source);
|
|
3684
|
-
const namesIndex = name ? put(
|
|
3684
|
+
const namesIndex = name ? put(names2, name) : NO_NAME;
|
|
3685
3685
|
if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
|
|
3686
3686
|
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) return;
|
|
3687
3687
|
return insert(line, index, name ? [
|
|
@@ -3741,13 +3741,13 @@ function coerce(value) {
|
|
|
3741
3741
|
if (value instanceof Error) return value.stack || value.message;
|
|
3742
3742
|
return value;
|
|
3743
3743
|
}
|
|
3744
|
-
function selectColor(
|
|
3744
|
+
function selectColor(colors3, namespace) {
|
|
3745
3745
|
let hash = 0;
|
|
3746
3746
|
for (let i = 0; i < namespace.length; i++) {
|
|
3747
3747
|
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
3748
3748
|
hash |= 0;
|
|
3749
3749
|
}
|
|
3750
|
-
return
|
|
3750
|
+
return colors3[Math.abs(hash) % colors3.length];
|
|
3751
3751
|
}
|
|
3752
3752
|
function matchesTemplate(search, template) {
|
|
3753
3753
|
let searchIndex = 0;
|
|
@@ -3780,8 +3780,8 @@ function createDebug$1(namespace, options) {
|
|
|
3780
3780
|
let enableOverride;
|
|
3781
3781
|
let namespacesCache;
|
|
3782
3782
|
let enabledCache;
|
|
3783
|
-
const
|
|
3784
|
-
if (!
|
|
3783
|
+
const debug2 = (...args) => {
|
|
3784
|
+
if (!debug2.enabled) return;
|
|
3785
3785
|
const curr = Date.now();
|
|
3786
3786
|
const diff = curr - (prevTime || curr);
|
|
3787
3787
|
prevTime = curr;
|
|
@@ -3794,16 +3794,16 @@ function createDebug$1(namespace, options) {
|
|
|
3794
3794
|
const formatter = options.formatters[format];
|
|
3795
3795
|
if (typeof formatter === "function") {
|
|
3796
3796
|
const value = args[index];
|
|
3797
|
-
match2 = formatter.call(
|
|
3797
|
+
match2 = formatter.call(debug2, value);
|
|
3798
3798
|
args.splice(index, 1);
|
|
3799
3799
|
index--;
|
|
3800
3800
|
}
|
|
3801
3801
|
return match2;
|
|
3802
3802
|
});
|
|
3803
|
-
options.formatArgs.call(
|
|
3804
|
-
|
|
3803
|
+
options.formatArgs.call(debug2, diff, args);
|
|
3804
|
+
debug2.log(...args);
|
|
3805
3805
|
};
|
|
3806
|
-
|
|
3806
|
+
debug2.extend = function(namespace$1, delimiter = ":") {
|
|
3807
3807
|
return createDebug$1(this.namespace + delimiter + namespace$1, {
|
|
3808
3808
|
useColors: this.useColors,
|
|
3809
3809
|
color: this.color,
|
|
@@ -3814,9 +3814,9 @@ function createDebug$1(namespace, options) {
|
|
|
3814
3814
|
humanize: this.humanize
|
|
3815
3815
|
});
|
|
3816
3816
|
};
|
|
3817
|
-
Object.assign(
|
|
3818
|
-
|
|
3819
|
-
Object.defineProperty(
|
|
3817
|
+
Object.assign(debug2, options);
|
|
3818
|
+
debug2.namespace = namespace;
|
|
3819
|
+
Object.defineProperty(debug2, "enabled", {
|
|
3820
3820
|
enumerable: true,
|
|
3821
3821
|
configurable: false,
|
|
3822
3822
|
get: () => {
|
|
@@ -3831,7 +3831,7 @@ function createDebug$1(namespace, options) {
|
|
|
3831
3831
|
enableOverride = v;
|
|
3832
3832
|
}
|
|
3833
3833
|
});
|
|
3834
|
-
return
|
|
3834
|
+
return debug2;
|
|
3835
3835
|
}
|
|
3836
3836
|
var names = [];
|
|
3837
3837
|
var skips = [];
|
|
@@ -4217,22 +4217,22 @@ async function transformMain(code, filename, options, pluginContext, ssr, custom
|
|
|
4217
4217
|
if (lang && /tsx?$/.test(lang) && !descriptor.script?.src) {
|
|
4218
4218
|
const { transformWithOxc } = await import("vite");
|
|
4219
4219
|
if (transformWithOxc) {
|
|
4220
|
-
const { code:
|
|
4220
|
+
const { code: code2, map } = await transformWithOxc(resolvedCode, filename, {
|
|
4221
4221
|
...options.devServer?.config.oxc,
|
|
4222
4222
|
lang: "ts",
|
|
4223
4223
|
sourcemap: options.sourceMap
|
|
4224
4224
|
}, resolvedMap);
|
|
4225
|
-
resolvedCode =
|
|
4225
|
+
resolvedCode = code2;
|
|
4226
4226
|
resolvedMap = resolvedMap ? map : resolvedMap;
|
|
4227
4227
|
} else {
|
|
4228
|
-
const { code:
|
|
4228
|
+
const { code: code2, map } = await (0, import_vite.transformWithEsbuild)(resolvedCode, filename, {
|
|
4229
4229
|
target: "esnext",
|
|
4230
4230
|
charset: "utf8",
|
|
4231
4231
|
...options.devServer?.config.esbuild,
|
|
4232
4232
|
loader: "ts",
|
|
4233
4233
|
sourcemap: options.sourceMap
|
|
4234
4234
|
}, resolvedMap);
|
|
4235
|
-
resolvedCode =
|
|
4235
|
+
resolvedCode = code2;
|
|
4236
4236
|
resolvedMap = resolvedMap ? map : resolvedMap;
|
|
4237
4237
|
}
|
|
4238
4238
|
}
|
|
@@ -4638,6 +4638,7 @@ var openPattern = /\\{/g;
|
|
|
4638
4638
|
var closePattern = /\\}/g;
|
|
4639
4639
|
var commaPattern = /\\,/g;
|
|
4640
4640
|
var periodPattern = /\\./g;
|
|
4641
|
+
var EXPANSION_MAX = 1e5;
|
|
4641
4642
|
function numeric(str) {
|
|
4642
4643
|
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
|
4643
4644
|
}
|
|
@@ -4668,14 +4669,15 @@ function parseCommaParts(str) {
|
|
|
4668
4669
|
parts.push.apply(parts, p);
|
|
4669
4670
|
return parts;
|
|
4670
4671
|
}
|
|
4671
|
-
function expand(str) {
|
|
4672
|
+
function expand(str, options = {}) {
|
|
4672
4673
|
if (!str) {
|
|
4673
4674
|
return [];
|
|
4674
4675
|
}
|
|
4676
|
+
const { max = EXPANSION_MAX } = options;
|
|
4675
4677
|
if (str.slice(0, 2) === "{}") {
|
|
4676
4678
|
str = "\\{\\}" + str.slice(2);
|
|
4677
4679
|
}
|
|
4678
|
-
return expand_(escapeBraces(str), true).map(unescapeBraces);
|
|
4680
|
+
return expand_(escapeBraces(str), max, true).map(unescapeBraces);
|
|
4679
4681
|
}
|
|
4680
4682
|
function embrace(str) {
|
|
4681
4683
|
return "{" + str + "}";
|
|
@@ -4689,15 +4691,15 @@ function lte(i, y) {
|
|
|
4689
4691
|
function gte(i, y) {
|
|
4690
4692
|
return i >= y;
|
|
4691
4693
|
}
|
|
4692
|
-
function expand_(str, isTop) {
|
|
4694
|
+
function expand_(str, max, isTop) {
|
|
4693
4695
|
const expansions = [];
|
|
4694
4696
|
const m = balanced("{", "}", str);
|
|
4695
4697
|
if (!m)
|
|
4696
4698
|
return [str];
|
|
4697
4699
|
const pre = m.pre;
|
|
4698
|
-
const post = m.post.length ? expand_(m.post, false) : [""];
|
|
4700
|
+
const post = m.post.length ? expand_(m.post, max, false) : [""];
|
|
4699
4701
|
if (/\$$/.test(m.pre)) {
|
|
4700
|
-
for (let k = 0; k < post.length; k++) {
|
|
4702
|
+
for (let k = 0; k < post.length && k < max; k++) {
|
|
4701
4703
|
const expansion = pre + "{" + m.body + "}" + post[k];
|
|
4702
4704
|
expansions.push(expansion);
|
|
4703
4705
|
}
|
|
@@ -4709,7 +4711,7 @@ function expand_(str, isTop) {
|
|
|
4709
4711
|
if (!isSequence && !isOptions) {
|
|
4710
4712
|
if (m.post.match(/,(?!,).*\}/)) {
|
|
4711
4713
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
4712
|
-
return expand_(str);
|
|
4714
|
+
return expand_(str, max, true);
|
|
4713
4715
|
}
|
|
4714
4716
|
return [str];
|
|
4715
4717
|
}
|
|
@@ -4719,7 +4721,7 @@ function expand_(str, isTop) {
|
|
|
4719
4721
|
} else {
|
|
4720
4722
|
n = parseCommaParts(m.body);
|
|
4721
4723
|
if (n.length === 1 && n[0] !== void 0) {
|
|
4722
|
-
n = expand_(n[0], false).map(embrace);
|
|
4724
|
+
n = expand_(n[0], max, false).map(embrace);
|
|
4723
4725
|
if (n.length === 1) {
|
|
4724
4726
|
return post.map((p) => m.pre + n[0] + p);
|
|
4725
4727
|
}
|
|
@@ -4765,11 +4767,11 @@ function expand_(str, isTop) {
|
|
|
4765
4767
|
} else {
|
|
4766
4768
|
N = [];
|
|
4767
4769
|
for (let j = 0; j < n.length; j++) {
|
|
4768
|
-
N.push.apply(N, expand_(n[j], false));
|
|
4770
|
+
N.push.apply(N, expand_(n[j], max, false));
|
|
4769
4771
|
}
|
|
4770
4772
|
}
|
|
4771
4773
|
for (let j = 0; j < N.length; j++) {
|
|
4772
|
-
for (let k = 0; k < post.length; k++) {
|
|
4774
|
+
for (let k = 0; k < post.length && expansions.length < max; k++) {
|
|
4773
4775
|
const expansion = pre + N[j] + post[k];
|
|
4774
4776
|
if (!isTop || isSequence || expansion) {
|
|
4775
4777
|
expansions.push(expansion);
|
package/dist/vite.config.mjs
CHANGED
|
@@ -2861,7 +2861,7 @@ import fs from "node:fs";
|
|
|
2861
2861
|
import { createFilter, formatPostcssSourceMap, isCSSRequest, normalizePath, transformWithEsbuild } from "vite";
|
|
2862
2862
|
import { computed, shallowRef } from "vue";
|
|
2863
2863
|
|
|
2864
|
-
// node_modules/@rolldown/pluginutils/dist/simple-filters.js
|
|
2864
|
+
// node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js
|
|
2865
2865
|
function exactRegex(str, flags) {
|
|
2866
2866
|
return new RegExp(`^${escapeRegex(str)}$`, flags);
|
|
2867
2867
|
}
|
|
@@ -2898,7 +2898,7 @@ import path from "node:path";
|
|
|
2898
2898
|
import crypto from "node:crypto";
|
|
2899
2899
|
import { isatty } from "node:tty";
|
|
2900
2900
|
import { formatWithOptions, inspect } from "node:util";
|
|
2901
|
-
var version = "6.0.
|
|
2901
|
+
var version = "6.0.4";
|
|
2902
2902
|
function resolveCompiler(root) {
|
|
2903
2903
|
const compiler = tryResolveCompiler(root) || tryResolveCompiler();
|
|
2904
2904
|
if (!compiler) throw new Error("Failed to resolve vue/compiler-sfc.\n@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.");
|
|
@@ -2995,9 +2995,9 @@ function setSrcDescriptor(filename, entry, scoped) {
|
|
|
2995
2995
|
function getHash(text) {
|
|
2996
2996
|
return crypto.hash("sha256", text, "hex").substring(0, 8);
|
|
2997
2997
|
}
|
|
2998
|
-
function slash(
|
|
2999
|
-
if (
|
|
3000
|
-
return
|
|
2998
|
+
function slash(path4) {
|
|
2999
|
+
if (path4.startsWith("\\\\?\\")) return path4;
|
|
3000
|
+
return path4.replace(/\\/g, "/");
|
|
3001
3001
|
}
|
|
3002
3002
|
function createRollupError(id, error) {
|
|
3003
3003
|
const { message, name, stack } = error;
|
|
@@ -3109,9 +3109,9 @@ function resolveTemplateCompilerOptions(descriptor, options, filename, ssr) {
|
|
|
3109
3109
|
}
|
|
3110
3110
|
};
|
|
3111
3111
|
}
|
|
3112
|
-
function canReuseAST(
|
|
3113
|
-
if (
|
|
3114
|
-
const [_, minor, patch] =
|
|
3112
|
+
function canReuseAST(version3) {
|
|
3113
|
+
if (version3) {
|
|
3114
|
+
const [_, minor, patch] = version3.split(".").map(Number);
|
|
3115
3115
|
if (minor >= 4 && patch >= 3) return true;
|
|
3116
3116
|
}
|
|
3117
3117
|
return false;
|
|
@@ -3360,16 +3360,16 @@ function parseAbsoluteUrl(input) {
|
|
|
3360
3360
|
}
|
|
3361
3361
|
function parseFileUrl(input) {
|
|
3362
3362
|
const match2 = fileRegex.exec(input);
|
|
3363
|
-
const
|
|
3364
|
-
return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(
|
|
3363
|
+
const path4 = match2[2];
|
|
3364
|
+
return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path4) ? path4 : "/" + path4, match2[3] || "", match2[4] || "");
|
|
3365
3365
|
}
|
|
3366
|
-
function makeUrl(scheme, user, host, port,
|
|
3366
|
+
function makeUrl(scheme, user, host, port, path4, query, hash) {
|
|
3367
3367
|
return {
|
|
3368
3368
|
scheme,
|
|
3369
3369
|
user,
|
|
3370
3370
|
host,
|
|
3371
3371
|
port,
|
|
3372
|
-
path:
|
|
3372
|
+
path: path4,
|
|
3373
3373
|
query,
|
|
3374
3374
|
hash,
|
|
3375
3375
|
type: 7
|
|
@@ -3377,17 +3377,17 @@ function makeUrl(scheme, user, host, port, path$1, query, hash) {
|
|
|
3377
3377
|
}
|
|
3378
3378
|
function parseUrl(input) {
|
|
3379
3379
|
if (isSchemeRelativeUrl(input)) {
|
|
3380
|
-
const
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
return
|
|
3380
|
+
const url2 = parseAbsoluteUrl("http:" + input);
|
|
3381
|
+
url2.scheme = "";
|
|
3382
|
+
url2.type = 6;
|
|
3383
|
+
return url2;
|
|
3384
3384
|
}
|
|
3385
3385
|
if (isAbsolutePath(input)) {
|
|
3386
|
-
const
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
return
|
|
3386
|
+
const url2 = parseAbsoluteUrl("http://foo.com" + input);
|
|
3387
|
+
url2.scheme = "";
|
|
3388
|
+
url2.host = "";
|
|
3389
|
+
url2.type = 5;
|
|
3390
|
+
return url2;
|
|
3391
3391
|
}
|
|
3392
3392
|
if (isFileUrl(input)) return parseFileUrl(input);
|
|
3393
3393
|
if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);
|
|
@@ -3397,10 +3397,10 @@ function parseUrl(input) {
|
|
|
3397
3397
|
url.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1;
|
|
3398
3398
|
return url;
|
|
3399
3399
|
}
|
|
3400
|
-
function stripPathFilename(
|
|
3401
|
-
if (
|
|
3402
|
-
const index =
|
|
3403
|
-
return
|
|
3400
|
+
function stripPathFilename(path4) {
|
|
3401
|
+
if (path4.endsWith("/..")) return path4;
|
|
3402
|
+
const index = path4.lastIndexOf("/");
|
|
3403
|
+
return path4.slice(0, index + 1);
|
|
3404
3404
|
}
|
|
3405
3405
|
function mergePaths(url, base) {
|
|
3406
3406
|
normalizePath$1(base, base.type);
|
|
@@ -3432,10 +3432,10 @@ function normalizePath$1(url, type) {
|
|
|
3432
3432
|
pieces[pointer++] = piece;
|
|
3433
3433
|
positive++;
|
|
3434
3434
|
}
|
|
3435
|
-
let
|
|
3436
|
-
for (let i = 1; i < pointer; i++)
|
|
3437
|
-
if (!
|
|
3438
|
-
url.path =
|
|
3435
|
+
let path4 = "";
|
|
3436
|
+
for (let i = 1; i < pointer; i++) path4 += "/" + pieces[i];
|
|
3437
|
+
if (!path4 || addTrailingSlash && !path4.endsWith("/..")) path4 += "/";
|
|
3438
|
+
url.path = path4;
|
|
3439
3439
|
}
|
|
3440
3440
|
function resolve(input, base) {
|
|
3441
3441
|
if (!input && !base) return "";
|
|
@@ -3468,10 +3468,10 @@ function resolve(input, base) {
|
|
|
3468
3468
|
case 3:
|
|
3469
3469
|
return queryHash;
|
|
3470
3470
|
case 4: {
|
|
3471
|
-
const
|
|
3472
|
-
if (!
|
|
3473
|
-
if (isRelative(base || input) && !isRelative(
|
|
3474
|
-
return
|
|
3471
|
+
const path4 = url.path.slice(1);
|
|
3472
|
+
if (!path4) return queryHash || ".";
|
|
3473
|
+
if (isRelative(base || input) && !isRelative(path4)) return "./" + path4 + queryHash;
|
|
3474
|
+
return path4 + queryHash;
|
|
3475
3475
|
}
|
|
3476
3476
|
case 5:
|
|
3477
3477
|
return url.path + queryHash;
|
|
@@ -3479,10 +3479,10 @@ function resolve(input, base) {
|
|
|
3479
3479
|
return url.scheme + "//" + url.user + url.host + url.port + url.path + queryHash;
|
|
3480
3480
|
}
|
|
3481
3481
|
}
|
|
3482
|
-
function stripFilename(
|
|
3483
|
-
if (!
|
|
3484
|
-
const index =
|
|
3485
|
-
return
|
|
3482
|
+
function stripFilename(path4) {
|
|
3483
|
+
if (!path4) return "";
|
|
3484
|
+
const index = path4.lastIndexOf("/");
|
|
3485
|
+
return path4.slice(0, index + 1);
|
|
3486
3486
|
}
|
|
3487
3487
|
function resolver(mapUrl, sourceRoot) {
|
|
3488
3488
|
const from = stripFilename(mapUrl);
|
|
@@ -3527,16 +3527,16 @@ var TraceMap = class {
|
|
|
3527
3527
|
const isString = typeof map === "string";
|
|
3528
3528
|
if (!isString && map._decodedMemo) return map;
|
|
3529
3529
|
const parsed = parse(map);
|
|
3530
|
-
const { version:
|
|
3531
|
-
this.version =
|
|
3530
|
+
const { version: version3, file, names: names2, sourceRoot, sources, sourcesContent } = parsed;
|
|
3531
|
+
this.version = version3;
|
|
3532
3532
|
this.file = file;
|
|
3533
|
-
this.names =
|
|
3533
|
+
this.names = names2 || [];
|
|
3534
3534
|
this.sourceRoot = sourceRoot;
|
|
3535
3535
|
this.sources = sources;
|
|
3536
3536
|
this.sourcesContent = sourcesContent;
|
|
3537
3537
|
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
|
|
3538
|
-
const
|
|
3539
|
-
this.resolvedSources = sources.map(
|
|
3538
|
+
const resolve2 = resolver(mapUrl, sourceRoot);
|
|
3539
|
+
this.resolvedSources = sources.map(resolve2);
|
|
3540
3540
|
const { mappings } = parsed;
|
|
3541
3541
|
if (typeof mappings === "string") {
|
|
3542
3542
|
this._encoded = mappings;
|
|
@@ -3560,7 +3560,7 @@ function decodedMappings(map) {
|
|
|
3560
3560
|
}
|
|
3561
3561
|
function eachMapping(map, cb) {
|
|
3562
3562
|
const decoded = decodedMappings(map);
|
|
3563
|
-
const { names:
|
|
3563
|
+
const { names: names2, resolvedSources } = map;
|
|
3564
3564
|
for (let i = 0; i < decoded.length; i++) {
|
|
3565
3565
|
const line = decoded[i];
|
|
3566
3566
|
for (let j = 0; j < line.length; j++) {
|
|
@@ -3576,7 +3576,7 @@ function eachMapping(map, cb) {
|
|
|
3576
3576
|
originalLine = seg[2] + 1;
|
|
3577
3577
|
originalColumn = seg[3];
|
|
3578
3578
|
}
|
|
3579
|
-
if (seg.length === 5) name =
|
|
3579
|
+
if (seg.length === 5) name = names2[seg[4]];
|
|
3580
3580
|
cb({
|
|
3581
3581
|
generatedLine,
|
|
3582
3582
|
generatedColumn,
|
|
@@ -3630,17 +3630,17 @@ function addMapping(map, mapping2) {
|
|
|
3630
3630
|
return addMappingInternal(false, map, mapping2);
|
|
3631
3631
|
}
|
|
3632
3632
|
function toDecodedMap(map) {
|
|
3633
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names:
|
|
3633
|
+
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names2, _ignoreList: ignoreList2 } = cast2(map);
|
|
3634
3634
|
removeEmptyFinalLines(mappings);
|
|
3635
3635
|
return {
|
|
3636
3636
|
version: 3,
|
|
3637
3637
|
file: map.file || void 0,
|
|
3638
|
-
names:
|
|
3638
|
+
names: names2.array,
|
|
3639
3639
|
sourceRoot: map.sourceRoot || void 0,
|
|
3640
3640
|
sources: sources.array,
|
|
3641
3641
|
sourcesContent,
|
|
3642
3642
|
mappings,
|
|
3643
|
-
ignoreList:
|
|
3643
|
+
ignoreList: ignoreList2.array
|
|
3644
3644
|
};
|
|
3645
3645
|
}
|
|
3646
3646
|
function toEncodedMap(map) {
|
|
@@ -3661,7 +3661,7 @@ function fromMap(input) {
|
|
|
3661
3661
|
return gen;
|
|
3662
3662
|
}
|
|
3663
3663
|
function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
3664
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names:
|
|
3664
|
+
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names2 } = cast2(map);
|
|
3665
3665
|
const line = getIndex(mappings, genLine);
|
|
3666
3666
|
const index = getColumnIndex(line, genColumn);
|
|
3667
3667
|
if (!source) {
|
|
@@ -3671,7 +3671,7 @@ function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLin
|
|
|
3671
3671
|
assert(sourceLine);
|
|
3672
3672
|
assert(sourceColumn);
|
|
3673
3673
|
const sourcesIndex = put(sources, source);
|
|
3674
|
-
const namesIndex = name ? put(
|
|
3674
|
+
const namesIndex = name ? put(names2, name) : NO_NAME;
|
|
3675
3675
|
if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
|
|
3676
3676
|
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) return;
|
|
3677
3677
|
return insert(line, index, name ? [
|
|
@@ -3731,13 +3731,13 @@ function coerce(value) {
|
|
|
3731
3731
|
if (value instanceof Error) return value.stack || value.message;
|
|
3732
3732
|
return value;
|
|
3733
3733
|
}
|
|
3734
|
-
function selectColor(
|
|
3734
|
+
function selectColor(colors3, namespace) {
|
|
3735
3735
|
let hash = 0;
|
|
3736
3736
|
for (let i = 0; i < namespace.length; i++) {
|
|
3737
3737
|
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
3738
3738
|
hash |= 0;
|
|
3739
3739
|
}
|
|
3740
|
-
return
|
|
3740
|
+
return colors3[Math.abs(hash) % colors3.length];
|
|
3741
3741
|
}
|
|
3742
3742
|
function matchesTemplate(search, template) {
|
|
3743
3743
|
let searchIndex = 0;
|
|
@@ -3770,8 +3770,8 @@ function createDebug$1(namespace, options) {
|
|
|
3770
3770
|
let enableOverride;
|
|
3771
3771
|
let namespacesCache;
|
|
3772
3772
|
let enabledCache;
|
|
3773
|
-
const
|
|
3774
|
-
if (!
|
|
3773
|
+
const debug2 = (...args) => {
|
|
3774
|
+
if (!debug2.enabled) return;
|
|
3775
3775
|
const curr = Date.now();
|
|
3776
3776
|
const diff = curr - (prevTime || curr);
|
|
3777
3777
|
prevTime = curr;
|
|
@@ -3784,16 +3784,16 @@ function createDebug$1(namespace, options) {
|
|
|
3784
3784
|
const formatter = options.formatters[format];
|
|
3785
3785
|
if (typeof formatter === "function") {
|
|
3786
3786
|
const value = args[index];
|
|
3787
|
-
match2 = formatter.call(
|
|
3787
|
+
match2 = formatter.call(debug2, value);
|
|
3788
3788
|
args.splice(index, 1);
|
|
3789
3789
|
index--;
|
|
3790
3790
|
}
|
|
3791
3791
|
return match2;
|
|
3792
3792
|
});
|
|
3793
|
-
options.formatArgs.call(
|
|
3794
|
-
|
|
3793
|
+
options.formatArgs.call(debug2, diff, args);
|
|
3794
|
+
debug2.log(...args);
|
|
3795
3795
|
};
|
|
3796
|
-
|
|
3796
|
+
debug2.extend = function(namespace$1, delimiter = ":") {
|
|
3797
3797
|
return createDebug$1(this.namespace + delimiter + namespace$1, {
|
|
3798
3798
|
useColors: this.useColors,
|
|
3799
3799
|
color: this.color,
|
|
@@ -3804,9 +3804,9 @@ function createDebug$1(namespace, options) {
|
|
|
3804
3804
|
humanize: this.humanize
|
|
3805
3805
|
});
|
|
3806
3806
|
};
|
|
3807
|
-
Object.assign(
|
|
3808
|
-
|
|
3809
|
-
Object.defineProperty(
|
|
3807
|
+
Object.assign(debug2, options);
|
|
3808
|
+
debug2.namespace = namespace;
|
|
3809
|
+
Object.defineProperty(debug2, "enabled", {
|
|
3810
3810
|
enumerable: true,
|
|
3811
3811
|
configurable: false,
|
|
3812
3812
|
get: () => {
|
|
@@ -3821,7 +3821,7 @@ function createDebug$1(namespace, options) {
|
|
|
3821
3821
|
enableOverride = v;
|
|
3822
3822
|
}
|
|
3823
3823
|
});
|
|
3824
|
-
return
|
|
3824
|
+
return debug2;
|
|
3825
3825
|
}
|
|
3826
3826
|
var names = [];
|
|
3827
3827
|
var skips = [];
|
|
@@ -4207,22 +4207,22 @@ async function transformMain(code, filename, options, pluginContext, ssr, custom
|
|
|
4207
4207
|
if (lang && /tsx?$/.test(lang) && !descriptor.script?.src) {
|
|
4208
4208
|
const { transformWithOxc } = await import("vite");
|
|
4209
4209
|
if (transformWithOxc) {
|
|
4210
|
-
const { code:
|
|
4210
|
+
const { code: code2, map } = await transformWithOxc(resolvedCode, filename, {
|
|
4211
4211
|
...options.devServer?.config.oxc,
|
|
4212
4212
|
lang: "ts",
|
|
4213
4213
|
sourcemap: options.sourceMap
|
|
4214
4214
|
}, resolvedMap);
|
|
4215
|
-
resolvedCode =
|
|
4215
|
+
resolvedCode = code2;
|
|
4216
4216
|
resolvedMap = resolvedMap ? map : resolvedMap;
|
|
4217
4217
|
} else {
|
|
4218
|
-
const { code:
|
|
4218
|
+
const { code: code2, map } = await transformWithEsbuild(resolvedCode, filename, {
|
|
4219
4219
|
target: "esnext",
|
|
4220
4220
|
charset: "utf8",
|
|
4221
4221
|
...options.devServer?.config.esbuild,
|
|
4222
4222
|
loader: "ts",
|
|
4223
4223
|
sourcemap: options.sourceMap
|
|
4224
4224
|
}, resolvedMap);
|
|
4225
|
-
resolvedCode =
|
|
4225
|
+
resolvedCode = code2;
|
|
4226
4226
|
resolvedMap = resolvedMap ? map : resolvedMap;
|
|
4227
4227
|
}
|
|
4228
4228
|
}
|
|
@@ -4628,6 +4628,7 @@ var openPattern = /\\{/g;
|
|
|
4628
4628
|
var closePattern = /\\}/g;
|
|
4629
4629
|
var commaPattern = /\\,/g;
|
|
4630
4630
|
var periodPattern = /\\./g;
|
|
4631
|
+
var EXPANSION_MAX = 1e5;
|
|
4631
4632
|
function numeric(str) {
|
|
4632
4633
|
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
|
4633
4634
|
}
|
|
@@ -4658,14 +4659,15 @@ function parseCommaParts(str) {
|
|
|
4658
4659
|
parts.push.apply(parts, p);
|
|
4659
4660
|
return parts;
|
|
4660
4661
|
}
|
|
4661
|
-
function expand(str) {
|
|
4662
|
+
function expand(str, options = {}) {
|
|
4662
4663
|
if (!str) {
|
|
4663
4664
|
return [];
|
|
4664
4665
|
}
|
|
4666
|
+
const { max = EXPANSION_MAX } = options;
|
|
4665
4667
|
if (str.slice(0, 2) === "{}") {
|
|
4666
4668
|
str = "\\{\\}" + str.slice(2);
|
|
4667
4669
|
}
|
|
4668
|
-
return expand_(escapeBraces(str), true).map(unescapeBraces);
|
|
4670
|
+
return expand_(escapeBraces(str), max, true).map(unescapeBraces);
|
|
4669
4671
|
}
|
|
4670
4672
|
function embrace(str) {
|
|
4671
4673
|
return "{" + str + "}";
|
|
@@ -4679,15 +4681,15 @@ function lte(i, y) {
|
|
|
4679
4681
|
function gte(i, y) {
|
|
4680
4682
|
return i >= y;
|
|
4681
4683
|
}
|
|
4682
|
-
function expand_(str, isTop) {
|
|
4684
|
+
function expand_(str, max, isTop) {
|
|
4683
4685
|
const expansions = [];
|
|
4684
4686
|
const m = balanced("{", "}", str);
|
|
4685
4687
|
if (!m)
|
|
4686
4688
|
return [str];
|
|
4687
4689
|
const pre = m.pre;
|
|
4688
|
-
const post = m.post.length ? expand_(m.post, false) : [""];
|
|
4690
|
+
const post = m.post.length ? expand_(m.post, max, false) : [""];
|
|
4689
4691
|
if (/\$$/.test(m.pre)) {
|
|
4690
|
-
for (let k = 0; k < post.length; k++) {
|
|
4692
|
+
for (let k = 0; k < post.length && k < max; k++) {
|
|
4691
4693
|
const expansion = pre + "{" + m.body + "}" + post[k];
|
|
4692
4694
|
expansions.push(expansion);
|
|
4693
4695
|
}
|
|
@@ -4699,7 +4701,7 @@ function expand_(str, isTop) {
|
|
|
4699
4701
|
if (!isSequence && !isOptions) {
|
|
4700
4702
|
if (m.post.match(/,(?!,).*\}/)) {
|
|
4701
4703
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
4702
|
-
return expand_(str);
|
|
4704
|
+
return expand_(str, max, true);
|
|
4703
4705
|
}
|
|
4704
4706
|
return [str];
|
|
4705
4707
|
}
|
|
@@ -4709,7 +4711,7 @@ function expand_(str, isTop) {
|
|
|
4709
4711
|
} else {
|
|
4710
4712
|
n = parseCommaParts(m.body);
|
|
4711
4713
|
if (n.length === 1 && n[0] !== void 0) {
|
|
4712
|
-
n = expand_(n[0], false).map(embrace);
|
|
4714
|
+
n = expand_(n[0], max, false).map(embrace);
|
|
4713
4715
|
if (n.length === 1) {
|
|
4714
4716
|
return post.map((p) => m.pre + n[0] + p);
|
|
4715
4717
|
}
|
|
@@ -4755,11 +4757,11 @@ function expand_(str, isTop) {
|
|
|
4755
4757
|
} else {
|
|
4756
4758
|
N = [];
|
|
4757
4759
|
for (let j = 0; j < n.length; j++) {
|
|
4758
|
-
N.push.apply(N, expand_(n[j], false));
|
|
4760
|
+
N.push.apply(N, expand_(n[j], max, false));
|
|
4759
4761
|
}
|
|
4760
4762
|
}
|
|
4761
4763
|
for (let j = 0; j < N.length; j++) {
|
|
4762
|
-
for (let k = 0; k < post.length; k++) {
|
|
4764
|
+
for (let k = 0; k < post.length && expansions.length < max; k++) {
|
|
4763
4765
|
const expansion = pre + N[j] + post[k];
|
|
4764
4766
|
if (!isTop || isSequence || expansion) {
|
|
4765
4767
|
expansions.push(expansion);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsakringskassan/vite-lib-config",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.3",
|
|
4
4
|
"description": "Försäkringskassan toolchain to build libraries with Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dist"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@microsoft/api-extractor": "7.
|
|
45
|
+
"@microsoft/api-extractor": "7.56.0",
|
|
46
46
|
"@vue/babel-preset-app": "5.0.9"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|