@cloudbase/cli 2.9.8 → 2.9.10-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/bin/cloudbase.js +2 -1
- package/bin/tcb.js +35 -28
- package/cloudbase-cli-2.7.8.tgz +0 -0
- package/lib/auth/login.js +21 -13
- package/lib/commands/account/login.js +43 -42
- package/lib/commands/account/logout.js +3 -2
- package/lib/commands/ai/index.js +13 -12
- package/lib/commands/cloudfunction/base.js +24 -26
- package/lib/commands/cloudrun/base.js +87 -96
- package/lib/commands/common.js +11 -10
- package/lib/commands/config/delete.js +72 -0
- package/lib/commands/config/get.js +69 -0
- package/lib/commands/config/index.js +21 -0
- package/lib/commands/config/interface.js +24 -0
- package/lib/commands/config/list.js +72 -0
- package/lib/commands/config/set.js +89 -0
- package/lib/commands/db/base.js +33 -32
- package/lib/commands/env/base.js +12 -11
- package/lib/commands/env/domain.js +24 -23
- package/lib/commands/env/login.js +31 -30
- package/lib/commands/fun/base.js +37 -36
- package/lib/commands/functions/alias/getRoute.js +5 -4
- package/lib/commands/functions/alias/setRoute.js +7 -6
- package/lib/commands/functions/code-download.js +15 -11
- package/lib/commands/functions/code-update.js +8 -7
- package/lib/commands/functions/concurrency/delete.js +5 -4
- package/lib/commands/functions/concurrency/list.js +6 -5
- package/lib/commands/functions/concurrency/set.js +5 -4
- package/lib/commands/functions/config-update.js +8 -7
- package/lib/commands/functions/copy.js +7 -6
- package/lib/commands/functions/delete.js +8 -7
- package/lib/commands/functions/deploy.js +35 -34
- package/lib/commands/functions/detail.js +32 -31
- package/lib/commands/functions/invoke.js +16 -15
- package/lib/commands/functions/layer/bind.js +26 -25
- package/lib/commands/functions/layer/common.js +2 -1
- package/lib/commands/functions/layer/create.js +7 -6
- package/lib/commands/functions/layer/delete.js +9 -8
- package/lib/commands/functions/layer/download.js +10 -9
- package/lib/commands/functions/layer/list.js +10 -9
- package/lib/commands/functions/layer/sort.js +9 -8
- package/lib/commands/functions/list.js +9 -8
- package/lib/commands/functions/log.js +28 -27
- package/lib/commands/functions/run.js +21 -20
- package/lib/commands/functions/trigger-create.js +9 -8
- package/lib/commands/functions/trigger-delete.js +10 -9
- package/lib/commands/functions/version/list.js +9 -8
- package/lib/commands/functions/version/publish.js +5 -4
- package/lib/commands/gateway/create.js +14 -13
- package/lib/commands/gateway/delete.js +10 -9
- package/lib/commands/gateway/domain.js +25 -24
- package/lib/commands/gateway/list.js +11 -10
- package/lib/commands/gateway/switch.js +22 -19
- package/lib/commands/helpers/init.js +38 -37
- package/lib/commands/helpers/new.js +7 -6
- package/lib/commands/helpers/open.js +7 -6
- package/lib/commands/hosting/hosting.js +45 -44
- package/lib/commands/index.js +1 -0
- package/lib/commands/pull/pull.js +12 -11
- package/lib/commands/run/delete.js +16 -15
- package/lib/commands/run/image/common.js +2 -1
- package/lib/commands/run/image/delete.js +10 -9
- package/lib/commands/run/image/download.js +8 -7
- package/lib/commands/run/image/list.js +11 -10
- package/lib/commands/run/image/upload.js +9 -8
- package/lib/commands/run/list.js +10 -9
- package/lib/commands/run/service/config.js +13 -12
- package/lib/commands/run/service/deploy.js +24 -23
- package/lib/commands/run/service/list.js +10 -9
- package/lib/commands/run/service/update.js +22 -21
- package/lib/commands/run/standalonegateway/common.js +2 -1
- package/lib/commands/run/standalonegateway/create.js +14 -13
- package/lib/commands/run/standalonegateway/destroy.js +9 -8
- package/lib/commands/run/standalonegateway/list.js +7 -6
- package/lib/commands/run/standalonegateway/package.js +7 -6
- package/lib/commands/run/standalonegateway/turn.js +10 -9
- package/lib/commands/run/version/common.js +2 -1
- package/lib/commands/run/version/create.js +41 -40
- package/lib/commands/run/version/delete.js +10 -9
- package/lib/commands/run/version/list.js +13 -12
- package/lib/commands/run/version/modify.js +13 -12
- package/lib/commands/run/version/update.js +57 -54
- package/lib/commands/runf/base.js +42 -40
- package/lib/commands/self-update.js +11 -10
- package/lib/commands/smart.js +5 -4
- package/lib/commands/storage/storage.js +61 -56
- package/lib/commands/third/thirdAttach.js +6 -5
- package/lib/commands/utils.js +8 -5
- package/lib/constant.js +18 -17
- package/lib/decorators/deprecate.js +2 -1
- package/lib/function/alias.js +3 -2
- package/lib/function/base.js +9 -8
- package/lib/function/concurrency.js +4 -3
- package/lib/function/create.js +5 -4
- package/lib/function/delete.js +2 -1
- package/lib/function/layer/attach.js +2 -1
- package/lib/function/layer/create.js +2 -1
- package/lib/function/layer/download.js +2 -1
- package/lib/function/trigger.js +6 -5
- package/lib/function/update.js +3 -2
- package/lib/function/version.js +3 -2
- package/lib/help.js +22 -20
- package/lib/hosting.js +18 -17
- package/lib/i18n/index.js +81 -0
- package/lib/run/service/common.js +14 -13
- package/lib/run/service/config.js +4 -3
- package/lib/run/service/deployPackage.js +6 -5
- package/lib/run/service/showLogs.js +3 -2
- package/lib/run/service/update.js +7 -6
- package/lib/run/standalonegateway/list.js +5 -1
- package/lib/storage.js +2 -1
- package/lib/utils/ai/banner.js +12 -11
- package/lib/utils/ai/claudeWindows.js +5 -3
- package/lib/utils/ai/config.js +3 -2
- package/lib/utils/ai/const.js +4 -3
- package/lib/utils/ai/env.js +3 -2
- package/lib/utils/ai/envLocalManager.js +6 -5
- package/lib/utils/ai/nodeVersion.js +5 -1
- package/lib/utils/ai/router.js +129 -106
- package/lib/utils/ai/setup.js +95 -91
- package/lib/utils/checkTcbrEnv.js +22 -21
- package/lib/utils/cli-table.js +2 -1
- package/lib/utils/commonParamsCheck.js +4 -3
- package/lib/utils/debug-logger.js +2 -1
- package/lib/utils/dts.js +4 -3
- package/lib/utils/env.js +23 -21
- package/lib/utils/fs/index.js +5 -4
- package/lib/utils/function-packer.js +3 -2
- package/lib/utils/index.js +1 -0
- package/lib/utils/mcp-config-modifier.js +18 -17
- package/lib/utils/net/cloud-api-request.js +2 -1
- package/lib/utils/net/credential.js +2 -1
- package/lib/utils/net/http-request.js +2 -1
- package/lib/utils/progress-bar.js +2 -1
- package/lib/utils/prompt/select.js +8 -6
- package/lib/utils/store/auth.js +3 -2
- package/lib/utils/store/config.js +49 -0
- package/lib/utils/store/db.js +5 -0
- package/lib/utils/store/index.js +1 -1
- package/lib/utils/tcbrApi/callTcbrApi.js +2 -1
- package/lib/utils/template-manager.js +37 -36
- package/lib/utils/template.js +10 -9
- package/lib/utils/tools/common.js +3 -2
- package/lib/utils/url.js +19 -0
- package/lib/utils/validator.js +12 -4
- package/locales/README.md +160 -0
- package/locales/i18next-scanner.config.js +206 -0
- package/locales/langs/en.json +1235 -0
- package/locales/langs/zh.json +1235 -0
- package/locales/mapping.json +1235 -0
- package/package.json +10 -3
- package/types/commands/config/delete.d.ts +13 -0
- package/types/commands/config/get.d.ts +13 -0
- package/types/commands/config/index.d.ts +5 -0
- package/types/commands/config/interface.d.ts +17 -0
- package/types/commands/config/list.d.ts +13 -0
- package/types/commands/config/set.d.ts +13 -0
- package/types/commands/index.d.ts +1 -0
- package/types/i18n/index.d.ts +3 -0
- package/types/utils/ai/const.d.ts +1 -1
- package/types/utils/index.d.ts +1 -0
- package/types/utils/store/config.d.ts +8 -0
- package/types/utils/store/db.d.ts +2 -0
- package/types/utils/store/index.d.ts +1 -1
- package/types/utils/url.d.ts +18 -0
- package/dist/standalone/ccr.js +0 -78668
- package/dist/standalone/cli.js +0 -626422
|
@@ -33,6 +33,7 @@ const common_1 = require("../common");
|
|
|
33
33
|
const utils_1 = require("../../utils");
|
|
34
34
|
const decorators_1 = require("../../decorators");
|
|
35
35
|
const auth_1 = require("../../auth");
|
|
36
|
+
const i18n_1 = require("../../i18n");
|
|
36
37
|
let NewCommand = class NewCommand extends common_1.Command {
|
|
37
38
|
get options() {
|
|
38
39
|
return {
|
|
@@ -40,14 +41,14 @@ let NewCommand = class NewCommand extends common_1.Command {
|
|
|
40
41
|
options: [
|
|
41
42
|
{
|
|
42
43
|
flags: '-e, --envId <envId>',
|
|
43
|
-
desc: '环境 Id'
|
|
44
|
+
desc: (0, i18n_1.t)('环境 Id')
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
47
|
flags: '--clone',
|
|
47
|
-
desc: '从 Git 创建模板时是否 Clone 整个仓库'
|
|
48
|
+
desc: (0, i18n_1.t)('从 Git 创建模板时是否 Clone 整个仓库')
|
|
48
49
|
}
|
|
49
50
|
],
|
|
50
|
-
desc: '创建一个新的云开发应用',
|
|
51
|
+
desc: (0, i18n_1.t)('创建一个新的云开发应用'),
|
|
51
52
|
requiredEnvId: false,
|
|
52
53
|
withoutAuth: true
|
|
53
54
|
};
|
|
@@ -95,12 +96,12 @@ let NewCommand = class NewCommand extends common_1.Command {
|
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
98
|
initSuccessOutput(appName, log) {
|
|
98
|
-
log.success(appName ?
|
|
99
|
+
log.success(appName ? (0, i18n_1.t)('创建应用 {{appName}} 成功!\n', { appName }) : (0, i18n_1.t)('创建应用成功!'));
|
|
99
100
|
if (appName) {
|
|
100
101
|
const command = chalk_1.default.bold.cyan(`cd ${appName}`);
|
|
101
|
-
log.info(
|
|
102
|
+
log.info((0, i18n_1.t)('👉 执行命令 {{command}} 进入文件夹', { command }));
|
|
102
103
|
}
|
|
103
|
-
log.info(
|
|
104
|
+
log.info((0, i18n_1.t)('👉 开发完成后,执行命令 {{command}} 一键部署', { command: chalk_1.default.bold.cyan('tcb') }));
|
|
104
105
|
}
|
|
105
106
|
};
|
|
106
107
|
__decorate([
|
|
@@ -31,9 +31,10 @@ const inquirer_1 = __importDefault(require("inquirer"));
|
|
|
31
31
|
const error_1 = require("../../error");
|
|
32
32
|
const common_1 = require("../common");
|
|
33
33
|
const decorators_1 = require("../../decorators");
|
|
34
|
+
const i18n_1 = require("../../i18n");
|
|
34
35
|
const links = [
|
|
35
36
|
{
|
|
36
|
-
name: 'CLI 文档',
|
|
37
|
+
name: (0, i18n_1.t)('CLI 文档'),
|
|
37
38
|
value: 'cli-doc',
|
|
38
39
|
url: 'https://tencentcloudbase.github.io/2019-09-03-cli/'
|
|
39
40
|
}
|
|
@@ -43,7 +44,7 @@ let OpenLinkCommand = class OpenLinkCommand extends common_1.Command {
|
|
|
43
44
|
return {
|
|
44
45
|
cmd: 'open [link]',
|
|
45
46
|
options: [],
|
|
46
|
-
desc: '在浏览器中打开云开发相关连接',
|
|
47
|
+
desc: (0, i18n_1.t)('在浏览器中打开云开发相关连接'),
|
|
47
48
|
requiredEnvId: false,
|
|
48
49
|
withoutAuth: true
|
|
49
50
|
};
|
|
@@ -55,22 +56,22 @@ let OpenLinkCommand = class OpenLinkCommand extends common_1.Command {
|
|
|
55
56
|
if (link) {
|
|
56
57
|
openLink = links.find((item) => item.value === link);
|
|
57
58
|
if (!openLink) {
|
|
58
|
-
throw new error_1.CloudBaseError(
|
|
59
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('{{link}} 链接不存在!', { link }));
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
else {
|
|
62
63
|
const { selectLink } = yield inquirer_1.default.prompt({
|
|
63
64
|
type: 'list',
|
|
64
65
|
name: 'selectLink',
|
|
65
|
-
message: '请选择需要打开的链接',
|
|
66
|
+
message: (0, i18n_1.t)('请选择需要打开的链接'),
|
|
66
67
|
choices: links
|
|
67
68
|
});
|
|
68
69
|
openLink = links.find((item) => item.value === selectLink);
|
|
69
70
|
}
|
|
70
71
|
if (!openLink) {
|
|
71
|
-
throw new error_1.CloudBaseError('请指定需要打开的链接!');
|
|
72
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('请指定需要打开的链接!'));
|
|
72
73
|
}
|
|
73
|
-
console.log(
|
|
74
|
+
console.log((0, i18n_1.t)('在您的默认浏览器中打开 {{name}} 链接:', { name: openLink.name }));
|
|
74
75
|
console.log(chalk_1.default.underline.bold(openLink.url));
|
|
75
76
|
(0, open_1.default)(openLink.url);
|
|
76
77
|
});
|
|
@@ -34,14 +34,15 @@ const hosting_1 = require("../../hosting");
|
|
|
34
34
|
const error_1 = require("../../error");
|
|
35
35
|
const utils_1 = require("../../utils");
|
|
36
36
|
const decorators_1 = require("../../decorators");
|
|
37
|
+
const i18n_1 = require("../../i18n");
|
|
37
38
|
const HostingStatusMap = {
|
|
38
|
-
init: '初始化中',
|
|
39
|
-
process: '处理中',
|
|
40
|
-
online: '已上线',
|
|
41
|
-
destroying: '销毁中',
|
|
42
|
-
offline: '已下线',
|
|
43
|
-
create_fail: '初始化失败',
|
|
44
|
-
destroy_fail: '销毁失败'
|
|
39
|
+
init: (0, i18n_1.t)('初始化中'),
|
|
40
|
+
process: (0, i18n_1.t)('处理中'),
|
|
41
|
+
online: (0, i18n_1.t)('已上线'),
|
|
42
|
+
destroying: (0, i18n_1.t)('销毁中'),
|
|
43
|
+
offline: (0, i18n_1.t)('已下线'),
|
|
44
|
+
create_fail: (0, i18n_1.t)('初始化失败'),
|
|
45
|
+
destroy_fail: (0, i18n_1.t)('销毁失败')
|
|
45
46
|
};
|
|
46
47
|
function getHostingService(envId) {
|
|
47
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -58,10 +59,10 @@ let HostingDetail = class HostingDetail extends common_1.Command {
|
|
|
58
59
|
options: [
|
|
59
60
|
{
|
|
60
61
|
flags: '-e, --envId <envId>',
|
|
61
|
-
desc: '环境 Id'
|
|
62
|
+
desc: (0, i18n_1.t)('环境 Id')
|
|
62
63
|
}
|
|
63
64
|
],
|
|
64
|
-
desc: '查看静态网站服务信息'
|
|
65
|
+
desc: (0, i18n_1.t)('查看静态网站服务信息')
|
|
65
66
|
};
|
|
66
67
|
}
|
|
67
68
|
execute(envId, log) {
|
|
@@ -75,9 +76,9 @@ let HostingDetail = class HostingDetail extends common_1.Command {
|
|
|
75
76
|
}
|
|
76
77
|
const link = (0, utils_1.genClickableLink)(`https://${website.cdnDomain}`);
|
|
77
78
|
if (website.status !== 'offline') {
|
|
78
|
-
log.info(
|
|
79
|
+
log.info((0, i18n_1.t)('静态网站域名:{{link}}', { link }));
|
|
79
80
|
}
|
|
80
|
-
log.info(
|
|
81
|
+
log.info((0, i18n_1.t)('静态网站状态:【{{status}}】', { status: HostingStatusMap[website.status] }));
|
|
81
82
|
});
|
|
82
83
|
}
|
|
83
84
|
};
|
|
@@ -102,10 +103,10 @@ let HostingDeploy = class HostingDeploy extends common_1.Command {
|
|
|
102
103
|
options: [
|
|
103
104
|
{
|
|
104
105
|
flags: '-e, --envId <envId>',
|
|
105
|
-
desc: '环境 Id'
|
|
106
|
+
desc: (0, i18n_1.t)('环境 Id')
|
|
106
107
|
}
|
|
107
108
|
],
|
|
108
|
-
desc: '部署静态网站文件'
|
|
109
|
+
desc: (0, i18n_1.t)('部署静态网站文件')
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
112
|
execute(envId, params, log) {
|
|
@@ -113,12 +114,12 @@ let HostingDeploy = class HostingDeploy extends common_1.Command {
|
|
|
113
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114
115
|
const localPath = (params === null || params === void 0 ? void 0 : params[0]) || '.';
|
|
115
116
|
const cloudPath = (params === null || params === void 0 ? void 0 : params[1]) || '';
|
|
116
|
-
log.verbose('本地目录', localPath);
|
|
117
|
+
log.verbose((0, i18n_1.t)('本地目录'), localPath);
|
|
117
118
|
const resolveLocalPath = path_1.default.resolve(localPath);
|
|
118
119
|
(0, utils_1.checkFullAccess)(resolveLocalPath, true);
|
|
119
120
|
const isDir = (0, utils_1.isDirectory)(resolveLocalPath);
|
|
120
121
|
const loading = (0, utils_1.loadingFactory)();
|
|
121
|
-
loading.start('准备上传中...');
|
|
122
|
+
loading.start((0, i18n_1.t)('准备上传中...'));
|
|
122
123
|
let totalFiles = 0;
|
|
123
124
|
if (isDir) {
|
|
124
125
|
let files = yield (0, hosting_1.walkLocalDir)(envId, resolveLocalPath);
|
|
@@ -126,7 +127,7 @@ let HostingDeploy = class HostingDeploy extends common_1.Command {
|
|
|
126
127
|
totalFiles = files.length;
|
|
127
128
|
}
|
|
128
129
|
const onProgress = (0, utils_1.createUploadProgressBar)(() => {
|
|
129
|
-
!isDir && log.success('文件部署成功!');
|
|
130
|
+
!isDir && log.success((0, i18n_1.t)('文件部署成功!'));
|
|
130
131
|
}, () => {
|
|
131
132
|
loading.stop();
|
|
132
133
|
});
|
|
@@ -154,25 +155,25 @@ let HostingDeploy = class HostingDeploy extends common_1.Command {
|
|
|
154
155
|
});
|
|
155
156
|
const website = (_a = info === null || info === void 0 ? void 0 : info.data) === null || _a === void 0 ? void 0 : _a[0];
|
|
156
157
|
const link = (0, utils_1.genClickableLink)(`https://${website.cdnDomain}`);
|
|
157
|
-
log.success(
|
|
158
|
+
log.success((0, i18n_1.t)('\n部署完成 👉 {{link}}', { link }));
|
|
158
159
|
if (isDir) {
|
|
159
|
-
log.success(
|
|
160
|
-
log.success(
|
|
160
|
+
log.success((0, i18n_1.t)('文件共计 {{totalFiles}} 个', { totalFiles }));
|
|
161
|
+
log.success((0, i18n_1.t)('文件上传成功 {{count}} 个', { count: successFiles.length }));
|
|
161
162
|
if (totalFiles <= 50) {
|
|
162
|
-
(0, utils_1.printHorizontalTable)(['状态', '文件'], successFiles.map((item) => [log_symbols_1.default.success, item]));
|
|
163
|
+
(0, utils_1.printHorizontalTable)([(0, i18n_1.t)('状态'), (0, i18n_1.t)('文件')], successFiles.map((item) => [log_symbols_1.default.success, item]));
|
|
163
164
|
}
|
|
164
|
-
log.error(
|
|
165
|
+
log.error((0, i18n_1.t)('文件上传失败 {{count}} 个', { count: failedFiles.length }));
|
|
165
166
|
if (failedFiles.length) {
|
|
166
167
|
if (totalFiles <= 50) {
|
|
167
|
-
(0, utils_1.printHorizontalTable)(['状态', '文件'], failedFiles.map((item) => [log_symbols_1.default.error, item]));
|
|
168
|
+
(0, utils_1.printHorizontalTable)([(0, i18n_1.t)('状态'), (0, i18n_1.t)('文件')], failedFiles.map((item) => [log_symbols_1.default.error, item]));
|
|
168
169
|
}
|
|
169
170
|
else {
|
|
170
171
|
const errorLogPath = path_1.default.resolve('./cloudbase-error.log');
|
|
171
|
-
log.error('上传失败文件:');
|
|
172
|
+
log.error((0, i18n_1.t)('上传失败文件:'));
|
|
172
173
|
console.log(errorLogPath);
|
|
173
174
|
fs_1.default.writeFileSync(errorLogPath, failedFiles.join('\n'));
|
|
174
175
|
}
|
|
175
|
-
throw new error_1.CloudBaseError('部分文件上传失败,进程退出');
|
|
176
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('部分文件上传失败,进程退出'));
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
179
|
});
|
|
@@ -200,14 +201,14 @@ let HostingDeleteFiles = class HostingDeleteFiles extends common_1.Command {
|
|
|
200
201
|
options: [
|
|
201
202
|
{
|
|
202
203
|
flags: '-e, --envId <envId>',
|
|
203
|
-
desc: '环境 Id'
|
|
204
|
+
desc: (0, i18n_1.t)('环境 Id')
|
|
204
205
|
},
|
|
205
206
|
{
|
|
206
207
|
flags: '-d, --dir',
|
|
207
|
-
desc: '删除目标是否为文件夹'
|
|
208
|
+
desc: (0, i18n_1.t)('删除目标是否为文件夹')
|
|
208
209
|
}
|
|
209
210
|
],
|
|
210
|
-
desc: '删除静态网站文件/文件夹,文件夹需指定 --dir 选项'
|
|
211
|
+
desc: (0, i18n_1.t)('删除静态网站文件/文件夹,文件夹需指定 --dir 选项')
|
|
211
212
|
};
|
|
212
213
|
}
|
|
213
214
|
execute(envId, options, params) {
|
|
@@ -218,30 +219,30 @@ let HostingDeleteFiles = class HostingDeleteFiles extends common_1.Command {
|
|
|
218
219
|
const { confirm } = yield inquirer_1.default.prompt({
|
|
219
220
|
type: 'confirm',
|
|
220
221
|
name: 'confirm',
|
|
221
|
-
message: '指定云端路径为空,将会删除所有文件,是否继续',
|
|
222
|
+
message: (0, i18n_1.t)('指定云端路径为空,将会删除所有文件,是否继续'),
|
|
222
223
|
default: false
|
|
223
224
|
});
|
|
224
225
|
if (!confirm) {
|
|
225
|
-
throw new error_1.CloudBaseError('操作终止!');
|
|
226
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('操作终止!'));
|
|
226
227
|
}
|
|
227
228
|
isDir = true;
|
|
228
229
|
}
|
|
229
230
|
if (cloudPath === '/') {
|
|
230
231
|
isDir = true;
|
|
231
232
|
}
|
|
232
|
-
const fileText = isDir ? '文件夹' : '文件';
|
|
233
|
+
const fileText = isDir ? (0, i18n_1.t)('文件夹') : (0, i18n_1.t)('文件');
|
|
233
234
|
const loading = (0, utils_1.loadingFactory)();
|
|
234
|
-
loading.start(
|
|
235
|
+
loading.start((0, i18n_1.t)('删除{{fileText}}中...', { fileText }));
|
|
235
236
|
try {
|
|
236
237
|
yield (0, hosting_1.hostingDelete)({
|
|
237
238
|
envId,
|
|
238
239
|
isDir,
|
|
239
240
|
cloudPath
|
|
240
241
|
});
|
|
241
|
-
loading.succeed(
|
|
242
|
+
loading.succeed((0, i18n_1.t)('删除{{fileText}}成功!', { fileText }));
|
|
242
243
|
}
|
|
243
244
|
catch (e) {
|
|
244
|
-
loading.fail(
|
|
245
|
+
loading.fail((0, i18n_1.t)('删除{{fileText}}失败!', { fileText }));
|
|
245
246
|
throw new error_1.CloudBaseError(e.message);
|
|
246
247
|
}
|
|
247
248
|
});
|
|
@@ -269,22 +270,22 @@ let HostingList = class HostingList extends common_1.Command {
|
|
|
269
270
|
options: [
|
|
270
271
|
{
|
|
271
272
|
flags: '-e, --envId <envId>',
|
|
272
|
-
desc: '环境 Id'
|
|
273
|
+
desc: (0, i18n_1.t)('环境 Id')
|
|
273
274
|
}
|
|
274
275
|
],
|
|
275
|
-
desc: '展示文件列表'
|
|
276
|
+
desc: (0, i18n_1.t)('展示文件列表')
|
|
276
277
|
};
|
|
277
278
|
}
|
|
278
279
|
execute(envId) {
|
|
279
280
|
return __awaiter(this, void 0, void 0, function* () {
|
|
280
281
|
const loading = (0, utils_1.loadingFactory)();
|
|
281
|
-
loading.start('获取文件列表中...');
|
|
282
|
+
loading.start((0, i18n_1.t)('获取文件列表中...'));
|
|
282
283
|
try {
|
|
283
284
|
const list = yield (0, hosting_1.hostingList)({
|
|
284
285
|
envId
|
|
285
286
|
});
|
|
286
287
|
loading.stop();
|
|
287
|
-
const head = ['序号', 'Key', 'LastModified', 'ETag', 'Size(KB)'];
|
|
288
|
+
const head = [(0, i18n_1.t)('序号'), (0, i18n_1.t)('Key'), (0, i18n_1.t)('LastModified'), (0, i18n_1.t)('ETag'), (0, i18n_1.t)('Size(KB)')];
|
|
288
289
|
const notDir = (item) => !(Number(item.Size) === 0 && /\/$/g.test(item.Key));
|
|
289
290
|
const tableData = list
|
|
290
291
|
.filter(notDir)
|
|
@@ -298,7 +299,7 @@ let HostingList = class HostingList extends common_1.Command {
|
|
|
298
299
|
(0, utils_1.printHorizontalTable)(head, tableData);
|
|
299
300
|
}
|
|
300
301
|
catch (e) {
|
|
301
|
-
loading.fail('获取文件列表失败!');
|
|
302
|
+
loading.fail((0, i18n_1.t)('获取文件列表失败!'));
|
|
302
303
|
throw new error_1.CloudBaseError(e.message);
|
|
303
304
|
}
|
|
304
305
|
});
|
|
@@ -323,14 +324,14 @@ let HostingDownloadCommand = class HostingDownloadCommand extends common_1.Comma
|
|
|
323
324
|
options: [
|
|
324
325
|
{
|
|
325
326
|
flags: '-e, --envId <envId>',
|
|
326
|
-
desc: '环境 Id'
|
|
327
|
+
desc: (0, i18n_1.t)('环境 Id')
|
|
327
328
|
},
|
|
328
329
|
{
|
|
329
330
|
flags: '-d, --dir',
|
|
330
|
-
desc: '下载目标是否为文件夹'
|
|
331
|
+
desc: (0, i18n_1.t)('下载目标是否为文件夹')
|
|
331
332
|
}
|
|
332
333
|
],
|
|
333
|
-
desc: '下载文件/文件夹,文件夹需指定 --dir 选项'
|
|
334
|
+
desc: (0, i18n_1.t)('下载文件/文件夹,文件夹需指定 --dir 选项')
|
|
334
335
|
};
|
|
335
336
|
}
|
|
336
337
|
execute(envId, options, params) {
|
|
@@ -340,9 +341,9 @@ let HostingDownloadCommand = class HostingDownloadCommand extends common_1.Comma
|
|
|
340
341
|
const hostingService = yield getHostingService(envId);
|
|
341
342
|
const resolveLocalPath = path_1.default.resolve(localPath);
|
|
342
343
|
const { dir } = options;
|
|
343
|
-
const fileText = dir ? '文件夹' : '文件';
|
|
344
|
+
const fileText = dir ? (0, i18n_1.t)('文件夹') : (0, i18n_1.t)('文件');
|
|
344
345
|
const loading = (0, utils_1.loadingFactory)();
|
|
345
|
-
loading.start(
|
|
346
|
+
loading.start((0, i18n_1.t)('下载{{fileText}}中', { fileText }));
|
|
346
347
|
if (/^\/.+/.test(cloudPath)) {
|
|
347
348
|
cloudPath = cloudPath.slice(1);
|
|
348
349
|
}
|
|
@@ -358,7 +359,7 @@ let HostingDownloadCommand = class HostingDownloadCommand extends common_1.Comma
|
|
|
358
359
|
localPath: resolveLocalPath
|
|
359
360
|
});
|
|
360
361
|
}
|
|
361
|
-
loading.succeed(
|
|
362
|
+
loading.succeed((0, i18n_1.t)('下载{{fileText}}成功!', { fileText }));
|
|
362
363
|
});
|
|
363
364
|
}
|
|
364
365
|
};
|
package/lib/commands/index.js
CHANGED
|
@@ -27,6 +27,7 @@ const decorators_1 = require("../../decorators");
|
|
|
27
27
|
const log_1 = require("../../utils/log");
|
|
28
28
|
const template_manager_1 = require("../../utils/template-manager");
|
|
29
29
|
const error_1 = require("../../error");
|
|
30
|
+
const i18n_1 = require("../../i18n");
|
|
30
31
|
let PullCommand = class PullCommand extends common_1.Command {
|
|
31
32
|
get options() {
|
|
32
33
|
return {
|
|
@@ -34,18 +35,18 @@ let PullCommand = class PullCommand extends common_1.Command {
|
|
|
34
35
|
options: [
|
|
35
36
|
{
|
|
36
37
|
flags: '-s, --source <source>',
|
|
37
|
-
desc: '指定模板来源'
|
|
38
|
+
desc: (0, i18n_1.t)('指定模板来源')
|
|
38
39
|
},
|
|
39
40
|
{
|
|
40
41
|
flags: '-o, --output <output>',
|
|
41
|
-
desc: '指定输出目录'
|
|
42
|
+
desc: (0, i18n_1.t)('指定输出目录')
|
|
42
43
|
},
|
|
43
44
|
{
|
|
44
45
|
flags: '-f, --force',
|
|
45
|
-
desc: '强制清理目标输出目录(慎用)'
|
|
46
|
+
desc: (0, i18n_1.t)('强制清理目标输出目录(慎用)')
|
|
46
47
|
}
|
|
47
48
|
],
|
|
48
|
-
desc: '拉取项目模板\n\n支持的内置模板:\n miniprogram - 微信小程序 + CloudBase\n react - Web 应用 - React + CloudBase\n vue - Web 应用 - Vue + CloudBase\n uniapp - 跨端应用 - UniApp + CloudBase\n rules - AI 规则和配置\n\n支持的 Git 仓库:\n GitHub: https://github.com/user/repo\n Gitee: https://gitee.com/user/repo\n CNB: https://cnb.cool/user/repo\n SSH: git@github.com:user/repo.git\n\n支持 Git 子目录:\n https://github.com/user/repo/tree/main/src/templates\n https://cnb.cool/user/repo/tree/main/examples\n\n示例:\n tcb pull miniprogram\n tcb pull https://github.com/user/repo\n tcb pull https://cnb.cool/user/repo\n tcb pull https://cnb.cool/user/repo/tree/main/examples --output ./my-project',
|
|
49
|
+
desc: (0, i18n_1.t)('拉取项目模板\n\n支持的内置模板:\n miniprogram - 微信小程序 + CloudBase\n react - Web 应用 - React + CloudBase\n vue - Web 应用 - Vue + CloudBase\n uniapp - 跨端应用 - UniApp + CloudBase\n rules - AI 规则和配置\n\n支持的 Git 仓库:\n GitHub: https://github.com/user/repo\n Gitee: https://gitee.com/user/repo\n CNB: https://cnb.cool/user/repo\n SSH: git@github.com:user/repo.git\n\n支持 Git 子目录:\n https://github.com/user/repo/tree/main/src/templates\n https://cnb.cool/user/repo/tree/main/examples\n\n示例:\n tcb pull miniprogram\n tcb pull https://github.com/user/repo\n tcb pull https://cnb.cool/user/repo\n tcb pull https://cnb.cool/user/repo/tree/main/examples --output ./my-project'),
|
|
49
50
|
requiredEnvId: false,
|
|
50
51
|
withoutAuth: true
|
|
51
52
|
};
|
|
@@ -59,34 +60,34 @@ let PullCommand = class PullCommand extends common_1.Command {
|
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
62
|
if (!source || typeof source !== 'string') {
|
|
62
|
-
throw new error_1.CloudBaseError('请指定要拉取的模板来源');
|
|
63
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('请指定要拉取的模板来源'));
|
|
63
64
|
}
|
|
64
65
|
try {
|
|
65
66
|
const templateManager = new template_manager_1.TemplateManager();
|
|
66
67
|
yield templateManager.pullTemplate(source, { output, force }, log);
|
|
67
|
-
log.info('🎉 模板拉取完成!');
|
|
68
|
+
log.info((0, i18n_1.t)('🎉 模板拉取完成!'));
|
|
68
69
|
if (output) {
|
|
69
|
-
log.info(
|
|
70
|
+
log.info((0, i18n_1.t)('📁 项目已创建在: {{output}}', { output }));
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
catch (error) {
|
|
73
|
-
throw new error_1.CloudBaseError(
|
|
74
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('拉取模板失败: {{message}}', { message: error.message }), { original: error });
|
|
74
75
|
}
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
78
|
showTemplateList(templateManager, log) {
|
|
78
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
79
80
|
const templates = templateManager.getBuiltinTemplates();
|
|
80
|
-
log.info('📋 可用的内置模板:');
|
|
81
|
+
log.info((0, i18n_1.t)('📋 可用的内置模板:'));
|
|
81
82
|
for (const [key, name] of Object.entries(templates)) {
|
|
82
83
|
log.info(` ${key.padEnd(12)} - ${name}`);
|
|
83
84
|
}
|
|
84
|
-
log.info('\n🌐 支持的 Git 仓库格式:');
|
|
85
|
+
log.info((0, i18n_1.t)('\n🌐 支持的 Git 仓库格式:'));
|
|
85
86
|
log.info(' GitHub: https://github.com/user/repo');
|
|
86
87
|
log.info(' Gitee: https://gitee.com/user/repo');
|
|
87
88
|
log.info(' CNB: https://cnb.cool/user/repo');
|
|
88
89
|
log.info(' SSH: git@github.com:user/repo.git');
|
|
89
|
-
log.info('\n📁 支持 Git 子目录:');
|
|
90
|
+
log.info((0, i18n_1.t)('\n📁 支持 Git 子目录:'));
|
|
90
91
|
log.info(' https://github.com/user/repo/tree/main/src/templates');
|
|
91
92
|
});
|
|
92
93
|
}
|
|
@@ -28,6 +28,7 @@ const error_1 = require("../../error");
|
|
|
28
28
|
const run_1 = require("../../run");
|
|
29
29
|
const decorators_1 = require("../../decorators");
|
|
30
30
|
const utils_1 = require("../../utils");
|
|
31
|
+
const i18n_1 = require("../../i18n");
|
|
31
32
|
let DeleteRun = class DeleteRun extends common_1.Command {
|
|
32
33
|
get options() {
|
|
33
34
|
return {
|
|
@@ -36,14 +37,14 @@ let DeleteRun = class DeleteRun extends common_1.Command {
|
|
|
36
37
|
options: [
|
|
37
38
|
{
|
|
38
39
|
flags: '-e, --envId <envId>',
|
|
39
|
-
desc: '环境 Id'
|
|
40
|
+
desc: (0, i18n_1.t)('环境 Id')
|
|
40
41
|
},
|
|
41
42
|
{
|
|
42
43
|
flags: '-s, --serviceName <serviceName>',
|
|
43
|
-
desc: '云托管服务 name'
|
|
44
|
+
desc: (0, i18n_1.t)('云托管服务 name')
|
|
44
45
|
},
|
|
45
46
|
],
|
|
46
|
-
desc: '删除云托管服务'
|
|
47
|
+
desc: (0, i18n_1.t)('删除云托管服务')
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
execute(envId, options) {
|
|
@@ -55,33 +56,33 @@ let DeleteRun = class DeleteRun extends common_1.Command {
|
|
|
55
56
|
}
|
|
56
57
|
let { serviceName = '' } = options;
|
|
57
58
|
if (serviceName.length === 0) {
|
|
58
|
-
throw new error_1.CloudBaseError('必须输入服务名');
|
|
59
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('必须输入服务名'));
|
|
59
60
|
}
|
|
60
61
|
const loading = (0, utils_1.loadingFactory)();
|
|
61
|
-
loading.start('数据加载中...');
|
|
62
|
+
loading.start((0, i18n_1.t)('数据加载中...'));
|
|
62
63
|
const versions = yield (0, run_1.listVersion)({ envId, serverName: serviceName, limit: 1, offset: 0 });
|
|
63
64
|
if (versions.length > 0)
|
|
64
|
-
throw new error_1.CloudBaseError('服务下还有版本存在,请先清空版本列表');
|
|
65
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('服务下还有版本存在,请先清空版本列表'));
|
|
65
66
|
const imageRepo = yield (0, run_1.describeImageRepo)({ envId, serverName: serviceName });
|
|
66
|
-
loading.start('正在删除服务');
|
|
67
|
+
loading.start((0, i18n_1.t)('正在删除服务'));
|
|
67
68
|
const res = yield (0, run_1.deleteRun)({ envId, serverName: serviceName });
|
|
68
69
|
if (res === 'succ')
|
|
69
|
-
loading.succeed('服务删除完成');
|
|
70
|
+
loading.succeed((0, i18n_1.t)('服务删除完成'));
|
|
70
71
|
else
|
|
71
|
-
throw new error_1.CloudBaseError('服务删除失败');
|
|
72
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('服务删除失败'));
|
|
72
73
|
if ((yield (0, enquirer_1.prompt)({
|
|
73
74
|
type: 'select',
|
|
74
75
|
name: 'flag',
|
|
75
|
-
message:
|
|
76
|
-
choices: ['是', '否']
|
|
77
|
-
})).flag === '是') {
|
|
78
|
-
loading.start('正在删除镜像仓库');
|
|
76
|
+
message: (0, i18n_1.t)('是否删除绑定的镜像仓库{{imageRepo}}', { imageRepo }),
|
|
77
|
+
choices: [(0, i18n_1.t)('是'), (0, i18n_1.t)('否')]
|
|
78
|
+
})).flag === (0, i18n_1.t)('是')) {
|
|
79
|
+
loading.start((0, i18n_1.t)('正在删除镜像仓库'));
|
|
79
80
|
const res = yield (0, run_1.deleteImageRepo)({ imageRepo });
|
|
80
81
|
if (res === '') {
|
|
81
|
-
loading.succeed('仓库删除完成');
|
|
82
|
+
loading.succeed((0, i18n_1.t)('仓库删除完成'));
|
|
82
83
|
}
|
|
83
84
|
else {
|
|
84
|
-
throw new error_1.CloudBaseError('仓库删除失败');
|
|
85
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('仓库删除失败'));
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
});
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.imageCommonOptions = void 0;
|
|
4
|
+
const i18n_1 = require("../../../i18n");
|
|
4
5
|
const imageCommonOptions = (sub) => ({
|
|
5
6
|
cmd: 'run:deprecated',
|
|
6
7
|
childCmd: {
|
|
7
8
|
cmd: 'image',
|
|
8
|
-
desc: '云托管镜像管理'
|
|
9
|
+
desc: (0, i18n_1.t)('云托管镜像管理')
|
|
9
10
|
},
|
|
10
11
|
childSubCmd: sub
|
|
11
12
|
});
|
|
@@ -28,22 +28,23 @@ const run_1 = require("../../../run");
|
|
|
28
28
|
const utils_1 = require("../../../utils");
|
|
29
29
|
const decorators_1 = require("../../../decorators");
|
|
30
30
|
const common_2 = require("./common");
|
|
31
|
+
const i18n_1 = require("../../../i18n");
|
|
31
32
|
let DeleteImage = class DeleteImage extends common_1.Command {
|
|
32
33
|
get options() {
|
|
33
34
|
return Object.assign(Object.assign({}, (0, common_2.imageCommonOptions)('delete')), { options: [
|
|
34
35
|
{
|
|
35
36
|
flags: '-e, --envId <envId>',
|
|
36
|
-
desc: '环境 Id'
|
|
37
|
+
desc: (0, i18n_1.t)('环境 Id')
|
|
37
38
|
},
|
|
38
39
|
{
|
|
39
40
|
flags: '-s, --serviceName <serviceName>',
|
|
40
|
-
desc: '托管服务 name'
|
|
41
|
+
desc: (0, i18n_1.t)('托管服务 name')
|
|
41
42
|
},
|
|
42
43
|
{
|
|
43
44
|
flags: '-t, --imageTag <imageTag>',
|
|
44
|
-
desc: '镜像 tag'
|
|
45
|
+
desc: (0, i18n_1.t)('镜像 tag')
|
|
45
46
|
}
|
|
46
|
-
], desc: '删除云开发环境下云托管服务的版本' });
|
|
47
|
+
], desc: (0, i18n_1.t)('删除云开发环境下云托管服务的版本') });
|
|
47
48
|
}
|
|
48
49
|
execute(envId, options) {
|
|
49
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -54,10 +55,10 @@ let DeleteImage = class DeleteImage extends common_1.Command {
|
|
|
54
55
|
}
|
|
55
56
|
let { serviceName = '', imageTag = '' } = options;
|
|
56
57
|
if (serviceName.length === 0 || imageTag.length === 0) {
|
|
57
|
-
throw new error_1.CloudBaseError('必须输入 serviceName 和 imageTag');
|
|
58
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('必须输入 serviceName 和 imageTag'));
|
|
58
59
|
}
|
|
59
60
|
const loading = (0, utils_1.loadingFactory)();
|
|
60
|
-
loading.start('数据加载中...');
|
|
61
|
+
loading.start((0, i18n_1.t)('数据加载中...'));
|
|
61
62
|
const imageRepo = yield (0, run_1.describeImageRepo)({ envId, serverName: serviceName });
|
|
62
63
|
const imageUrl = `ccr.ccs.tencentyun.com/${imageRepo}:${imageTag}`;
|
|
63
64
|
try {
|
|
@@ -66,12 +67,12 @@ let DeleteImage = class DeleteImage extends common_1.Command {
|
|
|
66
67
|
imageUrl: imageUrl
|
|
67
68
|
});
|
|
68
69
|
if (res === 'success')
|
|
69
|
-
loading.succeed(
|
|
70
|
+
loading.succeed((0, i18n_1.t)('成功删除 {{serviceName}} 服务下的 {{imageUrl}} 镜像', { serviceName, imageUrl }));
|
|
70
71
|
else
|
|
71
|
-
throw new error_1.CloudBaseError('删除失败');
|
|
72
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('删除失败'));
|
|
72
73
|
}
|
|
73
74
|
catch (e) {
|
|
74
|
-
throw new error_1.CloudBaseError('删除失败');
|
|
75
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('删除失败'));
|
|
75
76
|
}
|
|
76
77
|
});
|
|
77
78
|
}
|
|
@@ -29,22 +29,23 @@ const run_1 = require("../../../run");
|
|
|
29
29
|
const utils_1 = require("../../../utils");
|
|
30
30
|
const decorators_1 = require("../../../decorators");
|
|
31
31
|
const common_2 = require("./common");
|
|
32
|
+
const i18n_1 = require("../../../i18n");
|
|
32
33
|
let DownLoadImage = class DownLoadImage extends common_1.Command {
|
|
33
34
|
get options() {
|
|
34
35
|
return Object.assign(Object.assign({}, (0, common_2.imageCommonOptions)('download')), { options: [
|
|
35
36
|
{
|
|
36
37
|
flags: '-e, --envId <envId>',
|
|
37
|
-
desc: '环境 Id'
|
|
38
|
+
desc: (0, i18n_1.t)('环境 Id')
|
|
38
39
|
},
|
|
39
40
|
{
|
|
40
41
|
flags: '-s, --serviceName <serviceName>',
|
|
41
|
-
desc: '托管服务 name'
|
|
42
|
+
desc: (0, i18n_1.t)('托管服务 name')
|
|
42
43
|
},
|
|
43
44
|
{
|
|
44
45
|
flags: '-t, --imageTag <imageTag>',
|
|
45
|
-
desc: '镜像 tag'
|
|
46
|
+
desc: (0, i18n_1.t)('镜像 tag')
|
|
46
47
|
}
|
|
47
|
-
], desc: '
|
|
48
|
+
], desc: (0, i18n_1.t)('下载云开发环境下云托管服务的镜像') });
|
|
48
49
|
}
|
|
49
50
|
execute(envId, options) {
|
|
50
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -55,19 +56,19 @@ let DownLoadImage = class DownLoadImage extends common_1.Command {
|
|
|
55
56
|
}
|
|
56
57
|
let { serviceName = '', imageTag = '' } = options;
|
|
57
58
|
if (serviceName.length === 0 || imageTag.length === 0) {
|
|
58
|
-
throw new error_1.CloudBaseError('必须输入 serviceName 和 imageTag');
|
|
59
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('必须输入 serviceName 和 imageTag'));
|
|
59
60
|
}
|
|
60
61
|
const loading = (0, utils_1.loadingFactory)();
|
|
61
62
|
const imageRepo = yield (0, run_1.describeImageRepo)({ envId, serverName: serviceName });
|
|
62
63
|
const imageUrl = `ccr.ccs.tencentyun.com/${imageRepo}:${imageTag}`;
|
|
63
64
|
if (!(yield (0, run_1.getAuthFlag)())) {
|
|
64
|
-
throw new error_1.CloudBaseError('无法找到~/.docker/config.json或未登录,需要执行docker login');
|
|
65
|
+
throw new error_1.CloudBaseError((0, i18n_1.t)('无法找到~/.docker/config.json或未登录,需要执行docker login'));
|
|
65
66
|
}
|
|
66
67
|
let sh = new Promise((resolve, reject) => {
|
|
67
68
|
(0, child_process_1.exec)(`docker pull ${imageUrl}`, (err, stdout) => err ? reject(err) : resolve({ code: 0, info: stdout })).stdout.pipe(process.stdout);
|
|
68
69
|
});
|
|
69
70
|
yield sh;
|
|
70
|
-
loading.succeed('拉取成功');
|
|
71
|
+
loading.succeed((0, i18n_1.t)('拉取成功'));
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
74
|
};
|