@cloudbase/cli 2.6.0-pre-alpha.0 → 2.6.1
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/commands/runf/base.js +9 -7
- package/lib/help.js +13 -13
- package/package.json +2 -2
|
@@ -42,7 +42,7 @@ const scfService = utils_1.CloudApiService.getInstance('tcb');
|
|
|
42
42
|
class RunfListCommand extends common_1.Command {
|
|
43
43
|
get options() {
|
|
44
44
|
return {
|
|
45
|
-
cmd: '
|
|
45
|
+
cmd: 'cloudrunfunction',
|
|
46
46
|
childCmd: 'list',
|
|
47
47
|
options: [
|
|
48
48
|
{
|
|
@@ -102,7 +102,7 @@ exports.RunfListCommand = RunfListCommand;
|
|
|
102
102
|
let RunfDeployCommand = class RunfDeployCommand extends common_1.Command {
|
|
103
103
|
get options() {
|
|
104
104
|
return {
|
|
105
|
-
cmd: '
|
|
105
|
+
cmd: 'cloudrunfunction',
|
|
106
106
|
childCmd: 'deploy',
|
|
107
107
|
options: [
|
|
108
108
|
{
|
|
@@ -127,7 +127,6 @@ let RunfDeployCommand = class RunfDeployCommand extends common_1.Command {
|
|
|
127
127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
128
128
|
let { serviceName, source } = options;
|
|
129
129
|
const targetDir = path_1.default.resolve(source || process.cwd());
|
|
130
|
-
debugger;
|
|
131
130
|
const target = 'main';
|
|
132
131
|
const functionsConfigFile = path_1.default.resolve(targetDir, options.functionsConfigFile || 'cloudbase-functions.json');
|
|
133
132
|
let multiFunctionsConfig = null;
|
|
@@ -212,13 +211,17 @@ let RunfDeployCommand = class RunfDeployCommand extends common_1.Command {
|
|
|
212
211
|
function _runDeploy() {
|
|
213
212
|
return __awaiter(this, void 0, void 0, function* () {
|
|
214
213
|
try {
|
|
215
|
-
yield iac_core_1.IAC.FunctionV2.apply({
|
|
214
|
+
const res = yield iac_core_1.IAC.FunctionV2.apply({
|
|
216
215
|
cwd: targetDir,
|
|
217
216
|
envId: envId,
|
|
218
217
|
name: serviceName
|
|
219
218
|
}, function (message) {
|
|
220
219
|
trackCallback(message, log);
|
|
221
220
|
});
|
|
221
|
+
const { envId: _envId, name, resourceType: _resourceType } = res === null || res === void 0 ? void 0 : res.data;
|
|
222
|
+
trackCallback({
|
|
223
|
+
details: `请打开链接查看部署状态: https://tcb.cloud.tencent.com/dev?envId=${_envId}#/platform-run/service/detail?serverName=${name}&tabId=deploy&envId=${_envId}`
|
|
224
|
+
}, log);
|
|
222
225
|
}
|
|
223
226
|
catch (e) {
|
|
224
227
|
if ((e === null || e === void 0 ? void 0 : e.action) === 'UpdateCloudRunServer' && (e === null || e === void 0 ? void 0 : e.code) === 'ResourceInUse') {
|
|
@@ -287,7 +290,7 @@ exports.RunfDeployCommand = RunfDeployCommand;
|
|
|
287
290
|
let RunfDownloadCommand = class RunfDownloadCommand extends common_1.Command {
|
|
288
291
|
get options() {
|
|
289
292
|
return {
|
|
290
|
-
cmd: '
|
|
293
|
+
cmd: 'cloudrunfunction',
|
|
291
294
|
childCmd: 'download',
|
|
292
295
|
options: [
|
|
293
296
|
{
|
|
@@ -388,7 +391,7 @@ exports.RunfDownloadCommand = RunfDownloadCommand;
|
|
|
388
391
|
class RunfRunCommand extends common_1.Command {
|
|
389
392
|
get options() {
|
|
390
393
|
return {
|
|
391
|
-
cmd: '
|
|
394
|
+
cmd: 'cloudrunfunction',
|
|
392
395
|
childCmd: 'run',
|
|
393
396
|
options: [
|
|
394
397
|
{
|
|
@@ -426,7 +429,6 @@ class RunfRunCommand extends common_1.Command {
|
|
|
426
429
|
const watchFlag = ['--watch', '-w'];
|
|
427
430
|
const defaultIgnoreFiles = ['logs/*.*'];
|
|
428
431
|
if (watchFlag.some((flag) => args.includes(flag))) {
|
|
429
|
-
debugger;
|
|
430
432
|
const cmd = args.filter((arg) => !watchFlag.includes(arg)).join(' ');
|
|
431
433
|
(0, nodemon_1.default)({
|
|
432
434
|
script: '',
|
package/lib/help.js
CHANGED
|
@@ -9,19 +9,19 @@ const outputHelpInfo = () => {
|
|
|
9
9
|
const commands = `
|
|
10
10
|
命令
|
|
11
11
|
|
|
12
|
-
login
|
|
13
|
-
logout
|
|
14
|
-
env
|
|
15
|
-
fn
|
|
16
|
-
framework
|
|
17
|
-
hosting
|
|
18
|
-
new
|
|
19
|
-
open
|
|
20
|
-
storage
|
|
21
|
-
service
|
|
22
|
-
run:deprecated
|
|
23
|
-
run
|
|
24
|
-
|
|
12
|
+
login [options] 登录腾讯云账号
|
|
13
|
+
logout 登出腾讯云账号
|
|
14
|
+
env [cmd] 环境管理操作
|
|
15
|
+
fn [cmd] 操作函数
|
|
16
|
+
framework [cmd] 云开发 Serverless 应用框架操作
|
|
17
|
+
hosting [cmd] 静态托管资源管理操作
|
|
18
|
+
new [appName] [template] 创建新的云开发应用
|
|
19
|
+
open [link] 在浏览器中打开云开发相关连接
|
|
20
|
+
storage [cmd] 云存储资源管理操作
|
|
21
|
+
service [cmd] HTTP 访问服务管理操作
|
|
22
|
+
run:deprecated [cmd] 云托管环境管理操作 (BAAS 或 RUN 类型环境)
|
|
23
|
+
run [cmd] 云托管环境管理操作 (TCBR 类型环境)
|
|
24
|
+
cloudrunfunction [cmd] 云函数 2.0 服务管理操作`;
|
|
25
25
|
const options = `
|
|
26
26
|
选项
|
|
27
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/cli",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "cli tool for cloudbase",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@cloudbase/cloud-api": "^0.5.5",
|
|
35
35
|
"@cloudbase/framework-core": "^1.9.7",
|
|
36
36
|
"@cloudbase/functions-framework": "^1.5.0",
|
|
37
|
-
"@cloudbase/iac-core": "^0.0.3-alpha.
|
|
37
|
+
"@cloudbase/iac-core": "^0.0.3-alpha.2",
|
|
38
38
|
"@cloudbase/lowcode-cli": "^0.22.0",
|
|
39
39
|
"@cloudbase/manager-node": "4.2.8",
|
|
40
40
|
"@cloudbase/toolbox": "^0.7.5",
|