@sentry/mcp-server 0.9.0 → 0.11.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/README.md +1 -1
- package/dist/api-client/client.cjs +4 -4
- package/dist/api-client/client.d.cts +3 -3
- package/dist/api-client/client.d.ts +3 -3
- package/dist/api-client/client.js +2 -2
- package/dist/api-client/client.test.cjs +8 -9
- package/dist/api-client/client.test.cjs.map +1 -1
- package/dist/api-client/client.test.js +4 -4
- package/dist/api-client/index.cjs +40 -38
- package/dist/api-client/index.d.cts +4 -4
- package/dist/api-client/index.d.ts +4 -4
- package/dist/api-client/index.js +5 -5
- package/dist/api-client/schema.cjs +35 -33
- package/dist/api-client/schema.d.cts +2 -2
- package/dist/api-client/schema.d.ts +2 -2
- package/dist/api-client/schema.js +2 -2
- package/dist/api-client/types.cjs +1 -1
- package/dist/api-client/types.d.cts +3 -3
- package/dist/api-client/types.d.ts +3 -3
- package/dist/api-client/types.js +1 -1
- package/dist/{chunk-CsIcISPO.js → chunk-BLXvPPr8.js} +1 -1
- package/dist/{chunk-BtT13l48.cjs → chunk-DWy1uDak.cjs} +0 -1
- package/dist/{client-1dRfG57H.d.ts → client-Bxf4MxOz.d.cts} +10 -6
- package/dist/client-Bxf4MxOz.d.cts.map +1 -0
- package/dist/{client-CTm4cvI7.js → client-D5xFZtxK.js} +19 -7
- package/dist/client-D5xFZtxK.js.map +1 -0
- package/dist/{client-BsYOQsEI.d.cts → client-DOhBiaMJ.d.ts} +9 -5
- package/dist/client-DOhBiaMJ.d.ts.map +1 -0
- package/dist/{client-DQ837FXP.cjs → client-GKHZSXgV.cjs} +19 -8
- package/dist/client-GKHZSXgV.cjs.map +1 -0
- package/dist/{dist-wiyJYfAH.cjs → dist-BlIWGSIM.cjs} +318 -164
- package/dist/dist-BlIWGSIM.cjs.map +1 -0
- package/dist/{dist-BKh-M1A1.js → dist-DDpQABxe.js} +318 -163
- package/dist/dist-DDpQABxe.js.map +1 -0
- package/dist/errors-B9fwS-aP.cjs +21 -0
- package/dist/errors-B9fwS-aP.cjs.map +1 -0
- package/dist/errors-BJSrT6Ou.js +15 -0
- package/dist/errors-BJSrT6Ou.js.map +1 -0
- package/dist/errors.cjs +3 -0
- package/dist/errors.d.cts +12 -0
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +3 -0
- package/dist/errors.test.cjs +24 -0
- package/dist/errors.test.cjs.map +1 -0
- package/dist/errors.test.d.cts +1 -0
- package/dist/errors.test.d.ts +1 -0
- package/dist/errors.test.js +24 -0
- package/dist/errors.test.js.map +1 -0
- package/dist/{formatting-BQRAzO5v.js → formatting-BaARL2gT.js} +11 -3
- package/dist/formatting-BaARL2gT.js.map +1 -0
- package/dist/{formatting-C-0bHtbh.cjs → formatting-C2kN0ok6.cjs} +11 -4
- package/dist/formatting-C2kN0ok6.cjs.map +1 -0
- package/dist/index.cjs +19 -19
- package/dist/index.js +18 -17
- package/dist/index.js.map +1 -1
- package/dist/internal/formatting.cjs +4 -4
- package/dist/internal/formatting.d.cts +4 -5
- package/dist/internal/formatting.d.cts.map +1 -1
- package/dist/internal/formatting.d.ts +4 -5
- package/dist/internal/formatting.d.ts.map +1 -1
- package/dist/internal/formatting.js +1 -1
- package/dist/internal/issue-helpers.cjs +4 -4
- package/dist/internal/issue-helpers.d.cts +2 -2
- package/dist/internal/issue-helpers.d.cts.map +1 -1
- package/dist/internal/issue-helpers.d.ts +2 -2
- package/dist/internal/issue-helpers.d.ts.map +1 -1
- package/dist/internal/issue-helpers.js +1 -1
- package/dist/internal/issue-helpers.test.cjs +23 -27
- package/dist/internal/issue-helpers.test.cjs.map +1 -1
- package/dist/internal/issue-helpers.test.js +7 -10
- package/dist/internal/issue-helpers.test.js.map +1 -1
- package/dist/{issue-helpers-DbsECZFq.cjs → issue-helpers-71XgJVXC.cjs} +8 -3
- package/dist/issue-helpers-71XgJVXC.cjs.map +1 -0
- package/dist/{issue-helpers-CyoHu5j4.js → issue-helpers-CSNNO03f.js} +8 -2
- package/dist/issue-helpers-CSNNO03f.js.map +1 -0
- package/dist/{logging-BEMgC5SA.cjs → logging-ByvSjT6V.cjs} +2 -3
- package/dist/{logging-BEMgC5SA.cjs.map → logging-ByvSjT6V.cjs.map} +1 -1
- package/dist/{logging-Cxm8lQvg.js → logging-CXLD0FFB.js} +1 -1
- package/dist/{logging-Cxm8lQvg.js.map → logging-CXLD0FFB.js.map} +1 -1
- package/dist/logging.cjs +2 -2
- package/dist/logging.d.cts +1 -2
- package/dist/logging.d.cts.map +1 -1
- package/dist/logging.d.ts +1 -2
- package/dist/logging.d.ts.map +1 -1
- package/dist/logging.js +1 -1
- package/dist/{magic-string.es-m-ldRjOa.cjs → magic-string.es-CybcVAw7.cjs} +2 -3
- package/dist/{magic-string.es-m-ldRjOa.cjs.map → magic-string.es-CybcVAw7.cjs.map} +1 -1
- package/dist/{promptDefinitions-5jiZMBg5.cjs → promptDefinitions-D3ll3qCd.cjs} +6 -7
- package/dist/promptDefinitions-D3ll3qCd.cjs.map +1 -0
- package/dist/{promptDefinitions-Dcz3d9wL.d.cts → promptDefinitions-DMucOchd.d.cts} +5 -5
- package/dist/promptDefinitions-DMucOchd.d.cts.map +1 -0
- package/dist/{promptDefinitions-DrGK-v8n.d.ts → promptDefinitions-H0q1_X-K.d.ts} +6 -6
- package/dist/promptDefinitions-H0q1_X-K.d.ts.map +1 -0
- package/dist/{promptDefinitions-CPTadtuI.js → promptDefinitions-aKmUZWWO.js} +5 -5
- package/dist/promptDefinitions-aKmUZWWO.js.map +1 -0
- package/dist/promptDefinitions.cjs +3 -3
- package/dist/promptDefinitions.d.cts +1 -1
- package/dist/promptDefinitions.d.ts +1 -1
- package/dist/promptDefinitions.js +2 -2
- package/dist/{prompts-DgWOD2rU.js → prompts-CzD0yl7Z.js} +1 -1
- package/dist/{prompts-DgWOD2rU.js.map → prompts-CzD0yl7Z.js.map} +1 -1
- package/dist/{prompts-nfFU-zY-.cjs → prompts-DMwoay8l.cjs} +1 -2
- package/dist/{prompts-nfFU-zY-.cjs.map → prompts-DMwoay8l.cjs.map} +1 -1
- package/dist/prompts.cjs +2 -2
- package/dist/prompts.d.cts +6 -7
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +6 -7
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +1 -1
- package/dist/{resources-BAE7VVZZ.cjs → resources-D6TW2ER0.cjs} +1 -2
- package/dist/{resources-BAE7VVZZ.cjs.map → resources-D6TW2ER0.cjs.map} +1 -1
- package/dist/{resources-OM3EAnnj.js → resources-x-GaokG8.js} +1 -1
- package/dist/{resources-OM3EAnnj.js.map → resources-x-GaokG8.js.map} +1 -1
- package/dist/resources.cjs +2 -2
- package/dist/resources.d.cts +0 -1
- package/dist/resources.d.cts.map +1 -1
- package/dist/resources.d.ts +0 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +1 -1
- package/dist/schema-B8lT632E.cjs +77 -0
- package/dist/schema-B8lT632E.cjs.map +1 -0
- package/dist/schema-BkHf97d7.js +17 -0
- package/dist/schema-BkHf97d7.js.map +1 -0
- package/dist/{schema-CaJV2aIO.d.cts → schema-C-MLkWMc.d.ts} +385 -272
- package/dist/schema-C-MLkWMc.d.ts.map +1 -0
- package/dist/{schema-nyYqVk4Y.js → schema-CewAKS9A.js} +19 -3
- package/dist/schema-CewAKS9A.js.map +1 -0
- package/dist/{schema-KEMqYaQn.cjs → schema-DkyWSqp_.cjs} +31 -4
- package/dist/schema-DkyWSqp_.cjs.map +1 -0
- package/dist/{schema-DwPOkoSP.d.ts → schema-DqxkW9Tx.d.cts} +387 -274
- package/dist/schema-DqxkW9Tx.d.cts.map +1 -0
- package/dist/schema.cjs +11 -9
- package/dist/schema.d.cts +4 -3
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +4 -3
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/{server-BWoJZj5B.cjs → server-pGtEIwE3.cjs} +33 -27
- package/dist/server-pGtEIwE3.cjs.map +1 -0
- package/dist/{server-DtNbD1c-.js → server-qpWdf-ST.js} +32 -25
- package/dist/server-qpWdf-ST.js.map +1 -0
- package/dist/server.cjs +16 -15
- package/dist/server.d.cts +4 -5
- package/dist/server.d.cts.map +1 -1
- package/dist/server.d.ts +4 -5
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +15 -14
- package/dist/{stdio-D4oW-qT6.js → stdio-D8u2W847.js} +2 -2
- package/dist/{stdio-D4oW-qT6.js.map → stdio-D8u2W847.js.map} +1 -1
- package/dist/{stdio-BLzMxGqU.cjs → stdio-DydB2Pxu.cjs} +3 -4
- package/dist/{stdio-BLzMxGqU.cjs.map → stdio-DydB2Pxu.cjs.map} +1 -1
- package/dist/test-setup.cjs +1568 -1320
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +1568 -1319
- package/dist/test-setup.js.map +1 -1
- package/dist/{toolDefinitions-BF-D81bS.js → toolDefinitions-BSC2D_S-.js} +95 -79
- package/dist/toolDefinitions-BSC2D_S-.js.map +1 -0
- package/dist/{toolDefinitions-CO65cU86.cjs → toolDefinitions-BtHN8t_d.cjs} +96 -81
- package/dist/toolDefinitions-BtHN8t_d.cjs.map +1 -0
- package/dist/{toolDefinitions-CCscRQoM.d.ts → toolDefinitions-Dp13BpEu.d.cts} +58 -26
- package/dist/toolDefinitions-Dp13BpEu.d.cts.map +1 -0
- package/dist/{toolDefinitions-K_TVqaLU.d.cts → toolDefinitions-fQrpWznJ.d.ts} +57 -25
- package/dist/toolDefinitions-fQrpWznJ.d.ts.map +1 -0
- package/dist/toolDefinitions.cjs +3 -3
- package/dist/toolDefinitions.d.cts +1 -1
- package/dist/toolDefinitions.d.ts +1 -1
- package/dist/toolDefinitions.js +2 -2
- package/dist/toolDefinitions.test.cjs +3 -4
- package/dist/toolDefinitions.test.cjs.map +1 -1
- package/dist/toolDefinitions.test.js +3 -3
- package/dist/{tools-B8ufMRZx.js → tools-4Rtn4WEf.js} +58 -57
- package/dist/tools-4Rtn4WEf.js.map +1 -0
- package/dist/{tools-BYt-G6p2.cjs → tools-DHHqAqP9.cjs} +59 -59
- package/dist/tools-DHHqAqP9.cjs.map +1 -0
- package/dist/tools.cjs +10 -9
- package/dist/tools.d.cts +55 -26
- package/dist/tools.d.cts.map +1 -1
- package/dist/tools.d.ts +55 -26
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -8
- package/dist/tools.test.cjs +154 -62
- package/dist/tools.test.cjs.map +1 -1
- package/dist/tools.test.js +135 -42
- package/dist/tools.test.js.map +1 -1
- package/dist/transports/stdio.cjs +17 -16
- package/dist/transports/stdio.d.cts +4 -5
- package/dist/transports/stdio.d.cts.map +1 -1
- package/dist/transports/stdio.d.ts +4 -5
- package/dist/transports/stdio.d.ts.map +1 -1
- package/dist/transports/stdio.js +16 -15
- package/dist/{types-TaJcaAVg.d.cts → types-CbLyQvVe.d.cts} +3 -4
- package/dist/types-CbLyQvVe.d.cts.map +1 -0
- package/dist/{types-Ds7qzCBB.d.ts → types-CcffrLXB.d.cts} +5 -5
- package/dist/types-CcffrLXB.d.cts.map +1 -0
- package/dist/{types-DyM4kaGZ.d.ts → types-CfJ51LyL.d.ts} +3 -4
- package/dist/types-CfJ51LyL.d.ts.map +1 -0
- package/dist/{types-CPuN4Qmi.d.cts → types-DuUmV9zh.d.ts} +5 -5
- package/dist/types-DuUmV9zh.d.ts.map +1 -0
- package/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/dist/version-BT9r_3jm.js +6 -0
- package/dist/{version-dTEKpaGt.js.map → version-BT9r_3jm.js.map} +1 -1
- package/dist/{version-B0O4KvZ9.cjs → version-CRzAHHGZ.cjs} +2 -3
- package/dist/{version-B0O4KvZ9.cjs.map → version-CRzAHHGZ.cjs.map} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.d.cts +1 -2
- package/dist/version.d.cts.map +1 -1
- package/dist/version.d.ts +1 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/{vi.ClIskdbk-De9q3829.js → vi.bdSIJ99Y-BfJr7I2s.js} +241 -171
- package/dist/vi.bdSIJ99Y-BfJr7I2s.js.map +1 -0
- package/dist/{vi.ClIskdbk-Bs263gvI.cjs → vi.bdSIJ99Y-Dft_B_Ta.cjs} +243 -182
- package/dist/vi.bdSIJ99Y-Dft_B_Ta.cjs.map +1 -0
- package/package.json +8 -8
- package/dist/client-1dRfG57H.d.ts.map +0 -1
- package/dist/client-BsYOQsEI.d.cts.map +0 -1
- package/dist/client-CTm4cvI7.js.map +0 -1
- package/dist/client-DQ837FXP.cjs.map +0 -1
- package/dist/dist-BKh-M1A1.js.map +0 -1
- package/dist/dist-wiyJYfAH.cjs.map +0 -1
- package/dist/formatting-BQRAzO5v.js.map +0 -1
- package/dist/formatting-C-0bHtbh.cjs.map +0 -1
- package/dist/issue-helpers-CyoHu5j4.js.map +0 -1
- package/dist/issue-helpers-DbsECZFq.cjs.map +0 -1
- package/dist/promptDefinitions-5jiZMBg5.cjs.map +0 -1
- package/dist/promptDefinitions-CPTadtuI.js.map +0 -1
- package/dist/promptDefinitions-Dcz3d9wL.d.cts.map +0 -1
- package/dist/promptDefinitions-DrGK-v8n.d.ts.map +0 -1
- package/dist/schema-BCkBPgjj.cjs +0 -64
- package/dist/schema-BCkBPgjj.cjs.map +0 -1
- package/dist/schema-CJrk_GUH.js +0 -15
- package/dist/schema-CJrk_GUH.js.map +0 -1
- package/dist/schema-CaJV2aIO.d.cts.map +0 -1
- package/dist/schema-DwPOkoSP.d.ts.map +0 -1
- package/dist/schema-KEMqYaQn.cjs.map +0 -1
- package/dist/schema-nyYqVk4Y.js.map +0 -1
- package/dist/server-BWoJZj5B.cjs.map +0 -1
- package/dist/server-DtNbD1c-.js.map +0 -1
- package/dist/toolDefinitions-BF-D81bS.js.map +0 -1
- package/dist/toolDefinitions-CCscRQoM.d.ts.map +0 -1
- package/dist/toolDefinitions-CO65cU86.cjs.map +0 -1
- package/dist/toolDefinitions-K_TVqaLU.d.cts.map +0 -1
- package/dist/tools-B8ufMRZx.js.map +0 -1
- package/dist/tools-BYt-G6p2.cjs.map +0 -1
- package/dist/types-CPuN4Qmi.d.cts.map +0 -1
- package/dist/types-Ds7qzCBB.d.ts.map +0 -1
- package/dist/types-DyM4kaGZ.d.ts.map +0 -1
- package/dist/types-TaJcaAVg.d.cts.map +0 -1
- package/dist/version-dTEKpaGt.js +0 -6
- package/dist/vi.ClIskdbk-Bs263gvI.cjs.map +0 -1
- package/dist/vi.ClIskdbk-De9q3829.js.map +0 -1
- /package/dist/{api-client-9mzrj2HY.js → api-client-CL1WDkw9.cjs} +0 -0
- /package/dist/{api-client-CEBuz3Zu.cjs → api-client-CNv_hbPO.js} +0 -0
- /package/dist/{types-H-TSmRpm.js → types-6zHoEWAx.js} +0 -0
- /package/dist/{types-o3zWarRp.cjs → types-MYBaygjr.cjs} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const require_chunk = require('./chunk-BtT13l48.cjs');
|
|
1
|
+
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
3
2
|
const tty = require_chunk.__toESM(require("tty"));
|
|
4
3
|
|
|
5
4
|
//#region ../../node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js
|
|
@@ -87,9 +86,9 @@ var r = process.env.FORCE_TTY !== void 0 || (0, tty.isatty)(1);
|
|
|
87
86
|
var u = p(r);
|
|
88
87
|
|
|
89
88
|
//#endregion
|
|
90
|
-
//#region ../../node_modules/.pnpm/@vitest+pretty-format@3.
|
|
91
|
-
function _mergeNamespaces(n, m) {
|
|
92
|
-
m.forEach(function(e) {
|
|
89
|
+
//#region ../../node_modules/.pnpm/@vitest+pretty-format@3.2.0/node_modules/@vitest/pretty-format/dist/index.js
|
|
90
|
+
function _mergeNamespaces(n, m$1) {
|
|
91
|
+
m$1.forEach(function(e) {
|
|
93
92
|
e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
|
|
94
93
|
if (k !== "default" && !(k in n)) {
|
|
95
94
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
@@ -629,7 +628,7 @@ var hasRequiredReactIs_production_min;
|
|
|
629
628
|
function requireReactIs_production_min() {
|
|
630
629
|
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
631
630
|
hasRequiredReactIs_production_min = 1;
|
|
632
|
-
var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f$1 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h$1 = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p$1 = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u$1;
|
|
631
|
+
var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f$1 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h$1 = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m$1 = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p$1 = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u$1;
|
|
633
632
|
u$1 = Symbol.for("react.module.reference");
|
|
634
633
|
function v(a$1) {
|
|
635
634
|
if ("object" === typeof a$1 && null !== a$1) {
|
|
@@ -639,7 +638,7 @@ function requireReactIs_production_min() {
|
|
|
639
638
|
case d:
|
|
640
639
|
case f$1:
|
|
641
640
|
case e:
|
|
642
|
-
case m:
|
|
641
|
+
case m$1:
|
|
643
642
|
case n: return a$1;
|
|
644
643
|
default: switch (a$1 = a$1 && a$1.$$typeof, a$1) {
|
|
645
644
|
case k:
|
|
@@ -665,7 +664,7 @@ function requireReactIs_production_min() {
|
|
|
665
664
|
reactIs_production_min.Portal = c;
|
|
666
665
|
reactIs_production_min.Profiler = f$1;
|
|
667
666
|
reactIs_production_min.StrictMode = e;
|
|
668
|
-
reactIs_production_min.Suspense = m;
|
|
667
|
+
reactIs_production_min.Suspense = m$1;
|
|
669
668
|
reactIs_production_min.SuspenseList = n;
|
|
670
669
|
reactIs_production_min.isAsyncMode = function() {
|
|
671
670
|
return false;
|
|
@@ -704,13 +703,13 @@ function requireReactIs_production_min() {
|
|
|
704
703
|
return v(a$1) === e;
|
|
705
704
|
};
|
|
706
705
|
reactIs_production_min.isSuspense = function(a$1) {
|
|
707
|
-
return v(a$1) === m;
|
|
706
|
+
return v(a$1) === m$1;
|
|
708
707
|
};
|
|
709
708
|
reactIs_production_min.isSuspenseList = function(a$1) {
|
|
710
709
|
return v(a$1) === n;
|
|
711
710
|
};
|
|
712
711
|
reactIs_production_min.isValidElementType = function(a$1) {
|
|
713
|
-
return "string" === typeof a$1 || "function" === typeof a$1 || a$1 === d || a$1 === f$1 || a$1 === e || a$1 === m || a$1 === n || a$1 === t || "object" === typeof a$1 && null !== a$1 && (a$1.$$typeof === q || a$1.$$typeof === p$1 || a$1.$$typeof === g || a$1.$$typeof === h$1 || a$1.$$typeof === l || a$1.$$typeof === u$1 || void 0 !== a$1.getModuleId) ? true : false;
|
|
712
|
+
return "string" === typeof a$1 || "function" === typeof a$1 || a$1 === d || a$1 === f$1 || a$1 === e || a$1 === m$1 || a$1 === n || a$1 === t || "object" === typeof a$1 && null !== a$1 && (a$1.$$typeof === q || a$1.$$typeof === p$1 || a$1.$$typeof === g || a$1.$$typeof === h$1 || a$1.$$typeof === l || a$1.$$typeof === u$1 || void 0 !== a$1.getModuleId) ? true : false;
|
|
714
713
|
};
|
|
715
714
|
reactIs_production_min.typeOf = v;
|
|
716
715
|
return reactIs_production_min;
|
|
@@ -914,7 +913,7 @@ const reactIsMethods = [
|
|
|
914
913
|
"isSuspenseList",
|
|
915
914
|
"isValidElementType"
|
|
916
915
|
];
|
|
917
|
-
const ReactIs = Object.fromEntries(reactIsMethods.map((m) => [m, (v) => ReactIs18[m](v) || ReactIs19[m](v)]));
|
|
916
|
+
const ReactIs = Object.fromEntries(reactIsMethods.map((m$1) => [m$1, (v) => ReactIs18[m$1](v) || ReactIs19[m$1](v)]));
|
|
918
917
|
function getChildren(arg, children = []) {
|
|
919
918
|
if (Array.isArray(arg)) for (const item of arg) getChildren(item, children);
|
|
920
919
|
else if (arg != null && arg !== false && arg !== "") children.push(arg);
|
|
@@ -1497,7 +1496,7 @@ var promise_default$1 = getPromiseValue$1;
|
|
|
1497
1496
|
|
|
1498
1497
|
//#endregion
|
|
1499
1498
|
//#region ../../node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/object.js
|
|
1500
|
-
function inspectObject$
|
|
1499
|
+
function inspectObject$1(object, options) {
|
|
1501
1500
|
const properties = Object.getOwnPropertyNames(object);
|
|
1502
1501
|
const symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];
|
|
1503
1502
|
if (properties.length === 0 && symbols.length === 0) return "{}";
|
|
@@ -1522,7 +1521,7 @@ function inspectClass$1(value, options) {
|
|
|
1522
1521
|
name = name || value.constructor.name;
|
|
1523
1522
|
if (!name || name === "_class") name = "<Anonymous Class>";
|
|
1524
1523
|
options.truncate -= name.length;
|
|
1525
|
-
return `${name}${inspectObject$
|
|
1524
|
+
return `${name}${inspectObject$1(value, options)}`;
|
|
1526
1525
|
}
|
|
1527
1526
|
|
|
1528
1527
|
//#endregion
|
|
@@ -1548,7 +1547,7 @@ const errorKeys$1 = [
|
|
|
1548
1547
|
"description",
|
|
1549
1548
|
"cause"
|
|
1550
1549
|
];
|
|
1551
|
-
function inspectObject$
|
|
1550
|
+
function inspectObject$2(error, options) {
|
|
1552
1551
|
const properties = Object.getOwnPropertyNames(error).filter((key) => errorKeys$1.indexOf(key) === -1);
|
|
1553
1552
|
const name = error.name;
|
|
1554
1553
|
options.truncate -= name.length;
|
|
@@ -1604,7 +1603,7 @@ try {
|
|
|
1604
1603
|
} catch (noNodeInspect) {
|
|
1605
1604
|
nodeInspect$1 = false;
|
|
1606
1605
|
}
|
|
1607
|
-
const constructorMap$1 = new WeakMap();
|
|
1606
|
+
const constructorMap$1 = /* @__PURE__ */ new WeakMap();
|
|
1608
1607
|
const stringTagMap$1 = {};
|
|
1609
1608
|
const baseTypesMap$1 = {
|
|
1610
1609
|
undefined: (value, options) => options.stylize("undefined", "undefined"),
|
|
@@ -1642,7 +1641,7 @@ const baseTypesMap$1 = {
|
|
|
1642
1641
|
Generator: () => "",
|
|
1643
1642
|
DataView: () => "",
|
|
1644
1643
|
ArrayBuffer: () => "",
|
|
1645
|
-
Error: inspectObject$
|
|
1644
|
+
Error: inspectObject$2,
|
|
1646
1645
|
HTMLCollection: inspectHTMLCollection$1,
|
|
1647
1646
|
NodeList: inspectHTMLCollection$1
|
|
1648
1647
|
};
|
|
@@ -1669,18 +1668,18 @@ function inspect$2(value, opts = {}) {
|
|
|
1669
1668
|
}
|
|
1670
1669
|
}
|
|
1671
1670
|
const proto = value ? Object.getPrototypeOf(value) : false;
|
|
1672
|
-
if (proto === Object.prototype || proto === null) return inspectObject$
|
|
1671
|
+
if (proto === Object.prototype || proto === null) return inspectObject$1(value, options);
|
|
1673
1672
|
if (value && typeof HTMLElement === "function" && value instanceof HTMLElement) return inspectHTML$1(value, options);
|
|
1674
1673
|
if ("constructor" in value) {
|
|
1675
1674
|
if (value.constructor !== Object) return inspectClass$1(value, options);
|
|
1676
|
-
return inspectObject$
|
|
1675
|
+
return inspectObject$1(value, options);
|
|
1677
1676
|
}
|
|
1678
|
-
if (value === Object(value)) return inspectObject$
|
|
1677
|
+
if (value === Object(value)) return inspectObject$1(value, options);
|
|
1679
1678
|
return options.stylize(String(value), type$1);
|
|
1680
1679
|
}
|
|
1681
1680
|
|
|
1682
1681
|
//#endregion
|
|
1683
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.
|
|
1682
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.2.0/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js
|
|
1684
1683
|
const { AsymmetricMatcher: AsymmetricMatcher$1, DOMCollection: DOMCollection$1, DOMElement: DOMElement$1, Immutable: Immutable$1, ReactElement: ReactElement$1, ReactTestComponent: ReactTestComponent$1 } = plugins;
|
|
1685
1684
|
const PLUGINS$1 = [
|
|
1686
1685
|
ReactTestComponent$1,
|
|
@@ -1767,8 +1766,8 @@ function format(...args) {
|
|
|
1767
1766
|
case "%j": try {
|
|
1768
1767
|
return JSON.stringify(args[i++]);
|
|
1769
1768
|
} catch (err) {
|
|
1770
|
-
const m = err.message;
|
|
1771
|
-
if (m.includes("circular structure") || m.includes("cyclic structures") || m.includes("cyclic object")) return "[Circular]";
|
|
1769
|
+
const m$1 = err.message;
|
|
1770
|
+
if (m$1.includes("circular structure") || m$1.includes("cyclic structures") || m$1.includes("cyclic object")) return "[Circular]";
|
|
1772
1771
|
throw err;
|
|
1773
1772
|
}
|
|
1774
1773
|
default: return x;
|
|
@@ -1782,7 +1781,7 @@ function inspect$1(obj, options = {}) {
|
|
|
1782
1781
|
if (options.truncate === 0) options.truncate = Number.POSITIVE_INFINITY;
|
|
1783
1782
|
return inspect$2(obj, options);
|
|
1784
1783
|
}
|
|
1785
|
-
function objDisplay
|
|
1784
|
+
function objDisplay(obj, options = {}) {
|
|
1786
1785
|
if (typeof options.truncate === "undefined") options.truncate = 40;
|
|
1787
1786
|
const str = inspect$1(obj, options);
|
|
1788
1787
|
const type$1 = Object.prototype.toString.call(obj);
|
|
@@ -1802,7 +1801,7 @@ function getDefaultExportFromCjs(x) {
|
|
|
1802
1801
|
}
|
|
1803
1802
|
|
|
1804
1803
|
//#endregion
|
|
1805
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.
|
|
1804
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.2.0/node_modules/@vitest/utils/dist/helpers.js
|
|
1806
1805
|
/**
|
|
1807
1806
|
* Get original stacktrace without source map support the most performant way.
|
|
1808
1807
|
* - Create only 1 stack frame.
|
|
@@ -1836,7 +1835,7 @@ function isObject(item) {
|
|
|
1836
1835
|
function isFinalObj(obj) {
|
|
1837
1836
|
return obj === Object.prototype || obj === Function.prototype || obj === RegExp.prototype;
|
|
1838
1837
|
}
|
|
1839
|
-
function getType
|
|
1838
|
+
function getType(value) {
|
|
1840
1839
|
return Object.prototype.toString.apply(value).slice(8, -1);
|
|
1841
1840
|
}
|
|
1842
1841
|
function collectOwnProperties(obj, collector) {
|
|
@@ -1845,14 +1844,14 @@ function collectOwnProperties(obj, collector) {
|
|
|
1845
1844
|
Object.getOwnPropertySymbols(obj).forEach(collect);
|
|
1846
1845
|
}
|
|
1847
1846
|
function getOwnProperties(obj) {
|
|
1848
|
-
const ownProps = new Set();
|
|
1847
|
+
const ownProps = /* @__PURE__ */ new Set();
|
|
1849
1848
|
if (isFinalObj(obj)) return [];
|
|
1850
1849
|
collectOwnProperties(obj, ownProps);
|
|
1851
1850
|
return Array.from(ownProps);
|
|
1852
1851
|
}
|
|
1853
1852
|
const defaultCloneOptions = { forceWritable: false };
|
|
1854
1853
|
function deepClone(val, options = defaultCloneOptions) {
|
|
1855
|
-
const seen = new WeakMap();
|
|
1854
|
+
const seen = /* @__PURE__ */ new WeakMap();
|
|
1856
1855
|
return clone(val, seen, options);
|
|
1857
1856
|
}
|
|
1858
1857
|
function clone(val, seen, options = defaultCloneOptions) {
|
|
@@ -1923,7 +1922,7 @@ function isNegativeNaN(val) {
|
|
|
1923
1922
|
}
|
|
1924
1923
|
|
|
1925
1924
|
//#endregion
|
|
1926
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.
|
|
1925
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.2.0/node_modules/@vitest/utils/dist/index.js
|
|
1927
1926
|
var jsTokens_1;
|
|
1928
1927
|
var hasRequiredJsTokens;
|
|
1929
1928
|
function requireJsTokens() {
|
|
@@ -2374,7 +2373,7 @@ function getSafeTimers() {
|
|
|
2374
2373
|
}
|
|
2375
2374
|
|
|
2376
2375
|
//#endregion
|
|
2377
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.
|
|
2376
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.2.0/node_modules/@vitest/utils/dist/diff.js
|
|
2378
2377
|
/**
|
|
2379
2378
|
* Diff Match and Patch
|
|
2380
2379
|
* Copyright 2018 The diff-match-patch Authors.
|
|
@@ -3336,7 +3335,7 @@ function diffLinesRaw(aLines, bLines, options) {
|
|
|
3336
3335
|
for (; bIndex !== bLength; bIndex += 1) diffs.push(new Diff(DIFF_INSERT, bLines[bIndex]));
|
|
3337
3336
|
return [diffs, truncated];
|
|
3338
3337
|
}
|
|
3339
|
-
function getType(value) {
|
|
3338
|
+
function getType$1(value) {
|
|
3340
3339
|
if (value === void 0) return "undefined";
|
|
3341
3340
|
else if (value === null) return "null";
|
|
3342
3341
|
else if (Array.isArray(value)) return "array";
|
|
@@ -3556,7 +3555,7 @@ const FALLBACK_FORMAT_OPTIONS = {
|
|
|
3556
3555
|
*/
|
|
3557
3556
|
function diff(a$1, b, options) {
|
|
3558
3557
|
if (Object.is(a$1, b)) return "";
|
|
3559
|
-
const aType = getType(a$1);
|
|
3558
|
+
const aType = getType$1(a$1);
|
|
3560
3559
|
let expectedType = aType;
|
|
3561
3560
|
let omitDifference = false;
|
|
3562
3561
|
if (aType === "object" && typeof a$1.asymmetricMatch === "function") {
|
|
@@ -3565,7 +3564,7 @@ function diff(a$1, b, options) {
|
|
|
3565
3564
|
expectedType = a$1.getExpectedType();
|
|
3566
3565
|
omitDifference = expectedType === "string";
|
|
3567
3566
|
}
|
|
3568
|
-
if (expectedType !== getType(b)) {
|
|
3567
|
+
if (expectedType !== getType$1(b)) {
|
|
3569
3568
|
const { aAnnotation, aColor, aIndicator, bAnnotation, bColor, bIndicator } = normalizeDiffOptions(options);
|
|
3570
3569
|
const formatOptions = getFormatOptions(FALLBACK_FORMAT_OPTIONS, options);
|
|
3571
3570
|
let aDisplay = format$1(a$1, formatOptions);
|
|
@@ -3643,12 +3642,12 @@ function getObjectsDifference(a$1, b, formatOptions, options) {
|
|
|
3643
3642
|
}
|
|
3644
3643
|
const MAX_DIFF_STRING_LENGTH = 2e4;
|
|
3645
3644
|
function isAsymmetricMatcher(data) {
|
|
3646
|
-
const type$1 = getType
|
|
3645
|
+
const type$1 = getType(data);
|
|
3647
3646
|
return type$1 === "Object" && typeof data.asymmetricMatch === "function";
|
|
3648
3647
|
}
|
|
3649
3648
|
function isReplaceable(obj1, obj2) {
|
|
3650
|
-
const obj1Type = getType
|
|
3651
|
-
const obj2Type = getType
|
|
3649
|
+
const obj1Type = getType(obj1);
|
|
3650
|
+
const obj2Type = getType(obj2);
|
|
3652
3651
|
return obj1Type === obj2Type && (obj1Type === "Object" || obj1Type === "Array");
|
|
3653
3652
|
}
|
|
3654
3653
|
function printDiffOrStringify(received, expected, options) {
|
|
@@ -3668,7 +3667,7 @@ function printDiffOrStringify(received, expected, options) {
|
|
|
3668
3667
|
const difference = diff(replacedExpected, replacedActual, options);
|
|
3669
3668
|
return difference;
|
|
3670
3669
|
}
|
|
3671
|
-
function replaceAsymmetricMatcher(actual, expected, actualReplaced = new WeakSet(), expectedReplaced = new WeakSet()) {
|
|
3670
|
+
function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE__ */ new WeakSet(), expectedReplaced = /* @__PURE__ */ new WeakSet()) {
|
|
3672
3671
|
if (actual instanceof Error && expected instanceof Error && typeof actual.cause !== "undefined" && typeof expected.cause === "undefined") {
|
|
3673
3672
|
delete actual.cause;
|
|
3674
3673
|
return {
|
|
@@ -3723,7 +3722,7 @@ function getCommonAndChangedSubstrings(diffs, op, hasCommonDiff$1) {
|
|
|
3723
3722
|
}
|
|
3724
3723
|
|
|
3725
3724
|
//#endregion
|
|
3726
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.
|
|
3725
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.2.0/node_modules/@vitest/utils/dist/error.js
|
|
3727
3726
|
const IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
|
|
3728
3727
|
const IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
|
|
3729
3728
|
function isImmutable(v) {
|
|
@@ -3735,8 +3734,18 @@ function getUnserializableMessage(err) {
|
|
|
3735
3734
|
if (typeof err === "string") return `<unserializable>: ${err}`;
|
|
3736
3735
|
return "<unserializable>";
|
|
3737
3736
|
}
|
|
3738
|
-
function serializeValue(val, seen = new WeakMap()) {
|
|
3737
|
+
function serializeValue(val, seen = /* @__PURE__ */ new WeakMap()) {
|
|
3739
3738
|
if (!val || typeof val === "string") return val;
|
|
3739
|
+
if (val instanceof Error && "toJSON" in val && typeof val.toJSON === "function") {
|
|
3740
|
+
const jsonValue = val.toJSON();
|
|
3741
|
+
if (jsonValue && jsonValue !== val && typeof jsonValue === "object") {
|
|
3742
|
+
if (typeof val.message === "string") safe(() => jsonValue.message ?? (jsonValue.message = val.message));
|
|
3743
|
+
if (typeof val.stack === "string") safe(() => jsonValue.stack ?? (jsonValue.stack = val.stack));
|
|
3744
|
+
if (typeof val.name === "string") safe(() => jsonValue.name ?? (jsonValue.name = val.name));
|
|
3745
|
+
if (val.cause != null) safe(() => jsonValue.cause ?? (jsonValue.cause = serializeValue(val.cause, seen)));
|
|
3746
|
+
}
|
|
3747
|
+
return serializeValue(jsonValue, seen);
|
|
3748
|
+
}
|
|
3740
3749
|
if (typeof val === "function") return `Function<${val.name || "anonymous"}>`;
|
|
3741
3750
|
if (typeof val === "symbol") return val.toString();
|
|
3742
3751
|
if (typeof val !== "object") return val;
|
|
@@ -3776,20 +3785,23 @@ function serializeValue(val, seen = new WeakMap()) {
|
|
|
3776
3785
|
return clone$1;
|
|
3777
3786
|
}
|
|
3778
3787
|
}
|
|
3788
|
+
function safe(fn) {
|
|
3789
|
+
try {
|
|
3790
|
+
return fn();
|
|
3791
|
+
} catch {}
|
|
3792
|
+
}
|
|
3779
3793
|
function normalizeErrorMessage(message) {
|
|
3780
3794
|
return message.replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "");
|
|
3781
3795
|
}
|
|
3782
|
-
function processError(_err, diffOptions, seen = new WeakSet()) {
|
|
3796
|
+
function processError(_err, diffOptions, seen = /* @__PURE__ */ new WeakSet()) {
|
|
3783
3797
|
if (!_err || typeof _err !== "object") return { message: String(_err) };
|
|
3784
3798
|
const err = _err;
|
|
3785
|
-
if (err.stack) err.stackStr = String(err.stack);
|
|
3786
|
-
if (err.name) err.nameStr = String(err.name);
|
|
3787
3799
|
if (err.showDiff || err.showDiff === void 0 && err.expected !== void 0 && err.actual !== void 0) err.diff = printDiffOrStringify(err.actual, err.expected, {
|
|
3788
3800
|
...diffOptions,
|
|
3789
3801
|
...err.diffOptions
|
|
3790
3802
|
});
|
|
3791
|
-
if (typeof err.expected !== "string") err.expected = stringify(err.expected, 10);
|
|
3792
|
-
if (typeof err.actual !== "string") err.actual = stringify(err.actual, 10);
|
|
3803
|
+
if ("expected" in err && typeof err.expected !== "string") err.expected = stringify(err.expected, 10);
|
|
3804
|
+
if ("actual" in err && typeof err.actual !== "string") err.actual = stringify(err.actual, 10);
|
|
3793
3805
|
try {
|
|
3794
3806
|
if (typeof err.message === "string") err.message = normalizeErrorMessage(err.message);
|
|
3795
3807
|
} catch {}
|
|
@@ -3848,7 +3860,7 @@ __export(utils_exports, {
|
|
|
3848
3860
|
isNumeric: () => isNumeric,
|
|
3849
3861
|
isProxyEnabled: () => isProxyEnabled,
|
|
3850
3862
|
isRegExp: () => isRegExp2,
|
|
3851
|
-
objDisplay: () => objDisplay,
|
|
3863
|
+
objDisplay: () => objDisplay$1,
|
|
3852
3864
|
overwriteChainableMethod: () => overwriteChainableMethod,
|
|
3853
3865
|
overwriteMethod: () => overwriteMethod,
|
|
3854
3866
|
overwriteProperty: () => overwriteProperty,
|
|
@@ -4456,7 +4468,7 @@ function inspect2(obj, showHidden, depth, colors) {
|
|
|
4456
4468
|
return inspect(obj, options);
|
|
4457
4469
|
}
|
|
4458
4470
|
__name(inspect2, "inspect");
|
|
4459
|
-
function objDisplay(obj) {
|
|
4471
|
+
function objDisplay$1(obj) {
|
|
4460
4472
|
var str = inspect2(obj), type3 = Object.prototype.toString.call(obj);
|
|
4461
4473
|
if (config.truncateThreshold && str.length >= config.truncateThreshold) if (type3 === "[object Function]") return !obj.name || obj.name === "" ? "[Function]" : "[Function: " + obj.name + "]";
|
|
4462
4474
|
else if (type3 === "[object Array]") return "[ Array(" + obj.length + ") ]";
|
|
@@ -4466,17 +4478,17 @@ function objDisplay(obj) {
|
|
|
4466
4478
|
} else return str;
|
|
4467
4479
|
else return str;
|
|
4468
4480
|
}
|
|
4469
|
-
__name(objDisplay, "objDisplay");
|
|
4481
|
+
__name(objDisplay$1, "objDisplay");
|
|
4470
4482
|
function getMessage2(obj, args) {
|
|
4471
4483
|
var negate = flag(obj, "negate"), val = flag(obj, "object"), expected = args[3], actual = getActual(obj, args), msg = negate ? args[2] : args[1], flagMsg = flag(obj, "message");
|
|
4472
4484
|
if (typeof msg === "function") msg = msg();
|
|
4473
4485
|
msg = msg || "";
|
|
4474
4486
|
msg = msg.replace(/#\{this\}/g, function() {
|
|
4475
|
-
return objDisplay(val);
|
|
4487
|
+
return objDisplay$1(val);
|
|
4476
4488
|
}).replace(/#\{act\}/g, function() {
|
|
4477
|
-
return objDisplay(actual);
|
|
4489
|
+
return objDisplay$1(actual);
|
|
4478
4490
|
}).replace(/#\{exp\}/g, function() {
|
|
4479
|
-
return objDisplay(expected);
|
|
4491
|
+
return objDisplay$1(expected);
|
|
4480
4492
|
});
|
|
4481
4493
|
return flagMsg ? flagMsg + ": " + msg : msg;
|
|
4482
4494
|
}
|
|
@@ -5711,7 +5723,7 @@ function satisfy(matcher, msg) {
|
|
|
5711
5723
|
if (msg) flag2(this, "message", msg);
|
|
5712
5724
|
var obj = flag2(this, "object");
|
|
5713
5725
|
var result = matcher(obj);
|
|
5714
|
-
this.assert(result, "expected #{this} to satisfy " + objDisplay(matcher), "expected #{this} to not satisfy" + objDisplay(matcher), flag2(this, "negate") ? false : true, result);
|
|
5726
|
+
this.assert(result, "expected #{this} to satisfy " + objDisplay$1(matcher), "expected #{this} to not satisfy" + objDisplay$1(matcher), flag2(this, "negate") ? false : true, result);
|
|
5715
5727
|
}
|
|
5716
5728
|
__name(satisfy, "satisfy");
|
|
5717
5729
|
Assertion.addMethod("satisfy", satisfy);
|
|
@@ -6834,7 +6846,7 @@ references to blow the stack.
|
|
|
6834
6846
|
*/
|
|
6835
6847
|
|
|
6836
6848
|
//#endregion
|
|
6837
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@3.
|
|
6849
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@3.2.0/node_modules/@vitest/utils/dist/source-map.js
|
|
6838
6850
|
const comma = ",".charCodeAt(0);
|
|
6839
6851
|
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
6840
6852
|
const intToChar = new Uint8Array(64);
|
|
@@ -7002,48 +7014,7 @@ function parseSingleV8Stack(raw) {
|
|
|
7002
7014
|
}
|
|
7003
7015
|
|
|
7004
7016
|
//#endregion
|
|
7005
|
-
//#region ../../node_modules/.pnpm/@vitest+runner@3.
|
|
7006
|
-
function createChainable(keys, fn) {
|
|
7007
|
-
function create(context) {
|
|
7008
|
-
const chain$1 = function(...args) {
|
|
7009
|
-
return fn.apply(context, args);
|
|
7010
|
-
};
|
|
7011
|
-
Object.assign(chain$1, fn);
|
|
7012
|
-
chain$1.withContext = () => chain$1.bind(context);
|
|
7013
|
-
chain$1.setContext = (key, value) => {
|
|
7014
|
-
context[key] = value;
|
|
7015
|
-
};
|
|
7016
|
-
chain$1.mergeContext = (ctx) => {
|
|
7017
|
-
Object.assign(context, ctx);
|
|
7018
|
-
};
|
|
7019
|
-
for (const key of keys) Object.defineProperty(chain$1, key, { get() {
|
|
7020
|
-
return create({
|
|
7021
|
-
...context,
|
|
7022
|
-
[key]: true
|
|
7023
|
-
});
|
|
7024
|
-
} });
|
|
7025
|
-
return chain$1;
|
|
7026
|
-
}
|
|
7027
|
-
const chain = create({});
|
|
7028
|
-
chain.fn = fn;
|
|
7029
|
-
return chain;
|
|
7030
|
-
}
|
|
7031
|
-
function getNames(task) {
|
|
7032
|
-
const names = [task.name];
|
|
7033
|
-
let current = task;
|
|
7034
|
-
while (current === null || current === void 0 ? void 0 : current.suite) {
|
|
7035
|
-
current = current.suite;
|
|
7036
|
-
if (current === null || current === void 0 ? void 0 : current.name) names.unshift(current.name);
|
|
7037
|
-
}
|
|
7038
|
-
if (current !== task.file) names.unshift(task.file.name);
|
|
7039
|
-
return names;
|
|
7040
|
-
}
|
|
7041
|
-
function getTestName(task, separator = " > ") {
|
|
7042
|
-
return getNames(task).slice(1).join(separator);
|
|
7043
|
-
}
|
|
7044
|
-
|
|
7045
|
-
//#endregion
|
|
7046
|
-
//#region ../../node_modules/.pnpm/@vitest+runner@3.1.3/node_modules/@vitest/runner/dist/index.js
|
|
7017
|
+
//#region ../../node_modules/.pnpm/@vitest+runner@3.2.0/node_modules/@vitest/runner/dist/chunk-hooks.js
|
|
7047
7018
|
var PendingError = class extends Error {
|
|
7048
7019
|
code = "VITEST_PENDING";
|
|
7049
7020
|
taskId;
|
|
@@ -7054,9 +7025,9 @@ var PendingError = class extends Error {
|
|
|
7054
7025
|
this.taskId = task.id;
|
|
7055
7026
|
}
|
|
7056
7027
|
};
|
|
7057
|
-
const fnMap = new WeakMap();
|
|
7058
|
-
const testFixtureMap = new WeakMap();
|
|
7059
|
-
const hooksMap = new WeakMap();
|
|
7028
|
+
const fnMap = /* @__PURE__ */ new WeakMap();
|
|
7029
|
+
const testFixtureMap = /* @__PURE__ */ new WeakMap();
|
|
7030
|
+
const hooksMap = /* @__PURE__ */ new WeakMap();
|
|
7060
7031
|
function setFn(key, fn) {
|
|
7061
7032
|
fnMap.set(key, fn);
|
|
7062
7033
|
}
|
|
@@ -7089,15 +7060,22 @@ function mergeScopedFixtures(testFixtures, scopedFixtures) {
|
|
|
7089
7060
|
}
|
|
7090
7061
|
return Object.values(newFixtures);
|
|
7091
7062
|
}
|
|
7092
|
-
function mergeContextFixtures(fixtures, context,
|
|
7093
|
-
const fixtureOptionKeys = [
|
|
7063
|
+
function mergeContextFixtures(fixtures, context, runner$1) {
|
|
7064
|
+
const fixtureOptionKeys = [
|
|
7065
|
+
"auto",
|
|
7066
|
+
"injected",
|
|
7067
|
+
"scope"
|
|
7068
|
+
];
|
|
7094
7069
|
const fixtureArray = Object.entries(fixtures).map(([prop, value]) => {
|
|
7095
7070
|
const fixtureItem = { value };
|
|
7096
7071
|
if (Array.isArray(value) && value.length >= 2 && isObject(value[1]) && Object.keys(value[1]).some((key) => fixtureOptionKeys.includes(key))) {
|
|
7072
|
+
var _runner$injectValue;
|
|
7097
7073
|
Object.assign(fixtureItem, value[1]);
|
|
7098
7074
|
const userValue = value[0];
|
|
7099
|
-
fixtureItem.value = fixtureItem.injected ?
|
|
7075
|
+
fixtureItem.value = fixtureItem.injected ? ((_runner$injectValue = runner$1.injectValue) === null || _runner$injectValue === void 0 ? void 0 : _runner$injectValue.call(runner$1, prop)) ?? userValue : userValue;
|
|
7100
7076
|
}
|
|
7077
|
+
fixtureItem.scope = fixtureItem.scope || "test";
|
|
7078
|
+
if (fixtureItem.scope === "worker" && !runner$1.getWorkerContext) fixtureItem.scope = "file";
|
|
7101
7079
|
fixtureItem.prop = prop;
|
|
7102
7080
|
fixtureItem.isFn = typeof fixtureItem.value === "function";
|
|
7103
7081
|
return fixtureItem;
|
|
@@ -7108,13 +7086,22 @@ function mergeContextFixtures(fixtures, context, inject) {
|
|
|
7108
7086
|
if (fixture.isFn) {
|
|
7109
7087
|
const usedProps = getUsedProps(fixture.value);
|
|
7110
7088
|
if (usedProps.length) fixture.deps = context.fixtures.filter(({ prop }) => prop !== fixture.prop && usedProps.includes(prop));
|
|
7089
|
+
if (fixture.scope !== "test") {
|
|
7090
|
+
var _fixture$deps2;
|
|
7091
|
+
(_fixture$deps2 = fixture.deps) === null || _fixture$deps2 === void 0 || _fixture$deps2.forEach((dep) => {
|
|
7092
|
+
if (!dep.isFn) return;
|
|
7093
|
+
if (fixture.scope === "worker" && dep.scope === "worker") return;
|
|
7094
|
+
if (fixture.scope === "file" && dep.scope !== "test") return;
|
|
7095
|
+
throw new SyntaxError(`cannot use the ${dep.scope} fixture "${dep.prop}" inside the ${fixture.scope} fixture "${fixture.prop}"`);
|
|
7096
|
+
});
|
|
7097
|
+
}
|
|
7111
7098
|
}
|
|
7112
7099
|
});
|
|
7113
7100
|
return context;
|
|
7114
7101
|
}
|
|
7115
|
-
const fixtureValueMaps = new Map();
|
|
7116
|
-
const cleanupFnArrayMap = new Map();
|
|
7117
|
-
function withFixtures(fn, testContext) {
|
|
7102
|
+
const fixtureValueMaps = /* @__PURE__ */ new Map();
|
|
7103
|
+
const cleanupFnArrayMap = /* @__PURE__ */ new Map();
|
|
7104
|
+
function withFixtures(runner$1, fn, testContext) {
|
|
7118
7105
|
return (hookContext) => {
|
|
7119
7106
|
const context = hookContext || testContext;
|
|
7120
7107
|
if (!context) return fn({});
|
|
@@ -7123,7 +7110,7 @@ function withFixtures(fn, testContext) {
|
|
|
7123
7110
|
const usedProps = getUsedProps(fn);
|
|
7124
7111
|
const hasAutoFixture = fixtures.some(({ auto }) => auto);
|
|
7125
7112
|
if (!usedProps.length && !hasAutoFixture) return fn(context);
|
|
7126
|
-
if (!fixtureValueMaps.get(context)) fixtureValueMaps.set(context, new Map());
|
|
7113
|
+
if (!fixtureValueMaps.get(context)) fixtureValueMaps.set(context, /* @__PURE__ */ new Map());
|
|
7127
7114
|
const fixtureValueMap = fixtureValueMaps.get(context);
|
|
7128
7115
|
if (!cleanupFnArrayMap.has(context)) cleanupFnArrayMap.set(context, []);
|
|
7129
7116
|
const cleanupFnArray = cleanupFnArrayMap.get(context);
|
|
@@ -7133,10 +7120,10 @@ function withFixtures(fn, testContext) {
|
|
|
7133
7120
|
async function resolveFixtures() {
|
|
7134
7121
|
for (const fixture of pendingFixtures) {
|
|
7135
7122
|
if (fixtureValueMap.has(fixture)) continue;
|
|
7136
|
-
const resolvedValue =
|
|
7123
|
+
const resolvedValue = await resolveFixtureValue(runner$1, fixture, context, cleanupFnArray);
|
|
7137
7124
|
context[fixture.prop] = resolvedValue;
|
|
7138
7125
|
fixtureValueMap.set(fixture, resolvedValue);
|
|
7139
|
-
cleanupFnArray.unshift(() => {
|
|
7126
|
+
if (fixture.scope === "test") cleanupFnArray.unshift(() => {
|
|
7140
7127
|
fixtureValueMap.delete(fixture);
|
|
7141
7128
|
});
|
|
7142
7129
|
}
|
|
@@ -7144,6 +7131,38 @@ function withFixtures(fn, testContext) {
|
|
|
7144
7131
|
return resolveFixtures().then(() => fn(context));
|
|
7145
7132
|
};
|
|
7146
7133
|
}
|
|
7134
|
+
const globalFixturePromise = /* @__PURE__ */ new WeakMap();
|
|
7135
|
+
function resolveFixtureValue(runner$1, fixture, context, cleanupFnArray) {
|
|
7136
|
+
var _runner$getWorkerCont;
|
|
7137
|
+
const fileContext = getFileContext(context.task.file);
|
|
7138
|
+
const workerContext = (_runner$getWorkerCont = runner$1.getWorkerContext) === null || _runner$getWorkerCont === void 0 ? void 0 : _runner$getWorkerCont.call(runner$1);
|
|
7139
|
+
if (!fixture.isFn) {
|
|
7140
|
+
var _fixture$prop;
|
|
7141
|
+
fileContext[_fixture$prop = fixture.prop] ?? (fileContext[_fixture$prop] = fixture.value);
|
|
7142
|
+
if (workerContext) {
|
|
7143
|
+
var _fixture$prop2;
|
|
7144
|
+
workerContext[_fixture$prop2 = fixture.prop] ?? (workerContext[_fixture$prop2] = fixture.value);
|
|
7145
|
+
}
|
|
7146
|
+
return fixture.value;
|
|
7147
|
+
}
|
|
7148
|
+
if (fixture.scope === "test") return resolveFixtureFunction(fixture.value, context, cleanupFnArray);
|
|
7149
|
+
if (globalFixturePromise.has(fixture)) return globalFixturePromise.get(fixture);
|
|
7150
|
+
let fixtureContext;
|
|
7151
|
+
if (fixture.scope === "worker") {
|
|
7152
|
+
if (!workerContext) throw new TypeError("[@vitest/runner] The worker context is not available in the current test runner. Please, provide the `getWorkerContext` method when initiating the runner.");
|
|
7153
|
+
fixtureContext = workerContext;
|
|
7154
|
+
} else fixtureContext = fileContext;
|
|
7155
|
+
if (fixture.prop in fixtureContext) return fixtureContext[fixture.prop];
|
|
7156
|
+
if (!cleanupFnArrayMap.has(fixtureContext)) cleanupFnArrayMap.set(fixtureContext, []);
|
|
7157
|
+
const cleanupFnFileArray = cleanupFnArrayMap.get(fixtureContext);
|
|
7158
|
+
const promise = resolveFixtureFunction(fixture.value, fixtureContext, cleanupFnFileArray).then((value) => {
|
|
7159
|
+
fixtureContext[fixture.prop] = value;
|
|
7160
|
+
globalFixturePromise.delete(fixture);
|
|
7161
|
+
return value;
|
|
7162
|
+
});
|
|
7163
|
+
globalFixturePromise.set(fixture, promise);
|
|
7164
|
+
return promise;
|
|
7165
|
+
}
|
|
7147
7166
|
async function resolveFixtureFunction(fixtureFn, context, cleanupFnArray) {
|
|
7148
7167
|
const useFnArgPromise = createDefer();
|
|
7149
7168
|
let isUseFnArgResolved = false;
|
|
@@ -7165,7 +7184,7 @@ async function resolveFixtureFunction(fixtureFn, context, cleanupFnArray) {
|
|
|
7165
7184
|
});
|
|
7166
7185
|
return useFnArgPromise;
|
|
7167
7186
|
}
|
|
7168
|
-
function resolveDeps(fixtures, depSet = new Set(), pendingFixtures = []) {
|
|
7187
|
+
function resolveDeps(fixtures, depSet = /* @__PURE__ */ new Set(), pendingFixtures = []) {
|
|
7169
7188
|
fixtures.forEach((fixture) => {
|
|
7170
7189
|
if (pendingFixtures.includes(fixture)) return;
|
|
7171
7190
|
if (!fixture.isFn || !fixture.deps) {
|
|
@@ -7220,6 +7239,31 @@ let _test;
|
|
|
7220
7239
|
function getCurrentTest() {
|
|
7221
7240
|
return _test;
|
|
7222
7241
|
}
|
|
7242
|
+
function createChainable(keys, fn) {
|
|
7243
|
+
function create(context) {
|
|
7244
|
+
const chain$1 = function(...args) {
|
|
7245
|
+
return fn.apply(context, args);
|
|
7246
|
+
};
|
|
7247
|
+
Object.assign(chain$1, fn);
|
|
7248
|
+
chain$1.withContext = () => chain$1.bind(context);
|
|
7249
|
+
chain$1.setContext = (key, value) => {
|
|
7250
|
+
context[key] = value;
|
|
7251
|
+
};
|
|
7252
|
+
chain$1.mergeContext = (ctx) => {
|
|
7253
|
+
Object.assign(context, ctx);
|
|
7254
|
+
};
|
|
7255
|
+
for (const key of keys) Object.defineProperty(chain$1, key, { get() {
|
|
7256
|
+
return create({
|
|
7257
|
+
...context,
|
|
7258
|
+
[key]: true
|
|
7259
|
+
});
|
|
7260
|
+
} });
|
|
7261
|
+
return chain$1;
|
|
7262
|
+
}
|
|
7263
|
+
const chain = create({});
|
|
7264
|
+
chain.fn = fn;
|
|
7265
|
+
return chain;
|
|
7266
|
+
}
|
|
7223
7267
|
/**
|
|
7224
7268
|
* Creates a suite of tests, allowing for grouping and hierarchical organization of tests.
|
|
7225
7269
|
* Suites can contain both tests and other suites, enabling complex test structures.
|
|
@@ -7409,7 +7453,8 @@ function createSuiteCollector(name, factory = () => {}, mode, each, suiteOptions
|
|
|
7409
7453
|
retry: options.retry ?? runner.config.retry,
|
|
7410
7454
|
repeats: options.repeats,
|
|
7411
7455
|
mode: options.only ? "only" : options.skip ? "skip" : options.todo ? "todo" : "run",
|
|
7412
|
-
meta: options.meta ?? Object.create(null)
|
|
7456
|
+
meta: options.meta ?? Object.create(null),
|
|
7457
|
+
annotations: []
|
|
7413
7458
|
};
|
|
7414
7459
|
const handler = options.handler;
|
|
7415
7460
|
if (options.concurrent || !options.sequential && runner.config.sequence.concurrent) task$1.concurrent = true;
|
|
@@ -7424,7 +7469,7 @@ function createSuiteCollector(name, factory = () => {}, mode, each, suiteOptions
|
|
|
7424
7469
|
Error.stackTraceLimit = 15;
|
|
7425
7470
|
const stackTraceError = new Error("STACK_TRACE_ERROR");
|
|
7426
7471
|
Error.stackTraceLimit = limit;
|
|
7427
|
-
if (handler) setFn(task$1, withTimeout(withAwaitAsyncAssertions(withFixtures(handler, context), task$1), timeout, false, stackTraceError));
|
|
7472
|
+
if (handler) setFn(task$1, withTimeout(withAwaitAsyncAssertions(withFixtures(runner, handler, context), task$1), timeout, false, stackTraceError, (_, error) => abortIfTimeout([context], error)));
|
|
7428
7473
|
if (runner.config.includeTaskLocation) {
|
|
7429
7474
|
const error = stackTraceError.stack;
|
|
7430
7475
|
const stack = findTestFileStackTrace(error, task$1.each ?? false);
|
|
@@ -7462,10 +7507,7 @@ function createSuiteCollector(name, factory = () => {}, mode, each, suiteOptions
|
|
|
7462
7507
|
return collectorFixtures;
|
|
7463
7508
|
},
|
|
7464
7509
|
scoped(fixtures) {
|
|
7465
|
-
const parsed = mergeContextFixtures(fixtures, { fixtures: collectorFixtures },
|
|
7466
|
-
var _getRunner$injectValu, _getRunner;
|
|
7467
|
-
return (_getRunner$injectValu = (_getRunner = getRunner()).injectValue) === null || _getRunner$injectValu === void 0 ? void 0 : _getRunner$injectValu.call(_getRunner, key);
|
|
7468
|
-
});
|
|
7510
|
+
const parsed = mergeContextFixtures(fixtures, { fixtures: collectorFixtures }, runner);
|
|
7469
7511
|
if (parsed.fixtures) collectorFixtures = parsed.fixtures;
|
|
7470
7512
|
}
|
|
7471
7513
|
};
|
|
@@ -7633,10 +7675,7 @@ function createTaskCollector(fn, context) {
|
|
|
7633
7675
|
collector.scoped(fixtures);
|
|
7634
7676
|
};
|
|
7635
7677
|
taskFn.extend = function(fixtures) {
|
|
7636
|
-
const _context = mergeContextFixtures(fixtures, context || {},
|
|
7637
|
-
var _getRunner$injectValu2, _getRunner2;
|
|
7638
|
-
return (_getRunner$injectValu2 = (_getRunner2 = getRunner()).injectValue) === null || _getRunner$injectValu2 === void 0 ? void 0 : _getRunner$injectValu2.call(_getRunner2, key);
|
|
7639
|
-
});
|
|
7678
|
+
const _context = mergeContextFixtures(fixtures, context || {}, runner);
|
|
7640
7679
|
return createTest(function fn$1(name, optionsOrFn, optionsOrTest) {
|
|
7641
7680
|
const collector = getCurrentSuite();
|
|
7642
7681
|
const scopedFixtures = collector.fixtures();
|
|
@@ -7685,7 +7724,7 @@ function formatTitle(template, items, idx) {
|
|
|
7685
7724
|
if (!isObjectItem && !isArrayKey) return `$${key}`;
|
|
7686
7725
|
const arrayElement = isArrayKey ? objectAttr(items, key) : void 0;
|
|
7687
7726
|
const value = isObjectItem ? objectAttr(items[0], key, arrayElement) : arrayElement;
|
|
7688
|
-
return objDisplay
|
|
7727
|
+
return objDisplay(value, { truncate: runner === null || runner === void 0 || (_runner$config = runner.config) === null || _runner$config === void 0 || (_runner$config = _runner$config.chaiConfig) === null || _runner$config === void 0 ? void 0 : _runner$config.truncateThreshold });
|
|
7689
7728
|
});
|
|
7690
7729
|
return formatted;
|
|
7691
7730
|
}
|
|
@@ -7709,7 +7748,60 @@ function findTestFileStackTrace(error, each) {
|
|
|
7709
7748
|
};
|
|
7710
7749
|
}
|
|
7711
7750
|
}
|
|
7712
|
-
const now$2 = Date.now;
|
|
7751
|
+
const now$2 = globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
|
|
7752
|
+
function getNames(task) {
|
|
7753
|
+
const names = [task.name];
|
|
7754
|
+
let current = task;
|
|
7755
|
+
while (current === null || current === void 0 ? void 0 : current.suite) {
|
|
7756
|
+
current = current.suite;
|
|
7757
|
+
if (current === null || current === void 0 ? void 0 : current.name) names.unshift(current.name);
|
|
7758
|
+
}
|
|
7759
|
+
if (current !== task.file) names.unshift(task.file.name);
|
|
7760
|
+
return names;
|
|
7761
|
+
}
|
|
7762
|
+
function getTestName(task, separator = " > ") {
|
|
7763
|
+
return getNames(task).slice(1).join(separator);
|
|
7764
|
+
}
|
|
7765
|
+
const now$1 = globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
|
|
7766
|
+
const unixNow = Date.now;
|
|
7767
|
+
const packs = /* @__PURE__ */ new Map();
|
|
7768
|
+
const eventsPacks = [];
|
|
7769
|
+
const pendingTasksUpdates = [];
|
|
7770
|
+
function sendTasksUpdate(runner$1) {
|
|
7771
|
+
if (packs.size) {
|
|
7772
|
+
var _runner$onTaskUpdate;
|
|
7773
|
+
const taskPacks = Array.from(packs).map(([id, task]) => {
|
|
7774
|
+
return [
|
|
7775
|
+
id,
|
|
7776
|
+
task[0],
|
|
7777
|
+
task[1]
|
|
7778
|
+
];
|
|
7779
|
+
});
|
|
7780
|
+
const p$1 = (_runner$onTaskUpdate = runner$1.onTaskUpdate) === null || _runner$onTaskUpdate === void 0 ? void 0 : _runner$onTaskUpdate.call(runner$1, taskPacks, eventsPacks);
|
|
7781
|
+
if (p$1) {
|
|
7782
|
+
pendingTasksUpdates.push(p$1);
|
|
7783
|
+
p$1.then(() => pendingTasksUpdates.splice(pendingTasksUpdates.indexOf(p$1), 1), () => {});
|
|
7784
|
+
}
|
|
7785
|
+
eventsPacks.length = 0;
|
|
7786
|
+
packs.clear();
|
|
7787
|
+
}
|
|
7788
|
+
}
|
|
7789
|
+
async function finishSendTasksUpdate(runner$1) {
|
|
7790
|
+
sendTasksUpdate(runner$1);
|
|
7791
|
+
await Promise.all(pendingTasksUpdates);
|
|
7792
|
+
}
|
|
7793
|
+
function throttle(fn, ms) {
|
|
7794
|
+
let last = 0;
|
|
7795
|
+
return function(...args) {
|
|
7796
|
+
const now$3 = unixNow();
|
|
7797
|
+
if (now$3 - last > ms) {
|
|
7798
|
+
last = now$3;
|
|
7799
|
+
return fn.apply(this, args);
|
|
7800
|
+
}
|
|
7801
|
+
};
|
|
7802
|
+
}
|
|
7803
|
+
const sendTasksUpdateThrottled = throttle(sendTasksUpdate, 100);
|
|
7804
|
+
const now = Date.now;
|
|
7713
7805
|
const collectorContext = {
|
|
7714
7806
|
tasks: [],
|
|
7715
7807
|
currentSuite: null
|
|
@@ -7724,11 +7816,11 @@ async function runWithSuite(suite$1, fn) {
|
|
|
7724
7816
|
await fn();
|
|
7725
7817
|
collectorContext.currentSuite = prev;
|
|
7726
7818
|
}
|
|
7727
|
-
function withTimeout(fn, timeout, isHook = false, stackTraceError) {
|
|
7819
|
+
function withTimeout(fn, timeout, isHook = false, stackTraceError, onTimeout) {
|
|
7728
7820
|
if (timeout <= 0 || timeout === Number.POSITIVE_INFINITY) return fn;
|
|
7729
7821
|
const { setTimeout, clearTimeout } = getSafeTimers();
|
|
7730
7822
|
return function runWithTimeout(...args) {
|
|
7731
|
-
const startTime = now
|
|
7823
|
+
const startTime = now();
|
|
7732
7824
|
const runner$1 = getRunner();
|
|
7733
7825
|
runner$1._currentTaskStartTime = startTime;
|
|
7734
7826
|
runner$1._currentTaskTimeout = timeout;
|
|
@@ -7740,13 +7832,15 @@ function withTimeout(fn, timeout, isHook = false, stackTraceError) {
|
|
|
7740
7832
|
}, timeout);
|
|
7741
7833
|
(_timer$unref = timer.unref) === null || _timer$unref === void 0 || _timer$unref.call(timer);
|
|
7742
7834
|
function rejectTimeoutError() {
|
|
7743
|
-
|
|
7835
|
+
const error = makeTimeoutError(isHook, timeout, stackTraceError);
|
|
7836
|
+
onTimeout === null || onTimeout === void 0 || onTimeout(args, error);
|
|
7837
|
+
reject_(error);
|
|
7744
7838
|
}
|
|
7745
7839
|
function resolve$1(result) {
|
|
7746
7840
|
runner$1._currentTaskStartTime = void 0;
|
|
7747
7841
|
runner$1._currentTaskTimeout = void 0;
|
|
7748
7842
|
clearTimeout(timer);
|
|
7749
|
-
if (now
|
|
7843
|
+
if (now() - startTime >= timeout) {
|
|
7750
7844
|
rejectTimeoutError();
|
|
7751
7845
|
return;
|
|
7752
7846
|
}
|
|
@@ -7768,11 +7862,25 @@ function withTimeout(fn, timeout, isHook = false, stackTraceError) {
|
|
|
7768
7862
|
});
|
|
7769
7863
|
};
|
|
7770
7864
|
}
|
|
7865
|
+
const abortControllers = /* @__PURE__ */ new WeakMap();
|
|
7866
|
+
function abortIfTimeout([context], error) {
|
|
7867
|
+
if (context) abortContextSignal(context, error);
|
|
7868
|
+
}
|
|
7869
|
+
function abortContextSignal(context, error) {
|
|
7870
|
+
const abortController = abortControllers.get(context);
|
|
7871
|
+
abortController === null || abortController === void 0 || abortController.abort(error);
|
|
7872
|
+
}
|
|
7771
7873
|
function createTestContext(test$7, runner$1) {
|
|
7772
7874
|
var _runner$extendTaskCon;
|
|
7773
7875
|
const context = function() {
|
|
7774
7876
|
throw new Error("done() callback is deprecated, use promise instead");
|
|
7775
7877
|
};
|
|
7878
|
+
let abortController = abortControllers.get(context);
|
|
7879
|
+
if (!abortController) {
|
|
7880
|
+
abortController = new AbortController();
|
|
7881
|
+
abortControllers.set(context, abortController);
|
|
7882
|
+
}
|
|
7883
|
+
context.signal = abortController.signal;
|
|
7776
7884
|
context.task = test$7;
|
|
7777
7885
|
context.skip = (condition, note) => {
|
|
7778
7886
|
if (condition === false) return void 0;
|
|
@@ -7780,13 +7888,46 @@ function createTestContext(test$7, runner$1) {
|
|
|
7780
7888
|
test$7.result.pending = true;
|
|
7781
7889
|
throw new PendingError("test is skipped; abort execution", test$7, typeof condition === "string" ? condition : note);
|
|
7782
7890
|
};
|
|
7891
|
+
async function annotate(message, location, type$1, attachment) {
|
|
7892
|
+
const annotation = {
|
|
7893
|
+
message,
|
|
7894
|
+
type: type$1 || "notice"
|
|
7895
|
+
};
|
|
7896
|
+
if (attachment) {
|
|
7897
|
+
if (!attachment.body && !attachment.path) throw new TypeError(`Test attachment requires body or path to be set. Both are missing.`);
|
|
7898
|
+
if (attachment.body && attachment.path) throw new TypeError(`Test attachment requires only one of "body" or "path" to be set. Both are specified.`);
|
|
7899
|
+
annotation.attachment = attachment;
|
|
7900
|
+
if (attachment.body instanceof Uint8Array) attachment.body = encodeUint8Array(attachment.body);
|
|
7901
|
+
}
|
|
7902
|
+
if (location) annotation.location = location;
|
|
7903
|
+
if (!runner$1.onTestAnnotate) throw new Error(`Test runner doesn't support test annotations.`);
|
|
7904
|
+
await finishSendTasksUpdate(runner$1);
|
|
7905
|
+
const resolvedAnnotation = await runner$1.onTestAnnotate(test$7, annotation);
|
|
7906
|
+
test$7.annotations.push(resolvedAnnotation);
|
|
7907
|
+
return resolvedAnnotation;
|
|
7908
|
+
}
|
|
7909
|
+
context.annotate = (message, type$1, attachment) => {
|
|
7910
|
+
if (test$7.result && test$7.result.state !== "run") throw new Error(`Cannot annotate tests outside of the test run. The test "${test$7.name}" finished running with the "${test$7.result.state}" state already.`);
|
|
7911
|
+
let location;
|
|
7912
|
+
const stack = new Error("STACK_TRACE").stack;
|
|
7913
|
+
const index$2 = stack.includes("STACK_TRACE") ? 2 : 1;
|
|
7914
|
+
const stackLine = stack.split("\n")[index$2];
|
|
7915
|
+
const parsed = parseSingleStack(stackLine);
|
|
7916
|
+
if (parsed) location = {
|
|
7917
|
+
file: parsed.file,
|
|
7918
|
+
line: parsed.line,
|
|
7919
|
+
column: parsed.column
|
|
7920
|
+
};
|
|
7921
|
+
if (typeof type$1 === "object") return recordAsyncAnnotation(test$7, annotate(message, location, void 0, type$1));
|
|
7922
|
+
else return recordAsyncAnnotation(test$7, annotate(message, location, type$1, attachment));
|
|
7923
|
+
};
|
|
7783
7924
|
context.onTestFailed = (handler, timeout) => {
|
|
7784
7925
|
test$7.onFailed || (test$7.onFailed = []);
|
|
7785
|
-
test$7.onFailed.push(withTimeout(handler, timeout ?? runner$1.config.hookTimeout, true, new Error("STACK_TRACE_ERROR")));
|
|
7926
|
+
test$7.onFailed.push(withTimeout(handler, timeout ?? runner$1.config.hookTimeout, true, new Error("STACK_TRACE_ERROR"), (_, error) => abortController.abort(error)));
|
|
7786
7927
|
};
|
|
7787
7928
|
context.onTestFinished = (handler, timeout) => {
|
|
7788
7929
|
test$7.onFinished || (test$7.onFinished = []);
|
|
7789
|
-
test$7.onFinished.push(withTimeout(handler, timeout ?? runner$1.config.hookTimeout, true, new Error("STACK_TRACE_ERROR")));
|
|
7930
|
+
test$7.onFinished.push(withTimeout(handler, timeout ?? runner$1.config.hookTimeout, true, new Error("STACK_TRACE_ERROR"), (_, error) => abortController.abort(error)));
|
|
7790
7931
|
};
|
|
7791
7932
|
return ((_runner$extendTaskCon = runner$1.extendTaskContext) === null || _runner$extendTaskCon === void 0 ? void 0 : _runner$extendTaskCon.call(runner$1, context)) || context;
|
|
7792
7933
|
}
|
|
@@ -7796,6 +7937,55 @@ function makeTimeoutError(isHook, timeout, stackTraceError) {
|
|
|
7796
7937
|
if (stackTraceError === null || stackTraceError === void 0 ? void 0 : stackTraceError.stack) error.stack = stackTraceError.stack.replace(error.message, stackTraceError.message);
|
|
7797
7938
|
return error;
|
|
7798
7939
|
}
|
|
7940
|
+
const fileContexts = /* @__PURE__ */ new WeakMap();
|
|
7941
|
+
function getFileContext(file) {
|
|
7942
|
+
const context = fileContexts.get(file);
|
|
7943
|
+
if (!context) throw new Error(`Cannot find file context for ${file.name}`);
|
|
7944
|
+
return context;
|
|
7945
|
+
}
|
|
7946
|
+
const table = [];
|
|
7947
|
+
for (let i = 65; i < 91; i++) table.push(String.fromCharCode(i));
|
|
7948
|
+
for (let i = 97; i < 123; i++) table.push(String.fromCharCode(i));
|
|
7949
|
+
for (let i = 0; i < 10; i++) table.push(i.toString(10));
|
|
7950
|
+
function encodeUint8Array(bytes) {
|
|
7951
|
+
let base64 = "";
|
|
7952
|
+
const len = bytes.byteLength;
|
|
7953
|
+
for (let i = 0; i < len; i += 3) if (len === i + 1) {
|
|
7954
|
+
const a$1 = (bytes[i] & 252) >> 2;
|
|
7955
|
+
const b = (bytes[i] & 3) << 4;
|
|
7956
|
+
base64 += table[a$1];
|
|
7957
|
+
base64 += table[b];
|
|
7958
|
+
base64 += "==";
|
|
7959
|
+
} else if (len === i + 2) {
|
|
7960
|
+
const a$1 = (bytes[i] & 252) >> 2;
|
|
7961
|
+
const b = (bytes[i] & 3) << 4 | (bytes[i + 1] & 240) >> 4;
|
|
7962
|
+
const c = (bytes[i + 1] & 15) << 2;
|
|
7963
|
+
base64 += table[a$1];
|
|
7964
|
+
base64 += table[b];
|
|
7965
|
+
base64 += table[c];
|
|
7966
|
+
base64 += "=";
|
|
7967
|
+
} else {
|
|
7968
|
+
const a$1 = (bytes[i] & 252) >> 2;
|
|
7969
|
+
const b = (bytes[i] & 3) << 4 | (bytes[i + 1] & 240) >> 4;
|
|
7970
|
+
const c = (bytes[i + 1] & 15) << 2 | (bytes[i + 2] & 192) >> 6;
|
|
7971
|
+
const d = bytes[i + 2] & 63;
|
|
7972
|
+
base64 += table[a$1];
|
|
7973
|
+
base64 += table[b];
|
|
7974
|
+
base64 += table[c];
|
|
7975
|
+
base64 += table[d];
|
|
7976
|
+
}
|
|
7977
|
+
return base64;
|
|
7978
|
+
}
|
|
7979
|
+
function recordAsyncAnnotation(test$7, promise) {
|
|
7980
|
+
promise = promise.finally(() => {
|
|
7981
|
+
if (!test$7.promises) return;
|
|
7982
|
+
const index$2 = test$7.promises.indexOf(promise);
|
|
7983
|
+
if (index$2 !== -1) test$7.promises.splice(index$2, 1);
|
|
7984
|
+
});
|
|
7985
|
+
if (!test$7.promises) test$7.promises = [];
|
|
7986
|
+
test$7.promises.push(promise);
|
|
7987
|
+
return promise;
|
|
7988
|
+
}
|
|
7799
7989
|
function getDefaultHookTimeout() {
|
|
7800
7990
|
return getRunner().config.hookTimeout;
|
|
7801
7991
|
}
|
|
@@ -7821,7 +8011,7 @@ const CLEANUP_STACK_TRACE_KEY = Symbol.for("VITEST_CLEANUP_STACK_TRACE");
|
|
|
7821
8011
|
*/
|
|
7822
8012
|
const onTestFailed = createTestHook("onTestFailed", (test$7, handler, timeout) => {
|
|
7823
8013
|
test$7.onFailed || (test$7.onFailed = []);
|
|
7824
|
-
test$7.onFailed.push(withTimeout(handler, timeout ?? getDefaultHookTimeout(), true, new Error("STACK_TRACE_ERROR")));
|
|
8014
|
+
test$7.onFailed.push(withTimeout(handler, timeout ?? getDefaultHookTimeout(), true, new Error("STACK_TRACE_ERROR"), abortIfTimeout));
|
|
7825
8015
|
});
|
|
7826
8016
|
/**
|
|
7827
8017
|
* Registers a callback function to be executed when the current test finishes, regardless of the outcome (pass or fail).
|
|
@@ -7848,7 +8038,7 @@ const onTestFailed = createTestHook("onTestFailed", (test$7, handler, timeout) =
|
|
|
7848
8038
|
*/
|
|
7849
8039
|
const onTestFinished = createTestHook("onTestFinished", (test$7, handler, timeout) => {
|
|
7850
8040
|
test$7.onFinished || (test$7.onFinished = []);
|
|
7851
|
-
test$7.onFinished.push(withTimeout(handler, timeout ?? getDefaultHookTimeout(), true, new Error("STACK_TRACE_ERROR")));
|
|
8041
|
+
test$7.onFinished.push(withTimeout(handler, timeout ?? getDefaultHookTimeout(), true, new Error("STACK_TRACE_ERROR"), abortIfTimeout));
|
|
7852
8042
|
});
|
|
7853
8043
|
function createTestHook(name, handler) {
|
|
7854
8044
|
return (fn, timeout) => {
|
|
@@ -7858,42 +8048,6 @@ function createTestHook(name, handler) {
|
|
|
7858
8048
|
return handler(current, fn, timeout);
|
|
7859
8049
|
};
|
|
7860
8050
|
}
|
|
7861
|
-
const now$1 = globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
|
|
7862
|
-
const now = globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
|
|
7863
|
-
const unixNow = Date.now;
|
|
7864
|
-
const packs = new Map();
|
|
7865
|
-
const eventsPacks = [];
|
|
7866
|
-
const pendingTasksUpdates = [];
|
|
7867
|
-
function sendTasksUpdate(runner$1) {
|
|
7868
|
-
if (packs.size) {
|
|
7869
|
-
var _runner$onTaskUpdate;
|
|
7870
|
-
const taskPacks = Array.from(packs).map(([id, task]) => {
|
|
7871
|
-
return [
|
|
7872
|
-
id,
|
|
7873
|
-
task[0],
|
|
7874
|
-
task[1]
|
|
7875
|
-
];
|
|
7876
|
-
});
|
|
7877
|
-
const p$1 = (_runner$onTaskUpdate = runner$1.onTaskUpdate) === null || _runner$onTaskUpdate === void 0 ? void 0 : _runner$onTaskUpdate.call(runner$1, taskPacks, eventsPacks);
|
|
7878
|
-
if (p$1) {
|
|
7879
|
-
pendingTasksUpdates.push(p$1);
|
|
7880
|
-
p$1.then(() => pendingTasksUpdates.splice(pendingTasksUpdates.indexOf(p$1), 1), () => {});
|
|
7881
|
-
}
|
|
7882
|
-
eventsPacks.length = 0;
|
|
7883
|
-
packs.clear();
|
|
7884
|
-
}
|
|
7885
|
-
}
|
|
7886
|
-
function throttle(fn, ms) {
|
|
7887
|
-
let last = 0;
|
|
7888
|
-
return function(...args) {
|
|
7889
|
-
const now$3 = unixNow();
|
|
7890
|
-
if (now$3 - last > ms) {
|
|
7891
|
-
last = now$3;
|
|
7892
|
-
return fn.apply(this, args);
|
|
7893
|
-
}
|
|
7894
|
-
};
|
|
7895
|
-
}
|
|
7896
|
-
const sendTasksUpdateThrottled = throttle(sendTasksUpdate, 100);
|
|
7897
8051
|
|
|
7898
8052
|
//#endregion
|
|
7899
8053
|
Object.defineProperty(exports, 'Assertion', {
|
|
@@ -7971,7 +8125,7 @@ Object.defineProperty(exports, 'getTestName', {
|
|
|
7971
8125
|
Object.defineProperty(exports, 'getType', {
|
|
7972
8126
|
enumerable: true,
|
|
7973
8127
|
get: function () {
|
|
7974
|
-
return getType
|
|
8128
|
+
return getType;
|
|
7975
8129
|
}
|
|
7976
8130
|
});
|
|
7977
8131
|
Object.defineProperty(exports, 'isObject', {
|
|
@@ -8040,4 +8194,4 @@ Object.defineProperty(exports, 'utils_exports', {
|
|
|
8040
8194
|
return utils_exports;
|
|
8041
8195
|
}
|
|
8042
8196
|
});
|
|
8043
|
-
//# sourceMappingURL=dist-
|
|
8197
|
+
//# sourceMappingURL=dist-BlIWGSIM.cjs.map
|