feat: Integrate HTTP plugin and update IP detection to use fetch API #4712

This commit is contained in:
Tunglies
2025-09-18 19:35:14 +08:00
parent 409571f54b
commit 9d96ac0f6a
8 changed files with 71 additions and 67 deletions

70
pnpm-lock.yaml generated
View File

@@ -50,9 +50,9 @@ importers:
'@tauri-apps/plugin-fs':
specifier: ^2.4.2
version: 2.4.2
'@tauri-apps/plugin-notification':
specifier: ^2.3.1
version: 2.3.1
'@tauri-apps/plugin-http':
specifier: ~2
version: 2.5.2
'@tauri-apps/plugin-process':
specifier: ^2.3.0
version: 2.3.0
@@ -71,18 +71,12 @@ importers:
axios:
specifier: ^1.12.2
version: 1.12.2
cli-color:
specifier: ^2.0.4
version: 2.0.4
dayjs:
specifier: 1.11.18
version: 1.11.18
foxact:
specifier: ^0.2.49
version: 0.2.49(react@19.1.1)
glob:
specifier: ^11.0.3
version: 11.0.3
i18next:
specifier: ^25.5.2
version: 25.5.2(typescript@5.9.2)
@@ -131,15 +125,9 @@ importers:
react-virtuoso:
specifier: ^4.14.0
version: 4.14.0(react-dom@19.1.1(react@19.1.1))(react@19.1.1)
sockette:
specifier: ^2.0.6
version: 2.0.6
swr:
specifier: ^2.3.6
version: 2.3.6(react@19.1.1)
tar:
specifier: ^7.4.3
version: 7.4.3
types-pac:
specifier: ^1.0.3
version: 1.0.3
@@ -177,6 +165,9 @@ importers:
adm-zip:
specifier: ^0.5.16
version: 0.5.16
cli-color:
specifier: ^2.0.4
version: 2.0.4
commander:
specifier: ^14.0.1
version: 14.0.1
@@ -189,6 +180,9 @@ importers:
eslint-plugin-react:
specifier: ^7.37.5
version: 7.37.5(eslint@9.35.0(jiti@2.5.1))
glob:
specifier: ^11.0.3
version: 11.0.3
globals:
specifier: ^16.4.0
version: 16.4.0
@@ -204,18 +198,15 @@ importers:
node-fetch:
specifier: ^3.3.2
version: 3.3.2
path:
specifier: ^0.12.7
version: 0.12.7
prettier:
specifier: ^3.6.2
version: 3.6.2
process:
specifier: ^0.11.10
version: 0.11.10
sass:
specifier: ^1.92.1
version: 1.92.1
tar:
specifier: ^7.4.3
version: 7.4.3
terser:
specifier: ^5.44.0
version: 5.44.0
@@ -1629,8 +1620,8 @@ packages:
'@tauri-apps/plugin-fs@2.4.2':
resolution: {integrity: sha512-YGhmYuTgXGsi6AjoV+5mh2NvicgWBfVJHHheuck6oHD+HC9bVWPaHvCP0/Aw4pHDejwrvT8hE3+zZAaWf+hrig==}
'@tauri-apps/plugin-notification@2.3.1':
resolution: {integrity: sha512-7gqgfANSREKhh35fY1L4j3TUjUdePmU735FYDqRGeIf8nMXWpcx6j4FhN9/4nYz+m0mv79DCTPLqIPTySggGgg==}
'@tauri-apps/plugin-http@2.5.2':
resolution: {integrity: sha512-x1mQKHSLDk4mS2S938OTeyk8L7QyLpCrKZCZcjkljGsvTvRMojCvI9SeJ1kaxc7t8xSilkC7WdId8xER9TIGLg==}
'@tauri-apps/plugin-process@2.3.0':
resolution: {integrity: sha512-0DNj6u+9csODiV4seSxxRbnLpeGYdojlcctCuLOCgpH9X3+ckVZIEj6H7tRQ7zqWr7kSTEWnrxtAdBb0FbtrmQ==}
@@ -2501,9 +2492,6 @@ packages:
resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}
engines: {node: '>=0.8.19'}
inherits@2.0.3:
resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==}
inline-style-parser@0.2.4:
resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==}
@@ -3040,9 +3028,6 @@ packages:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
engines: {node: '>=8'}
path@0.12.7:
resolution: {integrity: sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==}
picocolors@1.1.1:
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
@@ -3071,10 +3056,6 @@ packages:
engines: {node: '>=14'}
hasBin: true
process@0.11.10:
resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==}
engines: {node: '>= 0.6.0'}
prop-types@15.8.1:
resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==}
@@ -3334,9 +3315,6 @@ packages:
snake-case@3.0.4:
resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==}
sockette@2.0.6:
resolution: {integrity: sha512-W6iG8RGV6Zife3Cj+FhuyHV447E6fqFM2hKmnaQrTvg3OydINV3Msj3WPFbX76blUlUxvQSMMMdrJxce8NqI5Q==}
source-map-js@1.2.1:
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
engines: {node: '>=0.10.0'}
@@ -3566,9 +3544,6 @@ packages:
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
util@0.10.4:
resolution: {integrity: sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==}
vfile-message@4.0.2:
resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==}
@@ -5172,7 +5147,7 @@ snapshots:
dependencies:
'@tauri-apps/api': 2.8.0
'@tauri-apps/plugin-notification@2.3.1':
'@tauri-apps/plugin-http@2.5.2':
dependencies:
'@tauri-apps/api': 2.8.0
@@ -6285,8 +6260,6 @@ snapshots:
imurmurhash@0.1.4: {}
inherits@2.0.3: {}
inline-style-parser@0.2.4: {}
internal-slot@1.1.0:
@@ -6958,11 +6931,6 @@ snapshots:
path-type@4.0.0: {}
path@0.12.7:
dependencies:
process: 0.11.10
util: 0.10.4
picocolors@1.1.1: {}
picomatch@2.3.1: {}
@@ -6981,8 +6949,6 @@ snapshots:
prettier@3.6.2: {}
process@0.11.10: {}
prop-types@15.8.1:
dependencies:
loose-envify: 1.4.0
@@ -7297,8 +7263,6 @@ snapshots:
dot-case: 3.0.4
tslib: 2.8.1
sockette@2.0.6: {}
source-map-js@1.2.1: {}
source-map-support@0.5.21:
@@ -7581,10 +7545,6 @@ snapshots:
dependencies:
react: 19.1.1
util@0.10.4:
dependencies:
inherits: 2.0.3
vfile-message@4.0.2:
dependencies:
'@types/unist': 3.0.3