This commit is contained in:
2025-03-12 00:48:44 +08:00
parent 530d675985
commit b6e0b142d8
16 changed files with 33871 additions and 52 deletions

2
.gitignore vendored
View File

@@ -3,5 +3,3 @@ dist
app-dist app-dist
build build
.DS_Store .DS_Store
src/**/dist/**

View File

@@ -1,6 +1,6 @@
{ {
"name": "silky-assistant", "name": "silky-assistant",
"version": "0.0.1", "version": "0.0.2",
"description": "Silky Assistant", "description": "Silky Assistant",
"main": "app-dist/main.js", "main": "app-dist/main.js",
"scripts": { "scripts": {
@@ -13,29 +13,31 @@
"watch:electron": "electron app-dist/main.js --watch", "watch:electron": "electron app-dist/main.js --watch",
"start": "electron .", "start": "electron .",
"html": "tsx scripts/clear-directory.ts", "html": "tsx scripts/clear-directory.ts",
"pub": "ev deploy ./build -k silky-assistant -v 0.0.1 -u -o root" "prepub": "pnpm html",
"pub": "ev deploy ./build -k silky-assistant -v 0.0.2 -u -o root"
}, },
"keywords": [], "keywords": [],
"author": "abearxiong <xiongxiao@xiongxiao.me>", "author": "abearxiong <xiongxiao@xiongxiao.me>",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
"devDependencies": { "devDependencies": {
"@rollup/plugin-commonjs": "^28.0.3",
"@rollup/plugin-node-resolve": "^16.0.0",
"@types/electron": "^1.6.12", "@types/electron": "^1.6.12",
"@types/node": "^22.13.9", "@types/node": "^22.13.9",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"electron": "^35.0.0", "typescript": "^5.8.2",
"electron-builder": "^25.1.8", "electron-builder": "^25.1.8",
"electron-log": "^5.3.2", "electron-log": "^5.3.2",
"electron-updater": "^6.3.9",
"typescript": "^5.8.2",
"vite": "^6.2.1", "vite": "^6.2.1",
"vite-plugin-electron": "^0.29.0", "vite-plugin-electron": "^0.29.0",
"electron": "^35.0.0",
"vite-plugin-static-copy": "^2.3.0" "vite-plugin-static-copy": "^2.3.0"
}, },
"dependencies": { "dependencies": {
"@kevisual/assistant-module": "^0.0.3", "@kevisual/assistant-module": "^0.0.3",
"@kevisual/router": "^0.0.9", "@kevisual/use-config": "^1.0.9",
"@kevisual/use-config": "^1.0.9" "electron-updater": "^6.3.9"
}, },
"build": { "build": {
"appId": "cn.silkeyai.assistant", "appId": "cn.silkeyai.assistant",
@@ -72,6 +74,13 @@
}, },
"linux": { "linux": {
"target": "AppImage" "target": "AppImage"
} },
} "publish": [
{
"provider": "generic",
"url": "https://kevisual.silkyai.cn/root/silky-assistant/"
}
]
},
"packageManager": "pnpm@9.14.4+sha512.c8180b3fbe4e4bca02c94234717896b5529740a6cbadf19fa78254270403ea2f27d4e1d46a08a0f56c89b63dc8ebfd3ee53326da720273794e6200fcf0d184ab"
} }

156
pnpm-lock.yaml generated
View File

@@ -18,6 +18,12 @@ importers:
specifier: ^1.0.9 specifier: ^1.0.9
version: 1.0.9 version: 1.0.9
devDependencies: devDependencies:
'@rollup/plugin-commonjs':
specifier: ^28.0.3
version: 28.0.3(rollup@4.34.9)
'@rollup/plugin-node-resolve':
specifier: ^16.0.0
version: 16.0.0(rollup@4.34.9)
'@types/electron': '@types/electron':
specifier: ^1.6.12 specifier: ^1.6.12
version: 1.6.12 version: 1.6.12
@@ -245,6 +251,9 @@ packages:
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
engines: {node: '>=12'} engines: {node: '>=12'}
'@jridgewell/sourcemap-codec@1.5.0':
resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}
'@kevisual/assistant-module@0.0.3': '@kevisual/assistant-module@0.0.3':
resolution: {integrity: sha512-XC9tZJk+GclDV7fVXqmghbMRfhD4dqFh/X085LttDw3iBDkRO78H8+zCrHwx+poSh4JQDYite/FJdpQOs+cHoA==} resolution: {integrity: sha512-XC9tZJk+GclDV7fVXqmghbMRfhD4dqFh/X085LttDw3iBDkRO78H8+zCrHwx+poSh4JQDYite/FJdpQOs+cHoA==}
@@ -290,6 +299,33 @@ packages:
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'} engines: {node: '>=14'}
'@rollup/plugin-commonjs@28.0.3':
resolution: {integrity: sha512-pyltgilam1QPdn+Zd9gaCfOLcnjMEJ9gV+bTw6/r73INdvzf1ah9zLIJBm+kW7R6IUFIQ1YO+VqZtYxZNWFPEQ==}
engines: {node: '>=16.0.0 || 14 >= 14.17'}
peerDependencies:
rollup: ^2.68.0||^3.0.0||^4.0.0
peerDependenciesMeta:
rollup:
optional: true
'@rollup/plugin-node-resolve@16.0.0':
resolution: {integrity: sha512-0FPvAeVUT/zdWoO0jnb/V5BlBsUSNfkIOtFHzMO4H9MOklrmQFY6FduVHKucNb/aTFxvnGhj4MNj/T1oNdDfNg==}
engines: {node: '>=14.0.0'}
peerDependencies:
rollup: ^2.78.0||^3.0.0||^4.0.0
peerDependenciesMeta:
rollup:
optional: true
'@rollup/pluginutils@5.1.4':
resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==}
engines: {node: '>=14.0.0'}
peerDependencies:
rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
peerDependenciesMeta:
rollup:
optional: true
'@rollup/rollup-android-arm-eabi@4.34.9': '@rollup/rollup-android-arm-eabi@4.34.9':
resolution: {integrity: sha512-qZdlImWXur0CFakn2BJ2znJOdqYZKiedEPEVNTBrpfPjc/YuTGcaYZcdmNFTkUj3DU0ZM/AElcM8Ybww3xVLzA==} resolution: {integrity: sha512-qZdlImWXur0CFakn2BJ2znJOdqYZKiedEPEVNTBrpfPjc/YuTGcaYZcdmNFTkUj3DU0ZM/AElcM8Ybww3xVLzA==}
cpu: [arm] cpu: [arm]
@@ -441,6 +477,9 @@ packages:
'@types/plist@3.0.5': '@types/plist@3.0.5':
resolution: {integrity: sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA==} resolution: {integrity: sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA==}
'@types/resolve@1.20.2':
resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
'@types/responselike@1.0.3': '@types/responselike@1.0.3':
resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==}
@@ -686,6 +725,9 @@ packages:
resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==} resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==}
engines: {node: '>= 6'} engines: {node: '>= 6'}
commondir@1.0.1:
resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
compare-version@0.1.2: compare-version@0.1.2:
resolution: {integrity: sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==} resolution: {integrity: sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
@@ -743,6 +785,10 @@ packages:
resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==}
engines: {node: '>=10'} engines: {node: '>=10'}
deepmerge@4.3.1:
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
engines: {node: '>=0.10.0'}
defaults@1.0.4: defaults@1.0.4:
resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==}
@@ -896,6 +942,9 @@ packages:
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
engines: {node: '>=10'} engines: {node: '>=10'}
estree-walker@2.0.2:
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
etag@1.8.1: etag@1.8.1:
resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==}
engines: {node: '>= 0.6'} engines: {node: '>= 0.6'}
@@ -931,6 +980,14 @@ packages:
fd-slicer@1.1.0: fd-slicer@1.1.0:
resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==}
fdir@6.4.3:
resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==}
peerDependencies:
picomatch: ^3 || ^4
peerDependenciesMeta:
picomatch:
optional: true
filelist@1.0.4: filelist@1.0.4:
resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==}
@@ -1139,6 +1196,10 @@ packages:
resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==}
hasBin: true hasBin: true
is-core-module@2.16.1:
resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==}
engines: {node: '>= 0.4'}
is-extglob@2.1.1: is-extglob@2.1.1:
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
@@ -1158,10 +1219,16 @@ packages:
is-lambda@1.0.1: is-lambda@1.0.1:
resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==}
is-module@1.0.0:
resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==}
is-number@7.0.0: is-number@7.0.0:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'} engines: {node: '>=0.12.0'}
is-reference@1.2.1:
resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==}
is-unicode-supported@0.1.0: is-unicode-supported@0.1.0:
resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==}
engines: {node: '>=10'} engines: {node: '>=10'}
@@ -1269,6 +1336,9 @@ packages:
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
engines: {node: '>=12'} engines: {node: '>=12'}
magic-string@0.30.17:
resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==}
make-fetch-happen@10.2.1: make-fetch-happen@10.2.1:
resolution: {integrity: sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==} resolution: {integrity: sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==}
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
@@ -1468,6 +1538,9 @@ packages:
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'} engines: {node: '>=8'}
path-parse@1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
path-scurry@1.11.1: path-scurry@1.11.1:
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
engines: {node: '>=16 || 14 >=14.18'} engines: {node: '>=16 || 14 >=14.18'}
@@ -1490,6 +1563,10 @@ packages:
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
engines: {node: '>=8.6'} engines: {node: '>=8.6'}
picomatch@4.0.2:
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
engines: {node: '>=12'}
plist@3.1.0: plist@3.1.0:
resolution: {integrity: sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==} resolution: {integrity: sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==}
engines: {node: '>=10.4.0'} engines: {node: '>=10.4.0'}
@@ -1564,6 +1641,11 @@ packages:
resolve-alpn@1.2.1: resolve-alpn@1.2.1:
resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==}
resolve@1.22.10:
resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==}
engines: {node: '>= 0.4'}
hasBin: true
responselike@2.0.1: responselike@2.0.1:
resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==}
@@ -1732,6 +1814,10 @@ packages:
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
engines: {node: '>=8'} engines: {node: '>=8'}
supports-preserve-symlinks-flag@1.0.0:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
tar-stream@2.2.0: tar-stream@2.2.0:
resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==}
engines: {node: '>=6'} engines: {node: '>=6'}
@@ -2089,6 +2175,8 @@ snapshots:
wrap-ansi: 8.1.0 wrap-ansi: 8.1.0
wrap-ansi-cjs: wrap-ansi@7.0.0 wrap-ansi-cjs: wrap-ansi@7.0.0
'@jridgewell/sourcemap-codec@1.5.0': {}
'@kevisual/assistant-module@0.0.3': '@kevisual/assistant-module@0.0.3':
dependencies: dependencies:
send: 1.1.0 send: 1.1.0
@@ -2153,6 +2241,36 @@ snapshots:
'@pkgjs/parseargs@0.11.0': '@pkgjs/parseargs@0.11.0':
optional: true optional: true
'@rollup/plugin-commonjs@28.0.3(rollup@4.34.9)':
dependencies:
'@rollup/pluginutils': 5.1.4(rollup@4.34.9)
commondir: 1.0.1
estree-walker: 2.0.2
fdir: 6.4.3(picomatch@4.0.2)
is-reference: 1.2.1
magic-string: 0.30.17
picomatch: 4.0.2
optionalDependencies:
rollup: 4.34.9
'@rollup/plugin-node-resolve@16.0.0(rollup@4.34.9)':
dependencies:
'@rollup/pluginutils': 5.1.4(rollup@4.34.9)
'@types/resolve': 1.20.2
deepmerge: 4.3.1
is-module: 1.0.0
resolve: 1.22.10
optionalDependencies:
rollup: 4.34.9
'@rollup/pluginutils@5.1.4(rollup@4.34.9)':
dependencies:
'@types/estree': 1.0.6
estree-walker: 2.0.2
picomatch: 4.0.2
optionalDependencies:
rollup: 4.34.9
'@rollup/rollup-android-arm-eabi@4.34.9': '@rollup/rollup-android-arm-eabi@4.34.9':
optional: true optional: true
@@ -2263,6 +2381,8 @@ snapshots:
xmlbuilder: 15.1.1 xmlbuilder: 15.1.1
optional: true optional: true
'@types/resolve@1.20.2': {}
'@types/responselike@1.0.3': '@types/responselike@1.0.3':
dependencies: dependencies:
'@types/node': 22.13.9 '@types/node': 22.13.9
@@ -2597,6 +2717,8 @@ snapshots:
commander@5.1.0: {} commander@5.1.0: {}
commondir@1.0.1: {}
compare-version@0.1.2: {} compare-version@0.1.2: {}
compress-commons@4.1.2: compress-commons@4.1.2:
@@ -2650,6 +2772,8 @@ snapshots:
dependencies: dependencies:
mimic-response: 3.1.0 mimic-response: 3.1.0
deepmerge@4.3.1: {}
defaults@1.0.4: defaults@1.0.4:
dependencies: dependencies:
clone: 1.0.4 clone: 1.0.4
@@ -2870,6 +2994,8 @@ snapshots:
escape-string-regexp@4.0.0: escape-string-regexp@4.0.0:
optional: true optional: true
estree-walker@2.0.2: {}
etag@1.8.1: {} etag@1.8.1: {}
eventemitter3@5.0.1: {} eventemitter3@5.0.1: {}
@@ -2909,6 +3035,10 @@ snapshots:
dependencies: dependencies:
pend: 1.2.0 pend: 1.2.0
fdir@6.4.3(picomatch@4.0.2):
optionalDependencies:
picomatch: 4.0.2
filelist@1.0.4: filelist@1.0.4:
dependencies: dependencies:
minimatch: 5.1.6 minimatch: 5.1.6
@@ -3177,6 +3307,10 @@ snapshots:
dependencies: dependencies:
ci-info: 3.9.0 ci-info: 3.9.0
is-core-module@2.16.1:
dependencies:
hasown: 2.0.2
is-extglob@2.1.1: {} is-extglob@2.1.1: {}
is-fullwidth-code-point@3.0.0: {} is-fullwidth-code-point@3.0.0: {}
@@ -3189,8 +3323,14 @@ snapshots:
is-lambda@1.0.1: {} is-lambda@1.0.1: {}
is-module@1.0.0: {}
is-number@7.0.0: {} is-number@7.0.0: {}
is-reference@1.2.1:
dependencies:
'@types/estree': 1.0.6
is-unicode-supported@0.1.0: {} is-unicode-supported@0.1.0: {}
isarray@1.0.0: {} isarray@1.0.0: {}
@@ -3280,6 +3420,10 @@ snapshots:
lru-cache@7.18.3: {} lru-cache@7.18.3: {}
magic-string@0.30.17:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
make-fetch-happen@10.2.1: make-fetch-happen@10.2.1:
dependencies: dependencies:
agentkeepalive: 4.6.0 agentkeepalive: 4.6.0
@@ -3483,6 +3627,8 @@ snapshots:
path-key@3.1.1: {} path-key@3.1.1: {}
path-parse@1.0.7: {}
path-scurry@1.11.1: path-scurry@1.11.1:
dependencies: dependencies:
lru-cache: 10.4.3 lru-cache: 10.4.3
@@ -3498,6 +3644,8 @@ snapshots:
picomatch@2.3.1: {} picomatch@2.3.1: {}
picomatch@4.0.2: {}
plist@3.1.0: plist@3.1.0:
dependencies: dependencies:
'@xmldom/xmldom': 0.8.10 '@xmldom/xmldom': 0.8.10
@@ -3572,6 +3720,12 @@ snapshots:
resolve-alpn@1.2.1: {} resolve-alpn@1.2.1: {}
resolve@1.22.10:
dependencies:
is-core-module: 2.16.1
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
responselike@2.0.1: responselike@2.0.1:
dependencies: dependencies:
lowercase-keys: 2.0.0 lowercase-keys: 2.0.0
@@ -3771,6 +3925,8 @@ snapshots:
dependencies: dependencies:
has-flag: 4.0.0 has-flag: 4.0.0
supports-preserve-symlinks-flag@1.0.0: {}
tar-stream@2.2.0: tar-stream@2.2.0:
dependencies: dependencies:
bl: 4.1.0 bl: 4.1.0

View File

@@ -7,7 +7,8 @@ import { loadMenu } from './menu/index.ts';
import { getLogPath, log } from './app.ts'; import { getLogPath, log } from './app.ts';
import { checkShowPage } from './window/page/index.ts'; import { checkShowPage } from './window/page/index.ts';
import { closeProcess, createProcess } from './process/index.ts'; import { closeProcess, createProcess } from './process/index.ts';
import { getElectronResourcePath } from './system/env.ts'; import { getElectronResourcePath, isMac } from './system/env.ts';
import { checkForUpdates } from './updater/index.ts';
const __filename = fileURLToPath(import.meta.url); const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename); const __dirname = path.dirname(__filename);
@@ -39,6 +40,9 @@ async function createWindow() {
app.on('ready', async () => { app.on('ready', async () => {
await createProcess(); await createProcess();
createWindow(); createWindow();
if (!isMac()) {
checkForUpdates();
}
}); });
app.on('window-all-closed', () => { app.on('window-all-closed', () => {

View File

@@ -1,6 +1,6 @@
import { createEnterPage } from '../window/page/enter.ts'; import { createEnterPage } from '../window/page/enter.ts';
import { BrowserWindow, Menu, app } from 'electron'; import { BrowserWindow, Menu, app } from 'electron';
import { shell } from 'electron';
import path from 'path'; import path from 'path';
import { getLogPath, log } from '../logger.ts'; import { getLogPath, log } from '../logger.ts';
import { createAppPackagesPage } from '../window/page/app-packages.ts'; import { createAppPackagesPage } from '../window/page/app-packages.ts';
@@ -125,7 +125,6 @@ export const loadMenu = () => {
{ {
label: '打开日志', label: '打开日志',
click: async () => { click: async () => {
const { shell } = require('electron');
log.transports.file.fileName; log.transports.file.fileName;
shell.openExternal('file://' + path.join(getLogPath())); shell.openExternal('file://' + path.join(getLogPath()));
}, },

10
src/main/updater/index.ts Normal file
View File

@@ -0,0 +1,10 @@
import { autoUpdater } from 'electron-updater';
autoUpdater.setFeedURL({
provider: 'generic',
url: 'https://kevisual.silkyai.cn/root/silky-assistant/',
});
export const checkForUpdates = () => {
autoUpdater.checkForUpdatesAndNotify();
};

View File

@@ -0,0 +1 @@
!dist

33639
src/renderer/assistant-center/dist/app.mjs vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
import{u as h,r as i,j as e}from"./index-CGYlhUn4.js";const m=()=>{const{config:o,getConfig:r,saveConfig:d}=h();i.useEffect(()=>{c(),r()},[]),i.useEffect(()=>{if(o.pageApi){const a=document.getElementById("pageApi");a.value=o.pageApi;const l=document.getElementById("loadURL");l.value=o.loadURL||"/web/note/"}},[o]);const c=()=>{const a=document.getElementById("particles"),l=20;if(a)for(let s=0;s<l;s++){const t=document.createElement("div");t.className="particle",t.innerHTML=` import{u as h,r as i,j as e}from"./index-DFSA4dSC.js";const m=()=>{const{config:o,getConfig:r,saveConfig:d}=h();i.useEffect(()=>{c(),r()},[]),i.useEffect(()=>{if(o.pageApi){const a=document.getElementById("pageApi");a.value=o.pageApi;const l=document.getElementById("loadURL");l.value=o.loadURL||"/web/note/"}},[o]);const c=()=>{const a=document.getElementById("particles"),l=20;if(a)for(let s=0;s<l;s++){const t=document.createElement("div");t.className="particle",t.innerHTML=`
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"/> <path d="m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"/>
<path d="M5 3v4"/> <path d="M5 3v4"/>

View File

@@ -0,0 +1,31 @@
import{c as N,y as d,a as f,q as C,r as u,u as $,j as n}from"./index-DFSA4dSC.js";const I=N((t,i)=>({installedPackages:[],shopPackages:[],setInstalledPackages:s=>t({installedPackages:s}),setShopPackages:s=>t({shopPackages:s}),getInstalledPackages:async()=>{const s=await f.post({path:"shop",key:"list-installed"});return s.code===200&&t({installedPackages:s.data}),s.data},getShopPackages:async()=>{const s=await C.post({path:"app",key:"public-list"},{url:"https://kevisual.silkyai.cn/api/router"});return s.code===200&&t({shopPackages:s.data}),s.data},uninstallPackage:async s=>{const o=await f.post({path:"shop",key:"uninstall",data:{pkg:s}});o.code===200?(i().getInstalledPackages(),d.success("Package uninstalled successfully")):d.error(o.message||"Failed to uninstall package"),console.log("uninstallPackage",o)},installPackage:async s=>{const o=d.loading("Installing package..."),c=await f.post({path:"shop",key:"install",data:{pkg:s}});d.dismiss(o),c.code===200?(i().getInstalledPackages(),d.success("Package installed successfully")):d.error(c.message||"Failed to install package"),console.log("installPackage",c)}}));/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const A=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),x=(...t)=>t.filter((i,s,o)=>!!i&&i.trim()!==""&&o.indexOf(i)===s).join(" ").trim();/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var U={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const S=u.forwardRef(({color:t="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:c="",children:r,iconNode:h,...p},k)=>u.createElement("svg",{ref:k,...U,width:i,height:i,stroke:t,strokeWidth:o?Number(s)*24/Number(i):s,className:x("lucide",c),...p},[...h.map(([g,m])=>u.createElement(g,m)),...Array.isArray(r)?r:[r]]));/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const y=(t,i)=>{const s=u.forwardRef(({className:o,...c},r)=>u.createElement(S,{ref:r,iconNode:i,className:x(`lucide-${A(t)}`,o),...c}));return s.displayName=`${t}`,s};/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const R=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],q=y("Link2",R);/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const L=[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]],E=y("SquareArrowOutUpRight",L),_=()=>{const{shopPackages:t,installedPackages:i,getInstalledPackages:s,getShopPackages:o,uninstallPackage:c,installPackage:r}=I(),{pageApi:h,pageStoreApi:p}=$();u.useEffect(()=>{s(),o()},[]);const k=e=>{const a=i.find(l=>l.user===e.user&&l.key===e.key);return a?a.version!==e.version?"update-available":"installed":"not-installed"},g=e=>{const a=t.find(l=>l.id===e);a&&r(a)},m=e=>{const a=t.find(l=>l.id===e);a&&r(a)},b=e=>{const a=t.find(l=>l.id===e);a&&r(a)},w=e=>{const a=t.find(l=>l.id===e);a&&c(a)},P=(e,a)=>{switch(e){case"not-installed":return n.jsx("button",{className:"button button-install",onClick:()=>g(a.id),children:"Install"});case"update-available":return n.jsx("button",{className:"button button-update",onClick:()=>m(a.id),children:"Update"});case"installed":return n.jsx("button",{className:"button button-reinstall",onClick:()=>b(a.id),children:"Reinstall"})}},j=e=>{const a=p||"https://kevisual.silkyai.cn",l=`/${e.user}/${e.key}`;window.open(`${a}${l}`,"_blank")},v=e=>{const a=new URL(window.location.href).origin,l=`/${e.user}/${e.key}`;window.open(`${a}${l}`,"_blank")};return n.jsxs("div",{id:"app",children:[n.jsx("h1",{children:"Package Manager"}),n.jsx("div",{className:"package-list",children:t.map(e=>{const a=k(e),l=a!=="not-installed";return n.jsxs("div",{className:"package-card",children:[n.jsx("h2",{children:e.title}),n.jsx("p",{className:"description",children:e.description}),n.jsxs("div",{className:"package-info",children:[n.jsxs("span",{children:["Version: ",e.version]}),n.jsxs("span",{children:["User: ",e.user]})]}),n.jsxs("div",{className:"actions",children:[P(a,e),a!=="not-installed"&&n.jsx("button",{className:"button button-uninstall",onClick:()=>w(e.id),children:"Uninstall"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("div",{className:"cursor-pointer p-2 rounded-md bg-amber-500 text-white",children:n.jsx(E,{onClick:()=>j(e)})}),h&&l&&n.jsx("div",{className:"cursor-pointer p-2 rounded-md bg-amber-500 text-white",children:n.jsx(q,{onClick:()=>v(e)})})]})]})]},e.id)})})]})};export{_ as PackageManager,_ as default};

View File

@@ -1,31 +0,0 @@
import{c as N,y as d,a as f,q as C,r as u,u as $,j as n}from"./index-CGYlhUn4.js";const I=N((t,i)=>({installedPackages:[],shopPackages:[],setInstalledPackages:s=>t({installedPackages:s}),setShopPackages:s=>t({shopPackages:s}),getInstalledPackages:async()=>{const s=await f.post({path:"shop",key:"list-installed"});return s.code===200&&t({installedPackages:s.data}),s.data},getShopPackages:async()=>{const s=await C.post({path:"app",key:"public-list"},{url:"https://kevisual.silkyai.cn/api/router"});return s.code===200&&t({shopPackages:s.data}),s.data},uninstallPackage:async s=>{const c=await f.post({path:"shop",key:"uninstall",data:{pkg:s}});c.code===200?(i().getInstalledPackages(),d.success("Package uninstalled successfully")):d.error(c.message||"Failed to uninstall package"),console.log("uninstallPackage",c)},installPackage:async s=>{const c=d.loading("Installing package..."),o=await f.post({path:"shop",key:"install",data:{pkg:s}});d.dismiss(c),o.code===200?(i().getInstalledPackages(),d.success("Package installed successfully")):d.error(o.message||"Failed to install package"),console.log("installPackage",o)}}));/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const A=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),x=(...t)=>t.filter((i,s,c)=>!!i&&i.trim()!==""&&c.indexOf(i)===s).join(" ").trim();/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var S={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U=u.forwardRef(({color:t="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:c,className:o="",children:r,iconNode:h,...p},k)=>u.createElement("svg",{ref:k,...S,width:i,height:i,stroke:t,strokeWidth:c?Number(s)*24/Number(i):s,className:x("lucide",o),...p},[...h.map(([g,m])=>u.createElement(g,m)),...Array.isArray(r)?r:[r]]));/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const y=(t,i)=>{const s=u.forwardRef(({className:c,...o},r)=>u.createElement(U,{ref:r,iconNode:i,className:x(`lucide-${A(t)}`,c),...o}));return s.displayName=`${t}`,s};/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],R=y("Link2",q);/**
* @license lucide-react v0.479.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const E=[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]],L=y("SquareArrowOutUpRight",E),_=()=>{const{shopPackages:t,installedPackages:i,getInstalledPackages:s,getShopPackages:c,uninstallPackage:o,installPackage:r}=I(),{pageApi:h,pageStoreApi:p}=$();u.useEffect(()=>{s(),c()},[]);const k=e=>{const a=i.find(l=>l.user===e.user&&l.key===e.key);return a?a.version!==e.version?"update-available":"installed":"not-installed"},g=e=>{const a=t.find(l=>l.id===e);a&&r(a)},m=e=>{const a=t.find(l=>l.id===e);a&&r(a)},b=e=>{const a=t.find(l=>l.id===e);a&&r(a)},P=e=>{const a=t.find(l=>l.id===e);a&&o(a)},w=(e,a)=>{switch(e){case"not-installed":return n.jsx("button",{className:"button button-install",onClick:()=>g(a.id),children:"Install"});case"update-available":return n.jsx("button",{className:"button button-update",onClick:()=>m(a.id),children:"Update"});case"installed":return n.jsx("button",{className:"button button-reinstall",onClick:()=>b(a.id),children:"Reinstall"})}},j=e=>{const a=p||"https://kevisual.silkyai.cn",l=`/${e.user}/${e.key}`;window.open(`${a}${l}`,"_blank")},v=e=>{if(!h)return;const a=h,l=`/${e.user}/${e.key}`;window.open(`${a}${l}`,"_blank")};return n.jsxs("div",{id:"app",children:[n.jsx("h1",{children:"Package Manager"}),n.jsx("div",{className:"package-list",children:t.map(e=>{const a=k(e),l=a!=="not-installed";return n.jsxs("div",{className:"package-card",children:[n.jsx("h2",{children:e.title}),n.jsx("p",{className:"description",children:e.description}),n.jsxs("div",{className:"package-info",children:[n.jsxs("span",{children:["Version: ",e.version]}),n.jsxs("span",{children:["User: ",e.user]})]}),n.jsxs("div",{className:"actions",children:[w(a,e),a!=="not-installed"&&n.jsx("button",{className:"button button-uninstall",onClick:()=>P(e.id),children:"Uninstall"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("div",{className:"cursor-pointer p-2 rounded-md bg-amber-500 text-white",children:n.jsx(L,{onClick:()=>j(e)})}),h&&l&&n.jsx("div",{className:"cursor-pointer p-2 rounded-md bg-amber-500 text-white",children:n.jsx(R,{onClick:()=>v(e)})})]})]})]},e.id)})})]})};export{_ as PackageManager,_ as default};

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Assistant Base App</title> <title>Assistant Base App</title>
<script type="module" crossorigin src="/root/assistant-base-app/assets/index-CGYlhUn4.js"></script> <script type="module" crossorigin src="/root/assistant-base-app/assets/index-DFSA4dSC.js"></script>
<link rel="stylesheet" crossorigin href="/root/assistant-base-app/assets/index-CyYNi-ro.css"> <link rel="stylesheet" crossorigin href="/root/assistant-base-app/assets/index-CyYNi-ro.css">
</head> </head>
<body> <body>

View File

@@ -1,6 +1,6 @@
{ {
"compilerOptions": { "compilerOptions": {
"module": "NodeNext", "module": "CommonJS",
"noImplicitAny": false, "noImplicitAny": false,
"sourceMap": false, "sourceMap": false,
"outDir": "app-dist", "outDir": "app-dist",
@@ -21,7 +21,7 @@
"declaration": true, "declaration": true,
"strict": false, "strict": false,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"moduleResolution": "NodeNext", "moduleResolution": "Node",
"isolatedModules": false, "isolatedModules": false,
"resolveJsonModule": true, "resolveJsonModule": true,
"types": [] "types": []

View File

@@ -3,7 +3,8 @@ import path from 'path';
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import electron from 'vite-plugin-electron'; import electron from 'vite-plugin-electron';
import { viteStaticCopy } from 'vite-plugin-static-copy'; import { viteStaticCopy } from 'vite-plugin-static-copy';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
electron({ electron({
@@ -24,6 +25,8 @@ export default defineConfig({
output: { output: {
format: 'esm', // 设置输出格式为 ESM format: 'esm', // 设置输出格式为 ESM
}, },
// external: ['electron-updater', 'electron-log'],
// external: ['electron-updater'],
}, },
outDir: 'app-dist', // 主进程输出目录 outDir: 'app-dist', // 主进程输出目录
}, },