@cloudbase/manager-node 4.4.6 → 4.4.7-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.
- package/lib/constant.js +6 -1
- package/lib/function/index.js +4 -1
- package/package.json +1 -1
- package/types/constant.d.ts +5 -0
- package/types/function/types.d.ts +4 -0
package/lib/constant.js
CHANGED
|
@@ -47,7 +47,12 @@ exports.SCF_STATUS = {
|
|
|
47
47
|
ACTIVE: 'Active',
|
|
48
48
|
CREATING: 'Creating',
|
|
49
49
|
UPDATING: 'Updating',
|
|
50
|
-
CREATE_FAILED: 'CreateFailed'
|
|
50
|
+
CREATE_FAILED: 'CreateFailed',
|
|
51
|
+
UPDATE_FAILED: 'UpdateFailed',
|
|
52
|
+
PUBLISHING: 'Publishing',
|
|
53
|
+
PUBLISH_FAILED: 'PublishFailed',
|
|
54
|
+
DELETING: 'Deleting',
|
|
55
|
+
DELETE_FAILED: 'DeleteFailed'
|
|
51
56
|
};
|
|
52
57
|
// 是否使用内网域名
|
|
53
58
|
exports.USE_INTERNAL_ENDPOINT = "USE_INTERNAL_ENDPOINT" in process.env;
|
package/lib/function/index.js
CHANGED
|
@@ -995,12 +995,15 @@ class FunctionService {
|
|
|
995
995
|
}, 300000);
|
|
996
996
|
ticker = setInterval(async () => {
|
|
997
997
|
try {
|
|
998
|
-
const { Status } = await this.getFunctionDetail(funcName, codeSecret);
|
|
998
|
+
const { Status, StatusDesc, StatusReasons } = await this.getFunctionDetail(funcName, codeSecret);
|
|
999
999
|
// 更新中
|
|
1000
1000
|
if (Status === constant_1.SCF_STATUS.CREATING || Status === constant_1.SCF_STATUS.UPDATING)
|
|
1001
1001
|
return;
|
|
1002
1002
|
// 创建失败
|
|
1003
1003
|
if (Status === constant_1.SCF_STATUS.CREATE_FAILED) {
|
|
1004
|
+
StatusDesc && console.log(`函数状态描述: ${StatusDesc}`);
|
|
1005
|
+
const errorDetails = StatusReasons.map(item => `[${item.ErrorCode}] ${item.ErrorMessage}`).join('\n');
|
|
1006
|
+
console.error(`函数创建失败信息: ${errorDetails}`);
|
|
1004
1007
|
throw new error_1.CloudBaseError('云函数创建失败');
|
|
1005
1008
|
}
|
|
1006
1009
|
// 函数状态正常
|
package/package.json
CHANGED
package/types/constant.d.ts
CHANGED
|
@@ -34,6 +34,11 @@ export declare const SCF_STATUS: {
|
|
|
34
34
|
CREATING: string;
|
|
35
35
|
UPDATING: string;
|
|
36
36
|
CREATE_FAILED: string;
|
|
37
|
+
UPDATE_FAILED: string;
|
|
38
|
+
PUBLISHING: string;
|
|
39
|
+
PUBLISH_FAILED: string;
|
|
40
|
+
DELETING: string;
|
|
41
|
+
DELETE_FAILED: string;
|
|
37
42
|
};
|
|
38
43
|
export declare const USE_INTERNAL_ENDPOINT: boolean;
|
|
39
44
|
export declare const enum COS_ENDPOINT {
|