Compare commits

...

4 Commits

Author SHA1 Message Date
Gregory Schier
d126aad172 Update tauri NPM 2023-05-29 12:49:50 -07:00
Gregory Schier
acc5c0de50 Fix graphql instrospection 2023-05-29 12:31:34 -07:00
Gregory Schier
3391da111d Change version 2023-04-27 16:53:39 -07:00
Gregory Schier
e37ce96956 Version 1.0.0 2023-04-27 16:47:49 -07:00
12 changed files with 316 additions and 205 deletions

172
package-lock.json generated
View File

@@ -25,7 +25,7 @@
"@tanstack/react-query": "^4.28.0",
"@tanstack/react-query-devtools": "^4.28.0",
"@tanstack/react-query-persist-client": "^4.28.0",
"@tauri-apps/api": "^1.2.0",
"@tauri-apps/api": "^1.3.0",
"@vitejs/plugin-react": "^3.1.0",
"buffer": "^6.0.3",
"classnames": "^2.3.2",
@@ -47,7 +47,7 @@
},
"devDependencies": {
"@tailwindcss/nesting": "^0.0.0-insiders.565cd3e",
"@tauri-apps/cli": "^1.2.2",
"@tauri-apps/cli": "^1.3.1",
"@types/node": "^18.7.10",
"@types/papaparse": "^5.3.7",
"@types/parse-color": "^1.0.1",
@@ -1892,9 +1892,9 @@
}
},
"node_modules/@tauri-apps/api": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.2.0.tgz",
"integrity": "sha512-lsI54KI6HGf7VImuf/T9pnoejfgkNoXveP14pVV7XarrQ46rOejIVJLFqHI9sRReJMGdh2YuCoI3cc/yCWCsrw==",
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.3.0.tgz",
"integrity": "sha512-AH+3FonkKZNtfRtGrObY38PrzEj4d+1emCbwNGu0V2ENbXjlLHMZQlUh+Bhu/CRmjaIwZMGJ3yFvWaZZgTHoog==",
"engines": {
"node": ">= 14.6.0",
"npm": ">= 6.6.0",
@@ -1906,9 +1906,9 @@
}
},
"node_modules/@tauri-apps/cli": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.2.3.tgz",
"integrity": "sha512-erxtXuPhMEGJPBtnhPILD4AjuT81GZsraqpFvXAmEJZ2p8P6t7MVBifCL8LznRknznM3jn90D3M8RNBP3wcXTw==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.3.1.tgz",
"integrity": "sha512-o4I0JujdITsVRm3/0spfJX7FcKYrYV1DXJqzlWIn6IY25/RltjU6qbC1TPgVww3RsRX63jyVUTcWpj5wwFl+EQ==",
"dev": true,
"bin": {
"tauri": "tauri.js"
@@ -1921,21 +1921,21 @@
"url": "https://opencollective.com/tauri"
},
"optionalDependencies": {
"@tauri-apps/cli-darwin-arm64": "1.2.3",
"@tauri-apps/cli-darwin-x64": "1.2.3",
"@tauri-apps/cli-linux-arm-gnueabihf": "1.2.3",
"@tauri-apps/cli-linux-arm64-gnu": "1.2.3",
"@tauri-apps/cli-linux-arm64-musl": "1.2.3",
"@tauri-apps/cli-linux-x64-gnu": "1.2.3",
"@tauri-apps/cli-linux-x64-musl": "1.2.3",
"@tauri-apps/cli-win32-ia32-msvc": "1.2.3",
"@tauri-apps/cli-win32-x64-msvc": "1.2.3"
"@tauri-apps/cli-darwin-arm64": "1.3.1",
"@tauri-apps/cli-darwin-x64": "1.3.1",
"@tauri-apps/cli-linux-arm-gnueabihf": "1.3.1",
"@tauri-apps/cli-linux-arm64-gnu": "1.3.1",
"@tauri-apps/cli-linux-arm64-musl": "1.3.1",
"@tauri-apps/cli-linux-x64-gnu": "1.3.1",
"@tauri-apps/cli-linux-x64-musl": "1.3.1",
"@tauri-apps/cli-win32-ia32-msvc": "1.3.1",
"@tauri-apps/cli-win32-x64-msvc": "1.3.1"
}
},
"node_modules/@tauri-apps/cli-darwin-arm64": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.2.3.tgz",
"integrity": "sha512-phJN3fN8FtZZwqXg08bcxfq1+X1JSDglLvRxOxB7VWPq+O5SuB8uLyssjJsu+PIhyZZnIhTGdjhzLSFhSXfLsw==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.3.1.tgz",
"integrity": "sha512-QlepYVPgOgspcwA/u4kGG4ZUijlXfdRtno00zEy+LxinN/IRXtk+6ErVtsmoLi1ZC9WbuMwzAcsRvqsD+RtNAg==",
"cpu": [
"arm64"
],
@@ -1949,9 +1949,9 @@
}
},
"node_modules/@tauri-apps/cli-darwin-x64": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.2.3.tgz",
"integrity": "sha512-jFZ/y6z8z6v4yliIbXKBXA7BJgtZVMsITmEXSuD6s5+eCOpDhQxbRkr6CA+FFfr+/r96rWSDSgDenDQuSvPAKw==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.3.1.tgz",
"integrity": "sha512-fKcAUPVFO3jfDKXCSDGY0MhZFF/wDtx3rgFnogWYu4knk38o9RaqRkvMvqJhLYPuWaEM5h6/z1dRrr9KKCbrVg==",
"cpu": [
"x64"
],
@@ -1965,9 +1965,9 @@
}
},
"node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.2.3.tgz",
"integrity": "sha512-C7h5vqAwXzY0kRGSU00Fj8PudiDWFCiQqqUNI1N+fhCILrzWZB9TPBwdx33ZfXKt/U4+emdIoo/N34v3TiAOmQ==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.3.1.tgz",
"integrity": "sha512-+4H0dv8ltJHYu/Ma1h9ixUPUWka9EjaYa8nJfiMsdCI4LJLNE6cPveE7RmhZ59v9GW1XB108/k083JUC/OtGvA==",
"cpu": [
"arm"
],
@@ -1981,9 +1981,9 @@
}
},
"node_modules/@tauri-apps/cli-linux-arm64-gnu": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.2.3.tgz",
"integrity": "sha512-buf1c8sdkuUzVDkGPQpyUdAIIdn5r0UgXU6+H5fGPq/Xzt5K69JzXaeo6fHsZEZghbV0hOK+taKV4J0m30UUMQ==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.3.1.tgz",
"integrity": "sha512-Pj3odVO1JAxLjYmoXKxcrpj/tPxcA8UP8N06finhNtBtBaxAjrjjxKjO4968KB0BUH7AASIss9EL4Tr0FGnDuw==",
"cpu": [
"arm64"
],
@@ -1997,9 +1997,9 @@
}
},
"node_modules/@tauri-apps/cli-linux-arm64-musl": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.2.3.tgz",
"integrity": "sha512-x88wPS9W5xAyk392vc4uNHcKBBvCp0wf4H9JFMF9OBwB7vfd59LbQCFcPSu8f0BI7bPrOsyHqspWHuFL8ojQEA==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.3.1.tgz",
"integrity": "sha512-tA0JdDLPFaj42UDIVcF2t8V0tSha40rppcmAR/MfQpTCxih6399iMjwihz9kZE1n4b5O4KTq9GliYo50a8zYlQ==",
"cpu": [
"arm64"
],
@@ -2013,9 +2013,9 @@
}
},
"node_modules/@tauri-apps/cli-linux-x64-gnu": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.2.3.tgz",
"integrity": "sha512-ZMz1jxEVe0B4/7NJnlPHmwmSIuwiD6ViXKs8F+OWWz2Y4jn5TGxWKFg7DLx5OwQTRvEIZxxT7lXHi5CuTNAxKg==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.3.1.tgz",
"integrity": "sha512-FDU+Mnvk6NLkqQimcNojdKpMN4Y3W51+SQl+NqG9AFCWprCcSg62yRb84751ujZuf2MGT8HQOfmd0i77F4Q3tQ==",
"cpu": [
"x64"
],
@@ -2029,9 +2029,9 @@
}
},
"node_modules/@tauri-apps/cli-linux-x64-musl": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.2.3.tgz",
"integrity": "sha512-B/az59EjJhdbZDzawEVox0LQu2ZHCZlk8rJf85AMIktIUoAZPFbwyiUv7/zjzA/sY6Nb58OSJgaPL2/IBy7E0A==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.3.1.tgz",
"integrity": "sha512-MpO3akXFmK8lZYEbyQRDfhdxz1JkTBhonVuz5rRqxwA7gnGWHa1aF1+/2zsy7ahjB2tQ9x8DDFDMdVE20o9HrA==",
"cpu": [
"x64"
],
@@ -2045,9 +2045,9 @@
}
},
"node_modules/@tauri-apps/cli-win32-ia32-msvc": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.2.3.tgz",
"integrity": "sha512-ypdO1OdC5ugNJAKO2m3sb1nsd+0TSvMS9Tr5qN/ZSMvtSduaNwrcZ3D7G/iOIanrqu/Nl8t3LYlgPZGBKlw7Ng==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.3.1.tgz",
"integrity": "sha512-9Boeo3K5sOrSBAZBuYyGkpV2RfnGQz3ZhGJt4hE6P+HxRd62lS6+qDKAiw1GmkZ0l1drc2INWrNeT50gwOKwIQ==",
"cpu": [
"ia32"
],
@@ -2061,9 +2061,9 @@
}
},
"node_modules/@tauri-apps/cli-win32-x64-msvc": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.2.3.tgz",
"integrity": "sha512-CsbHQ+XhnV/2csOBBDVfH16cdK00gNyNYUW68isedmqcn8j+s0e9cQ1xXIqi+Hue3awp8g3ImYN5KPepf3UExw==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.3.1.tgz",
"integrity": "sha512-wMrTo91hUu5CdpbElrOmcZEoJR4aooTG+fbtcc87SMyPGQy1Ux62b+ZdwLvL1sVTxnIm//7v6QLRIWGiUjCPwA==",
"cpu": [
"x64"
],
@@ -8774,87 +8774,87 @@
}
},
"@tauri-apps/api": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.2.0.tgz",
"integrity": "sha512-lsI54KI6HGf7VImuf/T9pnoejfgkNoXveP14pVV7XarrQ46rOejIVJLFqHI9sRReJMGdh2YuCoI3cc/yCWCsrw=="
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.3.0.tgz",
"integrity": "sha512-AH+3FonkKZNtfRtGrObY38PrzEj4d+1emCbwNGu0V2ENbXjlLHMZQlUh+Bhu/CRmjaIwZMGJ3yFvWaZZgTHoog=="
},
"@tauri-apps/cli": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.2.3.tgz",
"integrity": "sha512-erxtXuPhMEGJPBtnhPILD4AjuT81GZsraqpFvXAmEJZ2p8P6t7MVBifCL8LznRknznM3jn90D3M8RNBP3wcXTw==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.3.1.tgz",
"integrity": "sha512-o4I0JujdITsVRm3/0spfJX7FcKYrYV1DXJqzlWIn6IY25/RltjU6qbC1TPgVww3RsRX63jyVUTcWpj5wwFl+EQ==",
"dev": true,
"requires": {
"@tauri-apps/cli-darwin-arm64": "1.2.3",
"@tauri-apps/cli-darwin-x64": "1.2.3",
"@tauri-apps/cli-linux-arm-gnueabihf": "1.2.3",
"@tauri-apps/cli-linux-arm64-gnu": "1.2.3",
"@tauri-apps/cli-linux-arm64-musl": "1.2.3",
"@tauri-apps/cli-linux-x64-gnu": "1.2.3",
"@tauri-apps/cli-linux-x64-musl": "1.2.3",
"@tauri-apps/cli-win32-ia32-msvc": "1.2.3",
"@tauri-apps/cli-win32-x64-msvc": "1.2.3"
"@tauri-apps/cli-darwin-arm64": "1.3.1",
"@tauri-apps/cli-darwin-x64": "1.3.1",
"@tauri-apps/cli-linux-arm-gnueabihf": "1.3.1",
"@tauri-apps/cli-linux-arm64-gnu": "1.3.1",
"@tauri-apps/cli-linux-arm64-musl": "1.3.1",
"@tauri-apps/cli-linux-x64-gnu": "1.3.1",
"@tauri-apps/cli-linux-x64-musl": "1.3.1",
"@tauri-apps/cli-win32-ia32-msvc": "1.3.1",
"@tauri-apps/cli-win32-x64-msvc": "1.3.1"
}
},
"@tauri-apps/cli-darwin-arm64": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.2.3.tgz",
"integrity": "sha512-phJN3fN8FtZZwqXg08bcxfq1+X1JSDglLvRxOxB7VWPq+O5SuB8uLyssjJsu+PIhyZZnIhTGdjhzLSFhSXfLsw==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.3.1.tgz",
"integrity": "sha512-QlepYVPgOgspcwA/u4kGG4ZUijlXfdRtno00zEy+LxinN/IRXtk+6ErVtsmoLi1ZC9WbuMwzAcsRvqsD+RtNAg==",
"dev": true,
"optional": true
},
"@tauri-apps/cli-darwin-x64": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.2.3.tgz",
"integrity": "sha512-jFZ/y6z8z6v4yliIbXKBXA7BJgtZVMsITmEXSuD6s5+eCOpDhQxbRkr6CA+FFfr+/r96rWSDSgDenDQuSvPAKw==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.3.1.tgz",
"integrity": "sha512-fKcAUPVFO3jfDKXCSDGY0MhZFF/wDtx3rgFnogWYu4knk38o9RaqRkvMvqJhLYPuWaEM5h6/z1dRrr9KKCbrVg==",
"dev": true,
"optional": true
},
"@tauri-apps/cli-linux-arm-gnueabihf": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.2.3.tgz",
"integrity": "sha512-C7h5vqAwXzY0kRGSU00Fj8PudiDWFCiQqqUNI1N+fhCILrzWZB9TPBwdx33ZfXKt/U4+emdIoo/N34v3TiAOmQ==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.3.1.tgz",
"integrity": "sha512-+4H0dv8ltJHYu/Ma1h9ixUPUWka9EjaYa8nJfiMsdCI4LJLNE6cPveE7RmhZ59v9GW1XB108/k083JUC/OtGvA==",
"dev": true,
"optional": true
},
"@tauri-apps/cli-linux-arm64-gnu": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.2.3.tgz",
"integrity": "sha512-buf1c8sdkuUzVDkGPQpyUdAIIdn5r0UgXU6+H5fGPq/Xzt5K69JzXaeo6fHsZEZghbV0hOK+taKV4J0m30UUMQ==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.3.1.tgz",
"integrity": "sha512-Pj3odVO1JAxLjYmoXKxcrpj/tPxcA8UP8N06finhNtBtBaxAjrjjxKjO4968KB0BUH7AASIss9EL4Tr0FGnDuw==",
"dev": true,
"optional": true
},
"@tauri-apps/cli-linux-arm64-musl": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.2.3.tgz",
"integrity": "sha512-x88wPS9W5xAyk392vc4uNHcKBBvCp0wf4H9JFMF9OBwB7vfd59LbQCFcPSu8f0BI7bPrOsyHqspWHuFL8ojQEA==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.3.1.tgz",
"integrity": "sha512-tA0JdDLPFaj42UDIVcF2t8V0tSha40rppcmAR/MfQpTCxih6399iMjwihz9kZE1n4b5O4KTq9GliYo50a8zYlQ==",
"dev": true,
"optional": true
},
"@tauri-apps/cli-linux-x64-gnu": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.2.3.tgz",
"integrity": "sha512-ZMz1jxEVe0B4/7NJnlPHmwmSIuwiD6ViXKs8F+OWWz2Y4jn5TGxWKFg7DLx5OwQTRvEIZxxT7lXHi5CuTNAxKg==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.3.1.tgz",
"integrity": "sha512-FDU+Mnvk6NLkqQimcNojdKpMN4Y3W51+SQl+NqG9AFCWprCcSg62yRb84751ujZuf2MGT8HQOfmd0i77F4Q3tQ==",
"dev": true,
"optional": true
},
"@tauri-apps/cli-linux-x64-musl": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.2.3.tgz",
"integrity": "sha512-B/az59EjJhdbZDzawEVox0LQu2ZHCZlk8rJf85AMIktIUoAZPFbwyiUv7/zjzA/sY6Nb58OSJgaPL2/IBy7E0A==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.3.1.tgz",
"integrity": "sha512-MpO3akXFmK8lZYEbyQRDfhdxz1JkTBhonVuz5rRqxwA7gnGWHa1aF1+/2zsy7ahjB2tQ9x8DDFDMdVE20o9HrA==",
"dev": true,
"optional": true
},
"@tauri-apps/cli-win32-ia32-msvc": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.2.3.tgz",
"integrity": "sha512-ypdO1OdC5ugNJAKO2m3sb1nsd+0TSvMS9Tr5qN/ZSMvtSduaNwrcZ3D7G/iOIanrqu/Nl8t3LYlgPZGBKlw7Ng==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.3.1.tgz",
"integrity": "sha512-9Boeo3K5sOrSBAZBuYyGkpV2RfnGQz3ZhGJt4hE6P+HxRd62lS6+qDKAiw1GmkZ0l1drc2INWrNeT50gwOKwIQ==",
"dev": true,
"optional": true
},
"@tauri-apps/cli-win32-x64-msvc": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.2.3.tgz",
"integrity": "sha512-CsbHQ+XhnV/2csOBBDVfH16cdK00gNyNYUW68isedmqcn8j+s0e9cQ1xXIqi+Hue3awp8g3ImYN5KPepf3UExw==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.3.1.tgz",
"integrity": "sha512-wMrTo91hUu5CdpbElrOmcZEoJR4aooTG+fbtcc87SMyPGQy1Ux62b+ZdwLvL1sVTxnIm//7v6QLRIWGiUjCPwA==",
"dev": true,
"optional": true
},

View File

@@ -33,7 +33,7 @@
"@tanstack/react-query": "^4.28.0",
"@tanstack/react-query-devtools": "^4.28.0",
"@tanstack/react-query-persist-client": "^4.28.0",
"@tauri-apps/api": "^1.2.0",
"@tauri-apps/api": "^1.3.0",
"@vitejs/plugin-react": "^3.1.0",
"buffer": "^6.0.3",
"classnames": "^2.3.2",
@@ -55,7 +55,7 @@
},
"devDependencies": {
"@tailwindcss/nesting": "^0.0.0-insiders.565cd3e",
"@tauri-apps/cli": "^1.2.2",
"@tauri-apps/cli": "^1.3.1",
"@types/node": "^18.7.10",
"@types/papaparse": "^5.3.7",
"@types/parse-color": "^1.0.1",

263
src-tauri/Cargo.lock generated
View File

@@ -74,7 +74,7 @@ version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70151a5226578411132d798aa248df45b30aa34aea2e580628870b4d87be717b"
dependencies = [
"darling",
"darling 0.13.4",
"pmutil",
"proc-macro2",
"quote",
@@ -282,12 +282,13 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
[[package]]
name = "cfb"
version = "0.6.1"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74f89d248799e3f15f91b70917f65381062a01bb8e222700ea0e5a7ff9785f9c"
checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f"
dependencies = [
"byteorder",
"uuid 0.8.2",
"fnv",
"uuid",
]
[[package]]
@@ -543,6 +544,12 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "cty"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35"
[[package]]
name = "cxx"
version = "1.0.94"
@@ -567,7 +574,7 @@ dependencies = [
"proc-macro2",
"quote",
"scratch",
"syn 2.0.12",
"syn 2.0.18",
]
[[package]]
@@ -584,7 +591,7 @@ checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.12",
"syn 2.0.18",
]
[[package]]
@@ -593,8 +600,18 @@ version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c"
dependencies = [
"darling_core",
"darling_macro",
"darling_core 0.13.4",
"darling_macro 0.13.4",
]
[[package]]
name = "darling"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944"
dependencies = [
"darling_core 0.20.1",
"darling_macro 0.20.1",
]
[[package]]
@@ -611,17 +628,42 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "darling_core"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim",
"syn 2.0.18",
]
[[package]]
name = "darling_macro"
version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
dependencies = [
"darling_core",
"darling_core 0.13.4",
"quote",
"syn 1.0.109",
]
[[package]]
name = "darling_macro"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a"
dependencies = [
"darling_core 0.20.1",
"quote",
"syn 2.0.18",
]
[[package]]
name = "dashmap"
version = "5.4.0"
@@ -1055,7 +1097,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.12",
"syn 2.0.18",
]
[[package]]
@@ -1156,6 +1198,20 @@ dependencies = [
"system-deps 6.0.4",
]
[[package]]
name = "gdkwayland-sys"
version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cca49a59ad8cfdf36ef7330fe7bdfbe1d34323220cc16a0de2679ee773aee2c2"
dependencies = [
"gdk-sys",
"glib-sys",
"gobject-sys",
"libc",
"pkg-config",
"system-deps 6.0.4",
]
[[package]]
name = "gdkx11-sys"
version = "0.15.1"
@@ -1567,9 +1623,9 @@ dependencies = [
[[package]]
name = "ico"
version = "0.2.0"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "031530fe562d8c8d71c0635013d6d155bbfe8ba0aa4b4d2d24ce8af6b71047bd"
checksum = "e3804960be0bb5e4edb1e1ad67afd321a9ecfd875c3e65c099468fd2717d7cae"
dependencies = [
"byteorder",
"png",
@@ -1636,13 +1692,14 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
"hashbrown",
"serde",
]
[[package]]
name = "infer"
version = "0.7.0"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20b2b533137b9cad970793453d4f921c2e91312a6d88b1085c07bc15fc51bb3b"
checksum = "a898e4b7951673fce96614ce5751d13c40fc5674bc2d759288e46c3ab62598b3"
dependencies = [
"cfb",
]
@@ -1767,7 +1824,19 @@ checksum = "eb3fa5a61630976fc4c353c70297f2e93f1930e3ccee574d59d618ccbd5154ce"
dependencies = [
"serde",
"serde_json",
"treediff",
"treediff 3.0.2",
]
[[package]]
name = "json-patch"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658"
dependencies = [
"serde",
"serde_json",
"thiserror",
"treediff 4.0.2",
]
[[package]]
@@ -2220,6 +2289,15 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "num_threads"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44"
dependencies = [
"libc",
]
[[package]]
name = "objc"
version = "0.2.7"
@@ -2575,7 +2653,7 @@ dependencies = [
"line-wrap",
"quick-xml",
"serde",
"time 0.3.20",
"time 0.3.15",
]
[[package]]
@@ -2655,9 +2733,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
[[package]]
name = "proc-macro2"
version = "1.0.54"
version = "1.0.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e472a104799c74b514a57226160104aa483546de37e839ec50e3c2e41dd87534"
checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b"
dependencies = [
"unicode-ident",
]
@@ -2682,9 +2760,9 @@ dependencies = [
[[package]]
name = "quote"
version = "1.0.26"
version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
dependencies = [
"proc-macro2",
]
@@ -2772,9 +2850,12 @@ dependencies = [
[[package]]
name = "raw-window-handle"
version = "0.5.2"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9"
checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a"
dependencies = [
"cty",
]
[[package]]
name = "redox_syscall"
@@ -3123,7 +3204,7 @@ checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.12",
"syn 2.0.18",
]
[[package]]
@@ -3146,7 +3227,7 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.12",
"syn 2.0.18",
]
[[package]]
@@ -3187,24 +3268,30 @@ dependencies = [
[[package]]
name = "serde_with"
version = "1.14.0"
version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff"
checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe"
dependencies = [
"base64 0.13.1",
"chrono",
"hex",
"indexmap",
"serde",
"serde_json",
"serde_with_macros",
"time 0.3.15",
]
[[package]]
name = "serde_with_macros"
version = "1.5.2"
version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082"
checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f"
dependencies = [
"darling",
"darling 0.20.1",
"proc-macro2",
"quote",
"syn 1.0.109",
"syn 2.0.18",
]
[[package]]
@@ -3435,7 +3522,7 @@ dependencies = [
"sqlx-rt",
"stringprep",
"thiserror",
"time 0.3.20",
"time 0.3.15",
"tokio-stream",
"url",
"webpki-roots",
@@ -3917,9 +4004,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.12"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79d9531f94112cfc3e4c8f5f02cb2b58f72c97b7efd85f70203cc6d8efda5927"
checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e"
dependencies = [
"proc-macro2",
"quote",
@@ -3954,9 +4041,9 @@ dependencies = [
[[package]]
name = "tao"
version = "0.15.8"
version = "0.16.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac8e6399427c8494f9849b58694754d7cc741293348a6836b6c8d2c5aa82d8e6"
checksum = "6a6d198e01085564cea63e976ad1566c1ba2c2e4cc79578e35d9f05521505e31"
dependencies = [
"bitflags",
"cairo-rs",
@@ -3970,6 +4057,7 @@ dependencies = [
"gdk",
"gdk-pixbuf",
"gdk-sys",
"gdkwayland-sys",
"gdkx11-sys",
"gio",
"glib",
@@ -3988,18 +4076,29 @@ dependencies = [
"objc",
"once_cell",
"parking_lot 0.12.1",
"paste",
"png",
"raw-window-handle",
"scopeguard",
"serde",
"tao-macros",
"unicode-segmentation",
"uuid 1.3.0",
"uuid",
"windows 0.39.0",
"windows-implement",
"x11-dl",
]
[[package]]
name = "tao-macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b27a4bcc5eb524658234589bdffc7e7bfb996dbae6ce9393bfd39cb4159b445"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "tar"
version = "0.4.38"
@@ -4013,13 +4112,13 @@ dependencies = [
[[package]]
name = "tauri"
version = "1.2.4"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe7e0f1d535e7cbbbab43c82be4fc992b84f9156c16c160955617e0260ebc449"
checksum = "d42ba3a2e8556722f31336a0750c10dbb6a81396a1c452977f515da83f69f842"
dependencies = [
"anyhow",
"attohttpc",
"base64 0.13.1",
"base64 0.21.0",
"cocoa",
"dirs-next",
"embed_plist",
@@ -4055,10 +4154,10 @@ dependencies = [
"tauri-utils",
"tempfile",
"thiserror",
"time 0.3.20",
"time 0.3.15",
"tokio",
"url",
"uuid 1.3.0",
"uuid",
"webkit2gtk",
"webview2-com",
"windows 0.39.0",
@@ -4074,7 +4173,7 @@ dependencies = [
"anyhow",
"cargo_toml",
"heck 0.4.1",
"json-patch",
"json-patch 0.2.7",
"semver 1.0.17",
"serde_json",
"tauri-utils",
@@ -4083,14 +4182,14 @@ dependencies = [
[[package]]
name = "tauri-codegen"
version = "1.2.1"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14388d484b6b1b5dc0f6a7d6cc6433b3b230bec85eaa576adcdf3f9fafa49251"
checksum = "e5a2105f807c6f50b2fa2ce5abd62ef207bc6f14c9fcc6b8caec437f6fb13bde"
dependencies = [
"base64 0.13.1",
"base64 0.21.0",
"brotli",
"ico",
"json-patch",
"json-patch 1.0.0",
"plist",
"png",
"proc-macro2",
@@ -4102,16 +4201,16 @@ dependencies = [
"sha2",
"tauri-utils",
"thiserror",
"time 0.3.20",
"uuid 1.3.0",
"time 0.3.15",
"uuid",
"walkdir",
]
[[package]]
name = "tauri-macros"
version = "1.2.1"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "069319e5ecbe653a799b94b0690d9f9bf5d00f7b1d3989aa331c524d4e354075"
checksum = "8784cfe6f5444097e93c69107d1ac5e8f13d02850efa8d8f2a40fe79674cef46"
dependencies = [
"heck 0.4.1",
"proc-macro2",
@@ -4123,9 +4222,9 @@ dependencies = [
[[package]]
name = "tauri-runtime"
version = "0.12.1"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c507d954d08ac8705d235bc70ec6975b9054fb95ff7823af72dbb04186596f3b"
checksum = "b3b80ea3fcd5fefb60739a3b577b277e8fc30434538a2f5bba82ad7d4368c422"
dependencies = [
"gtk",
"http",
@@ -4136,16 +4235,17 @@ dependencies = [
"serde_json",
"tauri-utils",
"thiserror",
"uuid 1.3.0",
"url",
"uuid",
"webview2-com",
"windows 0.39.0",
]
[[package]]
name = "tauri-runtime-wry"
version = "0.12.2"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36b1c5764a41a13176a4599b5b7bd0881bea7d94dfe45e1e755f789b98317e30"
checksum = "d1c396950b1ba06aee1b4ffe6c7cd305ff433ca0e30acbc5fa1a2f92a4ce70f1"
dependencies = [
"cocoa",
"gtk",
@@ -4154,7 +4254,7 @@ dependencies = [
"raw-window-handle",
"tauri-runtime",
"tauri-utils",
"uuid 1.3.0",
"uuid",
"webkit2gtk",
"webview2-com",
"windows 0.39.0",
@@ -4163,9 +4263,9 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "1.2.1"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5abbc109a6eb45127956ffcc26ef0e875d160150ac16cfa45d26a6b2871686f1"
checksum = "5a6f9c2dafef5cbcf52926af57ce9561bd33bb41d7394f8bb849c0330260d864"
dependencies = [
"brotli",
"ctor",
@@ -4173,7 +4273,7 @@ dependencies = [
"heck 0.4.1",
"html5ever",
"infer",
"json-patch",
"json-patch 1.0.0",
"kuchiki",
"memchr",
"phf 0.10.1",
@@ -4255,7 +4355,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.12",
"syn 2.0.18",
]
[[package]]
@@ -4281,30 +4381,22 @@ dependencies = [
[[package]]
name = "time"
version = "0.3.20"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890"
checksum = "d634a985c4d4238ec39cacaed2e7ae552fbd3c476b552c1deac3021b7d7eaf0c"
dependencies = [
"itoa 1.0.6",
"libc",
"num_threads",
"serde",
"time-core",
"time-macros",
]
[[package]]
name = "time-core"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
[[package]]
name = "time-macros"
version = "0.2.8"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36"
dependencies = [
"time-core",
]
checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792"
[[package]]
name = "tinyvec"
@@ -4503,6 +4595,15 @@ dependencies = [
"serde_json",
]
[[package]]
name = "treediff"
version = "4.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303"
dependencies = [
"serde_json",
]
[[package]]
name = "triomphe"
version = "0.1.8"
@@ -4600,12 +4701,6 @@ version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
[[package]]
name = "uuid"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
[[package]]
name = "uuid"
version = "1.3.0"
@@ -5164,9 +5259,9 @@ dependencies = [
[[package]]
name = "wry"
version = "0.23.4"
version = "0.24.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c1ad8e2424f554cc5bdebe8aa374ef5b433feff817aebabca0389961fc7ef98"
checksum = "33748f35413c8a98d45f7a08832d848c0c5915501803d1faade5a4ebcd258cea"
dependencies = [
"base64 0.13.1",
"block",
@@ -5250,7 +5345,7 @@ dependencies = [
"tauri",
"tauri-build",
"tokio",
"uuid 1.3.0",
"uuid",
]
[[package]]

View File

@@ -20,7 +20,7 @@ cocoa = "0.24.1"
[dependencies]
serde_json = { version = "1.0", features = ["raw_value"] }
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.2", features = ["config-toml", "devtools", "fs-read-file", "os-all", "protocol-asset", "shell-open", "system-tray", "updater", "window-start-dragging"] }
tauri = { version = "1.3", features = ["config-toml", "devtools", "fs-read-file", "os-all", "protocol-asset", "shell-open", "system-tray", "updater", "window-start-dragging"] }
http = "0.2.8"
reqwest = { version = "0.11.14", features = ["json"] }
tokio = { version = "1.25.0", features = ["sync"] }

View File

@@ -233,7 +233,10 @@ async fn actually_send_ephemeral_request(
let dir = app_handle.path_resolver().app_data_dir().unwrap();
let base_dir = dir.join("responses");
create_dir_all(base_dir.clone()).expect("Failed to create responses dir");
let body_path = base_dir.join(response.id.clone());
let body_path = match response.id == "" {
false => base_dir.join(response.id.clone()),
true => base_dir.join(uuid::Uuid::new_v4().to_string()),
};
let mut f = File::options()
.create(true)
.truncate(true)

View File

@@ -8,7 +8,7 @@
},
"package": {
"productName": "Yaak",
"version": "2023.0.16"
"version": "2023.0.17"
},
"tauri": {
"windows": [],
@@ -49,13 +49,20 @@
"icons/icon.ico"
],
"identifier": "co.schier.yaak",
"longDescription": "",
"longDescription": "The best cross-platform visual API client",
"resources": [
"plugins/*",
"migrations/*"
],
"shortDescription": "",
"targets": "all",
"shortDescription": "The best API client",
"targets": [
"deb",
"appimage",
"nsis",
"app",
"dmg",
"updater"
],
"deb": {
"depends": []
},

View File

@@ -156,7 +156,7 @@
/* NOTE: Extra selector required to override default styles */
.cm-tooltip.cm-tooltip {
@apply shadow-lg bg-gray-50 rounded text-gray-700 border border-gray-200 z-50 pointer-events-auto text-sm;
@apply shadow-lg bg-gray-50 rounded text-gray-700 border border-gray-200 z-50 pointer-events-auto text-[0.75rem];
&.cm-completionInfo-right {
@apply ml-1;

View File

@@ -3,6 +3,7 @@ import type { GraphQLSchema } from 'graphql';
import { buildClientSchema, getIntrospectionQuery } from '../components/core/Editor';
import { minPromiseMillis } from '../lib/minPromiseMillis';
import type { HttpRequest } from '../lib/models';
import { getResponseBodyText } from '../lib/responseBody';
import { sendEphemeralRequest } from '../lib/sendEphemeralRequest';
import { useDebouncedValue } from './useDebouncedValue';
@@ -35,11 +36,12 @@ export function useIntrospectGraphQL(baseRequest: HttpRequest) {
);
}
if (response.body === null) {
const body = await getResponseBodyText(response);
if (body === null) {
return Promise.reject(new Error('Empty body returned in response'));
}
const { data } = JSON.parse(response.body);
const { data } = JSON.parse(body);
return buildClientSchema(data);
},
});

View File

@@ -1,20 +1,12 @@
import { useQuery } from '@tanstack/react-query';
import { readBinaryFile } from '@tauri-apps/api/fs';
import type { HttpResponse } from '../lib/models';
import { getResponseBodyBlob } from '../lib/responseBody';
export function useResponseBodyBlob(response: HttpResponse) {
return useQuery<Uint8Array | null>({
enabled: response != null,
queryKey: ['response-body-binary', response?.updatedAt],
initialData: null,
queryFn: async () => {
if (response.body) {
return Uint8Array.of(...response.body);
}
if (response.bodyPath) {
return readBinaryFile(response.bodyPath);
}
return null;
},
queryFn: () => getResponseBodyBlob(response),
}).data;
}

View File

@@ -1,22 +1,11 @@
import { useQuery } from '@tanstack/react-query';
import { readTextFile } from '@tauri-apps/api/fs';
import type { HttpResponse } from '../lib/models';
import { getResponseBodyText } from '../lib/responseBody';
export function useResponseBodyText(response: HttpResponse) {
return useQuery<string | null>({
queryKey: ['response-body-text', response?.updatedAt],
initialData: null,
queryFn: async () => {
if (response.body) {
const uint8Array = Uint8Array.of(...response.body);
return new TextDecoder().decode(uint8Array);
}
if (response.bodyPath) {
return await readTextFile(response.bodyPath);
}
return null;
},
queryFn: () => getResponseBodyText(response),
}).data;
}

View File

@@ -0,0 +1,23 @@
import { readBinaryFile, readTextFile } from '@tauri-apps/api/fs';
import type { HttpResponse } from './models';
export async function getResponseBodyText(response: HttpResponse): Promise<string | null> {
if (response.body) {
const uint8Array = Uint8Array.of(...response.body);
return new TextDecoder().decode(uint8Array);
}
if (response.bodyPath) {
return await readTextFile(response.bodyPath);
}
return null;
}
export async function getResponseBodyBlob(response: HttpResponse): Promise<Uint8Array | null> {
if (response.body) {
return Uint8Array.of(...response.body);
}
if (response.bodyPath) {
return readBinaryFile(response.bodyPath);
}
return null;
}

View File

@@ -1,7 +1,7 @@
import { invoke } from '@tauri-apps/api';
import type { HttpRequest, HttpResponse } from './models';
export function sendEphemeralRequest(request: HttpRequest): Promise<HttpResponse> {
export async function sendEphemeralRequest(request: HttpRequest): Promise<HttpResponse> {
// Remove some things that we don't want to associate
const newRequest = { ...request, id: '', requestId: '', workspaceId: '' };
return invoke('send_ephemeral_request', { request: newRequest });