@cloudbase/cli 2.2.0-alpha.9 → 2.2.0-beta.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/bin/tcb.js CHANGED
@@ -53,12 +53,13 @@ console.log(chalk.gray(`CloudBase Framework ${frameworkPkg.version}`))
53
53
 
54
54
  const yargsParsedResult = yargsParser(process.argv.slice(2));
55
55
  const config = await getCloudBaseConfig(yargsParsedResult.configFile);
56
- const privateSettings = getPrivateSettings(config, yargsParsedResult._?.[0])
57
-
58
- if (privateSettings) {
56
+ const isPrivateEnv = Boolean(getPrivateSettings(config))
57
+ if (isPrivateEnv) {
59
58
  console.log(chalk.gray(`检测到私有化配置`))
60
- // 初始化 lowcode 服务cliapi入口
61
- process.env.CLOUDBASE_LOWCODE_CLOUDAPI_URL = privateSettings.endpoints.cliApi;
59
+ if(privateSettings.endpoints && privateSettings.endpoints.cliApi){
60
+ // 初始化 lowcode 服务cliapi入口
61
+ process.env.CLOUDBASE_LOWCODE_CLOUDAPI_URL = privateSettings.endpoints.cliApi;
62
+ }
62
63
 
63
64
  }
64
65
  // 注册命令
@@ -30,3 +30,4 @@ __exportStar(require("./code-download"), exports);
30
30
  __exportStar(require("./version"), exports);
31
31
  __exportStar(require("./concurrency"), exports);
32
32
  __exportStar(require("./alias"), exports);
33
+ __exportStar(require("./layer"), exports);
@@ -50,7 +50,7 @@ let CreateFileLayer = class CreateFileLayer extends common_1.Command {
50
50
  const { file } = options;
51
51
  const layerName = `${alias}_${envId}`;
52
52
  const filePath = path_1.default.resolve(file);
53
- const runtimes = ['Nodejs8.9', 'Php7', 'Java8'];
53
+ const runtimes = ['Nodejs12.16', 'Nodejs8.9', 'Php7', 'Java8'];
54
54
  const loading = (0, utils_1.loadingFactory)();
55
55
  loading.start('文件层创建中...');
56
56
  yield (0, function_1.createLayer)({
@@ -77,6 +77,10 @@ let LowCodeWatch = class LowCodeWatch extends common_1.Command {
77
77
  {
78
78
  flags: '--wx-devtool-path <wxDevtoolPath>',
79
79
  desc: '微信开发者工具的安装路径'
80
+ },
81
+ {
82
+ flags: '--force-install',
83
+ desc: '是否忽略安装依赖包'
80
84
  }
81
85
  ],
82
86
  desc: '开启微搭低代码的本地构建模式',
@@ -90,7 +94,8 @@ let LowCodeWatch = class LowCodeWatch extends common_1.Command {
90
94
  Promise.resolve().then(() => __importStar(require('@cloudbase/lowcode-cli'))).then((res) => __awaiter(this, void 0, void 0, function* () {
91
95
  yield res.watchApp({
92
96
  watchPort: 8288,
93
- wxDevtoolPath: mergesOptions === null || mergesOptions === void 0 ? void 0 : mergesOptions.wxDevtoolPath
97
+ wxDevtoolPath: options === null || options === void 0 ? void 0 : options.wxDevtoolPath,
98
+ forceInstall: options === null || options === void 0 ? void 0 : options.forceInstall
94
99
  });
95
100
  }));
96
101
  });
@@ -188,7 +193,7 @@ let LowCodeDeployApp = class LowCodeDeployApp extends common_1.Command {
188
193
  projectPath: process.cwd(),
189
194
  logger: log,
190
195
  privateSettings
191
- }, Object.assign(Object.assign({ credential }, restMergedOptions), { projectPath: src }));
196
+ }, Object.assign(Object.assign({ credential }, restMergedOptions), { projectPath: src || restMergedOptions.projectPath }));
192
197
  });
193
198
  }
194
199
  };
@@ -22,7 +22,7 @@ function createLayer(options) {
22
22
  return __awaiter(this, void 0, void 0, function* () {
23
23
  const { contentPath = '', layerName, base64Content = '', runtimes = [] } = options;
24
24
  (0, utils_1.checkFullAccess)(contentPath);
25
- const validRuntime = ['Nodejs8.9', 'Php7', 'Java8'];
25
+ const validRuntime = ['Nodejs8.9', 'Php7', 'Java8', 'Nodejs12.16'];
26
26
  if (runtimes.some(item => validRuntime.indexOf(item) === -1)) {
27
27
  throw new toolbox_1.CloudBaseError(`Invalid runtime value. Now only support: ${validRuntime.join(', ')}`);
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cli",
3
- "version": "2.2.0-alpha.9",
3
+ "version": "2.2.0-beta.1",
4
4
  "description": "cli tool for cloudbase",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -32,9 +32,9 @@
32
32
  "dependencies": {
33
33
  "@cloudbase/cloud-api": "^0.5.5",
34
34
  "@cloudbase/framework-core": "^1.9.6",
35
- "@cloudbase/lowcode-cli": "0.17.0-alpha.9",
35
+ "@cloudbase/lowcode-cli": "^0.18.0",
36
36
  "@cloudbase/manager-node": "4.0.1",
37
- "@cloudbase/toolbox": "^0.7.3",
37
+ "@cloudbase/toolbox": "^0.7.4",
38
38
  "@sentry/node": "^5.10.2",
39
39
  "address": "^1.1.2",
40
40
  "chalk": "^2.4.2",
@@ -14,3 +14,4 @@ export * from './code-download';
14
14
  export * from './version';
15
15
  export * from './concurrency';
16
16
  export * from './alias';
17
+ export * from './layer';