aws-sdk-vitest-mock 1.0.13 → 1.0.14

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