@cloudbase/cli 2.10.0-beta.0 → 2.11.0-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/auth/login.js +51 -65
- package/lib/auth/logout.js +3 -14
- package/lib/commands/account/login.js +136 -149
- package/lib/commands/account/logout.js +3 -14
- package/lib/commands/ag/base.js +203 -0
- package/lib/commands/ag/create.js +301 -0
- package/lib/commands/ag/debug/index.html +699 -0
- package/lib/commands/ag/delete.js +200 -0
- package/lib/commands/ag/deploy.js +185 -0
- package/lib/commands/ag/detail.js +113 -0
- package/lib/commands/ag/index.js +22 -0
- package/lib/commands/ag/list.js +155 -0
- package/lib/commands/ag/run.js +644 -0
- package/lib/commands/ai/index.js +76 -95
- package/lib/commands/cloudfunction/base.js +182 -203
- package/lib/commands/cloudrun/base.js +578 -603
- package/lib/commands/common.js +48 -63
- package/lib/commands/config/delete.js +16 -27
- package/lib/commands/config/get.js +13 -24
- package/lib/commands/config/list.js +16 -27
- package/lib/commands/config/set.js +33 -44
- package/lib/commands/db/base.js +221 -240
- package/lib/commands/env/base.js +36 -49
- package/lib/commands/env/domain.js +79 -94
- package/lib/commands/env/login.js +120 -135
- package/lib/commands/framework/index.js +32 -49
- package/lib/commands/fun/base.js +223 -244
- package/lib/commands/functions/alias/getRoute.js +33 -44
- package/lib/commands/functions/alias/setRoute.js +36 -47
- package/lib/commands/functions/code-download.js +43 -54
- package/lib/commands/functions/code-update.js +23 -34
- package/lib/commands/functions/concurrency/delete.js +11 -22
- package/lib/commands/functions/concurrency/list.js +20 -31
- package/lib/commands/functions/concurrency/set.js +13 -24
- package/lib/commands/functions/config-update.js +30 -41
- package/lib/commands/functions/copy.js +12 -23
- package/lib/commands/functions/delete.js +30 -41
- package/lib/commands/functions/deploy.js +184 -202
- package/lib/commands/functions/detail.js +23 -34
- package/lib/commands/functions/invoke.js +69 -75
- package/lib/commands/functions/layer/bind.js +102 -105
- package/lib/commands/functions/layer/create.js +29 -35
- package/lib/commands/functions/layer/delete.js +42 -48
- package/lib/commands/functions/layer/download.js +52 -58
- package/lib/commands/functions/layer/list.js +44 -50
- package/lib/commands/functions/layer/sort.js +39 -45
- package/lib/commands/functions/list.js +25 -36
- package/lib/commands/functions/log.js +65 -73
- package/lib/commands/functions/run.js +118 -116
- package/lib/commands/functions/trigger-create.js +32 -43
- package/lib/commands/functions/trigger-delete.js +50 -61
- package/lib/commands/functions/version/list.js +29 -40
- package/lib/commands/functions/version/publish.js +11 -22
- package/lib/commands/gateway/create.js +50 -61
- package/lib/commands/gateway/delete.js +38 -49
- package/lib/commands/gateway/domain.js +65 -80
- package/lib/commands/gateway/list.js +31 -42
- package/lib/commands/gateway/switch.js +48 -61
- package/lib/commands/helpers/init.js +226 -249
- package/lib/commands/helpers/new.js +35 -46
- package/lib/commands/helpers/open.js +22 -33
- package/lib/commands/hosting/hosting.js +157 -178
- package/lib/commands/index.js +1 -0
- package/lib/commands/lowcode/app.js +114 -144
- package/lib/commands/lowcode/comps.js +136 -127
- package/lib/commands/lowcode/utils.js +11 -22
- package/lib/commands/pull/pull.js +33 -46
- package/lib/commands/run/delete.js +35 -46
- package/lib/commands/run/image/delete.js +32 -39
- package/lib/commands/run/image/download.js +26 -33
- package/lib/commands/run/image/list.js +41 -48
- package/lib/commands/run/image/upload.js +26 -33
- package/lib/commands/run/list.js +32 -43
- package/lib/commands/run/service/config.js +17 -28
- package/lib/commands/run/service/deploy.js +15 -26
- package/lib/commands/run/service/list.js +48 -59
- package/lib/commands/run/service/update.js +7 -18
- package/lib/commands/run/standalonegateway/create.js +35 -42
- package/lib/commands/run/standalonegateway/destroy.js +23 -30
- package/lib/commands/run/standalonegateway/list.js +19 -26
- package/lib/commands/run/standalonegateway/package.js +31 -38
- package/lib/commands/run/standalonegateway/turn.js +27 -34
- package/lib/commands/run/version/create.js +198 -205
- package/lib/commands/run/version/delete.js +31 -38
- package/lib/commands/run/version/list.js +42 -49
- package/lib/commands/run/version/modify.js +27 -34
- package/lib/commands/run/version/update.js +201 -208
- package/lib/commands/runf/base.js +216 -237
- package/lib/commands/self-update.js +59 -72
- package/lib/commands/smart.js +66 -79
- package/lib/commands/storage/storage.js +192 -219
- package/lib/commands/third/thirdAttach.js +16 -27
- package/lib/commands/utils.js +119 -149
- package/lib/db/index.js +48 -67
- package/lib/decorators/captureError.js +10 -21
- package/lib/decorators/guard.js +11 -22
- package/lib/decorators/injectParams.js +29 -40
- package/lib/decorators/params/common.js +5 -2
- package/lib/decorators/params/index.js +3 -12
- package/lib/env/domain.js +13 -28
- package/lib/env/index.js +25 -44
- package/lib/env/login.js +30 -45
- package/lib/function/alias.js +31 -44
- package/lib/function/base.js +187 -215
- package/lib/function/code.js +8 -19
- package/lib/function/concurrency.js +43 -58
- package/lib/function/create.js +43 -53
- package/lib/function/delete.js +22 -35
- package/lib/function/layer/attach.js +33 -46
- package/lib/function/layer/create.js +34 -45
- package/lib/function/layer/delete.js +5 -16
- package/lib/function/layer/download.js +11 -22
- package/lib/function/layer/list.js +12 -25
- package/lib/function/layer/sort.js +6 -17
- package/lib/function/trigger.js +65 -82
- package/lib/function/update.js +24 -32
- package/lib/function/version.js +29 -42
- package/lib/function/vpc.js +12 -25
- package/lib/gateway/index.js +77 -104
- package/lib/hosting.js +157 -188
- package/lib/run/delete.js +3 -12
- package/lib/run/image/build.js +6 -15
- package/lib/run/image/delete.js +3 -12
- package/lib/run/image/info.js +3 -12
- package/lib/run/image/list.js +6 -15
- package/lib/run/list.js +19 -30
- package/lib/run/repo.js +6 -15
- package/lib/run/service/common.js +160 -173
- package/lib/run/service/config.js +44 -57
- package/lib/run/service/deployPackage.js +33 -44
- package/lib/run/service/list.js +8 -14
- package/lib/run/service/showLogs.js +69 -90
- package/lib/run/service/update.js +50 -63
- package/lib/run/standalonegateway/create.js +3 -12
- package/lib/run/standalonegateway/destroy.js +3 -12
- package/lib/run/standalonegateway/list.js +3 -12
- package/lib/run/standalonegateway/package/list.js +3 -12
- package/lib/run/standalonegateway/turn/off.js +3 -12
- package/lib/run/standalonegateway/turn/on.js +3 -12
- package/lib/run/version/create.js +41 -31
- package/lib/run/version/delete.js +3 -12
- package/lib/run/version/list.js +3 -12
- package/lib/run/version/modify.js +3 -12
- package/lib/run/version/repo.js +6 -15
- package/lib/run/version/update.js +37 -26
- package/lib/storage.js +62 -93
- package/lib/third/index.js +6 -17
- package/lib/utils/ai/banner.js +49 -60
- package/lib/utils/ai/claudeWindows.js +2 -2
- package/lib/utils/ai/config.js +169 -206
- package/lib/utils/ai/ensureFiles.js +6 -17
- package/lib/utils/ai/env.js +16 -27
- package/lib/utils/ai/envLocalManager.js +35 -52
- package/lib/utils/ai/router.js +927 -1005
- package/lib/utils/ai/setup.js +527 -563
- package/lib/utils/auth.js +3 -14
- package/lib/utils/checkTcbrEnv.js +20 -31
- package/lib/utils/cli-table.js +6 -1
- package/lib/utils/config.js +4 -13
- package/lib/utils/dts.js +98 -113
- package/lib/utils/env.js +154 -175
- package/lib/utils/function-packer.js +29 -42
- package/lib/utils/log.js +10 -21
- package/lib/utils/mcp-config-modifier.js +105 -120
- package/lib/utils/net/cloud-api-request.js +15 -23
- package/lib/utils/net/credential.js +26 -39
- package/lib/utils/net/http-request.js +63 -80
- package/lib/utils/net/manager-service.js +22 -35
- package/lib/utils/notice.js +16 -27
- package/lib/utils/output/loading.js +3 -12
- package/lib/utils/parallel.js +32 -43
- package/lib/utils/platform/mac.js +4 -15
- package/lib/utils/platform/port.js +4 -15
- package/lib/utils/prompt/select.js +6 -15
- package/lib/utils/report.js +28 -33
- package/lib/utils/reporter/agree.js +11 -22
- package/lib/utils/reporter/download.js +17 -28
- package/lib/utils/reporter/usage.js +12 -23
- package/lib/utils/store/auth.js +17 -30
- package/lib/utils/store/config.js +11 -25
- package/lib/utils/store/db.js +17 -36
- package/lib/utils/tcbrApi/callTcbrApi.js +19 -28
- package/lib/utils/template-manager.js +215 -242
- package/lib/utils/template.js +81 -96
- package/lib/utils/tools/common.js +45 -56
- package/lib/utils/tools/time.js +5 -16
- package/lib/utils/url.js +10 -4
- package/package.json +2 -2
- package/specs/ag-command/design.md +421 -0
- package/specs/ag-command/doc.md +204 -0
- package/specs/ag-command/requirements.md +173 -0
- package/specs/ag-command/summary.md +174 -0
- package/specs/ag-command/tasks.md +197 -0
- package/specs/ag-command/usage-guide.md +420 -0
- package/tsconfig.json +1 -1
- package/types/commands/ag/base.d.ts +44 -0
- package/types/commands/ag/create.d.ts +25 -0
- package/types/commands/ag/delete.d.ts +32 -0
- package/types/commands/ag/deploy.d.ts +31 -0
- package/types/commands/ag/detail.d.ts +28 -0
- package/types/commands/ag/index.d.ts +6 -0
- package/types/commands/ag/list.d.ts +35 -0
- package/types/commands/ag/run.d.ts +52 -0
- package/types/commands/cloudrun/base.d.ts +10 -0
- package/types/commands/index.d.ts +1 -0
package/lib/run/service/list.js
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.listService = void 0;
|
|
13
4
|
const utils_1 = require("../../utils");
|
|
14
5
|
const tcbService = utils_1.CloudApiService.getInstance('tcb');
|
|
15
|
-
const listService = (options) =>
|
|
16
|
-
const { data: { ServerList: serverList } } =
|
|
6
|
+
const listService = async (options) => {
|
|
7
|
+
const { data: { ServerList: serverList } } = await (0, utils_1.callTcbrApi)('DescribeCloudRunServers', {
|
|
17
8
|
EnvId: options.envId,
|
|
18
9
|
});
|
|
19
|
-
const { CloudBaseRunServerSet: serverSet } =
|
|
10
|
+
const { CloudBaseRunServerSet: serverSet } = await tcbService.request('DescribeCloudBaseRunServers', {
|
|
20
11
|
EnvId: options.envId,
|
|
21
12
|
Offset: 0,
|
|
22
13
|
Limit: options.limit || 100
|
|
@@ -24,8 +15,11 @@ const listService = (options) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
24
15
|
if (!serverList.length)
|
|
25
16
|
return [];
|
|
26
17
|
const serverInfo = serverList.map(serverItem => {
|
|
27
|
-
return
|
|
18
|
+
return {
|
|
19
|
+
...serverItem,
|
|
20
|
+
CreatedTime: serverSet.find((item) => item.ServerName === serverItem.ServerName).CreatedTime
|
|
21
|
+
};
|
|
28
22
|
});
|
|
29
23
|
return serverInfo;
|
|
30
|
-
}
|
|
24
|
+
};
|
|
31
25
|
exports.listService = listService;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -16,102 +7,90 @@ exports.getLogs = exports.getBuildStatus = void 0;
|
|
|
16
7
|
const utils_1 = require("../../utils");
|
|
17
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
18
9
|
const i18n_1 = require("../../i18n");
|
|
19
|
-
function getBuildStatus(envId, serviceName) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (deployRes === null || deployRes === void 0 ? void 0 : deployRes.DeployRecords) {
|
|
26
|
-
|
|
27
|
-
return Promise.resolve('pending');
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
return Promise.resolve('completed');
|
|
31
|
-
}
|
|
10
|
+
async function getBuildStatus(envId, serviceName) {
|
|
11
|
+
const { data: deployRes } = await (0, utils_1.callTcbrApi)('DescribeCloudRunDeployRecord', {
|
|
12
|
+
EnvId: envId,
|
|
13
|
+
ServerName: serviceName,
|
|
14
|
+
});
|
|
15
|
+
if (deployRes === null || deployRes === void 0 ? void 0 : deployRes.DeployRecords) {
|
|
16
|
+
if ((deployRes === null || deployRes === void 0 ? void 0 : deployRes.DeployRecords[0].Status) === "deploying") {
|
|
17
|
+
return Promise.resolve('pending');
|
|
32
18
|
}
|
|
33
19
|
else {
|
|
34
|
-
return Promise.resolve('
|
|
20
|
+
return Promise.resolve('completed');
|
|
35
21
|
}
|
|
36
|
-
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return Promise.resolve('pending');
|
|
25
|
+
}
|
|
37
26
|
}
|
|
38
27
|
exports.getBuildStatus = getBuildStatus;
|
|
39
|
-
function getBuildId(envId, serviceName) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (deployRes
|
|
46
|
-
|
|
47
|
-
return Promise.resolve(deployRes.DeployRecords[0].BuildId);
|
|
48
|
-
}
|
|
28
|
+
async function getBuildId(envId, serviceName) {
|
|
29
|
+
const { data: deployRes } = await (0, utils_1.callTcbrApi)('DescribeCloudRunDeployRecord', {
|
|
30
|
+
EnvId: envId,
|
|
31
|
+
ServerName: serviceName,
|
|
32
|
+
});
|
|
33
|
+
if (deployRes === null || deployRes === void 0 ? void 0 : deployRes.DeployRecords) {
|
|
34
|
+
if (deployRes.DeployRecords[0].Status !== 'deploying') {
|
|
35
|
+
return Promise.resolve(deployRes.DeployRecords[0].BuildId);
|
|
49
36
|
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async function getRunId(envId, serviceName) {
|
|
40
|
+
return new Promise((resolve) => {
|
|
41
|
+
const timer = setInterval(async () => {
|
|
42
|
+
const { data: deployRes } = await (0, utils_1.callTcbrApi)('DescribeCloudRunDeployRecord', {
|
|
43
|
+
EnvId: envId,
|
|
44
|
+
ServerName: serviceName,
|
|
45
|
+
});
|
|
46
|
+
if (deployRes === null || deployRes === void 0 ? void 0 : deployRes.DeployRecords) {
|
|
47
|
+
clearInterval(timer);
|
|
48
|
+
resolve(deployRes.DeployRecords[0].RunId);
|
|
49
|
+
}
|
|
50
|
+
}, 3000);
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
async function showProcessLogs(envId, runId, serviceName) {
|
|
54
|
+
return new Promise(resolve => {
|
|
55
|
+
const timer = setInterval(async () => {
|
|
56
|
+
if (await getBuildStatus(envId, serviceName) === 'completed') {
|
|
57
|
+
clearInterval(timer);
|
|
58
|
+
resolve();
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
const { data: processLogs } = await (0, utils_1.callTcbrApi)('DescribeCloudRunProcessLog', {
|
|
57
62
|
EnvId: envId,
|
|
58
|
-
|
|
63
|
+
RunId: runId,
|
|
59
64
|
});
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
resolve(deployRes.DeployRecords[0].RunId);
|
|
63
|
-
}
|
|
64
|
-
}), 3000);
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
function showProcessLogs(envId, runId, serviceName) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
return new Promise(resolve => {
|
|
71
|
-
const timer = setInterval(() => __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
if ((yield getBuildStatus(envId, serviceName)) === 'completed') {
|
|
73
|
-
clearInterval(timer);
|
|
74
|
-
resolve();
|
|
65
|
+
if (processLogs === null || processLogs === void 0 ? void 0 : processLogs.Logs) {
|
|
66
|
+
console.log(processLogs === null || processLogs === void 0 ? void 0 : processLogs.Logs.join('\n'));
|
|
75
67
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
EnvId: envId,
|
|
79
|
-
RunId: runId,
|
|
80
|
-
});
|
|
81
|
-
if (processLogs === null || processLogs === void 0 ? void 0 : processLogs.Logs) {
|
|
82
|
-
console.log(processLogs === null || processLogs === void 0 ? void 0 : processLogs.Logs.join('\n'));
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}), 5000);
|
|
86
|
-
});
|
|
68
|
+
}
|
|
69
|
+
}, 5000);
|
|
87
70
|
});
|
|
88
71
|
}
|
|
89
|
-
function showBuildLogs(envId, serviceName, serverVersion = '', offset = 0) {
|
|
72
|
+
async function showBuildLogs(envId, serviceName, serverVersion = '', offset = 0) {
|
|
90
73
|
var _a, _b;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Offset: offset || 0,
|
|
99
|
-
});
|
|
100
|
-
if ((_a = data === null || data === void 0 ? void 0 : data.Log) === null || _a === void 0 ? void 0 : _a.Text) {
|
|
101
|
-
console.log((_b = data === null || data === void 0 ? void 0 : data.Log) === null || _b === void 0 ? void 0 : _b.Text);
|
|
102
|
-
}
|
|
103
|
-
return Promise.resolve();
|
|
74
|
+
const buildId = await getBuildId(envId, serviceName);
|
|
75
|
+
const { data } = await (0, utils_1.callTcbrApi)('DescribeCloudRunBuildLog', {
|
|
76
|
+
EnvId: envId,
|
|
77
|
+
BuildId: buildId,
|
|
78
|
+
ServerName: serviceName,
|
|
79
|
+
ServerVersion: serverVersion || '',
|
|
80
|
+
Offset: offset || 0,
|
|
104
81
|
});
|
|
82
|
+
if ((_a = data === null || data === void 0 ? void 0 : data.Log) === null || _a === void 0 ? void 0 : _a.Text) {
|
|
83
|
+
console.log((_b = data === null || data === void 0 ? void 0 : data.Log) === null || _b === void 0 ? void 0 : _b.Text);
|
|
84
|
+
}
|
|
85
|
+
return Promise.resolve();
|
|
105
86
|
}
|
|
106
|
-
function getLogs(options) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
console.log(chalk_1.default.blue(`============ ${(0, i18n_1.t)('日志结束')} ===============`));
|
|
115
|
-
});
|
|
87
|
+
async function getLogs(options) {
|
|
88
|
+
const runId = await getRunId(options.envId, options.serviceName);
|
|
89
|
+
console.log(chalk_1.default.blue(`============ ${(0, i18n_1.t)('日志开始')} ===============`));
|
|
90
|
+
await showProcessLogs(options.envId, runId, options.serviceName);
|
|
91
|
+
if (await getBuildStatus(options.envId, options.serviceName) === 'completed') {
|
|
92
|
+
await showBuildLogs(options.envId, options.serviceName);
|
|
93
|
+
}
|
|
94
|
+
console.log(chalk_1.default.blue(`============ ${(0, i18n_1.t)('日志结束')} ===============`));
|
|
116
95
|
}
|
|
117
96
|
exports.getLogs = getLogs;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -20,65 +11,61 @@ const utils_1 = require("../../utils");
|
|
|
20
11
|
const common_1 = require("./common");
|
|
21
12
|
const showLogs_1 = require("./showLogs");
|
|
22
13
|
const i18n_1 = require("../../i18n");
|
|
23
|
-
function updateCloudRunServer(serviceConfigOptions) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
});
|
|
14
|
+
async function updateCloudRunServer(serviceConfigOptions) {
|
|
15
|
+
try {
|
|
16
|
+
const res = await (0, utils_1.callTcbrApi)('UpdateCloudRunServer', serviceConfigOptions);
|
|
17
|
+
return res;
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
console.log(error);
|
|
21
|
+
}
|
|
33
22
|
}
|
|
34
23
|
exports.updateCloudRunServer = updateCloudRunServer;
|
|
35
|
-
function updateTcbrService(options) {
|
|
24
|
+
async function updateTcbrService(options) {
|
|
36
25
|
var _a;
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
const { data: serviceDetail } = await (0, __1.describeCloudRunServerDetail)({
|
|
27
|
+
envId: options.envId,
|
|
28
|
+
serviceName: options.serviceName
|
|
29
|
+
});
|
|
30
|
+
if (serviceDetail === undefined) {
|
|
31
|
+
throw new toolbox_1.CloudBaseError((0, i18n_1.t)('当前服务不存在,请前往控制台 {{link}} 创建服务', { link: (0, utils_1.genClickableLink)(`${utils_1.EUrl.Console}/tcbr`) }));
|
|
32
|
+
}
|
|
33
|
+
const status = await (0, showLogs_1.getBuildStatus)(options.envId, options.serviceName);
|
|
34
|
+
if (status === 'pending') {
|
|
35
|
+
throw new toolbox_1.CloudBaseError((0, i18n_1.t)('服务正在更新部署,请稍后再试,或查看实时部署日志'));
|
|
36
|
+
}
|
|
37
|
+
const previousServerConfig = serviceDetail === null || serviceDetail === void 0 ? void 0 : serviceDetail.ServerConfig;
|
|
38
|
+
const newServiceOptions = await (0, common_1.tcbrServiceOptions)(options, true, true, previousServerConfig);
|
|
39
|
+
if (!options.noConfirm) {
|
|
40
|
+
const { confirm } = await inquirer_1.default.prompt([
|
|
41
|
+
{
|
|
42
|
+
type: 'confirm',
|
|
43
|
+
name: 'confirm',
|
|
44
|
+
message: (0, i18n_1.t)('确定要更新服务吗?'),
|
|
45
|
+
}
|
|
46
|
+
]);
|
|
47
|
+
if (!confirm) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const updateRes = await updateCloudRunServer(newServiceOptions);
|
|
52
|
+
if (updateRes instanceof Error) {
|
|
53
|
+
throw new toolbox_1.CloudBaseError((0, i18n_1.t)('当前已有部署发布任务运行中,请稍后再试,或查看实时部署日志'));
|
|
54
|
+
}
|
|
55
|
+
const taskId = (_a = updateRes.data) === null || _a === void 0 ? void 0 : _a.TaskId;
|
|
56
|
+
if (options.json) {
|
|
57
|
+
console.log(JSON.stringify(updateRes, null, 2));
|
|
58
|
+
}
|
|
59
|
+
if (process.argv.includes('--verbose')) {
|
|
60
|
+
await (0, showLogs_1.getLogs)({
|
|
39
61
|
envId: options.envId,
|
|
62
|
+
taskId,
|
|
40
63
|
serviceName: options.serviceName
|
|
41
64
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
throw new toolbox_1.CloudBaseError((0, i18n_1.t)('服务正在更新部署,请稍后再试,或查看实时部署日志'));
|
|
48
|
-
}
|
|
49
|
-
const previousServerConfig = serviceDetail === null || serviceDetail === void 0 ? void 0 : serviceDetail.ServerConfig;
|
|
50
|
-
const newServiceOptions = yield (0, common_1.tcbrServiceOptions)(options, true, true, previousServerConfig);
|
|
51
|
-
if (!options.noConfirm) {
|
|
52
|
-
const { confirm } = yield inquirer_1.default.prompt([
|
|
53
|
-
{
|
|
54
|
-
type: 'confirm',
|
|
55
|
-
name: 'confirm',
|
|
56
|
-
message: (0, i18n_1.t)('确定要更新服务吗?'),
|
|
57
|
-
}
|
|
58
|
-
]);
|
|
59
|
-
if (!confirm) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
const updateRes = yield updateCloudRunServer(newServiceOptions);
|
|
64
|
-
if (updateRes instanceof Error) {
|
|
65
|
-
throw new toolbox_1.CloudBaseError((0, i18n_1.t)('当前已有部署发布任务运行中,请稍后再试,或查看实时部署日志'));
|
|
66
|
-
}
|
|
67
|
-
const taskId = (_a = updateRes.data) === null || _a === void 0 ? void 0 : _a.TaskId;
|
|
68
|
-
if (options.json) {
|
|
69
|
-
console.log(JSON.stringify(updateRes, null, 2));
|
|
70
|
-
}
|
|
71
|
-
if (process.argv.includes('--verbose')) {
|
|
72
|
-
yield (0, showLogs_1.getLogs)({
|
|
73
|
-
envId: options.envId,
|
|
74
|
-
taskId,
|
|
75
|
-
serviceName: options.serviceName
|
|
76
|
-
});
|
|
77
|
-
console.log((0, i18n_1.t)('本次任务的 TaskID: {{taskId}}', { taskId }));
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
toolbox_1.logger.success((0, i18n_1.t)('更新服务成功, 本次任务的 TaskID: {{taskId}}', { taskId }));
|
|
81
|
-
}
|
|
82
|
-
});
|
|
65
|
+
console.log((0, i18n_1.t)('本次任务的 TaskID: {{taskId}}', { taskId }));
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
toolbox_1.logger.success((0, i18n_1.t)('更新服务成功, 本次任务的 TaskID: {{taskId}}', { taskId }));
|
|
69
|
+
}
|
|
83
70
|
}
|
|
84
71
|
exports.updateTcbrService = updateTcbrService;
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.createStandaloneGateway = void 0;
|
|
13
4
|
const error_1 = require("../../error");
|
|
14
5
|
const utils_1 = require("../../utils");
|
|
15
6
|
const tcbService = utils_1.CloudApiService.getInstance('tcb');
|
|
16
|
-
const createStandaloneGateway = (options) =>
|
|
17
|
-
const res =
|
|
7
|
+
const createStandaloneGateway = async (options) => {
|
|
8
|
+
const res = await tcbService.request('CreateStandaloneGateway', {
|
|
18
9
|
EnvId: options.envId,
|
|
19
10
|
GatewayAlias: options.gatewayAlias,
|
|
20
11
|
GatewayDesc: options.gatewayDesc,
|
|
@@ -28,5 +19,5 @@ const createStandaloneGateway = (options) => __awaiter(void 0, void 0, void 0, f
|
|
|
28
19
|
throw new error_1.CloudBaseError(Message);
|
|
29
20
|
}
|
|
30
21
|
return GatewayName;
|
|
31
|
-
}
|
|
22
|
+
};
|
|
32
23
|
exports.createStandaloneGateway = createStandaloneGateway;
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.destroyStandalonegateway = void 0;
|
|
13
4
|
const error_1 = require("../../error");
|
|
14
5
|
const utils_1 = require("../../utils");
|
|
15
6
|
const tcbService = utils_1.CloudApiService.getInstance('tcb');
|
|
16
|
-
const destroyStandalonegateway = (options) =>
|
|
17
|
-
const res =
|
|
7
|
+
const destroyStandalonegateway = async (options) => {
|
|
8
|
+
const res = await tcbService.request('DestroyStandaloneGateway', {
|
|
18
9
|
EnvId: options.envId,
|
|
19
10
|
IsForce: true,
|
|
20
11
|
GatewayName: options.gatewayName
|
|
@@ -24,5 +15,5 @@ const destroyStandalonegateway = (options) => __awaiter(void 0, void 0, void 0,
|
|
|
24
15
|
throw new error_1.CloudBaseError(JSON.stringify(Message));
|
|
25
16
|
}
|
|
26
17
|
return res;
|
|
27
|
-
}
|
|
18
|
+
};
|
|
28
19
|
exports.destroyStandalonegateway = destroyStandalonegateway;
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.listStandalonegateway = void 0;
|
|
13
4
|
const error_1 = require("../../error");
|
|
14
5
|
const utils_1 = require("../../utils");
|
|
15
6
|
const i18n_1 = require("../../i18n");
|
|
16
7
|
const tcbService = utils_1.CloudApiService.getInstance('tcb');
|
|
17
|
-
const listStandalonegateway = (options) =>
|
|
18
|
-
const res =
|
|
8
|
+
const listStandalonegateway = async (options) => {
|
|
9
|
+
const res = await tcbService.request('DescribeStandaloneGateway', {
|
|
19
10
|
EnvId: options.envId,
|
|
20
11
|
GatewayName: options.gatewayName,
|
|
21
12
|
GatewayAlias: options.gatewayAlias
|
|
@@ -37,7 +28,7 @@ const listStandalonegateway = (options) => __awaiter(void 0, void 0, void 0, fun
|
|
|
37
28
|
const { Error: { Message } } = res;
|
|
38
29
|
throw new error_1.CloudBaseError(Message);
|
|
39
30
|
}
|
|
40
|
-
}
|
|
31
|
+
};
|
|
41
32
|
exports.listStandalonegateway = listStandalonegateway;
|
|
42
33
|
const beautifySubnetList = (list) => list.join('\n');
|
|
43
34
|
const beautifyServiceList = (list) => list
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.listPackageStandalonegateway = void 0;
|
|
13
4
|
const error_1 = require("../../../error");
|
|
14
5
|
const utils_1 = require("../../../utils");
|
|
15
6
|
const tcbService = utils_1.CloudApiService.getInstance('tcb');
|
|
16
|
-
const listPackageStandalonegateway = (options) =>
|
|
17
|
-
const res =
|
|
7
|
+
const listPackageStandalonegateway = async (options) => {
|
|
8
|
+
const res = await tcbService.request('DescribeStandaloneGatewayPackage', {
|
|
18
9
|
EnvId: options.envId,
|
|
19
10
|
PackageVersion: options.packageVersion
|
|
20
11
|
});
|
|
@@ -28,5 +19,5 @@ const listPackageStandalonegateway = (options) => __awaiter(void 0, void 0, void
|
|
|
28
19
|
item['Mem'],
|
|
29
20
|
item['PackageVersion']
|
|
30
21
|
]);
|
|
31
|
-
}
|
|
22
|
+
};
|
|
32
23
|
exports.listPackageStandalonegateway = listPackageStandalonegateway;
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.turnOffStandalonegateway = void 0;
|
|
13
4
|
const error_1 = require("../../../error");
|
|
14
5
|
const utils_1 = require("../../../utils");
|
|
15
6
|
const tcbService = utils_1.CloudApiService.getInstance('tcb');
|
|
16
|
-
const turnOffStandalonegateway = (options) =>
|
|
17
|
-
const res =
|
|
7
|
+
const turnOffStandalonegateway = async (options) => {
|
|
8
|
+
const res = await tcbService.request('TurnOffStandaloneGateway', {
|
|
18
9
|
EnvId: options.envId,
|
|
19
10
|
GatewayName: options.gatewayName,
|
|
20
11
|
ServiceNameList: options.serviceList
|
|
@@ -24,5 +15,5 @@ const turnOffStandalonegateway = (options) => __awaiter(void 0, void 0, void 0,
|
|
|
24
15
|
throw new error_1.CloudBaseError(JSON.stringify(Message));
|
|
25
16
|
}
|
|
26
17
|
return res;
|
|
27
|
-
}
|
|
18
|
+
};
|
|
28
19
|
exports.turnOffStandalonegateway = turnOffStandalonegateway;
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.turnOnStandalonegateway = void 0;
|
|
13
4
|
const error_1 = require("../../../error");
|
|
14
5
|
const utils_1 = require("../../../utils");
|
|
15
6
|
const tcbService = utils_1.CloudApiService.getInstance('tcb');
|
|
16
|
-
const turnOnStandalonegateway = (options) =>
|
|
17
|
-
const res =
|
|
7
|
+
const turnOnStandalonegateway = async (options) => {
|
|
8
|
+
const res = await tcbService.request('TurnOnStandaloneGateway', {
|
|
18
9
|
EnvId: options.envId,
|
|
19
10
|
GatewayName: options.gatewayName,
|
|
20
11
|
ServiceNameList: options.serviceList
|
|
@@ -24,5 +15,5 @@ const turnOnStandalonegateway = (options) => __awaiter(void 0, void 0, void 0, f
|
|
|
24
15
|
throw new error_1.CloudBaseError(JSON.stringify(Message));
|
|
25
16
|
}
|
|
26
17
|
return res;
|
|
27
|
-
}
|
|
18
|
+
};
|
|
28
19
|
exports.turnOnStandalonegateway = turnOnStandalonegateway;
|
|
@@ -1,50 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.basicOperate = exports.logCreate = exports.createVersion = void 0;
|
|
13
4
|
const utils_1 = require("../../utils");
|
|
14
5
|
const tcbService = utils_1.CloudApiService.getInstance('tcb');
|
|
15
|
-
const createVersion = (options) =>
|
|
16
|
-
const { Result, RunId } =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
: options.
|
|
6
|
+
const createVersion = async (options) => {
|
|
7
|
+
const { Result, RunId } = await tcbService.request('CreateCloudBaseRunServerVersion', {
|
|
8
|
+
EnvId: options.envId,
|
|
9
|
+
ServerName: options.serverName,
|
|
10
|
+
ContainerPort: options.containerPort,
|
|
11
|
+
UploadType: options.uploadType,
|
|
12
|
+
FlowRatio: options.flowRatio,
|
|
13
|
+
VersionRemark: options.versionRemark,
|
|
14
|
+
EnableUnion: options.enableUnion,
|
|
15
|
+
Cpu: options.cpu,
|
|
16
|
+
Mem: options.mem,
|
|
17
|
+
MinNum: options.minNum,
|
|
18
|
+
MaxNum: options.maxNum,
|
|
19
|
+
PolicyType: options.policyType,
|
|
20
|
+
PolicyThreshold: options.policyThreshold,
|
|
21
|
+
...(options.uploadType !== 'image' ? { DockerfilePath: options.dockerfilePath } : {}),
|
|
22
|
+
CustomLogs: options.customLogs,
|
|
23
|
+
EnvParams: options.envParams,
|
|
24
|
+
InitialDelaySeconds: options.initialDelaySeconds,
|
|
25
|
+
...(options.uploadType === 'package'
|
|
23
26
|
? {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
: {
|
|
27
|
-
RepositoryType: options.repositoryType,
|
|
28
|
-
Branch: options.branch,
|
|
29
|
-
CodeDetail: options.codeDetail,
|
|
27
|
+
PackageName: options.packageName,
|
|
28
|
+
PackageVersion: options.packageVersion,
|
|
30
29
|
DockerfilePath: options.dockerfilePath
|
|
31
|
-
}
|
|
30
|
+
}
|
|
31
|
+
: options.uploadType === 'image'
|
|
32
|
+
? {
|
|
33
|
+
ImageInfo: options.imageInfo
|
|
34
|
+
}
|
|
35
|
+
: {
|
|
36
|
+
RepositoryType: options.repositoryType,
|
|
37
|
+
Branch: options.branch,
|
|
38
|
+
CodeDetail: options.codeDetail,
|
|
39
|
+
DockerfilePath: options.dockerfilePath
|
|
40
|
+
})
|
|
41
|
+
});
|
|
32
42
|
return { Result, RunId };
|
|
33
|
-
}
|
|
43
|
+
};
|
|
34
44
|
exports.createVersion = createVersion;
|
|
35
|
-
const logCreate = (options) =>
|
|
36
|
-
let { Logs } =
|
|
45
|
+
const logCreate = async (options) => {
|
|
46
|
+
let { Logs } = await tcbService.request('DescribeCloudBaseRunProcessLog', {
|
|
37
47
|
EnvId: options.envId,
|
|
38
48
|
RunId: options.runId
|
|
39
49
|
});
|
|
40
50
|
return Logs;
|
|
41
|
-
}
|
|
51
|
+
};
|
|
42
52
|
exports.logCreate = logCreate;
|
|
43
|
-
const basicOperate = (options) =>
|
|
44
|
-
let { Percent, ActionDetail: { Status } } =
|
|
53
|
+
const basicOperate = async (options) => {
|
|
54
|
+
let { Percent, ActionDetail: { Status } } = await tcbService.request('DescribeCloudBaseRunOperateBasic', {
|
|
45
55
|
EnvId: options.envId,
|
|
46
56
|
RunId: options.runId
|
|
47
57
|
});
|
|
48
58
|
return { Percent, Status };
|
|
49
|
-
}
|
|
59
|
+
};
|
|
50
60
|
exports.basicOperate = basicOperate;
|