From 031591dd7a86395ae298409da4d37dadc83b49c8 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Thu, 25 Sep 2025 23:52:12 -0400 Subject: [PATCH 1/4] Update testing framework and improve project configuration: migrate tests to Vitest, add coverage reporting, and enhance README with updated test commands. Introduce Vitest configuration file and update VSCode settings for TypeScript support. --- .vscode/settings.json | 17 + README.md | 6 +- package-lock.json | 2423 ++++++++++++++++++++++++- package.json | 11 +- src/__tests__/index.smoke.test.ts | 74 +- src/lib/__tests__/dates.test.ts | 13 +- src/lib/__tests__/domain.test.ts | 11 +- src/rdap/__tests__/normalize.test.ts | 29 +- src/whois/__tests__/normalize.test.ts | 31 +- vitest.config.ts | 18 + 10 files changed, 2508 insertions(+), 125 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 vitest.config.ts diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..de876df --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,17 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib", + "editor.defaultFormatter": "biomejs.biome", + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "emmet.showExpandedAbbreviation": "never", + "editor.codeActionsOnSave": { + "source.fixAll.biome": "explicit", + "source.organizeImports.biome": "explicit" + }, + "[typescript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[javascript]": { + "editor.defaultFormatter": "biomejs.biome" + } +} diff --git a/README.md b/README.md index 3f2d343..11395e1 100644 --- a/README.md +++ b/README.md @@ -155,9 +155,11 @@ Timeouts are enforced per request using a simple race against `timeoutMs` (defau ## Development - Build: `npm run build` -- Test: `npm test` +- Test: `npm test` (Vitest) - By default, tests are offline/deterministic. - - Smoke tests that hit the network are gated by `SMOKE=1`, e.g. `SMOKE=1 npm test`. + - Watch mode: `npm run test:watch` + - Coverage: `npm run test:coverage` + - Smoke tests that hit the network are gated by `SMOKE=1`, e.g. `SMOKE=1 npm run test:smoke`. - Lint/format: `npm run lint` (Biome) Project layout: diff --git a/package-lock.json b/package-lock.json index 784fc0d..3ba7e8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,12 +15,88 @@ "@biomejs/biome": "2.2.4", "@types/node": "24.5.2", "@types/psl": "1.1.3", - "typescript": "5.9.2" + "@vitest/coverage-v8": "^3.2.4", + "typescript": "5.9.2", + "vitest": "^3.2.4" }, "engines": { "node": ">=18.17" } }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.4" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", + "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@biomejs/biome": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.2.4.tgz", @@ -184,64 +260,2329 @@ "node": ">=14.21.3" } }, - "node_modules/@types/node": { - "version": "24.5.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.5.2.tgz", - "integrity": "sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz", + "integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==", + "cpu": [ + "ppc64" + ], "dev": true, "license": "MIT", - "dependencies": { - "undici-types": "~7.12.0" + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@types/psl": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@types/psl/-/psl-1.1.3.tgz", - "integrity": "sha512-Iu174JHfLd7i/XkXY6VDrqSlPvTDQOtQI7wNAXKKOAADJ9TduRLkNdMgjGiMxSttUIZnomv81JAbAbC0DhggxA==", + "node_modules/@esbuild/android-arm": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz", + "integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/psl": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", - "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "node_modules/@esbuild/android-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz", + "integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "punycode": "^2.3.1" - }, - "funding": { - "url": "https://github.com/sponsors/lupomontero" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" } }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "node_modules/@esbuild/android-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz", + "integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=6" + "node": ">=18" } }, - "node_modules/typescript": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", - "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz", + "integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=14.17" + "node": ">=18" } }, - "node_modules/undici-types": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.12.0.tgz", - "integrity": "sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ==", + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.10.tgz", + "integrity": "sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz", + "integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz", + "integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz", + "integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz", + "integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz", + "integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz", + "integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz", + "integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz", + "integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz", + "integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz", + "integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz", + "integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz", + "integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz", + "integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz", + "integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz", + "integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz", + "integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz", + "integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz", + "integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz", + "integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.10.tgz", + "integrity": "sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "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/@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", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "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==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.2.tgz", + "integrity": "sha512-o3pcKzJgSGt4d74lSZ+OCnHwkKBeAbFDmbEm5gg70eA8VkyCuC/zV9TwBnmw6VjDlRdF4Pshfb+WE9E6XY1PoQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.2.tgz", + "integrity": "sha512-cqFSWO5tX2vhC9hJTK8WAiPIm4Q8q/cU8j2HQA0L3E1uXvBYbOZMhE2oFL8n2pKB5sOCHY6bBuHaRwG7TkfJyw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.2.tgz", + "integrity": "sha512-vngduywkkv8Fkh3wIZf5nFPXzWsNsVu1kvtLETWxTFf/5opZmflgVSeLgdHR56RQh71xhPhWoOkEBvbehwTlVA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.2.tgz", + "integrity": "sha512-h11KikYrUCYTrDj6h939hhMNlqU2fo/X4NB0OZcys3fya49o1hmFaczAiJWVAFgrM1NCP6RrO7lQKeVYSKBPSQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.2.tgz", + "integrity": "sha512-/eg4CI61ZUkLXxMHyVlmlGrSQZ34xqWlZNW43IAU4RmdzWEx0mQJ2mN/Cx4IHLVZFL6UBGAh+/GXhgvGb+nVxw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.2.tgz", + "integrity": "sha512-QOWgFH5X9+p+S1NAfOqc0z8qEpJIoUHf7OWjNUGOeW18Mx22lAUOiA9b6r2/vpzLdfxi/f+VWsYjUOMCcYh0Ng==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.2.tgz", + "integrity": "sha512-kDWSPafToDd8LcBYd1t5jw7bD5Ojcu12S3uT372e5HKPzQt532vW+rGFFOaiR0opxePyUkHrwz8iWYEyH1IIQA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.2.tgz", + "integrity": "sha512-gKm7Mk9wCv6/rkzwCiUC4KnevYhlf8ztBrDRT9g/u//1fZLapSRc+eDZj2Eu2wpJ+0RzUKgtNijnVIB4ZxyL+w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.2.tgz", + "integrity": "sha512-66lA8vnj5mB/rtDNwPgrrKUOtCLVQypkyDa2gMfOefXK6rcZAxKLO9Fy3GkW8VkPnENv9hBkNOFfGLf6rNKGUg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.2.tgz", + "integrity": "sha512-s+OPucLNdJHvuZHuIz2WwncJ+SfWHFEmlC5nKMUgAelUeBUnlB4wt7rXWiyG4Zn07uY2Dd+SGyVa9oyLkVGOjA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.2.tgz", + "integrity": "sha512-8wTRM3+gVMDLLDdaT6tKmOE3lJyRy9NpJUS/ZRWmLCmOPIJhVyXwjBo+XbrrwtV33Em1/eCTd5TuGJm4+DmYjw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.2.tgz", + "integrity": "sha512-6yqEfgJ1anIeuP2P/zhtfBlDpXUb80t8DpbYwXQ3bQd95JMvUaqiX+fKqYqUwZXqdJDd8xdilNtsHM2N0cFm6A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.2.tgz", + "integrity": "sha512-sshYUiYVSEI2B6dp4jMncwxbrUqRdNApF2c3bhtLAU0qA8Lrri0p0NauOsTWh3yCCCDyBOjESHMExonp7Nzc0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.2.tgz", + "integrity": "sha512-duBLgd+3pqC4MMwBrKkFxaZerUxZcYApQVC5SdbF5/e/589GwVvlRUnyqMFbM8iUSb1BaoX/3fRL7hB9m2Pj8Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.2.tgz", + "integrity": "sha512-tzhYJJidDUVGMgVyE+PmxENPHlvvqm1KILjjZhB8/xHYqAGeizh3GBGf9u6WdJpZrz1aCpIIHG0LgJgH9rVjHQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.2.tgz", + "integrity": "sha512-opH8GSUuVcCSSyHHcl5hELrmnk4waZoVpgn/4FDao9iyE4WpQhyWJ5ryl5M3ocp4qkRuHfyXnGqg8M9oKCEKRA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.2.tgz", + "integrity": "sha512-LSeBHnGli1pPKVJ79ZVJgeZWWZXkEe/5o8kcn23M8eMKCUANejchJbF/JqzM4RRjOJfNRhKJk8FuqL1GKjF5oQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.2.tgz", + "integrity": "sha512-uPj7MQ6/s+/GOpolavm6BPo+6CbhbKYyZHUDvZ/SmJM7pfDBgdGisFX3bY/CBDMg2ZO4utfhlApkSfZ92yXw7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.2.tgz", + "integrity": "sha512-Z9MUCrSgIaUeeHAiNkm3cQyst2UhzjPraR3gYYfOjAuZI7tcFRTOD+4cHLPoS/3qinchth+V56vtqz1Tv+6KPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.2.tgz", + "integrity": "sha512-+GnYBmpjldD3XQd+HMejo+0gJGwYIOfFeoBQv32xF/RUIvccUz20/V6Otdv+57NE70D5pa8W/jVGDoGq0oON4A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.2.tgz", + "integrity": "sha512-ApXFKluSB6kDQkAqZOKXBjiaqdF1BlKi+/eqnYe9Ee7U2K3pUDKsIyr8EYm/QDHTJIM+4X+lI0gJc3TTRhd+dA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.2.tgz", + "integrity": "sha512-ARz+Bs8kY6FtitYM96PqPEVvPXqEZmPZsSkXvyX19YzDqkCaIlhCieLLMI5hxO9SRZ2XtCtm8wxhy0iJ2jxNfw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/chai": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*" + } + }, + "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/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "24.5.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.5.2.tgz", + "integrity": "sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.12.0" + } + }, + "node_modules/@types/psl": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/psl/-/psl-1.1.3.tgz", + "integrity": "sha512-Iu174JHfLd7i/XkXY6VDrqSlPvTDQOtQI7wNAXKKOAADJ9TduRLkNdMgjGiMxSttUIZnomv81JAbAbC0DhggxA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vitest/coverage-v8": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.2.4.tgz", + "integrity": "sha512-EyF9SXU6kS5Ku/U82E259WSnvg6c8KTjppUncuNdm5QHpe17mwREHnjDzozC8x9MZ0xfBUFSaLkRv4TMA75ALQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "@bcoe/v8-coverage": "^1.0.2", + "ast-v8-to-istanbul": "^0.3.3", + "debug": "^4.4.1", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^5.0.6", + "istanbul-reports": "^3.1.7", + "magic-string": "^0.30.17", + "magicast": "^0.3.5", + "std-env": "^3.9.0", + "test-exclude": "^7.0.1", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/browser": "3.2.4", + "vitest": "3.2.4" + }, + "peerDependenciesMeta": { + "@vitest/browser": { + "optional": true + } + } + }, + "node_modules/@vitest/expect": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", + "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.4", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", + "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", + "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.4", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^4.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", + "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "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/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/assertion-error": { + "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": ">=12" + } + }, + "node_modules/ast-v8-to-istanbul": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-0.3.5.tgz", + "integrity": "sha512-9SdXjNheSiE8bALAQCQQuT6fgQaoxJh7IRYrRGZ8/9nv8WhJeC1aXAwN8TbaOssGOukUvyvnkgD9+Yuykvl1aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.30", + "estree-walker": "^3.0.3", + "js-tokens": "^9.0.1" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chai": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", + "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "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": "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/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.10.tgz", + "integrity": "sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.10", + "@esbuild/android-arm": "0.25.10", + "@esbuild/android-arm64": "0.25.10", + "@esbuild/android-x64": "0.25.10", + "@esbuild/darwin-arm64": "0.25.10", + "@esbuild/darwin-x64": "0.25.10", + "@esbuild/freebsd-arm64": "0.25.10", + "@esbuild/freebsd-x64": "0.25.10", + "@esbuild/linux-arm": "0.25.10", + "@esbuild/linux-arm64": "0.25.10", + "@esbuild/linux-ia32": "0.25.10", + "@esbuild/linux-loong64": "0.25.10", + "@esbuild/linux-mips64el": "0.25.10", + "@esbuild/linux-ppc64": "0.25.10", + "@esbuild/linux-riscv64": "0.25.10", + "@esbuild/linux-s390x": "0.25.10", + "@esbuild/linux-x64": "0.25.10", + "@esbuild/netbsd-arm64": "0.25.10", + "@esbuild/netbsd-x64": "0.25.10", + "@esbuild/openbsd-arm64": "0.25.10", + "@esbuild/openbsd-x64": "0.25.10", + "@esbuild/openharmony-arm64": "0.25.10", + "@esbuild/sunos-x64": "0.25.10", + "@esbuild/win32-arm64": "0.25.10", + "@esbuild/win32-ia32": "0.25.10", + "@esbuild/win32-x64": "0.25.10" + } + }, + "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/expect-type": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", + "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "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/fsevents": { + "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" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "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/has-flag": { + "version": "4.0.0", + "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" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "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-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/loupe": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", + "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", + "dev": true, + "license": "MIT" + }, + "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/magic-string": { + "version": "0.30.19", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz", + "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/magicast": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", + "source-map-js": "^1.2.0" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "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/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "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.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/psl": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/rollup": { + "version": "4.52.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.2.tgz", + "integrity": "sha512-I25/2QgoROE1vYV+NQ1En9T9UFB9Cmfm2CJ83zZOlaDpvz29wGQSZXWKw7MiNXau7wYgB/T9fVIdIuEQ+KbiiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.52.2", + "@rollup/rollup-android-arm64": "4.52.2", + "@rollup/rollup-darwin-arm64": "4.52.2", + "@rollup/rollup-darwin-x64": "4.52.2", + "@rollup/rollup-freebsd-arm64": "4.52.2", + "@rollup/rollup-freebsd-x64": "4.52.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.52.2", + "@rollup/rollup-linux-arm-musleabihf": "4.52.2", + "@rollup/rollup-linux-arm64-gnu": "4.52.2", + "@rollup/rollup-linux-arm64-musl": "4.52.2", + "@rollup/rollup-linux-loong64-gnu": "4.52.2", + "@rollup/rollup-linux-ppc64-gnu": "4.52.2", + "@rollup/rollup-linux-riscv64-gnu": "4.52.2", + "@rollup/rollup-linux-riscv64-musl": "4.52.2", + "@rollup/rollup-linux-s390x-gnu": "4.52.2", + "@rollup/rollup-linux-x64-gnu": "4.52.2", + "@rollup/rollup-linux-x64-musl": "4.52.2", + "@rollup/rollup-openharmony-arm64": "4.52.2", + "@rollup/rollup-win32-arm64-msvc": "4.52.2", + "@rollup/rollup-win32-ia32-msvc": "4.52.2", + "@rollup/rollup-win32-x64-gnu": "4.52.2", + "@rollup/rollup-win32-x64-msvc": "4.52.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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, + "license": "ISC" + }, + "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" + } + }, + "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/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/std-env": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "dev": true, + "license": "MIT" + }, + "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/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/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/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-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/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-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "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" + }, + "engines": { + "node": ">=8" + } + }, + "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/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": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.4.tgz", + "integrity": "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/typescript": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "7.12.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.12.0.tgz", + "integrity": "sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.7.tgz", + "integrity": "sha512-VbA8ScMvAISJNJVbRDTJdCwqQoAareR/wutevKanhR2/1EkoXVZVkkORaYm/tNVCjP/UDTKtcw3bAkwOUdedmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "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", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.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 + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "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": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", + "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.4", + "@vitest/mocker": "3.2.4", + "@vitest/pretty-format": "^3.2.4", + "@vitest/runner": "3.2.4", + "@vitest/snapshot": "3.2.4", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.4", + "@vitest/ui": "3.2.4", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "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/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/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/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/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/wrap-ansi-cjs/node_modules/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" + } } } } diff --git a/package.json b/package.json index 4e5ab10..14f2cc9 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,10 @@ "scripts": { "clean": "rm -rf dist", "build": "npm run clean && tsc -p tsconfig.build.json", - "test": "npm run clean && tsc -p tsconfig.json && node --test dist/**/*.test.js", + "test": "npm run clean && tsc -p tsconfig.json && vitest run", + "test:watch": "vitest", + "test:coverage": "vitest run --coverage", + "test:smoke": "SMOKE=1 vitest run --include src/**/__tests__/**/*.smoke.test.ts", "lint": "biome check --write", "prepublishOnly": "npm run build" }, @@ -39,7 +42,9 @@ "@biomejs/biome": "2.2.4", "@types/node": "24.5.2", "@types/psl": "1.1.3", - "typescript": "5.9.2" + "@vitest/coverage-v8": "^3.2.4", + "typescript": "5.9.2", + "vitest": "^3.2.4" }, "engines": { "node": ">=18.17" @@ -53,4 +58,4 @@ "parser", "normalizer" ] -} +} \ No newline at end of file diff --git a/src/__tests__/index.smoke.test.ts b/src/__tests__/index.smoke.test.ts index 11d3640..57e73ef 100644 --- a/src/__tests__/index.smoke.test.ts +++ b/src/__tests__/index.smoke.test.ts @@ -1,7 +1,6 @@ /** biome-ignore-all lint/style/noNonNullAssertion: this is fine for tests */ -import assert from "node:assert/strict"; -import test from "node:test"; +import { expect, test } from "vitest"; import { isAvailable, isRegistered, lookupDomain } from "../index.js"; // Run only when SMOKE=1 to avoid flakiness and network in CI by default @@ -15,10 +14,12 @@ const shouldRun = process.env.SMOKE === "1"; timeoutMs: 12000, followWhoisReferral: true, }); - assert.equal(res.ok, true, res.error); - assert.ok(res.record?.domain); - assert.ok(res.record?.tld); - assert.ok(res.record?.source === "rdap" || res.record?.source === "whois"); + expect(res.ok, res.error).toBe(true); + expect(Boolean(res.record?.domain)).toBe(true); + expect(Boolean(res.record?.tld)).toBe(true); + expect( + res.record?.source === "rdap" || res.record?.source === "whois", + ).toBe(true); }, ); @@ -37,28 +38,28 @@ for (const c of rdapCases) { timeoutMs: 15000, rdapOnly: true, }); - assert.equal(res.ok, true, res.error); + expect(res.ok, res.error).toBe(true); const rec = res.record!; - assert.equal(rec.tld, c.tld); - assert.equal(rec.source, "rdap"); + expect(rec.tld).toBe(c.tld); + expect(rec.source).toBe("rdap"); // Registrar ID is IANA (376) for example domains - assert.equal(rec.registrar?.ianaId, "376"); + expect(rec.registrar?.ianaId).toBe("376"); if (c.tld !== "org") { // .com/.net often include the IANA reserved name explicitly - assert.ok( + expect( (rec.registrar?.name || "") .toLowerCase() .includes("internet assigned numbers authority"), - ); + ).toBe(true); } // IANA nameservers const ns = (rec.nameservers || []).map((n) => n.host.toLowerCase()); - assert.ok(ns.includes("a.iana-servers.net")); - assert.ok(ns.includes("b.iana-servers.net")); + expect(ns.includes("a.iana-servers.net")).toBe(true); + expect(ns.includes("b.iana-servers.net")).toBe(true); if (c.expectDs) { // DS records typically present for .com/.net - assert.equal(rec.dnssec?.enabled, true); - assert.ok((rec.dnssec?.dsRecords || []).length > 0); + expect(rec.dnssec?.enabled).toBe(true); + expect((rec.dnssec?.dsRecords || []).length > 0).toBe(true); } }, ); @@ -72,7 +73,7 @@ for (const c of rdapCases) { timeoutMs: 15000, rdapOnly: true, }); - assert.equal(res.ok, false); + expect(res.ok).toBe(false); }, ); @@ -85,18 +86,17 @@ for (const c of rdapCases) { whoisOnly: true, followWhoisReferral: true, }); - assert.equal(res.ok, true, res.error); - assert.equal(res.record?.tld, "com"); - assert.equal(res.record?.source, "whois"); + expect(res.ok, res.error).toBe(true); + expect(res.record?.tld).toBe("com"); + expect(res.record?.source).toBe("whois"); // Invariants for example.com - assert.equal( - res.record?.whoisServer?.toLowerCase(), + expect(res.record?.whoisServer?.toLowerCase()).toBe( "whois.verisign-grs.com", ); - assert.equal(res.record?.registrar?.ianaId, "376"); + expect(res.record?.registrar?.ianaId).toBe("376"); const ns = (res.record?.nameservers || []).map((n) => n.host.toLowerCase()); - assert.ok(ns.includes("a.iana-servers.net")); - assert.ok(ns.includes("b.iana-servers.net")); + expect(ns.includes("a.iana-servers.net")).toBe(true); + expect(ns.includes("b.iana-servers.net")).toBe(true); }, ); @@ -107,28 +107,30 @@ for (const c of rdapCases) { whoisOnly: true, followWhoisReferral: true, }); - assert.equal(res.ok, true, res.error); + expect(res.ok, res.error).toBe(true); const rec = res.record!; - assert.equal(rec.tld, "io"); - assert.equal(rec.source, "whois"); + expect(rec.tld).toBe("io"); + expect(rec.source).toBe("whois"); // Accept either TLD WHOIS or registrar WHOIS as the final server const server = (rec.whoisServer || "").toLowerCase(); - assert.ok(["whois.nic.io", "whois.namecheap.com"].includes(server)); + expect(["whois.nic.io", "whois.namecheap.com"].includes(server)).toBe(true); // Registrar ID may only be present on registrar WHOIS responses if (rec.registrar?.ianaId) { - assert.equal(rec.registrar.ianaId, "1068"); + expect(rec.registrar.ianaId).toBe("1068"); } // Nameservers commonly set for example.io (DigitalOcean) const ns = (rec.nameservers || []).map((n) => n.host.toLowerCase()); - assert.ok(ns.includes("ns1.digitalocean.com")); - assert.ok(ns.includes("ns2.digitalocean.com")); - assert.ok(ns.includes("ns3.digitalocean.com")); + expect(ns.includes("ns1.digitalocean.com")).toBe(true); + expect(ns.includes("ns2.digitalocean.com")).toBe(true); + expect(ns.includes("ns3.digitalocean.com")).toBe(true); }); (shouldRun ? test : test.skip)( "isRegistered true for example.com", async () => { - assert.equal(await isRegistered("example.com", { timeoutMs: 15000 }), true); + await expect( + isRegistered("example.com", { timeoutMs: 15000 }), + ).resolves.toBe(true); }, ); @@ -136,6 +138,8 @@ for (const c of rdapCases) { "isAvailable true for an unlikely .com", async () => { const unlikely = `nonexistent-${Date.now()}-smoke-example.com`; - assert.equal(await isAvailable(unlikely, { timeoutMs: 15000 }), true); + await expect(isAvailable(unlikely, { timeoutMs: 15000 })).resolves.toBe( + true, + ); }, ); diff --git a/src/lib/__tests__/dates.test.ts b/src/lib/__tests__/dates.test.ts index aacbceb..71fdf70 100644 --- a/src/lib/__tests__/dates.test.ts +++ b/src/lib/__tests__/dates.test.ts @@ -1,22 +1,21 @@ /** biome-ignore-all lint/style/noNonNullAssertion: this is fine for tests */ -import assert from "node:assert/strict"; -import test from "node:test"; +import { expect, test } from "vitest"; import { toISO } from "../dates.js"; test("toISO parses ISO and common whois formats", () => { const iso = toISO("2023-01-02T03:04:05Z"); - assert.equal(iso, "2023-01-02T03:04:05Z"); + expect(iso).toBe("2023-01-02T03:04:05Z"); const noZ = toISO("2023-01-02 03:04:05"); - assert.match(noZ!, /^2023-01-02T03:04:05Z$/); + expect(noZ!).toMatch(/^2023-01-02T03:04:05Z$/); const slash = toISO("2023/01/02 03:04:05"); - assert.match(slash!, /^2023-01-02T03:04:05Z$/); + expect(slash!).toMatch(/^2023-01-02T03:04:05Z$/); const dmy = toISO("02-Jan-2023"); - assert.equal(dmy, "2023-01-02T00:00:00Z"); + expect(dmy).toBe("2023-01-02T00:00:00Z"); const mdy = toISO("Jan 02 2023"); - assert.equal(mdy, "2023-01-02T00:00:00Z"); + expect(mdy).toBe("2023-01-02T00:00:00Z"); }); diff --git a/src/lib/__tests__/domain.test.ts b/src/lib/__tests__/domain.test.ts index 4a4901a..f0d567a 100644 --- a/src/lib/__tests__/domain.test.ts +++ b/src/lib/__tests__/domain.test.ts @@ -1,13 +1,12 @@ -import assert from "node:assert/strict"; -import test from "node:test"; +import { expect, test } from "vitest"; import { extractTld, isLikelyDomain } from "../domain.js"; test("extractTld basic", () => { - assert.equal(extractTld("example.com"), "com"); - assert.equal(extractTld("sub.example.co.uk"), "uk"); + expect(extractTld("example.com")).toBe("com"); + expect(extractTld("sub.example.co.uk")).toBe("uk"); }); test("isLikelyDomain", () => { - assert.equal(isLikelyDomain("example.com"), true); - assert.equal(isLikelyDomain("not a domain"), false); + expect(isLikelyDomain("example.com")).toBe(true); + expect(isLikelyDomain("not a domain")).toBe(false); }); diff --git a/src/rdap/__tests__/normalize.test.ts b/src/rdap/__tests__/normalize.test.ts index 3ab52f5..763b24b 100644 --- a/src/rdap/__tests__/normalize.test.ts +++ b/src/rdap/__tests__/normalize.test.ts @@ -1,5 +1,4 @@ -import assert from "node:assert/strict"; -import test from "node:test"; +import { expect, test } from "vitest"; import { normalizeRdap } from "../normalize.js"; test("normalizeRdap maps registrar, contacts, nameservers, events, dnssec", () => { @@ -67,17 +66,17 @@ test("normalizeRdap maps registrar, contacts, nameservers, events, dnssec", () = ["https://rdap.example/"], "2025-01-01T00:00:00Z", ); - assert.equal(rec.domain, "example.com"); - assert.equal(rec.tld, "com"); - assert.equal(rec.registrar?.name, "Registrar LLC"); - assert.equal(rec.registrar?.ianaId, "9999"); - assert.ok(rec.contacts && rec.contacts.length >= 3); - assert.ok(rec.nameservers && rec.nameservers.length === 2); - assert.equal(rec.nameservers?.[0].host, "ns1.example.com"); - assert.ok(rec.dnssec?.enabled); - assert.equal(rec.creationDate, "2020-01-02T03:04:05Z"); - assert.equal(rec.expirationDate, "2030-01-02T03:04:05Z"); - assert.equal(rec.transferLock, true); - assert.equal(rec.whoisServer, "whois.example-registrar.test"); - assert.equal(rec.source, "rdap"); + expect(rec.domain).toBe("example.com"); + expect(rec.tld).toBe("com"); + expect(rec.registrar?.name).toBe("Registrar LLC"); + expect(rec.registrar?.ianaId).toBe("9999"); + expect(rec.contacts && rec.contacts.length >= 3).toBe(true); + expect(rec.nameservers && rec.nameservers.length === 2).toBe(true); + expect(rec.nameservers?.[0].host).toBe("ns1.example.com"); + expect(rec.dnssec?.enabled).toBeTruthy(); + expect(rec.creationDate).toBe("2020-01-02T03:04:05Z"); + expect(rec.expirationDate).toBe("2030-01-02T03:04:05Z"); + expect(rec.transferLock).toBe(true); + expect(rec.whoisServer).toBe("whois.example-registrar.test"); + expect(rec.source).toBe("rdap"); }); diff --git a/src/whois/__tests__/normalize.test.ts b/src/whois/__tests__/normalize.test.ts index da795dd..cc3f9cc 100644 --- a/src/whois/__tests__/normalize.test.ts +++ b/src/whois/__tests__/normalize.test.ts @@ -1,5 +1,4 @@ -import assert from "node:assert/strict"; -import test from "node:test"; +import { expect, test } from "vitest"; import { normalizeWhois } from "../normalize.js"; test("WHOIS .de (DENIC-like) nserver lines", () => { @@ -17,8 +16,8 @@ Changed: 2020-01-02 "whois.denic.de", "2025-01-01T00:00:00Z", ); - assert.ok(rec.nameservers && rec.nameservers.length === 2); - assert.equal(rec.nameservers?.[0].host, "ns1.example.net"); + expect(rec.nameservers && rec.nameservers.length === 2).toBe(true); + expect(rec.nameservers?.[0].host).toBe("ns1.example.net"); }); test("WHOIS .uk Nominet style", () => { @@ -44,9 +43,9 @@ Name servers: "whois.nic.uk", "2025-01-01T00:00:00Z", ); - assert.ok(rec.nameservers && rec.nameservers.length === 2); - assert.ok(rec.creationDate); - assert.ok(rec.expirationDate); + expect(rec.nameservers && rec.nameservers.length === 2).toBe(true); + expect(Boolean(rec.creationDate)).toBe(true); + expect(Boolean(rec.expirationDate)).toBe(true); }); test("WHOIS .jp JPRS style privacy redacted", () => { @@ -66,9 +65,9 @@ test("WHOIS .jp JPRS style privacy redacted", () => { "whois.jprs.jp", "2025-01-01T00:00:00Z", ); - assert.ok(rec.creationDate); - assert.ok(rec.expirationDate); - assert.ok(rec.statuses); + expect(Boolean(rec.creationDate)).toBe(true); + expect(Boolean(rec.expirationDate)).toBe(true); + expect(Boolean(rec.statuses)).toBe(true); }); test("WHOIS .io NIC.IO style", () => { @@ -92,9 +91,9 @@ DNSSEC: unsigned "whois.nic.io", "2025-01-01T00:00:00Z", ); - assert.ok(rec.creationDate); - assert.ok(rec.expirationDate); - assert.ok(rec.nameservers && rec.nameservers.length === 2); + expect(Boolean(rec.creationDate)).toBe(true); + expect(Boolean(rec.expirationDate)).toBe(true); + expect(rec.nameservers && rec.nameservers.length === 2).toBe(true); }); test("Privacy redacted WHOIS normalizes without contacts", () => { @@ -123,7 +122,7 @@ Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProh "whois.verisign-grs.com", "2025-01-01T00:00:00Z", ); - assert.ok(rec.creationDate); - assert.ok(rec.expirationDate); - assert.equal(rec.source, "whois"); + expect(Boolean(rec.creationDate)).toBe(true); + expect(Boolean(rec.expirationDate)).toBe(true); + expect(rec.source).toBe("whois"); }); diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..3550e5e --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,18 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + environment: "node", + include: ["src/**/__tests__/**/*.test.ts"], + exclude: ["dist/**", "node_modules/**", "**/*.smoke.test.ts"], + sequence: { hooks: "list" }, + globals: false, + testTimeout: 5000, + coverage: { + provider: "v8", + reportsDirectory: "coverage", + reporter: ["text", "lcov"], + exclude: ["**/__tests__/**", "src/**/index.ts"], + }, + }, +}); From a2a9fdd7cb9e8017b363927abe3bcc478c9fd2b4 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Fri, 26 Sep 2025 00:26:25 -0400 Subject: [PATCH 2/4] Add tests for domain lookup scenarios: include multi-label public suffix handling, RDAP orchestration, referral behavior, and date normalization --- src/index.multilabel.fallback.test.ts | 66 +++++++++++++++++++++ src/index.orchestration.test.ts | 61 +++++++++++++++++++ src/index.referral.includeraw.test.ts | 58 ++++++++++++++++++ src/{__tests__ => }/index.smoke.test.ts | 0 src/lib/{__tests__ => }/dates.test.ts | 2 +- src/lib/{__tests__ => }/domain.test.ts | 2 +- src/rdap/{__tests__ => }/normalize.test.ts | 2 +- src/whois/{__tests__ => }/normalize.test.ts | 2 +- vitest.config.ts | 2 +- 9 files changed, 190 insertions(+), 5 deletions(-) create mode 100644 src/index.multilabel.fallback.test.ts create mode 100644 src/index.orchestration.test.ts create mode 100644 src/index.referral.includeraw.test.ts rename src/{__tests__ => }/index.smoke.test.ts (100%) rename src/lib/{__tests__ => }/dates.test.ts (94%) rename src/lib/{__tests__ => }/domain.test.ts (84%) rename src/rdap/{__tests__ => }/normalize.test.ts (98%) rename src/whois/{__tests__ => }/normalize.test.ts (98%) diff --git a/src/index.multilabel.fallback.test.ts b/src/index.multilabel.fallback.test.ts new file mode 100644 index 0000000..80deed7 --- /dev/null +++ b/src/index.multilabel.fallback.test.ts @@ -0,0 +1,66 @@ +import { beforeEach, expect, it, vi } from "vitest"; +import { lookupDomain } from "./index.js"; + +// Simulate a multi-label public suffix scenario where the TLD server says "no match" +vi.mock("./whois/discovery.js", async () => { + const actual = await vi.importActual>( + "./whois/discovery.js", + ); + return { + ...actual, + ianaWhoisServerForTld: vi.fn(async () => "whois.centralnic.tld"), + }; +}); + +vi.mock("./whois/client.js", () => ({ + whoisQuery: vi + .fn() + // First call: authoritative TLD WHOIS returns "no match" + .mockImplementationOnce(async () => ({ + text: "No match for domain", + serverQueried: "whois.centralnic.tld", + })) + // Second call: exception server returns some record + .mockImplementationOnce(async () => ({ + text: "Domain Name: EXAMPLE.UK.COM\nRegistrar: Registrar LLC", + serverQueried: "whois.centralnic.com", + })), +})); + +// For this test we want publicSuffix to include a dot +vi.mock("./lib/domain.js", async () => { + const actual = + await vi.importActual>("./lib/domain.js"); + return { + ...actual, + getDomainParts: vi.fn(() => ({ publicSuffix: "uk.com", tld: "com" })), + }; +}); + +// Also ensure the exception table includes uk.com +vi.mock("./whois/servers.js", async () => { + const actual = + await vi.importActual>("./whois/servers.js"); + return { + ...actual, + WHOIS_TLD_EXCEPTIONS: { + ...(actual.WHOIS_TLD_EXCEPTIONS as any), + "uk.com": "whois.centralnic.com", + }, + }; +}); + +beforeEach(() => { + vi.clearAllMocks(); +}); + +it("tries exception server for multi-label public suffix when TLD says no match", async () => { + const res = await lookupDomain("example.uk.com", { + timeoutMs: 200, + whoisOnly: true, + }); + expect(res.ok, res.error).toBe(true); + expect(res.record?.source).toBe("whois"); + expect(res.record?.tld).toBe("com"); + expect(res.record?.whoisServer).toBe("whois.centralnic.com"); +}); diff --git a/src/index.orchestration.test.ts b/src/index.orchestration.test.ts new file mode 100644 index 0000000..aaa344b --- /dev/null +++ b/src/index.orchestration.test.ts @@ -0,0 +1,61 @@ +import { beforeEach, describe, expect, it, vi } from "vitest"; + +// RDAP success path: RDAP returns JSON and WHOIS is not called +vi.mock("./rdap/client.js", () => ({ + fetchRdapDomain: vi.fn(async () => ({ json: { ldhName: "example.com" } })), +})); + +// WHOIS client will be spied on to ensure it's not used in RDAP success test +vi.mock("./whois/client.js", () => ({ + whoisQuery: vi.fn(async () => ({ + text: "Domain Name: EXAMPLE.COM", + serverQueried: "whois.verisign-grs.com", + })), +})); + +vi.mock("./whois/discovery.js", async () => { + const actual = await vi.importActual("./whois/discovery.js"); + return { + ...actual, + ianaWhoisServerForTld: vi.fn(async () => "whois.verisign-grs.com"), + }; +}); + +import { lookupDomain } from "./index.js"; +import * as rdapClient from "./rdap/client.js"; +import * as whoisClient from "./whois/client.js"; + +describe("lookupDomain orchestration", () => { + beforeEach(() => { + vi.clearAllMocks(); + }); + + it("uses RDAP when available and does not call WHOIS", async () => { + const res = await lookupDomain("example.com", { timeoutMs: 200 }); + expect(res.ok, res.error).toBe(true); + expect(res.record?.source).toBe("rdap"); + expect(vi.mocked(rdapClient.fetchRdapDomain)).toHaveBeenCalledOnce(); + expect(vi.mocked(whoisClient.whoisQuery)).not.toHaveBeenCalled(); + }); + + it("falls back to WHOIS when RDAP fails", async () => { + vi.mocked(rdapClient.fetchRdapDomain).mockRejectedValueOnce( + new Error("rdap down"), + ); + const res = await lookupDomain("example.com", { timeoutMs: 200 }); + expect(res.ok, res.error).toBe(true); + expect(res.record?.source).toBe("whois"); + expect(vi.mocked(whoisClient.whoisQuery)).toHaveBeenCalledOnce(); + }); + + it("respects whoisOnly to skip RDAP entirely", async () => { + const res = await lookupDomain("example.com", { + timeoutMs: 200, + whoisOnly: true, + }); + expect(res.ok, res.error).toBe(true); + expect(res.record?.source).toBe("whois"); + expect(vi.mocked(rdapClient.fetchRdapDomain)).not.toHaveBeenCalled(); + expect(vi.mocked(whoisClient.whoisQuery)).toHaveBeenCalled(); + }); +}); diff --git a/src/index.referral.includeraw.test.ts b/src/index.referral.includeraw.test.ts new file mode 100644 index 0000000..1892192 --- /dev/null +++ b/src/index.referral.includeraw.test.ts @@ -0,0 +1,58 @@ +import { beforeEach, expect, it, vi } from "vitest"; +import { lookupDomain } from "./index.js"; +import * as whoisClient from "./whois/client.js"; + +vi.mock("./whois/discovery.js", async () => { + const actual = await vi.importActual>( + "./whois/discovery.js", + ); + return { + ...actual, + ianaWhoisServerForTld: vi.fn(async () => "whois.verisign-grs.com"), + }; +}); + +vi.mock("./whois/client.js", () => ({ + whoisQuery: vi.fn(async (server: string) => { + if (server === "whois.verisign-grs.com") { + return { + text: "Registrar WHOIS Server: whois.registrar.test\nDomain Name: EXAMPLE.COM", + serverQueried: "whois.verisign-grs.com", + }; + } + return { + text: "Domain Name: EXAMPLE.COM\nRegistrar: Registrar LLC", + serverQueried: "whois.registrar.test", + }; + }), +})); + +beforeEach(() => { + vi.clearAllMocks(); +}); + +it("does not follow referral when followWhoisReferral is false", async () => { + const res = await lookupDomain("example.com", { + timeoutMs: 200, + whoisOnly: true, + followWhoisReferral: false, + }); + expect(res.ok, res.error).toBe(true); + // only the TLD server should be queried + expect(vi.mocked(whoisClient.whoisQuery)).toHaveBeenCalledTimes(1); + expect(vi.mocked(whoisClient.whoisQuery).mock.calls[0][0]).toBe( + "whois.verisign-grs.com", + ); +}); + +it("includes rawWhois when includeRaw is true", async () => { + const res = await lookupDomain("example.com", { + timeoutMs: 200, + whoisOnly: true, + followWhoisReferral: true, + includeRaw: true, + }); + expect(res.ok, res.error).toBe(true); + expect(res.record?.source).toBe("whois"); + expect(res.record?.rawWhois && res.record.rawWhois.length > 0).toBe(true); +}); diff --git a/src/__tests__/index.smoke.test.ts b/src/index.smoke.test.ts similarity index 100% rename from src/__tests__/index.smoke.test.ts rename to src/index.smoke.test.ts diff --git a/src/lib/__tests__/dates.test.ts b/src/lib/dates.test.ts similarity index 94% rename from src/lib/__tests__/dates.test.ts rename to src/lib/dates.test.ts index 71fdf70..bfb6bb8 100644 --- a/src/lib/__tests__/dates.test.ts +++ b/src/lib/dates.test.ts @@ -1,7 +1,7 @@ /** biome-ignore-all lint/style/noNonNullAssertion: this is fine for tests */ import { expect, test } from "vitest"; -import { toISO } from "../dates.js"; +import { toISO } from "./dates.js"; test("toISO parses ISO and common whois formats", () => { const iso = toISO("2023-01-02T03:04:05Z"); diff --git a/src/lib/__tests__/domain.test.ts b/src/lib/domain.test.ts similarity index 84% rename from src/lib/__tests__/domain.test.ts rename to src/lib/domain.test.ts index f0d567a..c2acc5e 100644 --- a/src/lib/__tests__/domain.test.ts +++ b/src/lib/domain.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { extractTld, isLikelyDomain } from "../domain.js"; +import { extractTld, isLikelyDomain } from "./domain.js"; test("extractTld basic", () => { expect(extractTld("example.com")).toBe("com"); diff --git a/src/rdap/__tests__/normalize.test.ts b/src/rdap/normalize.test.ts similarity index 98% rename from src/rdap/__tests__/normalize.test.ts rename to src/rdap/normalize.test.ts index 763b24b..ae66e23 100644 --- a/src/rdap/__tests__/normalize.test.ts +++ b/src/rdap/normalize.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { normalizeRdap } from "../normalize.js"; +import { normalizeRdap } from "./normalize.js"; test("normalizeRdap maps registrar, contacts, nameservers, events, dnssec", () => { const rdap = { diff --git a/src/whois/__tests__/normalize.test.ts b/src/whois/normalize.test.ts similarity index 98% rename from src/whois/__tests__/normalize.test.ts rename to src/whois/normalize.test.ts index cc3f9cc..81d86da 100644 --- a/src/whois/__tests__/normalize.test.ts +++ b/src/whois/normalize.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { normalizeWhois } from "../normalize.js"; +import { normalizeWhois } from "./normalize.js"; test("WHOIS .de (DENIC-like) nserver lines", () => { const text = ` diff --git a/vitest.config.ts b/vitest.config.ts index 3550e5e..9da5ee6 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -3,7 +3,7 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { environment: "node", - include: ["src/**/__tests__/**/*.test.ts"], + include: ["src/**/*.test.ts"], exclude: ["dist/**", "node_modules/**", "**/*.smoke.test.ts"], sequence: { hooks: "list" }, globals: false, From 481afd8e2e99a853d04ef9d6ede6c9a162f34219 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Fri, 26 Sep 2025 00:38:49 -0400 Subject: [PATCH 3/4] Refactor test commands and configuration: streamline test execution in package.json, adjust Vitest settings for smoke tests, and mock RDAP bootstrap in orchestration tests. --- package.json | 6 +++--- src/index.orchestration.test.ts | 5 +++++ src/index.smoke.test.ts | 2 +- vitest.config.ts | 5 ++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 14f2cc9..6e453d2 100644 --- a/package.json +++ b/package.json @@ -29,9 +29,9 @@ "clean": "rm -rf dist", "build": "npm run clean && tsc -p tsconfig.build.json", "test": "npm run clean && tsc -p tsconfig.json && vitest run", - "test:watch": "vitest", - "test:coverage": "vitest run --coverage", - "test:smoke": "SMOKE=1 vitest run --include src/**/__tests__/**/*.smoke.test.ts", + "test:watch": "npm run clean && tsc -p tsconfig.json && vitest", + "test:coverage": "npm run clean && tsc -p tsconfig.json && vitest run --coverage", + "test:smoke": "SMOKE=1 npm run test", "lint": "biome check --write", "prepublishOnly": "npm run build" }, diff --git a/src/index.orchestration.test.ts b/src/index.orchestration.test.ts index aaa344b..8b0db22 100644 --- a/src/index.orchestration.test.ts +++ b/src/index.orchestration.test.ts @@ -21,6 +21,11 @@ vi.mock("./whois/discovery.js", async () => { }; }); +// Mock RDAP bootstrap to avoid network and provide a base URL +vi.mock("./rdap/bootstrap.js", () => ({ + getRdapBaseUrlsForTld: vi.fn(async () => ["https://rdap.example/"]), +})); + import { lookupDomain } from "./index.js"; import * as rdapClient from "./rdap/client.js"; import * as whoisClient from "./whois/client.js"; diff --git a/src/index.smoke.test.ts b/src/index.smoke.test.ts index 57e73ef..29d7b6e 100644 --- a/src/index.smoke.test.ts +++ b/src/index.smoke.test.ts @@ -1,7 +1,7 @@ /** biome-ignore-all lint/style/noNonNullAssertion: this is fine for tests */ import { expect, test } from "vitest"; -import { isAvailable, isRegistered, lookupDomain } from "../index.js"; +import { isAvailable, isRegistered, lookupDomain } from "./index.js"; // Run only when SMOKE=1 to avoid flakiness and network in CI by default const shouldRun = process.env.SMOKE === "1"; diff --git a/vitest.config.ts b/vitest.config.ts index 9da5ee6..e692ebf 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -4,15 +4,14 @@ export default defineConfig({ test: { environment: "node", include: ["src/**/*.test.ts"], - exclude: ["dist/**", "node_modules/**", "**/*.smoke.test.ts"], + exclude: ["dist/**", "node_modules/**"], sequence: { hooks: "list" }, globals: false, - testTimeout: 5000, + testTimeout: process.env.SMOKE === "1" ? 30000 : 5000, coverage: { provider: "v8", reportsDirectory: "coverage", reporter: ["text", "lcov"], - exclude: ["**/__tests__/**", "src/**/index.ts"], }, }, }); From b9dae9a7d9997ae810ee3e8abe9cb354e9d78a01 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Fri, 26 Sep 2025 00:45:11 -0400 Subject: [PATCH 4/4] Remove obsolete tests and update package.json formatting: delete unused test files for multi-label public suffix, orchestration, and referral behavior, and ensure proper newline at the end of package.json. --- package.json | 2 +- src/index.multilabel.fallback.test.ts | 66 --------- src/index.orchestration.test.ts | 66 --------- src/index.referral.includeraw.test.ts | 58 -------- src/index.test.ts | 190 ++++++++++++++++++++++++++ 5 files changed, 191 insertions(+), 191 deletions(-) delete mode 100644 src/index.multilabel.fallback.test.ts delete mode 100644 src/index.orchestration.test.ts delete mode 100644 src/index.referral.includeraw.test.ts create mode 100644 src/index.test.ts diff --git a/package.json b/package.json index 6e453d2..a49a868 100644 --- a/package.json +++ b/package.json @@ -58,4 +58,4 @@ "parser", "normalizer" ] -} \ No newline at end of file +} diff --git a/src/index.multilabel.fallback.test.ts b/src/index.multilabel.fallback.test.ts deleted file mode 100644 index 80deed7..0000000 --- a/src/index.multilabel.fallback.test.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { beforeEach, expect, it, vi } from "vitest"; -import { lookupDomain } from "./index.js"; - -// Simulate a multi-label public suffix scenario where the TLD server says "no match" -vi.mock("./whois/discovery.js", async () => { - const actual = await vi.importActual>( - "./whois/discovery.js", - ); - return { - ...actual, - ianaWhoisServerForTld: vi.fn(async () => "whois.centralnic.tld"), - }; -}); - -vi.mock("./whois/client.js", () => ({ - whoisQuery: vi - .fn() - // First call: authoritative TLD WHOIS returns "no match" - .mockImplementationOnce(async () => ({ - text: "No match for domain", - serverQueried: "whois.centralnic.tld", - })) - // Second call: exception server returns some record - .mockImplementationOnce(async () => ({ - text: "Domain Name: EXAMPLE.UK.COM\nRegistrar: Registrar LLC", - serverQueried: "whois.centralnic.com", - })), -})); - -// For this test we want publicSuffix to include a dot -vi.mock("./lib/domain.js", async () => { - const actual = - await vi.importActual>("./lib/domain.js"); - return { - ...actual, - getDomainParts: vi.fn(() => ({ publicSuffix: "uk.com", tld: "com" })), - }; -}); - -// Also ensure the exception table includes uk.com -vi.mock("./whois/servers.js", async () => { - const actual = - await vi.importActual>("./whois/servers.js"); - return { - ...actual, - WHOIS_TLD_EXCEPTIONS: { - ...(actual.WHOIS_TLD_EXCEPTIONS as any), - "uk.com": "whois.centralnic.com", - }, - }; -}); - -beforeEach(() => { - vi.clearAllMocks(); -}); - -it("tries exception server for multi-label public suffix when TLD says no match", async () => { - const res = await lookupDomain("example.uk.com", { - timeoutMs: 200, - whoisOnly: true, - }); - expect(res.ok, res.error).toBe(true); - expect(res.record?.source).toBe("whois"); - expect(res.record?.tld).toBe("com"); - expect(res.record?.whoisServer).toBe("whois.centralnic.com"); -}); diff --git a/src/index.orchestration.test.ts b/src/index.orchestration.test.ts deleted file mode 100644 index 8b0db22..0000000 --- a/src/index.orchestration.test.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { beforeEach, describe, expect, it, vi } from "vitest"; - -// RDAP success path: RDAP returns JSON and WHOIS is not called -vi.mock("./rdap/client.js", () => ({ - fetchRdapDomain: vi.fn(async () => ({ json: { ldhName: "example.com" } })), -})); - -// WHOIS client will be spied on to ensure it's not used in RDAP success test -vi.mock("./whois/client.js", () => ({ - whoisQuery: vi.fn(async () => ({ - text: "Domain Name: EXAMPLE.COM", - serverQueried: "whois.verisign-grs.com", - })), -})); - -vi.mock("./whois/discovery.js", async () => { - const actual = await vi.importActual("./whois/discovery.js"); - return { - ...actual, - ianaWhoisServerForTld: vi.fn(async () => "whois.verisign-grs.com"), - }; -}); - -// Mock RDAP bootstrap to avoid network and provide a base URL -vi.mock("./rdap/bootstrap.js", () => ({ - getRdapBaseUrlsForTld: vi.fn(async () => ["https://rdap.example/"]), -})); - -import { lookupDomain } from "./index.js"; -import * as rdapClient from "./rdap/client.js"; -import * as whoisClient from "./whois/client.js"; - -describe("lookupDomain orchestration", () => { - beforeEach(() => { - vi.clearAllMocks(); - }); - - it("uses RDAP when available and does not call WHOIS", async () => { - const res = await lookupDomain("example.com", { timeoutMs: 200 }); - expect(res.ok, res.error).toBe(true); - expect(res.record?.source).toBe("rdap"); - expect(vi.mocked(rdapClient.fetchRdapDomain)).toHaveBeenCalledOnce(); - expect(vi.mocked(whoisClient.whoisQuery)).not.toHaveBeenCalled(); - }); - - it("falls back to WHOIS when RDAP fails", async () => { - vi.mocked(rdapClient.fetchRdapDomain).mockRejectedValueOnce( - new Error("rdap down"), - ); - const res = await lookupDomain("example.com", { timeoutMs: 200 }); - expect(res.ok, res.error).toBe(true); - expect(res.record?.source).toBe("whois"); - expect(vi.mocked(whoisClient.whoisQuery)).toHaveBeenCalledOnce(); - }); - - it("respects whoisOnly to skip RDAP entirely", async () => { - const res = await lookupDomain("example.com", { - timeoutMs: 200, - whoisOnly: true, - }); - expect(res.ok, res.error).toBe(true); - expect(res.record?.source).toBe("whois"); - expect(vi.mocked(rdapClient.fetchRdapDomain)).not.toHaveBeenCalled(); - expect(vi.mocked(whoisClient.whoisQuery)).toHaveBeenCalled(); - }); -}); diff --git a/src/index.referral.includeraw.test.ts b/src/index.referral.includeraw.test.ts deleted file mode 100644 index 1892192..0000000 --- a/src/index.referral.includeraw.test.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { beforeEach, expect, it, vi } from "vitest"; -import { lookupDomain } from "./index.js"; -import * as whoisClient from "./whois/client.js"; - -vi.mock("./whois/discovery.js", async () => { - const actual = await vi.importActual>( - "./whois/discovery.js", - ); - return { - ...actual, - ianaWhoisServerForTld: vi.fn(async () => "whois.verisign-grs.com"), - }; -}); - -vi.mock("./whois/client.js", () => ({ - whoisQuery: vi.fn(async (server: string) => { - if (server === "whois.verisign-grs.com") { - return { - text: "Registrar WHOIS Server: whois.registrar.test\nDomain Name: EXAMPLE.COM", - serverQueried: "whois.verisign-grs.com", - }; - } - return { - text: "Domain Name: EXAMPLE.COM\nRegistrar: Registrar LLC", - serverQueried: "whois.registrar.test", - }; - }), -})); - -beforeEach(() => { - vi.clearAllMocks(); -}); - -it("does not follow referral when followWhoisReferral is false", async () => { - const res = await lookupDomain("example.com", { - timeoutMs: 200, - whoisOnly: true, - followWhoisReferral: false, - }); - expect(res.ok, res.error).toBe(true); - // only the TLD server should be queried - expect(vi.mocked(whoisClient.whoisQuery)).toHaveBeenCalledTimes(1); - expect(vi.mocked(whoisClient.whoisQuery).mock.calls[0][0]).toBe( - "whois.verisign-grs.com", - ); -}); - -it("includes rawWhois when includeRaw is true", async () => { - const res = await lookupDomain("example.com", { - timeoutMs: 200, - whoisOnly: true, - followWhoisReferral: true, - includeRaw: true, - }); - expect(res.ok, res.error).toBe(true); - expect(res.record?.source).toBe("whois"); - expect(res.record?.rawWhois && res.record.rawWhois.length > 0).toBe(true); -}); diff --git a/src/index.test.ts b/src/index.test.ts new file mode 100644 index 0000000..15b9eb7 --- /dev/null +++ b/src/index.test.ts @@ -0,0 +1,190 @@ +import { beforeEach, describe, expect, it, vi } from "vitest"; + +// Shared, safe default mocks. Individual describes override implementations as needed. +vi.mock("./rdap/bootstrap.js", () => ({ + getRdapBaseUrlsForTld: vi.fn(async () => ["https://rdap.example/"]), +})); + +vi.mock("./rdap/client.js", () => ({ + fetchRdapDomain: vi.fn(async () => ({ + url: "https://rdap.example/domain/example.com", + json: { ldhName: "example.com" }, + })), +})); + +vi.mock("./whois/client.js", () => ({ + whoisQuery: vi.fn(async () => ({ + text: "Domain Name: EXAMPLE.COM", + serverQueried: "whois.verisign-grs.com", + })), +})); + +vi.mock("./whois/discovery.js", async () => { + const actual = await vi.importActual("./whois/discovery.js"); + return { + ...actual, + ianaWhoisServerForTld: vi.fn(async () => "whois.verisign-grs.com"), + }; +}); + +vi.mock("./lib/domain.js", async () => { + const actual = + await vi.importActual("./lib/domain.js"); + return { + ...actual, + // Default to actual behavior; specific tests can override + getDomainParts: vi.fn((domain: string) => actual.getDomainParts(domain)), + }; +}); + +import { lookupDomain } from "./index.js"; +import * as domain from "./lib/domain.js"; +import * as rdapClient from "./rdap/client.js"; +import type { WhoisQueryResult } from "./whois/client.js"; +import * as whoisClient from "./whois/client.js"; +import * as discovery from "./whois/discovery.js"; + +// 1) Orchestration tests (RDAP path, fallback, whoisOnly) +describe("lookupDomain orchestration", () => { + beforeEach(() => { + vi.clearAllMocks(); + vi.mocked(discovery.ianaWhoisServerForTld).mockResolvedValue( + "whois.verisign-grs.com", + ); + }); + + it("uses RDAP when available and does not call WHOIS", async () => { + const res = await lookupDomain("example.com", { timeoutMs: 200 }); + expect(res.ok, res.error).toBe(true); + expect(res.record?.source).toBe("rdap"); + expect(vi.mocked(rdapClient.fetchRdapDomain)).toHaveBeenCalledOnce(); + expect(vi.mocked(whoisClient.whoisQuery)).not.toHaveBeenCalled(); + }); + + it("falls back to WHOIS when RDAP fails", async () => { + vi.mocked(rdapClient.fetchRdapDomain).mockRejectedValueOnce( + new Error("rdap down"), + ); + const res = await lookupDomain("example.com", { timeoutMs: 200 }); + expect(res.ok, res.error).toBe(true); + expect(res.record?.source).toBe("whois"); + expect(vi.mocked(whoisClient.whoisQuery)).toHaveBeenCalledOnce(); + }); + + it("respects whoisOnly to skip RDAP entirely", async () => { + const res = await lookupDomain("example.com", { + timeoutMs: 200, + whoisOnly: true, + }); + expect(res.ok, res.error).toBe(true); + expect(res.record?.source).toBe("whois"); + expect(vi.mocked(rdapClient.fetchRdapDomain)).not.toHaveBeenCalled(); + expect(vi.mocked(whoisClient.whoisQuery)).toHaveBeenCalled(); + }); +}); + +// 2) WHOIS referral toggle and includeRaw behavior +describe("WHOIS referral & includeRaw", () => { + beforeEach(() => { + vi.clearAllMocks(); + vi.mocked(discovery.ianaWhoisServerForTld).mockResolvedValue( + "whois.verisign-grs.com", + ); + }); + + it("does not follow referral when followWhoisReferral is false", async () => { + vi.mocked(whoisClient.whoisQuery).mockImplementation( + async (server: string): Promise => { + if (server === "whois.verisign-grs.com") { + return { + text: "Registrar WHOIS Server: whois.registrar.test\nDomain Name: EXAMPLE.COM", + serverQueried: "whois.verisign-grs.com", + }; + } + return { + text: "Domain Name: EXAMPLE.COM\nRegistrar: Registrar LLC", + serverQueried: "whois.registrar.test", + }; + }, + ); + + const res = await lookupDomain("example.com", { + timeoutMs: 200, + whoisOnly: true, + followWhoisReferral: false, + }); + expect(res.ok, res.error).toBe(true); + expect(vi.mocked(whoisClient.whoisQuery)).toHaveBeenCalledTimes(1); + expect(vi.mocked(whoisClient.whoisQuery).mock.calls[0][0]).toBe( + "whois.verisign-grs.com", + ); + }); + + it("includes rawWhois when includeRaw is true", async () => { + vi.mocked(whoisClient.whoisQuery).mockImplementation( + async (server: string): Promise => { + if (server === "whois.verisign-grs.com") { + return { + text: "Registrar WHOIS Server: whois.registrar.test\nDomain Name: EXAMPLE.COM", + serverQueried: "whois.verisign-grs.com", + }; + } + return { + text: "Domain Name: EXAMPLE.COM\nRegistrar: Registrar LLC", + serverQueried: "whois.registrar.test", + }; + }, + ); + + const res = await lookupDomain("example.com", { + timeoutMs: 200, + whoisOnly: true, + followWhoisReferral: true, + includeRaw: true, + }); + expect(res.ok, res.error).toBe(true); + expect(res.record?.source).toBe("whois"); + expect(Boolean(res.record?.rawWhois)).toBe(true); + }); +}); + +// 3) Multi-label public suffix fallback via exceptions (e.g., uk.com) +describe("WHOIS multi-label public suffix fallback", () => { + beforeEach(() => { + vi.clearAllMocks(); + vi.mocked(discovery.ianaWhoisServerForTld).mockResolvedValue( + "whois.centralnic.tld", + ); + vi.mocked(domain.getDomainParts).mockReturnValue({ + publicSuffix: "uk.com", + tld: "com", + }); + }); + + it("tries exception server for multi-label public suffix when TLD says no match", async () => { + const whois = vi.mocked(whoisClient.whoisQuery); + whois.mockReset(); + whois + .mockImplementationOnce( + async (): Promise => ({ + text: "No match for domain", + serverQueried: "whois.centralnic.tld", + }), + ) + .mockImplementationOnce( + async (): Promise => ({ + text: "Domain Name: EXAMPLE.UK.COM\nRegistrar: Registrar LLC", + serverQueried: "whois.centralnic.com", + }), + ); + + const res = await lookupDomain("example.uk.com", { + timeoutMs: 200, + whoisOnly: true, + }); + expect(res.ok, res.error).toBe(true); + expect(res.record?.source).toBe("whois"); + expect(res.record?.tld).toBe("com"); + expect(res.record?.whoisServer).toBe("whois.centralnic.com"); + }); +});