@procore/hammer-test-jest 0.1.0 → 0.2.0
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/transforms/file.test.js +597 -509
- package/dist/transforms/file.test.mjs +597 -509
- package/dist/transforms/reactSvg.test.js +603 -515
- package/dist/transforms/reactSvg.test.mjs +603 -515
- package/package.json +15 -15
|
@@ -278,16 +278,16 @@ var require_collections = __commonJS({
|
|
|
278
278
|
if (list.length) {
|
|
279
279
|
result += config2.spacingOuter;
|
|
280
280
|
const indentationNext = indentation + config2.indent;
|
|
281
|
-
for (let
|
|
281
|
+
for (let i2 = 0; i2 < list.length; i2++) {
|
|
282
282
|
result += indentationNext;
|
|
283
|
-
if (
|
|
283
|
+
if (i2 === config2.maxWidth) {
|
|
284
284
|
result += "\u2026";
|
|
285
285
|
break;
|
|
286
286
|
}
|
|
287
|
-
if (
|
|
288
|
-
result += printer(list[
|
|
287
|
+
if (i2 in list) {
|
|
288
|
+
result += printer(list[i2], config2, indentationNext, depth, refs);
|
|
289
289
|
}
|
|
290
|
-
if (
|
|
290
|
+
if (i2 < list.length - 1) {
|
|
291
291
|
result += `,${config2.spacingInner}`;
|
|
292
292
|
} else if (!config2.min) {
|
|
293
293
|
result += ",";
|
|
@@ -303,12 +303,12 @@ var require_collections = __commonJS({
|
|
|
303
303
|
if (keys2.length) {
|
|
304
304
|
result += config2.spacingOuter;
|
|
305
305
|
const indentationNext = indentation + config2.indent;
|
|
306
|
-
for (let
|
|
307
|
-
const key = keys2[
|
|
306
|
+
for (let i2 = 0; i2 < keys2.length; i2++) {
|
|
307
|
+
const key = keys2[i2];
|
|
308
308
|
const name = printer(key, config2, indentationNext, depth, refs);
|
|
309
309
|
const value = printer(val[key], config2, indentationNext, depth, refs);
|
|
310
310
|
result += `${indentationNext + name}: ${value}`;
|
|
311
|
-
if (
|
|
311
|
+
if (i2 < keys2.length - 1) {
|
|
312
312
|
result += `,${config2.spacingInner}`;
|
|
313
313
|
} else if (!config2.min) {
|
|
314
314
|
result += ",";
|
|
@@ -629,11 +629,11 @@ var require_Immutable = __commonJS({
|
|
|
629
629
|
printer
|
|
630
630
|
)}}`;
|
|
631
631
|
function getRecordEntries(val) {
|
|
632
|
-
let
|
|
632
|
+
let i2 = 0;
|
|
633
633
|
return {
|
|
634
634
|
next() {
|
|
635
|
-
if (
|
|
636
|
-
const key = val._keys[
|
|
635
|
+
if (i2 < val._keys.length) {
|
|
636
|
+
const key = val._keys[i2++];
|
|
637
637
|
return {
|
|
638
638
|
done: false,
|
|
639
639
|
value: [key, val.get(key)]
|
|
@@ -761,62 +761,62 @@ var require_react_is_production_min = __commonJS({
|
|
|
761
761
|
"use strict";
|
|
762
762
|
init_esm_shims();
|
|
763
763
|
var b2 = Symbol.for("react.element");
|
|
764
|
-
var
|
|
765
|
-
var
|
|
764
|
+
var c2 = Symbol.for("react.portal");
|
|
765
|
+
var d = Symbol.for("react.fragment");
|
|
766
766
|
var e = Symbol.for("react.strict_mode");
|
|
767
|
-
var
|
|
768
|
-
var
|
|
767
|
+
var f2 = Symbol.for("react.profiler");
|
|
768
|
+
var g2 = Symbol.for("react.provider");
|
|
769
769
|
var h = Symbol.for("react.context");
|
|
770
|
-
var
|
|
770
|
+
var k2 = Symbol.for("react.server_context");
|
|
771
771
|
var l = Symbol.for("react.forward_ref");
|
|
772
|
-
var
|
|
772
|
+
var m = Symbol.for("react.suspense");
|
|
773
773
|
var n2 = Symbol.for("react.suspense_list");
|
|
774
|
-
var
|
|
774
|
+
var p = Symbol.for("react.memo");
|
|
775
775
|
var q = Symbol.for("react.lazy");
|
|
776
776
|
var t = Symbol.for("react.offscreen");
|
|
777
777
|
var u2;
|
|
778
778
|
u2 = Symbol.for("react.module.reference");
|
|
779
|
-
function
|
|
779
|
+
function v(a) {
|
|
780
780
|
if ("object" === typeof a && null !== a) {
|
|
781
781
|
var r = a.$$typeof;
|
|
782
782
|
switch (r) {
|
|
783
783
|
case b2:
|
|
784
784
|
switch (a = a.type, a) {
|
|
785
|
-
case
|
|
786
|
-
case
|
|
785
|
+
case d:
|
|
786
|
+
case f2:
|
|
787
787
|
case e:
|
|
788
|
-
case
|
|
788
|
+
case m:
|
|
789
789
|
case n2:
|
|
790
790
|
return a;
|
|
791
791
|
default:
|
|
792
792
|
switch (a = a && a.$$typeof, a) {
|
|
793
|
-
case
|
|
793
|
+
case k2:
|
|
794
794
|
case h:
|
|
795
795
|
case l:
|
|
796
796
|
case q:
|
|
797
|
-
case
|
|
798
|
-
case
|
|
797
|
+
case p:
|
|
798
|
+
case g2:
|
|
799
799
|
return a;
|
|
800
800
|
default:
|
|
801
801
|
return r;
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
|
-
case
|
|
804
|
+
case c2:
|
|
805
805
|
return r;
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
809
|
exports.ContextConsumer = h;
|
|
810
|
-
exports.ContextProvider =
|
|
810
|
+
exports.ContextProvider = g2;
|
|
811
811
|
exports.Element = b2;
|
|
812
812
|
exports.ForwardRef = l;
|
|
813
|
-
exports.Fragment =
|
|
813
|
+
exports.Fragment = d;
|
|
814
814
|
exports.Lazy = q;
|
|
815
|
-
exports.Memo =
|
|
816
|
-
exports.Portal =
|
|
817
|
-
exports.Profiler =
|
|
815
|
+
exports.Memo = p;
|
|
816
|
+
exports.Portal = c2;
|
|
817
|
+
exports.Profiler = f2;
|
|
818
818
|
exports.StrictMode = e;
|
|
819
|
-
exports.Suspense =
|
|
819
|
+
exports.Suspense = m;
|
|
820
820
|
exports.SuspenseList = n2;
|
|
821
821
|
exports.isAsyncMode = function() {
|
|
822
822
|
return false;
|
|
@@ -825,45 +825,45 @@ var require_react_is_production_min = __commonJS({
|
|
|
825
825
|
return false;
|
|
826
826
|
};
|
|
827
827
|
exports.isContextConsumer = function(a) {
|
|
828
|
-
return
|
|
828
|
+
return v(a) === h;
|
|
829
829
|
};
|
|
830
830
|
exports.isContextProvider = function(a) {
|
|
831
|
-
return
|
|
831
|
+
return v(a) === g2;
|
|
832
832
|
};
|
|
833
833
|
exports.isElement = function(a) {
|
|
834
834
|
return "object" === typeof a && null !== a && a.$$typeof === b2;
|
|
835
835
|
};
|
|
836
836
|
exports.isForwardRef = function(a) {
|
|
837
|
-
return
|
|
837
|
+
return v(a) === l;
|
|
838
838
|
};
|
|
839
839
|
exports.isFragment = function(a) {
|
|
840
|
-
return
|
|
840
|
+
return v(a) === d;
|
|
841
841
|
};
|
|
842
842
|
exports.isLazy = function(a) {
|
|
843
|
-
return
|
|
843
|
+
return v(a) === q;
|
|
844
844
|
};
|
|
845
845
|
exports.isMemo = function(a) {
|
|
846
|
-
return
|
|
846
|
+
return v(a) === p;
|
|
847
847
|
};
|
|
848
848
|
exports.isPortal = function(a) {
|
|
849
|
-
return
|
|
849
|
+
return v(a) === c2;
|
|
850
850
|
};
|
|
851
851
|
exports.isProfiler = function(a) {
|
|
852
|
-
return
|
|
852
|
+
return v(a) === f2;
|
|
853
853
|
};
|
|
854
854
|
exports.isStrictMode = function(a) {
|
|
855
|
-
return
|
|
855
|
+
return v(a) === e;
|
|
856
856
|
};
|
|
857
857
|
exports.isSuspense = function(a) {
|
|
858
|
-
return
|
|
858
|
+
return v(a) === m;
|
|
859
859
|
};
|
|
860
860
|
exports.isSuspenseList = function(a) {
|
|
861
|
-
return
|
|
861
|
+
return v(a) === n2;
|
|
862
862
|
};
|
|
863
863
|
exports.isValidElementType = function(a) {
|
|
864
|
-
return "string" === typeof a || "function" === typeof a || a ===
|
|
864
|
+
return "string" === typeof a || "function" === typeof a || a === d || a === f2 || a === e || a === m || a === n2 || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g2 || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u2 || void 0 !== a.getModuleId) ? true : false;
|
|
865
865
|
};
|
|
866
|
-
exports.typeOf =
|
|
866
|
+
exports.typeOf = v;
|
|
867
867
|
}
|
|
868
868
|
});
|
|
869
869
|
|
|
@@ -1460,10 +1460,10 @@ ${indentationNext}`);
|
|
|
1460
1460
|
return printed;
|
|
1461
1461
|
}
|
|
1462
1462
|
function findPlugin(plugins5, val) {
|
|
1463
|
-
for (let
|
|
1463
|
+
for (let p = 0; p < plugins5.length; p++) {
|
|
1464
1464
|
try {
|
|
1465
|
-
if (plugins5[
|
|
1466
|
-
return plugins5[
|
|
1465
|
+
if (plugins5[p].test(val)) {
|
|
1466
|
+
return plugins5[p];
|
|
1467
1467
|
}
|
|
1468
1468
|
} catch (error) {
|
|
1469
1469
|
throw new PrettyFormatPluginError(error.message, error.stack);
|
|
@@ -1676,11 +1676,11 @@ function inspectList(list, options, inspectItem, separator = ", ") {
|
|
|
1676
1676
|
let output = "";
|
|
1677
1677
|
let peek = "";
|
|
1678
1678
|
let truncated = "";
|
|
1679
|
-
for (let
|
|
1680
|
-
const last =
|
|
1681
|
-
const secondToLast =
|
|
1682
|
-
truncated = `${truncator}(${list.length -
|
|
1683
|
-
const value = list[
|
|
1679
|
+
for (let i2 = 0; i2 < size; i2 += 1) {
|
|
1680
|
+
const last = i2 + 1 === list.length;
|
|
1681
|
+
const secondToLast = i2 + 2 === list.length;
|
|
1682
|
+
truncated = `${truncator}(${list.length - i2})`;
|
|
1683
|
+
const value = list[i2];
|
|
1684
1684
|
options.truncate = originalLength - output.length - (last ? 0 : separator.length);
|
|
1685
1685
|
const string3 = peek || inspectItem(value, options) + (last ? "" : separator);
|
|
1686
1686
|
const nextLength = output.length + string3.length;
|
|
@@ -1691,13 +1691,13 @@ function inspectList(list, options, inspectItem, separator = ", ") {
|
|
|
1691
1691
|
if (!last && !secondToLast && truncatedLength > originalLength) {
|
|
1692
1692
|
break;
|
|
1693
1693
|
}
|
|
1694
|
-
peek = last ? "" : inspectItem(list[
|
|
1694
|
+
peek = last ? "" : inspectItem(list[i2 + 1], options) + (secondToLast ? "" : separator);
|
|
1695
1695
|
if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) {
|
|
1696
1696
|
break;
|
|
1697
1697
|
}
|
|
1698
1698
|
output += string3;
|
|
1699
1699
|
if (!last && !secondToLast && nextLength + peek.length >= originalLength) {
|
|
1700
|
-
truncated = `${truncator}(${list.length -
|
|
1700
|
+
truncated = `${truncator}(${list.length - i2 - 1})`;
|
|
1701
1701
|
break;
|
|
1702
1702
|
}
|
|
1703
1703
|
truncated = "";
|
|
@@ -1836,11 +1836,11 @@ function inspectTypedArray(array2, options) {
|
|
|
1836
1836
|
if (!array2.length && !nonIndexProperties.length)
|
|
1837
1837
|
return `${name}[]`;
|
|
1838
1838
|
let output = "";
|
|
1839
|
-
for (let
|
|
1840
|
-
const string3 = `${options.stylize(truncate(array2[
|
|
1839
|
+
for (let i2 = 0; i2 < array2.length; i2++) {
|
|
1840
|
+
const string3 = `${options.stylize(truncate(array2[i2], options.truncate), "number")}${i2 === array2.length - 1 ? "" : ", "}`;
|
|
1841
1841
|
options.truncate -= string3.length;
|
|
1842
|
-
if (array2[
|
|
1843
|
-
output += `${truncator}(${array2.length - array2[
|
|
1842
|
+
if (array2[i2] !== array2.length && options.truncate <= 3) {
|
|
1843
|
+
output += `${truncator}(${array2.length - array2[i2] + 1})`;
|
|
1844
1844
|
break;
|
|
1845
1845
|
}
|
|
1846
1846
|
output += string3;
|
|
@@ -1963,7 +1963,7 @@ var init_number = __esm({
|
|
|
1963
1963
|
"use strict";
|
|
1964
1964
|
init_esm_shims();
|
|
1965
1965
|
init_helpers();
|
|
1966
|
-
isNaN2 = Number.isNaN || ((
|
|
1966
|
+
isNaN2 = Number.isNaN || ((i2) => i2 !== i2);
|
|
1967
1967
|
}
|
|
1968
1968
|
});
|
|
1969
1969
|
|
|
@@ -2465,9 +2465,9 @@ var require_build2 = __commonJS({
|
|
|
2465
2465
|
}
|
|
2466
2466
|
return nCommon;
|
|
2467
2467
|
};
|
|
2468
|
-
var extendPathsF = (
|
|
2468
|
+
var extendPathsF = (d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF) => {
|
|
2469
2469
|
let iF = 0;
|
|
2470
|
-
let kF = -
|
|
2470
|
+
let kF = -d;
|
|
2471
2471
|
let aFirst = aIndexesF[iF];
|
|
2472
2472
|
let aIndexPrev1 = aFirst;
|
|
2473
2473
|
aIndexesF[iF] += countCommonItemsF(
|
|
@@ -2477,9 +2477,9 @@ var require_build2 = __commonJS({
|
|
|
2477
2477
|
bEnd,
|
|
2478
2478
|
isCommon
|
|
2479
2479
|
);
|
|
2480
|
-
const nF =
|
|
2480
|
+
const nF = d < iMaxF ? d : iMaxF;
|
|
2481
2481
|
for (iF += 1, kF += 2; iF <= nF; iF += 1, kF += 2) {
|
|
2482
|
-
if (iF !==
|
|
2482
|
+
if (iF !== d && aIndexPrev1 < aIndexesF[iF]) {
|
|
2483
2483
|
aFirst = aIndexesF[iF];
|
|
2484
2484
|
} else {
|
|
2485
2485
|
aFirst = aIndexPrev1 + 1;
|
|
@@ -2492,9 +2492,9 @@ var require_build2 = __commonJS({
|
|
|
2492
2492
|
}
|
|
2493
2493
|
return iMaxF;
|
|
2494
2494
|
};
|
|
2495
|
-
var extendPathsR = (
|
|
2495
|
+
var extendPathsR = (d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR) => {
|
|
2496
2496
|
let iR = 0;
|
|
2497
|
-
let kR =
|
|
2497
|
+
let kR = d;
|
|
2498
2498
|
let aFirst = aIndexesR[iR];
|
|
2499
2499
|
let aIndexPrev1 = aFirst;
|
|
2500
2500
|
aIndexesR[iR] -= countCommonItemsR(
|
|
@@ -2504,9 +2504,9 @@ var require_build2 = __commonJS({
|
|
|
2504
2504
|
bR + aFirst - kR - 1,
|
|
2505
2505
|
isCommon
|
|
2506
2506
|
);
|
|
2507
|
-
const nR =
|
|
2507
|
+
const nR = d < iMaxR ? d : iMaxR;
|
|
2508
2508
|
for (iR += 1, kR -= 2; iR <= nR; iR += 1, kR -= 2) {
|
|
2509
|
-
if (iR !==
|
|
2509
|
+
if (iR !== d && aIndexesR[iR] < aIndexPrev1) {
|
|
2510
2510
|
aFirst = aIndexesR[iR];
|
|
2511
2511
|
} else {
|
|
2512
2512
|
aFirst = aIndexPrev1 - 1;
|
|
@@ -2525,17 +2525,17 @@ var require_build2 = __commonJS({
|
|
|
2525
2525
|
}
|
|
2526
2526
|
return iMaxR;
|
|
2527
2527
|
};
|
|
2528
|
-
var extendOverlappablePathsF = (
|
|
2528
|
+
var extendOverlappablePathsF = (d, aStart, aEnd, bStart, bEnd, isCommon, aIndexesF, iMaxF, aIndexesR, iMaxR, division) => {
|
|
2529
2529
|
const bF = bStart - aStart;
|
|
2530
2530
|
const aLength = aEnd - aStart;
|
|
2531
2531
|
const bLength = bEnd - bStart;
|
|
2532
2532
|
const baDeltaLength = bLength - aLength;
|
|
2533
|
-
const kMinOverlapF = -baDeltaLength - (
|
|
2534
|
-
const kMaxOverlapF = -baDeltaLength + (
|
|
2533
|
+
const kMinOverlapF = -baDeltaLength - (d - 1);
|
|
2534
|
+
const kMaxOverlapF = -baDeltaLength + (d - 1);
|
|
2535
2535
|
let aIndexPrev1 = NOT_YET_SET;
|
|
2536
|
-
const nF =
|
|
2537
|
-
for (let iF = 0, kF = -
|
|
2538
|
-
const insert2 = iF === 0 || iF !==
|
|
2536
|
+
const nF = d < iMaxF ? d : iMaxF;
|
|
2537
|
+
for (let iF = 0, kF = -d; iF <= nF; iF += 1, kF += 2) {
|
|
2538
|
+
const insert2 = iF === 0 || iF !== d && aIndexPrev1 < aIndexesF[iF];
|
|
2539
2539
|
const aLastPrev = insert2 ? aIndexesF[iF] : aIndexPrev1;
|
|
2540
2540
|
const aFirst = insert2 ? aLastPrev : aLastPrev + 1;
|
|
2541
2541
|
const bFirst = bF + aFirst - kF;
|
|
@@ -2550,7 +2550,7 @@ var require_build2 = __commonJS({
|
|
|
2550
2550
|
aIndexPrev1 = aIndexesF[iF];
|
|
2551
2551
|
aIndexesF[iF] = aLast;
|
|
2552
2552
|
if (kMinOverlapF <= kF && kF <= kMaxOverlapF) {
|
|
2553
|
-
const iR = (
|
|
2553
|
+
const iR = (d - 1 - (kF + baDeltaLength)) / 2;
|
|
2554
2554
|
if (iR <= iMaxR && aIndexesR[iR] - 1 <= aLast) {
|
|
2555
2555
|
const bLastPrev = bF + aLastPrev - (insert2 ? kF + 1 : kF - 1);
|
|
2556
2556
|
const nCommonR = countCommonItemsR(
|
|
@@ -2564,8 +2564,8 @@ var require_build2 = __commonJS({
|
|
|
2564
2564
|
const bIndexPrevFirst = bLastPrev - nCommonR;
|
|
2565
2565
|
const aEndPreceding = aIndexPrevFirst + 1;
|
|
2566
2566
|
const bEndPreceding = bIndexPrevFirst + 1;
|
|
2567
|
-
division.nChangePreceding =
|
|
2568
|
-
if (
|
|
2567
|
+
division.nChangePreceding = d - 1;
|
|
2568
|
+
if (d - 1 === aEndPreceding + bEndPreceding - aStart - bStart) {
|
|
2569
2569
|
division.aEndPreceding = aStart;
|
|
2570
2570
|
division.bEndPreceding = bStart;
|
|
2571
2571
|
} else {
|
|
@@ -2584,8 +2584,8 @@ var require_build2 = __commonJS({
|
|
|
2584
2584
|
}
|
|
2585
2585
|
const aStartFollowing = aLast + 1;
|
|
2586
2586
|
const bStartFollowing = bFirst + nCommonF + 1;
|
|
2587
|
-
division.nChangeFollowing =
|
|
2588
|
-
if (
|
|
2587
|
+
division.nChangeFollowing = d - 1;
|
|
2588
|
+
if (d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing) {
|
|
2589
2589
|
division.aStartFollowing = aEnd;
|
|
2590
2590
|
division.bStartFollowing = bEnd;
|
|
2591
2591
|
} else {
|
|
@@ -2598,17 +2598,17 @@ var require_build2 = __commonJS({
|
|
|
2598
2598
|
}
|
|
2599
2599
|
return false;
|
|
2600
2600
|
};
|
|
2601
|
-
var extendOverlappablePathsR = (
|
|
2601
|
+
var extendOverlappablePathsR = (d, aStart, aEnd, bStart, bEnd, isCommon, aIndexesF, iMaxF, aIndexesR, iMaxR, division) => {
|
|
2602
2602
|
const bR = bEnd - aEnd;
|
|
2603
2603
|
const aLength = aEnd - aStart;
|
|
2604
2604
|
const bLength = bEnd - bStart;
|
|
2605
2605
|
const baDeltaLength = bLength - aLength;
|
|
2606
|
-
const kMinOverlapR = baDeltaLength -
|
|
2607
|
-
const kMaxOverlapR = baDeltaLength +
|
|
2606
|
+
const kMinOverlapR = baDeltaLength - d;
|
|
2607
|
+
const kMaxOverlapR = baDeltaLength + d;
|
|
2608
2608
|
let aIndexPrev1 = NOT_YET_SET;
|
|
2609
|
-
const nR =
|
|
2610
|
-
for (let iR = 0, kR =
|
|
2611
|
-
const insert2 = iR === 0 || iR !==
|
|
2609
|
+
const nR = d < iMaxR ? d : iMaxR;
|
|
2610
|
+
for (let iR = 0, kR = d; iR <= nR; iR += 1, kR -= 2) {
|
|
2611
|
+
const insert2 = iR === 0 || iR !== d && aIndexesR[iR] < aIndexPrev1;
|
|
2612
2612
|
const aLastPrev = insert2 ? aIndexesR[iR] : aIndexPrev1;
|
|
2613
2613
|
const aFirst = insert2 ? aLastPrev : aLastPrev - 1;
|
|
2614
2614
|
const bFirst = bR + aFirst - kR;
|
|
@@ -2623,11 +2623,11 @@ var require_build2 = __commonJS({
|
|
|
2623
2623
|
aIndexPrev1 = aIndexesR[iR];
|
|
2624
2624
|
aIndexesR[iR] = aLast;
|
|
2625
2625
|
if (kMinOverlapR <= kR && kR <= kMaxOverlapR) {
|
|
2626
|
-
const iF = (
|
|
2626
|
+
const iF = (d + (kR - baDeltaLength)) / 2;
|
|
2627
2627
|
if (iF <= iMaxF && aLast - 1 <= aIndexesF[iF]) {
|
|
2628
2628
|
const bLast = bFirst - nCommonR;
|
|
2629
|
-
division.nChangePreceding =
|
|
2630
|
-
if (
|
|
2629
|
+
division.nChangePreceding = d;
|
|
2630
|
+
if (d === aLast + bLast - aStart - bStart) {
|
|
2631
2631
|
division.aEndPreceding = aStart;
|
|
2632
2632
|
division.bEndPreceding = bStart;
|
|
2633
2633
|
} else {
|
|
@@ -2639,8 +2639,8 @@ var require_build2 = __commonJS({
|
|
|
2639
2639
|
division.aCommonPreceding = aLast;
|
|
2640
2640
|
division.bCommonPreceding = bLast;
|
|
2641
2641
|
}
|
|
2642
|
-
division.nChangeFollowing =
|
|
2643
|
-
if (
|
|
2642
|
+
division.nChangeFollowing = d - 1;
|
|
2643
|
+
if (d === 1) {
|
|
2644
2644
|
division.nCommonFollowing = 0;
|
|
2645
2645
|
division.aStartFollowing = aEnd;
|
|
2646
2646
|
division.bStartFollowing = bEnd;
|
|
@@ -2660,7 +2660,7 @@ var require_build2 = __commonJS({
|
|
|
2660
2660
|
}
|
|
2661
2661
|
const aStartFollowing = aLastPrev + nCommonF;
|
|
2662
2662
|
const bStartFollowing = bLastPrev + nCommonF;
|
|
2663
|
-
if (
|
|
2663
|
+
if (d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing) {
|
|
2664
2664
|
division.aStartFollowing = aEnd;
|
|
2665
2665
|
division.bStartFollowing = bEnd;
|
|
2666
2666
|
} else {
|
|
@@ -2687,15 +2687,15 @@ var require_build2 = __commonJS({
|
|
|
2687
2687
|
if (baDeltaLength % 2 === 0) {
|
|
2688
2688
|
const dMin = (nChange || baDeltaLength) / 2;
|
|
2689
2689
|
const dMax = (aLength + bLength) / 2;
|
|
2690
|
-
for (let
|
|
2691
|
-
iMaxF = extendPathsF(
|
|
2692
|
-
if (
|
|
2693
|
-
iMaxR = extendPathsR(
|
|
2690
|
+
for (let d = 1; d <= dMax; d += 1) {
|
|
2691
|
+
iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);
|
|
2692
|
+
if (d < dMin) {
|
|
2693
|
+
iMaxR = extendPathsR(d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR);
|
|
2694
2694
|
} else if (
|
|
2695
2695
|
// If a reverse path overlaps a forward path in the same diagonal,
|
|
2696
2696
|
// return a division of the index intervals at the middle change.
|
|
2697
2697
|
extendOverlappablePathsR(
|
|
2698
|
-
|
|
2698
|
+
d,
|
|
2699
2699
|
aStart,
|
|
2700
2700
|
aEnd,
|
|
2701
2701
|
bStart,
|
|
@@ -2714,11 +2714,11 @@ var require_build2 = __commonJS({
|
|
|
2714
2714
|
} else {
|
|
2715
2715
|
const dMin = ((nChange || baDeltaLength) + 1) / 2;
|
|
2716
2716
|
const dMax = (aLength + bLength + 1) / 2;
|
|
2717
|
-
let
|
|
2718
|
-
iMaxF = extendPathsF(
|
|
2719
|
-
for (
|
|
2717
|
+
let d = 1;
|
|
2718
|
+
iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);
|
|
2719
|
+
for (d += 1; d <= dMax; d += 1) {
|
|
2720
2720
|
iMaxR = extendPathsR(
|
|
2721
|
-
|
|
2721
|
+
d - 1,
|
|
2722
2722
|
aStart,
|
|
2723
2723
|
bStart,
|
|
2724
2724
|
bR,
|
|
@@ -2726,13 +2726,13 @@ var require_build2 = __commonJS({
|
|
|
2726
2726
|
aIndexesR,
|
|
2727
2727
|
iMaxR
|
|
2728
2728
|
);
|
|
2729
|
-
if (
|
|
2730
|
-
iMaxF = extendPathsF(
|
|
2729
|
+
if (d < dMin) {
|
|
2730
|
+
iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);
|
|
2731
2731
|
} else if (
|
|
2732
2732
|
// If a forward path overlaps a reverse path in the same diagonal,
|
|
2733
2733
|
// return a division of the index intervals at the middle change.
|
|
2734
2734
|
extendOverlappablePathsF(
|
|
2735
|
-
|
|
2735
|
+
d,
|
|
2736
2736
|
aStart,
|
|
2737
2737
|
aEnd,
|
|
2738
2738
|
bStart,
|
|
@@ -2932,9 +2932,9 @@ var require_assertion_error = __commonJS({
|
|
|
2932
2932
|
});
|
|
2933
2933
|
}
|
|
2934
2934
|
return function extendExclude() {
|
|
2935
|
-
var args = [].slice.call(arguments),
|
|
2936
|
-
for (;
|
|
2937
|
-
excludeProps(res, args[
|
|
2935
|
+
var args = [].slice.call(arguments), i2 = 0, res = {};
|
|
2936
|
+
for (; i2 < args.length; i2++) {
|
|
2937
|
+
excludeProps(res, args[i2]);
|
|
2938
2938
|
}
|
|
2939
2939
|
return res;
|
|
2940
2940
|
};
|
|
@@ -3004,15 +3004,15 @@ var require_pathval = __commonJS({
|
|
|
3004
3004
|
var temporaryValue = obj;
|
|
3005
3005
|
var res = null;
|
|
3006
3006
|
pathDepth = typeof pathDepth === "undefined" ? parsed.length : pathDepth;
|
|
3007
|
-
for (var
|
|
3008
|
-
var part = parsed[
|
|
3007
|
+
for (var i2 = 0; i2 < pathDepth; i2++) {
|
|
3008
|
+
var part = parsed[i2];
|
|
3009
3009
|
if (temporaryValue) {
|
|
3010
3010
|
if (typeof part.p === "undefined") {
|
|
3011
3011
|
temporaryValue = temporaryValue[part.i];
|
|
3012
3012
|
} else {
|
|
3013
3013
|
temporaryValue = temporaryValue[part.p];
|
|
3014
3014
|
}
|
|
3015
|
-
if (
|
|
3015
|
+
if (i2 === pathDepth - 1) {
|
|
3016
3016
|
res = temporaryValue;
|
|
3017
3017
|
}
|
|
3018
3018
|
}
|
|
@@ -3023,11 +3023,11 @@ var require_pathval = __commonJS({
|
|
|
3023
3023
|
var tempObj = obj;
|
|
3024
3024
|
var pathDepth = parsed.length;
|
|
3025
3025
|
var part = null;
|
|
3026
|
-
for (var
|
|
3026
|
+
for (var i2 = 0; i2 < pathDepth; i2++) {
|
|
3027
3027
|
var propName = null;
|
|
3028
3028
|
var propVal = null;
|
|
3029
|
-
part = parsed[
|
|
3030
|
-
if (
|
|
3029
|
+
part = parsed[i2];
|
|
3030
|
+
if (i2 === pathDepth - 1) {
|
|
3031
3031
|
propName = typeof part.p === "undefined" ? part.i : part.p;
|
|
3032
3032
|
tempObj[propName] = val;
|
|
3033
3033
|
} else if (typeof part.p !== "undefined" && tempObj[part.p]) {
|
|
@@ -3035,7 +3035,7 @@ var require_pathval = __commonJS({
|
|
|
3035
3035
|
} else if (typeof part.i !== "undefined" && tempObj[part.i]) {
|
|
3036
3036
|
tempObj = tempObj[part.i];
|
|
3037
3037
|
} else {
|
|
3038
|
-
var next = parsed[
|
|
3038
|
+
var next = parsed[i2 + 1];
|
|
3039
3039
|
propName = typeof part.p === "undefined" ? part.i : part.p;
|
|
3040
3040
|
propVal = typeof next.p === "undefined" ? [] : {};
|
|
3041
3041
|
tempObj[propName] = propVal;
|
|
@@ -3711,8 +3711,8 @@ var require_deep_eql = __commonJS({
|
|
|
3711
3711
|
function getEnumerableSymbols(target) {
|
|
3712
3712
|
var keys2 = [];
|
|
3713
3713
|
var allKeys = Object.getOwnPropertySymbols(target);
|
|
3714
|
-
for (var
|
|
3715
|
-
var key = allKeys[
|
|
3714
|
+
for (var i2 = 0; i2 < allKeys.length; i2 += 1) {
|
|
3715
|
+
var key = allKeys[i2];
|
|
3716
3716
|
if (Object.getOwnPropertyDescriptor(target, key).enumerable) {
|
|
3717
3717
|
keys2.push(key);
|
|
3718
3718
|
}
|
|
@@ -3724,8 +3724,8 @@ var require_deep_eql = __commonJS({
|
|
|
3724
3724
|
if (length === 0) {
|
|
3725
3725
|
return true;
|
|
3726
3726
|
}
|
|
3727
|
-
for (var
|
|
3728
|
-
if (deepEqual(leftHandOperand[keys2[
|
|
3727
|
+
for (var i2 = 0; i2 < length; i2 += 1) {
|
|
3728
|
+
if (deepEqual(leftHandOperand[keys2[i2]], rightHandOperand[keys2[i2]], options) === false) {
|
|
3729
3729
|
return false;
|
|
3730
3730
|
}
|
|
3731
3731
|
}
|
|
@@ -3913,24 +3913,24 @@ var require_proxify = __commonJS({
|
|
|
3913
3913
|
return cap;
|
|
3914
3914
|
}
|
|
3915
3915
|
var memo = [];
|
|
3916
|
-
for (var
|
|
3917
|
-
memo[
|
|
3918
|
-
memo[
|
|
3916
|
+
for (var i2 = 0; i2 <= strA.length; i2++) {
|
|
3917
|
+
memo[i2] = Array(strB.length + 1).fill(0);
|
|
3918
|
+
memo[i2][0] = i2;
|
|
3919
3919
|
}
|
|
3920
3920
|
for (var j = 0; j < strB.length; j++) {
|
|
3921
3921
|
memo[0][j] = j;
|
|
3922
3922
|
}
|
|
3923
|
-
for (var
|
|
3924
|
-
var ch = strA.charCodeAt(
|
|
3923
|
+
for (var i2 = 1; i2 <= strA.length; i2++) {
|
|
3924
|
+
var ch = strA.charCodeAt(i2 - 1);
|
|
3925
3925
|
for (var j = 1; j <= strB.length; j++) {
|
|
3926
|
-
if (Math.abs(
|
|
3927
|
-
memo[
|
|
3926
|
+
if (Math.abs(i2 - j) >= cap) {
|
|
3927
|
+
memo[i2][j] = cap;
|
|
3928
3928
|
continue;
|
|
3929
3929
|
}
|
|
3930
|
-
memo[
|
|
3931
|
-
memo[
|
|
3932
|
-
memo[
|
|
3933
|
-
memo[
|
|
3930
|
+
memo[i2][j] = Math.min(
|
|
3931
|
+
memo[i2 - 1][j] + 1,
|
|
3932
|
+
memo[i2][j - 1] + 1,
|
|
3933
|
+
memo[i2 - 1][j - 1] + (ch === strB.charCodeAt(j - 1) ? 0 : 1)
|
|
3934
3934
|
);
|
|
3935
3935
|
}
|
|
3936
3936
|
}
|
|
@@ -6341,9 +6341,9 @@ function encode(decoded) {
|
|
|
6341
6341
|
const sub = buf.subarray(0, subLength);
|
|
6342
6342
|
let pos = 0;
|
|
6343
6343
|
let out = "";
|
|
6344
|
-
for (let
|
|
6345
|
-
const line = decoded[
|
|
6346
|
-
if (
|
|
6344
|
+
for (let i2 = 0; i2 < decoded.length; i2++) {
|
|
6345
|
+
const line = decoded[i2];
|
|
6346
|
+
if (i2 > 0) {
|
|
6347
6347
|
if (pos === bufLength) {
|
|
6348
6348
|
out += td.decode(buf);
|
|
6349
6349
|
pos = 0;
|
|
@@ -6399,10 +6399,10 @@ var init_sourcemap_codec = __esm({
|
|
|
6399
6399
|
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
6400
6400
|
intToChar = new Uint8Array(64);
|
|
6401
6401
|
charToInt = new Uint8Array(128);
|
|
6402
|
-
for (let
|
|
6403
|
-
const
|
|
6404
|
-
intToChar[
|
|
6405
|
-
charToInt[
|
|
6402
|
+
for (let i2 = 0; i2 < chars.length; i2++) {
|
|
6403
|
+
const c2 = chars.charCodeAt(i2);
|
|
6404
|
+
intToChar[i2] = c2;
|
|
6405
|
+
charToInt[c2] = i2;
|
|
6406
6406
|
}
|
|
6407
6407
|
td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
|
|
6408
6408
|
decode(buf) {
|
|
@@ -6412,8 +6412,8 @@ var init_sourcemap_codec = __esm({
|
|
|
6412
6412
|
} : {
|
|
6413
6413
|
decode(buf) {
|
|
6414
6414
|
let out = "";
|
|
6415
|
-
for (let
|
|
6416
|
-
out += String.fromCharCode(buf[
|
|
6415
|
+
for (let i2 = 0; i2 < buf.length; i2++) {
|
|
6416
|
+
out += String.fromCharCode(buf[i2]);
|
|
6417
6417
|
}
|
|
6418
6418
|
return out;
|
|
6419
6419
|
}
|
|
@@ -6429,8 +6429,8 @@ __export(magic_string_es_exports, {
|
|
|
6429
6429
|
default: () => MagicString
|
|
6430
6430
|
});
|
|
6431
6431
|
function getBtoa() {
|
|
6432
|
-
if (typeof
|
|
6433
|
-
return (str) =>
|
|
6432
|
+
if (typeof globalThis !== "undefined" && typeof globalThis.btoa === "function") {
|
|
6433
|
+
return (str) => globalThis.btoa(unescape(encodeURIComponent(str)));
|
|
6434
6434
|
} else if (typeof Buffer === "function") {
|
|
6435
6435
|
return (str) => Buffer.from(str, "utf-8").toString("base64");
|
|
6436
6436
|
} else {
|
|
@@ -6464,9 +6464,9 @@ function getRelativePath(from, to) {
|
|
|
6464
6464
|
toParts.shift();
|
|
6465
6465
|
}
|
|
6466
6466
|
if (fromParts.length) {
|
|
6467
|
-
let
|
|
6468
|
-
while (
|
|
6469
|
-
fromParts[
|
|
6467
|
+
let i2 = fromParts.length;
|
|
6468
|
+
while (i2--)
|
|
6469
|
+
fromParts[i2] = "..";
|
|
6470
6470
|
}
|
|
6471
6471
|
return fromParts.concat(toParts).join("/");
|
|
6472
6472
|
}
|
|
@@ -6476,22 +6476,22 @@ function isObject2(thing) {
|
|
|
6476
6476
|
function getLocator(source) {
|
|
6477
6477
|
const originalLines = source.split("\n");
|
|
6478
6478
|
const lineOffsets = [];
|
|
6479
|
-
for (let
|
|
6479
|
+
for (let i2 = 0, pos = 0; i2 < originalLines.length; i2++) {
|
|
6480
6480
|
lineOffsets.push(pos);
|
|
6481
|
-
pos += originalLines[
|
|
6481
|
+
pos += originalLines[i2].length + 1;
|
|
6482
6482
|
}
|
|
6483
6483
|
return function locate(index) {
|
|
6484
|
-
let
|
|
6484
|
+
let i2 = 0;
|
|
6485
6485
|
let j = lineOffsets.length;
|
|
6486
|
-
while (
|
|
6487
|
-
const
|
|
6488
|
-
if (index < lineOffsets[
|
|
6489
|
-
j =
|
|
6486
|
+
while (i2 < j) {
|
|
6487
|
+
const m = i2 + j >> 1;
|
|
6488
|
+
if (index < lineOffsets[m]) {
|
|
6489
|
+
j = m;
|
|
6490
6490
|
} else {
|
|
6491
|
-
|
|
6491
|
+
i2 = m + 1;
|
|
6492
6492
|
}
|
|
6493
6493
|
}
|
|
6494
|
-
const line =
|
|
6494
|
+
const line = i2 - 1;
|
|
6495
6495
|
const column = index - lineOffsets[line];
|
|
6496
6496
|
return { line, column };
|
|
6497
6497
|
};
|
|
@@ -6576,6 +6576,15 @@ var init_magic_string_es = __esm({
|
|
|
6576
6576
|
prependRight(content) {
|
|
6577
6577
|
this.intro = content + this.intro;
|
|
6578
6578
|
}
|
|
6579
|
+
reset() {
|
|
6580
|
+
this.intro = "";
|
|
6581
|
+
this.outro = "";
|
|
6582
|
+
if (this.edited) {
|
|
6583
|
+
this.content = this.original;
|
|
6584
|
+
this.storeName = false;
|
|
6585
|
+
this.edited = false;
|
|
6586
|
+
}
|
|
6587
|
+
}
|
|
6579
6588
|
split(index) {
|
|
6580
6589
|
const sliceIndex = index - this.start;
|
|
6581
6590
|
const originalBefore = this.original.slice(0, sliceIndex);
|
|
@@ -6676,9 +6685,10 @@ var init_magic_string_es = __esm({
|
|
|
6676
6685
|
}
|
|
6677
6686
|
addEdit(sourceIndex, content, loc, nameIndex) {
|
|
6678
6687
|
if (content.length) {
|
|
6688
|
+
const contentLengthMinusOne = content.length - 1;
|
|
6679
6689
|
let contentLineEnd = content.indexOf("\n", 0);
|
|
6680
6690
|
let previousContentLineEnd = -1;
|
|
6681
|
-
while (contentLineEnd >= 0) {
|
|
6691
|
+
while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {
|
|
6682
6692
|
const segment2 = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
|
|
6683
6693
|
if (nameIndex >= 0) {
|
|
6684
6694
|
segment2.push(nameIndex);
|
|
@@ -6744,7 +6754,7 @@ var init_magic_string_es = __esm({
|
|
|
6744
6754
|
return;
|
|
6745
6755
|
const lines = str.split("\n");
|
|
6746
6756
|
if (lines.length > 1) {
|
|
6747
|
-
for (let
|
|
6757
|
+
for (let i2 = 0; i2 < lines.length - 1; i2++) {
|
|
6748
6758
|
this.generatedCodeLine++;
|
|
6749
6759
|
this.raw[this.generatedCodeLine] = this.rawSegments = [];
|
|
6750
6760
|
}
|
|
@@ -6909,8 +6919,8 @@ var init_magic_string_es = __esm({
|
|
|
6909
6919
|
if (options.exclude) {
|
|
6910
6920
|
const exclusions = typeof options.exclude[0] === "number" ? [options.exclude] : options.exclude;
|
|
6911
6921
|
exclusions.forEach((exclusion) => {
|
|
6912
|
-
for (let
|
|
6913
|
-
isExcluded[
|
|
6922
|
+
for (let i2 = exclusion[0]; i2 < exclusion[1]; i2 += 1) {
|
|
6923
|
+
isExcluded[i2] = true;
|
|
6914
6924
|
}
|
|
6915
6925
|
});
|
|
6916
6926
|
}
|
|
@@ -7128,6 +7138,26 @@ var init_magic_string_es = __esm({
|
|
|
7128
7138
|
}
|
|
7129
7139
|
return this;
|
|
7130
7140
|
}
|
|
7141
|
+
reset(start, end) {
|
|
7142
|
+
while (start < 0)
|
|
7143
|
+
start += this.original.length;
|
|
7144
|
+
while (end < 0)
|
|
7145
|
+
end += this.original.length;
|
|
7146
|
+
if (start === end)
|
|
7147
|
+
return this;
|
|
7148
|
+
if (start < 0 || end > this.original.length)
|
|
7149
|
+
throw new Error("Character is out of bounds");
|
|
7150
|
+
if (start > end)
|
|
7151
|
+
throw new Error("end must be greater than start");
|
|
7152
|
+
this._split(start);
|
|
7153
|
+
this._split(end);
|
|
7154
|
+
let chunk = this.byStart[start];
|
|
7155
|
+
while (chunk) {
|
|
7156
|
+
chunk.reset();
|
|
7157
|
+
chunk = end > chunk.end ? this.byStart[chunk.end] : null;
|
|
7158
|
+
}
|
|
7159
|
+
return this;
|
|
7160
|
+
}
|
|
7131
7161
|
lastChar() {
|
|
7132
7162
|
if (this.outro.length)
|
|
7133
7163
|
return this.outro[this.outro.length - 1];
|
|
@@ -7335,15 +7365,15 @@ var init_magic_string_es = __esm({
|
|
|
7335
7365
|
_replaceRegexp(searchValue, replacement) {
|
|
7336
7366
|
function getReplacement(match, str) {
|
|
7337
7367
|
if (typeof replacement === "string") {
|
|
7338
|
-
return replacement.replace(/\$(\$|&|\d+)/g, (_,
|
|
7339
|
-
if (
|
|
7368
|
+
return replacement.replace(/\$(\$|&|\d+)/g, (_, i2) => {
|
|
7369
|
+
if (i2 === "$")
|
|
7340
7370
|
return "$";
|
|
7341
|
-
if (
|
|
7371
|
+
if (i2 === "&")
|
|
7342
7372
|
return match[0];
|
|
7343
|
-
const num = +
|
|
7373
|
+
const num = +i2;
|
|
7344
7374
|
if (num < match.length)
|
|
7345
|
-
return match[+
|
|
7346
|
-
return `$${
|
|
7375
|
+
return match[+i2];
|
|
7376
|
+
return `$${i2}`;
|
|
7347
7377
|
});
|
|
7348
7378
|
} else {
|
|
7349
7379
|
return replacement(...match, match.index, str, match.groups);
|
|
@@ -7489,8 +7519,8 @@ var init_magic_string_es = __esm({
|
|
|
7489
7519
|
if (this.intro) {
|
|
7490
7520
|
mappings.advance(this.intro);
|
|
7491
7521
|
}
|
|
7492
|
-
this.sources.forEach((source,
|
|
7493
|
-
if (
|
|
7522
|
+
this.sources.forEach((source, i2) => {
|
|
7523
|
+
if (i2 > 0) {
|
|
7494
7524
|
mappings.advance(this.separator);
|
|
7495
7525
|
}
|
|
7496
7526
|
const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;
|
|
@@ -7573,9 +7603,9 @@ var init_magic_string_es = __esm({
|
|
|
7573
7603
|
if (indentStr === "")
|
|
7574
7604
|
return this;
|
|
7575
7605
|
let trailingNewline = !this.intro || this.intro.slice(-1) === "\n";
|
|
7576
|
-
this.sources.forEach((source,
|
|
7606
|
+
this.sources.forEach((source, i2) => {
|
|
7577
7607
|
const separator = source.separator !== void 0 ? source.separator : this.separator;
|
|
7578
|
-
const indentStart = trailingNewline ||
|
|
7608
|
+
const indentStart = trailingNewline || i2 > 0 && /\r?\n$/.test(separator);
|
|
7579
7609
|
source.content.indent(indentStr, {
|
|
7580
7610
|
exclude: source.indentExclusionRanges,
|
|
7581
7611
|
indentStart
|
|
@@ -7595,9 +7625,9 @@ var init_magic_string_es = __esm({
|
|
|
7595
7625
|
return this;
|
|
7596
7626
|
}
|
|
7597
7627
|
toString() {
|
|
7598
|
-
const body = this.sources.map((source,
|
|
7628
|
+
const body = this.sources.map((source, i2) => {
|
|
7599
7629
|
const separator = source.separator !== void 0 ? source.separator : this.separator;
|
|
7600
|
-
const str = (
|
|
7630
|
+
const str = (i2 > 0 ? separator : "") + source.content.toString();
|
|
7601
7631
|
return str;
|
|
7602
7632
|
}).join("");
|
|
7603
7633
|
return this.intro + body;
|
|
@@ -7626,9 +7656,9 @@ var init_magic_string_es = __esm({
|
|
|
7626
7656
|
this.intro = this.intro.replace(rx, "");
|
|
7627
7657
|
if (!this.intro) {
|
|
7628
7658
|
let source;
|
|
7629
|
-
let
|
|
7659
|
+
let i2 = 0;
|
|
7630
7660
|
do {
|
|
7631
|
-
source = this.sources[
|
|
7661
|
+
source = this.sources[i2++];
|
|
7632
7662
|
if (!source) {
|
|
7633
7663
|
break;
|
|
7634
7664
|
}
|
|
@@ -7639,9 +7669,9 @@ var init_magic_string_es = __esm({
|
|
|
7639
7669
|
trimEnd(charType) {
|
|
7640
7670
|
const rx = new RegExp((charType || "\\s") + "+$");
|
|
7641
7671
|
let source;
|
|
7642
|
-
let
|
|
7672
|
+
let i2 = this.sources.length - 1;
|
|
7643
7673
|
do {
|
|
7644
|
-
source = this.sources[
|
|
7674
|
+
source = this.sources[i2--];
|
|
7645
7675
|
if (!source) {
|
|
7646
7676
|
this.intro = this.intro.replace(rx, "");
|
|
7647
7677
|
break;
|
|
@@ -7662,16 +7692,16 @@ var require_camelcase = __commonJS({
|
|
|
7662
7692
|
let isLastCharLower = false;
|
|
7663
7693
|
let isLastCharUpper = false;
|
|
7664
7694
|
let isLastLastCharUpper = false;
|
|
7665
|
-
for (let
|
|
7666
|
-
const character = string3[
|
|
7695
|
+
for (let i2 = 0; i2 < string3.length; i2++) {
|
|
7696
|
+
const character = string3[i2];
|
|
7667
7697
|
if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) {
|
|
7668
|
-
string3 = string3.slice(0,
|
|
7698
|
+
string3 = string3.slice(0, i2) + "-" + string3.slice(i2);
|
|
7669
7699
|
isLastCharLower = false;
|
|
7670
7700
|
isLastLastCharUpper = isLastCharUpper;
|
|
7671
7701
|
isLastCharUpper = true;
|
|
7672
|
-
|
|
7702
|
+
i2++;
|
|
7673
7703
|
} else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) {
|
|
7674
|
-
string3 = string3.slice(0,
|
|
7704
|
+
string3 = string3.slice(0, i2 - 1) + "-" + string3.slice(i2 - 1);
|
|
7675
7705
|
isLastLastCharUpper = isLastCharUpper;
|
|
7676
7706
|
isLastCharUpper = false;
|
|
7677
7707
|
isLastCharLower = true;
|
|
@@ -7706,7 +7736,7 @@ var require_camelcase = __commonJS({
|
|
|
7706
7736
|
if (hasUpperCase) {
|
|
7707
7737
|
input = preserveCamelCase(input);
|
|
7708
7738
|
}
|
|
7709
|
-
input = input.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()).replace(/\d+(\w|$)/g, (
|
|
7739
|
+
input = input.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()).replace(/\d+(\w|$)/g, (m) => m.toUpperCase());
|
|
7710
7740
|
return postProcess(input);
|
|
7711
7741
|
};
|
|
7712
7742
|
module.exports = camelCase;
|
|
@@ -7804,34 +7834,34 @@ function deepClone(val, options = defaultCloneOptions) {
|
|
|
7804
7834
|
return clone(val, seen, options);
|
|
7805
7835
|
}
|
|
7806
7836
|
function clone(val, seen, options = defaultCloneOptions) {
|
|
7807
|
-
let
|
|
7837
|
+
let k2, out;
|
|
7808
7838
|
if (seen.has(val))
|
|
7809
7839
|
return seen.get(val);
|
|
7810
7840
|
if (Array.isArray(val)) {
|
|
7811
|
-
out = Array(
|
|
7841
|
+
out = Array(k2 = val.length);
|
|
7812
7842
|
seen.set(val, out);
|
|
7813
|
-
while (
|
|
7814
|
-
out[
|
|
7843
|
+
while (k2--)
|
|
7844
|
+
out[k2] = clone(val[k2], seen, options);
|
|
7815
7845
|
return out;
|
|
7816
7846
|
}
|
|
7817
7847
|
if (Object.prototype.toString.call(val) === "[object Object]") {
|
|
7818
7848
|
out = Object.create(Object.getPrototypeOf(val));
|
|
7819
7849
|
seen.set(val, out);
|
|
7820
7850
|
const props = getOwnProperties(val);
|
|
7821
|
-
for (const
|
|
7822
|
-
const descriptor = Object.getOwnPropertyDescriptor(val,
|
|
7851
|
+
for (const k22 of props) {
|
|
7852
|
+
const descriptor = Object.getOwnPropertyDescriptor(val, k22);
|
|
7823
7853
|
if (!descriptor)
|
|
7824
7854
|
continue;
|
|
7825
|
-
const cloned = clone(val[
|
|
7855
|
+
const cloned = clone(val[k22], seen, options);
|
|
7826
7856
|
if ("get" in descriptor) {
|
|
7827
|
-
Object.defineProperty(out,
|
|
7857
|
+
Object.defineProperty(out, k22, {
|
|
7828
7858
|
...descriptor,
|
|
7829
7859
|
get() {
|
|
7830
7860
|
return cloned;
|
|
7831
7861
|
}
|
|
7832
7862
|
});
|
|
7833
7863
|
} else {
|
|
7834
|
-
Object.defineProperty(out,
|
|
7864
|
+
Object.defineProperty(out, k22, {
|
|
7835
7865
|
...descriptor,
|
|
7836
7866
|
writable: options.forceWritable ? true : descriptor.writable,
|
|
7837
7867
|
value: cloned
|
|
@@ -7847,8 +7877,8 @@ function noop() {
|
|
|
7847
7877
|
function objectAttr(source, path3, defaultValue = void 0) {
|
|
7848
7878
|
const paths = path3.replace(/\[(\d+)\]/g, ".$1").split(".");
|
|
7849
7879
|
let result = source;
|
|
7850
|
-
for (const
|
|
7851
|
-
result = Object(result)[
|
|
7880
|
+
for (const p of paths) {
|
|
7881
|
+
result = Object(result)[p];
|
|
7852
7882
|
if (result === void 0)
|
|
7853
7883
|
return defaultValue;
|
|
7854
7884
|
}
|
|
@@ -7857,13 +7887,13 @@ function objectAttr(source, path3, defaultValue = void 0) {
|
|
|
7857
7887
|
function createDefer() {
|
|
7858
7888
|
let resolve3 = null;
|
|
7859
7889
|
let reject = null;
|
|
7860
|
-
const
|
|
7890
|
+
const p = new Promise((_resolve, _reject) => {
|
|
7861
7891
|
resolve3 = _resolve;
|
|
7862
7892
|
reject = _reject;
|
|
7863
7893
|
});
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
return
|
|
7894
|
+
p.resolve = resolve3;
|
|
7895
|
+
p.reject = reject;
|
|
7896
|
+
return p;
|
|
7867
7897
|
}
|
|
7868
7898
|
|
|
7869
7899
|
// ../../node_modules/@vitest/utils/dist/chunk-display.js
|
|
@@ -7913,21 +7943,21 @@ var formatRegExp = /%[sdjifoOcj%]/g;
|
|
|
7913
7943
|
function format(...args) {
|
|
7914
7944
|
if (typeof args[0] !== "string") {
|
|
7915
7945
|
const objects = [];
|
|
7916
|
-
for (let
|
|
7917
|
-
objects.push(inspect2(args[
|
|
7946
|
+
for (let i22 = 0; i22 < args.length; i22++)
|
|
7947
|
+
objects.push(inspect2(args[i22], { depth: 0, colors: false, compact: 3 }));
|
|
7918
7948
|
return objects.join(" ");
|
|
7919
7949
|
}
|
|
7920
7950
|
const len = args.length;
|
|
7921
|
-
let
|
|
7951
|
+
let i2 = 1;
|
|
7922
7952
|
const template = args[0];
|
|
7923
7953
|
let str = String(template).replace(formatRegExp, (x) => {
|
|
7924
7954
|
if (x === "%%")
|
|
7925
7955
|
return "%";
|
|
7926
|
-
if (
|
|
7956
|
+
if (i2 >= len)
|
|
7927
7957
|
return x;
|
|
7928
7958
|
switch (x) {
|
|
7929
7959
|
case "%s": {
|
|
7930
|
-
const value = args[
|
|
7960
|
+
const value = args[i2++];
|
|
7931
7961
|
if (typeof value === "bigint")
|
|
7932
7962
|
return `${value.toString()}n`;
|
|
7933
7963
|
if (typeof value === "number" && value === 0 && 1 / value < 0)
|
|
@@ -7937,35 +7967,35 @@ function format(...args) {
|
|
|
7937
7967
|
return String(value);
|
|
7938
7968
|
}
|
|
7939
7969
|
case "%d": {
|
|
7940
|
-
const value = args[
|
|
7970
|
+
const value = args[i2++];
|
|
7941
7971
|
if (typeof value === "bigint")
|
|
7942
7972
|
return `${value.toString()}n`;
|
|
7943
7973
|
return Number(value).toString();
|
|
7944
7974
|
}
|
|
7945
7975
|
case "%i": {
|
|
7946
|
-
const value = args[
|
|
7976
|
+
const value = args[i2++];
|
|
7947
7977
|
if (typeof value === "bigint")
|
|
7948
7978
|
return `${value.toString()}n`;
|
|
7949
7979
|
return Number.parseInt(String(value)).toString();
|
|
7950
7980
|
}
|
|
7951
7981
|
case "%f":
|
|
7952
|
-
return Number.parseFloat(String(args[
|
|
7982
|
+
return Number.parseFloat(String(args[i2++])).toString();
|
|
7953
7983
|
case "%o":
|
|
7954
|
-
return inspect2(args[
|
|
7984
|
+
return inspect2(args[i2++], { showHidden: true, showProxy: true });
|
|
7955
7985
|
case "%O":
|
|
7956
|
-
return inspect2(args[
|
|
7986
|
+
return inspect2(args[i2++]);
|
|
7957
7987
|
case "%c": {
|
|
7958
|
-
|
|
7988
|
+
i2++;
|
|
7959
7989
|
return "";
|
|
7960
7990
|
}
|
|
7961
7991
|
case "%j":
|
|
7962
7992
|
try {
|
|
7963
|
-
return JSON.stringify(args[
|
|
7993
|
+
return JSON.stringify(args[i2++]);
|
|
7964
7994
|
} catch (err) {
|
|
7965
|
-
const
|
|
7995
|
+
const m = err.message;
|
|
7966
7996
|
if (
|
|
7967
7997
|
// chromium
|
|
7968
|
-
|
|
7998
|
+
m.includes("circular structure") || m.includes("cyclic structures") || m.includes("cyclic object")
|
|
7969
7999
|
)
|
|
7970
8000
|
return "[Circular]";
|
|
7971
8001
|
throw err;
|
|
@@ -7974,7 +8004,7 @@ function format(...args) {
|
|
|
7974
8004
|
return x;
|
|
7975
8005
|
}
|
|
7976
8006
|
});
|
|
7977
|
-
for (let x = args[
|
|
8007
|
+
for (let x = args[i2]; i2 < len; x = args[++i2]) {
|
|
7978
8008
|
if (x === null || typeof x !== "object")
|
|
7979
8009
|
str += ` ${x}`;
|
|
7980
8010
|
else
|
|
@@ -8300,33 +8330,33 @@ function joinAlignedDiffsNoExpand(diffs, options) {
|
|
|
8300
8330
|
let jLength = iLength;
|
|
8301
8331
|
let hasExcessAtStartOrEnd = false;
|
|
8302
8332
|
let nExcessesBetweenChanges = 0;
|
|
8303
|
-
let
|
|
8304
|
-
while (
|
|
8305
|
-
const iStart =
|
|
8306
|
-
while (
|
|
8307
|
-
|
|
8308
|
-
if (iStart !==
|
|
8333
|
+
let i2 = 0;
|
|
8334
|
+
while (i2 !== iLength) {
|
|
8335
|
+
const iStart = i2;
|
|
8336
|
+
while (i2 !== iLength && diffs[i2][0] === DIFF_EQUAL)
|
|
8337
|
+
i2 += 1;
|
|
8338
|
+
if (iStart !== i2) {
|
|
8309
8339
|
if (iStart === 0) {
|
|
8310
|
-
if (
|
|
8311
|
-
jLength -=
|
|
8340
|
+
if (i2 > nContextLines) {
|
|
8341
|
+
jLength -= i2 - nContextLines;
|
|
8312
8342
|
hasExcessAtStartOrEnd = true;
|
|
8313
8343
|
}
|
|
8314
|
-
} else if (
|
|
8315
|
-
const n2 =
|
|
8344
|
+
} else if (i2 === iLength) {
|
|
8345
|
+
const n2 = i2 - iStart;
|
|
8316
8346
|
if (n2 > nContextLines) {
|
|
8317
8347
|
jLength -= n2 - nContextLines;
|
|
8318
8348
|
hasExcessAtStartOrEnd = true;
|
|
8319
8349
|
}
|
|
8320
8350
|
} else {
|
|
8321
|
-
const n2 =
|
|
8351
|
+
const n2 = i2 - iStart;
|
|
8322
8352
|
if (n2 > nContextLines2) {
|
|
8323
8353
|
jLength -= n2 - nContextLines2;
|
|
8324
8354
|
nExcessesBetweenChanges += 1;
|
|
8325
8355
|
}
|
|
8326
8356
|
}
|
|
8327
8357
|
}
|
|
8328
|
-
while (
|
|
8329
|
-
|
|
8358
|
+
while (i2 !== iLength && diffs[i2][0] !== DIFF_EQUAL)
|
|
8359
|
+
i2 += 1;
|
|
8330
8360
|
}
|
|
8331
8361
|
const hasPatch = nExcessesBetweenChanges !== 0 || hasExcessAtStartOrEnd;
|
|
8332
8362
|
if (nExcessesBetweenChanges !== 0)
|
|
@@ -8358,28 +8388,28 @@ function joinAlignedDiffsNoExpand(diffs, options) {
|
|
|
8358
8388
|
lines.push(printInsertLine(line, j === 0 || j === jLast, options));
|
|
8359
8389
|
bEnd += 1;
|
|
8360
8390
|
};
|
|
8361
|
-
|
|
8362
|
-
while (
|
|
8363
|
-
let iStart =
|
|
8364
|
-
while (
|
|
8365
|
-
|
|
8366
|
-
if (iStart !==
|
|
8391
|
+
i2 = 0;
|
|
8392
|
+
while (i2 !== iLength) {
|
|
8393
|
+
let iStart = i2;
|
|
8394
|
+
while (i2 !== iLength && diffs[i2][0] === DIFF_EQUAL)
|
|
8395
|
+
i2 += 1;
|
|
8396
|
+
if (iStart !== i2) {
|
|
8367
8397
|
if (iStart === 0) {
|
|
8368
|
-
if (
|
|
8369
|
-
iStart =
|
|
8398
|
+
if (i2 > nContextLines) {
|
|
8399
|
+
iStart = i2 - nContextLines;
|
|
8370
8400
|
aStart = iStart;
|
|
8371
8401
|
bStart = iStart;
|
|
8372
8402
|
aEnd = aStart;
|
|
8373
8403
|
bEnd = bStart;
|
|
8374
8404
|
}
|
|
8375
|
-
for (let iCommon = iStart; iCommon !==
|
|
8405
|
+
for (let iCommon = iStart; iCommon !== i2; iCommon += 1)
|
|
8376
8406
|
pushCommonLine(diffs[iCommon][1]);
|
|
8377
|
-
} else if (
|
|
8378
|
-
const iEnd =
|
|
8407
|
+
} else if (i2 === iLength) {
|
|
8408
|
+
const iEnd = i2 - iStart > nContextLines ? iStart + nContextLines : i2;
|
|
8379
8409
|
for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1)
|
|
8380
8410
|
pushCommonLine(diffs[iCommon][1]);
|
|
8381
8411
|
} else {
|
|
8382
|
-
const nCommon =
|
|
8412
|
+
const nCommon = i2 - iStart;
|
|
8383
8413
|
if (nCommon > nContextLines2) {
|
|
8384
8414
|
const iEnd = iStart + nContextLines;
|
|
8385
8415
|
for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1)
|
|
@@ -8398,21 +8428,21 @@ function joinAlignedDiffsNoExpand(diffs, options) {
|
|
|
8398
8428
|
bStart = bEnd + nOmit;
|
|
8399
8429
|
aEnd = aStart;
|
|
8400
8430
|
bEnd = bStart;
|
|
8401
|
-
for (let iCommon =
|
|
8431
|
+
for (let iCommon = i2 - nContextLines; iCommon !== i2; iCommon += 1)
|
|
8402
8432
|
pushCommonLine(diffs[iCommon][1]);
|
|
8403
8433
|
} else {
|
|
8404
|
-
for (let iCommon = iStart; iCommon !==
|
|
8434
|
+
for (let iCommon = iStart; iCommon !== i2; iCommon += 1)
|
|
8405
8435
|
pushCommonLine(diffs[iCommon][1]);
|
|
8406
8436
|
}
|
|
8407
8437
|
}
|
|
8408
8438
|
}
|
|
8409
|
-
while (
|
|
8410
|
-
pushDeleteLine(diffs[
|
|
8411
|
-
|
|
8439
|
+
while (i2 !== iLength && diffs[i2][0] === DIFF_DELETE) {
|
|
8440
|
+
pushDeleteLine(diffs[i2][1]);
|
|
8441
|
+
i2 += 1;
|
|
8412
8442
|
}
|
|
8413
|
-
while (
|
|
8414
|
-
pushInsertLine(diffs[
|
|
8415
|
-
|
|
8443
|
+
while (i2 !== iLength && diffs[i2][0] === DIFF_INSERT) {
|
|
8444
|
+
pushInsertLine(diffs[i2][1]);
|
|
8445
|
+
i2 += 1;
|
|
8416
8446
|
}
|
|
8417
8447
|
}
|
|
8418
8448
|
if (hasPatch)
|
|
@@ -8420,9 +8450,9 @@ function joinAlignedDiffsNoExpand(diffs, options) {
|
|
|
8420
8450
|
return lines.join("\n");
|
|
8421
8451
|
}
|
|
8422
8452
|
function joinAlignedDiffsExpand(diffs, options) {
|
|
8423
|
-
return diffs.map((diff2,
|
|
8453
|
+
return diffs.map((diff2, i2, diffs2) => {
|
|
8424
8454
|
const line = diff2[1];
|
|
8425
|
-
const isFirstOrLast =
|
|
8455
|
+
const isFirstOrLast = i2 === 0 || i2 === diffs2.length - 1;
|
|
8426
8456
|
switch (diff2[0]) {
|
|
8427
8457
|
case DIFF_DELETE:
|
|
8428
8458
|
return printDeleteLine(line, isFirstOrLast, options);
|
|
@@ -8436,17 +8466,17 @@ function joinAlignedDiffsExpand(diffs, options) {
|
|
|
8436
8466
|
var noColor = (string3) => string3;
|
|
8437
8467
|
var DIFF_CONTEXT_DEFAULT = 5;
|
|
8438
8468
|
function getDefaultOptions() {
|
|
8439
|
-
const
|
|
8469
|
+
const c2 = getColors();
|
|
8440
8470
|
return {
|
|
8441
8471
|
aAnnotation: "Expected",
|
|
8442
|
-
aColor:
|
|
8472
|
+
aColor: c2.green,
|
|
8443
8473
|
aIndicator: "-",
|
|
8444
8474
|
bAnnotation: "Received",
|
|
8445
|
-
bColor:
|
|
8475
|
+
bColor: c2.red,
|
|
8446
8476
|
bIndicator: "+",
|
|
8447
|
-
changeColor:
|
|
8477
|
+
changeColor: c2.inverse,
|
|
8448
8478
|
changeLineTrailingSpaceColor: noColor,
|
|
8449
|
-
commonColor:
|
|
8479
|
+
commonColor: c2.dim,
|
|
8450
8480
|
commonIndicator: " ",
|
|
8451
8481
|
commonLineTrailingSpaceColor: noColor,
|
|
8452
8482
|
compareKeys: void 0,
|
|
@@ -8455,7 +8485,7 @@ function getDefaultOptions() {
|
|
|
8455
8485
|
expand: true,
|
|
8456
8486
|
includeChangeCounts: false,
|
|
8457
8487
|
omitAnnotationLines: false,
|
|
8458
|
-
patchColor:
|
|
8488
|
+
patchColor: c2.yellow
|
|
8459
8489
|
};
|
|
8460
8490
|
}
|
|
8461
8491
|
function getCompareKeys(compareKeys) {
|
|
@@ -8731,8 +8761,8 @@ var import_diff_sequences = __toESM(require_build2(), 1);
|
|
|
8731
8761
|
init_loupe();
|
|
8732
8762
|
var IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
|
|
8733
8763
|
var IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
|
|
8734
|
-
function isImmutable(
|
|
8735
|
-
return
|
|
8764
|
+
function isImmutable(v) {
|
|
8765
|
+
return v && (v[IS_COLLECTION_SYMBOL] || v[IS_RECORD_SYMBOL]);
|
|
8736
8766
|
}
|
|
8737
8767
|
var OBJECT_PROTO = Object.getPrototypeOf({});
|
|
8738
8768
|
function getUnserializableMessage(err) {
|
|
@@ -8764,11 +8794,11 @@ function serializeError(val, seen = /* @__PURE__ */ new WeakMap()) {
|
|
|
8764
8794
|
if (Array.isArray(val)) {
|
|
8765
8795
|
const clone2 = new Array(val.length);
|
|
8766
8796
|
seen.set(val, clone2);
|
|
8767
|
-
val.forEach((e,
|
|
8797
|
+
val.forEach((e, i2) => {
|
|
8768
8798
|
try {
|
|
8769
|
-
clone2[
|
|
8799
|
+
clone2[i2] = serializeError(e, seen);
|
|
8770
8800
|
} catch (err) {
|
|
8771
|
-
clone2[
|
|
8801
|
+
clone2[i2] = getUnserializableMessage(err);
|
|
8772
8802
|
}
|
|
8773
8803
|
});
|
|
8774
8804
|
return clone2;
|
|
@@ -8833,7 +8863,7 @@ function isAsymmetricMatcher(data) {
|
|
|
8833
8863
|
function isReplaceable(obj1, obj2) {
|
|
8834
8864
|
const obj1Type = getType(obj1);
|
|
8835
8865
|
const obj2Type = getType(obj2);
|
|
8836
|
-
return obj1Type === obj2Type && obj1Type === "Object";
|
|
8866
|
+
return obj1Type === obj2Type && (obj1Type === "Object" || obj1Type === "Array");
|
|
8837
8867
|
}
|
|
8838
8868
|
function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE__ */ new WeakSet(), expectedReplaced = /* @__PURE__ */ new WeakSet()) {
|
|
8839
8869
|
if (!isReplaceable(actual, expected))
|
|
@@ -8868,7 +8898,7 @@ function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE_
|
|
|
8868
8898
|
};
|
|
8869
8899
|
}
|
|
8870
8900
|
|
|
8871
|
-
// ../../node_modules/@vitest/runner/dist/
|
|
8901
|
+
// ../../node_modules/@vitest/runner/dist/chunk-tasks.js
|
|
8872
8902
|
init_esm_shims();
|
|
8873
8903
|
function createChainable(keys2, fn2) {
|
|
8874
8904
|
function create(context) {
|
|
@@ -9005,8 +9035,8 @@ function normalizeString(path3, allowAboveRoot) {
|
|
|
9005
9035
|
}
|
|
9006
9036
|
return res;
|
|
9007
9037
|
}
|
|
9008
|
-
var isAbsolute = function(
|
|
9009
|
-
return _IS_ABSOLUTE_RE.test(
|
|
9038
|
+
var isAbsolute = function(p) {
|
|
9039
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
9010
9040
|
};
|
|
9011
9041
|
|
|
9012
9042
|
// ../../node_modules/@vitest/runner/dist/index.js
|
|
@@ -9080,6 +9110,10 @@ function createTestContext(test3, runner2) {
|
|
|
9080
9110
|
test3.onFailed || (test3.onFailed = []);
|
|
9081
9111
|
test3.onFailed.push(fn2);
|
|
9082
9112
|
};
|
|
9113
|
+
context.onTestFinished = (fn2) => {
|
|
9114
|
+
test3.onFinished || (test3.onFinished = []);
|
|
9115
|
+
test3.onFinished.push(fn2);
|
|
9116
|
+
};
|
|
9083
9117
|
return ((_a2 = runner2.extendTaskContext) == null ? void 0 : _a2.call(runner2, context)) || context;
|
|
9084
9118
|
}
|
|
9085
9119
|
function makeTimeoutMsg(isHook, timeout) {
|
|
@@ -9087,14 +9121,16 @@ function makeTimeoutMsg(isHook, timeout) {
|
|
|
9087
9121
|
If this is a long-running ${isHook ? "hook" : "test"}, pass a timeout value as the last argument or configure it globally with "${isHook ? "hookTimeout" : "testTimeout"}".`;
|
|
9088
9122
|
}
|
|
9089
9123
|
function mergeContextFixtures(fixtures, context = {}) {
|
|
9090
|
-
const
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
value
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9124
|
+
const fixtureOptionKeys = ["auto"];
|
|
9125
|
+
const fixtureArray = Object.entries(fixtures).map(([prop, value]) => {
|
|
9126
|
+
const fixtureItem = { value };
|
|
9127
|
+
if (Array.isArray(value) && value.length >= 2 && isObject(value[1]) && Object.keys(value[1]).some((key) => fixtureOptionKeys.includes(key))) {
|
|
9128
|
+
Object.assign(fixtureItem, value[1]);
|
|
9129
|
+
fixtureItem.value = value[0];
|
|
9130
|
+
}
|
|
9131
|
+
fixtureItem.prop = prop;
|
|
9132
|
+
fixtureItem.isFn = typeof fixtureItem.value === "function";
|
|
9133
|
+
return fixtureItem;
|
|
9098
9134
|
});
|
|
9099
9135
|
if (Array.isArray(context.fixtures))
|
|
9100
9136
|
context.fixtures = context.fixtures.concat(fixtureArray);
|
|
@@ -9120,7 +9156,8 @@ function withFixtures(fn2, testContext) {
|
|
|
9120
9156
|
if (!(fixtures == null ? void 0 : fixtures.length))
|
|
9121
9157
|
return fn2(context);
|
|
9122
9158
|
const usedProps = getUsedProps(fn2);
|
|
9123
|
-
|
|
9159
|
+
const hasAutoFixture = fixtures.some(({ auto }) => auto);
|
|
9160
|
+
if (!usedProps.length && !hasAutoFixture)
|
|
9124
9161
|
return fn2(context);
|
|
9125
9162
|
if (!fixtureValueMaps.get(context))
|
|
9126
9163
|
fixtureValueMaps.set(context, /* @__PURE__ */ new Map());
|
|
@@ -9128,7 +9165,7 @@ function withFixtures(fn2, testContext) {
|
|
|
9128
9165
|
if (!cleanupFnArrayMap.has(context))
|
|
9129
9166
|
cleanupFnArrayMap.set(context, []);
|
|
9130
9167
|
const cleanupFnArray = cleanupFnArrayMap.get(context);
|
|
9131
|
-
const usedFixtures = fixtures.filter(({ prop }) => usedProps.includes(prop));
|
|
9168
|
+
const usedFixtures = fixtures.filter(({ prop, auto }) => auto || usedProps.includes(prop));
|
|
9132
9169
|
const pendingFixtures = resolveDeps(usedFixtures);
|
|
9133
9170
|
if (!pendingFixtures.length)
|
|
9134
9171
|
return fn2(context);
|
|
@@ -9177,7 +9214,7 @@ function resolveDeps(fixtures, depSet = /* @__PURE__ */ new Set(), pendingFixtur
|
|
|
9177
9214
|
return;
|
|
9178
9215
|
}
|
|
9179
9216
|
if (depSet.has(fixture))
|
|
9180
|
-
throw new Error(`Circular fixture dependency detected: ${fixture.prop} <- ${[...depSet].reverse().map((
|
|
9217
|
+
throw new Error(`Circular fixture dependency detected: ${fixture.prop} <- ${[...depSet].reverse().map((d) => d.prop).join(" <- ")}`);
|
|
9181
9218
|
depSet.add(fixture);
|
|
9182
9219
|
resolveDeps(fixture.deps, depSet, pendingFixtures);
|
|
9183
9220
|
pendingFixtures.push(fixture);
|
|
@@ -9208,16 +9245,16 @@ function splitByComma(s) {
|
|
|
9208
9245
|
const result = [];
|
|
9209
9246
|
const stack = [];
|
|
9210
9247
|
let start = 0;
|
|
9211
|
-
for (let
|
|
9212
|
-
if (s[
|
|
9213
|
-
stack.push(s[
|
|
9214
|
-
} else if (s[
|
|
9248
|
+
for (let i2 = 0; i2 < s.length; i2++) {
|
|
9249
|
+
if (s[i2] === "{" || s[i2] === "[") {
|
|
9250
|
+
stack.push(s[i2] === "{" ? "}" : "]");
|
|
9251
|
+
} else if (s[i2] === stack[stack.length - 1]) {
|
|
9215
9252
|
stack.pop();
|
|
9216
|
-
} else if (!stack.length && s[
|
|
9217
|
-
const token = s.substring(start,
|
|
9253
|
+
} else if (!stack.length && s[i2] === ",") {
|
|
9254
|
+
const token = s.substring(start, i2).trim();
|
|
9218
9255
|
if (token)
|
|
9219
9256
|
result.push(token);
|
|
9220
|
-
start =
|
|
9257
|
+
start = i2 + 1;
|
|
9221
9258
|
}
|
|
9222
9259
|
}
|
|
9223
9260
|
const lastToken = s.substring(start).trim();
|
|
@@ -9231,10 +9268,10 @@ function getCurrentTest() {
|
|
|
9231
9268
|
}
|
|
9232
9269
|
var suite = createSuite();
|
|
9233
9270
|
var test = createTest(
|
|
9234
|
-
function(name,
|
|
9271
|
+
function(name, optionsOrFn, optionsOrTest) {
|
|
9235
9272
|
if (getCurrentTest())
|
|
9236
9273
|
throw new Error('Calling the test function inside another test function is not allowed. Please put it inside "describe" or "suite" so it can be properly collected.');
|
|
9237
|
-
getCurrentSuite().test.fn.call(this, formatName(name),
|
|
9274
|
+
getCurrentSuite().test.fn.call(this, formatName(name), optionsOrFn, optionsOrTest);
|
|
9238
9275
|
}
|
|
9239
9276
|
);
|
|
9240
9277
|
var describe = suite;
|
|
@@ -9255,8 +9292,33 @@ function createSuiteHooks() {
|
|
|
9255
9292
|
afterEach: []
|
|
9256
9293
|
};
|
|
9257
9294
|
}
|
|
9295
|
+
function parseArguments(optionsOrFn, optionsOrTest) {
|
|
9296
|
+
let options = {};
|
|
9297
|
+
let fn2 = () => {
|
|
9298
|
+
};
|
|
9299
|
+
if (typeof optionsOrTest === "object") {
|
|
9300
|
+
if (typeof optionsOrFn === "object")
|
|
9301
|
+
throw new TypeError("Cannot use two objects as arguments. Please provide options and a function callback in that order.");
|
|
9302
|
+
options = optionsOrTest;
|
|
9303
|
+
} else if (typeof optionsOrTest === "number") {
|
|
9304
|
+
options = { timeout: optionsOrTest };
|
|
9305
|
+
} else if (typeof optionsOrFn === "object") {
|
|
9306
|
+
options = optionsOrFn;
|
|
9307
|
+
}
|
|
9308
|
+
if (typeof optionsOrFn === "function") {
|
|
9309
|
+
if (typeof optionsOrTest === "function")
|
|
9310
|
+
throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");
|
|
9311
|
+
fn2 = optionsOrFn;
|
|
9312
|
+
} else if (typeof optionsOrTest === "function") {
|
|
9313
|
+
fn2 = optionsOrTest;
|
|
9314
|
+
}
|
|
9315
|
+
return {
|
|
9316
|
+
options,
|
|
9317
|
+
handler: fn2
|
|
9318
|
+
};
|
|
9319
|
+
}
|
|
9258
9320
|
function createSuiteCollector(name, factory = () => {
|
|
9259
|
-
}, mode,
|
|
9321
|
+
}, mode, shuffle2, each, suiteOptions) {
|
|
9260
9322
|
const tasks = [];
|
|
9261
9323
|
const factoryQueue = [];
|
|
9262
9324
|
let suite2;
|
|
@@ -9295,16 +9357,18 @@ function createSuiteCollector(name, factory = () => {
|
|
|
9295
9357
|
tasks.push(task2);
|
|
9296
9358
|
return task2;
|
|
9297
9359
|
};
|
|
9298
|
-
const test22 = createTest(function(name2,
|
|
9299
|
-
|
|
9300
|
-
|
|
9360
|
+
const test22 = createTest(function(name2, optionsOrFn, optionsOrTest) {
|
|
9361
|
+
let { options, handler } = parseArguments(
|
|
9362
|
+
optionsOrFn,
|
|
9363
|
+
optionsOrTest
|
|
9364
|
+
);
|
|
9301
9365
|
if (typeof suiteOptions === "object")
|
|
9302
9366
|
options = Object.assign({}, suiteOptions, options);
|
|
9303
9367
|
options.concurrent = this.concurrent || !this.sequential && (options == null ? void 0 : options.concurrent);
|
|
9304
9368
|
options.sequential = this.sequential || !this.concurrent && (options == null ? void 0 : options.sequential);
|
|
9305
9369
|
const test3 = task(
|
|
9306
9370
|
formatName(name2),
|
|
9307
|
-
{ ...this, ...options, handler
|
|
9371
|
+
{ ...this, ...options, handler }
|
|
9308
9372
|
);
|
|
9309
9373
|
test3.type = "test";
|
|
9310
9374
|
});
|
|
@@ -9349,8 +9413,8 @@ function createSuiteCollector(name, factory = () => {
|
|
|
9349
9413
|
if (factory)
|
|
9350
9414
|
await runWithSuite(collector, () => factory(test22));
|
|
9351
9415
|
const allChildren = [];
|
|
9352
|
-
for (const
|
|
9353
|
-
allChildren.push(
|
|
9416
|
+
for (const i2 of [...factoryQueue, ...tasks])
|
|
9417
|
+
allChildren.push(i2.type === "collector" ? await i2.collect(file) : i2);
|
|
9354
9418
|
suite2.file = file;
|
|
9355
9419
|
suite2.tasks = allChildren;
|
|
9356
9420
|
allChildren.forEach((task2) => {
|
|
@@ -9364,28 +9428,34 @@ function createSuiteCollector(name, factory = () => {
|
|
|
9364
9428
|
return collector;
|
|
9365
9429
|
}
|
|
9366
9430
|
function createSuite() {
|
|
9367
|
-
function suiteFn(name,
|
|
9431
|
+
function suiteFn(name, factoryOrOptions, optionsOrFactory = {}) {
|
|
9368
9432
|
const mode = this.only ? "only" : this.skip ? "skip" : this.todo ? "todo" : "run";
|
|
9369
9433
|
const currentSuite = getCurrentSuite();
|
|
9370
|
-
|
|
9371
|
-
|
|
9434
|
+
let { options, handler: factory } = parseArguments(
|
|
9435
|
+
factoryOrOptions,
|
|
9436
|
+
optionsOrFactory
|
|
9437
|
+
);
|
|
9372
9438
|
if (currentSuite == null ? void 0 : currentSuite.options)
|
|
9373
9439
|
options = { ...currentSuite.options, ...options };
|
|
9374
9440
|
options.concurrent = this.concurrent || !this.sequential && (options == null ? void 0 : options.concurrent);
|
|
9375
9441
|
options.sequential = this.sequential || !this.concurrent && (options == null ? void 0 : options.sequential);
|
|
9376
|
-
return createSuiteCollector(formatName(name), factory, mode, this.
|
|
9442
|
+
return createSuiteCollector(formatName(name), factory, mode, this.shuffle, this.each, options);
|
|
9377
9443
|
}
|
|
9378
9444
|
suiteFn.each = function(cases, ...args) {
|
|
9379
9445
|
const suite2 = this.withContext();
|
|
9380
9446
|
this.setContext("each", true);
|
|
9381
9447
|
if (Array.isArray(cases) && args.length)
|
|
9382
9448
|
cases = formatTemplateString(cases, args);
|
|
9383
|
-
return (name,
|
|
9449
|
+
return (name, optionsOrFn, fnOrOptions) => {
|
|
9384
9450
|
const _name = formatName(name);
|
|
9385
9451
|
const arrayOnlyCases = cases.every(Array.isArray);
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9452
|
+
const { options, handler } = parseArguments(
|
|
9453
|
+
optionsOrFn,
|
|
9454
|
+
fnOrOptions
|
|
9455
|
+
);
|
|
9456
|
+
cases.forEach((i2, idx) => {
|
|
9457
|
+
const items = Array.isArray(i2) ? i2 : [i2];
|
|
9458
|
+
arrayOnlyCases ? suite2(formatTitle(_name, items, idx), options, () => handler(...items)) : suite2(formatTitle(_name, items, idx), options, () => handler(i2));
|
|
9389
9459
|
});
|
|
9390
9460
|
this.setContext("each", void 0);
|
|
9391
9461
|
};
|
|
@@ -9404,12 +9474,16 @@ function createTaskCollector(fn2, context) {
|
|
|
9404
9474
|
this.setContext("each", true);
|
|
9405
9475
|
if (Array.isArray(cases) && args.length)
|
|
9406
9476
|
cases = formatTemplateString(cases, args);
|
|
9407
|
-
return (name,
|
|
9477
|
+
return (name, optionsOrFn, fnOrOptions) => {
|
|
9408
9478
|
const _name = formatName(name);
|
|
9409
9479
|
const arrayOnlyCases = cases.every(Array.isArray);
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9480
|
+
const { options, handler } = parseArguments(
|
|
9481
|
+
optionsOrFn,
|
|
9482
|
+
fnOrOptions
|
|
9483
|
+
);
|
|
9484
|
+
cases.forEach((i2, idx) => {
|
|
9485
|
+
const items = Array.isArray(i2) ? i2 : [i2];
|
|
9486
|
+
arrayOnlyCases ? test22(formatTitle(_name, items, idx), options, () => handler(...items)) : test22(formatTitle(_name, items, idx), options, () => handler(i2));
|
|
9413
9487
|
});
|
|
9414
9488
|
this.setContext("each", void 0);
|
|
9415
9489
|
};
|
|
@@ -9422,8 +9496,8 @@ function createTaskCollector(fn2, context) {
|
|
|
9422
9496
|
};
|
|
9423
9497
|
taskFn.extend = function(fixtures) {
|
|
9424
9498
|
const _context = mergeContextFixtures(fixtures, context);
|
|
9425
|
-
return createTest(function fn22(name,
|
|
9426
|
-
getCurrentSuite().test.fn.call(this, formatName(name),
|
|
9499
|
+
return createTest(function fn22(name, optionsOrFn, optionsOrTest) {
|
|
9500
|
+
getCurrentSuite().test.fn.call(this, formatName(name), optionsOrFn, optionsOrTest);
|
|
9427
9501
|
}, _context);
|
|
9428
9502
|
};
|
|
9429
9503
|
const _test2 = createChainable(
|
|
@@ -9459,12 +9533,12 @@ function formatTitle(template, items, idx) {
|
|
|
9459
9533
|
return formatted;
|
|
9460
9534
|
}
|
|
9461
9535
|
function formatTemplateString(cases, args) {
|
|
9462
|
-
const header = cases.join("").trim().replace(/ /g, "").split("\n").map((
|
|
9536
|
+
const header = cases.join("").trim().replace(/ /g, "").split("\n").map((i2) => i2.split("|"))[0];
|
|
9463
9537
|
const res = [];
|
|
9464
|
-
for (let
|
|
9538
|
+
for (let i2 = 0; i2 < Math.floor(args.length / header.length); i2++) {
|
|
9465
9539
|
const oneCase = {};
|
|
9466
9540
|
for (let j = 0; j < header.length; j++)
|
|
9467
|
-
oneCase[header[j]] = args[
|
|
9541
|
+
oneCase[header[j]] = args[i2 * header.length + j];
|
|
9468
9542
|
res.push(oneCase);
|
|
9469
9543
|
}
|
|
9470
9544
|
return res;
|
|
@@ -9490,19 +9564,26 @@ var onTestFailed = createTestHook("onTestFailed", (test3, handler) => {
|
|
|
9490
9564
|
test3.onFailed || (test3.onFailed = []);
|
|
9491
9565
|
test3.onFailed.push(handler);
|
|
9492
9566
|
});
|
|
9567
|
+
var onTestFinished = createTestHook("onTestFinished", (test3, handler) => {
|
|
9568
|
+
test3.onFinished || (test3.onFinished = []);
|
|
9569
|
+
test3.onFinished.push(handler);
|
|
9570
|
+
});
|
|
9493
9571
|
function createTestHook(name, handler) {
|
|
9494
9572
|
return (fn2) => {
|
|
9495
9573
|
const current = getCurrentTest();
|
|
9496
9574
|
if (!current)
|
|
9497
9575
|
throw new Error(`Hook ${name}() can only be called inside a test`);
|
|
9498
|
-
handler(current, fn2);
|
|
9576
|
+
return handler(current, fn2);
|
|
9499
9577
|
};
|
|
9500
9578
|
}
|
|
9501
9579
|
|
|
9502
|
-
// ../../node_modules/vitest/dist/vendor/benchmark.
|
|
9580
|
+
// ../../node_modules/vitest/dist/vendor/benchmark.eeqk2rd8.js
|
|
9503
9581
|
init_esm_shims();
|
|
9504
9582
|
|
|
9505
|
-
// ../../node_modules
|
|
9583
|
+
// ../../node_modules/@vitest/runner/dist/utils.js
|
|
9584
|
+
init_esm_shims();
|
|
9585
|
+
|
|
9586
|
+
// ../../node_modules/vitest/dist/vendor/index.ir9i0ywP.js
|
|
9506
9587
|
init_esm_shims();
|
|
9507
9588
|
|
|
9508
9589
|
// ../../node_modules/vitest/dist/vendor/global.CkGT_TMy.js
|
|
@@ -9520,7 +9601,7 @@ function getCurrentEnvironment() {
|
|
|
9520
9601
|
return state == null ? void 0 : state.environment.name;
|
|
9521
9602
|
}
|
|
9522
9603
|
|
|
9523
|
-
// ../../node_modules/vitest/dist/vendor/index.
|
|
9604
|
+
// ../../node_modules/vitest/dist/vendor/index.ir9i0ywP.js
|
|
9524
9605
|
var _a;
|
|
9525
9606
|
var isNode = typeof process < "u" && typeof process.stdout < "u" && !((_a = process.versions) == null ? void 0 : _a.deno) && !globalThis.window;
|
|
9526
9607
|
var isWindows = isNode && process.platform === "win32";
|
|
@@ -9531,7 +9612,7 @@ function isRunningInBenchmark() {
|
|
|
9531
9612
|
return getRunMode() === "benchmark";
|
|
9532
9613
|
}
|
|
9533
9614
|
|
|
9534
|
-
// ../../node_modules/vitest/dist/vendor/benchmark.
|
|
9615
|
+
// ../../node_modules/vitest/dist/vendor/benchmark.eeqk2rd8.js
|
|
9535
9616
|
var benchFns = /* @__PURE__ */ new WeakMap();
|
|
9536
9617
|
var benchOptsMap = /* @__PURE__ */ new WeakMap();
|
|
9537
9618
|
var bench = createBenchmark(
|
|
@@ -9584,7 +9665,7 @@ function isFirstRun() {
|
|
|
9584
9665
|
return firstRun;
|
|
9585
9666
|
}
|
|
9586
9667
|
|
|
9587
|
-
// ../../node_modules/vitest/dist/vendor/vi.
|
|
9668
|
+
// ../../node_modules/vitest/dist/vendor/vi.C5mroSoP.js
|
|
9588
9669
|
init_esm_shims();
|
|
9589
9670
|
|
|
9590
9671
|
// ../../node_modules/chai/index.mjs
|
|
@@ -9631,67 +9712,70 @@ init_esm_shims();
|
|
|
9631
9712
|
|
|
9632
9713
|
// ../../node_modules/tinyspy/dist/index.js
|
|
9633
9714
|
init_esm_shims();
|
|
9634
|
-
function
|
|
9715
|
+
function R(e, t) {
|
|
9635
9716
|
if (!e)
|
|
9636
9717
|
throw new Error(t);
|
|
9637
9718
|
}
|
|
9638
|
-
function
|
|
9719
|
+
function u(e, t) {
|
|
9639
9720
|
return typeof t === e;
|
|
9640
9721
|
}
|
|
9641
9722
|
function b(e) {
|
|
9642
9723
|
return e instanceof Promise;
|
|
9643
9724
|
}
|
|
9644
|
-
function
|
|
9725
|
+
function f(e, t, n2) {
|
|
9645
9726
|
Object.defineProperty(e, t, n2);
|
|
9646
9727
|
}
|
|
9647
|
-
function
|
|
9728
|
+
function i(e, t, n2) {
|
|
9648
9729
|
Object.defineProperty(e, t, { value: n2 });
|
|
9649
9730
|
}
|
|
9650
|
-
var
|
|
9651
|
-
var
|
|
9652
|
-
var
|
|
9731
|
+
var c = Symbol.for("tinyspy:spy");
|
|
9732
|
+
var g = /* @__PURE__ */ new Set();
|
|
9733
|
+
var C = (e) => {
|
|
9653
9734
|
e.called = false, e.callCount = 0, e.calls = [], e.results = [], e.next = [];
|
|
9654
9735
|
};
|
|
9655
|
-
var
|
|
9656
|
-
var
|
|
9657
|
-
function
|
|
9658
|
-
|
|
9659
|
-
let t = function(...
|
|
9660
|
-
let r =
|
|
9661
|
-
r.called = true, r.callCount++, r.calls.push(
|
|
9662
|
-
let
|
|
9663
|
-
if (
|
|
9664
|
-
r.results.push(
|
|
9665
|
-
let [
|
|
9666
|
-
if (
|
|
9667
|
-
return
|
|
9668
|
-
throw
|
|
9669
|
-
}
|
|
9670
|
-
let
|
|
9736
|
+
var M = (e) => (f(e, c, { value: { reset: () => C(e[c]) } }), e[c]);
|
|
9737
|
+
var A = (e) => e[c] || M(e);
|
|
9738
|
+
function I(e) {
|
|
9739
|
+
R(u("function", e) || u("undefined", e), "cannot spy on a non-function value");
|
|
9740
|
+
let t = function(...s) {
|
|
9741
|
+
let r = A(t);
|
|
9742
|
+
r.called = true, r.callCount++, r.calls.push(s);
|
|
9743
|
+
let m = r.next.shift();
|
|
9744
|
+
if (m) {
|
|
9745
|
+
r.results.push(m);
|
|
9746
|
+
let [l, o] = m;
|
|
9747
|
+
if (l === "ok")
|
|
9748
|
+
return o;
|
|
9749
|
+
throw o;
|
|
9750
|
+
}
|
|
9751
|
+
let p, d = "ok";
|
|
9671
9752
|
if (r.impl)
|
|
9672
9753
|
try {
|
|
9673
|
-
new.target ?
|
|
9674
|
-
} catch (
|
|
9675
|
-
throw
|
|
9676
|
-
}
|
|
9677
|
-
let
|
|
9678
|
-
if (b(
|
|
9679
|
-
let
|
|
9680
|
-
throw
|
|
9754
|
+
new.target ? p = Reflect.construct(r.impl, s, new.target) : p = r.impl.apply(this, s), d = "ok";
|
|
9755
|
+
} catch (l) {
|
|
9756
|
+
throw p = l, d = "error", r.results.push([d, l]), l;
|
|
9757
|
+
}
|
|
9758
|
+
let a = [d, p];
|
|
9759
|
+
if (b(p)) {
|
|
9760
|
+
let l = p.then((o) => a[1] = o).catch((o) => {
|
|
9761
|
+
throw a[0] = "error", a[1] = o, o;
|
|
9681
9762
|
});
|
|
9682
|
-
Object.assign(
|
|
9763
|
+
Object.assign(l, p), p = l;
|
|
9683
9764
|
}
|
|
9684
|
-
return r.results.push(
|
|
9765
|
+
return r.results.push(a), p;
|
|
9685
9766
|
};
|
|
9686
|
-
|
|
9687
|
-
let n2 =
|
|
9767
|
+
i(t, "_isMockFunction", true), i(t, "length", e ? e.length : 0), i(t, "name", e && e.name || "spy");
|
|
9768
|
+
let n2 = A(t);
|
|
9688
9769
|
return n2.reset(), n2.impl = e, t;
|
|
9689
9770
|
}
|
|
9690
|
-
var
|
|
9771
|
+
var k = (e, t) => Object.getOwnPropertyDescriptor(e, t);
|
|
9772
|
+
var P = (e, t) => {
|
|
9773
|
+
t != null && typeof t == "function" && t.prototype != null && Object.setPrototypeOf(e.prototype, t.prototype);
|
|
9774
|
+
};
|
|
9691
9775
|
function E(e, t, n2) {
|
|
9692
|
-
|
|
9693
|
-
let
|
|
9694
|
-
if (!
|
|
9776
|
+
R(!u("undefined", e), "spyOn could not find an object to spy upon"), R(u("object", e) || u("function", e), "cannot spyOn on a primitive value");
|
|
9777
|
+
let [s, r] = (() => {
|
|
9778
|
+
if (!u("object", t))
|
|
9695
9779
|
return [t, "value"];
|
|
9696
9780
|
if ("getter" in t && "setter" in t)
|
|
9697
9781
|
throw new Error("cannot spy on both getter and setter");
|
|
@@ -9700,20 +9784,22 @@ function E(e, t, n2) {
|
|
|
9700
9784
|
if ("setter" in t)
|
|
9701
9785
|
return [t.setter, "set"];
|
|
9702
9786
|
throw new Error("specify getter or setter to spy on");
|
|
9703
|
-
}
|
|
9704
|
-
|
|
9787
|
+
})(), m = k(e, s), p = Object.getPrototypeOf(e), d = p && k(p, s), a = m || d;
|
|
9788
|
+
R(a || s in e, `${String(s)} does not exist`);
|
|
9705
9789
|
let l = false;
|
|
9706
|
-
|
|
9707
|
-
let
|
|
9708
|
-
|
|
9709
|
-
let
|
|
9710
|
-
|
|
9790
|
+
r === "value" && a && !a.value && a.get && (r = "get", l = true, n2 = a.get());
|
|
9791
|
+
let o;
|
|
9792
|
+
a ? o = a[r] : r !== "value" ? o = () => e[s] : o = e[s], n2 || (n2 = o);
|
|
9793
|
+
let y = I(n2);
|
|
9794
|
+
r === "value" && P(y, o);
|
|
9795
|
+
let O = (h) => {
|
|
9796
|
+
let { value: G, ...w } = a || {
|
|
9711
9797
|
configurable: true,
|
|
9712
9798
|
writable: true
|
|
9713
9799
|
};
|
|
9714
|
-
|
|
9715
|
-
}, K = () =>
|
|
9716
|
-
return
|
|
9800
|
+
r !== "value" && delete w.writable, w[r] = h, f(e, s, w);
|
|
9801
|
+
}, K = () => a ? f(e, s, a) : O(o), T = y[c];
|
|
9802
|
+
return i(T, "restore", K), i(T, "getOriginal", () => l ? o() : o), i(T, "willCall", (h) => (T.impl = h, y)), O(l ? () => (P(y, n2), y) : y), g.add(y), y;
|
|
9717
9803
|
}
|
|
9718
9804
|
|
|
9719
9805
|
// ../../node_modules/@vitest/spy/dist/index.js
|
|
@@ -9736,7 +9822,7 @@ function enhanceSpy(spy) {
|
|
|
9736
9822
|
let implementation;
|
|
9737
9823
|
let instances = [];
|
|
9738
9824
|
let invocations = [];
|
|
9739
|
-
const state =
|
|
9825
|
+
const state = A(spy);
|
|
9740
9826
|
const mockContext = {
|
|
9741
9827
|
get calls() {
|
|
9742
9828
|
return state.calls;
|
|
@@ -9879,12 +9965,12 @@ function setState(state, expect2) {
|
|
|
9879
9965
|
map2.set(expect2, current);
|
|
9880
9966
|
}
|
|
9881
9967
|
function getMatcherUtils() {
|
|
9882
|
-
const
|
|
9883
|
-
const EXPECTED_COLOR =
|
|
9884
|
-
const RECEIVED_COLOR =
|
|
9885
|
-
const INVERTED_COLOR =
|
|
9886
|
-
const BOLD_WEIGHT =
|
|
9887
|
-
const DIM_COLOR =
|
|
9968
|
+
const c2 = () => getColors();
|
|
9969
|
+
const EXPECTED_COLOR = c2().green;
|
|
9970
|
+
const RECEIVED_COLOR = c2().red;
|
|
9971
|
+
const INVERTED_COLOR = c2().inverse;
|
|
9972
|
+
const BOLD_WEIGHT = c2().bold;
|
|
9973
|
+
const DIM_COLOR = c2().dim;
|
|
9888
9974
|
function matcherHint(matcherName, received = "received", expected = "expected", options = {}) {
|
|
9889
9975
|
const {
|
|
9890
9976
|
comment = "",
|
|
@@ -9985,8 +10071,8 @@ function eq(a, b2, aStack, bStack, customTesters, hasKey2) {
|
|
|
9985
10071
|
if (asymmetricResult !== void 0)
|
|
9986
10072
|
return asymmetricResult;
|
|
9987
10073
|
const testerContext = { equals };
|
|
9988
|
-
for (let
|
|
9989
|
-
const customTesterResult = customTesters[
|
|
10074
|
+
for (let i2 = 0; i2 < customTesters.length; i2++) {
|
|
10075
|
+
const customTesterResult = customTesters[i2].call(testerContext, a, b2, customTesters);
|
|
9990
10076
|
if (customTesterResult !== void 0)
|
|
9991
10077
|
return customTesterResult;
|
|
9992
10078
|
}
|
|
@@ -10220,8 +10306,8 @@ function arrayBufferEquality(a, b2) {
|
|
|
10220
10306
|
}
|
|
10221
10307
|
if (dataViewA.byteLength !== dataViewB.byteLength)
|
|
10222
10308
|
return false;
|
|
10223
|
-
for (let
|
|
10224
|
-
if (dataViewA.getUint8(
|
|
10309
|
+
for (let i2 = 0; i2 < dataViewA.byteLength; i2++) {
|
|
10310
|
+
if (dataViewA.getUint8(i2) !== dataViewB.getUint8(i2))
|
|
10225
10311
|
return false;
|
|
10226
10312
|
}
|
|
10227
10313
|
return true;
|
|
@@ -10558,7 +10644,7 @@ function wrapSoft(utils, fn2) {
|
|
|
10558
10644
|
}
|
|
10559
10645
|
var JestChaiExpect = (chai3, utils) => {
|
|
10560
10646
|
const { AssertionError: AssertionError2 } = chai3;
|
|
10561
|
-
const
|
|
10647
|
+
const c2 = () => getColors();
|
|
10562
10648
|
const customTesters = getCustomEqualityTesters();
|
|
10563
10649
|
function def(name, fn2) {
|
|
10564
10650
|
const addMethod = (n2) => {
|
|
@@ -10571,8 +10657,8 @@ var JestChaiExpect = (chai3, utils) => {
|
|
|
10571
10657
|
else
|
|
10572
10658
|
addMethod(name);
|
|
10573
10659
|
}
|
|
10574
|
-
["throw", "throws", "Throw"].forEach((
|
|
10575
|
-
utils.overwriteMethod(chai3.Assertion.prototype,
|
|
10660
|
+
["throw", "throws", "Throw"].forEach((m) => {
|
|
10661
|
+
utils.overwriteMethod(chai3.Assertion.prototype, m, (_super) => {
|
|
10576
10662
|
return function(...args) {
|
|
10577
10663
|
const promise = utils.flag(this, "promise");
|
|
10578
10664
|
const object2 = utils.flag(this, "object");
|
|
@@ -10889,25 +10975,25 @@ var JestChaiExpect = (chai3, utils) => {
|
|
|
10889
10975
|
assertIsMock(assertion);
|
|
10890
10976
|
return assertion._obj;
|
|
10891
10977
|
};
|
|
10892
|
-
const ordinalOf = (
|
|
10893
|
-
const j =
|
|
10894
|
-
const
|
|
10895
|
-
if (j === 1 &&
|
|
10896
|
-
return `${
|
|
10897
|
-
if (j === 2 &&
|
|
10898
|
-
return `${
|
|
10899
|
-
if (j === 3 &&
|
|
10900
|
-
return `${
|
|
10901
|
-
return `${
|
|
10978
|
+
const ordinalOf = (i2) => {
|
|
10979
|
+
const j = i2 % 10;
|
|
10980
|
+
const k2 = i2 % 100;
|
|
10981
|
+
if (j === 1 && k2 !== 11)
|
|
10982
|
+
return `${i2}st`;
|
|
10983
|
+
if (j === 2 && k2 !== 12)
|
|
10984
|
+
return `${i2}nd`;
|
|
10985
|
+
if (j === 3 && k2 !== 13)
|
|
10986
|
+
return `${i2}rd`;
|
|
10987
|
+
return `${i2}th`;
|
|
10902
10988
|
};
|
|
10903
10989
|
const formatCalls = (spy, msg, actualCall) => {
|
|
10904
10990
|
if (spy.mock.calls) {
|
|
10905
|
-
msg +=
|
|
10991
|
+
msg += c2().gray(`
|
|
10906
10992
|
|
|
10907
10993
|
Received:
|
|
10908
10994
|
|
|
10909
|
-
${spy.mock.calls.map((callArg,
|
|
10910
|
-
let methodCall =
|
|
10995
|
+
${spy.mock.calls.map((callArg, i2) => {
|
|
10996
|
+
let methodCall = c2().bold(` ${ordinalOf(i2 + 1)} ${spy.getMockName()} call:
|
|
10911
10997
|
|
|
10912
10998
|
`);
|
|
10913
10999
|
if (actualCall)
|
|
@@ -10918,19 +11004,19 @@ ${spy.mock.calls.map((callArg, i) => {
|
|
|
10918
11004
|
return methodCall;
|
|
10919
11005
|
}).join("\n")}`);
|
|
10920
11006
|
}
|
|
10921
|
-
msg +=
|
|
11007
|
+
msg += c2().gray(`
|
|
10922
11008
|
|
|
10923
|
-
Number of calls: ${
|
|
11009
|
+
Number of calls: ${c2().bold(spy.mock.calls.length)}
|
|
10924
11010
|
`);
|
|
10925
11011
|
return msg;
|
|
10926
11012
|
};
|
|
10927
11013
|
const formatReturns = (spy, msg, actualReturn) => {
|
|
10928
|
-
msg +=
|
|
11014
|
+
msg += c2().gray(`
|
|
10929
11015
|
|
|
10930
11016
|
Received:
|
|
10931
11017
|
|
|
10932
|
-
${spy.mock.results.map((callReturn,
|
|
10933
|
-
let methodCall =
|
|
11018
|
+
${spy.mock.results.map((callReturn, i2) => {
|
|
11019
|
+
let methodCall = c2().bold(` ${ordinalOf(i2 + 1)} ${spy.getMockName()} call return:
|
|
10934
11020
|
|
|
10935
11021
|
`);
|
|
10936
11022
|
if (actualReturn)
|
|
@@ -10940,9 +11026,9 @@ ${spy.mock.results.map((callReturn, i) => {
|
|
|
10940
11026
|
methodCall += "\n";
|
|
10941
11027
|
return methodCall;
|
|
10942
11028
|
}).join("\n")}`);
|
|
10943
|
-
msg +=
|
|
11029
|
+
msg += c2().gray(`
|
|
10944
11030
|
|
|
10945
|
-
Number of calls: ${
|
|
11031
|
+
Number of calls: ${c2().bold(spy.mock.calls.length)}
|
|
10946
11032
|
`);
|
|
10947
11033
|
return msg;
|
|
10948
11034
|
};
|
|
@@ -11076,8 +11162,7 @@ Number of calls: ${c().bold(spy.mock.calls.length)}
|
|
|
11076
11162
|
`expected error to be instance of ${name}`,
|
|
11077
11163
|
`expected error not to be instance of ${name}`,
|
|
11078
11164
|
expected,
|
|
11079
|
-
thrown
|
|
11080
|
-
false
|
|
11165
|
+
thrown
|
|
11081
11166
|
);
|
|
11082
11167
|
}
|
|
11083
11168
|
if (expected instanceof Error) {
|
|
@@ -11095,9 +11180,8 @@ Number of calls: ${c().bold(spy.mock.calls.length)}
|
|
|
11095
11180
|
thrown && matcher.asymmetricMatch(thrown),
|
|
11096
11181
|
"expected error to match asymmetric matcher",
|
|
11097
11182
|
"expected error not to match asymmetric matcher",
|
|
11098
|
-
matcher
|
|
11099
|
-
thrown
|
|
11100
|
-
false
|
|
11183
|
+
matcher,
|
|
11184
|
+
thrown
|
|
11101
11185
|
);
|
|
11102
11186
|
}
|
|
11103
11187
|
throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof expected}"`);
|
|
@@ -11284,7 +11368,7 @@ var JestExtendError = class extends Error {
|
|
|
11284
11368
|
}
|
|
11285
11369
|
};
|
|
11286
11370
|
function JestExtendPlugin(expect2, matchers) {
|
|
11287
|
-
return (
|
|
11371
|
+
return (c2, utils) => {
|
|
11288
11372
|
Object.entries(matchers).forEach(([expectAssertionName, expectAssertion]) => {
|
|
11289
11373
|
function expectWrapper(...args) {
|
|
11290
11374
|
const { state, isNot, obj } = getMatcherState(this, expect2);
|
|
@@ -11301,7 +11385,7 @@ function JestExtendPlugin(expect2, matchers) {
|
|
|
11301
11385
|
}
|
|
11302
11386
|
const softWrapper = wrapSoft(utils, expectWrapper);
|
|
11303
11387
|
utils.addMethod(globalThis[JEST_MATCHERS_OBJECT].matchers, expectAssertionName, softWrapper);
|
|
11304
|
-
utils.addMethod(
|
|
11388
|
+
utils.addMethod(c2.Assertion.prototype, expectAssertionName, softWrapper);
|
|
11305
11389
|
class CustomMatcher extends AsymmetricMatcher3 {
|
|
11306
11390
|
constructor(inverse = false, ...sample) {
|
|
11307
11391
|
super(sample, inverse);
|
|
@@ -11360,12 +11444,12 @@ function getDefaultExportFromCjs2(x) {
|
|
|
11360
11444
|
}
|
|
11361
11445
|
var naturalCompare$2 = { exports: {} };
|
|
11362
11446
|
var naturalCompare = function(a, b2) {
|
|
11363
|
-
var
|
|
11447
|
+
var i2, codeA, codeB = 1, posA = 0, posB = 0, alphabet = String.alphabet;
|
|
11364
11448
|
function getCode(str, pos, code) {
|
|
11365
11449
|
if (code) {
|
|
11366
|
-
for (
|
|
11367
|
-
++
|
|
11368
|
-
return +str.slice(pos - 1,
|
|
11450
|
+
for (i2 = pos; code = getCode(str, i2), code < 76 && code > 65; )
|
|
11451
|
+
++i2;
|
|
11452
|
+
return +str.slice(pos - 1, i2);
|
|
11369
11453
|
}
|
|
11370
11454
|
code = alphabet && alphabet.indexOf(str.charAt(pos));
|
|
11371
11455
|
return code > -1 ? code + 76 : (code = str.charCodeAt(pos) || 0, code < 45 || code > 127) ? code : code < 46 ? 65 : code < 48 ? code - 1 : code < 58 ? code + 18 : code < 65 ? code - 11 : code < 91 ? code + 11 : code < 97 ? code - 37 : code < 123 ? code + 5 : code - 63;
|
|
@@ -11376,8 +11460,8 @@ var naturalCompare = function(a, b2) {
|
|
|
11376
11460
|
codeB = getCode(b2, posB++);
|
|
11377
11461
|
if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
|
|
11378
11462
|
codeA = getCode(a, posA, posA);
|
|
11379
|
-
codeB = getCode(b2, posB, posA =
|
|
11380
|
-
posB =
|
|
11463
|
+
codeB = getCode(b2, posB, posA = i2);
|
|
11464
|
+
posB = i2;
|
|
11381
11465
|
}
|
|
11382
11466
|
if (codeA != codeB)
|
|
11383
11467
|
return codeA < codeB ? -1 : 1;
|
|
@@ -11391,8 +11475,8 @@ try {
|
|
|
11391
11475
|
}
|
|
11392
11476
|
var naturalCompareExports = naturalCompare$2.exports;
|
|
11393
11477
|
var naturalCompare$1 = /* @__PURE__ */ getDefaultExportFromCjs2(naturalCompareExports);
|
|
11394
|
-
function notNullish2(
|
|
11395
|
-
return
|
|
11478
|
+
function notNullish2(v) {
|
|
11479
|
+
return v != null;
|
|
11396
11480
|
}
|
|
11397
11481
|
function isPrimitive2(value) {
|
|
11398
11482
|
return value === null || typeof value !== "function" && typeof value !== "object";
|
|
@@ -11456,8 +11540,8 @@ function positionToOffset(source, lineNumber, columnNumber) {
|
|
|
11456
11540
|
let start = 0;
|
|
11457
11541
|
if (lineNumber > lines.length)
|
|
11458
11542
|
return source.length;
|
|
11459
|
-
for (let
|
|
11460
|
-
start += lines[
|
|
11543
|
+
for (let i2 = 0; i2 < lineNumber - 1; i2++)
|
|
11544
|
+
start += lines[i2].length + nl;
|
|
11461
11545
|
return start + columnNumber;
|
|
11462
11546
|
}
|
|
11463
11547
|
function offsetToLineNumber(source, offset) {
|
|
@@ -11697,10 +11781,10 @@ var comma2 = ",".charCodeAt(0);
|
|
|
11697
11781
|
var chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
11698
11782
|
var intToChar2 = new Uint8Array(64);
|
|
11699
11783
|
var charToInt2 = new Uint8Array(128);
|
|
11700
|
-
for (let
|
|
11701
|
-
const
|
|
11702
|
-
intToChar2[
|
|
11703
|
-
charToInt2[
|
|
11784
|
+
for (let i2 = 0; i2 < chars2.length; i2++) {
|
|
11785
|
+
const c2 = chars2.charCodeAt(i2);
|
|
11786
|
+
intToChar2[i2] = c2;
|
|
11787
|
+
charToInt2[c2] = i2;
|
|
11704
11788
|
}
|
|
11705
11789
|
function decode(mappings) {
|
|
11706
11790
|
const state = new Int32Array(5);
|
|
@@ -11712,19 +11796,19 @@ function decode(mappings) {
|
|
|
11712
11796
|
let sorted = true;
|
|
11713
11797
|
let lastCol = 0;
|
|
11714
11798
|
state[0] = 0;
|
|
11715
|
-
for (let
|
|
11799
|
+
for (let i2 = index; i2 < semi; i2++) {
|
|
11716
11800
|
let seg;
|
|
11717
|
-
|
|
11801
|
+
i2 = decodeInteger(mappings, i2, state, 0);
|
|
11718
11802
|
const col = state[0];
|
|
11719
11803
|
if (col < lastCol)
|
|
11720
11804
|
sorted = false;
|
|
11721
11805
|
lastCol = col;
|
|
11722
|
-
if (hasMoreVlq(mappings,
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
if (hasMoreVlq(mappings,
|
|
11727
|
-
|
|
11806
|
+
if (hasMoreVlq(mappings, i2, semi)) {
|
|
11807
|
+
i2 = decodeInteger(mappings, i2, state, 1);
|
|
11808
|
+
i2 = decodeInteger(mappings, i2, state, 2);
|
|
11809
|
+
i2 = decodeInteger(mappings, i2, state, 3);
|
|
11810
|
+
if (hasMoreVlq(mappings, i2, semi)) {
|
|
11811
|
+
i2 = decodeInteger(mappings, i2, state, 4);
|
|
11728
11812
|
seg = [col, state[1], state[2], state[3], state[4]];
|
|
11729
11813
|
} else {
|
|
11730
11814
|
seg = [col, state[1], state[2], state[3]];
|
|
@@ -11750,8 +11834,8 @@ function decodeInteger(mappings, pos, state, j) {
|
|
|
11750
11834
|
let shift = 0;
|
|
11751
11835
|
let integer = 0;
|
|
11752
11836
|
do {
|
|
11753
|
-
const
|
|
11754
|
-
integer = charToInt2[
|
|
11837
|
+
const c2 = mappings.charCodeAt(pos++);
|
|
11838
|
+
integer = charToInt2[c2];
|
|
11755
11839
|
value |= (integer & 31) << shift;
|
|
11756
11840
|
shift += 5;
|
|
11757
11841
|
} while (integer & 32);
|
|
@@ -11763,10 +11847,10 @@ function decodeInteger(mappings, pos, state, j) {
|
|
|
11763
11847
|
state[j] += value;
|
|
11764
11848
|
return pos;
|
|
11765
11849
|
}
|
|
11766
|
-
function hasMoreVlq(mappings,
|
|
11767
|
-
if (
|
|
11850
|
+
function hasMoreVlq(mappings, i2, length) {
|
|
11851
|
+
if (i2 >= length)
|
|
11768
11852
|
return false;
|
|
11769
|
-
return mappings.charCodeAt(
|
|
11853
|
+
return mappings.charCodeAt(i2) !== comma2;
|
|
11770
11854
|
}
|
|
11771
11855
|
function sort(line) {
|
|
11772
11856
|
line.sort(sortComparator$1);
|
|
@@ -11867,8 +11951,8 @@ function normalizePath(url, type2) {
|
|
|
11867
11951
|
let pointer = 1;
|
|
11868
11952
|
let positive = 0;
|
|
11869
11953
|
let addTrailingSlash = false;
|
|
11870
|
-
for (let
|
|
11871
|
-
const piece = pieces[
|
|
11954
|
+
for (let i2 = 1; i2 < pieces.length; i2++) {
|
|
11955
|
+
const piece = pieces[i2];
|
|
11872
11956
|
if (!piece) {
|
|
11873
11957
|
addTrailingSlash = true;
|
|
11874
11958
|
continue;
|
|
@@ -11890,8 +11974,8 @@ function normalizePath(url, type2) {
|
|
|
11890
11974
|
positive++;
|
|
11891
11975
|
}
|
|
11892
11976
|
let path3 = "";
|
|
11893
|
-
for (let
|
|
11894
|
-
path3 += "/" + pieces[
|
|
11977
|
+
for (let i2 = 1; i2 < pointer; i2++) {
|
|
11978
|
+
path3 += "/" + pieces[i2];
|
|
11895
11979
|
}
|
|
11896
11980
|
if (!path3 || addTrailingSlash && !path3.endsWith("/..")) {
|
|
11897
11981
|
path3 += "/";
|
|
@@ -11967,15 +12051,15 @@ function maybeSort(mappings, owned) {
|
|
|
11967
12051
|
return mappings;
|
|
11968
12052
|
if (!owned)
|
|
11969
12053
|
mappings = mappings.slice();
|
|
11970
|
-
for (let
|
|
11971
|
-
mappings[
|
|
12054
|
+
for (let i2 = unsortedIndex; i2 < mappings.length; i2 = nextUnsortedSegmentLine(mappings, i2 + 1)) {
|
|
12055
|
+
mappings[i2] = sortSegments(mappings[i2], owned);
|
|
11972
12056
|
}
|
|
11973
12057
|
return mappings;
|
|
11974
12058
|
}
|
|
11975
12059
|
function nextUnsortedSegmentLine(mappings, start) {
|
|
11976
|
-
for (let
|
|
11977
|
-
if (!isSorted(mappings[
|
|
11978
|
-
return
|
|
12060
|
+
for (let i2 = start; i2 < mappings.length; i2++) {
|
|
12061
|
+
if (!isSorted(mappings[i2]))
|
|
12062
|
+
return i2;
|
|
11979
12063
|
}
|
|
11980
12064
|
return mappings.length;
|
|
11981
12065
|
}
|
|
@@ -12014,15 +12098,15 @@ function binarySearch(haystack, needle, low, high) {
|
|
|
12014
12098
|
return low - 1;
|
|
12015
12099
|
}
|
|
12016
12100
|
function upperBound(haystack, needle, index) {
|
|
12017
|
-
for (let
|
|
12018
|
-
if (haystack[
|
|
12101
|
+
for (let i2 = index + 1; i2 < haystack.length; index = i2++) {
|
|
12102
|
+
if (haystack[i2][COLUMN] !== needle)
|
|
12019
12103
|
break;
|
|
12020
12104
|
}
|
|
12021
12105
|
return index;
|
|
12022
12106
|
}
|
|
12023
12107
|
function lowerBound(haystack, needle, index) {
|
|
12024
|
-
for (let
|
|
12025
|
-
if (haystack[
|
|
12108
|
+
for (let i2 = index - 1; i2 >= 0; index = i2--) {
|
|
12109
|
+
if (haystack[i2][COLUMN] !== needle)
|
|
12026
12110
|
break;
|
|
12027
12111
|
}
|
|
12028
12112
|
return index;
|
|
@@ -12210,7 +12294,7 @@ function parseStacktrace(stack, options = {}) {
|
|
|
12210
12294
|
const { ignoreStackEntries = stackIgnorePatterns } = options;
|
|
12211
12295
|
let stacks = !CHROME_IE_STACK_REGEXP.test(stack) ? parseFFOrSafariStackTrace(stack) : parseV8Stacktrace(stack);
|
|
12212
12296
|
if (ignoreStackEntries.length)
|
|
12213
|
-
stacks = stacks.filter((stack2) => !ignoreStackEntries.some((
|
|
12297
|
+
stacks = stacks.filter((stack2) => !ignoreStackEntries.some((p) => stack2.file.match(p)));
|
|
12214
12298
|
return stacks.map((stack2) => {
|
|
12215
12299
|
var _a2;
|
|
12216
12300
|
const map2 = (_a2 = options.getSourceMap) == null ? void 0 : _a2.call(options, stack2.file);
|
|
@@ -12237,15 +12321,15 @@ function parseErrorStacktrace(e, options = {}) {
|
|
|
12237
12321
|
const stackStr = e.stack || e.stackStr || "";
|
|
12238
12322
|
let stackFrames = parseStacktrace(stackStr, options);
|
|
12239
12323
|
if (options.frameFilter)
|
|
12240
|
-
stackFrames = stackFrames.filter((
|
|
12324
|
+
stackFrames = stackFrames.filter((f2) => options.frameFilter(e, f2) !== false);
|
|
12241
12325
|
e.stacks = stackFrames;
|
|
12242
12326
|
return stackFrames;
|
|
12243
12327
|
}
|
|
12244
12328
|
async function saveInlineSnapshots(environment, snapshots) {
|
|
12245
12329
|
const MagicString2 = (await Promise.resolve().then(() => (init_magic_string_es(), magic_string_es_exports))).default;
|
|
12246
|
-
const files = new Set(snapshots.map((
|
|
12330
|
+
const files = new Set(snapshots.map((i2) => i2.file));
|
|
12247
12331
|
await Promise.all(Array.from(files).map(async (file) => {
|
|
12248
|
-
const snaps = snapshots.filter((
|
|
12332
|
+
const snaps = snapshots.filter((i2) => i2.file === file);
|
|
12249
12333
|
const code = await environment.readSnapshotFile(file);
|
|
12250
12334
|
const s = new MagicString2(code);
|
|
12251
12335
|
for (const snap of snaps) {
|
|
@@ -12301,7 +12385,7 @@ function prepareSnapString(snap, source, index) {
|
|
|
12301
12385
|
if (isOneline)
|
|
12302
12386
|
return `${quote}${lines.join("\n").replace(/`/g, "\\`").replace(/\${/g, "\\${")}${quote}`;
|
|
12303
12387
|
return `${quote}
|
|
12304
|
-
${lines.map((
|
|
12388
|
+
${lines.map((i2) => i2 ? indentNext + i2 : "").join("\n").replace(/`/g, "\\`").replace(/\${/g, "\\${")}
|
|
12305
12389
|
${indent}${quote}`;
|
|
12306
12390
|
}
|
|
12307
12391
|
var startRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\S\s]*\*\/\s*|\/\/.*\s+)*\s*[\w_$]*(['"`\)])/m;
|
|
@@ -12340,12 +12424,12 @@ function stripSnapshotIndentation(inlineSnapshot) {
|
|
|
12340
12424
|
if (lines[0].trim() !== "" || lines[lines.length - 1].trim() !== "") {
|
|
12341
12425
|
return inlineSnapshot;
|
|
12342
12426
|
}
|
|
12343
|
-
for (let
|
|
12344
|
-
if (lines[
|
|
12345
|
-
if (lines[
|
|
12427
|
+
for (let i2 = 1; i2 < lines.length - 1; i2++) {
|
|
12428
|
+
if (lines[i2] !== "") {
|
|
12429
|
+
if (lines[i2].indexOf(indentation) !== 0) {
|
|
12346
12430
|
return inlineSnapshot;
|
|
12347
12431
|
}
|
|
12348
|
-
lines[
|
|
12432
|
+
lines[i2] = lines[i2].substring(indentation.length);
|
|
12349
12433
|
}
|
|
12350
12434
|
}
|
|
12351
12435
|
lines[lines.length - 1] = "";
|
|
@@ -12418,10 +12502,10 @@ var SnapshotState = class _SnapshotState {
|
|
|
12418
12502
|
});
|
|
12419
12503
|
}
|
|
12420
12504
|
_inferInlineSnapshotStack(stacks) {
|
|
12421
|
-
const promiseIndex = stacks.findIndex((
|
|
12505
|
+
const promiseIndex = stacks.findIndex((i2) => i2.method.match(/__VITEST_(RESOLVES|REJECTS)__/));
|
|
12422
12506
|
if (promiseIndex !== -1)
|
|
12423
12507
|
return stacks[promiseIndex + 3];
|
|
12424
|
-
const stackIndex = stacks.findIndex((
|
|
12508
|
+
const stackIndex = stacks.findIndex((i2) => i2.method.includes("__INLINE_SNAPSHOT__"));
|
|
12425
12509
|
return stackIndex !== -1 ? stacks[stackIndex + 2] : null;
|
|
12426
12510
|
}
|
|
12427
12511
|
_addSnapshot(key, receivedSerialized, options) {
|
|
@@ -12828,17 +12912,17 @@ function normalizeString2(path3, allowAboveRoot) {
|
|
|
12828
12912
|
}
|
|
12829
12913
|
return res;
|
|
12830
12914
|
}
|
|
12831
|
-
var isAbsolute2 = function(
|
|
12832
|
-
return _IS_ABSOLUTE_RE2.test(
|
|
12915
|
+
var isAbsolute2 = function(p) {
|
|
12916
|
+
return _IS_ABSOLUTE_RE2.test(p);
|
|
12833
12917
|
};
|
|
12834
12918
|
var comma3 = ",".charCodeAt(0);
|
|
12835
12919
|
var chars3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
12836
12920
|
var intToChar3 = new Uint8Array(64);
|
|
12837
12921
|
var charToInt3 = new Uint8Array(128);
|
|
12838
|
-
for (let
|
|
12839
|
-
const
|
|
12840
|
-
intToChar3[
|
|
12841
|
-
charToInt3[
|
|
12922
|
+
for (let i2 = 0; i2 < chars3.length; i2++) {
|
|
12923
|
+
const c2 = chars3.charCodeAt(i2);
|
|
12924
|
+
intToChar3[i2] = c2;
|
|
12925
|
+
charToInt3[c2] = i2;
|
|
12842
12926
|
}
|
|
12843
12927
|
function decode2(mappings) {
|
|
12844
12928
|
const state = new Int32Array(5);
|
|
@@ -12850,19 +12934,19 @@ function decode2(mappings) {
|
|
|
12850
12934
|
let sorted = true;
|
|
12851
12935
|
let lastCol = 0;
|
|
12852
12936
|
state[0] = 0;
|
|
12853
|
-
for (let
|
|
12937
|
+
for (let i2 = index; i2 < semi; i2++) {
|
|
12854
12938
|
let seg;
|
|
12855
|
-
|
|
12939
|
+
i2 = decodeInteger2(mappings, i2, state, 0);
|
|
12856
12940
|
const col = state[0];
|
|
12857
12941
|
if (col < lastCol)
|
|
12858
12942
|
sorted = false;
|
|
12859
12943
|
lastCol = col;
|
|
12860
|
-
if (hasMoreVlq2(mappings,
|
|
12861
|
-
|
|
12862
|
-
|
|
12863
|
-
|
|
12864
|
-
if (hasMoreVlq2(mappings,
|
|
12865
|
-
|
|
12944
|
+
if (hasMoreVlq2(mappings, i2, semi)) {
|
|
12945
|
+
i2 = decodeInteger2(mappings, i2, state, 1);
|
|
12946
|
+
i2 = decodeInteger2(mappings, i2, state, 2);
|
|
12947
|
+
i2 = decodeInteger2(mappings, i2, state, 3);
|
|
12948
|
+
if (hasMoreVlq2(mappings, i2, semi)) {
|
|
12949
|
+
i2 = decodeInteger2(mappings, i2, state, 4);
|
|
12866
12950
|
seg = [col, state[1], state[2], state[3], state[4]];
|
|
12867
12951
|
} else {
|
|
12868
12952
|
seg = [col, state[1], state[2], state[3]];
|
|
@@ -12888,8 +12972,8 @@ function decodeInteger2(mappings, pos, state, j) {
|
|
|
12888
12972
|
let shift = 0;
|
|
12889
12973
|
let integer = 0;
|
|
12890
12974
|
do {
|
|
12891
|
-
const
|
|
12892
|
-
integer = charToInt3[
|
|
12975
|
+
const c2 = mappings.charCodeAt(pos++);
|
|
12976
|
+
integer = charToInt3[c2];
|
|
12893
12977
|
value |= (integer & 31) << shift;
|
|
12894
12978
|
shift += 5;
|
|
12895
12979
|
} while (integer & 32);
|
|
@@ -12901,10 +12985,10 @@ function decodeInteger2(mappings, pos, state, j) {
|
|
|
12901
12985
|
state[j] += value;
|
|
12902
12986
|
return pos;
|
|
12903
12987
|
}
|
|
12904
|
-
function hasMoreVlq2(mappings,
|
|
12905
|
-
if (
|
|
12988
|
+
function hasMoreVlq2(mappings, i2, length) {
|
|
12989
|
+
if (i2 >= length)
|
|
12906
12990
|
return false;
|
|
12907
|
-
return mappings.charCodeAt(
|
|
12991
|
+
return mappings.charCodeAt(i2) !== comma3;
|
|
12908
12992
|
}
|
|
12909
12993
|
function sort2(line) {
|
|
12910
12994
|
line.sort(sortComparator$12);
|
|
@@ -12948,15 +13032,15 @@ function binarySearch2(haystack, needle, low, high) {
|
|
|
12948
13032
|
return low - 1;
|
|
12949
13033
|
}
|
|
12950
13034
|
function upperBound2(haystack, needle, index) {
|
|
12951
|
-
for (let
|
|
12952
|
-
if (haystack[
|
|
13035
|
+
for (let i2 = index + 1; i2 < haystack.length; index = i2++) {
|
|
13036
|
+
if (haystack[i2][COLUMN2] !== needle)
|
|
12953
13037
|
break;
|
|
12954
13038
|
}
|
|
12955
13039
|
return index;
|
|
12956
13040
|
}
|
|
12957
13041
|
function lowerBound2(haystack, needle, index) {
|
|
12958
|
-
for (let
|
|
12959
|
-
if (haystack[
|
|
13042
|
+
for (let i2 = index - 1; i2 >= 0; index = i2--) {
|
|
13043
|
+
if (haystack[i2][COLUMN2] !== needle)
|
|
12960
13044
|
break;
|
|
12961
13045
|
}
|
|
12962
13046
|
return index;
|
|
@@ -12989,8 +13073,8 @@ function memoizedBinarySearch2(haystack, needle, state, key) {
|
|
|
12989
13073
|
}
|
|
12990
13074
|
function buildBySources(decoded, memos) {
|
|
12991
13075
|
const sources = memos.map(buildNullArray);
|
|
12992
|
-
for (let
|
|
12993
|
-
const line = decoded[
|
|
13076
|
+
for (let i2 = 0; i2 < decoded.length; i2++) {
|
|
13077
|
+
const line = decoded[i2];
|
|
12994
13078
|
for (let j = 0; j < line.length; j++) {
|
|
12995
13079
|
const seg = line[j];
|
|
12996
13080
|
if (seg.length === 1)
|
|
@@ -13002,14 +13086,14 @@ function buildBySources(decoded, memos) {
|
|
|
13002
13086
|
const originalLine = originalSource[sourceLine] || (originalSource[sourceLine] = []);
|
|
13003
13087
|
const memo = memos[sourceIndex];
|
|
13004
13088
|
const index = upperBound2(originalLine, sourceColumn, memoizedBinarySearch2(originalLine, sourceColumn, memo, sourceLine));
|
|
13005
|
-
insert(originalLine, memo.lastIndex = index + 1, [sourceColumn,
|
|
13089
|
+
insert(originalLine, memo.lastIndex = index + 1, [sourceColumn, i2, seg[COLUMN2]]);
|
|
13006
13090
|
}
|
|
13007
13091
|
}
|
|
13008
13092
|
return sources;
|
|
13009
13093
|
}
|
|
13010
13094
|
function insert(array2, index, value) {
|
|
13011
|
-
for (let
|
|
13012
|
-
array2[
|
|
13095
|
+
for (let i2 = array2.length; i2 > index; i2--) {
|
|
13096
|
+
array2[i2] = array2[i2 - 1];
|
|
13013
13097
|
}
|
|
13014
13098
|
array2[index] = value;
|
|
13015
13099
|
}
|
|
@@ -13183,7 +13267,7 @@ function parseSingleV8Stack2(raw) {
|
|
|
13183
13267
|
};
|
|
13184
13268
|
}
|
|
13185
13269
|
|
|
13186
|
-
// ../../node_modules/vitest/dist/vendor/base.
|
|
13270
|
+
// ../../node_modules/vitest/dist/vendor/base.N3JkKp7j.js
|
|
13187
13271
|
init_esm_shims();
|
|
13188
13272
|
function isChildProcess() {
|
|
13189
13273
|
return typeof process !== "undefined" && !!process.send;
|
|
@@ -13194,7 +13278,7 @@ init_esm_shims();
|
|
|
13194
13278
|
var RealDate = Date;
|
|
13195
13279
|
var now2 = null;
|
|
13196
13280
|
var MockDate = class _MockDate extends RealDate {
|
|
13197
|
-
constructor(
|
|
13281
|
+
constructor(y, m, d, h, M2, s, ms) {
|
|
13198
13282
|
super();
|
|
13199
13283
|
let date;
|
|
13200
13284
|
switch (arguments.length) {
|
|
@@ -13205,15 +13289,15 @@ var MockDate = class _MockDate extends RealDate {
|
|
|
13205
13289
|
date = new RealDate();
|
|
13206
13290
|
break;
|
|
13207
13291
|
case 1:
|
|
13208
|
-
date = new RealDate(
|
|
13292
|
+
date = new RealDate(y);
|
|
13209
13293
|
break;
|
|
13210
13294
|
default:
|
|
13211
|
-
|
|
13295
|
+
d = typeof d === "undefined" ? 1 : d;
|
|
13212
13296
|
h = h || 0;
|
|
13213
13297
|
M2 = M2 || 0;
|
|
13214
13298
|
s = s || 0;
|
|
13215
13299
|
ms = ms || 0;
|
|
13216
|
-
date = new RealDate(
|
|
13300
|
+
date = new RealDate(y, m, d, h, M2, s, ms);
|
|
13217
13301
|
break;
|
|
13218
13302
|
}
|
|
13219
13303
|
Object.setPrototypeOf(date, _MockDate.prototype);
|
|
@@ -13241,7 +13325,7 @@ function resetDate() {
|
|
|
13241
13325
|
globalThis.Date = RealDate;
|
|
13242
13326
|
}
|
|
13243
13327
|
|
|
13244
|
-
// ../../node_modules/vitest/dist/vendor/vi.
|
|
13328
|
+
// ../../node_modules/vitest/dist/vendor/vi.C5mroSoP.js
|
|
13245
13329
|
function resetModules(modules, resetMocks = false) {
|
|
13246
13330
|
const skipPaths = [
|
|
13247
13331
|
// Vitest
|
|
@@ -13975,8 +14059,8 @@ function withGlobal(_global) {
|
|
|
13975
14059
|
return isFinite(num);
|
|
13976
14060
|
}
|
|
13977
14061
|
let isNearInfiniteLimit = false;
|
|
13978
|
-
function checkIsNearInfiniteLimit(clock,
|
|
13979
|
-
if (clock.loopLimit &&
|
|
14062
|
+
function checkIsNearInfiniteLimit(clock, i2) {
|
|
14063
|
+
if (clock.loopLimit && i2 === clock.loopLimit - 1) {
|
|
13980
14064
|
isNearInfiniteLimit = true;
|
|
13981
14065
|
}
|
|
13982
14066
|
}
|
|
@@ -13989,7 +14073,7 @@ function withGlobal(_global) {
|
|
|
13989
14073
|
}
|
|
13990
14074
|
const strings = str.split(":");
|
|
13991
14075
|
const l = strings.length;
|
|
13992
|
-
let
|
|
14076
|
+
let i2 = l;
|
|
13993
14077
|
let ms = 0;
|
|
13994
14078
|
let parsed;
|
|
13995
14079
|
if (l > 3 || !/^(\d\d:){0,2}\d\d?$/.test(str)) {
|
|
@@ -13997,12 +14081,12 @@ function withGlobal(_global) {
|
|
|
13997
14081
|
"tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits"
|
|
13998
14082
|
);
|
|
13999
14083
|
}
|
|
14000
|
-
while (
|
|
14001
|
-
parsed = parseInt(strings[
|
|
14084
|
+
while (i2--) {
|
|
14085
|
+
parsed = parseInt(strings[i2], 10);
|
|
14002
14086
|
if (parsed >= 60) {
|
|
14003
14087
|
throw new Error(`Invalid time ${str}`);
|
|
14004
14088
|
}
|
|
14005
|
-
ms += parsed * Math.pow(60, l -
|
|
14089
|
+
ms += parsed * Math.pow(60, l - i2 - 1);
|
|
14006
14090
|
}
|
|
14007
14091
|
return ms * 1e3;
|
|
14008
14092
|
}
|
|
@@ -14044,15 +14128,15 @@ function withGlobal(_global) {
|
|
|
14044
14128
|
);
|
|
14045
14129
|
}
|
|
14046
14130
|
let matchedLineIndex = -1;
|
|
14047
|
-
job.error.stack.split("\n").some(function(line,
|
|
14131
|
+
job.error.stack.split("\n").some(function(line, i2) {
|
|
14048
14132
|
const matchedComputedTarget = line.match(computedTargetPattern);
|
|
14049
14133
|
if (matchedComputedTarget) {
|
|
14050
|
-
matchedLineIndex =
|
|
14134
|
+
matchedLineIndex = i2;
|
|
14051
14135
|
return true;
|
|
14052
14136
|
}
|
|
14053
14137
|
const matchedClockMethod = line.match(clockMethodPattern);
|
|
14054
14138
|
if (matchedClockMethod) {
|
|
14055
|
-
matchedLineIndex =
|
|
14139
|
+
matchedLineIndex = i2;
|
|
14056
14140
|
return false;
|
|
14057
14141
|
}
|
|
14058
14142
|
return matchedLineIndex >= 0;
|
|
@@ -14173,11 +14257,11 @@ ${job.error.stack.split("\n").slice(matchedLineIndex + 1).join("\n")}`;
|
|
|
14173
14257
|
if (!clock.jobs) {
|
|
14174
14258
|
return;
|
|
14175
14259
|
}
|
|
14176
|
-
for (let
|
|
14177
|
-
const job = clock.jobs[
|
|
14260
|
+
for (let i2 = 0; i2 < clock.jobs.length; i2++) {
|
|
14261
|
+
const job = clock.jobs[i2];
|
|
14178
14262
|
job.func.apply(null, job.args);
|
|
14179
|
-
checkIsNearInfiniteLimit(clock,
|
|
14180
|
-
if (clock.loopLimit &&
|
|
14263
|
+
checkIsNearInfiniteLimit(clock, i2);
|
|
14264
|
+
if (clock.loopLimit && i2 > clock.loopLimit) {
|
|
14181
14265
|
throw getInfiniteLoopError(clock, job);
|
|
14182
14266
|
}
|
|
14183
14267
|
}
|
|
@@ -14388,11 +14472,11 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14388
14472
|
}
|
|
14389
14473
|
}
|
|
14390
14474
|
function uninstall(clock, config2) {
|
|
14391
|
-
let method,
|
|
14475
|
+
let method, i2, l;
|
|
14392
14476
|
const installedHrTime = "_hrtime";
|
|
14393
14477
|
const installedNextTick = "_nextTick";
|
|
14394
|
-
for (
|
|
14395
|
-
method = clock.methods[
|
|
14478
|
+
for (i2 = 0, l = clock.methods.length; i2 < l; i2++) {
|
|
14479
|
+
method = clock.methods[i2];
|
|
14396
14480
|
if (method === "hrtime" && _global.process) {
|
|
14397
14481
|
_global.process.hrtime = clock[installedHrTime];
|
|
14398
14482
|
} else if (method === "nextTick" && _global.process) {
|
|
@@ -14841,9 +14925,9 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14841
14925
|
};
|
|
14842
14926
|
}
|
|
14843
14927
|
clock.runAll = function runAll() {
|
|
14844
|
-
let numTimers,
|
|
14928
|
+
let numTimers, i2;
|
|
14845
14929
|
runJobs(clock);
|
|
14846
|
-
for (
|
|
14930
|
+
for (i2 = 0; i2 < clock.loopLimit; i2++) {
|
|
14847
14931
|
if (!clock.timers) {
|
|
14848
14932
|
resetIsNearInfiniteLimit();
|
|
14849
14933
|
return clock.now;
|
|
@@ -14854,7 +14938,7 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14854
14938
|
return clock.now;
|
|
14855
14939
|
}
|
|
14856
14940
|
clock.next();
|
|
14857
|
-
checkIsNearInfiniteLimit(clock,
|
|
14941
|
+
checkIsNearInfiniteLimit(clock, i2);
|
|
14858
14942
|
}
|
|
14859
14943
|
const excessJob = firstTimer(clock);
|
|
14860
14944
|
throw getInfiniteLoopError(clock, excessJob);
|
|
@@ -14865,12 +14949,12 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14865
14949
|
if (typeof _global.Promise !== "undefined") {
|
|
14866
14950
|
clock.runAllAsync = function runAllAsync() {
|
|
14867
14951
|
return new _global.Promise(function(resolve3, reject) {
|
|
14868
|
-
let
|
|
14952
|
+
let i2 = 0;
|
|
14869
14953
|
function doRun() {
|
|
14870
14954
|
originalSetTimeout(function() {
|
|
14871
14955
|
try {
|
|
14872
14956
|
let numTimers;
|
|
14873
|
-
if (
|
|
14957
|
+
if (i2 < clock.loopLimit) {
|
|
14874
14958
|
if (!clock.timers) {
|
|
14875
14959
|
resetIsNearInfiniteLimit();
|
|
14876
14960
|
resolve3(clock.now);
|
|
@@ -14885,9 +14969,9 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14885
14969
|
return;
|
|
14886
14970
|
}
|
|
14887
14971
|
clock.next();
|
|
14888
|
-
|
|
14972
|
+
i2++;
|
|
14889
14973
|
doRun();
|
|
14890
|
-
checkIsNearInfiniteLimit(clock,
|
|
14974
|
+
checkIsNearInfiniteLimit(clock, i2);
|
|
14891
14975
|
return;
|
|
14892
14976
|
}
|
|
14893
14977
|
const excessJob = firstTimer(clock);
|
|
@@ -14989,7 +15073,7 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14989
15073
|
"config.target is no longer supported. Use `withGlobal(target)` instead."
|
|
14990
15074
|
);
|
|
14991
15075
|
}
|
|
14992
|
-
let
|
|
15076
|
+
let i2, l;
|
|
14993
15077
|
const clock = createClock(config2.now, config2.loopLimit);
|
|
14994
15078
|
clock.shouldClearNativeTimers = config2.shouldClearNativeTimers;
|
|
14995
15079
|
clock.uninstall = function() {
|
|
@@ -15037,8 +15121,8 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
15037
15121
|
if (_global === globalObject && timersModule) {
|
|
15038
15122
|
clock.timersModuleMethods = [];
|
|
15039
15123
|
}
|
|
15040
|
-
for (
|
|
15041
|
-
const nameOfMethodToReplace = clock.methods[
|
|
15124
|
+
for (i2 = 0, l = clock.methods.length; i2 < l; i2++) {
|
|
15125
|
+
const nameOfMethodToReplace = clock.methods[i2];
|
|
15042
15126
|
if (nameOfMethodToReplace === "hrtime") {
|
|
15043
15127
|
if (_global.process && typeof _global.process.hrtime === "function") {
|
|
15044
15128
|
hijackMethod(_global.process, nameOfMethodToReplace, clock);
|
|
@@ -15074,6 +15158,7 @@ defaultImplementation.createClock;
|
|
|
15074
15158
|
defaultImplementation.install;
|
|
15075
15159
|
var withGlobal_1 = withGlobal;
|
|
15076
15160
|
var FakeTimers = class {
|
|
15161
|
+
_global;
|
|
15077
15162
|
_clock;
|
|
15078
15163
|
_fakingTime;
|
|
15079
15164
|
_fakingDate;
|
|
@@ -15088,6 +15173,7 @@ var FakeTimers = class {
|
|
|
15088
15173
|
this._fakingDate = false;
|
|
15089
15174
|
this._fakingTime = false;
|
|
15090
15175
|
this._fakeTimers = withGlobal_1(global3);
|
|
15176
|
+
this._global = global3;
|
|
15091
15177
|
}
|
|
15092
15178
|
clearAllTimers() {
|
|
15093
15179
|
if (this._fakingTime)
|
|
@@ -15114,7 +15200,7 @@ var FakeTimers = class {
|
|
|
15114
15200
|
}
|
|
15115
15201
|
advanceTimersToNextTimer(steps = 1) {
|
|
15116
15202
|
if (this._checkFakeTimers()) {
|
|
15117
|
-
for (let
|
|
15203
|
+
for (let i2 = steps; i2 > 0; i2--) {
|
|
15118
15204
|
this._clock.next();
|
|
15119
15205
|
this._clock.tick(0);
|
|
15120
15206
|
if (this._clock.countTimers() === 0)
|
|
@@ -15124,7 +15210,7 @@ var FakeTimers = class {
|
|
|
15124
15210
|
}
|
|
15125
15211
|
async advanceTimersToNextTimerAsync(steps = 1) {
|
|
15126
15212
|
if (this._checkFakeTimers()) {
|
|
15127
|
-
for (let
|
|
15213
|
+
for (let i2 = steps; i2 > 0; i2--) {
|
|
15128
15214
|
await this._clock.nextAsync();
|
|
15129
15215
|
this._clock.tick(0);
|
|
15130
15216
|
if (this._clock.countTimers() === 0)
|
|
@@ -15168,11 +15254,11 @@ var FakeTimers = class {
|
|
|
15168
15254
|
throw new Error("process.nextTick cannot be mocked inside child_process");
|
|
15169
15255
|
const existingFakedMethods = (((_c = this._userConfig) == null ? void 0 : _c.toFake) || toFake).filter((method) => {
|
|
15170
15256
|
switch (method) {
|
|
15171
|
-
case "
|
|
15172
|
-
case "
|
|
15173
|
-
return
|
|
15257
|
+
case "setImmediate":
|
|
15258
|
+
case "clearImmediate":
|
|
15259
|
+
return method in this._global && this._global[method];
|
|
15174
15260
|
default:
|
|
15175
|
-
return
|
|
15261
|
+
return true;
|
|
15176
15262
|
}
|
|
15177
15263
|
});
|
|
15178
15264
|
this._clock = this._fakeTimers.install({
|
|
@@ -15484,6 +15570,7 @@ function createVitest() {
|
|
|
15484
15570
|
async importMock(path3) {
|
|
15485
15571
|
return _mocker.importMock(path3, getImporter());
|
|
15486
15572
|
},
|
|
15573
|
+
// this is typed in the interface so it's not necessary to type it here
|
|
15487
15574
|
mocked(item, _options = {}) {
|
|
15488
15575
|
return item;
|
|
15489
15576
|
},
|
|
@@ -15561,7 +15648,7 @@ function createVitest() {
|
|
|
15561
15648
|
var vitest = createVitest();
|
|
15562
15649
|
var vi = vitest;
|
|
15563
15650
|
|
|
15564
|
-
// ../../node_modules/vitest/dist/vendor/index.
|
|
15651
|
+
// ../../node_modules/vitest/dist/vendor/index.JZMafwT-.js
|
|
15565
15652
|
init_esm_shims();
|
|
15566
15653
|
function getRunningMode() {
|
|
15567
15654
|
return process.env.VITEST_MODE === "WATCH" ? "watch" : "run";
|
|
@@ -15647,6 +15734,7 @@ var VitestIndex = /* @__PURE__ */ Object.freeze({
|
|
|
15647
15734
|
isWatchMode,
|
|
15648
15735
|
it,
|
|
15649
15736
|
onTestFailed,
|
|
15737
|
+
onTestFinished,
|
|
15650
15738
|
runOnce,
|
|
15651
15739
|
should,
|
|
15652
15740
|
suite,
|