From 4da62f340323f9aad18354773afae73f80ded213 Mon Sep 17 00:00:00 2001 From: Geoffrey Belcher Date: Tue, 3 Dec 2024 12:10:19 -0330 Subject: [PATCH 01/11] Move to megastruct --- License.md | 2 +- jsr.json | 6 +++--- package.json | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/License.md b/License.md index 2b7fe03d..2a1ed03b 100644 --- a/License.md +++ b/License.md @@ -1,6 +1,6 @@ The MIT License -Copyright © 2017, [Ian Storm Taylor](https://ianstormtaylor.com) +Copyright © 2024, Geoffrey Belcher Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/jsr.json b/jsr.json index ed797ed9..39f29ed0 100644 --- a/jsr.json +++ b/jsr.json @@ -1,9 +1,9 @@ { "$schema": "https://jsr.io/schema/config-file.v1.json", - "name": "@superstruct/core", - "version": "2.0.2", + "name": "@yeoffrey/megastruct", + "version": "0.1.0", "exports": "./src/index.ts", "publish": { - "include": ["Readme.md", "License.md", "src", "docs"] + "include": ["README.md", "LICENSE.md", "src", "docs"] } } diff --git a/package.json b/package.json index 5b6afed1..bcc7531e 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "superstruct", - "description": "A simple and composable way to validate data in JavaScript (and TypeScript).", - "version": "2.0.2", + "name": "megastruct", + "description": "An all-in-one data solution for TypeScript projects", + "version": "0.1.0", "license": "MIT", - "repository": "git://github.com/ianstormtaylor/superstruct.git", + "repository": "git://github.com/yeoffrey/megastruct.git", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.mjs", From 2032ae227a20a893ef7493d65b4db55c874a0ec1 Mon Sep 17 00:00:00 2001 From: Geoffrey Belcher Date: Tue, 3 Dec 2024 12:25:10 -0330 Subject: [PATCH 02/11] CI and publish --- .github/workflows/publish-jsr.yml | 18 ++++++++++++++++++ .github/workflows/publish-npm.yml | 21 +++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/publish-jsr.yml create mode 100644 .github/workflows/publish-npm.yml diff --git a/.github/workflows/publish-jsr.yml b/.github/workflows/publish-jsr.yml new file mode 100644 index 00000000..31f912ca --- /dev/null +++ b/.github/workflows/publish-jsr.yml @@ -0,0 +1,18 @@ +name: Publish to jsr +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + + - name: Publish package + run: npx jsr publish diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 00000000..4423f892 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,21 @@ +name: Publish to npm +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: '22.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From f31e1e219e5b83598967e5ae14c77696e4ad8683 Mon Sep 17 00:00:00 2001 From: Geoffrey Belcher Date: Tue, 3 Dec 2024 12:29:24 -0330 Subject: [PATCH 03/11] Add package-lock.json --- .gitignore | 1 - package-lock.json | 7437 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 7437 insertions(+), 1 deletion(-) create mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore index 33ea2707..5c6e039c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ dist/ node_modules/ npm-debug.log -package-lock.json tmp/ diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..ff9d079d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,7437 @@ +{ + "name": "superstruct", + "version": "2.0.2", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "superstruct", + "version": "2.0.2", + "license": "MIT", + "devDependencies": { + "@rollup/plugin-typescript": "^11.1.6", + "@types/expect": "^24.3.0", + "@types/lodash": "^4.14.144", + "@types/node": "^18.7.14", + "@typescript-eslint/eslint-plugin": "^7.1.1", + "@typescript-eslint/parser": "^7.1.1", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "lodash": "^4.17.15", + "np": "^10.0.0", + "prettier": "^3.2.5", + "rollup": "^4.12.1", + "typescript": "^4.8.3", + "vitest": "^1.6.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@inquirer/figures": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.8.tgz", + "integrity": "sha512-tKd+jsmhq21AP1LhexC0pPwsCxEhGgAkg28byjJAd+xhmIs8LUX8JbUc3vBf3PhLxWiB5EvyBE5X7JSPAqMAqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@pnpm/config.env-replace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", + "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/network.ca-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", + "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "4.2.10" + }, + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true, + "license": "ISC" + }, + "node_modules/@pnpm/npm-conf": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", + "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pnpm/config.env-replace": "^1.1.0", + "@pnpm/network.ca-file": "^1.0.1", + "config-chain": "^1.1.11" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@rollup/plugin-typescript": { + "version": "11.1.6", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.6.tgz", + "integrity": "sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0||^3.0.0||^4.0.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", + "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.0.tgz", + "integrity": "sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.0.tgz", + "integrity": "sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.0.tgz", + "integrity": "sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.0.tgz", + "integrity": "sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.0.tgz", + "integrity": "sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.0.tgz", + "integrity": "sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.0.tgz", + "integrity": "sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.0.tgz", + "integrity": "sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.0.tgz", + "integrity": "sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.0.tgz", + "integrity": "sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.0.tgz", + "integrity": "sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.0.tgz", + "integrity": "sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.0.tgz", + "integrity": "sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.0.tgz", + "integrity": "sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.0.tgz", + "integrity": "sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.0.tgz", + "integrity": "sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.0.tgz", + "integrity": "sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.0.tgz", + "integrity": "sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@samverschueren/stream-to-observable": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz", + "integrity": "sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-observable": "^0.3.0" + }, + "engines": { + "node": ">=6" + }, + "peerDependenciesMeta": { + "rxjs": { + "optional": true + }, + "zen-observable": { + "optional": true + } + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/expect": { + "version": "24.3.2", + "resolved": "https://registry.npmjs.org/@types/expect/-/expect-24.3.2.tgz", + "integrity": "sha512-5ev4tL5eBuX9wyC/SFHku1Sizyerg457LiwMgde3sq61TMHbnKjikzwsBLxLpFMflvKuWXfWVW0w3hZg4qml9w==", + "deprecated": "This is a stub types definition. expect provides its own type definitions, so you do not need this installed.", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/lodash": { + "version": "4.17.13", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.13.tgz", + "integrity": "sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "18.19.67", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.67.tgz", + "integrity": "sha512-wI8uHusga+0ZugNp0Ol/3BqQfEcCCNfojtO6Oou9iVNGPTL6QNSdnUdqq85fRgIorLhLMuPIKpsN98QE9Nh+KQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/@vitest/expect": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz", + "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", + "chai": "^4.3.10" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.0.tgz", + "integrity": "sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "1.6.0", + "p-limit": "^5.0.0", + "pathe": "^1.1.1" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner/node_modules/p-limit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", + "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/runner/node_modules/yocto-queue": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vitest/snapshot": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.0.tgz", + "integrity": "sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.0.tgz", + "integrity": "sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^2.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.0.tgz", + "integrity": "sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "diff-sequences": "^29.6.3", + "estree-walker": "^3.0.3", + "loupe": "^2.3.7", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils/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/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.1.0" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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/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/any-observable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz", + "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/atomically": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/atomically/-/atomically-2.0.3.tgz", + "integrity": "sha512-kU6FmrwZ3Lx7/7y3hPS5QnbJfaohcIul5fGqf7ok+4KklIEk9tJ0C2IQPdacSbVUWv6zVHXEBWoWd6NrVMT7Cw==", + "dev": true, + "dependencies": { + "stubborn-fs": "^1.2.5", + "when-exit": "^2.1.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/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/boxen": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-8.0.1.tgz", + "integrity": "sha512-F3PH5k5juxom4xktynS7MoFY+NUWH5LC4CnH11YB8NPew+HLpmBLCybSAEyb2F+4pRXhuhWqFesoQd6DAyc2hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-align": "^3.0.1", + "camelcase": "^8.0.0", + "chalk": "^5.3.0", + "cli-boxes": "^3.0.0", + "string-width": "^7.2.0", + "type-fest": "^4.21.0", + "widest-line": "^5.0.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/boxen/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/boxen/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/boxen/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/boxen/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "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/boxen/node_modules/type-fest": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz", + "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", + "integrity": "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk-template": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-1.1.0.tgz", + "integrity": "sha512-T2VJbcDuZQ0Tb2EWwSotMPJjgpy1/tGee1BTpUNsGZ/qgNjV2t7Mvu+d4600U564nbLesN1x2dPL+xii174Ekg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/chalk/chalk-template?sponsor=1" + } + }, + "node_modules/chalk-template/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-boxes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", + "integrity": "sha512-f4r4yJnbT++qUPI9NR4XLDLq41gQ+uqnPItWG0F5ZkehuNiTTa3EY0S4AqTSUOeJ7/zU41oWPQSNkW5BqPL9bg==", + "dev": true, + "license": "MIT", + "dependencies": { + "slice-ansi": "0.0.4", + "string-width": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-truncate/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-truncate/node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-truncate/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "node_modules/config-chain/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, + "node_modules/configstore": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-7.0.0.tgz", + "integrity": "sha512-yk7/5PN5im4qwz0WFZW3PXnzHgPu9mX29Y8uZ3aefe2lBPC1FYttWZRcaW9fKkT0pBCJyuQ2HfbmPVaODi9jcQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "atomically": "^2.0.3", + "dot-prop": "^9.0.0", + "graceful-fs": "^4.2.11", + "xdg-basedir": "^5.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/yeoman/configstore?sponsor=1" + } + }, + "node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "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/date-fns": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", + "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/default-browser": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", + "integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz", + "integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/del": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-8.0.0.tgz", + "integrity": "sha512-R6ep6JJ+eOBZsBr9esiNN1gxFbZE4Q2cULkUSFumGYecAiS6qodDvcPx/sFuWHMNul7DWmrtoEOpYSm7o6tbSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "globby": "^14.0.2", + "is-glob": "^4.0.3", + "is-path-cwd": "^3.0.0", + "is-path-inside": "^4.0.0", + "p-map": "^7.0.2", + "slash": "^5.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/del/node_modules/globby": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", + "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.2", + "ignore": "^5.2.4", + "path-type": "^5.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/del/node_modules/is-path-inside": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/del/node_modules/path-type": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", + "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/del/node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dot-prop": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-9.0.0.tgz", + "integrity": "sha512-1gxPBJpI/pcjQhKgIU91II6Wkay+dLcN3M6rf2uwP8hRur3HtQXjVrdAK3sjC0piaEuxzMwjXChcETiJl47lAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^4.18.2" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dot-prop/node_modules/type-fest": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz", + "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/elegant-spinner": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escape-goat": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz", + "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/exit-hook": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-4.0.0.tgz", + "integrity": "sha512-Fqs7ChZm72y40wKjOFXBKg7nJZvQJmewP5/7LtePDdnah/+FH9Hp5sgMujSCMPXlxOAW2//1jrW9pnsY7o20vQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-up-simple": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.0.tgz", + "integrity": "sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "dev": true, + "license": "ISC" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "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/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", + "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/github-url-from-git": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.5.0.tgz", + "integrity": "sha512-WWOec4aRI7YAykQ9+BHmzjyNlkfJFG8QLXnDTsLz/kZefq7qkzdfo4p6fkYYMIq1aj+gZcQs/1HQhQh3DPPxlQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/global-directory": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", + "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ini": "4.1.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.0.2.tgz", + "integrity": "sha512-sYKnA7eGln5ov8T8gnYlkSOxFJvywzEx9BueN6xo/GKO8PGiI6uK6xx+DIGe45T3bdVjLAQDQW1aicT8z8JwQg==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-walk": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-7.0.0.tgz", + "integrity": "sha512-T4gbf83A4NH95zvhVYZc+qWocBBGlpzUXLPGurJggw/WIOwicfXJChLDP/iBZnN5WqROSu5Bm3hhle4z8a8YGQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "minimatch": "^9.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha512-BYqTHXTGUIvg7t1r4sJNKcbDZkL92nkXA8YtRpbjFHRHGDL/NtUeiBJMeE60kIFN/Mg8ESaWQvftaYMGJzQZCQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/index-to-position": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-0.1.2.tgz", + "integrity": "sha512-MWDKS3AS1bGCHLBA2VLImJz42f7bJh8wQsTGCzI3j519/CASStoDONUBVz2I/VID0MpiX3SGSnbOD2xUalbE5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", + "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/inquirer": { + "version": "9.3.7", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.3.7.tgz", + "integrity": "sha512-LJKFHCSeIRq9hanN14IlOtPSTe3lNES7TYDTE2xxdAy1LS5rYphajK1qtwvj3YmQXvvk0U2Vbmcni8P9EIQW9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.3", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/inquirer-autosubmit-prompt": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/inquirer-autosubmit-prompt/-/inquirer-autosubmit-prompt-0.2.0.tgz", + "integrity": "sha512-mzNrusCk5L6kSzlN0Ioddn8yzrhYNLli+Sn2ZxMuLechMYAzakiFCIULxsxlQb5YKzthLGfrFACcWoAvM7p04Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.4.1", + "inquirer": "^6.2.1", + "rxjs": "^6.3.3" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true, + "license": "ISC" + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/string-width/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/string-width/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/inquirer-autosubmit-prompt/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "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/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-in-ci": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-in-ci/-/is-in-ci-1.0.0.tgz", + "integrity": "sha512-eUuAjybVTHMYWm/U+vBO1sY/JOCgoPCXRxzdju0K+K0BiGW0SChEL1MLC0PoCIR1OlPo5YAp8HuQoUlsWEICwg==", + "dev": true, + "license": "MIT", + "bin": { + "is-in-ci": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-installed-globally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-1.0.0.tgz", + "integrity": "sha512-K55T22lfpQ63N4KEN57jZUAaAYqYHEe8veb/TycJRk9DdSCLLcovXz/mL6mOnhQaZsQGwPhuFopdQIlqGSEjiQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "global-directory": "^4.0.1", + "is-path-inside": "^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-installed-globally/node_modules/is-path-inside": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-npm": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz", + "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-observable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", + "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "symbol-observable": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-observable/node_modules/symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-path-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-3.0.0.tgz", + "integrity": "sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-scoped": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-3.0.0.tgz", + "integrity": "sha512-ezxLUq30kiTvP0w/5n9tj4qTOKlrA07Oty1hwTQ+lcqw11x6uc8sp7VRb2OVGRzKfCHZ2A22T5Zsau/Q2Akb0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "scoped-regex": "^3.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-url-superb": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/is-url-superb/-/is-url-superb-6.1.0.tgz", + "integrity": "sha512-LXdhGlYqUPdvEyIhWPEEwYYK3yrUiPcBjmFGlZNv1u5GtIL5qQRf7ddDyPNAvsMFqdzS923FROpTQU97tLe3JQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/issue-regex": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/issue-regex/-/issue-regex-4.3.0.tgz", + "integrity": "sha512-7731a/t2llyrk8Hdwl1x3LkhIFGzxHQGpJA7Ur9cIRViakQF2y25Lwhx8Ziy1B068+kBYUmYPBzw5uo3DdWrdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/ky": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/ky/-/ky-1.7.2.tgz", + "integrity": "sha512-OzIvbHKKDpi60TnF9t7UUVAF1B4mcqc02z5PIvrm08Wyb+yOcz63GRvEuVxNT18a9E1SrNouhB4W2NNLeD7Ykg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/ky?sponsor=1" + } + }, + "node_modules/latest-version": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-9.0.0.tgz", + "integrity": "sha512-7W0vV3rqv5tokqkBAFV1LbR7HPOWzXQDpDgEuib/aJ1jsZZx6x3c2mBI+TJhJzOhkGeaLbCKEHXEXLfirtG2JA==", + "dev": true, + "license": "MIT", + "dependencies": { + "package-json": "^10.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/listr": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz", + "integrity": "sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@samverschueren/stream-to-observable": "^0.3.0", + "is-observable": "^1.1.0", + "is-promise": "^2.1.0", + "is-stream": "^1.1.0", + "listr-silent-renderer": "^1.1.1", + "listr-update-renderer": "^0.5.0", + "listr-verbose-renderer": "^0.5.0", + "p-map": "^2.0.0", + "rxjs": "^6.3.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/listr-input": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/listr-input/-/listr-input-0.2.1.tgz", + "integrity": "sha512-oa8iVG870qJq+OuuMK3DjGqFcwsK1SDu+kULp9kEq09TY231aideIZenr3lFOQdASpAr6asuyJBbX62/a3IIhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inquirer": "^7.0.0", + "inquirer-autosubmit-prompt": "^0.2.0", + "rxjs": "^6.5.3", + "through": "^2.3.8" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/listr-input/node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/listr-input/node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10" + } + }, + "node_modules/listr-input/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/listr-input/node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr-input/node_modules/inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/listr-input/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/listr-input/node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true, + "license": "ISC" + }, + "node_modules/listr-input/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr-input/node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/listr-input/node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/listr-input/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/listr-input/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/listr-input/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/listr-silent-renderer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", + "integrity": "sha512-L26cIFm7/oZeSNVhWB6faeorXhMg4HNlb/dS/7jHhr708jxlXrtrBWo4YUxZQkc6dGoxEAe6J/D3juTRBUzjtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/listr-update-renderer": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz", + "integrity": "sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^1.1.3", + "cli-truncate": "^0.2.1", + "elegant-spinner": "^1.0.1", + "figures": "^1.7.0", + "indent-string": "^3.0.0", + "log-symbols": "^1.0.2", + "log-update": "^2.3.0", + "strip-ansi": "^3.0.1" + }, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "listr": "^0.14.2" + } + }, + "node_modules/listr-update-renderer/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/listr-update-renderer/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/listr-update-renderer/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/listr-update-renderer/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/listr-update-renderer/node_modules/log-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha512-mmPrW0Fh2fxOzdBbFv4g1m6pR72haFLPJ2G5SJEELf1y+iaQrDG6cWCPjy54RHYbZAt7X+ls690Kw62AdWXBzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/listr-update-renderer/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/listr-update-renderer/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/listr-verbose-renderer": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz", + "integrity": "sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^2.4.1", + "cli-cursor": "^2.1.0", + "date-fns": "^1.27.2", + "figures": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/listr-verbose-renderer/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/listr-verbose-renderer/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/listr-verbose-renderer/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/listr-verbose-renderer/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/listr-verbose-renderer/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/listr-verbose-renderer/node_modules/figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/listr-verbose-renderer/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/listr-verbose-renderer/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/listr/node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/listr/node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/listr/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/listr/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/local-pkg": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz", + "integrity": "sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mlly": "^1.7.3", + "pkg-types": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.zip": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", + "integrity": "sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-7.0.0.tgz", + "integrity": "sha512-zrc91EDk2M+2AXo/9BTvK91pqb7qrPg2nX/Hy+u8a5qQlbaOflCKO+6SqgZ+M+xUFxGdKTgwnGiL96b1W3ikRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-unicode-supported": "^2.0.0", + "yoctocolors": "^2.1.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-2.3.0.tgz", + "integrity": "sha512-vlP11XfFGyeNQlmEn9tJ66rEW1coA/79m5z6BCkudjbAGE83uhAcGYrBFwfs3AdLiLzGRusRPAbSPK9xZteCmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^3.0.0", + "cli-cursor": "^2.0.0", + "wrap-ansi": "^3.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-update/node_modules/ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/log-update/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/log-update/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-update/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz", + "integrity": "sha512-iXR3tDXpbnTpzjKSylUJRkLuOrEC7hwEB221cgn6wtF8wpmz28puFXAEfPT5zrjM3wahygB//VuWEr1vTkDcNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "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.14", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.14.tgz", + "integrity": "sha512-5c99P1WKTed11ZC0HMJOj6CDIue6F8ySu+bJL+85q1zBEIY8IklrJ1eiKC2NDRh3Ct3FcvmJPyQHb9erXMTJNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/meow": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "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/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mlly": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.3.tgz", + "integrity": "sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.14.0", + "pathe": "^1.1.2", + "pkg-types": "^1.2.1", + "ufo": "^1.5.4" + } + }, + "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/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/new-github-release-url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/new-github-release-url/-/new-github-release-url-2.0.0.tgz", + "integrity": "sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^2.5.1" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/new-github-release-url/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/normalize-package-data": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", + "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^7.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/normalize-package-data/node_modules/hosted-git-info": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", + "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/np": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/np/-/np-10.1.0.tgz", + "integrity": "sha512-/TvpO0hSJ2rAg1JnJ8Hxr4FoLihe4VCEOOBxMcejhtMvMdofghaO0Qz/5AOBKLtog83vjVFkTgLOxu1z+FJHOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "chalk-template": "^1.1.0", + "cosmiconfig": "^8.3.6", + "del": "^8.0.0", + "escape-goat": "^4.0.0", + "escape-string-regexp": "^5.0.0", + "execa": "^8.0.1", + "exit-hook": "^4.0.0", + "github-url-from-git": "^1.5.0", + "hosted-git-info": "^8.0.2", + "ignore-walk": "^7.0.0", + "import-local": "^3.2.0", + "inquirer": "^9.2.15", + "is-installed-globally": "^1.0.0", + "is-interactive": "^2.0.0", + "is-scoped": "^3.0.0", + "issue-regex": "^4.3.0", + "listr": "^0.14.3", + "listr-input": "^0.2.1", + "log-symbols": "^7.0.0", + "meow": "^13.2.0", + "new-github-release-url": "^2.0.0", + "npm-name": "^8.0.0", + "onetime": "^7.0.0", + "open": "^10.0.4", + "p-memoize": "^7.1.1", + "p-timeout": "^6.1.3", + "path-exists": "^5.0.0", + "pkg-dir": "^8.0.0", + "read-package-up": "^11.0.0", + "read-pkg": "^9.0.1", + "rxjs": "^7.8.1", + "semver": "^7.6.0", + "symbol-observable": "^4.0.0", + "terminal-link": "^3.0.0", + "update-notifier": "^7.3.1" + }, + "bin": { + "np": "source/cli.js" + }, + "engines": { + "bun": ">=1", + "git": ">=2.11.0", + "node": ">=18", + "npm": ">=9", + "pnpm": ">=8", + "yarn": ">=1.7.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/np?sponsor=1" + } + }, + "node_modules/np/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/np/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/np/node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/npm-name": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/npm-name/-/npm-name-8.0.0.tgz", + "integrity": "sha512-DIuCGcKYYhASAZW6Xh/tiaGMko8IHOHe0n3zOA7SzTi0Yvy00x8L7sa5yNiZ75Ny58O/KeRtNouy8Ut6gPbKiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-scoped": "^3.0.0", + "is-url-superb": "^6.1.0", + "ky": "^1.2.0", + "lodash.zip": "^4.2.0", + "org-regex": "^1.0.0", + "p-map": "^7.0.1", + "registry-auth-token": "^5.0.2", + "registry-url": "^6.0.1", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", + "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ora/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/org-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/org-regex/-/org-regex-1.0.0.tgz", + "integrity": "sha512-7bqkxkEJwzJQUAlyYniqEZ3Ilzjh0yoa62c7gL6Ijxj5bEpPL+8IE1Z0PFj0ywjjXQcdrwR51g9MIcLezR0hKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.2.tgz", + "integrity": "sha512-z4cYYMMdKHzw4O5UkWJImbZynVIo0lSGTXc7bzB1e/rrDqkgGUNysK/o4bTr+0+xKvvLoTyGqYC4Fgljy9qe1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-memoize": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/p-memoize/-/p-memoize-7.1.1.tgz", + "integrity": "sha512-DZ/bONJILHkQ721hSr/E9wMz5Am/OTJ9P6LhLFo2Tu+jL8044tgc9LwHO8g4PiaYePnlVVRAJcKmgy8J9MVFrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^4.0.0", + "type-fest": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/p-memoize?sponsor=1" + } + }, + "node_modules/p-memoize/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-timeout": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.3.tgz", + "integrity": "sha512-UJUyfKbwvr/uZSV6btANfb+0t/mOhKV/KXcCUTp8FcQI+v/0d+wXqH4htrW0E4rR6WiEO/EPvUFiV9D5OI4vlw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-10.0.1.tgz", + "integrity": "sha512-ua1L4OgXSBdsu1FPb7F3tYH0F48a6kxvod4pLUlGY9COeJAJQNX/sNH2IiEmsxw7lqYiAwrdHMjz1FctOsyDQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ky": "^1.2.0", + "registry-auth-token": "^5.0.2", + "registry-url": "^6.0.1", + "semver": "^7.6.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.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-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "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.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-8.0.0.tgz", + "integrity": "sha512-4peoBq4Wks0riS0z8741NVv+/8IiTvqnZAr8QGgtdifrtpdXbNw/FxRS1l6NFqm4EMzuS0EDqNNx4XGaz8cuyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up-simple": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-types": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz", + "integrity": "sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.2", + "pathe": "^1.1.2" + } + }, + "node_modules/postcss": { + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", + "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.7", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", + "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true, + "license": "ISC" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pupa": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz", + "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-goat": "^4.0.0" + }, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/read-package-up": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/read-package-up/-/read-package-up-11.0.0.tgz", + "integrity": "sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up-simple": "^1.0.0", + "read-pkg": "^9.0.0", + "type-fest": "^4.6.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-package-up/node_modules/type-fest": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz", + "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-9.0.1.tgz", + "integrity": "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.3", + "normalize-package-data": "^6.0.0", + "parse-json": "^8.0.0", + "type-fest": "^4.6.0", + "unicorn-magic": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg/node_modules/parse-json": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.1.0.tgz", + "integrity": "sha512-rum1bPifK5SSar35Z6EKZuYPJx85pkNaFrxBK3mwdfSJ1/WKbYrjoW/zTPSjRRamfmVX1ACBIdFAO0VRErW/EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "index-to-position": "^0.1.2", + "type-fest": "^4.7.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz", + "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/registry-auth-token": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.3.tgz", + "integrity": "sha512-1bpc9IyC+e+CNFRaWyn77tk4xGG4PPUyfakSmA6F6cvUDjrm58dfyJ3II+9yb10EDkHoy1LaPSmHaWLOH3m6HA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pnpm/npm-conf": "^2.1.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/registry-url": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz", + "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "rc": "1.2.8" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor/node_modules/mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.0.tgz", + "integrity": "sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.28.0", + "@rollup/rollup-android-arm64": "4.28.0", + "@rollup/rollup-darwin-arm64": "4.28.0", + "@rollup/rollup-darwin-x64": "4.28.0", + "@rollup/rollup-freebsd-arm64": "4.28.0", + "@rollup/rollup-freebsd-x64": "4.28.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.28.0", + "@rollup/rollup-linux-arm-musleabihf": "4.28.0", + "@rollup/rollup-linux-arm64-gnu": "4.28.0", + "@rollup/rollup-linux-arm64-musl": "4.28.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.28.0", + "@rollup/rollup-linux-riscv64-gnu": "4.28.0", + "@rollup/rollup-linux-s390x-gnu": "4.28.0", + "@rollup/rollup-linux-x64-gnu": "4.28.0", + "@rollup/rollup-linux-x64-musl": "4.28.0", + "@rollup/rollup-win32-arm64-msvc": "4.28.0", + "@rollup/rollup-win32-ia32-msvc": "4.28.0", + "@rollup/rollup-win32-x64-msvc": "4.28.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-applescript": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", + "integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/scoped-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-3.0.0.tgz", + "integrity": "sha512-yEsN6TuxZhZ1Tl9iB81frTNS292m0I/IG7+w8lTvfcJQP2x3vnpOoevjBoE3Np5A6KnZM2+RtVenihj9t6NiYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "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/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha512-up04hB2hR92PgjpyU3y/eg91yIBILyjVY26NvvciY3EVVPjybkMszMpXQ9QAkcS3I5rtJBDLoTxxg+qvW8c7rw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "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/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-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-literal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.1.tgz", + "integrity": "sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/strip-literal/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/stubborn-fs": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/stubborn-fs/-/stubborn-fs-1.2.5.tgz", + "integrity": "sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g==", + "dev": true + }, + "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/supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/symbol-observable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", + "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/synckit": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/terminal-link": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-3.0.0.tgz", + "integrity": "sha512-flFL3m4wuixmf6IfhFJd1YPiLiMuxEc8uHRM1buzIeZPm22Au2pDqBJQgdo7n1WfPU1ONFGv7YDwpFBmHGF6lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^5.0.0", + "supports-hyperlinks": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/terminal-link/node_modules/ansi-escapes": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-5.0.0.tgz", + "integrity": "sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^1.0.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/terminal-link/node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "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/tinypool": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", + "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", + "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ufo": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" + }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/update-notifier": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-7.3.1.tgz", + "integrity": "sha512-+dwUY4L35XFYEzE+OAL3sarJdUioVovq+8f7lcIJ7wnmnYQV5UD1Y/lcwaMSyaQ6Bj3JMj1XSTjZbNLHn/19yA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boxen": "^8.0.1", + "chalk": "^5.3.0", + "configstore": "^7.0.0", + "is-in-ci": "^1.0.0", + "is-installed-globally": "^1.0.0", + "is-npm": "^6.0.0", + "latest-version": "^9.0.0", + "pupa": "^3.1.0", + "semver": "^7.6.3", + "xdg-basedir": "^5.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/yeoman/update-notifier?sponsor=1" + } + }, + "node_modules/update-notifier/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validate-npm-package-name": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", + "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/vite": { + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.0.tgz", + "integrity": "sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.4", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", + "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "1.6.0", + "@vitest/runner": "1.6.0", + "@vitest/snapshot": "1.6.0", + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", + "acorn-walk": "^8.3.2", + "chai": "^4.3.10", + "debug": "^4.3.4", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.3", + "vite": "^5.0.0", + "vite-node": "1.6.0", + "why-is-node-running": "^2.2.2" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "1.6.0", + "@vitest/ui": "1.6.0", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/when-exit": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/when-exit/-/when-exit-2.1.3.tgz", + "integrity": "sha512-uVieSTccFIr/SFQdFWN/fFaQYmV37OKtuaGphMAzi4DmmUlrvRBJW5WSLkHyjNQY/ePJMz3LoiX9R3yy1Su6Hw==", + "dev": 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/widest-line": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-5.0.0.tgz", + "integrity": "sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/widest-line/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/widest-line/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/widest-line/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/widest-line/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "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/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/xdg-basedir": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", + "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yoctocolors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.1.tgz", + "integrity": "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", + "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} From 52721c601ef60c19e46523ac76f7ab055610faee Mon Sep 17 00:00:00 2001 From: Geoffrey Belcher Date: Tue, 3 Dec 2024 12:31:59 -0330 Subject: [PATCH 04/11] Add license field to jsr --- jsr.json | 1 + 1 file changed, 1 insertion(+) diff --git a/jsr.json b/jsr.json index 39f29ed0..1ac9e20a 100644 --- a/jsr.json +++ b/jsr.json @@ -3,6 +3,7 @@ "name": "@yeoffrey/megastruct", "version": "0.1.0", "exports": "./src/index.ts", + "license": "MIT", "publish": { "include": ["README.md", "LICENSE.md", "src", "docs"] } From da55723dc471dedf3f253d9508fd1cb8f0bde217 Mon Sep 17 00:00:00 2001 From: Geoffrey Belcher Date: Tue, 3 Dec 2024 12:32:39 -0330 Subject: [PATCH 05/11] Update package-lock.json --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index ff9d079d..8763ae8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "superstruct", - "version": "2.0.2", + "name": "megastruct", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "superstruct", - "version": "2.0.2", + "name": "megastruct", + "version": "0.1.0", "license": "MIT", "devDependencies": { "@rollup/plugin-typescript": "^11.1.6", From fe77b5e1f84e98b26ec4ba0aa2f3ac7b6d934376 Mon Sep 17 00:00:00 2001 From: Geoffrey Belcher Date: Tue, 3 Dec 2024 12:40:37 -0330 Subject: [PATCH 06/11] Remove these files --- Changelog.md | 520 --------------------------------------------------- License.md | 9 - Readme.md | 233 ----------------------- 3 files changed, 762 deletions(-) delete mode 100644 Changelog.md delete mode 100644 License.md delete mode 100644 Readme.md diff --git a/Changelog.md b/Changelog.md deleted file mode 100644 index 4955bfa1..00000000 --- a/Changelog.md +++ /dev/null @@ -1,520 +0,0 @@ -# Changelog - -This document maintains a list of major changes to Superstruct with each new release. - -### `2.0.0` - July 3, 2024 - -Some changes in Superstruct v2.0 are _potentially_ breaking if you were using the library in unusual and/or undocumented ways. Since it has been almost 2 years since the last significant release, we want to make sure that we don't ruin someone's day by surprising them with a fix that changes [buggy behavior they were relying on](https://xkcd.com/1172/). For this reason, some changes that would ordinarily be considered a fix are marked as breaking. - -**:rocket: For the absolute majority of users, this should be a smooth upgrade that will not require any changes.** - -#### Breaking - -- Validation now correctly fails when arrays are passed to `object()`, `type()`, and `record()` structs. -- When coercing an `object()` (via `mask()`, `create()` or `validate()` with the `coerce: true` option), arrays will no longer be automatically converted to objects with indexes as keys. [See this PR comment](https://github.com/ianstormtaylor/superstruct/pull/1196#issuecomment-1858924264). - -#### New - -- The library and its TypeScript typings are now compatible with NodeNext/Node16 module resolution. This means that if you are using the library with TypeScript and ECMAScript modules at the same time, you should no longer run into issues! - -#### Fixed - -- Using `mask()` with `union()` now correctly masks union members instead of incorrectly failing validation. - -#### Deprecations - -- Use with Node.js v14 is now deprecated. Due to incompatible tooling, we are no longer able to test Superstruct on this version of Node.js. Use at your own risk. - -#### New Maintainers & Next Steps - -Project maintenance has moved to a new volunteer team: [@arturmuller](https://github.com/arturmuller) and [@yeoffrey](https://github.com/yeoffrey). Hello there! :wave: We are currently going through the existing issues and PRs, trying to resolve or close the backlog. This might take a little while so please bear with us. - -If you are interested in **contributing** — or helping us process the backlog — we would love your help. Don't hesitate to help us triage, open an issue, or submit a PR. You can also join our Superstruct maintainers Discord: https://discord.gg/pdHrQBjQ96. - -If you have **questions, suggestions, or are just not sure about something** related to Superstruct, head over to GitHub Discussions! We have recently enabled this feature to help us differentiate between actual issues/bugs and everything else. We hope this will be a great new place where Superstruct users can get quick help from us — the maintainers — but also from the community as a whole. - -See you at the next release! :v: - -### `1.0.0` — November 17, 2022 - -###### NEW - -**Added an optional `message` argument to override error messages.** You can now pass in a `message` argument to all of the error checking functions which will override any error message with your own message. If you do, Superstruct's original descriptive message will still be accessible via [`error.cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause). - -```ts -assert(data, User, 'The user is invalid!') -// StructError: The user is invalid! -``` - -### BREAKING - -**No breaking changes.** This just marks Superstruct being stable for a long time, so better to move to a non `0.*` numbering scheme. - -### `0.16.0` — June 6, 2022 - -###### BREAKING - -**Refinement functions are now called with valid, but potentially unrefined values.** Previously the functions passed in to `refine` would always be called with sub-elements (eg. when using objects or arrays) that were completely valid **and** refined. However, this prevented collecting all the refinement errors from subelements in a validation in one go, which is common when validating forms. _Note: this should not have any affect on almost all use cases, so you're safe to upgrade._ - -### `0.15.0` — March 25, 2021 - -###### FIXED - -**Unions can now be coerced.** Previously unions created a barrier in coercion such that structs nested inside unions would not have their coercion logic triggered, but this has been fixed. - -**Assigning preserves `type` structs.** Previously using the `assign` helper would implicitly convert `type` structs into `object` structs which wasn't expected and confusing, but this has been fixed. - -### `0.14.0` — January 26, 2021 - -###### BREAKING - -**The `mask` helper now works for nested objects.** Previously it would only mask the properties at the top-level of a struct, however now it acts deeply. You can use it to define object structs once, but use them either strictly or loosely. - -**The `masked` coercion has been removed.** This previously allowed you to mix in masking to a specific struct, but the `mask` helper is a more robust way to do this, and it doesn't force you to maintain two separate structs. - -### `0.13.0` — December 11, 2020 - -###### NEW - -**Structs can now define an `entries` iterator for nested values.** Previously iterating through nested values was defined in a one-off manner inside certain structs, but this led to non-uniform support. Now, any struct can define an `entries` iterator that will cause nested values to be automatically coerced and validated. - -**Coercion receives `context` objects and supports nested values.** Previously context objects were only passed to the validations and refinements. But now the same context is passed to coercions too so you can implement more complex logic. And coercions are automatically applied to nested values thanks to the addition of `entries`. - -**Iteration logic has gotten simpler, and more performant.** The addition of the `entries` logic has enabled us to only ever iterate through a tree of values one time for coercion and validation, instead of once each. This should speed up most standard use cases. - -###### BREAKING - -**The `ctx.fail()` function has been removed.** Previously you'd use it to return more information about a failure inside a struct. Now you can simply return a partial failure object. - -**The `ctx.check()` function has been removed.** Previously you'd use it to validate nested objects in more complex struct shapes. Now you can use the new `entries` property for this instead. - -**The `context.struct` and `context.value` properties have been removed.** These properties were previously available, but unnecessary since anywhere you have the context object you will also know the `value` and the specific struct that is being validated. Keeping them around required extra unnecessary plumbing in the library that made composing structs much more difficult so they were removed. - -### `0.12.0` — November 24, 2020 - -###### NEW - -**New `Describe` utility type.** This new utility lets you define a struct from an existing TypeScript type and ensure that the struct's validation matches it, otherwise TypeScript's compiler will error. For example: - -```ts -type User = { - id: number - name: string -} - -const User: Describe = object({ - id: string(), // This mistake will fail to pass type checking! - name: string(), -}) -``` - -###### BREAKING - -**The `coerce` helper has changed to be more type-safe!** Previously `coerce` functions were called with `value: unknown` because they ran before all validation. However, now they take a new second argument that is another struct to narrow the cases where coercions occurs. This means the `value` for coercion will now be type-safe. - -```ts -// Previously -const MyNumber = coerce(number(), (value) => { - return typeof value === 'string' ? parseFloat(value) : value -}) - -// Now -const MyNumber = coerce(number(), string(), (value) => { - return parseFloat(value) -}) -``` - -### `0.11.0` — November 20, 2020 - -###### NEW - -**New `assign`, `pick`, and `omit` object utilities.** These utilities make composing object structs together possible, which should make re-using structs in your codebase easier. - -```ts -// Combine two structs with `assign`: -const a = object({ id: number() }) -const b = object({ name: string() }) -const c = assign([a, b]) - -// Pick out specific properties with `pick`: -const a2 = pick(c, ['id']) - -// Omit specific properties with `omit`: -const a3 = omit(c, ['name']) -``` - -**New `unknown` struct.** This is the same as the existing `any` struct, but it will ensure that in TypeScript the value is of the more restrictive `unknown` type so it encourages better type safety. - -```ts -const Shape = type({ - id: number(), - name: string(), - other: unknown(), -}) -``` - -**New `integer`, `regexp`, and `func` structs.** These are just simple additions for common use cases of ensuring a value is an integer, a regular expression object (not a string!), or a function. - -```ts -const Shape = type({ - id: integer(), - matches: regexp(), - send: func(), -}) -``` - -**New `max/min` refinements.** For refining `number` (or `integer`) or `date` structs to ensure they are greater than or less than a specific threshold. The third argument can indicate whether to make the threshold exclusive (instead of the default inclusive). - -```ts -const Index = min(number(), 0) -const PastOrPresent = max(date(), new Date()) -const Past = max(date(), new Date(), { exclusive: true }) -``` - -**Even more information on errors.** Errors now expose the `error.refinement` property when the failure originated in a refinement validation. And they also now have an `error.key` property which is the key for the failure in the case of complex values like arrays/objects. (Previously the key was retrievable by checking `error.path`, but this will make the 90% case easier.) - -###### BREAKING - -**The `coerce` helper has been renamed to `create`.** This will hopefully make it more clear that it's fully coercing and validating a value against a struct, throwing errors if the value was invalid. This has caused confusion for people who though it would just coerce the value and return the unvalidated-but-coerced version. - -```ts -// Previously -const user = coerce(data, User) - -// Now -const user = create(data, User) -``` - -**The `struct`, `refinement` and `coercion` factories have been renamed.** This renaming is purely for keeping things slightly cleaner and easier to understand. The new names are `define`, `refine`, and `coerce`. Separating them slightly from the noun-based names used for the types themselves. - -```ts -// Previously -const Email = struct('email', isEmail) -const Positive = refinement('positive', number(), n => n > 0) -const Trimmed = coercion(string(), s => s.trim() - -// Now -const Email = define('email', isEmail) -const Positive = refine(number(), 'positive', n => n > 0) -const Trimmed = coerce(string(), s => s.trim()) -``` - -_Note that the order of `refine` arguments has changed to be slightly more natural, and encourage scoped refinement names._ - -**The `length` refinement has been renamed to `size`.** This is to match with the expansion of it's abilities from purely strings and arrays to also now include numbers, maps, and sets. In addition you can also omit the `max` argument to specify an exact size: - -```ts -// Previously -const Name = length(string(), 1, 100) -const MyArray = length(array(string()), 3, 3) - -// Now -const Name = size(string(), 1, 100) -const MyArray = size(array(string()), 3) -const Id = size(integer(), 1, Infinity) -const MySet = size(set(), 1, 9) -``` - -**The `StructType` inferring helper has been renamed to `Infer`.** This just makes it slightly easier to read what's going on when you're inferring a type. - -```ts -// Previously -type User = StructType - -// Now -type User = Infer -``` - -**The `error.type` property has been standardized.** Previously it was a human-readable description that sort of incorporated the schema. Now it is simple the plain lowercase name of the struct in question, making it something you can use programmatically when formatting errors. - -```ts -// Previously -'Array' -'[string,number]' -'Map' - -// Now -'array' -'tuple' -'map' -``` - -### `0.10.0` — June 6, 2020 - -The `0.10` version is a complete overhaul with the goal of making Superstruct much simpler and easier to understand, and with complete support for runtime type signatures TypeScript. - -This makes it much more powerful, however the core architecture has had to change to make it happen. It will still look very similar, but migrating between the versions _will be more work than usual_. There's no requirement to upgrade, although if you're using Superstruct in concert with TypeScript you will have a much better experience. - -###### BREAKING - -**All types are created from factories.** Previously depending on whether the type was a complex type or a scalar type they'd be defined different. Complex types used factories, whereas scalars used strings. Now all types are exposed as factories. - -For example, previously: - -```ts -import { struct } from 'superstruct' - -const User = struct.object({ - name: 'string', - age: 'number', -}) -``` - -Now becomes: - -```ts -import { object, string, number } from 'superstruct' - -const User = object({ - name: string(), - age: number(), -}) -``` - -**Custom scalars are no longer pre-defined as strings.** Previously, you would define all of your "custom" types in a single place in your codebase and then refer to them in structs later on with a string value. This worked, but added a layer of unnecessary indirection, and made it impossible to accomodate runtime type signatures. - -In the new version, custom types are defined extremely similarly to non-custom types. And this has the added benefit that you can easily trace the custom type definitions by just following `import` statements. - -Here's how it used to work: - -```ts -import { superstruct } from 'superstruct' -import isEmail from 'is-email' - -const struct = superstruct({ - types: { - email: isEmail, - }, -}) - -const Email = struct('email') -``` - -And here's what it would look like now: - -```ts -import { struct } from 'superstruct' -import isEmail from 'is-email' - -const Email = struct('email', isEmail) -``` - -**Validation logic has been moved to helper functions.** Previously the `assert` and `is` helpers lived on the struct objects themselves. Now, these functions have been extracted into separate helpers. This was unfortunately necessary to work around limitations in TypeScript's `asserts` keyword. - -For example, before: - -```ts -User.assert(data) -``` - -Now would be: - -```ts -import { assert } from 'superstruct' - -assert(data, User) -``` - -**Coercion is now separate from validation.** Previously there was native logic for handling default values for structs when validating them. This has been abstracted into the ability to define _any_ custom coercion logic for structs, and it has been separate from validation to make it very clear when data can change and when it cannot. - -For example, previously: - -```ts -const output = User.assert(input) -``` - -Would now be: - -```ts -const input = coerce(input, User) -``` - -The `coerce` step is the only time that data will be transformed at all by coercion logic, and the `assert` step no longer needs to return any values. This makes it easy to do things like: - -```ts -if (is(input, User)) { - // ... -} -``` - -**Validation context is now a dictionary of properties.** Previously when performing complex validation logic that was dependent on other properties on the root object, you could use the second `branch` argument to the validation function. This argument has been changed to be a `context` dictionary with more information. The same branch argument can now be accessed as `context.branch`, along with the new information. - -**Unknown properties of objects now have a `'never'` type.** Previously unknown properties would throw errors with `type === null`, however the newly introduced `'never'` type is now used instead. - -**Defaults are now defined with a separate coercion helper.** Previously all structs took a second argument that defined the default value to use if an `undefined` value was present. This has been pulled out into a separate helper now to clearly distinguish coercion logic. - -For example, previously you'd do: - -```ts -const Article = struct.object( - { - title: 'string', - }, - { - title: 'Untitled', - } -) -``` - -Whereas now you'd do: - -```ts -const Article = defaulted( - object({ - title: string(), - }), - { - title: 'Untitled', - } -) -``` - -**Optional arguments are now defined with a seperate factory.** Similarly to defaults, there is a new `optional` factory for defined values that can also be `undefined`. - -Previously you'd do: - -```ts -const Flag = struct('string?') -``` - -Now you'd do: - -```ts -const Flag = optional(string()) -``` - -**Several structs have been renamed.** This was necessary because structs are now exposed directly as variables, which runs afoul of reserved words. So the following renames have been applied: - -- `interface` -> `type` -- `enum` -> `enums` -- `function` -> `func` - -### `0.8.0` — October 8, 2019 - -###### BREAKING - -**Several structs have been renamed!** Superstruct tries to mimic established naming schemes whenever possible for its API, and TypeScript is one of our main comparisons. To make things easier for people, we've renamed a few structs to more closely match their TypeScript counterparts: - -- The `list` struct is now called `array`. -- The `partial` struct is now called `pick`. -- The `dict` struct is now called `record`. - -Hopefully this will make them easier to understand at a glance! - -**The `enums` struct has been removed!** This was special-cased in the API previously, but you can get the exact same behavior by creating an using the `array` and `enum` structs: - -```js -struct.array(struct.enum(['red', 'blue', 'green'])) -``` - -**The `any` struct has been removed! (Not the scalar though.)** Previously `struct.any()` was exposed that did the same thing as `struct()`, allowing you to use shorthands for common structs. But this was confusingly named because it has nothing to do with the `'any'` scalar type. And since it was redundant it has been removed. - -**The `interface` struct now returns the original, unaltered value!** In an effort to make things more familiar, the `interface` struct now always returns the object that it is called with when it passes validation. So if the object was a function, a function will be returned. This makes it match more closely with the idea of "structural typing" that TypeScript and other typing systems are based on. \_If you want the old behavior, use the `pick` struct. - -**Computed values function signatures have changed!** Previously a computed value would be called with a signature of `(value, root)` in some cases and `(value, parent)` in others. This was confusing, and the cause for the inconsistency was complex. This logic has been simplified, and now computed values are called with `(value, branch, path)` in all cases. - -```js -struct.dynamic((value, branch, path) => { - value === branch[branch.length - 1] // you can get the value... - const parent = branch[branch.length - 2] // ...and the parent... - const key = path[path.length - 1] // ...and the key... - value === parent[key] - const root = branch[0] // ...and the root! -}) -``` - -The `path` is an array of keys representing the nested value's location in the root value. And the `branch` is an array of all of the sub values along the path to get to the current one. This allows you to always be able to receive both the **parent** and the **root** values from any location—as well as any value in between. - -**The `error.errors` property has been renamed `error.failures`, and isn't cyclical.** It being cyclical caused lots of issues whenever an `StructError` object was attempted to be serialized. And the `errors` property was slightly confusing because the elements of the array weren't full error objects. The new structure is easier to understand and work with. - -**The `error.reason` property is no longer special-cased.** Previously you could return a "reason" string from validator functions and it would be added to error objects. However, now you must return an error properties object (with a `reason` property if you'd like), and all of the properties will be added to the error object. This makes Superstruct even more flexible as far as custom error details go. - -**The `type` property of structs have been rewritten to be more clear.** This is an implementation mostly, but the `struct.type` string which shows up in error messages have been tweaked to be slightly more clear exactly what type they are checking for. - -###### NEW - -**Superstruct is now written in TypeScript.** It was rewritten from the ground up to make use of types, and to have better inline documented if you use a TypeScript-compatible IDE. There are probably improvements that can be made, so if you'd like to contribute please do! - -**A new `partial` struct mimics TypeScript's `Partial` utility.** The new struct validates that its input partially matches an object defined as a set of properties with associated types. All of the properties of the object are optional. - -**A new `size` struct allows validating array and string lengths.** The new struct validates that its input has a certain size, by checking its `length` property. This works strings or arrays. - -**You can now provide a custom `Error` setting.** By passing in your own constructor when configuring Superstruct you can have complete control over the exact errors that are generated by structs that fail validation. - -### `0.7.0` — September 21, 2019 - -###### BREAKING - -- **The build process now outputs ES5 code.** Previously it was outputting ES6 code, which posed problems for some builders. This change shouldn't really affect anyone negatively, but it's being released as a breaking version just in case. - ---- - -### `0.6.0` — September 13, 2018 - -###### BREAKING - -- **Invalid `Date` objects are now considered invalid.** Previously using the built-in `'date'` validator would only check that the object was a `Date` instance, and not that it was a valid one. This has been fixed, and although it is technically a breaking change, most everyone would have expected this behavior to begin with. - ---- - -### `0.5.0` — December 21, 2017 - -###### BREAKING - -- **Validators must now return `true`, `false` or an error reason string.** Previously any truthy value would be considered valid. Now you can provide more information for the thrown errors by providing a string which will be attached as `error.reason`. However, this means that truthy string values now equate to invalid, not valid. - -- **Property validators now receive `data` as their second argument.** Previously you only had access to the property `value`, but now you also have access to the entire object's `data`. - -###### NEW - -- **Errors can now contain reason information.** Validator functions can now return string instead of a boolean, denoting the reason a value was invalid. This can then be used to create more helpful error messages. - ---- - -### `0.4.0` — December 1, 2017 - -###### BREAKING - -- **`object` structs are no longer optional-ish.** Previously object struct types would not throw if `undefined` was passed and no properties were required. This was not only confusing, but complex to maintain. Now if you want an object struct to be optional, use the `struct.optional(...)` helper. - -- **Removed the `Struct.default` method.** If you need to get the default value, use the `Struct.validate` or `Struct.assert` methods's return value instead. - -###### NEW - -- **Added the `dict`, `enum`, `intersection`, `union` and `tuple` structs.** These are all available as `struct.dict`, `struct.enum`, etc. - ---- - -### `0.3.0` — November 30, 2017 - -###### BREAKING - -- **The `validate()` method now returns `[ error, result ]`.** Previously it only had a single return value, which necessitated extra type checking to see if the value was an error or a result. Now you can just destructure the array to get either return value, for easier coding. - -- **Errors have been simplified, removing "codes".** Previously there were multiple types of errors that were thrown and you could differentiate between them with the `error.code` property. But the other properties of the error already let you infer the code, so having multiple types of errors made for a larger API surface without much benefit. - ---- - -### `0.2.0` — November 30, 2017 - -###### BREAKING - -- **Structs are now functions again.** :smile: They are built on the same underlying schema classes underneath though, since that helps the code structure. But to allow for the `struct = Struct({ ... })` syntax the structs themselves have changed to be function. - -###### NEW - -- **The basic case is now `Struct(data)`.** Previously you had to use `Struct.assert(data)`. Although the `assert` method (and others) are still there, the basic case is a bit terser and more similar to the struct-initializing APIs in other languages. - ---- - -### `0.1.0` — November 29, 2017 - -###### BREAKING - -- **Structs are now classes instead of functions.** This is better in terms of the API being a bit less magic-y. It's also useful so that we can add other helpful methods to structs besides the `assert` method. What was previously `struct(data)` is now `struct.assert(data)`. - ---- - -### `0.0.0` — November 24, 2017 - -:tada: diff --git a/License.md b/License.md deleted file mode 100644 index 2a1ed03b..00000000 --- a/License.md +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License - -Copyright © 2024, Geoffrey Belcher - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Readme.md b/Readme.md deleted file mode 100644 index 6629e9fc..00000000 --- a/Readme.md +++ /dev/null @@ -1,233 +0,0 @@ -

- -

- -

- A simple and composable way
- to validate data in JavaScript (and TypeScript). -

-
-
- -

- Usage • - Why? • - Principles • - Demo • - Examples • - Documentation -

- -

- - - - - - - - - -

- -
-
- -Superstruct makes it easy to define interfaces and then validate JavaScript data against them. Its type annotation API was inspired by [Typescript](https://www.typescriptlang.org/docs/handbook/basic-types.html), [Flow](https://flow.org/en/docs/types/), [Go](https://gobyexample.com/structs), and [GraphQL](http://graphql.org/learn/schema/), giving it a familiar and easy to understand API. - -But Superstruct is designed for validating data at runtime, so it throws (or returns) detailed runtime errors for you or your end users. This is especially useful in situations like accepting arbitrary input in a REST or GraphQL API. But it can even be used to validate internal data structures at runtime when needed. - -
- -### Usage - -Superstruct allows you to define the shape of data you want to validate: - -```js -import { assert, object, number, string, array } from 'superstruct' - -const Article = object({ - id: number(), - title: string(), - tags: array(string()), - author: object({ - id: number(), - }), -}) - -const data = { - id: 34, - title: 'Hello World', - tags: ['news', 'features'], - author: { - id: 1, - }, -} - -assert(data, Article) -// This will throw an error when the data is invalid. -// If you'd rather not throw, you can use `is()` or `validate()`. -``` - -Superstruct ships with validators for all the common JavaScript data types, and you can define custom ones too: - -```js -import { is, define, object, string } from 'superstruct' -import isUuid from 'is-uuid' -import isEmail from 'is-email' - -const Email = define('Email', isEmail) -const Uuid = define('Uuid', isUuid.v4) - -const User = object({ - id: Uuid, - email: Email, - name: string(), -}) - -const data = { - id: 'c8d63140-a1f7-45e0-bfc6-df72973fea86', - email: 'jane@example.com', - name: 'Jane', -} - -if (is(data, User)) { - // Your data is guaranteed to be valid in this block. -} -``` - -Superstruct can also handle coercion of your data before validating it, for example to mix in default values: - -```ts -import { create, object, number, string, defaulted } from 'superstruct' - -let i = 0 - -const User = object({ - id: defaulted(number(), () => i++), - name: string(), -}) - -const data = { - name: 'Jane', -} - -// You can apply the defaults to your data while validating. -const user = create(data, User) -// { -// id: 0, -// name: 'Jane', -// } -``` - -And if you use TypeScript, Superstruct automatically ensures that your data has proper typings whenever you validate it: - -```ts -import { is, object, number, string } from 'superstruct' - -const User = object({ - id: number(), - name: string() -}) - -const data: unknown = { ... } - -if (is(data, User)) { - // TypeScript knows the shape of `data` here, so it is safe to access - // properties like `data.id` and `data.name`. -} -``` - -Superstruct supports more complex use cases too like defining arrays or nested objects, composing structs inside each other, returning errors instead of throwing them, and more! For more information read the full [Documentation](#documentation). - -
- -### Why? - -There are lots of existing validation libraries—[`joi`](https://github.com/hapijs/joi), [`express-validator`](https://github.com/ctavan/express-validator), [`validator.js`](https://github.com/chriso/validator.js), [`yup`](https://github.com/jquense/yup), [`ajv`](https://github.com/epoberezkin/ajv), [`is-my-json-valid`](https://github.com/mafintosh/is-my-json-valid)... But they exhibit many issues that lead to your codebase becoming hard to maintain... - -- **They don't expose detailed errors.** Many validators simply return string-only errors or booleans without any details as to why, making it difficult to customize the errors to be helpful for end-users. - -- **They make custom types hard.** Many validators ship with built-in types like emails, URLs, UUIDs, etc. with no way to know what they check for, and complicated APIs for defining new types. - -- **They don't encourage single sources of truth.** Many existing APIs encourage re-defining custom data types over and over, with the source of truth being spread out across your entire code base. - -- **They don't throw errors.** Many don't actually throw the errors, forcing you to wrap everywhere. Although helpful in the days of callbacks, not using `throw` in modern JavaScript makes code much more complex. - -- **They're tightly coupled to other concerns.** Many validators are tightly coupled to Express or other frameworks, which results in one-off, confusing code that isn't reusable across your code base. - -- **They use JSON Schema.** Don't get me wrong, JSON Schema _can_ be useful. But it's kind of like HATEOAS—it's usually way more complexity than you need and you aren't using any of its benefits. (Sorry, I said it.) - -Of course, not every validation library suffers from all of these issues, but most of them exhibit at least one. If you've run into this problem before, you might like Superstruct. - -Which brings me to how Superstruct solves these issues... - -
- -### Principles - -1. **Customizable types.** Superstruct's power is in making it easy to define an entire set of custom data types that are specific to your application, and defined in a _single_ place, so you have full control over your requirements. - -2. **Unopinionated defaults.** Superstruct ships with native JavaScript types, and everything else is customizable, so you never have to fight to override decisions made by "core" that differ from your application's needs. - -3. **Composable interfaces.** Superstruct interfaces are composable, so you can break down commonly-repeated pieces of data into components, and compose them to build up the more complex objects. - -4. **Useful errors.** The errors that Superstruct throws contain all the information you need to convert them into your own application-specific errors easy, which means more helpful errors for your end users! - -5. **Familiar API.** The Superstruct API was heavily inspired by [Typescript](https://www.typescriptlang.org/docs/handbook/basic-types.html), [Flow](https://flow.org/en/docs/types/), [Go](https://gobyexample.com/structs), and [GraphQL](http://graphql.org/learn/schema/). If you're familiar with any of those, then its schema definition API will feel very natural to use, so you can get started quickly. - -
- -### Demo - -Try out the [live demo on CodeSandbox](https://codesandbox.io/s/bold-water-s2cr8d?file=/index.js) to get an idea for how the API works, or to quickly verify your use case: - -[![Demo screenshot.](./docs/images/demo-screenshot.png)](https://codesandbox.io/s/bold-water-s2cr8d?file=/index.js) - -
- -### Examples - -Superstruct's API is very flexible, allowing it to be used for a variety of use cases on your servers and in the browser. Here are a few examples of common patterns... - -- [Basic Validation](./examples/basic-validation.js) -- [Custom Types](./examples/custom-types.js) -- [Default Values](./examples/default-values.js) -- [Optional Values](./examples/optional-values.js) -- [Composing Structs](./examples/composing-structs.js) -- [Throwing Errors](./examples/throwing-errors.js) -- [Returning Errors](./examples/returning-errors.js) -- [Testing Values](./examples/testing-values.js) -- [Custom Errors](./examples/custom-errors.js) - -
- -### Documentation - -Read the getting started guide to familiarize yourself with how Superstruct works. After that, check out the full API reference for more detailed information about structs, types and errors... - -- [**Guide**](https://docs.superstructjs.org/guides/01-getting-started) - - [Getting Started](https://docs.superstructjs.org/guides/01-getting-started) - - [Validating Data](https://docs.superstructjs.org/guides/02-validating-data) - - [Coercing Data](https://docs.superstructjs.org/guides/03-coercing-data) - - [Refining Validation](https://docs.superstructjs.org/guides/04-refining-validation) - - [Handling Errors](https://docs.superstructjs.org/guides/05-handling-errors) - - [Using TypeScript](https://docs.superstructjs.org/guides/06-using-typescript) -- [**Reference**](https://docs.superstructjs.org/api-reference/core) - - [Core](https://docs.superstructjs.org/api-reference/core) - - [Types](https://docs.superstructjs.org/api-reference/types) - - [Refinements](https://docs.superstructjs.org/api-reference/refinements) - - [Coercions](https://docs.superstructjs.org/api-reference/coercions) - - [Utilities](https://docs.superstructjs.org/api-reference/utilities) - - [Errors](https://docs.superstructjs.org/api-reference/errors) - - [TypeScript](https://docs.superstructjs.org/api-reference/typescript) -- [**FAQ**](https://docs.superstructjs.org/resources/faq) -- [**Resources**](https://docs.superstructjs.org/resources/links) - -[![Docs screenshot.](./docs/images/docs-screenshot.png)](https://docs.superstructjs.org) - -
- -### License - -This package is [MIT-licensed](./License.md). From b4644f9e5f23af13946cfca1e45faa2ba07731a2 Mon Sep 17 00:00:00 2001 From: Geoffrey Belcher Date: Tue, 3 Dec 2024 12:42:53 -0330 Subject: [PATCH 07/11] Add these files back but now they're upper case. Thanks APFS :| --- CHANGELOG.md | 520 +++++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE.md | 9 + README.md | 233 +++++++++++++++++++++++ 3 files changed, 762 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 LICENSE.md create mode 100644 README.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..4955bfa1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,520 @@ +# Changelog + +This document maintains a list of major changes to Superstruct with each new release. + +### `2.0.0` - July 3, 2024 + +Some changes in Superstruct v2.0 are _potentially_ breaking if you were using the library in unusual and/or undocumented ways. Since it has been almost 2 years since the last significant release, we want to make sure that we don't ruin someone's day by surprising them with a fix that changes [buggy behavior they were relying on](https://xkcd.com/1172/). For this reason, some changes that would ordinarily be considered a fix are marked as breaking. + +**:rocket: For the absolute majority of users, this should be a smooth upgrade that will not require any changes.** + +#### Breaking + +- Validation now correctly fails when arrays are passed to `object()`, `type()`, and `record()` structs. +- When coercing an `object()` (via `mask()`, `create()` or `validate()` with the `coerce: true` option), arrays will no longer be automatically converted to objects with indexes as keys. [See this PR comment](https://github.com/ianstormtaylor/superstruct/pull/1196#issuecomment-1858924264). + +#### New + +- The library and its TypeScript typings are now compatible with NodeNext/Node16 module resolution. This means that if you are using the library with TypeScript and ECMAScript modules at the same time, you should no longer run into issues! + +#### Fixed + +- Using `mask()` with `union()` now correctly masks union members instead of incorrectly failing validation. + +#### Deprecations + +- Use with Node.js v14 is now deprecated. Due to incompatible tooling, we are no longer able to test Superstruct on this version of Node.js. Use at your own risk. + +#### New Maintainers & Next Steps + +Project maintenance has moved to a new volunteer team: [@arturmuller](https://github.com/arturmuller) and [@yeoffrey](https://github.com/yeoffrey). Hello there! :wave: We are currently going through the existing issues and PRs, trying to resolve or close the backlog. This might take a little while so please bear with us. + +If you are interested in **contributing** — or helping us process the backlog — we would love your help. Don't hesitate to help us triage, open an issue, or submit a PR. You can also join our Superstruct maintainers Discord: https://discord.gg/pdHrQBjQ96. + +If you have **questions, suggestions, or are just not sure about something** related to Superstruct, head over to GitHub Discussions! We have recently enabled this feature to help us differentiate between actual issues/bugs and everything else. We hope this will be a great new place where Superstruct users can get quick help from us — the maintainers — but also from the community as a whole. + +See you at the next release! :v: + +### `1.0.0` — November 17, 2022 + +###### NEW + +**Added an optional `message` argument to override error messages.** You can now pass in a `message` argument to all of the error checking functions which will override any error message with your own message. If you do, Superstruct's original descriptive message will still be accessible via [`error.cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause). + +```ts +assert(data, User, 'The user is invalid!') +// StructError: The user is invalid! +``` + +### BREAKING + +**No breaking changes.** This just marks Superstruct being stable for a long time, so better to move to a non `0.*` numbering scheme. + +### `0.16.0` — June 6, 2022 + +###### BREAKING + +**Refinement functions are now called with valid, but potentially unrefined values.** Previously the functions passed in to `refine` would always be called with sub-elements (eg. when using objects or arrays) that were completely valid **and** refined. However, this prevented collecting all the refinement errors from subelements in a validation in one go, which is common when validating forms. _Note: this should not have any affect on almost all use cases, so you're safe to upgrade._ + +### `0.15.0` — March 25, 2021 + +###### FIXED + +**Unions can now be coerced.** Previously unions created a barrier in coercion such that structs nested inside unions would not have their coercion logic triggered, but this has been fixed. + +**Assigning preserves `type` structs.** Previously using the `assign` helper would implicitly convert `type` structs into `object` structs which wasn't expected and confusing, but this has been fixed. + +### `0.14.0` — January 26, 2021 + +###### BREAKING + +**The `mask` helper now works for nested objects.** Previously it would only mask the properties at the top-level of a struct, however now it acts deeply. You can use it to define object structs once, but use them either strictly or loosely. + +**The `masked` coercion has been removed.** This previously allowed you to mix in masking to a specific struct, but the `mask` helper is a more robust way to do this, and it doesn't force you to maintain two separate structs. + +### `0.13.0` — December 11, 2020 + +###### NEW + +**Structs can now define an `entries` iterator for nested values.** Previously iterating through nested values was defined in a one-off manner inside certain structs, but this led to non-uniform support. Now, any struct can define an `entries` iterator that will cause nested values to be automatically coerced and validated. + +**Coercion receives `context` objects and supports nested values.** Previously context objects were only passed to the validations and refinements. But now the same context is passed to coercions too so you can implement more complex logic. And coercions are automatically applied to nested values thanks to the addition of `entries`. + +**Iteration logic has gotten simpler, and more performant.** The addition of the `entries` logic has enabled us to only ever iterate through a tree of values one time for coercion and validation, instead of once each. This should speed up most standard use cases. + +###### BREAKING + +**The `ctx.fail()` function has been removed.** Previously you'd use it to return more information about a failure inside a struct. Now you can simply return a partial failure object. + +**The `ctx.check()` function has been removed.** Previously you'd use it to validate nested objects in more complex struct shapes. Now you can use the new `entries` property for this instead. + +**The `context.struct` and `context.value` properties have been removed.** These properties were previously available, but unnecessary since anywhere you have the context object you will also know the `value` and the specific struct that is being validated. Keeping them around required extra unnecessary plumbing in the library that made composing structs much more difficult so they were removed. + +### `0.12.0` — November 24, 2020 + +###### NEW + +**New `Describe` utility type.** This new utility lets you define a struct from an existing TypeScript type and ensure that the struct's validation matches it, otherwise TypeScript's compiler will error. For example: + +```ts +type User = { + id: number + name: string +} + +const User: Describe = object({ + id: string(), // This mistake will fail to pass type checking! + name: string(), +}) +``` + +###### BREAKING + +**The `coerce` helper has changed to be more type-safe!** Previously `coerce` functions were called with `value: unknown` because they ran before all validation. However, now they take a new second argument that is another struct to narrow the cases where coercions occurs. This means the `value` for coercion will now be type-safe. + +```ts +// Previously +const MyNumber = coerce(number(), (value) => { + return typeof value === 'string' ? parseFloat(value) : value +}) + +// Now +const MyNumber = coerce(number(), string(), (value) => { + return parseFloat(value) +}) +``` + +### `0.11.0` — November 20, 2020 + +###### NEW + +**New `assign`, `pick`, and `omit` object utilities.** These utilities make composing object structs together possible, which should make re-using structs in your codebase easier. + +```ts +// Combine two structs with `assign`: +const a = object({ id: number() }) +const b = object({ name: string() }) +const c = assign([a, b]) + +// Pick out specific properties with `pick`: +const a2 = pick(c, ['id']) + +// Omit specific properties with `omit`: +const a3 = omit(c, ['name']) +``` + +**New `unknown` struct.** This is the same as the existing `any` struct, but it will ensure that in TypeScript the value is of the more restrictive `unknown` type so it encourages better type safety. + +```ts +const Shape = type({ + id: number(), + name: string(), + other: unknown(), +}) +``` + +**New `integer`, `regexp`, and `func` structs.** These are just simple additions for common use cases of ensuring a value is an integer, a regular expression object (not a string!), or a function. + +```ts +const Shape = type({ + id: integer(), + matches: regexp(), + send: func(), +}) +``` + +**New `max/min` refinements.** For refining `number` (or `integer`) or `date` structs to ensure they are greater than or less than a specific threshold. The third argument can indicate whether to make the threshold exclusive (instead of the default inclusive). + +```ts +const Index = min(number(), 0) +const PastOrPresent = max(date(), new Date()) +const Past = max(date(), new Date(), { exclusive: true }) +``` + +**Even more information on errors.** Errors now expose the `error.refinement` property when the failure originated in a refinement validation. And they also now have an `error.key` property which is the key for the failure in the case of complex values like arrays/objects. (Previously the key was retrievable by checking `error.path`, but this will make the 90% case easier.) + +###### BREAKING + +**The `coerce` helper has been renamed to `create`.** This will hopefully make it more clear that it's fully coercing and validating a value against a struct, throwing errors if the value was invalid. This has caused confusion for people who though it would just coerce the value and return the unvalidated-but-coerced version. + +```ts +// Previously +const user = coerce(data, User) + +// Now +const user = create(data, User) +``` + +**The `struct`, `refinement` and `coercion` factories have been renamed.** This renaming is purely for keeping things slightly cleaner and easier to understand. The new names are `define`, `refine`, and `coerce`. Separating them slightly from the noun-based names used for the types themselves. + +```ts +// Previously +const Email = struct('email', isEmail) +const Positive = refinement('positive', number(), n => n > 0) +const Trimmed = coercion(string(), s => s.trim() + +// Now +const Email = define('email', isEmail) +const Positive = refine(number(), 'positive', n => n > 0) +const Trimmed = coerce(string(), s => s.trim()) +``` + +_Note that the order of `refine` arguments has changed to be slightly more natural, and encourage scoped refinement names._ + +**The `length` refinement has been renamed to `size`.** This is to match with the expansion of it's abilities from purely strings and arrays to also now include numbers, maps, and sets. In addition you can also omit the `max` argument to specify an exact size: + +```ts +// Previously +const Name = length(string(), 1, 100) +const MyArray = length(array(string()), 3, 3) + +// Now +const Name = size(string(), 1, 100) +const MyArray = size(array(string()), 3) +const Id = size(integer(), 1, Infinity) +const MySet = size(set(), 1, 9) +``` + +**The `StructType` inferring helper has been renamed to `Infer`.** This just makes it slightly easier to read what's going on when you're inferring a type. + +```ts +// Previously +type User = StructType + +// Now +type User = Infer +``` + +**The `error.type` property has been standardized.** Previously it was a human-readable description that sort of incorporated the schema. Now it is simple the plain lowercase name of the struct in question, making it something you can use programmatically when formatting errors. + +```ts +// Previously +'Array' +'[string,number]' +'Map' + +// Now +'array' +'tuple' +'map' +``` + +### `0.10.0` — June 6, 2020 + +The `0.10` version is a complete overhaul with the goal of making Superstruct much simpler and easier to understand, and with complete support for runtime type signatures TypeScript. + +This makes it much more powerful, however the core architecture has had to change to make it happen. It will still look very similar, but migrating between the versions _will be more work than usual_. There's no requirement to upgrade, although if you're using Superstruct in concert with TypeScript you will have a much better experience. + +###### BREAKING + +**All types are created from factories.** Previously depending on whether the type was a complex type or a scalar type they'd be defined different. Complex types used factories, whereas scalars used strings. Now all types are exposed as factories. + +For example, previously: + +```ts +import { struct } from 'superstruct' + +const User = struct.object({ + name: 'string', + age: 'number', +}) +``` + +Now becomes: + +```ts +import { object, string, number } from 'superstruct' + +const User = object({ + name: string(), + age: number(), +}) +``` + +**Custom scalars are no longer pre-defined as strings.** Previously, you would define all of your "custom" types in a single place in your codebase and then refer to them in structs later on with a string value. This worked, but added a layer of unnecessary indirection, and made it impossible to accomodate runtime type signatures. + +In the new version, custom types are defined extremely similarly to non-custom types. And this has the added benefit that you can easily trace the custom type definitions by just following `import` statements. + +Here's how it used to work: + +```ts +import { superstruct } from 'superstruct' +import isEmail from 'is-email' + +const struct = superstruct({ + types: { + email: isEmail, + }, +}) + +const Email = struct('email') +``` + +And here's what it would look like now: + +```ts +import { struct } from 'superstruct' +import isEmail from 'is-email' + +const Email = struct('email', isEmail) +``` + +**Validation logic has been moved to helper functions.** Previously the `assert` and `is` helpers lived on the struct objects themselves. Now, these functions have been extracted into separate helpers. This was unfortunately necessary to work around limitations in TypeScript's `asserts` keyword. + +For example, before: + +```ts +User.assert(data) +``` + +Now would be: + +```ts +import { assert } from 'superstruct' + +assert(data, User) +``` + +**Coercion is now separate from validation.** Previously there was native logic for handling default values for structs when validating them. This has been abstracted into the ability to define _any_ custom coercion logic for structs, and it has been separate from validation to make it very clear when data can change and when it cannot. + +For example, previously: + +```ts +const output = User.assert(input) +``` + +Would now be: + +```ts +const input = coerce(input, User) +``` + +The `coerce` step is the only time that data will be transformed at all by coercion logic, and the `assert` step no longer needs to return any values. This makes it easy to do things like: + +```ts +if (is(input, User)) { + // ... +} +``` + +**Validation context is now a dictionary of properties.** Previously when performing complex validation logic that was dependent on other properties on the root object, you could use the second `branch` argument to the validation function. This argument has been changed to be a `context` dictionary with more information. The same branch argument can now be accessed as `context.branch`, along with the new information. + +**Unknown properties of objects now have a `'never'` type.** Previously unknown properties would throw errors with `type === null`, however the newly introduced `'never'` type is now used instead. + +**Defaults are now defined with a separate coercion helper.** Previously all structs took a second argument that defined the default value to use if an `undefined` value was present. This has been pulled out into a separate helper now to clearly distinguish coercion logic. + +For example, previously you'd do: + +```ts +const Article = struct.object( + { + title: 'string', + }, + { + title: 'Untitled', + } +) +``` + +Whereas now you'd do: + +```ts +const Article = defaulted( + object({ + title: string(), + }), + { + title: 'Untitled', + } +) +``` + +**Optional arguments are now defined with a seperate factory.** Similarly to defaults, there is a new `optional` factory for defined values that can also be `undefined`. + +Previously you'd do: + +```ts +const Flag = struct('string?') +``` + +Now you'd do: + +```ts +const Flag = optional(string()) +``` + +**Several structs have been renamed.** This was necessary because structs are now exposed directly as variables, which runs afoul of reserved words. So the following renames have been applied: + +- `interface` -> `type` +- `enum` -> `enums` +- `function` -> `func` + +### `0.8.0` — October 8, 2019 + +###### BREAKING + +**Several structs have been renamed!** Superstruct tries to mimic established naming schemes whenever possible for its API, and TypeScript is one of our main comparisons. To make things easier for people, we've renamed a few structs to more closely match their TypeScript counterparts: + +- The `list` struct is now called `array`. +- The `partial` struct is now called `pick`. +- The `dict` struct is now called `record`. + +Hopefully this will make them easier to understand at a glance! + +**The `enums` struct has been removed!** This was special-cased in the API previously, but you can get the exact same behavior by creating an using the `array` and `enum` structs: + +```js +struct.array(struct.enum(['red', 'blue', 'green'])) +``` + +**The `any` struct has been removed! (Not the scalar though.)** Previously `struct.any()` was exposed that did the same thing as `struct()`, allowing you to use shorthands for common structs. But this was confusingly named because it has nothing to do with the `'any'` scalar type. And since it was redundant it has been removed. + +**The `interface` struct now returns the original, unaltered value!** In an effort to make things more familiar, the `interface` struct now always returns the object that it is called with when it passes validation. So if the object was a function, a function will be returned. This makes it match more closely with the idea of "structural typing" that TypeScript and other typing systems are based on. \_If you want the old behavior, use the `pick` struct. + +**Computed values function signatures have changed!** Previously a computed value would be called with a signature of `(value, root)` in some cases and `(value, parent)` in others. This was confusing, and the cause for the inconsistency was complex. This logic has been simplified, and now computed values are called with `(value, branch, path)` in all cases. + +```js +struct.dynamic((value, branch, path) => { + value === branch[branch.length - 1] // you can get the value... + const parent = branch[branch.length - 2] // ...and the parent... + const key = path[path.length - 1] // ...and the key... + value === parent[key] + const root = branch[0] // ...and the root! +}) +``` + +The `path` is an array of keys representing the nested value's location in the root value. And the `branch` is an array of all of the sub values along the path to get to the current one. This allows you to always be able to receive both the **parent** and the **root** values from any location—as well as any value in between. + +**The `error.errors` property has been renamed `error.failures`, and isn't cyclical.** It being cyclical caused lots of issues whenever an `StructError` object was attempted to be serialized. And the `errors` property was slightly confusing because the elements of the array weren't full error objects. The new structure is easier to understand and work with. + +**The `error.reason` property is no longer special-cased.** Previously you could return a "reason" string from validator functions and it would be added to error objects. However, now you must return an error properties object (with a `reason` property if you'd like), and all of the properties will be added to the error object. This makes Superstruct even more flexible as far as custom error details go. + +**The `type` property of structs have been rewritten to be more clear.** This is an implementation mostly, but the `struct.type` string which shows up in error messages have been tweaked to be slightly more clear exactly what type they are checking for. + +###### NEW + +**Superstruct is now written in TypeScript.** It was rewritten from the ground up to make use of types, and to have better inline documented if you use a TypeScript-compatible IDE. There are probably improvements that can be made, so if you'd like to contribute please do! + +**A new `partial` struct mimics TypeScript's `Partial` utility.** The new struct validates that its input partially matches an object defined as a set of properties with associated types. All of the properties of the object are optional. + +**A new `size` struct allows validating array and string lengths.** The new struct validates that its input has a certain size, by checking its `length` property. This works strings or arrays. + +**You can now provide a custom `Error` setting.** By passing in your own constructor when configuring Superstruct you can have complete control over the exact errors that are generated by structs that fail validation. + +### `0.7.0` — September 21, 2019 + +###### BREAKING + +- **The build process now outputs ES5 code.** Previously it was outputting ES6 code, which posed problems for some builders. This change shouldn't really affect anyone negatively, but it's being released as a breaking version just in case. + +--- + +### `0.6.0` — September 13, 2018 + +###### BREAKING + +- **Invalid `Date` objects are now considered invalid.** Previously using the built-in `'date'` validator would only check that the object was a `Date` instance, and not that it was a valid one. This has been fixed, and although it is technically a breaking change, most everyone would have expected this behavior to begin with. + +--- + +### `0.5.0` — December 21, 2017 + +###### BREAKING + +- **Validators must now return `true`, `false` or an error reason string.** Previously any truthy value would be considered valid. Now you can provide more information for the thrown errors by providing a string which will be attached as `error.reason`. However, this means that truthy string values now equate to invalid, not valid. + +- **Property validators now receive `data` as their second argument.** Previously you only had access to the property `value`, but now you also have access to the entire object's `data`. + +###### NEW + +- **Errors can now contain reason information.** Validator functions can now return string instead of a boolean, denoting the reason a value was invalid. This can then be used to create more helpful error messages. + +--- + +### `0.4.0` — December 1, 2017 + +###### BREAKING + +- **`object` structs are no longer optional-ish.** Previously object struct types would not throw if `undefined` was passed and no properties were required. This was not only confusing, but complex to maintain. Now if you want an object struct to be optional, use the `struct.optional(...)` helper. + +- **Removed the `Struct.default` method.** If you need to get the default value, use the `Struct.validate` or `Struct.assert` methods's return value instead. + +###### NEW + +- **Added the `dict`, `enum`, `intersection`, `union` and `tuple` structs.** These are all available as `struct.dict`, `struct.enum`, etc. + +--- + +### `0.3.0` — November 30, 2017 + +###### BREAKING + +- **The `validate()` method now returns `[ error, result ]`.** Previously it only had a single return value, which necessitated extra type checking to see if the value was an error or a result. Now you can just destructure the array to get either return value, for easier coding. + +- **Errors have been simplified, removing "codes".** Previously there were multiple types of errors that were thrown and you could differentiate between them with the `error.code` property. But the other properties of the error already let you infer the code, so having multiple types of errors made for a larger API surface without much benefit. + +--- + +### `0.2.0` — November 30, 2017 + +###### BREAKING + +- **Structs are now functions again.** :smile: They are built on the same underlying schema classes underneath though, since that helps the code structure. But to allow for the `struct = Struct({ ... })` syntax the structs themselves have changed to be function. + +###### NEW + +- **The basic case is now `Struct(data)`.** Previously you had to use `Struct.assert(data)`. Although the `assert` method (and others) are still there, the basic case is a bit terser and more similar to the struct-initializing APIs in other languages. + +--- + +### `0.1.0` — November 29, 2017 + +###### BREAKING + +- **Structs are now classes instead of functions.** This is better in terms of the API being a bit less magic-y. It's also useful so that we can add other helpful methods to structs besides the `assert` method. What was previously `struct(data)` is now `struct.assert(data)`. + +--- + +### `0.0.0` — November 24, 2017 + +:tada: diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..2a1ed03b --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License + +Copyright © 2024, Geoffrey Belcher + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 00000000..6629e9fc --- /dev/null +++ b/README.md @@ -0,0 +1,233 @@ +

+ +

+ +

+ A simple and composable way
+ to validate data in JavaScript (and TypeScript). +

+
+
+ +

+ Usage • + Why? • + Principles • + Demo • + Examples • + Documentation +

+ +

+ + + + + + + + + +

+ +
+
+ +Superstruct makes it easy to define interfaces and then validate JavaScript data against them. Its type annotation API was inspired by [Typescript](https://www.typescriptlang.org/docs/handbook/basic-types.html), [Flow](https://flow.org/en/docs/types/), [Go](https://gobyexample.com/structs), and [GraphQL](http://graphql.org/learn/schema/), giving it a familiar and easy to understand API. + +But Superstruct is designed for validating data at runtime, so it throws (or returns) detailed runtime errors for you or your end users. This is especially useful in situations like accepting arbitrary input in a REST or GraphQL API. But it can even be used to validate internal data structures at runtime when needed. + +
+ +### Usage + +Superstruct allows you to define the shape of data you want to validate: + +```js +import { assert, object, number, string, array } from 'superstruct' + +const Article = object({ + id: number(), + title: string(), + tags: array(string()), + author: object({ + id: number(), + }), +}) + +const data = { + id: 34, + title: 'Hello World', + tags: ['news', 'features'], + author: { + id: 1, + }, +} + +assert(data, Article) +// This will throw an error when the data is invalid. +// If you'd rather not throw, you can use `is()` or `validate()`. +``` + +Superstruct ships with validators for all the common JavaScript data types, and you can define custom ones too: + +```js +import { is, define, object, string } from 'superstruct' +import isUuid from 'is-uuid' +import isEmail from 'is-email' + +const Email = define('Email', isEmail) +const Uuid = define('Uuid', isUuid.v4) + +const User = object({ + id: Uuid, + email: Email, + name: string(), +}) + +const data = { + id: 'c8d63140-a1f7-45e0-bfc6-df72973fea86', + email: 'jane@example.com', + name: 'Jane', +} + +if (is(data, User)) { + // Your data is guaranteed to be valid in this block. +} +``` + +Superstruct can also handle coercion of your data before validating it, for example to mix in default values: + +```ts +import { create, object, number, string, defaulted } from 'superstruct' + +let i = 0 + +const User = object({ + id: defaulted(number(), () => i++), + name: string(), +}) + +const data = { + name: 'Jane', +} + +// You can apply the defaults to your data while validating. +const user = create(data, User) +// { +// id: 0, +// name: 'Jane', +// } +``` + +And if you use TypeScript, Superstruct automatically ensures that your data has proper typings whenever you validate it: + +```ts +import { is, object, number, string } from 'superstruct' + +const User = object({ + id: number(), + name: string() +}) + +const data: unknown = { ... } + +if (is(data, User)) { + // TypeScript knows the shape of `data` here, so it is safe to access + // properties like `data.id` and `data.name`. +} +``` + +Superstruct supports more complex use cases too like defining arrays or nested objects, composing structs inside each other, returning errors instead of throwing them, and more! For more information read the full [Documentation](#documentation). + +
+ +### Why? + +There are lots of existing validation libraries—[`joi`](https://github.com/hapijs/joi), [`express-validator`](https://github.com/ctavan/express-validator), [`validator.js`](https://github.com/chriso/validator.js), [`yup`](https://github.com/jquense/yup), [`ajv`](https://github.com/epoberezkin/ajv), [`is-my-json-valid`](https://github.com/mafintosh/is-my-json-valid)... But they exhibit many issues that lead to your codebase becoming hard to maintain... + +- **They don't expose detailed errors.** Many validators simply return string-only errors or booleans without any details as to why, making it difficult to customize the errors to be helpful for end-users. + +- **They make custom types hard.** Many validators ship with built-in types like emails, URLs, UUIDs, etc. with no way to know what they check for, and complicated APIs for defining new types. + +- **They don't encourage single sources of truth.** Many existing APIs encourage re-defining custom data types over and over, with the source of truth being spread out across your entire code base. + +- **They don't throw errors.** Many don't actually throw the errors, forcing you to wrap everywhere. Although helpful in the days of callbacks, not using `throw` in modern JavaScript makes code much more complex. + +- **They're tightly coupled to other concerns.** Many validators are tightly coupled to Express or other frameworks, which results in one-off, confusing code that isn't reusable across your code base. + +- **They use JSON Schema.** Don't get me wrong, JSON Schema _can_ be useful. But it's kind of like HATEOAS—it's usually way more complexity than you need and you aren't using any of its benefits. (Sorry, I said it.) + +Of course, not every validation library suffers from all of these issues, but most of them exhibit at least one. If you've run into this problem before, you might like Superstruct. + +Which brings me to how Superstruct solves these issues... + +
+ +### Principles + +1. **Customizable types.** Superstruct's power is in making it easy to define an entire set of custom data types that are specific to your application, and defined in a _single_ place, so you have full control over your requirements. + +2. **Unopinionated defaults.** Superstruct ships with native JavaScript types, and everything else is customizable, so you never have to fight to override decisions made by "core" that differ from your application's needs. + +3. **Composable interfaces.** Superstruct interfaces are composable, so you can break down commonly-repeated pieces of data into components, and compose them to build up the more complex objects. + +4. **Useful errors.** The errors that Superstruct throws contain all the information you need to convert them into your own application-specific errors easy, which means more helpful errors for your end users! + +5. **Familiar API.** The Superstruct API was heavily inspired by [Typescript](https://www.typescriptlang.org/docs/handbook/basic-types.html), [Flow](https://flow.org/en/docs/types/), [Go](https://gobyexample.com/structs), and [GraphQL](http://graphql.org/learn/schema/). If you're familiar with any of those, then its schema definition API will feel very natural to use, so you can get started quickly. + +
+ +### Demo + +Try out the [live demo on CodeSandbox](https://codesandbox.io/s/bold-water-s2cr8d?file=/index.js) to get an idea for how the API works, or to quickly verify your use case: + +[![Demo screenshot.](./docs/images/demo-screenshot.png)](https://codesandbox.io/s/bold-water-s2cr8d?file=/index.js) + +
+ +### Examples + +Superstruct's API is very flexible, allowing it to be used for a variety of use cases on your servers and in the browser. Here are a few examples of common patterns... + +- [Basic Validation](./examples/basic-validation.js) +- [Custom Types](./examples/custom-types.js) +- [Default Values](./examples/default-values.js) +- [Optional Values](./examples/optional-values.js) +- [Composing Structs](./examples/composing-structs.js) +- [Throwing Errors](./examples/throwing-errors.js) +- [Returning Errors](./examples/returning-errors.js) +- [Testing Values](./examples/testing-values.js) +- [Custom Errors](./examples/custom-errors.js) + +
+ +### Documentation + +Read the getting started guide to familiarize yourself with how Superstruct works. After that, check out the full API reference for more detailed information about structs, types and errors... + +- [**Guide**](https://docs.superstructjs.org/guides/01-getting-started) + - [Getting Started](https://docs.superstructjs.org/guides/01-getting-started) + - [Validating Data](https://docs.superstructjs.org/guides/02-validating-data) + - [Coercing Data](https://docs.superstructjs.org/guides/03-coercing-data) + - [Refining Validation](https://docs.superstructjs.org/guides/04-refining-validation) + - [Handling Errors](https://docs.superstructjs.org/guides/05-handling-errors) + - [Using TypeScript](https://docs.superstructjs.org/guides/06-using-typescript) +- [**Reference**](https://docs.superstructjs.org/api-reference/core) + - [Core](https://docs.superstructjs.org/api-reference/core) + - [Types](https://docs.superstructjs.org/api-reference/types) + - [Refinements](https://docs.superstructjs.org/api-reference/refinements) + - [Coercions](https://docs.superstructjs.org/api-reference/coercions) + - [Utilities](https://docs.superstructjs.org/api-reference/utilities) + - [Errors](https://docs.superstructjs.org/api-reference/errors) + - [TypeScript](https://docs.superstructjs.org/api-reference/typescript) +- [**FAQ**](https://docs.superstructjs.org/resources/faq) +- [**Resources**](https://docs.superstructjs.org/resources/links) + +[![Docs screenshot.](./docs/images/docs-screenshot.png)](https://docs.superstructjs.org) + +
+ +### License + +This package is [MIT-licensed](./License.md). From 15b0f6f53003161b8a98058ab0d8651ec5054a73 Mon Sep 17 00:00:00 2001 From: Geoffrey Belcher Date: Tue, 3 Dec 2024 12:57:13 -0330 Subject: [PATCH 08/11] Update test suite with scripts and such --- rename.sh | 15 +++ test/index.test.ts | 81 ------------- test/matchers.ts | 60 ++++++++++ transform.cjs | 293 +++++++++++++++++++++++++++++++++++++++++++++ vitest.config.ts | 5 + 5 files changed, 373 insertions(+), 81 deletions(-) create mode 100755 rename.sh delete mode 100644 test/index.test.ts create mode 100644 test/matchers.ts create mode 100644 transform.cjs create mode 100644 vitest.config.ts diff --git a/rename.sh b/rename.sh new file mode 100755 index 00000000..ac0c2444 --- /dev/null +++ b/rename.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Define the relative directory path +DIR="test/validation" + +# Find all .ts and .tsx files in the specified directory and rename them +find "$DIR" -type f \( -name "*.ts" -o -name "*.tsx" \) | while read -r file; do + # Construct the new file name with .test.ts extension + new_file="${file%.*}.test.ts" + + # Rename the file + mv "$file" "$new_file" + + echo "Renamed $file to $new_file" +done diff --git a/test/index.test.ts b/test/index.test.ts deleted file mode 100644 index bb990e2a..00000000 --- a/test/index.test.ts +++ /dev/null @@ -1,81 +0,0 @@ -import fs from 'fs' -import { pick } from 'lodash' -import { basename, extname, resolve } from 'path' -import { describe, expect, it } from 'vitest' -import { - assert as assertValue, - create as createValue, - StructError, -} from '../src' -describe('superstruct', () => { - describe('validation', () => { - const kindsDir = resolve(__dirname, 'validation') - const kinds = fs - .readdirSync(kindsDir) - .filter((t) => t[0] !== '.') - .map((t) => basename(t, extname(t))) - - for (const kind of kinds) { - describe(kind, async () => { - const testsDir = resolve(kindsDir, kind) - const tests = fs - .readdirSync(testsDir) - .filter((t) => t[0] !== '.') - .map((t) => basename(t, extname(t))) - - for (const name of tests) { - const module = await import(resolve(testsDir, name)) - const { Struct, data, create, only, skip, output, failures } = module - const run = only ? it.only : skip ? it.skip : it - run(name, () => { - let actual - let err - - try { - if (create) { - actual = createValue(data, Struct) - } else { - assertValue(data, Struct) - actual = data - } - } catch (e) { - if (!(e instanceof StructError)) { - throw e - } - - err = e - } - - if ('output' in module) { - if (err) { - throw new Error( - `Expected "${name}" fixture not to throw an error but it did:\n\n${err}` - ) - } - - expect(actual).toStrictEqual(output) - } else if ('failures' in module) { - if (!err) { - throw new Error( - `Expected "${name}" fixture to throw an error but it did not.` - ) - } - - const props = ['type', 'path', 'refinement', 'value', 'branch'] - const actualFailures = err - .failures() - .map((failure) => pick(failure, ...props)) - - expect(actualFailures).toStrictEqual(failures) - expect(pick(err, ...props)).toStrictEqual(failures[0]) - } else { - throw new Error( - `The "${name}" fixture did not define an \`output\` or \`failures\` export.` - ) - } - }) - } - }) - } - }) -}) diff --git a/test/matchers.ts b/test/matchers.ts new file mode 100644 index 00000000..3088c919 --- /dev/null +++ b/test/matchers.ts @@ -0,0 +1,60 @@ +import { isEqual, pick } from 'lodash' +import { expect } from 'vitest' +import { StructError } from '../src' + +const FILTERED_PROPS = ['type', 'path', 'refinement', 'value', 'branch'] + +expect.extend({ + toMatchStructError: (received: StructError | undefined, expected: any) => { + // Make sure the error exists + if (!(received instanceof StructError)) { + return { + message: () => `Expected error to be a StructError`, + pass: false, + actual: received, + expected, + } + } + + const actualFailures = received + .failures() + .map((failure) => pick(failure, ...FILTERED_PROPS)) + + // Check that the failures match + if (!isEqual(actualFailures, expected)) { + return { + message: () => `Expected error.failures to match expected`, + pass: false, + actual: actualFailures, + expected, + } + } + + const strippedError = pick(received, ...FILTERED_PROPS) + + // Check that the first failure properties are also the properties of the StructError + if (!isEqual(strippedError, expected[0])) { + return { + message: () => + `Expected error properties to match first expected failure`, + pass: false, + actual: strippedError, + expected, + } + } + + return { + message: () => `${received} matches ${expected}`, + pass: true, + } + }, +}) + +interface CustomMatchers { + toMatchStructError: (expected: any) => void +} + +declare module 'vitest' { + interface Assertion extends CustomMatchers {} + interface AsymmetricMatchersContaining extends CustomMatchers {} +} diff --git a/transform.cjs b/transform.cjs new file mode 100644 index 00000000..dde47149 --- /dev/null +++ b/transform.cjs @@ -0,0 +1,293 @@ +export default function transformer(file, api) { + const j = api.jscodeshift + const root = j(file.source) + + const variablesToFind = ['Struct', 'data', 'output', 'create', 'failures'] + + let assertOrCreate = 'assert' // Default to "assert" + let dataDeclaration = null + let structExpression = null + let failureValue = null + let createValue = null + let outputValue = null + + // Define import specifiers + const expectSpecifier = j.importSpecifier(j.identifier('expect')) + const itSpecifier = j.importSpecifier(j.identifier('test')) + const validateSpecifier = j.importSpecifier(j.identifier('validate')) + + // Define import declarations + const vitestImportDeclaration = j.importDeclaration( + [expectSpecifier, itSpecifier], + j.literal('vitest') + ) + + // Find existing import declarations + const existingImports = root.find(j.ImportDeclaration) + + // Handle import for vitest + const hasVitestImport = existingImports + .nodes() + .some( + (importDecl) => + importDecl.source.value === 'vitest' && + importDecl.specifiers.some( + (specifier) => + specifier.imported.name === 'expect' || + specifier.imported.name === 'test' + ) + ) + + if (!hasVitestImport) { + // Add the new import declaration for `vitest` to the top of the file + root.find(j.Program).get('body', 0).insertBefore(vitestImportDeclaration) + } + + // Handle import for "../../../src" + const srcImport = existingImports.find(j.ImportDeclaration, { + source: { value: '../../../src' }, + }) + + // Iterate over the identifiers to find the relevant ones + root.find(j.VariableDeclarator).forEach((path) => { + const name = path.node.id.name + + if (variablesToFind.includes(name)) { + if (name === 'create') { + createValue = path.node.init + if ( + createValue && + createValue.type === 'Literal' && + createValue.value === true + ) { + assertOrCreate = 'create' + } + } else if (name === 'data') { + // Save the entire data variable declaration + dataDeclaration = j.variableDeclaration('const', [ + j.variableDeclarator(path.node.id, path.node.init), + ]) + } else if (name === 'Struct') { + structExpression = path.node.init // Use the expression directly + } else if (name === 'failures') { + failureValue = path.node.init // Use the expression directly + } else if (name === 'output') { + outputValue = path.node.init // Use the expression directly + } + } + }) + + if (failureValue !== null) { + if (srcImport.length > 0) { + // Add `validate` to the existing import declaration + srcImport.forEach((importDecl) => { + if ( + !importDecl.node.specifiers.some( + (specifier) => specifier.imported.name === 'validate' + ) + ) { + importDecl.node.specifiers.push(validateSpecifier) + } + }) + } else { + // Optionally handle the case where the import statement does not exist + // Here you can choose to add a new import declaration for `validate` if needed + const newSrcImportDeclaration = j.importDeclaration( + [validateSpecifier], + j.literal('../../../src') + ) + // Add the new import declaration to the top of the file + root.find(j.Program).get('body', 0).insertBefore(newSrcImportDeclaration) + } + } else if (srcImport.length > 0) { + // Add `validate` to the existing import declaration + srcImport.forEach((importDecl) => { + if ( + !importDecl.node.specifiers.some( + (specifier) => specifier.imported.name === assertOrCreate + ) + ) { + importDecl.node.specifiers.push( + j.importSpecifier(j.identifier(assertOrCreate)) + ) + } + }) + } else { + // Optionally handle the case where the import statement does not exist + // Here you can choose to add a new import declaration for `validate` if needed + const newSrcImportDeclaration = j.importDeclaration( + [j.importSpecifier(j.identifier(assertOrCreate))], + j.literal('../../../src') + ) + // Add the new import declaration to the top of the file + root.find(j.Program).get('body', 0).insertBefore(newSrcImportDeclaration) + } + + // Remove the original data declaration from the root + if (dataDeclaration) { + root + .find(j.VariableDeclaration) + .filter((path) => + path.node.declarations.some((decl) => decl.id.name === 'data') + ) + .remove() + } + + // Remove the original Struct declaration from the root + if (createValue) { + root + .find(j.VariableDeclaration) + .filter((path) => + path.node.declarations.some((decl) => decl.id.name === 'create') + ) + .remove() + } + + // Remove the original Struct declaration from the root + if (structExpression) { + root + .find(j.VariableDeclaration) + .filter((path) => + path.node.declarations.some((decl) => decl.id.name === 'Struct') + ) + .remove() + } + + // Remove the original Struct declaration from the root + if (outputValue) { + root + .find(j.VariableDeclaration) + .filter((path) => + path.node.declarations.some((decl) => decl.id.name === 'output') + ) + .remove() + } + + // Remove the original Struct declaration from the root + if (failureValue) { + root + .find(j.VariableDeclaration) + .filter((path) => + path.node.declarations.some((decl) => decl.id.name === 'failures') + ) + .remove() + } + + // Remove empty export statements + root + .find(j.ExportNamedDeclaration) + .filter((path) => path.node.specifiers.length === 0) + .remove() + + const validateOptions = j.objectExpression([ + j.property('init', j.identifier('coerce'), j.literal(true)), + ]) + + // Convert the filename to the test name + const fileName = file.path + .replace(/.*\/|\.ts$/g, '') // Remove the path and file extension + .toLowerCase() + + const path = file.path.split('/') // Extract the folder name + const folderName = path[path.length - 2] + + const testName = fileName.toLowerCase().replace('-', ' ').split(' ') + + let finalTestName = [testName[0], folderName, ...testName.slice(1)].join(' ') + + finalTestName = finalTestName.charAt(0).toUpperCase() + finalTestName.slice(1) + + finalTestName = finalTestName.replace('-', ' ') + + const testFunction = j.callExpression(j.identifier('test'), [ + j.literal(finalTestName), + j.arrowFunctionExpression( + [], + failureValue !== null + ? j.blockStatement([ + dataDeclaration, + j.variableDeclaration('const', [ + j.variableDeclarator( + j.arrayPattern([j.identifier('err'), j.identifier('res')]), + j.callExpression( + j.identifier('validate'), + assertOrCreate === 'create' + ? [j.identifier('data'), structExpression, validateOptions] + : [j.identifier('data'), structExpression] + ) + ), + ]), + j.expressionStatement( + j.callExpression( + j.memberExpression( + j.callExpression(j.identifier('expect'), [ + j.identifier('res'), + ]), + j.identifier('toBeUndefined') + ), + [] + ) + ), + j.expressionStatement( + j.callExpression( + j.memberExpression( + j.callExpression(j.identifier('expect'), [ + j.identifier('err'), + ]), + j.identifier('toMatchStructError') + ), + [failureValue] + ) + ), + ]) + : assertOrCreate === 'create' + ? j.blockStatement([ + dataDeclaration, + j.variableDeclaration('const', [ + j.variableDeclarator( + j.identifier('res'), + j.callExpression(j.identifier(assertOrCreate), [ + j.identifier('data'), + structExpression, + ]) + ), + ]), + j.expressionStatement( + j.callExpression( + j.memberExpression( + j.callExpression(j.identifier('expect'), [ + j.identifier('res'), + ]), + j.identifier('toStrictEqual') + ), + [outputValue] + ) + ), + ]) + : j.blockStatement([ + dataDeclaration, + j.expressionStatement( + j.callExpression(j.identifier(assertOrCreate), [ + j.identifier('data'), + structExpression, + ]) + ), + j.expressionStatement( + j.callExpression( + j.memberExpression( + j.callExpression(j.identifier('expect'), [ + j.identifier('data'), + ]), + j.identifier('toStrictEqual') + ), + [outputValue] + ) + ), + ]) + ), + ]) + + root.get().node.program.body.push(j.expressionStatement(testFunction)) + + return root.toSource() +} diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 00000000..fa914d2b --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,5 @@ +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { setupFiles: ['test/matchers.ts'] }, +}) From 89d8fe5c57eac9138bc522d3ee4d7e69d566b40f Mon Sep 17 00:00:00 2001 From: Geoffrey Belcher Date: Tue, 3 Dec 2024 13:01:40 -0330 Subject: [PATCH 09/11] Ran codeshift and rename script --- test/validation/any/valid-number.test.ts | 9 ++++ test/validation/any/valid-number.ts | 7 --- test/validation/any/valid-string.test.ts | 9 ++++ test/validation/any/valid-string.ts | 7 --- test/validation/any/valid-undefined.test.ts | 9 ++++ test/validation/any/valid-undefined.ts | 7 --- .../array/invalid-element-property.test.ts | 19 +++++++ .../array/invalid-element-property.ts | 15 ------ test/validation/array/invalid-element.test.ts | 19 +++++++ test/validation/array/invalid-element.ts | 15 ------ test/validation/array/invalid-opaque.test.ts | 19 +++++++ test/validation/array/invalid-opaque.ts | 15 ------ test/validation/array/invalid.test.ts | 19 +++++++ test/validation/array/invalid.ts | 15 ------ test/validation/array/valid-frozen.test.ts | 9 ++++ test/validation/array/valid-frozen.ts | 9 ---- test/validation/array/valid-opaque.test.ts | 9 ++++ test/validation/array/valid-opaque.ts | 7 --- test/validation/array/valid.test.ts | 9 ++++ test/validation/array/valid.ts | 7 --- test/validation/assign/invalid-object.test.ts | 34 +++++++++++++ test/validation/assign/invalid-object.ts | 29 ----------- test/validation/assign/invalid-type.test.ts | 27 ++++++++++ test/validation/assign/invalid-type.ts | 22 --------- test/validation/assign/valid-object.test.ts | 20 ++++++++ test/validation/assign/valid-object.ts | 16 ------ test/validation/assign/valid-type.test.ts | 22 +++++++++ test/validation/assign/valid-type.ts | 18 ------- test/validation/bigint/invalid-number.test.ts | 19 +++++++ test/validation/bigint/invalid-number.ts | 15 ------ test/validation/bigint/invalid.test.ts | 19 +++++++ test/validation/bigint/invalid.ts | 15 ------ test/validation/bigint/valid.test.ts | 9 ++++ test/validation/bigint/valid.ts | 7 --- test/validation/boolean/invalid.test.ts | 19 +++++++ test/validation/boolean/invalid.ts | 15 ------ test/validation/boolean/valid.test.ts | 9 ++++ test/validation/boolean/valid.ts | 7 --- test/validation/coerce/changed.test.ts | 14 ++++++ test/validation/coerce/changed.ts | 11 ----- .../coerce/condition-not-met.test.ts | 27 ++++++++++ test/validation/coerce/condition-not-met.ts | 17 ------- test/validation/coerce/unchanged.test.ts | 14 ++++++ test/validation/coerce/unchanged.ts | 11 ----- test/validation/date/invalid-date.test.ts | 19 +++++++ test/validation/date/invalid-date.ts | 15 ------ test/validation/date/invalid.test.ts | 19 +++++++ test/validation/date/invalid.ts | 15 ------ test/validation/date/valid.test.ts | 9 ++++ test/validation/date/valid.ts | 7 --- test/validation/defaulted/function.test.ts | 12 +++++ test/validation/defaulted/function.ts | 9 ---- test/validation/defaulted/mixin.test.ts | 27 ++++++++++ test/validation/defaulted/mixin.ts | 22 --------- .../defaulted/nested-double.test.ts | 25 ++++++++++ test/validation/defaulted/nested-double.ts | 20 -------- test/validation/defaulted/nested.test.ts | 18 +++++++ test/validation/defaulted/nested.ts | 13 ----- test/validation/defaulted/strict.test.ts | 40 +++++++++++++++ test/validation/defaulted/strict.ts | 30 ------------ test/validation/defaulted/value.test.ts | 9 ++++ test/validation/defaulted/value.ts | 9 ---- .../deprecated/invalid-null.test.ts | 22 +++++++++ test/validation/deprecated/invalid-null.ts | 15 ------ .../deprecated/invalid-property.test.ts | 28 +++++++++++ .../validation/deprecated/invalid-property.ts | 19 ------- test/validation/deprecated/invalid.test.ts | 22 +++++++++ test/validation/deprecated/invalid.ts | 15 ------ .../deprecated/valid-property.test.ts | 21 ++++++++ test/validation/deprecated/valid-property.ts | 14 ------ .../deprecated/valid-undefined.test.ts | 12 +++++ test/validation/deprecated/valid-undefined.ts | 7 --- test/validation/deprecated/valid.test.ts | 12 +++++ test/validation/deprecated/valid.ts | 7 --- .../dynamic/invalid-reference.test.ts | 49 +++++++++++++++++++ test/validation/dynamic/invalid-reference.ts | 40 --------------- test/validation/dynamic/invalid.test.ts | 22 +++++++++ test/validation/dynamic/invalid.ts | 15 ------ .../dynamic/valid-reference.test.ts | 42 ++++++++++++++++ test/validation/dynamic/valid-reference.ts | 35 ------------- test/validation/dynamic/valid.test.ts | 12 +++++ test/validation/dynamic/valid.ts | 7 --- test/validation/dynamic/with-refiners.test.ts | 22 +++++++++ test/validation/dynamic/with-refiners.ts | 15 ------ test/validation/empty/invalid-array.test.ts | 19 +++++++ test/validation/empty/invalid-array.ts | 15 ------ test/validation/empty/invalid-map.test.ts | 19 +++++++ test/validation/empty/invalid-map.ts | 15 ------ test/validation/empty/invalid-set.test.ts | 19 +++++++ test/validation/empty/invalid-set.ts | 15 ------ test/validation/empty/invalid-string.test.ts | 19 +++++++ test/validation/empty/invalid-string.ts | 15 ------ test/validation/empty/valid-array.test.ts | 9 ++++ test/validation/empty/valid-array.ts | 7 --- test/validation/empty/valid-map.test.ts | 9 ++++ test/validation/empty/valid-map.ts | 7 --- test/validation/empty/valid-set.test.ts | 9 ++++ test/validation/empty/valid-set.ts | 7 --- test/validation/empty/valid-string.test.ts | 9 ++++ test/validation/empty/valid-string.ts | 7 --- test/validation/enums/invalid-numbers.test.ts | 19 +++++++ test/validation/enums/invalid-numbers.ts | 15 ------ test/validation/enums/invalid-strings.test.ts | 19 +++++++ test/validation/enums/invalid-strings.ts | 15 ------ test/validation/enums/valid.test.ts | 9 ++++ test/validation/enums/valid.ts | 7 --- test/validation/function/invalid.test.ts | 19 +++++++ test/validation/function/invalid.ts | 15 ------ test/validation/function/valid.test.ts | 9 ++++ test/validation/function/valid.ts | 7 --- test/validation/instance/invalid.test.ts | 19 +++++++ test/validation/instance/invalid.ts | 15 ------ test/validation/instance/valid.test.ts | 9 ++++ test/validation/instance/valid.ts | 7 --- .../integer/invalid-decimal.test.ts | 19 +++++++ test/validation/integer/invalid-decimal.ts | 15 ------ test/validation/integer/invalid.test.ts | 19 +++++++ test/validation/integer/invalid.ts | 15 ------ test/validation/integer/valid.test.ts | 9 ++++ test/validation/integer/valid.ts | 7 --- .../intersection/invalid-refinement.test.ts | 22 +++++++++ .../intersection/invalid-refinement.ts | 18 ------- test/validation/intersection/invalid.test.ts | 26 ++++++++++ test/validation/intersection/invalid.ts | 21 -------- .../intersection/valid-refinement.test.ts | 12 +++++ .../intersection/valid-refinement.ts | 10 ---- test/validation/intersection/valid.test.ts | 20 ++++++++ test/validation/intersection/valid.ts | 16 ------ test/validation/lazy/invalid.test.ts | 22 +++++++++ test/validation/lazy/invalid.ts | 15 ------ test/validation/lazy/valid.test.ts | 12 +++++ test/validation/lazy/valid.ts | 7 --- test/validation/lazy/with-refiners.test.ts | 22 +++++++++ test/validation/lazy/with-refiners.ts | 15 ------ test/validation/literal/invalid.test.ts | 19 +++++++ test/validation/literal/invalid.ts | 15 ------ test/validation/literal/valid.test.ts | 9 ++++ test/validation/literal/valid.ts | 7 --- test/validation/map/invalid-opaque.test.ts | 19 +++++++ test/validation/map/invalid-opaque.ts | 15 ------ test/validation/map/invalid-property.test.ts | 30 ++++++++++++ test/validation/map/invalid-property.ts | 25 ---------- test/validation/map/invalid.test.ts | 19 +++++++ test/validation/map/invalid.ts | 15 ------ .../{valid-opaque.ts => valid-opaque.test.ts} | 0 test/validation/map/valid.test.ts | 19 +++++++ test/validation/map/valid.ts | 13 ----- test/validation/max/invalid-exclusive.test.ts | 19 +++++++ test/validation/max/invalid-exclusive.ts | 15 ------ test/validation/max/invalid.test.ts | 19 +++++++ test/validation/max/invalid.ts | 15 ------ test/validation/max/valid-inclusive.test.ts | 9 ++++ test/validation/max/valid-inclusive.ts | 7 --- test/validation/max/valid.test.ts | 9 ++++ test/validation/max/valid.ts | 7 --- test/validation/min/invalid-exclusive.test.ts | 19 +++++++ test/validation/min/invalid-exclusive.ts | 15 ------ test/validation/min/invalid.test.ts | 19 +++++++ test/validation/min/invalid.ts | 15 ------ test/validation/min/valid-inclusive.test.ts | 9 ++++ test/validation/min/valid-inclusive.ts | 7 --- test/validation/min/valid.test.ts | 9 ++++ test/validation/min/valid.ts | 7 --- test/validation/never/invalid.test.ts | 19 +++++++ test/validation/never/invalid.ts | 15 ------ test/validation/nullable/invalid.test.ts | 19 +++++++ test/validation/nullable/invalid.ts | 15 ------ .../nullable/valid-defined-nested.test.ts | 23 +++++++++ .../nullable/valid-defined-nested.ts | 16 ------ .../validation/nullable/valid-defined.test.ts | 9 ++++ test/validation/nullable/valid-defined.ts | 7 --- .../nullable/valid-null-nested.test.ts | 23 +++++++++ test/validation/nullable/valid-null-nested.ts | 16 ------ test/validation/nullable/valid-null.test.ts | 9 ++++ test/validation/nullable/valid-null.ts | 7 --- test/validation/number/invalid.test.ts | 19 +++++++ test/validation/number/invalid.ts | 15 ------ test/validation/number/valid.test.ts | 9 ++++ test/validation/number/valid.ts | 7 --- test/validation/object/invalid-array.test.ts | 19 +++++++ test/validation/object/invalid-array.ts | 15 ------ .../object/invalid-element-nested.test.ts | 30 ++++++++++++ .../object/invalid-element-nested.ts | 21 -------- test/validation/object/invalid-opaque.test.ts | 19 +++++++ test/validation/object/invalid-opaque.ts | 15 ------ .../object/invalid-property-nested.test.ts | 36 ++++++++++++++ .../object/invalid-property-nested.ts | 27 ---------- .../object/invalid-property-unknown.test.ts | 31 ++++++++++++ .../object/invalid-property-unknown.ts | 22 --------- .../object/invalid-property.test.ts | 39 +++++++++++++++ test/validation/object/invalid-property.ts | 30 ------------ .../object/invalid-referential.test.ts | 36 ++++++++++++++ test/validation/object/invalid-referential.ts | 27 ---------- test/validation/object/invalid.test.ts | 27 ++++++++++ test/validation/object/invalid.ts | 18 ------- test/validation/object/valid-frozen.test.ts | 23 +++++++++ test/validation/object/valid-frozen.ts | 18 ------- test/validation/object/valid-nested.test.ts | 32 ++++++++++++ test/validation/object/valid-nested.ts | 25 ---------- test/validation/object/valid-opaque.test.ts | 17 +++++++ test/validation/object/valid-opaque.ts | 13 ----- .../object/valid-referential.test.ts | 29 +++++++++++ test/validation/object/valid-referential.ts | 22 --------- test/validation/object/valid.test.ts | 23 +++++++++ test/validation/object/valid.ts | 16 ------ .../omit/invalid-element-nested.test.ts | 32 ++++++++++++ .../validation/omit/invalid-element-nested.ts | 23 --------- .../omit/invalid-property-nested.test.ts | 38 ++++++++++++++ .../omit/invalid-property-nested.ts | 29 ----------- .../omit/invalid-property-unknown.test.ts | 33 +++++++++++++ .../omit/invalid-property-unknown.ts | 24 --------- test/validation/omit/invalid-property.test.ts | 32 ++++++++++++ test/validation/omit/invalid-property.ts | 23 --------- test/validation/omit/invalid.test.ts | 30 ++++++++++++ test/validation/omit/invalid.ts | 21 -------- test/validation/omit/valid-nested.test.ts | 33 +++++++++++++ test/validation/omit/valid-nested.ts | 26 ---------- test/validation/omit/valid-type.test.ts | 26 ++++++++++ test/validation/omit/valid-type.ts | 19 ------- test/validation/omit/valid.test.ts | 24 +++++++++ test/validation/omit/valid.ts | 17 ------- test/validation/optional/invalid.test.ts | 19 +++++++ test/validation/optional/invalid.ts | 15 ------ .../optional/valid-defined-nested.test.ts | 23 +++++++++ .../optional/valid-defined-nested.ts | 16 ------ .../validation/optional/valid-defined.test.ts | 9 ++++ test/validation/optional/valid-defined.ts | 7 --- .../optional/valid-undefined-nested.test.ts | 21 ++++++++ .../optional/valid-undefined-nested.ts | 14 ------ .../optional/valid-undefined.test.ts | 9 ++++ test/validation/optional/valid-undefined.ts | 7 --- test/validation/partial/composed.test.ts | 23 +++++++++ test/validation/partial/composed.ts | 16 ------ .../partial/invalid-property-unknown.test.ts | 30 ++++++++++++ .../partial/invalid-property-unknown.ts | 21 -------- .../partial/invalid-property.test.ts | 29 +++++++++++ test/validation/partial/invalid-property.ts | 20 -------- test/validation/partial/invalid.test.ts | 27 ++++++++++ test/validation/partial/invalid.ts | 18 ------- test/validation/partial/valid-empty.test.ts | 17 +++++++ test/validation/partial/valid-empty.ts | 10 ---- test/validation/partial/valid-full.test.ts | 23 +++++++++ test/validation/partial/valid-full.ts | 16 ------ test/validation/partial/valid-partial.test.ts | 21 ++++++++ test/validation/partial/valid-partial.ts | 14 ------ test/validation/partial/valid-type.test.ts | 25 ++++++++++ test/validation/partial/valid-type.ts | 18 ------- test/validation/pattern/invalid.test.ts | 19 +++++++ test/validation/pattern/invalid.ts | 15 ------ test/validation/pattern/valid.test.ts | 9 ++++ test/validation/pattern/valid.ts | 7 --- .../pick/invalid-element-nested.test.ts | 32 ++++++++++++ .../validation/pick/invalid-element-nested.ts | 23 --------- .../pick/invalid-property-nested.test.ts | 38 ++++++++++++++ .../pick/invalid-property-nested.ts | 29 ----------- .../pick/invalid-property-unknown.test.ts | 33 +++++++++++++ .../pick/invalid-property-unknown.ts | 24 --------- test/validation/pick/invalid-property.test.ts | 32 ++++++++++++ test/validation/pick/invalid-property.ts | 23 --------- test/validation/pick/invalid.test.ts | 30 ++++++++++++ test/validation/pick/invalid.ts | 21 -------- test/validation/pick/valid-nested.test.ts | 33 +++++++++++++ test/validation/pick/valid-nested.ts | 26 ---------- test/validation/pick/valid-type.test.ts | 26 ++++++++++ test/validation/pick/valid-type.ts | 19 ------- test/validation/pick/valid.test.ts | 24 +++++++++ test/validation/pick/valid.ts | 17 ------- test/validation/record/invalid-array.test.ts | 19 +++++++ test/validation/record/invalid-array.ts | 15 ------ .../record/invalid-property.test.ts | 30 ++++++++++++ test/validation/record/invalid-property.ts | 25 ---------- test/validation/record/invalid.test.ts | 19 +++++++ test/validation/record/invalid.ts | 15 ------ test/validation/record/valid-frozen.test.ts | 17 +++++++ test/validation/record/valid-frozen.ts | 15 ------ test/validation/record/valid.test.ts | 17 +++++++ test/validation/record/valid.ts | 13 ----- .../invalid-multiple-refinements.test.ts | 46 +++++++++++++++++ .../refine/invalid-multiple-refinements.ts | 41 ---------------- .../refine/invalid-shorthand.test.ts | 24 +++++++++ test/validation/refine/invalid-shorthand.ts | 19 ------- test/validation/refine/invalid.test.ts | 22 +++++++++ test/validation/refine/invalid.ts | 15 ------ test/validation/refine/valid.test.ts | 12 +++++ test/validation/refine/valid.ts | 7 --- test/validation/regexp/invalid.test.ts | 19 +++++++ test/validation/regexp/invalid.ts | 15 ------ test/validation/regexp/valid.test.ts | 9 ++++ test/validation/regexp/valid.ts | 7 --- test/validation/set/invalid-element.test.ts | 19 +++++++ test/validation/set/invalid-element.ts | 15 ------ test/validation/set/invalid-opaque.test.ts | 19 +++++++ test/validation/set/invalid-opaque.ts | 15 ------ test/validation/set/invalid.test.ts | 19 +++++++ test/validation/set/invalid.ts | 15 ------ test/validation/set/valid-opaque.test.ts | 9 ++++ test/validation/set/valid-opaque.ts | 7 --- test/validation/set/valid.test.ts | 9 ++++ test/validation/set/valid.ts | 7 --- test/validation/size/invalid-array.test.ts | 19 +++++++ test/validation/size/invalid-array.ts | 15 ------ test/validation/size/invalid-map.test.ts | 19 +++++++ test/validation/size/invalid-map.ts | 15 ------ test/validation/size/invalid-number.test.ts | 19 +++++++ test/validation/size/invalid-number.ts | 15 ------ test/validation/size/invalid-set.test.ts | 19 +++++++ test/validation/size/invalid-set.ts | 15 ------ test/validation/size/invalid-string.test.ts | 19 +++++++ test/validation/size/invalid-string.ts | 15 ------ test/validation/size/valid-array.test.ts | 9 ++++ test/validation/size/valid-array.ts | 7 --- test/validation/size/valid-exact.test.ts | 9 ++++ test/validation/size/valid-exact.ts | 7 --- test/validation/size/valid-map.test.ts | 14 ++++++ test/validation/size/valid-map.ts | 11 ----- .../size/valid-max-inclusive.test.ts | 9 ++++ test/validation/size/valid-max-inclusive.ts | 7 --- .../size/valid-min-inclusive.test.ts | 9 ++++ test/validation/size/valid-min-inclusive.ts | 7 --- test/validation/size/valid-number.test.ts | 9 ++++ test/validation/size/valid-number.ts | 7 --- test/validation/size/valid-set.test.ts | 9 ++++ test/validation/size/valid-set.ts | 7 --- test/validation/size/valid-string.test.ts | 9 ++++ test/validation/size/valid-string.ts | 7 --- test/validation/string/invalid.test.ts | 19 +++++++ test/validation/string/invalid.ts | 15 ------ test/validation/string/valid.test.ts | 9 ++++ test/validation/string/valid.ts | 7 --- test/validation/trimmed/invalid.test.ts | 23 +++++++++ test/validation/trimmed/invalid.ts | 17 ------- test/validation/trimmed/valid.test.ts | 9 ++++ test/validation/trimmed/valid.ts | 9 ---- .../tuple/invalid-element-missing.test.ts | 19 +++++++ .../tuple/invalid-element-missing.ts | 15 ------ .../tuple/invalid-element-unknown.test.ts | 19 +++++++ .../tuple/invalid-element-unknown.ts | 15 ------ test/validation/tuple/invalid-element.test.ts | 19 +++++++ test/validation/tuple/invalid-element.ts | 15 ------ test/validation/tuple/invalid.test.ts | 19 +++++++ test/validation/tuple/invalid.ts | 15 ------ test/validation/tuple/valid-frozen.test.ts | 9 ++++ test/validation/tuple/valid-frozen.ts | 9 ---- test/validation/tuple/valid.test.ts | 9 ++++ test/validation/tuple/valid.ts | 7 --- test/validation/type/invalid-array.test.ts | 19 +++++++ test/validation/type/invalid-array.ts | 15 ------ .../type/invalid-property-nested.test.ts | 32 ++++++++++++ .../type/invalid-property-nested.ts | 23 --------- test/validation/type/invalid-property.test.ts | 30 ++++++++++++ test/validation/type/invalid-property.ts | 21 -------- test/validation/type/invalid.test.ts | 27 ++++++++++ test/validation/type/invalid.ts | 18 ------- test/validation/type/valid-frozen.test.ts | 23 +++++++++ test/validation/type/valid-frozen.ts | 18 ------- ...lid-instance.ts => valid-instance.test.ts} | 0 test/validation/type/valid.test.ts | 20 ++++++++ test/validation/type/valid.ts | 13 ----- test/validation/union/coercion-object.test.ts | 12 +++++ test/validation/union/coercion-object.ts | 12 ----- test/validation/union/coercion-type.test.ts | 12 +++++ test/validation/union/coercion-type.ts | 12 ----- test/validation/union/coercion.test.ts | 12 +++++ test/validation/union/coercion.ts | 12 ----- test/validation/union/invalid.test.ts | 39 +++++++++++++++ test/validation/union/invalid.ts | 34 ------------- test/validation/union/valid.test.ts | 18 +++++++ test/validation/union/valid.ts | 14 ------ test/validation/unknown/valid-number.test.ts | 9 ++++ test/validation/unknown/valid-number.ts | 7 --- test/validation/unknown/valid-string.test.ts | 9 ++++ test/validation/unknown/valid-string.ts | 7 --- .../unknown/valid-undefined.test.ts | 9 ++++ test/validation/unknown/valid-undefined.ts | 7 --- 374 files changed, 3627 insertions(+), 2765 deletions(-) create mode 100644 test/validation/any/valid-number.test.ts delete mode 100644 test/validation/any/valid-number.ts create mode 100644 test/validation/any/valid-string.test.ts delete mode 100644 test/validation/any/valid-string.ts create mode 100644 test/validation/any/valid-undefined.test.ts delete mode 100644 test/validation/any/valid-undefined.ts create mode 100644 test/validation/array/invalid-element-property.test.ts delete mode 100644 test/validation/array/invalid-element-property.ts create mode 100644 test/validation/array/invalid-element.test.ts delete mode 100644 test/validation/array/invalid-element.ts create mode 100644 test/validation/array/invalid-opaque.test.ts delete mode 100644 test/validation/array/invalid-opaque.ts create mode 100644 test/validation/array/invalid.test.ts delete mode 100644 test/validation/array/invalid.ts create mode 100644 test/validation/array/valid-frozen.test.ts delete mode 100644 test/validation/array/valid-frozen.ts create mode 100644 test/validation/array/valid-opaque.test.ts delete mode 100644 test/validation/array/valid-opaque.ts create mode 100644 test/validation/array/valid.test.ts delete mode 100644 test/validation/array/valid.ts create mode 100644 test/validation/assign/invalid-object.test.ts delete mode 100644 test/validation/assign/invalid-object.ts create mode 100644 test/validation/assign/invalid-type.test.ts delete mode 100644 test/validation/assign/invalid-type.ts create mode 100644 test/validation/assign/valid-object.test.ts delete mode 100644 test/validation/assign/valid-object.ts create mode 100644 test/validation/assign/valid-type.test.ts delete mode 100644 test/validation/assign/valid-type.ts create mode 100644 test/validation/bigint/invalid-number.test.ts delete mode 100644 test/validation/bigint/invalid-number.ts create mode 100644 test/validation/bigint/invalid.test.ts delete mode 100644 test/validation/bigint/invalid.ts create mode 100644 test/validation/bigint/valid.test.ts delete mode 100644 test/validation/bigint/valid.ts create mode 100644 test/validation/boolean/invalid.test.ts delete mode 100644 test/validation/boolean/invalid.ts create mode 100644 test/validation/boolean/valid.test.ts delete mode 100644 test/validation/boolean/valid.ts create mode 100644 test/validation/coerce/changed.test.ts delete mode 100644 test/validation/coerce/changed.ts create mode 100644 test/validation/coerce/condition-not-met.test.ts delete mode 100644 test/validation/coerce/condition-not-met.ts create mode 100644 test/validation/coerce/unchanged.test.ts delete mode 100644 test/validation/coerce/unchanged.ts create mode 100644 test/validation/date/invalid-date.test.ts delete mode 100644 test/validation/date/invalid-date.ts create mode 100644 test/validation/date/invalid.test.ts delete mode 100644 test/validation/date/invalid.ts create mode 100644 test/validation/date/valid.test.ts delete mode 100644 test/validation/date/valid.ts create mode 100644 test/validation/defaulted/function.test.ts delete mode 100644 test/validation/defaulted/function.ts create mode 100644 test/validation/defaulted/mixin.test.ts delete mode 100644 test/validation/defaulted/mixin.ts create mode 100644 test/validation/defaulted/nested-double.test.ts delete mode 100644 test/validation/defaulted/nested-double.ts create mode 100644 test/validation/defaulted/nested.test.ts delete mode 100644 test/validation/defaulted/nested.ts create mode 100644 test/validation/defaulted/strict.test.ts delete mode 100644 test/validation/defaulted/strict.ts create mode 100644 test/validation/defaulted/value.test.ts delete mode 100644 test/validation/defaulted/value.ts create mode 100644 test/validation/deprecated/invalid-null.test.ts delete mode 100644 test/validation/deprecated/invalid-null.ts create mode 100644 test/validation/deprecated/invalid-property.test.ts delete mode 100644 test/validation/deprecated/invalid-property.ts create mode 100644 test/validation/deprecated/invalid.test.ts delete mode 100644 test/validation/deprecated/invalid.ts create mode 100644 test/validation/deprecated/valid-property.test.ts delete mode 100644 test/validation/deprecated/valid-property.ts create mode 100644 test/validation/deprecated/valid-undefined.test.ts delete mode 100644 test/validation/deprecated/valid-undefined.ts create mode 100644 test/validation/deprecated/valid.test.ts delete mode 100644 test/validation/deprecated/valid.ts create mode 100644 test/validation/dynamic/invalid-reference.test.ts delete mode 100644 test/validation/dynamic/invalid-reference.ts create mode 100644 test/validation/dynamic/invalid.test.ts delete mode 100644 test/validation/dynamic/invalid.ts create mode 100644 test/validation/dynamic/valid-reference.test.ts delete mode 100644 test/validation/dynamic/valid-reference.ts create mode 100644 test/validation/dynamic/valid.test.ts delete mode 100644 test/validation/dynamic/valid.ts create mode 100644 test/validation/dynamic/with-refiners.test.ts delete mode 100644 test/validation/dynamic/with-refiners.ts create mode 100644 test/validation/empty/invalid-array.test.ts delete mode 100644 test/validation/empty/invalid-array.ts create mode 100644 test/validation/empty/invalid-map.test.ts delete mode 100644 test/validation/empty/invalid-map.ts create mode 100644 test/validation/empty/invalid-set.test.ts delete mode 100644 test/validation/empty/invalid-set.ts create mode 100644 test/validation/empty/invalid-string.test.ts delete mode 100644 test/validation/empty/invalid-string.ts create mode 100644 test/validation/empty/valid-array.test.ts delete mode 100644 test/validation/empty/valid-array.ts create mode 100644 test/validation/empty/valid-map.test.ts delete mode 100644 test/validation/empty/valid-map.ts create mode 100644 test/validation/empty/valid-set.test.ts delete mode 100644 test/validation/empty/valid-set.ts create mode 100644 test/validation/empty/valid-string.test.ts delete mode 100644 test/validation/empty/valid-string.ts create mode 100644 test/validation/enums/invalid-numbers.test.ts delete mode 100644 test/validation/enums/invalid-numbers.ts create mode 100644 test/validation/enums/invalid-strings.test.ts delete mode 100644 test/validation/enums/invalid-strings.ts create mode 100644 test/validation/enums/valid.test.ts delete mode 100644 test/validation/enums/valid.ts create mode 100644 test/validation/function/invalid.test.ts delete mode 100644 test/validation/function/invalid.ts create mode 100644 test/validation/function/valid.test.ts delete mode 100644 test/validation/function/valid.ts create mode 100644 test/validation/instance/invalid.test.ts delete mode 100644 test/validation/instance/invalid.ts create mode 100644 test/validation/instance/valid.test.ts delete mode 100644 test/validation/instance/valid.ts create mode 100644 test/validation/integer/invalid-decimal.test.ts delete mode 100644 test/validation/integer/invalid-decimal.ts create mode 100644 test/validation/integer/invalid.test.ts delete mode 100644 test/validation/integer/invalid.ts create mode 100644 test/validation/integer/valid.test.ts delete mode 100644 test/validation/integer/valid.ts create mode 100644 test/validation/intersection/invalid-refinement.test.ts delete mode 100644 test/validation/intersection/invalid-refinement.ts create mode 100644 test/validation/intersection/invalid.test.ts delete mode 100644 test/validation/intersection/invalid.ts create mode 100644 test/validation/intersection/valid-refinement.test.ts delete mode 100644 test/validation/intersection/valid-refinement.ts create mode 100644 test/validation/intersection/valid.test.ts delete mode 100644 test/validation/intersection/valid.ts create mode 100644 test/validation/lazy/invalid.test.ts delete mode 100644 test/validation/lazy/invalid.ts create mode 100644 test/validation/lazy/valid.test.ts delete mode 100644 test/validation/lazy/valid.ts create mode 100644 test/validation/lazy/with-refiners.test.ts delete mode 100644 test/validation/lazy/with-refiners.ts create mode 100644 test/validation/literal/invalid.test.ts delete mode 100644 test/validation/literal/invalid.ts create mode 100644 test/validation/literal/valid.test.ts delete mode 100644 test/validation/literal/valid.ts create mode 100644 test/validation/map/invalid-opaque.test.ts delete mode 100644 test/validation/map/invalid-opaque.ts create mode 100644 test/validation/map/invalid-property.test.ts delete mode 100644 test/validation/map/invalid-property.ts create mode 100644 test/validation/map/invalid.test.ts delete mode 100644 test/validation/map/invalid.ts rename test/validation/map/{valid-opaque.ts => valid-opaque.test.ts} (100%) create mode 100644 test/validation/map/valid.test.ts delete mode 100644 test/validation/map/valid.ts create mode 100644 test/validation/max/invalid-exclusive.test.ts delete mode 100644 test/validation/max/invalid-exclusive.ts create mode 100644 test/validation/max/invalid.test.ts delete mode 100644 test/validation/max/invalid.ts create mode 100644 test/validation/max/valid-inclusive.test.ts delete mode 100644 test/validation/max/valid-inclusive.ts create mode 100644 test/validation/max/valid.test.ts delete mode 100644 test/validation/max/valid.ts create mode 100644 test/validation/min/invalid-exclusive.test.ts delete mode 100644 test/validation/min/invalid-exclusive.ts create mode 100644 test/validation/min/invalid.test.ts delete mode 100644 test/validation/min/invalid.ts create mode 100644 test/validation/min/valid-inclusive.test.ts delete mode 100644 test/validation/min/valid-inclusive.ts create mode 100644 test/validation/min/valid.test.ts delete mode 100644 test/validation/min/valid.ts create mode 100644 test/validation/never/invalid.test.ts delete mode 100644 test/validation/never/invalid.ts create mode 100644 test/validation/nullable/invalid.test.ts delete mode 100644 test/validation/nullable/invalid.ts create mode 100644 test/validation/nullable/valid-defined-nested.test.ts delete mode 100644 test/validation/nullable/valid-defined-nested.ts create mode 100644 test/validation/nullable/valid-defined.test.ts delete mode 100644 test/validation/nullable/valid-defined.ts create mode 100644 test/validation/nullable/valid-null-nested.test.ts delete mode 100644 test/validation/nullable/valid-null-nested.ts create mode 100644 test/validation/nullable/valid-null.test.ts delete mode 100644 test/validation/nullable/valid-null.ts create mode 100644 test/validation/number/invalid.test.ts delete mode 100644 test/validation/number/invalid.ts create mode 100644 test/validation/number/valid.test.ts delete mode 100644 test/validation/number/valid.ts create mode 100644 test/validation/object/invalid-array.test.ts delete mode 100644 test/validation/object/invalid-array.ts create mode 100644 test/validation/object/invalid-element-nested.test.ts delete mode 100644 test/validation/object/invalid-element-nested.ts create mode 100644 test/validation/object/invalid-opaque.test.ts delete mode 100644 test/validation/object/invalid-opaque.ts create mode 100644 test/validation/object/invalid-property-nested.test.ts delete mode 100644 test/validation/object/invalid-property-nested.ts create mode 100644 test/validation/object/invalid-property-unknown.test.ts delete mode 100644 test/validation/object/invalid-property-unknown.ts create mode 100644 test/validation/object/invalid-property.test.ts delete mode 100644 test/validation/object/invalid-property.ts create mode 100644 test/validation/object/invalid-referential.test.ts delete mode 100644 test/validation/object/invalid-referential.ts create mode 100644 test/validation/object/invalid.test.ts delete mode 100644 test/validation/object/invalid.ts create mode 100644 test/validation/object/valid-frozen.test.ts delete mode 100644 test/validation/object/valid-frozen.ts create mode 100644 test/validation/object/valid-nested.test.ts delete mode 100644 test/validation/object/valid-nested.ts create mode 100644 test/validation/object/valid-opaque.test.ts delete mode 100644 test/validation/object/valid-opaque.ts create mode 100644 test/validation/object/valid-referential.test.ts delete mode 100644 test/validation/object/valid-referential.ts create mode 100644 test/validation/object/valid.test.ts delete mode 100644 test/validation/object/valid.ts create mode 100644 test/validation/omit/invalid-element-nested.test.ts delete mode 100644 test/validation/omit/invalid-element-nested.ts create mode 100644 test/validation/omit/invalid-property-nested.test.ts delete mode 100644 test/validation/omit/invalid-property-nested.ts create mode 100644 test/validation/omit/invalid-property-unknown.test.ts delete mode 100644 test/validation/omit/invalid-property-unknown.ts create mode 100644 test/validation/omit/invalid-property.test.ts delete mode 100644 test/validation/omit/invalid-property.ts create mode 100644 test/validation/omit/invalid.test.ts delete mode 100644 test/validation/omit/invalid.ts create mode 100644 test/validation/omit/valid-nested.test.ts delete mode 100644 test/validation/omit/valid-nested.ts create mode 100644 test/validation/omit/valid-type.test.ts delete mode 100644 test/validation/omit/valid-type.ts create mode 100644 test/validation/omit/valid.test.ts delete mode 100644 test/validation/omit/valid.ts create mode 100644 test/validation/optional/invalid.test.ts delete mode 100644 test/validation/optional/invalid.ts create mode 100644 test/validation/optional/valid-defined-nested.test.ts delete mode 100644 test/validation/optional/valid-defined-nested.ts create mode 100644 test/validation/optional/valid-defined.test.ts delete mode 100644 test/validation/optional/valid-defined.ts create mode 100644 test/validation/optional/valid-undefined-nested.test.ts delete mode 100644 test/validation/optional/valid-undefined-nested.ts create mode 100644 test/validation/optional/valid-undefined.test.ts delete mode 100644 test/validation/optional/valid-undefined.ts create mode 100644 test/validation/partial/composed.test.ts delete mode 100644 test/validation/partial/composed.ts create mode 100644 test/validation/partial/invalid-property-unknown.test.ts delete mode 100644 test/validation/partial/invalid-property-unknown.ts create mode 100644 test/validation/partial/invalid-property.test.ts delete mode 100644 test/validation/partial/invalid-property.ts create mode 100644 test/validation/partial/invalid.test.ts delete mode 100644 test/validation/partial/invalid.ts create mode 100644 test/validation/partial/valid-empty.test.ts delete mode 100644 test/validation/partial/valid-empty.ts create mode 100644 test/validation/partial/valid-full.test.ts delete mode 100644 test/validation/partial/valid-full.ts create mode 100644 test/validation/partial/valid-partial.test.ts delete mode 100644 test/validation/partial/valid-partial.ts create mode 100644 test/validation/partial/valid-type.test.ts delete mode 100644 test/validation/partial/valid-type.ts create mode 100644 test/validation/pattern/invalid.test.ts delete mode 100644 test/validation/pattern/invalid.ts create mode 100644 test/validation/pattern/valid.test.ts delete mode 100644 test/validation/pattern/valid.ts create mode 100644 test/validation/pick/invalid-element-nested.test.ts delete mode 100644 test/validation/pick/invalid-element-nested.ts create mode 100644 test/validation/pick/invalid-property-nested.test.ts delete mode 100644 test/validation/pick/invalid-property-nested.ts create mode 100644 test/validation/pick/invalid-property-unknown.test.ts delete mode 100644 test/validation/pick/invalid-property-unknown.ts create mode 100644 test/validation/pick/invalid-property.test.ts delete mode 100644 test/validation/pick/invalid-property.ts create mode 100644 test/validation/pick/invalid.test.ts delete mode 100644 test/validation/pick/invalid.ts create mode 100644 test/validation/pick/valid-nested.test.ts delete mode 100644 test/validation/pick/valid-nested.ts create mode 100644 test/validation/pick/valid-type.test.ts delete mode 100644 test/validation/pick/valid-type.ts create mode 100644 test/validation/pick/valid.test.ts delete mode 100644 test/validation/pick/valid.ts create mode 100644 test/validation/record/invalid-array.test.ts delete mode 100644 test/validation/record/invalid-array.ts create mode 100644 test/validation/record/invalid-property.test.ts delete mode 100644 test/validation/record/invalid-property.ts create mode 100644 test/validation/record/invalid.test.ts delete mode 100644 test/validation/record/invalid.ts create mode 100644 test/validation/record/valid-frozen.test.ts delete mode 100644 test/validation/record/valid-frozen.ts create mode 100644 test/validation/record/valid.test.ts delete mode 100644 test/validation/record/valid.ts create mode 100644 test/validation/refine/invalid-multiple-refinements.test.ts delete mode 100644 test/validation/refine/invalid-multiple-refinements.ts create mode 100644 test/validation/refine/invalid-shorthand.test.ts delete mode 100644 test/validation/refine/invalid-shorthand.ts create mode 100644 test/validation/refine/invalid.test.ts delete mode 100644 test/validation/refine/invalid.ts create mode 100644 test/validation/refine/valid.test.ts delete mode 100644 test/validation/refine/valid.ts create mode 100644 test/validation/regexp/invalid.test.ts delete mode 100644 test/validation/regexp/invalid.ts create mode 100644 test/validation/regexp/valid.test.ts delete mode 100644 test/validation/regexp/valid.ts create mode 100644 test/validation/set/invalid-element.test.ts delete mode 100644 test/validation/set/invalid-element.ts create mode 100644 test/validation/set/invalid-opaque.test.ts delete mode 100644 test/validation/set/invalid-opaque.ts create mode 100644 test/validation/set/invalid.test.ts delete mode 100644 test/validation/set/invalid.ts create mode 100644 test/validation/set/valid-opaque.test.ts delete mode 100644 test/validation/set/valid-opaque.ts create mode 100644 test/validation/set/valid.test.ts delete mode 100644 test/validation/set/valid.ts create mode 100644 test/validation/size/invalid-array.test.ts delete mode 100644 test/validation/size/invalid-array.ts create mode 100644 test/validation/size/invalid-map.test.ts delete mode 100644 test/validation/size/invalid-map.ts create mode 100644 test/validation/size/invalid-number.test.ts delete mode 100644 test/validation/size/invalid-number.ts create mode 100644 test/validation/size/invalid-set.test.ts delete mode 100644 test/validation/size/invalid-set.ts create mode 100644 test/validation/size/invalid-string.test.ts delete mode 100644 test/validation/size/invalid-string.ts create mode 100644 test/validation/size/valid-array.test.ts delete mode 100644 test/validation/size/valid-array.ts create mode 100644 test/validation/size/valid-exact.test.ts delete mode 100644 test/validation/size/valid-exact.ts create mode 100644 test/validation/size/valid-map.test.ts delete mode 100644 test/validation/size/valid-map.ts create mode 100644 test/validation/size/valid-max-inclusive.test.ts delete mode 100644 test/validation/size/valid-max-inclusive.ts create mode 100644 test/validation/size/valid-min-inclusive.test.ts delete mode 100644 test/validation/size/valid-min-inclusive.ts create mode 100644 test/validation/size/valid-number.test.ts delete mode 100644 test/validation/size/valid-number.ts create mode 100644 test/validation/size/valid-set.test.ts delete mode 100644 test/validation/size/valid-set.ts create mode 100644 test/validation/size/valid-string.test.ts delete mode 100644 test/validation/size/valid-string.ts create mode 100644 test/validation/string/invalid.test.ts delete mode 100644 test/validation/string/invalid.ts create mode 100644 test/validation/string/valid.test.ts delete mode 100644 test/validation/string/valid.ts create mode 100644 test/validation/trimmed/invalid.test.ts delete mode 100644 test/validation/trimmed/invalid.ts create mode 100644 test/validation/trimmed/valid.test.ts delete mode 100644 test/validation/trimmed/valid.ts create mode 100644 test/validation/tuple/invalid-element-missing.test.ts delete mode 100644 test/validation/tuple/invalid-element-missing.ts create mode 100644 test/validation/tuple/invalid-element-unknown.test.ts delete mode 100644 test/validation/tuple/invalid-element-unknown.ts create mode 100644 test/validation/tuple/invalid-element.test.ts delete mode 100644 test/validation/tuple/invalid-element.ts create mode 100644 test/validation/tuple/invalid.test.ts delete mode 100644 test/validation/tuple/invalid.ts create mode 100644 test/validation/tuple/valid-frozen.test.ts delete mode 100644 test/validation/tuple/valid-frozen.ts create mode 100644 test/validation/tuple/valid.test.ts delete mode 100644 test/validation/tuple/valid.ts create mode 100644 test/validation/type/invalid-array.test.ts delete mode 100644 test/validation/type/invalid-array.ts create mode 100644 test/validation/type/invalid-property-nested.test.ts delete mode 100644 test/validation/type/invalid-property-nested.ts create mode 100644 test/validation/type/invalid-property.test.ts delete mode 100644 test/validation/type/invalid-property.ts create mode 100644 test/validation/type/invalid.test.ts delete mode 100644 test/validation/type/invalid.ts create mode 100644 test/validation/type/valid-frozen.test.ts delete mode 100644 test/validation/type/valid-frozen.ts rename test/validation/type/{valid-instance.ts => valid-instance.test.ts} (100%) create mode 100644 test/validation/type/valid.test.ts delete mode 100644 test/validation/type/valid.ts create mode 100644 test/validation/union/coercion-object.test.ts delete mode 100644 test/validation/union/coercion-object.ts create mode 100644 test/validation/union/coercion-type.test.ts delete mode 100644 test/validation/union/coercion-type.ts create mode 100644 test/validation/union/coercion.test.ts delete mode 100644 test/validation/union/coercion.ts create mode 100644 test/validation/union/invalid.test.ts delete mode 100644 test/validation/union/invalid.ts create mode 100644 test/validation/union/valid.test.ts delete mode 100644 test/validation/union/valid.ts create mode 100644 test/validation/unknown/valid-number.test.ts delete mode 100644 test/validation/unknown/valid-number.ts create mode 100644 test/validation/unknown/valid-string.test.ts delete mode 100644 test/validation/unknown/valid-string.ts create mode 100644 test/validation/unknown/valid-undefined.test.ts delete mode 100644 test/validation/unknown/valid-undefined.ts diff --git a/test/validation/any/valid-number.test.ts b/test/validation/any/valid-number.test.ts new file mode 100644 index 00000000..19342718 --- /dev/null +++ b/test/validation/any/valid-number.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { any } from '../../../src' + +test('Valid any number', () => { + const data = 1 + assert(data, any()) + expect(data).toStrictEqual(1) +}) diff --git a/test/validation/any/valid-number.ts b/test/validation/any/valid-number.ts deleted file mode 100644 index 70af230d..00000000 --- a/test/validation/any/valid-number.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { any } from '../../../src' - -export const Struct = any() - -export const data = 1 - -export const output = 1 diff --git a/test/validation/any/valid-string.test.ts b/test/validation/any/valid-string.test.ts new file mode 100644 index 00000000..a2d48de4 --- /dev/null +++ b/test/validation/any/valid-string.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { any } from '../../../src' + +test('Valid any string', () => { + const data = 'valid' + assert(data, any()) + expect(data).toStrictEqual('valid') +}) diff --git a/test/validation/any/valid-string.ts b/test/validation/any/valid-string.ts deleted file mode 100644 index 3ee3159d..00000000 --- a/test/validation/any/valid-string.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { any } from '../../../src' - -export const Struct = any() - -export const data = 'valid' - -export const output = 'valid' diff --git a/test/validation/any/valid-undefined.test.ts b/test/validation/any/valid-undefined.test.ts new file mode 100644 index 00000000..c594d764 --- /dev/null +++ b/test/validation/any/valid-undefined.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { any } from '../../../src' + +test('Valid any undefined', () => { + const data = undefined + assert(data, any()) + expect(data).toStrictEqual(undefined) +}) diff --git a/test/validation/any/valid-undefined.ts b/test/validation/any/valid-undefined.ts deleted file mode 100644 index d22b8108..00000000 --- a/test/validation/any/valid-undefined.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { any } from '../../../src' - -export const Struct = any() - -export const data = undefined - -export const output = undefined diff --git a/test/validation/array/invalid-element-property.test.ts b/test/validation/array/invalid-element-property.test.ts new file mode 100644 index 00000000..8fc4ef17 --- /dev/null +++ b/test/validation/array/invalid-element-property.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { array, object, string } from '../../../src' + +test('Invalid array element property', () => { + const data = [{ id: '1' }, { id: false }, { id: '3' }] + const [err, res] = validate(data, array(object({ id: string() }))) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: false, + type: 'string', + refinement: undefined, + path: [1, 'id'], + branch: [data, data[1], data[1].id], + }, + ]) +}) diff --git a/test/validation/array/invalid-element-property.ts b/test/validation/array/invalid-element-property.ts deleted file mode 100644 index f7754163..00000000 --- a/test/validation/array/invalid-element-property.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { array, object, string } from '../../../src' - -export const Struct = array(object({ id: string() })) - -export const data = [{ id: '1' }, { id: false }, { id: '3' }] - -export const failures = [ - { - value: false, - type: 'string', - refinement: undefined, - path: [1, 'id'], - branch: [data, data[1], data[1].id], - }, -] diff --git a/test/validation/array/invalid-element.test.ts b/test/validation/array/invalid-element.test.ts new file mode 100644 index 00000000..654cea0b --- /dev/null +++ b/test/validation/array/invalid-element.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { array, number } from '../../../src' + +test('Invalid array element', () => { + const data = [1, 'invalid', 3] + const [err, res] = validate(data, array(number())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: [1], + branch: [data, data[1]], + }, + ]) +}) diff --git a/test/validation/array/invalid-element.ts b/test/validation/array/invalid-element.ts deleted file mode 100644 index 86738987..00000000 --- a/test/validation/array/invalid-element.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { array, number } from '../../../src' - -export const Struct = array(number()) - -export const data = [1, 'invalid', 3] - -export const failures = [ - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: [1], - branch: [data, data[1]], - }, -] diff --git a/test/validation/array/invalid-opaque.test.ts b/test/validation/array/invalid-opaque.test.ts new file mode 100644 index 00000000..ba93ed17 --- /dev/null +++ b/test/validation/array/invalid-opaque.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { array } from '../../../src' + +test('Invalid array opaque', () => { + const data = 'invalid' + const [err, res] = validate(data, array()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'array', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/array/invalid-opaque.ts b/test/validation/array/invalid-opaque.ts deleted file mode 100644 index 21685f08..00000000 --- a/test/validation/array/invalid-opaque.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { array } from '../../../src' - -export const Struct = array() - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'array', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/array/invalid.test.ts b/test/validation/array/invalid.test.ts new file mode 100644 index 00000000..a80827e1 --- /dev/null +++ b/test/validation/array/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { array, number } from '../../../src' + +test('Invalid array', () => { + const data = 'invalid' + const [err, res] = validate(data, array(number())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'array', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/array/invalid.ts b/test/validation/array/invalid.ts deleted file mode 100644 index 5d1b040d..00000000 --- a/test/validation/array/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { array, number } from '../../../src' - -export const Struct = array(number()) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'array', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/array/valid-frozen.test.ts b/test/validation/array/valid-frozen.test.ts new file mode 100644 index 00000000..9e73b4ab --- /dev/null +++ b/test/validation/array/valid-frozen.test.ts @@ -0,0 +1,9 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { array, number } from '../../../src' + +test('Valid array frozen', () => { + const data = Object.freeze([1, 2, 3]) + const res = create(data, array(number())) + expect(res).toStrictEqual([1, 2, 3]) +}) diff --git a/test/validation/array/valid-frozen.ts b/test/validation/array/valid-frozen.ts deleted file mode 100644 index 814291fe..00000000 --- a/test/validation/array/valid-frozen.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { array, number } from '../../../src' - -export const Struct = array(number()) - -export const data = Object.freeze([1, 2, 3]) - -export const output = [1, 2, 3] - -export const create = true diff --git a/test/validation/array/valid-opaque.test.ts b/test/validation/array/valid-opaque.test.ts new file mode 100644 index 00000000..545124af --- /dev/null +++ b/test/validation/array/valid-opaque.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { array } from '../../../src' + +test('Valid array opaque', () => { + const data = [1, 'b', true] + assert(data, array()) + expect(data).toStrictEqual([1, 'b', true]) +}) diff --git a/test/validation/array/valid-opaque.ts b/test/validation/array/valid-opaque.ts deleted file mode 100644 index 21d50e56..00000000 --- a/test/validation/array/valid-opaque.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { array } from '../../../src' - -export const Struct = array() - -export const data = [1, 'b', true] - -export const output = [1, 'b', true] diff --git a/test/validation/array/valid.test.ts b/test/validation/array/valid.test.ts new file mode 100644 index 00000000..827d18c3 --- /dev/null +++ b/test/validation/array/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { array, number } from '../../../src' + +test('Valid array', () => { + const data = [1, 2, 3] + assert(data, array(number())) + expect(data).toStrictEqual([1, 2, 3]) +}) diff --git a/test/validation/array/valid.ts b/test/validation/array/valid.ts deleted file mode 100644 index a98de1cd..00000000 --- a/test/validation/array/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { array, number } from '../../../src' - -export const Struct = array(number()) - -export const data = [1, 2, 3] - -export const output = [1, 2, 3] diff --git a/test/validation/assign/invalid-object.test.ts b/test/validation/assign/invalid-object.test.ts new file mode 100644 index 00000000..918ec025 --- /dev/null +++ b/test/validation/assign/invalid-object.test.ts @@ -0,0 +1,34 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { object, assign, string, number } from '../../../src' + +const A = object({ a: string() }) +const B = object({ a: number(), b: number() }) + +test('Invalid assign object', () => { + const data = { + a: 'invalid', + b: 2, + c: 5, + } + + const [err, res] = validate(data, assign(A, B)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: ['a'], + branch: [data, data.a], + }, + { + branch: [data, data.c], + path: ['c'], + refinement: undefined, + type: 'never', + value: 5, + }, + ]) +}) diff --git a/test/validation/assign/invalid-object.ts b/test/validation/assign/invalid-object.ts deleted file mode 100644 index 4ac6af5d..00000000 --- a/test/validation/assign/invalid-object.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { object, assign, string, number } from '../../../src' - -const A = object({ a: string() }) -const B = object({ a: number(), b: number() }) - -export const Struct = assign(A, B) - -export const data = { - a: 'invalid', - b: 2, - c: 5, -} - -export const failures = [ - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: ['a'], - branch: [data, data.a], - }, - { - branch: [data, data.c], - path: ['c'], - refinement: undefined, - type: 'never', - value: 5, - }, -] diff --git a/test/validation/assign/invalid-type.test.ts b/test/validation/assign/invalid-type.test.ts new file mode 100644 index 00000000..8be22b7f --- /dev/null +++ b/test/validation/assign/invalid-type.test.ts @@ -0,0 +1,27 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { type, object, assign, string, number } from '../../../src' + +const A = type({ a: string() }) +const B = object({ a: number(), b: number() }) + +test('Invalid assign type', () => { + const data = { + a: 'invalid', + b: 2, + c: 5, + } + + const [err, res] = validate(data, assign(A, B)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: ['a'], + branch: [data, data.a], + }, + ]) +}) diff --git a/test/validation/assign/invalid-type.ts b/test/validation/assign/invalid-type.ts deleted file mode 100644 index 840e5e23..00000000 --- a/test/validation/assign/invalid-type.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { type, object, assign, string, number } from '../../../src' - -const A = type({ a: string() }) -const B = object({ a: number(), b: number() }) - -export const Struct = assign(A, B) - -export const data = { - a: 'invalid', - b: 2, - c: 5, -} - -export const failures = [ - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: ['a'], - branch: [data, data.a], - }, -] diff --git a/test/validation/assign/valid-object.test.ts b/test/validation/assign/valid-object.test.ts new file mode 100644 index 00000000..17833c0e --- /dev/null +++ b/test/validation/assign/valid-object.test.ts @@ -0,0 +1,20 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { type, assign, string, number } from '../../../src' + +const A = type({ a: string() }) +const B = type({ a: number(), b: number() }) + +test('Valid assign object', () => { + const data = { + a: 1, + b: 2, + } + + assert(data, assign(A, B)) + + expect(data).toStrictEqual({ + a: 1, + b: 2, + }) +}) diff --git a/test/validation/assign/valid-object.ts b/test/validation/assign/valid-object.ts deleted file mode 100644 index 237c5638..00000000 --- a/test/validation/assign/valid-object.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { type, assign, string, number } from '../../../src' - -const A = type({ a: string() }) -const B = type({ a: number(), b: number() }) - -export const Struct = assign(A, B) - -export const data = { - a: 1, - b: 2, -} - -export const output = { - a: 1, - b: 2, -} diff --git a/test/validation/assign/valid-type.test.ts b/test/validation/assign/valid-type.test.ts new file mode 100644 index 00000000..af8a14d0 --- /dev/null +++ b/test/validation/assign/valid-type.test.ts @@ -0,0 +1,22 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { type, object, assign, string, number } from '../../../src' + +const A = type({ a: string() }) +const B = object({ b: number() }) + +test('Valid assign type', () => { + const data = { + a: '1', + b: 2, + c: 3, + } + + assert(data, assign(A, B)) + + expect(data).toStrictEqual({ + a: '1', + b: 2, + c: 3, + }) +}) diff --git a/test/validation/assign/valid-type.ts b/test/validation/assign/valid-type.ts deleted file mode 100644 index fe2e1473..00000000 --- a/test/validation/assign/valid-type.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { type, object, assign, string, number } from '../../../src' - -const A = type({ a: string() }) -const B = object({ b: number() }) - -export const Struct = assign(A, B) - -export const data = { - a: '1', - b: 2, - c: 3, -} - -export const output = { - a: '1', - b: 2, - c: 3, -} diff --git a/test/validation/bigint/invalid-number.test.ts b/test/validation/bigint/invalid-number.test.ts new file mode 100644 index 00000000..e9989404 --- /dev/null +++ b/test/validation/bigint/invalid-number.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { bigint } from '../../../src' + +test('Invalid bigint number', () => { + const data = 3 + const [err, res] = validate(data, bigint()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 3, + type: 'bigint', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/bigint/invalid-number.ts b/test/validation/bigint/invalid-number.ts deleted file mode 100644 index dc0e2662..00000000 --- a/test/validation/bigint/invalid-number.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { bigint } from '../../../src' - -export const Struct = bigint() - -export const data = 3 - -export const failures = [ - { - value: 3, - type: 'bigint', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/bigint/invalid.test.ts b/test/validation/bigint/invalid.test.ts new file mode 100644 index 00000000..2374c332 --- /dev/null +++ b/test/validation/bigint/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { bigint } from '../../../src' + +test('Invalid bigint', () => { + const data = 'invalid' + const [err, res] = validate(data, bigint()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'bigint', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/bigint/invalid.ts b/test/validation/bigint/invalid.ts deleted file mode 100644 index bafb1785..00000000 --- a/test/validation/bigint/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { bigint } from '../../../src' - -export const Struct = bigint() - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'bigint', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/bigint/valid.test.ts b/test/validation/bigint/valid.test.ts new file mode 100644 index 00000000..5eb16f40 --- /dev/null +++ b/test/validation/bigint/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { bigint } from '../../../src' + +test('Valid bigint', () => { + const data = 542n + assert(data, bigint()) + expect(data).toStrictEqual(542n) +}) diff --git a/test/validation/bigint/valid.ts b/test/validation/bigint/valid.ts deleted file mode 100644 index 4fcdfe60..00000000 --- a/test/validation/bigint/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { bigint } from '../../../src' - -export const Struct = bigint() - -export const data = 542n - -export const output = 542n diff --git a/test/validation/boolean/invalid.test.ts b/test/validation/boolean/invalid.test.ts new file mode 100644 index 00000000..087f28b0 --- /dev/null +++ b/test/validation/boolean/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { boolean } from '../../../src' + +test('Invalid boolean', () => { + const data = 'invalid' + const [err, res] = validate(data, boolean()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'boolean', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/boolean/invalid.ts b/test/validation/boolean/invalid.ts deleted file mode 100644 index 01b05be6..00000000 --- a/test/validation/boolean/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { boolean } from '../../../src' - -export const Struct = boolean() - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'boolean', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/boolean/valid.test.ts b/test/validation/boolean/valid.test.ts new file mode 100644 index 00000000..b2d57559 --- /dev/null +++ b/test/validation/boolean/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { boolean } from '../../../src' + +test('Valid boolean', () => { + const data = true + assert(data, boolean()) + expect(data).toStrictEqual(true) +}) diff --git a/test/validation/boolean/valid.ts b/test/validation/boolean/valid.ts deleted file mode 100644 index 86d8c122..00000000 --- a/test/validation/boolean/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { boolean } from '../../../src' - -export const Struct = boolean() - -export const data = true - -export const output = true diff --git a/test/validation/coerce/changed.test.ts b/test/validation/coerce/changed.test.ts new file mode 100644 index 00000000..b72c6e66 --- /dev/null +++ b/test/validation/coerce/changed.test.ts @@ -0,0 +1,14 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { string, unknown, coerce } from '../../../src' + +test('Changed coerce', () => { + const data = null + + const res = create( + data, + coerce(string(), unknown(), (x) => (x == null ? 'unknown' : x)) + ) + + expect(res).toStrictEqual('unknown') +}) diff --git a/test/validation/coerce/changed.ts b/test/validation/coerce/changed.ts deleted file mode 100644 index da3c9cdd..00000000 --- a/test/validation/coerce/changed.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { string, unknown, coerce } from '../../../src' - -export const Struct = coerce(string(), unknown(), (x) => - x == null ? 'unknown' : x -) - -export const data = null - -export const output = 'unknown' - -export const create = true diff --git a/test/validation/coerce/condition-not-met.test.ts b/test/validation/coerce/condition-not-met.test.ts new file mode 100644 index 00000000..5a9e895a --- /dev/null +++ b/test/validation/coerce/condition-not-met.test.ts @@ -0,0 +1,27 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { string, number, coerce } from '../../../src' + +test('Condition coerce not met', () => { + const data = false + + const [err, res] = validate( + data, + coerce(string(), number(), (x) => 'known'), + { + coerce: true, + } + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: false, + type: 'string', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/coerce/condition-not-met.ts b/test/validation/coerce/condition-not-met.ts deleted file mode 100644 index 2f36b2bc..00000000 --- a/test/validation/coerce/condition-not-met.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { string, number, coerce } from '../../../src' - -export const Struct = coerce(string(), number(), (x) => 'known') - -export const data = false - -export const failures = [ - { - value: false, - type: 'string', - refinement: undefined, - path: [], - branch: [data], - }, -] - -export const create = true diff --git a/test/validation/coerce/unchanged.test.ts b/test/validation/coerce/unchanged.test.ts new file mode 100644 index 00000000..87ba2310 --- /dev/null +++ b/test/validation/coerce/unchanged.test.ts @@ -0,0 +1,14 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { string, unknown, coerce } from '../../../src' + +test('Unchanged coerce', () => { + const data = 'known' + + const res = create( + data, + coerce(string(), unknown(), (x) => (x == null ? 'unknown' : x)) + ) + + expect(res).toStrictEqual('known') +}) diff --git a/test/validation/coerce/unchanged.ts b/test/validation/coerce/unchanged.ts deleted file mode 100644 index abe5aeba..00000000 --- a/test/validation/coerce/unchanged.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { string, unknown, coerce } from '../../../src' - -export const Struct = coerce(string(), unknown(), (x) => - x == null ? 'unknown' : x -) - -export const data = 'known' - -export const output = 'known' - -export const create = true diff --git a/test/validation/date/invalid-date.test.ts b/test/validation/date/invalid-date.test.ts new file mode 100644 index 00000000..68295012 --- /dev/null +++ b/test/validation/date/invalid-date.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { date } from '../../../src' + +test('Invalid date date', () => { + const data = new Date('invalid') + const [err, res] = validate(data, date()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: data, + type: 'date', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/date/invalid-date.ts b/test/validation/date/invalid-date.ts deleted file mode 100644 index 3ffdef33..00000000 --- a/test/validation/date/invalid-date.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { date } from '../../../src' - -export const Struct = date() - -export const data = new Date('invalid') - -export const failures = [ - { - value: data, - type: 'date', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/date/invalid.test.ts b/test/validation/date/invalid.test.ts new file mode 100644 index 00000000..07ebb114 --- /dev/null +++ b/test/validation/date/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { date } from '../../../src' + +test('Invalid date', () => { + const data = 'invalid' + const [err, res] = validate(data, date()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'date', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/date/invalid.ts b/test/validation/date/invalid.ts deleted file mode 100644 index e4eca7c5..00000000 --- a/test/validation/date/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { date } from '../../../src' - -export const Struct = date() - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'date', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/date/valid.test.ts b/test/validation/date/valid.test.ts new file mode 100644 index 00000000..625fad3a --- /dev/null +++ b/test/validation/date/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { date } from '../../../src' + +test('Valid date', () => { + const data = new Date(0) + assert(data, date()) + expect(data).toStrictEqual(new Date(0)) +}) diff --git a/test/validation/date/valid.ts b/test/validation/date/valid.ts deleted file mode 100644 index 947156a3..00000000 --- a/test/validation/date/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { date } from '../../../src' - -export const Struct = date() - -export const data = new Date(0) - -export const output = new Date(0) diff --git a/test/validation/defaulted/function.test.ts b/test/validation/defaulted/function.test.ts new file mode 100644 index 00000000..a1892603 --- /dev/null +++ b/test/validation/defaulted/function.test.ts @@ -0,0 +1,12 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { number, defaulted } from '../../../src' + +test('Function defaulted', () => { + const data = undefined + const res = create( + data, + defaulted(number(), () => 42) + ) + expect(res).toStrictEqual(42) +}) diff --git a/test/validation/defaulted/function.ts b/test/validation/defaulted/function.ts deleted file mode 100644 index aac1e68c..00000000 --- a/test/validation/defaulted/function.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { number, defaulted } from '../../../src' - -export const Struct = defaulted(number(), () => 42) - -export const data = undefined - -export const output = 42 - -export const create = true diff --git a/test/validation/defaulted/mixin.test.ts b/test/validation/defaulted/mixin.test.ts new file mode 100644 index 00000000..45cf0dfd --- /dev/null +++ b/test/validation/defaulted/mixin.test.ts @@ -0,0 +1,27 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { defaulted, string, object, number } from '../../../src' + +test('Mixin defaulted', () => { + const data = { + version: 0, + } + + const res = create( + data, + defaulted( + object({ + title: string(), + version: number(), + }), + { + title: 'Untitled', + } + ) + ) + + expect(res).toStrictEqual({ + title: 'Untitled', + version: 0, + }) +}) diff --git a/test/validation/defaulted/mixin.ts b/test/validation/defaulted/mixin.ts deleted file mode 100644 index f587c2d6..00000000 --- a/test/validation/defaulted/mixin.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { defaulted, string, object, number } from '../../../src' - -export const Struct = defaulted( - object({ - title: string(), - version: number(), - }), - { - title: 'Untitled', - } -) - -export const data = { - version: 0, -} - -export const output = { - title: 'Untitled', - version: 0, -} - -export const create = true diff --git a/test/validation/defaulted/nested-double.test.ts b/test/validation/defaulted/nested-double.test.ts new file mode 100644 index 00000000..97d76fb0 --- /dev/null +++ b/test/validation/defaulted/nested-double.test.ts @@ -0,0 +1,25 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { defaulted, string, object } from '../../../src' + +test('Nested defaulted double', () => { + const data = {} + + const res = create( + data, + object({ + book: defaulted( + object({ + title: defaulted(string(), 'Untitled'), + }), + {} + ), + }) + ) + + expect(res).toStrictEqual({ + book: { + title: 'Untitled', + }, + }) +}) diff --git a/test/validation/defaulted/nested-double.ts b/test/validation/defaulted/nested-double.ts deleted file mode 100644 index f661c285..00000000 --- a/test/validation/defaulted/nested-double.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { defaulted, string, object } from '../../../src' - -export const Struct = object({ - book: defaulted( - object({ - title: defaulted(string(), 'Untitled'), - }), - {} - ), -}) - -export const data = {} - -export const output = { - book: { - title: 'Untitled', - }, -} - -export const create = true diff --git a/test/validation/defaulted/nested.test.ts b/test/validation/defaulted/nested.test.ts new file mode 100644 index 00000000..7a93c7d8 --- /dev/null +++ b/test/validation/defaulted/nested.test.ts @@ -0,0 +1,18 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { defaulted, string, object } from '../../../src' + +test('Nested defaulted', () => { + const data = {} + + const res = create( + data, + object({ + title: defaulted(string(), 'Untitled'), + }) + ) + + expect(res).toStrictEqual({ + title: 'Untitled', + }) +}) diff --git a/test/validation/defaulted/nested.ts b/test/validation/defaulted/nested.ts deleted file mode 100644 index b432ea84..00000000 --- a/test/validation/defaulted/nested.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { defaulted, string, object } from '../../../src' - -export const Struct = object({ - title: defaulted(string(), 'Untitled'), -}) - -export const data = {} - -export const output = { - title: 'Untitled', -} - -export const create = true diff --git a/test/validation/defaulted/strict.test.ts b/test/validation/defaulted/strict.test.ts new file mode 100644 index 00000000..e3f8a132 --- /dev/null +++ b/test/validation/defaulted/strict.test.ts @@ -0,0 +1,40 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { defaulted, string, type, number } from '../../../src' + +test('Strict defaulted', () => { + const data = { + version: 0, + } + + const [err, res] = validate( + data, + defaulted( + type({ + title: string(), + version: number(), + }), + { + title: 'Untitled', + }, + { + strict: true, + } + ), + { + coerce: true, + } + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: undefined, + type: 'string', + refinement: undefined, + path: ['title'], + branch: [data, undefined], + }, + ]) +}) diff --git a/test/validation/defaulted/strict.ts b/test/validation/defaulted/strict.ts deleted file mode 100644 index aa10f41a..00000000 --- a/test/validation/defaulted/strict.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { defaulted, string, type, number } from '../../../src' - -export const Struct = defaulted( - type({ - title: string(), - version: number(), - }), - { - title: 'Untitled', - }, - { - strict: true, - } -) - -export const data = { - version: 0, -} - -export const failures = [ - { - value: undefined, - type: 'string', - refinement: undefined, - path: ['title'], - branch: [data, undefined], - }, -] - -export const create = true diff --git a/test/validation/defaulted/value.test.ts b/test/validation/defaulted/value.test.ts new file mode 100644 index 00000000..3d3df041 --- /dev/null +++ b/test/validation/defaulted/value.test.ts @@ -0,0 +1,9 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { number, defaulted } from '../../../src' + +test('Value defaulted', () => { + const data = undefined + const res = create(data, defaulted(number(), 42)) + expect(res).toStrictEqual(42) +}) diff --git a/test/validation/defaulted/value.ts b/test/validation/defaulted/value.ts deleted file mode 100644 index dc2acc59..00000000 --- a/test/validation/defaulted/value.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { number, defaulted } from '../../../src' - -export const Struct = defaulted(number(), 42) - -export const data = undefined - -export const output = 42 - -export const create = true diff --git a/test/validation/deprecated/invalid-null.test.ts b/test/validation/deprecated/invalid-null.test.ts new file mode 100644 index 00000000..74c8d4c3 --- /dev/null +++ b/test/validation/deprecated/invalid-null.test.ts @@ -0,0 +1,22 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { deprecated, string } from '../../../src' + +test('Invalid deprecated null', () => { + const data = null + const [err, res] = validate( + data, + deprecated(string(), () => {}) + ) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: null, + type: 'string', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/deprecated/invalid-null.ts b/test/validation/deprecated/invalid-null.ts deleted file mode 100644 index 03d3524b..00000000 --- a/test/validation/deprecated/invalid-null.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { deprecated, string } from '../../../src' - -export const Struct = deprecated(string(), () => {}) - -export const data = null - -export const failures = [ - { - value: null, - type: 'string', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/deprecated/invalid-property.test.ts b/test/validation/deprecated/invalid-property.test.ts new file mode 100644 index 00000000..1e8d47a4 --- /dev/null +++ b/test/validation/deprecated/invalid-property.test.ts @@ -0,0 +1,28 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { deprecated, number, object } from '../../../src' + +test('Invalid deprecated property', () => { + const data = { + deprecatedKey: '42', + } + + const [err, res] = validate( + data, + object({ + deprecatedKey: deprecated(number(), () => {}), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: '42', + type: 'number', + refinement: undefined, + path: ['deprecatedKey'], + branch: [data, data.deprecatedKey], + }, + ]) +}) diff --git a/test/validation/deprecated/invalid-property.ts b/test/validation/deprecated/invalid-property.ts deleted file mode 100644 index 8eff69ac..00000000 --- a/test/validation/deprecated/invalid-property.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { deprecated, number, object } from '../../../src' - -export const Struct = object({ - deprecatedKey: deprecated(number(), () => {}), -}) - -export const data = { - deprecatedKey: '42', -} - -export const failures = [ - { - value: '42', - type: 'number', - refinement: undefined, - path: ['deprecatedKey'], - branch: [data, data.deprecatedKey], - }, -] diff --git a/test/validation/deprecated/invalid.test.ts b/test/validation/deprecated/invalid.test.ts new file mode 100644 index 00000000..3b3e697d --- /dev/null +++ b/test/validation/deprecated/invalid.test.ts @@ -0,0 +1,22 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { deprecated, number } from '../../../src' + +test('Invalid deprecated', () => { + const data = '42' + const [err, res] = validate( + data, + deprecated(number(), () => {}) + ) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: '42', + type: 'number', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/deprecated/invalid.ts b/test/validation/deprecated/invalid.ts deleted file mode 100644 index 54286efb..00000000 --- a/test/validation/deprecated/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { deprecated, number } from '../../../src' - -export const Struct = deprecated(number(), () => {}) - -export const data = '42' - -export const failures = [ - { - value: '42', - type: 'number', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/deprecated/valid-property.test.ts b/test/validation/deprecated/valid-property.test.ts new file mode 100644 index 00000000..200675e3 --- /dev/null +++ b/test/validation/deprecated/valid-property.test.ts @@ -0,0 +1,21 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { type, number, deprecated, any } from '../../../src' + +test('Valid deprecated property', () => { + const data = { + age: 42, + } + + assert( + data, + type({ + name: deprecated(any(), () => {}), + age: number(), + }) + ) + + expect(data).toStrictEqual({ + age: 42, + }) +}) diff --git a/test/validation/deprecated/valid-property.ts b/test/validation/deprecated/valid-property.ts deleted file mode 100644 index ea10861a..00000000 --- a/test/validation/deprecated/valid-property.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { type, number, deprecated, any } from '../../../src' - -export const Struct = type({ - name: deprecated(any(), () => {}), - age: number(), -}) - -export const data = { - age: 42, -} - -export const output = { - age: 42, -} diff --git a/test/validation/deprecated/valid-undefined.test.ts b/test/validation/deprecated/valid-undefined.test.ts new file mode 100644 index 00000000..50e5b929 --- /dev/null +++ b/test/validation/deprecated/valid-undefined.test.ts @@ -0,0 +1,12 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { deprecated, number } from '../../../src' + +test('Valid deprecated undefined', () => { + const data = undefined + assert( + data, + deprecated(number(), () => {}) + ) + expect(data).toStrictEqual(undefined) +}) diff --git a/test/validation/deprecated/valid-undefined.ts b/test/validation/deprecated/valid-undefined.ts deleted file mode 100644 index 38a89b06..00000000 --- a/test/validation/deprecated/valid-undefined.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { deprecated, number } from '../../../src' - -export const Struct = deprecated(number(), () => {}) - -export const data = undefined - -export const output = undefined diff --git a/test/validation/deprecated/valid.test.ts b/test/validation/deprecated/valid.test.ts new file mode 100644 index 00000000..c2ba8ebd --- /dev/null +++ b/test/validation/deprecated/valid.test.ts @@ -0,0 +1,12 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { deprecated, number } from '../../../src' + +test('Valid deprecated', () => { + const data = 42 + assert( + data, + deprecated(number(), () => {}) + ) + expect(data).toStrictEqual(42) +}) diff --git a/test/validation/deprecated/valid.ts b/test/validation/deprecated/valid.ts deleted file mode 100644 index 5bbf414a..00000000 --- a/test/validation/deprecated/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { deprecated, number } from '../../../src' - -export const Struct = deprecated(number(), () => {}) - -export const data = 42 - -export const output = 42 diff --git a/test/validation/dynamic/invalid-reference.test.ts b/test/validation/dynamic/invalid-reference.test.ts new file mode 100644 index 00000000..41f92d87 --- /dev/null +++ b/test/validation/dynamic/invalid-reference.test.ts @@ -0,0 +1,49 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { assert, type, dynamic, literal, number, string } from '../../../src' + +const Entity = type({ + object: string(), +}) + +const User = type({ + object: literal('USER'), + username: string(), +}) + +const Product = type({ + object: literal('PRODUCT'), + price: number(), +}) + +const map = { + USER: User, + PRODUCT: Product, +} + +test('Invalid dynamic reference', () => { + const data = { + object: 'PRODUCT', + price: 'Only $19.99!', + } + + const [err, res] = validate( + data, + dynamic((entity) => { + assert(entity, Entity) + return map[entity.object] + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'Only $19.99!', + type: 'number', + refinement: undefined, + path: ['price'], + branch: [data, data.price], + }, + ]) +}) diff --git a/test/validation/dynamic/invalid-reference.ts b/test/validation/dynamic/invalid-reference.ts deleted file mode 100644 index 156b0678..00000000 --- a/test/validation/dynamic/invalid-reference.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { assert, type, dynamic, literal, number, string } from '../../../src' - -const Entity = type({ - object: string(), -}) - -const User = type({ - object: literal('USER'), - username: string(), -}) - -const Product = type({ - object: literal('PRODUCT'), - price: number(), -}) - -const map = { - USER: User, - PRODUCT: Product, -} - -export const Struct = dynamic((entity) => { - assert(entity, Entity) - return map[entity.object] -}) - -export const data = { - object: 'PRODUCT', - price: 'Only $19.99!', -} - -export const failures = [ - { - value: 'Only $19.99!', - type: 'number', - refinement: undefined, - path: ['price'], - branch: [data, data.price], - }, -] diff --git a/test/validation/dynamic/invalid.test.ts b/test/validation/dynamic/invalid.test.ts new file mode 100644 index 00000000..52a502a7 --- /dev/null +++ b/test/validation/dynamic/invalid.test.ts @@ -0,0 +1,22 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { dynamic, string } from '../../../src' + +test('Invalid dynamic', () => { + const data = 3 + const [err, res] = validate( + data, + dynamic(() => string()) + ) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 3, + type: 'string', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/dynamic/invalid.ts b/test/validation/dynamic/invalid.ts deleted file mode 100644 index b0bb6931..00000000 --- a/test/validation/dynamic/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { dynamic, string } from '../../../src' - -export const Struct = dynamic(() => string()) - -export const data = 3 - -export const failures = [ - { - value: 3, - type: 'string', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/dynamic/valid-reference.test.ts b/test/validation/dynamic/valid-reference.test.ts new file mode 100644 index 00000000..26995883 --- /dev/null +++ b/test/validation/dynamic/valid-reference.test.ts @@ -0,0 +1,42 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { assert, type, dynamic, literal, string, number } from '../../../src' + +const Entity = type({ + object: string(), +}) + +const User = type({ + object: literal('USER'), + username: string(), +}) + +const Product = type({ + object: literal('PRODUCT'), + price: number(), +}) + +const map = { + USER: User, + PRODUCT: Product, +} + +test('Valid dynamic reference', () => { + const data = { + object: 'PRODUCT', + price: 1999, + } + + assert( + data, + dynamic((entity) => { + assert(entity, Entity) + return map[entity.object] + }) + ) + + expect(data).toStrictEqual({ + object: 'PRODUCT', + price: 1999, + }) +}) diff --git a/test/validation/dynamic/valid-reference.ts b/test/validation/dynamic/valid-reference.ts deleted file mode 100644 index 5156c89d..00000000 --- a/test/validation/dynamic/valid-reference.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { assert, type, dynamic, literal, string, number } from '../../../src' - -const Entity = type({ - object: string(), -}) - -const User = type({ - object: literal('USER'), - username: string(), -}) - -const Product = type({ - object: literal('PRODUCT'), - price: number(), -}) - -const map = { - USER: User, - PRODUCT: Product, -} - -export const Struct = dynamic((entity) => { - assert(entity, Entity) - return map[entity.object] -}) - -export const data = { - object: 'PRODUCT', - price: 1999, -} - -export const output = { - object: 'PRODUCT', - price: 1999, -} diff --git a/test/validation/dynamic/valid.test.ts b/test/validation/dynamic/valid.test.ts new file mode 100644 index 00000000..42d94433 --- /dev/null +++ b/test/validation/dynamic/valid.test.ts @@ -0,0 +1,12 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { dynamic, string } from '../../../src' + +test('Valid dynamic', () => { + const data = 'valid' + assert( + data, + dynamic(() => string()) + ) + expect(data).toStrictEqual('valid') +}) diff --git a/test/validation/dynamic/valid.ts b/test/validation/dynamic/valid.ts deleted file mode 100644 index 8cdb2e21..00000000 --- a/test/validation/dynamic/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { dynamic, string } from '../../../src' - -export const Struct = dynamic(() => string()) - -export const data = 'valid' - -export const output = 'valid' diff --git a/test/validation/dynamic/with-refiners.test.ts b/test/validation/dynamic/with-refiners.test.ts new file mode 100644 index 00000000..d2647629 --- /dev/null +++ b/test/validation/dynamic/with-refiners.test.ts @@ -0,0 +1,22 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { dynamic, string, nonempty } from '../../../src' + +test('With dynamic refiners', () => { + const data = '' + const [err, res] = validate( + data, + dynamic(() => nonempty(string())) + ) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: data, + type: 'string', + refinement: 'nonempty', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/dynamic/with-refiners.ts b/test/validation/dynamic/with-refiners.ts deleted file mode 100644 index 9da48bce..00000000 --- a/test/validation/dynamic/with-refiners.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { dynamic, string, nonempty } from '../../../src' - -export const Struct = dynamic(() => nonempty(string())) - -export const data = '' - -export const failures = [ - { - value: data, - type: 'string', - refinement: 'nonempty', - path: [], - branch: [data], - }, -] diff --git a/test/validation/empty/invalid-array.test.ts b/test/validation/empty/invalid-array.test.ts new file mode 100644 index 00000000..bf953c78 --- /dev/null +++ b/test/validation/empty/invalid-array.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { array, empty, number } from '../../../src' + +test('Invalid empty array', () => { + const data = [1, 2, 3] + const [err, res] = validate(data, empty(array(number()))) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: data, + type: 'array', + refinement: 'empty', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/empty/invalid-array.ts b/test/validation/empty/invalid-array.ts deleted file mode 100644 index 27abbfb6..00000000 --- a/test/validation/empty/invalid-array.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { array, empty, number } from '../../../src' - -export const Struct = empty(array(number())) - -export const data = [1, 2, 3] - -export const failures = [ - { - value: data, - type: 'array', - refinement: 'empty', - path: [], - branch: [data], - }, -] diff --git a/test/validation/empty/invalid-map.test.ts b/test/validation/empty/invalid-map.test.ts new file mode 100644 index 00000000..91f83cbc --- /dev/null +++ b/test/validation/empty/invalid-map.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { map, empty, number, string } from '../../../src' + +test('Invalid empty map', () => { + const data = new Map([[1, 'a']]) + const [err, res] = validate(data, empty(map(number(), string()))) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: data, + type: 'map', + refinement: 'empty', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/empty/invalid-map.ts b/test/validation/empty/invalid-map.ts deleted file mode 100644 index 7deb6535..00000000 --- a/test/validation/empty/invalid-map.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { map, empty, number, string } from '../../../src' - -export const Struct = empty(map(number(), string())) - -export const data = new Map([[1, 'a']]) - -export const failures = [ - { - value: data, - type: 'map', - refinement: 'empty', - path: [], - branch: [data], - }, -] diff --git a/test/validation/empty/invalid-set.test.ts b/test/validation/empty/invalid-set.test.ts new file mode 100644 index 00000000..3b3923cf --- /dev/null +++ b/test/validation/empty/invalid-set.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { set, empty, number } from '../../../src' + +test('Invalid empty set', () => { + const data = new Set([1, 2, 3]) + const [err, res] = validate(data, empty(set(number()))) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: data, + type: 'set', + refinement: 'empty', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/empty/invalid-set.ts b/test/validation/empty/invalid-set.ts deleted file mode 100644 index 1d21266c..00000000 --- a/test/validation/empty/invalid-set.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { set, empty, number } from '../../../src' - -export const Struct = empty(set(number())) - -export const data = new Set([1, 2, 3]) - -export const failures = [ - { - value: data, - type: 'set', - refinement: 'empty', - path: [], - branch: [data], - }, -] diff --git a/test/validation/empty/invalid-string.test.ts b/test/validation/empty/invalid-string.test.ts new file mode 100644 index 00000000..af797862 --- /dev/null +++ b/test/validation/empty/invalid-string.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { string, empty } from '../../../src' + +test('Invalid empty string', () => { + const data = 'invalid' + const [err, res] = validate(data, empty(string())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'string', + refinement: 'empty', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/empty/invalid-string.ts b/test/validation/empty/invalid-string.ts deleted file mode 100644 index 58e80560..00000000 --- a/test/validation/empty/invalid-string.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { string, empty } from '../../../src' - -export const Struct = empty(string()) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'string', - refinement: 'empty', - path: [], - branch: [data], - }, -] diff --git a/test/validation/empty/valid-array.test.ts b/test/validation/empty/valid-array.test.ts new file mode 100644 index 00000000..f09c3786 --- /dev/null +++ b/test/validation/empty/valid-array.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, array, empty } from '../../../src' + +test('Valid empty array', () => { + const data = [] + assert(data, empty(array(number()))) + expect(data).toStrictEqual([]) +}) diff --git a/test/validation/empty/valid-array.ts b/test/validation/empty/valid-array.ts deleted file mode 100644 index d90e8cbd..00000000 --- a/test/validation/empty/valid-array.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, array, empty } from '../../../src' - -export const Struct = empty(array(number())) - -export const data = [] - -export const output = [] diff --git a/test/validation/empty/valid-map.test.ts b/test/validation/empty/valid-map.test.ts new file mode 100644 index 00000000..11cfa405 --- /dev/null +++ b/test/validation/empty/valid-map.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { string, number, map, empty } from '../../../src' + +test('Valid empty map', () => { + const data = new Map() + assert(data, empty(map(number(), string()))) + expect(data).toStrictEqual(data) +}) diff --git a/test/validation/empty/valid-map.ts b/test/validation/empty/valid-map.ts deleted file mode 100644 index e203f42e..00000000 --- a/test/validation/empty/valid-map.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { string, number, map, empty } from '../../../src' - -export const Struct = empty(map(number(), string())) - -export const data = new Map() - -export const output = data diff --git a/test/validation/empty/valid-set.test.ts b/test/validation/empty/valid-set.test.ts new file mode 100644 index 00000000..a00a72f7 --- /dev/null +++ b/test/validation/empty/valid-set.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, set, empty } from '../../../src' + +test('Valid empty set', () => { + const data = new Set() + assert(data, empty(set(number()))) + expect(data).toStrictEqual(data) +}) diff --git a/test/validation/empty/valid-set.ts b/test/validation/empty/valid-set.ts deleted file mode 100644 index a20bb7ca..00000000 --- a/test/validation/empty/valid-set.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, set, empty } from '../../../src' - -export const Struct = empty(set(number())) - -export const data = new Set() - -export const output = data diff --git a/test/validation/empty/valid-string.test.ts b/test/validation/empty/valid-string.test.ts new file mode 100644 index 00000000..61d9d98f --- /dev/null +++ b/test/validation/empty/valid-string.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { string, empty } from '../../../src' + +test('Valid empty string', () => { + const data = '' + assert(data, empty(string())) + expect(data).toStrictEqual('') +}) diff --git a/test/validation/empty/valid-string.ts b/test/validation/empty/valid-string.ts deleted file mode 100644 index 2925c2e8..00000000 --- a/test/validation/empty/valid-string.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { string, empty } from '../../../src' - -export const Struct = empty(string()) - -export const data = '' - -export const output = '' diff --git a/test/validation/enums/invalid-numbers.test.ts b/test/validation/enums/invalid-numbers.test.ts new file mode 100644 index 00000000..8f6d2162 --- /dev/null +++ b/test/validation/enums/invalid-numbers.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { enums } from '../../../src' + +test('Invalid enums numbers', () => { + const data = 'invalid' + const [err, res] = validate(data, enums([1, 2])) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'enums', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/enums/invalid-numbers.ts b/test/validation/enums/invalid-numbers.ts deleted file mode 100644 index 8e3aeb2d..00000000 --- a/test/validation/enums/invalid-numbers.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { enums } from '../../../src' - -export const Struct = enums([1, 2]) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'enums', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/enums/invalid-strings.test.ts b/test/validation/enums/invalid-strings.test.ts new file mode 100644 index 00000000..5f95c6e7 --- /dev/null +++ b/test/validation/enums/invalid-strings.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { enums } from '../../../src' + +test('Invalid enums strings', () => { + const data = 'invalid' + const [err, res] = validate(data, enums(['one', 'two'])) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'enums', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/enums/invalid-strings.ts b/test/validation/enums/invalid-strings.ts deleted file mode 100644 index 2711dcc8..00000000 --- a/test/validation/enums/invalid-strings.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { enums } from '../../../src' - -export const Struct = enums(['one', 'two']) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'enums', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/enums/valid.test.ts b/test/validation/enums/valid.test.ts new file mode 100644 index 00000000..5093295e --- /dev/null +++ b/test/validation/enums/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { enums } from '../../../src' + +test('Valid enums', () => { + const data = 'two' + assert(data, enums(['one', 'two'])) + expect(data).toStrictEqual('two') +}) diff --git a/test/validation/enums/valid.ts b/test/validation/enums/valid.ts deleted file mode 100644 index 5e63da93..00000000 --- a/test/validation/enums/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { enums } from '../../../src' - -export const Struct = enums(['one', 'two']) - -export const data = 'two' - -export const output = 'two' diff --git a/test/validation/function/invalid.test.ts b/test/validation/function/invalid.test.ts new file mode 100644 index 00000000..666f450c --- /dev/null +++ b/test/validation/function/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { func } from '../../../src' + +test('Invalid function', () => { + const data = false + const [err, res] = validate(data, func()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: false, + type: 'func', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/function/invalid.ts b/test/validation/function/invalid.ts deleted file mode 100644 index dbc7bdd8..00000000 --- a/test/validation/function/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { func } from '../../../src' - -export const Struct = func() - -export const data = false - -export const failures = [ - { - value: false, - type: 'func', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/function/valid.test.ts b/test/validation/function/valid.test.ts new file mode 100644 index 00000000..990136bf --- /dev/null +++ b/test/validation/function/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { func } from '../../../src' + +test('Valid function', () => { + const data = function () {} + assert(data, func()) + expect(data).toStrictEqual(data) +}) diff --git a/test/validation/function/valid.ts b/test/validation/function/valid.ts deleted file mode 100644 index a9318bbe..00000000 --- a/test/validation/function/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { func } from '../../../src' - -export const Struct = func() - -export const data = function () {} - -export const output = data diff --git a/test/validation/instance/invalid.test.ts b/test/validation/instance/invalid.test.ts new file mode 100644 index 00000000..da6137b1 --- /dev/null +++ b/test/validation/instance/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { instance } from '../../../src' + +test('Invalid instance', () => { + const data = false + const [err, res] = validate(data, instance(Array)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: false, + type: 'instance', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/instance/invalid.ts b/test/validation/instance/invalid.ts deleted file mode 100644 index 73462668..00000000 --- a/test/validation/instance/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { instance } from '../../../src' - -export const Struct = instance(Array) - -export const data = false - -export const failures = [ - { - value: false, - type: 'instance', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/instance/valid.test.ts b/test/validation/instance/valid.test.ts new file mode 100644 index 00000000..d86bf305 --- /dev/null +++ b/test/validation/instance/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { instance } from '../../../src' + +test('Valid instance', () => { + const data = [1] + assert(data, instance(Array)) + expect(data).toStrictEqual([1]) +}) diff --git a/test/validation/instance/valid.ts b/test/validation/instance/valid.ts deleted file mode 100644 index 21645966..00000000 --- a/test/validation/instance/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { instance } from '../../../src' - -export const Struct = instance(Array) - -export const data = [1] - -export const output = [1] diff --git a/test/validation/integer/invalid-decimal.test.ts b/test/validation/integer/invalid-decimal.test.ts new file mode 100644 index 00000000..5d7418f7 --- /dev/null +++ b/test/validation/integer/invalid-decimal.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { integer } from '../../../src' + +test('Invalid integer decimal', () => { + const data = 3.14 + const [err, res] = validate(data, integer()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 3.14, + type: 'integer', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/integer/invalid-decimal.ts b/test/validation/integer/invalid-decimal.ts deleted file mode 100644 index f39e1185..00000000 --- a/test/validation/integer/invalid-decimal.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { integer } from '../../../src' - -export const Struct = integer() - -export const data = 3.14 - -export const failures = [ - { - value: 3.14, - type: 'integer', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/integer/invalid.test.ts b/test/validation/integer/invalid.test.ts new file mode 100644 index 00000000..511cee34 --- /dev/null +++ b/test/validation/integer/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { integer } from '../../../src' + +test('Invalid integer', () => { + const data = 'invalid' + const [err, res] = validate(data, integer()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'integer', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/integer/invalid.ts b/test/validation/integer/invalid.ts deleted file mode 100644 index d3732b18..00000000 --- a/test/validation/integer/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { integer } from '../../../src' - -export const Struct = integer() - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'integer', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/integer/valid.test.ts b/test/validation/integer/valid.test.ts new file mode 100644 index 00000000..dce4d4d3 --- /dev/null +++ b/test/validation/integer/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { integer } from '../../../src' + +test('Valid integer', () => { + const data = 42 + assert(data, integer()) + expect(data).toStrictEqual(42) +}) diff --git a/test/validation/integer/valid.ts b/test/validation/integer/valid.ts deleted file mode 100644 index 34673bf2..00000000 --- a/test/validation/integer/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { integer } from '../../../src' - -export const Struct = integer() - -export const data = 42 - -export const output = 42 diff --git a/test/validation/intersection/invalid-refinement.test.ts b/test/validation/intersection/invalid-refinement.test.ts new file mode 100644 index 00000000..dc924594 --- /dev/null +++ b/test/validation/intersection/invalid-refinement.test.ts @@ -0,0 +1,22 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { intersection, refine, number } from '../../../src' + +const A = number() +const B = refine(number(), 'positive', (value) => value > 0) + +test('Invalid intersection refinement', () => { + const data = -1 + const [err, res] = validate(data, intersection([A, B])) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + type: 'number', + refinement: 'positive', + value: -1, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/intersection/invalid-refinement.ts b/test/validation/intersection/invalid-refinement.ts deleted file mode 100644 index 701d7d02..00000000 --- a/test/validation/intersection/invalid-refinement.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { intersection, refine, number } from '../../../src' - -const A = number() -const B = refine(number(), 'positive', (value) => value > 0) - -export const Struct = intersection([A, B]) - -export const data = -1 - -export const failures = [ - { - type: 'number', - refinement: 'positive', - value: -1, - path: [], - branch: [data], - }, -] diff --git a/test/validation/intersection/invalid.test.ts b/test/validation/intersection/invalid.test.ts new file mode 100644 index 00000000..d69cc21c --- /dev/null +++ b/test/validation/intersection/invalid.test.ts @@ -0,0 +1,26 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { type, intersection, string, number } from '../../../src' + +const A = type({ a: string() }) +const B = type({ b: number() }) + +test('Invalid intersection', () => { + const data = { + a: 'a', + b: 'invalid', + } + + const [err, res] = validate(data, intersection([A, B])) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + type: 'number', + value: 'invalid', + refinement: undefined, + path: ['b'], + branch: [data, data.b], + }, + ]) +}) diff --git a/test/validation/intersection/invalid.ts b/test/validation/intersection/invalid.ts deleted file mode 100644 index dab2d018..00000000 --- a/test/validation/intersection/invalid.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { type, intersection, string, number } from '../../../src' - -const A = type({ a: string() }) -const B = type({ b: number() }) - -export const Struct = intersection([A, B]) - -export const data = { - a: 'a', - b: 'invalid', -} - -export const failures = [ - { - type: 'number', - value: 'invalid', - refinement: undefined, - path: ['b'], - branch: [data, data.b], - }, -] diff --git a/test/validation/intersection/valid-refinement.test.ts b/test/validation/intersection/valid-refinement.test.ts new file mode 100644 index 00000000..213e9a71 --- /dev/null +++ b/test/validation/intersection/valid-refinement.test.ts @@ -0,0 +1,12 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { intersection, refine, number } from '../../../src' + +const A = number() +const B = refine(number(), 'positive', (value) => value > 0) + +test('Valid intersection refinement', () => { + const data = 1 + assert(data, intersection([A, B])) + expect(data).toStrictEqual(1) +}) diff --git a/test/validation/intersection/valid-refinement.ts b/test/validation/intersection/valid-refinement.ts deleted file mode 100644 index 27d58c25..00000000 --- a/test/validation/intersection/valid-refinement.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { intersection, refine, number } from '../../../src' - -const A = number() -const B = refine(number(), 'positive', (value) => value > 0) - -export const Struct = intersection([A, B]) - -export const data = 1 - -export const output = 1 diff --git a/test/validation/intersection/valid.test.ts b/test/validation/intersection/valid.test.ts new file mode 100644 index 00000000..992e06e3 --- /dev/null +++ b/test/validation/intersection/valid.test.ts @@ -0,0 +1,20 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { type, intersection, string, number } from '../../../src' + +const A = type({ a: string() }) +const B = type({ b: number() }) + +test('Valid intersection', () => { + const data = { + a: 'a', + b: 42, + } + + assert(data, intersection([A, B])) + + expect(data).toStrictEqual({ + a: 'a', + b: 42, + }) +}) diff --git a/test/validation/intersection/valid.ts b/test/validation/intersection/valid.ts deleted file mode 100644 index 3b2473bf..00000000 --- a/test/validation/intersection/valid.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { type, intersection, string, number } from '../../../src' - -const A = type({ a: string() }) -const B = type({ b: number() }) - -export const Struct = intersection([A, B]) - -export const data = { - a: 'a', - b: 42, -} - -export const output = { - a: 'a', - b: 42, -} diff --git a/test/validation/lazy/invalid.test.ts b/test/validation/lazy/invalid.test.ts new file mode 100644 index 00000000..69a06be7 --- /dev/null +++ b/test/validation/lazy/invalid.test.ts @@ -0,0 +1,22 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { lazy, string } from '../../../src' + +test('Invalid lazy', () => { + const data = 3 + const [err, res] = validate( + data, + lazy(() => string()) + ) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 3, + type: 'string', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/lazy/invalid.ts b/test/validation/lazy/invalid.ts deleted file mode 100644 index ac79bd1c..00000000 --- a/test/validation/lazy/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { lazy, string } from '../../../src' - -export const Struct = lazy(() => string()) - -export const data = 3 - -export const failures = [ - { - value: 3, - type: 'string', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/lazy/valid.test.ts b/test/validation/lazy/valid.test.ts new file mode 100644 index 00000000..3fa45b18 --- /dev/null +++ b/test/validation/lazy/valid.test.ts @@ -0,0 +1,12 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { lazy, string } from '../../../src' + +test('Valid lazy', () => { + const data = 'two' + assert( + data, + lazy(() => string()) + ) + expect(data).toStrictEqual('two') +}) diff --git a/test/validation/lazy/valid.ts b/test/validation/lazy/valid.ts deleted file mode 100644 index b1802910..00000000 --- a/test/validation/lazy/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { lazy, string } from '../../../src' - -export const Struct = lazy(() => string()) - -export const data = 'two' - -export const output = 'two' diff --git a/test/validation/lazy/with-refiners.test.ts b/test/validation/lazy/with-refiners.test.ts new file mode 100644 index 00000000..813576a9 --- /dev/null +++ b/test/validation/lazy/with-refiners.test.ts @@ -0,0 +1,22 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { lazy, nonempty, string } from '../../../src' + +test('With lazy refiners', () => { + const data = '' + const [err, res] = validate( + data, + lazy(() => nonempty(string())) + ) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: data, + type: 'string', + refinement: 'nonempty', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/lazy/with-refiners.ts b/test/validation/lazy/with-refiners.ts deleted file mode 100644 index 2261963b..00000000 --- a/test/validation/lazy/with-refiners.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { lazy, nonempty, string } from '../../../src' - -export const Struct = lazy(() => nonempty(string())) - -export const data = '' - -export const failures = [ - { - value: data, - type: 'string', - refinement: 'nonempty', - path: [], - branch: [data], - }, -] diff --git a/test/validation/literal/invalid.test.ts b/test/validation/literal/invalid.test.ts new file mode 100644 index 00000000..0ae52a9c --- /dev/null +++ b/test/validation/literal/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { literal } from '../../../src' + +test('Invalid literal', () => { + const data = false + const [err, res] = validate(data, literal(42)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: false, + type: 'literal', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/literal/invalid.ts b/test/validation/literal/invalid.ts deleted file mode 100644 index f7473a3e..00000000 --- a/test/validation/literal/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { literal } from '../../../src' - -export const Struct = literal(42) - -export const data = false - -export const failures = [ - { - value: false, - type: 'literal', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/literal/valid.test.ts b/test/validation/literal/valid.test.ts new file mode 100644 index 00000000..6b5f912a --- /dev/null +++ b/test/validation/literal/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { literal } from '../../../src' + +test('Valid literal', () => { + const data = 42 + assert(data, literal(42)) + expect(data).toStrictEqual(42) +}) diff --git a/test/validation/literal/valid.ts b/test/validation/literal/valid.ts deleted file mode 100644 index 70ea8fb4..00000000 --- a/test/validation/literal/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { literal } from '../../../src' - -export const Struct = literal(42) - -export const data = 42 - -export const output = 42 diff --git a/test/validation/map/invalid-opaque.test.ts b/test/validation/map/invalid-opaque.test.ts new file mode 100644 index 00000000..6e15ac5c --- /dev/null +++ b/test/validation/map/invalid-opaque.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { map } from '../../../src' + +test('Invalid map opaque', () => { + const data = 'invalid' + const [err, res] = validate(data, map()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'map', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/map/invalid-opaque.ts b/test/validation/map/invalid-opaque.ts deleted file mode 100644 index 4dfe413a..00000000 --- a/test/validation/map/invalid-opaque.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { map } from '../../../src' - -export const Struct = map() - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'map', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/map/invalid-property.test.ts b/test/validation/map/invalid-property.test.ts new file mode 100644 index 00000000..dec77f68 --- /dev/null +++ b/test/validation/map/invalid-property.test.ts @@ -0,0 +1,30 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { map, string, number } from '../../../src' + +test('Invalid map property', () => { + const data = new Map([ + ['a', 'a'], + ['b', 'b'], + ]) + + const [err, res] = validate(data, map(string(), number())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'a', + type: 'number', + refinement: undefined, + path: ['a'], + branch: [data, 'a'], + }, + { + value: 'b', + type: 'number', + refinement: undefined, + path: ['b'], + branch: [data, 'b'], + }, + ]) +}) diff --git a/test/validation/map/invalid-property.ts b/test/validation/map/invalid-property.ts deleted file mode 100644 index a89c3a3f..00000000 --- a/test/validation/map/invalid-property.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { map, string, number } from '../../../src' - -export const Struct = map(string(), number()) - -export const data = new Map([ - ['a', 'a'], - ['b', 'b'], -]) - -export const failures = [ - { - value: 'a', - type: 'number', - refinement: undefined, - path: ['a'], - branch: [data, 'a'], - }, - { - value: 'b', - type: 'number', - refinement: undefined, - path: ['b'], - branch: [data, 'b'], - }, -] diff --git a/test/validation/map/invalid.test.ts b/test/validation/map/invalid.test.ts new file mode 100644 index 00000000..562c1665 --- /dev/null +++ b/test/validation/map/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { map, string, number } from '../../../src' + +test('Invalid map', () => { + const data = 'invalid' + const [err, res] = validate(data, map(string(), number())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'map', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/map/invalid.ts b/test/validation/map/invalid.ts deleted file mode 100644 index 9de01047..00000000 --- a/test/validation/map/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { map, string, number } from '../../../src' - -export const Struct = map(string(), number()) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'map', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/map/valid-opaque.ts b/test/validation/map/valid-opaque.test.ts similarity index 100% rename from test/validation/map/valid-opaque.ts rename to test/validation/map/valid-opaque.test.ts diff --git a/test/validation/map/valid.test.ts b/test/validation/map/valid.test.ts new file mode 100644 index 00000000..9224345e --- /dev/null +++ b/test/validation/map/valid.test.ts @@ -0,0 +1,19 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { map, string, number } from '../../../src' + +test('Valid map', () => { + const data = new Map([ + ['a', 1], + ['b', 2], + ]) + + assert(data, map(string(), number())) + + expect(data).toStrictEqual( + new Map([ + ['a', 1], + ['b', 2], + ]) + ) +}) diff --git a/test/validation/map/valid.ts b/test/validation/map/valid.ts deleted file mode 100644 index e7a24d7e..00000000 --- a/test/validation/map/valid.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { map, string, number } from '../../../src' - -export const Struct = map(string(), number()) - -export const data = new Map([ - ['a', 1], - ['b', 2], -]) - -export const output = new Map([ - ['a', 1], - ['b', 2], -]) diff --git a/test/validation/max/invalid-exclusive.test.ts b/test/validation/max/invalid-exclusive.test.ts new file mode 100644 index 00000000..fc835105 --- /dev/null +++ b/test/validation/max/invalid-exclusive.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { number, max } from '../../../src' + +test('Invalid max exclusive', () => { + const data = 0 + const [err, res] = validate(data, max(number(), 0, { exclusive: true })) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 0, + type: 'number', + refinement: 'max', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/max/invalid-exclusive.ts b/test/validation/max/invalid-exclusive.ts deleted file mode 100644 index 3e4f43f6..00000000 --- a/test/validation/max/invalid-exclusive.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { number, max } from '../../../src' - -export const Struct = max(number(), 0, { exclusive: true }) - -export const data = 0 - -export const failures = [ - { - value: 0, - type: 'number', - refinement: 'max', - path: [], - branch: [data], - }, -] diff --git a/test/validation/max/invalid.test.ts b/test/validation/max/invalid.test.ts new file mode 100644 index 00000000..d6e8b693 --- /dev/null +++ b/test/validation/max/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { number, max } from '../../../src' + +test('Invalid max', () => { + const data = 1 + const [err, res] = validate(data, max(number(), 0)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 1, + type: 'number', + refinement: 'max', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/max/invalid.ts b/test/validation/max/invalid.ts deleted file mode 100644 index 324ecd21..00000000 --- a/test/validation/max/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { number, max } from '../../../src' - -export const Struct = max(number(), 0) - -export const data = 1 - -export const failures = [ - { - value: 1, - type: 'number', - refinement: 'max', - path: [], - branch: [data], - }, -] diff --git a/test/validation/max/valid-inclusive.test.ts b/test/validation/max/valid-inclusive.test.ts new file mode 100644 index 00000000..e9673cbf --- /dev/null +++ b/test/validation/max/valid-inclusive.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, max } from '../../../src' + +test('Valid max inclusive', () => { + const data = 0 + assert(data, max(number(), 0)) + expect(data).toStrictEqual(0) +}) diff --git a/test/validation/max/valid-inclusive.ts b/test/validation/max/valid-inclusive.ts deleted file mode 100644 index b76c753d..00000000 --- a/test/validation/max/valid-inclusive.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, max } from '../../../src' - -export const Struct = max(number(), 0) - -export const data = 0 - -export const output = 0 diff --git a/test/validation/max/valid.test.ts b/test/validation/max/valid.test.ts new file mode 100644 index 00000000..0fc87e32 --- /dev/null +++ b/test/validation/max/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, max } from '../../../src' + +test('Valid max', () => { + const data = -1 + assert(data, max(number(), 0)) + expect(data).toStrictEqual(-1) +}) diff --git a/test/validation/max/valid.ts b/test/validation/max/valid.ts deleted file mode 100644 index 5a94da8c..00000000 --- a/test/validation/max/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, max } from '../../../src' - -export const Struct = max(number(), 0) - -export const data = -1 - -export const output = -1 diff --git a/test/validation/min/invalid-exclusive.test.ts b/test/validation/min/invalid-exclusive.test.ts new file mode 100644 index 00000000..32fc5407 --- /dev/null +++ b/test/validation/min/invalid-exclusive.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { number, min } from '../../../src' + +test('Invalid min exclusive', () => { + const data = 0 + const [err, res] = validate(data, min(number(), 0, { exclusive: true })) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 0, + type: 'number', + refinement: 'min', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/min/invalid-exclusive.ts b/test/validation/min/invalid-exclusive.ts deleted file mode 100644 index 5ece76ef..00000000 --- a/test/validation/min/invalid-exclusive.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { number, min } from '../../../src' - -export const Struct = min(number(), 0, { exclusive: true }) - -export const data = 0 - -export const failures = [ - { - value: 0, - type: 'number', - refinement: 'min', - path: [], - branch: [data], - }, -] diff --git a/test/validation/min/invalid.test.ts b/test/validation/min/invalid.test.ts new file mode 100644 index 00000000..74aa3404 --- /dev/null +++ b/test/validation/min/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { number, min } from '../../../src' + +test('Invalid min', () => { + const data = -1 + const [err, res] = validate(data, min(number(), 0)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: -1, + type: 'number', + refinement: 'min', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/min/invalid.ts b/test/validation/min/invalid.ts deleted file mode 100644 index 72f4e1ad..00000000 --- a/test/validation/min/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { number, min } from '../../../src' - -export const Struct = min(number(), 0) - -export const data = -1 - -export const failures = [ - { - value: -1, - type: 'number', - refinement: 'min', - path: [], - branch: [data], - }, -] diff --git a/test/validation/min/valid-inclusive.test.ts b/test/validation/min/valid-inclusive.test.ts new file mode 100644 index 00000000..7fe72045 --- /dev/null +++ b/test/validation/min/valid-inclusive.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, min } from '../../../src' + +test('Valid min inclusive', () => { + const data = 0 + assert(data, min(number(), 0)) + expect(data).toStrictEqual(0) +}) diff --git a/test/validation/min/valid-inclusive.ts b/test/validation/min/valid-inclusive.ts deleted file mode 100644 index 48b0c9ea..00000000 --- a/test/validation/min/valid-inclusive.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, min } from '../../../src' - -export const Struct = min(number(), 0) - -export const data = 0 - -export const output = 0 diff --git a/test/validation/min/valid.test.ts b/test/validation/min/valid.test.ts new file mode 100644 index 00000000..bbcfbee2 --- /dev/null +++ b/test/validation/min/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, min } from '../../../src' + +test('Valid min', () => { + const data = 3 + assert(data, min(number(), 0)) + expect(data).toStrictEqual(3) +}) diff --git a/test/validation/min/valid.ts b/test/validation/min/valid.ts deleted file mode 100644 index c33d7f6b..00000000 --- a/test/validation/min/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, min } from '../../../src' - -export const Struct = min(number(), 0) - -export const data = 3 - -export const output = 3 diff --git a/test/validation/never/invalid.test.ts b/test/validation/never/invalid.test.ts new file mode 100644 index 00000000..8965a6e9 --- /dev/null +++ b/test/validation/never/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { never } from '../../../src' + +test('Invalid never', () => { + const data = true + const [err, res] = validate(data, never()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: true, + type: 'never', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/never/invalid.ts b/test/validation/never/invalid.ts deleted file mode 100644 index 8b99fb39..00000000 --- a/test/validation/never/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { never } from '../../../src' - -export const Struct = never() - -export const data = true - -export const failures = [ - { - value: true, - type: 'never', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/nullable/invalid.test.ts b/test/validation/nullable/invalid.test.ts new file mode 100644 index 00000000..8df7b8e9 --- /dev/null +++ b/test/validation/nullable/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { number, nullable } from '../../../src' + +test('Invalid nullable', () => { + const data = 'invalid' + const [err, res] = validate(data, nullable(number())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/nullable/invalid.ts b/test/validation/nullable/invalid.ts deleted file mode 100644 index 028d879e..00000000 --- a/test/validation/nullable/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { number, nullable } from '../../../src' - -export const Struct = nullable(number()) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/nullable/valid-defined-nested.test.ts b/test/validation/nullable/valid-defined-nested.test.ts new file mode 100644 index 00000000..75e76f37 --- /dev/null +++ b/test/validation/nullable/valid-defined-nested.test.ts @@ -0,0 +1,23 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { type, string, number, nullable } from '../../../src' + +test('Valid nullable defined nested', () => { + const data = { + name: 'Jill', + age: 42, + } + + assert( + data, + type({ + name: nullable(string()), + age: number(), + }) + ) + + expect(data).toStrictEqual({ + name: 'Jill', + age: 42, + }) +}) diff --git a/test/validation/nullable/valid-defined-nested.ts b/test/validation/nullable/valid-defined-nested.ts deleted file mode 100644 index b357ba8e..00000000 --- a/test/validation/nullable/valid-defined-nested.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { type, string, number, nullable } from '../../../src' - -export const Struct = type({ - name: nullable(string()), - age: number(), -}) - -export const data = { - name: 'Jill', - age: 42, -} - -export const output = { - name: 'Jill', - age: 42, -} diff --git a/test/validation/nullable/valid-defined.test.ts b/test/validation/nullable/valid-defined.test.ts new file mode 100644 index 00000000..1820a30b --- /dev/null +++ b/test/validation/nullable/valid-defined.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, nullable } from '../../../src' + +test('Valid nullable defined', () => { + const data = 42 + assert(data, nullable(number())) + expect(data).toStrictEqual(42) +}) diff --git a/test/validation/nullable/valid-defined.ts b/test/validation/nullable/valid-defined.ts deleted file mode 100644 index 18eb8a74..00000000 --- a/test/validation/nullable/valid-defined.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, nullable } from '../../../src' - -export const Struct = nullable(number()) - -export const data = 42 - -export const output = 42 diff --git a/test/validation/nullable/valid-null-nested.test.ts b/test/validation/nullable/valid-null-nested.test.ts new file mode 100644 index 00000000..488c431b --- /dev/null +++ b/test/validation/nullable/valid-null-nested.test.ts @@ -0,0 +1,23 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { type, string, number, nullable } from '../../../src' + +test('Valid nullable null nested', () => { + const data = { + name: null, + age: 42, + } + + assert( + data, + type({ + name: nullable(string()), + age: number(), + }) + ) + + expect(data).toStrictEqual({ + name: null, + age: 42, + }) +}) diff --git a/test/validation/nullable/valid-null-nested.ts b/test/validation/nullable/valid-null-nested.ts deleted file mode 100644 index 9db75acb..00000000 --- a/test/validation/nullable/valid-null-nested.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { type, string, number, nullable } from '../../../src' - -export const Struct = type({ - name: nullable(string()), - age: number(), -}) - -export const data = { - name: null, - age: 42, -} - -export const output = { - name: null, - age: 42, -} diff --git a/test/validation/nullable/valid-null.test.ts b/test/validation/nullable/valid-null.test.ts new file mode 100644 index 00000000..0e91f6ba --- /dev/null +++ b/test/validation/nullable/valid-null.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, nullable } from '../../../src' + +test('Valid nullable null', () => { + const data = null + assert(data, nullable(number())) + expect(data).toStrictEqual(null) +}) diff --git a/test/validation/nullable/valid-null.ts b/test/validation/nullable/valid-null.ts deleted file mode 100644 index 528493f0..00000000 --- a/test/validation/nullable/valid-null.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, nullable } from '../../../src' - -export const Struct = nullable(number()) - -export const data = null - -export const output = null diff --git a/test/validation/number/invalid.test.ts b/test/validation/number/invalid.test.ts new file mode 100644 index 00000000..da946a34 --- /dev/null +++ b/test/validation/number/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { number } from '../../../src' + +test('Invalid number', () => { + const data = 'invalid' + const [err, res] = validate(data, number()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/number/invalid.ts b/test/validation/number/invalid.ts deleted file mode 100644 index 140420e7..00000000 --- a/test/validation/number/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { number } from '../../../src' - -export const Struct = number() - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/number/valid.test.ts b/test/validation/number/valid.test.ts new file mode 100644 index 00000000..6f54c5c9 --- /dev/null +++ b/test/validation/number/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number } from '../../../src' + +test('Valid number', () => { + const data = 42 + assert(data, number()) + expect(data).toStrictEqual(42) +}) diff --git a/test/validation/number/valid.ts b/test/validation/number/valid.ts deleted file mode 100644 index 8ea8b9a2..00000000 --- a/test/validation/number/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number } from '../../../src' - -export const Struct = number() - -export const data = 42 - -export const output = 42 diff --git a/test/validation/object/invalid-array.test.ts b/test/validation/object/invalid-array.test.ts new file mode 100644 index 00000000..901bfd30 --- /dev/null +++ b/test/validation/object/invalid-array.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { object } from '../../../src' + +test('Invalid object array', () => { + const data = [] + const [err, res] = validate(data, object()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: [], + type: 'object', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/object/invalid-array.ts b/test/validation/object/invalid-array.ts deleted file mode 100644 index 0555dae0..00000000 --- a/test/validation/object/invalid-array.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { object } from '../../../src' - -export const Struct = object() - -export const data = [] - -export const failures = [ - { - value: [], - type: 'object', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/object/invalid-element-nested.test.ts b/test/validation/object/invalid-element-nested.test.ts new file mode 100644 index 00000000..0048e494 --- /dev/null +++ b/test/validation/object/invalid-element-nested.test.ts @@ -0,0 +1,30 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { object, array, string } from '../../../src' + +test('Invalid object element nested', () => { + const data = { + name: 'john', + emails: ['name@example.com', false], + } + + const [err, res] = validate( + data, + object({ + name: string(), + emails: array(string()), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: false, + type: 'string', + refinement: undefined, + path: ['emails', 1], + branch: [data, data.emails, data.emails[1]], + }, + ]) +}) diff --git a/test/validation/object/invalid-element-nested.ts b/test/validation/object/invalid-element-nested.ts deleted file mode 100644 index e442244b..00000000 --- a/test/validation/object/invalid-element-nested.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { object, array, string } from '../../../src' - -export const Struct = object({ - name: string(), - emails: array(string()), -}) - -export const data = { - name: 'john', - emails: ['name@example.com', false], -} - -export const failures = [ - { - value: false, - type: 'string', - refinement: undefined, - path: ['emails', 1], - branch: [data, data.emails, data.emails[1]], - }, -] diff --git a/test/validation/object/invalid-opaque.test.ts b/test/validation/object/invalid-opaque.test.ts new file mode 100644 index 00000000..14f8059d --- /dev/null +++ b/test/validation/object/invalid-opaque.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { object } from '../../../src' + +test('Invalid object opaque', () => { + const data = 'invalid' + const [err, res] = validate(data, object()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'object', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/object/invalid-opaque.ts b/test/validation/object/invalid-opaque.ts deleted file mode 100644 index c2f1918c..00000000 --- a/test/validation/object/invalid-opaque.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { object } from '../../../src' - -export const Struct = object() - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'object', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/object/invalid-property-nested.test.ts b/test/validation/object/invalid-property-nested.test.ts new file mode 100644 index 00000000..19499812 --- /dev/null +++ b/test/validation/object/invalid-property-nested.test.ts @@ -0,0 +1,36 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { object, string } from '../../../src' + +test('Invalid object property nested', () => { + const data = { + name: 'john', + address: { + street: 123, + city: 'Springfield', + }, + } + + const [err, res] = validate( + data, + object({ + name: string(), + address: object({ + street: string(), + city: string(), + }), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 123, + type: 'string', + refinement: undefined, + path: ['address', 'street'], + branch: [data, data.address, data.address.street], + }, + ]) +}) diff --git a/test/validation/object/invalid-property-nested.ts b/test/validation/object/invalid-property-nested.ts deleted file mode 100644 index 93960c9b..00000000 --- a/test/validation/object/invalid-property-nested.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { object, string } from '../../../src' - -export const Struct = object({ - name: string(), - address: object({ - street: string(), - city: string(), - }), -}) - -export const data = { - name: 'john', - address: { - street: 123, - city: 'Springfield', - }, -} - -export const failures = [ - { - value: 123, - type: 'string', - refinement: undefined, - path: ['address', 'street'], - branch: [data, data.address, data.address.street], - }, -] diff --git a/test/validation/object/invalid-property-unknown.test.ts b/test/validation/object/invalid-property-unknown.test.ts new file mode 100644 index 00000000..0af71381 --- /dev/null +++ b/test/validation/object/invalid-property-unknown.test.ts @@ -0,0 +1,31 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { object, string, number } from '../../../src' + +test('Invalid object property unknown', () => { + const data = { + name: 'john', + age: 42, + unknown: true, + } + + const [err, res] = validate( + data, + object({ + name: string(), + age: number(), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: true, + type: 'never', + refinement: undefined, + path: ['unknown'], + branch: [data, data.unknown], + }, + ]) +}) diff --git a/test/validation/object/invalid-property-unknown.ts b/test/validation/object/invalid-property-unknown.ts deleted file mode 100644 index b52d2479..00000000 --- a/test/validation/object/invalid-property-unknown.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { object, string, number } from '../../../src' - -export const Struct = object({ - name: string(), - age: number(), -}) - -export const data = { - name: 'john', - age: 42, - unknown: true, -} - -export const failures = [ - { - value: true, - type: 'never', - refinement: undefined, - path: ['unknown'], - branch: [data, data.unknown], - }, -] diff --git a/test/validation/object/invalid-property.test.ts b/test/validation/object/invalid-property.test.ts new file mode 100644 index 00000000..7cc205eb --- /dev/null +++ b/test/validation/object/invalid-property.test.ts @@ -0,0 +1,39 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { object, string, number } from '../../../src' + +test('Invalid object property', () => { + const data = { + name: 'john', + age: 'invalid', + height: 2, + } + + const [err, res] = validate( + data, + object({ + name: string(), + age: number(), + height: string(), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: ['age'], + branch: [data, data.age], + }, + { + value: 2, + type: 'string', + refinement: undefined, + path: ['height'], + branch: [data, data.height], + }, + ]) +}) diff --git a/test/validation/object/invalid-property.ts b/test/validation/object/invalid-property.ts deleted file mode 100644 index 1c575b99..00000000 --- a/test/validation/object/invalid-property.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { object, string, number } from '../../../src' - -export const Struct = object({ - name: string(), - age: number(), - height: string(), -}) - -export const data = { - name: 'john', - age: 'invalid', - height: 2, -} - -export const failures = [ - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: ['age'], - branch: [data, data.age], - }, - { - value: 2, - type: 'string', - refinement: undefined, - path: ['height'], - branch: [data, data.height], - }, -] diff --git a/test/validation/object/invalid-referential.test.ts b/test/validation/object/invalid-referential.test.ts new file mode 100644 index 00000000..b4549c3a --- /dev/null +++ b/test/validation/object/invalid-referential.test.ts @@ -0,0 +1,36 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { object, string, pattern, refine } from '../../../src' + +const Section = pattern(string(), /^\d+(\.\d+)*$/) + +test('Invalid object referential', () => { + const data = { + section: '1', + subsection: '2.1', + } + + const [err, res] = validate( + data, + object({ + section: Section, + subsection: refine(Section, 'Subsection', (value, ctx) => { + const { branch } = ctx + const parent = branch[0] + return value.startsWith(`${parent.section}.`) + }), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: '2.1', + type: 'string', + refinement: 'Subsection', + path: ['subsection'], + branch: [data, data.subsection], + }, + ]) +}) diff --git a/test/validation/object/invalid-referential.ts b/test/validation/object/invalid-referential.ts deleted file mode 100644 index de3b745f..00000000 --- a/test/validation/object/invalid-referential.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { object, string, pattern, refine } from '../../../src' - -const Section = pattern(string(), /^\d+(\.\d+)*$/) - -export const Struct = object({ - section: Section, - subsection: refine(Section, 'Subsection', (value, ctx) => { - const { branch } = ctx - const parent = branch[0] - return value.startsWith(`${parent.section}.`) - }), -}) - -export const data = { - section: '1', - subsection: '2.1', -} - -export const failures = [ - { - value: '2.1', - type: 'string', - refinement: 'Subsection', - path: ['subsection'], - branch: [data, data.subsection], - }, -] diff --git a/test/validation/object/invalid.test.ts b/test/validation/object/invalid.test.ts new file mode 100644 index 00000000..91dc3ce3 --- /dev/null +++ b/test/validation/object/invalid.test.ts @@ -0,0 +1,27 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { object, string, number } from '../../../src' + +test('Invalid object', () => { + const data = 'invalid' + + const [err, res] = validate( + data, + object({ + name: string(), + age: number(), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'object', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/object/invalid.ts b/test/validation/object/invalid.ts deleted file mode 100644 index 05252e82..00000000 --- a/test/validation/object/invalid.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { object, string, number } from '../../../src' - -export const Struct = object({ - name: string(), - age: number(), -}) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'object', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/object/valid-frozen.test.ts b/test/validation/object/valid-frozen.test.ts new file mode 100644 index 00000000..f196c125 --- /dev/null +++ b/test/validation/object/valid-frozen.test.ts @@ -0,0 +1,23 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { object, string, number } from '../../../src' + +test('Valid object frozen', () => { + const data = Object.freeze({ + name: 'john', + age: 42, + }) + + const res = create( + data, + object({ + name: string(), + age: number(), + }) + ) + + expect(res).toStrictEqual({ + name: 'john', + age: 42, + }) +}) diff --git a/test/validation/object/valid-frozen.ts b/test/validation/object/valid-frozen.ts deleted file mode 100644 index 462de9f1..00000000 --- a/test/validation/object/valid-frozen.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { object, string, number } from '../../../src' - -export const Struct = object({ - name: string(), - age: number(), -}) - -export const data = Object.freeze({ - name: 'john', - age: 42, -}) - -export const output = { - name: 'john', - age: 42, -} - -export const create = true diff --git a/test/validation/object/valid-nested.test.ts b/test/validation/object/valid-nested.test.ts new file mode 100644 index 00000000..bddcafb5 --- /dev/null +++ b/test/validation/object/valid-nested.test.ts @@ -0,0 +1,32 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { object, string } from '../../../src' + +test('Valid object nested', () => { + const data = { + name: 'john', + address: { + street: '123 Fake St', + city: 'Springfield', + }, + } + + assert( + data, + object({ + name: string(), + address: object({ + street: string(), + city: string(), + }), + }) + ) + + expect(data).toStrictEqual({ + name: 'john', + address: { + street: '123 Fake St', + city: 'Springfield', + }, + }) +}) diff --git a/test/validation/object/valid-nested.ts b/test/validation/object/valid-nested.ts deleted file mode 100644 index e7c46940..00000000 --- a/test/validation/object/valid-nested.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { object, string } from '../../../src' - -export const Struct = object({ - name: string(), - address: object({ - street: string(), - city: string(), - }), -}) - -export const data = { - name: 'john', - address: { - street: '123 Fake St', - city: 'Springfield', - }, -} - -export const output = { - name: 'john', - address: { - street: '123 Fake St', - city: 'Springfield', - }, -} diff --git a/test/validation/object/valid-opaque.test.ts b/test/validation/object/valid-opaque.test.ts new file mode 100644 index 00000000..c03c8aad --- /dev/null +++ b/test/validation/object/valid-opaque.test.ts @@ -0,0 +1,17 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { object } from '../../../src' + +test('Valid object opaque', () => { + const data = { + a: 'string', + b: 42, + } + + assert(data, object()) + + expect(data).toStrictEqual({ + a: 'string', + b: 42, + }) +}) diff --git a/test/validation/object/valid-opaque.ts b/test/validation/object/valid-opaque.ts deleted file mode 100644 index 9240a5bf..00000000 --- a/test/validation/object/valid-opaque.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { object } from '../../../src' - -export const Struct = object() - -export const data = { - a: 'string', - b: 42, -} - -export const output = { - a: 'string', - b: 42, -} diff --git a/test/validation/object/valid-referential.test.ts b/test/validation/object/valid-referential.test.ts new file mode 100644 index 00000000..e938dc40 --- /dev/null +++ b/test/validation/object/valid-referential.test.ts @@ -0,0 +1,29 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { object, string, pattern, refine } from '../../../src' + +const Section = pattern(string(), /^\d+(\.\d+)*$/) + +test('Valid object referential', () => { + const data = { + section: '1', + subsection: '1.1', + } + + assert( + data, + object({ + section: Section, + subsection: refine(Section, 'Subsection', (value, ctx) => { + const { branch } = ctx + const parent = branch[0] + return value.startsWith(`${parent.section}.`) + }), + }) + ) + + expect(data).toStrictEqual({ + section: '1', + subsection: '1.1', + }) +}) diff --git a/test/validation/object/valid-referential.ts b/test/validation/object/valid-referential.ts deleted file mode 100644 index 304dd75d..00000000 --- a/test/validation/object/valid-referential.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { object, string, pattern, refine } from '../../../src' - -const Section = pattern(string(), /^\d+(\.\d+)*$/) - -export const Struct = object({ - section: Section, - subsection: refine(Section, 'Subsection', (value, ctx) => { - const { branch } = ctx - const parent = branch[0] - return value.startsWith(`${parent.section}.`) - }), -}) - -export const data = { - section: '1', - subsection: '1.1', -} - -export const output = { - section: '1', - subsection: '1.1', -} diff --git a/test/validation/object/valid.test.ts b/test/validation/object/valid.test.ts new file mode 100644 index 00000000..d195a92d --- /dev/null +++ b/test/validation/object/valid.test.ts @@ -0,0 +1,23 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { object, string, number } from '../../../src' + +test('Valid object', () => { + const data = { + name: 'john', + age: 42, + } + + assert( + data, + object({ + name: string(), + age: number(), + }) + ) + + expect(data).toStrictEqual({ + name: 'john', + age: 42, + }) +}) diff --git a/test/validation/object/valid.ts b/test/validation/object/valid.ts deleted file mode 100644 index 25833387..00000000 --- a/test/validation/object/valid.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { object, string, number } from '../../../src' - -export const Struct = object({ - name: string(), - age: number(), -}) - -export const data = { - name: 'john', - age: 42, -} - -export const output = { - name: 'john', - age: 42, -} diff --git a/test/validation/omit/invalid-element-nested.test.ts b/test/validation/omit/invalid-element-nested.test.ts new file mode 100644 index 00000000..aaf6fc0f --- /dev/null +++ b/test/validation/omit/invalid-element-nested.test.ts @@ -0,0 +1,32 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { omit, object, array, string } from '../../../src' + +test('Invalid omit element nested', () => { + const data = { + emails: ['name@example.com', false], + } + + const [err, res] = validate( + data, + omit( + object({ + name: string(), + emails: array(string()), + }), + ['name'] + ) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: false, + type: 'string', + refinement: undefined, + path: ['emails', 1], + branch: [data, data.emails, data.emails[1]], + }, + ]) +}) diff --git a/test/validation/omit/invalid-element-nested.ts b/test/validation/omit/invalid-element-nested.ts deleted file mode 100644 index 55150b66..00000000 --- a/test/validation/omit/invalid-element-nested.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { omit, object, array, string } from '../../../src' - -export const Struct = omit( - object({ - name: string(), - emails: array(string()), - }), - ['name'] -) - -export const data = { - emails: ['name@example.com', false], -} - -export const failures = [ - { - value: false, - type: 'string', - refinement: undefined, - path: ['emails', 1], - branch: [data, data.emails, data.emails[1]], - }, -] diff --git a/test/validation/omit/invalid-property-nested.test.ts b/test/validation/omit/invalid-property-nested.test.ts new file mode 100644 index 00000000..107584e9 --- /dev/null +++ b/test/validation/omit/invalid-property-nested.test.ts @@ -0,0 +1,38 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { omit, object, string } from '../../../src' + +test('Invalid omit property nested', () => { + const data = { + address: { + street: 123, + city: 'Springfield', + }, + } + + const [err, res] = validate( + data, + omit( + object({ + name: string(), + address: object({ + street: string(), + city: string(), + }), + }), + ['name'] + ) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 123, + type: 'string', + refinement: undefined, + path: ['address', 'street'], + branch: [data, data.address, data.address.street], + }, + ]) +}) diff --git a/test/validation/omit/invalid-property-nested.ts b/test/validation/omit/invalid-property-nested.ts deleted file mode 100644 index f4a45115..00000000 --- a/test/validation/omit/invalid-property-nested.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { omit, object, string } from '../../../src' - -export const Struct = omit( - object({ - name: string(), - address: object({ - street: string(), - city: string(), - }), - }), - ['name'] -) - -export const data = { - address: { - street: 123, - city: 'Springfield', - }, -} - -export const failures = [ - { - value: 123, - type: 'string', - refinement: undefined, - path: ['address', 'street'], - branch: [data, data.address, data.address.street], - }, -] diff --git a/test/validation/omit/invalid-property-unknown.test.ts b/test/validation/omit/invalid-property-unknown.test.ts new file mode 100644 index 00000000..9e48d27e --- /dev/null +++ b/test/validation/omit/invalid-property-unknown.test.ts @@ -0,0 +1,33 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { omit, object, string, number } from '../../../src' + +test('Invalid omit property unknown', () => { + const data = { + name: 'john', + age: 42, + } + + const [err, res] = validate( + data, + omit( + object({ + name: string(), + age: number(), + }), + ['age'] + ) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 42, + type: 'never', + refinement: undefined, + path: ['age'], + branch: [data, data.age], + }, + ]) +}) diff --git a/test/validation/omit/invalid-property-unknown.ts b/test/validation/omit/invalid-property-unknown.ts deleted file mode 100644 index 055c18e6..00000000 --- a/test/validation/omit/invalid-property-unknown.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { omit, object, string, number } from '../../../src' - -export const Struct = omit( - object({ - name: string(), - age: number(), - }), - ['age'] -) - -export const data = { - name: 'john', - age: 42, -} - -export const failures = [ - { - value: 42, - type: 'never', - refinement: undefined, - path: ['age'], - branch: [data, data.age], - }, -] diff --git a/test/validation/omit/invalid-property.test.ts b/test/validation/omit/invalid-property.test.ts new file mode 100644 index 00000000..5b5a8cec --- /dev/null +++ b/test/validation/omit/invalid-property.test.ts @@ -0,0 +1,32 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { omit, object, string, number } from '../../../src' + +test('Invalid omit property', () => { + const data = { + age: 'invalid', + } + + const [err, res] = validate( + data, + omit( + object({ + name: string(), + age: number(), + }), + ['name'] + ) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: ['age'], + branch: [data, data.age], + }, + ]) +}) diff --git a/test/validation/omit/invalid-property.ts b/test/validation/omit/invalid-property.ts deleted file mode 100644 index ccf7bd11..00000000 --- a/test/validation/omit/invalid-property.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { omit, object, string, number } from '../../../src' - -export const Struct = omit( - object({ - name: string(), - age: number(), - }), - ['name'] -) - -export const data = { - age: 'invalid', -} - -export const failures = [ - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: ['age'], - branch: [data, data.age], - }, -] diff --git a/test/validation/omit/invalid.test.ts b/test/validation/omit/invalid.test.ts new file mode 100644 index 00000000..6ca3fca3 --- /dev/null +++ b/test/validation/omit/invalid.test.ts @@ -0,0 +1,30 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { omit, object, string, number } from '../../../src' + +test('Invalid omit', () => { + const data = 'invalid' + + const [err, res] = validate( + data, + omit( + object({ + name: string(), + age: number(), + }), + ['age'] + ) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'object', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/omit/invalid.ts b/test/validation/omit/invalid.ts deleted file mode 100644 index fd9acc54..00000000 --- a/test/validation/omit/invalid.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { omit, object, string, number } from '../../../src' - -export const Struct = omit( - object({ - name: string(), - age: number(), - }), - ['age'] -) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'object', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/omit/valid-nested.test.ts b/test/validation/omit/valid-nested.test.ts new file mode 100644 index 00000000..02e2b1ec --- /dev/null +++ b/test/validation/omit/valid-nested.test.ts @@ -0,0 +1,33 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { omit, object, string } from '../../../src' + +test('Valid omit nested', () => { + const data = { + address: { + street: '123 Fake St', + city: 'Springfield', + }, + } + + assert( + data, + omit( + object({ + name: string(), + address: object({ + street: string(), + city: string(), + }), + }), + ['name'] + ) + ) + + expect(data).toStrictEqual({ + address: { + street: '123 Fake St', + city: 'Springfield', + }, + }) +}) diff --git a/test/validation/omit/valid-nested.ts b/test/validation/omit/valid-nested.ts deleted file mode 100644 index b5e7080a..00000000 --- a/test/validation/omit/valid-nested.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { omit, object, string } from '../../../src' - -export const Struct = omit( - object({ - name: string(), - address: object({ - street: string(), - city: string(), - }), - }), - ['name'] -) - -export const data = { - address: { - street: '123 Fake St', - city: 'Springfield', - }, -} - -export const output = { - address: { - street: '123 Fake St', - city: 'Springfield', - }, -} diff --git a/test/validation/omit/valid-type.test.ts b/test/validation/omit/valid-type.test.ts new file mode 100644 index 00000000..516d0a99 --- /dev/null +++ b/test/validation/omit/valid-type.test.ts @@ -0,0 +1,26 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { omit, type, string, number } from '../../../src' + +test('Valid omit type', () => { + const data = { + name: 'john', + unknownProperty: 'unknown', + } + + assert( + data, + omit( + type({ + name: string(), + age: number(), + }), + ['age'] + ) + ) + + expect(data).toStrictEqual({ + name: 'john', + unknownProperty: 'unknown', + }) +}) diff --git a/test/validation/omit/valid-type.ts b/test/validation/omit/valid-type.ts deleted file mode 100644 index ce7112f4..00000000 --- a/test/validation/omit/valid-type.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { omit, type, string, number } from '../../../src' - -export const Struct = omit( - type({ - name: string(), - age: number(), - }), - ['age'] -) - -export const data = { - name: 'john', - unknownProperty: 'unknown', -} - -export const output = { - name: 'john', - unknownProperty: 'unknown', -} diff --git a/test/validation/omit/valid.test.ts b/test/validation/omit/valid.test.ts new file mode 100644 index 00000000..a23ed0c5 --- /dev/null +++ b/test/validation/omit/valid.test.ts @@ -0,0 +1,24 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { omit, object, string, number } from '../../../src' + +test('Valid omit', () => { + const data = { + name: 'john', + } + + assert( + data, + omit( + object({ + name: string(), + age: number(), + }), + ['age'] + ) + ) + + expect(data).toStrictEqual({ + name: 'john', + }) +}) diff --git a/test/validation/omit/valid.ts b/test/validation/omit/valid.ts deleted file mode 100644 index 45e1e6bf..00000000 --- a/test/validation/omit/valid.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { omit, object, string, number } from '../../../src' - -export const Struct = omit( - object({ - name: string(), - age: number(), - }), - ['age'] -) - -export const data = { - name: 'john', -} - -export const output = { - name: 'john', -} diff --git a/test/validation/optional/invalid.test.ts b/test/validation/optional/invalid.test.ts new file mode 100644 index 00000000..4d5ea6ef --- /dev/null +++ b/test/validation/optional/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { number, optional } from '../../../src' + +test('Invalid optional', () => { + const data = 'invalid' + const [err, res] = validate(data, optional(number())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/optional/invalid.ts b/test/validation/optional/invalid.ts deleted file mode 100644 index e94d9d82..00000000 --- a/test/validation/optional/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { number, optional } from '../../../src' - -export const Struct = optional(number()) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/optional/valid-defined-nested.test.ts b/test/validation/optional/valid-defined-nested.test.ts new file mode 100644 index 00000000..9b2250fd --- /dev/null +++ b/test/validation/optional/valid-defined-nested.test.ts @@ -0,0 +1,23 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { type, string, number, optional } from '../../../src' + +test('Valid optional defined nested', () => { + const data = { + name: 'Jill', + age: 42, + } + + assert( + data, + type({ + name: optional(string()), + age: number(), + }) + ) + + expect(data).toStrictEqual({ + name: 'Jill', + age: 42, + }) +}) diff --git a/test/validation/optional/valid-defined-nested.ts b/test/validation/optional/valid-defined-nested.ts deleted file mode 100644 index 69171640..00000000 --- a/test/validation/optional/valid-defined-nested.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { type, string, number, optional } from '../../../src' - -export const Struct = type({ - name: optional(string()), - age: number(), -}) - -export const data = { - name: 'Jill', - age: 42, -} - -export const output = { - name: 'Jill', - age: 42, -} diff --git a/test/validation/optional/valid-defined.test.ts b/test/validation/optional/valid-defined.test.ts new file mode 100644 index 00000000..3e871614 --- /dev/null +++ b/test/validation/optional/valid-defined.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, optional } from '../../../src' + +test('Valid optional defined', () => { + const data = 42 + assert(data, optional(number())) + expect(data).toStrictEqual(42) +}) diff --git a/test/validation/optional/valid-defined.ts b/test/validation/optional/valid-defined.ts deleted file mode 100644 index 79049904..00000000 --- a/test/validation/optional/valid-defined.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, optional } from '../../../src' - -export const Struct = optional(number()) - -export const data = 42 - -export const output = 42 diff --git a/test/validation/optional/valid-undefined-nested.test.ts b/test/validation/optional/valid-undefined-nested.test.ts new file mode 100644 index 00000000..01cb566f --- /dev/null +++ b/test/validation/optional/valid-undefined-nested.test.ts @@ -0,0 +1,21 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { type, string, number, optional } from '../../../src' + +test('Valid optional undefined nested', () => { + const data = { + age: 42, + } + + assert( + data, + type({ + name: optional(string()), + age: number(), + }) + ) + + expect(data).toStrictEqual({ + age: 42, + }) +}) diff --git a/test/validation/optional/valid-undefined-nested.ts b/test/validation/optional/valid-undefined-nested.ts deleted file mode 100644 index d692a4ce..00000000 --- a/test/validation/optional/valid-undefined-nested.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { type, string, number, optional } from '../../../src' - -export const Struct = type({ - name: optional(string()), - age: number(), -}) - -export const data = { - age: 42, -} - -export const output = { - age: 42, -} diff --git a/test/validation/optional/valid-undefined.test.ts b/test/validation/optional/valid-undefined.test.ts new file mode 100644 index 00000000..38da0734 --- /dev/null +++ b/test/validation/optional/valid-undefined.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, optional } from '../../../src' + +test('Valid optional undefined', () => { + const data = undefined + assert(data, optional(number())) + expect(data).toStrictEqual(undefined) +}) diff --git a/test/validation/optional/valid-undefined.ts b/test/validation/optional/valid-undefined.ts deleted file mode 100644 index 02907cfa..00000000 --- a/test/validation/optional/valid-undefined.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, optional } from '../../../src' - -export const Struct = optional(number()) - -export const data = undefined - -export const output = undefined diff --git a/test/validation/partial/composed.test.ts b/test/validation/partial/composed.test.ts new file mode 100644 index 00000000..e908dbc0 --- /dev/null +++ b/test/validation/partial/composed.test.ts @@ -0,0 +1,23 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { partial, object, string, number } from '../../../src' + +test('Composed partial', () => { + const data = { + name: 'john', + } + + assert( + data, + partial( + object({ + name: string(), + age: number(), + }) + ) + ) + + expect(data).toStrictEqual({ + name: 'john', + }) +}) diff --git a/test/validation/partial/composed.ts b/test/validation/partial/composed.ts deleted file mode 100644 index ae5e208d..00000000 --- a/test/validation/partial/composed.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { partial, object, string, number } from '../../../src' - -export const Struct = partial( - object({ - name: string(), - age: number(), - }) -) - -export const data = { - name: 'john', -} - -export const output = { - name: 'john', -} diff --git a/test/validation/partial/invalid-property-unknown.test.ts b/test/validation/partial/invalid-property-unknown.test.ts new file mode 100644 index 00000000..7160a95b --- /dev/null +++ b/test/validation/partial/invalid-property-unknown.test.ts @@ -0,0 +1,30 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { partial, string, number } from '../../../src' + +test('Invalid partial property unknown', () => { + const data = { + name: 'john', + unknown: true, + } + + const [err, res] = validate( + data, + partial({ + name: string(), + age: number(), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: true, + type: 'never', + refinement: undefined, + path: ['unknown'], + branch: [data, data.unknown], + }, + ]) +}) diff --git a/test/validation/partial/invalid-property-unknown.ts b/test/validation/partial/invalid-property-unknown.ts deleted file mode 100644 index d0063d2d..00000000 --- a/test/validation/partial/invalid-property-unknown.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { partial, string, number } from '../../../src' - -export const Struct = partial({ - name: string(), - age: number(), -}) - -export const data = { - name: 'john', - unknown: true, -} - -export const failures = [ - { - value: true, - type: 'never', - refinement: undefined, - path: ['unknown'], - branch: [data, data.unknown], - }, -] diff --git a/test/validation/partial/invalid-property.test.ts b/test/validation/partial/invalid-property.test.ts new file mode 100644 index 00000000..cb988a12 --- /dev/null +++ b/test/validation/partial/invalid-property.test.ts @@ -0,0 +1,29 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { partial, string, number } from '../../../src' + +test('Invalid partial property', () => { + const data = { + age: 'invalid', + } + + const [err, res] = validate( + data, + partial({ + name: string(), + age: number(), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: ['age'], + branch: [data, data.age], + }, + ]) +}) diff --git a/test/validation/partial/invalid-property.ts b/test/validation/partial/invalid-property.ts deleted file mode 100644 index dfe5b391..00000000 --- a/test/validation/partial/invalid-property.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { partial, string, number } from '../../../src' - -export const Struct = partial({ - name: string(), - age: number(), -}) - -export const data = { - age: 'invalid', -} - -export const failures = [ - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: ['age'], - branch: [data, data.age], - }, -] diff --git a/test/validation/partial/invalid.test.ts b/test/validation/partial/invalid.test.ts new file mode 100644 index 00000000..65738584 --- /dev/null +++ b/test/validation/partial/invalid.test.ts @@ -0,0 +1,27 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { partial, string, number } from '../../../src' + +test('Invalid partial', () => { + const data = 'invalid' + + const [err, res] = validate( + data, + partial({ + name: string(), + age: number(), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'object', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/partial/invalid.ts b/test/validation/partial/invalid.ts deleted file mode 100644 index 58d9a1fd..00000000 --- a/test/validation/partial/invalid.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { partial, string, number } from '../../../src' - -export const Struct = partial({ - name: string(), - age: number(), -}) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'object', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/partial/valid-empty.test.ts b/test/validation/partial/valid-empty.test.ts new file mode 100644 index 00000000..c5ae1d82 --- /dev/null +++ b/test/validation/partial/valid-empty.test.ts @@ -0,0 +1,17 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { partial, string, number } from '../../../src' + +test('Valid partial empty', () => { + const data = {} + + assert( + data, + partial({ + name: string(), + age: number(), + }) + ) + + expect(data).toStrictEqual({}) +}) diff --git a/test/validation/partial/valid-empty.ts b/test/validation/partial/valid-empty.ts deleted file mode 100644 index d0c47825..00000000 --- a/test/validation/partial/valid-empty.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { partial, string, number } from '../../../src' - -export const Struct = partial({ - name: string(), - age: number(), -}) - -export const data = {} - -export const output = {} diff --git a/test/validation/partial/valid-full.test.ts b/test/validation/partial/valid-full.test.ts new file mode 100644 index 00000000..58a15c4b --- /dev/null +++ b/test/validation/partial/valid-full.test.ts @@ -0,0 +1,23 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { partial, string, number } from '../../../src' + +test('Valid partial full', () => { + const data = { + name: 'john', + age: 42, + } + + assert( + data, + partial({ + name: string(), + age: number(), + }) + ) + + expect(data).toStrictEqual({ + name: 'john', + age: 42, + }) +}) diff --git a/test/validation/partial/valid-full.ts b/test/validation/partial/valid-full.ts deleted file mode 100644 index 0fbf61a2..00000000 --- a/test/validation/partial/valid-full.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { partial, string, number } from '../../../src' - -export const Struct = partial({ - name: string(), - age: number(), -}) - -export const data = { - name: 'john', - age: 42, -} - -export const output = { - name: 'john', - age: 42, -} diff --git a/test/validation/partial/valid-partial.test.ts b/test/validation/partial/valid-partial.test.ts new file mode 100644 index 00000000..bda51d56 --- /dev/null +++ b/test/validation/partial/valid-partial.test.ts @@ -0,0 +1,21 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { partial, string, number } from '../../../src' + +test('Valid partial partial', () => { + const data = { + name: 'john', + } + + assert( + data, + partial({ + name: string(), + age: number(), + }) + ) + + expect(data).toStrictEqual({ + name: 'john', + }) +}) diff --git a/test/validation/partial/valid-partial.ts b/test/validation/partial/valid-partial.ts deleted file mode 100644 index 81d379d1..00000000 --- a/test/validation/partial/valid-partial.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { partial, string, number } from '../../../src' - -export const Struct = partial({ - name: string(), - age: number(), -}) - -export const data = { - name: 'john', -} - -export const output = { - name: 'john', -} diff --git a/test/validation/partial/valid-type.test.ts b/test/validation/partial/valid-type.test.ts new file mode 100644 index 00000000..75c41424 --- /dev/null +++ b/test/validation/partial/valid-type.test.ts @@ -0,0 +1,25 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, partial, string, type } from '../../../src' + +test('Valid partial type', () => { + const data = { + name: 'john', + unknownProperty: true, + } + + assert( + data, + partial( + type({ + name: string(), + age: number(), + }) + ) + ) + + expect(data).toStrictEqual({ + name: 'john', + unknownProperty: true, + }) +}) diff --git a/test/validation/partial/valid-type.ts b/test/validation/partial/valid-type.ts deleted file mode 100644 index 51411a70..00000000 --- a/test/validation/partial/valid-type.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { number, partial, string, type } from '../../../src' - -export const Struct = partial( - type({ - name: string(), - age: number(), - }) -) - -export const data = { - name: 'john', - unknownProperty: true, -} - -export const output = { - name: 'john', - unknownProperty: true, -} diff --git a/test/validation/pattern/invalid.test.ts b/test/validation/pattern/invalid.test.ts new file mode 100644 index 00000000..52b5c9d0 --- /dev/null +++ b/test/validation/pattern/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { string, pattern } from '../../../src' + +test('Invalid pattern', () => { + const data = 'invalid' + const [err, res] = validate(data, pattern(string(), /\d+/)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'string', + refinement: 'pattern', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/pattern/invalid.ts b/test/validation/pattern/invalid.ts deleted file mode 100644 index cfba4d1c..00000000 --- a/test/validation/pattern/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { string, pattern } from '../../../src' - -export const Struct = pattern(string(), /\d+/) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'string', - refinement: 'pattern', - path: [], - branch: [data], - }, -] diff --git a/test/validation/pattern/valid.test.ts b/test/validation/pattern/valid.test.ts new file mode 100644 index 00000000..febae266 --- /dev/null +++ b/test/validation/pattern/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { string, pattern } from '../../../src' + +test('Valid pattern', () => { + const data = '123' + assert(data, pattern(string(), /\d+/)) + expect(data).toStrictEqual('123') +}) diff --git a/test/validation/pattern/valid.ts b/test/validation/pattern/valid.ts deleted file mode 100644 index 76181e53..00000000 --- a/test/validation/pattern/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { string, pattern } from '../../../src' - -export const Struct = pattern(string(), /\d+/) - -export const data = '123' - -export const output = '123' diff --git a/test/validation/pick/invalid-element-nested.test.ts b/test/validation/pick/invalid-element-nested.test.ts new file mode 100644 index 00000000..5c2fb725 --- /dev/null +++ b/test/validation/pick/invalid-element-nested.test.ts @@ -0,0 +1,32 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { pick, object, array, string } from '../../../src' + +test('Invalid pick element nested', () => { + const data = { + emails: ['name@example.com', false], + } + + const [err, res] = validate( + data, + pick( + object({ + name: string(), + emails: array(string()), + }), + ['emails'] + ) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: false, + type: 'string', + refinement: undefined, + path: ['emails', 1], + branch: [data, data.emails, data.emails[1]], + }, + ]) +}) diff --git a/test/validation/pick/invalid-element-nested.ts b/test/validation/pick/invalid-element-nested.ts deleted file mode 100644 index 86396d15..00000000 --- a/test/validation/pick/invalid-element-nested.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { pick, object, array, string } from '../../../src' - -export const Struct = pick( - object({ - name: string(), - emails: array(string()), - }), - ['emails'] -) - -export const data = { - emails: ['name@example.com', false], -} - -export const failures = [ - { - value: false, - type: 'string', - refinement: undefined, - path: ['emails', 1], - branch: [data, data.emails, data.emails[1]], - }, -] diff --git a/test/validation/pick/invalid-property-nested.test.ts b/test/validation/pick/invalid-property-nested.test.ts new file mode 100644 index 00000000..b75d602a --- /dev/null +++ b/test/validation/pick/invalid-property-nested.test.ts @@ -0,0 +1,38 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { pick, object, string } from '../../../src' + +test('Invalid pick property nested', () => { + const data = { + address: { + street: 123, + city: 'Springfield', + }, + } + + const [err, res] = validate( + data, + pick( + object({ + name: string(), + address: object({ + street: string(), + city: string(), + }), + }), + ['address'] + ) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 123, + type: 'string', + refinement: undefined, + path: ['address', 'street'], + branch: [data, data.address, data.address.street], + }, + ]) +}) diff --git a/test/validation/pick/invalid-property-nested.ts b/test/validation/pick/invalid-property-nested.ts deleted file mode 100644 index 17400b43..00000000 --- a/test/validation/pick/invalid-property-nested.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { pick, object, string } from '../../../src' - -export const Struct = pick( - object({ - name: string(), - address: object({ - street: string(), - city: string(), - }), - }), - ['address'] -) - -export const data = { - address: { - street: 123, - city: 'Springfield', - }, -} - -export const failures = [ - { - value: 123, - type: 'string', - refinement: undefined, - path: ['address', 'street'], - branch: [data, data.address, data.address.street], - }, -] diff --git a/test/validation/pick/invalid-property-unknown.test.ts b/test/validation/pick/invalid-property-unknown.test.ts new file mode 100644 index 00000000..f2de7b01 --- /dev/null +++ b/test/validation/pick/invalid-property-unknown.test.ts @@ -0,0 +1,33 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { pick, object, string, number } from '../../../src' + +test('Invalid pick property unknown', () => { + const data = { + name: 'john', + age: 42, + } + + const [err, res] = validate( + data, + pick( + object({ + name: string(), + age: number(), + }), + ['name'] + ) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 42, + type: 'never', + refinement: undefined, + path: ['age'], + branch: [data, data.age], + }, + ]) +}) diff --git a/test/validation/pick/invalid-property-unknown.ts b/test/validation/pick/invalid-property-unknown.ts deleted file mode 100644 index 173a7f36..00000000 --- a/test/validation/pick/invalid-property-unknown.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { pick, object, string, number } from '../../../src' - -export const Struct = pick( - object({ - name: string(), - age: number(), - }), - ['name'] -) - -export const data = { - name: 'john', - age: 42, -} - -export const failures = [ - { - value: 42, - type: 'never', - refinement: undefined, - path: ['age'], - branch: [data, data.age], - }, -] diff --git a/test/validation/pick/invalid-property.test.ts b/test/validation/pick/invalid-property.test.ts new file mode 100644 index 00000000..9e047a5c --- /dev/null +++ b/test/validation/pick/invalid-property.test.ts @@ -0,0 +1,32 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { pick, object, string, number } from '../../../src' + +test('Invalid pick property', () => { + const data = { + age: 'invalid', + } + + const [err, res] = validate( + data, + pick( + object({ + name: string(), + age: number(), + }), + ['age'] + ) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: ['age'], + branch: [data, data.age], + }, + ]) +}) diff --git a/test/validation/pick/invalid-property.ts b/test/validation/pick/invalid-property.ts deleted file mode 100644 index 0999bc10..00000000 --- a/test/validation/pick/invalid-property.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { pick, object, string, number } from '../../../src' - -export const Struct = pick( - object({ - name: string(), - age: number(), - }), - ['age'] -) - -export const data = { - age: 'invalid', -} - -export const failures = [ - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: ['age'], - branch: [data, data.age], - }, -] diff --git a/test/validation/pick/invalid.test.ts b/test/validation/pick/invalid.test.ts new file mode 100644 index 00000000..06e7474e --- /dev/null +++ b/test/validation/pick/invalid.test.ts @@ -0,0 +1,30 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { pick, object, string, number } from '../../../src' + +test('Invalid pick', () => { + const data = 'invalid' + + const [err, res] = validate( + data, + pick( + object({ + name: string(), + age: number(), + }), + ['name'] + ) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'object', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/pick/invalid.ts b/test/validation/pick/invalid.ts deleted file mode 100644 index 7376027b..00000000 --- a/test/validation/pick/invalid.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { pick, object, string, number } from '../../../src' - -export const Struct = pick( - object({ - name: string(), - age: number(), - }), - ['name'] -) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'object', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/pick/valid-nested.test.ts b/test/validation/pick/valid-nested.test.ts new file mode 100644 index 00000000..aec6f47b --- /dev/null +++ b/test/validation/pick/valid-nested.test.ts @@ -0,0 +1,33 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { pick, object, string } from '../../../src' + +test('Valid pick nested', () => { + const data = { + address: { + street: '123 Fake St', + city: 'Springfield', + }, + } + + assert( + data, + pick( + object({ + name: string(), + address: object({ + street: string(), + city: string(), + }), + }), + ['address'] + ) + ) + + expect(data).toStrictEqual({ + address: { + street: '123 Fake St', + city: 'Springfield', + }, + }) +}) diff --git a/test/validation/pick/valid-nested.ts b/test/validation/pick/valid-nested.ts deleted file mode 100644 index 08874b82..00000000 --- a/test/validation/pick/valid-nested.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { pick, object, string } from '../../../src' - -export const Struct = pick( - object({ - name: string(), - address: object({ - street: string(), - city: string(), - }), - }), - ['address'] -) - -export const data = { - address: { - street: '123 Fake St', - city: 'Springfield', - }, -} - -export const output = { - address: { - street: '123 Fake St', - city: 'Springfield', - }, -} diff --git a/test/validation/pick/valid-type.test.ts b/test/validation/pick/valid-type.test.ts new file mode 100644 index 00000000..e8e6b505 --- /dev/null +++ b/test/validation/pick/valid-type.test.ts @@ -0,0 +1,26 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, pick, string, type } from '../../../src' + +test('Valid pick type', () => { + const data = { + name: 'john', + unknownProperty: true, + } + + assert( + data, + pick( + type({ + name: string(), + age: number(), + }), + ['name'] + ) + ) + + expect(data).toStrictEqual({ + name: 'john', + unknownProperty: true, + }) +}) diff --git a/test/validation/pick/valid-type.ts b/test/validation/pick/valid-type.ts deleted file mode 100644 index 28f1a330..00000000 --- a/test/validation/pick/valid-type.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { number, pick, string, type } from '../../../src' - -export const Struct = pick( - type({ - name: string(), - age: number(), - }), - ['name'] -) - -export const data = { - name: 'john', - unknownProperty: true, -} - -export const output = { - name: 'john', - unknownProperty: true, -} diff --git a/test/validation/pick/valid.test.ts b/test/validation/pick/valid.test.ts new file mode 100644 index 00000000..9777812e --- /dev/null +++ b/test/validation/pick/valid.test.ts @@ -0,0 +1,24 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { pick, object, string, number } from '../../../src' + +test('Valid pick', () => { + const data = { + name: 'john', + } + + assert( + data, + pick( + object({ + name: string(), + age: number(), + }), + ['name'] + ) + ) + + expect(data).toStrictEqual({ + name: 'john', + }) +}) diff --git a/test/validation/pick/valid.ts b/test/validation/pick/valid.ts deleted file mode 100644 index 64c5a838..00000000 --- a/test/validation/pick/valid.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { pick, object, string, number } from '../../../src' - -export const Struct = pick( - object({ - name: string(), - age: number(), - }), - ['name'] -) - -export const data = { - name: 'john', -} - -export const output = { - name: 'john', -} diff --git a/test/validation/record/invalid-array.test.ts b/test/validation/record/invalid-array.test.ts new file mode 100644 index 00000000..62e56049 --- /dev/null +++ b/test/validation/record/invalid-array.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { record, string, number } from '../../../src' + +test('Invalid record array', () => { + const data = [] + const [err, res] = validate(data, record(string(), number())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: [], + type: 'record', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/record/invalid-array.ts b/test/validation/record/invalid-array.ts deleted file mode 100644 index a1e58fc7..00000000 --- a/test/validation/record/invalid-array.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { record, string, number } from '../../../src' - -export const Struct = record(string(), number()) - -export const data = [] - -export const failures = [ - { - value: [], - type: 'record', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/record/invalid-property.test.ts b/test/validation/record/invalid-property.test.ts new file mode 100644 index 00000000..7147f771 --- /dev/null +++ b/test/validation/record/invalid-property.test.ts @@ -0,0 +1,30 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { record, string, number } from '../../../src' + +test('Invalid record property', () => { + const data = { + a: 'a', + b: 'b', + } + + const [err, res] = validate(data, record(string(), number())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'a', + type: 'number', + refinement: undefined, + path: ['a'], + branch: [data, data.a], + }, + { + value: 'b', + type: 'number', + refinement: undefined, + path: ['b'], + branch: [data, data.b], + }, + ]) +}) diff --git a/test/validation/record/invalid-property.ts b/test/validation/record/invalid-property.ts deleted file mode 100644 index 226b6df9..00000000 --- a/test/validation/record/invalid-property.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { record, string, number } from '../../../src' - -export const Struct = record(string(), number()) - -export const data = { - a: 'a', - b: 'b', -} - -export const failures = [ - { - value: 'a', - type: 'number', - refinement: undefined, - path: ['a'], - branch: [data, data.a], - }, - { - value: 'b', - type: 'number', - refinement: undefined, - path: ['b'], - branch: [data, data.b], - }, -] diff --git a/test/validation/record/invalid.test.ts b/test/validation/record/invalid.test.ts new file mode 100644 index 00000000..4bcf07b9 --- /dev/null +++ b/test/validation/record/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { record, string, number } from '../../../src' + +test('Invalid record', () => { + const data = 'invalid' + const [err, res] = validate(data, record(string(), number())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'record', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/record/invalid.ts b/test/validation/record/invalid.ts deleted file mode 100644 index 13d26fc9..00000000 --- a/test/validation/record/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { record, string, number } from '../../../src' - -export const Struct = record(string(), number()) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'record', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/record/valid-frozen.test.ts b/test/validation/record/valid-frozen.test.ts new file mode 100644 index 00000000..339e65b5 --- /dev/null +++ b/test/validation/record/valid-frozen.test.ts @@ -0,0 +1,17 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { record, string, number } from '../../../src' + +test('Valid record frozen', () => { + const data = Object.freeze({ + a: 1, + b: 2, + }) + + const res = create(data, record(string(), number())) + + expect(res).toStrictEqual({ + a: 1, + b: 2, + }) +}) diff --git a/test/validation/record/valid-frozen.ts b/test/validation/record/valid-frozen.ts deleted file mode 100644 index 1bb5bd83..00000000 --- a/test/validation/record/valid-frozen.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { record, string, number } from '../../../src' - -export const Struct = record(string(), number()) - -export const data = Object.freeze({ - a: 1, - b: 2, -}) - -export const output = { - a: 1, - b: 2, -} - -export const create = true diff --git a/test/validation/record/valid.test.ts b/test/validation/record/valid.test.ts new file mode 100644 index 00000000..335a88f7 --- /dev/null +++ b/test/validation/record/valid.test.ts @@ -0,0 +1,17 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { record, string, number } from '../../../src' + +test('Valid record', () => { + const data = { + a: 1, + b: 2, + } + + assert(data, record(string(), number())) + + expect(data).toStrictEqual({ + a: 1, + b: 2, + }) +}) diff --git a/test/validation/record/valid.ts b/test/validation/record/valid.ts deleted file mode 100644 index c036d9f1..00000000 --- a/test/validation/record/valid.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { record, string, number } from '../../../src' - -export const Struct = record(string(), number()) - -export const data = { - a: 1, - b: 2, -} - -export const output = { - a: 1, - b: 2, -} diff --git a/test/validation/refine/invalid-multiple-refinements.test.ts b/test/validation/refine/invalid-multiple-refinements.test.ts new file mode 100644 index 00000000..5bc6e9b1 --- /dev/null +++ b/test/validation/refine/invalid-multiple-refinements.test.ts @@ -0,0 +1,46 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { string, refine, object } from '../../../src' + +const PasswordValidator = refine(string(), 'MinimumLength', (pw) => + pw.length >= 8 ? true : 'required minimum length of 8' +) +const changePasswordStruct = object({ + newPassword: PasswordValidator, + confirmPassword: string(), +}) + +test('Invalid refine multiple refinements', () => { + const data = { + newPassword: '1234567', + confirmPassword: '123456789', + } + + const [err, res] = validate( + data, + refine(changePasswordStruct, 'PasswordsDoNotMatch', (values) => { + return values.newPassword === values.confirmPassword + ? true + : 'Passwords do not match' + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: data.newPassword, + type: 'string', + refinement: 'MinimumLength', + path: ['newPassword'], + branch: [data, data.newPassword], + }, + { + value: data, + type: 'object', + refinement: 'PasswordsDoNotMatch', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/refine/invalid-multiple-refinements.ts b/test/validation/refine/invalid-multiple-refinements.ts deleted file mode 100644 index b2ed1933..00000000 --- a/test/validation/refine/invalid-multiple-refinements.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { string, refine, object } from '../../../src' - -const PasswordValidator = refine(string(), 'MinimumLength', (pw) => - pw.length >= 8 ? true : 'required minimum length of 8' -) -const changePasswordStruct = object({ - newPassword: PasswordValidator, - confirmPassword: string(), -}) - -export const Struct = refine( - changePasswordStruct, - 'PasswordsDoNotMatch', - (values) => { - return values.newPassword === values.confirmPassword - ? true - : 'Passwords do not match' - } -) - -export const data = { - newPassword: '1234567', - confirmPassword: '123456789', -} - -export const failures = [ - { - value: data.newPassword, - type: 'string', - refinement: 'MinimumLength', - path: ['newPassword'], - branch: [data, data.newPassword], - }, - { - value: data, - type: 'object', - refinement: 'PasswordsDoNotMatch', - path: [], - branch: [data], - }, -] diff --git a/test/validation/refine/invalid-shorthand.test.ts b/test/validation/refine/invalid-shorthand.test.ts new file mode 100644 index 00000000..612e1e08 --- /dev/null +++ b/test/validation/refine/invalid-shorthand.test.ts @@ -0,0 +1,24 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { number, refine } from '../../../src' + +test('Invalid refine shorthand', () => { + const data = -1 + + const [err, res] = validate( + data, + refine(number(), 'positive', (v) => v > 0 || 'Number was not positive!') + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: -1, + type: 'number', + refinement: 'positive', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/refine/invalid-shorthand.ts b/test/validation/refine/invalid-shorthand.ts deleted file mode 100644 index 04b2b1b1..00000000 --- a/test/validation/refine/invalid-shorthand.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { number, refine } from '../../../src' - -export const Struct = refine( - number(), - 'positive', - (v) => v > 0 || 'Number was not positive!' -) - -export const data = -1 - -export const failures = [ - { - value: -1, - type: 'number', - refinement: 'positive', - path: [], - branch: [data], - }, -] diff --git a/test/validation/refine/invalid.test.ts b/test/validation/refine/invalid.test.ts new file mode 100644 index 00000000..7a6d1db6 --- /dev/null +++ b/test/validation/refine/invalid.test.ts @@ -0,0 +1,22 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { string, refine } from '../../../src' + +test('Invalid refine', () => { + const data = 'invalid' + const [err, res] = validate( + data, + refine(string(), 'email', (value) => value.includes('@')) + ) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'string', + refinement: 'email', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/refine/invalid.ts b/test/validation/refine/invalid.ts deleted file mode 100644 index b7c09141..00000000 --- a/test/validation/refine/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { string, refine } from '../../../src' - -export const Struct = refine(string(), 'email', (value) => value.includes('@')) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'string', - refinement: 'email', - path: [], - branch: [data], - }, -] diff --git a/test/validation/refine/valid.test.ts b/test/validation/refine/valid.test.ts new file mode 100644 index 00000000..1bac26c0 --- /dev/null +++ b/test/validation/refine/valid.test.ts @@ -0,0 +1,12 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { string, refine } from '../../../src' + +test('Valid refine', () => { + const data = 'name@example.com' + assert( + data, + refine(string(), 'email', (value) => value.includes('@')) + ) + expect(data).toStrictEqual('name@example.com') +}) diff --git a/test/validation/refine/valid.ts b/test/validation/refine/valid.ts deleted file mode 100644 index d9a74c77..00000000 --- a/test/validation/refine/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { string, refine } from '../../../src' - -export const Struct = refine(string(), 'email', (value) => value.includes('@')) - -export const data = 'name@example.com' - -export const output = 'name@example.com' diff --git a/test/validation/regexp/invalid.test.ts b/test/validation/regexp/invalid.test.ts new file mode 100644 index 00000000..e3cc837d --- /dev/null +++ b/test/validation/regexp/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { regexp } from '../../../src' + +test('Invalid regexp', () => { + const data = 'invalid' + const [err, res] = validate(data, regexp()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'regexp', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/regexp/invalid.ts b/test/validation/regexp/invalid.ts deleted file mode 100644 index d0207cd4..00000000 --- a/test/validation/regexp/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { regexp } from '../../../src' - -export const Struct = regexp() - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'regexp', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/regexp/valid.test.ts b/test/validation/regexp/valid.test.ts new file mode 100644 index 00000000..569b2fc4 --- /dev/null +++ b/test/validation/regexp/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { regexp } from '../../../src' + +test('Valid regexp', () => { + const data = /./ + assert(data, regexp()) + expect(data).toStrictEqual(data) +}) diff --git a/test/validation/regexp/valid.ts b/test/validation/regexp/valid.ts deleted file mode 100644 index 96daf68b..00000000 --- a/test/validation/regexp/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { regexp } from '../../../src' - -export const Struct = regexp() - -export const data = /./ - -export const output = data diff --git a/test/validation/set/invalid-element.test.ts b/test/validation/set/invalid-element.test.ts new file mode 100644 index 00000000..51804b6a --- /dev/null +++ b/test/validation/set/invalid-element.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { set, number } from '../../../src' + +test('Invalid set element', () => { + const data = new Set([1, 'b', 3]) + const [err, res] = validate(data, set(number())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'b', + type: 'number', + refinement: undefined, + path: ['b'], + branch: [data, 'b'], + }, + ]) +}) diff --git a/test/validation/set/invalid-element.ts b/test/validation/set/invalid-element.ts deleted file mode 100644 index 2b475cbd..00000000 --- a/test/validation/set/invalid-element.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { set, number } from '../../../src' - -export const Struct = set(number()) - -export const data = new Set([1, 'b', 3]) - -export const failures = [ - { - value: 'b', - type: 'number', - refinement: undefined, - path: ['b'], - branch: [data, 'b'], - }, -] diff --git a/test/validation/set/invalid-opaque.test.ts b/test/validation/set/invalid-opaque.test.ts new file mode 100644 index 00000000..6a312ee7 --- /dev/null +++ b/test/validation/set/invalid-opaque.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { set } from '../../../src' + +test('Invalid set opaque', () => { + const data = 'invalid' + const [err, res] = validate(data, set()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'set', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/set/invalid-opaque.ts b/test/validation/set/invalid-opaque.ts deleted file mode 100644 index fa2e3991..00000000 --- a/test/validation/set/invalid-opaque.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { set } from '../../../src' - -export const Struct = set() - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'set', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/set/invalid.test.ts b/test/validation/set/invalid.test.ts new file mode 100644 index 00000000..eb9840ed --- /dev/null +++ b/test/validation/set/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { set, number } from '../../../src' + +test('Invalid set', () => { + const data = 'invalid' + const [err, res] = validate(data, set(number())) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'set', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/set/invalid.ts b/test/validation/set/invalid.ts deleted file mode 100644 index 68edca5f..00000000 --- a/test/validation/set/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { set, number } from '../../../src' - -export const Struct = set(number()) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'set', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/set/valid-opaque.test.ts b/test/validation/set/valid-opaque.test.ts new file mode 100644 index 00000000..f033e00a --- /dev/null +++ b/test/validation/set/valid-opaque.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { set } from '../../../src' + +test('Valid set opaque', () => { + const data = new Set(['a', 2, true]) + assert(data, set()) + expect(data).toStrictEqual(new Set(['a', 2, true])) +}) diff --git a/test/validation/set/valid-opaque.ts b/test/validation/set/valid-opaque.ts deleted file mode 100644 index 5722178d..00000000 --- a/test/validation/set/valid-opaque.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { set } from '../../../src' - -export const Struct = set() - -export const data = new Set(['a', 2, true]) - -export const output = new Set(['a', 2, true]) diff --git a/test/validation/set/valid.test.ts b/test/validation/set/valid.test.ts new file mode 100644 index 00000000..9739421e --- /dev/null +++ b/test/validation/set/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { set, number } from '../../../src' + +test('Valid set', () => { + const data = new Set([1, 2, 3]) + assert(data, set(number())) + expect(data).toStrictEqual(new Set([1, 2, 3])) +}) diff --git a/test/validation/set/valid.ts b/test/validation/set/valid.ts deleted file mode 100644 index 77ab5978..00000000 --- a/test/validation/set/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { set, number } from '../../../src' - -export const Struct = set(number()) - -export const data = new Set([1, 2, 3]) - -export const output = new Set([1, 2, 3]) diff --git a/test/validation/size/invalid-array.test.ts b/test/validation/size/invalid-array.test.ts new file mode 100644 index 00000000..0ef60ccf --- /dev/null +++ b/test/validation/size/invalid-array.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { array, size, number } from '../../../src' + +test('Invalid size array', () => { + const data = [] + const [err, res] = validate(data, size(array(number()), 1, 5)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: [], + type: 'array', + refinement: 'size', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/size/invalid-array.ts b/test/validation/size/invalid-array.ts deleted file mode 100644 index b16d9479..00000000 --- a/test/validation/size/invalid-array.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { array, size, number } from '../../../src' - -export const Struct = size(array(number()), 1, 5) - -export const data = [] - -export const failures = [ - { - value: [], - type: 'array', - refinement: 'size', - path: [], - branch: [data], - }, -] diff --git a/test/validation/size/invalid-map.test.ts b/test/validation/size/invalid-map.test.ts new file mode 100644 index 00000000..95503ca8 --- /dev/null +++ b/test/validation/size/invalid-map.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { map, size, number, string } from '../../../src' + +test('Invalid size map', () => { + const data = new Map() + const [err, res] = validate(data, size(map(number(), string()), 1, 5)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: data, + type: 'map', + refinement: 'size', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/size/invalid-map.ts b/test/validation/size/invalid-map.ts deleted file mode 100644 index 9fd5c1d8..00000000 --- a/test/validation/size/invalid-map.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { map, size, number, string } from '../../../src' - -export const Struct = size(map(number(), string()), 1, 5) - -export const data = new Map() - -export const failures = [ - { - value: data, - type: 'map', - refinement: 'size', - path: [], - branch: [data], - }, -] diff --git a/test/validation/size/invalid-number.test.ts b/test/validation/size/invalid-number.test.ts new file mode 100644 index 00000000..4a5e478f --- /dev/null +++ b/test/validation/size/invalid-number.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { number, size } from '../../../src' + +test('Invalid size number', () => { + const data = 0 + const [err, res] = validate(data, size(number(), 1, 5)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 0, + type: 'number', + refinement: 'size', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/size/invalid-number.ts b/test/validation/size/invalid-number.ts deleted file mode 100644 index 9cf861c6..00000000 --- a/test/validation/size/invalid-number.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { number, size } from '../../../src' - -export const Struct = size(number(), 1, 5) - -export const data = 0 - -export const failures = [ - { - value: 0, - type: 'number', - refinement: 'size', - path: [], - branch: [data], - }, -] diff --git a/test/validation/size/invalid-set.test.ts b/test/validation/size/invalid-set.test.ts new file mode 100644 index 00000000..ed68e697 --- /dev/null +++ b/test/validation/size/invalid-set.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { set, size, number } from '../../../src' + +test('Invalid size set', () => { + const data = new Set() + const [err, res] = validate(data, size(set(number()), 1, 5)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: data, + type: 'set', + refinement: 'size', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/size/invalid-set.ts b/test/validation/size/invalid-set.ts deleted file mode 100644 index 0aab53c0..00000000 --- a/test/validation/size/invalid-set.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { set, size, number } from '../../../src' - -export const Struct = size(set(number()), 1, 5) - -export const data = new Set() - -export const failures = [ - { - value: data, - type: 'set', - refinement: 'size', - path: [], - branch: [data], - }, -] diff --git a/test/validation/size/invalid-string.test.ts b/test/validation/size/invalid-string.test.ts new file mode 100644 index 00000000..959e623d --- /dev/null +++ b/test/validation/size/invalid-string.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { string, size } from '../../../src' + +test('Invalid size string', () => { + const data = '' + const [err, res] = validate(data, size(string(), 1, 5)) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: '', + type: 'string', + refinement: 'size', + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/size/invalid-string.ts b/test/validation/size/invalid-string.ts deleted file mode 100644 index af9b29ca..00000000 --- a/test/validation/size/invalid-string.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { string, size } from '../../../src' - -export const Struct = size(string(), 1, 5) - -export const data = '' - -export const failures = [ - { - value: '', - type: 'string', - refinement: 'size', - path: [], - branch: [data], - }, -] diff --git a/test/validation/size/valid-array.test.ts b/test/validation/size/valid-array.test.ts new file mode 100644 index 00000000..8f7494db --- /dev/null +++ b/test/validation/size/valid-array.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, array, size } from '../../../src' + +test('Valid size array', () => { + const data = [1, 2, 3] + assert(data, size(array(number()), 1, 5)) + expect(data).toStrictEqual([1, 2, 3]) +}) diff --git a/test/validation/size/valid-array.ts b/test/validation/size/valid-array.ts deleted file mode 100644 index ed20ca2d..00000000 --- a/test/validation/size/valid-array.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, array, size } from '../../../src' - -export const Struct = size(array(number()), 1, 5) - -export const data = [1, 2, 3] - -export const output = [1, 2, 3] diff --git a/test/validation/size/valid-exact.test.ts b/test/validation/size/valid-exact.test.ts new file mode 100644 index 00000000..b8b7475b --- /dev/null +++ b/test/validation/size/valid-exact.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { string, size } from '../../../src' + +test('Valid size exact', () => { + const data = 'abcd' + assert(data, size(string(), 4)) + expect(data).toStrictEqual('abcd') +}) diff --git a/test/validation/size/valid-exact.ts b/test/validation/size/valid-exact.ts deleted file mode 100644 index 55c9d74f..00000000 --- a/test/validation/size/valid-exact.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { string, size } from '../../../src' - -export const Struct = size(string(), 4) - -export const data = 'abcd' - -export const output = 'abcd' diff --git a/test/validation/size/valid-map.test.ts b/test/validation/size/valid-map.test.ts new file mode 100644 index 00000000..e8561d40 --- /dev/null +++ b/test/validation/size/valid-map.test.ts @@ -0,0 +1,14 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { string, number, map, size } from '../../../src' + +test('Valid size map', () => { + const data = new Map([ + [1, 'a'], + [2, 'b'], + [3, 'c'], + ]) + + assert(data, size(map(number(), string()), 1, 5)) + expect(data).toStrictEqual(data) +}) diff --git a/test/validation/size/valid-map.ts b/test/validation/size/valid-map.ts deleted file mode 100644 index 84e0cbed..00000000 --- a/test/validation/size/valid-map.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { string, number, map, size } from '../../../src' - -export const Struct = size(map(number(), string()), 1, 5) - -export const data = new Map([ - [1, 'a'], - [2, 'b'], - [3, 'c'], -]) - -export const output = data diff --git a/test/validation/size/valid-max-inclusive.test.ts b/test/validation/size/valid-max-inclusive.test.ts new file mode 100644 index 00000000..ecc7db5c --- /dev/null +++ b/test/validation/size/valid-max-inclusive.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { string, size } from '../../../src' + +test('Valid size max inclusive', () => { + const data = 'abcde' + assert(data, size(string(), 1, 5)) + expect(data).toStrictEqual('abcde') +}) diff --git a/test/validation/size/valid-max-inclusive.ts b/test/validation/size/valid-max-inclusive.ts deleted file mode 100644 index 1680ff65..00000000 --- a/test/validation/size/valid-max-inclusive.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { string, size } from '../../../src' - -export const Struct = size(string(), 1, 5) - -export const data = 'abcde' - -export const output = 'abcde' diff --git a/test/validation/size/valid-min-inclusive.test.ts b/test/validation/size/valid-min-inclusive.test.ts new file mode 100644 index 00000000..8b24630b --- /dev/null +++ b/test/validation/size/valid-min-inclusive.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { string, size } from '../../../src' + +test('Valid size min inclusive', () => { + const data = 'a' + assert(data, size(string(), 1, 5)) + expect(data).toStrictEqual('a') +}) diff --git a/test/validation/size/valid-min-inclusive.ts b/test/validation/size/valid-min-inclusive.ts deleted file mode 100644 index 4492590b..00000000 --- a/test/validation/size/valid-min-inclusive.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { string, size } from '../../../src' - -export const Struct = size(string(), 1, 5) - -export const data = 'a' - -export const output = 'a' diff --git a/test/validation/size/valid-number.test.ts b/test/validation/size/valid-number.test.ts new file mode 100644 index 00000000..53adaf6d --- /dev/null +++ b/test/validation/size/valid-number.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, size } from '../../../src' + +test('Valid size number', () => { + const data = 3 + assert(data, size(number(), 1, 5)) + expect(data).toStrictEqual(3) +}) diff --git a/test/validation/size/valid-number.ts b/test/validation/size/valid-number.ts deleted file mode 100644 index 9a51e63d..00000000 --- a/test/validation/size/valid-number.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, size } from '../../../src' - -export const Struct = size(number(), 1, 5) - -export const data = 3 - -export const output = 3 diff --git a/test/validation/size/valid-set.test.ts b/test/validation/size/valid-set.test.ts new file mode 100644 index 00000000..e303f0d7 --- /dev/null +++ b/test/validation/size/valid-set.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { number, set, size } from '../../../src' + +test('Valid size set', () => { + const data = new Set([1, 2, 3]) + assert(data, size(set(number()), 1, 5)) + expect(data).toStrictEqual(data) +}) diff --git a/test/validation/size/valid-set.ts b/test/validation/size/valid-set.ts deleted file mode 100644 index ba2eb6d1..00000000 --- a/test/validation/size/valid-set.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { number, set, size } from '../../../src' - -export const Struct = size(set(number()), 1, 5) - -export const data = new Set([1, 2, 3]) - -export const output = data diff --git a/test/validation/size/valid-string.test.ts b/test/validation/size/valid-string.test.ts new file mode 100644 index 00000000..083875c5 --- /dev/null +++ b/test/validation/size/valid-string.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { string, size } from '../../../src' + +test('Valid size string', () => { + const data = 'two' + assert(data, size(string(), 1, 5)) + expect(data).toStrictEqual('two') +}) diff --git a/test/validation/size/valid-string.ts b/test/validation/size/valid-string.ts deleted file mode 100644 index 24f8fcab..00000000 --- a/test/validation/size/valid-string.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { string, size } from '../../../src' - -export const Struct = size(string(), 1, 5) - -export const data = 'two' - -export const output = 'two' diff --git a/test/validation/string/invalid.test.ts b/test/validation/string/invalid.test.ts new file mode 100644 index 00000000..8dca56f8 --- /dev/null +++ b/test/validation/string/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { string } from '../../../src' + +test('Invalid string', () => { + const data = false + const [err, res] = validate(data, string()) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: false, + type: 'string', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/string/invalid.ts b/test/validation/string/invalid.ts deleted file mode 100644 index 16634387..00000000 --- a/test/validation/string/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { string } from '../../../src' - -export const Struct = string() - -export const data = false - -export const failures = [ - { - value: false, - type: 'string', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/string/valid.test.ts b/test/validation/string/valid.test.ts new file mode 100644 index 00000000..60f4b2de --- /dev/null +++ b/test/validation/string/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { string } from '../../../src' + +test('Valid string', () => { + const data = 'valid' + assert(data, string()) + expect(data).toStrictEqual('valid') +}) diff --git a/test/validation/string/valid.ts b/test/validation/string/valid.ts deleted file mode 100644 index afc40fac..00000000 --- a/test/validation/string/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { string } from '../../../src' - -export const Struct = string() - -export const data = 'valid' - -export const output = 'valid' diff --git a/test/validation/trimmed/invalid.test.ts b/test/validation/trimmed/invalid.test.ts new file mode 100644 index 00000000..2cef8ee9 --- /dev/null +++ b/test/validation/trimmed/invalid.test.ts @@ -0,0 +1,23 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { string, trimmed } from '../../../src' + +test('Invalid trimmed', () => { + const data = false + + const [err, res] = validate(data, trimmed(string()), { + coerce: true, + }) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: false, + type: 'string', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/trimmed/invalid.ts b/test/validation/trimmed/invalid.ts deleted file mode 100644 index 891ff35a..00000000 --- a/test/validation/trimmed/invalid.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { string, trimmed } from '../../../src' - -export const Struct = trimmed(string()) - -export const data = false - -export const failures = [ - { - value: false, - type: 'string', - refinement: undefined, - path: [], - branch: [data], - }, -] - -export const create = true diff --git a/test/validation/trimmed/valid.test.ts b/test/validation/trimmed/valid.test.ts new file mode 100644 index 00000000..6212caf1 --- /dev/null +++ b/test/validation/trimmed/valid.test.ts @@ -0,0 +1,9 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { string, trimmed } from '../../../src' + +test('Valid trimmed', () => { + const data = ' valid ' + const res = create(data, trimmed(string())) + expect(res).toStrictEqual('valid') +}) diff --git a/test/validation/trimmed/valid.ts b/test/validation/trimmed/valid.ts deleted file mode 100644 index b6815382..00000000 --- a/test/validation/trimmed/valid.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { string, trimmed } from '../../../src' - -export const Struct = trimmed(string()) - -export const data = ' valid ' - -export const output = 'valid' - -export const create = true diff --git a/test/validation/tuple/invalid-element-missing.test.ts b/test/validation/tuple/invalid-element-missing.test.ts new file mode 100644 index 00000000..e4b522e7 --- /dev/null +++ b/test/validation/tuple/invalid-element-missing.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { tuple, string, number } from '../../../src' + +test('Invalid tuple element missing', () => { + const data = ['A'] + const [err, res] = validate(data, tuple([string(), number()])) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: undefined, + type: 'number', + refinement: undefined, + path: [1], + branch: [data, data[1]], + }, + ]) +}) diff --git a/test/validation/tuple/invalid-element-missing.ts b/test/validation/tuple/invalid-element-missing.ts deleted file mode 100644 index 48ca2e3c..00000000 --- a/test/validation/tuple/invalid-element-missing.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { tuple, string, number } from '../../../src' - -export const Struct = tuple([string(), number()]) - -export const data = ['A'] - -export const failures = [ - { - value: undefined, - type: 'number', - refinement: undefined, - path: [1], - branch: [data, data[1]], - }, -] diff --git a/test/validation/tuple/invalid-element-unknown.test.ts b/test/validation/tuple/invalid-element-unknown.test.ts new file mode 100644 index 00000000..e03297c9 --- /dev/null +++ b/test/validation/tuple/invalid-element-unknown.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { tuple, string, number } from '../../../src' + +test('Invalid tuple element unknown', () => { + const data = ['A', 3, 'unknown'] + const [err, res] = validate(data, tuple([string(), number()])) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'unknown', + type: 'never', + refinement: undefined, + path: [2], + branch: [data, data[2]], + }, + ]) +}) diff --git a/test/validation/tuple/invalid-element-unknown.ts b/test/validation/tuple/invalid-element-unknown.ts deleted file mode 100644 index ab6afcf7..00000000 --- a/test/validation/tuple/invalid-element-unknown.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { tuple, string, number } from '../../../src' - -export const Struct = tuple([string(), number()]) - -export const data = ['A', 3, 'unknown'] - -export const failures = [ - { - value: 'unknown', - type: 'never', - refinement: undefined, - path: [2], - branch: [data, data[2]], - }, -] diff --git a/test/validation/tuple/invalid-element.test.ts b/test/validation/tuple/invalid-element.test.ts new file mode 100644 index 00000000..de6d8d72 --- /dev/null +++ b/test/validation/tuple/invalid-element.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { tuple, string, number } from '../../../src' + +test('Invalid tuple element', () => { + const data = [false, 3] + const [err, res] = validate(data, tuple([string(), number()])) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: false, + type: 'string', + refinement: undefined, + path: [0], + branch: [data, data[0]], + }, + ]) +}) diff --git a/test/validation/tuple/invalid-element.ts b/test/validation/tuple/invalid-element.ts deleted file mode 100644 index 696c43a3..00000000 --- a/test/validation/tuple/invalid-element.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { tuple, string, number } from '../../../src' - -export const Struct = tuple([string(), number()]) - -export const data = [false, 3] - -export const failures = [ - { - value: false, - type: 'string', - refinement: undefined, - path: [0], - branch: [data, data[0]], - }, -] diff --git a/test/validation/tuple/invalid.test.ts b/test/validation/tuple/invalid.test.ts new file mode 100644 index 00000000..f8c1fb07 --- /dev/null +++ b/test/validation/tuple/invalid.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { tuple, string, number } from '../../../src' + +test('Invalid tuple', () => { + const data = 'invalid' + const [err, res] = validate(data, tuple([string(), number()])) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'tuple', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/tuple/invalid.ts b/test/validation/tuple/invalid.ts deleted file mode 100644 index f03c711a..00000000 --- a/test/validation/tuple/invalid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { tuple, string, number } from '../../../src' - -export const Struct = tuple([string(), number()]) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'tuple', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/tuple/valid-frozen.test.ts b/test/validation/tuple/valid-frozen.test.ts new file mode 100644 index 00000000..83029b5b --- /dev/null +++ b/test/validation/tuple/valid-frozen.test.ts @@ -0,0 +1,9 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { tuple, string, number } from '../../../src' + +test('Valid tuple frozen', () => { + const data = Object.freeze(['A', 1]) + const res = create(data, tuple([string(), number()])) + expect(res).toStrictEqual(['A', 1]) +}) diff --git a/test/validation/tuple/valid-frozen.ts b/test/validation/tuple/valid-frozen.ts deleted file mode 100644 index b084af38..00000000 --- a/test/validation/tuple/valid-frozen.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { tuple, string, number } from '../../../src' - -export const Struct = tuple([string(), number()]) - -export const data = Object.freeze(['A', 1]) - -export const output = ['A', 1] - -export const create = true diff --git a/test/validation/tuple/valid.test.ts b/test/validation/tuple/valid.test.ts new file mode 100644 index 00000000..3ea445e3 --- /dev/null +++ b/test/validation/tuple/valid.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { tuple, string, number } from '../../../src' + +test('Valid tuple', () => { + const data = ['A', 1] + assert(data, tuple([string(), number()])) + expect(data).toStrictEqual(['A', 1]) +}) diff --git a/test/validation/tuple/valid.ts b/test/validation/tuple/valid.ts deleted file mode 100644 index 3c0d8397..00000000 --- a/test/validation/tuple/valid.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { tuple, string, number } from '../../../src' - -export const Struct = tuple([string(), number()]) - -export const data = ['A', 1] - -export const output = ['A', 1] diff --git a/test/validation/type/invalid-array.test.ts b/test/validation/type/invalid-array.test.ts new file mode 100644 index 00000000..f44f5fbd --- /dev/null +++ b/test/validation/type/invalid-array.test.ts @@ -0,0 +1,19 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { type } from '../../../src' + +test('Invalid type array', () => { + const data = [] + const [err, res] = validate(data, type({})) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: [], + type: 'type', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/type/invalid-array.ts b/test/validation/type/invalid-array.ts deleted file mode 100644 index a0ec3972..00000000 --- a/test/validation/type/invalid-array.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { type } from '../../../src' - -export const Struct = type({}) - -export const data = [] - -export const failures = [ - { - value: [], - type: 'type', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/type/invalid-property-nested.test.ts b/test/validation/type/invalid-property-nested.test.ts new file mode 100644 index 00000000..ae5e66b7 --- /dev/null +++ b/test/validation/type/invalid-property-nested.test.ts @@ -0,0 +1,32 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { type, string, number } from '../../../src' + +test('Invalid type property nested', () => { + const data = { + id: 1, + } + + const [err, res] = validate( + data, + type({ + id: number(), + person: type({ + name: string(), + age: number(), + }), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: undefined, + type: 'type', + refinement: undefined, + path: ['person'], + branch: [data, undefined], + }, + ]) +}) diff --git a/test/validation/type/invalid-property-nested.ts b/test/validation/type/invalid-property-nested.ts deleted file mode 100644 index ee4cd218..00000000 --- a/test/validation/type/invalid-property-nested.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { type, string, number } from '../../../src' - -export const Struct = type({ - id: number(), - person: type({ - name: string(), - age: number(), - }), -}) - -export const data = { - id: 1, -} - -export const failures = [ - { - value: undefined, - type: 'type', - refinement: undefined, - path: ['person'], - branch: [data, undefined], - }, -] diff --git a/test/validation/type/invalid-property.test.ts b/test/validation/type/invalid-property.test.ts new file mode 100644 index 00000000..3cf8b4a0 --- /dev/null +++ b/test/validation/type/invalid-property.test.ts @@ -0,0 +1,30 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { type, string, number } from '../../../src' + +test('Invalid type property', () => { + const data = { + name: 'john', + age: 'invalid', + } + + const [err, res] = validate( + data, + type({ + name: string(), + age: number(), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: ['age'], + branch: [data, data.age], + }, + ]) +}) diff --git a/test/validation/type/invalid-property.ts b/test/validation/type/invalid-property.ts deleted file mode 100644 index 21cf52f3..00000000 --- a/test/validation/type/invalid-property.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { type, string, number } from '../../../src' - -export const Struct = type({ - name: string(), - age: number(), -}) - -export const data = { - name: 'john', - age: 'invalid', -} - -export const failures = [ - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: ['age'], - branch: [data, data.age], - }, -] diff --git a/test/validation/type/invalid.test.ts b/test/validation/type/invalid.test.ts new file mode 100644 index 00000000..ebf7a038 --- /dev/null +++ b/test/validation/type/invalid.test.ts @@ -0,0 +1,27 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { type, string, number } from '../../../src' + +test('Invalid type', () => { + const data = 'invalid' + + const [err, res] = validate( + data, + type({ + name: string(), + age: number(), + }) + ) + + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: 'invalid', + type: 'type', + refinement: undefined, + path: [], + branch: [data], + }, + ]) +}) diff --git a/test/validation/type/invalid.ts b/test/validation/type/invalid.ts deleted file mode 100644 index b44b251f..00000000 --- a/test/validation/type/invalid.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { type, string, number } from '../../../src' - -export const Struct = type({ - name: string(), - age: number(), -}) - -export const data = 'invalid' - -export const failures = [ - { - value: 'invalid', - type: 'type', - refinement: undefined, - path: [], - branch: [data], - }, -] diff --git a/test/validation/type/valid-frozen.test.ts b/test/validation/type/valid-frozen.test.ts new file mode 100644 index 00000000..fe22a68b --- /dev/null +++ b/test/validation/type/valid-frozen.test.ts @@ -0,0 +1,23 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { type, string, number } from '../../../src' + +test('Valid type frozen', () => { + const data = Object.freeze({ + name: 'john', + age: 42, + }) + + const res = create( + data, + type({ + name: string(), + age: number(), + }) + ) + + expect(res).toStrictEqual({ + name: 'john', + age: 42, + }) +}) diff --git a/test/validation/type/valid-frozen.ts b/test/validation/type/valid-frozen.ts deleted file mode 100644 index cdb08dbc..00000000 --- a/test/validation/type/valid-frozen.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { type, string, number } from '../../../src' - -export const Struct = type({ - name: string(), - age: number(), -}) - -export const data = Object.freeze({ - name: 'john', - age: 42, -}) - -export const output = { - name: 'john', - age: 42, -} - -export const create = true diff --git a/test/validation/type/valid-instance.ts b/test/validation/type/valid-instance.test.ts similarity index 100% rename from test/validation/type/valid-instance.ts rename to test/validation/type/valid-instance.test.ts diff --git a/test/validation/type/valid.test.ts b/test/validation/type/valid.test.ts new file mode 100644 index 00000000..bc548067 --- /dev/null +++ b/test/validation/type/valid.test.ts @@ -0,0 +1,20 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { type, string, number } from '../../../src' + +test('Valid type', () => { + const data = { + name: 'john', + age: 42, + } + + assert( + data, + type({ + name: string(), + age: number(), + }) + ) + + expect(data).toStrictEqual(data) +}) diff --git a/test/validation/type/valid.ts b/test/validation/type/valid.ts deleted file mode 100644 index 95315fde..00000000 --- a/test/validation/type/valid.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { type, string, number } from '../../../src' - -export const Struct = type({ - name: string(), - age: number(), -}) - -export const data = { - name: 'john', - age: 42, -} - -export const output = data diff --git a/test/validation/union/coercion-object.test.ts b/test/validation/union/coercion-object.test.ts new file mode 100644 index 00000000..ac0d2db7 --- /dev/null +++ b/test/validation/union/coercion-object.test.ts @@ -0,0 +1,12 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { union, string, number, defaulted, object } from '../../../src' + +const A = string() +const B = object({ a: number(), b: defaulted(number(), 5) }) + +test('Coercion union object', () => { + const data = { a: 5 } + const res = create(data, union([A, B])) + expect(res).toStrictEqual({ a: 5, b: 5 }) +}) diff --git a/test/validation/union/coercion-object.ts b/test/validation/union/coercion-object.ts deleted file mode 100644 index 2d08f7e5..00000000 --- a/test/validation/union/coercion-object.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { union, string, number, defaulted, object } from '../../../src' - -const A = string() -const B = object({ a: number(), b: defaulted(number(), 5) }) - -export const Struct = union([A, B]) - -export const data = { a: 5 } - -export const output = { a: 5, b: 5 } - -export const create = true diff --git a/test/validation/union/coercion-type.test.ts b/test/validation/union/coercion-type.test.ts new file mode 100644 index 00000000..6f776add --- /dev/null +++ b/test/validation/union/coercion-type.test.ts @@ -0,0 +1,12 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { union, string, number, defaulted, type } from '../../../src' + +const A = string() +const B = type({ a: number(), b: defaulted(number(), 5) }) + +test('Coercion union type', () => { + const data = { a: 5 } + const res = create(data, union([A, B])) + expect(res).toStrictEqual({ a: 5, b: 5 }) +}) diff --git a/test/validation/union/coercion-type.ts b/test/validation/union/coercion-type.ts deleted file mode 100644 index 8dd25517..00000000 --- a/test/validation/union/coercion-type.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { union, string, number, defaulted, type } from '../../../src' - -const A = string() -const B = type({ a: number(), b: defaulted(number(), 5) }) - -export const Struct = union([A, B]) - -export const data = { a: 5 } - -export const output = { a: 5, b: 5 } - -export const create = true diff --git a/test/validation/union/coercion.test.ts b/test/validation/union/coercion.test.ts new file mode 100644 index 00000000..8b7b39b0 --- /dev/null +++ b/test/validation/union/coercion.test.ts @@ -0,0 +1,12 @@ +import { create } from '../../../src' +import { expect, test } from 'vitest' +import { union, string, number, defaulted } from '../../../src' + +const A = defaulted(string(), 'foo') +const B = number() + +test('Coercion union', () => { + const data = undefined + const res = create(data, union([A, B])) + expect(res).toStrictEqual('foo') +}) diff --git a/test/validation/union/coercion.ts b/test/validation/union/coercion.ts deleted file mode 100644 index dd7a108f..00000000 --- a/test/validation/union/coercion.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { union, string, number, defaulted } from '../../../src' - -const A = defaulted(string(), 'foo') -const B = number() - -export const Struct = union([A, B]) - -export const data = undefined - -export const output = 'foo' - -export const create = true diff --git a/test/validation/union/invalid.test.ts b/test/validation/union/invalid.test.ts new file mode 100644 index 00000000..942ffa9e --- /dev/null +++ b/test/validation/union/invalid.test.ts @@ -0,0 +1,39 @@ +import { validate } from '../../../src' +import { expect, test } from 'vitest' +import { type, union, string, number } from '../../../src' + +const A = type({ a: string() }) +const B = type({ b: number() }) + +test('Invalid union', () => { + const data = { + b: 'invalid', + } + + const [err, res] = validate(data, union([A, B])) + expect(res).toBeUndefined() + + expect(err).toMatchStructError([ + { + value: { b: 'invalid' }, + type: 'union', + refinement: undefined, + path: [], + branch: [data], + }, + { + value: undefined, + type: 'string', + refinement: undefined, + path: ['a'], + branch: [data, undefined], + }, + { + value: 'invalid', + type: 'number', + refinement: undefined, + path: ['b'], + branch: [data, data.b], + }, + ]) +}) diff --git a/test/validation/union/invalid.ts b/test/validation/union/invalid.ts deleted file mode 100644 index ddb5bd8d..00000000 --- a/test/validation/union/invalid.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { type, union, string, number } from '../../../src' - -const A = type({ a: string() }) -const B = type({ b: number() }) - -export const Struct = union([A, B]) - -export const data = { - b: 'invalid', -} - -export const failures = [ - { - value: { b: 'invalid' }, - type: 'union', - refinement: undefined, - path: [], - branch: [data], - }, - { - value: undefined, - type: 'string', - refinement: undefined, - path: ['a'], - branch: [data, undefined], - }, - { - value: 'invalid', - type: 'number', - refinement: undefined, - path: ['b'], - branch: [data, data.b], - }, -] diff --git a/test/validation/union/valid.test.ts b/test/validation/union/valid.test.ts new file mode 100644 index 00000000..76964d14 --- /dev/null +++ b/test/validation/union/valid.test.ts @@ -0,0 +1,18 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { type, union, string, number } from '../../../src' + +const A = type({ a: string() }) +const B = type({ b: number() }) + +test('Valid union', () => { + const data = { + a: 'a', + } + + assert(data, union([A, B])) + + expect(data).toStrictEqual({ + a: 'a', + }) +}) diff --git a/test/validation/union/valid.ts b/test/validation/union/valid.ts deleted file mode 100644 index ef84c887..00000000 --- a/test/validation/union/valid.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { type, union, string, number } from '../../../src' - -const A = type({ a: string() }) -const B = type({ b: number() }) - -export const Struct = union([A, B]) - -export const data = { - a: 'a', -} - -export const output = { - a: 'a', -} diff --git a/test/validation/unknown/valid-number.test.ts b/test/validation/unknown/valid-number.test.ts new file mode 100644 index 00000000..56965055 --- /dev/null +++ b/test/validation/unknown/valid-number.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { unknown } from '../../../src' + +test('Valid unknown number', () => { + const data = 1 + assert(data, unknown()) + expect(data).toStrictEqual(1) +}) diff --git a/test/validation/unknown/valid-number.ts b/test/validation/unknown/valid-number.ts deleted file mode 100644 index 9238214a..00000000 --- a/test/validation/unknown/valid-number.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { unknown } from '../../../src' - -export const Struct = unknown() - -export const data = 1 - -export const output = 1 diff --git a/test/validation/unknown/valid-string.test.ts b/test/validation/unknown/valid-string.test.ts new file mode 100644 index 00000000..f42be5c2 --- /dev/null +++ b/test/validation/unknown/valid-string.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { unknown } from '../../../src' + +test('Valid unknown string', () => { + const data = 'valid' + assert(data, unknown()) + expect(data).toStrictEqual('valid') +}) diff --git a/test/validation/unknown/valid-string.ts b/test/validation/unknown/valid-string.ts deleted file mode 100644 index 7e82b944..00000000 --- a/test/validation/unknown/valid-string.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { unknown } from '../../../src' - -export const Struct = unknown() - -export const data = 'valid' - -export const output = 'valid' diff --git a/test/validation/unknown/valid-undefined.test.ts b/test/validation/unknown/valid-undefined.test.ts new file mode 100644 index 00000000..c30eab7b --- /dev/null +++ b/test/validation/unknown/valid-undefined.test.ts @@ -0,0 +1,9 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' +import { unknown } from '../../../src' + +test('Valid unknown undefined', () => { + const data = undefined + assert(data, unknown()) + expect(data).toStrictEqual(undefined) +}) diff --git a/test/validation/unknown/valid-undefined.ts b/test/validation/unknown/valid-undefined.ts deleted file mode 100644 index d90f1439..00000000 --- a/test/validation/unknown/valid-undefined.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { unknown } from '../../../src' - -export const Struct = unknown() - -export const data = undefined - -export const output = undefined From a3c13b5b705e8e41398a5339489ebad86b673eaa Mon Sep 17 00:00:00 2001 From: Geoffrey Belcher Date: Tue, 3 Dec 2024 13:04:42 -0330 Subject: [PATCH 10/11] Fix small typing issues --- test/validation/dynamic/valid-reference.test.ts | 1 - test/validation/empty/valid-array.test.ts | 2 +- test/validation/object/invalid-array.test.ts | 2 +- test/validation/record/invalid-array.test.ts | 2 +- test/validation/size/invalid-array.test.ts | 2 +- test/validation/type/invalid-array.test.ts | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/test/validation/dynamic/valid-reference.test.ts b/test/validation/dynamic/valid-reference.test.ts index 26995883..f1d52f48 100644 --- a/test/validation/dynamic/valid-reference.test.ts +++ b/test/validation/dynamic/valid-reference.test.ts @@ -1,4 +1,3 @@ -import { assert } from '../../../src' import { expect, test } from 'vitest' import { assert, type, dynamic, literal, string, number } from '../../../src' diff --git a/test/validation/empty/valid-array.test.ts b/test/validation/empty/valid-array.test.ts index f09c3786..e5ab8af9 100644 --- a/test/validation/empty/valid-array.test.ts +++ b/test/validation/empty/valid-array.test.ts @@ -3,7 +3,7 @@ import { expect, test } from 'vitest' import { number, array, empty } from '../../../src' test('Valid empty array', () => { - const data = [] + const data: any[] = [] assert(data, empty(array(number()))) expect(data).toStrictEqual([]) }) diff --git a/test/validation/object/invalid-array.test.ts b/test/validation/object/invalid-array.test.ts index 901bfd30..1fa004e8 100644 --- a/test/validation/object/invalid-array.test.ts +++ b/test/validation/object/invalid-array.test.ts @@ -3,7 +3,7 @@ import { expect, test } from 'vitest' import { object } from '../../../src' test('Invalid object array', () => { - const data = [] + const data: any[] = [] const [err, res] = validate(data, object()) expect(res).toBeUndefined() diff --git a/test/validation/record/invalid-array.test.ts b/test/validation/record/invalid-array.test.ts index 62e56049..6629c09f 100644 --- a/test/validation/record/invalid-array.test.ts +++ b/test/validation/record/invalid-array.test.ts @@ -3,7 +3,7 @@ import { expect, test } from 'vitest' import { record, string, number } from '../../../src' test('Invalid record array', () => { - const data = [] + const data: any[] = [] const [err, res] = validate(data, record(string(), number())) expect(res).toBeUndefined() diff --git a/test/validation/size/invalid-array.test.ts b/test/validation/size/invalid-array.test.ts index 0ef60ccf..f6c7f4f1 100644 --- a/test/validation/size/invalid-array.test.ts +++ b/test/validation/size/invalid-array.test.ts @@ -3,7 +3,7 @@ import { expect, test } from 'vitest' import { array, size, number } from '../../../src' test('Invalid size array', () => { - const data = [] + const data: any[] = [] const [err, res] = validate(data, size(array(number()), 1, 5)) expect(res).toBeUndefined() diff --git a/test/validation/type/invalid-array.test.ts b/test/validation/type/invalid-array.test.ts index f44f5fbd..79958b80 100644 --- a/test/validation/type/invalid-array.test.ts +++ b/test/validation/type/invalid-array.test.ts @@ -3,7 +3,7 @@ import { expect, test } from 'vitest' import { type } from '../../../src' test('Invalid type array', () => { - const data = [] + const data: any[] = [] const [err, res] = validate(data, type({})) expect(res).toBeUndefined() From f743dfa9ff123cc2603abdcd20b08c3cbd4ac960 Mon Sep 17 00:00:00 2001 From: Geoffrey Belcher Date: Tue, 3 Dec 2024 13:09:43 -0330 Subject: [PATCH 11/11] Manual fixes for tests that didn't get changed --- test/validation/map/valid-opaque.test.ts | 21 +++++++++++++++------ test/validation/type/valid-instance.test.ts | 17 ++++++++++++----- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/test/validation/map/valid-opaque.test.ts b/test/validation/map/valid-opaque.test.ts index 63d0f38c..8b3edd0c 100644 --- a/test/validation/map/valid-opaque.test.ts +++ b/test/validation/map/valid-opaque.test.ts @@ -1,10 +1,19 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' import { map } from '../../../src' -export const Struct = map() +test('Valid map opaque', () => { + const data = new Map([ + ['a', 1], + [2, true], + ] as any) -export const data = new Map([ - ['a', 1], - [2, true], -] as any) + assert(data, map()) -export const output = data + expect(data).toStrictEqual( + new Map([ + ['a', 1], + [2, true], + ] as any) + ) +}) diff --git a/test/validation/type/valid-instance.test.ts b/test/validation/type/valid-instance.test.ts index ad586db1..99d38a64 100644 --- a/test/validation/type/valid-instance.test.ts +++ b/test/validation/type/valid-instance.test.ts @@ -1,3 +1,5 @@ +import { assert } from '../../../src' +import { expect, test } from 'vitest' import { type, string } from '../../../src' class Person { @@ -8,10 +10,15 @@ class Person { } } -export const Struct = type({ - name: string(), -}) +test('Valid type instance', () => { + const data = new Person('john') -export const data = new Person('john') + assert( + data, + type({ + name: string(), + }) + ) -export const output = data + expect(data).toStrictEqual(new Person('john')) +})