diff --git a/package.json b/package.json index ce5b5a3..a94caac 100644 --- a/package.json +++ b/package.json @@ -23,17 +23,17 @@ ".": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.cjs" + "require": "./dist/index.mjs" }, "./v1": { "types": "./dist/v1/index.d.ts", "import": "./dist/v1/index.mjs", - "require": "./dist/v1/index.cjs" + "require": "./dist/v1/index.mjs" }, "./v2": { "types": "./dist/v2/index.d.ts", "import": "./dist/v2/index.mjs", - "require": "./dist/v2/index.cjs" + "require": "./dist/v2/index.mjs" }, "./package.json": "./package.json" }, @@ -67,7 +67,7 @@ "dependencies": { "axios": "^1.11.0", "axios-retry": "^4.5.0", - "camelcase-keys": "^9.1.3", + "camelcase-keys": "^10.0.0", "neverthrow": "^8.2.0", "pino": "^9.7.0" }, @@ -78,7 +78,7 @@ "@types/node": "^24.1.0", "lefthook": "^1.12.2", "pino-pretty": "^13.0.0", - "pkgroll": "^2.14.5", + "pkgroll": "^2.15.4", "tsx": "^4.20.3", "typedoc": "^0.28.8", "typedoc-plugin-markdown": "^4.7.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b00eebd..ab40822 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,8 +15,8 @@ importers: specifier: ^4.5.0 version: 4.5.0(axios@1.11.0) camelcase-keys: - specifier: ^9.1.3 - version: 9.1.3 + specifier: ^10.0.0 + version: 10.0.0 neverthrow: specifier: ^8.2.0 version: 8.2.0 @@ -43,8 +43,8 @@ importers: specifier: ^13.0.0 version: 13.0.0 pkgroll: - specifier: ^2.14.5 - version: 2.14.5(typescript@5.8.3) + specifier: ^2.15.4 + version: 2.15.4(typescript@5.8.3) tsx: specifier: ^4.20.3 version: 4.20.3 @@ -837,8 +837,8 @@ packages: cpu: [arm] os: [android] - '@rollup/rollup-android-arm-eabi@4.46.1': - resolution: {integrity: sha512-oENme6QxtLCqjChRUUo3S6X8hjCXnWmJWnedD7VbGML5GUtaOtAyx+fEEXnBXVf0CBZApMQU0Idwi0FmyxzQhw==} + '@rollup/rollup-android-arm-eabi@4.50.1': + resolution: {integrity: sha512-HJXwzoZN4eYTdD8bVV22DN8gsPCAj3V20NHKOs8ezfXanGpmVPR7kalUHd+Y31IJp9stdB87VKPFbsGY3H/2ag==} cpu: [arm] os: [android] @@ -847,8 +847,8 @@ packages: cpu: [arm64] os: [android] - '@rollup/rollup-android-arm64@4.46.1': - resolution: {integrity: sha512-OikvNT3qYTl9+4qQ9Bpn6+XHM+ogtFadRLuT2EXiFQMiNkXFLQfNVppi5o28wvYdHL2s3fM0D/MZJ8UkNFZWsw==} + '@rollup/rollup-android-arm64@4.50.1': + resolution: {integrity: sha512-PZlsJVcjHfcH53mOImyt3bc97Ep3FJDXRpk9sMdGX0qgLmY0EIWxCag6EigerGhLVuL8lDVYNnSo8qnTElO4xw==} cpu: [arm64] os: [android] @@ -857,8 +857,8 @@ packages: cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-arm64@4.46.1': - resolution: {integrity: sha512-EFYNNGij2WllnzljQDQnlFTXzSJw87cpAs4TVBAWLdkvic5Uh5tISrIL6NRcxoh/b2EFBG/TK8hgRrGx94zD4A==} + '@rollup/rollup-darwin-arm64@4.50.1': + resolution: {integrity: sha512-xc6i2AuWh++oGi4ylOFPmzJOEeAa2lJeGUGb4MudOtgfyyjr4UPNK+eEWTPLvmPJIY/pgw6ssFIox23SyrkkJw==} cpu: [arm64] os: [darwin] @@ -867,8 +867,8 @@ packages: cpu: [x64] os: [darwin] - '@rollup/rollup-darwin-x64@4.46.1': - resolution: {integrity: sha512-ZaNH06O1KeTug9WI2+GRBE5Ujt9kZw4a1+OIwnBHal92I8PxSsl5KpsrPvthRynkhMck4XPdvY0z26Cym/b7oA==} + '@rollup/rollup-darwin-x64@4.50.1': + resolution: {integrity: sha512-2ofU89lEpDYhdLAbRdeyz/kX3Y2lpYc6ShRnDjY35bZhd2ipuDMDi6ZTQ9NIag94K28nFMofdnKeHR7BT0CATw==} cpu: [x64] os: [darwin] @@ -877,8 +877,8 @@ packages: cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-arm64@4.46.1': - resolution: {integrity: sha512-n4SLVebZP8uUlJ2r04+g2U/xFeiQlw09Me5UFqny8HGbARl503LNH5CqFTb5U5jNxTouhRjai6qPT0CR5c/Iig==} + '@rollup/rollup-freebsd-arm64@4.50.1': + resolution: {integrity: sha512-wOsE6H2u6PxsHY/BeFHA4VGQN3KUJFZp7QJBmDYI983fgxq5Th8FDkVuERb2l9vDMs1D5XhOrhBrnqcEY6l8ZA==} cpu: [arm64] os: [freebsd] @@ -887,8 +887,8 @@ packages: cpu: [x64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.46.1': - resolution: {integrity: sha512-8vu9c02F16heTqpvo3yeiu7Vi1REDEC/yES/dIfq3tSXe6mLndiwvYr3AAvd1tMNUqE9yeGYa5w7PRbI5QUV+w==} + '@rollup/rollup-freebsd-x64@4.50.1': + resolution: {integrity: sha512-A/xeqaHTlKbQggxCqispFAcNjycpUEHP52mwMQZUNqDUJFFYtPHCXS1VAG29uMlDzIVr+i00tSFWFLivMcoIBQ==} cpu: [x64] os: [freebsd] @@ -897,8 +897,8 @@ packages: cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-gnueabihf@4.46.1': - resolution: {integrity: sha512-K4ncpWl7sQuyp6rWiGUvb6Q18ba8mzM0rjWJ5JgYKlIXAau1db7hZnR0ldJvqKWWJDxqzSLwGUhA4jp+KqgDtQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.50.1': + resolution: {integrity: sha512-54v4okehwl5TaSIkpp97rAHGp7t3ghinRd/vyC1iXqXMfjYUTm7TfYmCzXDoHUPTTf36L8pr0E7YsD3CfB3ZDg==} cpu: [arm] os: [linux] @@ -907,8 +907,8 @@ packages: cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.46.1': - resolution: {integrity: sha512-YykPnXsjUjmXE6j6k2QBBGAn1YsJUix7pYaPLK3RVE0bQL2jfdbfykPxfF8AgBlqtYbfEnYHmLXNa6QETjdOjQ==} + '@rollup/rollup-linux-arm-musleabihf@4.50.1': + resolution: {integrity: sha512-p/LaFyajPN/0PUHjv8TNyxLiA7RwmDoVY3flXHPSzqrGcIp/c2FjwPPP5++u87DGHtw+5kSH5bCJz0mvXngYxw==} cpu: [arm] os: [linux] @@ -917,8 +917,8 @@ packages: cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.46.1': - resolution: {integrity: sha512-kKvqBGbZ8i9pCGW3a1FH3HNIVg49dXXTsChGFsHGXQaVJPLA4f/O+XmTxfklhccxdF5FefUn2hvkoGJH0ScWOA==} + '@rollup/rollup-linux-arm64-gnu@4.50.1': + resolution: {integrity: sha512-2AbMhFFkTo6Ptna1zO7kAXXDLi7H9fGTbVaIq2AAYO7yzcAsuTNWPHhb2aTA6GPiP+JXh85Y8CiS54iZoj4opw==} cpu: [arm64] os: [linux] @@ -927,8 +927,8 @@ packages: cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.46.1': - resolution: {integrity: sha512-zzX5nTw1N1plmqC9RGC9vZHFuiM7ZP7oSWQGqpbmfjK7p947D518cVK1/MQudsBdcD84t6k70WNczJOct6+hdg==} + '@rollup/rollup-linux-arm64-musl@4.50.1': + resolution: {integrity: sha512-Cgef+5aZwuvesQNw9eX7g19FfKX5/pQRIyhoXLCiBOrWopjo7ycfB292TX9MDcDijiuIJlx1IzJz3IoCPfqs9w==} cpu: [arm64] os: [linux] @@ -937,8 +937,8 @@ packages: cpu: [loong64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.46.1': - resolution: {integrity: sha512-O8CwgSBo6ewPpktFfSDgB6SJN9XDcPSvuwxfejiddbIC/hn9Tg6Ai0f0eYDf3XvB/+PIWzOQL+7+TZoB8p9Yuw==} + '@rollup/rollup-linux-loongarch64-gnu@4.50.1': + resolution: {integrity: sha512-RPhTwWMzpYYrHrJAS7CmpdtHNKtt2Ueo+BlLBjfZEhYBhK00OsEqM08/7f+eohiF6poe0YRDDd8nAvwtE/Y62Q==} cpu: [loong64] os: [linux] @@ -947,8 +947,8 @@ packages: cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.46.1': - resolution: {integrity: sha512-JnCfFVEKeq6G3h3z8e60kAp8Rd7QVnWCtPm7cxx+5OtP80g/3nmPtfdCXbVl063e3KsRnGSKDHUQMydmzc/wBA==} + '@rollup/rollup-linux-ppc64-gnu@4.50.1': + resolution: {integrity: sha512-eSGMVQw9iekut62O7eBdbiccRguuDgiPMsw++BVUg+1K7WjZXHOg/YOT9SWMzPZA+w98G+Fa1VqJgHZOHHnY0Q==} cpu: [ppc64] os: [linux] @@ -957,8 +957,8 @@ packages: cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.46.1': - resolution: {integrity: sha512-dVxuDqS237eQXkbYzQQfdf/njgeNw6LZuVyEdUaWwRpKHhsLI+y4H/NJV8xJGU19vnOJCVwaBFgr936FHOnJsQ==} + '@rollup/rollup-linux-riscv64-gnu@4.50.1': + resolution: {integrity: sha512-S208ojx8a4ciIPrLgazF6AgdcNJzQE4+S9rsmOmDJkusvctii+ZvEuIC4v/xFqzbuP8yDjn73oBlNDgF6YGSXQ==} cpu: [riscv64] os: [linux] @@ -967,8 +967,8 @@ packages: cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.46.1': - resolution: {integrity: sha512-CvvgNl2hrZrTR9jXK1ye0Go0HQRT6ohQdDfWR47/KFKiLd5oN5T14jRdUVGF4tnsN8y9oSfMOqH6RuHh+ck8+w==} + '@rollup/rollup-linux-riscv64-musl@4.50.1': + resolution: {integrity: sha512-3Ag8Ls1ggqkGUvSZWYcdgFwriy2lWo+0QlYgEFra/5JGtAd6C5Hw59oojx1DeqcA2Wds2ayRgvJ4qxVTzCHgzg==} cpu: [riscv64] os: [linux] @@ -977,8 +977,8 @@ packages: cpu: [s390x] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.46.1': - resolution: {integrity: sha512-x7ANt2VOg2565oGHJ6rIuuAon+A8sfe1IeUx25IKqi49OjSr/K3awoNqr9gCwGEJo9OuXlOn+H2p1VJKx1psxA==} + '@rollup/rollup-linux-s390x-gnu@4.50.1': + resolution: {integrity: sha512-t9YrKfaxCYe7l7ldFERE1BRg/4TATxIg+YieHQ966jwvo7ddHJxPj9cNFWLAzhkVsbBvNA4qTbPVNsZKBO4NSg==} cpu: [s390x] os: [linux] @@ -987,8 +987,8 @@ packages: cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.46.1': - resolution: {integrity: sha512-9OADZYryz/7E8/qt0vnaHQgmia2Y0wrjSSn1V/uL+zw/i7NUhxbX4cHXdEQ7dnJgzYDS81d8+tf6nbIdRFZQoQ==} + '@rollup/rollup-linux-x64-gnu@4.50.1': + resolution: {integrity: sha512-MCgtFB2+SVNuQmmjHf+wfI4CMxy3Tk8XjA5Z//A0AKD7QXUYFMQcns91K6dEHBvZPCnhJSyDWLApk40Iq/H3tA==} cpu: [x64] os: [linux] @@ -997,18 +997,23 @@ packages: cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.46.1': - resolution: {integrity: sha512-NuvSCbXEKY+NGWHyivzbjSVJi68Xfq1VnIvGmsuXs6TCtveeoDRKutI5vf2ntmNnVq64Q4zInet0UDQ+yMB6tA==} + '@rollup/rollup-linux-x64-musl@4.50.1': + resolution: {integrity: sha512-nEvqG+0jeRmqaUMuwzlfMKwcIVffy/9KGbAGyoa26iu6eSngAYQ512bMXuqqPrlTyfqdlB9FVINs93j534UJrg==} cpu: [x64] os: [linux] + '@rollup/rollup-openharmony-arm64@4.50.1': + resolution: {integrity: sha512-RDsLm+phmT3MJd9SNxA9MNuEAO/J2fhW8GXk62G/B4G7sLVumNFbRwDL6v5NrESb48k+QMqdGbHgEtfU0LCpbA==} + cpu: [arm64] + os: [openharmony] + '@rollup/rollup-win32-arm64-msvc@4.44.1': resolution: {integrity: sha512-NtSJVKcXwcqozOl+FwI41OH3OApDyLk3kqTJgx8+gp6On9ZEt5mYhIsKNPGuaZr3p9T6NWPKGU/03Vw4CNU9qg==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-arm64-msvc@4.46.1': - resolution: {integrity: sha512-mWz+6FSRb82xuUMMV1X3NGiaPFqbLN9aIueHleTZCc46cJvwTlvIh7reQLk4p97dv0nddyewBhwzryBHH7wtPw==} + '@rollup/rollup-win32-arm64-msvc@4.50.1': + resolution: {integrity: sha512-hpZB/TImk2FlAFAIsoElM3tLzq57uxnGYwplg6WDyAxbYczSi8O2eQ+H2Lx74504rwKtZ3N2g4bCUkiamzS6TQ==} cpu: [arm64] os: [win32] @@ -1017,8 +1022,8 @@ packages: cpu: [ia32] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.46.1': - resolution: {integrity: sha512-7Thzy9TMXDw9AU4f4vsLNBxh7/VOKuXi73VH3d/kHGr0tZ3x/ewgL9uC7ojUKmH1/zvmZe2tLapYcZllk3SO8Q==} + '@rollup/rollup-win32-ia32-msvc@4.50.1': + resolution: {integrity: sha512-SXjv8JlbzKM0fTJidX4eVsH+Wmnp0/WcD8gJxIZyR6Gay5Qcsmdbi9zVtnbkGPG8v2vMR1AD06lGWy5FLMcG7A==} cpu: [ia32] os: [win32] @@ -1027,8 +1032,8 @@ packages: cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.46.1': - resolution: {integrity: sha512-7GVB4luhFmGUNXXJhH2jJwZCFB3pIOixv2E3s17GQHBFUOQaISlt7aGcQgqvCaDSxTZJUzlK/QJ1FN8S94MrzQ==} + '@rollup/rollup-win32-x64-msvc@4.50.1': + resolution: {integrity: sha512-StxAO/8ts62KZVRAm4JZYq9+NqNsV7RvimNK+YM7ry//zebEH6meuugqW/P5OFUCjyQgui+9fUxT6d5NShvMvA==} cpu: [x64] os: [win32] @@ -1264,9 +1269,9 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - camelcase-keys@9.1.3: - resolution: {integrity: sha512-Rircqi9ch8AnZscQcsA1C47NFdaO3wukpmIRzYcDOrmvgt78hM/sj5pZhZNec2NM12uk5vTwRHZ4anGcrC4ZTg==} - engines: {node: '>=16'} + camelcase-keys@10.0.0: + resolution: {integrity: sha512-dzb1nrmD6llsF6eMZWSpQjVfe1FX4WOkR7HPdX1sMxM5u+1MlnbXodNJ/E6NRArYgMtcwMhiqqemGp/QJV/vrw==} + engines: {node: '>=20'} camelcase@8.0.0: resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==} @@ -1285,6 +1290,9 @@ packages: character-entities-legacy@3.0.0: resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + cjs-module-lexer@2.1.0: + resolution: {integrity: sha512-UX0OwmYRYQQetfrLEZeewIFFI+wSTofC+pMBLNuH3RUuu/xzG1oz84UCEDOSoQlN3fZ4+AzmV50ZYvGqkMh9yA==} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -1740,8 +1748,8 @@ packages: magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} - map-obj@5.0.0: - resolution: {integrity: sha512-2L3MIgJynYrZ3TYMriLDLWocz15okFakV6J12HXvMXDHui2x/zgChzg1u9mFFGbbGWE+GsLpQByt4POb9Or+uA==} + map-obj@5.0.2: + resolution: {integrity: sha512-K6K2NgKnTXimT3779/4KxSvobxOtMmx1LBZ3NwRxT/MDIR3Br/fQ4Q+WCX5QxjyUR8zg5+RV9Tbf2c5pAWTD2A==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} mark.js@8.11.1: @@ -1879,8 +1887,8 @@ packages: resolution: {integrity: sha512-vnMCM6xZTb1WDmLvtG2lE/2p+t9hDEIvTWJsu6FejkE62vB7gDhvzrpFR4Cw2to+9JNQxVnkAKVPA1KPB98vWg==} hasBin: true - pkgroll@2.14.5: - resolution: {integrity: sha512-JgGocqlwcza23DyHdP36GSs7U75d+g4misjVSeIpJVYiSpGx/mU/OiziskyblVbrDAeKRqIazlVsJEkb9v+Z/A==} + pkgroll@2.15.4: + resolution: {integrity: sha512-oUAVVvFROzFiVhetJTvlcYYUh0EmxRF5CLTd2fDf5EX41G/Mg5I490TEOv6r1qGp8RBaYapTv8+daVot2SMmrg==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -1918,9 +1926,9 @@ packages: quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} - quick-lru@6.1.2: - resolution: {integrity: sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==} - engines: {node: '>=12'} + quick-lru@7.1.0: + resolution: {integrity: sha512-Pzd/4IFnTb8E+I1P5rbLQoqpUHcXKg48qTYKi4EANg+sTPwGFEMOcYGiiZz6xuQcOMZP7MPsrdAPx+16Q8qahg==} + engines: {node: '>=18'} real-require@0.2.0: resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} @@ -1974,8 +1982,8 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - rollup@4.46.1: - resolution: {integrity: sha512-33xGNBsDJAkzt0PvninskHlWnTIPgDtTwhg0U38CUoNP/7H6wI2Cz6dUeoNPbjdTdsYTGuiFFASuUOWovH0SyQ==} + rollup@4.50.1: + resolution: {integrity: sha512-78E9voJHwnXQMiQdiqswVLZwJIzdBKJ1GdI5Zx6XwoFKUIk09/sSrr+05QFzvYb8q6Y9pPV45zzDuYa3907TZA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -2754,13 +2762,13 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 - '@rollup/plugin-alias@5.1.1(rollup@4.46.1)': + '@rollup/plugin-alias@5.1.1(rollup@4.50.1)': optionalDependencies: - rollup: 4.46.1 + rollup: 4.50.1 - '@rollup/plugin-commonjs@28.0.6(rollup@4.46.1)': + '@rollup/plugin-commonjs@28.0.6(rollup@4.50.1)': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.46.1) + '@rollup/pluginutils': 5.2.0(rollup@4.50.1) commondir: 1.0.1 estree-walker: 2.0.2 fdir: 6.4.6(picomatch@4.0.3) @@ -2768,168 +2776,171 @@ snapshots: magic-string: 0.30.17 picomatch: 4.0.3 optionalDependencies: - rollup: 4.46.1 + rollup: 4.50.1 - '@rollup/plugin-dynamic-import-vars@2.1.5(rollup@4.46.1)': + '@rollup/plugin-dynamic-import-vars@2.1.5(rollup@4.50.1)': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.46.1) + '@rollup/pluginutils': 5.2.0(rollup@4.50.1) astring: 1.9.0 estree-walker: 2.0.2 fast-glob: 3.3.3 magic-string: 0.30.17 optionalDependencies: - rollup: 4.46.1 + rollup: 4.50.1 - '@rollup/plugin-inject@5.0.5(rollup@4.46.1)': + '@rollup/plugin-inject@5.0.5(rollup@4.50.1)': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.46.1) + '@rollup/pluginutils': 5.2.0(rollup@4.50.1) estree-walker: 2.0.2 magic-string: 0.30.17 optionalDependencies: - rollup: 4.46.1 + rollup: 4.50.1 - '@rollup/plugin-json@6.1.0(rollup@4.46.1)': + '@rollup/plugin-json@6.1.0(rollup@4.50.1)': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.46.1) + '@rollup/pluginutils': 5.2.0(rollup@4.50.1) optionalDependencies: - rollup: 4.46.1 + rollup: 4.50.1 - '@rollup/plugin-node-resolve@16.0.1(rollup@4.46.1)': + '@rollup/plugin-node-resolve@16.0.1(rollup@4.50.1)': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.46.1) + '@rollup/pluginutils': 5.2.0(rollup@4.50.1) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 resolve: 1.22.10 optionalDependencies: - rollup: 4.46.1 + rollup: 4.50.1 - '@rollup/pluginutils@5.2.0(rollup@4.46.1)': + '@rollup/pluginutils@5.2.0(rollup@4.50.1)': dependencies: '@types/estree': 1.0.8 estree-walker: 2.0.2 picomatch: 4.0.3 optionalDependencies: - rollup: 4.46.1 + rollup: 4.50.1 '@rollup/rollup-android-arm-eabi@4.44.1': optional: true - '@rollup/rollup-android-arm-eabi@4.46.1': + '@rollup/rollup-android-arm-eabi@4.50.1': optional: true '@rollup/rollup-android-arm64@4.44.1': optional: true - '@rollup/rollup-android-arm64@4.46.1': + '@rollup/rollup-android-arm64@4.50.1': optional: true '@rollup/rollup-darwin-arm64@4.44.1': optional: true - '@rollup/rollup-darwin-arm64@4.46.1': + '@rollup/rollup-darwin-arm64@4.50.1': optional: true '@rollup/rollup-darwin-x64@4.44.1': optional: true - '@rollup/rollup-darwin-x64@4.46.1': + '@rollup/rollup-darwin-x64@4.50.1': optional: true '@rollup/rollup-freebsd-arm64@4.44.1': optional: true - '@rollup/rollup-freebsd-arm64@4.46.1': + '@rollup/rollup-freebsd-arm64@4.50.1': optional: true '@rollup/rollup-freebsd-x64@4.44.1': optional: true - '@rollup/rollup-freebsd-x64@4.46.1': + '@rollup/rollup-freebsd-x64@4.50.1': optional: true '@rollup/rollup-linux-arm-gnueabihf@4.44.1': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.46.1': + '@rollup/rollup-linux-arm-gnueabihf@4.50.1': optional: true '@rollup/rollup-linux-arm-musleabihf@4.44.1': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.46.1': + '@rollup/rollup-linux-arm-musleabihf@4.50.1': optional: true '@rollup/rollup-linux-arm64-gnu@4.44.1': optional: true - '@rollup/rollup-linux-arm64-gnu@4.46.1': + '@rollup/rollup-linux-arm64-gnu@4.50.1': optional: true '@rollup/rollup-linux-arm64-musl@4.44.1': optional: true - '@rollup/rollup-linux-arm64-musl@4.46.1': + '@rollup/rollup-linux-arm64-musl@4.50.1': optional: true '@rollup/rollup-linux-loongarch64-gnu@4.44.1': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.46.1': + '@rollup/rollup-linux-loongarch64-gnu@4.50.1': optional: true '@rollup/rollup-linux-powerpc64le-gnu@4.44.1': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.46.1': + '@rollup/rollup-linux-ppc64-gnu@4.50.1': optional: true '@rollup/rollup-linux-riscv64-gnu@4.44.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.46.1': + '@rollup/rollup-linux-riscv64-gnu@4.50.1': optional: true '@rollup/rollup-linux-riscv64-musl@4.44.1': optional: true - '@rollup/rollup-linux-riscv64-musl@4.46.1': + '@rollup/rollup-linux-riscv64-musl@4.50.1': optional: true '@rollup/rollup-linux-s390x-gnu@4.44.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.46.1': + '@rollup/rollup-linux-s390x-gnu@4.50.1': optional: true '@rollup/rollup-linux-x64-gnu@4.44.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.46.1': + '@rollup/rollup-linux-x64-gnu@4.50.1': optional: true '@rollup/rollup-linux-x64-musl@4.44.1': optional: true - '@rollup/rollup-linux-x64-musl@4.46.1': + '@rollup/rollup-linux-x64-musl@4.50.1': + optional: true + + '@rollup/rollup-openharmony-arm64@4.50.1': optional: true '@rollup/rollup-win32-arm64-msvc@4.44.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.46.1': + '@rollup/rollup-win32-arm64-msvc@4.50.1': optional: true '@rollup/rollup-win32-ia32-msvc@4.44.1': optional: true - '@rollup/rollup-win32-ia32-msvc@4.46.1': + '@rollup/rollup-win32-ia32-msvc@4.50.1': optional: true '@rollup/rollup-win32-x64-msvc@4.44.1': optional: true - '@rollup/rollup-win32-x64-msvc@4.46.1': + '@rollup/rollup-win32-x64-msvc@4.50.1': optional: true '@shikijs/core@2.5.0': @@ -3206,11 +3217,11 @@ snapshots: callsites@3.1.0: {} - camelcase-keys@9.1.3: + camelcase-keys@10.0.0: dependencies: camelcase: 8.0.0 - map-obj: 5.0.0 - quick-lru: 6.1.2 + map-obj: 5.0.2 + quick-lru: 7.1.0 type-fest: 4.41.0 camelcase@8.0.0: {} @@ -3223,6 +3234,8 @@ snapshots: character-entities-legacy@3.0.0: {} + cjs-module-lexer@2.1.0: {} + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -3694,7 +3707,7 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 - map-obj@5.0.0: {} + map-obj@5.0.2: {} mark.js@8.11.1: {} @@ -3850,18 +3863,19 @@ snapshots: sonic-boom: 4.2.0 thread-stream: 3.1.0 - pkgroll@2.14.5(typescript@5.8.3): + pkgroll@2.15.4(typescript@5.8.3): dependencies: - '@rollup/plugin-alias': 5.1.1(rollup@4.46.1) - '@rollup/plugin-commonjs': 28.0.6(rollup@4.46.1) - '@rollup/plugin-dynamic-import-vars': 2.1.5(rollup@4.46.1) - '@rollup/plugin-inject': 5.0.5(rollup@4.46.1) - '@rollup/plugin-json': 6.1.0(rollup@4.46.1) - '@rollup/plugin-node-resolve': 16.0.1(rollup@4.46.1) - '@rollup/pluginutils': 5.2.0(rollup@4.46.1) + '@rollup/plugin-alias': 5.1.1(rollup@4.50.1) + '@rollup/plugin-commonjs': 28.0.6(rollup@4.50.1) + '@rollup/plugin-dynamic-import-vars': 2.1.5(rollup@4.50.1) + '@rollup/plugin-inject': 5.0.5(rollup@4.50.1) + '@rollup/plugin-json': 6.1.0(rollup@4.50.1) + '@rollup/plugin-node-resolve': 16.0.1(rollup@4.50.1) + '@rollup/pluginutils': 5.2.0(rollup@4.50.1) + cjs-module-lexer: 2.1.0 esbuild: 0.25.8 magic-string: 0.30.17 - rollup: 4.46.1 + rollup: 4.50.1 rollup-pluginutils: 2.8.2 optionalDependencies: typescript: 5.8.3 @@ -3891,7 +3905,7 @@ snapshots: quick-format-unescaped@4.0.4: {} - quick-lru@6.1.2: {} + quick-lru@7.1.0: {} real-require@0.2.0: {} @@ -3955,30 +3969,31 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.44.1 fsevents: 2.3.3 - rollup@4.46.1: + rollup@4.50.1: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.46.1 - '@rollup/rollup-android-arm64': 4.46.1 - '@rollup/rollup-darwin-arm64': 4.46.1 - '@rollup/rollup-darwin-x64': 4.46.1 - '@rollup/rollup-freebsd-arm64': 4.46.1 - '@rollup/rollup-freebsd-x64': 4.46.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.46.1 - '@rollup/rollup-linux-arm-musleabihf': 4.46.1 - '@rollup/rollup-linux-arm64-gnu': 4.46.1 - '@rollup/rollup-linux-arm64-musl': 4.46.1 - '@rollup/rollup-linux-loongarch64-gnu': 4.46.1 - '@rollup/rollup-linux-ppc64-gnu': 4.46.1 - '@rollup/rollup-linux-riscv64-gnu': 4.46.1 - '@rollup/rollup-linux-riscv64-musl': 4.46.1 - '@rollup/rollup-linux-s390x-gnu': 4.46.1 - '@rollup/rollup-linux-x64-gnu': 4.46.1 - '@rollup/rollup-linux-x64-musl': 4.46.1 - '@rollup/rollup-win32-arm64-msvc': 4.46.1 - '@rollup/rollup-win32-ia32-msvc': 4.46.1 - '@rollup/rollup-win32-x64-msvc': 4.46.1 + '@rollup/rollup-android-arm-eabi': 4.50.1 + '@rollup/rollup-android-arm64': 4.50.1 + '@rollup/rollup-darwin-arm64': 4.50.1 + '@rollup/rollup-darwin-x64': 4.50.1 + '@rollup/rollup-freebsd-arm64': 4.50.1 + '@rollup/rollup-freebsd-x64': 4.50.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.50.1 + '@rollup/rollup-linux-arm-musleabihf': 4.50.1 + '@rollup/rollup-linux-arm64-gnu': 4.50.1 + '@rollup/rollup-linux-arm64-musl': 4.50.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.50.1 + '@rollup/rollup-linux-ppc64-gnu': 4.50.1 + '@rollup/rollup-linux-riscv64-gnu': 4.50.1 + '@rollup/rollup-linux-riscv64-musl': 4.50.1 + '@rollup/rollup-linux-s390x-gnu': 4.50.1 + '@rollup/rollup-linux-x64-gnu': 4.50.1 + '@rollup/rollup-linux-x64-musl': 4.50.1 + '@rollup/rollup-openharmony-arm64': 4.50.1 + '@rollup/rollup-win32-arm64-msvc': 4.50.1 + '@rollup/rollup-win32-ia32-msvc': 4.50.1 + '@rollup/rollup-win32-x64-msvc': 4.50.1 fsevents: 2.3.3 run-parallel@1.2.0: diff --git a/src/v1/api/achievements.ts b/src/v1/api/achievements.ts index 31a25bc..df9b731 100644 --- a/src/v1/api/achievements.ts +++ b/src/v1/api/achievements.ts @@ -1,11 +1,11 @@ import type { Client } from "index"; import { fromPromise, type Result } from "neverthrow"; import type { AchievementResponse, AllAchievementsResponse } from "types/v1"; -import { routes } from "v1"; import { transformAchievementResponse, transformAllAchievementsResponse, } from "v1/transformers"; +import { routes } from "../routes"; /** * Retrieves a list of achievements. You can apply pagination. diff --git a/src/v1/api/battlepass.ts b/src/v1/api/battlepass.ts index 5848b6d..be0b6e5 100644 --- a/src/v1/api/battlepass.ts +++ b/src/v1/api/battlepass.ts @@ -1,8 +1,8 @@ import type { Client } from "index"; import { fromPromise, type Result } from "neverthrow"; import type { BattlepassResponse } from "types/v1"; -import { routes } from "v1"; import { transformBattlepassResponse } from "v1/transformers"; +import { routes } from "../routes"; /** * Retrieves the battlepass data for a given season, including season details diff --git a/src/v1/api/heroes.ts b/src/v1/api/heroes.ts index 9b7f62c..70eea4c 100644 --- a/src/v1/api/heroes.ts +++ b/src/v1/api/heroes.ts @@ -1,12 +1,12 @@ import type { Client } from "index"; import { fromPromise, type Result } from "neverthrow"; import type { Hero, HeroLeaderboardResponse } from "types/v1"; -import { routes } from "v1"; import { transformAllHeroesResponse, transformHeroLeaderboardResponse, transformHeroResponse, } from "v1/transformers"; +import { routes } from "../routes"; /** * Retrieves a list of all available heroes with their details. diff --git a/src/v1/api/index.ts b/src/v1/api/index.ts index b3b041e..eead73d 100644 --- a/src/v1/api/index.ts +++ b/src/v1/api/index.ts @@ -1,8 +1,8 @@ import type { Client } from "index"; import { fromPromise, type Result } from "neverthrow"; import type { HealthCheckResponse } from "types/v1"; -import { routes } from "v1"; import { transformHealthCheckResponse } from "v1/transformers"; +import { routes } from "../routes"; /** * API health check. diff --git a/src/v1/api/maps.ts b/src/v1/api/maps.ts index e533966..ba083e6 100644 --- a/src/v1/api/maps.ts +++ b/src/v1/api/maps.ts @@ -1,8 +1,8 @@ import type { Client } from "index"; import { fromPromise, type Result } from "neverthrow"; import type { AllMapsResponse } from "types/v1"; -import { routes } from "v1"; import { transformAllMapsResponse } from "v1/transformers"; +import { routes } from "../routes"; /** * Retrieves all available maps with optional pagination to control the number of results per page. diff --git a/src/v1/api/match.ts b/src/v1/api/match.ts index ae1c44b..528e58d 100644 --- a/src/v1/api/match.ts +++ b/src/v1/api/match.ts @@ -1,7 +1,7 @@ import type { Client } from "index"; import { fromPromise } from "neverthrow"; -import { routes } from "v1"; import { transformMatchResponse } from "v1/transformers"; +import { routes } from "../routes"; /** * Retrieve match data for a specific match identified by the matchId. It processes the match details and player stats. diff --git a/src/v1/api/player.ts b/src/v1/api/player.ts index aaaa40e..95de069 100644 --- a/src/v1/api/player.ts +++ b/src/v1/api/player.ts @@ -6,13 +6,13 @@ import type { PlayerResponse, UpdatePlayerResponse, } from "types/v1"; -import { routes } from "v1"; import { transformFindPlayerResponse, transformGetPlayerResponse, transformPlayerMatchHistoryResponse, transformUpdatePlayerResponse, } from "v1/transformers"; +import { routes } from "../routes"; /** * Retrieves player uid for a specific player identified by their username. It returns basic player information such as name and unique identifier (UID). diff --git a/src/v1/index.ts b/src/v1/index.ts index 7b88c0d..af332c2 100644 --- a/src/v1/index.ts +++ b/src/v1/index.ts @@ -1,106 +1,2 @@ -import { buildQueryString } from "../utils"; - -export const routes = { - healthCheck() { - return "/v1"; - }, - - battlepass(season?: number) { - const url = "/v1/battlepass"; - - return buildQueryString(url, { - season: season ?? undefined, - }); - }, - - allAchievements(page = 1, perPage = 10) { - const url = "/v1/achievements"; - - return buildQueryString(url, { - page: page > 0 ? page : 1, - perPage: perPage > 0 ? perPage : 10, - }); - }, - - achievement(name: string) { - if (!name) { - throw new Error("Achievement name is required"); - } - - return `/v1/achievement/${encodeURIComponent(name)}`; - }, - - allMaps(page = 1, perPage = 10) { - const url = "/v1/maps"; - - return buildQueryString(url, { - page: page > 0 ? page : 1, - limit: perPage > 0 ? perPage : 10, - }); - }, - - searchPlayer(username: string) { - if (!username) { - throw new Error("Username is required"); - } - - return `/v1/find-player/${encodeURIComponent(username)}`; - }, - - player(player: string, season?: number) { - if (!player) { - throw new Error("Player identifier is required"); - } - - return buildQueryString(`/v1/player/${encodeURIComponent(player)}`, { - season: season ?? undefined, - }); - }, - - updatePlayer(player: string) { - if (!player) { - throw new Error("Player identifier is required"); - } - - return `/v1/player/${encodeURIComponent(player)}/update`; - }, - - getPlayerMatchHistory( - uid: string, - season?: number, - skip?: number, - gameMode?: number, - timestamp?: number, - ) { - if (!uid) { - throw new Error("Player UID is required"); - } - - const url = `/v1/player/${encodeURIComponent(uid)}/match-history`; - - return buildQueryString(url, { - season: season ?? undefined, - skip: skip ?? undefined, - game_mode: gameMode ?? undefined, - timestamp: timestamp ?? undefined, - }); - }, - - allHeroes() { - return "/v1/heroes"; - }, - - hero(name: string) { - return `/v1/heroes/hero/${encodeURIComponent(name)}`; - }, - - heroLeaderboard(name: string) { - return `/v1/heroes/leaderboard/${encodeURIComponent(name)}`; - }, - - singleMatch(matchId: string) { - return `/v1/match/${encodeURIComponent(matchId)}`; - }, -}; - export * from "./api"; +export { routes } from "./routes"; diff --git a/src/v1/routes.ts b/src/v1/routes.ts new file mode 100644 index 0000000..34bcb99 --- /dev/null +++ b/src/v1/routes.ts @@ -0,0 +1,104 @@ +import { buildQueryString } from "../utils"; + +export const routes = { + healthCheck() { + return "/v1"; + }, + + battlepass(season?: number) { + const url = "/v1/battlepass"; + + return buildQueryString(url, { + season: season ?? undefined, + }); + }, + + allAchievements(page = 1, perPage = 10) { + const url = "/v1/achievements"; + + return buildQueryString(url, { + page: page > 0 ? page : 1, + perPage: perPage > 0 ? perPage : 10, + }); + }, + + achievement(name: string) { + if (!name) { + throw new Error("Achievement name is required"); + } + + return `/v1/achievement/${encodeURIComponent(name)}`; + }, + + allMaps(page = 1, perPage = 10) { + const url = "/v1/maps"; + + return buildQueryString(url, { + page: page > 0 ? page : 1, + limit: perPage > 0 ? perPage : 10, + }); + }, + + searchPlayer(username: string) { + if (!username) { + throw new Error("Username is required"); + } + + return `/v1/find-player/${encodeURIComponent(username)}`; + }, + + player(player: string, season?: number) { + if (!player) { + throw new Error("Player identifier is required"); + } + + return buildQueryString(`/v1/player/${encodeURIComponent(player)}`, { + season: season ?? undefined, + }); + }, + + updatePlayer(player: string) { + if (!player) { + throw new Error("Player identifier is required"); + } + + return `/v1/player/${encodeURIComponent(player)}/update`; + }, + + getPlayerMatchHistory( + uid: string, + season?: number, + skip?: number, + gameMode?: number, + timestamp?: number, + ) { + if (!uid) { + throw new Error("Player UID is required"); + } + + const url = `/v1/player/${encodeURIComponent(uid)}/match-history`; + + return buildQueryString(url, { + season: season ?? undefined, + skip: skip ?? undefined, + game_mode: gameMode ?? undefined, + timestamp: timestamp ?? undefined, + }); + }, + + allHeroes() { + return "/v1/heroes"; + }, + + hero(name: string) { + return `/v1/heroes/hero/${encodeURIComponent(name)}`; + }, + + heroLeaderboard(name: string) { + return `/v1/heroes/leaderboard/${encodeURIComponent(name)}`; + }, + + singleMatch(matchId: string) { + return `/v1/match/${encodeURIComponent(matchId)}`; + }, +}; diff --git a/src/v2/api/player.ts b/src/v2/api/player.ts index 8942aaf..b8c2582 100644 --- a/src/v2/api/player.ts +++ b/src/v2/api/player.ts @@ -1,11 +1,11 @@ import type { Client } from "index"; import { fromPromise, type Result } from "neverthrow"; import type { PlayerMatchHistoryResponse, PlayerResponse } from "types/v2"; -import { routes } from "v2"; import { transformPlayerMatchHistoryResponse, transformPlayerResponse, } from "v2/transformers"; +import { routes } from "../routes"; /** * Player data for a specific player identified by uid or username. It processes player statistics and related data, such as match history, rank history, heroes, and maps. diff --git a/src/v2/index.ts b/src/v2/index.ts index 8e8d784..af332c2 100644 --- a/src/v2/index.ts +++ b/src/v2/index.ts @@ -1,24 +1,2 @@ -import { buildQueryString } from "utils"; - -export const routes = { - player(uid: number) { - return `/v2/player/${uid}`; - }, - - playerMatchHistory( - uid: number, - page?: number, - limit?: number, - gameMode?: number, - timestamp?: number, - ) { - return buildQueryString(`/v2/player/${uid}/match-history`, { - page, - limit, - game_mode: gameMode, - timestamp, - }); - }, -}; - export * from "./api"; +export { routes } from "./routes"; diff --git a/src/v2/routes.ts b/src/v2/routes.ts new file mode 100644 index 0000000..8ea963d --- /dev/null +++ b/src/v2/routes.ts @@ -0,0 +1,22 @@ +import { buildQueryString } from "../utils"; + +export const routes = { + player(uid: number) { + return `/v2/player/${uid}`; + }, + + playerMatchHistory( + uid: number, + page?: number, + limit?: number, + gameMode?: number, + timestamp?: number, + ) { + return buildQueryString(`/v2/player/${uid}/match-history`, { + page, + limit, + game_mode: gameMode, + timestamp, + }); + }, +};