@cloudbase/cli 2.8.0 → 2.8.1-beta.0
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.
|
Binary file
|
|
@@ -218,20 +218,13 @@ let FunctionDeploy = class FunctionDeploy extends common_1.Command {
|
|
|
218
218
|
codeSecret,
|
|
219
219
|
functionRootPath
|
|
220
220
|
});
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
yield this.waitForFunctionReady(envId, func.name, loading);
|
|
222
|
+
loading.succeed(`[${func.name}] 云函数配置更新中...`);
|
|
223
223
|
yield (0, function_2.updateFunctionConfig)({
|
|
224
224
|
envId,
|
|
225
225
|
functionName: func.name,
|
|
226
226
|
config: func
|
|
227
227
|
});
|
|
228
|
-
const config_text = '配置';
|
|
229
|
-
yield this.waitForFunctionReady(envId, func.name, loading, config_text);
|
|
230
|
-
yield (0, function_2.createFunctionTriggers)({
|
|
231
|
-
envId,
|
|
232
|
-
functionName: func.name,
|
|
233
|
-
triggers
|
|
234
|
-
});
|
|
235
228
|
loading.succeed(`[${func.name}] 云函数更新成功!`);
|
|
236
229
|
yield this.printSuccessTips(envId);
|
|
237
230
|
}
|
|
@@ -245,7 +238,7 @@ let FunctionDeploy = class FunctionDeploy extends common_1.Command {
|
|
|
245
238
|
throw e;
|
|
246
239
|
});
|
|
247
240
|
}
|
|
248
|
-
waitForFunctionReady(envId, functionName, loading,
|
|
241
|
+
waitForFunctionReady(envId, functionName, loading, timeoutMinutes = 5) {
|
|
249
242
|
return __awaiter(this, void 0, void 0, function* () {
|
|
250
243
|
const scfService = yield (0, function_2.getFunctionService)(envId);
|
|
251
244
|
const timeoutMs = timeoutMinutes * 60 * 1000;
|
|
@@ -261,11 +254,11 @@ let FunctionDeploy = class FunctionDeploy extends common_1.Command {
|
|
|
261
254
|
if ((functionInfo === null || functionInfo === void 0 ? void 0 : functionInfo.Status) === 'Active') {
|
|
262
255
|
clearTimeout(timeoutId);
|
|
263
256
|
clearInterval(intervalId);
|
|
264
|
-
loading.succeed(`[${functionName}]
|
|
257
|
+
loading.succeed(`[${functionName}] 云函数代码已更新!`);
|
|
265
258
|
resolve();
|
|
266
259
|
}
|
|
267
260
|
else {
|
|
268
|
-
loading.text = `正在更新[${functionName}]
|
|
261
|
+
loading.text = `正在更新[${functionName}] 云函数代码... 当前状态: ${(functionInfo === null || functionInfo === void 0 ? void 0 : functionInfo.Status) || '未知'}`;
|
|
269
262
|
}
|
|
270
263
|
}
|
|
271
264
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/cli",
|
|
3
|
-
"version": "2.8.0",
|
|
3
|
+
"version": "2.8.1-beta.0",
|
|
4
4
|
"description": "cli tool for cloudbase",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@cloudbase/functions-framework": "1.16.0",
|
|
39
39
|
"@cloudbase/iac-core": "0.0.3-alpha.11",
|
|
40
40
|
"@cloudbase/lowcode-cli": "^0.22.2",
|
|
41
|
-
"@cloudbase/manager-node": "4.
|
|
41
|
+
"@cloudbase/manager-node": "4.4.3",
|
|
42
42
|
"@cloudbase/toolbox": "^0.7.7",
|
|
43
43
|
"@dotenvx/dotenvx": "^1.48.3",
|
|
44
44
|
"address": "^1.1.2",
|
|
@@ -16,7 +16,7 @@ export declare class FunctionDeploy extends Command {
|
|
|
16
16
|
execute(ctx: any, params: any, log: Logger): Promise<void>;
|
|
17
17
|
deployAllFunction(options: any): Promise<void>;
|
|
18
18
|
handleDeployFail(e: CloudBaseError, options: ICreateFunctionOptions): Promise<void>;
|
|
19
|
-
waitForFunctionReady(envId: string, functionName: string, loading: any,
|
|
19
|
+
waitForFunctionReady(envId: string, functionName: string, loading: any, timeoutMinutes?: number): Promise<void>;
|
|
20
20
|
printSuccessTips(envId: string, log?: Logger): Promise<void>;
|
|
21
21
|
genApiGateway(envId: string, name: string): Promise<void>;
|
|
22
22
|
}
|