fe-build-cli 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/update.js +6 -1
package/README.md
CHANGED
|
@@ -382,7 +382,7 @@ export default {
|
|
|
382
382
|
servers: {
|
|
383
383
|
production: {
|
|
384
384
|
// SSH 连接配置
|
|
385
|
-
sshHost: '
|
|
385
|
+
sshHost: 'your-server-ip', // 服务器 IP 或域名(必填)
|
|
386
386
|
sshUser: 'deployer', // SSH 用户名(必填)
|
|
387
387
|
sshKeyPath: `${process.env.USERPROFILE || process.env.HOME}/.ssh/id_rsa`, // SSH 私钥路径(必填)
|
|
388
388
|
sshPort: 22, // SSH 端口(可选,默认 22)
|
|
@@ -482,7 +482,7 @@ dingtalk: {
|
|
|
482
482
|
构建版本: build-20260618-abc123
|
|
483
483
|
发布分支: main
|
|
484
484
|
发布模式: 主分支发布
|
|
485
|
-
服务器:
|
|
485
|
+
服务器: your-server.com
|
|
486
486
|
部署耗时: 120秒
|
|
487
487
|
|
|
488
488
|
---
|
|
@@ -515,7 +515,7 @@ https://www.example.com
|
|
|
515
515
|
|
|
516
516
|
构建版本: build-20260618-abc123
|
|
517
517
|
发布分支: main
|
|
518
|
-
服务器:
|
|
518
|
+
服务器: your-server.com
|
|
519
519
|
|
|
520
520
|
---
|
|
521
521
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fe-build-cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "前端项目打包部署 CLI 工具,支持多服务器部署、分支管理、回滚、钉钉通知、智能处理本地改动等功能",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -39,4 +39,4 @@
|
|
|
39
39
|
"ssh2": "^1.15.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {}
|
|
42
|
-
}
|
|
42
|
+
}
|
package/src/update.js
CHANGED
|
@@ -39,7 +39,12 @@ export function getCurrentVersion() {
|
|
|
39
39
|
*/
|
|
40
40
|
export async function getLatestVersion() {
|
|
41
41
|
try {
|
|
42
|
-
|
|
42
|
+
// 使用 --silent 参数避免显示 npm 警告
|
|
43
|
+
const result = execSync('npm view fe-build-cli version --silent 2>nul', {
|
|
44
|
+
encoding: 'utf-8',
|
|
45
|
+
timeout: 10000,
|
|
46
|
+
stdio: ['pipe', 'pipe', 'pipe'] // 隐藏 stderr
|
|
47
|
+
});
|
|
43
48
|
return result.trim();
|
|
44
49
|
} catch (error) {
|
|
45
50
|
throw new Error('无法获取最新版本,请检查网络连接或 npm 源');
|