mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2026-02-10 11:40:28 +08:00
fix: resolve eslint errors and enhance code review rules
This commit is contained in:
parent
6a9edd8665
commit
e70ca694b9
@ -1,10 +1,12 @@
|
||||
const js = require('@eslint/js')
|
||||
const react = require('eslint-plugin-react')
|
||||
const reactHooks = require('eslint-plugin-react-hooks')
|
||||
const importPlugin = require('eslint-plugin-import')
|
||||
const { configs } = require('@electron-toolkit/eslint-config-ts')
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
ignores: ['**/node_modules/**', '**/dist/**', '**/out/**', '**/extra/**']
|
||||
ignores: ['**/node_modules/**', '**/dist/**', '**/out/**', '**/extra/**', '**/src/native/**']
|
||||
},
|
||||
|
||||
js.configs.recommended,
|
||||
@ -13,11 +15,30 @@ module.exports = [
|
||||
{
|
||||
files: ['**/*.{js,jsx,ts,tsx}'],
|
||||
plugins: {
|
||||
react: react
|
||||
react: react,
|
||||
'react-hooks': reactHooks,
|
||||
import: importPlugin
|
||||
},
|
||||
rules: {
|
||||
...react.configs.recommended.rules,
|
||||
...react.configs['jsx-runtime'].rules
|
||||
...react.configs['jsx-runtime'].rules,
|
||||
// React Hooks 规则
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
'react-hooks/exhaustive-deps': 'warn',
|
||||
// Import 规则
|
||||
'import/no-duplicates': 'warn',
|
||||
'import/order': [
|
||||
'warn',
|
||||
{
|
||||
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
|
||||
'newlines-between': 'never'
|
||||
}
|
||||
],
|
||||
// 代码质量
|
||||
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
||||
'no-debugger': 'warn',
|
||||
eqeqeq: ['error', 'always', { null: 'ignore' }],
|
||||
'prefer-const': 'warn'
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
@ -45,7 +66,8 @@ module.exports = [
|
||||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' }
|
||||
],
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'warn'
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
'@typescript-eslint/no-non-null-assertion': 'warn'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -8,6 +8,8 @@
|
||||
"scripts": {
|
||||
"format": "prettier --write .",
|
||||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
||||
"lint:check": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts",
|
||||
"review": "pnpm run lint:check && pnpm run typecheck",
|
||||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
||||
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
|
||||
"typecheck": "pnpm run typecheck:node && pnpm run typecheck:web",
|
||||
@ -31,7 +33,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron-toolkit/utils": "^4.0.0",
|
||||
"sysproxy-rs": "file:sysproxy-rs",
|
||||
"adm-zip": "^0.5.16",
|
||||
"axios": "^1.13.2",
|
||||
"chokidar": "^5.0.0",
|
||||
@ -40,6 +41,7 @@
|
||||
"express": "^5.1.0",
|
||||
"i18next": "^25.6.2",
|
||||
"iconv-lite": "^0.7.1",
|
||||
"sysproxy-rs": "file:sysproxy-rs",
|
||||
"webdav": "^5.8.0",
|
||||
"ws": "^8.18.3",
|
||||
"yaml": "^2.8.1"
|
||||
@ -61,6 +63,8 @@
|
||||
"@types/react": "^19.2.5",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@types/ws": "^8.18.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
||||
"@typescript-eslint/parser": "^8.52.0",
|
||||
"@vitejs/plugin-react": "^5.1.2",
|
||||
"chart.js": "^4.5.1",
|
||||
"cron-validator": "^1.4.0",
|
||||
@ -71,7 +75,9 @@
|
||||
"electron-vite": "4.0.1",
|
||||
"electron-window-state": "^5.0.3",
|
||||
"eslint": "9.39.2",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^7.0.1",
|
||||
"form-data": "^4.0.4",
|
||||
"framer-motion": "12.23.26",
|
||||
"lodash": "^4.17.21",
|
||||
|
||||
378
pnpm-lock.yaml
generated
378
pnpm-lock.yaml
generated
@ -96,6 +96,12 @@ importers:
|
||||
'@types/ws':
|
||||
specifier: ^8.18.1
|
||||
version: 8.18.1
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
specifier: ^8.52.0
|
||||
version: 8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
'@typescript-eslint/parser':
|
||||
specifier: ^8.52.0
|
||||
version: 8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
'@vitejs/plugin-react':
|
||||
specifier: ^5.1.2
|
||||
version: 5.1.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.2))
|
||||
@ -126,9 +132,15 @@ importers:
|
||||
eslint:
|
||||
specifier: 9.39.2
|
||||
version: 9.39.2(jiti@2.6.1)
|
||||
eslint-plugin-import:
|
||||
specifier: ^2.32.0
|
||||
version: 2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))
|
||||
eslint-plugin-react:
|
||||
specifier: ^7.37.5
|
||||
version: 7.37.5(eslint@9.39.2(jiti@2.6.1))
|
||||
eslint-plugin-react-hooks:
|
||||
specifier: ^7.0.1
|
||||
version: 7.0.1(eslint@9.39.2(jiti@2.6.1))
|
||||
form-data:
|
||||
specifier: ^4.0.4
|
||||
version: 4.0.5
|
||||
@ -1993,6 +2005,9 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@rtsao/scc@1.1.0':
|
||||
resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==}
|
||||
|
||||
'@sindresorhus/is@4.6.0':
|
||||
resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==}
|
||||
engines: {node: '>=10'}
|
||||
@ -2168,6 +2183,9 @@ packages:
|
||||
'@types/json-schema@7.0.15':
|
||||
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
||||
|
||||
'@types/json5@0.0.29':
|
||||
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
|
||||
|
||||
'@types/keyv@3.1.4':
|
||||
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
|
||||
|
||||
@ -2235,6 +2253,14 @@ packages:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.52.0':
|
||||
resolution: {integrity: sha512-okqtOgqu2qmZJ5iN4TWlgfF171dZmx2FzdOv2K/ixL2LZWDStL8+JgQerI2sa8eAEfoydG9+0V96m7V+P8yE1Q==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': ^8.52.0
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/parser@8.51.0':
|
||||
resolution: {integrity: sha512-3xP4XzzDNQOIqBMWogftkwxhg5oMKApqY0BAflmLZiFYHqyhSOxv/cd/zPQLTcCXr4AkaKb25joocY0BD1WC6A==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
@ -2242,22 +2268,45 @@ packages:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/parser@8.52.0':
|
||||
resolution: {integrity: sha512-iIACsx8pxRnguSYhHiMn2PvhvfpopO9FXHyn1mG5txZIsAaB6F0KwbFnUQN3KCiG3Jcuad/Cao2FAs1Wp7vAyg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/project-service@8.51.0':
|
||||
resolution: {integrity: sha512-Luv/GafO07Z7HpiI7qeEW5NW8HUtZI/fo/kE0YbtQEFpJRUuR0ajcWfCE5bnMvL7QQFrmT/odMe8QZww8X2nfQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/project-service@8.52.0':
|
||||
resolution: {integrity: sha512-xD0MfdSdEmeFa3OmVqonHi+Cciab96ls1UhIF/qX/O/gPu5KXD0bY9lu33jj04fjzrXHcuvjBcBC+D3SNSadaw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/scope-manager@8.51.0':
|
||||
resolution: {integrity: sha512-JhhJDVwsSx4hiOEQPeajGhCWgBMBwVkxC/Pet53EpBVs7zHHtayKefw1jtPaNRXpI9RA2uocdmpdfE7T+NrizA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/scope-manager@8.52.0':
|
||||
resolution: {integrity: sha512-ixxqmmCcc1Nf8S0mS0TkJ/3LKcC8mruYJPOU6Ia2F/zUUR4pApW7LzrpU3JmtePbRUTes9bEqRc1Gg4iyRnDzA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.51.0':
|
||||
resolution: {integrity: sha512-Qi5bSy/vuHeWyir2C8u/uqGMIlIDu8fuiYWv48ZGlZ/k+PRPHtaAu7erpc7p5bzw2WNNSniuxoMSO4Ar6V9OXw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.52.0':
|
||||
resolution: {integrity: sha512-jl+8fzr/SdzdxWJznq5nvoI7qn2tNYV/ZBAEcaFMVXf+K6jmXvAFrgo/+5rxgnL152f//pDEAYAhhBAZGrVfwg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/type-utils@8.51.0':
|
||||
resolution: {integrity: sha512-0XVtYzxnobc9K0VU7wRWg1yiUrw4oQzexCG2V2IDxxCxhqBMSMbjB+6o91A+Uc0GWtgjCa3Y8bi7hwI0Tu4n5Q==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
@ -2265,16 +2314,33 @@ packages:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/type-utils@8.52.0':
|
||||
resolution: {integrity: sha512-JD3wKBRWglYRQkAtsyGz1AewDu3mTc7NtRjR/ceTyGoPqmdS5oCdx/oZMWD5Zuqmo6/MpsYs0wp6axNt88/2EQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/types@8.51.0':
|
||||
resolution: {integrity: sha512-TizAvWYFM6sSscmEakjY3sPqGwxZRSywSsPEiuZF6d5GmGD9Gvlsv0f6N8FvAAA0CD06l3rIcWNbsN1e5F/9Ag==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/types@8.52.0':
|
||||
resolution: {integrity: sha512-LWQV1V4q9V4cT4H5JCIx3481iIFxH1UkVk+ZkGGAV1ZGcjGI9IoFOfg3O6ywz8QqCDEp7Inlg6kovMofsNRaGg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.51.0':
|
||||
resolution: {integrity: sha512-1qNjGqFRmlq0VW5iVlcyHBbCjPB7y6SxpBkrbhNWMy/65ZoncXCEPJxkRZL8McrseNH6lFhaxCIaX+vBuFnRng==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.52.0':
|
||||
resolution: {integrity: sha512-XP3LClsCc0FsTK5/frGjolyADTh3QmsLp6nKd476xNI9CsSsLnmn4f0jrzNoAulmxlmNIpeXuHYeEQv61Q6qeQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/utils@8.51.0':
|
||||
resolution: {integrity: sha512-11rZYxSe0zabiKaCP2QAwRf/dnmgFgvTmeDTtZvUvXG3UuAdg/GU02NExmmIXzz3vLGgMdtrIosI84jITQOxUA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
@ -2282,10 +2348,21 @@ packages:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/utils@8.52.0':
|
||||
resolution: {integrity: sha512-wYndVMWkweqHpEpwPhwqE2lnD2DxC6WVLupU/DOt/0/v+/+iQbbzO3jOHjmBMnhu0DgLULvOaU4h4pwHYi2oRQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.51.0':
|
||||
resolution: {integrity: sha512-mM/JRQOzhVN1ykejrvwnBRV3+7yTKK8tVANVN3o1O0t0v7o+jqdVu9crPy5Y9dov15TJk/FTIgoUGHrTOVL3Zg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.52.0':
|
||||
resolution: {integrity: sha512-ink3/Zofus34nmBsPjow63FP5M7IGff0RKAgqR6+CFpdk22M7aLwC9gOcLGYqr7MczLPzZVERW9hRog3O4n1sQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@ungap/structured-clone@1.3.0':
|
||||
resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==}
|
||||
|
||||
@ -2385,6 +2462,10 @@ packages:
|
||||
resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
array.prototype.findlastindex@1.2.6:
|
||||
resolution: {integrity: sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
array.prototype.flat@1.3.3:
|
||||
resolution: {integrity: sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@ -2722,6 +2803,14 @@ packages:
|
||||
dayjs@1.11.19:
|
||||
resolution: {integrity: sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==}
|
||||
|
||||
debug@3.2.7:
|
||||
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
|
||||
debug@4.4.3:
|
||||
resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}
|
||||
engines: {node: '>=6.0'}
|
||||
@ -2958,6 +3047,40 @@ packages:
|
||||
peerDependencies:
|
||||
eslint: '>=7.0.0'
|
||||
|
||||
eslint-import-resolver-node@0.3.9:
|
||||
resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==}
|
||||
|
||||
eslint-module-utils@2.12.1:
|
||||
resolution: {integrity: sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==}
|
||||
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
|
||||
|
||||
eslint-plugin-import@2.32.0:
|
||||
resolution: {integrity: sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': '*'
|
||||
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9
|
||||
peerDependenciesMeta:
|
||||
'@typescript-eslint/parser':
|
||||
optional: true
|
||||
|
||||
eslint-plugin-prettier@5.5.4:
|
||||
resolution: {integrity: sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
@ -2972,6 +3095,12 @@ packages:
|
||||
eslint-config-prettier:
|
||||
optional: true
|
||||
|
||||
eslint-plugin-react-hooks@7.0.1:
|
||||
resolution: {integrity: sha512-O0d0m04evaNzEPoSW+59Mezf8Qt0InfgGIBJnpC0h3NH/WjUAR7BIKUfysC6todmtiZ/A0oUVS8Gce0WhBrHsA==}
|
||||
engines: {node: '>=18'}
|
||||
peerDependencies:
|
||||
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
|
||||
|
||||
eslint-plugin-react@7.37.5:
|
||||
resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==}
|
||||
engines: {node: '>=4'}
|
||||
@ -3301,6 +3430,12 @@ packages:
|
||||
hast-util-whitespace@3.0.0:
|
||||
resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==}
|
||||
|
||||
hermes-estree@0.25.1:
|
||||
resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==}
|
||||
|
||||
hermes-parser@0.25.1:
|
||||
resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==}
|
||||
|
||||
hosted-git-info@4.1.0:
|
||||
resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==}
|
||||
engines: {node: '>=10'}
|
||||
@ -3616,6 +3751,10 @@ packages:
|
||||
json-stringify-safe@5.0.1:
|
||||
resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==}
|
||||
|
||||
json5@1.0.2:
|
||||
resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==}
|
||||
hasBin: true
|
||||
|
||||
json5@2.2.3:
|
||||
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
|
||||
engines: {node: '>=6'}
|
||||
@ -4093,6 +4232,10 @@ packages:
|
||||
resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
object.groupby@1.0.3:
|
||||
resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
object.values@1.2.1:
|
||||
resolution: {integrity: sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@ -4422,6 +4565,11 @@ packages:
|
||||
resolve-pkg-maps@1.0.0:
|
||||
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
|
||||
|
||||
resolve@1.22.11:
|
||||
resolution: {integrity: sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
hasBin: true
|
||||
|
||||
resolve@2.0.0-next.5:
|
||||
resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==}
|
||||
hasBin: true
|
||||
@ -4664,6 +4812,10 @@ packages:
|
||||
resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
strip-bom@3.0.0:
|
||||
resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}
|
||||
engines: {node: '>=4'}
|
||||
|
||||
strip-json-comments@3.1.1:
|
||||
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
|
||||
engines: {node: '>=8'}
|
||||
@ -4769,6 +4921,15 @@ packages:
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4'
|
||||
|
||||
ts-api-utils@2.4.0:
|
||||
resolution: {integrity: sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==}
|
||||
engines: {node: '>=18.12'}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4'
|
||||
|
||||
tsconfig-paths@3.15.0:
|
||||
resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==}
|
||||
|
||||
tslib@2.8.1:
|
||||
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
||||
|
||||
@ -5098,6 +5259,15 @@ packages:
|
||||
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
zod-validation-error@4.0.2:
|
||||
resolution: {integrity: sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
peerDependencies:
|
||||
zod: ^3.25.0 || ^4.0.0
|
||||
|
||||
zod@4.3.5:
|
||||
resolution: {integrity: sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==}
|
||||
|
||||
zwitch@2.0.4:
|
||||
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
|
||||
|
||||
@ -7578,6 +7748,8 @@ snapshots:
|
||||
'@rollup/rollup-win32-x64-msvc@4.54.0':
|
||||
optional: true
|
||||
|
||||
'@rtsao/scc@1.1.0': {}
|
||||
|
||||
'@sindresorhus/is@4.6.0': {}
|
||||
|
||||
'@swc/helpers@0.5.18':
|
||||
@ -7746,6 +7918,8 @@ snapshots:
|
||||
|
||||
'@types/json-schema@7.0.15': {}
|
||||
|
||||
'@types/json5@0.0.29': {}
|
||||
|
||||
'@types/keyv@3.1.4':
|
||||
dependencies:
|
||||
'@types/node': 25.0.3
|
||||
@ -7829,6 +8003,22 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.52.0(@typescript-eslint/parser@8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.12.2
|
||||
'@typescript-eslint/parser': 8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
'@typescript-eslint/scope-manager': 8.52.0
|
||||
'@typescript-eslint/type-utils': 8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
'@typescript-eslint/visitor-keys': 8.52.0
|
||||
eslint: 9.39.2(jiti@2.6.1)
|
||||
ignore: 7.0.5
|
||||
natural-compare: 1.4.0
|
||||
ts-api-utils: 2.4.0(typescript@5.9.3)
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/parser@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 8.51.0
|
||||
@ -7841,6 +8031,18 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/parser@8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 8.52.0
|
||||
'@typescript-eslint/types': 8.52.0
|
||||
'@typescript-eslint/typescript-estree': 8.52.0(typescript@5.9.3)
|
||||
'@typescript-eslint/visitor-keys': 8.52.0
|
||||
debug: 4.4.3
|
||||
eslint: 9.39.2(jiti@2.6.1)
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/project-service@8.51.0(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/tsconfig-utils': 8.51.0(typescript@5.9.3)
|
||||
@ -7850,15 +8052,33 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/project-service@8.52.0(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/tsconfig-utils': 8.52.0(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.52.0
|
||||
debug: 4.4.3
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/scope-manager@8.51.0':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.51.0
|
||||
'@typescript-eslint/visitor-keys': 8.51.0
|
||||
|
||||
'@typescript-eslint/scope-manager@8.52.0':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.52.0
|
||||
'@typescript-eslint/visitor-keys': 8.52.0
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.51.0(typescript@5.9.3)':
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.52.0(typescript@5.9.3)':
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
'@typescript-eslint/type-utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.51.0
|
||||
@ -7871,8 +8091,22 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/type-utils@8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.52.0
|
||||
'@typescript-eslint/typescript-estree': 8.52.0(typescript@5.9.3)
|
||||
'@typescript-eslint/utils': 8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
debug: 4.4.3
|
||||
eslint: 9.39.2(jiti@2.6.1)
|
||||
ts-api-utils: 2.4.0(typescript@5.9.3)
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/types@8.51.0': {}
|
||||
|
||||
'@typescript-eslint/types@8.52.0': {}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.51.0(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/project-service': 8.51.0(typescript@5.9.3)
|
||||
@ -7888,6 +8122,21 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.52.0(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/project-service': 8.52.0(typescript@5.9.3)
|
||||
'@typescript-eslint/tsconfig-utils': 8.52.0(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.52.0
|
||||
'@typescript-eslint/visitor-keys': 8.52.0
|
||||
debug: 4.4.3
|
||||
minimatch: 9.0.5
|
||||
semver: 7.7.3
|
||||
tinyglobby: 0.2.15
|
||||
ts-api-utils: 2.4.0(typescript@5.9.3)
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/utils@8.51.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1))
|
||||
@ -7899,11 +8148,27 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/utils@8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.1(eslint@9.39.2(jiti@2.6.1))
|
||||
'@typescript-eslint/scope-manager': 8.52.0
|
||||
'@typescript-eslint/types': 8.52.0
|
||||
'@typescript-eslint/typescript-estree': 8.52.0(typescript@5.9.3)
|
||||
eslint: 9.39.2(jiti@2.6.1)
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.51.0':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.51.0
|
||||
eslint-visitor-keys: 4.2.1
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.52.0':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.52.0
|
||||
eslint-visitor-keys: 4.2.1
|
||||
|
||||
'@ungap/structured-clone@1.3.0': {}
|
||||
|
||||
'@vitejs/plugin-react@5.1.2(vite@7.3.0(@types/node@25.0.3)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.2))':
|
||||
@ -8043,6 +8308,16 @@ snapshots:
|
||||
es-object-atoms: 1.1.1
|
||||
es-shim-unscopables: 1.1.0
|
||||
|
||||
array.prototype.findlastindex@1.2.6:
|
||||
dependencies:
|
||||
call-bind: 1.0.8
|
||||
call-bound: 1.0.4
|
||||
define-properties: 1.2.1
|
||||
es-abstract: 1.24.1
|
||||
es-errors: 1.3.0
|
||||
es-object-atoms: 1.1.1
|
||||
es-shim-unscopables: 1.1.0
|
||||
|
||||
array.prototype.flat@1.3.3:
|
||||
dependencies:
|
||||
call-bind: 1.0.8
|
||||
@ -8415,6 +8690,10 @@ snapshots:
|
||||
|
||||
dayjs@1.11.19: {}
|
||||
|
||||
debug@3.2.7:
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
|
||||
debug@4.4.3:
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
@ -8801,6 +9080,53 @@ snapshots:
|
||||
dependencies:
|
||||
eslint: 9.39.2(jiti@2.6.1)
|
||||
|
||||
eslint-import-resolver-node@0.3.9:
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
is-core-module: 2.16.1
|
||||
resolve: 1.22.11
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.2(jiti@2.6.1)):
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
optionalDependencies:
|
||||
'@typescript-eslint/parser': 8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
eslint: 9.39.2(jiti@2.6.1)
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.2(jiti@2.6.1)):
|
||||
dependencies:
|
||||
'@rtsao/scc': 1.1.0
|
||||
array-includes: 3.1.9
|
||||
array.prototype.findlastindex: 1.2.6
|
||||
array.prototype.flat: 1.3.3
|
||||
array.prototype.flatmap: 1.3.3
|
||||
debug: 3.2.7
|
||||
doctrine: 2.1.0
|
||||
eslint: 9.39.2(jiti@2.6.1)
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.2(jiti@2.6.1))
|
||||
hasown: 2.0.2
|
||||
is-core-module: 2.16.1
|
||||
is-glob: 4.0.3
|
||||
minimatch: 3.1.2
|
||||
object.fromentries: 2.0.8
|
||||
object.groupby: 1.0.3
|
||||
object.values: 1.2.1
|
||||
semver: 6.3.1
|
||||
string.prototype.trimend: 1.0.9
|
||||
tsconfig-paths: 3.15.0
|
||||
optionalDependencies:
|
||||
'@typescript-eslint/parser': 8.52.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
transitivePeerDependencies:
|
||||
- eslint-import-resolver-typescript
|
||||
- eslint-import-resolver-webpack
|
||||
- supports-color
|
||||
|
||||
eslint-plugin-prettier@5.5.4(eslint-config-prettier@10.1.8(eslint@9.39.2(jiti@2.6.1)))(eslint@9.39.2(jiti@2.6.1))(prettier@3.7.4):
|
||||
dependencies:
|
||||
eslint: 9.39.2(jiti@2.6.1)
|
||||
@ -8810,6 +9136,17 @@ snapshots:
|
||||
optionalDependencies:
|
||||
eslint-config-prettier: 10.1.8(eslint@9.39.2(jiti@2.6.1))
|
||||
|
||||
eslint-plugin-react-hooks@7.0.1(eslint@9.39.2(jiti@2.6.1)):
|
||||
dependencies:
|
||||
'@babel/core': 7.28.5
|
||||
'@babel/parser': 7.28.5
|
||||
eslint: 9.39.2(jiti@2.6.1)
|
||||
hermes-parser: 0.25.1
|
||||
zod: 4.3.5
|
||||
zod-validation-error: 4.0.2(zod@4.3.5)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-plugin-react@7.37.5(eslint@9.39.2(jiti@2.6.1)):
|
||||
dependencies:
|
||||
array-includes: 3.1.9
|
||||
@ -9252,6 +9589,12 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/hast': 3.0.4
|
||||
|
||||
hermes-estree@0.25.1: {}
|
||||
|
||||
hermes-parser@0.25.1:
|
||||
dependencies:
|
||||
hermes-estree: 0.25.1
|
||||
|
||||
hosted-git-info@4.1.0:
|
||||
dependencies:
|
||||
lru-cache: 6.0.0
|
||||
@ -9565,6 +9908,10 @@ snapshots:
|
||||
json-stringify-safe@5.0.1:
|
||||
optional: true
|
||||
|
||||
json5@1.0.2:
|
||||
dependencies:
|
||||
minimist: 1.2.8
|
||||
|
||||
json5@2.2.3: {}
|
||||
|
||||
jsonc-parser@3.3.1: {}
|
||||
@ -10147,6 +10494,12 @@ snapshots:
|
||||
es-abstract: 1.24.1
|
||||
es-object-atoms: 1.1.1
|
||||
|
||||
object.groupby@1.0.3:
|
||||
dependencies:
|
||||
call-bind: 1.0.8
|
||||
define-properties: 1.2.1
|
||||
es-abstract: 1.24.1
|
||||
|
||||
object.values@1.2.1:
|
||||
dependencies:
|
||||
call-bind: 1.0.8
|
||||
@ -10484,6 +10837,12 @@ snapshots:
|
||||
|
||||
resolve-pkg-maps@1.0.0: {}
|
||||
|
||||
resolve@1.22.11:
|
||||
dependencies:
|
||||
is-core-module: 2.16.1
|
||||
path-parse: 1.0.7
|
||||
supports-preserve-symlinks-flag: 1.0.0
|
||||
|
||||
resolve@2.0.0-next.5:
|
||||
dependencies:
|
||||
is-core-module: 2.16.1
|
||||
@ -10825,6 +11184,8 @@ snapshots:
|
||||
dependencies:
|
||||
ansi-regex: 6.2.2
|
||||
|
||||
strip-bom@3.0.0: {}
|
||||
|
||||
strip-json-comments@3.1.1: {}
|
||||
|
||||
strnum@1.1.2: {}
|
||||
@ -10929,6 +11290,17 @@ snapshots:
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
ts-api-utils@2.4.0(typescript@5.9.3):
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
tsconfig-paths@3.15.0:
|
||||
dependencies:
|
||||
'@types/json5': 0.0.29
|
||||
json5: 1.0.2
|
||||
minimist: 1.2.8
|
||||
strip-bom: 3.0.0
|
||||
|
||||
tslib@2.8.1: {}
|
||||
|
||||
tsx@4.21.0:
|
||||
@ -11272,4 +11644,10 @@ snapshots:
|
||||
|
||||
yocto-queue@0.1.0: {}
|
||||
|
||||
zod-validation-error@4.0.2(zod@4.3.5):
|
||||
dependencies:
|
||||
zod: 4.3.5
|
||||
|
||||
zod@4.3.5: {}
|
||||
|
||||
zwitch@2.0.4: {}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import { controledMihomoConfigPath } from '../utils/dirs'
|
||||
import { readFile, writeFile } from 'fs/promises'
|
||||
import { existsSync } from 'fs'
|
||||
import { controledMihomoConfigPath } from '../utils/dirs'
|
||||
import { parse, stringify } from '../utils/yaml'
|
||||
import { generateProfile } from '../core/factory'
|
||||
import { getAppConfig } from './app'
|
||||
import { defaultControledMihomoConfig } from '../utils/template'
|
||||
import { deepMerge } from '../utils/merge'
|
||||
import { existsSync } from 'fs'
|
||||
import { createLogger } from '../utils/logger'
|
||||
import { getAppConfig } from './app'
|
||||
|
||||
const controledMihomoLogger = createLogger('ControledMihomo')
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { overrideConfigPath, overridePath } from '../utils/dirs'
|
||||
import { getControledMihomoConfig } from './controledMihomo'
|
||||
import { readFile, writeFile, rm } from 'fs/promises'
|
||||
import { existsSync } from 'fs'
|
||||
import { overrideConfigPath, overridePath } from '../utils/dirs'
|
||||
import * as chromeRequest from '../utils/chromeRequest'
|
||||
import { parse, stringify } from '../utils/yaml'
|
||||
import { getControledMihomoConfig } from './controledMihomo'
|
||||
|
||||
let overrideConfig: IOverrideConfig // override.yaml
|
||||
let overrideConfigWriteQueue: Promise<void> = Promise.resolve()
|
||||
|
||||
@ -1,20 +1,19 @@
|
||||
import { getControledMihomoConfig } from './controledMihomo'
|
||||
import { mihomoProfileWorkDir, mihomoWorkDir, profileConfigPath, profilePath } from '../utils/dirs'
|
||||
import { addProfileUpdater, removeProfileUpdater } from '../core/profileUpdater'
|
||||
import { readFile, rm, writeFile } from 'fs/promises'
|
||||
import { restartCore } from '../core/manager'
|
||||
import { getAppConfig } from './app'
|
||||
import { existsSync } from 'fs'
|
||||
import { join } from 'path'
|
||||
import { app } from 'electron'
|
||||
import i18next from 'i18next'
|
||||
import * as chromeRequest from '../utils/chromeRequest'
|
||||
import { parse, stringify } from '../utils/yaml'
|
||||
import { defaultProfile } from '../utils/template'
|
||||
import { subStorePort } from '../resolve/server'
|
||||
import { join } from 'path'
|
||||
import { app } from 'electron'
|
||||
import { mihomoUpgradeConfig } from '../core/mihomoApi'
|
||||
|
||||
import i18next from 'i18next'
|
||||
import { restartCore } from '../core/manager'
|
||||
import { addProfileUpdater, removeProfileUpdater } from '../core/profileUpdater'
|
||||
import { mihomoProfileWorkDir, mihomoWorkDir, profileConfigPath, profilePath } from '../utils/dirs'
|
||||
import { createLogger } from '../utils/logger'
|
||||
import { getAppConfig } from './app'
|
||||
import { getControledMihomoConfig } from './controledMihomo'
|
||||
|
||||
const profileLogger = createLogger('Profile')
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { overrideLogger } from '../utils/logger'
|
||||
import { getAppConfig } from './app'
|
||||
import { addOverrideItem, removeOverrideItem, getOverrideItem } from './override'
|
||||
import { overrideLogger } from '../utils/logger'
|
||||
|
||||
const SMART_OVERRIDE_ID = 'smart-core-override'
|
||||
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
import { copyFile, mkdir, writeFile, readFile } from 'fs/promises'
|
||||
import vm from 'vm'
|
||||
import { existsSync, writeFileSync } from 'fs'
|
||||
import path from 'path'
|
||||
import {
|
||||
getControledMihomoConfig,
|
||||
getProfileConfig,
|
||||
@ -16,11 +20,7 @@ import {
|
||||
rulePath
|
||||
} from '../utils/dirs'
|
||||
import { parse, stringify } from '../utils/yaml'
|
||||
import { copyFile, mkdir, writeFile, readFile } from 'fs/promises'
|
||||
import { deepMerge } from '../utils/merge'
|
||||
import vm from 'vm'
|
||||
import { existsSync, writeFileSync } from 'fs'
|
||||
import path from 'path'
|
||||
import { createLogger } from '../utils/logger'
|
||||
|
||||
const factoryLogger = createLogger('Factory')
|
||||
|
||||
@ -1,4 +1,18 @@
|
||||
import { ChildProcess, execFile, spawn } from 'child_process'
|
||||
import { readFile, rm, writeFile } from 'fs/promises'
|
||||
import { promisify } from 'util'
|
||||
import path from 'path'
|
||||
import os from 'os'
|
||||
import { createWriteStream, existsSync } from 'fs'
|
||||
import chokidar from 'chokidar'
|
||||
import { app, ipcMain } from 'electron'
|
||||
import { mainWindow } from '../window'
|
||||
import {
|
||||
getAppConfig,
|
||||
getControledMihomoConfig,
|
||||
patchControledMihomoConfig,
|
||||
manageSmartOverride
|
||||
} from '../config'
|
||||
import {
|
||||
dataDir,
|
||||
coreLogPath,
|
||||
@ -9,14 +23,11 @@ import {
|
||||
mihomoWorkConfigPath,
|
||||
mihomoWorkDir
|
||||
} from '../utils/dirs'
|
||||
import { generateProfile } from './factory'
|
||||
import {
|
||||
getAppConfig,
|
||||
getControledMihomoConfig,
|
||||
patchControledMihomoConfig,
|
||||
manageSmartOverride
|
||||
} from '../config'
|
||||
import { app, ipcMain } from 'electron'
|
||||
import { uploadRuntimeConfig } from '../resolve/gistApi'
|
||||
import { startMonitor } from '../resolve/trafficMonitor'
|
||||
import { safeShowErrorBox } from '../utils/init'
|
||||
import i18next from '../../shared/i18n'
|
||||
import { managerLogger } from '../utils/logger'
|
||||
import {
|
||||
startMihomoTraffic,
|
||||
startMihomoConnections,
|
||||
@ -29,18 +40,7 @@ import {
|
||||
patchMihomoConfig,
|
||||
getAxios
|
||||
} from './mihomoApi'
|
||||
import chokidar from 'chokidar'
|
||||
import { readFile, rm, writeFile } from 'fs/promises'
|
||||
import { promisify } from 'util'
|
||||
import { mainWindow } from '../window'
|
||||
import path from 'path'
|
||||
import os from 'os'
|
||||
import { createWriteStream, existsSync } from 'fs'
|
||||
import { uploadRuntimeConfig } from '../resolve/gistApi'
|
||||
import { startMonitor } from '../resolve/trafficMonitor'
|
||||
import { safeShowErrorBox } from '../utils/init'
|
||||
import i18next from '../../shared/i18n'
|
||||
import { managerLogger } from '../utils/logger'
|
||||
import { generateProfile } from './factory'
|
||||
|
||||
// 拆分模块
|
||||
import { getSessionAdminStatus } from './permissions'
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import axios, { AxiosInstance } from 'axios'
|
||||
import WebSocket from 'ws'
|
||||
import { getAppConfig, getControledMihomoConfig } from '../config'
|
||||
import { mainWindow } from '../window'
|
||||
import WebSocket from 'ws'
|
||||
import { tray } from '../resolve/tray'
|
||||
import { calcTraffic } from '../utils/calc'
|
||||
import { getRuntimeConfig } from './factory'
|
||||
import { floatingWindow } from '../resolve/floatingWindow'
|
||||
import { getMihomoIpcPath } from './manager'
|
||||
import { createLogger } from '../utils/logger'
|
||||
import { getRuntimeConfig } from './factory'
|
||||
import { getMihomoIpcPath } from './manager'
|
||||
|
||||
const mihomoApiLogger = createLogger('MihomoApi')
|
||||
|
||||
|
||||
@ -2,12 +2,12 @@ import { exec, execFile } from 'child_process'
|
||||
import { promisify } from 'util'
|
||||
import { stat } from 'fs/promises'
|
||||
import { existsSync } from 'fs'
|
||||
import path from 'path'
|
||||
import { app, dialog, ipcMain } from 'electron'
|
||||
import { getAppConfig, patchControledMihomoConfig } from '../config'
|
||||
import { mihomoCorePath, mihomoCoreDir } from '../utils/dirs'
|
||||
import { managerLogger } from '../utils/logger'
|
||||
import i18next from '../../shared/i18n'
|
||||
import path from 'path'
|
||||
|
||||
const execPromise = promisify(exec)
|
||||
const execFilePromise = promisify(execFile)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { addProfileItem, getCurrentProfileItem, getProfileConfig, getProfileItem } from '../config'
|
||||
import { Cron } from 'croner'
|
||||
import { addProfileItem, getCurrentProfileItem, getProfileConfig, getProfileItem } from '../config'
|
||||
import { logger } from '../utils/logger'
|
||||
|
||||
const intervalPool: Record<string, Cron | NodeJS.Timeout> = {}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import { electronApp, optimizer } from '@electron-toolkit/utils'
|
||||
import { app, dialog } from 'electron'
|
||||
import i18next from 'i18next'
|
||||
import { initI18n } from '../shared/i18n'
|
||||
import { registerIpcMainHandlers } from './utils/ipc'
|
||||
import { getAppConfig, patchAppConfig } from './config'
|
||||
import {
|
||||
@ -16,10 +18,7 @@ import { initShortcut } from './resolve/shortcut'
|
||||
import { initProfileUpdater } from './core/profileUpdater'
|
||||
import { startMonitor } from './resolve/trafficMonitor'
|
||||
import { showFloatingWindow } from './resolve/floatingWindow'
|
||||
import { initI18n } from '../shared/i18n'
|
||||
import i18next from 'i18next'
|
||||
import { logger } from './utils/logger'
|
||||
import { createLogger } from './utils/logger'
|
||||
import { logger , createLogger } from './utils/logger'
|
||||
import { initWebdavBackupScheduler } from './resolve/backup'
|
||||
|
||||
const mainLogger = createLogger('Main')
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { app, powerMonitor } from 'electron'
|
||||
import { spawn, exec } from 'child_process'
|
||||
import { promisify } from 'util'
|
||||
import { stat } from 'fs/promises'
|
||||
import { existsSync } from 'fs'
|
||||
import { app, powerMonitor } from 'electron'
|
||||
import { stopCore } from './core/manager'
|
||||
import { triggerSysProxy } from './sys/sysproxy'
|
||||
import { exePath } from './utils/dirs'
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
import * as chromeRequest from '../utils/chromeRequest'
|
||||
import { parse } from '../utils/yaml'
|
||||
import { app, shell } from 'electron'
|
||||
import { getControledMihomoConfig } from '../config'
|
||||
import { dataDir, exeDir, exePath, isPortable, resourcesFilesDir } from '../utils/dirs'
|
||||
import { copyFile, rm, writeFile } from 'fs/promises'
|
||||
import path from 'path'
|
||||
import { existsSync } from 'fs'
|
||||
import os from 'os'
|
||||
import { exec, execSync, spawn } from 'child_process'
|
||||
import { promisify } from 'util'
|
||||
import { appLogger } from '../utils/logger'
|
||||
import { checkAdminPrivileges } from '../core/manager'
|
||||
import { app, shell } from 'electron'
|
||||
import i18next from 'i18next'
|
||||
import { appLogger } from '../utils/logger'
|
||||
import { dataDir, exeDir, exePath, isPortable, resourcesFilesDir } from '../utils/dirs'
|
||||
import { getControledMihomoConfig } from '../config'
|
||||
import { checkAdminPrivileges } from '../core/manager'
|
||||
import { parse } from '../utils/yaml'
|
||||
import * as chromeRequest from '../utils/chromeRequest'
|
||||
|
||||
export async function checkUpdate(): Promise<IAppVersion | undefined> {
|
||||
const { 'mixed-port': mixedPort = 7890 } = await getControledMihomoConfig()
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
import { getAppConfig } from '../config'
|
||||
import https from 'https'
|
||||
import { existsSync } from 'fs'
|
||||
import dayjs from 'dayjs'
|
||||
import AdmZip from 'adm-zip'
|
||||
import https from 'https'
|
||||
import { Cron } from 'croner'
|
||||
import { dialog } from 'electron'
|
||||
import i18next from 'i18next'
|
||||
import { systemLogger } from '../utils/logger'
|
||||
import {
|
||||
appConfigPath,
|
||||
controledMihomoConfigPath,
|
||||
@ -14,11 +18,7 @@ import {
|
||||
subStoreDir,
|
||||
themesDir
|
||||
} from '../utils/dirs'
|
||||
import { systemLogger } from '../utils/logger'
|
||||
import { Cron } from 'croner'
|
||||
import { dialog } from 'electron'
|
||||
import { existsSync } from 'fs'
|
||||
import i18next from 'i18next'
|
||||
import { getAppConfig } from '../config'
|
||||
|
||||
let backupCronJob: Cron | null = null
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { join } from 'path'
|
||||
import { is } from '@electron-toolkit/utils'
|
||||
import { BrowserWindow, ipcMain } from 'electron'
|
||||
import windowStateKeeper from 'electron-window-state'
|
||||
import { join } from 'path'
|
||||
import { getAppConfig, patchAppConfig } from '../config'
|
||||
import { floatingWindowLogger } from '../utils/logger'
|
||||
import { applyTheme } from './theme'
|
||||
import { buildContextMenu, showTrayIcon } from './tray'
|
||||
import { floatingWindowLogger } from '../utils/logger'
|
||||
|
||||
export let floatingWindow: BrowserWindow | null = null
|
||||
|
||||
|
||||
@ -1,7 +1,4 @@
|
||||
import { getAppConfig, getControledMihomoConfig } from '../config'
|
||||
import { Worker } from 'worker_threads'
|
||||
import { dataDir, mihomoWorkDir, subStoreDir, substoreLogPath } from '../utils/dirs'
|
||||
import subStoreIcon from '../../../resources/subStoreIcon.png?asset'
|
||||
import { createWriteStream, existsSync, mkdirSync } from 'fs'
|
||||
import { writeFile, rm, cp } from 'fs/promises'
|
||||
import http from 'http'
|
||||
@ -9,8 +6,11 @@ import net from 'net'
|
||||
import path from 'path'
|
||||
import { nativeImage } from 'electron'
|
||||
import express from 'express'
|
||||
import * as chromeRequest from '../utils/chromeRequest'
|
||||
import AdmZip from 'adm-zip'
|
||||
import * as chromeRequest from '../utils/chromeRequest'
|
||||
import subStoreIcon from '../../../resources/subStoreIcon.png?asset'
|
||||
import { dataDir, mihomoWorkDir, subStoreDir, substoreLogPath } from '../utils/dirs'
|
||||
import { getAppConfig, getControledMihomoConfig } from '../config'
|
||||
import { systemLogger } from '../utils/logger'
|
||||
|
||||
export let pacPort: number
|
||||
|
||||
@ -9,9 +9,9 @@ import {
|
||||
import { triggerSysProxy } from '../sys/sysproxy'
|
||||
import { patchMihomoConfig } from '../core/mihomoApi'
|
||||
import { quitWithoutCore, restartCore } from '../core/manager'
|
||||
import i18next from '../../shared/i18n'
|
||||
import { floatingWindow, triggerFloatingWindow } from './floatingWindow'
|
||||
import { updateTrayIcon } from './tray'
|
||||
import i18next from '../../shared/i18n'
|
||||
|
||||
export async function registerShortcut(
|
||||
oldShortcut: string,
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import { copyFile, readdir, readFile, writeFile } from 'fs/promises'
|
||||
import { themesDir } from '../utils/dirs'
|
||||
import path from 'path'
|
||||
import * as chromeRequest from '../utils/chromeRequest'
|
||||
import AdmZip from 'adm-zip'
|
||||
import { getControledMihomoConfig } from '../config'
|
||||
import { existsSync } from 'fs'
|
||||
import AdmZip from 'adm-zip'
|
||||
import { t } from 'i18next'
|
||||
import { themesDir } from '../utils/dirs'
|
||||
import * as chromeRequest from '../utils/chromeRequest'
|
||||
import { getControledMihomoConfig } from '../config'
|
||||
import { mainWindow } from '../window'
|
||||
import { floatingWindow } from './floatingWindow'
|
||||
import { t } from 'i18next'
|
||||
|
||||
let insertedCSSKeyMain: string | undefined = undefined
|
||||
let insertedCSSKeyFloating: string | undefined = undefined
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { ChildProcess, spawn } from 'child_process'
|
||||
import { getAppConfig } from '../config'
|
||||
import { dataDir, resourcesFilesDir } from '../utils/dirs'
|
||||
import path from 'path'
|
||||
import { existsSync } from 'fs'
|
||||
import { readFile, rm, writeFile } from 'fs/promises'
|
||||
import { dataDir, resourcesFilesDir } from '../utils/dirs'
|
||||
import { getAppConfig } from '../config'
|
||||
|
||||
let child: ChildProcess
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
import { app, clipboard, ipcMain, Menu, nativeImage, shell, Tray } from 'electron'
|
||||
import { t } from 'i18next'
|
||||
import {
|
||||
changeCurrentProfile,
|
||||
getAppConfig,
|
||||
@ -24,7 +26,6 @@ import {
|
||||
calculateTrayIconStatus
|
||||
} from '../core/mihomoApi'
|
||||
import { mainWindow, showMainWindow, triggerMainWindow } from '../window'
|
||||
import { app, clipboard, ipcMain, Menu, nativeImage, shell, Tray } from 'electron'
|
||||
import { dataDir, logDir, mihomoCoreDir, mihomoWorkDir } from '../utils/dirs'
|
||||
import { triggerSysProxy } from '../sys/sysproxy'
|
||||
import {
|
||||
@ -34,9 +35,8 @@ import {
|
||||
requestTunPermissions,
|
||||
restartAsAdmin
|
||||
} from '../core/manager'
|
||||
import { floatingWindow, triggerFloatingWindow } from './floatingWindow'
|
||||
import { t } from 'i18next'
|
||||
import { trayLogger } from '../utils/logger'
|
||||
import { floatingWindow, triggerFloatingWindow } from './floatingWindow'
|
||||
|
||||
export let tray: Tray | null = null
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { exePath, homeDir } from '../utils/dirs'
|
||||
import { tmpdir } from 'os'
|
||||
import { mkdir, readFile, rm, writeFile } from 'fs/promises'
|
||||
import { exec } from 'child_process'
|
||||
import { existsSync } from 'fs'
|
||||
import { promisify } from 'util'
|
||||
import path from 'path'
|
||||
import { exePath, homeDir } from '../utils/dirs'
|
||||
import { managerLogger } from '../utils/logger'
|
||||
|
||||
const appName = 'mihomo-party'
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
import { exec, execFile, spawn } from 'child_process'
|
||||
import { app, dialog, nativeTheme, shell } from 'electron'
|
||||
import { readFile } from 'fs/promises'
|
||||
import path from 'path'
|
||||
import { promisify } from 'util'
|
||||
import { app, dialog, nativeTheme, shell } from 'electron'
|
||||
import i18next from 'i18next'
|
||||
import {
|
||||
dataDir,
|
||||
exePath,
|
||||
@ -11,7 +12,6 @@ import {
|
||||
profilePath,
|
||||
resourcesDir
|
||||
} from '../utils/dirs'
|
||||
import i18next from 'i18next'
|
||||
|
||||
export function getFilePath(ext: string[]): string[] | undefined {
|
||||
return dialog.showOpenDialogSync({
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { exec } from 'child_process'
|
||||
import { promisify } from 'util'
|
||||
import { ipcMain, net } from 'electron'
|
||||
import { getAppConfig, patchControledMihomoConfig } from '../config'
|
||||
import { patchMihomoConfig } from '../core/mihomoApi'
|
||||
import { mainWindow } from '../window'
|
||||
import { ipcMain, net } from 'electron'
|
||||
import { getDefaultDevice } from '../core/manager'
|
||||
|
||||
export async function getCurrentSSID(): Promise<string | undefined> {
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { triggerAutoProxy, triggerManualProxy } from 'sysproxy-rs'
|
||||
import { getAppConfig, getControledMihomoConfig } from '../config'
|
||||
import { pacPort, startPacServer, stopPacServer } from '../resolve/server'
|
||||
import { promisify } from 'util'
|
||||
import { exec } from 'child_process'
|
||||
import fs from 'fs'
|
||||
import { triggerAutoProxy, triggerManualProxy } from 'sysproxy-rs'
|
||||
import { net } from 'electron'
|
||||
import axios from 'axios'
|
||||
import fs from 'fs'
|
||||
import { getAppConfig, getControledMihomoConfig } from '../config'
|
||||
import { pacPort, startPacServer, stopPacServer } from '../resolve/server'
|
||||
import { proxyLogger } from '../utils/logger'
|
||||
|
||||
let triggerSysProxyTimer: NodeJS.Timeout | null = null
|
||||
|
||||
@ -21,7 +21,7 @@ export function calcTraffic(byte: number): string {
|
||||
function formatNumString(num: number): string {
|
||||
let str = num.toFixed(2)
|
||||
if (str.length <= 5) return str
|
||||
if (str.length == 6) {
|
||||
if (str.length === 6) {
|
||||
str = num.toFixed(1)
|
||||
return str
|
||||
} else {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { is } from '@electron-toolkit/utils'
|
||||
import { existsSync, mkdirSync } from 'fs'
|
||||
import { app } from 'electron'
|
||||
import path from 'path'
|
||||
import { is } from '@electron-toolkit/utils'
|
||||
import { app } from 'electron'
|
||||
|
||||
export const homeDir = app.getPath('home')
|
||||
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
import * as chromeRequest from './chromeRequest'
|
||||
import { createWriteStream, createReadStream } from 'fs'
|
||||
import { createWriteStream, createReadStream , existsSync, rmSync } from 'fs'
|
||||
import { writeFile } from 'fs/promises'
|
||||
import { mihomoCoreDir } from './dirs'
|
||||
import AdmZip from 'adm-zip'
|
||||
import { execSync } from 'child_process'
|
||||
import { platform } from 'os'
|
||||
import { join } from 'path'
|
||||
import { existsSync, rmSync } from 'fs'
|
||||
import { createGunzip } from 'zlib'
|
||||
import AdmZip from 'adm-zip'
|
||||
import { stopCore } from '../core/manager'
|
||||
import { mihomoCoreDir } from './dirs'
|
||||
import * as chromeRequest from './chromeRequest'
|
||||
import { createLogger } from './logger'
|
||||
|
||||
const log = createLogger('GitHub')
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import * as chromeRequest from './chromeRequest'
|
||||
import { getControledMihomoConfig } from '../config'
|
||||
import * as chromeRequest from './chromeRequest'
|
||||
|
||||
export async function getImageDataURL(url: string): Promise<string> {
|
||||
const { 'mixed-port': port = 7890 } = await getControledMihomoConfig()
|
||||
|
||||
@ -1,3 +1,31 @@
|
||||
import { mkdir, writeFile, rm, readdir, cp, stat, rename } from 'fs/promises'
|
||||
import { existsSync } from 'fs'
|
||||
import { exec } from 'child_process'
|
||||
import { promisify } from 'util'
|
||||
import path from 'path'
|
||||
import { app, dialog } from 'electron'
|
||||
import {
|
||||
startPacServer,
|
||||
startSubStoreBackendServer,
|
||||
startSubStoreFrontendServer
|
||||
} from '../resolve/server'
|
||||
import { triggerSysProxy } from '../sys/sysproxy'
|
||||
import {
|
||||
getAppConfig,
|
||||
getControledMihomoConfig,
|
||||
patchAppConfig,
|
||||
patchControledMihomoConfig
|
||||
} from '../config'
|
||||
import { startSSIDCheck } from '../sys/ssid'
|
||||
import i18next, { resources } from '../../shared/i18n'
|
||||
import { stringify } from './yaml'
|
||||
import {
|
||||
defaultConfig,
|
||||
defaultControledMihomoConfig,
|
||||
defaultOverrideConfig,
|
||||
defaultProfile,
|
||||
defaultProfileConfig
|
||||
} from './template'
|
||||
import {
|
||||
appConfigPath,
|
||||
controledMihomoConfigPath,
|
||||
@ -15,34 +43,6 @@ import {
|
||||
subStoreDir,
|
||||
themesDir
|
||||
} from './dirs'
|
||||
import {
|
||||
defaultConfig,
|
||||
defaultControledMihomoConfig,
|
||||
defaultOverrideConfig,
|
||||
defaultProfile,
|
||||
defaultProfileConfig
|
||||
} from './template'
|
||||
import { stringify } from './yaml'
|
||||
import { mkdir, writeFile, rm, readdir, cp, stat, rename } from 'fs/promises'
|
||||
import { existsSync } from 'fs'
|
||||
import { exec } from 'child_process'
|
||||
import { promisify } from 'util'
|
||||
import path from 'path'
|
||||
import {
|
||||
startPacServer,
|
||||
startSubStoreBackendServer,
|
||||
startSubStoreFrontendServer
|
||||
} from '../resolve/server'
|
||||
import { triggerSysProxy } from '../sys/sysproxy'
|
||||
import {
|
||||
getAppConfig,
|
||||
getControledMihomoConfig,
|
||||
patchAppConfig,
|
||||
patchControledMihomoConfig
|
||||
} from '../config'
|
||||
import { app, dialog } from 'electron'
|
||||
import { startSSIDCheck } from '../sys/ssid'
|
||||
import i18next, { resources } from '../../shared/i18n'
|
||||
import { initLogger } from './logger'
|
||||
|
||||
let isInitBasicCompleted = false
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
import path from 'path'
|
||||
import v8 from 'v8'
|
||||
import { readFile, writeFile } from 'fs/promises'
|
||||
import { app, ipcMain } from 'electron'
|
||||
import i18next from 'i18next'
|
||||
import {
|
||||
mihomoChangeProxy,
|
||||
mihomoCloseAllConnections,
|
||||
@ -23,7 +27,6 @@ import {
|
||||
mihomoSmartFlushCache
|
||||
} from '../core/mihomoApi'
|
||||
import { checkAutoRun, disableAutoRun, enableAutoRun } from '../sys/autoRun'
|
||||
import { installMihomoCore, getGitHubTags, clearVersionCache } from './github'
|
||||
import {
|
||||
getAppConfig,
|
||||
patchAppConfig,
|
||||
@ -114,16 +117,13 @@ import {
|
||||
writeTheme
|
||||
} from '../resolve/theme'
|
||||
import { subStoreCollections, subStoreSubs } from '../core/subStoreApi'
|
||||
import { logDir, rulePath } from './dirs'
|
||||
import path from 'path'
|
||||
import v8 from 'v8'
|
||||
import { getGistUrl } from '../resolve/gistApi'
|
||||
import { getImageDataURL } from './image'
|
||||
import { startMonitor } from '../resolve/trafficMonitor'
|
||||
import { closeFloatingWindow, showContextMenu, showFloatingWindow } from '../resolve/floatingWindow'
|
||||
import i18next from 'i18next'
|
||||
import { addProfileUpdater, removeProfileUpdater } from '../core/profileUpdater'
|
||||
import { readFile, writeFile } from 'fs/promises'
|
||||
import { getImageDataURL } from './image'
|
||||
import { logDir, rulePath } from './dirs'
|
||||
import { installMihomoCore, getGitHubTags, clearVersionCache } from './github'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
type AsyncFn = (...args: any[]) => Promise<any>
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import { join } from 'path'
|
||||
import { BrowserWindow, Menu, shell } from 'electron'
|
||||
import { is } from '@electron-toolkit/utils'
|
||||
import windowStateKeeper from 'electron-window-state'
|
||||
import { join } from 'path'
|
||||
import icon from '../../resources/icon.png?asset'
|
||||
import { getAppConfig } from './config'
|
||||
import { quitWithoutCore, stopCore } from './core/manager'
|
||||
import { triggerSysProxy } from './sys/sysproxy'
|
||||
import { hideDockIcon, showDockIcon } from './resolve/tray'
|
||||
import icon from '../../resources/icon.png?asset'
|
||||
|
||||
export let mainWindow: BrowserWindow | null = null
|
||||
let quitTimeout: NodeJS.Timeout | null = null
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { useEffect, useRef } from 'react'
|
||||
import React, { useEffect, useRef } from 'react'
|
||||
import * as monaco from 'monaco-editor'
|
||||
import MonacoEditor from 'react-monaco-editor'
|
||||
import { configureMonacoYaml } from 'monaco-yaml'
|
||||
@ -6,7 +6,6 @@ import metaSchema from 'meta-json-schema/schemas/meta-json-schema.json'
|
||||
import pac from 'types-pac/pac.d.ts?raw'
|
||||
import { useTheme } from 'next-themes'
|
||||
import { nanoid } from 'nanoid'
|
||||
import React from 'react'
|
||||
type Language = 'yaml' | 'javascript' | 'css' | 'json' | 'text'
|
||||
|
||||
interface Props {
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { Divider } from '@heroui/react'
|
||||
|
||||
import React from 'react'
|
||||
|
||||
interface Props {
|
||||
|
||||
@ -11,11 +11,11 @@ import {
|
||||
DropdownItem
|
||||
} from '@heroui/react'
|
||||
import React from 'react'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import { calcTraffic } from '@renderer/utils/calc'
|
||||
import dayjs from '@renderer/utils/dayjs'
|
||||
import { BiCopy } from 'react-icons/bi'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
|
||||
interface Props {
|
||||
connection: IMihomoConnectionDetail
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Button } from '@heroui/react'
|
||||
import { toast } from '@renderer/components/base/toast'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { BaseEditor } from '../base/base-editor'
|
||||
import { getOverride, restartCore, setOverride } from '@renderer/utils/ipc'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { BaseEditor } from '../base/base-editor'
|
||||
|
||||
interface Props {
|
||||
id: string
|
||||
|
||||
@ -9,9 +9,9 @@ import {
|
||||
Switch
|
||||
} from '@heroui/react'
|
||||
import React, { useState } from 'react'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import { restartCore } from '@renderer/utils/ipc'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
|
||||
interface Props {
|
||||
item: IOverrideItem
|
||||
|
||||
@ -12,13 +12,13 @@ import { toast } from '@renderer/components/base/toast'
|
||||
import { IoMdMore, IoMdRefresh } from 'react-icons/io'
|
||||
import dayjs from '@renderer/utils/dayjs'
|
||||
import React, { Key, useMemo, useState } from 'react'
|
||||
import EditFileModal from './edit-file-modal'
|
||||
import EditInfoModal from './edit-info-modal'
|
||||
import { useSortable } from '@dnd-kit/sortable'
|
||||
import { CSS } from '@dnd-kit/utilities'
|
||||
import ExecLogModal from './exec-log-modal'
|
||||
import { openFile, restartCore } from '@renderer/utils/ipc'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import ExecLogModal from './exec-log-modal'
|
||||
import EditInfoModal from './edit-info-modal'
|
||||
import EditFileModal from './edit-file-modal'
|
||||
|
||||
interface Props {
|
||||
info: IOverrideItem
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Button } from '@heroui/react'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { BaseEditor } from '../base/base-editor'
|
||||
import { getProfileStr, setProfileStr } from '@renderer/utils/ipc'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { BaseEditor } from '../base/base-editor'
|
||||
|
||||
interface Props {
|
||||
id: string
|
||||
|
||||
@ -15,13 +15,13 @@ import {
|
||||
} from '@heroui/react'
|
||||
import { toast } from '@renderer/components/base/toast'
|
||||
import React, { useState } from 'react'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import { useOverrideConfig } from '@renderer/hooks/use-override-config'
|
||||
import { restartCore, addProfileUpdater } from '@renderer/utils/ipc'
|
||||
import { MdDeleteForever } from 'react-icons/md'
|
||||
import { FaPlus } from 'react-icons/fa6'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { isValidCron } from 'cron-validator'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
|
||||
interface Props {
|
||||
item: IProfileItem
|
||||
|
||||
@ -15,14 +15,14 @@ import { calcPercent, calcTraffic } from '@renderer/utils/calc'
|
||||
import { IoMdMore, IoMdRefresh } from 'react-icons/io'
|
||||
import dayjs from '@renderer/utils/dayjs'
|
||||
import React, { Key, useMemo, useState } from 'react'
|
||||
import EditFileModal from './edit-file-modal'
|
||||
import EditInfoModal from './edit-info-modal'
|
||||
import EditRulesModal from './edit-rules-modal'
|
||||
import { useSortable } from '@dnd-kit/sortable'
|
||||
import { CSS } from '@dnd-kit/utilities'
|
||||
import { openFile } from '@renderer/utils/ipc'
|
||||
import { useAppConfig } from '@renderer/hooks/use-app-config'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import EditRulesModal from './edit-rules-modal'
|
||||
import EditInfoModal from './edit-info-modal'
|
||||
import EditFileModal from './edit-file-modal'
|
||||
|
||||
interface Props {
|
||||
info: IProfileItem
|
||||
|
||||
@ -4,10 +4,7 @@ import {
|
||||
getRuntimeConfig
|
||||
} from '@renderer/utils/ipc'
|
||||
import { Fragment, useEffect, useMemo, useState } from 'react'
|
||||
import Viewer from './viewer'
|
||||
import useSWR from 'swr'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import { Button, Chip } from '@heroui/react'
|
||||
import { toast } from '@renderer/components/base/toast'
|
||||
import { IoMdRefresh } from 'react-icons/io'
|
||||
@ -17,6 +14,9 @@ import dayjs from '@renderer/utils/dayjs'
|
||||
import { calcTraffic } from '@renderer/utils/calc'
|
||||
import { getHash } from '@renderer/utils/hash'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import Viewer from './viewer'
|
||||
const ProxyProvider: React.FC = () => {
|
||||
const { t } = useTranslation()
|
||||
const [showDetails, setShowDetails] = useState({
|
||||
@ -126,7 +126,7 @@ const ProxyProvider: React.FC = () => {
|
||||
<Button
|
||||
isIconOnly
|
||||
title={
|
||||
provider.vehicleType == 'File' ? t('common.editor.edit') : t('common.viewer.view')
|
||||
provider.vehicleType === 'File' ? t('common.editor.edit') : t('common.viewer.view')
|
||||
}
|
||||
className="ml-2"
|
||||
size="sm"
|
||||
@ -140,7 +140,7 @@ const ProxyProvider: React.FC = () => {
|
||||
})
|
||||
}}
|
||||
>
|
||||
{provider.vehicleType == 'File' ? (
|
||||
{provider.vehicleType === 'File' ? (
|
||||
<MdEditDocument className={`text-lg`} />
|
||||
) : (
|
||||
<CgLoadbarDoc className={`text-lg`} />
|
||||
|
||||
@ -4,11 +4,8 @@ import {
|
||||
getRuntimeConfig
|
||||
} from '@renderer/utils/ipc'
|
||||
import { getHash } from '@renderer/utils/hash'
|
||||
import Viewer from './viewer'
|
||||
import { Fragment, useEffect, useMemo, useState } from 'react'
|
||||
import useSWR from 'swr'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import { Button, Chip } from '@heroui/react'
|
||||
import { toast } from '@renderer/components/base/toast'
|
||||
import { IoMdRefresh } from 'react-icons/io'
|
||||
@ -16,6 +13,9 @@ import { CgLoadbarDoc } from 'react-icons/cg'
|
||||
import { MdEditDocument } from 'react-icons/md'
|
||||
import dayjs from '@renderer/utils/dayjs'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import Viewer from './viewer'
|
||||
|
||||
const RuleProvider: React.FC = () => {
|
||||
const { t } = useTranslation()
|
||||
@ -138,7 +138,7 @@ const RuleProvider: React.FC = () => {
|
||||
<Button
|
||||
isIconOnly
|
||||
title={
|
||||
provider.vehicleType == 'File' ? t('common.editor.edit') : t('common.viewer.view')
|
||||
provider.vehicleType === 'File' ? t('common.editor.edit') : t('common.viewer.view')
|
||||
}
|
||||
className="ml-2"
|
||||
size="sm"
|
||||
@ -154,7 +154,7 @@ const RuleProvider: React.FC = () => {
|
||||
})
|
||||
}}
|
||||
>
|
||||
{provider.vehicleType == 'File' ? (
|
||||
{provider.vehicleType === 'File' ? (
|
||||
<MdEditDocument className={`text-lg`} />
|
||||
) : (
|
||||
<CgLoadbarDoc className={`text-lg`} />
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Button } from '@heroui/react'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { BaseEditor } from '../base/base-editor'
|
||||
import { getFileStr, setFileStr, convertMrsRuleset, getRuntimeConfig } from '@renderer/utils/ipc'
|
||||
import yaml from 'js-yaml'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { BaseEditor } from '../base/base-editor'
|
||||
type Language = 'yaml' | 'javascript' | 'css' | 'json' | 'text'
|
||||
|
||||
interface Props {
|
||||
@ -99,7 +99,7 @@ const Viewer: React.FC<Props> = (props) => {
|
||||
<BaseEditor
|
||||
language={language}
|
||||
value={currData}
|
||||
readOnly={type != 'File' || format === 'MrsRule'}
|
||||
readOnly={type !== 'File' || format === 'MrsRule'}
|
||||
onChange={(value) => setCurrData(value)}
|
||||
/>
|
||||
)}
|
||||
@ -108,7 +108,7 @@ const Viewer: React.FC<Props> = (props) => {
|
||||
<Button size="sm" variant="light" onPress={onClose}>
|
||||
{t('common.close')}
|
||||
</Button>
|
||||
{type == 'File' && format !== 'MrsRule' && (
|
||||
{type === 'File' && format !== 'MrsRule' && (
|
||||
<Button
|
||||
size="sm"
|
||||
color="primary"
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import { Button, Tooltip } from '@heroui/react'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import { toast } from '@renderer/components/base/toast'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import {
|
||||
checkUpdate,
|
||||
createHeapSnapshot,
|
||||
@ -10,11 +8,13 @@ import {
|
||||
resetAppConfig
|
||||
} from '@renderer/utils/ipc'
|
||||
import { useState } from 'react'
|
||||
import UpdaterModal from '../updater/updater-modal'
|
||||
import { version } from '@renderer/utils/init'
|
||||
import { IoIosHelpCircle } from 'react-icons/io'
|
||||
import { getDriver } from '@renderer/App'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import UpdaterModal from '../updater/updater-modal'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import BaseConfirmModal from '../base/base-confirm-modal'
|
||||
|
||||
const Actions: React.FC = () => {
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import { toast } from '@renderer/components/base/toast'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import { Button, Input, Select, SelectItem, Switch, Tab, Tabs, Tooltip } from '@heroui/react'
|
||||
import { BiCopy, BiSolidFileImport } from 'react-icons/bi'
|
||||
import useSWR from 'swr'
|
||||
@ -30,9 +28,11 @@ import { platform } from '@renderer/utils/init'
|
||||
import { useTheme } from 'next-themes'
|
||||
import { IoIosHelpCircle, IoMdCloudDownload } from 'react-icons/io'
|
||||
import { MdEditDocument } from 'react-icons/md'
|
||||
import CSSEditorModal from './css-editor-modal'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import BaseConfirmModal from '../base/base-confirm-modal'
|
||||
import CSSEditorModal from './css-editor-modal'
|
||||
|
||||
const GeneralConfig: React.FC = () => {
|
||||
const { t, i18n } = useTranslation()
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import React, { useState } from 'react'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import { toast } from '@renderer/components/base/toast'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import { Button, useDisclosure } from '@heroui/react'
|
||||
import { exportLocalBackup, importLocalBackup } from '@renderer/utils/ipc'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import BaseConfirmModal from '../base/base-confirm-modal'
|
||||
|
||||
const LocalBackupConfig: React.FC = () => {
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import React, { useState } from 'react'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import { toast } from '@renderer/components/base/toast'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import { Button, Input, Select, SelectItem, Switch, Tooltip } from '@heroui/react'
|
||||
import { useAppConfig } from '@renderer/hooks/use-app-config'
|
||||
import debounce from '@renderer/utils/debounce'
|
||||
@ -11,6 +9,8 @@ import { BiCopy } from 'react-icons/bi'
|
||||
import { IoIosHelpCircle } from 'react-icons/io'
|
||||
import { platform, version } from '@renderer/utils/init'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
|
||||
const MihomoConfig: React.FC = () => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import { Button, Input } from '@heroui/react'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import { toast } from '@renderer/components/base/toast'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import { useAppConfig } from '@renderer/hooks/use-app-config'
|
||||
import React, { KeyboardEvent, useState } from 'react'
|
||||
import { platform } from '@renderer/utils/init'
|
||||
import { registerShortcut } from '@renderer/utils/ipc'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
|
||||
const keyMap = {
|
||||
Backquote: '`',
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import React, { useState } from 'react'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import { toast } from '@renderer/components/base/toast'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import { Button, Input, Select, SelectItem, Switch } from '@heroui/react'
|
||||
import { listWebdavBackups, webdavBackup, reinitWebdavBackupScheduler } from '@renderer/utils/ipc'
|
||||
import WebdavRestoreModal from './webdav-restore-modal'
|
||||
import debounce from '@renderer/utils/debounce'
|
||||
import { useAppConfig } from '@renderer/hooks/use-app-config'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { isValidCron } from 'cron-validator'
|
||||
import SettingItem from '../base/base-setting-item'
|
||||
import SettingCard from '../base/base-setting-card'
|
||||
import WebdavRestoreModal from './webdav-restore-modal'
|
||||
|
||||
const WebdavConfig: React.FC = () => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Button } from '@heroui/react'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { BaseEditor } from '../base/base-editor'
|
||||
import { getRuntimeConfigStr } from '@renderer/utils/ipc'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { BaseEditor } from '../base/base-editor'
|
||||
|
||||
interface Props {
|
||||
onClose: () => void
|
||||
|
||||
@ -6,7 +6,6 @@ import React, { useEffect, useState, useMemo, useRef, useCallback } from 'react'
|
||||
import { useSortable } from '@dnd-kit/sortable'
|
||||
import { CSS } from '@dnd-kit/utilities'
|
||||
import { IoLink } from 'react-icons/io5'
|
||||
|
||||
import { useAppConfig } from '@renderer/hooks/use-app-config'
|
||||
import { platform } from '@renderer/utils/init'
|
||||
import { Line } from 'react-chartjs-2'
|
||||
|
||||
@ -10,10 +10,10 @@ import { CSS } from '@dnd-kit/utilities'
|
||||
import 'dayjs/locale/zh-cn'
|
||||
import dayjs from '@renderer/utils/dayjs'
|
||||
import React, { useState } from 'react'
|
||||
import ConfigViewer from './config-viewer'
|
||||
import { useAppConfig } from '@renderer/hooks/use-app-config'
|
||||
import { TiFolder } from 'react-icons/ti'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import ConfigViewer from './config-viewer'
|
||||
|
||||
dayjs.extend(relativeTime)
|
||||
dayjs.locale('zh-cn')
|
||||
|
||||
@ -2,10 +2,10 @@ import { Button, Card, CardBody, CardFooter, Tooltip } from '@heroui/react'
|
||||
import { useLocation, useNavigate } from 'react-router-dom'
|
||||
import { useSortable } from '@dnd-kit/sortable'
|
||||
import { CSS } from '@dnd-kit/utilities'
|
||||
import SubStoreIcon from '../base/substore-icon'
|
||||
import { useAppConfig } from '@renderer/hooks/use-app-config'
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import SubStoreIcon from '../base/substore-icon'
|
||||
|
||||
interface Props {
|
||||
iconOnly?: boolean
|
||||
|
||||
@ -3,9 +3,9 @@ import { useAppConfig } from '@renderer/hooks/use-app-config'
|
||||
import { checkUpdate } from '@renderer/utils/ipc'
|
||||
import React, { useState } from 'react'
|
||||
import useSWR from 'swr'
|
||||
import UpdaterModal from './updater-modal'
|
||||
import { platform } from '@renderer/utils/init'
|
||||
import { MdNewReleases } from 'react-icons/md'
|
||||
import UpdaterModal from './updater-modal'
|
||||
|
||||
interface Props {
|
||||
iconOnly?: boolean
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import React, { ReactNode, useCallback } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { showError } from '@renderer/utils/error-display'
|
||||
import { createConfigContext } from './create-config-context'
|
||||
import { getAppConfig, patchAppConfig as patch } from '@renderer/utils/ipc'
|
||||
import { createConfigContext } from './create-config-context'
|
||||
|
||||
const { Provider, useConfig } = createConfigContext<IAppConfig>({
|
||||
swrKey: 'getAppConfig',
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import React, { ReactNode, useCallback } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { showError } from '@renderer/utils/error-display'
|
||||
import { createConfigContext } from './create-config-context'
|
||||
import {
|
||||
getOverrideConfig,
|
||||
setOverrideConfig as set,
|
||||
@ -9,6 +8,7 @@ import {
|
||||
removeOverrideItem as remove,
|
||||
updateOverrideItem as update
|
||||
} from '@renderer/utils/ipc'
|
||||
import { createConfigContext } from './create-config-context'
|
||||
|
||||
const { Provider, useConfig } = createConfigContext<IOverrideConfig>({
|
||||
swrKey: 'getOverrideConfig',
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import React, { ReactNode, useCallback, useRef } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { showError } from '@renderer/utils/error-display'
|
||||
import { createConfigContext } from './create-config-context'
|
||||
import {
|
||||
addProfileItem as add,
|
||||
changeCurrentProfile as change,
|
||||
@ -10,6 +9,7 @@ import {
|
||||
setProfileConfig as set,
|
||||
updateProfileItem as update
|
||||
} from '@renderer/utils/ipc'
|
||||
import { createConfigContext } from './create-config-context'
|
||||
|
||||
const { Provider, useConfig } = createConfigContext<IProfileConfig>({
|
||||
swrKey: 'getProfileConfig',
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import BasePage from '@renderer/components/base/base-page'
|
||||
import { mihomoCloseAllConnections, mihomoCloseConnection } from '@renderer/utils/ipc'
|
||||
import { Key, useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { Badge, Button, Divider, Input, Select, SelectItem, Tab, Tabs } from '@heroui/react'
|
||||
import { Badge, Button, Divider, Input, Select, SelectItem, Tab, Tabs , Dropdown, DropdownTrigger, DropdownMenu, DropdownItem } from '@heroui/react'
|
||||
import { calcTraffic } from '@renderer/utils/calc'
|
||||
import ConnectionItem from '@renderer/components/connections/connection-item'
|
||||
import ConnectionTable from '@renderer/components/connections/connection-table'
|
||||
@ -13,7 +13,6 @@ import { useAppConfig } from '@renderer/hooks/use-app-config'
|
||||
import { HiSortAscending, HiSortDescending } from 'react-icons/hi'
|
||||
import { MdViewList, MdTableChart } from 'react-icons/md'
|
||||
import { HiOutlineAdjustmentsHorizontal } from 'react-icons/hi2'
|
||||
import { Dropdown, DropdownTrigger, DropdownMenu, DropdownItem } from '@heroui/react'
|
||||
import { includesIgnoreCase } from '@renderer/utils/includes'
|
||||
import differenceWith from 'lodash/differenceWith'
|
||||
import unionWith from 'lodash/unionWith'
|
||||
|
||||
@ -6,7 +6,6 @@ import { Virtuoso, VirtuosoHandle } from 'react-virtuoso'
|
||||
import { IoLocationSharp } from 'react-icons/io5'
|
||||
import { CgTrash } from 'react-icons/cg'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import { includesIgnoreCase } from '@renderer/utils/includes'
|
||||
|
||||
const LOGS_FILTER_KEY = 'logs-filter'
|
||||
|
||||
@ -7,8 +7,7 @@ import PacEditorModal from '@renderer/components/sysproxy/pac-editor-modal'
|
||||
import { useAppConfig } from '@renderer/hooks/use-app-config'
|
||||
import { platform } from '@renderer/utils/init'
|
||||
import { openUWPTool, triggerSysProxy } from '@renderer/utils/ipc'
|
||||
import { Key, useState } from 'react'
|
||||
import React from 'react'
|
||||
import React, { Key, useState } from 'react'
|
||||
import { MdDeleteForever } from 'react-icons/md'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ export function calcTraffic(byte: number): string {
|
||||
function formatNumString(num: number): string {
|
||||
let str = num.toFixed(2)
|
||||
if (str.length <= 5) return str
|
||||
if (str.length == 6) {
|
||||
if (str.length === 6) {
|
||||
str = num.toFixed(1)
|
||||
return str
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user