@cloudbase/cli 2.5.1-alpha.1 → 2.5.1-alpha.2

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.
@@ -59,6 +59,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
59
59
  };
60
60
  Object.defineProperty(exports, "__esModule", { value: true });
61
61
  exports.ModelTypeSync = exports.LowCodeDeployApp = exports.LowCodeBuildAppConfig = exports.LowCodePreviewApp = exports.LowCodeBuildApp = exports.LowCodeWatch = void 0;
62
+ const lodash_1 = require("lodash");
62
63
  const common_1 = require("../common");
63
64
  const decorators_1 = require("../../decorators");
64
65
  const utils_1 = require("./utils");
@@ -344,6 +345,18 @@ let ModelTypeSync = class ModelTypeSync extends common_1.Command {
344
345
  envId: ctx.envId
345
346
  }, null, 2), 'utf8');
346
347
  }
348
+ if (!(yield fs_extra_1.default.pathExists('tsconfig.json'))) {
349
+ yield fs_extra_1.default.writeFile('tsconfig.json', JSON.stringify({
350
+ compilerOptions: {
351
+ allowJs: true
352
+ }
353
+ }, null, 2), 'utf8');
354
+ }
355
+ else {
356
+ const config = yield fs_extra_1.default.readJson('tsconfig.json', 'utf8');
357
+ (0, lodash_1.set)(config, 'compilerOptions.allowJs', true);
358
+ yield fs_extra_1.default.writeFile('tsconfig.json', JSON.stringify(config, null, 2), 'utf8');
359
+ }
347
360
  const cloudService = yield getCloudServiceInstance(ctx);
348
361
  const datasourceList = yield cloudService.lowcode.request('DescribeDataSourceList', {
349
362
  EnvId: ctx.envId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cli",
3
- "version": "2.5.1-alpha.1",
3
+ "version": "2.5.1-alpha.2",
4
4
  "description": "cli tool for cloudbase",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {