aws-sdk-vitest-mock 1.0.0 → 1.0.2

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 (3) hide show
  1. package/index.cjs +6 -6
  2. package/index.js +191 -178
  3. package/package.json +3 -2
package/index.cjs CHANGED
@@ -1,18 +1,18 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("vitest"),$=require("./matchers-CNhdB_9q.cjs"),W=require("node:fs"),C=require("node:path"),I=require("node:stream");class d extends Error{constructor(t,o,s,n){super(t),this.name=o,this.code=o,this.statusCode=s,this.retryable=n}}const T=e=>new d(e?`The specified key does not exist. Key: ${e}`:"The specified key does not exist.","NoSuchKey",404,!1),M=e=>new d(e?`The specified bucket does not exist. Bucket: ${e}`:"The specified bucket does not exist.","NoSuchBucket",404,!1),K=e=>new d(e?`Access Denied for resource: ${e}`:"Access Denied","AccessDenied",403,!1),A=e=>new d(e?`Requested resource not found: ${e}`:"Requested resource not found","ResourceNotFoundException",400,!1),B=()=>new d("The conditional request failed","ConditionalCheckFailedException",400,!1),J=()=>new d("Rate exceeded","Throttling",400,!0),q=()=>new d("We encountered an internal error. Please try again.","InternalServerError",500,!0),_=e=>{try{return JSON.stringify(e,void 0,2)}catch{return typeof e=="object"&&e!==null?"[Complex Object]":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):"[Non-serializable value]"}},k=(e,t)=>{const o=$.colors.magenta("aws-sdk-vitest-mock(debug):");if(t===void 0)console.log(`${o} ${e}`);else{const s=_(t);console.log(`${o} ${e}
2
- ${s}`)}},w=(e=!1)=>({enabled:e,explicitlySet:!1,log(t,o){this.enabled&&k(t,o)},logDirect(t,o){k(t,o)}}),z=e=>{e.enabled=!0,e.explicitlySet=!0},V=e=>{e.enabled=!1,e.explicitlySet=!0},G=e=>{const t=C.resolve(e);try{const o=W.readFileSync(t,"utf8");if(e.endsWith(".json"))try{return JSON.parse(o)}catch(s){const n=s instanceof Error?s.message:String(s);throw new Error(`Failed to parse JSON fixture at ${t}: ${n}`)}return o}catch(o){const s=o instanceof Error?o.message:String(o);throw new Error(`Failed to load fixture at ${t}: ${s}`)}},U=(e,t={})=>{const{pageSize:o=10,tokenKey:s="NextToken",itemsKey:n="Items"}=t;if(e.length===0)return[{[n]:[]}];const c=[];for(let r=0;r<e.length;r+=o){const i=e.slice(r,r+o),l=r+o<e.length,u={[n]:i};if(l){const a=u,f=i[i.length-1];a[s]=f}c.push(u)}return c},H=()=>typeof process<"u"&&process.versions?.node?"node":typeof process<"u"&&process.versions?.bun?"bun":"browser",Q=e=>{const t=typeof e=="string"?Buffer.from(e,"utf8"):Buffer.from(e);let o=!1;return new I.Readable({read(){o||(this.push(t),this.push(null),o=!0)}})},X=e=>{let t;return typeof e=="string"?t=new TextEncoder().encode(e):e instanceof Buffer?t=new Uint8Array(e):t=e,new ReadableStream({start(o){o.enqueue(t),o.close()}})},S=e=>{const t=H();return t==="node"||t==="bun"?Q(e):X(e)};let D=!1;function Y(e){D=e}function b(e){return e.explicitlySet?e.enabled:D}function E(e,t){return Object.keys(t).every(o=>{const s=t[o],n=e[o];return s&&typeof s=="object"&&!Array.isArray(s)?typeof n!="object"||n===null?!1:E(n,s):n===s})}function N(e,t){if(e===t)return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return e===t;const o=Object.keys(e),s=Object.keys(t);return o.length!==s.length?!1:s.every(n=>{if(!Object.prototype.hasOwnProperty.call(e,n))return!1;const c=e,r=t,i=c[n],l=r[n];return typeof i=="object"&&i!==null&&typeof l=="object"&&l!==null?N(i,l):i===l})}function Z(e,t,o){const s=t.map((c,r)=>{const i=c.matcher?JSON.stringify(c.matcher,void 0,2):"any input",l=c.strict?" (strict mode)":"";return` Mock #${r+1}: ${i}${l}`}).join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("vitest"),D=require("./matchers-CNhdB_9q.cjs"),W=require("node:fs"),C=require("node:path"),A=require("node:stream");class d extends Error{constructor(r,o,c,n){super(r),this.name=o,this.code=o,this.statusCode=c,this.retryable=n}}const T=e=>new d(e?`The specified key does not exist. Key: ${e}`:"The specified key does not exist.","NoSuchKey",404,!1),I=e=>new d(e?`The specified bucket does not exist. Bucket: ${e}`:"The specified bucket does not exist.","NoSuchBucket",404,!1),M=e=>new d(e?`Access Denied for resource: ${e}`:"Access Denied","AccessDenied",403,!1),K=e=>new d(e?`Requested resource not found: ${e}`:"Requested resource not found","ResourceNotFoundException",400,!1),B=()=>new d("The conditional request failed","ConditionalCheckFailedException",400,!1),J=()=>new d("Rate exceeded","Throttling",400,!0),q=()=>new d("We encountered an internal error. Please try again.","InternalServerError",500,!0),_=e=>{try{return JSON.stringify(e,void 0,2)}catch{return typeof e=="object"&&e!==null?"[Complex Object]":typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):"[Non-serializable value]"}},j=(e,r)=>{const o=D.colors.magenta("aws-sdk-vitest-mock(debug):");if(r===void 0)console.log(`${o} ${e}`);else{const c=_(r);console.log(`${o} ${e}
2
+ ${c}`)}},E=(e=!1)=>({enabled:e,explicitlySet:!1,log(r,o){this.enabled&&j(r,o)},logDirect(r,o){j(r,o)}}),z=e=>{e.enabled=!0,e.explicitlySet=!0},V=e=>{e.enabled=!1,e.explicitlySet=!0},G=e=>{const r=C.resolve(e);try{const o=W.readFileSync(r,"utf8");if(e.endsWith(".json"))try{return JSON.parse(o)}catch(c){const n=c instanceof Error?c.message:String(c);throw new Error(`Failed to parse JSON fixture at ${r}: ${n}`)}return o}catch(o){const c=o instanceof Error?o.message:String(o);throw new Error(`Failed to load fixture at ${r}: ${c}`)}},U=(e,r={})=>{const{pageSize:o=10,tokenKey:c="NextToken",itemsKey:n="Items"}=r;if(e.length===0)return[{[n]:[]}];const s=[];for(let t=0;t<e.length;t+=o){const i=e.slice(t,t+o),l=t+o<e.length,u={[n]:i};if(l){const a=u,f=i[i.length-1];a[c]=f}s.push(u)}return s},H=()=>typeof process<"u"&&process.versions?.node?"node":typeof process<"u"&&process.versions?.bun?"bun":"browser",Q=e=>{const r=typeof e=="string"?Buffer.from(e,"utf8"):Buffer.from(e);let o=!1;return new A.Readable({read(){o||(this.push(r),this.push(null),o=!0)}})},X=e=>{let r;return typeof e=="string"?r=new TextEncoder().encode(e):e instanceof Buffer?r=new Uint8Array(e):r=e,new ReadableStream({start(o){o.enqueue(r),o.close()}})},$=e=>{const r=H();return r==="node"||r==="bun"?Q(e):X(e)};let N=!1;function Y(e){N=e}function p(e){return e.explicitlySet?e.enabled:N}function m(e,r){return Object.keys(r).every(o=>{const c=r[o],n=e[o];return Array.isArray(c)?!Array.isArray(n)||c.length>n.length?!1:c.every((s,t)=>{const i=n[t];return s&&typeof s=="object"&&typeof i=="object"&&i!==null?m(i,s):i===s}):c&&typeof c=="object"&&!Array.isArray(c)?typeof n!="object"||n===null?!1:m(n,c):n===c})}function v(e,r){if(e===r)return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return e===r;if(Array.isArray(e)&&Array.isArray(r))return e.length!==r.length?!1:e.every((n,s)=>{const t=r[s];return typeof n=="object"&&n!==null&&typeof t=="object"&&t!==null?v(n,t):n===t});if(Array.isArray(e)!==Array.isArray(r))return!1;const o=Object.keys(e),c=Object.keys(r);return o.length!==c.length?!1:c.every(n=>{if(!Object.prototype.hasOwnProperty.call(e,n))return!1;const s=e,t=r,i=s[n],l=t[n];return typeof i=="object"&&i!==null&&typeof l=="object"&&l!==null?v(i,l):i===l})}function Z(e,r,o){const c=r.map((s,t)=>{const i=s.matcher?JSON.stringify(s.matcher,void 0,2):"any input",l=s.strict?" (strict mode)":"";return` Mock #${t+1}: ${i}${l}`}).join(`
3
3
  `),n=JSON.stringify(o,void 0,2);return new Error(`No matching mock found for ${e}.
4
4
 
5
- Found ${t.length} mock(s) but none matched the input.
5
+ Found ${r.length} mock(s) but none matched the input.
6
6
 
7
7
  Configured mocks:
8
- ${s}
8
+ ${c}
9
9
 
10
10
  Received input:
11
11
  ${n}
12
12
 
13
- Tip: Enable debug mode with enableDebug() for detailed matching information.`)}function ee(e,t){const o=JSON.stringify(t,void 0,2);return new Error(`No mock configured for command: ${e}.
13
+ Tip: Enable debug mode with enableDebug() for detailed matching information.`)}function ee(e,r){const o=JSON.stringify(r,void 0,2);return new Error(`No mock configured for command: ${e}.
14
14
 
15
15
  Received input:
16
16
  ${o}
17
17
 
18
- Did you forget to call mockClient.on(${e})?`)}function te(e,t){return e.findIndex(o=>o.strict?o.matcher&&N(t,o.matcher):!o.matcher||E(t,o.matcher))}function x(e){return async function(t){const o=()=>this,s=b(e.debugLogger),n=t.constructor.name;s&&e.debugLogger.logDirect(`Received command: ${n}`,t.input);const c=e.map.get(t.constructor);if(!c)throw s&&e.debugLogger.logDirect(`No mocks configured for ${n}`),ee(n,t.input);s&&e.debugLogger.logDirect(`Found ${c.length} mock(s) for ${n}`);const r=te(c,t.input);if(r===-1)throw s&&e.debugLogger.logDirect(`No matching mock found for ${n}`,t.input),Z(n,c,t.input);const i=c[r];if(!i)throw new Error(`Mock at index ${r} not found`);return s&&e.debugLogger.logDirect(`Using mock at index ${r} for ${n}`),i.once&&(c.splice(r,1),s&&e.debugLogger.logDirect(`Removed one-time mock for ${n}`)),i.handler(t.input,o())}}const L=(e,t,o)=>({reset(){b(e.debugLogger)&&e.debugLogger.logDirect(o.reset),t.mockClear()},restore(){b(e.debugLogger)&&e.debugLogger.logDirect(o.restore),t.mockRestore(),e.map=new WeakMap},calls(){return t.mock.calls.map(s=>s[0])},__rawCalls(){return t.mock.calls},enableDebug(){z(e.debugLogger)},disableDebug(){V(e.debugLogger)}});function R(e,t,o,s={}){const n=(r,i,l)=>{const u={matcher:o,handler:r,once:i,strict:!!s.strict},a=e.map.get(t)??[],f=b(e.debugLogger);if(i){const g=a.findIndex(h=>!h.once);g===-1?a.push(u):a.splice(g,0,u),e.map.set(t,a),f&&e.debugLogger.logDirect(`Configured ${l}Once for ${t.name}`,o?{matcher:o,strict:!!s.strict}:void 0)}else{const g=a.filter(h=>h.once||JSON.stringify(h.matcher)!==JSON.stringify(o));g.push(u),e.map.set(t,g),f&&e.debugLogger.logDirect(`Configured ${l} for ${t.name}`,o?{matcher:o,strict:!!s.strict}:void 0)}},c={resolves(r){return n(()=>Promise.resolve(r),!1,"resolves"),c},rejects(r){return n(()=>{const i=typeof r=="string"?new Error(r):r;return Promise.reject(i)},!1,"rejects"),c},callsFake(r){return n(r,!1,"callsFake"),c},resolvesOnce(r){return n(()=>Promise.resolve(r),!0,"resolves"),c},rejectsOnce(r){return n(()=>{const i=typeof r=="string"?new Error(r):r;return Promise.reject(i)},!0,"rejects"),c},callsFakeOnce(r){return n(r,!0,"callsFake"),c},resolvesStream(r){return n(()=>Promise.resolve({Body:S(r)}),!1,"resolvesStream"),c},resolvesStreamOnce(r){return n(()=>Promise.resolve({Body:S(r)}),!0,"resolvesStream"),c},resolvesWithDelay(r,i){const l=u=>{setTimeout(()=>u(r),i)};return n(()=>new Promise(l),!1,"resolvesWithDelay"),c},rejectsWithDelay(r,i){const l=typeof r=="string"?new Error(r):r,u=(a,f)=>{setTimeout(()=>f(l),i)};return n(()=>new Promise(u),!1,"rejectsWithDelay"),c},rejectsWithNoSuchKey(r){return n(()=>Promise.reject(T(r)),!1,"rejectsWithNoSuchKey"),c},rejectsWithNoSuchBucket(r){return n(()=>Promise.reject(M(r)),!1,"rejectsWithNoSuchBucket"),c},rejectsWithAccessDenied(r){return n(()=>Promise.reject(K(r)),!1,"rejectsWithAccessDenied"),c},rejectsWithResourceNotFound(r){return n(()=>Promise.reject(A(r)),!1,"rejectsWithResourceNotFound"),c},rejectsWithConditionalCheckFailed(){return n(()=>Promise.reject(B()),!1,"rejectsWithConditionalCheckFailed"),c},rejectsWithThrottling(){return n(()=>Promise.reject(J()),!1,"rejectsWithThrottling"),c},rejectsWithInternalServerError(){return n(()=>Promise.reject(q()),!1,"rejectsWithInternalServerError"),c},resolvesPaginated(r,i={}){const l=U(r,i);let u=0;return e.debugLogger.log(`Configured resolvesPaginated for ${t.name}`,{pageSize:i.pageSize,itemsCount:r.length}),n(a=>{const f=i.tokenKey||"NextToken",g=i.inputTokenKey||f,m=a[g];if(m!=null){const F=i.itemsKey||"Items";let v=0;for(const O of l){const p=O[F];if(p&&p.length>0){const P=p[p.length-1];if(JSON.stringify(P)===JSON.stringify(m)){u=v+1;break}}v++}}else u=0;const y=l[u]||l[l.length-1]||l[0];if(!y)throw new Error("No paginated responses available");return u=Math.min(u+1,l.length-1),Promise.resolve(y)},!1,"resolvesPaginated"),c},resolvesFromFile(r){return e.debugLogger.log(`Configured resolvesFromFile for ${t.name}`,{filePath:r}),n(()=>{const i=G(r);return Promise.resolve(i)},!1,"resolvesFromFile"),c}};return c}const re=e=>{const t={map:new WeakMap,debugLogger:w()},o=e.prototype,s=j.vi.spyOn(o,"send").mockImplementation(x(t)),n=L(t,s,{reset:"Clearing call history (mocks preserved)",restore:"Restoring original client behavior and clearing all mocks"});return{client:void 0,on:(r,i,l)=>R(t,r,i,l),...n}},oe=e=>{const t={map:new WeakMap,debugLogger:w()},o=j.vi.spyOn(e,"send").mockImplementation(x(t)),s=L(t,o,{reset:"Clearing call history (mocks preserved) for client instance",restore:"Restoring original client behavior and clearing all mocks for client instance"});return{client:e,on:(c,r,i)=>R(t,c,r,i),...s}};exports.matchers=$.matchers;exports.mockClient=re;exports.mockClientInstance=oe;exports.setGlobalDebug=Y;
18
+ Did you forget to call mockClient.on(${e})?`)}function re(e,r){return e.findIndex(o=>o.strict?o.matcher&&v(r,o.matcher):!o.matcher||m(r,o.matcher))}function x(e){return async function(r){const o=()=>this,c=p(e.debugLogger),n=r.constructor.name;c&&e.debugLogger.logDirect(`Received command: ${n}`,r.input);const s=e.map.get(r.constructor);if(!s)throw c&&e.debugLogger.logDirect(`No mocks configured for ${n}`),ee(n,r.input);c&&e.debugLogger.logDirect(`Found ${s.length} mock(s) for ${n}`);const t=re(s,r.input);if(t===-1)throw c&&e.debugLogger.logDirect(`No matching mock found for ${n}`,r.input),Z(n,s,r.input);const i=s[t];if(!i)throw new Error(`Mock at index ${t} not found`);return c&&e.debugLogger.logDirect(`Using mock at index ${t} for ${n}`),i.once&&(s.splice(t,1),c&&e.debugLogger.logDirect(`Removed one-time mock for ${n}`)),i.handler(r.input,o())}}const L=(e,r,o)=>({reset(){p(e.debugLogger)&&e.debugLogger.logDirect(o.reset),r.mockClear()},restore(){p(e.debugLogger)&&e.debugLogger.logDirect(o.restore),r.mockRestore(),e.map=new WeakMap},calls(){return r.mock.calls.map(c=>c[0])},__rawCalls(){return r.mock.calls},enableDebug(){z(e.debugLogger)},disableDebug(){V(e.debugLogger)}});function R(e,r,o,c={}){const n=(t,i,l)=>{const u={matcher:o,handler:t,once:i,strict:!!c.strict},a=e.map.get(r)??[],f=p(e.debugLogger);if(i){const g=a.findIndex(h=>!h.once);g===-1?a.push(u):a.splice(g,0,u),e.map.set(r,a),f&&e.debugLogger.logDirect(`Configured ${l}Once for ${r.name}`,o?{matcher:o,strict:!!c.strict}:void 0)}else{const g=a.filter(h=>h.once||JSON.stringify(h.matcher)!==JSON.stringify(o));g.push(u),e.map.set(r,g),f&&e.debugLogger.logDirect(`Configured ${l} for ${r.name}`,o?{matcher:o,strict:!!c.strict}:void 0)}},s={resolves(t){return n(()=>Promise.resolve(t),!1,"resolves"),s},rejects(t){return n(()=>{const i=typeof t=="string"?new Error(t):t;return Promise.reject(i)},!1,"rejects"),s},callsFake(t){return n(t,!1,"callsFake"),s},resolvesOnce(t){return n(()=>Promise.resolve(t),!0,"resolves"),s},rejectsOnce(t){return n(()=>{const i=typeof t=="string"?new Error(t):t;return Promise.reject(i)},!0,"rejects"),s},callsFakeOnce(t){return n(t,!0,"callsFake"),s},resolvesStream(t){return n(()=>Promise.resolve({Body:$(t)}),!1,"resolvesStream"),s},resolvesStreamOnce(t){return n(()=>Promise.resolve({Body:$(t)}),!0,"resolvesStream"),s},resolvesWithDelay(t,i){const l=u=>{setTimeout(()=>u(t),i)};return n(()=>new Promise(l),!1,"resolvesWithDelay"),s},rejectsWithDelay(t,i){const l=typeof t=="string"?new Error(t):t,u=(a,f)=>{setTimeout(()=>f(l),i)};return n(()=>new Promise(u),!1,"rejectsWithDelay"),s},rejectsWithNoSuchKey(t){return n(()=>Promise.reject(T(t)),!1,"rejectsWithNoSuchKey"),s},rejectsWithNoSuchBucket(t){return n(()=>Promise.reject(I(t)),!1,"rejectsWithNoSuchBucket"),s},rejectsWithAccessDenied(t){return n(()=>Promise.reject(M(t)),!1,"rejectsWithAccessDenied"),s},rejectsWithResourceNotFound(t){return n(()=>Promise.reject(K(t)),!1,"rejectsWithResourceNotFound"),s},rejectsWithConditionalCheckFailed(){return n(()=>Promise.reject(B()),!1,"rejectsWithConditionalCheckFailed"),s},rejectsWithThrottling(){return n(()=>Promise.reject(J()),!1,"rejectsWithThrottling"),s},rejectsWithInternalServerError(){return n(()=>Promise.reject(q()),!1,"rejectsWithInternalServerError"),s},resolvesPaginated(t,i={}){const l=U(t,i);let u=0;return e.debugLogger.log(`Configured resolvesPaginated for ${r.name}`,{pageSize:i.pageSize,itemsCount:t.length}),n(a=>{const f=i.tokenKey||"NextToken",g=i.inputTokenKey||f,b=a[g];if(b!=null){const F=i.itemsKey||"Items";let S=0;for(const O of l){const y=O[F];if(y&&y.length>0){const P=y[y.length-1];if(JSON.stringify(P)===JSON.stringify(b)){u=S+1;break}}S++}}else u=0;const k=l[u]||l[l.length-1]||l[0];if(!k)throw new Error("No paginated responses available");return u=Math.min(u+1,l.length-1),Promise.resolve(k)},!1,"resolvesPaginated"),s},resolvesFromFile(t){return e.debugLogger.log(`Configured resolvesFromFile for ${r.name}`,{filePath:t}),n(()=>{const i=G(t);return Promise.resolve(i)},!1,"resolvesFromFile"),s}};return s}const te=e=>{const r={map:new WeakMap,debugLogger:E()},o=e.prototype,c=w.vi.spyOn(o,"send").mockImplementation(x(r)),n=L(r,c,{reset:"Clearing call history (mocks preserved)",restore:"Restoring original client behavior and clearing all mocks"});return{client:void 0,on:(t,i,l)=>R(r,t,i,l),...n}},oe=e=>{const r={map:new WeakMap,debugLogger:E()},o=w.vi.spyOn(e,"send").mockImplementation(x(r)),c=L(r,o,{reset:"Clearing call history (mocks preserved) for client instance",restore:"Restoring original client behavior and clearing all mocks for client instance"});return{client:e,on:(s,t,i)=>R(r,s,t,i),...c}};exports.matchers=D.matchers;exports.mockClient=te;exports.mockClientInstance=oe;exports.setGlobalDebug=Y;
package/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { vi as j } from "vitest";
1
+ import { vi as w } from "vitest";
2
2
  import { c as O } from "./matchers-DmTtFk31.js";
3
3
  import { m as ge } from "./matchers-DmTtFk31.js";
4
4
  import { readFileSync as P } from "node:fs";
5
- import C from "node:path";
6
- import { Readable as I } from "node:stream";
5
+ import A from "node:path";
6
+ import { Readable as C } from "node:stream";
7
7
  class d extends Error {
8
- constructor(t, o, s, n) {
9
- super(t), this.name = o, this.code = o, this.statusCode = s, this.retryable = n;
8
+ constructor(r, o, c, n) {
9
+ super(r), this.name = o, this.code = o, this.statusCode = c, this.retryable = n;
10
10
  }
11
11
  }
12
12
  const T = (e) => new d(
@@ -14,17 +14,17 @@ const T = (e) => new d(
14
14
  "NoSuchKey",
15
15
  404,
16
16
  !1
17
- ), M = (e) => new d(
17
+ ), I = (e) => new d(
18
18
  e ? `The specified bucket does not exist. Bucket: ${e}` : "The specified bucket does not exist.",
19
19
  "NoSuchBucket",
20
20
  404,
21
21
  !1
22
- ), K = (e) => new d(
22
+ ), M = (e) => new d(
23
23
  e ? `Access Denied for resource: ${e}` : "Access Denied",
24
24
  "AccessDenied",
25
25
  403,
26
26
  !1
27
- ), A = (e) => new d(
27
+ ), K = (e) => new d(
28
28
  e ? `Requested resource not found: ${e}` : "Requested resource not found",
29
29
  "ResourceNotFoundException",
30
30
  400,
@@ -45,119 +45,132 @@ const T = (e) => new d(
45
45
  } catch {
46
46
  return typeof e == "object" && e !== null ? "[Complex Object]" : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : "[Non-serializable value]";
47
47
  }
48
- }, k = (e, t) => {
48
+ }, S = (e, r) => {
49
49
  const o = O.magenta("aws-sdk-vitest-mock(debug):");
50
- if (t === void 0)
50
+ if (r === void 0)
51
51
  console.log(`${o} ${e}`);
52
52
  else {
53
- const s = z(t);
53
+ const c = z(r);
54
54
  console.log(`${o} ${e}
55
- ${s}`);
55
+ ${c}`);
56
56
  }
57
- }, $ = (e = !1) => ({
57
+ }, E = (e = !1) => ({
58
58
  enabled: e,
59
59
  explicitlySet: !1,
60
- log(t, o) {
61
- this.enabled && k(t, o);
60
+ log(r, o) {
61
+ this.enabled && S(r, o);
62
62
  },
63
- logDirect(t, o) {
64
- k(t, o);
63
+ logDirect(r, o) {
64
+ S(r, o);
65
65
  }
66
66
  }), V = (e) => {
67
67
  e.enabled = !0, e.explicitlySet = !0;
68
68
  }, _ = (e) => {
69
69
  e.enabled = !1, e.explicitlySet = !0;
70
70
  }, U = (e) => {
71
- const t = C.resolve(e);
71
+ const r = A.resolve(e);
72
72
  try {
73
- const o = P(t, "utf8");
73
+ const o = P(r, "utf8");
74
74
  if (e.endsWith(".json"))
75
75
  try {
76
76
  return JSON.parse(o);
77
- } catch (s) {
78
- const n = s instanceof Error ? s.message : String(s);
77
+ } catch (c) {
78
+ const n = c instanceof Error ? c.message : String(c);
79
79
  throw new Error(
80
- `Failed to parse JSON fixture at ${t}: ${n}`
80
+ `Failed to parse JSON fixture at ${r}: ${n}`
81
81
  );
82
82
  }
83
83
  return o;
84
84
  } catch (o) {
85
- const s = o instanceof Error ? o.message : String(o);
86
- throw new Error(`Failed to load fixture at ${t}: ${s}`);
85
+ const c = o instanceof Error ? o.message : String(o);
86
+ throw new Error(`Failed to load fixture at ${r}: ${c}`);
87
87
  }
88
- }, G = (e, t = {}) => {
89
- const { pageSize: o = 10, tokenKey: s = "NextToken", itemsKey: n = "Items" } = t;
88
+ }, G = (e, r = {}) => {
89
+ const { pageSize: o = 10, tokenKey: c = "NextToken", itemsKey: n = "Items" } = r;
90
90
  if (e.length === 0)
91
91
  return [{ [n]: [] }];
92
- const c = [];
93
- for (let r = 0; r < e.length; r += o) {
94
- const i = e.slice(r, r + o), l = r + o < e.length, u = { [n]: i };
92
+ const s = [];
93
+ for (let t = 0; t < e.length; t += o) {
94
+ const i = e.slice(t, t + o), l = t + o < e.length, u = { [n]: i };
95
95
  if (l) {
96
96
  const a = u, f = i[i.length - 1];
97
- a[s] = f;
97
+ a[c] = f;
98
98
  }
99
- c.push(u);
99
+ s.push(u);
100
100
  }
101
- return c;
101
+ return s;
102
102
  }, H = () => typeof process < "u" && process.versions?.node ? "node" : typeof process < "u" && process.versions?.bun ? "bun" : "browser", Q = (e) => {
103
- const t = typeof e == "string" ? Buffer.from(e, "utf8") : Buffer.from(e);
103
+ const r = typeof e == "string" ? Buffer.from(e, "utf8") : Buffer.from(e);
104
104
  let o = !1;
105
- return new I({
105
+ return new C({
106
106
  read() {
107
- o || (this.push(t), this.push(null), o = !0);
107
+ o || (this.push(r), this.push(null), o = !0);
108
108
  }
109
109
  });
110
110
  }, X = (e) => {
111
- let t;
112
- return typeof e == "string" ? t = new TextEncoder().encode(e) : e instanceof Buffer ? t = new Uint8Array(e) : t = e, new ReadableStream({
111
+ let r;
112
+ return typeof e == "string" ? r = new TextEncoder().encode(e) : e instanceof Buffer ? r = new Uint8Array(e) : r = e, new ReadableStream({
113
113
  start(o) {
114
- o.enqueue(t), o.close();
114
+ o.enqueue(r), o.close();
115
115
  }
116
116
  });
117
- }, S = (e) => {
118
- const t = H();
119
- return t === "node" || t === "bun" ? Q(e) : X(e);
117
+ }, $ = (e) => {
118
+ const r = H();
119
+ return r === "node" || r === "bun" ? Q(e) : X(e);
120
120
  };
121
- let w = !1;
121
+ let N = !1;
122
122
  function ie(e) {
123
- w = e;
123
+ N = e;
124
124
  }
125
- function m(e) {
126
- return e.explicitlySet ? e.enabled : w;
125
+ function y(e) {
126
+ return e.explicitlySet ? e.enabled : N;
127
127
  }
128
- function E(e, t) {
129
- return Object.keys(t).every((o) => {
130
- const s = t[o], n = e[o];
131
- return s && typeof s == "object" && !Array.isArray(s) ? typeof n != "object" || n === null ? !1 : E(
128
+ function m(e, r) {
129
+ return Object.keys(r).every((o) => {
130
+ const c = r[o], n = e[o];
131
+ return Array.isArray(c) ? !Array.isArray(n) || c.length > n.length ? !1 : c.every((s, t) => {
132
+ const i = n[t];
133
+ return s && typeof s == "object" && typeof i == "object" && i !== null ? m(
134
+ i,
135
+ s
136
+ ) : i === s;
137
+ }) : c && typeof c == "object" && !Array.isArray(c) ? typeof n != "object" || n === null ? !1 : m(
132
138
  n,
133
- s
134
- ) : n === s;
139
+ c
140
+ ) : n === c;
135
141
  });
136
142
  }
137
- function N(e, t) {
138
- if (e === t) return !0;
139
- if (typeof e != "object" || e === null || typeof t != "object" || t === null)
140
- return e === t;
141
- const o = Object.keys(e), s = Object.keys(t);
142
- return o.length !== s.length ? !1 : s.every((n) => {
143
+ function v(e, r) {
144
+ if (e === r) return !0;
145
+ if (typeof e != "object" || e === null || typeof r != "object" || r === null)
146
+ return e === r;
147
+ if (Array.isArray(e) && Array.isArray(r))
148
+ return e.length !== r.length ? !1 : e.every((n, s) => {
149
+ const t = r[s];
150
+ return typeof n == "object" && n !== null && typeof t == "object" && t !== null ? v(n, t) : n === t;
151
+ });
152
+ if (Array.isArray(e) !== Array.isArray(r))
153
+ return !1;
154
+ const o = Object.keys(e), c = Object.keys(r);
155
+ return o.length !== c.length ? !1 : c.every((n) => {
143
156
  if (!Object.prototype.hasOwnProperty.call(e, n)) return !1;
144
- const c = e, r = t, i = c[n], l = r[n];
145
- return typeof i == "object" && i !== null && typeof l == "object" && l !== null ? N(i, l) : i === l;
157
+ const s = e, t = r, i = s[n], l = t[n];
158
+ return typeof i == "object" && i !== null && typeof l == "object" && l !== null ? v(i, l) : i === l;
146
159
  });
147
160
  }
148
- function Y(e, t, o) {
149
- const s = t.map((c, r) => {
150
- const i = c.matcher ? JSON.stringify(c.matcher, void 0, 2) : "any input", l = c.strict ? " (strict mode)" : "";
151
- return ` Mock #${r + 1}: ${i}${l}`;
161
+ function Y(e, r, o) {
162
+ const c = r.map((s, t) => {
163
+ const i = s.matcher ? JSON.stringify(s.matcher, void 0, 2) : "any input", l = s.strict ? " (strict mode)" : "";
164
+ return ` Mock #${t + 1}: ${i}${l}`;
152
165
  }).join(`
153
166
  `), n = JSON.stringify(o, void 0, 2);
154
167
  return new Error(
155
168
  `No matching mock found for ${e}.
156
169
 
157
- Found ${t.length} mock(s) but none matched the input.
170
+ Found ${r.length} mock(s) but none matched the input.
158
171
 
159
172
  Configured mocks:
160
- ${s}
173
+ ${c}
161
174
 
162
175
  Received input:
163
176
  ${n}
@@ -165,8 +178,8 @@ ${n}
165
178
  Tip: Enable debug mode with enableDebug() for detailed matching information.`
166
179
  );
167
180
  }
168
- function Z(e, t) {
169
- const o = JSON.stringify(t, void 0, 2);
181
+ function Z(e, r) {
182
+ const o = JSON.stringify(r, void 0, 2);
170
183
  return new Error(
171
184
  `No mock configured for command: ${e}.
172
185
 
@@ -176,54 +189,54 @@ ${o}
176
189
  Did you forget to call mockClient.on(${e})?`
177
190
  );
178
191
  }
179
- function ee(e, t) {
180
- return e.findIndex((o) => o.strict ? o.matcher && N(t, o.matcher) : !o.matcher || E(t, o.matcher));
192
+ function ee(e, r) {
193
+ return e.findIndex((o) => o.strict ? o.matcher && v(r, o.matcher) : !o.matcher || m(r, o.matcher));
181
194
  }
182
195
  function x(e) {
183
- return async function(t) {
184
- const o = () => this, s = m(e.debugLogger), n = t.constructor.name;
185
- s && e.debugLogger.logDirect(
196
+ return async function(r) {
197
+ const o = () => this, c = y(e.debugLogger), n = r.constructor.name;
198
+ c && e.debugLogger.logDirect(
186
199
  `Received command: ${n}`,
187
- t.input
200
+ r.input
188
201
  );
189
- const c = e.map.get(
190
- t.constructor
202
+ const s = e.map.get(
203
+ r.constructor
191
204
  );
192
- if (!c)
193
- throw s && e.debugLogger.logDirect(
205
+ if (!s)
206
+ throw c && e.debugLogger.logDirect(
194
207
  `No mocks configured for ${n}`
195
- ), Z(n, t.input);
196
- s && e.debugLogger.logDirect(
197
- `Found ${c.length} mock(s) for ${n}`
208
+ ), Z(n, r.input);
209
+ c && e.debugLogger.logDirect(
210
+ `Found ${s.length} mock(s) for ${n}`
198
211
  );
199
- const r = ee(c, t.input);
200
- if (r === -1)
201
- throw s && e.debugLogger.logDirect(
212
+ const t = ee(s, r.input);
213
+ if (t === -1)
214
+ throw c && e.debugLogger.logDirect(
202
215
  `No matching mock found for ${n}`,
203
- t.input
204
- ), Y(n, c, t.input);
205
- const i = c[r];
216
+ r.input
217
+ ), Y(n, s, r.input);
218
+ const i = s[t];
206
219
  if (!i)
207
- throw new Error(`Mock at index ${r} not found`);
208
- return s && e.debugLogger.logDirect(
209
- `Using mock at index ${r} for ${n}`
210
- ), i.once && (c.splice(r, 1), s && e.debugLogger.logDirect(
220
+ throw new Error(`Mock at index ${t} not found`);
221
+ return c && e.debugLogger.logDirect(
222
+ `Using mock at index ${t} for ${n}`
223
+ ), i.once && (s.splice(t, 1), c && e.debugLogger.logDirect(
211
224
  `Removed one-time mock for ${n}`
212
- )), i.handler(t.input, o());
225
+ )), i.handler(r.input, o());
213
226
  };
214
227
  }
215
- const D = (e, t, o) => ({
228
+ const D = (e, r, o) => ({
216
229
  reset() {
217
- m(e.debugLogger) && e.debugLogger.logDirect(o.reset), t.mockClear();
230
+ y(e.debugLogger) && e.debugLogger.logDirect(o.reset), r.mockClear();
218
231
  },
219
232
  restore() {
220
- m(e.debugLogger) && e.debugLogger.logDirect(o.restore), t.mockRestore(), e.map = /* @__PURE__ */ new WeakMap();
233
+ y(e.debugLogger) && e.debugLogger.logDirect(o.restore), r.mockRestore(), e.map = /* @__PURE__ */ new WeakMap();
221
234
  },
222
235
  calls() {
223
- return t.mock.calls.map((s) => s[0]);
236
+ return r.mock.calls.map((c) => c[0]);
224
237
  },
225
238
  __rawCalls() {
226
- return t.mock.calls;
239
+ return r.mock.calls;
227
240
  },
228
241
  enableDebug() {
229
242
  V(e.debugLogger);
@@ -232,240 +245,240 @@ const D = (e, t, o) => ({
232
245
  _(e.debugLogger);
233
246
  }
234
247
  });
235
- function L(e, t, o, s = {}) {
236
- const n = (r, i, l) => {
248
+ function L(e, r, o, c = {}) {
249
+ const n = (t, i, l) => {
237
250
  const u = {
238
251
  matcher: o,
239
- handler: r,
252
+ handler: t,
240
253
  once: i,
241
- strict: !!s.strict
242
- }, a = e.map.get(t) ?? [], f = m(e.debugLogger);
254
+ strict: !!c.strict
255
+ }, a = e.map.get(r) ?? [], f = y(e.debugLogger);
243
256
  if (i) {
244
257
  const g = a.findIndex((h) => !h.once);
245
258
  g === -1 ? a.push(u) : a.splice(g, 0, u), e.map.set(
246
- t,
259
+ r,
247
260
  a
248
261
  ), f && e.debugLogger.logDirect(
249
- `Configured ${l}Once for ${t.name}`,
250
- o ? { matcher: o, strict: !!s.strict } : void 0
262
+ `Configured ${l}Once for ${r.name}`,
263
+ o ? { matcher: o, strict: !!c.strict } : void 0
251
264
  );
252
265
  } else {
253
266
  const g = a.filter(
254
267
  (h) => h.once || JSON.stringify(h.matcher) !== JSON.stringify(o)
255
268
  );
256
269
  g.push(u), e.map.set(
257
- t,
270
+ r,
258
271
  g
259
272
  ), f && e.debugLogger.logDirect(
260
- `Configured ${l} for ${t.name}`,
261
- o ? { matcher: o, strict: !!s.strict } : void 0
273
+ `Configured ${l} for ${r.name}`,
274
+ o ? { matcher: o, strict: !!c.strict } : void 0
262
275
  );
263
276
  }
264
- }, c = {
265
- resolves(r) {
266
- return n(() => Promise.resolve(r), !1, "resolves"), c;
277
+ }, s = {
278
+ resolves(t) {
279
+ return n(() => Promise.resolve(t), !1, "resolves"), s;
267
280
  },
268
- rejects(r) {
281
+ rejects(t) {
269
282
  return n(
270
283
  () => {
271
- const i = typeof r == "string" ? new Error(r) : r;
284
+ const i = typeof t == "string" ? new Error(t) : t;
272
285
  return Promise.reject(i);
273
286
  },
274
287
  !1,
275
288
  "rejects"
276
- ), c;
289
+ ), s;
277
290
  },
278
- callsFake(r) {
279
- return n(r, !1, "callsFake"), c;
291
+ callsFake(t) {
292
+ return n(t, !1, "callsFake"), s;
280
293
  },
281
- resolvesOnce(r) {
282
- return n(() => Promise.resolve(r), !0, "resolves"), c;
294
+ resolvesOnce(t) {
295
+ return n(() => Promise.resolve(t), !0, "resolves"), s;
283
296
  },
284
- rejectsOnce(r) {
297
+ rejectsOnce(t) {
285
298
  return n(
286
299
  () => {
287
- const i = typeof r == "string" ? new Error(r) : r;
300
+ const i = typeof t == "string" ? new Error(t) : t;
288
301
  return Promise.reject(i);
289
302
  },
290
303
  !0,
291
304
  "rejects"
292
- ), c;
305
+ ), s;
293
306
  },
294
- callsFakeOnce(r) {
295
- return n(r, !0, "callsFake"), c;
307
+ callsFakeOnce(t) {
308
+ return n(t, !0, "callsFake"), s;
296
309
  },
297
- resolvesStream(r) {
310
+ resolvesStream(t) {
298
311
  return n(
299
312
  () => Promise.resolve({
300
- Body: S(r)
313
+ Body: $(t)
301
314
  }),
302
315
  !1,
303
316
  "resolvesStream"
304
- ), c;
317
+ ), s;
305
318
  },
306
- resolvesStreamOnce(r) {
319
+ resolvesStreamOnce(t) {
307
320
  return n(
308
321
  () => Promise.resolve({
309
- Body: S(r)
322
+ Body: $(t)
310
323
  }),
311
324
  !0,
312
325
  "resolvesStream"
313
- ), c;
326
+ ), s;
314
327
  },
315
- resolvesWithDelay(r, i) {
328
+ resolvesWithDelay(t, i) {
316
329
  const l = (u) => {
317
- setTimeout(() => u(r), i);
330
+ setTimeout(() => u(t), i);
318
331
  };
319
332
  return n(
320
333
  () => new Promise(l),
321
334
  !1,
322
335
  "resolvesWithDelay"
323
- ), c;
336
+ ), s;
324
337
  },
325
- rejectsWithDelay(r, i) {
326
- const l = typeof r == "string" ? new Error(r) : r, u = (a, f) => {
338
+ rejectsWithDelay(t, i) {
339
+ const l = typeof t == "string" ? new Error(t) : t, u = (a, f) => {
327
340
  setTimeout(() => f(l), i);
328
341
  };
329
- return n(() => new Promise(u), !1, "rejectsWithDelay"), c;
342
+ return n(() => new Promise(u), !1, "rejectsWithDelay"), s;
330
343
  },
331
- rejectsWithNoSuchKey(r) {
344
+ rejectsWithNoSuchKey(t) {
332
345
  return n(
333
- () => Promise.reject(T(r)),
346
+ () => Promise.reject(T(t)),
334
347
  !1,
335
348
  "rejectsWithNoSuchKey"
336
- ), c;
349
+ ), s;
337
350
  },
338
- rejectsWithNoSuchBucket(r) {
351
+ rejectsWithNoSuchBucket(t) {
339
352
  return n(
340
- () => Promise.reject(M(r)),
353
+ () => Promise.reject(I(t)),
341
354
  !1,
342
355
  "rejectsWithNoSuchBucket"
343
- ), c;
356
+ ), s;
344
357
  },
345
- rejectsWithAccessDenied(r) {
358
+ rejectsWithAccessDenied(t) {
346
359
  return n(
347
- () => Promise.reject(K(r)),
360
+ () => Promise.reject(M(t)),
348
361
  !1,
349
362
  "rejectsWithAccessDenied"
350
- ), c;
363
+ ), s;
351
364
  },
352
- rejectsWithResourceNotFound(r) {
365
+ rejectsWithResourceNotFound(t) {
353
366
  return n(
354
- () => Promise.reject(A(r)),
367
+ () => Promise.reject(K(t)),
355
368
  !1,
356
369
  "rejectsWithResourceNotFound"
357
- ), c;
370
+ ), s;
358
371
  },
359
372
  rejectsWithConditionalCheckFailed() {
360
373
  return n(
361
374
  () => Promise.reject(B()),
362
375
  !1,
363
376
  "rejectsWithConditionalCheckFailed"
364
- ), c;
377
+ ), s;
365
378
  },
366
379
  rejectsWithThrottling() {
367
380
  return n(
368
381
  () => Promise.reject(J()),
369
382
  !1,
370
383
  "rejectsWithThrottling"
371
- ), c;
384
+ ), s;
372
385
  },
373
386
  rejectsWithInternalServerError() {
374
387
  return n(
375
388
  () => Promise.reject(q()),
376
389
  !1,
377
390
  "rejectsWithInternalServerError"
378
- ), c;
391
+ ), s;
379
392
  },
380
- resolvesPaginated(r, i = {}) {
381
- const l = G(r, i);
393
+ resolvesPaginated(t, i = {}) {
394
+ const l = G(t, i);
382
395
  let u = 0;
383
396
  return e.debugLogger.log(
384
- `Configured resolvesPaginated for ${t.name}`,
385
- { pageSize: i.pageSize, itemsCount: r.length }
397
+ `Configured resolvesPaginated for ${r.name}`,
398
+ { pageSize: i.pageSize, itemsCount: t.length }
386
399
  ), n(
387
400
  (a) => {
388
401
  const f = i.tokenKey || "NextToken", g = i.inputTokenKey || f, b = a[g];
389
402
  if (b != null) {
390
403
  const R = i.itemsKey || "Items";
391
- let v = 0;
404
+ let j = 0;
392
405
  for (const F of l) {
393
406
  const p = F[R];
394
407
  if (p && p.length > 0) {
395
408
  const W = p[p.length - 1];
396
409
  if (JSON.stringify(W) === JSON.stringify(b)) {
397
- u = v + 1;
410
+ u = j + 1;
398
411
  break;
399
412
  }
400
413
  }
401
- v++;
414
+ j++;
402
415
  }
403
416
  } else
404
417
  u = 0;
405
- const y = (
418
+ const k = (
406
419
  // eslint-disable-next-line security/detect-object-injection
407
420
  l[u] || // eslint-disable-next-line unicorn/prefer-at -- TypeScript target doesn't support Array.at() method
408
421
  l[l.length - 1] || l[0]
409
422
  );
410
- if (!y)
423
+ if (!k)
411
424
  throw new Error("No paginated responses available");
412
- return u = Math.min(u + 1, l.length - 1), Promise.resolve(y);
425
+ return u = Math.min(u + 1, l.length - 1), Promise.resolve(k);
413
426
  },
414
427
  !1,
415
428
  "resolvesPaginated"
416
- ), c;
429
+ ), s;
417
430
  },
418
- resolvesFromFile(r) {
431
+ resolvesFromFile(t) {
419
432
  return e.debugLogger.log(
420
- `Configured resolvesFromFile for ${t.name}`,
421
- { filePath: r }
433
+ `Configured resolvesFromFile for ${r.name}`,
434
+ { filePath: t }
422
435
  ), n(
423
436
  () => {
424
- const i = U(r);
437
+ const i = U(t);
425
438
  return Promise.resolve(i);
426
439
  },
427
440
  !1,
428
441
  "resolvesFromFile"
429
- ), c;
442
+ ), s;
430
443
  }
431
444
  };
432
- return c;
445
+ return s;
433
446
  }
434
447
  const le = (e) => {
435
- const t = {
448
+ const r = {
436
449
  map: /* @__PURE__ */ new WeakMap(),
437
- debugLogger: $()
438
- }, o = e.prototype, s = j.spyOn(o, "send").mockImplementation(x(t)), n = D(t, s, {
450
+ debugLogger: E()
451
+ }, o = e.prototype, c = w.spyOn(o, "send").mockImplementation(x(r)), n = D(r, c, {
439
452
  reset: "Clearing call history (mocks preserved)",
440
453
  restore: "Restoring original client behavior and clearing all mocks"
441
454
  });
442
455
  return {
443
456
  client: void 0,
444
- on: (r, i, l) => L(
445
- t,
457
+ on: (t, i, l) => L(
446
458
  r,
459
+ t,
447
460
  i,
448
461
  l
449
462
  ),
450
463
  ...n
451
464
  };
452
465
  }, ue = (e) => {
453
- const t = {
466
+ const r = {
454
467
  map: /* @__PURE__ */ new WeakMap(),
455
- debugLogger: $()
456
- }, o = j.spyOn(e, "send").mockImplementation(x(t)), s = D(t, o, {
468
+ debugLogger: E()
469
+ }, o = w.spyOn(e, "send").mockImplementation(x(r)), c = D(r, o, {
457
470
  reset: "Clearing call history (mocks preserved) for client instance",
458
471
  restore: "Restoring original client behavior and clearing all mocks for client instance"
459
472
  });
460
473
  return {
461
474
  client: e,
462
- on: (c, r, i) => L(
463
- t,
464
- c,
475
+ on: (s, t, i) => L(
465
476
  r,
477
+ s,
478
+ t,
466
479
  i
467
480
  ),
468
- ...s
481
+ ...c
469
482
  };
470
483
  };
471
484
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-sdk-vitest-mock",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -40,6 +40,7 @@
40
40
  },
41
41
  "dependencies": {},
42
42
  "devDependencies": {
43
+ "@aws-sdk/client-cognito-identity-provider": "^3.970.0",
43
44
  "@aws-sdk/client-dynamodb": "3.964.0",
44
45
  "@aws-sdk/client-s3": "3.967.0",
45
46
  "@aws-sdk/lib-dynamodb": "3.967.0",
@@ -56,7 +57,7 @@
56
57
  "@swc/core": "1.15.8",
57
58
  "@swc/helpers": "0.5.18",
58
59
  "@types/eslint-plugin-security": "3.0.0",
59
- "@types/node": "24.10.7",
60
+ "@types/node": "24.10.9",
60
61
  "@typescript-eslint/parser": "8.53.0",
61
62
  "@vitest/coverage-v8": "4.0.16",
62
63
  "@vitest/eslint-plugin": "1.6.6",