@jterrazz/test 8.0.0 → 9.0.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.
Files changed (48) hide show
  1. package/README.md +209 -230
  2. package/dist/checker.d.ts +1 -0
  3. package/dist/checker.js +741 -0
  4. package/dist/index.d.ts +1249 -728
  5. package/dist/index.js +3133 -1538
  6. package/dist/intercept.js +129 -299
  7. package/dist/match.js +153 -0
  8. package/dist/oxlint.cjs +2931 -0
  9. package/dist/oxlint.d.cts +150 -0
  10. package/dist/oxlint.d.ts +150 -0
  11. package/dist/oxlint.js +2925 -0
  12. package/package.json +47 -41
  13. package/dist/chunk.cjs +0 -28
  14. package/dist/index.cjs +0 -2264
  15. package/dist/index.cjs.map +0 -1
  16. package/dist/index.d.cts +0 -980
  17. package/dist/index.js.map +0 -1
  18. package/dist/intercept.cjs +0 -323
  19. package/dist/intercept.cjs.map +0 -1
  20. package/dist/intercept.d.cts +0 -115
  21. package/dist/intercept.d.ts +0 -115
  22. package/dist/intercept.js.map +0 -1
  23. package/dist/intercept2.cjs +0 -81
  24. package/dist/intercept2.cjs.map +0 -1
  25. package/dist/intercept2.js +0 -81
  26. package/dist/intercept2.js.map +0 -1
  27. package/dist/mock-of.cjs +0 -32
  28. package/dist/mock-of.cjs.map +0 -1
  29. package/dist/mock-of.d.cts +0 -27
  30. package/dist/mock-of.d.ts +0 -27
  31. package/dist/mock-of.js +0 -19
  32. package/dist/mock-of.js.map +0 -1
  33. package/dist/mock.cjs +0 -4
  34. package/dist/mock.d.cts +0 -2
  35. package/dist/mock.d.ts +0 -2
  36. package/dist/mock.js +0 -2
  37. package/dist/services.cjs +0 -5
  38. package/dist/services.d.cts +0 -2
  39. package/dist/services.d.ts +0 -2
  40. package/dist/services.js +0 -2
  41. package/dist/sqlite.cjs +0 -350
  42. package/dist/sqlite.cjs.map +0 -1
  43. package/dist/sqlite.d.cts +0 -209
  44. package/dist/sqlite.d.ts +0 -209
  45. package/dist/sqlite.js +0 -331
  46. package/dist/sqlite.js.map +0 -1
  47. package/dist/types.d.cts +0 -42
  48. package/dist/types.d.ts +0 -42
@@ -1,81 +0,0 @@
1
- //#region src/spec/intercept/intercept.ts
2
- let mswModule = null;
3
- let mswHttp = null;
4
- async function loadMsw() {
5
- if (!mswModule) {
6
- mswModule = await import("msw/node");
7
- mswHttp = await import("msw");
8
- }
9
- return {
10
- node: mswModule,
11
- msw: mswHttp
12
- };
13
- }
14
- let serverInstance = null;
15
- /**
16
- * Start the MSW server (once per process).
17
- */
18
- async function ensureInterceptServer() {
19
- if (serverInstance) return;
20
- const { node } = await loadMsw();
21
- serverInstance = node.setupServer();
22
- serverInstance.listen({ onUnhandledRequest: "bypass" });
23
- }
24
- /**
25
- * Register intercept entries as MSW handlers. Returns a cleanup function.
26
- *
27
- * Each incoming request is matched against all unconsumed entries in order.
28
- * The first entry whose URL and optional body filter match is consumed.
29
- * This supports multiple entries for the same URL with different body matchers.
30
- */
31
- async function registerIntercepts(entries) {
32
- if (entries.length === 0) return () => {};
33
- await ensureInterceptServer();
34
- const { msw } = await loadMsw();
35
- const consumed = Array.from({ length: entries.length }, () => false);
36
- const urls = /* @__PURE__ */ new Set();
37
- for (const entry of entries) urls.add(entry.trigger.url);
38
- const handlers = [];
39
- for (const url of urls) {
40
- const methods = /* @__PURE__ */ new Set();
41
- for (const entry of entries) if (entry.trigger.url === url || String(entry.trigger.url) === String(url)) methods.add(entry.trigger.method);
42
- for (const method of methods) {
43
- const handlerFn = method === "*" ? msw.http.all : msw.http[method.toLowerCase()];
44
- if (!handlerFn) continue;
45
- const handler = handlerFn(url, async ({ request }) => {
46
- let body = null;
47
- let bodyParsed = false;
48
- for (let i = 0; i < entries.length; i++) {
49
- if (consumed[i]) continue;
50
- const entry = entries[i];
51
- if (entry.trigger.url !== url && String(entry.trigger.url) !== String(url)) continue;
52
- if (entry.trigger.method !== method && entry.trigger.method !== "*") continue;
53
- if (entry.trigger.match) {
54
- if (!bodyParsed) {
55
- try {
56
- body = await request.clone().json();
57
- } catch {}
58
- bodyParsed = true;
59
- }
60
- if (!entry.trigger.match(body)) continue;
61
- }
62
- consumed[i] = true;
63
- if (entry.response.delay) await new Promise((r) => setTimeout(r, entry.response.delay));
64
- return msw.HttpResponse.json(entry.response.body, {
65
- status: entry.response.status ?? 200,
66
- headers: entry.response.headers
67
- });
68
- }
69
- });
70
- handlers.push(handler);
71
- }
72
- }
73
- serverInstance.use(...handlers);
74
- return () => {
75
- serverInstance.resetHandlers();
76
- };
77
- }
78
- //#endregion
79
- exports.registerIntercepts = registerIntercepts;
80
-
81
- //# sourceMappingURL=intercept2.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intercept2.cjs","names":[],"sources":["../src/spec/intercept/intercept.ts"],"sourcesContent":["/**\n * MSW-based intercept server. Manages HTTP interception for spec.run().\n *\n * Intercepts are matched in order — for each incoming request, the first\n * unconsumed entry whose trigger matches (URL + optional body filter) is\n * used and consumed. This supports body-based routing to the same URL.\n */\nimport type { InterceptEntry } from './types.js';\n\nlet mswModule: any = null;\nlet mswHttp: any = null;\n\nasync function loadMsw() {\n if (!mswModule) {\n mswModule = await import('msw/node');\n mswHttp = await import('msw');\n }\n return { node: mswModule, msw: mswHttp! };\n}\n\nlet serverInstance: any = null;\n\n/**\n * Start the MSW server (once per process).\n */\nexport async function ensureInterceptServer(): Promise<void> {\n if (serverInstance) {\n return;\n }\n const { node } = await loadMsw();\n serverInstance = node.setupServer();\n serverInstance.listen({ onUnhandledRequest: 'bypass' });\n}\n\n/**\n * Register intercept entries as MSW handlers. Returns a cleanup function.\n *\n * Each incoming request is matched against all unconsumed entries in order.\n * The first entry whose URL and optional body filter match is consumed.\n * This supports multiple entries for the same URL with different body matchers.\n */\nexport async function registerIntercepts(entries: InterceptEntry[]): Promise<() => void> {\n if (entries.length === 0) {\n return () => {};\n }\n\n await ensureInterceptServer();\n const { msw } = await loadMsw();\n\n // Track which entries have been consumed\n const consumed = Array.from({ length: entries.length }, () => false);\n\n // Collect unique URL patterns to register handlers for\n const urls = new Set<RegExp | string>();\n for (const entry of entries) {\n urls.add(entry.trigger.url);\n }\n\n const handlers: any[] = [];\n\n for (const url of urls) {\n // Collect all methods for this URL\n const methods = new Set<string>();\n for (const entry of entries) {\n if (entry.trigger.url === url || String(entry.trigger.url) === String(url)) {\n methods.add(entry.trigger.method);\n }\n }\n\n for (const method of methods) {\n const handlerFn =\n method === '*' ? msw.http.all : (msw.http as any)[method.toLowerCase()];\n if (!handlerFn) {\n continue;\n }\n\n const handler = handlerFn(url, async ({ request }: { request: Request }) => {\n // Clone body once for all match checks\n let body: unknown = null;\n let bodyParsed = false;\n\n for (let i = 0; i < entries.length; i++) {\n if (consumed[i]) {\n continue;\n }\n\n const entry = entries[i];\n\n // Check URL matches\n if (entry.trigger.url !== url && String(entry.trigger.url) !== String(url)) {\n continue;\n }\n\n // Check method matches\n if (entry.trigger.method !== method && entry.trigger.method !== '*') {\n continue;\n }\n\n // Check body matcher if present\n if (entry.trigger.match) {\n if (!bodyParsed) {\n try {\n body = await request.clone().json();\n } catch {\n // Not JSON\n }\n bodyParsed = true;\n }\n if (!entry.trigger.match(body)) {\n continue;\n }\n }\n\n // Match found — consume and respond\n consumed[i] = true;\n\n if (entry.response.delay) {\n await new Promise((r) => setTimeout(r, entry.response.delay));\n }\n\n return msw.HttpResponse.json(entry.response.body, {\n status: entry.response.status ?? 200,\n headers: entry.response.headers,\n });\n }\n\n // No match — passthrough\n return undefined;\n });\n\n handlers.push(handler);\n }\n }\n\n serverInstance.use(...handlers);\n\n return () => {\n serverInstance.resetHandlers();\n };\n}\n\n/**\n * Stop the MSW server (call in afterAll).\n */\nexport async function stopInterceptServer(): Promise<void> {\n if (serverInstance) {\n serverInstance.close();\n serverInstance = null;\n }\n}\n"],"mappings":";AASA,IAAI,YAAiB;AACrB,IAAI,UAAe;AAEnB,eAAe,UAAU;AACrB,KAAI,CAAC,WAAW;AACZ,cAAY,MAAM,OAAO;AACzB,YAAU,MAAM,OAAO;;AAE3B,QAAO;EAAE,MAAM;EAAW,KAAK;EAAU;;AAG7C,IAAI,iBAAsB;;;;AAK1B,eAAsB,wBAAuC;AACzD,KAAI,eACA;CAEJ,MAAM,EAAE,SAAS,MAAM,SAAS;AAChC,kBAAiB,KAAK,aAAa;AACnC,gBAAe,OAAO,EAAE,oBAAoB,UAAU,CAAC;;;;;;;;;AAU3D,eAAsB,mBAAmB,SAAgD;AACrF,KAAI,QAAQ,WAAW,EACnB,cAAa;AAGjB,OAAM,uBAAuB;CAC7B,MAAM,EAAE,QAAQ,MAAM,SAAS;CAG/B,MAAM,WAAW,MAAM,KAAK,EAAE,QAAQ,QAAQ,QAAQ,QAAQ,MAAM;CAGpE,MAAM,uBAAO,IAAI,KAAsB;AACvC,MAAK,MAAM,SAAS,QAChB,MAAK,IAAI,MAAM,QAAQ,IAAI;CAG/B,MAAM,WAAkB,EAAE;AAE1B,MAAK,MAAM,OAAO,MAAM;EAEpB,MAAM,0BAAU,IAAI,KAAa;AACjC,OAAK,MAAM,SAAS,QAChB,KAAI,MAAM,QAAQ,QAAQ,OAAO,OAAO,MAAM,QAAQ,IAAI,KAAK,OAAO,IAAI,CACtE,SAAQ,IAAI,MAAM,QAAQ,OAAO;AAIzC,OAAK,MAAM,UAAU,SAAS;GAC1B,MAAM,YACF,WAAW,MAAM,IAAI,KAAK,MAAO,IAAI,KAAa,OAAO,aAAa;AAC1E,OAAI,CAAC,UACD;GAGJ,MAAM,UAAU,UAAU,KAAK,OAAO,EAAE,cAAoC;IAExE,IAAI,OAAgB;IACpB,IAAI,aAAa;AAEjB,SAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACrC,SAAI,SAAS,GACT;KAGJ,MAAM,QAAQ,QAAQ;AAGtB,SAAI,MAAM,QAAQ,QAAQ,OAAO,OAAO,MAAM,QAAQ,IAAI,KAAK,OAAO,IAAI,CACtE;AAIJ,SAAI,MAAM,QAAQ,WAAW,UAAU,MAAM,QAAQ,WAAW,IAC5D;AAIJ,SAAI,MAAM,QAAQ,OAAO;AACrB,UAAI,CAAC,YAAY;AACb,WAAI;AACA,eAAO,MAAM,QAAQ,OAAO,CAAC,MAAM;eAC/B;AAGR,oBAAa;;AAEjB,UAAI,CAAC,MAAM,QAAQ,MAAM,KAAK,CAC1B;;AAKR,cAAS,KAAK;AAEd,SAAI,MAAM,SAAS,MACf,OAAM,IAAI,SAAS,MAAM,WAAW,GAAG,MAAM,SAAS,MAAM,CAAC;AAGjE,YAAO,IAAI,aAAa,KAAK,MAAM,SAAS,MAAM;MAC9C,QAAQ,MAAM,SAAS,UAAU;MACjC,SAAS,MAAM,SAAS;MAC3B,CAAC;;KAKR;AAEF,YAAS,KAAK,QAAQ;;;AAI9B,gBAAe,IAAI,GAAG,SAAS;AAE/B,cAAa;AACT,iBAAe,eAAe"}
@@ -1,81 +0,0 @@
1
- //#region src/spec/intercept/intercept.ts
2
- let mswModule = null;
3
- let mswHttp = null;
4
- async function loadMsw() {
5
- if (!mswModule) {
6
- mswModule = await import("msw/node");
7
- mswHttp = await import("msw");
8
- }
9
- return {
10
- node: mswModule,
11
- msw: mswHttp
12
- };
13
- }
14
- let serverInstance = null;
15
- /**
16
- * Start the MSW server (once per process).
17
- */
18
- async function ensureInterceptServer() {
19
- if (serverInstance) return;
20
- const { node } = await loadMsw();
21
- serverInstance = node.setupServer();
22
- serverInstance.listen({ onUnhandledRequest: "bypass" });
23
- }
24
- /**
25
- * Register intercept entries as MSW handlers. Returns a cleanup function.
26
- *
27
- * Each incoming request is matched against all unconsumed entries in order.
28
- * The first entry whose URL and optional body filter match is consumed.
29
- * This supports multiple entries for the same URL with different body matchers.
30
- */
31
- async function registerIntercepts(entries) {
32
- if (entries.length === 0) return () => {};
33
- await ensureInterceptServer();
34
- const { msw } = await loadMsw();
35
- const consumed = Array.from({ length: entries.length }, () => false);
36
- const urls = /* @__PURE__ */ new Set();
37
- for (const entry of entries) urls.add(entry.trigger.url);
38
- const handlers = [];
39
- for (const url of urls) {
40
- const methods = /* @__PURE__ */ new Set();
41
- for (const entry of entries) if (entry.trigger.url === url || String(entry.trigger.url) === String(url)) methods.add(entry.trigger.method);
42
- for (const method of methods) {
43
- const handlerFn = method === "*" ? msw.http.all : msw.http[method.toLowerCase()];
44
- if (!handlerFn) continue;
45
- const handler = handlerFn(url, async ({ request }) => {
46
- let body = null;
47
- let bodyParsed = false;
48
- for (let i = 0; i < entries.length; i++) {
49
- if (consumed[i]) continue;
50
- const entry = entries[i];
51
- if (entry.trigger.url !== url && String(entry.trigger.url) !== String(url)) continue;
52
- if (entry.trigger.method !== method && entry.trigger.method !== "*") continue;
53
- if (entry.trigger.match) {
54
- if (!bodyParsed) {
55
- try {
56
- body = await request.clone().json();
57
- } catch {}
58
- bodyParsed = true;
59
- }
60
- if (!entry.trigger.match(body)) continue;
61
- }
62
- consumed[i] = true;
63
- if (entry.response.delay) await new Promise((r) => setTimeout(r, entry.response.delay));
64
- return msw.HttpResponse.json(entry.response.body, {
65
- status: entry.response.status ?? 200,
66
- headers: entry.response.headers
67
- });
68
- }
69
- });
70
- handlers.push(handler);
71
- }
72
- }
73
- serverInstance.use(...handlers);
74
- return () => {
75
- serverInstance.resetHandlers();
76
- };
77
- }
78
- //#endregion
79
- export { registerIntercepts };
80
-
81
- //# sourceMappingURL=intercept2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intercept2.js","names":[],"sources":["../src/spec/intercept/intercept.ts"],"sourcesContent":["/**\n * MSW-based intercept server. Manages HTTP interception for spec.run().\n *\n * Intercepts are matched in order — for each incoming request, the first\n * unconsumed entry whose trigger matches (URL + optional body filter) is\n * used and consumed. This supports body-based routing to the same URL.\n */\nimport type { InterceptEntry } from './types.js';\n\nlet mswModule: any = null;\nlet mswHttp: any = null;\n\nasync function loadMsw() {\n if (!mswModule) {\n mswModule = await import('msw/node');\n mswHttp = await import('msw');\n }\n return { node: mswModule, msw: mswHttp! };\n}\n\nlet serverInstance: any = null;\n\n/**\n * Start the MSW server (once per process).\n */\nexport async function ensureInterceptServer(): Promise<void> {\n if (serverInstance) {\n return;\n }\n const { node } = await loadMsw();\n serverInstance = node.setupServer();\n serverInstance.listen({ onUnhandledRequest: 'bypass' });\n}\n\n/**\n * Register intercept entries as MSW handlers. Returns a cleanup function.\n *\n * Each incoming request is matched against all unconsumed entries in order.\n * The first entry whose URL and optional body filter match is consumed.\n * This supports multiple entries for the same URL with different body matchers.\n */\nexport async function registerIntercepts(entries: InterceptEntry[]): Promise<() => void> {\n if (entries.length === 0) {\n return () => {};\n }\n\n await ensureInterceptServer();\n const { msw } = await loadMsw();\n\n // Track which entries have been consumed\n const consumed = Array.from({ length: entries.length }, () => false);\n\n // Collect unique URL patterns to register handlers for\n const urls = new Set<RegExp | string>();\n for (const entry of entries) {\n urls.add(entry.trigger.url);\n }\n\n const handlers: any[] = [];\n\n for (const url of urls) {\n // Collect all methods for this URL\n const methods = new Set<string>();\n for (const entry of entries) {\n if (entry.trigger.url === url || String(entry.trigger.url) === String(url)) {\n methods.add(entry.trigger.method);\n }\n }\n\n for (const method of methods) {\n const handlerFn =\n method === '*' ? msw.http.all : (msw.http as any)[method.toLowerCase()];\n if (!handlerFn) {\n continue;\n }\n\n const handler = handlerFn(url, async ({ request }: { request: Request }) => {\n // Clone body once for all match checks\n let body: unknown = null;\n let bodyParsed = false;\n\n for (let i = 0; i < entries.length; i++) {\n if (consumed[i]) {\n continue;\n }\n\n const entry = entries[i];\n\n // Check URL matches\n if (entry.trigger.url !== url && String(entry.trigger.url) !== String(url)) {\n continue;\n }\n\n // Check method matches\n if (entry.trigger.method !== method && entry.trigger.method !== '*') {\n continue;\n }\n\n // Check body matcher if present\n if (entry.trigger.match) {\n if (!bodyParsed) {\n try {\n body = await request.clone().json();\n } catch {\n // Not JSON\n }\n bodyParsed = true;\n }\n if (!entry.trigger.match(body)) {\n continue;\n }\n }\n\n // Match found — consume and respond\n consumed[i] = true;\n\n if (entry.response.delay) {\n await new Promise((r) => setTimeout(r, entry.response.delay));\n }\n\n return msw.HttpResponse.json(entry.response.body, {\n status: entry.response.status ?? 200,\n headers: entry.response.headers,\n });\n }\n\n // No match — passthrough\n return undefined;\n });\n\n handlers.push(handler);\n }\n }\n\n serverInstance.use(...handlers);\n\n return () => {\n serverInstance.resetHandlers();\n };\n}\n\n/**\n * Stop the MSW server (call in afterAll).\n */\nexport async function stopInterceptServer(): Promise<void> {\n if (serverInstance) {\n serverInstance.close();\n serverInstance = null;\n }\n}\n"],"mappings":";AASA,IAAI,YAAiB;AACrB,IAAI,UAAe;AAEnB,eAAe,UAAU;AACrB,KAAI,CAAC,WAAW;AACZ,cAAY,MAAM,OAAO;AACzB,YAAU,MAAM,OAAO;;AAE3B,QAAO;EAAE,MAAM;EAAW,KAAK;EAAU;;AAG7C,IAAI,iBAAsB;;;;AAK1B,eAAsB,wBAAuC;AACzD,KAAI,eACA;CAEJ,MAAM,EAAE,SAAS,MAAM,SAAS;AAChC,kBAAiB,KAAK,aAAa;AACnC,gBAAe,OAAO,EAAE,oBAAoB,UAAU,CAAC;;;;;;;;;AAU3D,eAAsB,mBAAmB,SAAgD;AACrF,KAAI,QAAQ,WAAW,EACnB,cAAa;AAGjB,OAAM,uBAAuB;CAC7B,MAAM,EAAE,QAAQ,MAAM,SAAS;CAG/B,MAAM,WAAW,MAAM,KAAK,EAAE,QAAQ,QAAQ,QAAQ,QAAQ,MAAM;CAGpE,MAAM,uBAAO,IAAI,KAAsB;AACvC,MAAK,MAAM,SAAS,QAChB,MAAK,IAAI,MAAM,QAAQ,IAAI;CAG/B,MAAM,WAAkB,EAAE;AAE1B,MAAK,MAAM,OAAO,MAAM;EAEpB,MAAM,0BAAU,IAAI,KAAa;AACjC,OAAK,MAAM,SAAS,QAChB,KAAI,MAAM,QAAQ,QAAQ,OAAO,OAAO,MAAM,QAAQ,IAAI,KAAK,OAAO,IAAI,CACtE,SAAQ,IAAI,MAAM,QAAQ,OAAO;AAIzC,OAAK,MAAM,UAAU,SAAS;GAC1B,MAAM,YACF,WAAW,MAAM,IAAI,KAAK,MAAO,IAAI,KAAa,OAAO,aAAa;AAC1E,OAAI,CAAC,UACD;GAGJ,MAAM,UAAU,UAAU,KAAK,OAAO,EAAE,cAAoC;IAExE,IAAI,OAAgB;IACpB,IAAI,aAAa;AAEjB,SAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACrC,SAAI,SAAS,GACT;KAGJ,MAAM,QAAQ,QAAQ;AAGtB,SAAI,MAAM,QAAQ,QAAQ,OAAO,OAAO,MAAM,QAAQ,IAAI,KAAK,OAAO,IAAI,CACtE;AAIJ,SAAI,MAAM,QAAQ,WAAW,UAAU,MAAM,QAAQ,WAAW,IAC5D;AAIJ,SAAI,MAAM,QAAQ,OAAO;AACrB,UAAI,CAAC,YAAY;AACb,WAAI;AACA,eAAO,MAAM,QAAQ,OAAO,CAAC,MAAM;eAC/B;AAGR,oBAAa;;AAEjB,UAAI,CAAC,MAAM,QAAQ,MAAM,KAAK,CAC1B;;AAKR,cAAS,KAAK;AAEd,SAAI,MAAM,SAAS,MACf,OAAM,IAAI,SAAS,MAAM,WAAW,GAAG,MAAM,SAAS,MAAM,CAAC;AAGjE,YAAO,IAAI,aAAa,KAAK,MAAM,SAAS,MAAM;MAC9C,QAAQ,MAAM,SAAS,UAAU;MACjC,SAAS,MAAM,SAAS;MAC3B,CAAC;;KAKR;AAEF,YAAS,KAAK,QAAQ;;;AAI9B,gBAAe,IAAI,GAAG,SAAS;AAE/B,cAAa;AACT,iBAAe,eAAe"}
package/dist/mock-of.cjs DELETED
@@ -1,32 +0,0 @@
1
- const require_chunk = require("./chunk.cjs");
2
- let mockdate = require("mockdate");
3
- mockdate = require_chunk.__toESM(mockdate, 1);
4
- let vitest_mock_extended = require("vitest-mock-extended");
5
- //#region src/mock/mock-of-date.ts
6
- /**
7
- * Freeze or reset the global Date for deterministic time-dependent tests.
8
- * Wraps the `mockdate` package.
9
- */
10
- const mockOfDate = mockdate.default;
11
- //#endregion
12
- //#region src/mock/mock-of.ts
13
- /**
14
- * Create a deep mock proxy for a given type.
15
- * Wraps `vitest-mock-extended`'s `mockDeep` for convenient port mocking.
16
- */
17
- const mockOf = vitest_mock_extended.mockDeep;
18
- //#endregion
19
- Object.defineProperty(exports, "mockOf", {
20
- enumerable: true,
21
- get: function() {
22
- return mockOf;
23
- }
24
- });
25
- Object.defineProperty(exports, "mockOfDate", {
26
- enumerable: true,
27
- get: function() {
28
- return mockOfDate;
29
- }
30
- });
31
-
32
- //# sourceMappingURL=mock-of.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mock-of.cjs","names":["MockDatePackage","mockDeep"],"sources":["../src/mock/mock-of-date.ts","../src/mock/mock-of.ts"],"sourcesContent":["import MockDatePackage from 'mockdate';\n\n/** Interface for freezing and resetting the global Date in tests. */\nexport interface MockDatePort {\n /** Restore the real Date object. */\n reset: () => void;\n /** Freeze `Date.now()` and `new Date()` to the given value. */\n set: (date: Date | number | string) => void;\n}\n\n/**\n * Freeze or reset the global Date for deterministic time-dependent tests.\n * Wraps the `mockdate` package.\n */\nexport const mockOfDate: MockDatePort = MockDatePackage;\n","import { type DeepMockProxy, mockDeep } from 'vitest-mock-extended';\n\n/** Factory signature that creates a deep mock proxy for any interface. */\nexport type MockPort = <T>() => DeepMockProxy<T>;\n\n/**\n * Create a deep mock proxy for a given type.\n * Wraps `vitest-mock-extended`'s `mockDeep` for convenient port mocking.\n */\nexport const mockOf: MockPort = mockDeep;\n"],"mappings":";;;;;;;;;AAcA,MAAa,aAA2BA,SAAAA;;;;;;;ACLxC,MAAa,SAAmBC,qBAAAA"}
@@ -1,27 +0,0 @@
1
- import { DeepMockProxy } from "vitest-mock-extended";
2
-
3
- //#region src/mock/mock-of-date.d.ts
4
- /** Interface for freezing and resetting the global Date in tests. */
5
- interface MockDatePort {
6
- /** Restore the real Date object. */
7
- reset: () => void;
8
- /** Freeze `Date.now()` and `new Date()` to the given value. */
9
- set: (date: Date | number | string) => void;
10
- }
11
- /**
12
- * Freeze or reset the global Date for deterministic time-dependent tests.
13
- * Wraps the `mockdate` package.
14
- */
15
- declare const mockOfDate: MockDatePort;
16
- //#endregion
17
- //#region src/mock/mock-of.d.ts
18
- /** Factory signature that creates a deep mock proxy for any interface. */
19
- type MockPort = <T>() => DeepMockProxy<T>;
20
- /**
21
- * Create a deep mock proxy for a given type.
22
- * Wraps `vitest-mock-extended`'s `mockDeep` for convenient port mocking.
23
- */
24
- declare const mockOf: MockPort;
25
- //#endregion
26
- export { mockOfDate as i, mockOf as n, MockDatePort as r, MockPort as t };
27
- //# sourceMappingURL=mock-of.d.cts.map
package/dist/mock-of.d.ts DELETED
@@ -1,27 +0,0 @@
1
- import { DeepMockProxy } from "vitest-mock-extended";
2
-
3
- //#region src/mock/mock-of-date.d.ts
4
- /** Interface for freezing and resetting the global Date in tests. */
5
- interface MockDatePort {
6
- /** Restore the real Date object. */
7
- reset: () => void;
8
- /** Freeze `Date.now()` and `new Date()` to the given value. */
9
- set: (date: Date | number | string) => void;
10
- }
11
- /**
12
- * Freeze or reset the global Date for deterministic time-dependent tests.
13
- * Wraps the `mockdate` package.
14
- */
15
- declare const mockOfDate: MockDatePort;
16
- //#endregion
17
- //#region src/mock/mock-of.d.ts
18
- /** Factory signature that creates a deep mock proxy for any interface. */
19
- type MockPort = <T>() => DeepMockProxy<T>;
20
- /**
21
- * Create a deep mock proxy for a given type.
22
- * Wraps `vitest-mock-extended`'s `mockDeep` for convenient port mocking.
23
- */
24
- declare const mockOf: MockPort;
25
- //#endregion
26
- export { mockOfDate as i, mockOf as n, MockDatePort as r, MockPort as t };
27
- //# sourceMappingURL=mock-of.d.ts.map
package/dist/mock-of.js DELETED
@@ -1,19 +0,0 @@
1
- import MockDatePackage from "mockdate";
2
- import { mockDeep } from "vitest-mock-extended";
3
- //#region src/mock/mock-of-date.ts
4
- /**
5
- * Freeze or reset the global Date for deterministic time-dependent tests.
6
- * Wraps the `mockdate` package.
7
- */
8
- const mockOfDate = MockDatePackage;
9
- //#endregion
10
- //#region src/mock/mock-of.ts
11
- /**
12
- * Create a deep mock proxy for a given type.
13
- * Wraps `vitest-mock-extended`'s `mockDeep` for convenient port mocking.
14
- */
15
- const mockOf = mockDeep;
16
- //#endregion
17
- export { mockOfDate as n, mockOf as t };
18
-
19
- //# sourceMappingURL=mock-of.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mock-of.js","names":[],"sources":["../src/mock/mock-of-date.ts","../src/mock/mock-of.ts"],"sourcesContent":["import MockDatePackage from 'mockdate';\n\n/** Interface for freezing and resetting the global Date in tests. */\nexport interface MockDatePort {\n /** Restore the real Date object. */\n reset: () => void;\n /** Freeze `Date.now()` and `new Date()` to the given value. */\n set: (date: Date | number | string) => void;\n}\n\n/**\n * Freeze or reset the global Date for deterministic time-dependent tests.\n * Wraps the `mockdate` package.\n */\nexport const mockOfDate: MockDatePort = MockDatePackage;\n","import { type DeepMockProxy, mockDeep } from 'vitest-mock-extended';\n\n/** Factory signature that creates a deep mock proxy for any interface. */\nexport type MockPort = <T>() => DeepMockProxy<T>;\n\n/**\n * Create a deep mock proxy for a given type.\n * Wraps `vitest-mock-extended`'s `mockDeep` for convenient port mocking.\n */\nexport const mockOf: MockPort = mockDeep;\n"],"mappings":";;;;;;;AAcA,MAAa,aAA2B;;;;;;;ACLxC,MAAa,SAAmB"}
package/dist/mock.cjs DELETED
@@ -1,4 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_mock_of = require("./mock-of.cjs");
3
- exports.mockOf = require_mock_of.mockOf;
4
- exports.mockOfDate = require_mock_of.mockOfDate;
package/dist/mock.d.cts DELETED
@@ -1,2 +0,0 @@
1
- import { i as mockOfDate, n as mockOf, r as MockDatePort, t as MockPort } from "./mock-of.cjs";
2
- export { type MockDatePort, type MockPort, mockOf, mockOfDate };
package/dist/mock.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { i as mockOfDate, n as mockOf, r as MockDatePort, t as MockPort } from "./mock-of.js";
2
- export { type MockDatePort, type MockPort, mockOf, mockOfDate };
package/dist/mock.js DELETED
@@ -1,2 +0,0 @@
1
- import { n as mockOfDate, t as mockOf } from "./mock-of.js";
2
- export { mockOf, mockOfDate };
package/dist/services.cjs DELETED
@@ -1,5 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sqlite = require("./sqlite.cjs");
3
- exports.postgres = require_sqlite.postgres;
4
- exports.redis = require_sqlite.redis;
5
- exports.sqlite = require_sqlite.sqlite;
@@ -1,2 +0,0 @@
1
- import { a as PostgresOptions, i as redis, n as sqlite, o as postgres, r as RedisOptions, t as SqliteOptions } from "./sqlite.cjs";
2
- export { type PostgresOptions, type RedisOptions, type SqliteOptions, postgres, redis, sqlite };
@@ -1,2 +0,0 @@
1
- import { a as PostgresOptions, i as redis, n as sqlite, o as postgres, r as RedisOptions, t as SqliteOptions } from "./sqlite.js";
2
- export { type PostgresOptions, type RedisOptions, type SqliteOptions, postgres, redis, sqlite };
package/dist/services.js DELETED
@@ -1,2 +0,0 @@
1
- import { n as redis, r as postgres, t as sqlite } from "./sqlite.js";
2
- export { postgres, redis, sqlite };