diff --git a/.mocharc.json b/.mocharc.json deleted file mode 100644 index bca3dbb5..00000000 --- a/.mocharc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extension": [ - "ts" - ], - "spec": "test/**/*.spec.ts", - "loader": "ts-node/esm" -} \ No newline at end of file diff --git a/.npmignore b/.npmignore index 6a1b19e1..5b91b67d 100644 --- a/.npmignore +++ b/.npmignore @@ -17,7 +17,7 @@ index.html .travis.yml rollup.config.js .babelrc -.mocharc.json +vitest.config.ts .versionrc.json tsconfig.cjs.json CHANGELOG.md diff --git a/CLAUDE.md b/CLAUDE.md index 6e921d09..0b1eb4c2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,17 +6,17 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ```bash npm run build # Full build: clean → tsc (ESM) → tsc (CJS) → rollup bundles -npm run test # Run all tests with mocha +npm run test # Run all tests with vitest npm run lint # ESLint check npm run lint:fix # ESLint auto-fix -npm run report # Run tests with c8 coverage +npm run report # Run tests with v8 coverage npm run release # Bump version + update CHANGELOG (standard-version) npm run gen-openapi # Regenerate TypeScript types from OpenAPI specs ``` **Run a single test file:** ```bash -npx mocha --reporter=dot test/api/factory.spec.ts +npx vitest run test/api/factory.spec.ts ``` **Debug HTTP requests:** @@ -63,11 +63,12 @@ Base (config + req) **`returnResponse`**: By default, only `response.data` is returned. Pass `returnResponse: true` in `apiConfig` to get the full Axios response. +**Tests**: vitest with `globals` disabled — every spec imports `describe`/`it`/`expect`/`vi` from `vitest`. Test doubles are `vi.fn()` mocks implementing `IEBayApiRequest`. + **`apix` / `apiz`**: Convenience getters on `Restful` to switch the API subdomain for specific eBay endpoints that use `apix.ebay.com` or `apiz.ebay.com`. ## TypeScript Constraints -- All imports of interfaces and type aliases **must** use `import type` (or inline `type` modifier) in test files. The mocha 11 + Node.js v24 loader chain resolves `.js` extensions synchronously, bypassing ts-node for transitive imports — runtime will throw if a type-only named export is imported as a value. - TypeScript `noUnusedLocals` and `noUnusedParameters` are enabled — all declared variables/parameters must be used. - OpenAPI-generated type files in `src/types/restful/specs/` are excluded from the main `tsconfig.json`'s `include` array but are referenced directly by the API classes. diff --git a/package-lock.json b/package-lock.json index 58d9a6cc..7ec43167 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,27 +20,22 @@ "@rollup/plugin-node-resolve": "^16.0.0", "@rollup/plugin-terser": "^1.0.0", "@rollup/plugin-virtual": "^3.0.2", - "@types/chai": "^4.3.20", "@types/debug": "^4.1.12", - "@types/mocha": "^10.0.10", - "@types/node": "^18.19.130", + "@types/node": "^22.20.1", "@types/qs": "^6.14.0", - "@types/sinon": "^10.0.20", "@typescript-eslint/eslint-plugin": "^8.54.0", "@typescript-eslint/parser": "^8.54.0", - "c8": "^10.1.3", - "chai": "^4.3.7", + "@vitest/coverage-v8": "^4.1.10", "eslint": "^10.0.1", "form-data": "^4.0.0", - "mocha": "^11.0.0", "openapi-typescript": "7.13.0", "rimraf": "^6.0.1", "rollup": "^4.0.0", "rollup-plugin-bundle-size": "^1.0.3", - "sinon": "^17.0.1", "standard-version": "^9.0.0", "ts-node": "^10.9.2", - "typescript": "^5.9.3" + "typescript": "^5.9.3", + "vitest": "^4.1.10" }, "engines": { "node": ">= 14.0.0" @@ -61,12 +56,52 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", - "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", + "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", + "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, "engines": { "node": ">=6.9.0" } @@ -103,6 +138,40 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@emnapi/core": { + "version": "2.0.0-alpha.3", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-2.0.0-alpha.3.tgz", + "integrity": "sha512-AZypUeJ/yByuxyS7BlSNRDOMLMlROYtjYdIAuBmJssVz1UJDSeYxLrdizhXCFYhedC5bqd/ASy8EuNXbVVXp9g==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "2.0.1", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "2.0.0-alpha.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-2.0.0-alpha.3.tgz", + "integrity": "sha512-hFPAhMUjJD9BSyCANEISPOogeXC9Zo9ZQl7L6vKnaVsMkCtzznaW/naYypeyl0Gv5rYfWYsZbpixTMpjDJzQeA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-2.0.1.tgz", + "integrity": "sha512-9DsSk+o5NBX0CCJT8s0EROGSGxjR/tKu6aBTaVyq+SjAEQH4XcdcRxPBRzsBLizTTJ49MJjF+jgu3qnO9GLQcQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.9.1", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", @@ -258,119 +327,6 @@ "node": ">=6.9.0" } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -420,6 +376,28 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.1.tgz", + "integrity": "sha512-KjZdi8Q1wh89gsVmghvbrMgWl6ZWmRmHV6wjB7/g4Zf0dyO+hH3neZUtuDNPO00qq5YE5RITVWvrIZKRaAmzGQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.3", + "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.3" + } + }, "node_modules/@nodable/entities": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.0.tgz", @@ -432,15 +410,14 @@ ], "license": "MIT" }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "node_modules/@oxc-project/types": { + "version": "0.142.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.142.0.tgz", + "integrity": "sha512-7W+2q5AKQVU36fkaryontrHn3YDt1RyUYXatw9i5H8ocYe2sPKSFB6eS8WNPeRKiN1qAWWZUPm7gwFzJGrccqQ==", "dev": true, "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" + "funding": { + "url": "https://github.com/sponsors/Boshen" } }, "node_modules/@redocly/ajv": { @@ -473,22 +450,301 @@ "integrity": "sha512-gn2P0OER6qxF/+f4GqNv9XsnU5+6oszD/0SunulOvPYJDhrNkNVrVZV5waX25uqw5UDn2+roViWlRDHKFfHH0g==", "dev": true, "license": "MIT", - "dependencies": { - "@redocly/ajv": "^8.11.2", - "@redocly/config": "^0.22.0", - "colorette": "^1.2.0", - "https-proxy-agent": "^7.0.5", - "js-levenshtein": "^1.1.6", - "js-yaml": "^4.1.0", - "minimatch": "^5.0.1", - "pluralize": "^8.0.0", - "yaml-ast-parser": "0.0.43" - }, + "dependencies": { + "@redocly/ajv": "^8.11.2", + "@redocly/config": "^0.22.0", + "colorette": "^1.2.0", + "https-proxy-agent": "^7.0.5", + "js-levenshtein": "^1.1.6", + "js-yaml": "^4.1.0", + "minimatch": "^5.0.1", + "pluralize": "^8.0.0", + "yaml-ast-parser": "0.0.43" + }, + "engines": { + "node": ">=18.17.0", + "npm": ">=9.5.0" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.1.tgz", + "integrity": "sha512-02hOeOSryYxVrOIphmLAsqnCJWxwlzFk+pEt/N/i6OgT3lShHO7xGCU5cpgchRDHboAEbSjzgGh+O/u1GswQmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.1.tgz", + "integrity": "sha512-fMsTOnN0OjFm3CyppWPitKnc8UlliVARUULW6cfU6AIqjdtgmSFWSk9vecHzZduv/yMWIHDlRhM1e8Iff9uAfA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.1.tgz", + "integrity": "sha512-1wjKdz/XLGKHaTNHjQveQ/B23TKx4ItAqm1JbyVuvNPc4Ze0Fb48s49TAd/2zcplPl8okE/UbTgmlVfwT7eFeQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.1.tgz", + "integrity": "sha512-Fa0jHR07E7YBN4vOEsbVf2briYNsuOowfLJaXULZM0ldMlaCaj2LJgLMbMe4iacRyZmvR8efFhgR9wKuGclQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.1.tgz", + "integrity": "sha512-pzkgu1SSHGgRRyRZ4fbmSgmajbVt+epaLP99NDjFft69v/ypfTi6swBMiVdh2EkQ0OSnHE1lZDM7DRGkyAzUpA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.1.tgz", + "integrity": "sha512-QI5SEDY8cbiYWHx0VO4vIc3UlS6a32vXHjU8Qy/17adEmZIPuByJg13UEvo9c/UCiUkdcVWY83C+b+JrwnNyUg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.1.tgz", + "integrity": "sha512-Sm41FyCeXqmYcERoYOCbGIL5hNfd8w9LQ7Y61Bev48HkcjaJqV/iiVOaiDxjVTRMS+QKrZmD8cfPt4uMVnvM+A==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.1.tgz", + "integrity": "sha512-2x+WhXTGl9yJYPbltW/BSEPTVz9OIWQyER4N+gJEDWkkn904eRcBzELqh/Hf7K0w/ubGbKNMv0ZC+94QK/IFEg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.1.tgz", + "integrity": "sha512-eEjmQpuRQayHPWWnywaWHkFT3ToPbP3RYy42VVd/B9aBGDA+Ol25EIWHxKQST3IiWJjikCWUF7KtbfqwZrzVwQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.1.tgz", + "integrity": "sha512-/Orga1fZYkLc/56jBICcHrKchl8Z2UKdDSr3LG9ToWO1lQ6a4Livk9Xz+9WN91zsz5QR3XQz2NNoSDEvP6qadw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.1.tgz", + "integrity": "sha512-xxBJRL+0q0Kce7orznGWLuylHDY65vuARXZRpX+hPdv+DqK2c3NlCsVA98tlWzWNEE7yPqA/1NQ5nnCrj49Y5A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.1.tgz", + "integrity": "sha512-M6AdXIXw3s+/8XpKMzdGDEXGS1S7kwUsy+rcTIUIOx5Ge4nXKCtAFHFV9YKkXvGcC5WMoTjAteLzlsQROVI0Yw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.2.1.tgz", + "integrity": "sha512-/TX0SoRGojHzSAHpfVBbavRVSazg5U3h3Y3VXfcc0cdugq6kxdqw8LPGFiPr+/7gE/60zRcsOY2Vi9b9eT0jww==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "2.0.0-alpha.3", + "@emnapi/runtime": "2.0.0-alpha.3", + "@napi-rs/wasm-runtime": "^1.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.1.tgz", + "integrity": "sha512-EvRrivJieyHG+AO9lleZWgq+g0+S7oV2C51yuqlcyU/R9net+sI4Pj0F+lUoP2bEr6TWX3SqFaaS0SzfLxSzkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.1.tgz", + "integrity": "sha512-Z4eCmn5QJ/5+azF9knpLWKfVd9aidn0mAe9TpJgvBLId9Ax3t0+JVxBmT25Bv7NBbVW1TZyKjQjQReouMeH5UQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=18.17.0", - "npm": ">=9.5.0" + "node": "^20.19.0 || >=22.12.0" } }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, "node_modules/@rollup/plugin-commonjs": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.0.tgz", @@ -1005,49 +1261,12 @@ "win32" ] }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", - "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@sinonjs/samsam": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", - "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^2.0.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", - "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", - "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", - "dev": true + "license": "MIT" }, "node_modules/@tsconfig/node10": { "version": "1.0.9", @@ -1073,12 +1292,27 @@ "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", "dev": true }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@types/chai": { - "version": "4.3.20", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", - "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } }, "node_modules/@types/debug": { "version": "4.1.12", @@ -1090,6 +1324,13 @@ "@types/ms": "*" } }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/esrecurse": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", @@ -1104,12 +1345,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true - }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -1123,13 +1358,6 @@ "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", "dev": true }, - "node_modules/@types/mocha": { - "version": "10.0.10", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", - "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/ms": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", @@ -1137,13 +1365,13 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.19.130", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", - "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "version": "22.20.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz", + "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.21.0" } }, "node_modules/@types/normalize-package-data": { @@ -1165,22 +1393,6 @@ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", "dev": true }, - "node_modules/@types/sinon": { - "version": "10.0.20", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.20.tgz", - "integrity": "sha512-2APKKruFNCAZgx3daAyACGzWuJ028VVCUDk6o2rw/Z4PXT0ogwdV4KUegW0MwVs0Zu59auPXbbuBJHF12Sx1Eg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/sinonjs__fake-timers": "*" - } - }, - "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", - "dev": true - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.56.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.0.tgz", @@ -1427,6 +1639,160 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@vitest/coverage-v8": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.10.tgz", + "integrity": "sha512-IM49HmthevbgAO4anp1hwtoT9wYe59w0LR00gr+eagHE+ZJ5lK4sLPeO0ubgoJcwLk6dehU3R24N+FbEEKDc8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^1.0.2", + "@vitest/utils": "4.1.10", + "ast-v8-to-istanbul": "^1.0.0", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.2.0", + "magicast": "^0.5.2", + "obug": "^2.1.1", + "std-env": "^4.0.0-rc.1", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/browser": "4.1.10", + "vitest": "4.1.10" + }, + "peerDependenciesMeta": { + "@vitest/browser": { + "optional": true + } + } + }, + "node_modules/@vitest/expect": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.10.tgz", + "integrity": "sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.10", + "@vitest/utils": "4.1.10", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.10.tgz", + "integrity": "sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "4.1.10", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/mocker/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/@vitest/pretty-format": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.10.tgz", + "integrity": "sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.10.tgz", + "integrity": "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "4.1.10", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.10.tgz", + "integrity": "sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.10", + "@vitest/utils": "4.1.10", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.10.tgz", + "integrity": "sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.10.tgz", + "integrity": "sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.10", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, "node_modules/acorn": { "version": "8.16.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", @@ -1561,14 +1927,44 @@ } }, "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true, + "license": "MIT", "engines": { - "node": "*" + "node": ">=12" + } + }, + "node_modules/ast-v8-to-istanbul": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.5.tgz", + "integrity": "sha512-UPAgKJFSEGMWSDr3LX4tqnAb4f7KGT8O40Tyx8wbYmmZ/yn58lNCm8h3svs3eXgiGd5AXxz8NDOvXWvicq+rJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.31", + "estree-walker": "^3.0.3", + "js-tokens": "^10.0.0" + } + }, + "node_modules/ast-v8-to-istanbul/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" } }, + "node_modules/ast-v8-to-istanbul/node_modules/js-tokens": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz", + "integrity": "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==", + "dev": true, + "license": "MIT" + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -1634,96 +2030,12 @@ "node": "20 || >=22" } }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/c8": { - "version": "10.1.3", - "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.3.tgz", - "integrity": "sha512-LvcyrOAaOnrrlMpW22n690PUvxiq4Uf9WMhQwNJ9vgagkL/ph1+D4uvjvDA5XCbykrc0sx+ay6pVi9YZ1GnhyA==", - "dev": true, - "license": "ISC", - "dependencies": { - "@bcoe/v8-coverage": "^1.0.1", - "@istanbuljs/schema": "^0.1.3", - "find-up": "^5.0.0", - "foreground-child": "^3.1.1", - "istanbul-lib-coverage": "^3.2.0", - "istanbul-lib-report": "^3.0.1", - "istanbul-reports": "^3.1.6", - "test-exclude": "^7.0.1", - "v8-to-istanbul": "^9.0.0", - "yargs": "^17.7.2", - "yargs-parser": "^21.1.1" - }, - "bin": { - "c8": "bin/c8.js" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "monocart-coverage-reports": "^2" - }, - "peerDependenciesMeta": { - "monocart-coverage-reports": { - "optional": true - } - } - }, - "node_modules/c8/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/c8/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/c8/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", @@ -1780,70 +2092,21 @@ } }, "node_modules/chai": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", - "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", - "dev": true, - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^4.1.2", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, + "license": "MIT", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=18" } }, "node_modules/change-case": { "version": "5.4.4", "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", - "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "dev": true, + "license": "MIT" }, "node_modules/cliui": { "version": "7.0.4", @@ -2183,10 +2446,11 @@ } }, "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" }, "node_modules/core-util-is": { "version": "1.0.3", @@ -2284,18 +2548,6 @@ "node": ">=0.10.0" } }, - "node_modules/deep-eql": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.2.tgz", - "integrity": "sha512-gT18+YW4CcW/DBNTwAmqTtkJh7f9qqScu2qFVlx7kCoeY9tlBu9cUcr7+I+Z/noG8INehS3xQgLpTtd/QUTn4w==", - "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -2329,6 +2581,16 @@ "node": ">=8" } }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -2454,13 +2716,6 @@ "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", "dev": true }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2494,6 +2749,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.1.tgz", + "integrity": "sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==", + "dev": true, + "license": "MIT" + }, "node_modules/es-object-atoms": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", @@ -2749,6 +3011,16 @@ "node": ">=0.10.0" } }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2877,15 +3149,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", @@ -2927,23 +3190,6 @@ } } }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/form-data": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", @@ -2961,11 +3207,12 @@ } }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2992,15 +3239,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -3159,28 +3397,6 @@ "ini": "^1.3.2" } }, - "node_modules/glob": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", - "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", - "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -3280,6 +3496,7 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3323,15 +3540,6 @@ "node": ">= 0.4" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, "node_modules/hosted-git-info": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", @@ -3482,16 +3690,6 @@ "node": ">=8" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -3522,18 +3720,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3579,22 +3765,6 @@ "node": ">=8" } }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, "node_modules/js-levenshtein": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", @@ -3683,59 +3853,326 @@ "node >= 0.2.0" ] }, - "node_modules/JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" - }, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "*" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/just-extend": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", - "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", - "dev": true - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=0.10.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">= 0.8.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, "node_modules/lines-and-columns": { @@ -3790,43 +4227,12 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true - }, "node_modules/lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", "integrity": "sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==", "dev": true }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.0" - } - }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -3849,6 +4255,18 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, + "node_modules/magicast": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.3.tgz", + "integrity": "sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.3", + "@babel/types": "^7.29.0", + "source-map-js": "^1.2.1" + } + }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", @@ -3866,9 +4284,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -4246,102 +4664,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mocha": { - "version": "11.7.5", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.5.tgz", - "integrity": "sha512-mTT6RgopEYABzXWFx+GcJ+ZQ32kp4fMf0xvpZIIfSq9Z8lC/++MtcCnQ9t5FP2veYEP95FIYSvW+U9fV4xrlig==", - "dev": true, - "license": "MIT", - "dependencies": { - "browser-stdout": "^1.3.1", - "chokidar": "^4.0.1", - "debug": "^4.3.5", - "diff": "^7.0.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "glob": "^10.4.5", - "he": "^1.2.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^9.0.5", - "ms": "^2.1.3", - "picocolors": "^1.1.1", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", - "supports-color": "^8.1.1", - "workerpool": "^9.2.0", - "yargs": "^17.7.2", - "yargs-parser": "^21.1.1", - "yargs-unparser": "^2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/mocha/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/mocha/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/mocha/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, "node_modules/modify-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", @@ -4357,6 +4679,25 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, + "node_modules/nanoid": { + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", + "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4370,19 +4711,6 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, - "node_modules/nise": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.9.tgz", - "integrity": "sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^11.2.2", - "@sinonjs/text-encoding": "^0.7.2", - "just-extend": "^6.2.0", - "path-to-regexp": "^6.2.1" - } - }, "node_modules/normalize-package-data": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", @@ -4443,6 +4771,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/obug": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", + "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/openapi-typescript": { "version": "7.13.0", "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.13.0.tgz", @@ -4633,37 +4975,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/path-to-regexp": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", - "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", - "dev": true, - "license": "MIT" - }, "node_modules/path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", @@ -4685,14 +4996,12 @@ "node": ">=4" } }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", "dev": true, - "engines": { - "node": "*" - } + "license": "MIT" }, "node_modules/picocolors": { "version": "1.1.1", @@ -4733,6 +5042,35 @@ "node": ">=4" } }, + "node_modules/postcss": { + "version": "8.5.25", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.25.tgz", + "integrity": "sha512-DTPx3RWSSnWyzLxQnlH0rJP+EW5ekl16ZU4/psbIhA0e53kJfdgaN5vKM+xP7yJtXVu+nfdVFmlgFDEKAe4Pyw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.16", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -4950,20 +5288,6 @@ "node": ">= 6" } }, - "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", @@ -5078,6 +5402,40 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rolldown": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.1.tgz", + "integrity": "sha512-4FKJhg8d3OiyQOA6Q1Q0hoFFpW9/OoX+VsHzpECsdsIZoOArrAK90gl59YK/Z+gnDel45bgJZK03ozH/9bCqEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.142.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.2.1", + "@rolldown/binding-darwin-arm64": "1.2.1", + "@rolldown/binding-darwin-x64": "1.2.1", + "@rolldown/binding-freebsd-x64": "1.2.1", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.1", + "@rolldown/binding-linux-arm64-gnu": "1.2.1", + "@rolldown/binding-linux-arm64-musl": "1.2.1", + "@rolldown/binding-linux-ppc64-gnu": "1.2.1", + "@rolldown/binding-linux-s390x-gnu": "1.2.1", + "@rolldown/binding-linux-x64-gnu": "1.2.1", + "@rolldown/binding-linux-x64-musl": "1.2.1", + "@rolldown/binding-openharmony-arm64": "1.2.1", + "@rolldown/binding-wasm32-wasi": "1.2.1", + "@rolldown/binding-win32-arm64-msvc": "1.2.1", + "@rolldown/binding-win32-x64-msvc": "1.2.1" + } + }, "node_modules/rollup": { "version": "4.60.3", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.3.tgz", @@ -5326,39 +5684,15 @@ "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/sinon": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz", - "integrity": "sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g==", + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^11.2.2", - "@sinonjs/samsam": "^8.0.0", - "diff": "^5.1.0", - "nise": "^5.1.5", - "supports-color": "^7.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } + "license": "ISC" }, "node_modules/smob": { "version": "1.6.1", @@ -5379,6 +5713,16 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -5443,6 +5787,13 @@ "readable-stream": "^3.0.0" } }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, "node_modules/standard-version": { "version": "9.5.0", "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-9.5.0.tgz", @@ -5557,6 +5908,13 @@ "node": ">=4" } }, + "node_modules/std-env": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", + "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", + "dev": true, + "license": "MIT" + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -5580,22 +5938,6 @@ "node": ">=8" } }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/stringify-package": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.1.tgz", @@ -5615,20 +5957,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -5650,18 +5978,6 @@ "node": ">=8" } }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/strnum": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.3.0.tgz", @@ -5679,6 +5995,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5717,21 +6034,6 @@ "node": ">=10" } }, - "node_modules/test-exclude": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", - "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^10.4.1", - "minimatch": "^9.0.4" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -5756,15 +6058,32 @@ "readable-stream": "3" } }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.4.tgz", + "integrity": "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", "dev": true, "license": "MIT", "dependencies": { "fdir": "^6.5.0", - "picomatch": "^4.0.3" + "picomatch": "^4.0.4" }, "engines": { "node": ">=12.0.0" @@ -5804,6 +6123,16 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/tinyrainbow": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", + "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", @@ -5869,6 +6198,14 @@ } } }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5882,15 +6219,6 @@ "node": ">= 0.8.0" } }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/type-fest": { "version": "0.18.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", @@ -5937,9 +6265,9 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" }, @@ -5965,20 +6293,6 @@ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, - "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -5989,6 +6303,200 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/vite": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.0.tgz", + "integrity": "sha512-pn+CFpM0lwDeKwmOq1ZaBK/9sjorZcgqxki6MbY/jPEVd9vichIlmlD4HmQ5wdP5EgqQCFRaACBxMC7uEGc6lQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.23", + "rolldown": "~1.2.0", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.4.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/vitest": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.10.tgz", + "integrity": "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.1.10", + "@vitest/mocker": "4.1.10", + "@vitest/pretty-format": "4.1.10", + "@vitest/runner": "4.1.10", + "@vitest/snapshot": "4.1.10", + "@vitest/spy": "4.1.10", + "@vitest/utils": "4.1.10", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.10", + "@vitest/browser-preview": "4.1.10", + "@vitest/browser-webdriverio": "4.1.10", + "@vitest/coverage-istanbul": "4.1.10", + "@vitest/coverage-v8": "4.1.10", + "@vitest/ui": "4.1.10", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } + } + }, + "node_modules/vitest/node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -6004,6 +6512,23 @@ "node": ">= 8" } }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -6020,13 +6545,6 @@ "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "dev": true }, - "node_modules/workerpool": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.4.tgz", - "integrity": "sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -6044,25 +6562,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/xml-naming": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/xml-naming/-/xml-naming-0.1.0.tgz", @@ -6136,54 +6635,6 @@ "node": ">=10" } }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index 3512b2e5..ac723b11 100644 --- a/package.json +++ b/package.json @@ -78,9 +78,9 @@ "lint": "eslint src test examples", "lint:fix": "eslint --fix src test examples", "typecheck": "tsc -p tsconfig.check.json", - "test": "mocha --reporter=dot", - "report": "c8 npm run test", - "report:summary": "c8 --reporter=lcov --reporter=text-summary npm run test", + "test": "vitest run", + "report": "vitest run --coverage", + "report:summary": "vitest run --coverage --coverage.reporter=lcov --coverage.reporter=text-summary", "prerelease": "npm run lint && npm run typecheck && npm run test && npm run build", "release": "standard-version", "rc": "npm run release -- --prerelease RC && git push --follow-tags", @@ -99,27 +99,22 @@ "@rollup/plugin-node-resolve": "^16.0.0", "@rollup/plugin-terser": "^1.0.0", "@rollup/plugin-virtual": "^3.0.2", - "@types/chai": "^4.3.20", "@types/debug": "^4.1.12", - "@types/mocha": "^10.0.10", - "@types/node": "^18.19.130", + "@types/node": "^22.20.1", "@types/qs": "^6.14.0", - "@types/sinon": "^10.0.20", "@typescript-eslint/eslint-plugin": "^8.54.0", "@typescript-eslint/parser": "^8.54.0", - "c8": "^10.1.3", - "chai": "^4.3.7", + "@vitest/coverage-v8": "^4.1.10", "eslint": "^10.0.1", "form-data": "^4.0.0", - "mocha": "^11.0.0", "openapi-typescript": "7.13.0", "rimraf": "^6.0.1", "rollup": "^4.0.0", "rollup-plugin-bundle-size": "^1.0.3", - "sinon": "^17.0.1", "standard-version": "^9.0.0", "ts-node": "^10.9.2", - "typescript": "^5.9.3" + "typescript": "^5.9.3", + "vitest": "^4.1.10" }, "overrides": { "brace-expansion": "^5.0.8", diff --git a/test/api/authNAuth.spec.ts b/test/api/authNAuth.spec.ts index 6beac1ac..a262f8c9 100644 --- a/test/api/authNAuth.spec.ts +++ b/test/api/authNAuth.spec.ts @@ -1,7 +1,4 @@ -import {expect} from 'chai'; -import 'mocha'; -// @ts-ignore -import sinon from 'sinon'; +import {beforeEach, describe, expect, it, vi} from 'vitest'; import AuthNAuth from '../../src/auth/authNAuth.js'; describe('AuthNAuth', () => { @@ -9,87 +6,71 @@ describe('AuthNAuth', () => { let req: any = null; beforeEach(() => { req = { - get: sinon.stub().returns(Promise.resolve({data: {}})), - delete: sinon.stub().returns(Promise.resolve({data: {}})), - put: sinon.stub().returns(Promise.resolve({data: {}})), - patch: sinon.stub().returns(Promise.resolve({data: {}})), - post: sinon.stub().returns(Promise.resolve({data: {}})), - postForm: sinon.stub().returns(Promise.resolve({ + get: vi.fn().mockResolvedValue({data: {}}), + delete: vi.fn().mockResolvedValue({data: {}}), + put: vi.fn().mockResolvedValue({data: {}}), + patch: vi.fn().mockResolvedValue({data: {}}), + post: vi.fn().mockResolvedValue({data: {}}), + postForm: vi.fn().mockResolvedValue({ data: { access_token: 'new_access_token' } - })), - instance: sinon.stub() + }), + instance: vi.fn() }; }); it('Sets the auth token', () => { const auth = new AuthNAuth({...config, authToken: 'authToken'}, req); - expect(auth.getAuthToken()?.eBayAuthToken).to.equal('authToken'); + expect(auth.getAuthToken()?.eBayAuthToken).toBe('authToken'); }); describe('Get session id and auth url', () => { it('Throws error if devId is not defined', async () => { const auth = new AuthNAuth({...config, devId: undefined}, req); - try { - await auth.getSessionIdAndAuthUrl(); - } catch (error: any) { - expect(error.message).to.equal('DevId is required.'); - } + await expect(auth.getSessionIdAndAuthUrl()).rejects.toThrowError(new Error('DevId is required.')); }); it('Throws error if ruName is not defined', async () => { const auth = new AuthNAuth({...config}, req); - try { - await auth.getSessionIdAndAuthUrl(); - } catch (error: any) { - expect(error.message).to.equal('RuName is required.'); - } + await expect(auth.getSessionIdAndAuthUrl()).rejects.toThrowError(new Error('RuName is required.')); }); it('Throws error if siteId is not a Number', async () => { // @ts-ignore const auth = new AuthNAuth({...config, siteId: 'xxx', ruName: 'ruName'}, req); - try { - await auth.getSessionIdAndAuthUrl(); - } catch (error: any) { - expect(error.message).to.equal('"siteId" is required for Auth\'n\'Auth.'); - } + await expect(auth.getSessionIdAndAuthUrl()).rejects.toThrowError(new Error('"siteId" is required for Auth\'n\'Auth.')); }); it('Throws error if siteId is not a Number', async () => { - const post = sinon.stub().returns(Promise.resolve({ + const post = vi.fn().mockResolvedValue({ data: ` SessionID ` - })); + }); // @ts-ignore const auth = new AuthNAuth({...config, ruName: 'ruName'}, {...req, post}); const data = await auth.getSessionIdAndAuthUrl(); - expect(data.sessionId).to.equal('SessionID'); - expect(data.url).to.equal('https://signin.sandbox.ebay.com/ws/eBayISAPI.dll?SignIn&RuName=ruName&SessID=SessionID'); + expect(data.sessionId).toBe('SessionID'); + expect(data.url).toBe('https://signin.sandbox.ebay.com/ws/eBayISAPI.dll?SignIn&RuName=ruName&SessID=SessionID'); }); }); describe('Auth Token', () => { it('Throws error if devId is not defined', async () => { const auth = new AuthNAuth({...config, devId: undefined}, req); - try { - await auth.mintToken('SessionID'); - } catch (error: any) { - expect(error.message).to.equal('DevId is required.'); - } + await expect(auth.mintToken('SessionID')).rejects.toThrowError(new Error('DevId is required.')); }); it('fetch auth token', async () => { - const post = sinon.stub().returns(Promise.resolve({ + const post = vi.fn().mockResolvedValue({ data: ` SessionID ` - })); + }); const auth = new AuthNAuth(config, {...req, post}); await auth.mintToken('SessionID'); }); @@ -98,7 +79,7 @@ describe('AuthNAuth', () => { // @ts-ignore const auth = new AuthNAuth(config, req); auth.setAuthToken('authToken'); - expect(auth.eBayAuthToken).to.equal('authToken'); + expect(auth.eBayAuthToken).toBe('authToken'); }); }); @@ -106,7 +87,7 @@ describe('AuthNAuth', () => { it('Returns correct XML request config', async () => { const auth = new AuthNAuth(config, req); const xmlConfig = await auth.getRequestConfig('callName'); - expect(xmlConfig).to.eql({ + expect(xmlConfig).toEqual({ useIaf: false, xmlns: 'urn:ebay:apis:eBLBaseComponents', endpoint: 'https://api.sandbox.ebay.com/ws/api.dll', @@ -124,7 +105,7 @@ describe('AuthNAuth', () => { describe('Generate AuthUrl', () => { it('generates correct auth url', () => { const url = AuthNAuth.generateAuthUrl(false, 'ruName', 'sessionId', true); - expect(url).to.equal('https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&RuName=ruName&SessID=sessionId&prompt=login'); + expect(url).toBe('https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&RuName=ruName&SessID=sessionId&prompt=login'); }); }); }); diff --git a/test/api/digitalSignature.spec.ts b/test/api/digitalSignature.spec.ts index 511afa3d..a56817d4 100644 --- a/test/api/digitalSignature.spec.ts +++ b/test/api/digitalSignature.spec.ts @@ -1,7 +1,4 @@ -import {expect} from 'chai'; -import 'mocha'; -// @ts-ignore -import sinon from 'sinon'; +import {describe, expect, it} from 'vitest'; import {generateContentDigestValue, generateSignature, generateSignatureInput} from '../../src/api/digitalSignature.js'; const privateKey = ` @@ -12,18 +9,18 @@ MC4CAQAwBQYDK2VwBCIEIJ+DYvh6SEqVTm50DFtMDoQikTmiCqirVv9mWG9qfSnF describe('Digital Signature', () => { it('should be able to generate \'signature-input\' header when request has payload', () => { const signatureInput = generateSignatureInput({}, 123); - expect(signatureInput).to.eql('sig1=("content-digest" "x-ebay-signature-key" "@method" "@path" "@authority");created=123'); + expect(signatureInput).toBe('sig1=("content-digest" "x-ebay-signature-key" "@method" "@path" "@authority");created=123'); }); it('should be able to generate \'signature-input\' header when request has no payload', () => { const signatureInput = generateSignatureInput(null, 123); - expect(signatureInput).to.eql('sig1=("x-ebay-signature-key" "@method" "@path" "@authority");created=123'); + expect(signatureInput).toBe('sig1=("x-ebay-signature-key" "@method" "@path" "@authority");created=123'); }); it('should be able to generate \'Signature\' header', () => { const payload = '{"hello": "world"}'; const contentDigest = generateContentDigestValue(payload); - expect(contentDigest).to.eql('sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:'); + expect(contentDigest).toBe('sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:'); const signature = generateSignature({ 'content-digest': contentDigest, 'signature-input': 'sig1=("content-digest" "x-ebay-signature-key" "@method" "@path" "@authority");created=1663459378', @@ -33,7 +30,7 @@ describe('Digital Signature', () => { authority: 'localhost:8080', path: '/test' }, payload, 1663459378); - expect(signature).to.eql('sig1=:gkk7dqudw21DFHDVBoRUWe/F6/2hTEmWRFDBxiN6COD4PjozXziiDFML1nFHu+0UcMXC/niltxzABjnugu4DCA==:'); + expect(signature).toBe('sig1=:gkk7dqudw21DFHDVBoRUWe/F6/2hTEmWRFDBxiN6COD4PjozXziiDFML1nFHu+0UcMXC/niltxzABjnugu4DCA==:'); }); it('should throw an error if content-digest is not in the header', () => { @@ -41,7 +38,7 @@ describe('Digital Signature', () => { method: 'POST', authority: 'localhost:8080', path: '/test' - }, {}, 1663459378)).to.throw(/content-digest/); + }, {}, 1663459378)).toThrowError('Error calculating signature base: Header content-digest not included in message'); }); it('should throw an error pseudo header is not known', () => { @@ -49,6 +46,6 @@ describe('Digital Signature', () => { method: 'POST', authority: 'localhost:8080', path: '/test' - }, {}, 1663459378)).to.throw(/content-digest/); + }, {}, 1663459378)).toThrow(/content-digest/); }); }); diff --git a/test/api/errors/errors.spec.ts b/test/api/errors/errors.spec.ts index e359b8b8..acbe692e 100644 --- a/test/api/errors/errors.spec.ts +++ b/test/api/errors/errors.spec.ts @@ -1,4 +1,4 @@ -import {expect} from 'chai'; +import {describe, expect, it} from 'vitest'; import { checkEBayTraditionalResponse, EbayApiError, @@ -9,6 +9,15 @@ import { } from '../../../src/errors/index.js'; import {readJSONSync} from '../jsonfile.js'; +function catchError(fn: () => void): unknown { + try { + fn(); + } catch (error) { + return error; + } + throw new Error('Expected the call to throw'); +} + describe('eBay Errors', () => { const errors = readJSONSync('./errors.json', import.meta.url); @@ -21,31 +30,35 @@ describe('eBay Errors', () => { }; const {message, description} = extractEBayError(result); - expect(message).to.equal('Error Message'); + expect(message).toBe('Error Message'); if (description) { - expect(description).to.equal('description'); + expect(description).toBe('description'); } }); }); it('Throw correct error chain', () => { - expect(() => handleEBayError({ + const traditional = catchError(() => handleEBayError({ response: { data: errors.traditional } - })).to.throw(EBayApiError).with.property('errorCode', 930); + })); + expect(traditional).toBeInstanceOf(EBayApiError); + expect(traditional).toHaveProperty('errorCode', 930); expect(() => handleEBayError({ response: { data: errors.oauth } - })).to.throw(EbayApiError); - expect(() => handleEBayError({ + })).toThrow(EbayApiError); + + const restful = catchError(() => handleEBayError({ response: { data: errors.restful } - })).to.throw(EBayError) - .with.property('errorCode', 1); + })); + expect(restful).toBeInstanceOf(EBayError); + expect(restful).toHaveProperty('errorCode', 1); }); it('Does not throw if the error is warning', () => { @@ -61,7 +74,7 @@ describe('eBay Errors', () => { }, 'Version': 1177, 'Build': 'E1177_CORE_APIMSG_19110890_R1' - })).to.not.throw(); + })).not.toThrow(); }) }); \ No newline at end of file diff --git a/test/api/factory.spec.ts b/test/api/factory.spec.ts index 29f5a00b..6eec2a20 100644 --- a/test/api/factory.spec.ts +++ b/test/api/factory.spec.ts @@ -1,7 +1,4 @@ -import {expect} from 'chai'; -import 'mocha'; -// @ts-ignore -import sinon from 'sinon'; +import {beforeEach, describe, expect, it, vi} from 'vitest'; import ApiFactory from '../../src/api/apiFactory.js'; import type {IEBayApiRequest} from '../../src/request.js'; import type {eBayConfig} from '../../src/types/index.js'; @@ -9,13 +6,13 @@ import type {eBayConfig} from '../../src/types/index.js'; describe('FactoryTest', () => { let config: eBayConfig; const request: IEBayApiRequest = { - get: sinon.stub(), - delete: sinon.stub(), - put: sinon.stub(), - patch: sinon.stub(), - post: sinon.stub(), - postForm: sinon.stub(), - instance: sinon.stub() + get: vi.fn(), + delete: vi.fn(), + put: vi.fn(), + patch: vi.fn(), + post: vi.fn(), + postForm: vi.fn(), + instance: vi.fn() }; beforeEach(() => { @@ -25,6 +22,6 @@ describe('FactoryTest', () => { it('Throws an error if siteId is not defined', () => { delete config.siteId; const factory = new ApiFactory(config, request); - expect(factory.createTradingApi.bind(factory)).to.throw(/siteId/); + expect(factory.createTradingApi.bind(factory)).toThrowError(new Error('siteId is required for trading API.')); }); }); diff --git a/test/api/oAuth2.spec.ts b/test/api/oAuth2.spec.ts index dfcc1027..32a25e6f 100644 --- a/test/api/oAuth2.spec.ts +++ b/test/api/oAuth2.spec.ts @@ -1,9 +1,14 @@ -import {expect} from 'chai'; -import 'mocha'; -// @ts-ignore -import sinon from 'sinon'; +import {beforeEach, describe, expect, it, vi} from 'vitest'; import OAuth2 from '../../src/auth/oAuth2.js'; +function throwingStub(name: string) { + return vi.fn(() => { + const error = new Error(); + error.name = name; + throw error; + }); +} + describe('OAuth2', () => { const config = {appId: 'appId', certId: 'certId', sandbox: true, siteId: 0, devId: 'devId'}; let req: any = null; @@ -17,44 +22,40 @@ describe('OAuth2', () => { beforeEach(() => { req = { - get: sinon.stub(Promise.resolve({})), - delete: sinon.stub(Promise.resolve({})), - put: sinon.stub(Promise.resolve({})), - patch: sinon.stub(Promise.resolve({})), - post: sinon.stub(Promise.resolve({})), - postForm: sinon.stub().returns(Promise.resolve({ + get: vi.fn(), + delete: vi.fn(), + put: vi.fn(), + patch: vi.fn(), + post: vi.fn(), + postForm: vi.fn().mockResolvedValue({ data: { access_token: 'new_access_token' } - })), - instance: sinon.stub() + }), + instance: vi.fn() }; }); describe('Generate AuthUrl', () => { it('generate correct production AuthUrl', () => { expect(OAuth2.generateAuthUrl(false, 'appId', 'ruName', ['scope1'])) - .to.equal('https://auth.ebay.com/oauth2/authorize?client_id=appId&redirect_uri=ruName&response_type=code&state=&scope=scope1'); + .toBe('https://auth.ebay.com/oauth2/authorize?client_id=appId&redirect_uri=ruName&response_type=code&state=&scope=scope1'); }); it('generate correct sandbox AuthUrl', () => { expect(OAuth2.generateAuthUrl(true, 'appId', 'ruName', ['scope1'], 'state')) - .to.equal('https://auth.sandbox.ebay.com/oauth2/authorize?client_id=appId&redirect_uri=ruName&response_type=code&state=state&scope=scope1'); + .toBe('https://auth.sandbox.ebay.com/oauth2/authorize?client_id=appId&redirect_uri=ruName&response_type=code&state=state&scope=scope1'); }); it('generate correct sandbox AuthUrl', () => { const oAuth2 = new OAuth2({...config, ruName: 'ruName', scope: []}, req); const url = oAuth2.generateAuthUrl('ruName', [], 'state'); - expect(url).to.equal('https://auth.sandbox.ebay.com/oauth2/authorize?client_id=appId&redirect_uri=ruName&response_type=code&state=state&scope='); + expect(url).toBe('https://auth.sandbox.ebay.com/oauth2/authorize?client_id=appId&redirect_uri=ruName&response_type=code&state=state&scope='); }); it('requires ruName', () => { const oAuth2 = new OAuth2(config, req); - try { - oAuth2.generateAuthUrl(); - } catch (error: any) { - expect(error.message).to.equal('RuName is required.'); - } + expect(() => oAuth2.generateAuthUrl()).toThrowError(new Error('RuName is required.')); }); }); @@ -62,7 +63,7 @@ describe('OAuth2', () => { it('sets and returns correct scope', () => { const oAuth2 = new OAuth2(config, req); oAuth2.setScope(['scope1']); - expect(oAuth2.getScope()).to.eql(['scope1']); + expect(oAuth2.getScope()).toEqual(['scope1']); }); }); @@ -73,108 +74,82 @@ describe('OAuth2', () => { const token = await oAuth2.getApplicationAccessToken(); - expect(token).to.equal('access_token'); + expect(token).toBe('access_token'); }); it('throws error if refresh didn\'t work', async () => { const oAuth2 = new OAuth2(config, { ...req, - postForm: sinon.stub().throws('error') + postForm: throwingStub('error') }); - try { - await oAuth2.getApplicationAccessToken(); - } catch (error: any) { - expect(error.name).to.equal('error'); - } + await expect(oAuth2.getApplicationAccessToken()).rejects.toHaveProperty('name', 'error'); }); it('refresh the client access token', async () => { const oAuth2 = new OAuth2(config, req); const token = await oAuth2.getApplicationAccessToken(); - expect(token).to.equal('new_access_token'); + expect(token).toBe('new_access_token'); }); it('return token correctly', async () => { const oAuth2 = new OAuth2(config, req); const token = await oAuth2.getToken('code'); - expect(token.access_token).to.equal('new_access_token'); + expect(token.access_token).toBe('new_access_token'); }); it('return token correctly', async () => { const oAuth2 = new OAuth2(config, req); await oAuth2.getToken('code', 'ruNameX'); - expect(req.postForm.args[0][1].redirect_uri).to.equal('ruNameX'); + expect(req.postForm.mock.calls[0][1].redirect_uri).toBe('ruNameX'); }); it('throws error on getToken', async () => { - const oAuth2 = new OAuth2(config, {...req, postForm: sinon.stub().throws('error')}); + const oAuth2 = new OAuth2(config, {...req, postForm: throwingStub('error')}); - try { - await oAuth2.getToken('code'); - } catch (error: any) { - expect(error.name).to.equal('error'); - } + await expect(oAuth2.getToken('code')).rejects.toHaveProperty('name', 'error'); }); it('set and get credentials', () => { const oAuth2 = new OAuth2(config, req); - expect(oAuth2.getCredentials()).to.equal(null); + expect(oAuth2.getCredentials()).toBe(null); oAuth2.setCredentials(cred); - expect(oAuth2.getCredentials()).to.eql(cred); + expect(oAuth2.getCredentials()).toEqual(cred); }); }); describe('Refresh Client Token', () => { it('Throws error if appId is not defined', async () => { - try { - const oAuth2 = new OAuth2({...config, appId: ''}, req); - await oAuth2.obtainApplicationAccessToken(); - } catch (error: any) { - expect(error.message).to.equal('Missing App ID (Client Id)'); - } + const oAuth2 = new OAuth2({...config, appId: ''}, req); + await expect(oAuth2.obtainApplicationAccessToken()).rejects.toThrowError(new Error('Missing App ID (Client Id)')); }); it('Throws error if appId is not defined', async () => { - try { - const oAuth2 = new OAuth2({...config, certId: ''}, req); - await oAuth2.obtainApplicationAccessToken(); - } catch (error: any) { - expect(error.message).to.equal('Missing Cert Id (Client Secret)'); - } + const oAuth2 = new OAuth2({...config, certId: ''}, req); + await expect(oAuth2.obtainApplicationAccessToken()).rejects.toThrowError(new Error('Missing Cert Id (Client Secret)')); }); it('throws error on refreshToken if no credentials are not set', async () => { const oAuth2 = new OAuth2(config, req); - try { - await oAuth2.refreshUserAccessToken(); - } catch (error: any) { - expect(error.message).to.equal('Failed to refresh the user access token. Token or refresh_token is not set.'); - } + await expect(oAuth2.refreshUserAccessToken()) + .rejects.toThrowError(new Error('Failed to refresh the user access token. Token or refresh_token is not set.')); }); it('throws error on refreshAuthToken if request failed', async () => { - const oAuth2 = new OAuth2(config, {...req, postForm: sinon.stub().throws('error')}); + const oAuth2 = new OAuth2(config, {...req, postForm: throwingStub('error')}); oAuth2.setCredentials(cred); - try { - await oAuth2.refreshUserAccessToken(); - } catch (error: any) { - expect(error.name).to.equal('error'); - } + await expect(oAuth2.refreshUserAccessToken()).rejects.toHaveProperty('name', 'error'); }); it('throws error on refreshToken if authToken or client token are not defined', async () => { const oAuth2 = new OAuth2(config, req); - try { - await oAuth2.refreshToken(); - } catch (error: any) { - expect(error.message).to.equal('Missing credentials. To refresh a token an application access token or user access token must be already set.'); - } + await expect(oAuth2.refreshToken()) + .rejects.toThrowError(new Error('Missing credentials. To refresh a token an application access token or user access token must be already set.')); }); it('calls refreshAuthToken', async () => { @@ -183,8 +158,8 @@ describe('OAuth2', () => { await oAuth2.refreshToken(); // @ts-ignore - expect(req.postForm.called).to.be.true; - expect(req.postForm.args[0][1].grant_type).to.equal('refresh_token'); + expect(req.postForm).toHaveBeenCalled(); + expect(req.postForm.mock.calls[0][1].grant_type).toBe('refresh_token'); }); it('calls refreshClientToken', async () => { @@ -193,8 +168,8 @@ describe('OAuth2', () => { await oAuth2.refreshToken(); // @ts-ignore - expect(req.postForm.called).to.be.true; - expect(req.postForm.args[0][1].grant_type).to.equal('client_credentials'); + expect(req.postForm).toHaveBeenCalled(); + expect(req.postForm.mock.calls[0][1].grant_type).toBe('client_credentials'); }); it('emits an refresh event', () => { @@ -207,14 +182,14 @@ describe('OAuth2', () => { refresh_token_expires_in: 0 }); - const refreshAuthToken = sinon.stub(); + const refreshAuthToken = vi.fn(); oAuth2.on('refreshAuthToken', refreshAuthToken); return oAuth2.refreshUserAccessToken().then(() => { - expect(oAuth2.getUserAccessToken()).equal('new_access_token'); + expect(oAuth2.getUserAccessToken()).toBe('new_access_token'); - expect(refreshAuthToken.called).to.be.true; - expect(refreshAuthToken.args[0][0].access_token).to.equal('new_access_token'); + expect(refreshAuthToken).toHaveBeenCalled(); + expect(refreshAuthToken.mock.calls[0][0].access_token).toBe('new_access_token'); }); }); }); diff --git a/test/api/restful/oas.spec.ts b/test/api/restful/oas.spec.ts index 86643e56..f9b3ed73 100644 --- a/test/api/restful/oas.spec.ts +++ b/test/api/restful/oas.spec.ts @@ -1,7 +1,4 @@ -import {expect} from 'chai'; -import 'mocha'; -// @ts-ignore -import sinon from 'sinon'; +import {describe, expect, it, vi} from 'vitest'; import Restful from '../../../src/api/restful/index.js'; import Auth from '../../../src/auth/index.js'; import type {IEBayApiRequest} from '../../../src/request.js'; @@ -24,13 +21,13 @@ const appConfig = {appId: 'appId', certId: 'certId', sandbox: false, siteId: 77} function createReq(): IEBayApiRequest { return { - get: sinon.stub().returns(Promise.resolve({data: {}})), - delete: sinon.stub().returns(Promise.resolve({data: {}})), - put: sinon.stub().returns(Promise.resolve({data: {}})), - patch: sinon.stub().returns(Promise.resolve({data: {}})), - post: sinon.stub().returns(Promise.resolve({data: {}})), - postForm: sinon.stub().returns(Promise.resolve({data: {}})), - instance: sinon.stub().returns(Promise.resolve({data: {}})) + get: vi.fn().mockResolvedValue({data: {}}), + delete: vi.fn().mockResolvedValue({data: {}}), + put: vi.fn().mockResolvedValue({data: {}}), + patch: vi.fn().mockResolvedValue({data: {}}), + post: vi.fn().mockResolvedValue({data: {}}), + postForm: vi.fn().mockResolvedValue({data: {}}), + instance: vi.fn().mockResolvedValue({data: {}}) }; } @@ -68,20 +65,20 @@ describe('Open API Tests', () => { describe('API > restful > ' + name, () => { tests.forEach((Oas, RestfulApi) => { it('should match name with id', () => { - expect(RestfulApi.id).to.equal(RestfulApi.name); + expect(RestfulApi.id).toBe(RestfulApi.name); }); const api = new RestfulApi(appConfig, request, auth); if (Oas.servers) { it('"' + name + ':' + RestfulApi.name + '" should return url', () => { - expect(api.baseUrl).to.oneOf( + expect( Oas.servers.map((server: any) => server.url.replace('{basePath}', server.variables.basePath.default)) - ); + ).toContain(api.baseUrl); }); it('"' + name + ':' + RestfulApi.name + '" should return correct path', () => { - expect(api.basePath).to.equal( + expect(api.basePath).toBe( Oas.servers[0].variables.basePath.default ); }); @@ -99,11 +96,11 @@ describe('Open API Tests', () => { const orphaned = declaredMethods(RestfulApi).filter(method => !operationIds.has(method)); - expect(orphaned).to.eql( - [], - `AssertionError: "${RestfulApi.name}" implements [${orphaned.join(', ')}], which eBay no longer ` + + expect( + orphaned, + `"${RestfulApi.name}" implements [${orphaned.join(', ')}], which eBay no longer ` + 'publishes. Remove the method, or restore the operation to the spec if it is still supported.' - ); + ).toEqual([]); }); Object.keys(Oas.paths).forEach((path: any) => { @@ -134,23 +131,21 @@ describe('Open API Tests', () => { const restApi = new RestfulApi(appConfig, req, auth); it(`"${name}:${RestfulApi.name}" should implement this method (${path}). `, () => { - expect(restApi[call.operationId]).to.be.a( - 'function', - 'AssertionError: expected to have "' + - call.operationId + - '" implemented.' - ); + expect( + restApi[call.operationId], + 'expected to have "' + call.operationId + '" implemented.' + ).toBeTypeOf('function'); }); it(`"${name}:${RestfulApi.name}:${call.operationId}" call correct method ${method} (${path}).`, () => { return restApi[call.operationId](...args).then(() => { - expect(req[method].calledOnce).to.be.true; + expect(req[method]).toHaveBeenCalledOnce(); }); }); it(`"${name}:${RestfulApi.name}:${call.operationId}" calls correct url (${path}).`, () => { return restApi[call.operationId](...args).then(() => { - expect(decodeURI(req[method].args[0][0])).to.equal(decodeURI(encodeURI(restApi.baseUrl + path))); + expect(decodeURI(req[method].mock.calls[0][0])).toBe(decodeURI(encodeURI(restApi.baseUrl + path))); }); }); }); diff --git a/test/api/restful/restful.spec.ts b/test/api/restful/restful.spec.ts index e4584d41..0280af0c 100644 --- a/test/api/restful/restful.spec.ts +++ b/test/api/restful/restful.spec.ts @@ -1,6 +1,4 @@ -// @ts-ignore -import {expect} from 'chai'; -import sinon from 'sinon'; +import {beforeEach, describe, expect, it, vi} from 'vitest'; import Restful, {defaultApiHeaders} from '../../../src/api/restful/index.js'; import {MarketplaceId} from '../../../src/enums/index.js'; @@ -42,15 +40,15 @@ describe('Restful API', () => { beforeEach(() => { req = { - get: sinon.stub(), - delete: sinon.stub(), - put: sinon.stub(), - patch: sinon.stub(), - post: sinon.stub(), - postForm: sinon.stub().returns(Promise.resolve({ + get: vi.fn(), + delete: vi.fn(), + put: vi.fn(), + patch: vi.fn(), + post: vi.fn(), + postForm: vi.fn().mockResolvedValue({ data: {access_token: 'new_access_token'} - })), - instance: sinon.stub() + }), + instance: vi.fn() }; }); @@ -61,19 +59,19 @@ describe('Restful API', () => { const apiz = new TestApi(config, req).apiz; const apiy = new TestApi(config, req).api({subdomain: 'apiy'}); - expect(api.baseUrl).to.equal('https://api.sandbox.ebay.com/basePath'); - expect(apix.baseUrl).to.equal('https://apix.sandbox.ebay.com/basePath'); - expect(apiz.baseUrl).to.equal('https://apiz.sandbox.ebay.com/basePath'); - expect(apiy.baseUrl).to.equal('https://apiy.sandbox.ebay.com/basePath'); + expect(api.baseUrl).toBe('https://api.sandbox.ebay.com/basePath'); + expect(apix.baseUrl).toBe('https://apix.sandbox.ebay.com/basePath'); + expect(apiz.baseUrl).toBe('https://apiz.sandbox.ebay.com/basePath'); + expect(apiy.baseUrl).toBe('https://apiy.sandbox.ebay.com/basePath'); }); it('extends headers', async () => { - const post = sinon.stub().returns({item: '1'}); + const post = vi.fn().mockReturnValue({item: '1'}); const api = new TestApi(config, {...req, post}).api({headers: {'X-HEADER': 'X-HEADER'}}); api.auth.OAuth2.setCredentials(cred); await api.updateThings(); - expect(post.args[0][2].headers).to.eql({ + expect(post.mock.calls[0][2].headers).toEqual({ ...defaultApiHeaders, 'Authorization': 'Bearer access_token', 'X-HEADER': 'X-HEADER' @@ -87,7 +85,7 @@ describe('Restful API', () => { marketplaceId: MarketplaceId.EBAY_DE }, req); - expect(api.additionalHeaders).to.eql({ + expect(api.additionalHeaders).toEqual({ 'X-EBAY-C-MARKETPLACE-ID': MarketplaceId.EBAY_DE }); }); @@ -95,7 +93,7 @@ describe('Restful API', () => { it('returns correct RequestConfig', async () => { // @ts-ignore const api = new TestApi(config, req, { - getHeaderAuthorization: sinon.stub().returns({'Authorization': 'Authorization'}) + getHeaderAuthorization: vi.fn().mockReturnValue({'Authorization': 'Authorization'}) }); expect(await api.enrichRequestConfig({ @@ -106,7 +104,7 @@ describe('Restful API', () => { 'X-HEADER': 'X-HEADER' } } - })).to.eql({ + })).toEqual({ headers: { 'Authorization': 'Authorization', 'Content-Type': 'application/json', @@ -120,7 +118,7 @@ describe('Restful API', () => { it('lets a per-request header override the default Content-Type', async () => { // @ts-ignore const api = new TestApi(config, req, { - getHeaderAuthorization: sinon.stub().returns({'Authorization': 'Authorization'}) + getHeaderAuthorization: vi.fn().mockReturnValue({'Authorization': 'Authorization'}) }); const {headers} = await api.enrichRequestConfig({ @@ -133,13 +131,13 @@ describe('Restful API', () => { } }); - expect(headers['Content-Type']).to.equal('multipart/form-data'); + expect(headers['Content-Type']).toBe('multipart/form-data'); }); it('lets a per-request header override the app config headers', async () => { // @ts-ignore const api = new TestApi(config, req, { - getHeaderAuthorization: sinon.stub().returns({'Authorization': 'Authorization'}) + getHeaderAuthorization: vi.fn().mockReturnValue({'Authorization': 'Authorization'}) }, {headers: {'Content-Type': 'application/json'}}); const {headers} = await api.enrichRequestConfig({ @@ -152,14 +150,14 @@ describe('Restful API', () => { } }); - expect(headers['Content-Type']).to.equal('application/octet-stream'); + expect(headers['Content-Type']).toBe('application/octet-stream'); }); it('signs the body of a delete request', async () => { - const del = sinon.stub().returns({data: {}}); + const del = vi.fn().mockReturnValue({data: {}}); const api = new TestApi(config, {...req, delete: del}).api({sign: true}); api.auth.OAuth2.setCredentials(cred); - const getDigitalSignatureHeaders = sinon.stub().returns({}); + const getDigitalSignatureHeaders = vi.fn().mockReturnValue({}); // @ts-ignore api.getDigitalSignatureHeaders = getDigitalSignatureHeaders; @@ -167,14 +165,14 @@ describe('Restful API', () => { await api.deleteThing(body); // second argument is the payload the signature is computed over - expect(getDigitalSignatureHeaders.args[0][1]).to.eql(body); - expect(del.args[0][1].data).to.eql(body); + expect(getDigitalSignatureHeaders.mock.calls[0][1]).toEqual(body); + expect(del.mock.calls[0][1].data).toEqual(body); }); it('keeps non-header request config alongside the merged headers', async () => { // @ts-ignore const api = new TestApi(config, req, { - getHeaderAuthorization: sinon.stub().returns({'Authorization': 'Authorization'}) + getHeaderAuthorization: vi.fn().mockReturnValue({'Authorization': 'Authorization'}) }); expect(await api.enrichRequestConfig({ @@ -183,7 +181,7 @@ describe('Restful API', () => { config: { responseType: 'arraybuffer' } - })).to.eql({ + })).toEqual({ responseType: 'arraybuffer', headers: { ...defaultApiHeaders, @@ -194,30 +192,30 @@ describe('Restful API', () => { describe('restful response test', () => { it('returns data', async () => { - const post = sinon.stub().returns({data: {item: '1'}}); + const post = vi.fn().mockReturnValue({data: {item: '1'}}); const api = new TestApi(config, {...req, post}); const response = await api.updateThings(); - expect(response).to.eql({item: '1'}); + expect(response).toEqual({item: '1'}); }); it('returns response', async () => { - const post = sinon.stub().returns({data: {item: '1'}}); + const post = vi.fn().mockReturnValue({data: {item: '1'}}); const api = new TestApi(config, {...req, post}, undefined, {returnResponse: true}); const response = await api.updateThings(); - expect(response).to.eql({data: {item: '1'}}); + expect(response).toEqual({data: {item: '1'}}); }); }); it('refresh the token if invalid token returned', async () => { - const post = sinon.stub().onCall(0).rejects({ + const post = vi.fn().mockRejectedValueOnce({ response: { data: { error: 'Invalid access token' } } - }).onCall(1).resolves({data: {updateThings: 'ok'}}); + }).mockResolvedValueOnce({data: {updateThings: 'ok'}}); const api = new TestApi({ ...config, @@ -225,23 +223,23 @@ describe('Restful API', () => { }, { ...req, post, - postForm: sinon.stub().resolves(cred) + postForm: vi.fn().mockResolvedValue(cred) }); api.auth.OAuth2.setCredentials(cred); const result = await api.updateThings(); - expect(post.callCount).to.equal(2); - expect(result).to.eql({updateThings: 'ok'}); + expect(post).toHaveBeenCalledTimes(2); + expect(result).toEqual({updateThings: 'ok'}); }); it('refresh the token on PostOrder call if response is 401', async () => { - const post = sinon.stub().onCall(0).rejects({ + const post = vi.fn().mockRejectedValueOnce({ response: { status: 401 } - }).onCall(1).resolves({data: {updateThings: 'ok'}}); + }).mockResolvedValueOnce({data: {updateThings: 'ok'}}); const api = new TestApi({ ...config, @@ -249,7 +247,7 @@ describe('Restful API', () => { }, { ...req, post, - postForm: sinon.stub().resolves(cred) + postForm: vi.fn().mockResolvedValue(cred) }, undefined, { basePath: '/post-order/v2' }); @@ -258,16 +256,16 @@ describe('Restful API', () => { const result = await api.updateThings(); - expect(post.callCount).to.equal(2); - expect(result).to.eql({updateThings: 'ok'}); + expect(post).toHaveBeenCalledTimes(2); + expect(result).toEqual({updateThings: 'ok'}); }); it('refresh the token on Inventory call if response is 403', async () => { - const post = sinon.stub().onCall(0).rejects({ + const post = vi.fn().mockRejectedValueOnce({ response: { status: 403 } - }).onCall(1).resolves({data: {updateThings: 'ok'}}); + }).mockResolvedValueOnce({data: {updateThings: 'ok'}}); const api = new TestApi({ ...config, @@ -275,7 +273,7 @@ describe('Restful API', () => { }, { ...req, post, - postForm: sinon.stub().resolves(cred) + postForm: vi.fn().mockResolvedValue(cred) }, undefined, { basePath: '/sell/inventory/v1' }); @@ -284,8 +282,8 @@ describe('Restful API', () => { const result = await api.updateThings(); - expect(post.callCount).to.equal(2); - expect(result).to.eql({updateThings: 'ok'}); + expect(post).toHaveBeenCalledTimes(2); + expect(result).toEqual({updateThings: 'ok'}); }); }); diff --git a/test/api/traditional/traditional.spec.ts b/test/api/traditional/traditional.spec.ts index cdefc387..b1dc663f 100644 --- a/test/api/traditional/traditional.spec.ts +++ b/test/api/traditional/traditional.spec.ts @@ -1,7 +1,4 @@ -import {expect} from 'chai'; -import 'mocha'; -// @ts-ignore -import sinon from 'sinon'; +import {beforeEach, describe, expect, it, vi} from 'vitest'; import Traditional from '../../../src/api/traditional/index.js'; import Auth from '../../../src/auth/index.js'; import type {IEBayApiRequest} from '../../../src/request.js'; @@ -18,13 +15,13 @@ describe('Traditional', () => { }; const request: IEBayApiRequest = { - get: sinon.stub(), - delete: sinon.stub(), - put: sinon.stub(), - patch: sinon.stub(), - post: sinon.stub(), - postForm: sinon.stub(), - instance: sinon.stub() + get: vi.fn(), + delete: vi.fn(), + put: vi.fn(), + patch: vi.fn(), + post: vi.fn(), + postForm: vi.fn(), + instance: vi.fn() }; let auth: Auth; @@ -35,44 +32,44 @@ describe('Traditional', () => { it('return correct eBayAuthToken', () => { const traditional = new Traditional(config, request, auth); - expect(traditional.auth.authNAuth.eBayAuthToken).to.equal('eBayAuthToken'); + expect(traditional.auth.authNAuth.eBayAuthToken).toBe('eBayAuthToken'); }); it('use "eBayAuthToken" if useIaf is set to false', () => { - const post = sinon.stub().returns(Promise.resolve({data: ''})); + const post = vi.fn().mockResolvedValue({data: ''}); const req: IEBayApiRequest = { - get: sinon.stub(), - delete: sinon.stub(), - put: sinon.stub(), - patch: sinon.stub(), + get: vi.fn(), + delete: vi.fn(), + put: vi.fn(), + patch: vi.fn(), post, - postForm: sinon.stub(), - instance: sinon.stub() + postForm: vi.fn(), + instance: vi.fn() }; const traditional = new Traditional(config, req, auth); const trading = traditional.createTradingApi(); return trading.GetAccount({}, {raw: true, useIaf: false}).then(data => { - expect(post.args[0][1]).to.equal([ + expect(post.mock.calls[0][1]).toBe([ '', '', 'eBayAuthToken', '' ].join('')); - expect(data).to.equal(''); + expect(data).toBe(''); }); }); it('use Auth Token event if "accessToken" is available', () => { - const post = sinon.stub().returns(Promise.resolve({data: ''})); + const post = vi.fn().mockResolvedValue({data: ''}); const req: IEBayApiRequest = { - get: sinon.stub(), - delete: sinon.stub(), - put: sinon.stub(), - patch: sinon.stub(), + get: vi.fn(), + delete: vi.fn(), + put: vi.fn(), + patch: vi.fn(), post, - postForm: sinon.stub(), - instance: sinon.stub() + postForm: vi.fn(), + instance: vi.fn() }; auth.OAuth2.setCredentials({ access_token: 'accessToken', @@ -85,26 +82,26 @@ describe('Traditional', () => { const traditional = new Traditional(config, req, auth); const trading = traditional.createTradingApi(); return trading.GetAccount({}, {raw: true}).then(data => { - expect(post.args[0][1]).to.equal([ + expect(post.mock.calls[0][1]).toBe([ '', '', 'eBayAuthToken' ].join('')); - expect(data).to.equal(''); - expect(post.args[0][2].headers['X-EBAY-API-IAF-TOKEN']).to.equal(undefined); + expect(data).toBe(''); + expect(post.mock.calls[0][2].headers['X-EBAY-API-IAF-TOKEN']).toBe(undefined); }); }); it('use IAF token if "accessToken" is available', () => { - const post = sinon.stub().returns(Promise.resolve({data: ''})); + const post = vi.fn().mockResolvedValue({data: ''}); const req: IEBayApiRequest = { - get: sinon.stub(), - delete: sinon.stub(), - put: sinon.stub(), - patch: sinon.stub(), + get: vi.fn(), + delete: vi.fn(), + put: vi.fn(), + patch: vi.fn(), post, - postForm: sinon.stub(), - instance: sinon.stub() + postForm: vi.fn(), + instance: vi.fn() }; auth.OAuth2.setCredentials({ access_token: 'accessToken', @@ -118,26 +115,26 @@ describe('Traditional', () => { const traditional = new Traditional(config, req, auth); const trading = traditional.createTradingApi(); return trading.GetAccount({}, {raw: true}).then(data => { - expect(post.args[0][1]).to.equal([ + expect(post.mock.calls[0][1]).toBe([ '', '', '' ].join('')); - expect(data).to.equal(''); - expect(post.args[0][2].headers['X-EBAY-API-IAF-TOKEN']).to.equal('accessToken'); + expect(data).toBe(''); + expect(post.mock.calls[0][2].headers['X-EBAY-API-IAF-TOKEN']).toBe('accessToken'); }); }); - it('throws EBayIAFTokenExpired of error code is 21917053', () => { - const post = sinon.stub().returns(Promise.resolve({data: '21917053'})); + it('throws EBayIAFTokenExpired of error code is 21917053', async () => { + const post = vi.fn().mockResolvedValue({data: 'Failure21917053'}); const req: IEBayApiRequest = { - get: sinon.stub(), - delete: sinon.stub(), - put: sinon.stub(), - patch: sinon.stub(), + get: vi.fn(), + delete: vi.fn(), + put: vi.fn(), + patch: vi.fn(), post, - postForm: sinon.stub(), - instance: sinon.stub() + postForm: vi.fn(), + instance: vi.fn() }; auth.OAuth2.setCredentials({ access_token: 'accessToken', @@ -148,21 +145,19 @@ describe('Traditional', () => { }); const traditional = new Traditional(config, req, auth); const trading = traditional.createTradingApi(); - return trading.GetAccount({}).catch(error => { - expect(error.name).to.equal('EBayIAFTokenExpired'); - }); + await expect(trading.GetAccount({})).rejects.toHaveProperty('name', 'EBayIAFTokenExpired'); }); - it('returns response', () => { - const post = sinon.stub().returns(Promise.resolve({data: 'data'})); + it('returns response', async () => { + const post = vi.fn().mockResolvedValue({data: 'data'}); const req: IEBayApiRequest = { - get: sinon.stub(), - delete: sinon.stub(), - put: sinon.stub(), - patch: sinon.stub(), + get: vi.fn(), + delete: vi.fn(), + put: vi.fn(), + patch: vi.fn(), post, - postForm: sinon.stub(), - instance: sinon.stub() + postForm: vi.fn(), + instance: vi.fn() }; auth.OAuth2.setCredentials({ access_token: 'accessToken', @@ -173,8 +168,7 @@ describe('Traditional', () => { }); const traditional = new Traditional(config, req, auth); const trading = traditional.createTradingApi(); - return trading.GetAccount({}, {returnResponse: true}).catch(error => { - expect(error.name).to.eql({data: 'data'}); - }); + const response = await trading.GetAccount({}, {returnResponse: true}); + expect(response).toEqual({data: 'data'}); }); }); diff --git a/test/api/traditional/xmlRequest.spec.ts b/test/api/traditional/xmlRequest.spec.ts index 9ac7808f..81274a27 100644 --- a/test/api/traditional/xmlRequest.spec.ts +++ b/test/api/traditional/xmlRequest.spec.ts @@ -1,20 +1,17 @@ -import {expect} from 'chai'; -import 'mocha'; -// @ts-ignore -import sinon from 'sinon'; +import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest'; import XMLRequest, {type XMLReqConfig} from '../../../src/api/traditional/XMLRequest.js'; import type {IEBayApiRequest} from '../../../src/request.js'; function createReq(apiResponse: string): IEBayApiRequest { return { - get: sinon.stub().returns(Promise.resolve({})), - delete: sinon.stub().returns(Promise.resolve({})), - put: sinon.stub().returns(Promise.resolve({})), - patch: sinon.stub().returns(Promise.resolve({})), - post: sinon.stub().returns(Promise.resolve({data: apiResponse})), - postForm: sinon.stub().returns(Promise.resolve({})), - instance: sinon.stub() + get: vi.fn().mockResolvedValue({}), + delete: vi.fn().mockResolvedValue({}), + put: vi.fn().mockResolvedValue({}), + patch: vi.fn().mockResolvedValue({}), + post: vi.fn().mockResolvedValue({data: apiResponse}), + postForm: vi.fn().mockResolvedValue({}), + instance: vi.fn() }; } @@ -39,13 +36,13 @@ describe('XMLRequestTest', () => { }); afterEach(() => { - sinon.reset(); + vi.clearAllMocks(); }); it('Return Raw Response XML', () => { const request = new XMLRequest('CALL', {}, config, req); return request.request().then(result => { - expect(result).to.equal(apiResponse); + expect(result).toBe(apiResponse); }); }); @@ -53,7 +50,7 @@ describe('XMLRequestTest', () => { const request = new XMLRequest('CALL', {Param: 'Param'}, config, req); return request.request().then(() => { // @ts-ignore - expect(req.post.args[0][0]).to.equal('endpoint'); + expect(req.post.mock.calls[0][0]).toBe('endpoint'); }); }); @@ -61,7 +58,7 @@ describe('XMLRequestTest', () => { const request = new XMLRequest('CALL', {Param: 'Param'}, config, req); return request.request().then(() => { // @ts-ignore - expect(req.post.args[0][1]).to.equal([ + expect(req.post.mock.calls[0][1]).toBe([ '', '', 'eBayAuthToken', @@ -80,7 +77,7 @@ describe('XMLRequestTest', () => { }, config, req); return request.request().then(() => { // @ts-ignore - expect(req.post.args[0][1]).to.equal([ + expect(req.post.mock.calls[0][1]).toBe([ '', '', 'eBayAuthToken', @@ -101,7 +98,7 @@ describe('XMLRequestTest', () => { }, config, req); return request.request().then(() => { // @ts-ignore - expect(req.post.args[0][1]).to.equal([ + expect(req.post.mock.calls[0][1]).toBe([ '', '', 'eBayAuthToken', @@ -117,12 +114,12 @@ describe('XMLRequestTest', () => { Item `; - req.post = sinon.stub().returns(Promise.resolve({data: xml})); + req.post = vi.fn().mockResolvedValue({data: xml}); const request = new XMLRequest('CALL', {}, {...config, raw: false}, req); return request.request().then(result => { expect({ Item: 'Item' - }).to.deep.equal(result); + }).toEqual(result); }); }); @@ -132,7 +129,7 @@ describe('XMLRequestTest', () => { 2.99 `; - req.post = sinon.stub().returns(Promise.resolve({data: xml})); + req.post = vi.fn().mockResolvedValue({data: xml}); const request = new XMLRequest('CALL', {}, {...config, raw: false}, req); return request.request().then(result => { expect({ @@ -141,7 +138,7 @@ describe('XMLRequestTest', () => { value: 2.99, total: false } - }).to.deep.equal(result); + }).toEqual(result); }); }); @@ -160,7 +157,7 @@ describe('XMLRequestTest', () => { `; - req.post = sinon.stub().returns(Promise.resolve({data: xml})); + req.post = vi.fn().mockResolvedValue({data: xml}); const request = new XMLRequest('CALL', {}, {...config, raw: false}, req); return request.request().then(result => { expect({ @@ -181,7 +178,7 @@ describe('XMLRequestTest', () => { }] } } - }).to.deep.equal(result); + }).toEqual(result); }); }); @@ -200,7 +197,7 @@ describe('XMLRequestTest', () => { `.replace(/>\s+<'); - req.post = sinon.stub().returnsArg(1) + req.post = vi.fn().mockImplementation((_endpoint, body) => Promise.resolve(body)) const request = new XMLRequest('CALL', { UserDeliveryPreferenceArray: [{ NotificationEnable: { @@ -215,13 +212,13 @@ describe('XMLRequestTest', () => { }] }, {...config, returnResponse: true, xmlBuilderOptions: { oneListGroup: true }}, req); return request.request().then(result => { - expect(result).to.equal(xml); + expect(result).toBe(xml); }); }); describe('request', () => { it('call custom body function and headers', () => { - const post = sinon.stub().returns(Promise.resolve({data: apiResponse})); + const post = vi.fn().mockResolvedValue({data: apiResponse}); const request = new XMLRequest('CALL', {}, { ...config, @@ -236,13 +233,13 @@ describe('XMLRequestTest', () => { {...req, post}); return request.request().then(result => { - expect(post.args[0][1]).to.eql('custom'); - expect(post.args[0][2].headers).to.eql({ + expect(post.mock.calls[0][1]).toEqual('custom'); + expect(post.mock.calls[0][2].headers).toEqual({ 'CALL': 'CALL', 'Content-Type': 'multipart/form-data', 'X_-HEADER': 'header' }); - expect(result).to.equal(apiResponse); + expect(result).toBe(apiResponse); }); }); }); diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 00000000..a18dea82 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,12 @@ +import {defineConfig} from 'vitest/config'; + +export default defineConfig({ + test: { + include: ['test/**/*.spec.ts'], + coverage: { + provider: 'v8', + include: ['src/**/*.ts'], + exclude: ['src/types/**'] + } + } +});