commit f67748fe9d60a9402395cb3872a472d73de98372 Author: OrJDev Date: Tue Nov 1 09:38:08 2022 +0200 rc inital diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..04c01ba --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +dist/ \ No newline at end of file diff --git a/README.MD b/README.MD new file mode 100644 index 0000000..c9f622f --- /dev/null +++ b/README.MD @@ -0,0 +1,52 @@ +# Solid tRPC - v10 - RC + +## Getting Started + +I recommend using [Create JD App](https://github.com/OrJDev/create-jd-app) but if you want to create a project from scratch, you can follow the steps below: + +### Installation + +```bash +npm install @trpc/client@10.0.0-rc.2 @trpc/server@10.0.0-rc.2 solid-trpc@next @tanstack/solid-query +``` + +### Creating A Client + +```ts +// utils/trpc.ts +import { IAppRouter } from "@/whereMyRouterAt"; // your router type +import { createTRPCSolid } from "solid-trpc"; +import { httpBatchLink } from "@trpc/client"; +import { QueryClient } from "@tanstack/solid-query"; + +export const trpc = createTRPCSolid(); +export const client = trpc.createClient({ + links: [ + httpBatchLink({ + url: "/api/trpc", + }), + ], +}); +export const queryClient = new QueryClient(); +``` + +### TRPC Provider + +```tsx +// App.tsx +import { Component } from "solid-js"; +import { client, trpc, queryClient } from "./utils/trpc"; // the client we created above +import Home from "./pages/Home"; // page for instance + +interface IAppProps {} + +const App: Component = ({}) => { + return ( + + + + ); +}; + +export default App; +``` diff --git a/babel.config.cjs b/babel.config.cjs new file mode 100644 index 0000000..751c425 --- /dev/null +++ b/babel.config.cjs @@ -0,0 +1,11 @@ +module.exports = { + env: { + test: { + presets: [ + ['@babel/preset-env', { targets: { node: 'current' } }], + '@babel/preset-typescript' + ], + plugins: ['babel-plugin-jsx-dom-expressions'] + } + } +}; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..f8a2d59 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1948 @@ +{ + "name": "solid-trpc", + "version": "0.0.1-rc.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "solid-trpc", + "version": "0.0.1-rc.1", + "license": "MIT", + "devDependencies": { + "@babel/core": "^7.18.13", + "@babel/preset-typescript": "^7.18.6", + "@rollup/plugin-babel": "5.3.1", + "@rollup/plugin-node-resolve": "13.3.0", + "@tanstack/solid-query": "^4.6.1", + "@trpc/client": "10.0.0-rc.2", + "@trpc/server": "10.0.0-rc.2", + "@types/node": "^18.7.14", + "babel-preset-solid": "^1.5.3", + "rollup": "^2.79.0", + "solid-js": "^1.5.3", + "typescript": "^4.8.2" + }, + "peerDependencies": { + "@tanstack/solid-query": "^4.6.1", + "@trpc/client": "10.0.0-rc.2", + "@trpc/server": "10.0.0-rc.2", + "solid-js": "^1.5.3" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.0.tgz", + "integrity": "sha512-Gt9jszFJYq7qzXVK4slhc6NzJXnOVmRECWcVjF/T23rNXD9NtWQ0W3qxdg+p9wWIB+VQw3GYV/U2Ha9bRTfs4w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.6.tgz", + "integrity": "sha512-D2Ue4KHpc6Ys2+AxpIx1BZ8+UegLLLE2p3KJEuJRKmokHOtl49jQ5ny1773KsGLZs8MQvBidAF6yWUJxRqtKtg==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.6", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.6", + "@babel/helpers": "^7.19.4", + "@babel/parser": "^7.19.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.6", + "@babel/types": "^7.19.4", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.0.tgz", + "integrity": "sha512-GUPcXxWibClgmYJuIwC2Bc2Lg+8b9VjaJ+HlNdACEVt+Wlr1eoU1OPZjZRm7Hzl0gaTsUZNQfeihvZJhG7oc3w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.0", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz", + "integrity": "sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.20.0", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz", + "integrity": "sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.9", + "@babel/helper-split-export-declaration": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "dev": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", + "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.6.tgz", + "integrity": "sha512-fCmcfQo/KYr/VXXDIyd3CBGZ6AFhPFy1TfSEJ+PilGVlQT6jcbqtHAM4C1EciRqMza7/TpOUZliuSH+U6HAhJw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.19.4", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.6", + "@babel/types": "^7.19.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", + "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.19.1", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz", + "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.19.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.0.tgz", + "integrity": "sha512-aGMjYraN0zosCEthoGLdqot1oRsmxVTQRHadsUPz5QM44Zej2PYRz7XiDE7GqnkZnNtLbOuxqoZw42vkU7+XEQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.0", + "@babel/types": "^7.20.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.0.tgz", + "integrity": "sha512-G9VgAhEaICnz8iiJeGJQyVl6J2nTjbW0xeisva0PK6XcKsga7BIaqm4ZF8Rg1Wbaqmy6znspNqhPaPkyukujzg==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", + "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz", + "integrity": "sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.20.0.tgz", + "integrity": "sha512-xOAsAFaun3t9hCwZ13Qe7gq423UgMZ6zAgmLxeGGapFqlT/X3L5qT2btjiVLlFn7gWtMaVyceS5VxGAuKbgizw==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/plugin-syntax-typescript": "^7.20.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", + "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-transform-typescript": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.0.tgz", + "integrity": "sha512-5+cAXQNARgjRUK0JWu2UBwja4JLSO/rBMPJzpsKb+oBF5xlUuCfljQepS4XypBQoiigL0VQjTZy6WiONtUdScQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.20.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.20.0", + "@babel/types": "^7.20.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.0.tgz", + "integrity": "sha512-Jlgt3H0TajCW164wkTOTzHkZb075tMQMULzrLUoUeKmO7eFL96GgDxf7/Axhc5CAuKE3KFyVW1p6ysKsi2oXAg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "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==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@rollup/plugin-babel": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", + "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.10.4", + "@rollup/pluginutils": "^3.1.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0", + "@types/babel__core": "^7.1.9", + "rollup": "^1.20.0||^2.0.0" + }, + "peerDependenciesMeta": { + "@types/babel__core": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz", + "integrity": "sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "deepmerge": "^4.2.2", + "is-builtin-module": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "peerDependencies": { + "rollup": "^2.42.0" + } + }, + "node_modules/@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "dependencies": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@tanstack/query-core": { + "version": "4.13.4", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.13.4.tgz", + "integrity": "sha512-DMIy6tgGehYoRUFyoR186+pQspOicyZNSGvBWxPc2CinHjWOQ7DPnGr9zmn/kE9xK4Zd3GXd25Nj3X20+TF6Lw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/solid-query": { + "version": "4.13.4", + "resolved": "https://registry.npmjs.org/@tanstack/solid-query/-/solid-query-4.13.4.tgz", + "integrity": "sha512-zpb8QqNzyQpZQEpQ44Pv2viIs3Kx10qrbgoYn/4M/j7apYT4r5n8DqtAfR48PLDOUFN4swNPE7AMQX/n0epG4Q==", + "dev": true, + "dependencies": { + "@tanstack/query-core": "4.13.4" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "solid-js": "^1.5.7" + } + }, + "node_modules/@trpc/client": { + "version": "10.0.0-rc.2", + "resolved": "https://registry.npmjs.org/@trpc/client/-/client-10.0.0-rc.2.tgz", + "integrity": "sha512-8GIehvg7QAdD9cSv++PrBnLQYXngTW0dIayNJPCYoaaUVAGew9/bJppYYXd17UQBNyVY+fAK0Q55E6HUYnYz2w==", + "dev": true, + "peerDependencies": { + "@trpc/server": "10.0.0-rc.2" + } + }, + "node_modules/@trpc/server": { + "version": "10.0.0-rc.2", + "resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.0.0-rc.2.tgz", + "integrity": "sha512-qxtEoqXnF/eACW9c9/B/UJ+RkMz3QobKzwoYBamXxDf2LEENjdfWmj7cdHRC637LUAS6YS6WmD3Lol8SD8RiGg==", + "dev": true + }, + "node_modules/@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.11.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.8.tgz", + "integrity": "sha512-uGwPWlE0Hj972KkHtCDVwZ8O39GmyjfMane1Z3GUBGGnkZ2USDq7SxLpVIiIHpweY9DS0QTDH0Nw7RNBsAAZ5A==", + "dev": true + }, + "node_modules/@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "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, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/babel-plugin-jsx-dom-expressions": { + "version": "0.35.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jsx-dom-expressions/-/babel-plugin-jsx-dom-expressions-0.35.2.tgz", + "integrity": "sha512-ES+K+P6n4vjV9FGvCfJtOlJuAntpez+IoD0kzLZPjIfBoOU8IhE6hVYXdP458mJlvHlXiFsLQfvoTTYgPzPOJw==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "7.16.0", + "@babel/plugin-syntax-jsx": "^7.16.5", + "@babel/types": "^7.16.0", + "html-entities": "2.3.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-plugin-jsx-dom-expressions/node_modules/@babel/helper-module-imports": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", + "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.16.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/babel-preset-solid": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/babel-preset-solid/-/babel-preset-solid-1.6.1.tgz", + "integrity": "sha512-Ji/cvYUE2BROsA3zOhaqKjuAEo6YAkmw8ZE11QsMtSEcWJ1rCFC829qWb5FLPl3UymVxh68+dpScPDtyyr/rdA==", + "dev": true, + "dependencies": { + "babel-plugin-jsx-dom-expressions": "^0.35.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001429", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001429.tgz", + "integrity": "sha512-511ThLu1hF+5RRRt0zYCf2U2yRr9GPF6m5y90SBCWsvSoYoW7yAGlv/elyPaNfvGCkp6kj/KFZWU0BMA69Prsg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] + }, + "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, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "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, + "dependencies": { + "color-name": "1.1.3" + } + }, + "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 + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/csstype": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", + "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==", + "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==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.284", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", + "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "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, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "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, + "engines": { + "node": ">=4" + } + }, + "node_modules/html-entities": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.2.tgz", + "integrity": "sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==", + "dev": true + }, + "node_modules/is-builtin-module": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.0.tgz", + "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true + }, + "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 + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "dev": true + }, + "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 + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.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/rollup": { + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/solid-js": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.6.1.tgz", + "integrity": "sha512-i8OmR419Hr0918Or6sm1ET/cgmxTtAB7Bdz/UwhZ7G2THixrvVSO3jd+C7YqMKKfVwmf8PJ2gUSbKE8NKv28GA==", + "dev": true, + "dependencies": { + "csstype": "^3.1.0" + } + }, + "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, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "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, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/compat-data": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.0.tgz", + "integrity": "sha512-Gt9jszFJYq7qzXVK4slhc6NzJXnOVmRECWcVjF/T23rNXD9NtWQ0W3qxdg+p9wWIB+VQw3GYV/U2Ha9bRTfs4w==", + "dev": true + }, + "@babel/core": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.6.tgz", + "integrity": "sha512-D2Ue4KHpc6Ys2+AxpIx1BZ8+UegLLLE2p3KJEuJRKmokHOtl49jQ5ny1773KsGLZs8MQvBidAF6yWUJxRqtKtg==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.19.6", + "@babel/helper-compilation-targets": "^7.19.3", + "@babel/helper-module-transforms": "^7.19.6", + "@babel/helpers": "^7.19.4", + "@babel/parser": "^7.19.6", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.6", + "@babel/types": "^7.19.4", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + } + }, + "@babel/generator": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.0.tgz", + "integrity": "sha512-GUPcXxWibClgmYJuIwC2Bc2Lg+8b9VjaJ+HlNdACEVt+Wlr1eoU1OPZjZRm7Hzl0gaTsUZNQfeihvZJhG7oc3w==", + "dev": true, + "requires": { + "@babel/types": "^7.20.0", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz", + "integrity": "sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.20.0", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz", + "integrity": "sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.9", + "@babel/helper-split-export-declaration": "^7.18.6" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "dev": true + }, + "@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "dev": true, + "requires": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", + "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", + "dev": true, + "requires": { + "@babel/types": "^7.18.9" + } + }, + "@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-transforms": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.6.tgz", + "integrity": "sha512-fCmcfQo/KYr/VXXDIyd3CBGZ6AFhPFy1TfSEJ+PilGVlQT6jcbqtHAM4C1EciRqMza7/TpOUZliuSH+U6HAhJw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.19.4", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.6", + "@babel/types": "^7.19.4" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", + "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "dev": true + }, + "@babel/helper-replace-supers": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", + "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.19.1", + "@babel/types": "^7.19.0" + } + }, + "@babel/helper-simple-access": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz", + "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==", + "dev": true, + "requires": { + "@babel/types": "^7.19.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-string-parser": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dev": true + }, + "@babel/helpers": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.0.tgz", + "integrity": "sha512-aGMjYraN0zosCEthoGLdqot1oRsmxVTQRHadsUPz5QM44Zej2PYRz7XiDE7GqnkZnNtLbOuxqoZw42vkU7+XEQ==", + "dev": true, + "requires": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.0", + "@babel/types": "^7.20.0" + } + }, + "@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.0.tgz", + "integrity": "sha512-G9VgAhEaICnz8iiJeGJQyVl6J2nTjbW0xeisva0PK6XcKsga7BIaqm4ZF8Rg1Wbaqmy6znspNqhPaPkyukujzg==", + "dev": true + }, + "@babel/plugin-syntax-jsx": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", + "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz", + "integrity": "sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.19.0" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.20.0.tgz", + "integrity": "sha512-xOAsAFaun3t9hCwZ13Qe7gq423UgMZ6zAgmLxeGGapFqlT/X3L5qT2btjiVLlFn7gWtMaVyceS5VxGAuKbgizw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.19.0", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/plugin-syntax-typescript": "^7.20.0" + } + }, + "@babel/preset-typescript": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz", + "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-transform-typescript": "^7.18.6" + } + }, + "@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + } + }, + "@babel/traverse": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.0.tgz", + "integrity": "sha512-5+cAXQNARgjRUK0JWu2UBwja4JLSO/rBMPJzpsKb+oBF5xlUuCfljQepS4XypBQoiigL0VQjTZy6WiONtUdScQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.20.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.20.0", + "@babel/types": "^7.20.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.0.tgz", + "integrity": "sha512-Jlgt3H0TajCW164wkTOTzHkZb075tMQMULzrLUoUeKmO7eFL96GgDxf7/Axhc5CAuKE3KFyVW1p6ysKsi2oXAg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@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==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "@rollup/plugin-babel": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", + "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.10.4", + "@rollup/pluginutils": "^3.1.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz", + "integrity": "sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "deepmerge": "^4.2.2", + "is-builtin-module": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + } + }, + "@tanstack/query-core": { + "version": "4.13.4", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-4.13.4.tgz", + "integrity": "sha512-DMIy6tgGehYoRUFyoR186+pQspOicyZNSGvBWxPc2CinHjWOQ7DPnGr9zmn/kE9xK4Zd3GXd25Nj3X20+TF6Lw==", + "dev": true + }, + "@tanstack/solid-query": { + "version": "4.13.4", + "resolved": "https://registry.npmjs.org/@tanstack/solid-query/-/solid-query-4.13.4.tgz", + "integrity": "sha512-zpb8QqNzyQpZQEpQ44Pv2viIs3Kx10qrbgoYn/4M/j7apYT4r5n8DqtAfR48PLDOUFN4swNPE7AMQX/n0epG4Q==", + "dev": true, + "requires": { + "@tanstack/query-core": "4.13.4" + } + }, + "@trpc/client": { + "version": "10.0.0-rc.2", + "resolved": "https://registry.npmjs.org/@trpc/client/-/client-10.0.0-rc.2.tgz", + "integrity": "sha512-8GIehvg7QAdD9cSv++PrBnLQYXngTW0dIayNJPCYoaaUVAGew9/bJppYYXd17UQBNyVY+fAK0Q55E6HUYnYz2w==", + "dev": true, + "requires": {} + }, + "@trpc/server": { + "version": "10.0.0-rc.2", + "resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.0.0-rc.2.tgz", + "integrity": "sha512-qxtEoqXnF/eACW9c9/B/UJ+RkMz3QobKzwoYBamXxDf2LEENjdfWmj7cdHRC637LUAS6YS6WmD3Lol8SD8RiGg==", + "dev": true + }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "@types/node": { + "version": "18.11.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.8.tgz", + "integrity": "sha512-uGwPWlE0Hj972KkHtCDVwZ8O39GmyjfMane1Z3GUBGGnkZ2USDq7SxLpVIiIHpweY9DS0QTDH0Nw7RNBsAAZ5A==", + "dev": true + }, + "@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "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, + "requires": { + "color-convert": "^1.9.0" + } + }, + "babel-plugin-jsx-dom-expressions": { + "version": "0.35.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jsx-dom-expressions/-/babel-plugin-jsx-dom-expressions-0.35.2.tgz", + "integrity": "sha512-ES+K+P6n4vjV9FGvCfJtOlJuAntpez+IoD0kzLZPjIfBoOU8IhE6hVYXdP458mJlvHlXiFsLQfvoTTYgPzPOJw==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "7.16.0", + "@babel/plugin-syntax-jsx": "^7.16.5", + "@babel/types": "^7.16.0", + "html-entities": "2.3.2" + }, + "dependencies": { + "@babel/helper-module-imports": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", + "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", + "dev": true, + "requires": { + "@babel/types": "^7.16.0" + } + } + } + }, + "babel-preset-solid": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/babel-preset-solid/-/babel-preset-solid-1.6.1.tgz", + "integrity": "sha512-Ji/cvYUE2BROsA3zOhaqKjuAEo6YAkmw8ZE11QsMtSEcWJ1rCFC829qWb5FLPl3UymVxh68+dpScPDtyyr/rdA==", + "dev": true, + "requires": { + "babel-plugin-jsx-dom-expressions": "^0.35.2" + } + }, + "browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + } + }, + "builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001429", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001429.tgz", + "integrity": "sha512-511ThLu1hF+5RRRt0zYCf2U2yRr9GPF6m5y90SBCWsvSoYoW7yAGlv/elyPaNfvGCkp6kj/KFZWU0BMA69Prsg==", + "dev": true + }, + "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, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "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, + "requires": { + "color-name": "1.1.3" + } + }, + "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 + }, + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "csstype": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", + "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.4.284", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", + "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "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 + }, + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "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 + }, + "html-entities": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.2.tgz", + "integrity": "sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==", + "dev": true + }, + "is-builtin-module": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.0.tgz", + "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", + "dev": true, + "requires": { + "builtin-modules": "^3.3.0" + } + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true + }, + "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 + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "dev": true + }, + "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 + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "rollup": { + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "solid-js": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.6.1.tgz", + "integrity": "sha512-i8OmR419Hr0918Or6sm1ET/cgmxTtAB7Bdz/UwhZ7G2THixrvVSO3jd+C7YqMKKfVwmf8PJ2gUSbKE8NKv28GA==", + "dev": true, + "requires": { + "csstype": "^3.1.0" + } + }, + "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, + "requires": { + "has-flag": "^3.0.0" + } + }, + "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 + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + }, + "typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f7a49c8 --- /dev/null +++ b/package.json @@ -0,0 +1,59 @@ +{ + "name": "solid-trpc", + "description": "SolidJS tRPC", + "author": "OrJDev", + "license": "MIT", + "version": "0.0.1-rc.1", + "publishConfig": { + "access": "public", + "tag": "next" + }, + "type": "module", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + ".": { + "solid": "./dist/index.jsx", + "default": "./dist/index.js" + } + }, + "files": [ + "dist" + ], + "sideEffects": false, + "scripts": { + "build": "rm -rf dist && tsc && rollup -c && node scripts/cp" + }, + "devDependencies": { + "@babel/core": "^7.18.13", + "@babel/preset-typescript": "^7.18.6", + "@rollup/plugin-babel": "5.3.1", + "@rollup/plugin-node-resolve": "13.3.0", + "@tanstack/solid-query": "^4.6.1", + "@trpc/client": "10.0.0-rc.2", + "@trpc/server": "10.0.0-rc.2", + "@types/node": "^18.7.14", + "babel-preset-solid": "^1.5.3", + "rollup": "^2.79.0", + "solid-js": "^1.5.3", + "typescript": "^4.8.2" + }, + "peerDependencies": { + "@tanstack/solid-query": "^4.6.1", + "@trpc/client": "10.0.0-rc.2", + "@trpc/server": "10.0.0-rc.2", + "solid-js": "^1.5.3" + }, + "keywords": [ + "solidjs", + "trpc" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/OrJDev/solid-trpc.git" + }, + "bugs": { + "url": "https://github.com/OrJDev/solid-trpc/issues" + }, + "homepage": "https://github.com/OrJDev/solid-trpc#readme" +} diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..ce2a2af --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,24 @@ +import babel from "@rollup/plugin-babel"; +import nodeResolve from "@rollup/plugin-node-resolve"; + +export default { + input: "src/index.tsx", + output: [ + { + file: "dist/index.js", + format: "es", + }, + ], + external: ["solid-js", "solid-js/web"], + plugins: [ + nodeResolve({ + extensions: [".js", ".ts", ".tsx"], + }), + babel({ + extensions: [".js", ".ts", ".tsx"], + babelHelpers: "bundled", + presets: ["solid", "@babel/preset-typescript"], + exclude: "node_modules/**", + }), + ], +}; diff --git a/scripts/cp.js b/scripts/cp.js new file mode 100644 index 0000000..2ad63fa --- /dev/null +++ b/scripts/cp.js @@ -0,0 +1,19 @@ +import { existsSync } from "fs"; +import fs from "fs/promises"; +import path from "path"; +import { fileURLToPath } from "url"; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + +async function main() { + if (!existsSync(path.join(__dirname, "../dist"))) { + await fs.mkdir(path.join(__dirname, "../dist")); + } + await fs.copyFile( + path.join(__dirname, "../README.MD"), + path.join(__dirname, "../dist/README.MD") + ); +} +main().catch((e) => { + console.log(e); +}); diff --git a/src/createTRPCSolid.ts b/src/createTRPCSolid.ts new file mode 100644 index 0000000..c0c9a73 --- /dev/null +++ b/src/createTRPCSolid.ts @@ -0,0 +1,161 @@ +import { TRPCClientErrorLike } from "@trpc/client"; +import { + AnyMutationProcedure, + AnyProcedure, + AnyQueryProcedure, + AnyRouter, + AnySubscriptionProcedure, + ProcedureRouterRecord, + inferProcedureInput, + inferProcedureOutput, +} from "@trpc/server"; +import { inferObservableValue } from "@trpc/server/observable"; +import { createFlatProxy } from "@trpc/server/shared"; +import { + CreateReactUtilsProxy, + createReactProxyDecoration, + createReactQueryUtilsProxy, +} from "./shared"; +import { + CreateClient, + CreateReactQueryHooks, + TRPCProvider, + UseDehydratedState, + UseTRPCInfiniteQueryOptions, + UseTRPCInfiniteQueryResult, + UseTRPCMutationOptions, + UseTRPCMutationResult, + UseTRPCQueryOptions, + UseTRPCQueryResult, + UseTRPCSubscriptionOptions, + createHooksInternal, +} from "./shared/hooks/createHooksInternal"; +import { CreateTRPCSolidOptions } from "./shared/types"; + +/** + * @internal + */ +export type DecorateProcedure< + TProcedure extends AnyProcedure, + TPath extends string +> = TProcedure extends AnyQueryProcedure + ? { + useQuery: < + TQueryFnData = inferProcedureOutput, + TData = inferProcedureOutput + >( + input: inferProcedureInput, + opts?: UseTRPCQueryOptions< + TPath, + inferProcedureInput, + TQueryFnData, + TData, + TRPCClientErrorLike + > + ) => UseTRPCQueryResult>; + } & (inferProcedureInput extends { cursor?: any } + ? { + useInfiniteQuery: < + _TQueryFnData = inferProcedureOutput, + TData = inferProcedureOutput + >( + input: Omit, "cursor">, + opts?: UseTRPCInfiniteQueryOptions< + TPath, + inferProcedureInput, + TData, + TRPCClientErrorLike + > + ) => UseTRPCInfiniteQueryResult< + TData, + TRPCClientErrorLike + >; + } + : {}) + : TProcedure extends AnyMutationProcedure + ? { + useMutation: ( + opts?: UseTRPCMutationOptions< + inferProcedureInput, + TRPCClientErrorLike, + inferProcedureOutput, + TContext + > + ) => UseTRPCMutationResult< + inferProcedureOutput, + TRPCClientErrorLike, + inferProcedureInput, + TContext + >; + } + : TProcedure extends AnySubscriptionProcedure + ? { + useSubscription: ( + input: inferProcedureInput, + opts?: UseTRPCSubscriptionOptions< + inferObservableValue>, + TRPCClientErrorLike + > + ) => void; + } + : never; + +/** + * @internal + */ +export type DecoratedProcedureRecord< + TProcedures extends ProcedureRouterRecord, + TPath extends string = "" +> = { + [TKey in keyof TProcedures]: TProcedures[TKey] extends AnyRouter + ? DecoratedProcedureRecord< + TProcedures[TKey]["_def"]["record"], + `${TPath}${TKey & string}.` + > + : TProcedures[TKey] extends AnyProcedure + ? DecorateProcedure + : never; +}; + +export type CreateTRPCSolid = { + useContext(): CreateReactUtilsProxy; + Provider: TRPCProvider; + createClient: CreateClient; + useDehydratedState: UseDehydratedState; +} & DecoratedProcedureRecord; + +/** + * @internal + */ +export function createHooksInternalProxy< + TRouter extends AnyRouter, + TSSRContext = unknown +>(trpc: CreateReactQueryHooks) { + type CreateHooksInternalProxy = CreateTRPCSolid; + + return createFlatProxy((key) => { + if (key === "useContext") { + return () => { + const context = trpc.useContext(); + // create a stable reference of the utils context + return (createReactQueryUtilsProxy as any)(context as any); + }; + } + + if ((key as string) in trpc) { + return (trpc as any)[key]; + } + + return createReactProxyDecoration(key as string, trpc); + }); +} + +export function createTRPCSolid< + TRouter extends AnyRouter, + TSSRContext = unknown +>(opts?: CreateTRPCSolidOptions) { + const hooks = createHooksInternal(opts); + const proxy = createHooksInternalProxy(hooks); + + return proxy; +} diff --git a/src/index.tsx b/src/index.tsx new file mode 100644 index 0000000..4c0199d --- /dev/null +++ b/src/index.tsx @@ -0,0 +1,4 @@ +export * from "@trpc/client"; + +export { createTRPCSolid, type CreateTRPCSolid } from "./createTRPCSolid"; +export { createReactQueryHooks } from "./interop"; diff --git a/src/internals/context.tsx b/src/internals/context.tsx new file mode 100644 index 0000000..1727205 --- /dev/null +++ b/src/internals/context.tsx @@ -0,0 +1,235 @@ +import { + CancelOptions, + FetchInfiniteQueryOptions, + FetchQueryOptions, + InfiniteData, + InvalidateOptions, + InvalidateQueryFilters, + QueryClient, + RefetchOptions, + RefetchQueryFilters, + SetDataOptions, + Updater, +} from "@tanstack/solid-query"; +import { TRPCClient, TRPCClientError, TRPCRequestOptions } from "@trpc/client"; +import type { + AnyRouter, + inferHandlerInput, + inferProcedureInput, + inferProcedureOutput, +} from "@trpc/server"; +import { createContext } from "solid-js"; + +export interface TRPCFetchQueryOptions + extends FetchQueryOptions, + TRPCRequestOptions {} + +export interface TRPCFetchInfiniteQueryOptions + extends FetchInfiniteQueryOptions, + TRPCRequestOptions {} + +/** @internal */ +export type SSRState = false | "prepass" | "mounting" | "mounted"; + +export interface ProxyTRPCContextProps { + /** + * The `TRPCClient` + */ + client: TRPCClient; + /** + * The SSR context when server-side rendering + * @default null + */ + ssrContext?: TSSRContext | null; + /** + * State of SSR hydration. + * - `false` if not using SSR. + * - `prepass` when doing a prepass to fetch queries' data + * - `mounting` before TRPCProvider has been rendered on the client + * - `mounted` when the TRPCProvider has been rendered on the client + * @default false + */ + ssrState?: SSRState; + /** + * Abort loading query calls when unmounting a component - usually when navigating to a new page + * @default false + */ + abortOnUnmount?: boolean; +} + +export interface TRPCContextProps + extends ProxyTRPCContextProps { + /** + * The react-query `QueryClient` + */ + queryClient: QueryClient; +} + +export const contextProps: (keyof ProxyTRPCContextProps)[] = [ + "client", + "ssrContext", + "ssrState", + "abortOnUnmount", +]; + +/** @internal */ +export interface TRPCContextState< + TRouter extends AnyRouter, + TSSRContext = undefined +> extends Required> { + /** + * @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientfetchquery + */ + fetchQuery< + TPath extends keyof TRouter["_def"]["queries"] & string, + TProcedure extends TRouter["_def"]["queries"][TPath], + TOutput extends inferProcedureOutput, + TInput extends inferProcedureInput + >( + pathAndInput: [path: TPath, ...args: inferHandlerInput], + opts?: TRPCFetchQueryOptions, TOutput> + ): Promise; + /** + * @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientfetchinfinitequery + */ + fetchInfiniteQuery< + TPath extends keyof TRouter["_def"]["queries"] & string, + TProcedure extends TRouter["_def"]["queries"][TPath], + TOutput extends inferProcedureOutput, + TInput extends inferProcedureInput + >( + pathAndInput: [path: TPath, ...args: inferHandlerInput], + opts?: TRPCFetchInfiniteQueryOptions< + TInput, + TRPCClientError, + TOutput + > + ): Promise>; + /** + * @link https://react-query.tanstack.com/guides/prefetching + */ + prefetchQuery< + TPath extends keyof TRouter["_def"]["queries"] & string, + TProcedure extends TRouter["_def"]["queries"][TPath], + TOutput extends inferProcedureOutput, + TInput extends inferProcedureInput + >( + pathAndInput: [path: TPath, ...args: inferHandlerInput], + opts?: TRPCFetchQueryOptions, TOutput> + ): Promise; + + /** + * @link https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientprefetchinfinitequery + */ + prefetchInfiniteQuery< + TPath extends keyof TRouter["_def"]["queries"] & string, + TProcedure extends TRouter["_def"]["queries"][TPath], + TOutput extends inferProcedureOutput, + TInput extends inferProcedureInput + >( + pathAndInput: [path: TPath, ...args: inferHandlerInput], + opts?: TRPCFetchInfiniteQueryOptions< + TInput, + TRPCClientError, + TOutput + > + ): Promise; + + /** + * @link https://react-query.tanstack.com/guides/query-invalidation + */ + invalidateQueries< + TPath extends keyof TRouter["_def"]["queries"] & string, + TInput extends inferProcedureInput + >( + pathAndInput?: [TPath, TInput?] | TPath, + filters?: InvalidateQueryFilters, + options?: InvalidateOptions + ): Promise; + /** + * @link https://react-query.tanstack.com/guides/query-invalidation + */ + invalidateQueries( + filters?: InvalidateQueryFilters, + options?: InvalidateOptions + ): Promise; + + /** + * @link https://react-query.tanstack.com/reference/QueryClient#queryclientrefetchqueries + */ + refetchQueries< + TPath extends keyof TRouter["_def"]["queries"] & string, + TInput extends inferProcedureInput + >( + pathAndInput: [TPath, TInput?], + filters?: RefetchQueryFilters, + options?: RefetchOptions + ): Promise; + /** + * @link https://react-query.tanstack.com/reference/QueryClient#queryclientrefetchqueries + */ + refetchQueries( + filters?: RefetchQueryFilters, + options?: RefetchOptions + ): Promise; + + /** + * @link https://react-query.tanstack.com/guides/query-cancellation + */ + cancelQuery< + TPath extends keyof TRouter["_def"]["queries"] & string, + TInput extends inferProcedureInput + >( + pathAndInput: [TPath, TInput?], + options?: CancelOptions + ): Promise; + /** + * @link https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydata + */ + setQueryData< + TPath extends keyof TRouter["_def"]["queries"] & string, + TInput extends inferProcedureInput, + TOutput extends inferProcedureOutput + >( + pathAndInput: [TPath, TInput?], + updater: Updater, + options?: SetDataOptions + ): void; + /** + * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata + */ + getQueryData< + TPath extends keyof TRouter["_def"]["queries"] & string, + TInput extends inferProcedureInput, + TOutput extends inferProcedureOutput + >( + pathAndInput: [TPath, TInput?] + ): TOutput | undefined; + /** + * @link https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydata + */ + setInfiniteQueryData< + TPath extends keyof TRouter["_def"]["queries"] & string, + TInput extends inferProcedureInput, + TOutput extends inferProcedureOutput + >( + pathAndInput: [TPath, TInput?], + updater: Updater< + InfiniteData | undefined, + InfiniteData | undefined + >, + options?: SetDataOptions + ): void; + /** + * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata + */ + getInfiniteQueryData< + TPath extends keyof TRouter["_def"]["queries"] & string, + TInput extends inferProcedureInput, + TOutput extends inferProcedureOutput + >( + pathAndInput: [TPath, TInput?] + ): InfiniteData | undefined; +} + +export const TRPCContext = createContext(null as any); diff --git a/src/internals/getArrayQueryKey.ts b/src/internals/getArrayQueryKey.ts new file mode 100644 index 0000000..425bce4 --- /dev/null +++ b/src/internals/getArrayQueryKey.ts @@ -0,0 +1,18 @@ +/** + * To allow easy interactions with groups of related queries, such as + * invalidating all queries of a router, we use an array as the path when + * storing in tanstack query. This function converts from the `.` separated + * path passed around internally by both the legacy and proxy implementation. + * https://github.com/trpc/trpc/issues/2611 + */ +export function getArrayQueryKey( + queryKey: string | [string] | [string, ...unknown[]] | unknown[], +): [string[]] | [string[], ...unknown[]] | [] { + const queryKeyArrayed = Array.isArray(queryKey) ? queryKey : [queryKey]; + const [path, ...input] = queryKeyArrayed; + + const arrayPath = + typeof path !== 'string' || path === '' ? [] : path.split('.'); + + return [arrayPath, ...input]; +} diff --git a/src/internals/getQueryKey.ts b/src/internals/getQueryKey.ts new file mode 100644 index 0000000..51a8da8 --- /dev/null +++ b/src/internals/getQueryKey.ts @@ -0,0 +1,10 @@ +/** + * We treat `undefined` as an input the same as omitting an `input` + * https://github.com/trpc/trpc/issues/2290 + */ +export function getQueryKey( + path: string, + input: unknown, +): [string] | [string, unknown] { + return input === undefined ? [path] : [path, input]; +} diff --git a/src/interop.ts b/src/interop.ts new file mode 100644 index 0000000..dcc1391 --- /dev/null +++ b/src/interop.ts @@ -0,0 +1,28 @@ +// interop: +import { AnyRouter } from "@trpc/server"; +import { CreateTRPCSolid, createHooksInternalProxy } from "./createTRPCSolid"; +import { CreateTRPCSolidOptions } from "./shared"; +import { + CreateReactQueryHooks, + createHooksInternal, +} from "./shared/hooks/createHooksInternal"; + +/** + * @deprecated use `createTRPCSolid` instead + */ +export function createReactQueryHooks< + TRouter extends AnyRouter, + TSSRContext = unknown +>( + opts?: CreateTRPCSolidOptions +): CreateReactQueryHooks & { + proxy: CreateTRPCSolid; +} { + const trpc = createHooksInternal(opts); + const proxy = createHooksInternalProxy(trpc); + + return { + ...trpc, + proxy, + }; +} diff --git a/src/shared/hooks/createHooksInternal.tsx b/src/shared/hooks/createHooksInternal.tsx new file mode 100644 index 0000000..7bc2f34 --- /dev/null +++ b/src/shared/hooks/createHooksInternal.tsx @@ -0,0 +1,653 @@ +import { + DehydratedState, + QueryClient, + CreateInfiniteQueryOptions, + CreateInfiniteQueryResult, + CreateMutationOptions, + CreateMutationResult, + CreateQueryOptions, + CreateQueryResult, + createInfiniteQuery as __useInfiniteQuery, + createMutation as __useMutation, + createQuery as __useQuery, + hashQueryKey, + useQueryClient, + QueryClientProviderProps, + QueryClientProvider, +} from "@tanstack/solid-query"; +import { + CreateTRPCClientOptions, + TRPCClient, + TRPCClientErrorLike, + TRPCRequestOptions, + createTRPCClient, +} from "@trpc/client"; +import type { + AnyRouter, + ProcedureRecord, + inferHandlerInput, + inferProcedureClientError, + inferProcedureInput, + inferProcedureOutput, + inferSubscriptionOutput, +} from "@trpc/server"; +import { inferObservableValue } from "@trpc/server/observable"; +import { + Accessor, + Context, + createEffect, + createMemo, + createSignal, + JSX, + onCleanup, + onMount, + useContext as __useContext, +} from "solid-js"; +import { + SSRState, + TRPCContext, + TRPCContextProps, + TRPCContextState, +} from "../../internals/context"; +import { getArrayQueryKey } from "../../internals/getArrayQueryKey"; +import { CreateTRPCSolidOptions, UseMutationOverride } from "../types"; + +export type OutputWithCursor = { + cursor: TCursor | null; + data: TData; +}; + +export interface TRPCReactRequestOptions + // For RQ, we use their internal AbortSignals instead of letting the user pass their own + extends Omit { + /** + * Opt out of SSR for this query by passing `ssr: false` + */ + ssr?: boolean; + /** + * Opt out or into aborting request on unmount + */ + abortOnUnmount?: boolean; +} + +export interface TRPCUseQueryBaseOptions { + /** + * tRPC-related options + */ + trpc?: TRPCReactRequestOptions; +} + +export type { TRPCContext, TRPCContextState } from "../../internals/context"; + +export interface UseTRPCQueryOptions + extends CreateQueryOptions [TPath, TInput]>, + TRPCUseQueryBaseOptions {} + +export interface UseTRPCInfiniteQueryOptions + extends CreateInfiniteQueryOptions< + TOutput, + TError, + TOutput, + TOutput, + () => [TPath, TInput] + >, + TRPCUseQueryBaseOptions {} + +export interface UseTRPCMutationOptions< + TInput, + TError, + TOutput, + TContext = unknown +> extends CreateMutationOptions, + TRPCUseQueryBaseOptions {} + +export interface UseTRPCSubscriptionOptions { + enabled?: boolean; + onStarted?: () => void; + onData: (data: TOutput) => void; + onError?: (err: TError) => void; +} + +function getClientArgs( + pathAndInput: TPathAndInput, + opts: TOptions +) { + const [path, input] = pathAndInput; + return [path, input, (opts as any)?.trpc] as const; +} + +type inferInfiniteQueryNames = { + [TPath in keyof TObj]: inferProcedureInput extends { + cursor?: any; + } + ? TPath + : never; +}[keyof TObj]; + +type inferProcedures = { + [TPath in keyof TObj]: { + input: inferProcedureInput; + output: inferProcedureOutput; + }; +}; + +export interface TRPCProviderProps + extends TRPCContextProps { + children: JSX.Element; +} + +export type TRPCProvider = ( + props: TRPCProviderProps & { + queryClientOpts?: Omit; + } +) => JSX.Element; + +export type UseDehydratedState = ( + client: TRPCClient, + trpcState: DehydratedState | undefined +) => Accessor; + +export type CreateClient = ( + opts: CreateTRPCClientOptions +) => TRPCClient; + +interface TRPCHookResult { + trpc: { + path: string; + }; +} + +/** + * @internal + */ +export type UseTRPCQueryResult = CreateQueryResult< + TData, + TError +> & + TRPCHookResult; + +/** + * @internal + */ +export type UseTRPCInfiniteQueryResult = + CreateInfiniteQueryResult & TRPCHookResult; + +/** + * @internal + */ +export type UseTRPCMutationResult = + CreateMutationResult & TRPCHookResult; + +/** + * Makes a stable reference of the `trpc` prop + */ +function useHookResult(value: TRPCHookResult["trpc"]): TRPCHookResult["trpc"] { + const ref = { current: value }; + ref.current.path = value.path; + return ref.current; +} +/** + * Create strongly typed react hooks + * @internal + */ +export function createHooksInternal< + TRouter extends AnyRouter, + TSSRContext = unknown +>(config?: CreateTRPCSolidOptions) { + const mutationSuccessOverride: UseMutationOverride["onSuccess"] = + config?.unstable_overrides?.useMutation?.onSuccess ?? + ((options) => options.originalFn()); + + type TQueries = TRouter["_def"]["queries"]; + type TSubscriptions = TRouter["_def"]["subscriptions"]; + type TMutations = TRouter["_def"]["mutations"]; + + type TError = TRPCClientErrorLike; + type TInfiniteQueryNames = inferInfiniteQueryNames; + + type TQueryValues = inferProcedures; + type TMutationValues = inferProcedures; + + type ProviderContext = Omit< + TRPCContextState, + "ssrState" + > & { + ssrState: Accessor["ssrState"]>; + }; + + const Context = (config?.context ?? TRPCContext) as Context; + const SolidQueryContext = config?.solidQueryContext as Context< + QueryClient | undefined + >; + + const createClient: CreateClient = (opts) => { + return createTRPCClient(opts); + }; + + const TRPCProvider: TRPCProvider = (props) => { + const { abortOnUnmount = false, client, queryClient, ssrContext } = props; + const [ssrState, setSSRState] = createSignal( + props.ssrState ?? false + ); + onMount(() => { + // Only updating state to `mounted` if we are using SSR. + // This makes it so we don't have an unnecessary re-render when opting out of SSR. + setSSRState((state) => (state ? "mounted" : false)); + }); + return ( + { + return queryClient.fetchQuery( + getArrayQueryKey(pathAndInput), + () => (client as any).query(...getClientArgs(pathAndInput, opts)), + opts + ); + }, + fetchInfiniteQuery: (pathAndInput, opts) => { + return queryClient.fetchInfiniteQuery( + getArrayQueryKey(pathAndInput), + ({ pageParam }) => { + const [path, input] = pathAndInput; + const actualInput = { ...(input as any), cursor: pageParam }; + return (client as any).query( + ...getClientArgs([path, actualInput], opts) + ); + }, + opts + ); + }, + + prefetchQuery: (pathAndInput, opts) => { + return queryClient.prefetchQuery( + getArrayQueryKey(pathAndInput), + () => (client as any).query(...getClientArgs(pathAndInput, opts)), + opts + ); + }, + prefetchInfiniteQuery: (pathAndInput, opts) => { + return queryClient.prefetchInfiniteQuery( + getArrayQueryKey(pathAndInput), + ({ pageParam }) => { + const [path, input] = pathAndInput; + const actualInput = { ...(input as any), cursor: pageParam }; + return (client as any).query( + ...getClientArgs([path, actualInput], opts) + ); + }, + opts + ); + }, + invalidateQueries: (...args: any[]) => { + const [queryKey, ...rest] = args; + return queryClient.invalidateQueries( + getArrayQueryKey(queryKey), + ...rest + ); + }, + refetchQueries: (...args: any[]) => { + const [queryKey, ...rest] = args; + + return queryClient.refetchQueries( + getArrayQueryKey(queryKey), + ...rest + ); + }, + cancelQuery: (pathAndInput) => { + return queryClient.cancelQueries(getArrayQueryKey(pathAndInput)); + }, + setQueryData: (...args) => { + const [queryKey, ...rest] = args; + return queryClient.setQueryData( + getArrayQueryKey(queryKey), + ...rest + ); + }, + getQueryData: (...args) => { + const [queryKey, ...rest] = args; + + return queryClient.getQueryData( + getArrayQueryKey(queryKey), + ...rest + ); + }, + setInfiniteQueryData: (...args) => { + const [queryKey, ...rest] = args; + + return queryClient.setQueryData( + getArrayQueryKey(queryKey), + ...rest + ); + }, + getInfiniteQueryData: (...args) => { + const [queryKey, ...rest] = args; + + return queryClient.getQueryData( + getArrayQueryKey(queryKey), + ...rest + ); + }, + }} + > + + {props.children} + + + ); + }; + + function useContext() { + return __useContext(Context); + } + + /** + * Hack to make sure errors return `status`='error` when doing SSR + * @link https://github.com/trpc/trpc/pull/1645 + */ + function useSSRQueryOptionsIfNeeded< + TOptions extends { retryOnMount?: boolean } | undefined + >(pathAndInput: unknown[], opts: TOptions): TOptions { + const { queryClient, ssrState } = useContext(); + return ssrState() && + ssrState() !== "mounted" && + queryClient.getQueryCache().find(getArrayQueryKey(pathAndInput))?.state + .status === "error" + ? { + retryOnMount: false, + ...opts, + } + : opts; + } + + function useQuery< + TPath extends keyof TQueryValues & string, + TQueryFnData = TQueryValues[TPath]["output"], + TData = TQueryValues[TPath]["output"] + >( + pathAndInput: [path: TPath, ...args: inferHandlerInput], + opts?: UseTRPCQueryOptions< + TPath, + TQueryValues[TPath]["input"], + TQueryFnData, + TData, + TError + > + ): UseTRPCQueryResult { + const ctx = useContext(); + + if ( + typeof window === "undefined" && + ctx.ssrState() === "prepass" && + opts?.trpc?.ssr !== false && + opts?.enabled !== false && + !ctx.queryClient.getQueryCache().find(getArrayQueryKey(pathAndInput)) + ) { + void ctx.prefetchQuery(pathAndInput as any, opts as any); + } + const ssrOpts = useSSRQueryOptionsIfNeeded(pathAndInput, opts); + // request option should take priority over global + const shouldAbortOnUnmount = + opts?.trpc?.abortOnUnmount ?? ctx?.abortOnUnmount ?? false; + + const hook = __useQuery( + () => getArrayQueryKey(pathAndInput), + (queryFunctionContext) => { + const actualOpts = { + ...ssrOpts, + trpc: { + ...ssrOpts?.trpc, + ...(shouldAbortOnUnmount + ? { signal: queryFunctionContext.signal } + : {}), + }, + }; + + return (ctx.client as any).query( + ...getClientArgs(pathAndInput, actualOpts) + ); + }, + { context: SolidQueryContext, ...ssrOpts } as any + ) as UseTRPCQueryResult; + hook.trpc = useHookResult({ + path: pathAndInput[0], + }); + + return hook; + } + + function useMutation< + TPath extends keyof TMutationValues & string, + TContext = unknown + >( + path: TPath | [TPath], + opts?: UseTRPCMutationOptions< + TMutationValues[TPath]["input"], + TError, + TMutationValues[TPath]["output"], + TContext + > + ): UseTRPCMutationResult< + TMutationValues[TPath]["output"], + TError, + TMutationValues[TPath]["input"], + TContext + > { + const ctx = useContext(); + const queryClient = useQueryClient(); + + const hook = __useMutation( + (input) => { + const actualPath = Array.isArray(path) ? path[0] : path; + + return (ctx.client.mutation as any)( + ...getClientArgs([actualPath, input], opts) + ); + }, + { + context: SolidQueryContext, + ...opts, + onSuccess(...args) { + const originalFn = () => opts?.onSuccess?.(...args); + return mutationSuccessOverride({ originalFn, queryClient }); + }, + } + ) as UseTRPCMutationResult< + TMutationValues[TPath]["output"], + TError, + TMutationValues[TPath]["input"], + TContext + >; + + hook.trpc = useHookResult({ + path: Array.isArray(path) ? path[0] : path, + }); + + return hook; + } + + /* istanbul ignore next */ + /** + * ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️ + * **Experimental.** API might change without major version bump + * ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠ + */ + function useSubscription< + TPath extends keyof TSubscriptions & string, + TOutput extends inferSubscriptionOutput + >( + pathAndInput: [ + path: TPath, + ...args: inferHandlerInput + ], + opts: UseTRPCSubscriptionOptions< + inferObservableValue>, + inferProcedureClientError + > + ) { + const enabled = opts?.enabled ?? true; + const ctx = useContext(); + + return createEffect(() => { + if (!enabled) { + return; + } + // noop + (() => { + return hashQueryKey(pathAndInput); + })(); + const [path, input] = pathAndInput; + let isStopped = false; + const subscription = ctx.client.subscription< + TRouter["_def"]["subscriptions"], + TPath, + TOutput, + inferProcedureInput + >(path, (input ?? undefined) as any, { + onStarted: () => { + if (!isStopped) { + opts.onStarted?.(); + } + }, + onData: (data) => { + if (!isStopped) { + opts.onData(data); + } + }, + onError: (err) => { + if (!isStopped) { + opts.onError?.(err); + } + }, + }); + onCleanup(() => { + isStopped = true; + subscription.unsubscribe(); + }); + }); + } + + function useInfiniteQuery( + pathAndInput: [ + path: TPath, + input: Omit + ], + opts?: UseTRPCInfiniteQueryOptions< + TPath, + Omit, + TQueryValues[TPath]["output"], + TError + > + ): UseTRPCInfiniteQueryResult { + const [path, input] = pathAndInput; + const ctx = useContext(); + + if ( + typeof window === "undefined" && + ctx.ssrState() === "prepass" && + opts?.trpc?.ssr !== false && + opts?.enabled !== false && + !ctx.queryClient.getQueryCache().find(getArrayQueryKey(pathAndInput)) + ) { + void ctx.prefetchInfiniteQuery(pathAndInput as any, opts as any); + } + + const ssrOpts = useSSRQueryOptionsIfNeeded(pathAndInput, opts); + + // request option should take priority over global + const shouldAbortOnUnmount = + opts?.trpc?.abortOnUnmount ?? ctx?.abortOnUnmount ?? false; + + const hook = __useInfiniteQuery( + () => getArrayQueryKey(pathAndInput), + (queryFunctionContext) => { + const actualOpts = { + ...ssrOpts, + trpc: { + ...ssrOpts?.trpc, + ...(shouldAbortOnUnmount + ? { signal: queryFunctionContext.signal } + : {}), + }, + }; + + const actualInput = { + ...((input as any) ?? {}), + cursor: queryFunctionContext.pageParam, + }; + + return (ctx.client as any).query( + ...getClientArgs([path, actualInput], actualOpts) + ); + }, + { context: SolidQueryContext, ...ssrOpts } as any + ) as UseTRPCInfiniteQueryResult; + + hook.trpc = useHookResult({ + path, + }); + return hook; + } + const useDehydratedState: UseDehydratedState = ( + client, + trpcState + ) => { + const transformed: Accessor = createMemo( + () => { + if (!trpcState) { + return trpcState; + } + + return client.runtime.transformer.deserialize(trpcState); + } + ); + return transformed; + }; + + return { + Provider: TRPCProvider, + createClient, + useContext, + useQuery, + useMutation, + useSubscription, + useDehydratedState, + useInfiniteQuery, + }; +} + +/** + * Hack to infer the type of `createReactQueryHooks` + * @link https://stackoverflow.com/a/59072991 + */ +class GnClass { + fn() { + return createHooksInternal(); + } +} + +type returnTypeInferer = TType extends ( + a: Record +) => infer U + ? U + : never; +type fooType = GnClass< + TRouter, + TSSRContext +>["fn"]; + +/** + * Infer the type of a `createReactQueryHooks` function + * @internal + */ +export type CreateReactQueryHooks< + TRouter extends AnyRouter, + TSSRContext = unknown +> = returnTypeInferer>; diff --git a/src/shared/index.ts b/src/shared/index.ts new file mode 100644 index 0000000..52dd6ba --- /dev/null +++ b/src/shared/index.ts @@ -0,0 +1,9 @@ +export * from "./proxy/decorationProxy"; +export * from "./proxy/utilsProxy"; +export type { + DecoratedProcedureRecord, + DecorateProcedure, +} from "../createTRPCSolid"; +export * from "./hooks/createHooksInternal"; +export * from "./queryClient"; +export * from "./types"; diff --git a/src/shared/proxy/decorationProxy.ts b/src/shared/proxy/decorationProxy.ts new file mode 100644 index 0000000..f6278d4 --- /dev/null +++ b/src/shared/proxy/decorationProxy.ts @@ -0,0 +1,33 @@ +import { AnyRouter } from "@trpc/server"; +import { createRecursiveProxy } from "@trpc/server/shared"; +import { getQueryKey } from "../../internals/getQueryKey"; +import { CreateReactQueryHooks } from "../hooks/createHooksInternal"; + +/** + * Create proxy for decorating procedures + * @internal + */ +export function createReactProxyDecoration< + TRouter extends AnyRouter, + TSSRContext = unknown +>(name: string, hooks: CreateReactQueryHooks) { + return createRecursiveProxy((opts) => { + const args = opts.args; + + const pathCopy = [name, ...opts.path]; + + // The last arg is for instance `.useMutation` or `.useQuery()` + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const lastArg = pathCopy.pop()!; + + // The `path` ends up being something like `post.byId` + const path = pathCopy.join("."); + if (lastArg === "useMutation") { + return (hooks as any)[lastArg](path, ...args); + } + const [input, ...rest] = args; + + const queryKey = getQueryKey(path, input); + return (hooks as any)[lastArg](queryKey, ...rest); + }); +} diff --git a/src/shared/proxy/utilsProxy.ts b/src/shared/proxy/utilsProxy.ts new file mode 100644 index 0000000..1f6bece --- /dev/null +++ b/src/shared/proxy/utilsProxy.ts @@ -0,0 +1,266 @@ +import { + CancelOptions, + InfiniteData, + InvalidateOptions, + InvalidateQueryFilters, + RefetchOptions, + RefetchQueryFilters, + SetDataOptions, + Updater, +} from "@tanstack/solid-query"; +import { TRPCClientError } from "@trpc/client"; +import { + AnyQueryProcedure, + AnyRouter, + Filter, + ProcedureOptions, + inferProcedureInput, + inferProcedureOutput, +} from "@trpc/server"; +import { createFlatProxy, createRecursiveProxy } from "@trpc/server/shared"; +import { + ProxyTRPCContextProps, + TRPCContextState, + TRPCFetchInfiniteQueryOptions, + TRPCFetchQueryOptions, + contextProps, +} from "../../internals/context"; +import { getQueryKey } from "../../internals/getQueryKey"; + +type DecorateProcedure< + TRouter extends AnyRouter, + TProcedure extends AnyQueryProcedure +> = { + /** + * @link https://react-query.tanstack.com/guides/prefetching + */ + fetch( + input: inferProcedureInput, + opts?: TRPCFetchQueryOptions< + inferProcedureInput, + TRPCClientError, + inferProcedureOutput + > + ): Promise>; + + /** + * @link https://react-query.tanstack.com/guides/prefetching + */ + fetchInfinite( + input: inferProcedureInput, + opts?: TRPCFetchInfiniteQueryOptions< + inferProcedureInput, + TRPCClientError, + inferProcedureOutput + > + ): Promise>>; + + /** + * @link https://react-query.tanstack.com/guides/prefetching + */ + prefetch( + input: inferProcedureInput, + opts?: TRPCFetchQueryOptions< + inferProcedureInput, + TRPCClientError, + inferProcedureOutput + > + ): Promise; + + /** + * @link https://react-query.tanstack.com/guides/prefetching + */ + prefetchInfinite( + input: inferProcedureInput, + procedureOpts?: ProcedureOptions, + opts?: TRPCFetchInfiniteQueryOptions< + inferProcedureInput, + TRPCClientError, + inferProcedureOutput + > + ): Promise; + + /** + * @link https://react-query.tanstack.com/guides/query-invalidation + */ + invalidate( + input?: inferProcedureInput, + filters?: InvalidateQueryFilters, + options?: InvalidateOptions + ): Promise; + + /** + * @link https://react-query.tanstack.com/reference/QueryClient#queryclientrefetchqueries + */ + refetch( + input?: inferProcedureInput, + filters?: RefetchQueryFilters, + options?: RefetchOptions + ): Promise; + + /** + * @link https://react-query.tanstack.com/guides/query-cancellation + */ + cancel( + input?: inferProcedureInput, + options?: CancelOptions + ): Promise; + + /** + * @link https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydata + */ + setData( + updater: Updater< + inferProcedureOutput | undefined, + inferProcedureOutput | undefined + >, + input?: inferProcedureInput, + options?: SetDataOptions + ): void; + + /** + * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata + */ + setInfiniteData( + updater: Updater< + InfiniteData> | undefined, + InfiniteData> | undefined + >, + input?: inferProcedureInput, + options?: SetDataOptions + ): void; + + /** + * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata + */ + getData( + input?: inferProcedureInput + ): inferProcedureOutput | undefined; + + /** + * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata + */ + getInfiniteData( + input?: inferProcedureInput + ): InfiniteData> | undefined; +}; + +/** + * A type that will traverse all procedures and sub routers of a given router to create a union of + * their possible input types + */ +type InferAllRouterQueryInputTypes = { + [TKey in keyof Filter< + TRouter["_def"]["record"], + AnyRouter | AnyQueryProcedure + >]: TRouter["_def"]["record"][TKey] extends AnyQueryProcedure + ? inferProcedureInput + : InferAllRouterQueryInputTypes; // Recurse as we have a sub router! +}[keyof Filter]; // This flattens results into a big union + +/** + * this is the type that is used to add in procedures that can be used on + * an entire router + */ +type DecorateRouterProcedure = { + /** + * @link https://react-query.tanstack.com/guides/query-invalidation + */ + invalidate( + input?: Partial>, + filters?: InvalidateQueryFilters, + options?: InvalidateOptions + ): Promise; +}; + +/** + * @internal + */ +export type DecoratedProcedureUtilsRecord = { + [TKey in keyof Filter< + TRouter["_def"]["record"], + AnyRouter | AnyQueryProcedure + >]: TRouter["_def"]["record"][TKey] extends AnyRouter + ? DecoratedProcedureUtilsRecord & + DecorateRouterProcedure + : // utils only apply to queries + DecorateProcedure; +} & DecorateRouterProcedure; // Add functions that should be available at utils root + +type AnyDecoratedProcedure = DecorateProcedure; + +export type CreateReactUtilsProxy< + TRouter extends AnyRouter, + TSSRContext +> = DecoratedProcedureUtilsRecord & + ProxyTRPCContextProps; + +/** + * @internal + */ +export function createReactQueryUtilsProxy< + TRouter extends AnyRouter, + TSSRContext +>(context: TRPCContextState) { + type CreateReactUtilsProxyReturnType = CreateReactUtilsProxy< + TRouter, + TSSRContext + >; + + return createFlatProxy((key) => { + const contextName = key as typeof contextProps[number]; + if (contextProps.includes(contextName)) { + return context[contextName]; + } + + return createRecursiveProxy(({ path, args }) => { + const pathCopy = [key, ...path]; + const utilName = pathCopy.pop() as keyof AnyDecoratedProcedure; + + const fullPath = pathCopy.join("."); + + const getOpts = (name: typeof utilName) => { + if (["setData", "setInfiniteData"].includes(name)) { + const [updater, input, ...rest] = args as Parameters< + AnyDecoratedProcedure[typeof utilName] + >; + const queryKey = getQueryKey(fullPath, input); + return { + queryKey, + updater, + rest, + }; + } + + const [input, ...rest] = args as Parameters< + AnyDecoratedProcedure[typeof utilName] + >; + const queryKey = getQueryKey(fullPath, input); + return { + queryKey, + rest, + }; + }; + + const { queryKey, rest, updater } = getOpts(utilName); + + const contextMap: Record unknown> = { + fetch: () => context.fetchQuery(queryKey, ...rest), + fetchInfinite: () => context.fetchInfiniteQuery(queryKey, ...rest), + prefetch: () => context.prefetchQuery(queryKey, ...rest), + prefetchInfinite: () => + context.prefetchInfiniteQuery(queryKey, ...rest), + invalidate: () => context.invalidateQueries(queryKey, ...rest), + refetch: () => context.refetchQueries(queryKey, ...rest), + cancel: () => context.cancelQuery(queryKey, ...rest), + setData: () => context.setQueryData(queryKey, updater, ...rest), + setInfiniteData: () => + context.setInfiniteQueryData(queryKey, updater, ...rest), + getData: () => context.getQueryData(queryKey), + getInfiniteData: () => context.getInfiniteQueryData(queryKey), + }; + + return contextMap[utilName](); + }); + }); +} diff --git a/src/shared/queryClient.ts b/src/shared/queryClient.ts new file mode 100644 index 0000000..74101cd --- /dev/null +++ b/src/shared/queryClient.ts @@ -0,0 +1,20 @@ +import { QueryClient, QueryClientConfig } from "@tanstack/solid-query"; + +/** + * @internal + */ +export type CreateTRPCReactQueryClientConfig = + | { + queryClient?: QueryClient; + queryClientConfig?: never; + } + | { + queryClientConfig?: QueryClientConfig; + queryClient?: never; + }; + +/** + * @internal + */ +export const getQueryClient = (config: CreateTRPCReactQueryClientConfig) => + config.queryClient ?? new QueryClient(config.queryClientConfig); diff --git a/src/shared/types.ts b/src/shared/types.ts new file mode 100644 index 0000000..b06c3ff --- /dev/null +++ b/src/shared/types.ts @@ -0,0 +1,39 @@ +import { QueryClient } from "@tanstack/solid-query"; +import { AnyRouter, MaybePromise } from "@trpc/server"; +import Solid from "solid-js"; + +/** + * @internal + */ +export interface UseMutationOverride { + onSuccess: (opts: { + /** + * Calls the original function that was defined in the query's `onSuccess` option + */ + originalFn: () => MaybePromise; + queryClient: QueryClient; + }) => MaybePromise; +} + +/** + * @internal + */ +export interface CreateTRPCSolidOptions<_TRouter extends AnyRouter> { + /** + * Override behaviors of the built-in hooks + */ + unstable_overrides?: { + useMutation?: Partial; + }; + + /** + * Override the default context provider + * @default undefined + */ + context?: Solid.Context; + /** + * Override the default React Query context + * @default undefined + */ + solidQueryContext?: Solid.Context; +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..ad50731 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "declaration": true, + "allowSyntheticDefaultImports": true, + "target": "esnext", + "newLine": "LF", + "moduleResolution": "node", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "allowUnreachableCode": false, + "jsx": "preserve", + "jsxImportSource": "solid-js", + "outDir": "./dist", + "module": "esnext" + }, + "include": ["./src"], + "exclude": ["node_modules", "dist"] +}