From 0ec081d7160e77f83696ea4f89b8c3a855ee5721 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:05:11 +0100 Subject: [PATCH 1/3] Bump the reactquery group with 2 updates (#474) --- examples/react/basic/package.json | 4 +- packages/connect-query/package.json | 2 +- .../protoc-gen-connect-query/package.json | 2 +- pnpm-lock.yaml | 114 ++++++++++++------ 4 files changed, 79 insertions(+), 43 deletions(-) diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index d3750dd4..1f693860 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -20,8 +20,8 @@ "@connectrpc/connect-web": "^1.5.0", "@connectrpc/protoc-gen-connect-es": "^1.5.0", "@connectrpc/protoc-gen-connect-query": "workspace:*", - "@tanstack/react-query": "^5.56.2", - "@tanstack/react-query-devtools": "^5.58.0", + "@tanstack/react-query": "^5.59.16", + "@tanstack/react-query-devtools": "^5.59.16", "@testing-library/jest-dom": "^6.5.0", "@testing-library/react": "^16.0.1", "@types/react": "^18.3.5", diff --git a/packages/connect-query/package.json b/packages/connect-query/package.json index 73459ba5..39db5883 100644 --- a/packages/connect-query/package.json +++ b/packages/connect-query/package.json @@ -39,7 +39,7 @@ "@connectrpc/connect": "^1.5.0", "@connectrpc/connect-web": "^1.5.0", "@connectrpc/protoc-gen-connect-es": "^1.5.0", - "@tanstack/react-query": "^5.56.2", + "@tanstack/react-query": "^5.59.16", "@testing-library/react": "^16.0.1", "@types/react": "^18.3.5", "@types/react-dom": "^18.3.0", diff --git a/packages/protoc-gen-connect-query/package.json b/packages/protoc-gen-connect-query/package.json index 30d85736..ef1c3b9a 100644 --- a/packages/protoc-gen-connect-query/package.json +++ b/packages/protoc-gen-connect-query/package.json @@ -32,7 +32,7 @@ "@connectrpc/connect": "^1.5.0", "@connectrpc/connect-query": "workspace:*", "@connectrpc/protoc-gen-connect-es": "^1.5.0", - "@tanstack/react-query": "^5.56.2", + "@tanstack/react-query": "^5.59.16", "typescript": "^5.5.4" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 98e55db0..8af70570 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,11 +96,11 @@ importers: specifier: workspace:* version: link:../../../packages/protoc-gen-connect-query '@tanstack/react-query': - specifier: ^5.56.2 - version: 5.56.2(react@18.3.1) + specifier: ^5.59.16 + version: 5.59.16(react@18.3.1) '@tanstack/react-query-devtools': - specifier: ^5.58.0 - version: 5.58.0(@tanstack/react-query@5.56.2)(react@18.3.1) + specifier: ^5.59.16 + version: 5.59.16(@tanstack/react-query@5.59.16)(react@18.3.1) '@testing-library/jest-dom': specifier: ^6.5.0 version: 6.5.0 @@ -160,8 +160,8 @@ importers: specifier: ^1.5.0 version: 1.5.0(@bufbuild/protoc-gen-es@1.10.0)(@connectrpc/connect@1.5.0) '@tanstack/react-query': - specifier: ^5.56.2 - version: 5.56.2(react@18.3.1) + specifier: ^5.59.16 + version: 5.59.16(react@18.3.1) '@testing-library/react': specifier: ^16.0.1 version: 16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.5)(react-dom@18.3.1)(react@18.3.1) @@ -206,8 +206,8 @@ importers: specifier: ^1.5.0 version: 1.5.0(@bufbuild/protoc-gen-es@1.10.0)(@connectrpc/connect@1.5.0) '@tanstack/react-query': - specifier: ^5.56.2 - version: 5.56.2(react@18.3.1) + specifier: ^5.59.16 + version: 5.59.16(react@18.3.1) typescript: specifier: ^5.5.4 version: 5.5.4 @@ -267,6 +267,15 @@ packages: dependencies: '@babel/highlight': 7.24.7 picocolors: 1.0.1 + dev: false + + /@babel/code-frame@7.26.2: + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 /@babel/compat-data@7.24.7: resolution: {integrity: sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==} @@ -395,6 +404,11 @@ packages: /@babel/helper-validator-identifier@7.24.7: resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} + dev: false + + /@babel/helper-validator-identifier@7.25.9: + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} + engines: {node: '>=6.9.0'} /@babel/helper-validator-option@7.24.7: resolution: {integrity: sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==} @@ -417,6 +431,7 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.0.1 + dev: false /@babel/parser@7.24.7: resolution: {integrity: sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==} @@ -452,6 +467,12 @@ packages: dependencies: regenerator-runtime: 0.14.1 + /@babel/runtime@7.26.0: + resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.1 + /@babel/template@7.24.7: resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} engines: {node: '>=6.9.0'} @@ -1218,7 +1239,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.8.6 jest-mock: 29.7.0 dev: true @@ -1228,7 +1249,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.7.4 + '@types/node': 22.8.6 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -1248,7 +1269,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.7.4 + '@types/node': 22.8.6 '@types/yargs': 17.0.33 chalk: 4.1.2 dev: true @@ -1455,38 +1476,38 @@ packages: '@sinonjs/commons': 3.0.1 dev: true - /@tanstack/query-core@5.56.2: - resolution: {integrity: sha512-gor0RI3/R5rVV3gXfddh1MM+hgl0Z4G7tj6Xxpq6p2I03NGPaJ8dITY9Gz05zYYb/EJq9vPas/T4wn9EaDPd4Q==} + /@tanstack/query-core@5.59.16: + resolution: {integrity: sha512-crHn+G3ltqb5JG0oUv6q+PMz1m1YkjpASrXTU+sYWW9pLk0t2GybUHNRqYPZWhxgjPaVGC4yp92gSFEJgYEsPw==} /@tanstack/query-devtools@5.58.0: resolution: {integrity: sha512-iFdQEFXaYYxqgrv63ots+65FGI+tNp5ZS5PdMU1DWisxk3fez5HG3FyVlbUva+RdYS5hSLbxZ9aw3yEs97GNTw==} dev: false - /@tanstack/react-query-devtools@5.58.0(@tanstack/react-query@5.56.2)(react@18.3.1): - resolution: {integrity: sha512-qF0xCyBeVuNLygTO1sAl1X4Gv52w52SeaDdbjYQmtTOooUJ3aAVlBEtiRJFfJblWQ9p/UQG8NIcC/65RjX8Jkw==} + /@tanstack/react-query-devtools@5.59.16(@tanstack/react-query@5.59.16)(react@18.3.1): + resolution: {integrity: sha512-Dejo39QBXmDqXZ3vdrk7vHDvs7TvL573/AX2NveMBmRAufAPYuE3oWSKP/gGqkDfEqyr4CmldOj+v9cKskUchQ==} peerDependencies: - '@tanstack/react-query': ^5.56.2 + '@tanstack/react-query': ^5.59.16 react: ^18 || ^19 dependencies: '@tanstack/query-devtools': 5.58.0 - '@tanstack/react-query': 5.56.2(react@18.3.1) + '@tanstack/react-query': 5.59.16(react@18.3.1) react: 18.3.1 dev: false - /@tanstack/react-query@5.56.2(react@18.3.1): - resolution: {integrity: sha512-SR0GzHVo6yzhN72pnRhkEFRAHMsUo5ZPzAxfTMvUxFIDVS6W9LYUp6nXW3fcHVdg0ZJl8opSH85jqahvm6DSVg==} + /@tanstack/react-query@5.59.16(react@18.3.1): + resolution: {integrity: sha512-MuyWheG47h6ERd4PKQ6V8gDyBu3ThNG22e1fRVwvq6ap3EqsFhyuxCAwhNP/03m/mLg+DAb0upgbPaX6VB+CkQ==} peerDependencies: react: ^18 || ^19 dependencies: - '@tanstack/query-core': 5.56.2 + '@tanstack/query-core': 5.59.16 react: 18.3.1 /@testing-library/dom@10.4.0: resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==} engines: {node: '>=18'} dependencies: - '@babel/code-frame': 7.24.7 - '@babel/runtime': 7.25.6 + '@babel/code-frame': 7.26.2 + '@babel/runtime': 7.26.0 '@types/aria-query': 5.0.4 aria-query: 5.3.0 chalk: 4.1.2 @@ -1588,9 +1609,9 @@ packages: /@types/jsdom@20.0.1: resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} dependencies: - '@types/node': 22.7.4 + '@types/node': 22.8.6 '@types/tough-cookie': 4.0.5 - parse5: 7.1.2 + parse5: 7.2.1 dev: true /@types/json5@0.0.29: @@ -1602,8 +1623,8 @@ packages: dependencies: undici-types: 6.19.8 - /@types/node@22.7.4: - resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} + /@types/node@22.8.6: + resolution: {integrity: sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw==} dependencies: undici-types: 6.19.8 dev: true @@ -1882,7 +1903,7 @@ packages: /acorn-globals@7.0.1: resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} dependencies: - acorn: 8.12.1 + acorn: 8.14.0 acorn-walk: 8.3.4 dev: true @@ -1898,7 +1919,7 @@ packages: resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} engines: {node: '>=0.4.0'} dependencies: - acorn: 8.12.1 + acorn: 8.14.0 dev: true /acorn@8.12.1: @@ -1907,6 +1928,12 @@ packages: hasBin: true dev: true + /acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + /agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -1946,6 +1973,7 @@ packages: engines: {node: '>=4'} dependencies: color-convert: 1.9.3 + dev: false /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} @@ -2148,6 +2176,7 @@ packages: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 supports-color: 5.5.0 + dev: false /chalk@3.0.0: resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} @@ -2235,6 +2264,7 @@ packages: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 + dev: false /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} @@ -2244,6 +2274,7 @@ packages: /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: false /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -3194,8 +3225,8 @@ packages: is-callable: 1.2.7 dev: true - /form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + /form-data@4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} engines: {node: '>= 6'} dependencies: asynckit: 0.4.0 @@ -3363,6 +3394,7 @@ packages: /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} + dev: false /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} @@ -3650,7 +3682,7 @@ packages: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 - '@types/node': 22.7.4 + '@types/node': 22.8.6 jest-mock: 29.7.0 jest-util: 29.7.0 jsdom: 20.0.3 @@ -3664,7 +3696,7 @@ packages: resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.26.2 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.3 chalk: 4.1.2 @@ -3680,7 +3712,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.8.6 jest-util: 29.7.0 dev: true @@ -3689,7 +3721,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.8.6 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -3721,7 +3753,7 @@ packages: optional: true dependencies: abab: 2.0.6 - acorn: 8.12.1 + acorn: 8.14.0 acorn-globals: 7.0.1 cssom: 0.5.0 cssstyle: 2.3.0 @@ -3729,13 +3761,13 @@ packages: decimal.js: 10.4.3 domexception: 4.0.0 escodegen: 2.1.0 - form-data: 4.0.0 + form-data: 4.0.1 html-encoding-sniffer: 3.0.0 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 is-potential-custom-element-name: 1.0.1 nwsapi: 2.2.13 - parse5: 7.1.2 + parse5: 7.2.1 saxes: 6.0.0 symbol-tree: 3.2.4 tough-cookie: 4.1.4 @@ -4074,8 +4106,8 @@ packages: resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} dev: true - /parse5@7.1.2: - resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} + /parse5@7.2.1: + resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} dependencies: entities: 4.5.0 dev: true @@ -4116,6 +4148,9 @@ packages: /picocolors@1.0.1: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + /picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -4533,6 +4568,7 @@ packages: engines: {node: '>=4'} dependencies: has-flag: 3.0.0 + dev: false /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} From 70bc94b1aaf3733bbaba119482ed19097e0782c2 Mon Sep 17 00:00:00 2001 From: Timo Stamm Date: Mon, 4 Nov 2024 17:06:28 +0100 Subject: [PATCH 2/3] Switch to v2 (#479) --- .eslintrc.js | 33 +- .vscode/settings.json | 5 + README.md | 419 +-- cspell.config.json | 2 +- examples/react/basic/buf.gen.yaml | 17 +- examples/react/basic/eliza.proto | 79 - examples/react/basic/package.json | 27 +- .../gen/eliza-ElizaService_connectquery.ts | 32 +- .../gen/eliza-SecondService_connectquery.ts | 36 - examples/react/basic/src/gen/eliza_pb.ts | 582 +--- examples/react/basic/src/main.test.tsx | 4 +- examples/react/basic/vite.config.ts | 2 +- package.json | 15 +- packages/connect-query-core/.eslintignore | 2 + packages/connect-query-core/README.md | 3 + packages/connect-query-core/package.json | 50 + .../src/call-unary-method.ts | 47 +- .../src/connect-query-key.test.ts | 125 + .../src/connect-query-key.ts | 184 ++ .../src/create-infinite-query-options.test.ts | 35 + .../src/create-infinite-query-options.ts | 224 ++ .../src/create-query-options.test.ts | 61 + .../src/create-query-options.ts | 126 + packages/connect-query-core/src/index.ts | 25 + .../src/message-key.test.ts | 128 + .../connect-query-core/src/message-key.ts | 131 + .../src/structural-sharing.test.ts | 61 + .../src/structural-sharing.ts | 39 + .../src/transport-key.test.ts | 53 + .../connect-query-core/src/transport-key.ts | 54 + packages/connect-query-core/src/utils.test.ts | 186 ++ .../src/utils.ts | 48 +- .../connect-query-core/tsconfig.build.json | 11 + packages/connect-query-core/tsconfig.json | 12 + packages/connect-query-core/vite.config.ts | 36 + packages/connect-query/.eslintignore | 3 +- packages/connect-query/buf.gen.yaml | 13 - packages/connect-query/eliza.proto | 132 - packages/connect-query/package.json | 30 +- .../src/call-unary-method.test.ts | 95 +- .../src/connect-query-key.test.ts | 79 - .../connect-query/src/connect-query-key.ts | 90 - .../src/create-use-infinite-query-options.ts | 185 -- .../src/create-use-query-options.ts | 109 - .../connect-query/src/default-options.test.ts | 73 - packages/connect-query/src/default-options.ts | 32 - .../connect-query/src/gen/eliza_connect.ts | 231 -- packages/connect-query/src/gen/eliza_pb.ts | 517 ---- packages/connect-query/src/index.ts | 20 +- .../connect-query/src/test/test-wrapper.tsx | 52 + .../src/use-infinite-query.test.ts | 194 +- .../connect-query/src/use-infinite-query.ts | 128 +- .../connect-query/src/use-mutation.test.ts | 98 +- packages/connect-query/src/use-mutation.ts | 52 +- packages/connect-query/src/use-query.test.ts | 90 +- packages/connect-query/src/use-query.ts | 114 +- .../connect-query/src/use-transport.test.tsx | 13 +- packages/connect-query/src/utils.test.ts | 132 - packages/connect-query/vite.config.ts | 2 +- .../protoc-gen-connect-query/.eslintignore | 5 +- packages/protoc-gen-connect-query/README.md | 36 +- .../protoc-gen-connect-query/package.json | 19 +- .../snapshots/buf.gen.yaml | 24 +- .../v1/eliza-ElizaService_connectquery.d.ts | 35 - .../v1/eliza-ElizaService_connectquery.js | 41 - .../gen_cjs/connectrpc/eliza/v1/eliza_pb.d.ts | 258 -- .../gen_cjs/connectrpc/eliza/v1/eliza_pb.js | 102 - ...st-SecondSnapshotService_connectquery.d.ts | 20 +- ...test-SecondSnapshotService_connectquery.js | 25 +- .../test-SnapshotService_connectquery.d.ts | 37 + .../test-SnapshotService_connectquery.js | 46 + .../snapshots/gen_cjs/test_pb.d.ts | 140 + .../snapshots/gen_cjs/test_pb.js | 64 + .../v1/eliza-ElizaService_connectquery.d.ts | 36 - .../gen_js/connectrpc/eliza/v1/eliza_pb.d.ts | 258 -- .../gen_js/connectrpc/eliza/v1/eliza_pb.js | 92 - ...st-SecondSnapshotService_connectquery.d.ts | 20 +- ...test-SecondSnapshotService_connectquery.js | 24 + .../test-SnapshotService_connectquery.d.ts | 37 + .../test-SnapshotService_connectquery.js | 35 +- .../snapshots/gen_js/test_pb.d.ts | 140 + .../snapshots/gen_js/test_pb.js | 55 + .../v1/eliza-ElizaService_connectquery.ts | 36 - .../gen_ts/connectrpc/eliza/v1/eliza_pb.ts | 336 --- ...test-SecondSnapshotService_connectquery.ts | 24 + .../test-SnapshotService_connectquery.ts} | 36 +- .../snapshots/gen_ts/test_pb.ts | 147 + .../snapshots/test.proto | 53 + .../src/generateDts.ts | 27 +- .../src/generateTs.ts | 30 +- packages/test-utils/buf.gen.yaml | 12 + packages/test-utils/gen/bigint_pb.d.ts | 81 + packages/test-utils/gen/bigint_pb.js | 47 + packages/test-utils/gen/eliza_pb.d.ts | 85 + packages/test-utils/gen/eliza_pb.js | 53 + packages/test-utils/gen/list_pb.d.ts | 82 + packages/test-utils/gen/list_pb.js | 46 + packages/test-utils/gen/proto2_pb.d.ts | 47 + packages/test-utils/gen/proto2_pb.js | 33 + packages/test-utils/gen/proto3_pb.d.ts | 156 + packages/test-utils/gen/proto3_pb.js | 45 + packages/test-utils/package.json | 27 + .../proto/bigint.proto} | 23 +- packages/test-utils/proto/eliza.proto | 38 + packages/test-utils/proto/list.proto | 30 + packages/test-utils/proto/proto2.proto | 21 + packages/test-utils/proto/proto3.proto | 49 + packages/test-utils/src/gen/bigint_pb.ts | 87 + packages/test-utils/src/gen/eliza_pb.ts | 90 + packages/test-utils/src/gen/list_pb.ts | 87 + packages/test-utils/src/gen/proto2_pb.ts | 50 + packages/test-utils/src/gen/proto3_pb.ts | 160 + .../src/index.tsx} | 91 +- packages/test-utils/tsconfig.build.json | 11 + packages/test-utils/tsconfig.json | 12 + pnpm-lock.yaml | 2562 ++++++++--------- turbo.json | 2 +- 117 files changed, 5865 insertions(+), 5778 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 examples/react/basic/src/gen/eliza-SecondService_connectquery.ts create mode 100644 packages/connect-query-core/.eslintignore create mode 100644 packages/connect-query-core/README.md create mode 100644 packages/connect-query-core/package.json rename packages/{connect-query => connect-query-core}/src/call-unary-method.ts (50%) create mode 100644 packages/connect-query-core/src/connect-query-key.test.ts create mode 100644 packages/connect-query-core/src/connect-query-key.ts create mode 100644 packages/connect-query-core/src/create-infinite-query-options.test.ts create mode 100644 packages/connect-query-core/src/create-infinite-query-options.ts create mode 100644 packages/connect-query-core/src/create-query-options.test.ts create mode 100644 packages/connect-query-core/src/create-query-options.ts create mode 100644 packages/connect-query-core/src/index.ts create mode 100644 packages/connect-query-core/src/message-key.test.ts create mode 100644 packages/connect-query-core/src/message-key.ts create mode 100644 packages/connect-query-core/src/structural-sharing.test.ts create mode 100644 packages/connect-query-core/src/structural-sharing.ts create mode 100644 packages/connect-query-core/src/transport-key.test.ts create mode 100644 packages/connect-query-core/src/transport-key.ts create mode 100644 packages/connect-query-core/src/utils.test.ts rename packages/{connect-query => connect-query-core}/src/utils.ts (63%) create mode 100644 packages/connect-query-core/tsconfig.build.json create mode 100644 packages/connect-query-core/tsconfig.json create mode 100644 packages/connect-query-core/vite.config.ts delete mode 100644 packages/connect-query/buf.gen.yaml delete mode 100644 packages/connect-query/eliza.proto delete mode 100644 packages/connect-query/src/connect-query-key.test.ts delete mode 100644 packages/connect-query/src/connect-query-key.ts delete mode 100644 packages/connect-query/src/create-use-infinite-query-options.ts delete mode 100644 packages/connect-query/src/create-use-query-options.ts delete mode 100644 packages/connect-query/src/default-options.test.ts delete mode 100644 packages/connect-query/src/default-options.ts delete mode 100644 packages/connect-query/src/gen/eliza_connect.ts delete mode 100644 packages/connect-query/src/gen/eliza_pb.ts create mode 100644 packages/connect-query/src/test/test-wrapper.tsx delete mode 100644 packages/connect-query/src/utils.test.ts delete mode 100644 packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts delete mode 100644 packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js delete mode 100644 packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.d.ts delete mode 100644 packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.js rename examples/react/basic/src/gen/eliza-Slouch_connectquery.ts => packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.d.ts (54%) rename examples/react/basic/src/gen/eliza-Haberdasher_connectquery.ts => packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.js (54%) create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.d.ts create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.js create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_cjs/test_pb.d.ts create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_cjs/test_pb.js delete mode 100644 packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts delete mode 100644 packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.d.ts delete mode 100644 packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.js rename examples/react/basic/src/gen/eliza-PaginatedService_connectquery.ts => packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.d.ts (52%) create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.js create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.d.ts rename examples/react/basic/src/gen/eliza-BigIntService_connectquery.ts => packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.js (51%) create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_js/test_pb.d.ts create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_js/test_pb.js delete mode 100644 packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts delete mode 100644 packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza_pb.ts create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_ts/test-SecondSnapshotService_connectquery.ts rename packages/protoc-gen-connect-query/snapshots/{gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js => gen_ts/test-SnapshotService_connectquery.ts} (50%) create mode 100644 packages/protoc-gen-connect-query/snapshots/gen_ts/test_pb.ts create mode 100644 packages/protoc-gen-connect-query/snapshots/test.proto create mode 100644 packages/test-utils/buf.gen.yaml create mode 100644 packages/test-utils/gen/bigint_pb.d.ts create mode 100644 packages/test-utils/gen/bigint_pb.js create mode 100644 packages/test-utils/gen/eliza_pb.d.ts create mode 100644 packages/test-utils/gen/eliza_pb.js create mode 100644 packages/test-utils/gen/list_pb.d.ts create mode 100644 packages/test-utils/gen/list_pb.js create mode 100644 packages/test-utils/gen/proto2_pb.d.ts create mode 100644 packages/test-utils/gen/proto2_pb.js create mode 100644 packages/test-utils/gen/proto3_pb.d.ts create mode 100644 packages/test-utils/gen/proto3_pb.js create mode 100644 packages/test-utils/package.json rename packages/{connect-query/src/method-unary-descriptor.ts => test-utils/proto/bigint.proto} (66%) create mode 100644 packages/test-utils/proto/eliza.proto create mode 100644 packages/test-utils/proto/list.proto create mode 100644 packages/test-utils/proto/proto2.proto create mode 100644 packages/test-utils/proto/proto3.proto create mode 100644 packages/test-utils/src/gen/bigint_pb.ts create mode 100644 packages/test-utils/src/gen/eliza_pb.ts create mode 100644 packages/test-utils/src/gen/list_pb.ts create mode 100644 packages/test-utils/src/gen/proto2_pb.ts create mode 100644 packages/test-utils/src/gen/proto3_pb.ts rename packages/{connect-query/src/test/test-utils.tsx => test-utils/src/index.tsx} (50%) create mode 100644 packages/test-utils/tsconfig.build.json create mode 100644 packages/test-utils/tsconfig.json diff --git a/.eslintrc.js b/.eslintrc.js index 563bdcf0..849ba63e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -26,13 +26,7 @@ const config = { parserOptions: { project: true, }, - plugins: [ - "@typescript-eslint", - "jsdoc", - "import", - "simple-import-sort", - "vitest", - ], + plugins: ["@typescript-eslint", "import", "simple-import-sort", "vitest"], extends: [ "eslint:recommended", "plugin:@typescript-eslint/all", @@ -43,15 +37,12 @@ const config = { "prettier", ], settings: { - jsdoc: { - mode: "typescript", - noDefaultExampleRules: false, - checkProperties: true, - minLines: 1, - }, "import/resolver": { typescript: {}, }, + vitest: { + typecheck: true, + }, }, rules: { ...vitest.configs.recommended.rules, @@ -69,7 +60,6 @@ const config = { "@typescript-eslint/prefer-readonly-parameter-types": "off", // not realistic "@typescript-eslint/explicit-module-boundary-types": "off", // inference and conformance testing cover this well "@typescript-eslint/explicit-function-return-type": "off", // inference and conformance testing cover this well - "@typescript-eslint/no-unused-expressions": "off", // necessary component of some exports, e.g. DisableQuery "@typescript-eslint/no-type-alias": "off", // this rule turns off things that are absolutely required by this project such as conditional types and literals "@typescript-eslint/no-throw-literal": "off", // unfortunately this rule doesn't understand returns from `unreachableCase` "@typescript-eslint/no-magic-numbers": "off", // literal values are used in CSS-in-JS, tests, and library constants @@ -79,18 +69,6 @@ const config = { { "ts-expect-error": { descriptionFormat: "^\\(\\d+\\) .+$" } }, ], - "jsdoc/require-jsdoc": [ - "error", - { - contexts: [ - "TSTypeAliasDeclaration", - { context: "TSPropertySignature", inlineCommentBlock: true }, - ], - publicOnly: true, - require: { ArrowFunctionExpression: true }, - }, - ], - "simple-import-sort/imports": "error", }, overrides: [ @@ -115,14 +93,13 @@ const config = { "error", { vars: "all", - varsIgnorePattern: "ExpectType_.*", // necessary for TypeScript type tests argsIgnorePattern: "_", }, ], }, }, { - files: ["**/eliza/*", "**/gen/**", "**/snapshots/**"], // generated code + files: ["**/eliza/*", "gen/**", "**/gen/**", "**/snapshots/**"], // generated code rules: { "eslint-comments/no-unused-enable": "off", "eslint-comments/no-unused-disable": "off", diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..23f5c586 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "git.enableCommitSigning": true, + "git.alwaysSignOff": true, + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/README.md b/README.md index 564ed323..300a5468 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ + +> [!IMPORTANT] +> You are looking at the release candidate for version 2. For the current stable version, see the branch [v1](https://github.com/connectrpc/connect-query-es/tree/v1). + @@ -14,7 +18,6 @@ Connect-Query is an wrapper around [TanStack Query](https://tanstack.com/query) - [Usage](#usage) - [Generated Code](#generated-code) - [Connect-Query API](#connect-query-api) - - [`MethodUnaryDescriptor`](#methodunarydescriptor) - [`TransportProvider`](#transportprovider) - [`useTransport`](#usetransport) - [`useQuery`](#usequery) @@ -27,6 +30,7 @@ Connect-Query is an wrapper around [TanStack Query](https://tanstack.com/query) - [`createProtobufSafeUpdater`](#createprotobufsafeupdater) - [`createQueryOptions`](#createqueryoptions) - [`createInfiniteQueryOptions`](#createinfinitequeryoptions) + - [`addStaticKeyToTransport`](#addstatickeytotransport) - [`ConnectQueryKey`](#connectquerykey) ## Quickstart @@ -37,8 +41,10 @@ Connect-Query is an wrapper around [TanStack Query](https://tanstack.com/query) npm install @connectrpc/connect-query @connectrpc/connect-web ``` -Note: If you are using something that doesn't automatically install peerDependencies (npm older than v7), you'll want to make sure you also have `@bufbuild/protobuf`, `@connectrpc/connect`, and `@tanstack/react-query` installed. `@connectrpc/connect-web` is required for defining -the transport to be used by the client. +> [!TIP] +> +> If you are using something that doesn't automatically install peerDependencies (npm older than v7), you'll want to make sure you also have `@bufbuild/protobuf`, `@connectrpc/connect`, and `@tanstack/react-query` installed. `@connectrpc/connect-web` is required for defining +> the transport to be used by the client. ### Usage @@ -72,57 +78,58 @@ With configuration completed, you can now use the `useQuery` hook to make a requ ```ts import { useQuery } from '@connectrpc/connect-query'; -import { example } from 'your-generated-code/example-ExampleService_connectquery'; +import { say } from 'your-generated-code/eliza-ElizaService_connectquery'; export const Example: FC = () => { - const { data } = useQuery(example); + const { data } = useQuery(say); return
{data}
; }; ``` **_That's it!_** -The [code generator](packages/protoc-gen-connect-query/README.md) does all the work of turning your Protobuf file into something you can easily import. TypeScript types all populate out-of-the-box. Your documentation is also converted to [TSDoc](https://tsdoc.org/). +The code generator does all the work of turning your Protobuf file into something you can easily import. TypeScript types all populate out-of-the-box. Your documentation is also converted to [TSDoc](https://tsdoc.org/). One of the best features of this library is that once you write your schema in Protobuf form, the TypeScript types are generated and then inferred. You never again need to specify the types of your data since the library does it automatically. ### Generated Code -This example shows the best developer experience using code generation. Here's what that generated code looks like: - -```ts title="your-generated-code/example-ExampleService_connectquery" -import { MethodKind } from "@bufbuild/protobuf"; -import { ExampleRequest, ExampleResponse } from "./example_pb.js"; +To make a query, you need a schema for a remote procedure call (RPC). A typed schema can be generated with [`protoc-gen-es`](https://www.npmjs.com/package/@bufbuild/protoc-gen-es). It generates an export for every service: -export const example = { - name: "Example", - kind: MethodKind.Unary, - I: ExampleRequest, - O: ExampleResponse, - service: { - typeName: "your.company.com.example.v1.ExampleService", - }, -}; +```ts +/** + * @generated from service connectrpc.eliza.v1.ElizaService + */ +export declare const ElizaService: GenService<{ + /** + * Say is a unary RPC. Eliza responds to the prompt with a single sentence. + * + * @generated from rpc connectrpc.eliza.v1.ElizaService.Say + */ + say: { + methodKind: "unary"; + input: typeof SayRequestSchema; + output: typeof SayResponseSchema; + }; +}>; ``` -The above code doesn't have to be generated and can be manually used to describe any given endpoint. - -For more information on code generation, see the [documentation](./packages/protoc-gen-connect-query/README.md) for `protoc-gen-connect-query`. - -## Connect-Query API - -### `MethodUnaryDescriptor` +[`protoc-gen-connect-query`](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-query) is an optional additional plugin that exports every RPC individually for convenience: -A type that describes a single unary method. It describes the following properties: +```ts +import { ElizaService } from "./eliza_pb"; + +/** + * Say is a unary RPC. Eliza responds to the prompt with a single sentence. + * + * @generated from rpc connectrpc.eliza.v1.ElizaService.Say + */ +export const say: (typeof ElizaService)["method"]["say"]; +``` -- `name`: The name of the method. -- `kind`: The kind of method. In this case, it's usually `MethodKind.Unary`. -- `I`: The input message type. -- `O`: The output message type. -- `service.typeName`: The fully qualified name of the service the method exists on. +For more information on code generation, see the [documentation for `protoc-gen-connect-query`](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-query) and the [documentation for `protoc-gen-es`](https://www.npmjs.com/package/@bufbuild/protoc-gen-es). -This type is core to how connect-query can stay lightweight and -limit the amount of code actually generated. The descriptor is expected to be passed to almost all the methods in this library. +## Connect-Query API ### `TransportProvider` @@ -186,17 +193,22 @@ const useTransport: () => Transport; Use this helper to get the default transport that's currently attached to the React context for the calling component. +> [!TIP] +> +> All hooks accept a `transport` in the options. You can use the Transport from the context, or create one dynamically. If you create a Transport dynamically, make sure to memoize it, because it is taken into consideration when building query keys. + ### `useQuery` ```ts -function useQuery, O extends Message>( - methodSig: MethodUnaryDescriptor, - input?: DisableQuery | PartialMessage, - options?: { - transport?: Transport; - callOptions?: CallOptions; - } & UseQueryOptions, -): UseQueryResult; +function useQuery< + I extends DescMessage, + O extends DescMessage, + SelectOutData = MessageShape, +>( + schema: DescMethodUnary, + input?: SkipToken | MessageInitShape, + { transport, ...queryOptions }: UseQueryOptions = {}, +): UseQueryResult; ``` The `useQuery` hook is the primary way to make a unary request. It's a wrapper around TanStack Query's [`useQuery`](https://tanstack.com/query/v5/docs/react/reference/useQuery) hook, but it's preconfigured with the correct `queryKey` and `queryFn` for the given method. @@ -211,20 +223,21 @@ Identical to useQuery but mapping to the `useSuspenseQuery` hook from [TanStack ```ts function useInfiniteQuery< - I extends Message, - O extends Message, - ParamKey extends keyof PartialMessage, - Input extends PartialMessage & Required, ParamKey>>, + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, >( - methodSig: MethodUnaryDescriptor, - input: DisableQuery | Input, - options: { - pageParamKey: ParamKey; - transport?: Transport; - callOptions?: CallOptions; - getNextPageParam: GetNextPageParamFunction[ParamKey], O>; - }, -): UseInfiniteQueryResult, ConnectError>; + schema: DescMethodUnary, + input: + | SkipToken + | (MessageInitShape & Required, ParamKey>>), + { + transport, + pageParamKey, + getNextPageParam, + ...queryOptions + }: UseInfiniteQueryOptions, +): UseInfiniteQueryResult>, ConnectError>; ``` The `useInfiniteQuery` is a wrapper around TanStack Query's [`useInfiniteQuery`](https://tanstack.com/query/v5/docs/react/reference/useInfiniteQuery) hook, but it's preconfigured with the correct `queryKey` and `queryFn` for the given method. @@ -238,13 +251,10 @@ Identical to useInfiniteQuery but mapping to the `useSuspenseInfiniteQuery` hook ### `useMutation` ```ts -function useMutation, O extends Message>( - methodSig: MethodUnaryDescriptor, - options?: { - transport?: Transport;, - callOptions?: CallOptions; - }, -): UseMutationResult> +function useMutation( + schema: DescMethodUnary, + { transport, ...queryOptions }: UseMutationOptions = {}, +): UseMutationResult, ConnectError, PartialMessage>; ``` The `useMutation` is a wrapper around TanStack Query's [`useMutation`](https://tanstack.com/query/v5/docs/react/reference/useMutation) hook, but it's preconfigured with the correct `mutationFn` for the given method. @@ -254,41 +264,94 @@ Any additional `options` you pass to `useMutation` will be merged with the optio ### `createConnectQueryKey` ```ts -function createConnectQueryKey, O extends Message>( - methodDescriptor: Pick, "I" | "name" | "service">, - input?: DisableQuery | PartialMessage | undefined, -): ConnectQueryKey; +function createConnectQueryKey( + params: KeyParams, +): ConnectQueryKey; ``` -This helper is useful to manually compute the [`queryKey`](https://tanstack.com/query/v4/docs/react/guides/query-keys) sent to TanStack Query. This function has no side effects. +This function is used under the hood of `useQuery` and other hooks to compute a [`queryKey`](https://tanstack.com/query/v4/docs/react/guides/query-keys) for TanStack Query. You can use it to create (partial) keys yourself to filter queries. + +`useQuery` creates a query key with the following parameters: -### `createConnectInfiniteQueryKey` +1. The qualified name of the RPC. +2. The transport being used. +3. The request message. + +To create the same key manually, you simply provide the same parameters: ```ts -function createConnectInfiniteQueryKey< - I extends Message, - O extends Message, ->( - methodDescriptor: Pick, "I" | "name" | "service">, - input: DisableQuery | PartialMessage, - pageParamKey: keyof PartialMessage, -): ConnectInfiniteQueryKey; +import { createConnectQueryKey, useTransport } from "@connectrpc/connect-query"; +import { ElizaService } from "./gen/eliza_pb"; + +const myTransport = useTransport(); +const queryKey = createConnectQueryKey({ + schema: ElizaService.method.say, + transport: myTransport, + // You can provide a partial message here. + input: { sentence: "hello" }, + // This defines what kind of request it is (either for an infinite or finite query). + cardinality: "finite", +}); + +// queryKey: +[ + "connect-query", + { + transport: "t1", + serviceName: "connectrpc.eliza.v1.ElizaService", + methodName: "Say", + input: { sentence: "hello" }, + cardinality: "finite", + }, +]; ``` -This function is not really necessary unless you are manually creating infinite query keys. When invalidating queries, it usually makes more sense to use the `createConnectQueryKey` function instead since it will also invalidate the regular queries (as well as the infinite queries). +You can create a partial key that matches all RPCs of a service: + +```ts +import { createConnectQueryKey } from "@connectrpc/connect-query"; +import { ElizaService } from "./gen/eliza_pb"; + +const queryKey = createConnectQueryKey({ + schema: ElizaService, + cardinality: "finite", +}); + +// queryKey: +[ + "connect-query", + { + serviceName: "connectrpc.eliza.v1.ElizaService", + cardinality: "finite", + }, +]; +``` + +Infinite queries have distinct keys. To create a key for an infinite query, use the parameter `cardinality`: + +```ts +import { createConnectQueryKey } from "@connectrpc/connect-query"; +import { ListService } from "./gen/list_pb"; + +// The hook useInfiniteQuery() creates a query key with cardinality: "infinite", +// and passes on the pageParamKey. +const queryKey = createConnectQueryKey({ + schema: ListService.method.list, + cardinality: "infinite", + pageParamKey: "page", + input: { preview: true }, +}); +``` ### `callUnaryMethod` ```ts -function callUnaryMethod, O extends Message>( - methodType: MethodUnaryDescriptor, - input: PartialMessage | undefined, - { - callOptions, - transport, - }: { - transport: Transport; - callOptions?: CallOptions | undefined; +function callUnaryMethod( + transport: Transport, + schema: DescMethodUnary, + input: MessageInitShape | undefined, + options?: { + signal?: AbortSignal; }, ): Promise; ``` @@ -300,14 +363,24 @@ This API allows you to directly call the method using the provided transport. Us Creates a typesafe updater that can be used to update data in a query cache. Used in combination with a queryClient. ```ts -import { createProtobufSafeUpdater } from '@connectrpc/connect-query'; +import { createProtobufSafeUpdater, useTransport } from '@connectrpc/connect-query'; import { useQueryClient } from "@tanstack/react-query"; ... + const queryClient = useQueryClient(); +const transport = useTransport(); queryClient.setQueryData( - createConnectQueryKey(example), + createConnectQueryKey({ + schema: example, + transport, + input: {}, + cardinality: "finite", + }), createProtobufSafeUpdater(example, (prev) => { + if (prev === undefined) { + return undefined; + } return { ...prev, completed: true, @@ -320,23 +393,22 @@ queryClient.setQueryData( ### `createQueryOptions` ```ts -function createQueryOptions, O extends Message>( - methodSig: MethodUnaryDescriptor, - input: DisableQuery | PartialMessage | undefined, +function createQueryOptions( + schema: DescMethodUnary, + input: SkipToken | PartialMessage | undefined, { transport, - callOptions, - }: ConnectQueryOptions & { + }: { transport: Transport; }, ): { - queryKey: ConnectQueryKey; - queryFn: QueryFunction>; - enabled: boolean; + queryKey: ConnectQueryKey; + queryFn: QueryFunction, ConnectQueryKey> | SkipToken; + structuralSharing: (oldData: unknown, newData: unknown) => unknown; }; ``` -A functional version of the options that can be passed to the `useQuery` hook from `@tanstack/react-query`. When called, it will return the appropriate `queryKey`, `queryFn`, and `enabled` flag. This is useful when interacting with `useQueries` API or queryClient methods (like [ensureQueryData](https://tanstack.com/query/latest/docs/reference/QueryClient#queryclientensurequerydata), etc). +A functional version of the options that can be passed to the `useQuery` hook from `@tanstack/react-query`. When called, it will return the appropriate `queryKey`, `queryFn`, and `structuralSharing` flag. This is useful when interacting with `useQueries` API or queryClient methods (like [ensureQueryData](https://tanstack.com/query/latest/docs/reference/QueryClient#queryclientensurequerydata), etc). An example of how to use this function with `useQueries`: @@ -359,18 +431,18 @@ const MyComponent = () => { ```ts function createInfiniteQueryOptions< - I extends Message, - O extends Message, - ParamKey extends keyof PartialMessage, - Input extends PartialMessage & Required, ParamKey>>, + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, >( - methodSig: MethodUnaryDescriptor, - input: DisableQuery | Input, + schema: DescMethodUnary, + input: + | SkipToken + | (MessageInitShape & Required, ParamKey>>), { transport, getNextPageParam, pageParamKey, - callOptions, }: ConnectInfiniteQueryOptions, ): { getNextPageParam: ConnectInfiniteQueryOptions< @@ -379,61 +451,89 @@ function createInfiniteQueryOptions< ParamKey >["getNextPageParam"]; queryKey: ConnectInfiniteQueryKey; - queryFn: QueryFunction< - O, - ConnectInfiniteQueryKey, - PartialMessage[ParamKey] - >; + queryFn: + | QueryFunction< + MessageShape, + ConnectInfiniteQueryKey, + MessageInitShape[ParamKey] + > + | SkipToken; + structuralSharing: (oldData: unknown, newData: unknown) => unknown; initialPageParam: PartialMessage[ParamKey]; - enabled: boolean; }; ``` -A functional version of the options that can be passed to the `useInfiniteQuery` hook from `@tanstack/react-query`.When called, it will return the appropriate `queryKey`, `queryFn`, and `enabled` flags, as well as a few other parameters required for `useInfiniteQuery`. This is useful when interacting with some queryClient methods (like [ensureQueryData](https://tanstack.com/query/latest/docs/reference/QueryClient#queryclientensurequerydata), etc). +A functional version of the options that can be passed to the `useInfiniteQuery` hook from `@tanstack/react-query`.When called, it will return the appropriate `queryKey`, `queryFn`, and `structuralSharing` flags, as well as a few other parameters required for `useInfiniteQuery`. This is useful when interacting with some queryClient methods (like [ensureQueryData](https://tanstack.com/query/latest/docs/reference/QueryClient#queryclientensurequerydata), etc). -### `ConnectQueryKey` - -```ts -type ConnectQueryKey> = [ - serviceTypeName: string, - methodName: string, - input: PartialMessage, -]; -``` - -TanStack Query requires query keys in order to decide when the query should automatically update. +### `addStaticKeyToTransport` -[`QueryKey`s](https://tanstack.com/query/v4/docs/react/guides/query-keys) in TanStack Query are usually arbitrary, but Connect-Query uses the approach of creating a query key that begins with the least specific information: the service's `typeName`, followed by the method name, and ending with the most specific information to identify a particular request: the input message itself. - -For example, a query key might look like this: +Transports are taken into consideration when building query keys for associated queries. This can cause issues with SSR since the transport on the server is not the same transport that gets executed on the client (cannot be tracked by reference). To bypass this, you can use this method to add an explicit key to the transport that will be used in the query key. For example: ```ts -[ - "example.v1.ExampleService", - "GetTodos", - { id: "0fdf2ebe-9a0c-4366-9772-cfb21346c3f9" }, -]; +import { addStaticKeyToTransport } from "@connectrpc/connect-query"; +import { createConnectTransport } from "@connectrpc/connect-web"; + +const transport = addStaticKeyToTransport( + createConnectTransport({ + baseUrl: "https://demo.connectrpc.com", + }), + "demo", +); ``` -For example, a partial query key might look like this: +### `ConnectQueryKey` ```ts -["example.v1.ExampleService", "GetTodos"]; +type ConnectQueryKey = [ + /** + * To distinguish Connect query keys from other query keys, they always start with the string "connect-query". + */ + "connect-query", + { + /** + * A key for a Transport reference, created with createTransportKey(). + */ + transport?: string; + /** + * The name of the service, e.g. connectrpc.eliza.v1.ElizaService + */ + serviceName: string; + /** + * The name of the method, e.g. Say. + */ + methodName?: string; + /** + * A key for the request message, created with createMessageKey(), + * or "skipped". + */ + input?: Record | "skipped"; + /** + * Whether this is an infinite query, or a regular one. + */ + cardinality?: "infinite" | "finite"; + }, +]; ``` -### `ConnectInfiniteQueryKey` - -Similar to `ConnectQueryKey`, but for infinite queries. +TanStack Query manages query caching for you based on query keys. [`QueryKey`s](https://tanstack.com/query/v4/docs/react/guides/query-keys) in TanStack Query are arrays with arbitrary JSON-serializable data - typically handwritten for each endpoint. In Connect-Query, query keys are more structured, since queries are always tied to a service, RPC, input message, and transport. For example, a query key might look like this: ```ts -type ConnectInfiniteQueryKey> = [ - serviceTypeName: string, - methodName: string, - input: PartialMessage, - "infinite", +[ + "connect-query", + { + transport: "t1", + serviceName: "connectrpc.eliza.v1.ElizaService", + methodName: "Say", + input: { + sentence: "hello there", + }, + cardinality: "finite", + }, ]; ``` +The factory [`createConnectQueryKey`](#createconnectquerykey) makes it easy to create a `ConnectQueryKey`, including partial keys for query filters. + ## Testing Connect-query (along with all other javascript based connect packages) can be tested with the `createRouterTransport` function from `@connectrpc/connect`. This function allows you to create a transport that can be used to test your application without needing to make any network requests. We also have a dedicated package, [@connectrpc/connect-playwright](https://github.com/connectrpc/connect-playwright-es) for testing within [playwright](https://playwright.dev/). @@ -459,25 +559,6 @@ export const Example: FC = () => { }; ``` -> Why was this changed from the previous version of Connect-Query? -> -> Originally, all we did was pass options to TanStack Query. This was done as an intentional way to keep ourselves separate from TanStack Query. However, as usage increased, it became obvious that were still tied to the API of TanStack Query, and it only meant that we increased the burden on the developer to understand that underlying connection. This new API removes most of that burden and reduces the surface area of the API significantly. - -### Is this ready for production? - -Buf has been using Connect-Query in production for some time. Also, there is 100% mandatory test coverage in this project which covers quite a lot of edge cases. - -### Using BigInt with RPC inputs - -Since Connect-Query use the inputs as keys for the query, if you have a field with type `int64`, those fields will cause serialization problems. For this reason, Connect-Query ships with defaultOptions that can be passed to the QueryClient to make sure serializing BigInt fields is done properly: - -```ts -import { defaultOptions } from "@connectrpc/connect-query"; -import { QueryClient } from "@tanstack/react-query"; - -const queryClient = new QueryClient({ defaultOptions }); -``` - ### What is Connect-Query's relationship to Connect-Web and Protobuf-ES? Here is a high-level overview of how Connect-Query fits in with Connect-Web and Protobuf-ES: @@ -511,10 +592,6 @@ Connect-Query also supports gRPC-web! All you need to do is make sure you call ` That said, we encourage you to check out the [Connect protocol](https://connectrpc.com/docs/protocol/), a simple, POST-only protocol that works over HTTP/1.1 or HTTP/2. It supports server-streaming methods just like gRPC-Web, but is easy to debug in the network inspector. -### Do I have to use a code generator? - -No. The code generator just generates the method descriptors, but you are free to do that yourself if you wish. - ### What if I have a custom `Transport`? If the `Transport` attached to React Context via the `TransportProvider` isn't working for you, then you can override transport at every level. For example, you can pass a custom transport directly to the lowest-level API like `useQuery` or `callUnaryMethod`. @@ -532,13 +609,21 @@ import { say } from "./gen/eliza-ElizaService_connectquery"; function prefetch() { return queryClient.prefetchQuery({ - queryKey: createConnectQueryKey(say, { sentence: "Hello" }), - queryFn: () => - callUnaryMethod(say, { sentence: "Hello" }, { transport: myTransport }), + queryKey: createConnectQueryKey({ + schema: say, + transport: myTransport, + input: { sentence: "Hello" }, + cardinality: "finite", + }), + queryFn: () => callUnaryMethod(myTransport, say, { sentence: "Hello" }), }); } ``` +> [!TIP] +> +> Transports are taken into consideration when building query keys. If you want to prefetch queries on the server, and hydrate them in the client, make sure to use the same transport key on both sides with [`addStaticKeyToTransport`](#addstatickeytotransport). + ### What about Streaming? Connect-Query currently only supports Unary RPC methods, which use a simple request/response style of communication similar to GET or POST requests in REST. This is because it aligns most closely with TanStack Query's paradigms. However, we understand that there may be use cases for Server Streaming, Client Streaming, and Bidirectional Streaming, and we're eager to hear about them. diff --git a/cspell.config.json b/cspell.config.json index f3fb144e..d95a68cb 100644 --- a/cspell.config.json +++ b/cspell.config.json @@ -40,5 +40,5 @@ "oneof", "typesafe" ], - "ignorePaths": ["**/*.svg", "**/*.ai", "**/pnpm-lock.yaml", "*.excalidraw"] + "ignorePaths": ["**/*.svg", "**/*.ai", "**/pnpm-lock.yaml", "*.excalidraw", "**/gen", "**/snapshots"] } diff --git a/examples/react/basic/buf.gen.yaml b/examples/react/basic/buf.gen.yaml index 263eb4d2..dd4b3b10 100644 --- a/examples/react/basic/buf.gen.yaml +++ b/examples/react/basic/buf.gen.yaml @@ -1,17 +1,16 @@ # buf.gen.yaml defines a local generation template. -# For details, see https://docs.buf.build/configuration/v1/buf-gen-yaml -version: v1 +# For details, see https://buf.build/docs/configuration/v2/buf-gen-yaml +version: v2 +inputs: + - proto_file: eliza.proto +# Deletes the directories specified in the `out` field for all plugins before running code generation. +clean: true plugins: - - name: es - path: protoc-gen-es + - local: protoc-gen-es out: src/gen opt: - target=ts - - - name: connect-query - path: protoc-gen-connect-query + - local: protoc-gen-connect-query out: src/gen opt: - target=ts - - import_extension=none - - ts_nocheck=false diff --git a/examples/react/basic/eliza.proto b/examples/react/basic/eliza.proto index eba3fef8..53059cb0 100644 --- a/examples/react/basic/eliza.proto +++ b/examples/react/basic/eliza.proto @@ -25,28 +25,6 @@ package connectrpc.eliza.v1; service ElizaService { // Say is a unary RPC. Eliza responds to the prompt with a single sentence. rpc Say(SayRequest) returns (SayResponse) {} - // SayAgain is a unary RPC. Eliza responds to the prompt with a single sentence. - rpc SayAgain(SayRequest) returns (SayResponse) {} - // Converse is a bidirectional RPC. The caller may exchange multiple - // back-and-forth messages with Eliza over a long-lived connection. Eliza - // responds to each ConverseRequest with a ConverseResponse. - rpc Converse(stream ConverseRequest) returns (stream ConverseResponse) {} - // Introduce is a server streaming RPC. Given the caller's name, Eliza - // returns a stream of sentences to introduce itself. - rpc Introduce(IntroduceRequest) returns (stream IntroduceResponse) {} -} - -// Second Service just to make sure multiple file generation works -service SecondService { - // Say is a unary RPC. Eliza responds to the prompt with a single sentence. - rpc Say(SayRequest) returns (SayResponse) {} - // Converse is a bidirectional RPC. The caller may exchange multiple - // back-and-forth messages with Eliza over a long-lived connection. Eliza - // responds to each ConverseRequest with a ConverseResponse. - rpc Converse(stream ConverseRequest) returns (stream ConverseResponse) {} - // Introduce is a server streaming RPC. Given the caller's name, Eliza - // returns a stream of sentences to introduce itself. - rpc Introduce(IntroduceRequest) returns (stream IntroduceResponse) {} } // SayRequest is a single-sentence request. @@ -58,60 +36,3 @@ message SayRequest { message SayResponse { string sentence = 1; } - -// ConverseRequest is a single sentence request sent as part of a -// back-and-forth conversation. -message ConverseRequest { - string sentence = 1; -} - -// ConverseResponse is a single sentence response sent in answer to a -// ConverseRequest. -message ConverseResponse { - string sentence = 1; -} - -// IntroduceRequest asks Eliza to introduce itself to the named user. -message IntroduceRequest { - string name = 1; -} - -// IntroduceResponse is one sentence of Eliza's introductory monologue. -message IntroduceResponse { - string sentence = 1; -} - -service Haberdasher { - rpc Work(Nothing) returns (Nothing); -} - -service Slouch { - rpc Work(Nothing) returns (Nothing); -} - -message Nothing {} - -message CountRequest { - int64 add = 1; -} - -message CountResponse { - int64 count = 1; -} - -service BigIntService { - rpc Count(CountRequest) returns (CountResponse); -} - -message ListRequest { - int64 page = 1; -} - -message ListResponse { - int64 page = 1; - repeated string items = 2; -} - -service PaginatedService { - rpc List(ListRequest) returns (ListResponse); -} diff --git a/examples/react/basic/package.json b/examples/react/basic/package.json index 1f693860..bdfced6a 100644 --- a/examples/react/basic/package.json +++ b/examples/react/basic/package.json @@ -5,31 +5,30 @@ "type": "module", "scripts": { "dev": "vite", - "generate": "rm -rf src/gen && buf generate --path eliza.proto", + "generate": "buf generate", "license-header": "license-header", "test": "vitest --run", "test:watch": "vitest --watch --ui", - "format": "prettier . --write && eslint . --fix && license-header" + "format": "prettier --write . '!src/gen' && eslint . --fix && license-header" }, "dependencies": { - "@bufbuild/buf": "1.43.0", - "@bufbuild/protobuf": "^1.10.0", - "@bufbuild/protoc-gen-es": "^1.10.0", - "@connectrpc/connect": "^1.5.0", + "@bufbuild/buf": "1.46.0", + "@bufbuild/protobuf": "^2.2.1", + "@bufbuild/protoc-gen-es": "^2.2.1", + "@connectrpc/connect": "^2.0.0-rc.2", "@connectrpc/connect-query": "workspace:*", - "@connectrpc/connect-web": "^1.5.0", - "@connectrpc/protoc-gen-connect-es": "^1.5.0", + "@connectrpc/connect-web": "^2.0.0-rc.2", "@connectrpc/protoc-gen-connect-query": "workspace:*", "@tanstack/react-query": "^5.59.16", "@tanstack/react-query-devtools": "^5.59.16", - "@testing-library/jest-dom": "^6.5.0", + "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.0.1", - "@types/react": "^18.3.5", - "@types/react-dom": "^18.3.0", - "@vitejs/plugin-react": "^4.3.1", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.3", "react": "^18.3.1", "react-dom": "^18.3.1", - "typescript": "^5.5.4", - "vite": "^5.4.7" + "typescript": "^5.6.3", + "vite": "^5.4.10" } } diff --git a/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts b/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts index 56010fdb..c42835aa 100644 --- a/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts +++ b/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts @@ -12,41 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=none,ts_nocheck=false" +// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "target=ts" // @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ -import { MethodKind } from "@bufbuild/protobuf"; -import { SayRequest, SayResponse } from "./eliza_pb"; +import { ElizaService } from "./eliza_pb"; /** * Say is a unary RPC. Eliza responds to the prompt with a single sentence. * * @generated from rpc connectrpc.eliza.v1.ElizaService.Say */ -export const say = { - localName: "say", - name: "Say", - kind: MethodKind.Unary, - I: SayRequest, - O: SayResponse, - service: { - typeName: "connectrpc.eliza.v1.ElizaService", - }, -} as const; - -/** - * SayAgain is a unary RPC. Eliza responds to the prompt with a single sentence. - * - * @generated from rpc connectrpc.eliza.v1.ElizaService.SayAgain - */ -export const sayAgain = { - localName: "sayAgain", - name: "SayAgain", - kind: MethodKind.Unary, - I: SayRequest, - O: SayResponse, - service: { - typeName: "connectrpc.eliza.v1.ElizaService", - }, -} as const; +export const say = ElizaService.method.say; diff --git a/examples/react/basic/src/gen/eliza-SecondService_connectquery.ts b/examples/react/basic/src/gen/eliza-SecondService_connectquery.ts deleted file mode 100644 index 1d0b0885..00000000 --- a/examples/react/basic/src/gen/eliza-SecondService_connectquery.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=none,ts_nocheck=false" -// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ - -import { MethodKind } from "@bufbuild/protobuf"; -import { SayRequest, SayResponse } from "./eliza_pb"; - -/** - * Say is a unary RPC. Eliza responds to the prompt with a single sentence. - * - * @generated from rpc connectrpc.eliza.v1.SecondService.Say - */ -export const say = { - localName: "say", - name: "Say", - kind: MethodKind.Unary, - I: SayRequest, - O: SayResponse, - service: { - typeName: "connectrpc.eliza.v1.SecondService", - }, -} as const; diff --git a/examples/react/basic/src/gen/eliza_pb.ts b/examples/react/basic/src/gen/eliza_pb.ts index e39188d5..8ea27d7c 100644 --- a/examples/react/basic/src/gen/eliza_pb.ts +++ b/examples/react/basic/src/gen/eliza_pb.ts @@ -12,575 +12,79 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts" +// @generated by protoc-gen-es v2.2.1 with parameter "target=ts" // @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ -// @ts-nocheck -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; /** - * SayRequest is a single-sentence request. - * - * @generated from message connectrpc.eliza.v1.SayRequest + * Describes the file eliza.proto. */ -export class SayRequest extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.SayRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): SayRequest { - return new SayRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): SayRequest { - return new SayRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): SayRequest { - return new SayRequest().fromJsonString(jsonString, options); - } - - static equals( - a: SayRequest | PlainMessage | undefined, - b: SayRequest | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(SayRequest, a, b); - } -} +export const file_eliza: GenFile = /*@__PURE__*/ + fileDesc("CgtlbGl6YS5wcm90bxITY29ubmVjdHJwYy5lbGl6YS52MSIeCgpTYXlSZXF1ZXN0EhAKCHNlbnRlbmNlGAEgASgJIh8KC1NheVJlc3BvbnNlEhAKCHNlbnRlbmNlGAEgASgJMloKDEVsaXphU2VydmljZRJKCgNTYXkSHy5jb25uZWN0cnBjLmVsaXphLnYxLlNheVJlcXVlc3QaIC5jb25uZWN0cnBjLmVsaXphLnYxLlNheVJlc3BvbnNlIgBiBnByb3RvMw"); /** - * SayResponse is a single-sentence response. + * SayRequest is a single-sentence request. * - * @generated from message connectrpc.eliza.v1.SayResponse + * @generated from message connectrpc.eliza.v1.SayRequest */ -export class SayResponse extends Message { +export type SayRequest = Message<"connectrpc.eliza.v1.SayRequest"> & { /** * @generated from field: string sentence = 1; */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.SayResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): SayResponse { - return new SayResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): SayResponse { - return new SayResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): SayResponse { - return new SayResponse().fromJsonString(jsonString, options); - } - - static equals( - a: SayResponse | PlainMessage | undefined, - b: SayResponse | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(SayResponse, a, b); - } -} + sentence: string; +}; /** - * ConverseRequest is a single sentence request sent as part of a - * back-and-forth conversation. - * - * @generated from message connectrpc.eliza.v1.ConverseRequest + * Describes the message connectrpc.eliza.v1.SayRequest. + * Use `create(SayRequestSchema)` to create a new message. */ -export class ConverseRequest extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.ConverseRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): ConverseRequest { - return new ConverseRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): ConverseRequest { - return new ConverseRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): ConverseRequest { - return new ConverseRequest().fromJsonString(jsonString, options); - } - - static equals( - a: ConverseRequest | PlainMessage | undefined, - b: ConverseRequest | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(ConverseRequest, a, b); - } -} +export const SayRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_eliza, 0); /** - * ConverseResponse is a single sentence response sent in answer to a - * ConverseRequest. + * SayResponse is a single-sentence response. * - * @generated from message connectrpc.eliza.v1.ConverseResponse + * @generated from message connectrpc.eliza.v1.SayResponse */ -export class ConverseResponse extends Message { +export type SayResponse = Message<"connectrpc.eliza.v1.SayResponse"> & { /** * @generated from field: string sentence = 1; */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.ConverseResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): ConverseResponse { - return new ConverseResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): ConverseResponse { - return new ConverseResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): ConverseResponse { - return new ConverseResponse().fromJsonString(jsonString, options); - } - - static equals( - a: ConverseResponse | PlainMessage | undefined, - b: ConverseResponse | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(ConverseResponse, a, b); - } -} + sentence: string; +}; /** - * IntroduceRequest asks Eliza to introduce itself to the named user. - * - * @generated from message connectrpc.eliza.v1.IntroduceRequest + * Describes the message connectrpc.eliza.v1.SayResponse. + * Use `create(SayResponseSchema)` to create a new message. */ -export class IntroduceRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.IntroduceRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): IntroduceRequest { - return new IntroduceRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): IntroduceRequest { - return new IntroduceRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): IntroduceRequest { - return new IntroduceRequest().fromJsonString(jsonString, options); - } - - static equals( - a: IntroduceRequest | PlainMessage | undefined, - b: IntroduceRequest | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(IntroduceRequest, a, b); - } -} +export const SayResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_eliza, 1); /** - * IntroduceResponse is one sentence of Eliza's introductory monologue. + * ElizaService provides a way to talk to Eliza, a port of the DOCTOR script + * for Joseph Weizenbaum's original ELIZA program. Created in the mid-1960s at + * the MIT Artificial Intelligence Laboratory, ELIZA demonstrates the + * superficiality of human-computer communication. DOCTOR simulates a + * psychotherapist, and is commonly found as an Easter egg in emacs + * distributions. * - * @generated from message connectrpc.eliza.v1.IntroduceResponse - */ -export class IntroduceResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.IntroduceResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): IntroduceResponse { - return new IntroduceResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): IntroduceResponse { - return new IntroduceResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): IntroduceResponse { - return new IntroduceResponse().fromJsonString(jsonString, options); - } - - static equals( - a: IntroduceResponse | PlainMessage | undefined, - b: IntroduceResponse | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(IntroduceResponse, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.Nothing - */ -export class Nothing extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.Nothing"; - static readonly fields: FieldList = proto3.util.newFieldList(() => []); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): Nothing { - return new Nothing().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): Nothing { - return new Nothing().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): Nothing { - return new Nothing().fromJsonString(jsonString, options); - } - - static equals( - a: Nothing | PlainMessage | undefined, - b: Nothing | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(Nothing, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.CountRequest + * @generated from service connectrpc.eliza.v1.ElizaService */ -export class CountRequest extends Message { +export const ElizaService: GenService<{ /** - * @generated from field: int64 add = 1; + * Say is a unary RPC. Eliza responds to the prompt with a single sentence. + * + * @generated from rpc connectrpc.eliza.v1.ElizaService.Say */ - add = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.CountRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "add", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): CountRequest { - return new CountRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): CountRequest { - return new CountRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): CountRequest { - return new CountRequest().fromJsonString(jsonString, options); - } - - static equals( - a: CountRequest | PlainMessage | undefined, - b: CountRequest | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(CountRequest, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.CountResponse - */ -export class CountResponse extends Message { - /** - * @generated from field: int64 count = 1; - */ - count = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.CountResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): CountResponse { - return new CountResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): CountResponse { - return new CountResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): CountResponse { - return new CountResponse().fromJsonString(jsonString, options); - } - - static equals( - a: CountResponse | PlainMessage | undefined, - b: CountResponse | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(CountResponse, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.ListRequest - */ -export class ListRequest extends Message { - /** - * @generated from field: int64 page = 1; - */ - page = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.ListRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "page", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): ListRequest { - return new ListRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): ListRequest { - return new ListRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): ListRequest { - return new ListRequest().fromJsonString(jsonString, options); - } - - static equals( - a: ListRequest | PlainMessage | undefined, - b: ListRequest | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(ListRequest, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.ListResponse - */ -export class ListResponse extends Message { - /** - * @generated from field: int64 page = 1; - */ - page = protoInt64.zero; - - /** - * @generated from field: repeated string items = 2; - */ - items: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.ListResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "page", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { - no: 2, - name: "items", - kind: "scalar", - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): ListResponse { - return new ListResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): ListResponse { - return new ListResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): ListResponse { - return new ListResponse().fromJsonString(jsonString, options); - } + say: { + methodKind: "unary"; + input: typeof SayRequestSchema; + output: typeof SayResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_eliza, 0); - static equals( - a: ListResponse | PlainMessage | undefined, - b: ListResponse | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(ListResponse, a, b); - } -} diff --git a/examples/react/basic/src/main.test.tsx b/examples/react/basic/src/main.test.tsx index 0d4d3125..e16f8a3c 100644 --- a/examples/react/basic/src/main.test.tsx +++ b/examples/react/basic/src/main.test.tsx @@ -32,6 +32,8 @@ describe("Application", () => { const text = await screen.findByText("Status: success"); expect(text).toBeInTheDocument(); const response = await screen.findByLabelText("data"); - expect(response).toHaveTextContent('{"sentence":"Hello, world!"}'); + expect(response).toHaveTextContent( + '{"$typeName":"connectrpc.eliza.v1.SayResponse","sentence":"Hello, world!"}', + ); }); }); diff --git a/examples/react/basic/vite.config.ts b/examples/react/basic/vite.config.ts index f1c1bc87..dbc46d58 100644 --- a/examples/react/basic/vite.config.ts +++ b/examples/react/basic/vite.config.ts @@ -22,7 +22,7 @@ export default defineConfig({ environment: "jsdom", typecheck: { enabled: true, - // Mofidied to typecheck definition files as well as source files + // Modified to typecheck definition files as well as source files include: ["**/*.{test,spec}?(-d).?(c|m)[jt]s?(x)"], }, }, diff --git a/package.json b/package.json index 742ce20e..cbd7b82f 100644 --- a/package.json +++ b/package.json @@ -22,25 +22,24 @@ }, "devDependencies": { "@bufbuild/license-header": "^0.0.4", - "@types/node": "^22.5.1", + "@types/node": "^22.8.6", "@typescript-eslint/eslint-plugin": "7.15.0", "@typescript-eslint/parser": "7.15.0", "@typescript-eslint/utils": "7.15.0", - "@vitest/ui": "^2.1.1", - "cspell": "8.14.2", + "@vitest/ui": "^2.1.4", + "cspell": "8.15.5", "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", "eslint-import-resolver-typescript": "^3.6.3", "eslint-plugin-eslint-comments": "3.2.0", - "eslint-plugin-jsdoc": "50.2.2", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-vitest": "0.5.4", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-simple-import-sort": "^12.1.1", + "eslint-plugin-vitest": "0.5.4", "prettier": "3.3.3", - "turbo": "^2.1.1", - "typescript": "5.5.4", - "vitest": "^2.1.1" + "turbo": "^2.2.3", + "typescript": "5.6.3", + "vitest": "^2.1.4" }, "engineStrict": true, "engines": { diff --git a/packages/connect-query-core/.eslintignore b/packages/connect-query-core/.eslintignore new file mode 100644 index 00000000..3f6fff7b --- /dev/null +++ b/packages/connect-query-core/.eslintignore @@ -0,0 +1,2 @@ +dist +coverage \ No newline at end of file diff --git a/packages/connect-query-core/README.md b/packages/connect-query-core/README.md new file mode 100644 index 00000000..41793781 --- /dev/null +++ b/packages/connect-query-core/README.md @@ -0,0 +1,3 @@ +# @connectrpc/connect-query-core + +This package provides the core functionality for the Connect-Query API. It exposes all the necessary functions to use with the different variants of the tanstack/query packages. Documentation for these APIs can be found in the main repo readme at https://github.com/connectrpc/connect-query-es and covers any non-hook functions (anything that doesn't start with `use`). diff --git a/packages/connect-query-core/package.json b/packages/connect-query-core/package.json new file mode 100644 index 00000000..281e504e --- /dev/null +++ b/packages/connect-query-core/package.json @@ -0,0 +1,50 @@ +{ + "name": "@connectrpc/connect-query-core", + "version": "2.0.0-rc.2", + "description": "Core of Connect-Query, framework agnostic helpers for type-safe queries.", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/connectrpc/connect-query-es.git", + "directory": "packages/connect-query-core" + }, + "scripts": { + "clean": "rm -rf ./dist/*", + "build": "npm run build:cjs && npm run build:esm", + "build:cjs": "tsc --project tsconfig.build.json --module commonjs --moduleResolution node10 --verbatimModuleSyntax false --outDir ./dist/cjs --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", + "build:esm": "tsc --project tsconfig.build.json", + "test": "vitest --run", + "test:watch": "vitest --watch", + "format": "prettier . --write --ignore-path ./.eslintignore && eslint . --fix && license-header", + "attw": "attw --pack" + }, + "type": "module", + "sideEffects": false, + "main": "./dist/cjs/index.js", + "exports": { + ".": { + "import": "./dist/esm/index.js", + "require": "./dist/cjs/index.js" + } + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.16.4", + "@bufbuild/buf": "1.46.0", + "@bufbuild/jest-environment-jsdom": "^0.1.1", + "@bufbuild/protobuf": "^2.2.1", + "@bufbuild/protoc-gen-es": "^2.2.1", + "@connectrpc/connect": "^2.0.0-rc.2", + "@connectrpc/connect-web": "^2.0.0-rc.2", + "test-utils": "workspace:*", + "typescript": "^5.6.3", + "@tanstack/query-core": "^5.59.16" + }, + "peerDependencies": { + "@bufbuild/protobuf": "2.x", + "@connectrpc/connect": "^2.0.0-rc.1", + "@tanstack/query-core": "5.x" + }, + "files": [ + "dist/**" + ] +} diff --git a/packages/connect-query/src/call-unary-method.ts b/packages/connect-query-core/src/call-unary-method.ts similarity index 50% rename from packages/connect-query/src/call-unary-method.ts rename to packages/connect-query-core/src/call-unary-method.ts index f0dd8aae..4624a680 100644 --- a/packages/connect-query/src/call-unary-method.ts +++ b/packages/connect-query-core/src/call-unary-method.ts @@ -12,38 +12,37 @@ // See the License for the specific language governing permissions and // limitations under the License. -import type { Message, PartialMessage } from "@bufbuild/protobuf"; -import type { CallOptions, Transport } from "@connectrpc/connect"; - -import type { MethodUnaryDescriptor } from "./method-unary-descriptor.js"; +import type { + DescMessage, + DescMethodUnary, + MessageInitShape, + MessageShape, +} from "@bufbuild/protobuf"; +import { create } from "@bufbuild/protobuf"; +import type { Transport } from "@connectrpc/connect"; /** * Call a unary method given its signature and input. */ +// eslint-disable-next-line @typescript-eslint/max-params -- 4th param is optional export async function callUnaryMethod< - I extends Message, - O extends Message, + I extends DescMessage, + O extends DescMessage, >( - methodType: MethodUnaryDescriptor, - input: PartialMessage | undefined, - { - callOptions, - transport, - }: { - transport: Transport; - callOptions?: CallOptions | undefined; + transport: Transport, + schema: DescMethodUnary, + input: MessageInitShape | undefined, + options?: { + signal?: AbortSignal; }, -): Promise { +): Promise> { const result = await transport.unary( - { typeName: methodType.service.typeName, methods: {} }, - methodType, - callOptions?.signal, - callOptions?.timeoutMs, - callOptions?.headers, - input ?? {}, - callOptions?.contextValues, + schema, + options?.signal, + undefined, + undefined, + input ?? create(schema.input), + undefined, ); - callOptions?.onHeader?.(result.header); - callOptions?.onTrailer?.(result.trailer); return result.message; } diff --git a/packages/connect-query-core/src/connect-query-key.test.ts b/packages/connect-query-core/src/connect-query-key.test.ts new file mode 100644 index 00000000..adb071e7 --- /dev/null +++ b/packages/connect-query-core/src/connect-query-key.test.ts @@ -0,0 +1,125 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { create } from "@bufbuild/protobuf"; +import type { Transport } from "@connectrpc/connect"; +import { ElizaService, SayRequestSchema } from "test-utils/gen/eliza_pb.js"; +import { ListRequestSchema, ListService } from "test-utils/gen/list_pb.js"; +import { describe, expect, it } from "vitest"; + +import { createConnectQueryKey } from "./connect-query-key.js"; +import { skipToken } from "./index.js"; +import { createMessageKey } from "./message-key.js"; +import { createTransportKey } from "./transport-key.js"; + +describe("createConnectQueryKey", () => { + const fakeTransport: Transport = { + async stream() { + return Promise.reject(new Error("unexpected")); + }, + async unary() { + return Promise.reject(new Error("unexpected")); + }, + }; + + it("creates a full key", () => { + const key = createConnectQueryKey({ + transport: fakeTransport, + schema: ElizaService.method.say, + input: create(SayRequestSchema, { sentence: "hi" }), + cardinality: "finite", + }); + expect(key).toStrictEqual([ + "connect-query", + { + transport: createTransportKey(fakeTransport), + serviceName: "connectrpc.eliza.v1.ElizaService", + methodName: "Say", + cardinality: "finite", + input: createMessageKey(SayRequestSchema, { sentence: "hi" }), + }, + ]); + }); + + it("creates a full infinite key", () => { + const key = createConnectQueryKey({ + transport: fakeTransport, + schema: ListService.method.list, + input: create(ListRequestSchema, { page: 0n }), + pageParamKey: "page", + cardinality: "infinite", + }); + expect(key).toStrictEqual([ + "connect-query", + { + transport: createTransportKey(fakeTransport), + serviceName: "ListService", + methodName: "List", + cardinality: "infinite", + input: createMessageKey(ListRequestSchema, {}), + }, + ]); + }); + + it("allows input: undefined", () => { + const key = createConnectQueryKey({ + schema: ElizaService.method.say, + input: undefined, + cardinality: "finite", + }); + expect(key[1].input).toBeUndefined(); + }); + + it("allows to omit input", () => { + const key = createConnectQueryKey({ + schema: ElizaService.method.say, + cardinality: "finite", + }); + expect(key[1].input).toBeUndefined(); + }); + + it("allows input: skipToken", () => { + const key = createConnectQueryKey({ + schema: ElizaService.method.say, + input: skipToken, + cardinality: "finite", + }); + expect(key[1].input).toBe("skipped"); + }); + + it("allows to set cardinality: finite", () => { + const key = createConnectQueryKey({ + schema: ElizaService.method.say, + cardinality: "finite", + }); + expect(key[1].cardinality).toBe("finite"); + }); + + it("allows to set cardinality: undefined", () => { + const key = createConnectQueryKey({ + schema: ElizaService.method.say, + cardinality: undefined, + }); + expect(key[1].cardinality).toBeUndefined(); + }); + + it("allows to set a service schema", () => { + const key = createConnectQueryKey({ + schema: ElizaService, + cardinality: "finite", + }); + expect(key[1].serviceName).toBe(ElizaService.typeName); + expect(key[1].methodName).toBeUndefined(); + }); +}); diff --git a/packages/connect-query-core/src/connect-query-key.ts b/packages/connect-query-core/src/connect-query-key.ts new file mode 100644 index 00000000..2395e699 --- /dev/null +++ b/packages/connect-query-core/src/connect-query-key.ts @@ -0,0 +1,184 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type { + DescMethod, + DescService, + MessageInitShape, +} from "@bufbuild/protobuf"; +import type { Transport } from "@connectrpc/connect"; +import type { SkipToken } from "@tanstack/query-core"; + +import { createMessageKey } from "./message-key.js"; +import { createTransportKey } from "./transport-key.js"; + +/** + * TanStack Query manages query caching for you based on query keys. `QueryKey`s in TanStack Query are arrays with arbitrary JSON-serializable data - typically handwritten for each endpoint. + * + * In Connect Query, query keys are more structured, since queries are always tied to a service, RPC, input message, and transport. For example, for a query key might look like this: + * + * @example + * [ + * "connect-query", + * { + * transport: "t1", + * serviceName: "connectrpc.eliza.v1.ElizaService", + * methodName: "Say", + * input: { + * sentence: "hello there", + * }, + * cardinality: "finite", + * } + * ] + */ +export type ConnectQueryKey = [ + /** + * To distinguish Connect query keys from other query keys, they always start with the string "connect-query". + */ + "connect-query", + { + /** + * A key for a Transport reference, created with createTransportKey(). + */ + transport?: string; + /** + * The name of the service, e.g. connectrpc.eliza.v1.ElizaService + */ + serviceName: string; + /** + * The name of the method, e.g. Say. + */ + methodName?: string; + /** + * A key for the request message, created with createMessageKey(), + * or "skipped". + */ + input?: Record | "skipped"; + /** + * Whether this is an infinite query, or a regular one. + */ + cardinality?: "infinite" | "finite" | undefined; + }, +]; + +type KeyParams = Desc extends DescMethod + ? { + /** + * Set `serviceName` and `methodName` in the key. + */ + schema: Desc; + /** + * Set `input` in the key: + * - If a SkipToken is provided, `input` is "skipped". + * - If an init shape is provided, `input` is set to a message key. + * - If omitted or undefined, `input` is not set in the key. + */ + input?: MessageInitShape | SkipToken | undefined; + /** + * Set `transport` in the key. + */ + transport?: Transport; + /** + * Set `cardinality` in the key - undefined is used for filters to match both finite and infinite queries. + */ + cardinality: "finite" | "infinite" | undefined; + /** + * If omit the field with this name from the key for infinite queries. + */ + pageParamKey?: keyof MessageInitShape; + } + : { + /** + * Set `serviceName` in the key, and omit `methodName`. + */ + schema: Desc; + /** + * Set `transport` in the key. + */ + transport?: Transport; + /** + * Set `cardinality` in the key - undefined is used for filters to match both finite and infinite queries. + */ + cardinality: "finite" | "infinite" | undefined; + }; + +/** + * TanStack Query manages query caching for you based on query keys. In Connect Query, keys are structured, and can easily be created using this factory function. + * + * When you make a query, a unique key is automatically created from the schema, input message, and transport. For example: + * + * ```ts + * import { useQuery } from "@connectrpc/connect-query"; + * + * useQuery(ElizaService.method.say, { sentence: "hello" }); + * + * // creates the key: + * [ + * "connect-query", + * { + * transport: "t1", + * serviceName: "connectrpc.eliza.v1.ElizaService", + * methodName: "Say", + * input: { sentence: "hello" }, + * cardinality: "finite", + * } + * ] + * ``` + * + * The same key can be created manually with this factory: + * + * ```ts + * createConnectQueryKey({ + * transport: myTransportReference, + * schema: ElizaService.method.say, + * input: { sentence: "hello" } + * }); + * ``` + * + * Note that the factory allows to create partial keys that can be used to filter queries. For example, you can create a key without a transport, any cardinality, any input message, or with a partial input message. + * + * @see ConnectQueryKey for information on the components of Connect-Query's keys. + */ +export function createConnectQueryKey< + Desc extends DescMethod | DescService, + Params extends KeyParams, +>(params: Params): ConnectQueryKey { + const props: ConnectQueryKey[1] = + params.schema.kind == "rpc" + ? { + serviceName: params.schema.parent.typeName, + methodName: params.schema.name, + } + : { + serviceName: params.schema.typeName, + }; + if (params.transport !== undefined) { + props.transport = createTransportKey(params.transport); + } + if (params.cardinality !== undefined) { + props.cardinality = params.cardinality; + } + if (params.schema.kind == "rpc" && "input" in params) { + if (typeof params.input == "symbol") { + props.input = "skipped"; + } else if (params.input !== undefined) { + props.input = createMessageKey( + params.schema.input, + params.input, + params.pageParamKey, + ); + } + } + return ["connect-query", props]; +} diff --git a/packages/connect-query-core/src/create-infinite-query-options.test.ts b/packages/connect-query-core/src/create-infinite-query-options.test.ts new file mode 100644 index 00000000..07077183 --- /dev/null +++ b/packages/connect-query-core/src/create-infinite-query-options.test.ts @@ -0,0 +1,35 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { mockEliza } from "test-utils"; +import { ListService } from "test-utils/gen/list_pb.js"; +import { describe, expect, expectTypeOf, it } from "vitest"; + +import { createInfiniteQueryOptions, skipToken } from "./index.js"; + +const listMethod = ListService.method.list; + +const mockedElizaTransport = mockEliza(); + +describe("createInfiniteQueryOptions", () => { + it("honors skipToken", () => { + const opt = createInfiniteQueryOptions(listMethod, skipToken, { + transport: mockedElizaTransport, + getNextPageParam: (lastPage) => lastPage.page + 1n, + pageParamKey: "page", + }); + expect(opt.queryFn).toBe(skipToken); + expectTypeOf(opt.queryFn).toEqualTypeOf(skipToken); + }); +}); diff --git a/packages/connect-query-core/src/create-infinite-query-options.ts b/packages/connect-query-core/src/create-infinite-query-options.ts new file mode 100644 index 00000000..f4aa2d5f --- /dev/null +++ b/packages/connect-query-core/src/create-infinite-query-options.ts @@ -0,0 +1,224 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type { + DescMessage, + DescMethodUnary, + MessageInitShape, + MessageShape, +} from "@bufbuild/protobuf"; +import type { Transport } from "@connectrpc/connect"; +import type { + GetNextPageParamFunction, + QueryFunction, + SkipToken, +} from "@tanstack/query-core"; +import { skipToken } from "@tanstack/query-core"; + +import { callUnaryMethod } from "./call-unary-method.js"; +import { + type ConnectQueryKey, + createConnectQueryKey, +} from "./connect-query-key.js"; +import { createStructuralSharing } from "./structural-sharing.js"; +import { assert } from "./utils.js"; + +/** + * Options specific to connect-query + */ +export interface ConnectInfiniteQueryOptions< + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, +> { + /** Defines which part of the input should be considered the page param */ + pageParamKey: ParamKey; + /** Determines the next page. */ + getNextPageParam: GetNextPageParamFunction< + MessageInitShape[ParamKey], + MessageShape + >; +} + +// eslint-disable-next-line @typescript-eslint/max-params -- we have 4 required arguments +function createUnaryInfiniteQueryFn< + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, +>( + transport: Transport, + schema: DescMethodUnary, + input: MessageInitShape, + { + pageParamKey, + }: { + pageParamKey: ParamKey; + }, +): QueryFunction< + MessageShape, + ConnectQueryKey, + MessageInitShape[ParamKey] +> { + return async (context) => { + assert("pageParam" in context, "pageParam must be part of context"); + + const inputCombinedWithPageParam = { + ...input, + [pageParamKey]: context.pageParam, + }; + return callUnaryMethod(transport, schema, inputCombinedWithPageParam, { + signal: context.signal, + }); + }; +} + +/** + * Query the method provided. Maps to useInfiniteQuery on tanstack/react-query + */ +export function createInfiniteQueryOptions< + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, +>( + schema: DescMethodUnary, + input: MessageInitShape & Required, ParamKey>>, + { + transport, + getNextPageParam, + pageParamKey, + }: ConnectInfiniteQueryOptions & { transport: Transport }, +): { + getNextPageParam: ConnectInfiniteQueryOptions< + I, + O, + ParamKey + >["getNextPageParam"]; + queryKey: ConnectQueryKey; + queryFn: QueryFunction< + MessageShape, + ConnectQueryKey, + MessageInitShape[ParamKey] + >; + structuralSharing: (oldData: unknown, newData: unknown) => unknown; + initialPageParam: MessageInitShape[ParamKey]; +}; +export function createInfiniteQueryOptions< + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, +>( + schema: DescMethodUnary, + input: SkipToken, + { + transport, + getNextPageParam, + pageParamKey, + }: ConnectInfiniteQueryOptions & { transport: Transport }, +): { + getNextPageParam: ConnectInfiniteQueryOptions< + I, + O, + ParamKey + >["getNextPageParam"]; + queryKey: ConnectQueryKey; + queryFn: SkipToken; + structuralSharing: (oldData: unknown, newData: unknown) => unknown; + initialPageParam: MessageInitShape[ParamKey]; +}; +export function createInfiniteQueryOptions< + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, +>( + schema: DescMethodUnary, + input: + | SkipToken + | (MessageInitShape & Required, ParamKey>>), + { + transport, + getNextPageParam, + pageParamKey, + }: ConnectInfiniteQueryOptions & { transport: Transport }, +): { + getNextPageParam: ConnectInfiniteQueryOptions< + I, + O, + ParamKey + >["getNextPageParam"]; + queryKey: ConnectQueryKey; + queryFn: + | QueryFunction< + MessageShape, + ConnectQueryKey, + MessageInitShape[ParamKey] + > + | SkipToken; + structuralSharing: (oldData: unknown, newData: unknown) => unknown; + initialPageParam: MessageInitShape[ParamKey]; +}; +export function createInfiniteQueryOptions< + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, +>( + schema: DescMethodUnary, + input: + | SkipToken + | (MessageInitShape & Required, ParamKey>>), + { + transport, + getNextPageParam, + pageParamKey, + }: ConnectInfiniteQueryOptions & { transport: Transport }, +): { + getNextPageParam: ConnectInfiniteQueryOptions< + I, + O, + ParamKey + >["getNextPageParam"]; + queryKey: ConnectQueryKey; + queryFn: + | QueryFunction< + MessageShape, + ConnectQueryKey, + MessageInitShape[ParamKey] + > + | SkipToken; + structuralSharing: (oldData: unknown, newData: unknown) => unknown; + initialPageParam: MessageInitShape[ParamKey]; +} { + const queryKey = createConnectQueryKey({ + cardinality: "infinite", + schema, + transport, + input, + }); + const structuralSharing = createStructuralSharing(schema.output); + const queryFn = + input === skipToken + ? skipToken + : createUnaryInfiniteQueryFn(transport, schema, input, { + pageParamKey, + }); + return { + getNextPageParam, + initialPageParam: + input === skipToken + ? (undefined as MessageInitShape[ParamKey]) + : (input[pageParamKey] as MessageInitShape[ParamKey]), + queryKey, + queryFn, + structuralSharing, + }; +} diff --git a/packages/connect-query-core/src/create-query-options.test.ts b/packages/connect-query-core/src/create-query-options.test.ts new file mode 100644 index 00000000..79286e07 --- /dev/null +++ b/packages/connect-query-core/src/create-query-options.test.ts @@ -0,0 +1,61 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { skipToken as tanstackSkipToken } from "@tanstack/query-core"; +import { mockEliza } from "test-utils"; +import { ElizaService } from "test-utils/gen/eliza_pb.js"; +import { describe, expect, expectTypeOf, it } from "vitest"; + +import { createConnectQueryKey } from "./connect-query-key.js"; +import { createQueryOptions } from "./create-query-options.js"; +import { skipToken } from "./index.js"; + +// TODO: maybe create a helper to take a service and method and generate this. +const sayMethodDescriptor = ElizaService.method.say; + +const mockedElizaTransport = mockEliza(); + +describe("createQueryOptions", () => { + it("honors skipToken", () => { + const opt = createQueryOptions(sayMethodDescriptor, skipToken, { + transport: mockedElizaTransport, + }); + expect(opt.queryFn).toBe(skipToken); + expectTypeOf(opt.queryFn).toEqualTypeOf(skipToken); + }); + + it("honors skipToken directly from tanstack", () => { + const opt = createQueryOptions(sayMethodDescriptor, tanstackSkipToken, { + transport: mockedElizaTransport, + }); + expect(opt.queryFn).toBe(tanstackSkipToken); + }); + + it("sets queryKey", () => { + const want = createConnectQueryKey({ + schema: sayMethodDescriptor, + input: { sentence: "hi" }, + transport: mockedElizaTransport, + cardinality: "finite", + }); + const opt = createQueryOptions( + sayMethodDescriptor, + { sentence: "hi" }, + { + transport: mockedElizaTransport, + }, + ); + expect(opt.queryKey).toStrictEqual(want); + }); +}); diff --git a/packages/connect-query-core/src/create-query-options.ts b/packages/connect-query-core/src/create-query-options.ts new file mode 100644 index 00000000..3d7069b8 --- /dev/null +++ b/packages/connect-query-core/src/create-query-options.ts @@ -0,0 +1,126 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type { + DescMessage, + DescMethodUnary, + MessageInitShape, + MessageShape, +} from "@bufbuild/protobuf"; +import { create } from "@bufbuild/protobuf"; +import type { Transport } from "@connectrpc/connect"; +import type { QueryFunction, SkipToken } from "@tanstack/query-core"; +import { skipToken } from "@tanstack/query-core"; + +import { callUnaryMethod } from "./call-unary-method.js"; +import type { ConnectQueryKey } from "./connect-query-key.js"; +import { createConnectQueryKey } from "./connect-query-key.js"; +import { createStructuralSharing } from "./structural-sharing.js"; + +function createUnaryQueryFn( + transport: Transport, + schema: DescMethodUnary, + input: MessageInitShape | undefined, +): QueryFunction, ConnectQueryKey> { + return async (context) => { + return callUnaryMethod(transport, schema, input, { + signal: context.signal, + }); + }; +} + +/** + * Creates all options required to make a query. Useful in combination with `useQueries` from tanstack/react-query. + */ +export function createQueryOptions< + I extends DescMessage, + O extends DescMessage, +>( + schema: DescMethodUnary, + input: MessageInitShape | undefined, + { + transport, + }: { + transport: Transport; + }, +): { + queryKey: ConnectQueryKey; + queryFn: QueryFunction, ConnectQueryKey>; + structuralSharing: (oldData: unknown, newData: unknown) => unknown; +}; +export function createQueryOptions< + I extends DescMessage, + O extends DescMessage, +>( + schema: DescMethodUnary, + input: SkipToken, + { + transport, + }: { + transport: Transport; + }, +): { + queryKey: ConnectQueryKey; + queryFn: SkipToken; + structuralSharing: (oldData: unknown, newData: unknown) => unknown; +}; +export function createQueryOptions< + I extends DescMessage, + O extends DescMessage, +>( + schema: DescMethodUnary, + input: SkipToken | MessageInitShape | undefined, + { + transport, + }: { + transport: Transport; + }, +): { + queryKey: ConnectQueryKey; + queryFn: QueryFunction, ConnectQueryKey> | SkipToken; + structuralSharing: (oldData: unknown, newData: unknown) => unknown; +}; +export function createQueryOptions< + I extends DescMessage, + O extends DescMessage, +>( + schema: DescMethodUnary, + input: SkipToken | MessageInitShape | undefined, + { + transport, + }: { + transport: Transport; + }, +): { + queryKey: ConnectQueryKey; + queryFn: QueryFunction, ConnectQueryKey> | SkipToken; + structuralSharing: (oldData: unknown, newData: unknown) => unknown; +} { + const queryKey = createConnectQueryKey({ + schema, + input: input ?? create(schema.input), + transport, + cardinality: "finite", + }); + const structuralSharing = createStructuralSharing(schema.output); + const queryFn = + input === skipToken + ? skipToken + : createUnaryQueryFn(transport, schema, input); + return { + queryKey, + queryFn, + structuralSharing, + }; +} diff --git a/packages/connect-query-core/src/index.ts b/packages/connect-query-core/src/index.ts new file mode 100644 index 00000000..7222a945 --- /dev/null +++ b/packages/connect-query-core/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export type { ConnectQueryKey } from "./connect-query-key.js"; +export { createConnectQueryKey } from "./connect-query-key.js"; +export { createProtobufSafeUpdater } from "./utils.js"; +export type { ConnectUpdater } from "./utils.js"; +export { callUnaryMethod } from "./call-unary-method.js"; +export { createInfiniteQueryOptions } from "./create-infinite-query-options.js"; +export type { ConnectInfiniteQueryOptions } from "./create-infinite-query-options.js"; +export { createQueryOptions } from "./create-query-options.js"; +export { addStaticKeyToTransport } from "./transport-key.js"; +export type { SkipToken } from "@tanstack/query-core"; +export { skipToken } from "@tanstack/query-core"; diff --git a/packages/connect-query-core/src/message-key.test.ts b/packages/connect-query-core/src/message-key.test.ts new file mode 100644 index 00000000..1d84a3a0 --- /dev/null +++ b/packages/connect-query-core/src/message-key.test.ts @@ -0,0 +1,128 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { create } from "@bufbuild/protobuf"; +import { Proto2MessageSchema } from "test-utils/gen/proto2_pb.js"; +import { Proto3Enum, Proto3MessageSchema } from "test-utils/gen/proto3_pb.js"; +import { describe, expect, it } from "vitest"; + +import { createMessageKey } from "./message-key.js"; + +describe("message key", () => { + it("omits proto3 default values", () => { + const schema = Proto3MessageSchema; + const message = create(schema); + const key = createMessageKey(schema, message); + expect(key).toStrictEqual({}); + }); + it("omits proto2 default values", () => { + const schema = Proto2MessageSchema; + const message = create(schema); + const key = createMessageKey(schema, message); + expect(key).toStrictEqual({}); + }); + it("omits the pageParamKey", () => { + const schema = Proto3MessageSchema; + const message = create(schema, { + int32Field: 123, + stringField: "abc", + }); + const key = createMessageKey(schema, message, "int32Field"); + expect(key).toStrictEqual({ + stringField: "abc", + }); + }); + it("converts as expected", () => { + const key = createMessageKey(Proto3MessageSchema, { + int64Field: 123n, + bytesField: new Uint8Array([0xde, 0xad, 0xbe, 0xef]), + doubleField: Number.NaN, + messageField: { + doubleField: Infinity, + messageField: { + doubleField: -Infinity, + }, + }, + boolField: true, + enumField: Proto3Enum.YES, + repeatedStringField: ["a", "b"], + repeatedMessageField: [{ int64Field: 456n }], + repeatedEnumField: [Proto3Enum.YES, Proto3Enum.NO], + either: { + case: "oneofInt32Field", + value: 123, + }, + mapStringInt64Field: { + foo: 123n, + }, + mapStringMessageField: { + foo: { + int64Field: 123n, + }, + }, + mapStringEnumField: { + foo: Proto3Enum.YES, + }, + }); + expect(key).toStrictEqual({ + int64Field: "123", + bytesField: "3q2+7w", + doubleField: "NaN", + messageField: { + doubleField: "Infinity", + messageField: { + doubleField: "-Infinity", + }, + }, + boolField: true, + enumField: 1, + repeatedStringField: ["a", "b"], + repeatedMessageField: [{ int64Field: "456" }], + repeatedEnumField: [1, 2], + oneofInt32Field: 123, + mapStringInt64Field: { + foo: "123", + }, + mapStringMessageField: { + foo: { + int64Field: "123", + }, + }, + mapStringEnumField: { + foo: 1, + }, + }); + }); + it("sorts map keys", () => { + const key = createMessageKey(Proto3MessageSchema, { + mapStringInt64Field: { + b: 2n, + a: 1n, + }, + }); + const mapKeys = + typeof key.mapStringInt64Field == "object" && + key.mapStringInt64Field !== null + ? Object.keys(key.mapStringInt64Field) + : []; + expect(mapKeys).toStrictEqual(["a", "b"]); + }); + it("sorts properties by protobuf source order", () => { + const key = createMessageKey(Proto3MessageSchema, { + boolField: true, + stringField: "a", + }); + expect(Object.keys(key)).toStrictEqual(["stringField", "boolField"]); + }); +}); diff --git a/packages/connect-query-core/src/message-key.ts b/packages/connect-query-core/src/message-key.ts new file mode 100644 index 00000000..7a59e9f6 --- /dev/null +++ b/packages/connect-query-core/src/message-key.ts @@ -0,0 +1,131 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type { DescMessage, MessageInitShape } from "@bufbuild/protobuf"; +import { create } from "@bufbuild/protobuf"; +import type { + ReflectList, + ReflectMap, + ReflectMessage, +} from "@bufbuild/protobuf/reflect"; +import { reflect } from "@bufbuild/protobuf/reflect"; +import { base64Encode } from "@bufbuild/protobuf/wire"; + +/** + * For any given message, create an object that is suitable for a Query Key in + * TanStack Query: + * + * - Default values are omitted (both implicit and explicit field presence). + * - NaN, Infinity, and -Infinity are converted to a string. + * - Uint8Array is encoded to a string with Base64. + * - BigInt values are converted to a string. + * - Properties are sorted by Protobuf source order. + * - Map keys are sorted with Array.sort. + * + * If pageParamKey is provided, omit the field with this name from the key. + */ +export function createMessageKey< + Desc extends DescMessage, + PageParamKey extends keyof MessageInitShape, +>( + schema: Desc, + value: MessageInitShape, + pageParamKey?: PageParamKey, +): Record { + // eslint-disable-next-line @typescript-eslint/no-use-before-define -- circular reference + return messageKey( + reflect(schema, create(schema, value)), + pageParamKey?.toString(), + ); +} + +function scalarKey(value: unknown): unknown { + if (typeof value == "bigint") { + return String(value); + } + if (typeof value == "number" && !isFinite(value)) { + return String(value); + } + if (value instanceof Uint8Array) { + return base64Encode(value, "std_raw"); + } + return value; +} + +function listKey(list: ReflectList): unknown[] { + const arr = Array.from(list); + const { listKind } = list.field(); + if (listKind == "scalar") { + return arr.map(scalarKey); + } + if (listKind == "message") { + // eslint-disable-next-line @typescript-eslint/no-use-before-define -- circular reference + return (arr as ReflectMessage[]).map((m) => messageKey(m)); + } + return arr; +} + +function mapKey(map: ReflectMap): Record { + // eslint-disable-next-line @typescript-eslint/require-array-sort-compare -- we want the standard behavior + return Array.from(map.keys()) + .sort() + .reduce>((result, k) => { + switch (map.field().mapKind) { + case "message": + // eslint-disable-next-line @typescript-eslint/no-use-before-define -- circular reference + result[k as string] = messageKey(map.get(k) as ReflectMessage); + break; + case "scalar": + result[k as string] = scalarKey(map.get(k)); + break; + case "enum": + result[k as string] = map.get(k); + break; + } + return result; + }, {}); +} + +function messageKey( + message: ReflectMessage, + pageParamKey?: string, +): Record { + const result: Record = {}; + for (const f of message.sortedFields) { + if (!message.isSet(f)) { + continue; + } + if (f.localName === pageParamKey) { + continue; + } + switch (f.fieldKind) { + case "scalar": + result[f.localName] = scalarKey(message.get(f)); + break; + case "enum": + result[f.localName] = message.get(f); + break; + case "list": + result[f.localName] = listKey(message.get(f)); + break; + case "map": + result[f.localName] = mapKey(message.get(f)); + break; + case "message": + result[f.localName] = messageKey(message.get(f)); + break; + } + } + return result; +} diff --git a/packages/connect-query-core/src/structural-sharing.test.ts b/packages/connect-query-core/src/structural-sharing.test.ts new file mode 100644 index 00000000..16e56dd7 --- /dev/null +++ b/packages/connect-query-core/src/structural-sharing.test.ts @@ -0,0 +1,61 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { create } from "@bufbuild/protobuf"; +import { + SayRequestSchema, + SayResponseSchema, +} from "test-utils/gen/eliza_pb.js"; +import { describe, expect, it } from "vitest"; + +import { createStructuralSharing } from "./structural-sharing.js"; + +describe("structural sharing", () => { + const schema = SayResponseSchema; + const fn = createStructuralSharing(schema); + it("returns old data if new data is equal", () => { + const oldData = create(schema, { sentence: "hi" }); + const newData = create(schema, { sentence: "hi" }); + const result = fn(oldData, newData); + expect(result).toStrictEqual(oldData); + }); + it("returns new data if not equal to old data", () => { + const oldData = create(schema, { sentence: "hi" }); + const newData = create(schema, { sentence: "hello" }); + const result = fn(oldData, newData); + expect(result).toStrictEqual(newData); + }); + it("returns new data if old data is undefined", () => { + const oldData = undefined; + const newData = create(schema, { sentence: "hello" }); + const result = fn(oldData, newData); + expect(result).toStrictEqual(newData); + }); + it.each([123, null, create(SayRequestSchema, { sentence: "hi" })])( + "returns new data for unexpected old data $#", + (oldData) => { + const newData = create(schema, { sentence: "hi" }); + const result = fn(oldData, newData); + expect(result).toStrictEqual(newData); + }, + ); + it.each([123, null, create(SayRequestSchema, { sentence: "hi" })])( + "returns new data for unexpected new data $#", + (newData) => { + const oldData = create(schema, { sentence: "hi" }); + const result = fn(oldData, newData); + expect(result).toStrictEqual(newData); + }, + ); +}); diff --git a/packages/connect-query-core/src/structural-sharing.ts b/packages/connect-query-core/src/structural-sharing.ts new file mode 100644 index 00000000..879927e8 --- /dev/null +++ b/packages/connect-query-core/src/structural-sharing.ts @@ -0,0 +1,39 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { type DescMessage, equals, isMessage } from "@bufbuild/protobuf"; + +/** + * Returns a simplistic implementation for "structural sharing" for a Protobuf + * message. + * + * To keep references intact between re-renders, we return the old version if it + * equals the new version. + * + * See https://tanstack.com/query/latest/docs/framework/react/guides/render-optimizations#structural-sharing + */ +export function createStructuralSharing( + schema: DescMessage, + // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- matching the @tanstack/react-query types +): (oldData: unknown | undefined, newData: unknown) => unknown { + return function (oldData, newData) { + if (!isMessage(oldData) || !isMessage(newData)) { + return newData; + } + if (!equals(schema, oldData, newData)) { + return newData; + } + return oldData; + }; +} diff --git a/packages/connect-query-core/src/transport-key.test.ts b/packages/connect-query-core/src/transport-key.test.ts new file mode 100644 index 00000000..5da3c56b --- /dev/null +++ b/packages/connect-query-core/src/transport-key.test.ts @@ -0,0 +1,53 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { createConnectTransport } from "@connectrpc/connect-web"; +import { describe, expect, it } from "vitest"; + +import { + addStaticKeyToTransport, + createTransportKey, +} from "./transport-key.js"; + +describe("transport key", () => { + it("returns the same key for the same reference", () => { + const transport = createConnectTransport({ + baseUrl: "https://example.com", + }); + const key1 = createTransportKey(transport); + const key2 = createTransportKey(transport); + expect(key1).toBe(key2); + }); + it("creates a unique key for every reference", () => { + const transport1 = createConnectTransport({ + baseUrl: "https://example.com", + }); + const transport2 = createConnectTransport({ + baseUrl: "https://example.com", + }); + const key1 = createTransportKey(transport1); + const key2 = createTransportKey(transport2); + expect(key1).not.toBe(key2); + }); + it("allows override of key transport property", () => { + const transport1 = addStaticKeyToTransport( + createConnectTransport({ + baseUrl: "https://example.com", + }), + "static-key", + ); + const key1 = createTransportKey(transport1); + expect(key1).toBe("static-key"); + }); +}); diff --git a/packages/connect-query-core/src/transport-key.ts b/packages/connect-query-core/src/transport-key.ts new file mode 100644 index 00000000..d4653aa7 --- /dev/null +++ b/packages/connect-query-core/src/transport-key.ts @@ -0,0 +1,54 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type { Transport } from "@connectrpc/connect"; + +const staticKeySymbol = Symbol("static-key"); + +const transportKeys = new WeakMap(); +let counter = 0; + +interface TransportWithStaticKey extends Transport { + [staticKeySymbol]?: string; +} + +/** + * For a given Transport, create a string key that is suitable for a Query Key + * in TanStack Query. + * + * This function will return a unique string for every reference. + */ +export function createTransportKey(transport: TransportWithStaticKey): string { + if (transport[staticKeySymbol] !== undefined) { + return transport[staticKeySymbol]; + } + let key = transportKeys.get(transport); + if (key === undefined) { + key = `t${++counter}`; + transportKeys.set(transport, key); + } + return key; +} + +/** + * Enhances a given transport with a static query key that is used in any associated queries. This may be necessary + * in SSR contexts where transports are used on both client and server but they need to be considered + * the same when it comes to the query cache. + */ +export function addStaticKeyToTransport( + transport: Transport, + key: string, +): TransportWithStaticKey { + return { ...transport, [staticKeySymbol]: key }; +} diff --git a/packages/connect-query-core/src/utils.test.ts b/packages/connect-query-core/src/utils.test.ts new file mode 100644 index 00000000..db621562 --- /dev/null +++ b/packages/connect-query-core/src/utils.test.ts @@ -0,0 +1,186 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { create, isFieldSet, isMessage } from "@bufbuild/protobuf"; +import { Proto2MessageSchema } from "test-utils/gen/proto2_pb.js"; +import { describe, expect, it } from "vitest"; + +import { + assert, + createProtobufSafeUpdater, + isAbortController, +} from "./utils.js"; + +describe("assert", () => { + const message = "assertion message"; + it("throws on a false condition", () => { + expect(() => { + assert(false, message); + }).toThrow(`Invalid assertion: ${message}`); + }); + + it("does not throw on a true condition", () => { + expect(() => { + assert(true, message); + }).not.toThrow(); + }); +}); + +describe("isAbortController", () => { + it("returns false for non-objects", () => { + expect(isAbortController(true)).toBeFalsy(); + expect(isAbortController(false)).toBeFalsy(); + expect(isAbortController(0)).toBeFalsy(); + expect(isAbortController(1)).toBeFalsy(); + expect(isAbortController("a")).toBeFalsy(); + expect(isAbortController(undefined)).toBeFalsy(); + expect(isAbortController([])).toBeFalsy(); + expect(isAbortController(null)).toBeFalsy(); + }); + + it("returns false for objects missing the AbortController properties", () => { + expect(isAbortController({})).toBeFalsy(); + expect(isAbortController({ signal: undefined })).toBeFalsy(); + expect(isAbortController({ signal: null })).toBeFalsy(); + expect(isAbortController({ signal: {} })).toBeFalsy(); + expect(isAbortController({ signal: { aborted: undefined } })).toBeFalsy(); + expect(isAbortController({ signal: { aborted: true } })).toBeFalsy(); + expect( + isAbortController({ signal: { aborted: true }, abort: undefined }), + ).toBeFalsy(); + }); + + it("returns true for the two necessary AbortController properties", () => { + expect( + isAbortController({ + signal: { + aborted: false, + }, + abort: () => {}, + }), + ).toBeTruthy(); + + expect(isAbortController(new AbortController())).toBeTruthy(); + }); +}); + +describe("createProtobufSafeUpdater", () => { + describe("with update message", () => { + const schema = { output: Proto2MessageSchema }; + const update = create(Proto2MessageSchema, { + int32Field: 999, + }); + const safeUpdater = createProtobufSafeUpdater(schema, update); + it("returns update message for previous value undefined", () => { + const next = safeUpdater(undefined); + expect(next).toBe(update); + }); + it("returns update message for previous value", () => { + const prev = create(Proto2MessageSchema, { + int32Field: 123, + }); + const next = safeUpdater(prev); + expect(next).toBe(update); + }); + }); + + describe("with update message init", () => { + const schema = { output: Proto2MessageSchema }; + const update = { + int32Field: 999, + }; + const safeUpdater = createProtobufSafeUpdater(schema, update); + it("returns update message for previous value undefined", () => { + const next = safeUpdater(undefined); + expect(next?.int32Field).toBe(999); + }); + it("returns update message for previous value", () => { + const prev = create(Proto2MessageSchema, { + int32Field: 123, + }); + const next = safeUpdater(prev); + expect(next?.$typeName).toBe(Proto2MessageSchema.typeName); + expect(next?.int32Field).toBe(999); + }); + }); + + describe("with updater function", () => { + const schema = { output: Proto2MessageSchema }; + const safeUpdater = createProtobufSafeUpdater(schema, (prev) => { + if (prev === undefined) { + return undefined; + } + return { + ...prev, + int32Field: 999, + }; + }); + it("accepts undefined", () => { + const next = safeUpdater(undefined); + expect(next).toBeUndefined(); + }); + it("accepts previous message", () => { + const prev = create(Proto2MessageSchema, { + int32Field: 123, + }); + const next = safeUpdater(prev); + expect(next).toBeDefined(); + }); + it("returns message", () => { + const prev = create(Proto2MessageSchema); + const next = safeUpdater(prev); + expect(isMessage(next, Proto2MessageSchema)).toBe(true); + }); + it("updates field", () => { + const prev = create(Proto2MessageSchema); + const next = safeUpdater(prev); + expect(next?.int32Field).toBe(999); + }); + it("keeps existing fields", () => { + const prev = create(Proto2MessageSchema, { + stringField: "abc", + }); + const next = safeUpdater(prev); + expect(next?.stringField).toBe("abc"); + }); + describe("keeps field presence", () => { + it("for unset field", () => { + const prev = create(Proto2MessageSchema); + expect(isFieldSet(prev, Proto2MessageSchema.field.stringField)).toBe( + false, + ); + const next = safeUpdater(prev); + const hasStringField = + next === undefined + ? undefined + : isFieldSet(next, Proto2MessageSchema.field.stringField); + expect(hasStringField).toBe(false); + }); + it("for set field", () => { + const prev = create(Proto2MessageSchema, { + stringField: "abc", + }); + expect(isFieldSet(prev, Proto2MessageSchema.field.stringField)).toBe( + true, + ); + const next = safeUpdater(prev); + const hasStringField = + next === undefined + ? undefined + : isFieldSet(next, Proto2MessageSchema.field.stringField); + expect(hasStringField).toBe(true); + }); + }); + }); +}); diff --git a/packages/connect-query/src/utils.ts b/packages/connect-query-core/src/utils.ts similarity index 63% rename from packages/connect-query/src/utils.ts rename to packages/connect-query-core/src/utils.ts index c18c0aca..b51b6a89 100644 --- a/packages/connect-query/src/utils.ts +++ b/packages/connect-query-core/src/utils.ts @@ -12,19 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import type { Message, PartialMessage } from "@bufbuild/protobuf"; - -import type { MethodUnaryDescriptor } from "./method-unary-descriptor.js"; - -/** - * Pass this value as an input to signal that you want to disable the query. - */ -export const disableQuery = Symbol("disableQuery"); - -/** - * Use this type in situations where you want to disable a query from use. - */ -export type DisableQuery = typeof disableQuery; +import type { + DescMessage, + DescMethodUnary, + MessageInitShape, + MessageShape, +} from "@bufbuild/protobuf"; +import { create, isMessage } from "@bufbuild/protobuf"; /** * Throws an error with the provided message when the condition is `false` @@ -59,22 +53,28 @@ export const isAbortController = (input: unknown): input is AbortController => { /** * @see `Updater` from `@tanstack/react-query` */ -export type ConnectUpdater> = - | PartialMessage - | ((prev?: O) => PartialMessage | undefined); +export type ConnectUpdater = + | MessageInitShape + | undefined + | ((prev?: MessageShape) => MessageShape | undefined); /** - * This helper makes sure that the Class for the original data is returned, even if what's provided is a partial message or a plain JavaScript object representing the underlying values. + * This helper makes sure that the type for the original response message is returned. */ export const createProtobufSafeUpdater = - , O extends Message>( - methodSig: Pick, "O">, + ( + schema: Pick, "output">, updater: ConnectUpdater, ) => - (prev?: O): O => { - if (typeof updater === "function") { - return new methodSig.O(updater(prev)); + (prev?: MessageShape): MessageShape | undefined => { + if (typeof updater !== "function") { + if (updater === undefined) { + return undefined; + } + if (isMessage(updater, schema.output)) { + return updater; + } + return create(schema.output, updater); } - - return new methodSig.O(updater); + return updater(prev); }; diff --git a/packages/connect-query-core/tsconfig.build.json b/packages/connect-query-core/tsconfig.build.json new file mode 100644 index 00000000..171a4e93 --- /dev/null +++ b/packages/connect-query-core/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "skipLibCheck": true, + "declaration": true, + "declarationDir": "./dist/esm", + "outDir": "./dist/esm" + }, + "include": ["src/**/*.ts", "src/**/*.tsx"], + "exclude": ["**/*.test.ts", "**/*.test.tsx", "src/test/**"] +} diff --git a/packages/connect-query-core/tsconfig.json b/packages/connect-query-core/tsconfig.json new file mode 100644 index 00000000..994fc249 --- /dev/null +++ b/packages/connect-query-core/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "rootDir": ".", + "noUnusedLocals": false, // necessary for TypeScript type tests, but since this is not enabled for build, unused variables have no risk of leaking into the build output + "lib": ["DOM", "ESNext"], + "noEmit": true, + "verbatimModuleSyntax": false + }, + "exclude": ["coverage", "dist"], + "include": ["src", "./*.config.ts"] +} diff --git a/packages/connect-query-core/vite.config.ts b/packages/connect-query-core/vite.config.ts new file mode 100644 index 00000000..22b47189 --- /dev/null +++ b/packages/connect-query-core/vite.config.ts @@ -0,0 +1,36 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { defineConfig } from "vitest/config"; + +// https://vitejs.dev/config/ +export default defineConfig({ + test: { + environment: "jsdom", + typecheck: { + enabled: true, + // Modified to typecheck definition files as well as source files + include: ["**/*.{test,spec}?(-d).?(c|m)[jt]s?(x)"], + }, + coverage: { + provider: "istanbul", + thresholds: { + branches: 100, + functions: 100, + lines: 100, + statements: 100, + }, + }, + }, +}); diff --git a/packages/connect-query/.eslintignore b/packages/connect-query/.eslintignore index 5a32c3e6..3162c6ac 100644 --- a/packages/connect-query/.eslintignore +++ b/packages/connect-query/.eslintignore @@ -1,3 +1,4 @@ dist coverage -src/gen \ No newline at end of file +src/gen +.turbo diff --git a/packages/connect-query/buf.gen.yaml b/packages/connect-query/buf.gen.yaml deleted file mode 100644 index 3d448389..00000000 --- a/packages/connect-query/buf.gen.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# buf.gen.yaml defines a local generation template. -# For details, see https://docs.buf.build/configuration/v1/buf-gen-yaml -version: v1 -plugins: - - plugin: es - out: src/gen - opt: - - target=ts - - - plugin: connect-es - out: src/gen - opt: - - target=ts diff --git a/packages/connect-query/eliza.proto b/packages/connect-query/eliza.proto deleted file mode 100644 index 1c9b55fc..00000000 --- a/packages/connect-query/eliza.proto +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package connectrpc.eliza.v1; - -import "google/protobuf/timestamp.proto"; - -// ElizaService provides a way to talk to Eliza, a port of the DOCTOR script -// for Joseph Weizenbaum's original ELIZA program. Created in the mid-1960s at -// the MIT Artificial Intelligence Laboratory, ELIZA demonstrates the -// superficiality of human-computer communication. DOCTOR simulates a -// psychotherapist, and is commonly found as an Easter egg in emacs -// distributions. -service ElizaService { - // Say is a unary RPC. Eliza responds to the prompt with a single sentence. - rpc Say(SayRequest) returns (SayResponse) {} - // SayAgain is a unary RPC. Eliza responds to the prompt with a single sentence. - rpc SayAgain(SayRequest) returns (SayResponse) {} - // Converse is a bidirectional RPC. The caller may exchange multiple - // back-and-forth messages with Eliza over a long-lived connection. Eliza - // responds to each ConverseRequest with a ConverseResponse. - rpc Converse(stream ConverseRequest) returns (stream ConverseResponse) {} - // Introduce is a server streaming RPC. Given the caller's name, Eliza - // returns a stream of sentences to introduce itself. - rpc Introduce(IntroduceRequest) returns (stream IntroduceResponse) {} -} - -// Second Service just to make sure multiple file generation works -service SecondService { - // Say is a unary RPC. Eliza responds to the prompt with a single sentence. - rpc Say(SayRequest) returns (SayResponse) {} - // Converse is a bidirectional RPC. The caller may exchange multiple - // back-and-forth messages with Eliza over a long-lived connection. Eliza - // responds to each ConverseRequest with a ConverseResponse. - rpc Converse(stream ConverseRequest) returns (stream ConverseResponse) {} - // Introduce is a server streaming RPC. Given the caller's name, Eliza - // returns a stream of sentences to introduce itself. - rpc Introduce(IntroduceRequest) returns (stream IntroduceResponse) {} -} - -// SayRequest is a single-sentence request. -message SayRequest { - string sentence = 1; -} - -// SayResponse is a single-sentence response. -message SayResponse { - string sentence = 1; -} - -// ConverseRequest is a single sentence request sent as part of a -// back-and-forth conversation. -message ConverseRequest { - string sentence = 1; -} - -// ConverseResponse is a single sentence response sent in answer to a -// ConverseRequest. -message ConverseResponse { - string sentence = 1; -} - -// IntroduceRequest asks Eliza to introduce itself to the named user. -message IntroduceRequest { - string name = 1; -} - -// IntroduceResponse is one sentence of Eliza's introductory monologue. -message IntroduceResponse { - string sentence = 1; -} - -service Haberdasher { - rpc Work(Nothing) returns (Nothing); -} - -service Slouch { - rpc Work(Nothing) returns (Nothing); -} - -message Nothing {} - -message CountRequest { - int64 add = 1; -} - -message CountResponse { - int64 count = 1; -} - -service BigIntService { - rpc Count(CountRequest) returns (CountResponse); - rpc GetCount(Nothing) returns (CountResponse); -} - -message ListRequest { - int64 page = 1; -} - -message ListResponse { - int64 page = 1; - repeated string items = 2; -} - -service PaginatedService { - rpc List(ListRequest) returns (ListResponse); -} - -message OperationRequest { - google.protobuf.Timestamp timestamp = 1; -} - -message OperationResponse { - google.protobuf.Timestamp timestamp = 1; -} - -service ServiceWithMessage { - rpc Operation(OperationRequest) returns (OperationResponse); -} diff --git a/packages/connect-query/package.json b/packages/connect-query/package.json index 39db5883..8e3e734a 100644 --- a/packages/connect-query/package.json +++ b/packages/connect-query/package.json @@ -1,6 +1,6 @@ { "name": "@connectrpc/connect-query", - "version": "1.4.2", + "version": "2.0.0-rc.2", "description": "TypeScript-first expansion pack for TanStack Query that gives you Protobuf superpowers.", "license": "Apache-2.0", "repository": { @@ -13,8 +13,8 @@ "build": "npm run build:cjs && npm run build:esm", "build:cjs": "tsc --project tsconfig.build.json --module commonjs --moduleResolution node10 --verbatimModuleSyntax false --outDir ./dist/cjs --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", "build:esm": "tsc --project tsconfig.build.json", - "generate": "buf generate --path eliza.proto", "test": "vitest --run", + "test:watch": "vitest --watch", "format": "prettier . --write --ignore-path ./.eslintignore && eslint . --fix && license-header", "attw": "attw --pack" }, @@ -28,28 +28,28 @@ } }, "dependencies": { - "stable-hash": "^0.0.4" + "@connectrpc/connect-query-core": "workspace:*" }, "devDependencies": { - "@bufbuild/buf": "1.43.0", - "@arethetypeswrong/cli": "^0.15.4", + "@arethetypeswrong/cli": "^0.16.4", + "@bufbuild/buf": "1.46.0", "@bufbuild/jest-environment-jsdom": "^0.1.1", - "@bufbuild/protobuf": "^1.10.0", - "@bufbuild/protoc-gen-es": "^1.10.0", - "@connectrpc/connect": "^1.5.0", - "@connectrpc/connect-web": "^1.5.0", - "@connectrpc/protoc-gen-connect-es": "^1.5.0", + "@bufbuild/protobuf": "^2.2.1", + "@bufbuild/protoc-gen-es": "^2.2.1", + "@connectrpc/connect": "^2.0.0-rc.2", + "@connectrpc/connect-web": "^2.0.0-rc.2", "@tanstack/react-query": "^5.59.16", "@testing-library/react": "^16.0.1", - "@types/react": "^18.3.5", - "@types/react-dom": "^18.3.0", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", "react": "^18.3.1", "react-dom": "^18.3.1", - "typescript": "^5.5.4" + "test-utils": "workspace:*", + "typescript": "^5.6.3" }, "peerDependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@connectrpc/connect": "^1.1.2", + "@bufbuild/protobuf": "2.x", + "@connectrpc/connect": "^2.0.0-rc.1", "@tanstack/react-query": "5.x", "react": "^18.3.1", "react-dom": "^18.3.1" diff --git a/packages/connect-query/src/call-unary-method.test.ts b/packages/connect-query/src/call-unary-method.test.ts index b2b4a32c..5328eebb 100644 --- a/packages/connect-query/src/call-unary-method.test.ts +++ b/packages/connect-query/src/call-unary-method.test.ts @@ -12,65 +12,60 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { create } from "@bufbuild/protobuf"; +import type { ConnectQueryKey } from "@connectrpc/connect-query-core"; +import { + callUnaryMethod, + createConnectQueryKey, +} from "@connectrpc/connect-query-core"; import type { QueryFunctionContext } from "@tanstack/react-query"; import { useQueries } from "@tanstack/react-query"; import { renderHook, waitFor } from "@testing-library/react"; +import { mockEliza } from "test-utils"; +import type { SayRequest } from "test-utils/gen/eliza_pb.js"; +import { ElizaService, SayRequestSchema } from "test-utils/gen/eliza_pb.js"; import { describe, expect, it } from "vitest"; -import { callUnaryMethod } from "./call-unary-method.js"; -import type { ConnectQueryKey } from "./connect-query-key.js"; -import { createConnectQueryKey } from "./connect-query-key.js"; -import { defaultOptions } from "./default-options.js"; -import { ElizaService } from "./gen/eliza_connect.js"; -import type { SayRequest } from "./gen/eliza_pb.js"; -import { mockEliza, wrapper } from "./test/test-utils.js"; - -const sayMethodDescriptor = { - ...ElizaService.methods.say, - service: { - typeName: ElizaService.typeName, - }, -}; +import { wrapper } from "./test/test-wrapper.js"; describe("callUnaryMethod", () => { it("can be used with useQueries", async () => { - const { result } = renderHook( - () => { - const [query1] = useQueries({ - queries: [ - { - queryKey: createConnectQueryKey(sayMethodDescriptor, { - sentence: "query 1", - }), - queryFn: async ({ - queryKey, - signal, - }: QueryFunctionContext>) => { - const res = await callUnaryMethod( - sayMethodDescriptor, - queryKey[2], - { - transport: mockEliza({ - sentence: "Response 1", - }), - callOptions: { - signal, - }, - }, - ); - return res; - }, + const transport = mockEliza({ + sentence: "Response 1", + }); + const { result } = renderHook(() => { + const input: SayRequest = create(SayRequestSchema, { + sentence: "query 1", + }); + const [query1] = useQueries({ + queries: [ + { + queryKey: createConnectQueryKey({ + schema: ElizaService.method.say, + input, + transport, + cardinality: "finite", + }), + queryFn: async ({ + signal, + }: QueryFunctionContext) => { + const res = await callUnaryMethod( + transport, + ElizaService.method.say, + input, + { + signal, + }, + ); + return res; }, - ], - }); - return { - query1, - }; - }, - wrapper({ - defaultOptions, - }), - ); + }, + ], + }); + return { + query1, + }; + }, wrapper()); await waitFor(() => { expect(result.current.query1.isSuccess).toBeTruthy(); diff --git a/packages/connect-query/src/connect-query-key.test.ts b/packages/connect-query/src/connect-query-key.test.ts deleted file mode 100644 index 57f245f5..00000000 --- a/packages/connect-query/src/connect-query-key.test.ts +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { Timestamp, toPlainMessage } from "@bufbuild/protobuf"; -import { describe, expect, it } from "vitest"; - -import { createConnectQueryKey } from "./connect-query-key.js"; -import { OperationRequest, SayRequest } from "./gen/eliza_pb.js"; -import { disableQuery } from "./utils.js"; - -describe("makeQueryKey", () => { - const methodDescriptor = { - I: SayRequest, - name: "name", - service: { - typeName: "service.typeName", - }, - }; - - it("makes a query key with input", () => { - const key = createConnectQueryKey(methodDescriptor, { - sentence: "someValue", - }); - expect(key).toStrictEqual([ - "service.typeName", - "name", - { sentence: "someValue" }, - ]); - }); - - it("allows empty inputs", () => { - const key = createConnectQueryKey(methodDescriptor); - expect(key).toStrictEqual([ - "service.typeName", - "name", - toPlainMessage(new methodDescriptor.I({})), - ]); - }); - - it("makes a query key with a disabled input", () => { - const key = createConnectQueryKey(methodDescriptor, disableQuery); - expect(key).toStrictEqual([ - "service.typeName", - "name", - toPlainMessage(new methodDescriptor.I({})), - ]); - }); - - it("converts nested Timestamps to PlainMessages", () => { - const methodDescriptorWithMessage = { - I: OperationRequest, - name: "name", - service: { - typeName: "service.typeName", - }, - }; - const key = createConnectQueryKey(methodDescriptorWithMessage, { - timestamp: new Timestamp(), - }); - expect(key[2].timestamp).not.toBeInstanceOf(Timestamp); - }); - - it("generates identical keys when input is empty or the default is explicitly sent", () => { - const key1 = createConnectQueryKey(methodDescriptor, {}); - const key2 = createConnectQueryKey(methodDescriptor, { sentence: "" }); - expect(key1).toStrictEqual(key2); - }); -}); diff --git a/packages/connect-query/src/connect-query-key.ts b/packages/connect-query/src/connect-query-key.ts deleted file mode 100644 index 1fd28eee..00000000 --- a/packages/connect-query/src/connect-query-key.ts +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { - type Message, - type PartialMessage, - type PlainMessage, - toPlainMessage, -} from "@bufbuild/protobuf"; - -import type { MethodUnaryDescriptor } from "./method-unary-descriptor.js"; -import type { DisableQuery } from "./utils.js"; -import { disableQuery } from "./utils.js"; - -/** - * TanStack Query requires query keys in order to decide when the query should automatically update. - * - * `QueryKey`s in TanStack Query are usually arbitrary, but Connect-Query uses the approach of creating a query key that begins with the least specific information: the service's `typeName`, followed by the method name, and ending with the most specific information to identify a particular request: the input message itself. - * - * For example, for a query key might look like this: - * - * @example - * [ - * "connectrpc.eliza.v1.ElizaService", - * "Say", - * { sentence: "hello there" }, - * ] - */ -export type ConnectQueryKey> = [ - serviceTypeName: string, - methodName: string, - input: PlainMessage, -]; - -/** - * TanStack Query requires query keys in order to decide when the query should automatically update. - * - * In Connect-Query, much of this is handled automatically by this function. - * - * @see ConnectQueryKey for information on the components of Connect-Query's keys. - */ -export function createConnectQueryKey< - I extends Message, - O extends Message, ->( - methodDescriptor: Pick, "I" | "name" | "service">, - input?: DisableQuery | PartialMessage | undefined, -): ConnectQueryKey { - return [ - methodDescriptor.service.typeName, - methodDescriptor.name, - toPlainMessage( - new methodDescriptor.I(input === disableQuery || !input ? {} : input), - ), - ]; -} - -/** - * Similar to @see ConnectQueryKey, but for infinite queries. - */ -export type ConnectInfiniteQueryKey> = [ - serviceTypeName: string, - methodName: string, - input: PlainMessage, - "infinite", -]; - -/** - * Similar to @see createConnectQueryKey, but for infinite queries. - */ -export function createConnectInfiniteQueryKey< - I extends Message, - O extends Message, ->( - methodDescriptor: Pick, "I" | "name" | "service">, - input?: DisableQuery | PartialMessage | undefined, -): ConnectInfiniteQueryKey { - return [...createConnectQueryKey(methodDescriptor, input), "infinite"]; -} diff --git a/packages/connect-query/src/create-use-infinite-query-options.ts b/packages/connect-query/src/create-use-infinite-query-options.ts deleted file mode 100644 index 25cfe252..00000000 --- a/packages/connect-query/src/create-use-infinite-query-options.ts +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import type { Message, PartialMessage } from "@bufbuild/protobuf"; -import type { CallOptions, ConnectError, Transport } from "@connectrpc/connect"; -import type { - GetNextPageParamFunction, - InfiniteData, - QueryFunction, - UseInfiniteQueryOptions, - UseSuspenseInfiniteQueryOptions, -} from "@tanstack/react-query"; - -import { callUnaryMethod } from "./call-unary-method.js"; -import { - type ConnectInfiniteQueryKey, - createConnectInfiniteQueryKey, -} from "./connect-query-key.js"; -import type { MethodUnaryDescriptor } from "./method-unary-descriptor.js"; -import { assert, type DisableQuery, disableQuery } from "./utils.js"; - -/** - * Options specific to connect-query - */ -export interface ConnectInfiniteQueryOptions< - I extends Message, - O extends Message, - ParamKey extends keyof PartialMessage, -> { - /** Defines which part of the input should be considered the page param */ - pageParamKey: ParamKey; - /** Transport can be overridden here.*/ - transport: Transport; - /** Additional call options */ - callOptions?: Omit | undefined; - /** Determines the next page. */ - getNextPageParam: GetNextPageParamFunction[ParamKey], O>; -} - -/** - * Options for useInfiniteQuery - */ -export type CreateInfiniteQueryOptions< - I extends Message, - O extends Message, - ParamKey extends keyof PartialMessage, -> = ConnectInfiniteQueryOptions & - Omit< - UseInfiniteQueryOptions< - O, - ConnectError, - InfiniteData, - O, - ConnectInfiniteQueryKey, - PartialMessage[ParamKey] - >, - "getNextPageParam" | "initialPageParam" | "queryFn" | "queryKey" - >; - -/** - * Options for useSuspenseInfiniteQuery - */ -export type CreateSuspenseInfiniteQueryOptions< - I extends Message, - O extends Message, - ParamKey extends keyof PartialMessage, -> = ConnectInfiniteQueryOptions & - Omit< - UseSuspenseInfiniteQueryOptions< - O, - ConnectError, - InfiniteData, - O, - ConnectInfiniteQueryKey, - PartialMessage[ParamKey] - >, - "getNextPageParam" | "initialPageParam" | "queryFn" | "queryKey" - >; - -function createUnaryInfiniteQueryFn< - I extends Message, - O extends Message, - ParamKey extends keyof PartialMessage, ->( - methodType: MethodUnaryDescriptor, - input: DisableQuery | PartialMessage, - { - callOptions, - transport, - pageParamKey, - }: { - transport: Transport; - callOptions?: CallOptions | undefined; - pageParamKey: ParamKey; - }, -): QueryFunction, PartialMessage[ParamKey]> { - return async (context) => { - assert(input !== disableQuery, "Disabled query cannot be fetched"); - assert("pageParam" in context, "pageParam must be part of context"); - - const inputCombinedWithPageParam = { - ...input, - [pageParamKey]: context.pageParam, - }; - return callUnaryMethod(methodType, inputCombinedWithPageParam, { - callOptions: { - ...callOptions, - signal: callOptions?.signal ?? context.signal, - }, - transport, - }); - }; -} - -/** - * Query the method provided. Maps to useInfiniteQuery on tanstack/react-query - * - * @param methodSig - * @returns - */ -export function createUseInfiniteQueryOptions< - I extends Message, - O extends Message, - ParamKey extends keyof PartialMessage, ->( - methodSig: MethodUnaryDescriptor, - input: - | DisableQuery - | (PartialMessage & Required, ParamKey>>), - { - transport, - getNextPageParam, - pageParamKey, - callOptions, - }: ConnectInfiniteQueryOptions, -): { - getNextPageParam: ConnectInfiniteQueryOptions< - I, - O, - ParamKey - >["getNextPageParam"]; - queryKey: ConnectInfiniteQueryKey; - queryFn: QueryFunction< - O, - ConnectInfiniteQueryKey, - PartialMessage[ParamKey] - >; - initialPageParam: PartialMessage[ParamKey]; - enabled: boolean; -} { - const queryKey = createConnectInfiniteQueryKey( - methodSig, - input === disableQuery - ? undefined - : { - ...input, - [pageParamKey]: undefined, - }, - ); - return { - getNextPageParam, - initialPageParam: - input === disableQuery - ? undefined - : (input[pageParamKey] as PartialMessage[ParamKey]), - queryKey, - queryFn: createUnaryInfiniteQueryFn(methodSig, input, { - transport, - callOptions, - pageParamKey, - }), - enabled: input !== disableQuery, - }; -} diff --git a/packages/connect-query/src/create-use-query-options.ts b/packages/connect-query/src/create-use-query-options.ts deleted file mode 100644 index 2c4bc7ab..00000000 --- a/packages/connect-query/src/create-use-query-options.ts +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import type { Message, PartialMessage } from "@bufbuild/protobuf"; -import type { CallOptions, ConnectError, Transport } from "@connectrpc/connect"; -import type { - QueryFunction, - UseQueryOptions, - UseSuspenseQueryOptions, -} from "@tanstack/react-query"; - -import { callUnaryMethod } from "./call-unary-method.js"; -import type { ConnectQueryKey } from "./connect-query-key.js"; -import { createConnectQueryKey } from "./connect-query-key.js"; -import type { MethodUnaryDescriptor } from "./method-unary-descriptor.js"; -import { assert, type DisableQuery, disableQuery } from "./utils.js"; - -export interface ConnectQueryOptions { - /** The transport to be used for the fetching. */ - transport: Transport; - /** Any additional call options to provide the transport on call. */ - callOptions?: Omit | undefined; -} - -/** - * Options for useQuery - */ -export type CreateQueryOptions< - I extends Message, - O extends Message, - SelectOutData = O, -> = ConnectQueryOptions & - Omit< - UseQueryOptions>, - "queryFn" | "queryKey" - >; - -/** - * Options for useQuery - */ -export type CreateSuspenseQueryOptions< - I extends Message, - O extends Message, - SelectOutData = 0, -> = ConnectQueryOptions & - Omit< - UseSuspenseQueryOptions>, - "queryFn" | "queryKey" - >; - -function createUnaryQueryFn, O extends Message>( - methodType: MethodUnaryDescriptor, - input: DisableQuery | PartialMessage | undefined, - { - callOptions, - transport, - }: { - transport: Transport; - callOptions?: CallOptions | undefined; - }, -): QueryFunction> { - return async (context) => { - assert(input !== disableQuery, "Disabled query cannot be fetched"); - return callUnaryMethod(methodType, input, { - callOptions: { - ...callOptions, - signal: callOptions?.signal ?? context.signal, - }, - transport, - }); - }; -} - -/** - * Creates all options required to make a query. Useful in combination with `useQueries` from tanstack/react-query. - */ -export function createUseQueryOptions< - I extends Message, - O extends Message, ->( - methodSig: MethodUnaryDescriptor, - input: DisableQuery | PartialMessage | undefined, - { transport, callOptions }: ConnectQueryOptions, -): { - queryKey: ConnectQueryKey; - queryFn: QueryFunction>; - enabled: boolean | undefined; -} { - const queryKey = createConnectQueryKey(methodSig, input); - return { - queryKey, - queryFn: createUnaryQueryFn(methodSig, input, { - transport, - callOptions, - }), - enabled: input === disableQuery ? false : undefined, - }; -} diff --git a/packages/connect-query/src/default-options.test.ts b/packages/connect-query/src/default-options.test.ts deleted file mode 100644 index a1e10c89..00000000 --- a/packages/connect-query/src/default-options.test.ts +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import { describe, expect, it } from "vitest"; - -import { defaultOptions } from "./default-options.js"; - -describe("defaultOptions", () => { - const { - queries: { queryKeyHashFn: hash }, - } = defaultOptions; - - it("hashes primitives", () => { - expect(hash("a")).toStrictEqual(hash("a")); - expect(hash(1)).toStrictEqual(hash(1)); - expect(hash(NaN)).toStrictEqual(hash(NaN)); - expect(hash(null)).toStrictEqual(hash(null)); - expect(hash(undefined)).toStrictEqual(hash(undefined)); - expect(hash(true)).toStrictEqual(hash(true)); - expect(hash(["a"])).toStrictEqual(hash(["a"])); - expect(hash({ a: "a" })).toStrictEqual(hash({ a: "a" })); - - expect(hash(Symbol("a"))).toStrictEqual(hash(Symbol("a"))); - expect(hash(1n)).toStrictEqual(hash(1n)); - expect(hash(/ziltoid/)).toStrictEqual(hash(/ziltoid/)); - expect(hash(new Date(1))).toStrictEqual(hash(new Date(1))); - - // not equal - expect(hash(() => {})).not.toStrictEqual(hash(() => {})); - expect(hash(new Set(["a", "b"]))).not.toStrictEqual( - hash(new Set(["a", "b"])), - ); - expect(hash(new Map([["a", "b"]]))).not.toStrictEqual( - hash(new Map([["a", "b"]])), - ); - }); - - it("only guarantees referential consistency", () => { - const func = () => {}; - expect(hash(func)).toStrictEqual(hash(func)); - - const set = new Set(["a", "b"]); - expect(hash(set)).toStrictEqual(hash(set)); - - const map = new Map([["a", "b"]]); - expect(hash(map)).toStrictEqual(hash(map)); - }); - - it("ignores object insertion order", () => { - expect(hash({ a: 1, b: 2 })).toStrictEqual(hash({ b: 2, a: 1 })); - }); - - it("handles circular references", () => { - interface Ziltoid { - theOmniscient: true; - ziltoid?: Ziltoid; - } - const ziltoid: Ziltoid = { theOmniscient: true }; - ziltoid.ziltoid = ziltoid; - expect(hash(ziltoid)).toStrictEqual(hash(ziltoid)); - }); -}); diff --git a/packages/connect-query/src/default-options.ts b/packages/connect-query/src/default-options.ts deleted file mode 100644 index 35a70777..00000000 --- a/packages/connect-query/src/default-options.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import type { DefaultOptions } from "@tanstack/react-query"; -import stableHash from "stable-hash"; - -/** - * These default options are required for proper query key hashing. - * - * For example, if you are using BigInt values, you will need this in order to avoid getting this expected JavaScript error: - * - * `Error: Uncaught [TypeError: Do not know how to serialize a BigInt]` - * - * when TanStack Query tries to serialize the value. - */ -export const defaultOptions = { - queries: { - // eslint-disable-next-line @typescript-eslint/no-explicit-any -- stableHash is a function but doesn't seem to satisfy the type. Likely a node16 compat problem. - queryKeyHashFn: stableHash as any as (object: any) => string, - }, -} satisfies DefaultOptions; diff --git a/packages/connect-query/src/gen/eliza_connect.ts b/packages/connect-query/src/gen/eliza_connect.ts deleted file mode 100644 index f861d618..00000000 --- a/packages/connect-query/src/gen/eliza_connect.ts +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-connect-es v1.5.0 with parameter "target=ts" -// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { ConverseRequest, ConverseResponse, CountRequest, CountResponse, IntroduceRequest, IntroduceResponse, ListRequest, ListResponse, Nothing, OperationRequest, OperationResponse, SayRequest, SayResponse } from "./eliza_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * ElizaService provides a way to talk to Eliza, a port of the DOCTOR script - * for Joseph Weizenbaum's original ELIZA program. Created in the mid-1960s at - * the MIT Artificial Intelligence Laboratory, ELIZA demonstrates the - * superficiality of human-computer communication. DOCTOR simulates a - * psychotherapist, and is commonly found as an Easter egg in emacs - * distributions. - * - * @generated from service connectrpc.eliza.v1.ElizaService - */ -export const ElizaService = { - typeName: "connectrpc.eliza.v1.ElizaService", - methods: { - /** - * Say is a unary RPC. Eliza responds to the prompt with a single sentence. - * - * @generated from rpc connectrpc.eliza.v1.ElizaService.Say - */ - say: { - name: "Say", - I: SayRequest, - O: SayResponse, - kind: MethodKind.Unary, - }, - /** - * SayAgain is a unary RPC. Eliza responds to the prompt with a single sentence. - * - * @generated from rpc connectrpc.eliza.v1.ElizaService.SayAgain - */ - sayAgain: { - name: "SayAgain", - I: SayRequest, - O: SayResponse, - kind: MethodKind.Unary, - }, - /** - * Converse is a bidirectional RPC. The caller may exchange multiple - * back-and-forth messages with Eliza over a long-lived connection. Eliza - * responds to each ConverseRequest with a ConverseResponse. - * - * @generated from rpc connectrpc.eliza.v1.ElizaService.Converse - */ - converse: { - name: "Converse", - I: ConverseRequest, - O: ConverseResponse, - kind: MethodKind.BiDiStreaming, - }, - /** - * Introduce is a server streaming RPC. Given the caller's name, Eliza - * returns a stream of sentences to introduce itself. - * - * @generated from rpc connectrpc.eliza.v1.ElizaService.Introduce - */ - introduce: { - name: "Introduce", - I: IntroduceRequest, - O: IntroduceResponse, - kind: MethodKind.ServerStreaming, - }, - } -} as const; - -/** - * Second Service just to make sure multiple file generation works - * - * @generated from service connectrpc.eliza.v1.SecondService - */ -export const SecondService = { - typeName: "connectrpc.eliza.v1.SecondService", - methods: { - /** - * Say is a unary RPC. Eliza responds to the prompt with a single sentence. - * - * @generated from rpc connectrpc.eliza.v1.SecondService.Say - */ - say: { - name: "Say", - I: SayRequest, - O: SayResponse, - kind: MethodKind.Unary, - }, - /** - * Converse is a bidirectional RPC. The caller may exchange multiple - * back-and-forth messages with Eliza over a long-lived connection. Eliza - * responds to each ConverseRequest with a ConverseResponse. - * - * @generated from rpc connectrpc.eliza.v1.SecondService.Converse - */ - converse: { - name: "Converse", - I: ConverseRequest, - O: ConverseResponse, - kind: MethodKind.BiDiStreaming, - }, - /** - * Introduce is a server streaming RPC. Given the caller's name, Eliza - * returns a stream of sentences to introduce itself. - * - * @generated from rpc connectrpc.eliza.v1.SecondService.Introduce - */ - introduce: { - name: "Introduce", - I: IntroduceRequest, - O: IntroduceResponse, - kind: MethodKind.ServerStreaming, - }, - } -} as const; - -/** - * @generated from service connectrpc.eliza.v1.Haberdasher - */ -export const Haberdasher = { - typeName: "connectrpc.eliza.v1.Haberdasher", - methods: { - /** - * @generated from rpc connectrpc.eliza.v1.Haberdasher.Work - */ - work: { - name: "Work", - I: Nothing, - O: Nothing, - kind: MethodKind.Unary, - }, - } -} as const; - -/** - * @generated from service connectrpc.eliza.v1.Slouch - */ -export const Slouch = { - typeName: "connectrpc.eliza.v1.Slouch", - methods: { - /** - * @generated from rpc connectrpc.eliza.v1.Slouch.Work - */ - work: { - name: "Work", - I: Nothing, - O: Nothing, - kind: MethodKind.Unary, - }, - } -} as const; - -/** - * @generated from service connectrpc.eliza.v1.BigIntService - */ -export const BigIntService = { - typeName: "connectrpc.eliza.v1.BigIntService", - methods: { - /** - * @generated from rpc connectrpc.eliza.v1.BigIntService.Count - */ - count: { - name: "Count", - I: CountRequest, - O: CountResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc connectrpc.eliza.v1.BigIntService.GetCount - */ - getCount: { - name: "GetCount", - I: Nothing, - O: CountResponse, - kind: MethodKind.Unary, - }, - } -} as const; - -/** - * @generated from service connectrpc.eliza.v1.PaginatedService - */ -export const PaginatedService = { - typeName: "connectrpc.eliza.v1.PaginatedService", - methods: { - /** - * @generated from rpc connectrpc.eliza.v1.PaginatedService.List - */ - list: { - name: "List", - I: ListRequest, - O: ListResponse, - kind: MethodKind.Unary, - }, - } -} as const; - -/** - * @generated from service connectrpc.eliza.v1.ServiceWithMessage - */ -export const ServiceWithMessage = { - typeName: "connectrpc.eliza.v1.ServiceWithMessage", - methods: { - /** - * @generated from rpc connectrpc.eliza.v1.ServiceWithMessage.Operation - */ - operation: { - name: "Operation", - I: OperationRequest, - O: OperationResponse, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/packages/connect-query/src/gen/eliza_pb.ts b/packages/connect-query/src/gen/eliza_pb.ts deleted file mode 100644 index 8782dfde..00000000 --- a/packages/connect-query/src/gen/eliza_pb.ts +++ /dev/null @@ -1,517 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts" -// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; - -/** - * SayRequest is a single-sentence request. - * - * @generated from message connectrpc.eliza.v1.SayRequest - */ -export class SayRequest extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.SayRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SayRequest { - return new SayRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SayRequest { - return new SayRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SayRequest { - return new SayRequest().fromJsonString(jsonString, options); - } - - static equals(a: SayRequest | PlainMessage | undefined, b: SayRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(SayRequest, a, b); - } -} - -/** - * SayResponse is a single-sentence response. - * - * @generated from message connectrpc.eliza.v1.SayResponse - */ -export class SayResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.SayResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SayResponse { - return new SayResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SayResponse { - return new SayResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SayResponse { - return new SayResponse().fromJsonString(jsonString, options); - } - - static equals(a: SayResponse | PlainMessage | undefined, b: SayResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(SayResponse, a, b); - } -} - -/** - * ConverseRequest is a single sentence request sent as part of a - * back-and-forth conversation. - * - * @generated from message connectrpc.eliza.v1.ConverseRequest - */ -export class ConverseRequest extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.ConverseRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConverseRequest { - return new ConverseRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConverseRequest { - return new ConverseRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConverseRequest { - return new ConverseRequest().fromJsonString(jsonString, options); - } - - static equals(a: ConverseRequest | PlainMessage | undefined, b: ConverseRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ConverseRequest, a, b); - } -} - -/** - * ConverseResponse is a single sentence response sent in answer to a - * ConverseRequest. - * - * @generated from message connectrpc.eliza.v1.ConverseResponse - */ -export class ConverseResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.ConverseResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ConverseResponse { - return new ConverseResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ConverseResponse { - return new ConverseResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ConverseResponse { - return new ConverseResponse().fromJsonString(jsonString, options); - } - - static equals(a: ConverseResponse | PlainMessage | undefined, b: ConverseResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ConverseResponse, a, b); - } -} - -/** - * IntroduceRequest asks Eliza to introduce itself to the named user. - * - * @generated from message connectrpc.eliza.v1.IntroduceRequest - */ -export class IntroduceRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.IntroduceRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IntroduceRequest { - return new IntroduceRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IntroduceRequest { - return new IntroduceRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IntroduceRequest { - return new IntroduceRequest().fromJsonString(jsonString, options); - } - - static equals(a: IntroduceRequest | PlainMessage | undefined, b: IntroduceRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(IntroduceRequest, a, b); - } -} - -/** - * IntroduceResponse is one sentence of Eliza's introductory monologue. - * - * @generated from message connectrpc.eliza.v1.IntroduceResponse - */ -export class IntroduceResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.IntroduceResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): IntroduceResponse { - return new IntroduceResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): IntroduceResponse { - return new IntroduceResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): IntroduceResponse { - return new IntroduceResponse().fromJsonString(jsonString, options); - } - - static equals(a: IntroduceResponse | PlainMessage | undefined, b: IntroduceResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(IntroduceResponse, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.Nothing - */ -export class Nothing extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.Nothing"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Nothing { - return new Nothing().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Nothing { - return new Nothing().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Nothing { - return new Nothing().fromJsonString(jsonString, options); - } - - static equals(a: Nothing | PlainMessage | undefined, b: Nothing | PlainMessage | undefined): boolean { - return proto3.util.equals(Nothing, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.CountRequest - */ -export class CountRequest extends Message { - /** - * @generated from field: int64 add = 1; - */ - add = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.CountRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "add", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CountRequest { - return new CountRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CountRequest { - return new CountRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CountRequest { - return new CountRequest().fromJsonString(jsonString, options); - } - - static equals(a: CountRequest | PlainMessage | undefined, b: CountRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CountRequest, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.CountResponse - */ -export class CountResponse extends Message { - /** - * @generated from field: int64 count = 1; - */ - count = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.CountResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "count", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CountResponse { - return new CountResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CountResponse { - return new CountResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CountResponse { - return new CountResponse().fromJsonString(jsonString, options); - } - - static equals(a: CountResponse | PlainMessage | undefined, b: CountResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(CountResponse, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.ListRequest - */ -export class ListRequest extends Message { - /** - * @generated from field: int64 page = 1; - */ - page = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.ListRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "page", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ListRequest { - return new ListRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ListRequest { - return new ListRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ListRequest { - return new ListRequest().fromJsonString(jsonString, options); - } - - static equals(a: ListRequest | PlainMessage | undefined, b: ListRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ListRequest, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.ListResponse - */ -export class ListResponse extends Message { - /** - * @generated from field: int64 page = 1; - */ - page = protoInt64.zero; - - /** - * @generated from field: repeated string items = 2; - */ - items: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.ListResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "page", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 2, name: "items", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ListResponse { - return new ListResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ListResponse { - return new ListResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ListResponse { - return new ListResponse().fromJsonString(jsonString, options); - } - - static equals(a: ListResponse | PlainMessage | undefined, b: ListResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ListResponse, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.OperationRequest - */ -export class OperationRequest extends Message { - /** - * @generated from field: google.protobuf.Timestamp timestamp = 1; - */ - timestamp?: Timestamp; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.OperationRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "timestamp", kind: "message", T: Timestamp }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OperationRequest { - return new OperationRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OperationRequest { - return new OperationRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OperationRequest { - return new OperationRequest().fromJsonString(jsonString, options); - } - - static equals(a: OperationRequest | PlainMessage | undefined, b: OperationRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(OperationRequest, a, b); - } -} - -/** - * @generated from message connectrpc.eliza.v1.OperationResponse - */ -export class OperationResponse extends Message { - /** - * @generated from field: google.protobuf.Timestamp timestamp = 1; - */ - timestamp?: Timestamp; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.OperationResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "timestamp", kind: "message", T: Timestamp }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OperationResponse { - return new OperationResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OperationResponse { - return new OperationResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OperationResponse { - return new OperationResponse().fromJsonString(jsonString, options); - } - - static equals(a: OperationResponse | PlainMessage | undefined, b: OperationResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(OperationResponse, a, b); - } -} - diff --git a/packages/connect-query/src/index.ts b/packages/connect-query/src/index.ts index 2fa0beb3..4f4dfe89 100644 --- a/packages/connect-query/src/index.ts +++ b/packages/connect-query/src/index.ts @@ -12,28 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -export type { - ConnectQueryKey, - ConnectInfiniteQueryKey, -} from "./connect-query-key.js"; -export { - createConnectQueryKey, - createConnectInfiniteQueryKey, -} from "./connect-query-key.js"; -export { disableQuery, createProtobufSafeUpdater } from "./utils.js"; +export * from "@connectrpc/connect-query-core"; export { useTransport, TransportProvider } from "./use-transport.js"; -export type { CreateInfiniteQueryOptions as UseInfiniteQueryOptions } from "./create-use-infinite-query-options.js"; export { useInfiniteQuery, useSuspenseInfiniteQuery, } from "./use-infinite-query.js"; -export type { CreateQueryOptions as UseQueryOptions } from "./create-use-query-options.js"; export { useQuery, useSuspenseQuery } from "./use-query.js"; export type { UseMutationOptions } from "./use-mutation.js"; export { useMutation } from "./use-mutation.js"; -export { defaultOptions } from "./default-options.js"; -export type { DisableQuery, ConnectUpdater } from "./utils.js"; -export { callUnaryMethod } from "./call-unary-method.js"; -export type { MethodUnaryDescriptor } from "./method-unary-descriptor.js"; -export { createUseInfiniteQueryOptions as createInfiniteQueryOptions } from "./create-use-infinite-query-options.js"; -export { createUseQueryOptions as createQueryOptions } from "./create-use-query-options.js"; +export type { UseInfiniteQueryOptions } from "./use-infinite-query.js"; +export type { UseQueryOptions } from "./use-query.js"; diff --git a/packages/connect-query/src/test/test-wrapper.tsx b/packages/connect-query/src/test/test-wrapper.tsx new file mode 100644 index 00000000..b10b0a33 --- /dev/null +++ b/packages/connect-query/src/test/test-wrapper.tsx @@ -0,0 +1,52 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type { Transport } from "@connectrpc/connect"; +import { createConnectTransport } from "@connectrpc/connect-web"; +import type { QueryClientConfig } from "@tanstack/react-query"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import type { JSXElementConstructor, PropsWithChildren } from "react"; + +import { TransportProvider } from "../use-transport.js"; + +/** + * A utils wrapper that supplies Tanstack Query's `QueryClientProvider` as well as Connect-Query's `TransportProvider`. + */ +export const wrapper = ( + config?: QueryClientConfig, + transport = createConnectTransport({ + baseUrl: "https://demo.connectrpc.com", + }), +): { + wrapper: JSXElementConstructor; + queryClient: QueryClient; + transport: Transport; + queryClientWrapper: JSXElementConstructor; +} => { + const queryClient = new QueryClient(config); + return { + wrapper: ({ children }) => ( + + + {children} + + + ), + queryClient, + transport, + queryClientWrapper: ({ children }) => ( + {children} + ), + }; +}; diff --git a/packages/connect-query/src/use-infinite-query.test.ts b/packages/connect-query/src/use-infinite-query.test.ts index f47cca49..a4793006 100644 --- a/packages/connect-query/src/use-infinite-query.test.ts +++ b/packages/connect-query/src/use-infinite-query.test.ts @@ -12,32 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { QueryCache } from "@tanstack/react-query"; +import { create } from "@bufbuild/protobuf"; +import { createConnectQueryKey } from "@connectrpc/connect-query-core"; +import { QueryCache, skipToken } from "@tanstack/react-query"; import { renderHook, waitFor } from "@testing-library/react"; +import { mockPaginatedTransport } from "test-utils"; +import { ListResponseSchema, ListService } from "test-utils/gen/list_pb.js"; import { describe, expect, it, vi } from "vitest"; -import { - createConnectInfiniteQueryKey, - createConnectQueryKey, -} from "./connect-query-key.js"; -import { defaultOptions } from "./default-options.js"; -import { PaginatedService } from "./gen/eliza_connect.js"; -import { mockPaginatedTransport, wrapper } from "./test/test-utils.js"; +import { wrapper } from "./test/test-wrapper.js"; import { useInfiniteQuery, useSuspenseInfiniteQuery, } from "./use-infinite-query.js"; import { useQuery } from "./use-query.js"; -import { disableQuery } from "./utils.js"; // TODO: maybe create a helper to take a service and method and generate this. -const methodDescriptor = { - ...PaginatedService.methods.list, - localName: "List", - service: { - typeName: PaginatedService.typeName, - }, -}; +const methodDescriptor = ListService.method.list; const mockedPaginatedTransport = mockPaginatedTransport(); @@ -56,12 +47,7 @@ describe("useInfiniteQuery", () => { }, ); }, - wrapper( - { - defaultOptions, - }, - mockedPaginatedTransport, - ), + wrapper({}, mockedPaginatedTransport), ); await waitFor(() => { @@ -70,10 +56,10 @@ describe("useInfiniteQuery", () => { expect(result.current.data).toEqual({ pageParams: [0n], pages: [ - { + create(ListResponseSchema, { items: ["-2 Item", "-1 Item", "0 Item"], page: 0n, - }, + }), ], }); @@ -86,22 +72,22 @@ describe("useInfiniteQuery", () => { expect(result.current.data).toEqual({ pageParams: [0n, 1n], pages: [ - { + create(ListResponseSchema, { items: ["-2 Item", "-1 Item", "0 Item"], page: 0n, - }, - { + }), + create(ListResponseSchema, { items: ["1 Item", "2 Item", "3 Item"], page: 1n, - }, + }), ], }); }); - it("can be disabled", () => { + it("can be disabled with skipToken", () => { const { result } = renderHook( () => { - return useInfiniteQuery(methodDescriptor, disableQuery, { + return useInfiniteQuery(methodDescriptor, skipToken, { getNextPageParam: (lastPage) => lastPage.page + 1n, pageParamKey: "page", }); @@ -113,6 +99,10 @@ describe("useInfiniteQuery", () => { }); it("can be provided a custom transport", async () => { + const customTransport = mockPaginatedTransport({ + items: ["Intercepted!"], + page: 0n, + }); const { result } = renderHook( () => { return useInfiniteQuery( @@ -123,19 +113,11 @@ describe("useInfiniteQuery", () => { { getNextPageParam: (lastPage) => lastPage.page + 1n, pageParamKey: "page", - transport: mockPaginatedTransport({ - items: ["Intercepted!"], - page: 0n, - }), + transport: customTransport, }, ); }, - wrapper( - { - defaultOptions, - }, - mockedPaginatedTransport, - ), + wrapper({}, mockedPaginatedTransport), ); await waitFor(() => { expect(result.current.isSuccess).toBeTruthy(); @@ -159,7 +141,7 @@ describe("useInfiniteQuery", () => { placeholderData: { pageParams: [-1n], pages: [ - new methodDescriptor.O({ + create(methodDescriptor.output, { page: -1n, items: [], }), @@ -168,21 +150,14 @@ describe("useInfiniteQuery", () => { }, ); }, - wrapper( - { - defaultOptions, - }, - mockedPaginatedTransport, - ), + wrapper({}, mockedPaginatedTransport), ); expect(result.current.data?.pages[0].page).toEqual(-1n); }); it("page param doesn't persist to the query cache", async () => { const { queryClient, ...remainingWrapper } = wrapper( - { - defaultOptions, - }, + {}, mockedPaginatedTransport, ); const { result } = renderHook(() => { @@ -202,7 +177,13 @@ describe("useInfiniteQuery", () => { expect(cache).toHaveLength(1); expect(cache[0].queryKey).toEqual( - createConnectInfiniteQueryKey(methodDescriptor, {}), + createConnectQueryKey({ + schema: methodDescriptor, + transport: mockedPaginatedTransport, + cardinality: "infinite", + pageParamKey: "page", + input: {}, + }), ); await waitFor(() => { @@ -213,12 +194,7 @@ describe("useInfiniteQuery", () => { }); it("doesn't share data with a similar non-infinite query", async () => { - const remainingWrapper = wrapper( - { - defaultOptions, - }, - mockedPaginatedTransport, - ); + const remainingWrapper = wrapper({}, mockedPaginatedTransport); const { result } = renderHook(() => { return useInfiniteQuery( methodDescriptor, @@ -257,10 +233,50 @@ describe("useInfiniteQuery", () => { onSuccess: onSuccessSpy, }); const { queryClient, ...remainingWrapper } = wrapper( - { - defaultOptions, - queryCache: spiedQueryCache, - }, + { queryCache: spiedQueryCache }, + mockedPaginatedTransport, + ); + const { result } = renderHook(() => { + return useInfiniteQuery( + methodDescriptor, + { + page: 0n, + }, + { + getNextPageParam: (lastPage) => lastPage.page + 1n, + pageParamKey: "page", + }, + ); + }, remainingWrapper); + + await waitFor(() => { + expect(result.current.isSuccess).toBeTruthy(); + }); + + expect(onSuccessSpy).toHaveBeenCalledTimes(1); + + await queryClient.invalidateQueries({ + queryKey: createConnectQueryKey({ + schema: methodDescriptor, + transport: mockedPaginatedTransport, + cardinality: undefined, + pageParamKey: "page", + input: { + page: 0n, + }, + }), + }); + + expect(onSuccessSpy).toHaveBeenCalledTimes(2); + }); + + it("cache can be invalidated with a non-exact key", async () => { + const onSuccessSpy = vi.fn(); + const spiedQueryCache = new QueryCache({ + onSuccess: onSuccessSpy, + }); + const { queryClient, ...remainingWrapper } = wrapper( + { queryCache: spiedQueryCache }, mockedPaginatedTransport, ); const { result } = renderHook(() => { @@ -283,7 +299,11 @@ describe("useInfiniteQuery", () => { expect(onSuccessSpy).toHaveBeenCalledTimes(1); await queryClient.invalidateQueries({ - queryKey: createConnectQueryKey(methodDescriptor), + exact: false, + queryKey: createConnectQueryKey({ + schema: methodDescriptor, + cardinality: "infinite", + }), }); expect(onSuccessSpy).toHaveBeenCalledTimes(2); @@ -305,12 +325,7 @@ describe("useSuspenseInfiniteQuery", () => { }, ); }, - wrapper( - { - defaultOptions, - }, - mockedPaginatedTransport, - ), + wrapper({}, mockedPaginatedTransport), ); await waitFor(() => { @@ -319,10 +334,10 @@ describe("useSuspenseInfiniteQuery", () => { expect(result.current.data).toEqual({ pageParams: [0n], pages: [ - { + create(ListResponseSchema, { items: ["-2 Item", "-1 Item", "0 Item"], page: 0n, - }, + }), ], }); @@ -335,44 +350,34 @@ describe("useSuspenseInfiniteQuery", () => { expect(result.current.data).toEqual({ pageParams: [0n, 1n], pages: [ - { + create(ListResponseSchema, { items: ["-2 Item", "-1 Item", "0 Item"], page: 0n, - }, - { + }), + create(ListResponseSchema, { items: ["1 Item", "2 Item", "3 Item"], page: 1n, - }, + }), ], }); }); - it("can be disabled without explicit disableQuery", () => { - const { result } = renderHook( + // eslint-disable-next-line vitest/expect-expect -- We are asserting via @ts-expect-error + it("can not be disabled with skipToken", () => { + renderHook( () => { - return useInfiniteQuery( + return useSuspenseInfiniteQuery( methodDescriptor, - { - page: 0n, - }, + // @ts-expect-error(2345) skipToken is not allowed + skipToken, { getNextPageParam: (lastPage) => lastPage.page + 1n, pageParamKey: "page", - enabled: false, }, ); }, - wrapper( - { - defaultOptions, - }, - mockedPaginatedTransport, - ), + wrapper({}, mockedPaginatedTransport), ); - - expect(result.current.data).toBeUndefined(); - expect(result.current.isPending).toBeTruthy(); - expect(result.current.isFetching).toBeFalsy(); }); // eslint-disable-next-line vitest/expect-expect -- We are asserting via @ts-expect-error @@ -392,12 +397,7 @@ describe("useSuspenseInfiniteQuery", () => { }, ); }, - wrapper( - { - defaultOptions, - }, - mockedPaginatedTransport, - ), + wrapper({}, mockedPaginatedTransport), ); }); }); diff --git a/packages/connect-query/src/use-infinite-query.ts b/packages/connect-query/src/use-infinite-query.ts index 740f92a6..f3d71ce8 100644 --- a/packages/connect-query/src/use-infinite-query.ts +++ b/packages/connect-query/src/use-infinite-query.ts @@ -12,11 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -import type { Message, PartialMessage } from "@bufbuild/protobuf"; +import type { + DescMessage, + DescMethodUnary, + MessageInitShape, + MessageShape, +} from "@bufbuild/protobuf"; import type { ConnectError, Transport } from "@connectrpc/connect"; +import type { + ConnectInfiniteQueryOptions, + ConnectQueryKey, +} from "@connectrpc/connect-query-core"; +import { createInfiniteQueryOptions } from "@connectrpc/connect-query-core"; import type { InfiniteData, + SkipToken, + UseInfiniteQueryOptions as TanStackUseInfiniteQueryOptions, UseInfiniteQueryResult, + UseSuspenseInfiniteQueryOptions as TanStackUseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult, } from "@tanstack/react-query"; import { @@ -24,77 +37,110 @@ import { useSuspenseInfiniteQuery as tsUseSuspenseInfiniteQuery, } from "@tanstack/react-query"; -import type { - CreateInfiniteQueryOptions, - CreateSuspenseInfiniteQueryOptions, -} from "./create-use-infinite-query-options.js"; -import { createUseInfiniteQueryOptions } from "./create-use-infinite-query-options.js"; -import type { MethodUnaryDescriptor } from "./method-unary-descriptor.js"; import { useTransport } from "./use-transport.js"; -import type { DisableQuery } from "./utils.js"; + +/** + * Options for useInfiniteQuery + */ +export type UseInfiniteQueryOptions< + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, +> = Omit< + TanStackUseInfiniteQueryOptions< + MessageShape, + ConnectError, + InfiniteData>, + MessageShape, + ConnectQueryKey, + MessageInitShape[ParamKey] + >, + "getNextPageParam" | "initialPageParam" | "queryFn" | "queryKey" +> & + ConnectInfiniteQueryOptions & { + /** The transport to be used for the fetching. */ + transport?: Transport; + }; /** * Query the method provided. Maps to useInfiniteQuery on tanstack/react-query */ export function useInfiniteQuery< - I extends Message, - O extends Message, - ParamKey extends keyof PartialMessage, + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, >( - methodSig: MethodUnaryDescriptor, + schema: DescMethodUnary, input: - | DisableQuery - | (PartialMessage & Required, ParamKey>>), + | SkipToken + | (MessageInitShape & Required, ParamKey>>), { transport, - callOptions, pageParamKey, getNextPageParam, - ...options - }: Omit, "transport"> & { - transport?: Transport; - }, -): UseInfiniteQueryResult, ConnectError> { + ...queryOptions + }: UseInfiniteQueryOptions, +): UseInfiniteQueryResult>, ConnectError> { const transportFromCtx = useTransport(); - const baseOptions = createUseInfiniteQueryOptions(methodSig, input, { + const baseOptions = createInfiniteQueryOptions(schema, input, { transport: transport ?? transportFromCtx, getNextPageParam, pageParamKey, - callOptions, }); - // The query cannot be enabled if the base options are disabled, regardless of - // incoming query options. - const enabled = baseOptions.enabled && (options.enabled ?? true); - return tsUseInfiniteQuery({ ...options, ...baseOptions, enabled }); + return tsUseInfiniteQuery({ + ...baseOptions, + ...queryOptions, + }); } +/** + * Options for useSuspenseInfiniteQuery + */ +export type UseSuspenseInfiniteQueryOptions< + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, +> = Omit< + TanStackUseSuspenseInfiniteQueryOptions< + MessageShape, + ConnectError, + InfiniteData>, + MessageShape, + ConnectQueryKey, + MessageInitShape[ParamKey] + >, + "getNextPageParam" | "initialPageParam" | "queryFn" | "queryKey" +> & + ConnectInfiniteQueryOptions & { + /** The transport to be used for the fetching. */ + transport?: Transport; + }; + /** * Query the method provided. Maps to useSuspenseInfiniteQuery on tanstack/react-query */ export function useSuspenseInfiniteQuery< - I extends Message, - O extends Message, - ParamKey extends keyof PartialMessage, + I extends DescMessage, + O extends DescMessage, + ParamKey extends keyof MessageInitShape, >( - methodSig: MethodUnaryDescriptor, - input: PartialMessage & Required, ParamKey>>, + schema: DescMethodUnary, + input: MessageInitShape & Required, ParamKey>>, { transport, - callOptions, pageParamKey, getNextPageParam, - ...options - }: Omit, "transport"> & { - transport?: Transport; - }, -): UseSuspenseInfiniteQueryResult, ConnectError> { + ...queryOptions + }: UseSuspenseInfiniteQueryOptions, +): UseSuspenseInfiniteQueryResult>, ConnectError> { const transportFromCtx = useTransport(); - const baseOptions = createUseInfiniteQueryOptions(methodSig, input, { + const baseOptions = createInfiniteQueryOptions(schema, input, { transport: transport ?? transportFromCtx, getNextPageParam, pageParamKey, - callOptions, }); - - return tsUseSuspenseInfiniteQuery({ ...options, ...baseOptions }); + return tsUseSuspenseInfiniteQuery({ + ...baseOptions, + ...queryOptions, + }); } diff --git a/packages/connect-query/src/use-mutation.test.ts b/packages/connect-query/src/use-mutation.test.ts index 4f3bfa58..8253d3f4 100644 --- a/packages/connect-query/src/use-mutation.test.ts +++ b/packages/connect-query/src/use-mutation.test.ts @@ -12,36 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { create } from "@bufbuild/protobuf"; import { renderHook, waitFor } from "@testing-library/react"; +import { mockPaginatedTransport } from "test-utils"; +import { ListResponseSchema, ListService } from "test-utils/gen/list_pb.js"; import { describe, expect, it, vi } from "vitest"; -import { defaultOptions } from "./default-options.js"; -import { BigIntService, PaginatedService } from "./gen/eliza_connect.js"; -import { - mockPaginatedTransport, - mockStatefulBigIntTransport, - wrapper, -} from "./test/test-utils.js"; +import { wrapper } from "./test/test-wrapper.js"; import { useMutation } from "./use-mutation.js"; // TODO: maybe create a helper to take a service and method and generate this. -const methodDescriptor = { - ...PaginatedService.methods.list, - localName: "List", - service: { - typeName: PaginatedService.typeName, - }, -}; +const methodDescriptor = ListService.method.list; const mockedPaginatedTransport = mockPaginatedTransport(); -const mutationTransport = mockStatefulBigIntTransport(true); - -const statefulDescriptor = { - ...BigIntService.methods.count, - service: { - typeName: BigIntService.typeName, - }, -}; describe("useMutation", () => { it("performs a mutation", async () => { @@ -52,12 +35,7 @@ describe("useMutation", () => { onSuccess, }); }, - wrapper( - { - defaultOptions, - }, - mockedPaginatedTransport, - ), + wrapper({}, mockedPaginatedTransport), ); result.current.mutate({ @@ -69,10 +47,10 @@ describe("useMutation", () => { }); expect(onSuccess).toHaveBeenCalledWith( - { + create(ListResponseSchema, { items: ["-2 Item", "-1 Item", "0 Item"], page: 0n, - }, + }), { page: 0n, }, @@ -90,12 +68,7 @@ describe("useMutation", () => { }), }); }, - wrapper( - { - defaultOptions, - }, - mockedPaginatedTransport, - ), + wrapper({}, mockedPaginatedTransport), ); result.current.mutate({ @@ -109,48 +82,6 @@ describe("useMutation", () => { expect(result.current.data?.items[0]).toBe("Intercepted!"); }); - it("can be cancelled", async () => { - const abortController = new AbortController(); - const { result } = renderHook( - () => { - return useMutation(statefulDescriptor, { - callOptions: { - signal: abortController.signal, - }, - }); - }, - wrapper( - { - defaultOptions, - }, - mutationTransport, - ), - ); - - result.current.mutate({ - add: 1n, - }); - - abortController.abort(); - - await waitFor(() => { - expect(abortController.signal.aborted).toBeTruthy(); - }); - - expect(result.current.isPending).toBeFalsy(); - - const newResult = await mutationTransport.unary( - BigIntService, - BigIntService.methods.getCount, - undefined, - undefined, - undefined, - {}, - ); - - expect(newResult.message.count).toBe(0n); - }); - it("can forward onMutate params", async () => { const onSuccess = vi.fn(); const { result } = renderHook( @@ -168,12 +99,7 @@ describe("useMutation", () => { }, }); }, - wrapper( - { - defaultOptions, - }, - mockedPaginatedTransport, - ), + wrapper({}, mockedPaginatedTransport), ); result.current.mutate({ @@ -185,10 +111,10 @@ describe("useMutation", () => { }); expect(onSuccess).toHaveBeenCalledWith( - { + create(ListResponseSchema, { items: ["-2 Item", "-1 Item", "0 Item"], page: 0n, - }, + }), { page: 0n, }, diff --git a/packages/connect-query/src/use-mutation.ts b/packages/connect-query/src/use-mutation.ts index 5308a79a..c31f93e8 100644 --- a/packages/connect-query/src/use-mutation.ts +++ b/packages/connect-query/src/use-mutation.ts @@ -12,8 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import type { Message, PartialMessage } from "@bufbuild/protobuf"; -import type { CallOptions, ConnectError, Transport } from "@connectrpc/connect"; +import type { + DescMessage, + DescMethodUnary, + MessageInitShape, + MessageShape, +} from "@bufbuild/protobuf"; +import type { ConnectError, Transport } from "@connectrpc/connect"; +import { callUnaryMethod } from "@connectrpc/connect-query-core"; import type { UseMutationOptions as TSUseMutationOptions, UseMutationResult, @@ -21,50 +27,42 @@ import type { import { useMutation as tsUseMutation } from "@tanstack/react-query"; import { useCallback } from "react"; -import { callUnaryMethod } from "./call-unary-method.js"; -import type { MethodUnaryDescriptor } from "./method-unary-descriptor.js"; import { useTransport } from "./use-transport.js"; /** - * Options for useQuery + * Options for useMutation */ export type UseMutationOptions< - I extends Message, - O extends Message, + I extends DescMessage, + O extends DescMessage, Ctx = unknown, -> = Omit< - TSUseMutationOptions, Ctx>, - "mutationFn" +> = TSUseMutationOptions< + MessageShape, + ConnectError, + MessageInitShape, + Ctx > & { + /** The transport to be used for the fetching. */ transport?: Transport; - callOptions?: CallOptions; }; /** * Query the method provided. Maps to useMutation on tanstack/react-query */ export function useMutation< - I extends Message, - O extends Message, + I extends DescMessage, + O extends DescMessage, Ctx = unknown, >( - methodSig: MethodUnaryDescriptor, - // istanbul ignore next - { - transport, - callOptions, - ...queryOptions - }: UseMutationOptions = {}, -): UseMutationResult, Ctx> { + schema: DescMethodUnary, + { transport, ...queryOptions }: UseMutationOptions = {}, +): UseMutationResult, ConnectError, MessageInitShape, Ctx> { const transportFromCtx = useTransport(); const transportToUse = transport ?? transportFromCtx; const mutationFn = useCallback( - async (input: PartialMessage) => - callUnaryMethod(methodSig, input, { - transport: transportToUse, - callOptions, - }), - [transportToUse, callOptions, methodSig], + async (input: MessageInitShape) => + callUnaryMethod(transportToUse, schema, input), + [transportToUse, schema], ); return tsUseMutation({ ...queryOptions, diff --git a/packages/connect-query/src/use-query.test.ts b/packages/connect-query/src/use-query.test.ts index c74d4e4d..3216cf81 100644 --- a/packages/connect-query/src/use-query.test.ts +++ b/packages/connect-query/src/use-query.test.ts @@ -12,25 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { create } from "@bufbuild/protobuf"; +import { + createConnectQueryKey, + skipToken, +} from "@connectrpc/connect-query-core"; import { renderHook, waitFor } from "@testing-library/react"; +import { mockBigInt, mockEliza } from "test-utils"; +import { BigIntService } from "test-utils/gen/bigint_pb.js"; +import { ElizaService } from "test-utils/gen/eliza_pb.js"; import { describe, expect, it } from "vitest"; -import { ElizaService } from "./gen/eliza_connect.js"; -import { mockEliza, wrapper } from "./test/test-utils.js"; +import { wrapper } from "./test/test-wrapper.js"; import { useQuery, useSuspenseQuery } from "./use-query.js"; -import { disableQuery } from "./utils.js"; // TODO: maybe create a helper to take a service and method and generate this. -const sayMethodDescriptor = { - ...ElizaService.methods.say, - localName: "Say", - service: { - typeName: ElizaService.typeName, - }, -}; +const sayMethodDescriptor = ElizaService.method.say; const mockedElizaTransport = mockEliza(); +const bigintTransport = mockBigInt(); + const elizaWithDelayTransport = mockEliza(undefined, true); describe("useQuery", () => { @@ -54,7 +56,7 @@ describe("useQuery", () => { it("can be disabled", () => { const { result } = renderHook( () => { - return useQuery(sayMethodDescriptor, disableQuery); + return useQuery(sayMethodDescriptor, skipToken); }, wrapper(undefined, mockedElizaTransport), ); @@ -63,15 +65,16 @@ describe("useQuery", () => { }); it("can be provided a custom transport", async () => { + const transport = mockEliza({ + sentence: "Intercepted!", + }); const { result } = renderHook( () => { return useQuery( sayMethodDescriptor, {}, { - transport: mockEliza({ - sentence: "Intercepted!", - }), + transport, }, ); }, @@ -92,7 +95,7 @@ describe("useQuery", () => { {}, { transport: elizaWithDelayTransport, - placeholderData: new sayMethodDescriptor.O({ + placeholderData: create(sayMethodDescriptor.output, { sentence: "placeholder!", }), }, @@ -124,7 +127,7 @@ describe("useQuery", () => { expect(result.current.data).toBe(6); }); - it("can be disabled without explicit disableQuery", () => { + it("can be disabled with enabled: false", () => { const { result } = renderHook( () => { return useQuery( @@ -145,7 +148,7 @@ describe("useQuery", () => { expect(result.current.isFetching).toBeFalsy(); }); - it("can be disabled with QueryClient default options", () => { + it("can be disabled with enabled: false in QueryClient default options", () => { const { result } = renderHook( () => { return useQuery(sayMethodDescriptor, { @@ -169,21 +172,12 @@ describe("useQuery", () => { expect(result.current.isFetching).toBeFalsy(); }); - it("cannot be enabled with QueryClient default options with explicit disableQuery", () => { + it("can be disabled with skipToken", () => { const { result } = renderHook( () => { - return useQuery(sayMethodDescriptor, disableQuery); + return useQuery(sayMethodDescriptor, skipToken); }, - wrapper( - { - defaultOptions: { - queries: { - enabled: true, - }, - }, - }, - mockedElizaTransport, - ), + wrapper({}, mockedElizaTransport), ); expect(result.current.data).toBeUndefined(); @@ -191,19 +185,43 @@ describe("useQuery", () => { expect(result.current.isFetching).toBeFalsy(); }); - it("disableQuery will override explicit enabled", () => { + it("supports schemas with bigint keys", async () => { const { result } = renderHook( () => { - return useQuery(sayMethodDescriptor, disableQuery, { - enabled: true, + return useQuery(BigIntService.method.count, { + add: 2n, }); }, - wrapper({}, mockedElizaTransport), + wrapper({}, bigintTransport), ); - expect(result.current.data).toBeUndefined(); - expect(result.current.isPending).toBeTruthy(); - expect(result.current.isFetching).toBeFalsy(); + await waitFor(() => { + expect(result.current.isSuccess).toBeTruthy(); + }); + + expect(result.current.data?.count).toBe(1n); + }); + + it("data can be fetched from cache", async () => { + const { queryClient, ...rest } = wrapper({}, bigintTransport); + const { result } = renderHook(() => { + return useQuery(BigIntService.method.count, {}); + }, rest); + + await waitFor(() => { + expect(result.current.isSuccess).toBeTruthy(); + }); + + expect( + queryClient.getQueryData( + createConnectQueryKey({ + schema: BigIntService.method.count, + input: {}, + transport: bigintTransport, + cardinality: "finite", + }), + ), + ).toBe(result.current.data); }); }); diff --git a/packages/connect-query/src/use-query.ts b/packages/connect-query/src/use-query.ts index c8f3b5ac..6db782dc 100644 --- a/packages/connect-query/src/use-query.ts +++ b/packages/connect-query/src/use-query.ts @@ -12,10 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -import type { Message, PartialMessage } from "@bufbuild/protobuf"; +import type { + DescMessage, + DescMethodUnary, + MessageInitShape, + MessageShape, +} from "@bufbuild/protobuf"; import type { ConnectError, Transport } from "@connectrpc/connect"; import type { + ConnectQueryKey, + SkipToken, +} from "@connectrpc/connect-query-core"; +import { createQueryOptions } from "@connectrpc/connect-query-core"; +import type { + UseQueryOptions as TanStackUseQueryOptions, UseQueryResult, + UseSuspenseQueryOptions as TanStackUseSuspenseQueryOptions, UseSuspenseQueryResult, } from "@tanstack/react-query"; import { @@ -23,77 +35,89 @@ import { useSuspenseQuery as tsUseSuspenseQuery, } from "@tanstack/react-query"; -import type { - CreateQueryOptions, - CreateSuspenseQueryOptions, -} from "./create-use-query-options.js"; -import { createUseQueryOptions } from "./create-use-query-options.js"; -import type { MethodUnaryDescriptor } from "./method-unary-descriptor.js"; import { useTransport } from "./use-transport.js"; -import type { DisableQuery } from "./utils.js"; + +/** + * Options for useQuery + */ +export type UseQueryOptions< + O extends DescMessage, + SelectOutData = MessageShape, +> = Omit< + TanStackUseQueryOptions< + MessageShape, + ConnectError, + SelectOutData, + ConnectQueryKey + >, + "queryFn" | "queryKey" +> & { + /** The transport to be used for the fetching. */ + transport?: Transport; +}; /** * Query the method provided. Maps to useQuery on tanstack/react-query */ export function useQuery< - I extends Message, - O extends Message, - SelectOutData = O, + I extends DescMessage, + O extends DescMessage, + SelectOutData = MessageShape, >( - methodSig: MethodUnaryDescriptor, - input?: DisableQuery | PartialMessage, - { - transport, - callOptions, - ...queryOptions - }: Omit, "transport"> & { - transport?: Transport; - } = {}, + schema: DescMethodUnary, + input?: SkipToken | MessageInitShape, + { transport, ...queryOptions }: UseQueryOptions = {}, ): UseQueryResult { const transportFromCtx = useTransport(); - const baseOptions = createUseQueryOptions(methodSig, input, { + const baseOptions = createQueryOptions(schema, input, { transport: transport ?? transportFromCtx, - callOptions, }); - const { enabled: baseEnabled, ...baseRest } = baseOptions; - const tsOpts = { + return tsUseQuery({ + ...baseOptions, ...queryOptions, - ...baseRest, - }; - // The query cannot be enabled if the base options are disabled, regardless of - // incoming query options. - const enabled = baseEnabled ?? queryOptions.enabled; - if (enabled !== undefined) { - tsOpts.enabled = enabled; - } - return tsUseQuery(tsOpts); + }); } +/** + * Options for useSuspenseQuery + */ +export type UseSuspenseQueryOptions< + O extends DescMessage, + SelectOutData = 0, +> = Omit< + TanStackUseSuspenseQueryOptions< + MessageShape, + ConnectError, + SelectOutData, + ConnectQueryKey + >, + "queryFn" | "queryKey" +> & { + /** The transport to be used for the fetching. */ + transport?: Transport; +}; + /** * Query the method provided. Maps to useSuspenseQuery on tanstack/react-query */ export function useSuspenseQuery< - I extends Message, - O extends Message, - SelectOutData = O, + I extends DescMessage, + O extends DescMessage, + SelectOutData = MessageShape, >( - methodSig: MethodUnaryDescriptor, - input?: PartialMessage, + schema: DescMethodUnary, + input?: MessageInitShape, { transport, - callOptions, ...queryOptions - }: Omit, "transport"> & { - transport?: Transport; - } = {}, + }: UseSuspenseQueryOptions = {}, ): UseSuspenseQueryResult { const transportFromCtx = useTransport(); - const baseOptions = createUseQueryOptions(methodSig, input, { + const baseOptions = createQueryOptions(schema, input, { transport: transport ?? transportFromCtx, - callOptions, }); return tsUseSuspenseQuery({ - ...queryOptions, ...baseOptions, + ...queryOptions, }); } diff --git a/packages/connect-query/src/use-transport.test.tsx b/packages/connect-query/src/use-transport.test.tsx index c19aa085..f84172a8 100644 --- a/packages/connect-query/src/use-transport.test.tsx +++ b/packages/connect-query/src/use-transport.test.tsx @@ -14,20 +14,15 @@ import { ConnectError } from "@connectrpc/connect"; import { renderHook, waitFor } from "@testing-library/react"; +import { mockBigInt } from "test-utils"; +import { ElizaService } from "test-utils/gen/eliza_pb.js"; import { describe, expect, it } from "vitest"; -import { ElizaService } from "./gen/eliza_connect.js"; -import { mockBigInt, wrapper } from "./test/test-utils.js"; +import { wrapper } from "./test/test-wrapper.js"; import { useQuery } from "./use-query.js"; import { TransportProvider, useTransport } from "./use-transport.js"; -const sayMethodDescriptor = { - ...ElizaService.methods.say, - localName: "Say", - service: { - typeName: ElizaService.typeName, - }, -}; +const sayMethodDescriptor = ElizaService.method.say; const error = new ConnectError( "To use Connect, you must provide a `Transport`: a simple object that handles `unary` and `stream` requests. `Transport` objects can easily be created by using `@connectrpc/connect-web`'s exports `createConnectTransport` and `createGrpcWebTransport`. see: https://connectrpc.com/docs/web/getting-started for more info.", diff --git a/packages/connect-query/src/utils.test.ts b/packages/connect-query/src/utils.test.ts deleted file mode 100644 index 2f0606ca..00000000 --- a/packages/connect-query/src/utils.test.ts +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import type { PartialMessage } from "@bufbuild/protobuf"; -import { describe, expect, expectTypeOf, it, vi } from "vitest"; - -import { BigIntService } from "./gen/eliza_connect.js"; -import type { CountResponse } from "./gen/eliza_pb.js"; -import { - assert, - createProtobufSafeUpdater, - isAbortController, -} from "./utils.js"; - -describe("assert", () => { - const message = "assertion message"; - it("throws on a false condition", () => { - expect(() => { - assert(false, message); - }).toThrow(`Invalid assertion: ${message}`); - }); - - it("does not throw on a true condition", () => { - expect(() => { - assert(true, message); - }).not.toThrow(); - }); -}); - -describe("isAbortController", () => { - it("returns false for non-objects", () => { - expect(isAbortController(true)).toBeFalsy(); - expect(isAbortController(false)).toBeFalsy(); - expect(isAbortController(0)).toBeFalsy(); - expect(isAbortController(1)).toBeFalsy(); - expect(isAbortController("a")).toBeFalsy(); - expect(isAbortController(undefined)).toBeFalsy(); - expect(isAbortController([])).toBeFalsy(); - expect(isAbortController(null)).toBeFalsy(); - }); - - it("returns false for objects missing the AbortController properties", () => { - expect(isAbortController({})).toBeFalsy(); - expect(isAbortController({ signal: undefined })).toBeFalsy(); - expect(isAbortController({ signal: null })).toBeFalsy(); - expect(isAbortController({ signal: {} })).toBeFalsy(); - expect(isAbortController({ signal: { aborted: undefined } })).toBeFalsy(); - expect(isAbortController({ signal: { aborted: true } })).toBeFalsy(); - expect( - isAbortController({ signal: { aborted: true }, abort: undefined }), - ).toBeFalsy(); - }); - - it("returns true for the two necessary AbortController properties", () => { - expect( - isAbortController({ - signal: { - aborted: false, - }, - abort: () => {}, - }), - ).toBeTruthy(); - - expect(isAbortController(new AbortController())).toBeTruthy(); - }); -}); - -describe("protobufSafeUpdater", () => { - const { count: methodInfo } = BigIntService.methods; - const input: PartialMessage = { - count: 1n, - }; - const wrappedInput = new methodInfo.O(input); - - const output: PartialMessage = { - count: 2n, - }; - const wrappedOutput = new methodInfo.O(output); - - it("handles a PartialMessage updater", () => { - const updater = output; - const safeUpdater = createProtobufSafeUpdater(methodInfo, updater); - - expectTypeOf(safeUpdater).toEqualTypeOf< - (prev?: CountResponse) => CountResponse - >(); - expect(typeof safeUpdater).toStrictEqual("function"); - - const result = safeUpdater(wrappedInput); - expectTypeOf(result).toEqualTypeOf(); - expect(result).not.toStrictEqual(wrappedInput); - - expectTypeOf(result.count).toEqualTypeOf(); - expect(wrappedInput.count).toStrictEqual(1n); - expect(result.count).toStrictEqual(2n); - expect(result).toStrictEqual(wrappedOutput); - expect(result).toHaveProperty("clone"); - }); - - it("handles a function updater", () => { - const updater = vi.fn(() => new methodInfo.O({ count: 2n })); - const safeUpdater = createProtobufSafeUpdater(methodInfo, updater); - - expectTypeOf(safeUpdater).toEqualTypeOf< - (prev?: CountResponse) => CountResponse - >(); - expect(typeof safeUpdater).toStrictEqual("function"); - - const result = safeUpdater(wrappedInput); - expect(updater).toHaveBeenCalledWith(input); - expectTypeOf(result).toEqualTypeOf(); - expect(result).not.toStrictEqual(wrappedInput); - - expectTypeOf(result.count).toEqualTypeOf(); - - expect(wrappedInput.count).toStrictEqual(1n); - expect(result.count).toStrictEqual(2n); - expect(result).toStrictEqual(wrappedOutput); - expect(result).toHaveProperty("clone"); - }); -}); diff --git a/packages/connect-query/vite.config.ts b/packages/connect-query/vite.config.ts index 18b51924..22b47189 100644 --- a/packages/connect-query/vite.config.ts +++ b/packages/connect-query/vite.config.ts @@ -20,7 +20,7 @@ export default defineConfig({ environment: "jsdom", typecheck: { enabled: true, - // Mofidied to typecheck definition files as well as source files + // Modified to typecheck definition files as well as source files include: ["**/*.{test,spec}?(-d).?(c|m)[jt]s?(x)"], }, coverage: { diff --git a/packages/protoc-gen-connect-query/.eslintignore b/packages/protoc-gen-connect-query/.eslintignore index 53c37a16..1b1f52fd 100644 --- a/packages/protoc-gen-connect-query/.eslintignore +++ b/packages/protoc-gen-connect-query/.eslintignore @@ -1 +1,4 @@ -dist \ No newline at end of file +dist +snapshots +.turbo +.type-dump diff --git a/packages/protoc-gen-connect-query/README.md b/packages/protoc-gen-connect-query/README.md index 59ca121c..3cb05548 100644 --- a/packages/protoc-gen-connect-query/README.md +++ b/packages/protoc-gen-connect-query/README.md @@ -11,10 +11,10 @@ - [Generated Output](#generated-output) - [Plugin options](#plugin-options) - [`target`](#target) - - [`import_extension=.js`](#import_extensionjs) + - [`import_extension`](#import_extension) - [`keep_empty_files=true`](#keep_empty_filestrue) - [`js_import_style`](#js_import_style) - - [`ts_nocheck=false`](#ts_nocheckfalse) + - [`ts_nocheck=true`](#ts_nochecktrue) - [Example Generated Code](#example-generated-code) The code generator for Connect-Query, a expansion pack for [TanStack Query](https://tanstack.com/query) (react-query), that enables effortless communication with servers that speak the [Connect Protocol](https://connectrpc.com/docs/protocol). @@ -74,14 +74,14 @@ This file creates an RPC service with the following: Add a new configuration file `buf.gen.yaml` ```yaml -version: v1 +version: v2 plugins: # This will invoke protoc-gen-es and write output to src/gen - - name: es + - local: protoc-gen-es out: src/gen opt: target=ts # This will invoke protoc-gen-connect-query - - name: connect-query + - local: protoc-gen-connect-query out: src/gen opt: target=ts ``` @@ -123,7 +123,7 @@ Add a line to the `scripts` section of your `package.json` to run `buf generate` ```json "scripts": { ... - "buf:generate": "npx @bufbuild/buf generate example.proto" + "buf:generate": "buf generate" }, ``` @@ -185,16 +185,13 @@ Multiple values can be given by separating them with `+`, for example `target=js By default, we generate JavaScript and TypeScript declaration files, which produces the smallest code size and is the most compatible with various bundler configurations. If you prefer to generate TypeScript, use `target=ts`. -### `import_extension=.js` +### `import_extension` -By default, [protoc-gen-connect-query](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-query) (and all other plugins based on [@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin)) uses a `.js` file extensions in import paths, even in TypeScript files. +By default, [protoc-gen-connect-query](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-query) (and all other plugins based on [@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin)) doesn't add file extensions to import paths. However, some environments require an import extension. For example, using ECMAScript modules in Node.js requires the `.js` extension, and Deno requires `.ts`. With this plugin option, you can add `.js`/`.ts` extensions in import paths with the given value. Possible values: -This is unintuitive, but necessary for [ECMAScript modules in Node.js](https://www.typescriptlang.org/docs/handbook/esm-node.html). - -Unfortunately, not all bundlers and tools have caught up yet, and Deno requires `.ts`. With this plugin option, you can replace `.js` extensions in import paths with the given value. For example, set - -- `import_extension=none` to remove the `.js` extension -- `import_extension=.ts` to replace the `.js` extension with `.ts` +- `import_extension=none`: Doesn't add an extension. (Default) +- `import_extension=js`: Adds the `.js` extension. +- `import_extension=ts`. Adds the `.ts` extension. ### `js_import_style` @@ -214,16 +211,9 @@ Possible values: This option exists for other plugins but is not applicable to `protoc-gen-connect-query` because, unlike most other plugins, it does not generate a maximum of one output file for every input proto file. Instead, it generates one output file per service. If you provide a valid proto file that contains no services, `protoc-gen-connect-query` will have no output. -### `ts_nocheck=false` - -By default, [protoc-gen-connect-query](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-query) -(and all other plugins based on [@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin)) -generate an annotation at the top of each file: `// @ts-nocheck`. +### `ts_nocheck=true` -We generate the annotation to support a wide range of compiler configurations and -future changes to the language. But there can be situations where the annotation -shadows an underlying problem, for example an unresolvable import. To remove -the annotation and to enable type checks, set the plugin option `ts_nocheck=false`. +[protoc-gen-connect-query](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-query) generates valid TypeScript for current versions of the TypeScript compiler with standard settings. If you use compiler settings that yield an error for generated code, setting this option generates an annotation at the top of each file to skip type checks: `// @ts-nocheck`. ## Example Generated Code diff --git a/packages/protoc-gen-connect-query/package.json b/packages/protoc-gen-connect-query/package.json index ef1c3b9a..958de0a3 100644 --- a/packages/protoc-gen-connect-query/package.json +++ b/packages/protoc-gen-connect-query/package.json @@ -1,6 +1,6 @@ { "name": "@connectrpc/protoc-gen-connect-query", - "version": "1.4.2", + "version": "2.0.0-rc.2", "description": "Code generator for connect-query", "license": "Apache-2.0", "sideEffects": false, @@ -22,25 +22,24 @@ "clean": "rm -rf dist", "build": "pnpm clean && tsc --project tsconfig.build.json", "format": "prettier . --write --ignore-path ./.eslintignore && eslint . --fix && license-header", - "generate": "rm -rf snapshots/gen* && cd snapshots && buf generate buf.build/connectrpc/eliza:8b8b971d6fde4dc8ba5d96f9fda7d53c", + "generate": "cd snapshots && buf generate", "test": "tsc --declaration --declarationDir .type-dump --emitDeclarationOnly" }, "preferUnplugged": true, "devDependencies": { - "@bufbuild/buf": "1.43.0", - "@bufbuild/protoc-gen-es": "^1.10.0", - "@connectrpc/connect": "^1.5.0", + "@bufbuild/buf": "1.46.0", + "@bufbuild/protoc-gen-es": "^2.2.1", + "@connectrpc/connect": "^2.0.0-rc.2", "@connectrpc/connect-query": "workspace:*", - "@connectrpc/protoc-gen-connect-es": "^1.5.0", "@tanstack/react-query": "^5.59.16", - "typescript": "^5.5.4" + "typescript": "^5.6.3" }, "dependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@bufbuild/protoplugin": "^1.10.0" + "@bufbuild/protobuf": "^2.2.1", + "@bufbuild/protoplugin": "^2.2.1" }, "peerDependencies": { - "@bufbuild/protoc-gen-es": "1.x" + "@bufbuild/protoc-gen-es": "2.x" }, "peerDependenciesMeta": { "@bufbuild/protoc-gen-es": { diff --git a/packages/protoc-gen-connect-query/snapshots/buf.gen.yaml b/packages/protoc-gen-connect-query/snapshots/buf.gen.yaml index 877ee203..2c823df5 100644 --- a/packages/protoc-gen-connect-query/snapshots/buf.gen.yaml +++ b/packages/protoc-gen-connect-query/snapshots/buf.gen.yaml @@ -1,32 +1,32 @@ -version: v1 +version: v2 +inputs: + - proto_file: test.proto +clean: true plugins: # js - - plugin: es + - local: protoc-gen-es out: gen_js - - plugin: connect-query - path: ../bin/protoc-gen-connect-query + - local: ../bin/protoc-gen-connect-query out: gen_js # cjs - - plugin: es + - local: protoc-gen-es out: gen_cjs opt: - js_import_style=legacy_commonjs - - plugin: connect-query - path: ../bin/protoc-gen-connect-query + - import_extension=js + - local: ../bin/protoc-gen-connect-query out: gen_cjs opt: - js_import_style=legacy_commonjs - - ts_nocheck=false # we only set this for our tests + - import_extension=js # ts - - plugin: es + - local: protoc-gen-es out: gen_ts opt: - target=ts - - plugin: connect-query - path: ../bin/protoc-gen-connect-query + - local: ../bin/protoc-gen-connect-query out: gen_ts opt: - target=ts - - ts_nocheck=false # we only set this for our tests diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts deleted file mode 100644 index 397187c0..00000000 --- a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-connect-query v1.4.2 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false" -// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ - -import { SayRequest, SayResponse } from "./eliza_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * Say is a unary RPC. Eliza responds to the prompt with a single sentence. - * - * @generated from rpc connectrpc.eliza.v1.ElizaService.Say - */ -export const say: { - readonly name: "Say"; - readonly I: typeof SayRequest; - readonly O: typeof SayResponse; - readonly kind: MethodKind.Unary; - readonly service: { - readonly typeName: "connectrpc.eliza.v1.ElizaService"; - }; -}; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js deleted file mode 100644 index f292e9c9..00000000 --- a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-connect-query v1.4.2 with parameter "js_import_style=legacy_commonjs,ts_nocheck=false" -// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ - -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); - -const { MethodKind } = require("@bufbuild/protobuf"); -const { SayRequest, SayResponse } = require("./eliza_pb.js"); - -/** - * Say is a unary RPC. Eliza responds to the prompt with a single sentence. - * - * @generated from rpc connectrpc.eliza.v1.ElizaService.Say - */ -const say = { - localName: "say", - name: "Say", - kind: MethodKind.Unary, - I: SayRequest, - O: SayResponse, - service: { - typeName: "connectrpc.eliza.v1.ElizaService", - }, -}; - -exports.say = say; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.d.ts deleted file mode 100644 index 5d0290ee..00000000 --- a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.d.ts +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.0 with parameter "js_import_style=legacy_commonjs" -// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * SayRequest is a single-sentence request. - * - * @generated from message connectrpc.eliza.v1.SayRequest - */ -export declare class SayRequest extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.SayRequest"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): SayRequest; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): SayRequest; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): SayRequest; - - static equals( - a: SayRequest | PlainMessage | undefined, - b: SayRequest | PlainMessage | undefined, - ): boolean; -} - -/** - * SayResponse is a single-sentence response. - * - * @generated from message connectrpc.eliza.v1.SayResponse - */ -export declare class SayResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.SayResponse"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): SayResponse; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): SayResponse; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): SayResponse; - - static equals( - a: SayResponse | PlainMessage | undefined, - b: SayResponse | PlainMessage | undefined, - ): boolean; -} - -/** - * ConverseRequest is a single sentence request sent as part of a - * back-and-forth conversation. - * - * @generated from message connectrpc.eliza.v1.ConverseRequest - */ -export declare class ConverseRequest extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.ConverseRequest"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): ConverseRequest; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): ConverseRequest; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): ConverseRequest; - - static equals( - a: ConverseRequest | PlainMessage | undefined, - b: ConverseRequest | PlainMessage | undefined, - ): boolean; -} - -/** - * ConverseResponse is a single sentence response sent in answer to a - * ConverseRequest. - * - * @generated from message connectrpc.eliza.v1.ConverseResponse - */ -export declare class ConverseResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.ConverseResponse"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): ConverseResponse; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): ConverseResponse; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): ConverseResponse; - - static equals( - a: ConverseResponse | PlainMessage | undefined, - b: ConverseResponse | PlainMessage | undefined, - ): boolean; -} - -/** - * IntroduceRequest asks Eliza to introduce itself to the named user. - * - * @generated from message connectrpc.eliza.v1.IntroduceRequest - */ -export declare class IntroduceRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.IntroduceRequest"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): IntroduceRequest; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): IntroduceRequest; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): IntroduceRequest; - - static equals( - a: IntroduceRequest | PlainMessage | undefined, - b: IntroduceRequest | PlainMessage | undefined, - ): boolean; -} - -/** - * IntroduceResponse is one sentence of Eliza's introductory monologue. - * - * @generated from message connectrpc.eliza.v1.IntroduceResponse - */ -export declare class IntroduceResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.IntroduceResponse"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): IntroduceResponse; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): IntroduceResponse; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): IntroduceResponse; - - static equals( - a: IntroduceResponse | PlainMessage | undefined, - b: IntroduceResponse | PlainMessage | undefined, - ): boolean; -} diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.js b/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.js deleted file mode 100644 index b43838db..00000000 --- a/packages/protoc-gen-connect-query/snapshots/gen_cjs/connectrpc/eliza/v1/eliza_pb.js +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.0 with parameter "js_import_style=legacy_commonjs" -// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); - -const { proto3 } = require("@bufbuild/protobuf"); - -/** - * SayRequest is a single-sentence request. - * - * @generated from message connectrpc.eliza.v1.SayRequest - */ -const SayRequest = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.SayRequest", - () => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * SayResponse is a single-sentence response. - * - * @generated from message connectrpc.eliza.v1.SayResponse - */ -const SayResponse = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.SayResponse", - () => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * ConverseRequest is a single sentence request sent as part of a - * back-and-forth conversation. - * - * @generated from message connectrpc.eliza.v1.ConverseRequest - */ -const ConverseRequest = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.ConverseRequest", - () => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * ConverseResponse is a single sentence response sent in answer to a - * ConverseRequest. - * - * @generated from message connectrpc.eliza.v1.ConverseResponse - */ -const ConverseResponse = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.ConverseResponse", - () => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * IntroduceRequest asks Eliza to introduce itself to the named user. - * - * @generated from message connectrpc.eliza.v1.IntroduceRequest - */ -const IntroduceRequest = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.IntroduceRequest", - () => [{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }], -); - -/** - * IntroduceResponse is one sentence of Eliza's introductory monologue. - * - * @generated from message connectrpc.eliza.v1.IntroduceResponse - */ -const IntroduceResponse = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.IntroduceResponse", - () => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -exports.SayRequest = SayRequest; -exports.SayResponse = SayResponse; -exports.ConverseRequest = ConverseRequest; -exports.ConverseResponse = ConverseResponse; -exports.IntroduceRequest = IntroduceRequest; -exports.IntroduceResponse = IntroduceResponse; diff --git a/examples/react/basic/src/gen/eliza-Slouch_connectquery.ts b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.d.ts similarity index 54% rename from examples/react/basic/src/gen/eliza-Slouch_connectquery.ts rename to packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.d.ts index bde023f9..aa7c3d0f 100644 --- a/examples/react/basic/src/gen/eliza-Slouch_connectquery.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.d.ts @@ -12,23 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=none,ts_nocheck=false" -// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) +// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "js_import_style=legacy_commonjs,import_extension=js" +// @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ -import { MethodKind } from "@bufbuild/protobuf"; -import { Nothing } from "./eliza_pb"; +import { SecondSnapshotService } from "./test_pb.js"; /** - * @generated from rpc connectrpc.eliza.v1.Slouch.Work + * @generated from rpc test.SecondSnapshotService.Foo */ -export const work = { - localName: "work", - name: "Work", - kind: MethodKind.Unary, - I: Nothing, - O: Nothing, - service: { - typeName: "connectrpc.eliza.v1.Slouch", - }, -} as const; +export const foo: typeof SecondSnapshotService["method"]["foo"]; diff --git a/examples/react/basic/src/gen/eliza-Haberdasher_connectquery.ts b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.js similarity index 54% rename from examples/react/basic/src/gen/eliza-Haberdasher_connectquery.ts rename to packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.js index 250f48db..928bcd9b 100644 --- a/examples/react/basic/src/gen/eliza-Haberdasher_connectquery.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.js @@ -12,23 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=none,ts_nocheck=false" -// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) +// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "js_import_style=legacy_commonjs,import_extension=js" +// @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ -import { MethodKind } from "@bufbuild/protobuf"; -import { Nothing } from "./eliza_pb"; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { SecondSnapshotService } = require("./test_pb.js"); /** - * @generated from rpc connectrpc.eliza.v1.Haberdasher.Work + * @generated from rpc test.SecondSnapshotService.Foo */ -export const work = { - localName: "work", - name: "Work", - kind: MethodKind.Unary, - I: Nothing, - O: Nothing, - service: { - typeName: "connectrpc.eliza.v1.Haberdasher", - }, -} as const; +const foo = SecondSnapshotService.method.foo; + +exports.foo = foo; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.d.ts new file mode 100644 index 00000000..e6cfcd7c --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.d.ts @@ -0,0 +1,37 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "js_import_style=legacy_commonjs,import_extension=js" +// @generated from file test.proto (package test, syntax proto3) +/* eslint-disable */ + +import { SnapshotService } from "./test_pb.js"; + +/** + * @generated from rpc test.SnapshotService.Foo + */ +export const foo: typeof SnapshotService["method"]["foo"]; +/** + * This RPC is deprecated + * + * @generated from rpc test.SnapshotService.Deprecated + * @deprecated + */ +export const deprecated: typeof SnapshotService["method"]["deprecated"]; +/** + * This RPC name is a reserved word in ECMAScript + * + * @generated from rpc test.SnapshotService.class + */ +export const class$: typeof SnapshotService["method"]["class"]; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.js new file mode 100644 index 00000000..7e2a116f --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.js @@ -0,0 +1,46 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "js_import_style=legacy_commonjs,import_extension=js" +// @generated from file test.proto (package test, syntax proto3) +/* eslint-disable */ + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { SnapshotService } = require("./test_pb.js"); + +/** + * @generated from rpc test.SnapshotService.Foo + */ +const foo = SnapshotService.method.foo; + +/** + * This RPC is deprecated + * + * @generated from rpc test.SnapshotService.Deprecated + * @deprecated + */ +const deprecated = SnapshotService.method.deprecated; + +/** + * This RPC name is a reserved word in ECMAScript + * + * @generated from rpc test.SnapshotService.class + */ +const class$ = SnapshotService.method.class; + +exports.foo = foo; +exports.deprecated = deprecated; +exports.class$ = class$; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test_pb.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test_pb.d.ts new file mode 100644 index 00000000..97d5b302 --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test_pb.d.ts @@ -0,0 +1,140 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "js_import_style=legacy_commonjs,import_extension=js" +// @generated from file test.proto (package test, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; +import type { Int32ValueSchema, StringValueSchema } from "@bufbuild/protobuf/wkt"; + +/** + * Describes the file test.proto. + */ +export declare const file_test: GenFile; + +/** + * @generated from message test.FooRequest + */ +export declare type FooRequest = Message<"test.FooRequest"> & { + /** + * @generated from field: int32 number = 1; + */ + number: number; +}; + +/** + * Describes the message test.FooRequest. + * Use `create(FooRequestSchema)` to create a new message. + */ +export declare const FooRequestSchema: GenMessage; + +/** + * @generated from message test.FooResponse + */ +export declare type FooResponse = Message<"test.FooResponse"> & { + /** + * @generated from field: string str = 1; + */ + str: string; +}; + +/** + * Describes the message test.FooResponse. + * Use `create(FooResponseSchema)` to create a new message. + */ +export declare const FooResponseSchema: GenMessage; + +/** + * @generated from service test.SnapshotService + */ +export declare const SnapshotService: GenService<{ + /** + * @generated from rpc test.SnapshotService.Foo + */ + foo: { + methodKind: "unary"; + input: typeof FooRequestSchema; + output: typeof FooResponseSchema; + }, + /** + * This RPC is deprecated + * + * @generated from rpc test.SnapshotService.Deprecated + * @deprecated + */ + deprecated: { + methodKind: "unary"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This streaming RPC should not be generated + * + * @generated from rpc test.SnapshotService.ClientStream + */ + clientStream: { + methodKind: "client_streaming"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This streaming RPC should not be generated + * + * @generated from rpc test.SnapshotService.ServerStream + */ + serverStream: { + methodKind: "server_streaming"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This streaming RPC should not be generated + * + * @generated from rpc test.SnapshotService.BidiStream + */ + bidiStream: { + methodKind: "bidi_streaming"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This RPC name is a reserved word in ECMAScript + * + * @generated from rpc test.SnapshotService.class + */ + class: { + methodKind: "unary"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, +}>; + +/** + * This service should be generated into a second file + * + * @generated from service test.SecondSnapshotService + */ +export declare const SecondSnapshotService: GenService<{ + /** + * @generated from rpc test.SecondSnapshotService.Foo + */ + foo: { + methodKind: "unary"; + input: typeof FooRequestSchema; + output: typeof FooResponseSchema; + }, +}>; + diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test_pb.js b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test_pb.js new file mode 100644 index 00000000..f58cd876 --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test_pb.js @@ -0,0 +1,64 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "js_import_style=legacy_commonjs,import_extension=js" +// @generated from file test.proto (package test, syntax proto3) +/* eslint-disable */ + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + +const { fileDesc, messageDesc, serviceDesc } = require("@bufbuild/protobuf/codegenv1"); +const { file_google_protobuf_wrappers } = require("@bufbuild/protobuf/wkt"); + +/** + * Describes the file test.proto. + */ +const file_test = /*@__PURE__*/ + fileDesc("Cgp0ZXN0LnByb3RvEgR0ZXN0IhwKCkZvb1JlcXVlc3QSDgoGbnVtYmVyGAEgASgFIhoKC0Zvb1Jlc3BvbnNlEgsKA3N0chgBIAEoCTK2AwoPU25hcHNob3RTZXJ2aWNlEioKA0ZvbxIQLnRlc3QuRm9vUmVxdWVzdBoRLnRlc3QuRm9vUmVzcG9uc2USTAoKRGVwcmVjYXRlZBIbLmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlGhwuZ29vZ2xlLnByb3RvYnVmLlN0cmluZ1ZhbHVlIgOIAgESSwoMQ2xpZW50U3RyZWFtEhsuZ29vZ2xlLnByb3RvYnVmLkludDMyVmFsdWUaHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWUoARJLCgxTZXJ2ZXJTdHJlYW0SGy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRocLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZTABEksKCkJpZGlTdHJlYW0SGy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRocLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZSgBMAESQgoFY2xhc3MSGy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRocLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZTJDChVTZWNvbmRTbmFwc2hvdFNlcnZpY2USKgoDRm9vEhAudGVzdC5Gb29SZXF1ZXN0GhEudGVzdC5Gb29SZXNwb25zZWIGcHJvdG8z", [file_google_protobuf_wrappers]); + +/** + * Describes the message test.FooRequest. + * Use `create(FooRequestSchema)` to create a new message. + */ +const FooRequestSchema = /*@__PURE__*/ + messageDesc(file_test, 0); + +/** + * Describes the message test.FooResponse. + * Use `create(FooResponseSchema)` to create a new message. + */ +const FooResponseSchema = /*@__PURE__*/ + messageDesc(file_test, 1); + +/** + * @generated from service test.SnapshotService + */ +const SnapshotService = /*@__PURE__*/ + serviceDesc(file_test, 0); + +/** + * This service should be generated into a second file + * + * @generated from service test.SecondSnapshotService + */ +const SecondSnapshotService = /*@__PURE__*/ + serviceDesc(file_test, 1); + + +exports.file_test = file_test; +exports.FooRequestSchema = FooRequestSchema; +exports.FooResponseSchema = FooResponseSchema; +exports.SnapshotService = SnapshotService; +exports.SecondSnapshotService = SecondSnapshotService; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts deleted file mode 100644 index cd946c2f..00000000 --- a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-connect-query v1.4.2 -// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { SayRequest, SayResponse } from "./eliza_pb.js"; -import { MethodKind } from "@bufbuild/protobuf"; - -/** - * Say is a unary RPC. Eliza responds to the prompt with a single sentence. - * - * @generated from rpc connectrpc.eliza.v1.ElizaService.Say - */ -export const say: { - readonly name: "Say"; - readonly I: typeof SayRequest; - readonly O: typeof SayResponse; - readonly kind: MethodKind.Unary; - readonly service: { - readonly typeName: "connectrpc.eliza.v1.ElizaService"; - }; -}; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.d.ts deleted file mode 100644 index 2e2b2a62..00000000 --- a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.d.ts +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.0 -// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * SayRequest is a single-sentence request. - * - * @generated from message connectrpc.eliza.v1.SayRequest - */ -export declare class SayRequest extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.SayRequest"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): SayRequest; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): SayRequest; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): SayRequest; - - static equals( - a: SayRequest | PlainMessage | undefined, - b: SayRequest | PlainMessage | undefined, - ): boolean; -} - -/** - * SayResponse is a single-sentence response. - * - * @generated from message connectrpc.eliza.v1.SayResponse - */ -export declare class SayResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.SayResponse"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): SayResponse; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): SayResponse; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): SayResponse; - - static equals( - a: SayResponse | PlainMessage | undefined, - b: SayResponse | PlainMessage | undefined, - ): boolean; -} - -/** - * ConverseRequest is a single sentence request sent as part of a - * back-and-forth conversation. - * - * @generated from message connectrpc.eliza.v1.ConverseRequest - */ -export declare class ConverseRequest extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.ConverseRequest"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): ConverseRequest; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): ConverseRequest; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): ConverseRequest; - - static equals( - a: ConverseRequest | PlainMessage | undefined, - b: ConverseRequest | PlainMessage | undefined, - ): boolean; -} - -/** - * ConverseResponse is a single sentence response sent in answer to a - * ConverseRequest. - * - * @generated from message connectrpc.eliza.v1.ConverseResponse - */ -export declare class ConverseResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.ConverseResponse"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): ConverseResponse; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): ConverseResponse; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): ConverseResponse; - - static equals( - a: ConverseResponse | PlainMessage | undefined, - b: ConverseResponse | PlainMessage | undefined, - ): boolean; -} - -/** - * IntroduceRequest asks Eliza to introduce itself to the named user. - * - * @generated from message connectrpc.eliza.v1.IntroduceRequest - */ -export declare class IntroduceRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.IntroduceRequest"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): IntroduceRequest; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): IntroduceRequest; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): IntroduceRequest; - - static equals( - a: IntroduceRequest | PlainMessage | undefined, - b: IntroduceRequest | PlainMessage | undefined, - ): boolean; -} - -/** - * IntroduceResponse is one sentence of Eliza's introductory monologue. - * - * @generated from message connectrpc.eliza.v1.IntroduceResponse - */ -export declare class IntroduceResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "connectrpc.eliza.v1.IntroduceResponse"; - static readonly fields: FieldList; - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): IntroduceResponse; - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): IntroduceResponse; - - static fromJsonString( - jsonString: string, - options?: Partial, - ): IntroduceResponse; - - static equals( - a: IntroduceResponse | PlainMessage | undefined, - b: IntroduceResponse | PlainMessage | undefined, - ): boolean; -} diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.js b/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.js deleted file mode 100644 index ba151f6f..00000000 --- a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza_pb.js +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.0 -// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * SayRequest is a single-sentence request. - * - * @generated from message connectrpc.eliza.v1.SayRequest - */ -export const SayRequest = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.SayRequest", - () => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * SayResponse is a single-sentence response. - * - * @generated from message connectrpc.eliza.v1.SayResponse - */ -export const SayResponse = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.SayResponse", - () => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * ConverseRequest is a single sentence request sent as part of a - * back-and-forth conversation. - * - * @generated from message connectrpc.eliza.v1.ConverseRequest - */ -export const ConverseRequest = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.ConverseRequest", - () => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * ConverseResponse is a single sentence response sent in answer to a - * ConverseRequest. - * - * @generated from message connectrpc.eliza.v1.ConverseResponse - */ -export const ConverseResponse = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.ConverseResponse", - () => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * IntroduceRequest asks Eliza to introduce itself to the named user. - * - * @generated from message connectrpc.eliza.v1.IntroduceRequest - */ -export const IntroduceRequest = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.IntroduceRequest", - () => [{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }], -); - -/** - * IntroduceResponse is one sentence of Eliza's introductory monologue. - * - * @generated from message connectrpc.eliza.v1.IntroduceResponse - */ -export const IntroduceResponse = /*@__PURE__*/ proto3.makeMessageType( - "connectrpc.eliza.v1.IntroduceResponse", - () => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); diff --git a/examples/react/basic/src/gen/eliza-PaginatedService_connectquery.ts b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.d.ts similarity index 52% rename from examples/react/basic/src/gen/eliza-PaginatedService_connectquery.ts rename to packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.d.ts index 3deaa4ed..05ab2b8d 100644 --- a/examples/react/basic/src/gen/eliza-PaginatedService_connectquery.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.d.ts @@ -12,23 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=none,ts_nocheck=false" -// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) +// @generated by protoc-gen-connect-query v2.0.0-rc.2 +// @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ -import { MethodKind } from "@bufbuild/protobuf"; -import { ListRequest, ListResponse } from "./eliza_pb"; +import { SecondSnapshotService } from "./test_pb"; /** - * @generated from rpc connectrpc.eliza.v1.PaginatedService.List + * @generated from rpc test.SecondSnapshotService.Foo */ -export const list = { - localName: "list", - name: "List", - kind: MethodKind.Unary, - I: ListRequest, - O: ListResponse, - service: { - typeName: "connectrpc.eliza.v1.PaginatedService", - }, -} as const; +export const foo: typeof SecondSnapshotService["method"]["foo"]; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.js new file mode 100644 index 00000000..77e3214a --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.js @@ -0,0 +1,24 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-connect-query v2.0.0-rc.2 +// @generated from file test.proto (package test, syntax proto3) +/* eslint-disable */ + +import { SecondSnapshotService } from "./test_pb"; + +/** + * @generated from rpc test.SecondSnapshotService.Foo + */ +export const foo = SecondSnapshotService.method.foo; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.d.ts new file mode 100644 index 00000000..8c7e8a2c --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.d.ts @@ -0,0 +1,37 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-connect-query v2.0.0-rc.2 +// @generated from file test.proto (package test, syntax proto3) +/* eslint-disable */ + +import { SnapshotService } from "./test_pb"; + +/** + * @generated from rpc test.SnapshotService.Foo + */ +export const foo: typeof SnapshotService["method"]["foo"]; +/** + * This RPC is deprecated + * + * @generated from rpc test.SnapshotService.Deprecated + * @deprecated + */ +export const deprecated: typeof SnapshotService["method"]["deprecated"]; +/** + * This RPC name is a reserved word in ECMAScript + * + * @generated from rpc test.SnapshotService.class + */ +export const class$: typeof SnapshotService["method"]["class"]; diff --git a/examples/react/basic/src/gen/eliza-BigIntService_connectquery.ts b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.js similarity index 51% rename from examples/react/basic/src/gen/eliza-BigIntService_connectquery.ts rename to packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.js index f480d9f5..4993bac2 100644 --- a/examples/react/basic/src/gen/eliza-BigIntService_connectquery.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.js @@ -12,23 +12,28 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,import_extension=none,ts_nocheck=false" -// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) +// @generated by protoc-gen-connect-query v2.0.0-rc.2 +// @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ -import { MethodKind } from "@bufbuild/protobuf"; -import { CountRequest, CountResponse } from "./eliza_pb"; +import { SnapshotService } from "./test_pb"; /** - * @generated from rpc connectrpc.eliza.v1.BigIntService.Count + * @generated from rpc test.SnapshotService.Foo */ -export const count = { - localName: "count", - name: "Count", - kind: MethodKind.Unary, - I: CountRequest, - O: CountResponse, - service: { - typeName: "connectrpc.eliza.v1.BigIntService", - }, -} as const; +export const foo = SnapshotService.method.foo; + +/** + * This RPC is deprecated + * + * @generated from rpc test.SnapshotService.Deprecated + * @deprecated + */ +export const deprecated = SnapshotService.method.deprecated; + +/** + * This RPC name is a reserved word in ECMAScript + * + * @generated from rpc test.SnapshotService.class + */ +export const class$ = SnapshotService.method.class; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/test_pb.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_js/test_pb.d.ts new file mode 100644 index 00000000..687cb2b2 --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/test_pb.d.ts @@ -0,0 +1,140 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 +// @generated from file test.proto (package test, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; +import type { Int32ValueSchema, StringValueSchema } from "@bufbuild/protobuf/wkt"; + +/** + * Describes the file test.proto. + */ +export declare const file_test: GenFile; + +/** + * @generated from message test.FooRequest + */ +export declare type FooRequest = Message<"test.FooRequest"> & { + /** + * @generated from field: int32 number = 1; + */ + number: number; +}; + +/** + * Describes the message test.FooRequest. + * Use `create(FooRequestSchema)` to create a new message. + */ +export declare const FooRequestSchema: GenMessage; + +/** + * @generated from message test.FooResponse + */ +export declare type FooResponse = Message<"test.FooResponse"> & { + /** + * @generated from field: string str = 1; + */ + str: string; +}; + +/** + * Describes the message test.FooResponse. + * Use `create(FooResponseSchema)` to create a new message. + */ +export declare const FooResponseSchema: GenMessage; + +/** + * @generated from service test.SnapshotService + */ +export declare const SnapshotService: GenService<{ + /** + * @generated from rpc test.SnapshotService.Foo + */ + foo: { + methodKind: "unary"; + input: typeof FooRequestSchema; + output: typeof FooResponseSchema; + }, + /** + * This RPC is deprecated + * + * @generated from rpc test.SnapshotService.Deprecated + * @deprecated + */ + deprecated: { + methodKind: "unary"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This streaming RPC should not be generated + * + * @generated from rpc test.SnapshotService.ClientStream + */ + clientStream: { + methodKind: "client_streaming"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This streaming RPC should not be generated + * + * @generated from rpc test.SnapshotService.ServerStream + */ + serverStream: { + methodKind: "server_streaming"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This streaming RPC should not be generated + * + * @generated from rpc test.SnapshotService.BidiStream + */ + bidiStream: { + methodKind: "bidi_streaming"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This RPC name is a reserved word in ECMAScript + * + * @generated from rpc test.SnapshotService.class + */ + class: { + methodKind: "unary"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, +}>; + +/** + * This service should be generated into a second file + * + * @generated from service test.SecondSnapshotService + */ +export declare const SecondSnapshotService: GenService<{ + /** + * @generated from rpc test.SecondSnapshotService.Foo + */ + foo: { + methodKind: "unary"; + input: typeof FooRequestSchema; + output: typeof FooResponseSchema; + }, +}>; + diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/test_pb.js b/packages/protoc-gen-connect-query/snapshots/gen_js/test_pb.js new file mode 100644 index 00000000..6fd9e9d7 --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/test_pb.js @@ -0,0 +1,55 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 +// @generated from file test.proto (package test, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_google_protobuf_wrappers } from "@bufbuild/protobuf/wkt"; + +/** + * Describes the file test.proto. + */ +export const file_test = /*@__PURE__*/ + fileDesc("Cgp0ZXN0LnByb3RvEgR0ZXN0IhwKCkZvb1JlcXVlc3QSDgoGbnVtYmVyGAEgASgFIhoKC0Zvb1Jlc3BvbnNlEgsKA3N0chgBIAEoCTK2AwoPU25hcHNob3RTZXJ2aWNlEioKA0ZvbxIQLnRlc3QuRm9vUmVxdWVzdBoRLnRlc3QuRm9vUmVzcG9uc2USTAoKRGVwcmVjYXRlZBIbLmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlGhwuZ29vZ2xlLnByb3RvYnVmLlN0cmluZ1ZhbHVlIgOIAgESSwoMQ2xpZW50U3RyZWFtEhsuZ29vZ2xlLnByb3RvYnVmLkludDMyVmFsdWUaHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWUoARJLCgxTZXJ2ZXJTdHJlYW0SGy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRocLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZTABEksKCkJpZGlTdHJlYW0SGy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRocLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZSgBMAESQgoFY2xhc3MSGy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRocLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZTJDChVTZWNvbmRTbmFwc2hvdFNlcnZpY2USKgoDRm9vEhAudGVzdC5Gb29SZXF1ZXN0GhEudGVzdC5Gb29SZXNwb25zZWIGcHJvdG8z", [file_google_protobuf_wrappers]); + +/** + * Describes the message test.FooRequest. + * Use `create(FooRequestSchema)` to create a new message. + */ +export const FooRequestSchema = /*@__PURE__*/ + messageDesc(file_test, 0); + +/** + * Describes the message test.FooResponse. + * Use `create(FooResponseSchema)` to create a new message. + */ +export const FooResponseSchema = /*@__PURE__*/ + messageDesc(file_test, 1); + +/** + * @generated from service test.SnapshotService + */ +export const SnapshotService = /*@__PURE__*/ + serviceDesc(file_test, 0); + +/** + * This service should be generated into a second file + * + * @generated from service test.SecondSnapshotService + */ +export const SecondSnapshotService = /*@__PURE__*/ + serviceDesc(file_test, 1); + diff --git a/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts b/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts deleted file mode 100644 index 7ecb14d5..00000000 --- a/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza-ElizaService_connectquery.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-connect-query v1.4.2 with parameter "target=ts,ts_nocheck=false" -// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ - -import { MethodKind } from "@bufbuild/protobuf"; -import { SayRequest, SayResponse } from "./eliza_pb.js"; - -/** - * Say is a unary RPC. Eliza responds to the prompt with a single sentence. - * - * @generated from rpc connectrpc.eliza.v1.ElizaService.Say - */ -export const say = { - localName: "say", - name: "Say", - kind: MethodKind.Unary, - I: SayRequest, - O: SayResponse, - service: { - typeName: "connectrpc.eliza.v1.ElizaService", - }, -} as const; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza_pb.ts b/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza_pb.ts deleted file mode 100644 index 05f035d4..00000000 --- a/packages/protoc-gen-connect-query/snapshots/gen_ts/connectrpc/eliza/v1/eliza_pb.ts +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright 2021-2023 The Connect Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// @generated by protoc-gen-es v1.10.0 with parameter "target=ts" -// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { - BinaryReadOptions, - FieldList, - JsonReadOptions, - JsonValue, - PartialMessage, - PlainMessage, -} from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; - -/** - * SayRequest is a single-sentence request. - * - * @generated from message connectrpc.eliza.v1.SayRequest - */ -export class SayRequest extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.SayRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): SayRequest { - return new SayRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): SayRequest { - return new SayRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): SayRequest { - return new SayRequest().fromJsonString(jsonString, options); - } - - static equals( - a: SayRequest | PlainMessage | undefined, - b: SayRequest | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(SayRequest, a, b); - } -} - -/** - * SayResponse is a single-sentence response. - * - * @generated from message connectrpc.eliza.v1.SayResponse - */ -export class SayResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.SayResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): SayResponse { - return new SayResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): SayResponse { - return new SayResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): SayResponse { - return new SayResponse().fromJsonString(jsonString, options); - } - - static equals( - a: SayResponse | PlainMessage | undefined, - b: SayResponse | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(SayResponse, a, b); - } -} - -/** - * ConverseRequest is a single sentence request sent as part of a - * back-and-forth conversation. - * - * @generated from message connectrpc.eliza.v1.ConverseRequest - */ -export class ConverseRequest extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.ConverseRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): ConverseRequest { - return new ConverseRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): ConverseRequest { - return new ConverseRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): ConverseRequest { - return new ConverseRequest().fromJsonString(jsonString, options); - } - - static equals( - a: ConverseRequest | PlainMessage | undefined, - b: ConverseRequest | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(ConverseRequest, a, b); - } -} - -/** - * ConverseResponse is a single sentence response sent in answer to a - * ConverseRequest. - * - * @generated from message connectrpc.eliza.v1.ConverseResponse - */ -export class ConverseResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.ConverseResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): ConverseResponse { - return new ConverseResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): ConverseResponse { - return new ConverseResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): ConverseResponse { - return new ConverseResponse().fromJsonString(jsonString, options); - } - - static equals( - a: ConverseResponse | PlainMessage | undefined, - b: ConverseResponse | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(ConverseResponse, a, b); - } -} - -/** - * IntroduceRequest asks Eliza to introduce itself to the named user. - * - * @generated from message connectrpc.eliza.v1.IntroduceRequest - */ -export class IntroduceRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.IntroduceRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): IntroduceRequest { - return new IntroduceRequest().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): IntroduceRequest { - return new IntroduceRequest().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): IntroduceRequest { - return new IntroduceRequest().fromJsonString(jsonString, options); - } - - static equals( - a: IntroduceRequest | PlainMessage | undefined, - b: IntroduceRequest | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(IntroduceRequest, a, b); - } -} - -/** - * IntroduceResponse is one sentence of Eliza's introductory monologue. - * - * @generated from message connectrpc.eliza.v1.IntroduceResponse - */ -export class IntroduceResponse extends Message { - /** - * @generated from field: string sentence = 1; - */ - sentence = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "connectrpc.eliza.v1.IntroduceResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "sentence", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): IntroduceResponse { - return new IntroduceResponse().fromBinary(bytes, options); - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): IntroduceResponse { - return new IntroduceResponse().fromJson(jsonValue, options); - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): IntroduceResponse { - return new IntroduceResponse().fromJsonString(jsonString, options); - } - - static equals( - a: IntroduceResponse | PlainMessage | undefined, - b: IntroduceResponse | PlainMessage | undefined, - ): boolean { - return proto3.util.equals(IntroduceResponse, a, b); - } -} diff --git a/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SecondSnapshotService_connectquery.ts b/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SecondSnapshotService_connectquery.ts new file mode 100644 index 00000000..a117c67e --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SecondSnapshotService_connectquery.ts @@ -0,0 +1,24 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "target=ts" +// @generated from file test.proto (package test, syntax proto3) +/* eslint-disable */ + +import { SecondSnapshotService } from "./test_pb"; + +/** + * @generated from rpc test.SecondSnapshotService.Foo + */ +export const foo = SecondSnapshotService.method.foo; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SnapshotService_connectquery.ts similarity index 50% rename from packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js rename to packages/protoc-gen-connect-query/snapshots/gen_ts/test-SnapshotService_connectquery.ts index bfc88c5f..cebcd7d5 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_js/connectrpc/eliza/v1/eliza-ElizaService_connectquery.js +++ b/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SnapshotService_connectquery.ts @@ -12,26 +12,28 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v1.4.2 -// @generated from file connectrpc/eliza/v1/eliza.proto (package connectrpc.eliza.v1, syntax proto3) +// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "target=ts" +// @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ -// @ts-nocheck -import { MethodKind } from "@bufbuild/protobuf"; -import { SayRequest, SayResponse } from "./eliza_pb.js"; +import { SnapshotService } from "./test_pb"; /** - * Say is a unary RPC. Eliza responds to the prompt with a single sentence. + * @generated from rpc test.SnapshotService.Foo + */ +export const foo = SnapshotService.method.foo; + +/** + * This RPC is deprecated + * + * @generated from rpc test.SnapshotService.Deprecated + * @deprecated + */ +export const deprecated = SnapshotService.method.deprecated; + +/** + * This RPC name is a reserved word in ECMAScript * - * @generated from rpc connectrpc.eliza.v1.ElizaService.Say + * @generated from rpc test.SnapshotService.class */ -export const say = { - localName: "say", - name: "Say", - kind: MethodKind.Unary, - I: SayRequest, - O: SayResponse, - service: { - typeName: "connectrpc.eliza.v1.ElizaService", - }, -}; +export const class$ = SnapshotService.method.class; diff --git a/packages/protoc-gen-connect-query/snapshots/gen_ts/test_pb.ts b/packages/protoc-gen-connect-query/snapshots/gen_ts/test_pb.ts new file mode 100644 index 00000000..ae3ca57a --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/gen_ts/test_pb.ts @@ -0,0 +1,147 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "target=ts" +// @generated from file test.proto (package test, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Int32ValueSchema, StringValueSchema } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_wrappers } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file test.proto. + */ +export const file_test: GenFile = /*@__PURE__*/ + fileDesc("Cgp0ZXN0LnByb3RvEgR0ZXN0IhwKCkZvb1JlcXVlc3QSDgoGbnVtYmVyGAEgASgFIhoKC0Zvb1Jlc3BvbnNlEgsKA3N0chgBIAEoCTK2AwoPU25hcHNob3RTZXJ2aWNlEioKA0ZvbxIQLnRlc3QuRm9vUmVxdWVzdBoRLnRlc3QuRm9vUmVzcG9uc2USTAoKRGVwcmVjYXRlZBIbLmdvb2dsZS5wcm90b2J1Zi5JbnQzMlZhbHVlGhwuZ29vZ2xlLnByb3RvYnVmLlN0cmluZ1ZhbHVlIgOIAgESSwoMQ2xpZW50U3RyZWFtEhsuZ29vZ2xlLnByb3RvYnVmLkludDMyVmFsdWUaHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWUoARJLCgxTZXJ2ZXJTdHJlYW0SGy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRocLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZTABEksKCkJpZGlTdHJlYW0SGy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRocLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZSgBMAESQgoFY2xhc3MSGy5nb29nbGUucHJvdG9idWYuSW50MzJWYWx1ZRocLmdvb2dsZS5wcm90b2J1Zi5TdHJpbmdWYWx1ZTJDChVTZWNvbmRTbmFwc2hvdFNlcnZpY2USKgoDRm9vEhAudGVzdC5Gb29SZXF1ZXN0GhEudGVzdC5Gb29SZXNwb25zZWIGcHJvdG8z", [file_google_protobuf_wrappers]); + +/** + * @generated from message test.FooRequest + */ +export type FooRequest = Message<"test.FooRequest"> & { + /** + * @generated from field: int32 number = 1; + */ + number: number; +}; + +/** + * Describes the message test.FooRequest. + * Use `create(FooRequestSchema)` to create a new message. + */ +export const FooRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_test, 0); + +/** + * @generated from message test.FooResponse + */ +export type FooResponse = Message<"test.FooResponse"> & { + /** + * @generated from field: string str = 1; + */ + str: string; +}; + +/** + * Describes the message test.FooResponse. + * Use `create(FooResponseSchema)` to create a new message. + */ +export const FooResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_test, 1); + +/** + * @generated from service test.SnapshotService + */ +export const SnapshotService: GenService<{ + /** + * @generated from rpc test.SnapshotService.Foo + */ + foo: { + methodKind: "unary"; + input: typeof FooRequestSchema; + output: typeof FooResponseSchema; + }, + /** + * This RPC is deprecated + * + * @generated from rpc test.SnapshotService.Deprecated + * @deprecated + */ + deprecated: { + methodKind: "unary"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This streaming RPC should not be generated + * + * @generated from rpc test.SnapshotService.ClientStream + */ + clientStream: { + methodKind: "client_streaming"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This streaming RPC should not be generated + * + * @generated from rpc test.SnapshotService.ServerStream + */ + serverStream: { + methodKind: "server_streaming"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This streaming RPC should not be generated + * + * @generated from rpc test.SnapshotService.BidiStream + */ + bidiStream: { + methodKind: "bidi_streaming"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, + /** + * This RPC name is a reserved word in ECMAScript + * + * @generated from rpc test.SnapshotService.class + */ + class: { + methodKind: "unary"; + input: typeof Int32ValueSchema; + output: typeof StringValueSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_test, 0); + +/** + * This service should be generated into a second file + * + * @generated from service test.SecondSnapshotService + */ +export const SecondSnapshotService: GenService<{ + /** + * @generated from rpc test.SecondSnapshotService.Foo + */ + foo: { + methodKind: "unary"; + input: typeof FooRequestSchema; + output: typeof FooResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_test, 1); + diff --git a/packages/protoc-gen-connect-query/snapshots/test.proto b/packages/protoc-gen-connect-query/snapshots/test.proto new file mode 100644 index 00000000..24930fe7 --- /dev/null +++ b/packages/protoc-gen-connect-query/snapshots/test.proto @@ -0,0 +1,53 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package test; + +import "google/protobuf/wrappers.proto"; + +service SnapshotService { + rpc Foo(FooRequest) returns (FooResponse); + + // This RPC is deprecated + rpc Deprecated(google.protobuf.Int32Value) returns (google.protobuf.StringValue) { + option deprecated = true; + }; + + // This streaming RPC should not be generated + rpc ClientStream(stream google.protobuf.Int32Value) returns (google.protobuf.StringValue); + + // This streaming RPC should not be generated + rpc ServerStream(google.protobuf.Int32Value) returns (stream google.protobuf.StringValue); + + // This streaming RPC should not be generated + rpc BidiStream(stream google.protobuf.Int32Value) returns (stream google.protobuf.StringValue); + + // This RPC name is a reserved word in ECMAScript + rpc class(google.protobuf.Int32Value) returns (google.protobuf.StringValue); +} + +// This service should be generated into a second file +service SecondSnapshotService { + rpc Foo(FooRequest) returns (FooResponse); +} + +message FooRequest { + int32 number = 1; +} + +message FooResponse { + string str = 1; +} diff --git a/packages/protoc-gen-connect-query/src/generateDts.ts b/packages/protoc-gen-connect-query/src/generateDts.ts index 92038b3c..a388dbe9 100644 --- a/packages/protoc-gen-connect-query/src/generateDts.ts +++ b/packages/protoc-gen-connect-query/src/generateDts.ts @@ -13,45 +13,30 @@ // limitations under the License. import type { DescFile, DescService } from "@bufbuild/protobuf"; -import { codegenInfo, MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; -import type { Schema } from "@bufbuild/protoplugin/ecmascript"; -import { localName } from "@bufbuild/protoplugin/ecmascript"; +import type { Schema } from "@bufbuild/protoplugin"; +import { safeIdentifier } from "@bufbuild/protoplugin"; import type { PluginInit } from "./utils.js"; -const { safeIdentifier } = codegenInfo; - // prettier-ignore /** * Handles generating a TypeScript Declaration file for a given Schema, DescFile (protobuf definition) and protobuf Service. */ const generateServiceFile = (schema: Schema, protoFile: DescFile) => (service: DescService) => { - const { MethodKind: rtMethodKind, MethodIdempotency: rtMethodIdempotency } = schema.runtime; - + const f = schema.generateFile( - `${protoFile.name}-${localName(service)}_connectquery.d.ts`, + `${protoFile.name}-${service.name}_connectquery.d.ts`, ); f.preamble(protoFile); service.methods.forEach((method) => { switch (method.methodKind) { - case MethodKind.Unary: + case "unary": { f.print(f.jsDoc(method)); - f.print(f.exportDecl("const", safeIdentifier(localName(method))), ": {"); - f.print(" readonly name: ", f.string(method.name), ","); - f.print(" readonly I: typeof ", method.input, ","); - f.print(" readonly O: typeof ", method.output, ","); - f.print(" readonly kind: ", rtMethodKind, ".", MethodKind[method.methodKind], ","); - if (method.idempotency !== undefined) { - f.print(" readonly idempotency: ", rtMethodIdempotency, ".", MethodIdempotency[method.idempotency], ","); - } - f.print(" readonly service: {"); - f.print(" readonly typeName: ", f.string(service.typeName)); - f.print(" }"); - f.print("};") + f.print(f.export("const", safeIdentifier(method.localName)), ": typeof ", f.importSchema(service), '["method"]["', method.localName, '"];'); } break; diff --git a/packages/protoc-gen-connect-query/src/generateTs.ts b/packages/protoc-gen-connect-query/src/generateTs.ts index b28baeb3..26e3c7d4 100644 --- a/packages/protoc-gen-connect-query/src/generateTs.ts +++ b/packages/protoc-gen-connect-query/src/generateTs.ts @@ -13,14 +13,11 @@ // limitations under the License. import type { DescFile, DescService } from "@bufbuild/protobuf"; -import { codegenInfo, MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; -import type { Schema } from "@bufbuild/protoplugin/ecmascript"; -import { localName } from "@bufbuild/protoplugin/ecmascript"; +import type { Schema } from "@bufbuild/protoplugin"; +import { safeIdentifier } from "@bufbuild/protoplugin"; import type { PluginInit } from "./utils.js"; -const { safeIdentifier } = codegenInfo; - // prettier-ignore /** * Handles generating a source code file for a given Schema, DescFile (protobuf definition) and protobuf Service. @@ -30,33 +27,16 @@ const { safeIdentifier } = codegenInfo; const generateServiceFile = (schema: Schema, protoFile: DescFile, extension: 'js' | 'ts') => (service: DescService) => { - const isTs = extension === "ts"; const f = schema.generateFile( - `${protoFile.name}-${localName(service)}_connectquery.${extension}`, + `${protoFile.name}-${service.name}_connectquery.${extension}`, ); f.preamble(protoFile); - const { MethodKind: rtMethodKind, MethodIdempotency: rtMethodIdempotency } = - schema.runtime; - service.methods - .filter((method) => method.methodKind === MethodKind.Unary) + .filter((method) => method.methodKind === "unary") .forEach((method, index, filteredMethods) => { f.print(f.jsDoc(method)); - f.print(f.exportDecl("const", safeIdentifier(localName(method))), " = {"); - f.print(" localName: ",f.string(localName(method)), ","); - f.print(" name: ", f.string(method.name), ","); - f.print(" kind: ", rtMethodKind, ".", MethodKind[method.methodKind], ","); - f.print(" I: ", method.input, ","); - f.print(" O: ", method.output, ","); - if (method.idempotency !== undefined) { - f.print(" idempotency: ", rtMethodIdempotency, ".", MethodIdempotency[method.idempotency], ","); - } - f.print(" service: {"); - f.print(" typeName: ", f.string(service.typeName)); - f.print(" }"); - f.print("}", isTs ? " as const" : "", ";"); - + f.print(f.export("const", safeIdentifier(method.localName)), " = ", f.importSchema(service), ".method.", method.localName, ";"); const lastIndex = index === filteredMethods.length - 1; if (!lastIndex) { f.print(); diff --git a/packages/test-utils/buf.gen.yaml b/packages/test-utils/buf.gen.yaml new file mode 100644 index 00000000..ee896147 --- /dev/null +++ b/packages/test-utils/buf.gen.yaml @@ -0,0 +1,12 @@ +# buf.gen.yaml defines a local generation template. +# For details, see https://buf.build/docs/configuration/v2/buf-gen-yaml +version: v2 +inputs: + - directory: proto +# Deletes the directories specified in the `out` field for all plugins before running code generation. +clean: true +plugins: + - local: protoc-gen-es + out: gen + opt: + - target=dts+js diff --git a/packages/test-utils/gen/bigint_pb.d.ts b/packages/test-utils/gen/bigint_pb.d.ts new file mode 100644 index 00000000..aca40851 --- /dev/null +++ b/packages/test-utils/gen/bigint_pb.d.ts @@ -0,0 +1,81 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "target=dts+js" +// @generated from file bigint.proto (syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; +import type { EmptySchema } from "@bufbuild/protobuf/wkt"; + +/** + * Describes the file bigint.proto. + */ +export declare const file_bigint: GenFile; + +/** + * @generated from message CountRequest + */ +export declare type CountRequest = Message<"CountRequest"> & { + /** + * @generated from field: int64 add = 1; + */ + add: bigint; +}; + +/** + * Describes the message CountRequest. + * Use `create(CountRequestSchema)` to create a new message. + */ +export declare const CountRequestSchema: GenMessage; + +/** + * @generated from message CountResponse + */ +export declare type CountResponse = Message<"CountResponse"> & { + /** + * @generated from field: int64 count = 1; + */ + count: bigint; +}; + +/** + * Describes the message CountResponse. + * Use `create(CountResponseSchema)` to create a new message. + */ +export declare const CountResponseSchema: GenMessage; + +/** + * @generated from service BigIntService + */ +export declare const BigIntService: GenService<{ + /** + * @generated from rpc BigIntService.Count + */ + count: { + methodKind: "unary"; + input: typeof CountRequestSchema; + output: typeof CountResponseSchema; + }, + /** + * @generated from rpc BigIntService.GetCount + */ + getCount: { + methodKind: "unary"; + input: typeof EmptySchema; + output: typeof CountResponseSchema; + }, +}>; + diff --git a/packages/test-utils/gen/bigint_pb.js b/packages/test-utils/gen/bigint_pb.js new file mode 100644 index 00000000..1d56f1d8 --- /dev/null +++ b/packages/test-utils/gen/bigint_pb.js @@ -0,0 +1,47 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "target=dts+js" +// @generated from file bigint.proto (syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import { file_google_protobuf_empty } from "@bufbuild/protobuf/wkt"; + +/** + * Describes the file bigint.proto. + */ +export const file_bigint = /*@__PURE__*/ + fileDesc("CgxiaWdpbnQucHJvdG8iGwoMQ291bnRSZXF1ZXN0EgsKA2FkZBgBIAEoAyIeCg1Db3VudFJlc3BvbnNlEg0KBWNvdW50GAEgASgDMmsKDUJpZ0ludFNlcnZpY2USJgoFQ291bnQSDS5Db3VudFJlcXVlc3QaDi5Db3VudFJlc3BvbnNlEjIKCEdldENvdW50EhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5Gg4uQ291bnRSZXNwb25zZWIGcHJvdG8z", [file_google_protobuf_empty]); + +/** + * Describes the message CountRequest. + * Use `create(CountRequestSchema)` to create a new message. + */ +export const CountRequestSchema = /*@__PURE__*/ + messageDesc(file_bigint, 0); + +/** + * Describes the message CountResponse. + * Use `create(CountResponseSchema)` to create a new message. + */ +export const CountResponseSchema = /*@__PURE__*/ + messageDesc(file_bigint, 1); + +/** + * @generated from service BigIntService + */ +export const BigIntService = /*@__PURE__*/ + serviceDesc(file_bigint, 0); + diff --git a/packages/test-utils/gen/eliza_pb.d.ts b/packages/test-utils/gen/eliza_pb.d.ts new file mode 100644 index 00000000..84aa029a --- /dev/null +++ b/packages/test-utils/gen/eliza_pb.d.ts @@ -0,0 +1,85 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "target=dts+js" +// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file eliza.proto. + */ +export declare const file_eliza: GenFile; + +/** + * SayRequest is a single-sentence request. + * + * @generated from message connectrpc.eliza.v1.SayRequest + */ +export declare type SayRequest = Message<"connectrpc.eliza.v1.SayRequest"> & { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; +}; + +/** + * Describes the message connectrpc.eliza.v1.SayRequest. + * Use `create(SayRequestSchema)` to create a new message. + */ +export declare const SayRequestSchema: GenMessage; + +/** + * SayResponse is a single-sentence response. + * + * @generated from message connectrpc.eliza.v1.SayResponse + */ +export declare type SayResponse = Message<"connectrpc.eliza.v1.SayResponse"> & { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; +}; + +/** + * Describes the message connectrpc.eliza.v1.SayResponse. + * Use `create(SayResponseSchema)` to create a new message. + */ +export declare const SayResponseSchema: GenMessage; + +/** + * ElizaService provides a way to talk to Eliza, a port of the DOCTOR script + * for Joseph Weizenbaum's original ELIZA program. Created in the mid-1960s at + * the MIT Artificial Intelligence Laboratory, ELIZA demonstrates the + * superficiality of human-computer communication. DOCTOR simulates a + * psychotherapist, and is commonly found as an Easter egg in emacs + * distributions. + * + * @generated from service connectrpc.eliza.v1.ElizaService + */ +export declare const ElizaService: GenService<{ + /** + * Say is a unary RPC. Eliza responds to the prompt with a single sentence. + * + * @generated from rpc connectrpc.eliza.v1.ElizaService.Say + */ + say: { + methodKind: "unary"; + input: typeof SayRequestSchema; + output: typeof SayResponseSchema; + }, +}>; + diff --git a/packages/test-utils/gen/eliza_pb.js b/packages/test-utils/gen/eliza_pb.js new file mode 100644 index 00000000..80a8c243 --- /dev/null +++ b/packages/test-utils/gen/eliza_pb.js @@ -0,0 +1,53 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "target=dts+js" +// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; + +/** + * Describes the file eliza.proto. + */ +export const file_eliza = /*@__PURE__*/ + fileDesc("CgtlbGl6YS5wcm90bxITY29ubmVjdHJwYy5lbGl6YS52MSIeCgpTYXlSZXF1ZXN0EhAKCHNlbnRlbmNlGAEgASgJIh8KC1NheVJlc3BvbnNlEhAKCHNlbnRlbmNlGAEgASgJMloKDEVsaXphU2VydmljZRJKCgNTYXkSHy5jb25uZWN0cnBjLmVsaXphLnYxLlNheVJlcXVlc3QaIC5jb25uZWN0cnBjLmVsaXphLnYxLlNheVJlc3BvbnNlIgBiBnByb3RvMw"); + +/** + * Describes the message connectrpc.eliza.v1.SayRequest. + * Use `create(SayRequestSchema)` to create a new message. + */ +export const SayRequestSchema = /*@__PURE__*/ + messageDesc(file_eliza, 0); + +/** + * Describes the message connectrpc.eliza.v1.SayResponse. + * Use `create(SayResponseSchema)` to create a new message. + */ +export const SayResponseSchema = /*@__PURE__*/ + messageDesc(file_eliza, 1); + +/** + * ElizaService provides a way to talk to Eliza, a port of the DOCTOR script + * for Joseph Weizenbaum's original ELIZA program. Created in the mid-1960s at + * the MIT Artificial Intelligence Laboratory, ELIZA demonstrates the + * superficiality of human-computer communication. DOCTOR simulates a + * psychotherapist, and is commonly found as an Easter egg in emacs + * distributions. + * + * @generated from service connectrpc.eliza.v1.ElizaService + */ +export const ElizaService = /*@__PURE__*/ + serviceDesc(file_eliza, 0); + diff --git a/packages/test-utils/gen/list_pb.d.ts b/packages/test-utils/gen/list_pb.d.ts new file mode 100644 index 00000000..44206a92 --- /dev/null +++ b/packages/test-utils/gen/list_pb.d.ts @@ -0,0 +1,82 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "target=dts+js" +// @generated from file list.proto (syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file list.proto. + */ +export declare const file_list: GenFile; + +/** + * @generated from message ListRequest + */ +export declare type ListRequest = Message<"ListRequest"> & { + /** + * @generated from field: int64 page = 1; + */ + page: bigint; + + /** + * @generated from field: bool preview = 2; + */ + preview: boolean; +}; + +/** + * Describes the message ListRequest. + * Use `create(ListRequestSchema)` to create a new message. + */ +export declare const ListRequestSchema: GenMessage; + +/** + * @generated from message ListResponse + */ +export declare type ListResponse = Message<"ListResponse"> & { + /** + * @generated from field: int64 page = 1; + */ + page: bigint; + + /** + * @generated from field: repeated string items = 2; + */ + items: string[]; +}; + +/** + * Describes the message ListResponse. + * Use `create(ListResponseSchema)` to create a new message. + */ +export declare const ListResponseSchema: GenMessage; + +/** + * @generated from service ListService + */ +export declare const ListService: GenService<{ + /** + * @generated from rpc ListService.List + */ + list: { + methodKind: "unary"; + input: typeof ListRequestSchema; + output: typeof ListResponseSchema; + }, +}>; + diff --git a/packages/test-utils/gen/list_pb.js b/packages/test-utils/gen/list_pb.js new file mode 100644 index 00000000..aacff993 --- /dev/null +++ b/packages/test-utils/gen/list_pb.js @@ -0,0 +1,46 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "target=dts+js" +// @generated from file list.proto (syntax proto3) +/* eslint-disable */ + +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; + +/** + * Describes the file list.proto. + */ +export const file_list = /*@__PURE__*/ + fileDesc("CgpsaXN0LnByb3RvIiwKC0xpc3RSZXF1ZXN0EgwKBHBhZ2UYASABKAMSDwoHcHJldmlldxgCIAEoCCIrCgxMaXN0UmVzcG9uc2USDAoEcGFnZRgBIAEoAxINCgVpdGVtcxgCIAMoCTIyCgtMaXN0U2VydmljZRIjCgRMaXN0EgwuTGlzdFJlcXVlc3QaDS5MaXN0UmVzcG9uc2ViBnByb3RvMw"); + +/** + * Describes the message ListRequest. + * Use `create(ListRequestSchema)` to create a new message. + */ +export const ListRequestSchema = /*@__PURE__*/ + messageDesc(file_list, 0); + +/** + * Describes the message ListResponse. + * Use `create(ListResponseSchema)` to create a new message. + */ +export const ListResponseSchema = /*@__PURE__*/ + messageDesc(file_list, 1); + +/** + * @generated from service ListService + */ +export const ListService = /*@__PURE__*/ + serviceDesc(file_list, 0); + diff --git a/packages/test-utils/gen/proto2_pb.d.ts b/packages/test-utils/gen/proto2_pb.d.ts new file mode 100644 index 00000000..ea05b657 --- /dev/null +++ b/packages/test-utils/gen/proto2_pb.d.ts @@ -0,0 +1,47 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "target=dts+js" +// @generated from file proto2.proto (package test, syntax proto2) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file proto2.proto. + */ +export declare const file_proto2: GenFile; + +/** + * @generated from message test.Proto2Message + */ +export declare type Proto2Message = Message<"test.Proto2Message"> & { + /** + * @generated from field: optional string string_field = 1; + */ + stringField: string; + + /** + * @generated from field: optional int32 int32_field = 3; + */ + int32Field: number; +}; + +/** + * Describes the message test.Proto2Message. + * Use `create(Proto2MessageSchema)` to create a new message. + */ +export declare const Proto2MessageSchema: GenMessage; + diff --git a/packages/test-utils/gen/proto2_pb.js b/packages/test-utils/gen/proto2_pb.js new file mode 100644 index 00000000..7375ffef --- /dev/null +++ b/packages/test-utils/gen/proto2_pb.js @@ -0,0 +1,33 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "target=dts+js" +// @generated from file proto2.proto (package test, syntax proto2) +/* eslint-disable */ + +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; + +/** + * Describes the file proto2.proto. + */ +export const file_proto2 = /*@__PURE__*/ + fileDesc("Cgxwcm90bzIucHJvdG8SBHRlc3QiOgoNUHJvdG8yTWVzc2FnZRIUCgxzdHJpbmdfZmllbGQYASABKAkSEwoLaW50MzJfZmllbGQYAyABKAU"); + +/** + * Describes the message test.Proto2Message. + * Use `create(Proto2MessageSchema)` to create a new message. + */ +export const Proto2MessageSchema = /*@__PURE__*/ + messageDesc(file_proto2, 0); + diff --git a/packages/test-utils/gen/proto3_pb.d.ts b/packages/test-utils/gen/proto3_pb.d.ts new file mode 100644 index 00000000..c6dd6fc4 --- /dev/null +++ b/packages/test-utils/gen/proto3_pb.d.ts @@ -0,0 +1,156 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "target=dts+js" +// @generated from file proto3.proto (package test, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file proto3.proto. + */ +export declare const file_proto3: GenFile; + +/** + * Note: We do not exhaust all field types + * + * @generated from message test.Proto3Message + */ +export declare type Proto3Message = Message<"test.Proto3Message"> & { + /** + * @generated from field: string string_field = 1; + */ + stringField: string; + + /** + * @generated from field: bytes bytes_field = 2; + */ + bytesField: Uint8Array; + + /** + * @generated from field: int32 int32_field = 3; + */ + int32Field: number; + + /** + * @generated from field: int64 int64_field = 4; + */ + int64Field: bigint; + + /** + * @generated from field: double double_field = 5; + */ + doubleField: number; + + /** + * @generated from field: bool bool_field = 6; + */ + boolField: boolean; + + /** + * @generated from field: test.Proto3Enum enum_field = 7; + */ + enumField: Proto3Enum; + + /** + * @generated from field: test.Proto3Message message_field = 8; + */ + messageField?: Proto3Message; + + /** + * @generated from field: optional string optional_string_field = 9; + */ + optionalStringField?: string; + + /** + * @generated from field: repeated string repeated_string_field = 17; + */ + repeatedStringField: string[]; + + /** + * @generated from field: repeated test.Proto3Message repeated_message_field = 18; + */ + repeatedMessageField: Proto3Message[]; + + /** + * @generated from field: repeated test.Proto3Enum repeated_enum_field = 19; + */ + repeatedEnumField: Proto3Enum[]; + + /** + * @generated from oneof test.Proto3Message.either + */ + either: { + /** + * @generated from field: string oneof_string_field = 31; + */ + value: string; + case: "oneofStringField"; + } | { + /** + * @generated from field: int32 oneof_int32_field = 33; + */ + value: number; + case: "oneofInt32Field"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: map map_string_int64_field = 39; + */ + mapStringInt64Field: { [key: string]: bigint }; + + /** + * @generated from field: map map_string_message_field = 40; + */ + mapStringMessageField: { [key: string]: Proto3Message }; + + /** + * @generated from field: map map_string_enum_field = 41; + */ + mapStringEnumField: { [key: string]: Proto3Enum }; +}; + +/** + * Describes the message test.Proto3Message. + * Use `create(Proto3MessageSchema)` to create a new message. + */ +export declare const Proto3MessageSchema: GenMessage; + +/** + * @generated from enum test.Proto3Enum + */ +export enum Proto3Enum { + /** + * @generated from enum value: PROTO3_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: PROTO3_ENUM_YES = 1; + */ + YES = 1, + + /** + * @generated from enum value: PROTO3_ENUM_NO = 2; + */ + NO = 2, +} + +/** + * Describes the enum test.Proto3Enum. + */ +export declare const Proto3EnumSchema: GenEnum; + diff --git a/packages/test-utils/gen/proto3_pb.js b/packages/test-utils/gen/proto3_pb.js new file mode 100644 index 00000000..7aa312f2 --- /dev/null +++ b/packages/test-utils/gen/proto3_pb.js @@ -0,0 +1,45 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.1 with parameter "target=dts+js" +// @generated from file proto3.proto (package test, syntax proto3) +/* eslint-disable */ + +import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/codegenv1"; + +/** + * Describes the file proto3.proto. + */ +export const file_proto3 = /*@__PURE__*/ + fileDesc("Cgxwcm90bzMucHJvdG8SBHRlc3QirgcKDVByb3RvM01lc3NhZ2USFAoMc3RyaW5nX2ZpZWxkGAEgASgJEhMKC2J5dGVzX2ZpZWxkGAIgASgMEhMKC2ludDMyX2ZpZWxkGAMgASgFEhMKC2ludDY0X2ZpZWxkGAQgASgDEhQKDGRvdWJsZV9maWVsZBgFIAEoARISCgpib29sX2ZpZWxkGAYgASgIEiQKCmVudW1fZmllbGQYByABKA4yEC50ZXN0LlByb3RvM0VudW0SKgoNbWVzc2FnZV9maWVsZBgIIAEoCzITLnRlc3QuUHJvdG8zTWVzc2FnZRIiChVvcHRpb25hbF9zdHJpbmdfZmllbGQYCSABKAlIAYgBARIdChVyZXBlYXRlZF9zdHJpbmdfZmllbGQYESADKAkSMwoWcmVwZWF0ZWRfbWVzc2FnZV9maWVsZBgSIAMoCzITLnRlc3QuUHJvdG8zTWVzc2FnZRItChNyZXBlYXRlZF9lbnVtX2ZpZWxkGBMgAygOMhAudGVzdC5Qcm90bzNFbnVtEhwKEm9uZW9mX3N0cmluZ19maWVsZBgfIAEoCUgAEhsKEW9uZW9mX2ludDMyX2ZpZWxkGCEgASgFSAASTAoWbWFwX3N0cmluZ19pbnQ2NF9maWVsZBgnIAMoCzIsLnRlc3QuUHJvdG8zTWVzc2FnZS5NYXBTdHJpbmdJbnQ2NEZpZWxkRW50cnkSUAoYbWFwX3N0cmluZ19tZXNzYWdlX2ZpZWxkGCggAygLMi4udGVzdC5Qcm90bzNNZXNzYWdlLk1hcFN0cmluZ01lc3NhZ2VGaWVsZEVudHJ5EkoKFW1hcF9zdHJpbmdfZW51bV9maWVsZBgpIAMoCzIrLnRlc3QuUHJvdG8zTWVzc2FnZS5NYXBTdHJpbmdFbnVtRmllbGRFbnRyeRo6ChhNYXBTdHJpbmdJbnQ2NEZpZWxkRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgDOgI4ARpRChpNYXBTdHJpbmdNZXNzYWdlRmllbGRFbnRyeRILCgNrZXkYASABKAkSIgoFdmFsdWUYAiABKAsyEy50ZXN0LlByb3RvM01lc3NhZ2U6AjgBGksKF01hcFN0cmluZ0VudW1GaWVsZEVudHJ5EgsKA2tleRgBIAEoCRIfCgV2YWx1ZRgCIAEoDjIQLnRlc3QuUHJvdG8zRW51bToCOAFCCAoGZWl0aGVyQhgKFl9vcHRpb25hbF9zdHJpbmdfZmllbGQqUgoKUHJvdG8zRW51bRIbChdQUk9UTzNfRU5VTV9VTlNQRUNJRklFRBAAEhMKD1BST1RPM19FTlVNX1lFUxABEhIKDlBST1RPM19FTlVNX05PEAJiBnByb3RvMw"); + +/** + * Describes the message test.Proto3Message. + * Use `create(Proto3MessageSchema)` to create a new message. + */ +export const Proto3MessageSchema = /*@__PURE__*/ + messageDesc(file_proto3, 0); + +/** + * Describes the enum test.Proto3Enum. + */ +export const Proto3EnumSchema = /*@__PURE__*/ + enumDesc(file_proto3, 0); + +/** + * @generated from enum test.Proto3Enum + */ +export const Proto3Enum = /*@__PURE__*/ + tsEnum(Proto3EnumSchema); + diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json new file mode 100644 index 00000000..e10b13a0 --- /dev/null +++ b/packages/test-utils/package.json @@ -0,0 +1,27 @@ +{ + "name": "test-utils", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "clean": "rm -rf ./dist/*", + "generate": "buf generate", + "build": "tsc --project tsconfig.build.json" + }, + "exports": { + ".": "./dist/esm/index.js", + "./gen/*": "./dist/esm/gen/*" + }, + "devDependencies": { + "@bufbuild/buf": "^1.46.0", + "@bufbuild/protobuf": "^2.2.1", + "@bufbuild/protoc-gen-es": "^2.2.1", + "@connectrpc/connect": "^2.0.0-rc.2", + "@connectrpc/connect-web": "^2.0.0-rc.2", + "@types/react": "18.3.12", + "react": "^18.3.1" + }, + "files": [ + "dist/**" + ] +} diff --git a/packages/connect-query/src/method-unary-descriptor.ts b/packages/test-utils/proto/bigint.proto similarity index 66% rename from packages/connect-query/src/method-unary-descriptor.ts rename to packages/test-utils/proto/bigint.proto index 42542e5d..a2a8fba1 100644 --- a/packages/connect-query/src/method-unary-descriptor.ts +++ b/packages/test-utils/proto/bigint.proto @@ -12,12 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -import type { Message, MethodInfoUnary, ServiceType } from "@bufbuild/protobuf"; +syntax = "proto3"; -/** Defines a standalone method and associated service */ -export type MethodUnaryDescriptor< - I extends Message, - O extends Message, -> = MethodInfoUnary & { - readonly service: Omit; -}; +import "google/protobuf/empty.proto"; + +service BigIntService { + rpc Count(CountRequest) returns (CountResponse); + rpc GetCount(google.protobuf.Empty) returns (CountResponse); +} + +message CountRequest { + int64 add = 1; +} + +message CountResponse { + int64 count = 1; +} diff --git a/packages/test-utils/proto/eliza.proto b/packages/test-utils/proto/eliza.proto new file mode 100644 index 00000000..53059cb0 --- /dev/null +++ b/packages/test-utils/proto/eliza.proto @@ -0,0 +1,38 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package connectrpc.eliza.v1; + +// ElizaService provides a way to talk to Eliza, a port of the DOCTOR script +// for Joseph Weizenbaum's original ELIZA program. Created in the mid-1960s at +// the MIT Artificial Intelligence Laboratory, ELIZA demonstrates the +// superficiality of human-computer communication. DOCTOR simulates a +// psychotherapist, and is commonly found as an Easter egg in emacs +// distributions. +service ElizaService { + // Say is a unary RPC. Eliza responds to the prompt with a single sentence. + rpc Say(SayRequest) returns (SayResponse) {} +} + +// SayRequest is a single-sentence request. +message SayRequest { + string sentence = 1; +} + +// SayResponse is a single-sentence response. +message SayResponse { + string sentence = 1; +} diff --git a/packages/test-utils/proto/list.proto b/packages/test-utils/proto/list.proto new file mode 100644 index 00000000..db4e3a8a --- /dev/null +++ b/packages/test-utils/proto/list.proto @@ -0,0 +1,30 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +service ListService { + rpc List(ListRequest) returns (ListResponse); +} + +message ListRequest { + int64 page = 1; + bool preview = 2; +} + +message ListResponse { + int64 page = 1; + repeated string items = 2; +} + diff --git a/packages/test-utils/proto/proto2.proto b/packages/test-utils/proto/proto2.proto new file mode 100644 index 00000000..bfbe1768 --- /dev/null +++ b/packages/test-utils/proto/proto2.proto @@ -0,0 +1,21 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; +package test; + +message Proto2Message { + optional string string_field = 1; + optional int32 int32_field = 3; +} diff --git a/packages/test-utils/proto/proto3.proto b/packages/test-utils/proto/proto3.proto new file mode 100644 index 00000000..d7a7759b --- /dev/null +++ b/packages/test-utils/proto/proto3.proto @@ -0,0 +1,49 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package test; + +// Note: We do not exhaust all field types +message Proto3Message { + string string_field = 1; + bytes bytes_field = 2; + int32 int32_field = 3; + int64 int64_field = 4; + double double_field = 5; + bool bool_field = 6; + Proto3Enum enum_field = 7; + Proto3Message message_field = 8; + + optional string optional_string_field = 9; + + repeated string repeated_string_field = 17; + repeated Proto3Message repeated_message_field = 18; + repeated Proto3Enum repeated_enum_field = 19; + + oneof either { + string oneof_string_field = 31; + int32 oneof_int32_field = 33; + } + + map map_string_int64_field = 39; + map map_string_message_field = 40; + map map_string_enum_field = 41; +} + +enum Proto3Enum { + PROTO3_ENUM_UNSPECIFIED = 0; + PROTO3_ENUM_YES = 1; + PROTO3_ENUM_NO = 2; +} diff --git a/packages/test-utils/src/gen/bigint_pb.ts b/packages/test-utils/src/gen/bigint_pb.ts new file mode 100644 index 00000000..f340acb4 --- /dev/null +++ b/packages/test-utils/src/gen/bigint_pb.ts @@ -0,0 +1,87 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file bigint.proto (syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { EmptySchema } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file bigint.proto. + */ +export const file_bigint: GenFile = /*@__PURE__*/ + fileDesc("CgxiaWdpbnQucHJvdG8iGwoMQ291bnRSZXF1ZXN0EgsKA2FkZBgBIAEoAyIeCg1Db3VudFJlc3BvbnNlEg0KBWNvdW50GAEgASgDMmsKDUJpZ0ludFNlcnZpY2USJgoFQ291bnQSDS5Db3VudFJlcXVlc3QaDi5Db3VudFJlc3BvbnNlEjIKCEdldENvdW50EhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5Gg4uQ291bnRSZXNwb25zZWIGcHJvdG8z", [file_google_protobuf_empty]); + +/** + * @generated from message CountRequest + */ +export type CountRequest = Message<"CountRequest"> & { + /** + * @generated from field: int64 add = 1; + */ + add: bigint; +}; + +/** + * Describes the message CountRequest. + * Use `create(CountRequestSchema)` to create a new message. + */ +export const CountRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_bigint, 0); + +/** + * @generated from message CountResponse + */ +export type CountResponse = Message<"CountResponse"> & { + /** + * @generated from field: int64 count = 1; + */ + count: bigint; +}; + +/** + * Describes the message CountResponse. + * Use `create(CountResponseSchema)` to create a new message. + */ +export const CountResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_bigint, 1); + +/** + * @generated from service BigIntService + */ +export const BigIntService: GenService<{ + /** + * @generated from rpc BigIntService.Count + */ + count: { + methodKind: "unary"; + input: typeof CountRequestSchema; + output: typeof CountResponseSchema; + }, + /** + * @generated from rpc BigIntService.GetCount + */ + getCount: { + methodKind: "unary"; + input: typeof EmptySchema; + output: typeof CountResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_bigint, 0); + diff --git a/packages/test-utils/src/gen/eliza_pb.ts b/packages/test-utils/src/gen/eliza_pb.ts new file mode 100644 index 00000000..3e1919c3 --- /dev/null +++ b/packages/test-utils/src/gen/eliza_pb.ts @@ -0,0 +1,90 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file eliza.proto. + */ +export const file_eliza: GenFile = /*@__PURE__*/ + fileDesc("CgtlbGl6YS5wcm90bxITY29ubmVjdHJwYy5lbGl6YS52MSIeCgpTYXlSZXF1ZXN0EhAKCHNlbnRlbmNlGAEgASgJIh8KC1NheVJlc3BvbnNlEhAKCHNlbnRlbmNlGAEgASgJMloKDEVsaXphU2VydmljZRJKCgNTYXkSHy5jb25uZWN0cnBjLmVsaXphLnYxLlNheVJlcXVlc3QaIC5jb25uZWN0cnBjLmVsaXphLnYxLlNheVJlc3BvbnNlIgBiBnByb3RvMw"); + +/** + * SayRequest is a single-sentence request. + * + * @generated from message connectrpc.eliza.v1.SayRequest + */ +export type SayRequest = Message<"connectrpc.eliza.v1.SayRequest"> & { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; +}; + +/** + * Describes the message connectrpc.eliza.v1.SayRequest. + * Use `create(SayRequestSchema)` to create a new message. + */ +export const SayRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_eliza, 0); + +/** + * SayResponse is a single-sentence response. + * + * @generated from message connectrpc.eliza.v1.SayResponse + */ +export type SayResponse = Message<"connectrpc.eliza.v1.SayResponse"> & { + /** + * @generated from field: string sentence = 1; + */ + sentence: string; +}; + +/** + * Describes the message connectrpc.eliza.v1.SayResponse. + * Use `create(SayResponseSchema)` to create a new message. + */ +export const SayResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_eliza, 1); + +/** + * ElizaService provides a way to talk to Eliza, a port of the DOCTOR script + * for Joseph Weizenbaum's original ELIZA program. Created in the mid-1960s at + * the MIT Artificial Intelligence Laboratory, ELIZA demonstrates the + * superficiality of human-computer communication. DOCTOR simulates a + * psychotherapist, and is commonly found as an Easter egg in emacs + * distributions. + * + * @generated from service connectrpc.eliza.v1.ElizaService + */ +export const ElizaService: GenService<{ + /** + * Say is a unary RPC. Eliza responds to the prompt with a single sentence. + * + * @generated from rpc connectrpc.eliza.v1.ElizaService.Say + */ + say: { + methodKind: "unary"; + input: typeof SayRequestSchema; + output: typeof SayResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_eliza, 0); + diff --git a/packages/test-utils/src/gen/list_pb.ts b/packages/test-utils/src/gen/list_pb.ts new file mode 100644 index 00000000..89f49628 --- /dev/null +++ b/packages/test-utils/src/gen/list_pb.ts @@ -0,0 +1,87 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file list.proto (syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file list.proto. + */ +export const file_list: GenFile = /*@__PURE__*/ + fileDesc("CgpsaXN0LnByb3RvIiwKC0xpc3RSZXF1ZXN0EgwKBHBhZ2UYASABKAMSDwoHcHJldmlldxgCIAEoCCIrCgxMaXN0UmVzcG9uc2USDAoEcGFnZRgBIAEoAxINCgVpdGVtcxgCIAMoCTIyCgtMaXN0U2VydmljZRIjCgRMaXN0EgwuTGlzdFJlcXVlc3QaDS5MaXN0UmVzcG9uc2ViBnByb3RvMw"); + +/** + * @generated from message ListRequest + */ +export type ListRequest = Message<"ListRequest"> & { + /** + * @generated from field: int64 page = 1; + */ + page: bigint; + + /** + * @generated from field: bool preview = 2; + */ + preview: boolean; +}; + +/** + * Describes the message ListRequest. + * Use `create(ListRequestSchema)` to create a new message. + */ +export const ListRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_list, 0); + +/** + * @generated from message ListResponse + */ +export type ListResponse = Message<"ListResponse"> & { + /** + * @generated from field: int64 page = 1; + */ + page: bigint; + + /** + * @generated from field: repeated string items = 2; + */ + items: string[]; +}; + +/** + * Describes the message ListResponse. + * Use `create(ListResponseSchema)` to create a new message. + */ +export const ListResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_list, 1); + +/** + * @generated from service ListService + */ +export const ListService: GenService<{ + /** + * @generated from rpc ListService.List + */ + list: { + methodKind: "unary"; + input: typeof ListRequestSchema; + output: typeof ListResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_list, 0); + diff --git a/packages/test-utils/src/gen/proto2_pb.ts b/packages/test-utils/src/gen/proto2_pb.ts new file mode 100644 index 00000000..c5b8c577 --- /dev/null +++ b/packages/test-utils/src/gen/proto2_pb.ts @@ -0,0 +1,50 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file proto2.proto (package test, syntax proto2) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file proto2.proto. + */ +export const file_proto2: GenFile = /*@__PURE__*/ + fileDesc("Cgxwcm90bzIucHJvdG8SBHRlc3QiOgoNUHJvdG8yTWVzc2FnZRIUCgxzdHJpbmdfZmllbGQYASABKAkSEwoLaW50MzJfZmllbGQYAyABKAU"); + +/** + * @generated from message test.Proto2Message + */ +export type Proto2Message = Message<"test.Proto2Message"> & { + /** + * @generated from field: optional string string_field = 1; + */ + stringField: string; + + /** + * @generated from field: optional int32 int32_field = 3; + */ + int32Field: number; +}; + +/** + * Describes the message test.Proto2Message. + * Use `create(Proto2MessageSchema)` to create a new message. + */ +export const Proto2MessageSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_proto2, 0); + diff --git a/packages/test-utils/src/gen/proto3_pb.ts b/packages/test-utils/src/gen/proto3_pb.ts new file mode 100644 index 00000000..09b1003d --- /dev/null +++ b/packages/test-utils/src/gen/proto3_pb.ts @@ -0,0 +1,160 @@ +// Copyright 2021-2023 The Connect Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v2.2.0 with parameter "target=ts" +// @generated from file proto3.proto (package test, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file proto3.proto. + */ +export const file_proto3: GenFile = /*@__PURE__*/ + fileDesc("Cgxwcm90bzMucHJvdG8SBHRlc3QirgcKDVByb3RvM01lc3NhZ2USFAoMc3RyaW5nX2ZpZWxkGAEgASgJEhMKC2J5dGVzX2ZpZWxkGAIgASgMEhMKC2ludDMyX2ZpZWxkGAMgASgFEhMKC2ludDY0X2ZpZWxkGAQgASgDEhQKDGRvdWJsZV9maWVsZBgFIAEoARISCgpib29sX2ZpZWxkGAYgASgIEiQKCmVudW1fZmllbGQYByABKA4yEC50ZXN0LlByb3RvM0VudW0SKgoNbWVzc2FnZV9maWVsZBgIIAEoCzITLnRlc3QuUHJvdG8zTWVzc2FnZRIiChVvcHRpb25hbF9zdHJpbmdfZmllbGQYCSABKAlIAYgBARIdChVyZXBlYXRlZF9zdHJpbmdfZmllbGQYESADKAkSMwoWcmVwZWF0ZWRfbWVzc2FnZV9maWVsZBgSIAMoCzITLnRlc3QuUHJvdG8zTWVzc2FnZRItChNyZXBlYXRlZF9lbnVtX2ZpZWxkGBMgAygOMhAudGVzdC5Qcm90bzNFbnVtEhwKEm9uZW9mX3N0cmluZ19maWVsZBgfIAEoCUgAEhsKEW9uZW9mX2ludDMyX2ZpZWxkGCEgASgFSAASTAoWbWFwX3N0cmluZ19pbnQ2NF9maWVsZBgnIAMoCzIsLnRlc3QuUHJvdG8zTWVzc2FnZS5NYXBTdHJpbmdJbnQ2NEZpZWxkRW50cnkSUAoYbWFwX3N0cmluZ19tZXNzYWdlX2ZpZWxkGCggAygLMi4udGVzdC5Qcm90bzNNZXNzYWdlLk1hcFN0cmluZ01lc3NhZ2VGaWVsZEVudHJ5EkoKFW1hcF9zdHJpbmdfZW51bV9maWVsZBgpIAMoCzIrLnRlc3QuUHJvdG8zTWVzc2FnZS5NYXBTdHJpbmdFbnVtRmllbGRFbnRyeRo6ChhNYXBTdHJpbmdJbnQ2NEZpZWxkRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgDOgI4ARpRChpNYXBTdHJpbmdNZXNzYWdlRmllbGRFbnRyeRILCgNrZXkYASABKAkSIgoFdmFsdWUYAiABKAsyEy50ZXN0LlByb3RvM01lc3NhZ2U6AjgBGksKF01hcFN0cmluZ0VudW1GaWVsZEVudHJ5EgsKA2tleRgBIAEoCRIfCgV2YWx1ZRgCIAEoDjIQLnRlc3QuUHJvdG8zRW51bToCOAFCCAoGZWl0aGVyQhgKFl9vcHRpb25hbF9zdHJpbmdfZmllbGQqUgoKUHJvdG8zRW51bRIbChdQUk9UTzNfRU5VTV9VTlNQRUNJRklFRBAAEhMKD1BST1RPM19FTlVNX1lFUxABEhIKDlBST1RPM19FTlVNX05PEAJiBnByb3RvMw"); + +/** + * Note: We do not exhaust all field types + * + * @generated from message test.Proto3Message + */ +export type Proto3Message = Message<"test.Proto3Message"> & { + /** + * @generated from field: string string_field = 1; + */ + stringField: string; + + /** + * @generated from field: bytes bytes_field = 2; + */ + bytesField: Uint8Array; + + /** + * @generated from field: int32 int32_field = 3; + */ + int32Field: number; + + /** + * @generated from field: int64 int64_field = 4; + */ + int64Field: bigint; + + /** + * @generated from field: double double_field = 5; + */ + doubleField: number; + + /** + * @generated from field: bool bool_field = 6; + */ + boolField: boolean; + + /** + * @generated from field: test.Proto3Enum enum_field = 7; + */ + enumField: Proto3Enum; + + /** + * @generated from field: test.Proto3Message message_field = 8; + */ + messageField?: Proto3Message; + + /** + * @generated from field: optional string optional_string_field = 9; + */ + optionalStringField?: string; + + /** + * @generated from field: repeated string repeated_string_field = 17; + */ + repeatedStringField: string[]; + + /** + * @generated from field: repeated test.Proto3Message repeated_message_field = 18; + */ + repeatedMessageField: Proto3Message[]; + + /** + * @generated from field: repeated test.Proto3Enum repeated_enum_field = 19; + */ + repeatedEnumField: Proto3Enum[]; + + /** + * @generated from oneof test.Proto3Message.either + */ + either: { + /** + * @generated from field: string oneof_string_field = 31; + */ + value: string; + case: "oneofStringField"; + } | { + /** + * @generated from field: int32 oneof_int32_field = 33; + */ + value: number; + case: "oneofInt32Field"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: map map_string_int64_field = 39; + */ + mapStringInt64Field: { [key: string]: bigint }; + + /** + * @generated from field: map map_string_message_field = 40; + */ + mapStringMessageField: { [key: string]: Proto3Message }; + + /** + * @generated from field: map map_string_enum_field = 41; + */ + mapStringEnumField: { [key: string]: Proto3Enum }; +}; + +/** + * Describes the message test.Proto3Message. + * Use `create(Proto3MessageSchema)` to create a new message. + */ +export const Proto3MessageSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_proto3, 0); + +/** + * @generated from enum test.Proto3Enum + */ +export enum Proto3Enum { + /** + * @generated from enum value: PROTO3_ENUM_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: PROTO3_ENUM_YES = 1; + */ + YES = 1, + + /** + * @generated from enum value: PROTO3_ENUM_NO = 2; + */ + NO = 2, +} + +/** + * Describes the enum test.Proto3Enum. + */ +export const Proto3EnumSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_proto3, 0); + diff --git a/packages/connect-query/src/test/test-utils.tsx b/packages/test-utils/src/index.tsx similarity index 50% rename from packages/connect-query/src/test/test-utils.tsx rename to packages/test-utils/src/index.tsx index 8bb747db..10fca078 100644 --- a/packages/connect-query/src/test/test-utils.tsx +++ b/packages/test-utils/src/index.tsx @@ -12,61 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -import type { PartialMessage } from "@bufbuild/protobuf"; -import type { CallOptions, Transport } from "@connectrpc/connect"; +import type { MessageInitShape } from "@bufbuild/protobuf"; +import { create } from "@bufbuild/protobuf"; import { createRouterTransport } from "@connectrpc/connect"; -import { createConnectTransport } from "@connectrpc/connect-web"; -import type { QueryClientConfig } from "@tanstack/react-query"; -import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import type { JSXElementConstructor, PropsWithChildren } from "react"; -import { defaultOptions } from "../default-options.js"; import { BigIntService, + type CountRequest, + CountResponseSchema, +} from "./gen/bigint_pb.js"; +import { ElizaService, - PaginatedService, -} from "../gen/eliza_connect.js"; -import type { - CountRequest, - ListResponse, - SayRequest, -} from "../gen/eliza_pb.js"; -import { CountResponse, SayResponse } from "../gen/eliza_pb.js"; -import { TransportProvider } from "../use-transport.js"; - -/** - * A utils wrapper that supplies Tanstack Query's `QueryClientProvider` as well as Connect-Query's `TransportProvider`. - */ -export const wrapper = ( - config?: QueryClientConfig, - transport = createConnectTransport({ - baseUrl: "https://demo.connectrpc.com", - }), -): { - wrapper: JSXElementConstructor; - queryClient: QueryClient; - transport: Transport; - queryClientWrapper: JSXElementConstructor; -} => { - const queryClient = new QueryClient({ - defaultOptions, - ...config, - }); - return { - wrapper: ({ children }) => ( - - - {children} - - - ), - queryClient, - transport, - queryClientWrapper: ({ children }) => ( - {children} - ), - }; -}; + type SayRequest, + SayResponseSchema, +} from "./gen/eliza_pb.js"; +import { type ListResponseSchema, ListService } from "./gen/list_pb.js"; /** * A test-only helper to increase time (necessary for testing react-query) @@ -80,8 +40,8 @@ export const sleep = async (timeout: number) => * a stateless mock for ElizaService */ export const mockEliza = ( - override?: PartialMessage, - addDelay = false, + override?: MessageInitShape, + addDelay = false ) => createRouterTransport(({ service }) => { service(ElizaService, { @@ -89,8 +49,9 @@ export const mockEliza = ( if (addDelay) { await sleep(1000); } - return new SayResponse( - override ?? { sentence: `Hello ${input.sentence}` }, + return create( + SayResponseSchema, + override ?? { sentence: `Hello ${input.sentence}` } ); }, }); @@ -101,7 +62,9 @@ export const mockEliza = ( */ export const mockBigInt = () => createRouterTransport(({ service }) => { - service(BigIntService, { count: () => new CountResponse({ count: 1n }) }); + service(BigIntService, { + count: () => create(CountResponseSchema, { count: 1n }), + }); }); /** @@ -118,9 +81,9 @@ export const mockStatefulBigIntTransport = (addDelay = false) => if (request) { count += request.add; } - return new CountResponse({ count }); + return create(CountResponseSchema, { count }); }, - getCount: () => new CountResponse({ count }), + getCount: () => create(CountResponseSchema, { count }), }); }); @@ -128,11 +91,11 @@ export const mockStatefulBigIntTransport = (addDelay = false) => * a mock for PaginatedService that acts as an impromptu database */ export const mockPaginatedTransport = ( - override?: PartialMessage, - addDelay = false, + override?: MessageInitShape, + addDelay = false ) => createRouterTransport(({ service }) => { - service(PaginatedService, { + service(ListService, { list: async (request) => { if (addDelay) { await sleep(1000); @@ -153,11 +116,3 @@ export const mockPaginatedTransport = ( }, }); }); - -export const mockCallOptions = { - signal: new AbortController().signal, - timeoutMs: 9000, - headers: new Headers({ - "Content-Type": 'application/x-shockwave-flash; version="1"', - }), -} satisfies CallOptions; diff --git a/packages/test-utils/tsconfig.build.json b/packages/test-utils/tsconfig.build.json new file mode 100644 index 00000000..171a4e93 --- /dev/null +++ b/packages/test-utils/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "skipLibCheck": true, + "declaration": true, + "declarationDir": "./dist/esm", + "outDir": "./dist/esm" + }, + "include": ["src/**/*.ts", "src/**/*.tsx"], + "exclude": ["**/*.test.ts", "**/*.test.tsx", "src/test/**"] +} diff --git a/packages/test-utils/tsconfig.json b/packages/test-utils/tsconfig.json new file mode 100644 index 00000000..994fc249 --- /dev/null +++ b/packages/test-utils/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "rootDir": ".", + "noUnusedLocals": false, // necessary for TypeScript type tests, but since this is not enabled for build, unused variables have no risk of leaking into the build output + "lib": ["DOM", "ESNext"], + "noEmit": true, + "verbatimModuleSyntax": false + }, + "exclude": ["coverage", "dist"], + "include": ["src", "./*.config.ts"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8af70570..a5c0a828 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,23 +12,23 @@ importers: specifier: ^0.0.4 version: 0.0.4 '@types/node': - specifier: ^22.5.1 - version: 22.5.1 + specifier: ^22.8.6 + version: 22.8.6 '@typescript-eslint/eslint-plugin': specifier: 7.15.0 - version: 7.15.0(@typescript-eslint/parser@7.15.0)(eslint@8.57.0)(typescript@5.5.4) + version: 7.15.0(@typescript-eslint/parser@7.15.0)(eslint@8.57.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 7.15.0 - version: 7.15.0(eslint@8.57.0)(typescript@5.5.4) + version: 7.15.0(eslint@8.57.0)(typescript@5.6.3) '@typescript-eslint/utils': specifier: 7.15.0 - version: 7.15.0(eslint@8.57.0)(typescript@5.5.4) + version: 7.15.0(eslint@8.57.0)(typescript@5.6.3) '@vitest/ui': - specifier: ^2.1.1 - version: 2.1.1(vitest@2.1.1) + specifier: ^2.1.4 + version: 2.1.4(vitest@2.1.4) cspell: - specifier: 8.14.2 - version: 8.14.2 + specifier: 8.15.5 + version: 8.15.5 eslint: specifier: 8.57.0 version: 8.57.0 @@ -37,16 +37,13 @@ importers: version: 9.1.0(eslint@8.57.0) eslint-import-resolver-typescript: specifier: ^3.6.3 - version: 3.6.3(@typescript-eslint/parser@7.15.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + version: 3.6.3(@typescript-eslint/parser@7.15.0)(eslint-plugin-import@2.31.0)(eslint@8.57.0) eslint-plugin-eslint-comments: specifier: 3.2.0 version: 3.2.0(eslint@8.57.0) eslint-plugin-import: specifier: ^2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) - eslint-plugin-jsdoc: - specifier: 50.2.2 - version: 50.2.2(eslint@8.57.0) + version: 2.31.0(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) eslint-plugin-react-hooks: specifier: ^4.6.2 version: 4.6.2(eslint@8.57.0) @@ -55,43 +52,40 @@ importers: version: 12.1.1(eslint@8.57.0) eslint-plugin-vitest: specifier: 0.5.4 - version: 0.5.4(@typescript-eslint/eslint-plugin@7.15.0)(eslint@8.57.0)(typescript@5.5.4)(vitest@2.1.1) + version: 0.5.4(@typescript-eslint/eslint-plugin@7.15.0)(eslint@8.57.0)(typescript@5.6.3)(vitest@2.1.4) prettier: specifier: 3.3.3 version: 3.3.3 turbo: - specifier: ^2.1.1 - version: 2.1.1 + specifier: ^2.2.3 + version: 2.2.3 typescript: - specifier: 5.5.4 - version: 5.5.4 + specifier: 5.6.3 + version: 5.6.3 vitest: - specifier: ^2.1.1 - version: 2.1.1(@types/node@22.5.1)(@vitest/ui@2.1.1) + specifier: ^2.1.4 + version: 2.1.4(@types/node@22.8.6)(@vitest/ui@2.1.4) examples/react/basic: dependencies: '@bufbuild/buf': - specifier: 1.43.0 - version: 1.43.0 + specifier: 1.46.0 + version: 1.46.0 '@bufbuild/protobuf': - specifier: ^1.10.0 - version: 1.10.0 + specifier: ^2.2.1 + version: 2.2.1 '@bufbuild/protoc-gen-es': - specifier: ^1.10.0 - version: 1.10.0(@bufbuild/protobuf@1.10.0) + specifier: ^2.2.1 + version: 2.2.1(@bufbuild/protobuf@2.2.1) '@connectrpc/connect': - specifier: ^1.5.0 - version: 1.5.0(@bufbuild/protobuf@1.10.0) + specifier: ^2.0.0-rc.2 + version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1) '@connectrpc/connect-query': specifier: workspace:* version: link:../../../packages/connect-query '@connectrpc/connect-web': - specifier: ^1.5.0 - version: 1.5.0(@bufbuild/protobuf@1.10.0)(@connectrpc/connect@1.5.0) - '@connectrpc/protoc-gen-connect-es': - specifier: ^1.5.0 - version: 1.5.0(@bufbuild/protoc-gen-es@1.10.0)(@connectrpc/connect@1.5.0) + specifier: ^2.0.0-rc.2 + version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.2) '@connectrpc/protoc-gen-connect-query': specifier: workspace:* version: link:../../../packages/protoc-gen-connect-query @@ -102,20 +96,20 @@ importers: specifier: ^5.59.16 version: 5.59.16(@tanstack/react-query@5.59.16)(react@18.3.1) '@testing-library/jest-dom': - specifier: ^6.5.0 - version: 6.5.0 + specifier: ^6.6.3 + version: 6.6.3 '@testing-library/react': specifier: ^16.0.1 - version: 16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.5)(react-dom@18.3.1)(react@18.3.1) + version: 16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1)(react@18.3.1) '@types/react': - specifier: ^18.3.5 - version: 18.3.5 + specifier: ^18.3.12 + version: 18.3.12 '@types/react-dom': - specifier: ^18.3.0 - version: 18.3.0 + specifier: ^18.3.1 + version: 18.3.1 '@vitejs/plugin-react': - specifier: ^4.3.1 - version: 4.3.1(vite@5.4.7) + specifier: ^4.3.3 + version: 4.3.3(vite@5.4.10) react: specifier: ^18.3.1 version: 18.3.1 @@ -123,101 +117,150 @@ importers: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.3 + version: 5.6.3 vite: - specifier: ^5.4.7 - version: 5.4.7(@types/node@22.5.1) + specifier: ^5.4.10 + version: 5.4.10(@types/node@22.8.6) packages/connect-query: dependencies: - stable-hash: - specifier: ^0.0.4 - version: 0.0.4 + '@connectrpc/connect-query-core': + specifier: workspace:* + version: link:../connect-query-core devDependencies: '@arethetypeswrong/cli': - specifier: ^0.15.4 - version: 0.15.4 + specifier: ^0.16.4 + version: 0.16.4 '@bufbuild/buf': - specifier: 1.43.0 - version: 1.43.0 + specifier: 1.46.0 + version: 1.46.0 '@bufbuild/jest-environment-jsdom': specifier: ^0.1.1 version: 0.1.1(jest-environment-jsdom@29.7.0) '@bufbuild/protobuf': - specifier: ^1.10.0 - version: 1.10.0 + specifier: ^2.2.1 + version: 2.2.1 '@bufbuild/protoc-gen-es': - specifier: ^1.10.0 - version: 1.10.0(@bufbuild/protobuf@1.10.0) + specifier: ^2.2.1 + version: 2.2.1(@bufbuild/protobuf@2.2.1) '@connectrpc/connect': - specifier: ^1.5.0 - version: 1.5.0(@bufbuild/protobuf@1.10.0) + specifier: ^2.0.0-rc.2 + version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1) '@connectrpc/connect-web': - specifier: ^1.5.0 - version: 1.5.0(@bufbuild/protobuf@1.10.0)(@connectrpc/connect@1.5.0) - '@connectrpc/protoc-gen-connect-es': - specifier: ^1.5.0 - version: 1.5.0(@bufbuild/protoc-gen-es@1.10.0)(@connectrpc/connect@1.5.0) + specifier: ^2.0.0-rc.2 + version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.2) '@tanstack/react-query': specifier: ^5.59.16 version: 5.59.16(react@18.3.1) '@testing-library/react': specifier: ^16.0.1 - version: 16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.5)(react-dom@18.3.1)(react@18.3.1) + version: 16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1)(react@18.3.1) '@types/react': - specifier: ^18.3.5 - version: 18.3.5 + specifier: ^18.3.12 + version: 18.3.12 '@types/react-dom': - specifier: ^18.3.0 - version: 18.3.0 + specifier: ^18.3.1 + version: 18.3.1 react: specifier: ^18.3.1 version: 18.3.1 react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) + test-utils: + specifier: workspace:* + version: link:../test-utils + typescript: + specifier: ^5.6.3 + version: 5.6.3 + + packages/connect-query-core: + devDependencies: + '@arethetypeswrong/cli': + specifier: ^0.16.4 + version: 0.16.4 + '@bufbuild/buf': + specifier: 1.46.0 + version: 1.46.0 + '@bufbuild/jest-environment-jsdom': + specifier: ^0.1.1 + version: 0.1.1(jest-environment-jsdom@29.7.0) + '@bufbuild/protobuf': + specifier: ^2.2.1 + version: 2.2.1 + '@bufbuild/protoc-gen-es': + specifier: ^2.2.1 + version: 2.2.1(@bufbuild/protobuf@2.2.1) + '@connectrpc/connect': + specifier: ^2.0.0-rc.2 + version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1) + '@connectrpc/connect-web': + specifier: ^2.0.0-rc.2 + version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.2) + '@tanstack/query-core': + specifier: ^5.59.16 + version: 5.59.16 + test-utils: + specifier: workspace:* + version: link:../test-utils typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.3 + version: 5.6.3 packages/protoc-gen-connect-query: dependencies: '@bufbuild/protobuf': - specifier: ^1.10.0 - version: 1.10.0 + specifier: ^2.2.1 + version: 2.2.1 '@bufbuild/protoplugin': - specifier: ^1.10.0 - version: 1.10.0 + specifier: ^2.2.1 + version: 2.2.1 devDependencies: '@bufbuild/buf': - specifier: 1.43.0 - version: 1.43.0 + specifier: 1.46.0 + version: 1.46.0 '@bufbuild/protoc-gen-es': - specifier: ^1.10.0 - version: 1.10.0(@bufbuild/protobuf@1.10.0) + specifier: ^2.2.1 + version: 2.2.1(@bufbuild/protobuf@2.2.1) '@connectrpc/connect': - specifier: ^1.5.0 - version: 1.5.0(@bufbuild/protobuf@1.10.0) + specifier: ^2.0.0-rc.2 + version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1) '@connectrpc/connect-query': specifier: workspace:* version: link:../connect-query - '@connectrpc/protoc-gen-connect-es': - specifier: ^1.5.0 - version: 1.5.0(@bufbuild/protoc-gen-es@1.10.0)(@connectrpc/connect@1.5.0) '@tanstack/react-query': specifier: ^5.59.16 version: 5.59.16(react@18.3.1) typescript: - specifier: ^5.5.4 - version: 5.5.4 + specifier: ^5.6.3 + version: 5.6.3 -packages: + packages/test-utils: + devDependencies: + '@bufbuild/buf': + specifier: ^1.46.0 + version: 1.46.0 + '@bufbuild/protobuf': + specifier: ^2.2.1 + version: 2.2.1 + '@bufbuild/protoc-gen-es': + specifier: ^2.2.1 + version: 2.2.1(@bufbuild/protobuf@2.2.1) + '@connectrpc/connect': + specifier: ^2.0.0-rc.2 + version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1) + '@connectrpc/connect-web': + specifier: ^2.0.0-rc.2 + version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.2) + '@types/react': + specifier: 18.3.12 + version: 18.3.12 + react: + specifier: ^18.3.1 + version: 18.3.1 - /@aashutoshrathi/word-wrap@1.2.6: - resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} - engines: {node: '>=0.10.0'} - dev: true +packages: /@adobe/css-tools@4.4.0: resolution: {integrity: sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==} @@ -235,40 +278,33 @@ packages: resolution: {integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==} dev: true - /@arethetypeswrong/cli@0.15.4: - resolution: {integrity: sha512-YDbImAi1MGkouT7f2yAECpUMFhhA1J0EaXzIqoC5GGtK0xDgauLtcsZezm8tNq7d3wOFXH7OnY+IORYcG212rw==} + /@arethetypeswrong/cli@0.16.4: + resolution: {integrity: sha512-qMmdVlJon5FtA+ahn0c1oAVNxiq4xW5lqFiTZ21XHIeVwAVIQ+uRz4UEivqRMsjVV1grzRgJSKqaOrq1MvlVyQ==} engines: {node: '>=18'} hasBin: true dependencies: - '@arethetypeswrong/core': 0.15.1 + '@arethetypeswrong/core': 0.16.4 chalk: 4.1.2 - cli-table3: 0.6.3 + cli-table3: 0.6.5 commander: 10.0.1 marked: 9.1.6 - marked-terminal: 7.1.0(marked@9.1.6) + marked-terminal: 7.2.1(marked@9.1.6) semver: 7.6.3 dev: true - /@arethetypeswrong/core@0.15.1: - resolution: {integrity: sha512-FYp6GBAgsNz81BkfItRz8RLZO03w5+BaeiPma1uCfmxTnxbtuMrI/dbzGiOk8VghO108uFI0oJo0OkewdSHw7g==} + /@arethetypeswrong/core@0.16.4: + resolution: {integrity: sha512-RI3HXgSuKTfcBf1hSEg1P9/cOvmI0flsMm6/QL3L3wju4AlHDqd55JFPfXs4pzgEAgy5L9pul4/HPPz99x2GvA==} engines: {node: '>=18'} dependencies: '@andrewbranch/untar.js': 1.0.3 + cjs-module-lexer: 1.4.1 fflate: 0.8.2 + lru-cache: 10.4.3 semver: 7.6.3 - ts-expose-internals-conditionally: 1.0.0-empty.0 - typescript: 5.3.3 - validate-npm-package-name: 5.0.0 + typescript: 5.6.1-rc + validate-npm-package-name: 5.0.1 dev: true - /@babel/code-frame@7.24.7: - resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.24.7 - picocolors: 1.0.1 - dev: false - /@babel/code-frame@7.26.2: resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} @@ -277,25 +313,25 @@ packages: js-tokens: 4.0.0 picocolors: 1.1.1 - /@babel/compat-data@7.24.7: - resolution: {integrity: sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==} + /@babel/compat-data@7.26.2: + resolution: {integrity: sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==} engines: {node: '>=6.9.0'} dev: false - /@babel/core@7.24.7: - resolution: {integrity: sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==} + /@babel/core@7.26.0: + resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.7 - '@babel/helper-compilation-targets': 7.24.7 - '@babel/helper-module-transforms': 7.24.7(@babel/core@7.24.7) - '@babel/helpers': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/template': 7.24.7 - '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helpers': 7.26.0 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 convert-source-map: 2.0.0 debug: 4.3.7 gensync: 1.0.0-beta.2 @@ -305,104 +341,59 @@ packages: - supports-color dev: false - /@babel/generator@7.24.7: - resolution: {integrity: sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==} + /@babel/generator@7.26.2: + resolution: {integrity: sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.7 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 + jsesc: 3.0.2 dev: false - /@babel/helper-compilation-targets@7.24.7: - resolution: {integrity: sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==} + /@babel/helper-compilation-targets@7.25.9: + resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/compat-data': 7.24.7 - '@babel/helper-validator-option': 7.24.7 - browserslist: 4.23.1 + '@babel/compat-data': 7.26.2 + '@babel/helper-validator-option': 7.25.9 + browserslist: 4.24.2 lru-cache: 5.1.1 semver: 6.3.1 dev: false - /@babel/helper-environment-visitor@7.24.7: - resolution: {integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.7 - dev: false - - /@babel/helper-function-name@7.24.7: - resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.7 - dev: false - - /@babel/helper-hoist-variables@7.24.7: - resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==} + /@babel/helper-module-imports@7.25.9: + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.24.7 - dev: false - - /@babel/helper-module-imports@7.24.7: - resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color dev: false - /@babel/helper-module-transforms@7.24.7(@babel/core@7.24.7): - resolution: {integrity: sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==} + /@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0): + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.24.7 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-module-imports': 7.24.7 - '@babel/helper-simple-access': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 - '@babel/helper-validator-identifier': 7.24.7 - transitivePeerDependencies: - - supports-color - dev: false - - /@babel/helper-plugin-utils@7.24.6: - resolution: {integrity: sha512-MZG/JcWfxybKwsA9N9PmtF2lOSFSEMVCpIRrbxccZFLJPrJciJdG/UhSh5W96GEteJI2ARqm5UAHxISwRDLSNg==} - engines: {node: '>=6.9.0'} - dev: false - - /@babel/helper-simple-access@7.24.7: - resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/traverse': 7.24.7 - '@babel/types': 7.24.7 + '@babel/core': 7.26.0 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color dev: false - /@babel/helper-split-export-declaration@7.24.7: - resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.7 - dev: false - - /@babel/helper-string-parser@7.24.7: - resolution: {integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==} + /@babel/helper-plugin-utils@7.25.9: + resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} engines: {node: '>=6.9.0'} dev: false - /@babel/helper-validator-identifier@7.24.7: - resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + /@babel/helper-string-parser@7.25.9: + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} dev: false @@ -410,165 +401,145 @@ packages: resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-option@7.24.7: - resolution: {integrity: sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==} + /@babel/helper-validator-option@7.25.9: + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} engines: {node: '>=6.9.0'} dev: false - /@babel/helpers@7.24.7: - resolution: {integrity: sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==} + /@babel/helpers@7.26.0: + resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.7 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 dev: false - /@babel/highlight@7.24.7: - resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.24.7 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.0.1 - dev: false - - /@babel/parser@7.24.7: - resolution: {integrity: sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==} + /@babel/parser@7.26.2: + resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.0 dev: false - /@babel/plugin-transform-react-jsx-self@7.24.6(@babel/core@7.24.7): - resolution: {integrity: sha512-FfZfHXtQ5jYPQsCRyLpOv2GeLIIJhs8aydpNh39vRDjhD411XcfWDni5i7OjP/Rs8GAtTn7sWFFELJSHqkIxYg==} + /@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.0): + resolution: {integrity: sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: false - /@babel/plugin-transform-react-jsx-source@7.24.6(@babel/core@7.24.7): - resolution: {integrity: sha512-BQTBCXmFRreU3oTUXcGKuPOfXAGb1liNY4AvvFKsOBAJ89RKcTsIrSsnMYkj59fNa66OFKnSa4AJZfy5Y4B9WA==} + /@babel/plugin-transform-react-jsx-source@7.25.9(@babel/core@7.26.0): + resolution: {integrity: sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.24.7 - '@babel/helper-plugin-utils': 7.24.6 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 dev: false - /@babel/runtime@7.25.6: - resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==} - engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.14.1 - /@babel/runtime@7.26.0: resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.1 - /@babel/template@7.24.7: - resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} + /@babel/template@7.25.9: + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 dev: false - /@babel/traverse@7.24.7: - resolution: {integrity: sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==} + /@babel/traverse@7.25.9: + resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.7 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-function-name': 7.24.7 - '@babel/helper-hoist-variables': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: false - /@babel/types@7.24.7: - resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==} + /@babel/types@7.26.0: + resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-string-parser': 7.24.7 - '@babel/helper-validator-identifier': 7.24.7 - to-fast-properties: 2.0.0 + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 dev: false - /@bufbuild/buf-darwin-arm64@1.43.0: - resolution: {integrity: sha512-IBVd4qpN8udUOwmqDB8KdGz8JUqVYq8yXN2MOj6JN7XFhaq0xAVfWsuQNOW4Uzukh+Ypg8EOb1nsJubOUbVe6g==} + /@bufbuild/buf-darwin-arm64@1.46.0: + resolution: {integrity: sha512-lSmTKyRhg+71acXp9QeX/wm+vjkf0J3n38wph7KOwMfCEeK4A2AkqsGOkoXSiaIvidA2pRU9RJRQYfryzCA9Pg==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@bufbuild/buf-darwin-x64@1.43.0: - resolution: {integrity: sha512-XeuLdJIdOXzLpLA95k5NWhO6cJw5YW89IJW6OHENkxXkdf9aWzg9ozrhTpPzUoZmGZbNyXfpa7kbhJaJ5+F42w==} + /@bufbuild/buf-darwin-x64@1.46.0: + resolution: {integrity: sha512-Oa9XTLJshsEjzowyt2mH9XrXW38DRFdz7ml+IYKXVQPotNLr04ix7QES7A1eOBJtxLwuTiri4ScXuBLQGNX8+A==} engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@bufbuild/buf-linux-aarch64@1.43.0: - resolution: {integrity: sha512-7hyXvwM5NFY08+aqbxVx4GZ/3AsqZKas3bR5TFLuD8/4u4JfA59b9+YMzLL1bxHFLqMMeXJBLgIVkyTtQIXGVg==} + /@bufbuild/buf-linux-aarch64@1.46.0: + resolution: {integrity: sha512-CbxbLH5sQCRjEKVEcWJySvCKyAPAUhX0vCTifT/eQyZ70FUsqCJKJ6+dKl6Ajk0CgUHqf8jkU/wX/+aQFYXyaA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@bufbuild/buf-linux-x64@1.43.0: - resolution: {integrity: sha512-4mg6ZUNpW2C61vmPyQDolLRIsfAomd2Yv1PICC9XG1iQtf3xQ+6q5B/kihOadhG2AN31WeKdorvuyPL7vmbsDA==} + /@bufbuild/buf-linux-x64@1.46.0: + resolution: {integrity: sha512-bMqp+Q+16KPbuwX34/OLDeiimnwt5sfvHqyeMeRz4LLwLshbmM3m+8dGCSHZRo3Lr+4gW1PfunrfaEmcGqPHLQ==} engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@bufbuild/buf-win32-arm64@1.43.0: - resolution: {integrity: sha512-YKoiA5Ui8VBW0GaWthDLBYr1C3I4Fx/j9txrUpg3Fvf+iwWutWQuTdA6W95HnLzUyhT6KnBMbXmB+SzosW9iFg==} + /@bufbuild/buf-win32-arm64@1.46.0: + resolution: {integrity: sha512-geVYXp1PWJiAAFpwhgP8Cnct0+Rdr89BF/WZoIh5WwFGYITGiu5Hb1Ui9DTrEYwDzahPCyPxgIVwzzW6kPWSag==} engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@bufbuild/buf-win32-x64@1.43.0: - resolution: {integrity: sha512-//t0ndbP7zkQDydwAXShCqsqgOGX/ktsS2g0+D9A5Aw/nyLTxBmfsN+7hPxL4o0qq2N4MKs6DJeP4TvjYKBaMA==} + /@bufbuild/buf-win32-x64@1.46.0: + resolution: {integrity: sha512-6nsxkzj5a1L41NOJFKjli8j6GB/NkPHLIr0T/b27Y3GfprVYQawOComYD5HfojvBLuAiE2cD/kEQIWKK1YRcng==} engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true optional: true - /@bufbuild/buf@1.43.0: - resolution: {integrity: sha512-lWiH+QJ8l0TGWP1KELvIA5BvAsZc0IiXppJlwI8EdQ2vQp39Ue2Xub8b13uy6IH0VDm9azQEjXuY1FxdB4mqsA==} + /@bufbuild/buf@1.46.0: + resolution: {integrity: sha512-uN3NKuAKvcQcZc1hn9+njSCusL7NAILqQI7mlkDDa4kRy7cTsiw53ggddfAs0YXbQ8zZnmudwwWjKRDIUaRqXQ==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@bufbuild/buf-darwin-arm64': 1.43.0 - '@bufbuild/buf-darwin-x64': 1.43.0 - '@bufbuild/buf-linux-aarch64': 1.43.0 - '@bufbuild/buf-linux-x64': 1.43.0 - '@bufbuild/buf-win32-arm64': 1.43.0 - '@bufbuild/buf-win32-x64': 1.43.0 + '@bufbuild/buf-darwin-arm64': 1.46.0 + '@bufbuild/buf-darwin-x64': 1.46.0 + '@bufbuild/buf-linux-aarch64': 1.46.0 + '@bufbuild/buf-linux-x64': 1.46.0 + '@bufbuild/buf-win32-arm64': 1.46.0 + '@bufbuild/buf-win32-x64': 1.46.0 /@bufbuild/jest-environment-jsdom@0.1.1(jest-environment-jsdom@29.7.0): resolution: {integrity: sha512-lO4dke+l/LQAUT8CLmh0SKtY37gmax63eD7YSBQu48sqwAx4hgu1hRmoheRysaqR4bO6Vudhf6+nkBm0TbctvA==} @@ -585,30 +556,30 @@ packages: picomatch: 2.3.1 dev: true - /@bufbuild/protobuf@1.10.0: - resolution: {integrity: sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==} + /@bufbuild/protobuf@2.2.1: + resolution: {integrity: sha512-gdWzq7eX017a1kZCU/bP/sbk4e0GZ6idjsXOcMrQwODCb/rx985fHJJ8+hCu79KpuG7PfZh7bo3BBjPH37JuZw==} - /@bufbuild/protoc-gen-es@1.10.0(@bufbuild/protobuf@1.10.0): - resolution: {integrity: sha512-zBYBsVT/ul4uZb6F+kD7/k4sWNHVVbEPfJwKi0FDr+9VJo8MKIofI6pkr5ksBLr4fi/74r+e/75Xi/0clL5dXg==} + /@bufbuild/protoc-gen-es@2.2.1(@bufbuild/protobuf@2.2.1): + resolution: {integrity: sha512-ysaQTf52lYQTdK0zWpfgxKHVQqCoSe6TV3rD+JZUbiyqT4zloII7VZqmAWXoHk0SZiWdCIvkzMIHQpBxN7v6nA==} engines: {node: '>=14'} hasBin: true peerDependencies: - '@bufbuild/protobuf': 1.10.0 + '@bufbuild/protobuf': 2.2.1 peerDependenciesMeta: '@bufbuild/protobuf': optional: true dependencies: - '@bufbuild/protobuf': 1.10.0 - '@bufbuild/protoplugin': 1.10.0 + '@bufbuild/protobuf': 2.2.1 + '@bufbuild/protoplugin': 2.2.1 transitivePeerDependencies: - supports-color - /@bufbuild/protoplugin@1.10.0: - resolution: {integrity: sha512-u6NE4vL0lw1+EK4/PiE/SQB7fKO4LRJNTEScIXVOi2x88K/c8WKc/k0KyEaA0asVBMpwekJQZGnRyj04ZtN5Gg==} + /@bufbuild/protoplugin@2.2.1: + resolution: {integrity: sha512-dyHRQeUSwMIKSoZZ4l6CuXnggdwf3qlAMppHeKObK1OD++4qdhTveDGmTC+ASFF3IZkoxSYPUq+3e3OdRIKCYg==} dependencies: - '@bufbuild/protobuf': 1.10.0 - '@typescript/vfs': 1.6.0(typescript@4.5.2) - typescript: 4.5.2 + '@bufbuild/protobuf': 2.2.1 + '@typescript/vfs': 1.6.0(typescript@5.4.5) + typescript: 5.4.5 transitivePeerDependencies: - supports-color @@ -619,374 +590,370 @@ packages: dev: true optional: true - /@connectrpc/connect-web@1.5.0(@bufbuild/protobuf@1.10.0)(@connectrpc/connect@1.5.0): - resolution: {integrity: sha512-xjiiQ932Kibddaka18fGZ6yQL7xjXuLcYFYh/cU+q1WWEIrFPkZfViG/Ee6yrZbrlZkjcBuDibng+q7baTndfg==} + /@connectrpc/connect-web@2.0.0-rc.2(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.2): + resolution: {integrity: sha512-HMIDXahQtPNcmsLVfHxjKLp4oRz2b89VOCMJpt3zNMd1fzC27Ipf7Wf+7OPmER61xc9mJVkMY0D6XUPw0vB9aQ==} peerDependencies: - '@bufbuild/protobuf': ^1.10.0 - '@connectrpc/connect': 1.5.0 + '@bufbuild/protobuf': ^2.2.0 + '@connectrpc/connect': 2.0.0-rc.2 dependencies: - '@bufbuild/protobuf': 1.10.0 - '@connectrpc/connect': 1.5.0(@bufbuild/protobuf@1.10.0) + '@bufbuild/protobuf': 2.2.1 + '@connectrpc/connect': 2.0.0-rc.2(@bufbuild/protobuf@2.2.1) - /@connectrpc/connect@1.5.0(@bufbuild/protobuf@1.10.0): - resolution: {integrity: sha512-1gGg0M6c2Y3lnr5itis9dNj9r8hbOIuBMqoGSbUy7L7Vjw4MAttjJzJfj9HCDgytGCJkGanYEYI6MQVDijdVQw==} + /@connectrpc/connect@2.0.0-rc.2(@bufbuild/protobuf@2.2.1): + resolution: {integrity: sha512-EBXUD82U1Z6eWhFu+90ZvuEUCM8K03gV7cGNSQXJ9kDV07dfuvm/LevbzMEsST43Wea6ywYzd2HBNEAPJCxu8g==} peerDependencies: - '@bufbuild/protobuf': ^1.10.0 - dependencies: - '@bufbuild/protobuf': 1.10.0 - - /@connectrpc/protoc-gen-connect-es@1.5.0(@bufbuild/protoc-gen-es@1.10.0)(@connectrpc/connect@1.5.0): - resolution: {integrity: sha512-W3FX/mFPEY3rOIiIbxxUnIpQOPeFrwyhNL5m/JGBJ1lh5PAF0FH4WImJsnN9UAJR1HMkwf6RMfKVLuxFqu3KTA==} - engines: {node: '>=16.0.0'} - hasBin: true - peerDependencies: - '@bufbuild/protoc-gen-es': ^1.10.0 - '@connectrpc/connect': 1.5.0 - peerDependenciesMeta: - '@bufbuild/protoc-gen-es': - optional: true - '@connectrpc/connect': - optional: true + '@bufbuild/protobuf': ^2.2.0 dependencies: - '@bufbuild/protobuf': 1.10.0 - '@bufbuild/protoc-gen-es': 1.10.0(@bufbuild/protobuf@1.10.0) - '@bufbuild/protoplugin': 1.10.0 - '@connectrpc/connect': 1.5.0(@bufbuild/protobuf@1.10.0) - transitivePeerDependencies: - - supports-color + '@bufbuild/protobuf': 2.2.1 - /@cspell/cspell-bundled-dicts@8.14.2: - resolution: {integrity: sha512-Kv2Utj/RTSxfufGXkkoTZ/3ErCsYWpCijtDFr/FwSsM7mC0PzLpdlcD9xjtgrJO5Kwp7T47iTG21U4Mwddyi8Q==} + /@cspell/cspell-bundled-dicts@8.15.5: + resolution: {integrity: sha512-Su1gnTBbE7ouMQvM4DISUmP6sZiFyQRE+ODvjBzW+c/x9ZLbVp+2hBEEmxFSn5fdZCJzPOMwzwsjlLYykb9iUg==} engines: {node: '>=18'} dependencies: - '@cspell/dict-ada': 4.0.2 - '@cspell/dict-aws': 4.0.3 - '@cspell/dict-bash': 4.1.3 - '@cspell/dict-companies': 3.1.4 - '@cspell/dict-cpp': 5.1.12 - '@cspell/dict-cryptocurrencies': 5.0.0 - '@cspell/dict-csharp': 4.0.2 - '@cspell/dict-css': 4.0.13 - '@cspell/dict-dart': 2.0.3 - '@cspell/dict-django': 4.1.0 - '@cspell/dict-docker': 1.1.7 - '@cspell/dict-dotnet': 5.0.2 - '@cspell/dict-elixir': 4.0.3 - '@cspell/dict-en-common-misspellings': 2.0.4 + '@cspell/dict-ada': 4.0.5 + '@cspell/dict-al': 1.0.3 + '@cspell/dict-aws': 4.0.7 + '@cspell/dict-bash': 4.1.8 + '@cspell/dict-companies': 3.1.7 + '@cspell/dict-cpp': 5.1.23 + '@cspell/dict-cryptocurrencies': 5.0.3 + '@cspell/dict-csharp': 4.0.5 + '@cspell/dict-css': 4.0.16 + '@cspell/dict-dart': 2.2.4 + '@cspell/dict-django': 4.1.3 + '@cspell/dict-docker': 1.1.11 + '@cspell/dict-dotnet': 5.0.8 + '@cspell/dict-elixir': 4.0.6 + '@cspell/dict-en-common-misspellings': 2.0.7 '@cspell/dict-en-gb': 1.1.33 - '@cspell/dict-en_us': 4.3.23 - '@cspell/dict-filetypes': 3.0.4 - '@cspell/dict-fonts': 4.0.0 - '@cspell/dict-fsharp': 1.0.1 - '@cspell/dict-fullstack': 3.2.0 - '@cspell/dict-gaming-terms': 1.0.5 - '@cspell/dict-git': 3.0.0 - '@cspell/dict-golang': 6.0.9 - '@cspell/dict-google': 1.0.1 - '@cspell/dict-haskell': 4.0.1 - '@cspell/dict-html': 4.0.5 - '@cspell/dict-html-symbol-entities': 4.0.0 - '@cspell/dict-java': 5.0.7 - '@cspell/dict-julia': 1.0.1 - '@cspell/dict-k8s': 1.0.6 - '@cspell/dict-latex': 4.0.0 - '@cspell/dict-lorem-ipsum': 4.0.0 - '@cspell/dict-lua': 4.0.3 - '@cspell/dict-makefile': 1.0.0 - '@cspell/dict-monkeyc': 1.0.6 - '@cspell/dict-node': 5.0.1 - '@cspell/dict-npm': 5.0.18 - '@cspell/dict-php': 4.0.8 - '@cspell/dict-powershell': 5.0.5 - '@cspell/dict-public-licenses': 2.0.7 - '@cspell/dict-python': 4.2.6 - '@cspell/dict-r': 2.0.1 - '@cspell/dict-ruby': 5.0.2 - '@cspell/dict-rust': 4.0.5 - '@cspell/dict-scala': 5.0.3 - '@cspell/dict-software-terms': 4.1.3 - '@cspell/dict-sql': 2.1.5 - '@cspell/dict-svelte': 1.0.2 - '@cspell/dict-swift': 2.0.1 - '@cspell/dict-terraform': 1.0.0 - '@cspell/dict-typescript': 3.1.6 - '@cspell/dict-vue': 3.0.0 - dev: true - - /@cspell/cspell-json-reporter@8.14.2: - resolution: {integrity: sha512-TZavcnNIZKX1xC/GNj80RgFVKHCT4pHT0qm9jCsQFH2QJfyCrUlkEvotKGSQ04lAyCwWg6Enq95qhouF8YbKUQ==} + '@cspell/dict-en_us': 4.3.26 + '@cspell/dict-filetypes': 3.0.8 + '@cspell/dict-flutter': 1.0.3 + '@cspell/dict-fonts': 4.0.3 + '@cspell/dict-fsharp': 1.0.4 + '@cspell/dict-fullstack': 3.2.3 + '@cspell/dict-gaming-terms': 1.0.8 + '@cspell/dict-git': 3.0.3 + '@cspell/dict-golang': 6.0.16 + '@cspell/dict-google': 1.0.4 + '@cspell/dict-haskell': 4.0.4 + '@cspell/dict-html': 4.0.10 + '@cspell/dict-html-symbol-entities': 4.0.3 + '@cspell/dict-java': 5.0.10 + '@cspell/dict-julia': 1.0.4 + '@cspell/dict-k8s': 1.0.9 + '@cspell/dict-latex': 4.0.3 + '@cspell/dict-lorem-ipsum': 4.0.3 + '@cspell/dict-lua': 4.0.6 + '@cspell/dict-makefile': 1.0.3 + '@cspell/dict-markdown': 2.0.7(@cspell/dict-css@4.0.16)(@cspell/dict-html-symbol-entities@4.0.3)(@cspell/dict-html@4.0.10)(@cspell/dict-typescript@3.1.11) + '@cspell/dict-monkeyc': 1.0.9 + '@cspell/dict-node': 5.0.4 + '@cspell/dict-npm': 5.1.8 + '@cspell/dict-php': 4.0.13 + '@cspell/dict-powershell': 5.0.13 + '@cspell/dict-public-licenses': 2.0.11 + '@cspell/dict-python': 4.2.12 + '@cspell/dict-r': 2.0.4 + '@cspell/dict-ruby': 5.0.7 + '@cspell/dict-rust': 4.0.9 + '@cspell/dict-scala': 5.0.6 + '@cspell/dict-software-terms': 4.1.12 + '@cspell/dict-sql': 2.1.8 + '@cspell/dict-svelte': 1.0.5 + '@cspell/dict-swift': 2.0.4 + '@cspell/dict-terraform': 1.0.5 + '@cspell/dict-typescript': 3.1.11 + '@cspell/dict-vue': 3.0.3 + dev: true + + /@cspell/cspell-json-reporter@8.15.5: + resolution: {integrity: sha512-yXd7KDBfUkA6y+MrOqK3q/UWorZgLIgyCZoFb0Pj67OU2ZMtgJ1VGFXAdzpKAEgEmdcblyoFzHkleYbg08qS6g==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-types': 8.14.2 + '@cspell/cspell-types': 8.15.5 dev: true - /@cspell/cspell-pipe@8.14.2: - resolution: {integrity: sha512-aWMoXZAXEre0/M9AYWOW33YyOJZ06i4vvsEpWBDWpHpWQEmsR/7cMMgld8Pp3wlEjIUclUAKTYmrZ61PFWU/og==} + /@cspell/cspell-pipe@8.15.5: + resolution: {integrity: sha512-X8QY73060hkR8040jabNJsvydeTG0owpqr9S0QJDdhG1z8uzenNcwR3hfwaIwQq5d6sIKcDFZY5qrO4x6eEAMw==} engines: {node: '>=18'} dev: true - /@cspell/cspell-resolver@8.14.2: - resolution: {integrity: sha512-pSyBsAvslaN0dx0pHdvECJEuFDDBJGAD6G8U4BVbIyj2OPk0Ox0HrZIj6csYxxoJERAgNO/q7yCPwa4j9NNFXg==} + /@cspell/cspell-resolver@8.15.5: + resolution: {integrity: sha512-ejzUGLEwI8TQWXovQzzvAgSNToRrQe3h97YrH2XaB9rZDKkeA7dIBZDQ/OgOfidO+ZAsPIOxdHai3CBzEHYX3A==} engines: {node: '>=18'} dependencies: global-directory: 4.0.1 dev: true - /@cspell/cspell-service-bus@8.14.2: - resolution: {integrity: sha512-WUF7xf3YgXYIqjmBwLcVugYIrYL4WfXchgSo9rmbbnOcAArzsK+HKfzb4AniZAJ1unxcIQ0JnVlRmnCAKPjjLg==} + /@cspell/cspell-service-bus@8.15.5: + resolution: {integrity: sha512-zZJRRvNhvUJntnw8sX4J5gE4uIHpX2oe+Tqs3lu2vRwogadNEXE4QNJbEQyQqgMePgmqULtRdxSBzG4wy4HoQg==} engines: {node: '>=18'} dev: true - /@cspell/cspell-types@8.14.2: - resolution: {integrity: sha512-MRY8MjBNOKGMDSkxAKueYAgVL43miO+lDcLCBBP+7cNXqHiUFMIZteONcGp3kJT0dWS04dN6lKAXvaNF0aWcng==} + /@cspell/cspell-types@8.15.5: + resolution: {integrity: sha512-bMRq9slD/D0vXckxe9vubG02HXrV4cASo6Ytkaw8rTfxMKpkBgxJWjFWphCFLOCICD71q45fUSg+W5vCp83f/Q==} engines: {node: '>=18'} dev: true - /@cspell/dict-ada@4.0.2: - resolution: {integrity: sha512-0kENOWQeHjUlfyId/aCM/mKXtkEgV0Zu2RhUXCBr4hHo9F9vph+Uu8Ww2b0i5a4ZixoIkudGA+eJvyxrG1jUpA==} + /@cspell/dict-ada@4.0.5: + resolution: {integrity: sha512-6/RtZ/a+lhFVmrx/B7bfP7rzC4yjEYe8o74EybXcvu4Oue6J4Ey2WSYj96iuodloj1LWrkNCQyX5h4Pmcj0Iag==} + dev: true + + /@cspell/dict-al@1.0.3: + resolution: {integrity: sha512-V1HClwlfU/qwSq2Kt+MkqRAsonNu3mxjSCDyGRecdLGIHmh7yeEeaxqRiO/VZ4KP+eVSiSIlbwrb5YNFfxYZbw==} dev: true - /@cspell/dict-aws@4.0.3: - resolution: {integrity: sha512-0C0RQ4EM29fH0tIYv+EgDQEum0QI6OrmjENC9u98pB8UcnYxGG/SqinuPxo+TgcEuInj0Q73MsBpJ1l5xUnrsw==} + /@cspell/dict-aws@4.0.7: + resolution: {integrity: sha512-PoaPpa2NXtSkhGIMIKhsJUXB6UbtTt6Ao3x9JdU9kn7fRZkwD4RjHDGqulucIOz7KeEX/dNRafap6oK9xHe4RA==} dev: true - /@cspell/dict-bash@4.1.3: - resolution: {integrity: sha512-tOdI3QVJDbQSwPjUkOiQFhYcu2eedmX/PtEpVWg0aFps/r6AyjUQINtTgpqMYnYuq8O1QUIQqnpx21aovcgZCw==} + /@cspell/dict-bash@4.1.8: + resolution: {integrity: sha512-I2CM2pTNthQwW069lKcrVxchJGMVQBzru2ygsHCwgidXRnJL/NTjAPOFTxN58Jc1bf7THWghfEDyKX/oyfc0yg==} dev: true - /@cspell/dict-companies@3.1.4: - resolution: {integrity: sha512-y9e0amzEK36EiiKx3VAA+SHQJPpf2Qv5cCt5eTUSggpTkiFkCh6gRKQ97rVlrKh5GJrqinDwYIJtTsxuh2vy2Q==} + /@cspell/dict-companies@3.1.7: + resolution: {integrity: sha512-ncVs/efuAkP1/tLDhWbXukBjgZ5xOUfe03neHMWsE8zvXXc5+Lw6TX5jaJXZLOoES/f4j4AhRE20jsPCF5pm+A==} dev: true - /@cspell/dict-cpp@5.1.12: - resolution: {integrity: sha512-6lXLOFIa+k/qBcu0bjaE/Kc6v3sh9VhsDOXD1Dalm3zgd0QIMjp5XBmkpSdCAK3pWCPV0Se7ysVLDfCea1BuXg==} + /@cspell/dict-cpp@5.1.23: + resolution: {integrity: sha512-59VUam6bYWzn50j8FASWWLww0rBPA0PZfjMZBvvt0aqMpkvXzoJPnAAI4eDDSibPWVHKutjpqLmast+uMLHVsQ==} dev: true - /@cspell/dict-cryptocurrencies@5.0.0: - resolution: {integrity: sha512-Z4ARIw5+bvmShL+4ZrhDzGhnc9znaAGHOEMaB/GURdS/jdoreEDY34wdN0NtdLHDO5KO7GduZnZyqGdRoiSmYA==} + /@cspell/dict-cryptocurrencies@5.0.3: + resolution: {integrity: sha512-bl5q+Mk+T3xOZ12+FG37dB30GDxStza49Rmoax95n37MTLksk9wBo1ICOlPJ6PnDUSyeuv4SIVKgRKMKkJJglA==} dev: true - /@cspell/dict-csharp@4.0.2: - resolution: {integrity: sha512-1JMofhLK+4p4KairF75D3A924m5ERMgd1GvzhwK2geuYgd2ZKuGW72gvXpIV7aGf52E3Uu1kDXxxGAiZ5uVG7g==} + /@cspell/dict-csharp@4.0.5: + resolution: {integrity: sha512-c/sFnNgtRwRJxtC3JHKkyOm+U3/sUrltFeNwml9VsxKBHVmvlg4tk4ar58PdpW9/zTlGUkWi2i85//DN1EsUCA==} dev: true - /@cspell/dict-css@4.0.13: - resolution: {integrity: sha512-WfOQkqlAJTo8eIQeztaH0N0P+iF5hsJVKFuhy4jmARPISy8Efcv8QXk2/IVbmjJH0/ZV7dKRdnY5JFVXuVz37g==} + /@cspell/dict-css@4.0.16: + resolution: {integrity: sha512-70qu7L9z/JR6QLyJPk38fNTKitlIHnfunx0wjpWQUQ8/jGADIhMCrz6hInBjqPNdtGpYm8d1dNFyF8taEkOgrQ==} dev: true - /@cspell/dict-dart@2.0.3: - resolution: {integrity: sha512-cLkwo1KT5CJY5N5RJVHks2genFkNCl/WLfj+0fFjqNR+tk3tBI1LY7ldr9piCtSFSm4x9pO1x6IV3kRUY1lLiw==} + /@cspell/dict-dart@2.2.4: + resolution: {integrity: sha512-of/cVuUIZZK/+iqefGln8G3bVpfyN6ZtH+LyLkHMoR5tEj+2vtilGNk9ngwyR8L4lEqbKuzSkOxgfVjsXf5PsQ==} dev: true - /@cspell/dict-data-science@2.0.1: - resolution: {integrity: sha512-xeutkzK0eBe+LFXOFU2kJeAYO6IuFUc1g7iRLr7HeCmlC4rsdGclwGHh61KmttL3+YHQytYStxaRBdGAXWC8Lw==} + /@cspell/dict-data-science@2.0.5: + resolution: {integrity: sha512-nNSILXmhSJox9/QoXICPQgm8q5PbiSQP4afpbkBqPi/u/b3K9MbNH5HvOOa6230gxcGdbZ9Argl2hY/U8siBlg==} dev: true - /@cspell/dict-django@4.1.0: - resolution: {integrity: sha512-bKJ4gPyrf+1c78Z0Oc4trEB9MuhcB+Yg+uTTWsvhY6O2ncFYbB/LbEZfqhfmmuK/XJJixXfI1laF2zicyf+l0w==} + /@cspell/dict-django@4.1.3: + resolution: {integrity: sha512-yBspeL3roJlO0a1vKKNaWABURuHdHZ9b1L8d3AukX0AsBy9snSggc8xCavPmSzNfeMDXbH+1lgQiYBd3IW03fg==} dev: true - /@cspell/dict-docker@1.1.7: - resolution: {integrity: sha512-XlXHAr822euV36GGsl2J1CkBIVg3fZ6879ZOg5dxTIssuhUOCiV2BuzKZmt6aIFmcdPmR14+9i9Xq+3zuxeX0A==} + /@cspell/dict-docker@1.1.11: + resolution: {integrity: sha512-s0Yhb16/R+UT1y727ekbR/itWQF3Qz275DR1ahOa66wYtPjHUXmhM3B/LT3aPaX+hD6AWmK23v57SuyfYHUjsw==} dev: true - /@cspell/dict-dotnet@5.0.2: - resolution: {integrity: sha512-UD/pO2A2zia/YZJ8Kck/F6YyDSpCMq0YvItpd4YbtDVzPREfTZ48FjZsbYi4Jhzwfvc6o8R56JusAE58P+4sNQ==} + /@cspell/dict-dotnet@5.0.8: + resolution: {integrity: sha512-MD8CmMgMEdJAIPl2Py3iqrx3B708MbCIXAuOeZ0Mzzb8YmLmiisY7QEYSZPg08D7xuwARycP0Ki+bb0GAkFSqg==} dev: true - /@cspell/dict-elixir@4.0.3: - resolution: {integrity: sha512-g+uKLWvOp9IEZvrIvBPTr/oaO6619uH/wyqypqvwpmnmpjcfi8+/hqZH8YNKt15oviK8k4CkINIqNhyndG9d9Q==} + /@cspell/dict-elixir@4.0.6: + resolution: {integrity: sha512-TfqSTxMHZ2jhiqnXlVKM0bUADtCvwKQv2XZL/DI0rx3doG8mEMS8SGPOmiyyGkHpR/pGOq18AFH3BEm4lViHIw==} dev: true - /@cspell/dict-en-common-misspellings@2.0.4: - resolution: {integrity: sha512-lvOiRjV/FG4pAGZL3PN2GCVHSTCE92cwhfLGGkOsQtxSmef6WCHfHwp9auafkBlX0yFQSKDfq6/TlpQbjbJBtQ==} + /@cspell/dict-en-common-misspellings@2.0.7: + resolution: {integrity: sha512-qNFo3G4wyabcwnM+hDrMYKN9vNVg/k9QkhqSlSst6pULjdvPyPs1mqz1689xO/v9t8e6sR4IKc3CgUXDMTYOpA==} dev: true /@cspell/dict-en-gb@1.1.33: resolution: {integrity: sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==} dev: true - /@cspell/dict-en_us@4.3.23: - resolution: {integrity: sha512-l0SoEQBsi3zDSl3OuL4/apBkxjuj4hLIg/oy6+gZ7LWh03rKdF6VNtSZNXWAmMY+pmb1cGA3ouleTiJIglbsIg==} + /@cspell/dict-en_us@4.3.26: + resolution: {integrity: sha512-hDbHYJsi3UgU1J++B0WLiYhWQdsmve3CH53FIaMRAdhrWOHcuw7h1dYkQXHFEP5lOjaq53KUHp/oh5su6VkIZg==} dev: true - /@cspell/dict-filetypes@3.0.4: - resolution: {integrity: sha512-IBi8eIVdykoGgIv5wQhOURi5lmCNJq0we6DvqKoPQJHthXbgsuO1qrHSiUVydMiQl/XvcnUWTMeAlVUlUClnVg==} + /@cspell/dict-filetypes@3.0.8: + resolution: {integrity: sha512-D3N8sm/iptzfVwsib/jvpX+K/++rM8SRpLDFUaM4jxm8EyGmSIYRbKZvdIv5BkAWmMlTWoRqlLn7Yb1b11jKJg==} dev: true - /@cspell/dict-fonts@4.0.0: - resolution: {integrity: sha512-t9V4GeN/m517UZn63kZPUYP3OQg5f0OBLSd3Md5CU3eH1IFogSvTzHHnz4Wqqbv8NNRiBZ3HfdY/pqREZ6br3Q==} + /@cspell/dict-flutter@1.0.3: + resolution: {integrity: sha512-52C9aUEU22ptpgYh6gQyIdA4MP6NPwzbEqndfgPh3Sra191/kgs7CVqXiO1qbtZa9gnYHUoVApkoxRE7mrXHfg==} dev: true - /@cspell/dict-fsharp@1.0.1: - resolution: {integrity: sha512-23xyPcD+j+NnqOjRHgW3IU7Li912SX9wmeefcY0QxukbAxJ/vAN4rBpjSwwYZeQPAn3fxdfdNZs03fg+UM+4yQ==} + /@cspell/dict-fonts@4.0.3: + resolution: {integrity: sha512-sPd17kV5qgYXLteuHFPn5mbp/oCHKgitNfsZLFC3W2fWEgZlhg4hK+UGig3KzrYhhvQ8wBnmZrAQm0TFKCKzsA==} dev: true - /@cspell/dict-fullstack@3.2.0: - resolution: {integrity: sha512-sIGQwU6G3rLTo+nx0GKyirR5dQSFeTIzFTOrURw51ISf+jKG9a3OmvsVtc2OANfvEAOLOC9Wfd8WYhmsO8KRDQ==} + /@cspell/dict-fsharp@1.0.4: + resolution: {integrity: sha512-G5wk0o1qyHUNi9nVgdE1h5wl5ylq7pcBjX8vhjHcO4XBq20D5eMoXjwqMo/+szKAqzJ+WV3BgAL50akLKrT9Rw==} dev: true - /@cspell/dict-gaming-terms@1.0.5: - resolution: {integrity: sha512-C3riccZDD3d9caJQQs1+MPfrUrQ+0KHdlj9iUR1QD92FgTOF6UxoBpvHUUZ9YSezslcmpFQK4xQQ5FUGS7uWfw==} + /@cspell/dict-fullstack@3.2.3: + resolution: {integrity: sha512-62PbndIyQPH11mAv0PyiyT0vbwD0AXEocPpHlCHzfb5v9SspzCCbzQ/LIBiFmyRa+q5LMW35CnSVu6OXdT+LKg==} dev: true - /@cspell/dict-git@3.0.0: - resolution: {integrity: sha512-simGS/lIiXbEaqJu9E2VPoYW1OTC2xrwPPXNXFMa2uo/50av56qOuaxDrZ5eH1LidFXwoc8HROCHYeKoNrDLSw==} + /@cspell/dict-gaming-terms@1.0.8: + resolution: {integrity: sha512-7OL0zTl93WFWhhtpXFrtm9uZXItC3ncAs8d0iQDMMFVNU1rBr6raBNxJskxE5wx2Ant12fgI66ZGVagXfN+yfA==} dev: true - /@cspell/dict-golang@6.0.9: - resolution: {integrity: sha512-etDt2WQauyEQDA+qPS5QtkYTb2I9l5IfQftAllVoB1aOrT6bxxpHvMEpJ0Hsn/vezxrCqa/BmtUbRxllIxIuSg==} + /@cspell/dict-git@3.0.3: + resolution: {integrity: sha512-LSxB+psZ0qoj83GkyjeEH/ZViyVsGEF/A6BAo8Nqc0w0HjD2qX/QR4sfA6JHUgQ3Yi/ccxdK7xNIo67L2ScW5A==} dev: true - /@cspell/dict-google@1.0.1: - resolution: {integrity: sha512-dQr4M3n95uOhtloNSgB9tYYGXGGEGEykkFyRtfcp5pFuEecYUa0BSgtlGKx9RXVtJtKgR+yFT/a5uQSlt8WjqQ==} + /@cspell/dict-golang@6.0.16: + resolution: {integrity: sha512-hZOBlgcguv2Hdc93n2zjdAQm1j3grsN9T9WhPnQ1wh2vUDoCLEujg+6gWhjcLb8ECOcwZTWgNyQLWeOxEsAj/w==} dev: true - /@cspell/dict-haskell@4.0.1: - resolution: {integrity: sha512-uRrl65mGrOmwT7NxspB4xKXFUenNC7IikmpRZW8Uzqbqcu7ZRCUfstuVH7T1rmjRgRkjcIjE4PC11luDou4wEQ==} + /@cspell/dict-google@1.0.4: + resolution: {integrity: sha512-JThUT9eiguCja1mHHLwYESgxkhk17Gv7P3b1S7ZJzXw86QyVHPrbpVoMpozHk0C9o+Ym764B7gZGKmw9uMGduQ==} dev: true - /@cspell/dict-html-symbol-entities@4.0.0: - resolution: {integrity: sha512-HGRu+48ErJjoweR5IbcixxETRewrBb0uxQBd6xFGcxbEYCX8CnQFTAmKI5xNaIt2PKaZiJH3ijodGSqbKdsxhw==} + /@cspell/dict-haskell@4.0.4: + resolution: {integrity: sha512-EwQsedEEnND/vY6tqRfg9y7tsnZdxNqOxLXSXTsFA6JRhUlr8Qs88iUUAfsUzWc4nNmmzQH2UbtT25ooG9x4nA==} dev: true - /@cspell/dict-html@4.0.5: - resolution: {integrity: sha512-p0brEnRybzSSWi8sGbuVEf7jSTDmXPx7XhQUb5bgG6b54uj+Z0Qf0V2n8b/LWwIPJNd1GygaO9l8k3HTCy1h4w==} + /@cspell/dict-html-symbol-entities@4.0.3: + resolution: {integrity: sha512-aABXX7dMLNFdSE8aY844X4+hvfK7977sOWgZXo4MTGAmOzR8524fjbJPswIBK7GaD3+SgFZ2yP2o0CFvXDGF+A==} dev: true - /@cspell/dict-java@5.0.7: - resolution: {integrity: sha512-ejQ9iJXYIq7R09BScU2y5OUGrSqwcD+J5mHFOKbduuQ5s/Eh/duz45KOzykeMLI6KHPVxhBKpUPBWIsfewECpQ==} + /@cspell/dict-html@4.0.10: + resolution: {integrity: sha512-I9uRAcdtHbh0wEtYZlgF0TTcgH0xaw1B54G2CW+tx4vHUwlde/+JBOfIzird4+WcMv4smZOfw+qHf7puFUbI5g==} dev: true - /@cspell/dict-julia@1.0.1: - resolution: {integrity: sha512-4JsCLCRhhLMLiaHpmR7zHFjj1qOauzDI5ZzCNQS31TUMfsOo26jAKDfo0jljFAKgw5M2fEG7sKr8IlPpQAYrmQ==} + /@cspell/dict-java@5.0.10: + resolution: {integrity: sha512-pVNcOnmoGiNL8GSVq4WbX/Vs2FGS0Nej+1aEeGuUY9CU14X8yAVCG+oih5ZoLt1jaR8YfR8byUF8wdp4qG4XIw==} dev: true - /@cspell/dict-k8s@1.0.6: - resolution: {integrity: sha512-srhVDtwrd799uxMpsPOQqeDJY+gEocgZpoK06EFrb4GRYGhv7lXo9Fb+xQMyQytzOW9dw4DNOEck++nacDuymg==} + /@cspell/dict-julia@1.0.4: + resolution: {integrity: sha512-bFVgNX35MD3kZRbXbJVzdnN7OuEqmQXGpdOi9jzB40TSgBTlJWA4nxeAKV4CPCZxNRUGnLH0p05T/AD7Aom9/w==} dev: true - /@cspell/dict-latex@4.0.0: - resolution: {integrity: sha512-LPY4y6D5oI7D3d+5JMJHK/wxYTQa2lJMSNxps2JtuF8hbAnBQb3igoWEjEbIbRRH1XBM0X8dQqemnjQNCiAtxQ==} + /@cspell/dict-k8s@1.0.9: + resolution: {integrity: sha512-Q7GELSQIzo+BERl2ya/nBEnZeQC+zJP19SN1pI6gqDYraM51uYJacbbcWLYYO2Y+5joDjNt/sd/lJtLaQwoSlA==} dev: true - /@cspell/dict-lorem-ipsum@4.0.0: - resolution: {integrity: sha512-1l3yjfNvMzZPibW8A7mQU4kTozwVZVw0AvFEdy+NcqtbxH+TvbSkNMqROOFWrkD2PjnKG0+Ea0tHI2Pi6Gchnw==} + /@cspell/dict-latex@4.0.3: + resolution: {integrity: sha512-2KXBt9fSpymYHxHfvhUpjUFyzrmN4c4P8mwIzweLyvqntBT3k0YGZJSriOdjfUjwSygrfEwiuPI1EMrvgrOMJw==} dev: true - /@cspell/dict-lua@4.0.3: - resolution: {integrity: sha512-lDHKjsrrbqPaea13+G9s0rtXjMO06gPXPYRjRYawbNmo4E/e3XFfVzeci3OQDQNDmf2cPOwt9Ef5lu2lDmwfJg==} + /@cspell/dict-lorem-ipsum@4.0.3: + resolution: {integrity: sha512-WFpDi/PDYHXft6p0eCXuYnn7mzMEQLVeqpO+wHSUd+kz5ADusZ4cpslAA4wUZJstF1/1kMCQCZM6HLZic9bT8A==} dev: true - /@cspell/dict-makefile@1.0.0: - resolution: {integrity: sha512-3W9tHPcSbJa6s0bcqWo6VisEDTSN5zOtDbnPabF7rbyjRpNo0uHXHRJQF8gAbFzoTzBBhgkTmrfSiuyQm7vBUQ==} + /@cspell/dict-lua@4.0.6: + resolution: {integrity: sha512-Jwvh1jmAd9b+SP9e1GkS2ACbqKKRo9E1f9GdjF/ijmooZuHU0hPyqvnhZzUAxO1egbnNjxS/J2T6iUtjAUK2KQ==} + dev: true + + /@cspell/dict-makefile@1.0.3: + resolution: {integrity: sha512-R3U0DSpvTs6qdqfyBATnePj9Q/pypkje0Nj26mQJ8TOBQutCRAJbr2ZFAeDjgRx5EAJU/+8txiyVF97fbVRViw==} + dev: true + + /@cspell/dict-markdown@2.0.7(@cspell/dict-css@4.0.16)(@cspell/dict-html-symbol-entities@4.0.3)(@cspell/dict-html@4.0.10)(@cspell/dict-typescript@3.1.11): + resolution: {integrity: sha512-F9SGsSOokFn976DV4u/1eL4FtKQDSgJHSZ3+haPRU5ki6OEqojxKa8hhj4AUrtNFpmBaJx/WJ4YaEzWqG7hgqg==} + peerDependencies: + '@cspell/dict-css': ^4.0.16 + '@cspell/dict-html': ^4.0.10 + '@cspell/dict-html-symbol-entities': ^4.0.3 + '@cspell/dict-typescript': ^3.1.11 + dependencies: + '@cspell/dict-css': 4.0.16 + '@cspell/dict-html': 4.0.10 + '@cspell/dict-html-symbol-entities': 4.0.3 + '@cspell/dict-typescript': 3.1.11 dev: true - /@cspell/dict-monkeyc@1.0.6: - resolution: {integrity: sha512-oO8ZDu/FtZ55aq9Mb67HtaCnsLn59xvhO/t2mLLTHAp667hJFxpp7bCtr2zOrR1NELzFXmKln/2lw/PvxMSvrA==} + /@cspell/dict-monkeyc@1.0.9: + resolution: {integrity: sha512-Jvf6g5xlB4+za3ThvenYKREXTEgzx5gMUSzrAxIiPleVG4hmRb/GBSoSjtkGaibN3XxGx5x809gSTYCA/IHCpA==} dev: true - /@cspell/dict-node@5.0.1: - resolution: {integrity: sha512-lax/jGz9h3Dv83v8LHa5G0bf6wm8YVRMzbjJPG/9rp7cAGPtdrga+XANFq+B7bY5+jiSA3zvj10LUFCFjnnCCg==} + /@cspell/dict-node@5.0.4: + resolution: {integrity: sha512-Hz5hiuOvZTd7Cp1IBqUZ7/ChwJeQpD5BJuwCaDn4mPNq4iMcQ1iWBYMThvNVqCEDgKv63X52nT8RAWacss98qg==} dev: true - /@cspell/dict-npm@5.0.18: - resolution: {integrity: sha512-weMTyxWpzz19q4wv9n183BtFvdD5fCjtze+bFKpl+4rO/YlPhHL2cXLAeexJz/VDSBecwX4ybTZYoknd1h2J4w==} + /@cspell/dict-npm@5.1.8: + resolution: {integrity: sha512-AJELYXeB4fQdIoNfmuaQxB1Hli3cX6XPsQCjfBxlu0QYXhrjB/IrCLLQAjWIywDqJiWyGUFTz4DqaANm8C/r9Q==} dev: true - /@cspell/dict-php@4.0.8: - resolution: {integrity: sha512-TBw3won4MCBQ2wdu7kvgOCR3dY2Tb+LJHgDUpuquy3WnzGiSDJ4AVelrZdE1xu7mjFJUr4q48aB21YT5uQqPZA==} + /@cspell/dict-php@4.0.13: + resolution: {integrity: sha512-P6sREMZkhElzz/HhXAjahnICYIqB/HSGp1EhZh+Y6IhvC15AzgtDP8B8VYCIsQof6rPF1SQrFwunxOv8H1e2eg==} dev: true - /@cspell/dict-powershell@5.0.5: - resolution: {integrity: sha512-3JVyvMoDJesAATYGOxcUWPbQPUvpZmkinV3m8HL1w1RrjeMVXXuK7U1jhopSneBtLhkU+9HKFwgh9l9xL9mY2Q==} + /@cspell/dict-powershell@5.0.13: + resolution: {integrity: sha512-0qdj0XZIPmb77nRTynKidRJKTU0Fl+10jyLbAhFTuBWKMypVY06EaYFnwhsgsws/7nNX8MTEQuewbl9bWFAbsg==} dev: true - /@cspell/dict-public-licenses@2.0.7: - resolution: {integrity: sha512-KlBXuGcN3LE7tQi/GEqKiDewWGGuopiAD0zRK1QilOx5Co8XAvs044gk4MNIQftc8r0nHeUI+irJKLGcR36DIQ==} + /@cspell/dict-public-licenses@2.0.11: + resolution: {integrity: sha512-rR5KjRUSnVKdfs5G+gJ4oIvQvm8+NJ6cHWY2N+GE69/FSGWDOPHxulCzeGnQU/c6WWZMSimG9o49i9r//lUQyA==} dev: true - /@cspell/dict-python@4.2.6: - resolution: {integrity: sha512-Hkz399qDGEbfXi9GYa2hDl7GahglI86JmS2F1KP8sfjLXofUgtnknyC5NWc86nzHcP38pZiPqPbTigyDYw5y8A==} + /@cspell/dict-python@4.2.12: + resolution: {integrity: sha512-U25eOFu+RE0aEcF2AsxZmq3Lic7y9zspJ9SzjrC0mfJz+yr3YmSCw4E0blMD3mZoNcf7H/vMshuKIY5AY36U+Q==} dependencies: - '@cspell/dict-data-science': 2.0.1 + '@cspell/dict-data-science': 2.0.5 dev: true - /@cspell/dict-r@2.0.1: - resolution: {integrity: sha512-KCmKaeYMLm2Ip79mlYPc8p+B2uzwBp4KMkzeLd5E6jUlCL93Y5Nvq68wV5fRLDRTf7N1LvofkVFWfDcednFOgA==} + /@cspell/dict-r@2.0.4: + resolution: {integrity: sha512-cBpRsE/U0d9BRhiNRMLMH1PpWgw+N+1A2jumgt1if9nBGmQw4MUpg2u9I0xlFVhstTIdzXiLXMxP45cABuiUeQ==} dev: true - /@cspell/dict-ruby@5.0.2: - resolution: {integrity: sha512-cIh8KTjpldzFzKGgrqUX4bFyav5lC52hXDKo4LbRuMVncs3zg4hcSf4HtURY+f2AfEZzN6ZKzXafQpThq3dl2g==} + /@cspell/dict-ruby@5.0.7: + resolution: {integrity: sha512-4/d0hcoPzi5Alk0FmcyqlzFW9lQnZh9j07MJzPcyVO62nYJJAGKaPZL2o4qHeCS/od/ctJC5AHRdoUm0ktsw6Q==} dev: true - /@cspell/dict-rust@4.0.5: - resolution: {integrity: sha512-DIvlPRDemjKQy8rCqftAgGNZxY5Bg+Ps7qAIJjxkSjmMETyDgl0KTVuaJPt7EK4jJt6uCZ4ILy96npsHDPwoXA==} + /@cspell/dict-rust@4.0.9: + resolution: {integrity: sha512-Dhr6TIZsMV92xcikKIWei6p/qswS4M+gTkivpWwz4/1oaVk2nRrxJmCdRoVkJlZkkAc17rjxrS12mpnJZI0iWw==} dev: true - /@cspell/dict-scala@5.0.3: - resolution: {integrity: sha512-4yGb4AInT99rqprxVNT9TYb1YSpq58Owzq7zi3ZS5T0u899Y4VsxsBiOgHnQ/4W+ygi+sp+oqef8w8nABR2lkg==} + /@cspell/dict-scala@5.0.6: + resolution: {integrity: sha512-tl0YWAfjUVb4LyyE4JIMVE8DlLzb1ecHRmIWc4eT6nkyDqQgHKzdHsnusxFEFMVLIQomgSg0Zz6hJ5S1E4W4ww==} dev: true - /@cspell/dict-software-terms@4.1.3: - resolution: {integrity: sha512-5Wn5JG4IzCboX5pjISdkipsPKGaz1//iuBZdHl4US5x7mO4jOGXLpjzx6ZoPM4PXUlMEFz9NJRCDepAu8fXVtA==} + /@cspell/dict-software-terms@4.1.12: + resolution: {integrity: sha512-MHDAK/WlEdMJiDQ6lJ3SF7VogdfJcRXGYWfO4v90rxW8HDVfKDXVk3zpJhjoZGq56ujR1qmeYkQsM6MlB69uJA==} dev: true - /@cspell/dict-sql@2.1.5: - resolution: {integrity: sha512-FmxanytHXss7GAWAXmgaxl3icTCW7YxlimyOSPNfm+njqeUDjw3kEv4mFNDDObBJv8Ec5AWCbUDkWIpkE3IpKg==} + /@cspell/dict-sql@2.1.8: + resolution: {integrity: sha512-dJRE4JV1qmXTbbGm6WIcg1knmR6K5RXnQxF4XHs5HA3LAjc/zf77F95i5LC+guOGppVF6Hdl66S2UyxT+SAF3A==} dev: true - /@cspell/dict-svelte@1.0.2: - resolution: {integrity: sha512-rPJmnn/GsDs0btNvrRBciOhngKV98yZ9SHmg8qI6HLS8hZKvcXc0LMsf9LLuMK1TmS2+WQFAan6qeqg6bBxL2Q==} + /@cspell/dict-svelte@1.0.5: + resolution: {integrity: sha512-sseHlcXOqWE4Ner9sg8KsjxwSJ2yssoJNqFHR9liWVbDV+m7kBiUtn2EB690TihzVsEmDr/0Yxrbb5Bniz70mA==} dev: true - /@cspell/dict-swift@2.0.1: - resolution: {integrity: sha512-gxrCMUOndOk7xZFmXNtkCEeroZRnS2VbeaIPiymGRHj5H+qfTAzAKxtv7jJbVA3YYvEzWcVE2oKDP4wcbhIERw==} + /@cspell/dict-swift@2.0.4: + resolution: {integrity: sha512-CsFF0IFAbRtYNg0yZcdaYbADF5F3DsM8C4wHnZefQy8YcHP/qjAF/GdGfBFBLx+XSthYuBlo2b2XQVdz3cJZBw==} dev: true - /@cspell/dict-terraform@1.0.0: - resolution: {integrity: sha512-Ak+vy4HP/bOgzf06BAMC30+ZvL9mzv21xLM2XtfnBLTDJGdxlk/nK0U6QT8VfFLqJ0ZZSpyOxGsUebWDCTr/zQ==} + /@cspell/dict-terraform@1.0.5: + resolution: {integrity: sha512-qH3epPB2d6d5w1l4hR2OsnN8qDQ4P0z6oDB7+YiNH+BoECXv4Z38MIV1H8cxIzD2wkzkt2JTcFYaVW72MDZAlg==} dev: true - /@cspell/dict-typescript@3.1.6: - resolution: {integrity: sha512-1beC6O4P/j23VuxX+i0+F7XqPVc3hhiAzGJHEKqnWf5cWAXQtg0xz3xQJ5MvYx2a7iLaSa+lu7+05vG9UHyu9Q==} + /@cspell/dict-typescript@3.1.11: + resolution: {integrity: sha512-FwvK5sKbwrVpdw0e9+1lVTl8FPoHYvfHRuQRQz2Ql5XkC0gwPPkpoyD1zYImjIyZRoYXk3yp9j8ss4iz7A7zoQ==} dev: true - /@cspell/dict-vue@3.0.0: - resolution: {integrity: sha512-niiEMPWPV9IeRBRzZ0TBZmNnkK3olkOPYxC1Ny2AX4TGlYRajcW0WUtoSHmvvjZNfWLSg2L6ruiBeuPSbjnG6A==} + /@cspell/dict-vue@3.0.3: + resolution: {integrity: sha512-akmYbrgAGumqk1xXALtDJcEcOMYBYMnkjpmGzH13Ozhq1mkPF4VgllFQlm1xYde+BUKNnzMgPEzxrL2qZllgYA==} dev: true - /@cspell/dynamic-import@8.14.2: - resolution: {integrity: sha512-5MbqtIligU7yPwHWU/5yFCgMvur4i1bRAF1Cy8y2dDtHsa204S/w/SaXs+51EFLp2eNbCiBisCBrwJFT7R1RxA==} + /@cspell/dynamic-import@8.15.5: + resolution: {integrity: sha512-xfLRVi8zHKCGK1fg1ixXQ0bAlIU9sGm7xfbTmGG8TQt+iaKHVMIlt+XeCAo0eE7aKjIaIfqcC/PCIdUJiODuGA==} engines: {node: '>=18.0'} dependencies: import-meta-resolve: 4.1.0 dev: true - /@cspell/filetypes@8.14.2: - resolution: {integrity: sha512-ZevArA0mWeVTTqHicxCPZIAeCibpY3NwWK/x6d1Lgu7RPk/daoGAM546Q2SLChFu+r10tIH7pRG212A6Q9ihPA==} + /@cspell/filetypes@8.15.5: + resolution: {integrity: sha512-ljEFUp61mw5RWZ3S6ke6rvGKy8m4lZZjRd5KO07RYyGwSeLa4PX9AyTgSzuqXiN9y1BwogD3xolCMfPsMrtZIQ==} engines: {node: '>=18'} dev: true - /@cspell/strong-weak-map@8.14.2: - resolution: {integrity: sha512-7sRzJc392CQYNNrtdPEfOHJdRqsqf6nASCtbS5A9hL2UrdWQ4uN7r/D+Y1HpuizwY9eOkZvarcFfsYt5wE0Pug==} + /@cspell/strong-weak-map@8.15.5: + resolution: {integrity: sha512-7VzDAXsJPDXllTIi9mvQwd7PR43TPk1Ix3ocLTZDVNssf1cQbmLiQX6YWk0k8FWGfIPoIMlByw4tTSizRJcTcw==} engines: {node: '>=18'} dev: true - /@cspell/url@8.14.2: - resolution: {integrity: sha512-YmWW+B/2XQcCynLpiAQF77Bitm5Cynw3/BICZkbdveKjJkUzEmXB+U2qWuwXOyU8xUYuwkP63YM8McnI567rUA==} + /@cspell/url@8.15.5: + resolution: {integrity: sha512-z8q7LUppFiNvytX2qrKDkXcsmOrwjqFf/5RkcpNppDezLrFejaMZu4BEVNcPrFCeS2J04K+uksNL1LYSob8jCg==} engines: {node: '>=18.0'} dev: true - /@es-joy/jsdoccomment@0.48.0: - resolution: {integrity: sha512-G6QUWIcC+KvSwXNsJyDTHvqUdNoAVJPPgkc3+Uk4WBKqZvoXhlvazOgm9aL0HwihJLQf0l+tOE2UFzXBqCqgDw==} - engines: {node: '>=16'} - dependencies: - comment-parser: 1.4.1 - esquery: 1.6.0 - jsdoc-type-pratt-parser: 4.1.0 - dev: true - /@esbuild/aix-ppc64@0.21.5: resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} @@ -1171,8 +1138,8 @@ packages: requiresBuild: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + /@eslint-community/eslint-utils@4.4.1(eslint@8.57.0): + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -1181,13 +1148,8 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp@4.10.0: - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: true - - /@eslint-community/regexpp@4.11.0: - resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} + /@eslint-community/regexpp@4.12.1: + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true @@ -1199,7 +1161,7 @@ packages: debug: 4.3.7 espree: 9.6.1 globals: 13.24.0 - ignore: 5.3.1 + ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -1216,8 +1178,9 @@ packages: /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead dependencies: - '@humanwhocodes/object-schema': 2.0.2 + '@humanwhocodes/object-schema': 2.0.3 debug: 4.3.7 minimatch: 3.1.2 transitivePeerDependencies: @@ -1229,8 +1192,9 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@2.0.2: - resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + /@humanwhocodes/object-schema@2.0.3: + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead dev: true /@jest/environment@29.7.0: @@ -1279,7 +1243,7 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 dev: false @@ -1293,19 +1257,14 @@ packages: engines: {node: '>=6.0.0'} dev: false - /@jridgewell/sourcemap-codec@1.4.15: - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - dev: false - /@jridgewell/sourcemap-codec@1.5.0: resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - dev: true /@jridgewell/trace-mapping@0.3.25: resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 dev: false /@nodelib/fs.scandir@2.1.5: @@ -1334,127 +1293,140 @@ packages: engines: {node: '>=12.4.0'} dev: true - /@pkgr/core@0.1.1: - resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - dev: true - /@polka/url@1.0.0-next.28: resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} dev: true - /@rollup/rollup-android-arm-eabi@4.21.2: - resolution: {integrity: sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==} + /@rollup/rollup-android-arm-eabi@4.24.3: + resolution: {integrity: sha512-ufb2CH2KfBWPJok95frEZZ82LtDl0A6QKTa8MoM+cWwDZvVGl5/jNb79pIhRvAalUu+7LD91VYR0nwRD799HkQ==} cpu: [arm] os: [android] requiresBuild: true optional: true - /@rollup/rollup-android-arm64@4.21.2: - resolution: {integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==} + /@rollup/rollup-android-arm64@4.24.3: + resolution: {integrity: sha512-iAHpft/eQk9vkWIV5t22V77d90CRofgR2006UiCjHcHJFVI1E0oBkQIAbz+pLtthFw3hWEmVB4ilxGyBf48i2Q==} cpu: [arm64] os: [android] requiresBuild: true optional: true - /@rollup/rollup-darwin-arm64@4.21.2: - resolution: {integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==} + /@rollup/rollup-darwin-arm64@4.24.3: + resolution: {integrity: sha512-QPW2YmkWLlvqmOa2OwrfqLJqkHm7kJCIMq9kOz40Zo9Ipi40kf9ONG5Sz76zszrmIZZ4hgRIkez69YnTHgEz1w==} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@rollup/rollup-darwin-x64@4.21.2: - resolution: {integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==} + /@rollup/rollup-darwin-x64@4.24.3: + resolution: {integrity: sha512-KO0pN5x3+uZm1ZXeIfDqwcvnQ9UEGN8JX5ufhmgH5Lz4ujjZMAnxQygZAVGemFWn+ZZC0FQopruV4lqmGMshow==} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.21.2: - resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==} + /@rollup/rollup-freebsd-arm64@4.24.3: + resolution: {integrity: sha512-CsC+ZdIiZCZbBI+aRlWpYJMSWvVssPuWqrDy/zi9YfnatKKSLFCe6fjna1grHuo/nVaHG+kiglpRhyBQYRTK4A==} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + optional: true + + /@rollup/rollup-freebsd-x64@4.24.3: + resolution: {integrity: sha512-F0nqiLThcfKvRQhZEzMIXOQG4EeX61im61VYL1jo4eBxv4aZRmpin6crnBJQ/nWnCsjH5F6J3W6Stdm0mBNqBg==} + cpu: [x64] + os: [freebsd] + requiresBuild: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.24.3: + resolution: {integrity: sha512-KRSFHyE/RdxQ1CSeOIBVIAxStFC/hnBgVcaiCkQaVC+EYDtTe4X7z5tBkFyRoBgUGtB6Xg6t9t2kulnX6wJc6A==} cpu: [arm] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.21.2: - resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==} + /@rollup/rollup-linux-arm-musleabihf@4.24.3: + resolution: {integrity: sha512-h6Q8MT+e05zP5BxEKz0vi0DhthLdrNEnspdLzkoFqGwnmOzakEHSlXfVyA4HJ322QtFy7biUAVFPvIDEDQa6rw==} cpu: [arm] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.21.2: - resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} + /@rollup/rollup-linux-arm64-gnu@4.24.3: + resolution: {integrity: sha512-fKElSyXhXIJ9pqiYRqisfirIo2Z5pTTve5K438URf08fsypXrEkVmShkSfM8GJ1aUyvjakT+fn2W7Czlpd/0FQ==} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm64-musl@4.21.2: - resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==} + /@rollup/rollup-linux-arm64-musl@4.24.3: + resolution: {integrity: sha512-YlddZSUk8G0px9/+V9PVilVDC6ydMz7WquxozToozSnfFK6wa6ne1ATUjUvjin09jp34p84milxlY5ikueoenw==} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.21.2: - resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==} + /@rollup/rollup-linux-powerpc64le-gnu@4.24.3: + resolution: {integrity: sha512-yNaWw+GAO8JjVx3s3cMeG5Esz1cKVzz8PkTJSfYzE5u7A+NvGmbVFEHP+BikTIyYWuz0+DX9kaA3pH9Sqxp69g==} cpu: [ppc64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.21.2: - resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==} + /@rollup/rollup-linux-riscv64-gnu@4.24.3: + resolution: {integrity: sha512-lWKNQfsbpv14ZCtM/HkjCTm4oWTKTfxPmr7iPfp3AHSqyoTz5AgLemYkWLwOBWc+XxBbrU9SCokZP0WlBZM9lA==} cpu: [riscv64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.21.2: - resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==} + /@rollup/rollup-linux-s390x-gnu@4.24.3: + resolution: {integrity: sha512-HoojGXTC2CgCcq0Woc/dn12wQUlkNyfH0I1ABK4Ni9YXyFQa86Fkt2Q0nqgLfbhkyfQ6003i3qQk9pLh/SpAYw==} cpu: [s390x] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-x64-gnu@4.21.2: - resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==} + /@rollup/rollup-linux-x64-gnu@4.24.3: + resolution: {integrity: sha512-mnEOh4iE4USSccBOtcrjF5nj+5/zm6NcNhbSEfR3Ot0pxBwvEn5QVUXcuOwwPkapDtGZ6pT02xLoPaNv06w7KQ==} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-x64-musl@4.21.2: - resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==} + /@rollup/rollup-linux-x64-musl@4.24.3: + resolution: {integrity: sha512-rMTzawBPimBQkG9NKpNHvquIUTQPzrnPxPbCY1Xt+mFkW7pshvyIS5kYgcf74goxXOQk0CP3EoOC1zcEezKXhw==} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.21.2: - resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==} + /@rollup/rollup-win32-arm64-msvc@4.24.3: + resolution: {integrity: sha512-2lg1CE305xNvnH3SyiKwPVsTVLCg4TmNCF1z7PSHX2uZY2VbUpdkgAllVoISD7JO7zu+YynpWNSKAtOrX3AiuA==} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.21.2: - resolution: {integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==} + /@rollup/rollup-win32-ia32-msvc@4.24.3: + resolution: {integrity: sha512-9SjYp1sPyxJsPWuhOCX6F4jUMXGbVVd5obVpoVEi8ClZqo52ViZewA6eFz85y8ezuOA+uJMP5A5zo6Oz4S5rVQ==} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@rollup/rollup-win32-x64-msvc@4.21.2: - resolution: {integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==} + /@rollup/rollup-win32-x64-msvc@4.24.3: + resolution: {integrity: sha512-HGZgRFFYrMrP3TJlq58nR1xy8zHKId25vhmm5S9jETEfDf6xybPxsavFTJaufe2zgOGYJBskGlj49CwtEuFhWQ==} cpu: [x64] os: [win32] requiresBuild: true optional: true + /@rtsao/scc@1.1.0: + resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} + dev: true + /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true @@ -1515,12 +1487,12 @@ packages: lz-string: 1.5.0 pretty-format: 27.5.1 - /@testing-library/jest-dom@6.5.0: - resolution: {integrity: sha512-xGGHpBXYSHUUr6XsKBfs85TWlYKpTc37cSBBVrXcib2MkHLboWlkClhWF37JKlDb9KEq3dHs+f2xR7XJEWGBxA==} + /@testing-library/jest-dom@6.6.3: + resolution: {integrity: sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA==} engines: {node: '>=14', npm: '>=6', yarn: '>=1'} dependencies: '@adobe/css-tools': 4.4.0 - aria-query: 5.3.0 + aria-query: 5.3.2 chalk: 3.0.0 css.escape: 1.5.1 dom-accessibility-api: 0.6.3 @@ -1528,7 +1500,7 @@ packages: redent: 3.0.0 dev: false - /@testing-library/react@16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.5)(react-dom@18.3.1)(react@18.3.1): + /@testing-library/react@16.0.1(@testing-library/dom@10.4.0)(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-dSmwJVtJXmku+iocRhWOUFbrERC76TX2Mnf0ATODz8brzAZrMBbzLwQixlBSanZxR6LddK3eiwpSFZgDET1URg==} engines: {node: '>=18'} peerDependencies: @@ -1543,10 +1515,10 @@ packages: '@types/react-dom': optional: true dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.26.0 '@testing-library/dom': 10.4.0 - '@types/react': 18.3.5 - '@types/react-dom': 18.3.0 + '@types/react': 18.3.12 + '@types/react-dom': 18.3.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -1561,34 +1533,34 @@ packages: /@types/babel__core@7.20.5: resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 - '@types/babel__generator': 7.6.5 - '@types/babel__template': 7.4.2 - '@types/babel__traverse': 7.20.2 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 + '@types/babel__generator': 7.6.8 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.6 dev: false - /@types/babel__generator@7.6.5: - resolution: {integrity: sha512-h9yIuWbJKdOPLJTbmSpPzkF67e659PbQDba7ifWm5BJ8xTv+sDmS7rFmywkWOvXedGTivCdeGSIIX8WLcRTz8w==} + /@types/babel__generator@7.6.8: + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.0 dev: false - /@types/babel__template@7.4.2: - resolution: {integrity: sha512-/AVzPICMhMOMYoSx9MoKpGDKdBRsIXMNByh1PXSZoa+v6ZoLa8xxtsT/uLQ/NJm0XVAWl/BvId4MlDeXJaeIZQ==} + /@types/babel__template@7.4.4: + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} dependencies: - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 dev: false - /@types/babel__traverse@7.20.2: - resolution: {integrity: sha512-ojlGK1Hsfce93J0+kn3H5R73elidKUaZonirN33GSmgTUMpzI/MIFfSpF3haANe3G1bEBS9/9/QEqwTzwqFsKw==} + /@types/babel__traverse@7.20.6: + resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.26.0 dev: false - /@types/estree@1.0.5: - resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + /@types/estree@1.0.6: + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} /@types/istanbul-lib-coverage@2.0.6: resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} @@ -1618,30 +1590,24 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true - /@types/node@22.5.1: - resolution: {integrity: sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw==} - dependencies: - undici-types: 6.19.8 - /@types/node@22.8.6: resolution: {integrity: sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw==} dependencies: undici-types: 6.19.8 - dev: true - /@types/prop-types@15.7.8: - resolution: {integrity: sha512-kMpQpfZKSCBqltAJwskgePRaYRFukDkm1oItcAbC3gNELR20XIBcN9VRgg4+m8DKsTfkWeA4m4Imp4DDuWy7FQ==} + /@types/prop-types@15.7.13: + resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} - /@types/react-dom@18.3.0: - resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} + /@types/react-dom@18.3.1: + resolution: {integrity: sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==} dependencies: - '@types/react': 18.3.5 + '@types/react': 18.3.12 - /@types/react@18.3.5: - resolution: {integrity: sha512-WeqMfGJLGuLCqHGYRGHxnKrXcTitc6L/nBUWfWPcTarG3t9PsquqUMuVeXZeca+mglY4Vo5GZjCi0A3Or2lnxA==} + /@types/react@18.3.12: + resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==} dependencies: - '@types/prop-types': 15.7.8 - csstype: 3.1.2 + '@types/prop-types': 15.7.13 + csstype: 3.1.3 /@types/stack-utils@2.0.3: resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -1661,7 +1627,7 @@ packages: '@types/yargs-parser': 21.0.3 dev: true - /@typescript-eslint/eslint-plugin@7.15.0(@typescript-eslint/parser@7.15.0)(eslint@8.57.0)(typescript@5.5.4): + /@typescript-eslint/eslint-plugin@7.15.0(@typescript-eslint/parser@7.15.0)(eslint@8.57.0)(typescript@5.6.3): resolution: {integrity: sha512-uiNHpyjZtFrLwLDpHnzaDlP3Tt6sGMqTCiqmxaN4n4RP0EfYZDODJyddiFDF44Hjwxr5xAcaYxVKm9QKQFJFLA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -1672,23 +1638,23 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.15.0(eslint@8.57.0)(typescript@5.5.4) + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 7.15.0(eslint@8.57.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 7.15.0 - '@typescript-eslint/type-utils': 7.15.0(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/utils': 7.15.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/type-utils': 7.15.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/utils': 7.15.0(eslint@8.57.0)(typescript@5.6.3) '@typescript-eslint/visitor-keys': 7.15.0 eslint: 8.57.0 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.4) - typescript: 5.5.4 + ts-api-utils: 1.4.0(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@7.15.0(eslint@8.57.0)(typescript@5.5.4): + /@typescript-eslint/parser@7.15.0(eslint@8.57.0)(typescript@5.6.3): resolution: {integrity: sha512-k9fYuQNnypLFcqORNClRykkGOMOj+pV6V91R4GO/l1FDGwpqmSwoOQrOHo3cGaH63e+D3ZiCAOsuS/D2c99j/A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -1700,11 +1666,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 7.15.0 '@typescript-eslint/types': 7.15.0 - '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 7.15.0 - debug: 4.3.6 + debug: 4.3.7 eslint: 8.57.0 - typescript: 5.5.4 + typescript: 5.6.3 transitivePeerDependencies: - supports-color dev: true @@ -1717,7 +1683,7 @@ packages: '@typescript-eslint/visitor-keys': 7.15.0 dev: true - /@typescript-eslint/type-utils@7.15.0(eslint@8.57.0)(typescript@5.5.4): + /@typescript-eslint/type-utils@7.15.0(eslint@8.57.0)(typescript@5.6.3): resolution: {integrity: sha512-SkgriaeV6PDvpA6253PDVep0qCqgbO1IOBiycjnXsszNTVQe5flN5wR5jiczoEoDEnAqYFSFFc9al9BSGVltkg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -1727,12 +1693,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.4) - '@typescript-eslint/utils': 7.15.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.6.3) + '@typescript-eslint/utils': 7.15.0(eslint@8.57.0)(typescript@5.6.3) debug: 4.3.7 eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.5.4) - typescript: 5.5.4 + ts-api-utils: 1.4.0(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - supports-color dev: true @@ -1742,7 +1708,7 @@ packages: engines: {node: ^18.18.0 || >=20.0.0} dev: true - /@typescript-eslint/typescript-estree@7.15.0(typescript@5.5.4): + /@typescript-eslint/typescript-estree@7.15.0(typescript@5.6.3): resolution: {integrity: sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -1758,22 +1724,22 @@ packages: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.5.4) - typescript: 5.5.4 + ts-api-utils: 1.4.0(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@7.15.0(eslint@8.57.0)(typescript@5.5.4): + /@typescript-eslint/utils@7.15.0(eslint@8.57.0)(typescript@5.6.3): resolution: {integrity: sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.0) '@typescript-eslint/scope-manager': 7.15.0 '@typescript-eslint/types': 7.15.0 - '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.6.3) eslint: 8.57.0 transitivePeerDependencies: - supports-color @@ -1788,13 +1754,13 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@typescript/vfs@1.6.0(typescript@4.5.2): + /@typescript/vfs@1.6.0(typescript@5.4.5): resolution: {integrity: sha512-hvJUjNVeBMp77qPINuUvYXj4FyWeeMMKZkxEATEU3hqBAQ7qdTBCUFT7Sp0Zu0faeEtFf+ldXxMEDr/bk73ISg==} peerDependencies: typescript: '*' dependencies: debug: 4.3.7 - typescript: 4.5.2 + typescript: 5.4.5 transitivePeerDependencies: - supports-color @@ -1802,36 +1768,35 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@vitejs/plugin-react@4.3.1(vite@5.4.7): - resolution: {integrity: sha512-m/V2syj5CuVnaxcUJOQRel/Wr31FFXRFlnOoq1TVtkCxsY5veGMTEmpWHndrhB2U8ScHtCQB1e+4hWYExQc6Lg==} + /@vitejs/plugin-react@4.3.3(vite@5.4.10): + resolution: {integrity: sha512-NooDe9GpHGqNns1i8XDERg0Vsg5SSYRhRxxyTGogUdkdNt47jal+fbuYi+Yfq6pzRCKXyoPcWisfxE6RIM3GKA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.2.0 || ^5.0.0 dependencies: - '@babel/core': 7.24.7 - '@babel/plugin-transform-react-jsx-self': 7.24.6(@babel/core@7.24.7) - '@babel/plugin-transform-react-jsx-source': 7.24.6(@babel/core@7.24.7) + '@babel/core': 7.26.0 + '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.7(@types/node@22.5.1) + vite: 5.4.10(@types/node@22.8.6) transitivePeerDependencies: - supports-color dev: false - /@vitest/expect@2.1.1: - resolution: {integrity: sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==} + /@vitest/expect@2.1.4: + resolution: {integrity: sha512-DOETT0Oh1avie/D/o2sgMHGrzYUFFo3zqESB2Hn70z6QB1HrS2IQ9z5DfyTqU8sg4Bpu13zZe9V4+UTNQlUeQA==} dependencies: - '@vitest/spy': 2.1.1 - '@vitest/utils': 2.1.1 - chai: 5.1.1 + '@vitest/spy': 2.1.4 + '@vitest/utils': 2.1.4 + chai: 5.1.2 tinyrainbow: 1.2.0 dev: true - /@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.7): - resolution: {integrity: sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==} + /@vitest/mocker@2.1.4(vite@5.4.10): + resolution: {integrity: sha512-Ky/O1Lc0QBbutJdW0rqLeFNbuLEyS+mIPiNdlVlp2/yhJ0SbyYqObS5IHdhferJud8MbbwMnexg4jordE5cCoQ==} peerDependencies: - '@vitest/spy': 2.1.1 - msw: ^2.3.5 + msw: ^2.4.9 vite: ^5.0.0 peerDependenciesMeta: msw: @@ -1839,59 +1804,59 @@ packages: vite: optional: true dependencies: - '@vitest/spy': 2.1.1 + '@vitest/spy': 2.1.4 estree-walker: 3.0.3 - magic-string: 0.30.11 - vite: 5.4.7(@types/node@22.5.1) + magic-string: 0.30.12 + vite: 5.4.10(@types/node@22.8.6) dev: true - /@vitest/pretty-format@2.1.1: - resolution: {integrity: sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==} + /@vitest/pretty-format@2.1.4: + resolution: {integrity: sha512-L95zIAkEuTDbUX1IsjRl+vyBSLh3PwLLgKpghl37aCK9Jvw0iP+wKwIFhfjdUtA2myLgjrG6VU6JCFLv8q/3Ww==} dependencies: tinyrainbow: 1.2.0 dev: true - /@vitest/runner@2.1.1: - resolution: {integrity: sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==} + /@vitest/runner@2.1.4: + resolution: {integrity: sha512-sKRautINI9XICAMl2bjxQM8VfCMTB0EbsBc/EDFA57V6UQevEKY/TOPOF5nzcvCALltiLfXWbq4MaAwWx/YxIA==} dependencies: - '@vitest/utils': 2.1.1 + '@vitest/utils': 2.1.4 pathe: 1.1.2 dev: true - /@vitest/snapshot@2.1.1: - resolution: {integrity: sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==} + /@vitest/snapshot@2.1.4: + resolution: {integrity: sha512-3Kab14fn/5QZRog5BPj6Rs8dc4B+mim27XaKWFWHWA87R56AKjHTGcBFKpvZKDzC4u5Wd0w/qKsUIio3KzWW4Q==} dependencies: - '@vitest/pretty-format': 2.1.1 - magic-string: 0.30.11 + '@vitest/pretty-format': 2.1.4 + magic-string: 0.30.12 pathe: 1.1.2 dev: true - /@vitest/spy@2.1.1: - resolution: {integrity: sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==} + /@vitest/spy@2.1.4: + resolution: {integrity: sha512-4JOxa+UAizJgpZfaCPKK2smq9d8mmjZVPMt2kOsg/R8QkoRzydHH1qHxIYNvr1zlEaFj4SXiaaJWxq/LPLKaLg==} dependencies: tinyspy: 3.0.2 dev: true - /@vitest/ui@2.1.1(vitest@2.1.1): - resolution: {integrity: sha512-IIxo2LkQDA+1TZdPLYPclzsXukBWd5dX2CKpGqH8CCt8Wh0ZuDn4+vuQ9qlppEju6/igDGzjWF/zyorfsf+nHg==} + /@vitest/ui@2.1.4(vitest@2.1.4): + resolution: {integrity: sha512-Zd9e5oU063c+j9N9XzGJagCLNvG71x/2tOme3Js4JEZKX55zsgxhJwUgLI8hkN6NjMLpdJO8d7nVUUuPGAA58Q==} peerDependencies: - vitest: 2.1.1 + vitest: 2.1.4 dependencies: - '@vitest/utils': 2.1.1 + '@vitest/utils': 2.1.4 fflate: 0.8.2 flatted: 3.3.1 pathe: 1.1.2 - sirv: 2.0.4 - tinyglobby: 0.2.6 + sirv: 3.0.0 + tinyglobby: 0.2.10 tinyrainbow: 1.2.0 - vitest: 2.1.1(@types/node@22.5.1)(@vitest/ui@2.1.1) + vitest: 2.1.4(@types/node@22.8.6)(@vitest/ui@2.1.4) dev: true - /@vitest/utils@2.1.1: - resolution: {integrity: sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==} + /@vitest/utils@2.1.4: + resolution: {integrity: sha512-MXDnZn0Awl2S86PSNIim5PWXgIAx8CIkzu35mBdSApUip6RFOGXBCf3YFyeEu8n1IHk4bWD46DeYFu9mQlFIRg==} dependencies: - '@vitest/pretty-format': 2.1.1 - loupe: 3.1.1 + '@vitest/pretty-format': 2.1.4 + loupe: 3.1.2 tinyrainbow: 1.2.0 dev: true @@ -1907,12 +1872,12 @@ packages: acorn-walk: 8.3.4 dev: true - /acorn-jsx@5.3.2(acorn@8.12.1): + /acorn-jsx@5.3.2(acorn@8.14.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.12.1 + acorn: 8.14.0 dev: true /acorn-walk@8.3.4: @@ -1922,12 +1887,6 @@ packages: acorn: 8.14.0 dev: true - /acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - /acorn@8.14.0: resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} @@ -1963,18 +1922,11 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - /ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + /ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} engines: {node: '>=12'} dev: true - /ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - dependencies: - color-convert: 1.9.3 - dev: false - /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -1989,11 +1941,6 @@ packages: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} dev: true - /are-docs-informative@0.0.2: - resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} - engines: {node: '>=14'} - dev: true - /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true @@ -2003,21 +1950,28 @@ packages: dependencies: dequal: 2.0.3 - /array-buffer-byte-length@1.0.0: - resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} + /aria-query@5.3.2: + resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} + engines: {node: '>= 0.4'} + dev: false + + /array-buffer-byte-length@1.0.1: + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - is-array-buffer: 3.0.2 + call-bind: 1.0.7 + is-array-buffer: 3.0.4 dev: true - /array-includes@3.1.7: - resolution: {integrity: sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==} + /array-includes@3.1.8: + resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 - get-intrinsic: 1.2.2 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 + get-intrinsic: 1.2.4 is-string: 1.0.7 dev: true @@ -2030,24 +1984,25 @@ packages: engines: {node: '>=8'} dev: true - /array.prototype.findlastindex@1.2.3: - resolution: {integrity: sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==} + /array.prototype.findlastindex@1.2.5: + resolution: {integrity: sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 es-shim-unscopables: 1.0.2 - get-intrinsic: 1.2.2 dev: true /array.prototype.flat@1.3.2: resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 es-shim-unscopables: 1.0.2 dev: true @@ -2055,23 +2010,24 @@ packages: resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 es-shim-unscopables: 1.0.2 dev: true - /arraybuffer.prototype.slice@1.0.2: - resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} + /arraybuffer.prototype.slice@1.0.3: + resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} engines: {node: '>= 0.4'} dependencies: - array-buffer-byte-length: 1.0.0 - call-bind: 1.0.5 + array-buffer-byte-length: 1.0.1 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 - get-intrinsic: 1.2.2 - is-array-buffer: 3.0.2 - is-shared-array-buffer: 1.0.2 + es-abstract: 1.23.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + is-array-buffer: 3.0.4 + is-shared-array-buffer: 1.0.3 dev: true /assertion-error@2.0.1: @@ -2083,9 +2039,11 @@ packages: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true - /available-typed-arrays@1.0.5: - resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} + /available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + dependencies: + possible-typed-array-names: 1.0.0 dev: true /balanced-match@1.0.2: @@ -2112,34 +2070,31 @@ packages: fill-range: 7.1.1 dev: true - /browserslist@4.23.1: - resolution: {integrity: sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==} + /browserslist@4.24.2: + resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001640 - electron-to-chromium: 1.4.816 - node-releases: 2.0.14 - update-browserslist-db: 1.1.0(browserslist@4.23.1) + caniuse-lite: 1.0.30001676 + electron-to-chromium: 1.5.50 + node-releases: 2.0.18 + update-browserslist-db: 1.1.1(browserslist@4.24.2) dev: false - /builtins@5.0.1: - resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} - dependencies: - semver: 7.6.3 - dev: true - /cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} dev: true - /call-bind@1.0.5: - resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} + /call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.2.2 - set-function-length: 1.1.1 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 dev: true /callsites@3.1.0: @@ -2147,18 +2102,18 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite@1.0.30001640: - resolution: {integrity: sha512-lA4VMpW0PSUrFnkmVuEKBUovSWKhj7puyCg8StBChgu298N1AtuF1sKWEvfDuimSEDbhlb/KqPKC3fs1HbuQUA==} + /caniuse-lite@1.0.30001676: + resolution: {integrity: sha512-Qz6zwGCiPghQXGJvgQAem79esjitvJ+CxSbSQkW9H/UX5hg8XM88d4lp2W+MEQ81j+Hip58Il+jGVdazk1z9cw==} dev: false - /chai@5.1.1: - resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} + /chai@5.1.2: + resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} engines: {node: '>=12'} dependencies: assertion-error: 2.0.1 check-error: 2.1.1 deep-eql: 5.0.2 - loupe: 3.1.1 + loupe: 3.1.2 pathval: 2.0.0 dev: true @@ -2169,15 +2124,6 @@ packages: chalk: 5.3.0 dev: true - /chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - dev: false - /chalk@3.0.0: resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} engines: {node: '>=8'} @@ -2213,6 +2159,10 @@ packages: engines: {node: '>=8'} dev: true + /cjs-module-lexer@1.4.1: + resolution: {integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==} + dev: true + /clear-module@4.1.2: resolution: {integrity: sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw==} engines: {node: '>=8'} @@ -2234,15 +2184,6 @@ packages: yargs: 16.2.0 dev: true - /cli-table3@0.6.3: - resolution: {integrity: sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==} - engines: {node: 10.* || >= 12.*} - dependencies: - string-width: 4.2.3 - optionalDependencies: - '@colors/colors': 1.5.0 - dev: true - /cli-table3@0.6.5: resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} engines: {node: 10.* || >= 12.*} @@ -2260,22 +2201,12 @@ packages: wrap-ansi: 7.0.0 dev: true - /color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - dependencies: - color-name: 1.1.3 - dev: false - /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 - /color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - dev: false - /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -2307,11 +2238,6 @@ packages: repeat-string: 1.6.1 dev: true - /comment-parser@1.4.1: - resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} - engines: {node: '>= 12.0.0'} - dev: true - /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true @@ -2333,81 +2259,81 @@ packages: which: 2.0.2 dev: true - /cspell-config-lib@8.14.2: - resolution: {integrity: sha512-yHP1BdcH5dbjb8qiZr6+bxEnJ+rxTULQ00wBz3eBPWCghJywEAYYvMWoYuxVtPpndlkKYC1wJAHsyNkweQyepA==} + /cspell-config-lib@8.15.5: + resolution: {integrity: sha512-16XBjAlUWO46uEuUKHQvSeiU7hQzG9Pqg6lwKQOyZ/rVLZyihk7JGtnWuG83BbW0RFokB/BcgT1q6OegWJiEZw==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-types': 8.14.2 + '@cspell/cspell-types': 8.15.5 comment-json: 4.2.5 - yaml: 2.5.0 + yaml: 2.6.0 dev: true - /cspell-dictionary@8.14.2: - resolution: {integrity: sha512-gWuAvf6queGGUvGbfAxxUq55cZ0OevWPbjnCrSB0PpJ4tqdFd8dLcvVrIKzoE2sBXKPw2NDkmoEngs6iGavC0w==} + /cspell-dictionary@8.15.5: + resolution: {integrity: sha512-L+4MD3KItFGsxR8eY2ed6InsD7hZU1TIAeV2V4sG0wIbUXJXbPFxBTNZJrPLxTzAeCutHmkZwAl4ZCGu18bgtw==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-pipe': 8.14.2 - '@cspell/cspell-types': 8.14.2 - cspell-trie-lib: 8.14.2 + '@cspell/cspell-pipe': 8.15.5 + '@cspell/cspell-types': 8.15.5 + cspell-trie-lib: 8.15.5 fast-equals: 5.0.1 dev: true - /cspell-gitignore@8.14.2: - resolution: {integrity: sha512-lrO/49NaKBpkR7vFxv4OOY+oHmsG5+gNQejrBBWD9Nv9vvjJtz/G36X/rcN6M6tFcQQMWwa01kf04nxz8Ejuhg==} + /cspell-gitignore@8.15.5: + resolution: {integrity: sha512-z5T0Xswfiu2NbkoVdf6uwEWzOgxCBb3L8kwB6lxzK5iyQDW2Bqlk+5b6KQaY38OtjTjJ9zzIJfFN3MfFlMFd3A==} engines: {node: '>=18'} hasBin: true dependencies: - '@cspell/url': 8.14.2 - cspell-glob: 8.14.2 - cspell-io: 8.14.2 + '@cspell/url': 8.15.5 + cspell-glob: 8.15.5 + cspell-io: 8.15.5 find-up-simple: 1.0.0 dev: true - /cspell-glob@8.14.2: - resolution: {integrity: sha512-9Q1Kgoo1ev3fKTpp9y5n8M4RLxd8B0f5o4y5FQe4dBU0j/bt+/YDrLZNWDm77JViV606XQ6fimG1FTTq6pT9/g==} + /cspell-glob@8.15.5: + resolution: {integrity: sha512-VpfP16bRbkHEyGGjf6/EifFxETfS7lpcHbYt1tRi6VhCv1FTMqbB7H7Aw+DQkDezOUN8xdw0gYe/fk5AJGOBDg==} engines: {node: '>=18'} dependencies: - '@cspell/url': 8.14.2 + '@cspell/url': 8.15.5 micromatch: 4.0.8 dev: true - /cspell-grammar@8.14.2: - resolution: {integrity: sha512-eYwceVP80FGYVJenE42ALnvEKOXaXjq4yVbb1Ni1umO/9qamLWNCQ1RP6rRACy5e/cXviAbhrQ5Mtw6n+pyPEQ==} + /cspell-grammar@8.15.5: + resolution: {integrity: sha512-2YnlSATtWHNL6cgx1qmTsY5ZO0zu8VdEmfcLQKgHr67T7atLRUnWAlmh06WMLd5qqp8PpWNPaOJF2prEYAXsUA==} engines: {node: '>=18'} hasBin: true dependencies: - '@cspell/cspell-pipe': 8.14.2 - '@cspell/cspell-types': 8.14.2 + '@cspell/cspell-pipe': 8.15.5 + '@cspell/cspell-types': 8.15.5 dev: true - /cspell-io@8.14.2: - resolution: {integrity: sha512-uaKpHiY3DAgfdzgKMQml6U8F8o9udMuYxGqYa5FVfN7D5Ap7B2edQzSLTUYwxrFEn4skSfp6XY73+nzJvxzH4Q==} + /cspell-io@8.15.5: + resolution: {integrity: sha512-6kBK+EGTG9hiUDfB55r3xbhc7YUA5vJTXoc65pe9PXd4vgXXfrPRuy+5VRtvgSMoQj59oWOQw3ZqTAR95gbGnw==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-service-bus': 8.14.2 - '@cspell/url': 8.14.2 + '@cspell/cspell-service-bus': 8.15.5 + '@cspell/url': 8.15.5 dev: true - /cspell-lib@8.14.2: - resolution: {integrity: sha512-d2oiIXHXnADmnhIuFLOdNE63L7OUfzgpLbYaqAWbkImCUDkevfGrOgnX8TJ03fUgZID4nvQ+3kgu/n2j4eLZjQ==} + /cspell-lib@8.15.5: + resolution: {integrity: sha512-DGieMWc82ouHb6Rq2LRKAlG4ExeQL1D5uvemgaouVHMZq4GvPtVaTwA6qHhw772/5z665oOVsRCicYbDtP4V3w==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-bundled-dicts': 8.14.2 - '@cspell/cspell-pipe': 8.14.2 - '@cspell/cspell-resolver': 8.14.2 - '@cspell/cspell-types': 8.14.2 - '@cspell/dynamic-import': 8.14.2 - '@cspell/filetypes': 8.14.2 - '@cspell/strong-weak-map': 8.14.2 - '@cspell/url': 8.14.2 + '@cspell/cspell-bundled-dicts': 8.15.5 + '@cspell/cspell-pipe': 8.15.5 + '@cspell/cspell-resolver': 8.15.5 + '@cspell/cspell-types': 8.15.5 + '@cspell/dynamic-import': 8.15.5 + '@cspell/filetypes': 8.15.5 + '@cspell/strong-weak-map': 8.15.5 + '@cspell/url': 8.15.5 clear-module: 4.1.2 comment-json: 4.2.5 - cspell-config-lib: 8.14.2 - cspell-dictionary: 8.14.2 - cspell-glob: 8.14.2 - cspell-grammar: 8.14.2 - cspell-io: 8.14.2 - cspell-trie-lib: 8.14.2 + cspell-config-lib: 8.15.5 + cspell-dictionary: 8.15.5 + cspell-glob: 8.15.5 + cspell-grammar: 8.15.5 + cspell-io: 8.15.5 + cspell-trie-lib: 8.15.5 env-paths: 3.0.0 fast-equals: 5.0.1 gensequence: 7.0.0 @@ -2418,39 +2344,38 @@ packages: xdg-basedir: 5.1.0 dev: true - /cspell-trie-lib@8.14.2: - resolution: {integrity: sha512-rZMbaEBGoyy4/zxKECaMyVyGLbuUxYmZ5jlEgiA3xPtEdWwJ4iWRTo5G6dWbQsXoxPYdAXXZ0/q0GQ2y6Jt0kw==} + /cspell-trie-lib@8.15.5: + resolution: {integrity: sha512-DAEkp51aFgpp9DFuJkNki0kVm2SVR1Hp0hD3Pnta7S4X2h5424TpTVVPltAIWtcdxRLGbX6N2x26lTI4K/YfpQ==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-pipe': 8.14.2 - '@cspell/cspell-types': 8.14.2 + '@cspell/cspell-pipe': 8.15.5 + '@cspell/cspell-types': 8.15.5 gensequence: 7.0.0 dev: true - /cspell@8.14.2: - resolution: {integrity: sha512-ii/W7fwO4chNQVYl1C/8k7RW8EXzLb69rvg08p8mSJx8B2UasVJ9tuJpTH2Spo1jX6N3H0dKPWUbd1fAmdAhPg==} + /cspell@8.15.5: + resolution: {integrity: sha512-Vp1WI6axghVvenZS7GUlsZf6JFF7jDXdV5f4nXWjrZLbTrH+wbnFEO2mg+QJWa4IN35igjNYeu9TbA9/EGJzog==} engines: {node: '>=18'} hasBin: true dependencies: - '@cspell/cspell-json-reporter': 8.14.2 - '@cspell/cspell-pipe': 8.14.2 - '@cspell/cspell-types': 8.14.2 - '@cspell/dynamic-import': 8.14.2 - '@cspell/url': 8.14.2 + '@cspell/cspell-json-reporter': 8.15.5 + '@cspell/cspell-pipe': 8.15.5 + '@cspell/cspell-types': 8.15.5 + '@cspell/dynamic-import': 8.15.5 + '@cspell/url': 8.15.5 chalk: 5.3.0 chalk-template: 1.1.0 commander: 12.1.0 - cspell-dictionary: 8.14.2 - cspell-gitignore: 8.14.2 - cspell-glob: 8.14.2 - cspell-io: 8.14.2 - cspell-lib: 8.14.2 - fast-glob: 3.3.2 + cspell-dictionary: 8.15.5 + cspell-gitignore: 8.15.5 + cspell-glob: 8.15.5 + cspell-io: 8.15.5 + cspell-lib: 8.15.5 fast-json-stable-stringify: 2.1.0 - file-entry-cache: 9.0.0 + file-entry-cache: 9.1.0 get-stdin: 9.0.0 semver: 7.6.3 - strip-ansi: 7.1.0 + tinyglobby: 0.2.10 dev: true /css.escape@1.5.1: @@ -2472,8 +2397,8 @@ packages: cssom: 0.3.8 dev: true - /csstype@3.1.2: - resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} + /csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} /data-urls@3.0.2: resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} @@ -2484,39 +2409,42 @@ packages: whatwg-url: 11.0.0 dev: true - /debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true + /data-view-buffer@1.0.1: + resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} + engines: {node: '>= 0.4'} dependencies: - ms: 2.1.3 + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 dev: true - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true + /data-view-byte-length@1.0.1: + resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} + engines: {node: '>= 0.4'} dependencies: - ms: 2.1.2 + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 dev: true - /debug@4.3.6: - resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} - engines: {node: '>=6.0'} + /data-view-byte-offset@1.0.0: + resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + dev: true + + /debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: supports-color: '*' peerDependenciesMeta: supports-color: optional: true dependencies: - ms: 2.1.2 + ms: 2.1.3 dev: true /debug@4.3.7: @@ -2543,21 +2471,21 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true - /define-data-property@1.1.1: - resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} + /define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.2 + es-define-property: 1.0.0 + es-errors: 1.3.0 gopd: 1.0.1 - has-property-descriptors: 1.0.1 dev: true /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.1 - has-property-descriptors: 1.0.1 + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 object-keys: 1.1.1 dev: true @@ -2606,8 +2534,8 @@ packages: webidl-conversions: 7.0.0 dev: true - /electron-to-chromium@1.4.816: - resolution: {integrity: sha512-EKH5X5oqC6hLmiS7/vYtZHZFTNdhsYG5NVPRN6Yn0kQHNBlT59+xSM8HBy66P5fxWpKgZbPqb+diC64ng295Jw==} + /electron-to-chromium@1.5.50: + resolution: {integrity: sha512-eMVObiUQ2LdgeO1F/ySTXsvqvxb6ZH2zPGaMYsWzRDdOddUa77tdmI0ltg+L16UpbWdhPmuF3wIQYyQq65WfZw==} dev: false /emoji-regex@8.0.0: @@ -2618,8 +2546,8 @@ packages: resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} dev: true - /enhanced-resolve@5.15.0: - resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} + /enhanced-resolve@5.17.1: + resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} dependencies: graceful-fs: 4.2.11 @@ -2641,68 +2569,90 @@ packages: engines: {node: '>=18'} dev: true - /es-abstract@1.22.3: - resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} + /es-abstract@1.23.3: + resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} engines: {node: '>= 0.4'} dependencies: - array-buffer-byte-length: 1.0.0 - arraybuffer.prototype.slice: 1.0.2 - available-typed-arrays: 1.0.5 - call-bind: 1.0.5 - es-set-tostringtag: 2.0.2 + array-buffer-byte-length: 1.0.1 + arraybuffer.prototype.slice: 1.0.3 + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + data-view-buffer: 1.0.1 + data-view-byte-length: 1.0.1 + data-view-byte-offset: 1.0.0 + es-define-property: 1.0.0 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-set-tostringtag: 2.0.3 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 - get-intrinsic: 1.2.2 - get-symbol-description: 1.0.0 - globalthis: 1.0.3 + get-intrinsic: 1.2.4 + get-symbol-description: 1.0.2 + globalthis: 1.0.4 gopd: 1.0.1 - has-property-descriptors: 1.0.1 - has-proto: 1.0.1 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 has-symbols: 1.0.3 - hasown: 2.0.0 - internal-slot: 1.0.6 - is-array-buffer: 3.0.2 + hasown: 2.0.2 + internal-slot: 1.0.7 + is-array-buffer: 3.0.4 is-callable: 1.2.7 - is-negative-zero: 2.0.2 + is-data-view: 1.0.1 + is-negative-zero: 2.0.3 is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 + is-shared-array-buffer: 1.0.3 is-string: 1.0.7 - is-typed-array: 1.1.12 + is-typed-array: 1.1.13 is-weakref: 1.0.2 - object-inspect: 1.13.1 + object-inspect: 1.13.2 object-keys: 1.1.1 object.assign: 4.1.5 - regexp.prototype.flags: 1.5.1 - safe-array-concat: 1.0.1 - safe-regex-test: 1.0.0 - string.prototype.trim: 1.2.8 - string.prototype.trimend: 1.0.7 - string.prototype.trimstart: 1.0.7 - typed-array-buffer: 1.0.0 - typed-array-byte-length: 1.0.0 - typed-array-byte-offset: 1.0.0 - typed-array-length: 1.0.4 + regexp.prototype.flags: 1.5.3 + safe-array-concat: 1.1.2 + safe-regex-test: 1.0.3 + string.prototype.trim: 1.2.9 + string.prototype.trimend: 1.0.8 + string.prototype.trimstart: 1.0.8 + typed-array-buffer: 1.0.2 + typed-array-byte-length: 1.0.1 + typed-array-byte-offset: 1.0.2 + typed-array-length: 1.0.6 unbox-primitive: 1.0.2 - which-typed-array: 1.1.13 + which-typed-array: 1.1.15 + dev: true + + /es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.4 + dev: true + + /es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} dev: true - /es-module-lexer@1.5.4: - resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + /es-object-atoms@1.0.0: + resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 dev: true - /es-set-tostringtag@2.0.2: - resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} + /es-set-tostringtag@2.0.3: + resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.2 - has-tostringtag: 1.0.0 - hasown: 2.0.0 + get-intrinsic: 1.2.4 + has-tostringtag: 1.0.2 + hasown: 2.0.2 dev: true /es-shim-unscopables@1.0.2: resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} dependencies: - hasown: 2.0.0 + hasown: 2.0.2 dev: true /es-to-primitive@1.2.1: @@ -2744,13 +2694,14 @@ packages: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 - /escalade@3.1.2: - resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + /escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} + dev: true /escape-string-regexp@2.0.0: resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} @@ -2787,13 +2738,13 @@ packages: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: debug: 3.2.7 - is-core-module: 2.13.1 + is-core-module: 2.15.1 resolve: 1.22.8 transitivePeerDependencies: - supports-color dev: true - /eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.15.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0): + /eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@7.15.0)(eslint-plugin-import@2.31.0)(eslint@8.57.0): resolution: {integrity: sha512-ud9aw4szY9cCT1EWWdGv1L1XR6hh2PaRWif0j2QjQ0pgTY/69iw+W0Z4qZv5wHahOl8isEr+k/JnyAqNQkLkIA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2807,14 +2758,14 @@ packages: optional: true dependencies: '@nolyfill/is-core-module': 1.0.39 - debug: 4.3.6 - enhanced-resolve: 5.15.0 + debug: 4.3.7 + enhanced-resolve: 5.17.1 eslint: 8.57.0 - eslint-module-utils: 2.9.0(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) fast-glob: 3.3.2 - get-tsconfig: 4.8.0 - is-bun-module: 1.1.0 + get-tsconfig: 4.8.1 + is-bun-module: 1.2.1 is-glob: 4.0.3 transitivePeerDependencies: - '@typescript-eslint/parser' @@ -2823,8 +2774,8 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0): - resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} + /eslint-module-utils@2.12.0(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0): + resolution: {integrity: sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -2844,40 +2795,11 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 7.15.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/parser': 7.15.0(eslint@8.57.0)(typescript@5.6.3) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.15.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-module-utils@2.9.0(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0): - resolution: {integrity: sha512-McVbYmwA3NEKwRQY5g4aWMdcZE5xZxV8i8l7CqJSrameuGSQJtSWaL/LxTEzSKKaCcOhlpDR8XEfYXWPrdo/ZQ==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - dependencies: - '@typescript-eslint/parser': 7.15.0(eslint@8.57.0)(typescript@5.5.4) - debug: 3.2.7 - eslint: 8.57.0 - eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.15.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.3(@typescript-eslint/parser@7.15.0)(eslint-plugin-import@2.31.0)(eslint@8.57.0) transitivePeerDependencies: - supports-color dev: true @@ -2890,37 +2812,39 @@ packages: dependencies: escape-string-regexp: 1.0.5 eslint: 8.57.0 - ignore: 5.2.4 + ignore: 5.3.2 dev: true - /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0): - resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} + /eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0): + resolution: {integrity: sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 peerDependenciesMeta: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 7.15.0(eslint@8.57.0)(typescript@5.5.4) - array-includes: 3.1.7 - array.prototype.findlastindex: 1.2.3 + '@rtsao/scc': 1.1.0 + '@typescript-eslint/parser': 7.15.0(eslint@8.57.0)(typescript@5.6.3) + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) - hasown: 2.0.0 - is-core-module: 2.13.1 + eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.15.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.0) + hasown: 2.0.2 + is-core-module: 2.15.1 is-glob: 4.0.3 minimatch: 3.1.2 - object.fromentries: 2.0.7 - object.groupby: 1.0.1 - object.values: 1.1.7 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 semver: 6.3.1 + string.prototype.trimend: 1.0.8 tsconfig-paths: 3.15.0 transitivePeerDependencies: - eslint-import-resolver-typescript @@ -2928,28 +2852,6 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc@50.2.2(eslint@8.57.0): - resolution: {integrity: sha512-i0ZMWA199DG7sjxlzXn5AeYZxpRfMJjDPUl7lL9eJJX8TPRoIaxJU4ys/joP5faM5AXE1eqW/dslCj3uj4Nqpg==} - engines: {node: '>=18'} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - dependencies: - '@es-joy/jsdoccomment': 0.48.0 - are-docs-informative: 0.0.2 - comment-parser: 1.4.1 - debug: 4.3.6 - escape-string-regexp: 4.0.0 - eslint: 8.57.0 - espree: 10.1.0 - esquery: 1.6.0 - parse-imports: 2.1.1 - semver: 7.6.3 - spdx-expression-parse: 4.0.0 - synckit: 0.9.1 - transitivePeerDependencies: - - supports-color - dev: true - /eslint-plugin-react-hooks@4.6.2(eslint@8.57.0): resolution: {integrity: sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==} engines: {node: '>=10'} @@ -2967,7 +2869,7 @@ packages: eslint: 8.57.0 dev: true - /eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@7.15.0)(eslint@8.57.0)(typescript@5.5.4)(vitest@2.1.1): + /eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@7.15.0)(eslint@8.57.0)(typescript@5.6.3)(vitest@2.1.4): resolution: {integrity: sha512-um+odCkccAHU53WdKAw39MY61+1x990uXjSPguUCq3VcEHdqJrOb8OTMrbYlY6f9jAKx7x98kLVlIe3RJeJqoQ==} engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: @@ -2980,10 +2882,10 @@ packages: vitest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 7.15.0(@typescript-eslint/parser@7.15.0)(eslint@8.57.0)(typescript@5.5.4) - '@typescript-eslint/utils': 7.15.0(eslint@8.57.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 7.15.0(@typescript-eslint/parser@7.15.0)(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/utils': 7.15.0(eslint@8.57.0)(typescript@5.6.3) eslint: 8.57.0 - vitest: 2.1.1(@types/node@22.5.1)(@vitest/ui@2.1.1) + vitest: 2.1.4(@types/node@22.8.6)(@vitest/ui@2.1.4) transitivePeerDependencies: - supports-color - typescript @@ -3002,18 +2904,14 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - dev: true - /eslint@8.57.0: resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.0) + '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.0 '@humanwhocodes/config-array': 0.11.14 @@ -3023,13 +2921,13 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.7 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - esquery: 1.5.0 + esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 @@ -3037,7 +2935,7 @@ packages: glob-parent: 6.0.2 globals: 13.24.0 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -3047,28 +2945,19 @@ packages: lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 - optionator: 0.9.3 + optionator: 0.9.4 strip-ansi: 6.0.1 text-table: 0.2.0 transitivePeerDependencies: - supports-color dev: true - /espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 - dev: true - /espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) eslint-visitor-keys: 3.4.3 dev: true @@ -3078,13 +2967,6 @@ packages: hasBin: true dev: true - /esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} - engines: {node: '>=0.10'} - dependencies: - estraverse: 5.3.0 - dev: true - /esquery@1.6.0: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} @@ -3107,7 +2989,7 @@ packages: /estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 dev: true /esutils@2.0.3: @@ -3115,6 +2997,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /expect-type@1.1.0: + resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} + engines: {node: '>=12.0.0'} + dev: true + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true @@ -3149,8 +3036,8 @@ packages: reusify: 1.0.4 dev: true - /fdir@6.3.0(picomatch@4.0.2): - resolution: {integrity: sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==} + /fdir@6.4.2(picomatch@4.0.2): + resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} peerDependencies: picomatch: ^3 || ^4 peerDependenciesMeta: @@ -3171,8 +3058,8 @@ packages: flat-cache: 3.2.0 dev: true - /file-entry-cache@9.0.0: - resolution: {integrity: sha512-6MgEugi8p2tiUhqO7GnPsmbCCzj0YRCwwaTbpGRyKZesjRSzkqkAE9fPp7V2yMs5hwfgbQLgdvSSkGNg1s5Uvw==} + /file-entry-cache@9.1.0: + resolution: {integrity: sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==} engines: {node: '>=18'} dependencies: flat-cache: 5.0.0 @@ -3253,9 +3140,9 @@ packages: resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 functions-have-names: 1.2.3 dev: true @@ -3278,17 +3165,15 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: true - /get-func-name@2.0.2: - resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} - dev: true - - /get-intrinsic@1.2.2: - resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} + /get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} dependencies: + es-errors: 1.3.0 function-bind: 1.1.2 - has-proto: 1.0.1 + has-proto: 1.0.3 has-symbols: 1.0.3 - hasown: 2.0.0 + hasown: 2.0.2 dev: true /get-stdin@9.0.0: @@ -3296,16 +3181,17 @@ packages: engines: {node: '>=12'} dev: true - /get-symbol-description@1.0.0: - resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} + /get-symbol-description@1.0.2: + resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 dev: true - /get-tsconfig@4.8.0: - resolution: {integrity: sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw==} + /get-tsconfig@4.8.1: + resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} dependencies: resolve-pkg-maps: 1.0.0 dev: true @@ -3326,6 +3212,7 @@ packages: /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -3354,11 +3241,12 @@ packages: type-fest: 0.20.2 dev: true - /globalthis@1.0.3: - resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + /globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} dependencies: define-properties: 1.2.1 + gopd: 1.0.1 dev: true /globby@11.1.0: @@ -3368,7 +3256,7 @@ packages: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 dev: true @@ -3376,7 +3264,7 @@ packages: /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 dev: true /graceful-fs@4.2.11: @@ -3391,11 +3279,6 @@ packages: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: true - /has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - dev: false - /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -3405,14 +3288,14 @@ packages: engines: {node: '>=8'} dev: true - /has-property-descriptors@1.0.1: - resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} + /has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} dependencies: - get-intrinsic: 1.2.2 + es-define-property: 1.0.0 dev: true - /has-proto@1.0.1: - resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + /has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} engines: {node: '>= 0.4'} dev: true @@ -3421,15 +3304,15 @@ packages: engines: {node: '>= 0.4'} dev: true - /has-tostringtag@1.0.0: - resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} + /has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: true - /hasown@2.0.0: - resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + /hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} dependencies: function-bind: 1.1.2 @@ -3474,13 +3357,8 @@ packages: safer-buffer: 2.1.2 dev: true - /ignore@5.2.4: - resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} - engines: {node: '>= 4'} - dev: true - - /ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + /ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} dev: true @@ -3508,6 +3386,7 @@ packages: /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. dependencies: once: 1.4.0 wrappy: 1.0.2 @@ -3522,21 +3401,21 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true - /internal-slot@1.0.6: - resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} + /internal-slot@1.0.7: + resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.2 - hasown: 2.0.0 - side-channel: 1.0.4 + es-errors: 1.3.0 + hasown: 2.0.2 + side-channel: 1.0.6 dev: true - /is-array-buffer@3.0.2: - resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} + /is-array-buffer@3.0.4: + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 - is-typed-array: 1.1.12 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 dev: true /is-bigint@1.0.4: @@ -3549,12 +3428,12 @@ packages: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - has-tostringtag: 1.0.0 + call-bind: 1.0.7 + has-tostringtag: 1.0.2 dev: true - /is-bun-module@1.1.0: - resolution: {integrity: sha512-4mTAVPlrXpaN3jtF0lsnPCMGnq4+qZjVIKq0HCpfcqf8OC1SM5oATCIAPM5V5FN05qp2NNnFndphmdZS9CV3hA==} + /is-bun-module@1.2.1: + resolution: {integrity: sha512-AmidtEM6D6NmUiLOvvU7+IePxjEjOzra2h0pSrsfSAcXwl/83zLLXDByafUJy9k/rKK0pvXMLdwKwGHlX2Ke6Q==} dependencies: semver: 7.6.3 dev: true @@ -3564,17 +3443,25 @@ packages: engines: {node: '>= 0.4'} dev: true - /is-core-module@2.13.1: - resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + /is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + dependencies: + hasown: 2.0.2 + dev: true + + /is-data-view@1.0.1: + resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} + engines: {node: '>= 0.4'} dependencies: - hasown: 2.0.0 + is-typed-array: 1.1.13 dev: true /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} dependencies: - has-tostringtag: 1.0.0 + has-tostringtag: 1.0.2 dev: true /is-extglob@2.1.1: @@ -3594,8 +3481,8 @@ packages: is-extglob: 2.1.1 dev: true - /is-negative-zero@2.0.2: - resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} + /is-negative-zero@2.0.3: + resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} engines: {node: '>= 0.4'} dev: true @@ -3603,7 +3490,7 @@ packages: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} dependencies: - has-tostringtag: 1.0.0 + has-tostringtag: 1.0.2 dev: true /is-number@7.0.0: @@ -3624,21 +3511,22 @@ packages: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - has-tostringtag: 1.0.0 + call-bind: 1.0.7 + has-tostringtag: 1.0.2 dev: true - /is-shared-array-buffer@1.0.2: - resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + /is-shared-array-buffer@1.0.3: + resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 dev: true /is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} dependencies: - has-tostringtag: 1.0.0 + has-tostringtag: 1.0.2 dev: true /is-symbol@1.0.4: @@ -3648,17 +3536,17 @@ packages: has-symbols: 1.0.3 dev: true - /is-typed-array@1.1.12: - resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} + /is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} engines: {node: '>= 0.4'} dependencies: - which-typed-array: 1.1.13 + which-typed-array: 1.1.15 dev: true /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 dev: true /isarray@2.0.5: @@ -3738,11 +3626,6 @@ packages: argparse: 2.0.1 dev: true - /jsdoc-type-pratt-parser@4.1.0: - resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==} - engines: {node: '>=12.0.0'} - dev: true - /jsdom@20.0.3: resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} engines: {node: '>=14'} @@ -3784,9 +3667,9 @@ packages: - utf-8-validate dev: true - /jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} + /jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} hasBin: true dev: false @@ -3850,10 +3733,12 @@ packages: dependencies: js-tokens: 4.0.0 - /loupe@3.1.1: - resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} - dependencies: - get-func-name: 2.0.2 + /loupe@3.1.2: + resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} + dev: true + + /lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} dev: true /lru-cache@5.1.1: @@ -3866,25 +3751,26 @@ packages: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true - /magic-string@0.30.11: - resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + /magic-string@0.30.12: + resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} dependencies: '@jridgewell/sourcemap-codec': 1.5.0 dev: true - /marked-terminal@7.1.0(marked@9.1.6): - resolution: {integrity: sha512-+pvwa14KZL74MVXjYdPR3nSInhGhNvPce/3mqLVZT2oUvt654sL1XImFuLZ1pkA866IYZ3ikDTOFUIC7XzpZZg==} + /marked-terminal@7.2.1(marked@9.1.6): + resolution: {integrity: sha512-rQ1MoMFXZICWNsKMiiHwP/Z+92PLKskTPXj+e7uwXmuMPkNn7iTqC+IvDekVm1MPeC9wYQeLxeFaOvudRR/XbQ==} engines: {node: '>=16.0.0'} peerDependencies: - marked: '>=1 <14' + marked: '>=1 <15' dependencies: ansi-escapes: 7.0.0 + ansi-regex: 6.1.0 chalk: 5.3.0 cli-highlight: 2.1.11 cli-table3: 0.6.5 marked: 9.1.6 node-emoji: 2.1.3 - supports-hyperlinks: 3.0.0 + supports-hyperlinks: 3.1.0 dev: true /marked@9.1.6: @@ -3945,10 +3831,6 @@ packages: engines: {node: '>=10'} dev: true - /ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true - /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -3979,8 +3861,8 @@ packages: skin-tone: 2.0.0 dev: true - /node-releases@2.0.14: - resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + /node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} dev: false /nwsapi@2.2.13: @@ -3992,8 +3874,9 @@ packages: engines: {node: '>=0.10.0'} dev: true - /object-inspect@1.13.1: - resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + /object-inspect@1.13.2: + resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} + engines: {node: '>= 0.4'} dev: true /object-keys@1.1.1: @@ -4005,37 +3888,38 @@ packages: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 dev: true - /object.fromentries@2.0.7: - resolution: {integrity: sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==} + /object.fromentries@2.0.8: + resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 dev: true - /object.groupby@1.0.1: - resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==} + /object.groupby@1.0.3: + resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 - get-intrinsic: 1.2.2 + es-abstract: 1.23.3 dev: true - /object.values@1.1.7: - resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==} + /object.values@1.2.0: + resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-object-atoms: 1.0.0 dev: true /once@1.4.0: @@ -4044,16 +3928,16 @@ packages: wrappy: 1.0.2 dev: true - /optionator@0.9.3: - resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + /optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} dependencies: - '@aashutoshrathi/word-wrap': 1.2.6 deep-is: 0.1.4 fast-levenshtein: 2.0.6 levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 + word-wrap: 1.2.5 dev: true /p-limit@3.1.0: @@ -4084,14 +3968,6 @@ packages: callsites: 3.1.0 dev: true - /parse-imports@2.1.1: - resolution: {integrity: sha512-TDT4HqzUiTMO1wJRwg/t/hYk8Wdp3iF/ToMIlAoVQfL1Xs/sTxq1dKWSMjMbQmIarfWKymOyly40+zmPHXMqCA==} - engines: {node: '>= 18'} - dependencies: - es-module-lexer: 1.5.4 - slashes: 3.0.12 - dev: true - /parse5-htmlparser2-tree-adapter@6.0.1: resolution: {integrity: sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==} dependencies: @@ -4145,9 +4021,6 @@ packages: engines: {node: '>= 14.16'} dev: true - /picocolors@1.0.1: - resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} - /picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -4161,13 +4034,18 @@ packages: engines: {node: '>=12'} dev: true - /postcss@8.4.44: - resolution: {integrity: sha512-Aweb9unOEpQ3ezu4Q00DPvvM2ZTUitJdNKeP/+uQgr1IBIqu574IaZoURId7BKtWMREwzKa9OgzPzezWGPWFQw==} + /possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + dev: true + + /postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.7 - picocolors: 1.0.1 - source-map-js: 1.2.0 + picocolors: 1.1.1 + source-map-js: 1.2.1 /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -4252,13 +4130,14 @@ packages: /regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - /regexp.prototype.flags@1.5.1: - resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} + /regexp.prototype.flags@1.5.3: + resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - set-function-name: 2.0.1 + es-errors: 1.3.0 + set-function-name: 2.0.2 dev: true /repeat-string@1.6.1: @@ -4293,7 +4172,7 @@ packages: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: - is-core-module: 2.13.1 + is-core-module: 2.15.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -4305,34 +4184,37 @@ packages: /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true dependencies: glob: 7.2.3 dev: true - /rollup@4.21.2: - resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} + /rollup@4.24.3: + resolution: {integrity: sha512-HBW896xR5HGmoksbi3JBDtmVzWiPAYqp7wip50hjQ67JbDz61nyoMPdqu1DvVW9asYb2M65Z20ZHsyJCMqMyDg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.21.2 - '@rollup/rollup-android-arm64': 4.21.2 - '@rollup/rollup-darwin-arm64': 4.21.2 - '@rollup/rollup-darwin-x64': 4.21.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.21.2 - '@rollup/rollup-linux-arm-musleabihf': 4.21.2 - '@rollup/rollup-linux-arm64-gnu': 4.21.2 - '@rollup/rollup-linux-arm64-musl': 4.21.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.21.2 - '@rollup/rollup-linux-riscv64-gnu': 4.21.2 - '@rollup/rollup-linux-s390x-gnu': 4.21.2 - '@rollup/rollup-linux-x64-gnu': 4.21.2 - '@rollup/rollup-linux-x64-musl': 4.21.2 - '@rollup/rollup-win32-arm64-msvc': 4.21.2 - '@rollup/rollup-win32-ia32-msvc': 4.21.2 - '@rollup/rollup-win32-x64-msvc': 4.21.2 + '@rollup/rollup-android-arm-eabi': 4.24.3 + '@rollup/rollup-android-arm64': 4.24.3 + '@rollup/rollup-darwin-arm64': 4.24.3 + '@rollup/rollup-darwin-x64': 4.24.3 + '@rollup/rollup-freebsd-arm64': 4.24.3 + '@rollup/rollup-freebsd-x64': 4.24.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.3 + '@rollup/rollup-linux-arm-musleabihf': 4.24.3 + '@rollup/rollup-linux-arm64-gnu': 4.24.3 + '@rollup/rollup-linux-arm64-musl': 4.24.3 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.3 + '@rollup/rollup-linux-riscv64-gnu': 4.24.3 + '@rollup/rollup-linux-s390x-gnu': 4.24.3 + '@rollup/rollup-linux-x64-gnu': 4.24.3 + '@rollup/rollup-linux-x64-musl': 4.24.3 + '@rollup/rollup-win32-arm64-msvc': 4.24.3 + '@rollup/rollup-win32-ia32-msvc': 4.24.3 + '@rollup/rollup-win32-x64-msvc': 4.24.3 fsevents: 2.3.3 /run-parallel@1.2.0: @@ -4341,21 +4223,22 @@ packages: queue-microtask: 1.2.3 dev: true - /safe-array-concat@1.0.1: - resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} + /safe-array-concat@1.1.2: + resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} engines: {node: '>=0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 has-symbols: 1.0.3 isarray: 2.0.5 dev: true - /safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} + /safe-regex-test@1.0.3: + resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + es-errors: 1.3.0 is-regex: 1.1.4 dev: true @@ -4385,23 +4268,26 @@ packages: hasBin: true dev: true - /set-function-length@1.1.1: - resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} + /set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.1 - get-intrinsic: 1.2.2 + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 gopd: 1.0.1 - has-property-descriptors: 1.0.1 + has-property-descriptors: 1.0.2 dev: true - /set-function-name@2.0.1: - resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} + /set-function-name@2.0.2: + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.1 + define-data-property: 1.1.4 + es-errors: 1.3.0 functions-have-names: 1.2.3 - has-property-descriptors: 1.0.1 + has-property-descriptors: 1.0.2 dev: true /shebang-command@2.0.0: @@ -4416,21 +4302,23 @@ packages: engines: {node: '>=8'} dev: true - /side-channel@1.0.4: - resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + /side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 - object-inspect: 1.13.1 + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.2 dev: true /siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} dev: true - /sirv@2.0.4: - resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} - engines: {node: '>= 10'} + /sirv@3.0.0: + resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} + engines: {node: '>=18'} dependencies: '@polka/url': 1.0.0-next.28 mrmime: 2.0.0 @@ -4449,12 +4337,8 @@ packages: engines: {node: '>=8'} dev: true - /slashes@3.0.12: - resolution: {integrity: sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==} - dev: true - - /source-map-js@1.2.0: - resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} + /source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} /source-map@0.6.1: @@ -4464,25 +4348,6 @@ packages: dev: true optional: true - /spdx-exceptions@2.5.0: - resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} - dev: true - - /spdx-expression-parse@4.0.0: - resolution: {integrity: sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==} - dependencies: - spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.18 - dev: true - - /spdx-license-ids@3.0.18: - resolution: {integrity: sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==} - dev: true - - /stable-hash@0.0.4: - resolution: {integrity: sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==} - dev: false - /stack-utils@2.0.6: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} @@ -4507,29 +4372,31 @@ packages: strip-ansi: 6.0.1 dev: true - /string.prototype.trim@1.2.8: - resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} + /string.prototype.trim@1.2.9: + resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 dev: true - /string.prototype.trimend@1.0.7: - resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} + /string.prototype.trimend@1.0.8: + resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-object-atoms: 1.0.0 dev: true - /string.prototype.trimstart@1.0.7: - resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} + /string.prototype.trimstart@1.0.8: + resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 - es-abstract: 1.22.3 + es-object-atoms: 1.0.0 dev: true /strip-ansi@6.0.1: @@ -4539,13 +4406,6 @@ packages: ansi-regex: 5.0.1 dev: true - /strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} - engines: {node: '>=12'} - dependencies: - ansi-regex: 6.0.1 - dev: true - /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -4563,21 +4423,14 @@ packages: engines: {node: '>=8'} dev: true - /supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - dependencies: - has-flag: 3.0.0 - dev: false - /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} dependencies: has-flag: 4.0.0 - /supports-hyperlinks@3.0.0: - resolution: {integrity: sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==} + /supports-hyperlinks@3.1.0: + resolution: {integrity: sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==} engines: {node: '>=14.18'} dependencies: has-flag: 4.0.0 @@ -4593,14 +4446,6 @@ packages: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} dev: true - /synckit@0.9.1: - resolution: {integrity: sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==} - engines: {node: ^14.18.0 || >=16.0.0} - dependencies: - '@pkgr/core': 0.1.1 - tslib: 2.6.3 - dev: true - /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -4627,15 +4472,15 @@ packages: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} dev: true - /tinyexec@0.3.0: - resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + /tinyexec@0.3.1: + resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} dev: true - /tinyglobby@0.2.6: - resolution: {integrity: sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==} + /tinyglobby@0.2.10: + resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} engines: {node: '>=12.0.0'} dependencies: - fdir: 6.3.0(picomatch@4.0.2) + fdir: 6.4.2(picomatch@4.0.2) picomatch: 4.0.2 dev: true @@ -4654,11 +4499,6 @@ packages: engines: {node: '>=14.0.0'} dev: true - /to-fast-properties@2.0.0: - resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} - engines: {node: '>=4'} - dev: false - /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -4688,17 +4528,13 @@ packages: punycode: 2.3.1 dev: true - /ts-api-utils@1.3.0(typescript@5.5.4): - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + /ts-api-utils@1.4.0(typescript@5.6.3): + resolution: {integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.5.4 - dev: true - - /ts-expose-internals-conditionally@1.0.0-empty.0: - resolution: {integrity: sha512-F8m9NOF6ZhdOClDVdlM8gj3fDCav4ZIFSs/EI3ksQbAAXVSCN/Jh5OCJDDZWBuBy9psFc6jULGDlPwjMYMhJDw==} + typescript: 5.6.3 dev: true /tsconfig-paths@3.15.0: @@ -4710,68 +4546,64 @@ packages: strip-bom: 3.0.0 dev: true - /tslib@2.6.3: - resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} - dev: true - - /turbo-darwin-64@2.1.1: - resolution: {integrity: sha512-aYNuJpZlCoi0Htd79fl/2DywpewGKijdXeOfg9KzNuPVKzSMYlAXuAlNGh0MKjiOcyqxQGL7Mq9LFhwA0VpDpQ==} + /turbo-darwin-64@2.2.3: + resolution: {integrity: sha512-Rcm10CuMKQGcdIBS3R/9PMeuYnv6beYIHqfZFeKWVYEWH69sauj4INs83zKMTUiZJ3/hWGZ4jet9AOwhsssLyg==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@2.1.1: - resolution: {integrity: sha512-tifJKD8yHY48rHXPMcM8o1jI/Jk2KCaXiNjTKvvy9Zsim61BZksNVLelIbrRoCGwAN6PUBZO2lGU5iL/TQJ5Pw==} + /turbo-darwin-arm64@2.2.3: + resolution: {integrity: sha512-+EIMHkuLFqUdJYsA3roj66t9+9IciCajgj+DVek+QezEdOJKcRxlvDOS2BUaeN8kEzVSsNiAGnoysFWYw4K0HA==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@2.1.1: - resolution: {integrity: sha512-Js6d/bSQe9DuV9c7ITXYpsU/ADzFHABdz1UIHa7Oqjj9VOEbFeA9WpAn0c+mdJrVD+IXJFbbDZUjN7VYssmtcg==} + /turbo-linux-64@2.2.3: + resolution: {integrity: sha512-UBhJCYnqtaeOBQLmLo8BAisWbc9v9daL9G8upLR+XGj6vuN/Nz6qUAhverN4Pyej1g4Nt1BhROnj6GLOPYyqxQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@2.1.1: - resolution: {integrity: sha512-LidzTCq0yvQ+N8w8Qub9FmhQ/mmEIeoqFi7DSupekEV2EjvE9jw/zYc9Pk67X+g7dHVfgOnvVzmrjChdxpFePw==} + /turbo-linux-arm64@2.2.3: + resolution: {integrity: sha512-hJYT9dN06XCQ3jBka/EWvvAETnHRs3xuO/rb5bESmDfG+d9yQjeTMlhRXKrr4eyIMt6cLDt1LBfyi+6CQ+VAwQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@2.1.1: - resolution: {integrity: sha512-GKc9ZywKwy4xLDhwXd6H07yzl0TB52HjXMrFLyHGhCVnf/w0oq4sLJv2sjbvuarPjsyx4xnCBJ3m3oyL2XmFtA==} + /turbo-windows-64@2.2.3: + resolution: {integrity: sha512-NPrjacrZypMBF31b4HE4ROg4P3nhMBPHKS5WTpMwf7wydZ8uvdEHpESVNMOtqhlp857zbnKYgP+yJF30H3N2dQ==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@2.1.1: - resolution: {integrity: sha512-oFKkMj11KKUv3xSK9/fhAEQTxLUp1Ol1EOktwc32+SFtEU0uls7kosAz0b+qe8k3pJGEMFdDPdqoEjyJidbxtQ==} + /turbo-windows-arm64@2.2.3: + resolution: {integrity: sha512-fnNrYBCqn6zgKPKLHu4sOkihBI/+0oYFr075duRxqUZ+1aLWTAGfHZLgjVeLh3zR37CVzuerGIPWAEkNhkWEIw==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@2.1.1: - resolution: {integrity: sha512-u9gUDkmR9dFS8b5kAYqIETK4OnzsS4l2ragJ0+soSMHh6VEeNHjTfSjk1tKxCqLyziCrPogadxP680J+v6yGHw==} + /turbo@2.2.3: + resolution: {integrity: sha512-5lDvSqIxCYJ/BAd6rQGK/AzFRhBkbu4JHVMLmGh/hCb7U3CqSnr5Tjwfy9vc+/5wG2DJ6wttgAaA7MoCgvBKZQ==} hasBin: true optionalDependencies: - turbo-darwin-64: 2.1.1 - turbo-darwin-arm64: 2.1.1 - turbo-linux-64: 2.1.1 - turbo-linux-arm64: 2.1.1 - turbo-windows-64: 2.1.1 - turbo-windows-arm64: 2.1.1 + turbo-darwin-64: 2.2.3 + turbo-darwin-arm64: 2.2.3 + turbo-linux-64: 2.2.3 + turbo-linux-arm64: 2.2.3 + turbo-windows-64: 2.2.3 + turbo-windows-arm64: 2.2.3 dev: true /type-check@0.4.0: @@ -4791,64 +4623,70 @@ packages: engines: {node: '>=10'} dev: true - /typed-array-buffer@1.0.0: - resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + /typed-array-buffer@1.0.2: + resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 - is-typed-array: 1.1.12 + call-bind: 1.0.7 + es-errors: 1.3.0 + is-typed-array: 1.1.13 dev: true - /typed-array-byte-length@1.0.0: - resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + /typed-array-byte-length@1.0.1: + resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 - has-proto: 1.0.1 - is-typed-array: 1.1.12 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 dev: true - /typed-array-byte-offset@1.0.0: - resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + /typed-array-byte-offset@1.0.2: + resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} engines: {node: '>= 0.4'} dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 for-each: 0.3.3 - has-proto: 1.0.1 - is-typed-array: 1.1.12 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 dev: true - /typed-array-length@1.0.4: - resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + /typed-array-length@1.0.6: + resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} + engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 - is-typed-array: 1.1.12 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + possible-typed-array-names: 1.0.0 dev: true - /typescript@4.5.2: - resolution: {integrity: sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==} - engines: {node: '>=4.2.0'} + /typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} hasBin: true - /typescript@5.3.3: - resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + /typescript@5.6.1-rc: + resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==} engines: {node: '>=14.17'} hasBin: true dev: true - /typescript@5.5.4: - resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + /typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} engines: {node: '>=14.17'} hasBin: true /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 @@ -4867,15 +4705,15 @@ packages: engines: {node: '>= 4.0.0'} dev: true - /update-browserslist-db@1.1.0(browserslist@4.23.1): - resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + /update-browserslist-db@1.1.1(browserslist@4.24.2): + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.23.1 - escalade: 3.1.2 - picocolors: 1.0.1 + browserslist: 4.24.2 + escalade: 3.2.0 + picocolors: 1.1.1 dev: false /uri-js@4.4.1: @@ -4891,22 +4729,20 @@ packages: requires-port: 1.0.0 dev: true - /validate-npm-package-name@5.0.0: - resolution: {integrity: sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==} + /validate-npm-package-name@5.0.1: + resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dependencies: - builtins: 5.0.1 dev: true - /vite-node@2.1.1(@types/node@22.5.1): - resolution: {integrity: sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==} + /vite-node@2.1.4(@types/node@22.8.6): + resolution: {integrity: sha512-kqa9v+oi4HwkG6g8ufRnb5AeplcRw8jUF6/7/Qz1qRQOXHImG8YnLbB+LLszENwFnoBl9xIf9nVdCFzNd7GQEg==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 - vite: 5.4.7(@types/node@22.5.1) + vite: 5.4.10(@types/node@22.8.6) transitivePeerDependencies: - '@types/node' - less @@ -4919,8 +4755,8 @@ packages: - terser dev: true - /vite@5.4.7(@types/node@22.5.1): - resolution: {integrity: sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==} + /vite@5.4.10(@types/node@22.8.6): + resolution: {integrity: sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -4950,22 +4786,22 @@ packages: terser: optional: true dependencies: - '@types/node': 22.5.1 + '@types/node': 22.8.6 esbuild: 0.21.5 - postcss: 8.4.44 - rollup: 4.21.2 + postcss: 8.4.47 + rollup: 4.24.3 optionalDependencies: fsevents: 2.3.3 - /vitest@2.1.1(@types/node@22.5.1)(@vitest/ui@2.1.1): - resolution: {integrity: sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==} + /vitest@2.1.4(@types/node@22.8.6)(@vitest/ui@2.1.4): + resolution: {integrity: sha512-eDjxbVAJw1UJJCHr5xr/xM86Zx+YxIEXGAR+bmnEID7z9qWfoxpHw0zdobz+TQAFOLT+nEXz3+gx6nUJ7RgmlQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.1.1 - '@vitest/ui': 2.1.1 + '@vitest/browser': 2.1.4 + '@vitest/ui': 2.1.4 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -4982,26 +4818,27 @@ packages: jsdom: optional: true dependencies: - '@types/node': 22.5.1 - '@vitest/expect': 2.1.1 - '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.7) - '@vitest/pretty-format': 2.1.1 - '@vitest/runner': 2.1.1 - '@vitest/snapshot': 2.1.1 - '@vitest/spy': 2.1.1 - '@vitest/ui': 2.1.1(vitest@2.1.1) - '@vitest/utils': 2.1.1 - chai: 5.1.1 - debug: 4.3.6 - magic-string: 0.30.11 + '@types/node': 22.8.6 + '@vitest/expect': 2.1.4 + '@vitest/mocker': 2.1.4(vite@5.4.10) + '@vitest/pretty-format': 2.1.4 + '@vitest/runner': 2.1.4 + '@vitest/snapshot': 2.1.4 + '@vitest/spy': 2.1.4 + '@vitest/ui': 2.1.4(vitest@2.1.4) + '@vitest/utils': 2.1.4 + chai: 5.1.2 + debug: 4.3.7 + expect-type: 1.1.0 + magic-string: 0.30.12 pathe: 1.1.2 std-env: 3.7.0 tinybench: 2.9.0 - tinyexec: 0.3.0 + tinyexec: 0.3.1 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.7(@types/node@22.5.1) - vite-node: 2.1.1(@types/node@22.5.1) + vite: 5.4.10(@types/node@22.8.6) + vite-node: 2.1.4(@types/node@22.8.6) why-is-node-running: 2.3.0 transitivePeerDependencies: - less @@ -5065,15 +4902,15 @@ packages: is-symbol: 1.0.4 dev: true - /which-typed-array@1.1.13: - resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} + /which-typed-array@1.1.15: + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} engines: {node: '>= 0.4'} dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 for-each: 0.3.3 gopd: 1.0.1 - has-tostringtag: 1.0.0 + has-tostringtag: 1.0.2 dev: true /which@2.0.2: @@ -5093,6 +4930,11 @@ packages: stackback: 0.0.2 dev: true + /word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + dev: true + /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -5142,8 +4984,8 @@ packages: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: false - /yaml@2.5.0: - resolution: {integrity: sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==} + /yaml@2.6.0: + resolution: {integrity: sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==} engines: {node: '>= 14'} hasBin: true dev: true @@ -5158,7 +5000,7 @@ packages: engines: {node: '>=10'} dependencies: cliui: 7.0.4 - escalade: 3.1.2 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 diff --git a/turbo.json b/turbo.json index 6ee8b240..976ebecd 100644 --- a/turbo.json +++ b/turbo.json @@ -18,7 +18,7 @@ "dependsOn": ["^build", "build"] }, "test": { - "dependsOn": ["generate"], + "dependsOn": ["generate", "^generate"], "cache": false }, "attw": { From df732d6b935d200fc9c67fc364d6dcfc5333ebcc Mon Sep 17 00:00:00 2001 From: Sri Krishna <93153132+srikrsna-buf@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:22:30 +0530 Subject: [PATCH 3/3] Release 2.0.0-rc.3 (#480) --- .../gen/eliza-ElizaService_connectquery.ts | 2 +- packages/connect-query-core/package.json | 8 ++-- packages/connect-query/package.json | 8 ++-- .../protoc-gen-connect-query/package.json | 4 +- ...st-SecondSnapshotService_connectquery.d.ts | 2 +- ...test-SecondSnapshotService_connectquery.js | 2 +- .../test-SnapshotService_connectquery.d.ts | 2 +- .../test-SnapshotService_connectquery.js | 2 +- ...st-SecondSnapshotService_connectquery.d.ts | 2 +- ...test-SecondSnapshotService_connectquery.js | 2 +- .../test-SnapshotService_connectquery.d.ts | 2 +- .../test-SnapshotService_connectquery.js | 2 +- ...test-SecondSnapshotService_connectquery.ts | 2 +- .../test-SnapshotService_connectquery.ts | 2 +- packages/test-utils/package.json | 6 +-- pnpm-lock.yaml | 48 +++++++++++++------ 16 files changed, 58 insertions(+), 38 deletions(-) diff --git a/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts b/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts index c42835aa..8f8a29bb 100644 --- a/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts +++ b/examples/react/basic/src/gen/eliza-ElizaService_connectquery.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "target=ts" +// @generated by protoc-gen-connect-query v2.0.0-rc.3 with parameter "target=ts" // @generated from file eliza.proto (package connectrpc.eliza.v1, syntax proto3) /* eslint-disable */ diff --git a/packages/connect-query-core/package.json b/packages/connect-query-core/package.json index 281e504e..4d1d9a36 100644 --- a/packages/connect-query-core/package.json +++ b/packages/connect-query-core/package.json @@ -1,6 +1,6 @@ { "name": "@connectrpc/connect-query-core", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.3", "description": "Core of Connect-Query, framework agnostic helpers for type-safe queries.", "license": "Apache-2.0", "repository": { @@ -33,15 +33,15 @@ "@bufbuild/jest-environment-jsdom": "^0.1.1", "@bufbuild/protobuf": "^2.2.1", "@bufbuild/protoc-gen-es": "^2.2.1", - "@connectrpc/connect": "^2.0.0-rc.2", - "@connectrpc/connect-web": "^2.0.0-rc.2", + "@connectrpc/connect": "^2.0.0-rc.3", + "@connectrpc/connect-web": "^2.0.0-rc.3", "test-utils": "workspace:*", "typescript": "^5.6.3", "@tanstack/query-core": "^5.59.16" }, "peerDependencies": { "@bufbuild/protobuf": "2.x", - "@connectrpc/connect": "^2.0.0-rc.1", + "@connectrpc/connect": "^2.0.0-rc.3", "@tanstack/query-core": "5.x" }, "files": [ diff --git a/packages/connect-query/package.json b/packages/connect-query/package.json index 8e3e734a..b4706e69 100644 --- a/packages/connect-query/package.json +++ b/packages/connect-query/package.json @@ -1,6 +1,6 @@ { "name": "@connectrpc/connect-query", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.3", "description": "TypeScript-first expansion pack for TanStack Query that gives you Protobuf superpowers.", "license": "Apache-2.0", "repository": { @@ -36,8 +36,8 @@ "@bufbuild/jest-environment-jsdom": "^0.1.1", "@bufbuild/protobuf": "^2.2.1", "@bufbuild/protoc-gen-es": "^2.2.1", - "@connectrpc/connect": "^2.0.0-rc.2", - "@connectrpc/connect-web": "^2.0.0-rc.2", + "@connectrpc/connect": "^2.0.0-rc.3", + "@connectrpc/connect-web": "^2.0.0-rc.3", "@tanstack/react-query": "^5.59.16", "@testing-library/react": "^16.0.1", "@types/react": "^18.3.12", @@ -49,7 +49,7 @@ }, "peerDependencies": { "@bufbuild/protobuf": "2.x", - "@connectrpc/connect": "^2.0.0-rc.1", + "@connectrpc/connect": "^2.0.0-rc.3", "@tanstack/react-query": "5.x", "react": "^18.3.1", "react-dom": "^18.3.1" diff --git a/packages/protoc-gen-connect-query/package.json b/packages/protoc-gen-connect-query/package.json index 958de0a3..21de1971 100644 --- a/packages/protoc-gen-connect-query/package.json +++ b/packages/protoc-gen-connect-query/package.json @@ -1,6 +1,6 @@ { "name": "@connectrpc/protoc-gen-connect-query", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.3", "description": "Code generator for connect-query", "license": "Apache-2.0", "sideEffects": false, @@ -29,7 +29,7 @@ "devDependencies": { "@bufbuild/buf": "1.46.0", "@bufbuild/protoc-gen-es": "^2.2.1", - "@connectrpc/connect": "^2.0.0-rc.2", + "@connectrpc/connect": "^2.0.0-rc.3", "@connectrpc/connect-query": "workspace:*", "@tanstack/react-query": "^5.59.16", "typescript": "^5.6.3" diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.d.ts index aa7c3d0f..07d17c8c 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.d.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "js_import_style=legacy_commonjs,import_extension=js" +// @generated by protoc-gen-connect-query v2.0.0-rc.3 with parameter "js_import_style=legacy_commonjs,import_extension=js" // @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.js index 928bcd9b..cb317d14 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.js +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SecondSnapshotService_connectquery.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "js_import_style=legacy_commonjs,import_extension=js" +// @generated by protoc-gen-connect-query v2.0.0-rc.3 with parameter "js_import_style=legacy_commonjs,import_extension=js" // @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.d.ts index e6cfcd7c..db1aefa7 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.d.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "js_import_style=legacy_commonjs,import_extension=js" +// @generated by protoc-gen-connect-query v2.0.0-rc.3 with parameter "js_import_style=legacy_commonjs,import_extension=js" // @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ diff --git a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.js index 7e2a116f..ff055699 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.js +++ b/packages/protoc-gen-connect-query/snapshots/gen_cjs/test-SnapshotService_connectquery.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "js_import_style=legacy_commonjs,import_extension=js" +// @generated by protoc-gen-connect-query v2.0.0-rc.3 with parameter "js_import_style=legacy_commonjs,import_extension=js" // @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.d.ts index 05ab2b8d..e2c1e9c6 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.d.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v2.0.0-rc.2 +// @generated by protoc-gen-connect-query v2.0.0-rc.3 // @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.js index 77e3214a..fcdb5c0a 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.js +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SecondSnapshotService_connectquery.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v2.0.0-rc.2 +// @generated by protoc-gen-connect-query v2.0.0-rc.3 // @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.d.ts b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.d.ts index 8c7e8a2c..eb14f7b7 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.d.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v2.0.0-rc.2 +// @generated by protoc-gen-connect-query v2.0.0-rc.3 // @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ diff --git a/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.js b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.js index 4993bac2..1cdc3437 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.js +++ b/packages/protoc-gen-connect-query/snapshots/gen_js/test-SnapshotService_connectquery.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v2.0.0-rc.2 +// @generated by protoc-gen-connect-query v2.0.0-rc.3 // @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ diff --git a/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SecondSnapshotService_connectquery.ts b/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SecondSnapshotService_connectquery.ts index a117c67e..9993693c 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SecondSnapshotService_connectquery.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SecondSnapshotService_connectquery.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "target=ts" +// @generated by protoc-gen-connect-query v2.0.0-rc.3 with parameter "target=ts" // @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ diff --git a/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SnapshotService_connectquery.ts b/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SnapshotService_connectquery.ts index cebcd7d5..291f0649 100644 --- a/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SnapshotService_connectquery.ts +++ b/packages/protoc-gen-connect-query/snapshots/gen_ts/test-SnapshotService_connectquery.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// @generated by protoc-gen-connect-query v2.0.0-rc.2 with parameter "target=ts" +// @generated by protoc-gen-connect-query v2.0.0-rc.3 with parameter "target=ts" // @generated from file test.proto (package test, syntax proto3) /* eslint-disable */ diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index e10b13a0..624ebee3 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,7 +1,7 @@ { "name": "test-utils", "private": true, - "version": "0.0.0", + "version": "2.0.0-rc.3", "type": "module", "scripts": { "clean": "rm -rf ./dist/*", @@ -16,8 +16,8 @@ "@bufbuild/buf": "^1.46.0", "@bufbuild/protobuf": "^2.2.1", "@bufbuild/protoc-gen-es": "^2.2.1", - "@connectrpc/connect": "^2.0.0-rc.2", - "@connectrpc/connect-web": "^2.0.0-rc.2", + "@connectrpc/connect": "^2.0.0-rc.3", + "@connectrpc/connect-web": "^2.0.0-rc.3", "@types/react": "18.3.12", "react": "^18.3.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a5c0a828..83c24db2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -145,11 +145,11 @@ importers: specifier: ^2.2.1 version: 2.2.1(@bufbuild/protobuf@2.2.1) '@connectrpc/connect': - specifier: ^2.0.0-rc.2 - version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1) + specifier: ^2.0.0-rc.3 + version: 2.0.0-rc.3(@bufbuild/protobuf@2.2.1) '@connectrpc/connect-web': - specifier: ^2.0.0-rc.2 - version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.2) + specifier: ^2.0.0-rc.3 + version: 2.0.0-rc.3(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.3) '@tanstack/react-query': specifier: ^5.59.16 version: 5.59.16(react@18.3.1) @@ -193,11 +193,11 @@ importers: specifier: ^2.2.1 version: 2.2.1(@bufbuild/protobuf@2.2.1) '@connectrpc/connect': - specifier: ^2.0.0-rc.2 - version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1) + specifier: ^2.0.0-rc.3 + version: 2.0.0-rc.3(@bufbuild/protobuf@2.2.1) '@connectrpc/connect-web': - specifier: ^2.0.0-rc.2 - version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.2) + specifier: ^2.0.0-rc.3 + version: 2.0.0-rc.3(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.3) '@tanstack/query-core': specifier: ^5.59.16 version: 5.59.16 @@ -224,8 +224,8 @@ importers: specifier: ^2.2.1 version: 2.2.1(@bufbuild/protobuf@2.2.1) '@connectrpc/connect': - specifier: ^2.0.0-rc.2 - version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1) + specifier: ^2.0.0-rc.3 + version: 2.0.0-rc.3(@bufbuild/protobuf@2.2.1) '@connectrpc/connect-query': specifier: workspace:* version: link:../connect-query @@ -248,11 +248,11 @@ importers: specifier: ^2.2.1 version: 2.2.1(@bufbuild/protobuf@2.2.1) '@connectrpc/connect': - specifier: ^2.0.0-rc.2 - version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1) + specifier: ^2.0.0-rc.3 + version: 2.0.0-rc.3(@bufbuild/protobuf@2.2.1) '@connectrpc/connect-web': - specifier: ^2.0.0-rc.2 - version: 2.0.0-rc.2(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.2) + specifier: ^2.0.0-rc.3 + version: 2.0.0-rc.3(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.3) '@types/react': specifier: 18.3.12 version: 18.3.12 @@ -598,6 +598,17 @@ packages: dependencies: '@bufbuild/protobuf': 2.2.1 '@connectrpc/connect': 2.0.0-rc.2(@bufbuild/protobuf@2.2.1) + dev: false + + /@connectrpc/connect-web@2.0.0-rc.3(@bufbuild/protobuf@2.2.1)(@connectrpc/connect@2.0.0-rc.3): + resolution: {integrity: sha512-w88P8Lsn5CCsA7MFRl2e6oLY4J/5toiNtJns/YJrlyQaWOy3RO8pDgkz+iIkG98RPMhj2thuBvsd3Cn4DKKCkw==} + peerDependencies: + '@bufbuild/protobuf': ^2.2.0 + '@connectrpc/connect': 2.0.0-rc.3 + dependencies: + '@bufbuild/protobuf': 2.2.1 + '@connectrpc/connect': 2.0.0-rc.3(@bufbuild/protobuf@2.2.1) + dev: true /@connectrpc/connect@2.0.0-rc.2(@bufbuild/protobuf@2.2.1): resolution: {integrity: sha512-EBXUD82U1Z6eWhFu+90ZvuEUCM8K03gV7cGNSQXJ9kDV07dfuvm/LevbzMEsST43Wea6ywYzd2HBNEAPJCxu8g==} @@ -605,6 +616,15 @@ packages: '@bufbuild/protobuf': ^2.2.0 dependencies: '@bufbuild/protobuf': 2.2.1 + dev: false + + /@connectrpc/connect@2.0.0-rc.3(@bufbuild/protobuf@2.2.1): + resolution: {integrity: sha512-ARBt64yEyKbanyRETTjcjJuHr2YXorzQo0etyS5+P6oSeW8xEuzajA9g+zDnMcj1hlX2dQE93foIWQGfpru7gQ==} + peerDependencies: + '@bufbuild/protobuf': ^2.2.0 + dependencies: + '@bufbuild/protobuf': 2.2.1 + dev: true /@cspell/cspell-bundled-dicts@8.15.5: resolution: {integrity: sha512-Su1gnTBbE7ouMQvM4DISUmP6sZiFyQRE+ODvjBzW+c/x9ZLbVp+2hBEEmxFSn5fdZCJzPOMwzwsjlLYykb9iUg==}