@cloudbase/cli 2.6.3 → 2.6.5

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/tcb.js CHANGED
@@ -41,8 +41,8 @@ async function main() {
41
41
  const currentMajorVersion = +semver.major(process.version)
42
42
 
43
43
  // 定义最小版本和推荐版本
44
- const NODE_MIN_VERSION = 14
45
- const NODE_RECOMMENDED_VERSIONS = [16, 18]
44
+ const NODE_MIN_VERSION = 18
45
+ const NODE_RECOMMENDED_VERSIONS = [18]
46
46
 
47
47
  // 检查当前版本是否满足最小版本要求
48
48
  if (NODE_MIN_VERSION > currentMajorVersion) {
@@ -424,7 +424,7 @@ let RunfRunCommand = class RunfRunCommand extends common_1.Command {
424
424
  }
425
425
  ],
426
426
  requiredEnvId: false,
427
- desc: '本地运行函数式托管代码'
427
+ desc: '本地运行云函数 2.0 代码'
428
428
  };
429
429
  }
430
430
  execute(logger) {
@@ -495,10 +495,13 @@ function _inputServiceName(defaultVal = '') {
495
495
  {
496
496
  type: 'input',
497
497
  name: 'serviceName',
498
- message: '请输入服务名称(只能包含数字、小写字母和-,只能以小写字母开头,最多 20字符)',
498
+ message: '请输入服务名称(支持大小写字母、数字、-和_,但必须以字母开头、以字母和数字结尾,不支持以lcap、lowcode开头,最长45个字符)',
499
499
  default: defaultVal,
500
500
  validate: (val) => {
501
- return /^[a-z][a-z0-9-]{0,19}$/.test(val) ? true : '请输入正确的服务名称';
501
+ const isValid = !val.startsWith('lcap') &&
502
+ !val.startsWith('lowcode') &&
503
+ /^[A-Za-z][\w-_]{0,43}[A-Za-z0-9]$/.test(val);
504
+ return isValid ? true : '请输入正确的服务名称';
502
505
  }
503
506
  }
504
507
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cli",
3
- "version": "2.6.3",
3
+ "version": "2.6.5",
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.4",
37
+ "@cloudbase/iac-core": "^0.0.3-alpha.5",
38
38
  "@cloudbase/lowcode-cli": "^0.22.0",
39
39
  "@cloudbase/manager-node": "4.2.8",
40
40
  "@cloudbase/toolbox": "^0.7.5",