Revert "refactor: use axios tauri adapter"

This reverts commit 7e361cb3f1.
This commit is contained in:
MystiPanda 2024-05-26 21:18:02 +08:00
parent 4108451ebe
commit 8bc7607783
4 changed files with 0 additions and 70 deletions

View File

@ -32,7 +32,6 @@
"@types/json-schema": "^7.0.15",
"ahooks": "^3.7.11",
"axios": "^1.6.8",
"axios-tauri-api-adapter": "^0.2.1",
"dayjs": "1.11.5",
"i18next": "^23.11.3",
"lodash-es": "^4.17.21",

View File

@ -49,9 +49,6 @@ importers:
axios:
specifier: ^1.6.8
version: 1.6.8
axios-tauri-api-adapter:
specifier: ^0.2.1
version: 0.2.1
dayjs:
specifier: 1.11.5
version: 1.11.5
@ -1605,13 +1602,6 @@ packages:
integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==,
}
axios-tauri-api-adapter@0.2.1:
resolution:
{
integrity: sha512-XuC6rDl8yOUrctN1nUe5fngPhmq+zhkUvKZVRCUOrlSn5UdLYH0OjrLJl7h8DQdxcAzZw0Oiw+PQFNOBuL42hg==,
}
engines: { node: ">=16", pnpm: ">=7" }
axios@1.6.8:
resolution:
{
@ -1659,12 +1649,6 @@ packages:
engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 }
hasBin: true
build-url-ts@6.1.7:
resolution:
{
integrity: sha512-KU8hfHxEpBTvoJA4XLiL88JiJN6U0SIVtnXKMSKgxf2T+bP3tDlzd/WIl/dthi+01YXeS49yUxkL3JXyqPdIAw==,
}
callsites@3.1.0:
resolution:
{
@ -2133,12 +2117,6 @@ packages:
integrity: sha512-/sXbVCWayk6GDVg3ctOX6nxaVj7So40FcFAnWlWGNAB1LpYKcV5Cd10APjPjW80O7zYW2MsjBV4zZ7IZO5fVow==,
}
http-status-codes@2.3.0:
resolution:
{
integrity: sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==,
}
https-proxy-agent@5.0.1:
resolution:
{
@ -2913,12 +2891,6 @@ packages:
integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==,
}
querystringify@2.2.0:
resolution:
{
integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==,
}
react-dom@18.3.1:
resolution:
{
@ -3080,12 +3052,6 @@ packages:
integrity: sha512-z3tJrAs2kIs1AqIIy6pzHmAHlF1hWQ+OdY4/hv+Wxe35EhyLKcajL33iUEn3ScxtFox9nUvRufR/Zre8Q08H/g==,
}
requires-port@1.0.0:
resolution:
{
integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==,
}
reselect@4.1.8:
resolution:
{
@ -3390,12 +3356,6 @@ packages:
peerDependencies:
browserslist: ">= 4.21.0"
url-parse@1.5.10:
resolution:
{
integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==,
}
vfile-message@4.0.2:
resolution:
{
@ -4455,16 +4415,6 @@ snapshots:
asynckit@0.4.0: {}
axios-tauri-api-adapter@0.2.1:
dependencies:
"@tauri-apps/api": 1.5.4
axios: 1.6.8
build-url-ts: 6.1.7
http-status-codes: 2.3.0
url-parse: 1.5.10
transitivePeerDependencies:
- debug
axios@1.6.8:
dependencies:
follow-redirects: 1.15.6
@ -4496,8 +4446,6 @@ snapshots:
node-releases: 2.0.14
update-browserslist-db: 1.0.15(browserslist@4.23.0)
build-url-ts@6.1.7: {}
callsites@3.1.0: {}
camelcase@6.3.0: {}
@ -4774,8 +4722,6 @@ snapshots:
html-url-attributes@3.0.0: {}
http-status-codes@2.3.0: {}
https-proxy-agent@5.0.1:
dependencies:
agent-base: 6.0.2
@ -5293,8 +5239,6 @@ snapshots:
end-of-stream: 1.4.4
once: 1.4.0
querystringify@2.2.0: {}
react-dom@18.3.1(react@18.3.1):
dependencies:
loose-envify: 1.4.0
@ -5404,8 +5348,6 @@ snapshots:
unified: 11.0.4
vfile: 6.0.1
requires-port@1.0.0: {}
reselect@4.1.8: {}
resize-observer-polyfill@1.5.1: {}
@ -5581,11 +5523,6 @@ snapshots:
escalade: 3.1.2
picocolors: 1.0.0
url-parse@1.5.10:
dependencies:
querystringify: 2.2.0
requires-port: 1.0.0
vfile-message@4.0.2:
dependencies:
"@types/unist": 3.0.2

View File

@ -38,10 +38,6 @@
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyOEMyRjBCQkVGOUJEREYKUldUZnZmbStDeStNMHU5Mmo1N24xQXZwSVRYbXA2NUpzZE5oVzlqeS9Bc0t6RVV4MmtwVjBZaHgK"
},
"allowlist": {
"http": {
"all": true,
"scope": ["http://**", "http://**"]
},
"shell": {
"all": true
},

View File

@ -1,4 +1,3 @@
import axiosTauriApiAdapter from "axios-tauri-api-adapter";
import axios, { AxiosInstance } from "axios";
import { getClashInfo } from "./cmds";
@ -26,7 +25,6 @@ export const getAxios = async (force: boolean = false) => {
} catch {}
axiosIns = axios.create({
adapter: axiosTauriApiAdapter,
baseURL: `http://${server}`,
headers: secret ? { Authorization: `Bearer ${secret}` } : {},
timeout: 15000,