@lazycatcloud/lzc-cli 1.2.13 → 1.2.15
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/lib/app/lpk_devshell.js +2 -2
- package/lib/appstore/login.js +13 -5
- package/lib/appstore/publish.js +2 -0
- package/package.json +1 -1
package/lib/app/lpk_devshell.js
CHANGED
|
@@ -251,7 +251,7 @@ export class AppDevShell {
|
|
|
251
251
|
application: {
|
|
252
252
|
devshell: options["devshell"],
|
|
253
253
|
health_check: {
|
|
254
|
-
test_url: `app.${manifest["package"]}.lzcapp/__isdevshell`,
|
|
254
|
+
test_url: `http://app.${manifest["package"]}.lzcapp/__isdevshell`,
|
|
255
255
|
},
|
|
256
256
|
},
|
|
257
257
|
};
|
|
@@ -420,7 +420,7 @@ class DevShell {
|
|
|
420
420
|
// 检查rsync工具是否存在:提示用户
|
|
421
421
|
const rsyncExisted = commandExists.sync("rsync");
|
|
422
422
|
if (!rsyncExisted) {
|
|
423
|
-
|
|
423
|
+
logger.error("请检查 rsync 是否安装,路径是否正确!");
|
|
424
424
|
process.exit(1);
|
|
425
425
|
}
|
|
426
426
|
|
package/lib/appstore/login.js
CHANGED
|
@@ -83,6 +83,17 @@ async function askUserInfo() {
|
|
|
83
83
|
]);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
async function interactiveLogin() {
|
|
87
|
+
try {
|
|
88
|
+
let info = await askUserInfo();
|
|
89
|
+
await login(info.username, info.password);
|
|
90
|
+
} catch (e) {
|
|
91
|
+
logger.debug("login error: ", e);
|
|
92
|
+
logger.info("帐号或者密码错误,请重新输入!");
|
|
93
|
+
return interactiveLogin();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
86
97
|
export async function reLogin() {
|
|
87
98
|
let token = await isLogin();
|
|
88
99
|
if (token) {
|
|
@@ -100,9 +111,7 @@ export async function reLogin() {
|
|
|
100
111
|
return;
|
|
101
112
|
}
|
|
102
113
|
}
|
|
103
|
-
|
|
104
|
-
let info = await askUserInfo();
|
|
105
|
-
await login(info.username, info.password);
|
|
114
|
+
await interactiveLogin();
|
|
106
115
|
}
|
|
107
116
|
|
|
108
117
|
export async function autoLogin() {
|
|
@@ -113,8 +122,7 @@ export async function autoLogin() {
|
|
|
113
122
|
}
|
|
114
123
|
|
|
115
124
|
logger.debug("token错误,尝试自动登录");
|
|
116
|
-
|
|
117
|
-
await login(info.username, info.password);
|
|
125
|
+
await interactiveLogin();
|
|
118
126
|
}
|
|
119
127
|
|
|
120
128
|
export async function request(url, options = {}) {
|
package/lib/appstore/publish.js
CHANGED