@sentry/mcp-server 0.10.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/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-J6VSRmQS.d.ts → client-Bxf4MxOz.d.cts} +7 -5
- package/dist/client-Bxf4MxOz.d.cts.map +1 -0
- package/dist/{client-Bz_PNC8o.js → client-D5xFZtxK.js} +14 -5
- package/dist/client-D5xFZtxK.js.map +1 -0
- package/dist/{client-tE6FD__9.d.cts → client-DOhBiaMJ.d.ts} +6 -4
- package/dist/client-DOhBiaMJ.d.ts.map +1 -0
- package/dist/{client-B4Ux5Zdg.cjs → client-GKHZSXgV.cjs} +14 -6
- 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-ggD6YRYR.js → formatting-BaARL2gT.js} +1 -1
- package/dist/{formatting-ggD6YRYR.js.map → formatting-BaARL2gT.js.map} +1 -1
- package/dist/{formatting-B0SJqiqX.cjs → formatting-C2kN0ok6.cjs} +1 -2
- package/dist/{formatting-B0SJqiqX.cjs.map → formatting-C2kN0ok6.cjs.map} +1 -1
- 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 +21 -25
- package/dist/internal/issue-helpers.test.cjs.map +1 -1
- package/dist/internal/issue-helpers.test.js +5 -8
- 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-pHRpPOpJ.cjs → promptDefinitions-D3ll3qCd.cjs} +3 -4
- package/dist/{promptDefinitions-pHRpPOpJ.cjs.map → promptDefinitions-D3ll3qCd.cjs.map} +1 -1
- package/dist/{promptDefinitions-BR7PxWcH.d.cts → promptDefinitions-DMucOchd.d.cts} +3 -3
- package/dist/promptDefinitions-DMucOchd.d.cts.map +1 -0
- package/dist/{promptDefinitions-tpKruPny.d.ts → promptDefinitions-H0q1_X-K.d.ts} +4 -4
- package/dist/promptDefinitions-H0q1_X-K.d.ts.map +1 -0
- package/dist/{promptDefinitions-DBNOeSg-.js → promptDefinitions-aKmUZWWO.js} +2 -2
- package/dist/{promptDefinitions-DBNOeSg-.js.map → promptDefinitions-aKmUZWWO.js.map} +1 -1
- 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 +4 -5
- package/dist/prompts.d.cts.map +1 -1
- package/dist/prompts.d.ts +4 -5
- 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-jk88gqOu.cjs → schema-B8lT632E.cjs} +2 -3
- package/dist/{schema-jk88gqOu.cjs.map → schema-B8lT632E.cjs.map} +1 -1
- package/dist/{schema-BKa41TQ4.js → schema-BkHf97d7.js} +1 -1
- package/dist/{schema-BKa41TQ4.js.map → schema-BkHf97d7.js.map} +1 -1
- package/dist/{schema-PvgLrC1b.d.cts → schema-C-MLkWMc.d.ts} +59 -24
- package/dist/schema-C-MLkWMc.d.ts.map +1 -0
- package/dist/{schema-Dltbjui7.js → schema-CewAKS9A.js} +11 -2
- package/dist/schema-CewAKS9A.js.map +1 -0
- package/dist/{schema-3VLYcf4D.cjs → schema-DkyWSqp_.cjs} +23 -3
- package/dist/schema-DkyWSqp_.cjs.map +1 -0
- package/dist/{schema-B7A-FyIi.d.ts → schema-DqxkW9Tx.d.cts} +59 -24
- package/dist/schema-DqxkW9Tx.d.cts.map +1 -0
- package/dist/schema.cjs +11 -11
- package/dist/schema.d.cts +1 -2
- package/dist/schema.d.cts.map +1 -1
- package/dist/schema.d.ts +1 -2
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -1
- package/dist/{server-VwFSUPQn.cjs → server-pGtEIwE3.cjs} +33 -27
- package/dist/server-pGtEIwE3.cjs.map +1 -0
- package/dist/{server-yb4PkNyo.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-DkU2-spy.js → stdio-D8u2W847.js} +2 -2
- package/dist/{stdio-DkU2-spy.js.map → stdio-D8u2W847.js.map} +1 -1
- package/dist/{stdio-65sYKLOk.cjs → stdio-DydB2Pxu.cjs} +3 -4
- package/dist/{stdio-65sYKLOk.cjs.map → stdio-DydB2Pxu.cjs.map} +1 -1
- package/dist/test-setup.cjs +233 -181
- package/dist/test-setup.cjs.map +1 -1
- package/dist/test-setup.js +233 -181
- package/dist/test-setup.js.map +1 -1
- package/dist/{toolDefinitions-Bb_1ejkl.js → toolDefinitions-BSC2D_S-.js} +14 -3
- package/dist/toolDefinitions-BSC2D_S-.js.map +1 -0
- package/dist/{toolDefinitions-DIhvw3vk.cjs → toolDefinitions-BtHN8t_d.cjs} +15 -5
- package/dist/toolDefinitions-BtHN8t_d.cjs.map +1 -0
- package/dist/{toolDefinitions-q_1-70fG.d.ts → toolDefinitions-Dp13BpEu.d.cts} +37 -5
- package/dist/toolDefinitions-Dp13BpEu.d.cts.map +1 -0
- package/dist/{toolDefinitions-B94CNDbt.d.cts → toolDefinitions-fQrpWznJ.d.ts} +36 -4
- 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-CMFpMPpD.js → tools-4Rtn4WEf.js} +27 -10
- package/dist/tools-4Rtn4WEf.js.map +1 -0
- package/dist/{tools-BdkmyaZo.cjs → tools-DHHqAqP9.cjs} +28 -12
- package/dist/tools-DHHqAqP9.cjs.map +1 -0
- package/dist/tools.cjs +10 -9
- package/dist/tools.d.cts +35 -6
- package/dist/tools.d.cts.map +1 -1
- package/dist/tools.d.ts +35 -6
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -8
- package/dist/tools.test.cjs +47 -32
- package/dist/tools.test.cjs.map +1 -1
- package/dist/tools.test.js +28 -12
- 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-OeoNXRm-.d.cts → types-CbLyQvVe.d.cts} +3 -4
- package/dist/types-CbLyQvVe.d.cts.map +1 -0
- package/dist/{types-CN4NEway.d.ts → types-CcffrLXB.d.cts} +5 -5
- package/dist/types-CcffrLXB.d.cts.map +1 -0
- package/dist/{types-jftb-CP9.d.ts → types-CfJ51LyL.d.ts} +3 -4
- package/dist/types-CfJ51LyL.d.ts.map +1 -0
- package/dist/{types-B03G337q.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-TjO7fHpC.js.map → version-BT9r_3jm.js.map} +1 -1
- package/dist/{version-CDnh7DyW.cjs → version-CRzAHHGZ.cjs} +2 -3
- package/dist/{version-CDnh7DyW.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-B4Ux5Zdg.cjs.map +0 -1
- package/dist/client-Bz_PNC8o.js.map +0 -1
- package/dist/client-J6VSRmQS.d.ts.map +0 -1
- package/dist/client-tE6FD__9.d.cts.map +0 -1
- package/dist/dist-BKh-M1A1.js.map +0 -1
- package/dist/dist-wiyJYfAH.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-BR7PxWcH.d.cts.map +0 -1
- package/dist/promptDefinitions-tpKruPny.d.ts.map +0 -1
- package/dist/schema-3VLYcf4D.cjs.map +0 -1
- package/dist/schema-B7A-FyIi.d.ts.map +0 -1
- package/dist/schema-Dltbjui7.js.map +0 -1
- package/dist/schema-PvgLrC1b.d.cts.map +0 -1
- package/dist/server-VwFSUPQn.cjs.map +0 -1
- package/dist/server-yb4PkNyo.js.map +0 -1
- package/dist/toolDefinitions-B94CNDbt.d.cts.map +0 -1
- package/dist/toolDefinitions-Bb_1ejkl.js.map +0 -1
- package/dist/toolDefinitions-DIhvw3vk.cjs.map +0 -1
- package/dist/toolDefinitions-q_1-70fG.d.ts.map +0 -1
- package/dist/tools-BdkmyaZo.cjs.map +0 -1
- package/dist/tools-CMFpMPpD.js.map +0 -1
- package/dist/types-B03G337q.d.cts.map +0 -1
- package/dist/types-CN4NEway.d.ts.map +0 -1
- package/dist/types-OeoNXRm-.d.cts.map +0 -1
- package/dist/types-jftb-CP9.d.ts.map +0 -1
- package/dist/version-TjO7fHpC.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,85 +1,131 @@
|
|
|
1
|
-
|
|
2
|
-
const require_dist = require('./dist-wiyJYfAH.cjs');
|
|
1
|
+
const require_dist = require('./dist-BlIWGSIM.cjs');
|
|
3
2
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/tinyspy@
|
|
5
|
-
function
|
|
6
|
-
if (!
|
|
7
|
-
}
|
|
8
|
-
function
|
|
9
|
-
return typeof
|
|
10
|
-
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
13
|
-
}
|
|
14
|
-
function
|
|
15
|
-
Object.defineProperty(
|
|
16
|
-
}
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
3
|
+
//#region ../../node_modules/.pnpm/tinyspy@4.0.3/node_modules/tinyspy/dist/index.js
|
|
4
|
+
function assert$1(condition, message) {
|
|
5
|
+
if (!condition) throw new Error(message);
|
|
6
|
+
}
|
|
7
|
+
function isType(type, value) {
|
|
8
|
+
return typeof value === type;
|
|
9
|
+
}
|
|
10
|
+
function isPromise(value) {
|
|
11
|
+
return value instanceof Promise;
|
|
12
|
+
}
|
|
13
|
+
function define(obj, key, descriptor) {
|
|
14
|
+
Object.defineProperty(obj, key, descriptor);
|
|
15
|
+
}
|
|
16
|
+
function defineValue(obj, key, value) {
|
|
17
|
+
define(obj, key, {
|
|
18
|
+
value,
|
|
19
|
+
configurable: !0,
|
|
20
|
+
writable: !0
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
var SYMBOL_STATE = Symbol.for("tinyspy:spy");
|
|
24
|
+
var spies = /* @__PURE__ */ new Set(), reset = (state) => {
|
|
25
|
+
state.called = !1, state.callCount = 0, state.calls = [], state.results = [], state.resolves = [], state.next = [];
|
|
26
|
+
}, defineState = (spy2) => (define(spy2, SYMBOL_STATE, { value: { reset: () => reset(spy2[SYMBOL_STATE]) } }), spy2[SYMBOL_STATE]), getInternalState = (spy2) => spy2[SYMBOL_STATE] || defineState(spy2);
|
|
27
|
+
function createInternalSpy(cb) {
|
|
28
|
+
assert$1(isType("function", cb) || isType("undefined", cb), "cannot spy on a non-function value");
|
|
29
|
+
let fn$1 = function(...args) {
|
|
30
|
+
let state2 = getInternalState(fn$1);
|
|
31
|
+
state2.called = !0, state2.callCount++, state2.calls.push(args);
|
|
32
|
+
let next = state2.next.shift();
|
|
33
|
+
if (next) {
|
|
34
|
+
state2.results.push(next);
|
|
35
|
+
let [type2, result2] = next;
|
|
36
|
+
if (type2 === "ok") return result2;
|
|
37
|
+
throw result2;
|
|
35
38
|
}
|
|
36
|
-
let
|
|
37
|
-
if (
|
|
38
|
-
new.target ?
|
|
39
|
-
} catch (
|
|
40
|
-
throw
|
|
39
|
+
let result, type = "ok", resultIndex = state2.results.length;
|
|
40
|
+
if (state2.impl) try {
|
|
41
|
+
new.target ? result = Reflect.construct(state2.impl, args, new.target) : result = state2.impl.apply(this, args), type = "ok";
|
|
42
|
+
} catch (err) {
|
|
43
|
+
throw result = err, type = "error", state2.results.push([type, err]), err;
|
|
41
44
|
}
|
|
42
|
-
let
|
|
43
|
-
return
|
|
45
|
+
let resultTuple = [type, result];
|
|
46
|
+
return isPromise(result) && result.then((r) => state2.resolves[resultIndex] = ["ok", r], (e) => state2.resolves[resultIndex] = ["error", e]), state2.results.push(resultTuple), result;
|
|
44
47
|
};
|
|
45
|
-
|
|
46
|
-
let
|
|
47
|
-
return
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
defineValue(fn$1, "_isMockFunction", !0), defineValue(fn$1, "length", cb ? cb.length : 0), defineValue(fn$1, "name", cb && cb.name || "spy");
|
|
49
|
+
let state = getInternalState(fn$1);
|
|
50
|
+
return state.reset(), state.impl = cb, fn$1;
|
|
51
|
+
}
|
|
52
|
+
function isMockFunction$1(obj) {
|
|
53
|
+
return !!obj && obj._isMockFunction === !0;
|
|
54
|
+
}
|
|
55
|
+
var getDescriptor$1 = (obj, method) => {
|
|
56
|
+
let objDescriptor = Object.getOwnPropertyDescriptor(obj, method);
|
|
57
|
+
if (objDescriptor) return [obj, objDescriptor];
|
|
58
|
+
let currentProto = Object.getPrototypeOf(obj);
|
|
59
|
+
for (; currentProto !== null;) {
|
|
60
|
+
let descriptor = Object.getOwnPropertyDescriptor(currentProto, method);
|
|
61
|
+
if (descriptor) return [currentProto, descriptor];
|
|
62
|
+
currentProto = Object.getPrototypeOf(currentProto);
|
|
63
|
+
}
|
|
64
|
+
}, setPototype = (fn$1, val) => {
|
|
65
|
+
val != null && typeof val == "function" && val.prototype != null && Object.setPrototypeOf(fn$1.prototype, val.prototype);
|
|
51
66
|
};
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
let [
|
|
55
|
-
if (!
|
|
56
|
-
if ("getter" in
|
|
57
|
-
if ("getter" in
|
|
58
|
-
if ("setter" in
|
|
67
|
+
function internalSpyOn(obj, methodName, mock) {
|
|
68
|
+
assert$1(!isType("undefined", obj), "spyOn could not find an object to spy upon"), assert$1(isType("object", obj) || isType("function", obj), "cannot spyOn on a primitive value");
|
|
69
|
+
let [accessName, accessType] = (() => {
|
|
70
|
+
if (!isType("object", methodName)) return [methodName, "value"];
|
|
71
|
+
if ("getter" in methodName && "setter" in methodName) throw new Error("cannot spy on both getter and setter");
|
|
72
|
+
if ("getter" in methodName) return [methodName.getter, "get"];
|
|
73
|
+
if ("setter" in methodName) return [methodName.setter, "set"];
|
|
59
74
|
throw new Error("specify getter or setter to spy on");
|
|
60
|
-
})(),
|
|
61
|
-
|
|
62
|
-
let
|
|
63
|
-
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
let
|
|
67
|
-
let { value
|
|
75
|
+
})(), [originalDescriptorObject, originalDescriptor] = getDescriptor$1(obj, accessName) || [];
|
|
76
|
+
assert$1(originalDescriptor || accessName in obj, `${String(accessName)} does not exist`);
|
|
77
|
+
let ssr = !1;
|
|
78
|
+
accessType === "value" && originalDescriptor && !originalDescriptor.value && originalDescriptor.get && (accessType = "get", ssr = !0, mock = originalDescriptor.get());
|
|
79
|
+
let original;
|
|
80
|
+
originalDescriptor ? original = originalDescriptor[accessType] : accessType !== "value" ? original = () => obj[accessName] : original = obj[accessName], original && isSpyFunction(original) && (original = original[SYMBOL_STATE].getOriginal());
|
|
81
|
+
let reassign = (cb) => {
|
|
82
|
+
let { value,...desc } = originalDescriptor || {
|
|
68
83
|
configurable: !0,
|
|
69
84
|
writable: !0
|
|
70
85
|
};
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
let
|
|
77
|
-
|
|
86
|
+
accessType !== "value" && delete desc.writable, desc[accessType] = cb, define(obj, accessName, desc);
|
|
87
|
+
}, restore = () => {
|
|
88
|
+
originalDescriptorObject !== obj ? Reflect.deleteProperty(obj, accessName) : originalDescriptor && !original ? define(obj, accessName, originalDescriptor) : reassign(original);
|
|
89
|
+
};
|
|
90
|
+
mock || (mock = original);
|
|
91
|
+
let spy2 = wrap(createInternalSpy(mock), mock);
|
|
92
|
+
accessType === "value" && setPototype(spy2, original);
|
|
93
|
+
let state = spy2[SYMBOL_STATE];
|
|
94
|
+
return defineValue(state, "restore", restore), defineValue(state, "getOriginal", () => ssr ? original() : original), defineValue(state, "willCall", (newCb) => (state.impl = newCb, spy2)), reassign(ssr ? () => (setPototype(spy2, mock), spy2) : spy2), spies.add(spy2), spy2;
|
|
95
|
+
}
|
|
96
|
+
var ignoreProperties = /* @__PURE__ */ new Set([
|
|
97
|
+
"length",
|
|
98
|
+
"name",
|
|
99
|
+
"prototype"
|
|
100
|
+
]);
|
|
101
|
+
function getAllProperties(original) {
|
|
102
|
+
let properties = /* @__PURE__ */ new Set(), descriptors2 = {};
|
|
103
|
+
for (; original && original !== Object.prototype && original !== Function.prototype;) {
|
|
104
|
+
let ownProperties = [...Object.getOwnPropertyNames(original), ...Object.getOwnPropertySymbols(original)];
|
|
105
|
+
for (let prop of ownProperties) descriptors2[prop] || ignoreProperties.has(prop) || (properties.add(prop), descriptors2[prop] = Object.getOwnPropertyDescriptor(original, prop));
|
|
106
|
+
original = Object.getPrototypeOf(original);
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
properties,
|
|
110
|
+
descriptors: descriptors2
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function wrap(mock, original) {
|
|
114
|
+
if (!original || SYMBOL_STATE in original) return mock;
|
|
115
|
+
let { properties, descriptors: descriptors2 } = getAllProperties(original);
|
|
116
|
+
for (let key of properties) {
|
|
117
|
+
let descriptor = descriptors2[key];
|
|
118
|
+
getDescriptor$1(mock, key) || define(mock, key, descriptor);
|
|
119
|
+
}
|
|
120
|
+
return mock;
|
|
121
|
+
}
|
|
122
|
+
function isSpyFunction(obj) {
|
|
123
|
+
return isMockFunction$1(obj) && "getOriginal" in obj[SYMBOL_STATE];
|
|
78
124
|
}
|
|
79
125
|
|
|
80
126
|
//#endregion
|
|
81
|
-
//#region ../../node_modules/.pnpm/@vitest+spy@3.
|
|
82
|
-
const mocks = new Set();
|
|
127
|
+
//#region ../../node_modules/.pnpm/@vitest+spy@3.2.0/node_modules/@vitest/spy/dist/index.js
|
|
128
|
+
const mocks = /* @__PURE__ */ new Set();
|
|
83
129
|
function isMockFunction(fn$1) {
|
|
84
130
|
return typeof fn$1 === "function" && "_isMockFunction" in fn$1 && fn$1._isMockFunction;
|
|
85
131
|
}
|
|
@@ -89,17 +135,25 @@ function spyOn(obj, method, accessType) {
|
|
|
89
135
|
set: "setter"
|
|
90
136
|
};
|
|
91
137
|
const objMethod = accessType ? { [dictionary[accessType]]: method } : method;
|
|
92
|
-
|
|
93
|
-
|
|
138
|
+
let state;
|
|
139
|
+
const descriptor = getDescriptor(obj, method);
|
|
140
|
+
const fn$1 = descriptor && descriptor[accessType || "value"];
|
|
141
|
+
if (isMockFunction(fn$1)) state = fn$1.mock._state();
|
|
142
|
+
const stub = internalSpyOn(obj, objMethod);
|
|
143
|
+
const spy = enhanceSpy(stub);
|
|
144
|
+
if (state) spy.mock._state(state);
|
|
145
|
+
return spy;
|
|
94
146
|
}
|
|
95
147
|
let callOrder = 0;
|
|
96
148
|
function enhanceSpy(spy) {
|
|
97
149
|
const stub = spy;
|
|
98
150
|
let implementation;
|
|
151
|
+
let onceImplementations = [];
|
|
152
|
+
let implementationChangedTemporarily = false;
|
|
99
153
|
let instances = [];
|
|
100
154
|
let contexts = [];
|
|
101
155
|
let invocations = [];
|
|
102
|
-
const state =
|
|
156
|
+
const state = getInternalState(spy);
|
|
103
157
|
const mockContext = {
|
|
104
158
|
get calls() {
|
|
105
159
|
return state.calls;
|
|
@@ -133,10 +187,20 @@ function enhanceSpy(spy) {
|
|
|
133
187
|
},
|
|
134
188
|
get lastCall() {
|
|
135
189
|
return state.calls[state.calls.length - 1];
|
|
190
|
+
},
|
|
191
|
+
_state(state$1) {
|
|
192
|
+
if (state$1) {
|
|
193
|
+
implementation = state$1.implementation;
|
|
194
|
+
onceImplementations = state$1.onceImplementations;
|
|
195
|
+
implementationChangedTemporarily = state$1.implementationChangedTemporarily;
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
implementation,
|
|
199
|
+
onceImplementations,
|
|
200
|
+
implementationChangedTemporarily
|
|
201
|
+
};
|
|
136
202
|
}
|
|
137
203
|
};
|
|
138
|
-
let onceImplementations = [];
|
|
139
|
-
let implementationChangedTemporarily = false;
|
|
140
204
|
function mockCall(...args) {
|
|
141
205
|
instances.push(this);
|
|
142
206
|
contexts.push(this);
|
|
@@ -168,6 +232,7 @@ function enhanceSpy(spy) {
|
|
|
168
232
|
state.restore();
|
|
169
233
|
return stub;
|
|
170
234
|
};
|
|
235
|
+
if (Symbol.dispose) stub[Symbol.dispose] = () => stub.mockRestore();
|
|
171
236
|
stub.getMockImplementation = () => implementationChangedTemporarily ? implementation : onceImplementations.at(0) || implementation;
|
|
172
237
|
stub.mockImplementation = (fn$1) => {
|
|
173
238
|
implementation = fn$1;
|
|
@@ -183,16 +248,16 @@ function enhanceSpy(spy) {
|
|
|
183
248
|
implementation = fn$1;
|
|
184
249
|
state.willCall(mockCall);
|
|
185
250
|
implementationChangedTemporarily = true;
|
|
186
|
-
const reset = () => {
|
|
251
|
+
const reset$1 = () => {
|
|
187
252
|
implementation = originalImplementation;
|
|
188
253
|
implementationChangedTemporarily = false;
|
|
189
254
|
};
|
|
190
255
|
const result = cb();
|
|
191
|
-
if (result
|
|
192
|
-
reset();
|
|
256
|
+
if (typeof result === "object" && result && typeof result.then === "function") return result.then(() => {
|
|
257
|
+
reset$1();
|
|
193
258
|
return stub;
|
|
194
259
|
});
|
|
195
|
-
reset();
|
|
260
|
+
reset$1();
|
|
196
261
|
return stub;
|
|
197
262
|
}
|
|
198
263
|
stub.withImplementation = withImplementation;
|
|
@@ -211,13 +276,23 @@ function enhanceSpy(spy) {
|
|
|
211
276
|
return stub;
|
|
212
277
|
}
|
|
213
278
|
function fn(implementation) {
|
|
214
|
-
const enhancedSpy = enhanceSpy(
|
|
279
|
+
const enhancedSpy = enhanceSpy(internalSpyOn({ spy: implementation || function() {} }, "spy"));
|
|
215
280
|
if (implementation) enhancedSpy.mockImplementation(implementation);
|
|
216
281
|
return enhancedSpy;
|
|
217
282
|
}
|
|
283
|
+
function getDescriptor(obj, method) {
|
|
284
|
+
const objDescriptor = Object.getOwnPropertyDescriptor(obj, method);
|
|
285
|
+
if (objDescriptor) return objDescriptor;
|
|
286
|
+
let currentProto = Object.getPrototypeOf(obj);
|
|
287
|
+
while (currentProto !== null) {
|
|
288
|
+
const descriptor = Object.getOwnPropertyDescriptor(currentProto, method);
|
|
289
|
+
if (descriptor) return descriptor;
|
|
290
|
+
currentProto = Object.getPrototypeOf(currentProto);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
218
293
|
|
|
219
294
|
//#endregion
|
|
220
|
-
//#region ../../node_modules/.pnpm/@vitest+expect@3.
|
|
295
|
+
//#region ../../node_modules/.pnpm/@vitest+expect@3.2.0/node_modules/@vitest/expect/dist/index.js
|
|
221
296
|
const MATCHERS_OBJECT = Symbol.for("matchers-object");
|
|
222
297
|
const JEST_MATCHERS_OBJECT = Symbol.for("$$jest-matchers-object");
|
|
223
298
|
const GLOBAL_EXPECT = Symbol.for("expect-global");
|
|
@@ -383,6 +458,14 @@ function eq(a$1, b, aStack, bStack, customTesters, hasKey$1) {
|
|
|
383
458
|
return numA === numB || Number.isNaN(numA) && Number.isNaN(numB);
|
|
384
459
|
}
|
|
385
460
|
case "[object RegExp]": return a$1.source === b.source && a$1.flags === b.flags;
|
|
461
|
+
case "[object Temporal.Instant]":
|
|
462
|
+
case "[object Temporal.ZonedDateTime]":
|
|
463
|
+
case "[object Temporal.PlainDateTime]":
|
|
464
|
+
case "[object Temporal.PlainDate]":
|
|
465
|
+
case "[object Temporal.PlainTime]":
|
|
466
|
+
case "[object Temporal.PlainYearMonth]":
|
|
467
|
+
case "[object Temporal.PlainMonthDay]": return a$1.equals(b);
|
|
468
|
+
case "[object Temporal.Duration]": return a$1.toString() === b.toString();
|
|
386
469
|
}
|
|
387
470
|
if (typeof a$1 !== "object" || typeof b !== "object") return false;
|
|
388
471
|
if (isDomNode(a$1) && isDomNode(b)) return a$1.isEqualNode(b);
|
|
@@ -530,7 +613,7 @@ function iterableEquality(a$1, b, customTesters = [], aStack = [], bStack = [])
|
|
|
530
613
|
if (!isImmutableList(a$1) && !isImmutableOrderedKeyed(a$1) && !isImmutableOrderedSet(a$1) && !isImmutableRecord(a$1)) {
|
|
531
614
|
const aEntries = Object.entries(a$1);
|
|
532
615
|
const bEntries = Object.entries(b);
|
|
533
|
-
if (!equals(aEntries, bEntries)) return false;
|
|
616
|
+
if (!equals(aEntries, bEntries, filteredCustomTesters)) return false;
|
|
534
617
|
}
|
|
535
618
|
aStack.pop();
|
|
536
619
|
bStack.pop();
|
|
@@ -549,7 +632,7 @@ function isObjectWithKeys(a$1) {
|
|
|
549
632
|
}
|
|
550
633
|
function subsetEquality(object$1, subset, customTesters = []) {
|
|
551
634
|
const filteredCustomTesters = customTesters.filter((t) => t !== subsetEquality);
|
|
552
|
-
const subsetEqualityWithContext = (seenReferences = new WeakMap()) => (object$2, subset$1) => {
|
|
635
|
+
const subsetEqualityWithContext = (seenReferences = /* @__PURE__ */ new WeakMap()) => (object$2, subset$1) => {
|
|
553
636
|
if (!isObjectWithKeys(subset$1)) return void 0;
|
|
554
637
|
return Object.keys(subset$1).every((key) => {
|
|
555
638
|
if (subset$1[key] != null && typeof subset$1[key] === "object") {
|
|
@@ -606,7 +689,7 @@ function getObjectKeys(object$1) {
|
|
|
606
689
|
}
|
|
607
690
|
function getObjectSubset(object$1, subset, customTesters) {
|
|
608
691
|
let stripped = 0;
|
|
609
|
-
const getObjectSubsetWithContext = (seenReferences = new WeakMap()) => (object$2, subset$1) => {
|
|
692
|
+
const getObjectSubsetWithContext = (seenReferences = /* @__PURE__ */ new WeakMap()) => (object$2, subset$1) => {
|
|
610
693
|
if (Array.isArray(object$2)) {
|
|
611
694
|
if (Array.isArray(subset$1) && subset$1.length === object$2.length) return subset$1.map((sub, i) => getObjectSubsetWithContext(seenReferences)(object$2[i], sub));
|
|
612
695
|
} else if (object$2 instanceof Date) return object$2;
|
|
@@ -638,7 +721,7 @@ function getObjectSubset(object$1, subset, customTesters) {
|
|
|
638
721
|
};
|
|
639
722
|
}
|
|
640
723
|
if (!Object.prototype.hasOwnProperty.call(globalThis, MATCHERS_OBJECT)) {
|
|
641
|
-
const globalState = new WeakMap();
|
|
724
|
+
const globalState = /* @__PURE__ */ new WeakMap();
|
|
642
725
|
const matchers = Object.create(null);
|
|
643
726
|
const customEqualityTesters = [];
|
|
644
727
|
const asymmetricMatchers = Object.create(null);
|
|
@@ -947,8 +1030,8 @@ const JestChaiExpect = (chai$1, utils) => {
|
|
|
947
1030
|
"throw",
|
|
948
1031
|
"throws",
|
|
949
1032
|
"Throw"
|
|
950
|
-
].forEach((m
|
|
951
|
-
utils.overwriteMethod(chai$1.Assertion.prototype, m
|
|
1033
|
+
].forEach((m) => {
|
|
1034
|
+
utils.overwriteMethod(chai$1.Assertion.prototype, m, (_super) => {
|
|
952
1035
|
return function(...args) {
|
|
953
1036
|
const promise = utils.flag(this, "promise");
|
|
954
1037
|
const object$1 = utils.flag(this, "object");
|
|
@@ -1093,7 +1176,7 @@ const JestChaiExpect = (chai$1, utils) => {
|
|
|
1093
1176
|
});
|
|
1094
1177
|
def("toBeNaN", function() {
|
|
1095
1178
|
const obj = utils.flag(this, "object");
|
|
1096
|
-
this.assert(Number.isNaN(obj), "expected #{this} to be NaN", "expected #{this} not to be NaN",
|
|
1179
|
+
this.assert(Number.isNaN(obj), "expected #{this} to be NaN", "expected #{this} not to be NaN", NaN, obj);
|
|
1097
1180
|
});
|
|
1098
1181
|
def("toBeUndefined", function() {
|
|
1099
1182
|
const obj = utils.flag(this, "object");
|
|
@@ -1367,14 +1450,7 @@ const JestChaiExpect = (chai$1, utils) => {
|
|
|
1367
1450
|
const results = action === "return" ? spy.mock.results : spy.mock.settledResults;
|
|
1368
1451
|
const result = results[results.length - 1];
|
|
1369
1452
|
const spyName = spy.getMockName();
|
|
1370
|
-
this.assert(
|
|
1371
|
-
condition(spy, value),
|
|
1372
|
-
`expected last "${spyName}" call to ${action} #{exp}`,
|
|
1373
|
-
`expected last "${spyName}" call to not ${action} #{exp}`,
|
|
1374
|
-
value,
|
|
1375
|
-
// for jest compat
|
|
1376
|
-
result === null || result === void 0 ? void 0 : result.value
|
|
1377
|
-
);
|
|
1453
|
+
this.assert(condition(spy, value), `expected last "${spyName}" call to ${action} #{exp}`, `expected last "${spyName}" call to not ${action} #{exp}`, value, result === null || result === void 0 ? void 0 : result.value);
|
|
1378
1454
|
});
|
|
1379
1455
|
});
|
|
1380
1456
|
[{
|
|
@@ -1466,10 +1542,10 @@ const JestChaiExpect = (chai$1, utils) => {
|
|
|
1466
1542
|
};
|
|
1467
1543
|
function ordinalOf(i) {
|
|
1468
1544
|
const j = i % 10;
|
|
1469
|
-
const k
|
|
1470
|
-
if (j === 1 && k
|
|
1471
|
-
if (j === 2 && k
|
|
1472
|
-
if (j === 3 && k
|
|
1545
|
+
const k = i % 100;
|
|
1546
|
+
if (j === 1 && k !== 11) return `${i}st`;
|
|
1547
|
+
if (j === 2 && k !== 12) return `${i}nd`;
|
|
1548
|
+
if (j === 3 && k !== 13) return `${i}rd`;
|
|
1473
1549
|
return `${i}th`;
|
|
1474
1550
|
}
|
|
1475
1551
|
function formatCalls(spy, msg, showActualCall) {
|
|
@@ -1602,7 +1678,7 @@ function cwd() {
|
|
|
1602
1678
|
if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
|
|
1603
1679
|
return "/";
|
|
1604
1680
|
}
|
|
1605
|
-
const resolve
|
|
1681
|
+
const resolve = function(...arguments_) {
|
|
1606
1682
|
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
1607
1683
|
let resolvedPath = "";
|
|
1608
1684
|
let resolvedAbsolute = false;
|
|
@@ -1671,7 +1747,7 @@ const isAbsolute = function(p$1) {
|
|
|
1671
1747
|
};
|
|
1672
1748
|
|
|
1673
1749
|
//#endregion
|
|
1674
|
-
//#region ../../node_modules/.pnpm/vitest@3.
|
|
1750
|
+
//#region ../../node_modules/.pnpm/vitest@3.2.0_@types+node@22.15.29_jiti@2.4.2_lightningcss@1.30.1_msw@2.8.7_@types+node@_9eeb862be92f04c38a20bffaf3a72b73/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js
|
|
1675
1751
|
const NAME_WORKER_STATE = "__vitest_worker__";
|
|
1676
1752
|
function getWorkerState() {
|
|
1677
1753
|
const workerState = globalThis[NAME_WORKER_STATE];
|
|
@@ -1720,14 +1796,14 @@ async function waitForImportsToResolve() {
|
|
|
1720
1796
|
}
|
|
1721
1797
|
|
|
1722
1798
|
//#endregion
|
|
1723
|
-
//#region ../../node_modules/.pnpm/vitest@3.
|
|
1799
|
+
//#region ../../node_modules/.pnpm/vitest@3.2.0_@types+node@22.15.29_jiti@2.4.2_lightningcss@1.30.1_msw@2.8.7_@types+node@_9eeb862be92f04c38a20bffaf3a72b73/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
|
|
1724
1800
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
1725
|
-
function getDefaultExportFromCjs
|
|
1726
|
-
return x
|
|
1801
|
+
function getDefaultExportFromCjs(x) {
|
|
1802
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
1727
1803
|
}
|
|
1728
1804
|
|
|
1729
1805
|
//#endregion
|
|
1730
|
-
//#region ../../node_modules/.pnpm/@vitest+snapshot@3.
|
|
1806
|
+
//#region ../../node_modules/.pnpm/@vitest+snapshot@3.2.0/node_modules/@vitest/snapshot/dist/index.js
|
|
1731
1807
|
const comma = ",".charCodeAt(0);
|
|
1732
1808
|
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1733
1809
|
const intToChar = new Uint8Array(64);
|
|
@@ -2000,7 +2076,7 @@ function resolve$1(input, base) {
|
|
|
2000
2076
|
default: return url.scheme + "//" + url.user + url.host + url.port + url.path + queryHash;
|
|
2001
2077
|
}
|
|
2002
2078
|
}
|
|
2003
|
-
function resolve(input, base) {
|
|
2079
|
+
function resolve$2(input, base) {
|
|
2004
2080
|
if (base && !base.endsWith("/")) base += "/";
|
|
2005
2081
|
return resolve$1(input, base);
|
|
2006
2082
|
}
|
|
@@ -2122,8 +2198,8 @@ var TraceMap = class {
|
|
|
2122
2198
|
this.sources = sources;
|
|
2123
2199
|
this.sourcesContent = sourcesContent;
|
|
2124
2200
|
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
|
|
2125
|
-
const from = resolve(sourceRoot || "", stripFilename(mapUrl));
|
|
2126
|
-
this.resolvedSources = sources.map((s) => resolve(s || "", from));
|
|
2201
|
+
const from = resolve$2(sourceRoot || "", stripFilename(mapUrl));
|
|
2202
|
+
this.resolvedSources = sources.map((s) => resolve$2(s || "", from));
|
|
2127
2203
|
const { mappings } = parsed;
|
|
2128
2204
|
if (typeof mappings === "string") {
|
|
2129
2205
|
this._encoded = mappings;
|
|
@@ -2307,7 +2383,7 @@ function parseSingleV8Stack(raw) {
|
|
|
2307
2383
|
if (!file || !lineNumber || !columnNumber) return null;
|
|
2308
2384
|
if (method.startsWith("async ")) method = method.slice(6);
|
|
2309
2385
|
if (file.startsWith("file://")) file = file.slice(7);
|
|
2310
|
-
file = file.startsWith("node:") || file.startsWith("internal:") ? file : resolve
|
|
2386
|
+
file = file.startsWith("node:") || file.startsWith("internal:") ? file : resolve(file);
|
|
2311
2387
|
if (method) method = method.replace(/__vite_ssr_import_\d+__\./g, "");
|
|
2312
2388
|
return {
|
|
2313
2389
|
method,
|
|
@@ -2331,6 +2407,7 @@ function parseStacktrace(stack, options = {}) {
|
|
|
2331
2407
|
const fileUrl = stack$1.file.startsWith("file://") ? stack$1.file : `file://${stack$1.file}`;
|
|
2332
2408
|
const sourceRootUrl = map$1.sourceRoot ? new URL(map$1.sourceRoot, fileUrl) : fileUrl;
|
|
2333
2409
|
file = new URL(source, sourceRootUrl).pathname;
|
|
2410
|
+
if (file.match(/\/\w:\//)) file = file.slice(1);
|
|
2334
2411
|
}
|
|
2335
2412
|
if (shouldFilter(ignoreStackEntries, file)) return null;
|
|
2336
2413
|
if (line != null && column != null) return {
|
|
@@ -2354,14 +2431,14 @@ function parseV8Stacktrace(stack) {
|
|
|
2354
2431
|
function parseErrorStacktrace(e, options = {}) {
|
|
2355
2432
|
if (!e || isPrimitive(e)) return [];
|
|
2356
2433
|
if (e.stacks) return e.stacks;
|
|
2357
|
-
const stackStr = e.stack ||
|
|
2358
|
-
let stackFrames = parseStacktrace(stackStr, options);
|
|
2434
|
+
const stackStr = e.stack || "";
|
|
2435
|
+
let stackFrames = typeof stackStr === "string" ? parseStacktrace(stackStr, options) : [];
|
|
2359
2436
|
if (!stackFrames.length) {
|
|
2360
2437
|
const e_ = e;
|
|
2361
2438
|
if (e_.fileName != null && e_.lineNumber != null && e_.columnNumber != null) stackFrames = parseStacktrace(`${e_.fileName}:${e_.lineNumber}:${e_.columnNumber}`, options);
|
|
2362
2439
|
if (e_.sourceURL != null && e_.line != null && e_._column != null) stackFrames = parseStacktrace(`${e_.sourceURL}:${e_.line}:${e_.column}`, options);
|
|
2363
2440
|
}
|
|
2364
|
-
if (options.frameFilter) stackFrames = stackFrames.filter((f$
|
|
2441
|
+
if (options.frameFilter) stackFrames = stackFrames.filter((f$1) => options.frameFilter(e, f$1) !== false);
|
|
2365
2442
|
e.stacks = stackFrames;
|
|
2366
2443
|
return stackFrames;
|
|
2367
2444
|
}
|
|
@@ -2382,8 +2459,8 @@ try {
|
|
|
2382
2459
|
nodeInspect = false;
|
|
2383
2460
|
}
|
|
2384
2461
|
const { AsymmetricMatcher: AsymmetricMatcher$1, DOMCollection: DOMCollection$1, DOMElement: DOMElement$1, Immutable: Immutable$1, ReactElement: ReactElement$1, ReactTestComponent: ReactTestComponent$1 } = require_dist.plugins;
|
|
2385
|
-
function getDefaultExportFromCjs(x
|
|
2386
|
-
return x
|
|
2462
|
+
function getDefaultExportFromCjs$1(x) {
|
|
2463
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
2387
2464
|
}
|
|
2388
2465
|
var jsTokens_1;
|
|
2389
2466
|
var hasRequiredJsTokens;
|
|
@@ -2875,20 +2952,20 @@ function C(n = false) {
|
|
|
2875
2952
|
}
|
|
2876
2953
|
function p(n = false) {
|
|
2877
2954
|
let e = C(n), i = (r, t, c, o) => {
|
|
2878
|
-
let l
|
|
2955
|
+
let l = "", s = 0;
|
|
2879
2956
|
do
|
|
2880
|
-
l
|
|
2957
|
+
l += r.substring(s, o) + c, s = o + t.length, o = r.indexOf(t, s);
|
|
2881
2958
|
while (~o);
|
|
2882
|
-
return l
|
|
2959
|
+
return l + r.substring(s);
|
|
2883
2960
|
}, g = (r, t, c = r) => {
|
|
2884
|
-
let o = (l
|
|
2885
|
-
let s = String(l
|
|
2961
|
+
let o = (l) => {
|
|
2962
|
+
let s = String(l), b = s.indexOf(t, r.length);
|
|
2886
2963
|
return ~b ? r + i(s, t, c, b) + t : r + s + t;
|
|
2887
2964
|
};
|
|
2888
2965
|
return o.open = r, o.close = t, o;
|
|
2889
|
-
}, u$
|
|
2890
|
-
for (let [r, t] of h) u$
|
|
2891
|
-
return u$
|
|
2966
|
+
}, u$1 = { isColorSupported: e }, d = (r) => `\x1B[${r}m`;
|
|
2967
|
+
for (let [r, t] of h) u$1[r] = e ? g(d(t[0]), d(t[1]), t[2]) : a;
|
|
2968
|
+
return u$1;
|
|
2892
2969
|
}
|
|
2893
2970
|
p();
|
|
2894
2971
|
const lineSplitRE = /\r?\n/;
|
|
@@ -2914,17 +2991,9 @@ function offsetToLineNumber(source, offset) {
|
|
|
2914
2991
|
return line + 1;
|
|
2915
2992
|
}
|
|
2916
2993
|
async function saveInlineSnapshots(environment, snapshots) {
|
|
2917
|
-
const MagicString = (await Promise.resolve().then(
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
// -
|
|
2921
|
-
// 0-9
|
|
2922
|
-
// A-Z
|
|
2923
|
-
// a-z
|
|
2924
|
-
function() {
|
|
2925
|
-
return require("./magic-string.es-m-ldRjOa.cjs");
|
|
2926
|
-
}
|
|
2927
|
-
)).default;
|
|
2994
|
+
const MagicString = (await Promise.resolve().then(function() {
|
|
2995
|
+
return require("./magic-string.es-CybcVAw7.cjs");
|
|
2996
|
+
})).default;
|
|
2928
2997
|
const files = new Set(snapshots.map((i) => i.file));
|
|
2929
2998
|
await Promise.all(Array.from(files).map(async (file) => {
|
|
2930
2999
|
const snaps = snapshots.filter((i) => i.file === file);
|
|
@@ -3076,7 +3145,7 @@ function requireNaturalCompare() {
|
|
|
3076
3145
|
return naturalCompare$1.exports;
|
|
3077
3146
|
}
|
|
3078
3147
|
var naturalCompareExports = requireNaturalCompare();
|
|
3079
|
-
var naturalCompare = /* @__PURE__ */ getDefaultExportFromCjs(naturalCompareExports);
|
|
3148
|
+
var naturalCompare = /* @__PURE__ */ getDefaultExportFromCjs$1(naturalCompareExports);
|
|
3080
3149
|
const serialize$1 = (val, config, indentation, depth, refs, printer) => {
|
|
3081
3150
|
const name = val.getMockName();
|
|
3082
3151
|
const nameString = name === "vi.fn()" ? "" : ` ${name}`;
|
|
@@ -3226,12 +3295,12 @@ var CounterMap = class extends DefaultMap {
|
|
|
3226
3295
|
total() {
|
|
3227
3296
|
if (typeof this._total !== "undefined") return this._total;
|
|
3228
3297
|
let total = 0;
|
|
3229
|
-
for (const x
|
|
3298
|
+
for (const x of this.values()) total += x;
|
|
3230
3299
|
return total;
|
|
3231
3300
|
}
|
|
3232
3301
|
};
|
|
3233
|
-
function isSameStackPosition(x
|
|
3234
|
-
return x
|
|
3302
|
+
function isSameStackPosition(x, y) {
|
|
3303
|
+
return x.file === y.file && x.column === y.column && x.line === y.line;
|
|
3235
3304
|
}
|
|
3236
3305
|
var SnapshotState = class SnapshotState {
|
|
3237
3306
|
_counters = new CounterMap();
|
|
@@ -3513,7 +3582,7 @@ function createMismatchError(message, expand, actual, expected) {
|
|
|
3513
3582
|
return error;
|
|
3514
3583
|
}
|
|
3515
3584
|
var SnapshotClient = class {
|
|
3516
|
-
snapshotStateMap = new Map();
|
|
3585
|
+
snapshotStateMap = /* @__PURE__ */ new Map();
|
|
3517
3586
|
constructor(options = {}) {
|
|
3518
3587
|
this.options = options;
|
|
3519
3588
|
}
|
|
@@ -3587,11 +3656,11 @@ var SnapshotClient = class {
|
|
|
3587
3656
|
};
|
|
3588
3657
|
|
|
3589
3658
|
//#endregion
|
|
3590
|
-
//#region ../../node_modules/.pnpm/vitest@3.
|
|
3659
|
+
//#region ../../node_modules/.pnpm/vitest@3.2.0_@types+node@22.15.29_jiti@2.4.2_lightningcss@1.30.1_msw@2.8.7_@types+node@_9eeb862be92f04c38a20bffaf3a72b73/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js
|
|
3591
3660
|
const RealDate = Date;
|
|
3592
3661
|
let now = null;
|
|
3593
3662
|
var MockDate = class MockDate extends RealDate {
|
|
3594
|
-
constructor(y
|
|
3663
|
+
constructor(y, m, d, h$1, M, s, ms) {
|
|
3595
3664
|
super();
|
|
3596
3665
|
let date;
|
|
3597
3666
|
switch (arguments.length) {
|
|
@@ -3600,15 +3669,15 @@ var MockDate = class MockDate extends RealDate {
|
|
|
3600
3669
|
else date = new RealDate();
|
|
3601
3670
|
break;
|
|
3602
3671
|
case 1:
|
|
3603
|
-
date = new RealDate(y
|
|
3672
|
+
date = new RealDate(y);
|
|
3604
3673
|
break;
|
|
3605
3674
|
default:
|
|
3606
|
-
d
|
|
3675
|
+
d = typeof d === "undefined" ? 1 : d;
|
|
3607
3676
|
h$1 = h$1 || 0;
|
|
3608
3677
|
M = M || 0;
|
|
3609
3678
|
s = s || 0;
|
|
3610
3679
|
ms = ms || 0;
|
|
3611
|
-
date = new RealDate(y
|
|
3680
|
+
date = new RealDate(y, m, d, h$1, M, s, ms);
|
|
3612
3681
|
break;
|
|
3613
3682
|
}
|
|
3614
3683
|
Object.setPrototypeOf(date, MockDate.prototype);
|
|
@@ -3636,7 +3705,7 @@ function resetDate() {
|
|
|
3636
3705
|
}
|
|
3637
3706
|
|
|
3638
3707
|
//#endregion
|
|
3639
|
-
//#region ../../node_modules/.pnpm/vitest@3.
|
|
3708
|
+
//#region ../../node_modules/.pnpm/vitest@3.2.0_@types+node@22.15.29_jiti@2.4.2_lightningcss@1.30.1_msw@2.8.7_@types+node@_9eeb862be92f04c38a20bffaf3a72b73/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js
|
|
3640
3709
|
const unsupported = [
|
|
3641
3710
|
"matchSnapshot",
|
|
3642
3711
|
"toMatchSnapshot",
|
|
@@ -3782,7 +3851,7 @@ function requireChaiSubset() {
|
|
|
3782
3851
|
return chaiSubset$1.exports;
|
|
3783
3852
|
}
|
|
3784
3853
|
var chaiSubsetExports = requireChaiSubset();
|
|
3785
|
-
var Subset = /* @__PURE__ */ getDefaultExportFromCjs
|
|
3854
|
+
var Subset = /* @__PURE__ */ getDefaultExportFromCjs(chaiSubsetExports);
|
|
3786
3855
|
function createAssertionMessage(util, assertion, hasArgs) {
|
|
3787
3856
|
const not = util.flag(assertion, "negate") ? "not." : "";
|
|
3788
3857
|
const name = `${util.flag(assertion, "_name")}(expected)`;
|
|
@@ -3974,23 +4043,12 @@ function createExpect(test$1) {
|
|
|
3974
4043
|
const expect$1 = (value, message) => {
|
|
3975
4044
|
const { assertionCalls } = getState(expect$1);
|
|
3976
4045
|
setState({ assertionCalls: assertionCalls + 1 }, expect$1);
|
|
3977
|
-
const assert$
|
|
4046
|
+
const assert$2 = require_dist.expect(value, message);
|
|
3978
4047
|
const _test = test$1 || require_dist.getCurrentTest();
|
|
3979
|
-
if (_test) return assert$
|
|
3980
|
-
else return assert$
|
|
4048
|
+
if (_test) return assert$2.withTest(_test);
|
|
4049
|
+
else return assert$2;
|
|
3981
4050
|
};
|
|
3982
|
-
Object.assign(
|
|
3983
|
-
expect$1,
|
|
3984
|
-
// eslint-disable-line id-blacklist
|
|
3985
|
-
//see https://heycam.github.io/webidl/#abstract-opdef-converttoint
|
|
3986
|
-
// arbitrarily large number to avoid collisions with native timer IDs
|
|
3987
|
-
// [millis, nanoremainder]
|
|
3988
|
-
// eslint-disable-line
|
|
3989
|
-
// const for now
|
|
3990
|
-
// explicitly drop additional arguments
|
|
3991
|
-
// do it all again - for the remainder of the requested range
|
|
3992
|
-
require_dist.expect
|
|
3993
|
-
);
|
|
4051
|
+
Object.assign(expect$1, require_dist.expect);
|
|
3994
4052
|
Object.assign(expect$1, globalThis[ASYMMETRIC_MATCHERS_OBJECT]);
|
|
3995
4053
|
expect$1.getState = () => getState(expect$1);
|
|
3996
4054
|
expect$1.setState = (state) => setState(state, expect$1);
|
|
@@ -4137,9 +4195,9 @@ function requireCalledInOrder() {
|
|
|
4137
4195
|
/**
|
|
4138
4196
|
* @private
|
|
4139
4197
|
*/
|
|
4140
|
-
function checkAdjacentCalls(callMap, spy, index, spies) {
|
|
4198
|
+
function checkAdjacentCalls(callMap, spy, index, spies$1) {
|
|
4141
4199
|
var calledBeforeNext = true;
|
|
4142
|
-
if (index !== spies.length - 1) calledBeforeNext = spy.calledBefore(spies[index + 1]);
|
|
4200
|
+
if (index !== spies$1.length - 1) calledBeforeNext = spy.calledBefore(spies$1[index + 1]);
|
|
4143
4201
|
if (hasCallsLeft(callMap, spy) && calledBeforeNext) {
|
|
4144
4202
|
callMap[spy.id] += 1;
|
|
4145
4203
|
return true;
|
|
@@ -4158,9 +4216,9 @@ function requireCalledInOrder() {
|
|
|
4158
4216
|
* @param {SinonProxy[] | SinonProxy} spies An array of proxies, or several proxies as arguments
|
|
4159
4217
|
* @returns {boolean} true when spies are called in order, false otherwise
|
|
4160
4218
|
*/
|
|
4161
|
-
function calledInOrder(spies) {
|
|
4219
|
+
function calledInOrder(spies$1) {
|
|
4162
4220
|
var callMap = {};
|
|
4163
|
-
var _spies = arguments.length > 1 ? arguments : spies;
|
|
4221
|
+
var _spies = arguments.length > 1 ? arguments : spies$1;
|
|
4164
4222
|
return every$1(_spies, checkAdjacentCalls.bind(null, callMap));
|
|
4165
4223
|
}
|
|
4166
4224
|
calledInOrder_1 = calledInOrder;
|
|
@@ -4300,8 +4358,8 @@ function requireOrderByFirstCall() {
|
|
|
4300
4358
|
* @param {SinonProxy[] | SinonProxy} spies
|
|
4301
4359
|
* @returns {SinonProxy[]}
|
|
4302
4360
|
*/
|
|
4303
|
-
function orderByFirstCall(spies) {
|
|
4304
|
-
return sort$1(slice(spies), comparator);
|
|
4361
|
+
function orderByFirstCall(spies$1) {
|
|
4362
|
+
return sort$1(slice(spies$1), comparator);
|
|
4305
4363
|
}
|
|
4306
4364
|
orderByFirstCall_1 = orderByFirstCall;
|
|
4307
4365
|
return orderByFirstCall_1;
|
|
@@ -4388,8 +4446,8 @@ function requireTypeDetect() {
|
|
|
4388
4446
|
var symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== "undefined";
|
|
4389
4447
|
var setEntriesExists = setExists && typeof Set.prototype.entries === "function";
|
|
4390
4448
|
var mapEntriesExists = mapExists && typeof Map.prototype.entries === "function";
|
|
4391
|
-
var setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries());
|
|
4392
|
-
var mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries());
|
|
4449
|
+
var setIteratorPrototype = setEntriesExists && Object.getPrototypeOf((/* @__PURE__ */ new Set()).entries());
|
|
4450
|
+
var mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf((/* @__PURE__ */ new Map()).entries());
|
|
4393
4451
|
var arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === "function";
|
|
4394
4452
|
var arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]());
|
|
4395
4453
|
var stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === "function";
|
|
@@ -4716,15 +4774,15 @@ function requireFakeTimersSrc() {
|
|
|
4716
4774
|
function parseTime(str) {
|
|
4717
4775
|
if (!str) return 0;
|
|
4718
4776
|
const strings = str.split(":");
|
|
4719
|
-
const l
|
|
4720
|
-
let i = l
|
|
4777
|
+
const l = strings.length;
|
|
4778
|
+
let i = l;
|
|
4721
4779
|
let ms = 0;
|
|
4722
4780
|
let parsed;
|
|
4723
|
-
if (l
|
|
4781
|
+
if (l > 3 || !/^(\d\d:){0,2}\d\d?$/.test(str)) throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");
|
|
4724
4782
|
while (i--) {
|
|
4725
4783
|
parsed = parseInt(strings[i], 10);
|
|
4726
4784
|
if (parsed >= 60) throw new Error(`Invalid time ${str}`);
|
|
4727
|
-
ms += parsed * Math.pow(60, l
|
|
4785
|
+
ms += parsed * Math.pow(60, l - i - 1);
|
|
4728
4786
|
}
|
|
4729
4787
|
return ms * 1e3;
|
|
4730
4788
|
}
|
|
@@ -5079,10 +5137,10 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`);
|
|
|
5079
5137
|
* @returns {Timer[]}
|
|
5080
5138
|
*/
|
|
5081
5139
|
function uninstall(clock, config) {
|
|
5082
|
-
let method, i, l
|
|
5140
|
+
let method, i, l;
|
|
5083
5141
|
const installedHrTime = "_hrtime";
|
|
5084
5142
|
const installedNextTick = "_nextTick";
|
|
5085
|
-
for (i = 0, l
|
|
5143
|
+
for (i = 0, l = clock.methods.length; i < l; i++) {
|
|
5086
5144
|
method = clock.methods[i];
|
|
5087
5145
|
if (method === "hrtime" && _global.process) _global.process.hrtime = clock[installedHrTime];
|
|
5088
5146
|
else if (method === "nextTick" && _global.process) _global.process.nextTick = clock[installedNextTick];
|
|
@@ -5581,7 +5639,7 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`);
|
|
|
5581
5639
|
});
|
|
5582
5640
|
});
|
|
5583
5641
|
};
|
|
5584
|
-
clock.reset = function reset() {
|
|
5642
|
+
clock.reset = function reset$1() {
|
|
5585
5643
|
nanos = 0;
|
|
5586
5644
|
clock.timers = {};
|
|
5587
5645
|
clock.jobs = [];
|
|
@@ -5638,13 +5696,13 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`);
|
|
|
5638
5696
|
if (config.ignoreMissingTimers) return;
|
|
5639
5697
|
throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${timer}'`);
|
|
5640
5698
|
}
|
|
5641
|
-
let i, l
|
|
5699
|
+
let i, l;
|
|
5642
5700
|
const clock = createClock(config.now, config.loopLimit);
|
|
5643
5701
|
clock.shouldClearNativeTimers = config.shouldClearNativeTimers;
|
|
5644
5702
|
clock.uninstall = function() {
|
|
5645
5703
|
return uninstall(clock, config);
|
|
5646
5704
|
};
|
|
5647
|
-
clock.abortListenerMap = new Map();
|
|
5705
|
+
clock.abortListenerMap = /* @__PURE__ */ new Map();
|
|
5648
5706
|
clock.methods = config.toFake || [];
|
|
5649
5707
|
if (clock.methods.length === 0) clock.methods = Object.keys(timers);
|
|
5650
5708
|
if (config.shouldAdvanceTime === true) {
|
|
@@ -5668,7 +5726,7 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`);
|
|
|
5668
5726
|
}
|
|
5669
5727
|
if (_global === globalObject && timersModule) clock.timersModuleMethods = [];
|
|
5670
5728
|
if (_global === globalObject && timersPromisesModule) clock.timersPromisesModuleMethods = [];
|
|
5671
|
-
for (i = 0, l
|
|
5729
|
+
for (i = 0, l = clock.methods.length; i < l; i++) {
|
|
5672
5730
|
const nameOfMethodToReplace = clock.methods[i];
|
|
5673
5731
|
if (!isPresent[nameOfMethodToReplace]) {
|
|
5674
5732
|
handleMissingTimer(nameOfMethodToReplace);
|
|
@@ -6083,8 +6141,8 @@ function createVitest() {
|
|
|
6083
6141
|
global: globalThis,
|
|
6084
6142
|
config: workerState.config.fakeTimers
|
|
6085
6143
|
});
|
|
6086
|
-
const _stubsGlobal = new Map();
|
|
6087
|
-
const _stubsEnv = new Map();
|
|
6144
|
+
const _stubsGlobal = /* @__PURE__ */ new Map();
|
|
6145
|
+
const _stubsEnv = /* @__PURE__ */ new Map();
|
|
6088
6146
|
const _envBooleans = [
|
|
6089
6147
|
"PROD",
|
|
6090
6148
|
"DEV",
|
|
@@ -6199,6 +6257,9 @@ function createVitest() {
|
|
|
6199
6257
|
async importMock(path) {
|
|
6200
6258
|
return _mocker().importMock(path, getImporter("importMock"));
|
|
6201
6259
|
},
|
|
6260
|
+
mockObject(value) {
|
|
6261
|
+
return _mocker().mockObject({ value }).value;
|
|
6262
|
+
},
|
|
6202
6263
|
mocked(item, _options = {}) {
|
|
6203
6264
|
return item;
|
|
6204
6265
|
},
|
|
@@ -6291,4 +6352,4 @@ Object.defineProperty(exports, 'globalExpect', {
|
|
|
6291
6352
|
return globalExpect;
|
|
6292
6353
|
}
|
|
6293
6354
|
});
|
|
6294
|
-
//# sourceMappingURL=vi.
|
|
6355
|
+
//# sourceMappingURL=vi.bdSIJ99Y-Dft_B_Ta.cjs.map
|