feat(deploy): implement new deployment script using ssh2-sftp-client

- Replace PowerShell deploy script with TypeScript-based deploy script
- Add SSH2 SFTP client for secure file uploads to remote server
- Include error handling and logging for deployment process
- Update package.json to reflect changes in deploy command and add new dependencies
This commit is contained in:
dmy
2026-01-15 21:02:36 +08:00
parent 5edebd9d55
commit 3033eb622f
4 changed files with 159 additions and 3 deletions

View File

@@ -23,7 +23,7 @@
"update-source": "ts-node -r tsconfig-paths/register src/scripts/update-source.ts",
"ai-recommendations": "ts-node -r tsconfig-paths/register src/scripts/ai-recommendations.ts",
"sync": "ts-node -r tsconfig-paths/register src/scripts/sync.ts",
"deploy": "powershell -ExecutionPolicy Bypass -File src/scripts/deploy.ps1",
"deploy": "ts-node src/scripts/deploy.ts",
"electron:dev": "chcp 65001 >nul 2>&1 & npm run -prefix frontend build && npm run build && set NODE_ENV=development && electron ./app",
"electron:build": "npm run -prefix frontend build && npm run build && electron-builder --config ./app/electron-builder.json"
},
@@ -46,6 +46,7 @@
"puppeteer-extra-plugin-stealth": "^2.11.2",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"ssh2": "^1.17.0",
"typeorm": "^0.3.28",
"winston": "^3.19.0",
"winston-daily-rotate-file": "^5.0.0"
@@ -63,6 +64,8 @@
"@types/jest": "^30.0.0",
"@types/node": "^22.10.7",
"@types/responselike": "^1.0.3",
"@types/ssh2": "^1.15.5",
"@types/ssh2-sftp-client": "^9.0.6",
"@types/supertest": "^6.0.2",
"concurrently": "^9.2.1",
"electron": "^39.2.7",
@@ -74,6 +77,7 @@
"jest": "^30.0.0",
"prettier": "^3.4.2",
"source-map-support": "^0.5.21",
"ssh2-sftp-client": "^12.0.1",
"supertest": "^7.0.0",
"ts-jest": "^29.2.5",
"ts-loader": "^9.5.2",