diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7b52e41..2c472d9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,3 +10,9 @@ updates: target-branch: 'dev' schedule: interval: 'weekly' + + - package-ecosystem: 'github-actions' + directory: '/' + target-branch: 'dev' + schedule: + interval: 'weekly' diff --git a/README.md b/README.md index 1709ea8..4b42dc8 100644 --- a/README.md +++ b/README.md @@ -82,11 +82,11 @@ console.log(galacticConversionResult); /* import type { VoxelCoordinates } from '@nmscd/coordinate-conversion'; type VoxelCoordinates = { - voxelX: number; - voxelY: number; - voxelZ: number; - solarSystemIndex: number; - planetIndex: number; + VoxelX: number; + VoxelY: number; + VoxelZ: number; + SolarSystemIndex: number; + PlanetIndex: number; }; ``` diff --git a/example/assets/custom.js b/example/assets/custom.js index 526abe9..1d399ef 100644 --- a/example/assets/custom.js +++ b/example/assets/custom.js @@ -1,7 +1,7 @@ hljs.highlightAll(); -const voxelObj = { "voxelX": 563, "voxelY": 86, "voxelZ": 181, "solarSystemIndex": 5, "planetIndex": 1 }; +const voxelObj = { "VoxelX": 563, "VoxelY": 86, "VoxelZ": 181, "SolarSystemIndex": 5, "PlanetIndex": 1 }; const voxelString = JSON.stringify(voxelObj, null, ' '); const portalToVoxElem = document.getElementById('portaltoVoxel'); @@ -114,4 +114,4 @@ function onVoxelCoord(disableInputValidation) { onPortalCode(true); onGalacticCoord(true); -onVoxelCoord(true); \ No newline at end of file +onVoxelCoord(true); diff --git a/example/index.html b/example/index.html index 120d211..3ad5ebb 100644 --- a/example/index.html +++ b/example/index.html @@ -12,16 +12,22 @@ @@ -141,8 +147,6 @@

Example conversions

Styled with with Pico - - diff --git a/package-lock.json b/package-lock.json index cce0b2b..45fbbbe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,18 @@ { "name": "@nmscd/coordinate-conversion", - "version": "1.2.2", + "version": "1.2.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@nmscd/coordinate-conversion", - "version": "1.2.2", + "version": "1.2.3", "license": "MIT", "devDependencies": { - "@types/node": "^20.11.19", + "@types/node": "^20.14.2", "@vitest/coverage-v8": "^1.3.1", "@vitest/ui": "^1.3.1", - "prettier": "^3.2.5", + "prettier": "^3.3.1", "typescript": "^5.3.3", "vite": "^5.1.1", "vite-plugin-dts": "^3.7.2", @@ -20,40 +20,40 @@ } }, "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.6.tgz", + "integrity": "sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz", + "integrity": "sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", - "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.6.tgz", + "integrity": "sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -63,13 +63,13 @@ } }, "node_modules/@babel/types": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", - "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz", + "integrity": "sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.6", + "@babel/helper-validator-identifier": "^7.24.6", "to-fast-properties": "^2.0.0" }, "engines": { @@ -472,14 +472,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -495,9 +495,9 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" @@ -554,16 +554,6 @@ "@rushstack/node-core-library": "4.0.2" } }, - "node_modules/@microsoft/api-extractor/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, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/@microsoft/api-extractor/node_modules/minimatch": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", @@ -576,6 +566,21 @@ "node": "*" } }, + "node_modules/@microsoft/api-extractor/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@microsoft/api-extractor/node_modules/typescript": { "version": "5.4.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", @@ -656,9 +661,9 @@ } }, "node_modules/@polka/url": { - "version": "1.0.0-next.24", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.24.tgz", - "integrity": "sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==", + "version": "1.0.0-next.25", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", + "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", "dev": true }, "node_modules/@rollup/pluginutils": { @@ -683,10 +688,16 @@ } } }, + "node_modules/@rollup/pluginutils/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 + }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz", - "integrity": "sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", + "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", "cpu": [ "arm" ], @@ -697,9 +708,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.0.tgz", - "integrity": "sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", + "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", "cpu": [ "arm64" ], @@ -710,9 +721,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.0.tgz", - "integrity": "sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", + "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", "cpu": [ "arm64" ], @@ -723,9 +734,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.0.tgz", - "integrity": "sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", + "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", "cpu": [ "x64" ], @@ -736,9 +747,22 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.0.tgz", - "integrity": "sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", + "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", + "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", "cpu": [ "arm" ], @@ -749,9 +773,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.0.tgz", - "integrity": "sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", + "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", "cpu": [ "arm64" ], @@ -762,9 +786,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.0.tgz", - "integrity": "sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", + "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", "cpu": [ "arm64" ], @@ -774,10 +798,23 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", + "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.0.tgz", - "integrity": "sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", + "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", "cpu": [ "riscv64" ], @@ -787,10 +824,23 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", + "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz", - "integrity": "sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", + "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", "cpu": [ "x64" ], @@ -801,9 +851,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.0.tgz", - "integrity": "sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", + "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", "cpu": [ "x64" ], @@ -814,9 +864,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.0.tgz", - "integrity": "sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", + "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", "cpu": [ "arm64" ], @@ -827,9 +877,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.0.tgz", - "integrity": "sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", + "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", "cpu": [ "ia32" ], @@ -840,9 +890,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.0.tgz", - "integrity": "sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", + "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", "cpu": [ "x64" ], @@ -874,6 +924,21 @@ } } }, + "node_modules/@rushstack/node-core-library/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@rushstack/rig-package": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.5.2.tgz", @@ -948,9 +1013,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.10.tgz", - "integrity": "sha512-Eem5pH9pmWBHoGAT8Dr5fdc5rYA+4NAovdM4EktRPVAAiJhmWWfQrA0cFhAbOsQdSfIHjAud6YdkbL69+zSKjw==", + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -1073,15 +1138,6 @@ "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, - "dependencies": { - "@types/estree": "^1.0.0" - } - }, "node_modules/@volar/language-core": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.11.1.tgz", @@ -1111,26 +1167,32 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.19.tgz", - "integrity": "sha512-gj81785z0JNzRcU0Mq98E56e4ltO1yf8k5PQ+tV/7YHnbZkrM0fyFyuttnN8ngJZjbpofWE/m4qjKBiLl8Ju4w==", + "version": "3.4.27", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.27.tgz", + "integrity": "sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==", "dev": true, "dependencies": { - "@babel/parser": "^7.23.9", - "@vue/shared": "3.4.19", + "@babel/parser": "^7.24.4", + "@vue/shared": "3.4.27", "entities": "^4.5.0", "estree-walker": "^2.0.2", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" } }, + "node_modules/@vue/compiler-core/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 + }, "node_modules/@vue/compiler-dom": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.19.tgz", - "integrity": "sha512-vm6+cogWrshjqEHTzIDCp72DKtea8Ry/QVpQRYoyTIg9k7QZDX6D8+HGURjtmatfgM8xgCFtJJaOlCaRYRK3QA==", + "version": "3.4.27", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.27.tgz", + "integrity": "sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==", "dev": true, "dependencies": { - "@vue/compiler-core": "3.4.19", - "@vue/shared": "3.4.19" + "@vue/compiler-core": "3.4.27", + "@vue/shared": "3.4.27" } }, "node_modules/@vue/language-core": { @@ -1158,10 +1220,34 @@ } } }, + "node_modules/@vue/language-core/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, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@vue/language-core/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@vue/shared": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.19.tgz", - "integrity": "sha512-/KliRRHMF6LoiThEy+4c1Z4KB/gbPrGjWwJR+crg2otgrf/egKzRaCPvJ51S5oetgsgXLfc4Rm5ZgrKHZrtMSw==", + "version": "3.4.27", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.27.tgz", + "integrity": "sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==", "dev": true }, "node_modules/acorn": { @@ -1238,21 +1324,22 @@ "dev": true }, "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==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -1346,9 +1433,9 @@ "dev": true }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -1434,10 +1521,13 @@ } }, "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 + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0" + } }, "node_modules/execa": { "version": "8.0.1", @@ -1506,9 +1596,9 @@ "dev": true }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -1591,6 +1681,7 @@ "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, "dependencies": { "fs.realpath": "^1.0.0", @@ -1619,28 +1710,6 @@ "node": ">= 6" } }, - "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, - "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, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -1705,6 +1774,7 @@ "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, "dependencies": { "once": "^1.3.0", @@ -1916,26 +1986,23 @@ } }, "node_modules/magic-string": { - "version": "0.30.8", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", - "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" } }, "node_modules/magicast": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.3.tgz", - "integrity": "sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.4.tgz", + "integrity": "sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==", "dev": true, "dependencies": { - "@babel/parser": "^7.23.6", - "@babel/types": "^7.23.6", - "source-map-js": "^1.0.2" + "@babel/parser": "^7.24.4", + "@babel/types": "^7.24.0", + "source-map-js": "^1.2.0" } }, "node_modules/make-dir": { @@ -1969,12 +2036,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -1994,18 +2061,15 @@ } }, "node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "*" } }, "node_modules/mlly": { @@ -2171,9 +2235,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "node_modules/picomatch": { @@ -2189,13 +2253,13 @@ } }, "node_modules/pkg-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.1.0.tgz", - "integrity": "sha512-/RpmvKdxKf8uILTtoOhAgf30wYbP2Qw+L9p3Rvshx1JZVX+XQNZQFjlbmGHEGIm4CkVPlSn+NXmIM8+9oWQaSA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.1.1.tgz", + "integrity": "sha512-ko14TjmDuQJ14zsotODv7dBlwxKhUKQEhuhmbqo1uCi9BB0Z2alo/wAXg6q1dTR5TyuqYyWhjtfe/Tsh+X28jQ==", "dev": true, "dependencies": { "confbox": "^0.1.7", - "mlly": "^1.6.1", + "mlly": "^1.7.0", "pathe": "^1.1.2" } }, @@ -2228,9 +2292,9 @@ } }, "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz", + "integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -2286,9 +2350,9 @@ ] }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "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 }, "node_modules/resolve": { @@ -2319,9 +2383,9 @@ } }, "node_modules/rollup": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.0.tgz", - "integrity": "sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", + "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -2334,19 +2398,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.13.0", - "@rollup/rollup-android-arm64": "4.13.0", - "@rollup/rollup-darwin-arm64": "4.13.0", - "@rollup/rollup-darwin-x64": "4.13.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.13.0", - "@rollup/rollup-linux-arm64-gnu": "4.13.0", - "@rollup/rollup-linux-arm64-musl": "4.13.0", - "@rollup/rollup-linux-riscv64-gnu": "4.13.0", - "@rollup/rollup-linux-x64-gnu": "4.13.0", - "@rollup/rollup-linux-x64-musl": "4.13.0", - "@rollup/rollup-win32-arm64-msvc": "4.13.0", - "@rollup/rollup-win32-ia32-msvc": "4.13.0", - "@rollup/rollup-win32-x64-msvc": "4.13.0", + "@rollup/rollup-android-arm-eabi": "4.18.0", + "@rollup/rollup-android-arm64": "4.18.0", + "@rollup/rollup-darwin-arm64": "4.18.0", + "@rollup/rollup-darwin-x64": "4.18.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", + "@rollup/rollup-linux-arm-musleabihf": "4.18.0", + "@rollup/rollup-linux-arm64-gnu": "4.18.0", + "@rollup/rollup-linux-arm64-musl": "4.18.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", + "@rollup/rollup-linux-riscv64-gnu": "4.18.0", + "@rollup/rollup-linux-s390x-gnu": "4.18.0", + "@rollup/rollup-linux-x64-gnu": "4.18.0", + "@rollup/rollup-linux-x64-musl": "4.18.0", + "@rollup/rollup-win32-arm64-msvc": "4.18.0", + "@rollup/rollup-win32-ia32-msvc": "4.18.0", + "@rollup/rollup-win32-x64-msvc": "4.18.0", "fsevents": "~2.3.2" } }, @@ -2374,13 +2441,10 @@ } }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -2560,28 +2624,6 @@ "node": ">=8" } }, - "node_modules/test-exclude/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, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/test-exclude/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, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/tinybench": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.8.0.tgz", @@ -2689,18 +2731,18 @@ } }, "node_modules/validator": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", - "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", "dev": true, "engines": { "node": ">= 0.10" } }, "node_modules/vite": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz", - "integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==", + "version": "5.2.12", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.12.tgz", + "integrity": "sha512-/gC8GxzxMK5ntBwb48pR32GGhENnjtY30G4A0jemunsBkiEZFw60s8InGpN8gkhHEkjnRK1aSAxeQgwvFhUHAA==", "dev": true, "dependencies": { "esbuild": "^0.20.1", @@ -2775,9 +2817,9 @@ } }, "node_modules/vite-plugin-dts": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/vite-plugin-dts/-/vite-plugin-dts-3.9.0.tgz", - "integrity": "sha512-pwFIEYQ3LZvMafkEGvNnileb6af5JuyZsBfYQrTDYxdeGEy0OS4B4hCsLPo5YGnhK5k9EzyO6BXVO6y+Lt5T2A==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/vite-plugin-dts/-/vite-plugin-dts-3.9.1.tgz", + "integrity": "sha512-rVp2KM9Ue22NGWB8dNtWEr+KekN3rIgz1tWD050QnRGlriUCmaDwa7qA5zDEjbXg5lAXhYMSBJtx3q3hQIJZSg==", "dev": true, "dependencies": { "@microsoft/api-extractor": "7.43.0", diff --git a/package.json b/package.json index 5bf744c..9a0afa5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@nmscd/coordinate-conversion", "private": false, - "version": "1.2.2", + "version": "1.2.3", "type": "module", "description": "Library to convert NMS coordinates", "main": "./dist/coordinate-conversion.js", @@ -32,10 +32,10 @@ }, "homepage": "https://nmscd.com/Coordinate-Conversion/", "devDependencies": { - "@types/node": "^20.11.19", + "@types/node": "^20.14.2", "@vitest/coverage-v8": "^1.3.1", "@vitest/ui": "^1.3.1", - "prettier": "^3.2.5", + "prettier": "^3.3.1", "typescript": "^5.3.3", "vite": "^5.1.1", "vite-plugin-dts": "^3.7.2", diff --git a/src/constants/restrictions.ts b/src/constants/restrictions.ts index 7d06076..b16e073 100644 --- a/src/constants/restrictions.ts +++ b/src/constants/restrictions.ts @@ -2,11 +2,11 @@ export const maxGalacticCoordLength = 19; export const minGalacticCoordLength = 16; export const exactGlyphLength = 12; -export const voxelMin = -768; -export const voxelMax = 768; +export const voxelMin = -2048; +export const voxelMax = 2048; -export const solarSystemIndexMin = 1; -export const solarSystemIndexMax = 15; +export const solarSystemIndexMin = 0; +export const solarSystemIndexMax = 4095; -export const planetIndexMin = 1; +export const planetIndexMin = 0; export const planetIndexMax = 15; diff --git a/src/converter/baseConverter.spec.ts b/src/converter/baseConverter.spec.ts index 9d2038d..96336fd 100644 --- a/src/converter/baseConverter.spec.ts +++ b/src/converter/baseConverter.spec.ts @@ -37,7 +37,7 @@ describe('Base Converter', () => { test('should return an error result', () => { const result = fakeConverter(); - expect(result.isSuccess).toBeFalsy(); + expect(result.isSuccess, result.errorMessage).toBeFalsy(); }); }); @@ -63,7 +63,7 @@ describe('Base Converter', () => { inputValidator: (_) => vi.fn().mockReturnValue({ isValid: true })(), }); const result = fakeConverterWithBadConversion(); - expect(result.isSuccess).toBeFalsy(); + expect(result.isSuccess, result.errorMessage).toBeFalsy(); }); }); }); diff --git a/src/converter/galactic/galacticCoordinate.spec.ts b/src/converter/galactic/galacticCoordinate.spec.ts index 88f0de4..ede84be 100644 --- a/src/converter/galactic/galacticCoordinate.spec.ts +++ b/src/converter/galactic/galacticCoordinate.spec.ts @@ -6,26 +6,26 @@ describe('Galactic Coordinate Converter', () => { describe('toGlyph', () => { test('with valid coordinate', () => { const result = GalacticCoordinate({ code: '0C55:00D5:0922:0234' }).toGlyph(); - expect(result.isSuccess).toBeTruthy(); + expect(result.isSuccess, result.errorMessage).toBeTruthy(); expect(result.value.code).toBe('023456123456'); }); test('with invalid coordinate', () => { const result = GalacticCoordinate({ code: '0000C55:00D5:0922:0234' }).toGlyph(); - expect(result.isSuccess).toBeFalsy(); + expect(result.isSuccess, result.errorMessage).toBeFalsy(); }); }); describe('toVoxel', () => { test('with valid coordinate', () => { const result = GalacticCoordinate({ code: '0C55:00D5:0922:0234' }).toVoxel(); - expect(result.isSuccess).toBeTruthy(); - expect(result.value.voxelX).toBe(1110); - expect(result.value.voxelY).toBe(86); - expect(result.value.voxelZ).toBe(291); + expect(result.isSuccess, result.errorMessage).toBeTruthy(); + expect(result.value.VoxelX).toBe(1110); + expect(result.value.VoxelY).toBe(86); + expect(result.value.VoxelZ).toBe(291); }); test('with invalid coordinate', () => { const result = GalacticCoordinate({ code: '0000C55:00D5:0922:0234' }).toVoxel(); - expect(result.isSuccess).toBeFalsy(); + expect(result.isSuccess, result.errorMessage).toBeFalsy(); }); }); }); diff --git a/src/converter/portal/portalCode.spec.ts b/src/converter/portal/portalCode.spec.ts index 528610e..e6e1e4a 100644 --- a/src/converter/portal/portalCode.spec.ts +++ b/src/converter/portal/portalCode.spec.ts @@ -6,33 +6,33 @@ describe('Portal Coordinate Converter', () => { describe('toGalacticCoordinates', () => { test('with valid coordinate', () => { const result = PortalCode({ code: '023456123456' }).toGalacticCoordinates(); - expect(result.isSuccess).toBeTruthy(); + expect(result.isSuccess, result.errorMessage).toBeTruthy(); expect(result.value.code).toBe('0C55:00D5:0922:0234'); }); test('with valid coordinate and last expected digit being a character', () => { const result = PortalCode({ code: '405EA21107FF' }).toGalacticCoordinates(); - expect(result.isSuccess).toBeTruthy(); + expect(result.isSuccess, result.errorMessage).toBeTruthy(); expect(result.value.code).toBe('0FFE:0021:090F:005E'); }); test('with invalid coordinate', () => { const result = PortalCode({ code: '0000023456123456' }).toGalacticCoordinates(); - expect(result.isSuccess).toBeFalsy(); + expect(result.isSuccess, result.errorMessage).toBeFalsy(); }); }); describe('toVoxel', () => { test('with valid coordinate', () => { const result = PortalCode({ code: '023456123456' }).toVoxel(); - expect(result.isSuccess).toBeTruthy(); - expect(result.value.voxelX).toBe(1110); - expect(result.value.voxelY).toBe(86); - expect(result.value.voxelZ).toBe(291); + expect(result.isSuccess, result.errorMessage).toBeTruthy(); + expect(result.value.VoxelX).toBe(1110); + expect(result.value.VoxelY).toBe(86); + expect(result.value.VoxelZ).toBe(291); }); test('with invalid coordinate', () => { const result = PortalCode({ code: '0000023456123456' }).toVoxel(); - expect(result.isSuccess).toBeFalsy(); + expect(result.isSuccess, result.errorMessage).toBeFalsy(); }); }); }); diff --git a/src/converter/voxel/voxelCoordinate.spec.ts b/src/converter/voxel/voxelCoordinate.spec.ts index 3818936..235b54d 100644 --- a/src/converter/voxel/voxelCoordinate.spec.ts +++ b/src/converter/voxel/voxelCoordinate.spec.ts @@ -5,38 +5,38 @@ import type { VoxelCoordinates } from '@/types/voxelTypes'; describe('Voxel Coordinate Converter', () => { const validCoords: VoxelCoordinates = { - voxelX: 110, - voxelY: 86, - voxelZ: 291, - planetIndex: 1, - solarSystemIndex: 2, + VoxelX: -1781, + VoxelY: 3, + VoxelZ: 197, + PlanetIndex: 1, + SolarSystemIndex: 228, }; const inValidCoords: VoxelCoordinates = { ...validCoords, - voxelX: 10000000, + VoxelX: 10000000, }; describe('toGlyph', () => { test('with valid coordinate', () => { const result = VoxelCoordinate(validCoords).toGlyph(); - expect(result.isSuccess).toBeTruthy(); - expect(result.value.code).toBe('10025612306E'); + expect(result.isSuccess, result.errorMessage).toBeTruthy(); + expect(result.value.code).toBe('10E4030C590B'); }); test('with invalid coordinate', () => { const result = VoxelCoordinate(inValidCoords).toGlyph(); - expect(result.isSuccess).toBeFalsy(); + expect(result.isSuccess, result.errorMessage).toBeFalsy(); }); }); describe('toGalacticCoordinates', () => { test('with valid coordinate', () => { const result = VoxelCoordinate(validCoords).toGalacticCoordinates(); - expect(result.isSuccess).toBeTruthy(); - expect(result.value.code).toBe('086D:00D5:0922:0002'); + expect(result.isSuccess, result.errorMessage).toBeTruthy(); + expect(result.value.code).toBe('010A:0082:08C4:00E4'); }); test('with invalid coordinate', () => { const result = VoxelCoordinate(inValidCoords).toGalacticCoordinates(); - expect(result.isSuccess).toBeFalsy(); + expect(result.isSuccess, result.errorMessage).toBeFalsy(); }); }); }); diff --git a/src/functions/convertCoords/coords2XYZ.spec.ts b/src/functions/convertCoords/coords2XYZ.spec.ts index c76d5a3..04fd65e 100644 --- a/src/functions/convertCoords/coords2XYZ.spec.ts +++ b/src/functions/convertCoords/coords2XYZ.spec.ts @@ -10,11 +10,11 @@ describe('Galactic to XYZ', () => { }); test('output is the correct format', () => { const coords = coords2XYZ('0C55:00D5:0922:0234'); - expect(coords.voxelX).toBe(1110); - expect(coords.voxelY).toBe(86); - expect(coords.voxelZ).toBe(291); - expect(coords.planetIndex).toBe(0); - expect(coords.solarSystemIndex).toBe(564); + expect(coords.VoxelX).toBe(1110); + expect(coords.VoxelY).toBe(86); + expect(coords.VoxelZ).toBe(291); + expect(coords.PlanetIndex).toBe(0); + expect(coords.SolarSystemIndex).toBe(564); }); test('invalid input', () => { const coords = coords2XYZ('00000C55:00D5:0922:0234'); @@ -29,11 +29,11 @@ describe('Galactic to XYZ', () => { ['0847:0083:0022:0823', 72, 4, -2013, 0, 2083], ])('convert %s to XYZ', (c, x, y, z, pi, ssi) => { const coords = coords2XYZ(c); - expect(coords!.voxelX).toBe(x); - expect(coords!.voxelY).toBe(y); - expect(coords!.voxelZ).toBe(z); - expect(coords!.planetIndex).toBe(pi); - expect(coords!.solarSystemIndex).toBe(ssi); + expect(coords!.VoxelX).toBe(x); + expect(coords!.VoxelY).toBe(y); + expect(coords!.VoxelZ).toBe(z); + expect(coords!.PlanetIndex).toBe(pi); + expect(coords!.SolarSystemIndex).toBe(ssi); }); }); }); diff --git a/src/functions/convertGlyphs/glyphs2XYZ.spec.ts b/src/functions/convertGlyphs/glyphs2XYZ.spec.ts index 3c6de3c..9589abe 100644 --- a/src/functions/convertGlyphs/glyphs2XYZ.spec.ts +++ b/src/functions/convertGlyphs/glyphs2XYZ.spec.ts @@ -10,11 +10,11 @@ describe('Glyphs to XYZ', () => { }); test('output is the correct format', () => { const coords = glyphs2XYZ('023456123456'); - expect(coords!.voxelX).toBe(1110); - expect(coords!.voxelY).toBe(86); - expect(coords!.voxelZ).toBe(291); - expect(coords!.planetIndex).toBe(0); - expect(coords!.solarSystemIndex).toBe(564); + expect(coords!.VoxelX).toBe(1110); + expect(coords!.VoxelY).toBe(86); + expect(coords!.VoxelZ).toBe(291); + expect(coords!.PlanetIndex).toBe(0); + expect(coords!.SolarSystemIndex).toBe(564); }); test('invalid input', () => { const coords = glyphs2XYZ('00000023456123456'); @@ -29,11 +29,11 @@ describe('Glyphs to XYZ', () => { ['082304823048', 72, 4, -2013, 0, 2083], ])('convert %s to XYZ', (g, x, y, z, pi, ssi) => { const coords = glyphs2XYZ(g); - expect(coords!.voxelX).toBe(x); - expect(coords!.voxelY).toBe(y); - expect(coords!.voxelZ).toBe(z); - expect(coords!.planetIndex).toBe(pi); - expect(coords!.solarSystemIndex).toBe(ssi); + expect(coords!.VoxelX).toBe(x); + expect(coords!.VoxelY).toBe(y); + expect(coords!.VoxelZ).toBe(z); + expect(coords!.PlanetIndex).toBe(pi); + expect(coords!.SolarSystemIndex).toBe(ssi); }); }); }); diff --git a/src/functions/convertGlyphs/glyphs2XYZ.ts b/src/functions/convertGlyphs/glyphs2XYZ.ts index ee24c51..8603cf6 100644 --- a/src/functions/convertGlyphs/glyphs2XYZ.ts +++ b/src/functions/convertGlyphs/glyphs2XYZ.ts @@ -41,10 +41,10 @@ export function glyphs2XYZ(glyphs: string): VoxelOutput { } return { - voxelX: VoxelX, - voxelY: VoxelY, - voxelZ: VoxelZ, - solarSystemIndex: system_idx, - planetIndex: planet_idx, + VoxelX, + VoxelY, + VoxelZ, + SolarSystemIndex: system_idx, + PlanetIndex: planet_idx, }; } diff --git a/src/functions/convertXYZ/xyz2Coords.spec.ts b/src/functions/convertXYZ/xyz2Coords.spec.ts index 8a2451e..0fd52e9 100644 --- a/src/functions/convertXYZ/xyz2Coords.spec.ts +++ b/src/functions/convertXYZ/xyz2Coords.spec.ts @@ -7,11 +7,11 @@ import { xyz2Coords } from './xyz2Coords'; describe('XYZ to Galactic', () => { describe('output', () => { const xyz: VoxelCoordinates = { - voxelX: 1110, - voxelY: 86, - voxelZ: 291, - planetIndex: 0, - solarSystemIndex: 564, + VoxelX: 1110, + VoxelY: 86, + VoxelZ: 291, + PlanetIndex: 0, + SolarSystemIndex: 564, }; test(`output is exactly ${maxGalacticCoordLength} chars`, () => { const coords = xyz2Coords(xyz); @@ -36,11 +36,11 @@ describe('XYZ to Galactic', () => { [72, 4, -2013, 0, 2083, '0847:0083:0022:0823'], ])('convert { x:%s, y:%s, z:%s, pi:%s, ssi:%s } to coords', (x, y, z, pi, ssi, gc) => { const xyz: VoxelCoordinates = { - voxelX: x, - voxelY: y, - voxelZ: z, - planetIndex: pi, - solarSystemIndex: ssi, + VoxelX: x, + VoxelY: y, + VoxelZ: z, + PlanetIndex: pi, + SolarSystemIndex: ssi, }; const coords = xyz2Coords(xyz); expect(coords).toBe(gc); diff --git a/src/functions/convertXYZ/xyz2Glyphs.spec.ts b/src/functions/convertXYZ/xyz2Glyphs.spec.ts index 2481757..360cca2 100644 --- a/src/functions/convertXYZ/xyz2Glyphs.spec.ts +++ b/src/functions/convertXYZ/xyz2Glyphs.spec.ts @@ -6,11 +6,11 @@ import type { VoxelCoordinates } from '@/types/voxelTypes'; describe('XYZ to Glyphs', () => { describe('output', () => { const xyz: VoxelCoordinates = { - voxelX: 1110, - voxelY: 86, - voxelZ: 291, - planetIndex: 0, - solarSystemIndex: 564, + VoxelX: 1110, + VoxelY: 86, + VoxelZ: 291, + PlanetIndex: 0, + SolarSystemIndex: 564, }; test('output is exactly 12 chars', () => { const coords = xyz2Glyphs(xyz); @@ -32,11 +32,11 @@ describe('XYZ to Glyphs', () => { [72, 4, -2013, 0, 2083, '082304823048'], ])('convert { x:%s, y:%s, z:%s, pi:%s, ssi:%s } to glyphs', (x, y, z, pi, ssi, g) => { const xyz: VoxelCoordinates = { - voxelX: x, - voxelY: y, - voxelZ: z, - planetIndex: pi, - solarSystemIndex: ssi, + VoxelX: x, + VoxelY: y, + VoxelZ: z, + PlanetIndex: pi, + SolarSystemIndex: ssi, }; const coords = xyz2Glyphs(xyz); expect(coords).toBe(g); diff --git a/src/functions/convertXYZ/xyz2Glyphs.ts b/src/functions/convertXYZ/xyz2Glyphs.ts index 90e8431..0d86ddb 100644 --- a/src/functions/convertXYZ/xyz2Glyphs.ts +++ b/src/functions/convertXYZ/xyz2Glyphs.ts @@ -1,11 +1,11 @@ import type { VoxelCoordinates } from '@/types/voxelTypes'; export function xyz2Glyphs({ - voxelX: VoxelX, - voxelY: VoxelY, - voxelZ: VoxelZ, - solarSystemIndex: SolarSystemIndex, - planetIndex: PlanetIndex, + VoxelX, + VoxelY, + VoxelZ, + SolarSystemIndex, + PlanetIndex, }: VoxelCoordinates): string { let x_glyphs, y_glyphs, z_glyphs; if (VoxelX < 0) { diff --git a/src/types/voxelTypes.ts b/src/types/voxelTypes.ts index f633366..9f4daed 100644 --- a/src/types/voxelTypes.ts +++ b/src/types/voxelTypes.ts @@ -1,9 +1,9 @@ export type VoxelCoordinates = { - voxelX: number; - voxelY: number; - voxelZ: number; - solarSystemIndex: number; - planetIndex: number; + VoxelX: number; + VoxelY: number; + VoxelZ: number; + SolarSystemIndex: number; + PlanetIndex: number; }; export type VoxelInput = VoxelCoordinates; diff --git a/src/validation/voxelInputValidation.spec.ts b/src/validation/voxelInputValidation.spec.ts index b1913cb..9a5740e 100644 --- a/src/validation/voxelInputValidation.spec.ts +++ b/src/validation/voxelInputValidation.spec.ts @@ -13,58 +13,58 @@ import { describe('Voxel Validation', () => { const baseCoords: VoxelCoordinates = { - voxelX: 1110, - voxelY: 86, - voxelZ: 291, - planetIndex: 0, - solarSystemIndex: 564, + VoxelX: 1110, + VoxelY: 86, + VoxelZ: 291, + PlanetIndex: 0, + SolarSystemIndex: 564, }; test('on null', () => { const coords: any = null; expect(VoxelInputValidator(coords).isValid).toBeFalsy(); }); - test('on too small voxelX coordinate', () => { - const coords = { ...baseCoords, voxelX: voxelMin - 1 }; + test('on too small VoxelX coordinate', () => { + const coords = { ...baseCoords, VoxelX: voxelMin - 1 }; expect(VoxelInputValidator(coords).isValid).toBeFalsy(); }); - test('on too big voxelX coordinate', () => { - const coords = { ...baseCoords, voxelX: voxelMax + 1 }; + test('on too big VoxelX coordinate', () => { + const coords = { ...baseCoords, VoxelX: voxelMax + 1 }; expect(VoxelInputValidator(coords).isValid).toBeFalsy(); }); - test('on too small voxelY coordinate', () => { - const coords = { ...baseCoords, voxelY: voxelMin - 1 }; + test('on too small VoxelY coordinate', () => { + const coords = { ...baseCoords, VoxelY: voxelMin - 1 }; expect(VoxelInputValidator(coords).isValid).toBeFalsy(); }); - test('on too big voxelY coordinate', () => { - const coords = { ...baseCoords, voxelY: voxelMax + 1 }; + test('on too big VoxelY coordinate', () => { + const coords = { ...baseCoords, VoxelY: voxelMax + 1 }; expect(VoxelInputValidator(coords).isValid).toBeFalsy(); }); - test('on too small voxelZ coordinate', () => { - const coords = { ...baseCoords, voxelZ: voxelMin - 1 }; + test('on too small VoxelZ coordinate', () => { + const coords = { ...baseCoords, VoxelZ: voxelMin - 1 }; expect(VoxelInputValidator(coords).isValid).toBeFalsy(); }); - test('on too big voxelZ coordinate', () => { - const coords = { ...baseCoords, voxelZ: voxelMax + 1 }; + test('on too big VoxelZ coordinate', () => { + const coords = { ...baseCoords, VoxelZ: voxelMax + 1 }; expect(VoxelInputValidator(coords).isValid).toBeFalsy(); }); - test('on too small planetIndex coordinate', () => { - const coords = { ...baseCoords, planetIndex: planetIndexMin - 1 }; + test('on too small PlanetIndex coordinate', () => { + const coords = { ...baseCoords, PlanetIndex: planetIndexMin - 1 }; expect(VoxelInputValidator(coords).isValid).toBeFalsy(); }); - test('on too big planetIndex coordinate', () => { - const coords = { ...baseCoords, planetIndex: planetIndexMax + 1 }; + test('on too big PlanetIndex coordinate', () => { + const coords = { ...baseCoords, PlanetIndex: planetIndexMax + 1 }; expect(VoxelInputValidator(coords).isValid).toBeFalsy(); }); - test('on too small solarSystemIndex coordinate', () => { - const coords = { ...baseCoords, solarSystemIndex: solarSystemIndexMin - 1 }; + test('on too small SolarSystemIndex coordinate', () => { + const coords = { ...baseCoords, SolarSystemIndex: solarSystemIndexMin - 1 }; expect(VoxelInputValidator(coords).isValid).toBeFalsy(); }); - test('on too big solarSystemIndex coordinate', () => { - const coords = { ...baseCoords, solarSystemIndex: solarSystemIndexMax + 1 }; + test('on too big SolarSystemIndex coordinate', () => { + const coords = { ...baseCoords, SolarSystemIndex: solarSystemIndexMax + 1 }; expect(VoxelInputValidator(coords).isValid).toBeFalsy(); }); }); diff --git a/src/validation/voxelInputValidation.ts b/src/validation/voxelInputValidation.ts index 9883a49..968d557 100644 --- a/src/validation/voxelInputValidation.ts +++ b/src/validation/voxelInputValidation.ts @@ -20,25 +20,25 @@ export const VoxelInputValidator: Validator = (inputProps: VoxelInpu } const validations: Array<() => ValidationResult> = [ - () => notNull(validationMessage.cannotBeNull('voxelX'))(inputProps.voxelX), - () => minValue(voxelMin, 'voxelX')(inputProps.voxelX), - () => maxValue(voxelMax, 'voxelX')(inputProps.voxelX), + () => notNull(validationMessage.cannotBeNull('VoxelX'))(inputProps.VoxelX), + () => minValue(voxelMin, 'VoxelX')(inputProps.VoxelX), + () => maxValue(voxelMax, 'VoxelX')(inputProps.VoxelX), // - () => notNull(validationMessage.cannotBeNull('voxelY'))(inputProps.voxelY), - () => minValue(voxelMin, 'voxelY')(inputProps.voxelY), - () => maxValue(voxelMax, 'voxelY')(inputProps.voxelY), + () => notNull(validationMessage.cannotBeNull('VoxelY'))(inputProps.VoxelY), + () => minValue(voxelMin, 'VoxelY')(inputProps.VoxelY), + () => maxValue(voxelMax, 'VoxelY')(inputProps.VoxelY), // - () => notNull(validationMessage.cannotBeNull('voxelZ'))(inputProps.voxelZ), - () => minValue(voxelMin, 'voxelZ')(inputProps.voxelZ), - () => maxValue(voxelMax, 'voxelZ')(inputProps.voxelZ), + () => notNull(validationMessage.cannotBeNull('VoxelZ'))(inputProps.VoxelZ), + () => minValue(voxelMin, 'VoxelZ')(inputProps.VoxelZ), + () => maxValue(voxelMax, 'VoxelZ')(inputProps.VoxelZ), // - () => notNull(validationMessage.cannotBeNull('solarSystemIndex'))(inputProps.solarSystemIndex), - () => minValue(solarSystemIndexMin, 'solarSystemIndex')(inputProps.solarSystemIndex), - () => maxValue(solarSystemIndexMax, 'solarSystemIndex')(inputProps.solarSystemIndex), + () => notNull(validationMessage.cannotBeNull('SolarSystemIndex'))(inputProps.SolarSystemIndex), + () => minValue(solarSystemIndexMin, 'SolarSystemIndex')(inputProps.SolarSystemIndex), + () => maxValue(solarSystemIndexMax, 'SolarSystemIndex')(inputProps.SolarSystemIndex), // - () => notNull(validationMessage.cannotBeNull('planetIndex'))(inputProps.planetIndex), - () => minValue(planetIndexMin, 'planetIndex')(inputProps.planetIndex), - () => maxValue(planetIndexMax, 'planetIndex')(inputProps.planetIndex), + () => notNull(validationMessage.cannotBeNull('PlanetIndex'))(inputProps.PlanetIndex), + () => minValue(planetIndexMin, 'PlanetIndex')(inputProps.PlanetIndex), + () => maxValue(planetIndexMax, 'PlanetIndex')(inputProps.PlanetIndex), ]; for (const validation of validations) { const result = validation();