@cloudbase/framework-plugin-low-code 0.6.67 → 0.6.70

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.
Files changed (71) hide show
  1. package/lib/builder/config/common.js +1 -1
  2. package/lib/builder/config/index.js +2 -2
  3. package/lib/builder/config/mp.js +1 -1
  4. package/lib/builder/core/copy.js +3 -3
  5. package/lib/builder/core/generate.d.ts.map +1 -1
  6. package/lib/builder/core/generate.js +11 -11
  7. package/lib/builder/core/index.js +13 -13
  8. package/lib/builder/core/material.js +6 -6
  9. package/lib/builder/core/plugin.js +3 -3
  10. package/lib/builder/core/prepare.js +2 -2
  11. package/lib/builder/core/webpack.js +5 -5
  12. package/lib/builder/mp/index.js +47 -47
  13. package/lib/builder/mp/lowcode.js +4 -4
  14. package/lib/builder/mp/materials.js +16 -16
  15. package/lib/builder/mp/mixMode.js +12 -12
  16. package/lib/builder/mp/mp_config.js +11 -11
  17. package/lib/builder/mp/util.d.ts.map +1 -1
  18. package/lib/builder/mp/util.js +12 -9
  19. package/lib/builder/mp/wxml.d.ts.map +1 -1
  20. package/lib/builder/mp/wxml.js +7 -6
  21. package/lib/builder/service/builder/copy.js +11 -11
  22. package/lib/builder/service/builder/generate.js +58 -54
  23. package/lib/builder/service/builder/index.js +2 -2
  24. package/lib/builder/service/builder/plugin.js +2 -2
  25. package/lib/builder/service/builder/webpack.js +24 -23
  26. package/lib/builder/types/common.js +1 -0
  27. package/lib/builder/util/common.d.ts.map +1 -1
  28. package/lib/builder/util/common.js +8 -6
  29. package/lib/builder/util/console.js +1 -1
  30. package/lib/builder/util/generateFiles.js +2 -2
  31. package/lib/builder/util/index.js +1 -1
  32. package/lib/builder/util/junk.js +4 -2
  33. package/lib/builder/util/mp.js +1 -1
  34. package/lib/builder/util/net.js +1 -1
  35. package/lib/builder/util/style.js +1 -1
  36. package/lib/builder/util/weapp.js +1 -1
  37. package/lib/generate.js +2 -2
  38. package/lib/generator/config/index.js +2 -2
  39. package/lib/generator/core/generate.js +36 -34
  40. package/lib/generator/core/index.js +4 -4
  41. package/lib/generator/core/material.js +14 -14
  42. package/lib/generator/types/common.js +6 -3
  43. package/lib/generator/util/common.d.ts.map +1 -1
  44. package/lib/generator/util/common.js +1 -1
  45. package/lib/generator/util/index.js +1 -1
  46. package/lib/generator/util/style.js +2 -2
  47. package/lib/index.js +58 -53
  48. package/lib/utils/common.d.ts +1 -1
  49. package/lib/utils/common.d.ts.map +1 -1
  50. package/lib/utils/common.js +2 -2
  51. package/lib/utils/dataSource.js +2 -2
  52. package/lib/utils/index.js +1 -1
  53. package/lib/utils/postProcess.js +3 -3
  54. package/lib/weapps-core/config/index.js +1 -1
  55. package/lib/weapps-core/index.js +2 -2
  56. package/lib/weapps-core/types/index.js +1 -1
  57. package/lib/weapps-core/utils/appbuild.js +6 -3
  58. package/lib/weapps-core/utils/common.js +3 -2
  59. package/lib/weapps-core/utils/formily.js +37 -37
  60. package/lib/weapps-core/utils/index.js +1 -1
  61. package/lib/weapps-core/utils/style.js +15 -15
  62. package/package.json +1 -1
  63. package/template/mp/app/weapps-api.js +3 -0
  64. package/template/mp/common/weapp-component.js +26 -7
  65. package/template/mp/common/weapp-page.js +43 -0
  66. package/template/mp/common/widget.js +1 -0
  67. package/template/src/app/global-api.js +22 -0
  68. package/template/src/handlers/FieldMiddleware/renderer.jsx +12 -0
  69. package/template/src/handlers/actionHandler/utils.js +1 -3
  70. package/template/src/handlers/utils/widgets.js +16 -4
  71. package/template/src/pages/composite.tpl +25 -7
package/lib/index.js CHANGED
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
14
14
  var __importStar = (this && this.__importStar) || function (mod) {
15
15
  if (mod && mod.__esModule) return mod;
16
16
  var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
@@ -42,7 +42,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
42
42
  return (mod && mod.__esModule) ? mod : { "default": mod };
43
43
  };
44
44
  Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.plugin = exports.PERSISTENT_DEPENDIENCES_MAP = exports.DIST_PATH = void 0;
45
+ exports.plugin = exports.PERSISTENT_DEPENDIENCES_MAP = exports.DIST_PATH = exports.generator = void 0;
46
46
  exports.generator = __importStar(require("./generator/core/index"));
47
47
  const fs_extra_1 = __importDefault(require("fs-extra"));
48
48
  const path_1 = __importDefault(require("path"));
@@ -123,7 +123,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
123
123
  if (this._checkIsVersion(this._resolvedInputs.calsVersion)) {
124
124
  const cals = this._resolvedInputs.mainAppSerializeData;
125
125
  if (!this._resolvedInputs.mainAppSerializeData.mpPkgUrl) {
126
- this._resolvedInputs.mainAppSerializeData = cals_1.deserializePlatformApp(cals, { dependencies: this._resolvedInputs.dependencies });
126
+ this._resolvedInputs.mainAppSerializeData = (0, cals_1.deserializePlatformApp)(cals, { dependencies: this._resolvedInputs.dependencies });
127
127
  if ((_a = cals.extra) === null || _a === void 0 ? void 0 : _a.miniprogramPlugins) {
128
128
  this._resolvedInputs.mainAppSerializeData.miniprogramPlugins = cals.extra.miniprogramPlugins.map((plugin) => {
129
129
  var _a;
@@ -153,23 +153,23 @@ class LowCodePlugin extends framework_core_1.Plugin {
153
153
  }
154
154
  }
155
155
  else {
156
- this._resolvedInputs.mainAppSerializeData = common_1.processPkgUrlCals2WeappData(cals);
156
+ this._resolvedInputs.mainAppSerializeData = (0, common_1.processPkgUrlCals2WeappData)(cals);
157
157
  }
158
158
  }
159
159
  if (!((_b = this._resolvedInputs.mainAppSerializeData) === null || _b === void 0 ? void 0 : _b.envId)) {
160
160
  this._resolvedInputs.mainAppSerializeData.envId = envId;
161
161
  }
162
- if (common_2.buildAsWebByBuildType(this._resolvedInputs.buildTypeList)) {
162
+ if ((0, common_2.buildAsWebByBuildType)(this._resolvedInputs.buildTypeList)) {
163
163
  const { appId, mainAppSerializeData } = this._resolvedInputs;
164
164
  let { appConfig = {} } = mainAppSerializeData;
165
165
  let { window = {} } = appConfig;
166
166
  let path = this._getWebRootPath();
167
167
  window.publicPath = path;
168
- window.basename = common_2.buildAsAdminPortalByBuildType(this._resolvedInputs.buildTypeList)
168
+ window.basename = (0, common_2.buildAsAdminPortalByBuildType)(this._resolvedInputs.buildTypeList)
169
169
  ? `app/${appId}${((_c = this._resolvedInputs.deployOptions) === null || _c === void 0 ? void 0 : _c.mode) !== types_1.DEPLOY_MODE.UPLOAD
170
170
  ? '-preview'
171
171
  : ''}`
172
- : common_2.buildAsXPageByBuildType(this._resolvedInputs.buildTypeList)
172
+ : (0, common_2.buildAsXPageByBuildType)(this._resolvedInputs.buildTypeList)
173
173
  ? '/'
174
174
  : path;
175
175
  appConfig.window = window;
@@ -253,7 +253,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
253
253
  },
254
254
  });
255
255
  }
256
- else if (common_2.buildAsWebByBuildType(buildTypeList)) {
256
+ else if ((0, common_2.buildAsWebByBuildType)(buildTypeList)) {
257
257
  this._webPlugin = new framework_plugin_website_1.plugin('web', this.api, {
258
258
  outputPath: exports.DIST_PATH,
259
259
  cloudPath: this._getWebRootPath(),
@@ -310,12 +310,12 @@ class LowCodePlugin extends framework_core_1.Plugin {
310
310
  subAppSerializeDataList = subAppSerializeDataList === null || subAppSerializeDataList === void 0 ? void 0 : subAppSerializeDataList.map((item) => {
311
311
  if (this._checkIsVersion(calsVersion)) {
312
312
  return item.mpPkgUrl
313
- ? common_1.processPkgUrlCals2WeappData(item)
314
- : cals_1.deserializePlatformApp(item, { dependencies });
313
+ ? (0, common_1.processPkgUrlCals2WeappData)(item)
314
+ : (0, cals_1.deserializePlatformApp)(item, { dependencies });
315
315
  }
316
316
  return item;
317
317
  });
318
- const nodeModulesPath = common_1.getValidNodeModulesPath();
318
+ const nodeModulesPath = (0, common_1.getValidNodeModulesPath)();
319
319
  let miniAppDir = '';
320
320
  let webAppDir = '';
321
321
  const h5url = `./${appId}/index.html`;
@@ -334,10 +334,10 @@ class LowCodePlugin extends framework_core_1.Plugin {
334
334
  throw e;
335
335
  }
336
336
  const domain = ((_b = this._website) === null || _b === void 0 ? void 0 : _b.cdnDomain) || ((_c = mainAppSerializeData.extra) === null || _c === void 0 ? void 0 : _c.domain);
337
- if (common_2.buildAsWebByBuildType(buildTypeList)) {
337
+ if ((0, common_2.buildAsWebByBuildType)(buildTypeList)) {
338
338
  let { appConfig = {} } = mainAppSerializeData;
339
339
  let { window = {} } = appConfig;
340
- if (common_2.buildAsXPageByBuildType(buildTypeList)) {
340
+ if ((0, common_2.buildAsXPageByBuildType)(buildTypeList)) {
341
341
  window.publicPath =
342
342
  ((_d = this._resolvedInputs.deployOptions) === null || _d === void 0 ? void 0 : _d.publicPath) ||
343
343
  `https://${domain}${this._getWebRootPath()}`;
@@ -359,7 +359,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
359
359
  if (this._gatewayConfig) {
360
360
  const path = this._gatewayConfig.Path;
361
361
  window.publicPath = `https://${domain}${this._getWebRootPath()}`;
362
- if (!common_2.buildAsAdminPortalByBuildType(buildTypeList)) {
362
+ if (!(0, common_2.buildAsAdminPortalByBuildType)(buildTypeList)) {
363
363
  window.basename = path;
364
364
  }
365
365
  }
@@ -383,7 +383,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
383
383
  this._appPath = yield new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
384
384
  var _g, _h;
385
385
  try {
386
- yield core_1.default({
386
+ yield (0, core_1.default)({
387
387
  mainAppSerializeData,
388
388
  subAppSerializeDataList,
389
389
  dependencies,
@@ -400,7 +400,8 @@ class LowCodePlugin extends framework_core_1.Plugin {
400
400
  isCleanDistDir: false,
401
401
  plugins,
402
402
  extraData,
403
- isCrossAccount: this._resolvedInputs.mpAppId !== ((_h = this._resolvedInputs.deployOptions) === null || _h === void 0 ? void 0 : _h.targetMpAppId),
403
+ isCrossAccount: this._resolvedInputs.mpAppId !==
404
+ ((_h = this._resolvedInputs.deployOptions) === null || _h === void 0 ? void 0 : _h.targetMpAppId),
404
405
  resourceAppid: this._resolvedInputs.mpAppId,
405
406
  domain,
406
407
  }, (err, result) => __awaiter(this, void 0, void 0, function* () {
@@ -413,27 +414,27 @@ class LowCodePlugin extends framework_core_1.Plugin {
413
414
  if (buildTypeList.includes("mp")) {
414
415
  miniAppDir = outDir;
415
416
  }
416
- if (common_2.buildAsWebByBuildType(buildTypeList)) {
417
+ if ((0, common_2.buildAsWebByBuildType)(buildTypeList)) {
417
418
  webAppDir = path_1.default.resolve(outDir, 'preview');
418
419
  }
419
420
  logger.debug(`=== Compilation finished at ${outDir}, elapsed time: ${timeElapsed / 1000}s.===\n`);
420
421
  if (buildTypeList.includes("mp") && miniAppDir) {
421
422
  let projectJsonPath = path_1.default.resolve(miniAppDir, 'project.config.json');
422
- yield postProcess_1.postprocessProjectConfig(projectJsonPath, {
423
+ yield (0, postProcess_1.postprocessProjectConfig)(projectJsonPath, {
423
424
  appid: this._resolvedInputs.deployOptions.mpAppId,
424
425
  cloudfunctionRoot: undefined,
425
426
  });
426
- yield postProcess_1.postprocessDeployExtraJson(miniAppDir, this._resolvedInputs.deployOptions);
427
+ yield (0, postProcess_1.postprocessDeployExtraJson)(miniAppDir, this._resolvedInputs.deployOptions);
427
428
  if (generateMpType === "app") {
428
429
  fs_extra_1.default.removeSync(path_1.default.resolve(miniAppDir, 'miniprogram_npm'));
429
430
  }
430
431
  if (outDir) {
431
432
  if (plugins) {
432
- yield generate_1.handleMpPlugins(plugins, outDir);
433
+ yield (0, generate_1.handleMpPlugins)(plugins, outDir);
433
434
  }
434
435
  }
435
436
  }
436
- else if (common_2.buildAsWebByBuildType(buildTypeList) && webAppDir) {
437
+ else if ((0, common_2.buildAsWebByBuildType)(buildTypeList) && webAppDir) {
437
438
  const staticAppDir = path_1.default.join(staticDir, publicPath);
438
439
  fs_extra_1.default.ensureDirSync(staticAppDir);
439
440
  }
@@ -443,8 +444,8 @@ class LowCodePlugin extends framework_core_1.Plugin {
443
444
  }
444
445
  else if (webAppDir) {
445
446
  fs_extra_1.default.copySync(webAppDir, distPath);
446
- if (common_2.buildAsWebByBuildType(buildTypeList) &&
447
- !common_2.buildAsAdminPortalByBuildType(buildTypeList) &&
447
+ if ((0, common_2.buildAsWebByBuildType)(buildTypeList) &&
448
+ !(0, common_2.buildAsAdminPortalByBuildType)(buildTypeList) &&
448
449
  this._checkBroswerHisroty()) {
449
450
  yield Promise.all((((_j = this._resolvedInputs.mainAppSerializeData) === null || _j === void 0 ? void 0 : _j.pageInstanceList) || []).map((page) => fs_extra_1.default.copy(path_1.default.join(distPath, 'index.html'), path_1.default.join(distPath, page.id, 'index.html'))));
450
451
  }
@@ -543,9 +544,9 @@ class LowCodePlugin extends framework_core_1.Plugin {
543
544
  this.api.logger.error('设置登录配置失败', e);
544
545
  }
545
546
  if (this._miniprogramePlugin) {
546
- res = lodash_1.merge(res, yield this._miniprogramePlugin.compile());
547
+ res = (0, lodash_1.merge)(res, yield this._miniprogramePlugin.compile());
547
548
  }
548
- else if (common_2.buildAsWebByBuildType(this._resolvedInputs.buildTypeList) &&
549
+ else if ((0, common_2.buildAsWebByBuildType)(this._resolvedInputs.buildTypeList) &&
549
550
  this._webPlugin) {
550
551
  try {
551
552
  const HostingProvider = (_a = this.api.resourceProviders) === null || _a === void 0 ? void 0 : _a.hosting;
@@ -622,7 +623,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
622
623
  }
623
624
  else if (this._webPlugin) {
624
625
  yield this._webPlugin.deploy();
625
- if (common_2.buildAsAdminPortalByBuildType(this._resolvedInputs.buildTypeList)) {
626
+ if ((0, common_2.buildAsAdminPortalByBuildType)(this._resolvedInputs.buildTypeList)) {
626
627
  yield this._postProcessAdminPortal();
627
628
  }
628
629
  else {
@@ -652,7 +653,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
652
653
  try {
653
654
  const { deployOptions, appId } = this._resolvedInputs;
654
655
  const isPreview = (deployOptions === null || deployOptions === void 0 ? void 0 : deployOptions.mode) === types_1.DEPLOY_MODE.PREVIEW;
655
- const link = common_2.buildAsAdminPortalByBuildType(this._resolvedInputs.buildTypeList)
656
+ const link = (0, common_2.buildAsAdminPortalByBuildType)(this._resolvedInputs.buildTypeList)
656
657
  ? `https://${this._website.cdnDomain}/adminportal/#/app/${isPreview ? `${appId}-preview` : appId}?envType=${isPreview ? 'preview' : 'prod'}`
657
658
  : this._gatewayConfig
658
659
  ? `https://${this._gatewayConfig.Domain + this._gatewayConfig.Path}`
@@ -732,7 +733,8 @@ class LowCodePlugin extends framework_core_1.Plugin {
732
733
  .filter((f) => {
733
734
  var _a, _b;
734
735
  if (codeExtensions.has(f.ext) &&
735
- !f.moduleId && ((_b = (_a = f.path) === null || _a === void 0 ? void 0 : _a.startsWith) === null || _b === void 0 ? void 0 : _b.call(_a, 'materials/'))) {
736
+ !f.moduleId &&
737
+ ((_b = (_a = f.path) === null || _a === void 0 ? void 0 : _a.startsWith) === null || _b === void 0 ? void 0 : _b.call(_a, 'materials/'))) {
736
738
  return true;
737
739
  }
738
740
  return false;
@@ -798,17 +800,18 @@ class LowCodePlugin extends framework_core_1.Plugin {
798
800
  const zipPath = path_1.default.resolve(this.api.projectPath, `${this._resolvedInputs.appId}.zip`);
799
801
  yield this._zipDir(path_1.default.resolve(this.api.projectPath, exports.DIST_PATH), zipPath);
800
802
  let { credential, storage } = this._resolvedInputs;
801
- let cos = (credential === null || credential === void 0 ? void 0 : credential.token) ? new cos_nodejs_sdk_v5_1.default({
802
- getAuthorization: function (options, callback) {
803
- callback({
804
- TmpSecretId: (credential === null || credential === void 0 ? void 0 : credential.secretId) || '',
805
- TmpSecretKey: (credential === null || credential === void 0 ? void 0 : credential.secretKey) || '',
806
- XCosSecurityToken: (credential === null || credential === void 0 ? void 0 : credential.token) || '',
807
- ExpiredTime: Math.floor(Date.now() / 1000) + 600,
808
- StartTime: Math.floor(Date.now() / 1000),
809
- });
810
- },
811
- })
803
+ let cos = (credential === null || credential === void 0 ? void 0 : credential.token)
804
+ ? new cos_nodejs_sdk_v5_1.default({
805
+ getAuthorization: function (options, callback) {
806
+ callback({
807
+ TmpSecretId: (credential === null || credential === void 0 ? void 0 : credential.secretId) || '',
808
+ TmpSecretKey: (credential === null || credential === void 0 ? void 0 : credential.secretKey) || '',
809
+ XCosSecurityToken: (credential === null || credential === void 0 ? void 0 : credential.token) || '',
810
+ ExpiredTime: Math.floor(Date.now() / 1000) + 600,
811
+ StartTime: Math.floor(Date.now() / 1000),
812
+ });
813
+ },
814
+ })
812
815
  : new cos_nodejs_sdk_v5_1.default({
813
816
  SecretId: credential === null || credential === void 0 ? void 0 : credential.secretId,
814
817
  SecretKey: credential === null || credential === void 0 ? void 0 : credential.secretKey,
@@ -894,17 +897,18 @@ class LowCodePlugin extends framework_core_1.Plugin {
894
897
  return __awaiter(this, void 0, void 0, function* () {
895
898
  let promises = [];
896
899
  let { credential } = this._resolvedInputs;
897
- let cos = (credential === null || credential === void 0 ? void 0 : credential.token) ? new cos_nodejs_sdk_v5_1.default({
898
- getAuthorization: function (options, callback) {
899
- callback({
900
- TmpSecretId: (credential === null || credential === void 0 ? void 0 : credential.secretId) || '',
901
- TmpSecretKey: (credential === null || credential === void 0 ? void 0 : credential.secretKey) || '',
902
- XCosSecurityToken: (credential === null || credential === void 0 ? void 0 : credential.token) || '',
903
- ExpiredTime: Math.floor(Date.now() / 1000) + 600,
904
- StartTime: Math.floor(Date.now() / 1000),
905
- });
906
- },
907
- })
900
+ let cos = (credential === null || credential === void 0 ? void 0 : credential.token)
901
+ ? new cos_nodejs_sdk_v5_1.default({
902
+ getAuthorization: function (options, callback) {
903
+ callback({
904
+ TmpSecretId: (credential === null || credential === void 0 ? void 0 : credential.secretId) || '',
905
+ TmpSecretKey: (credential === null || credential === void 0 ? void 0 : credential.secretKey) || '',
906
+ XCosSecurityToken: (credential === null || credential === void 0 ? void 0 : credential.token) || '',
907
+ ExpiredTime: Math.floor(Date.now() / 1000) + 600,
908
+ StartTime: Math.floor(Date.now() / 1000),
909
+ });
910
+ },
911
+ })
908
912
  : new cos_nodejs_sdk_v5_1.default({
909
913
  SecretId: credential === null || credential === void 0 ? void 0 : credential.secretId,
910
914
  SecretKey: credential === null || credential === void 0 ? void 0 : credential.secretKey,
@@ -959,7 +963,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
959
963
  return __awaiter(this, void 0, void 0, function* () {
960
964
  return new Promise((resolve, reject) => {
961
965
  var output = fs_extra_1.default.createWriteStream(dist);
962
- var archive = archiver_1.default('zip', {
966
+ var archive = (0, archiver_1.default)('zip', {
963
967
  zlib: { level: 9 },
964
968
  });
965
969
  output.on('close', resolve);
@@ -974,7 +978,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
974
978
  var _a, _b;
975
979
  return __awaiter(this, void 0, void 0, function* () {
976
980
  const { appId, buildTypeList, mainAppSerializeData, deployOptions, } = this._resolvedInputs;
977
- if (common_2.buildAsAdminPortalByBuildType(buildTypeList)) {
981
+ if ((0, common_2.buildAsAdminPortalByBuildType)(buildTypeList)) {
978
982
  try {
979
983
  const isPreview = (deployOptions === null || deployOptions === void 0 ? void 0 : deployOptions.mode) === types_1.DEPLOY_MODE.PREVIEW;
980
984
  const id = isPreview ? `${appId}-preview` : appId;
@@ -1117,7 +1121,8 @@ class LowCodePlugin extends framework_core_1.Plugin {
1117
1121
  }
1118
1122
  _checkBroswerHisroty() {
1119
1123
  var _a;
1120
- let historyType = ((_a = this._resolvedInputs.mainAppSerializeData) === null || _a === void 0 ? void 0 : _a.historyType) ? types_1.HISTORY_TYPE.HASH
1124
+ let historyType = ((_a = this._resolvedInputs.mainAppSerializeData) === null || _a === void 0 ? void 0 : _a.historyType)
1125
+ ? types_1.HISTORY_TYPE.HASH
1121
1126
  : '';
1122
1127
  return !historyType || historyType === types_1.HISTORY_TYPE.BROWSER;
1123
1128
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import * as childProcess from 'child_process';
3
- export declare function setReadOnly(target: object, key: string, v: any, deep?: boolean): any;
3
+ export declare function setReadOnly(target: object, key: string, v: any, deep?: boolean): object;
4
4
  export declare type PromiseResult<T> = Promise<[null, T] | [Error, null]>;
5
5
  export declare function promiseWrapper<T>(p: Promise<T>): PromiseResult<T>;
6
6
  export declare const isWindows: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":";AAMA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAU9C,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,UAAO,OAoB3E;AAED,oBAAY,aAAa,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AAClE,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAQjE;AAED,eAAO,MAAM,SAAS,SAA+B,CAAC;AACtD,eAAO,MAAM,KAAK,SAAgC,CAAC;AACnD,eAAO,MAAM,OAAO,SAA+B,CAAC;AAEpD,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EAAE,EACnB,QAAQ,EAAE,MAAM,EAChB,IAAI,KAAK,oBAgBV;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,EAAE;QACZ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;IACF,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AACD,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAEvE;AAED,wBAAsB,MAAM,CAAC,GAAG,EAAE,MAAM,iBAEvC;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrD;AAKD,wBAAgB,aAAa,YAE5B;AAED,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,EAC5B,OAAO,CAAC,EAAE,YAAY,CAAC,YAAY,oBA2BpC;AAED,wBAAgB,uBAAuB,WAOtC;AAED,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAI,UAE7C;AAED,wBAAgB,WAAW,uBAe1B;AAED,wBAAgB,2BAA2B,CAAC,IAAI,KAAA,OAO/C"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/utils/common.ts"],"names":[],"mappings":";AAMA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAU9C,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,UAAO,UAoB3E;AAED,oBAAY,aAAa,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AAClE,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAQjE;AAED,eAAO,MAAM,SAAS,SAA+B,CAAC;AACtD,eAAO,MAAM,KAAK,SAAgC,CAAC;AACnD,eAAO,MAAM,OAAO,SAA+B,CAAC;AAEpD,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EAAE,EACnB,QAAQ,EAAE,MAAM,EAChB,IAAI,KAAK,oBAgBV;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,EAAE;QACZ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;IACF,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AACD,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAEvE;AAED,wBAAsB,MAAM,CAAC,GAAG,EAAE,MAAM,iBAEvC;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKrD;AAKD,wBAAgB,aAAa,YAE5B;AAED,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,EAC5B,OAAO,CAAC,EAAE,YAAY,CAAC,YAAY,oBA2BpC;AAED,wBAAgB,uBAAuB,WAOtC;AAED,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAI,UAE7C;AAED,wBAAgB,WAAW,uBAe1B;AAED,wBAAgB,2BAA2B,CAAC,IAAI,KAAA,OAO/C"}
@@ -79,7 +79,7 @@ function compressingZip(entryList, distPath, opts = {}) {
79
79
  zipStream.addEntry(entry, opts);
80
80
  });
81
81
  const destStream = fs_extra_1.default.createWriteStream(distPath);
82
- pump_1.default(zipStream, destStream, (err) => {
82
+ (0, pump_1.default)(zipStream, destStream, (err) => {
83
83
  if (err) {
84
84
  console.error(err);
85
85
  reject(err);
@@ -115,7 +115,7 @@ exports.isWinPlatform = isWinPlatform;
115
115
  function spawnPro(command, args, options) {
116
116
  return new Promise((resolve, reject) => {
117
117
  var _a, _b;
118
- const process = cross_spawn_1.default(command, args, options);
118
+ const process = (0, cross_spawn_1.default)(command, args, options);
119
119
  let strOut = '';
120
120
  let strErr = '';
121
121
  (_a = process.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
@@ -39,7 +39,7 @@ function mergeDependencies(...pkgs) {
39
39
  ? 'latest'
40
40
  : formated.dependencies[key];
41
41
  }
42
- const merged = merge_package_json_1.default(formated, acc);
42
+ const merged = (0, merge_package_json_1.default)(formated, acc);
43
43
  return JSON.parse(merged);
44
44
  }, result);
45
45
  return result.dependencies;
@@ -147,7 +147,7 @@ function _generateDynamicDataset(dataset) {
147
147
  processed[paramKey] = `${config_1.REPLACE_SIGN}(app, $page) => (${typeof value === 'string' ? `'${value}'` : JSON.stringify(value)})${config_1.REPLACE_SIGN}`;
148
148
  }
149
149
  else {
150
- let jsExp = util_1.generateDataBind(bind);
150
+ let jsExp = (0, util_1.generateDataBind)(bind);
151
151
  processed[paramKey] = `${config_1.REPLACE_SIGN}(app, $page) => (\n${jsExp}\n)${config_1.REPLACE_SIGN}`;
152
152
  }
153
153
  }
@@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
7
7
  o[k2] = m[k];
8
8
  }));
9
9
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./common"), exports);
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
14
14
  var __importStar = (this && this.__importStar) || function (mod) {
15
15
  if (mod && mod.__esModule) return mod;
16
16
  var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
18
  __setModuleDefault(result, mod);
19
19
  return result;
20
20
  };
@@ -28,7 +28,7 @@ const lodash_1 = require("lodash");
28
28
  const path_1 = __importDefault(require("path"));
29
29
  function postprocessProjectConfig(projectJsonPath, data) {
30
30
  let projectJson = fs_extra_1.default.readJsonSync(projectJsonPath);
31
- fs_extra_1.default.writeJsonSync(projectJsonPath, lodash_1.merge(projectJson, data), { spaces: 2 });
31
+ fs_extra_1.default.writeJsonSync(projectJsonPath, (0, lodash_1.merge)(projectJson, data), { spaces: 2 });
32
32
  }
33
33
  exports.postprocessProjectConfig = postprocessProjectConfig;
34
34
  function postprocessDeployExtraJson(projectPath, deployOptions) {
@@ -37,7 +37,7 @@ function postprocessDeployExtraJson(projectPath, deployOptions) {
37
37
  let projectJson = fs_extra_1.default.readJsonSync(path_1.default.resolve(projectPath, 'project.config.json'));
38
38
  const miniprogramRoot = (projectJson === null || projectJson === void 0 ? void 0 : projectJson.miniprogramRoot) || './';
39
39
  const extPaht = path_1.default.resolve(projectPath, miniprogramRoot, 'ext.json');
40
- const extJson = Object.assign(Object.assign({}, (fs_extra_1.default.existsSync(extPaht) ? fs_extra_1.readJsonSync(extPaht) : {})), { extEnable: true, extAppid: targetMpAppId, directCommit: true });
40
+ const extJson = Object.assign(Object.assign({}, (fs_extra_1.default.existsSync(extPaht) ? (0, fs_extra_1.readJsonSync)(extPaht) : {})), { extEnable: true, extAppid: targetMpAppId, directCommit: true });
41
41
  fs_extra_1.default.writeFileSync(extPaht, JSON.stringify(extJson, null, 2));
42
42
  }
43
43
  }
@@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
7
7
  o[k2] = m[k];
8
8
  }));
9
9
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./style"), exports);
@@ -12,12 +12,12 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
12
12
  o["default"] = v;
13
13
  });
14
14
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
16
  };
17
17
  var __importStar = (this && this.__importStar) || function (mod) {
18
18
  if (mod && mod.__esModule) return mod;
19
19
  var result = {};
20
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
20
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
21
21
  __setModuleDefault(result, mod);
22
22
  return result;
23
23
  };
@@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
7
7
  o[k2] = m[k];
8
8
  }));
9
9
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./material"), exports);
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPublishAppId = exports.biggerThanVersion = exports.checkVersion = exports.INIT_VERSION = void 0;
4
4
  const appbuild_1 = require("../types/appbuild");
5
5
  exports.INIT_VERSION = '0.0.0';
6
- exports.checkVersion = (value) => {
6
+ const checkVersion = (value) => {
7
7
  return /^\d+\.\d+(\.\d+){0,2}$/.test(value);
8
8
  };
9
- exports.biggerThanVersion = (value = '', lastVersion = '') => {
9
+ exports.checkVersion = checkVersion;
10
+ const biggerThanVersion = (value = '', lastVersion = '') => {
10
11
  const nowVersions = value
11
12
  .split('.')
12
13
  .map((item) => (Number.isNaN(parseInt(item)) ? 0 : parseInt(item)));
@@ -28,10 +29,12 @@ exports.biggerThanVersion = (value = '', lastVersion = '') => {
28
29
  }
29
30
  return false;
30
31
  };
31
- exports.getPublishAppId = (codingPublishType, outputs) => {
32
+ exports.biggerThanVersion = biggerThanVersion;
33
+ const getPublishAppId = (codingPublishType, outputs) => {
32
34
  return codingPublishType === appbuild_1.CodingPublishType.Android
33
35
  ? outputs.appid
34
36
  : codingPublishType === appbuild_1.CodingPublishType.iOS
35
37
  ? outputs.iOSappId
36
38
  : 'main';
37
39
  };
40
+ exports.getPublishAppId = getPublishAppId;
@@ -36,7 +36,7 @@ function isPlainObject(src) {
36
36
  return Object.prototype.toString.call(src) === '[object Object]';
37
37
  }
38
38
  exports.isPlainObject = isPlainObject;
39
- exports.isEmptyObj = (obj) => {
39
+ const isEmptyObj = (obj) => {
40
40
  if (!isPlainObject(obj)) {
41
41
  return false;
42
42
  }
@@ -47,6 +47,7 @@ exports.isEmptyObj = (obj) => {
47
47
  }
48
48
  return true;
49
49
  };
50
+ exports.isEmptyObj = isEmptyObj;
50
51
  function setValidValue(target, key, value) {
51
52
  if (value === undefined || value === null) {
52
53
  return;
@@ -54,7 +55,7 @@ function setValidValue(target, key, value) {
54
55
  if (isArray(value) && value.length === 0) {
55
56
  return;
56
57
  }
57
- if (isPlainObject(value) && exports.isEmptyObj(value)) {
58
+ if (isPlainObject(value) && (0, exports.isEmptyObj)(value)) {
58
59
  return;
59
60
  }
60
61
  if (!target) {
@@ -17,9 +17,9 @@ function serialize(webRuntimeAppData) {
17
17
  vars: webRuntimeAppData.vars || { data: [] },
18
18
  dataset: webRuntimeAppData.dataset,
19
19
  };
20
- common_1.setValidValue(weAppData, 'appConfig', webRuntimeAppData.appConfig);
21
- common_1.setValidValue(weAppData, 'themeVars', webRuntimeAppData.themeVars);
22
- common_1.setValidValue(weAppData, 'presetColors', webRuntimeAppData.presetColors);
20
+ (0, common_1.setValidValue)(weAppData, 'appConfig', webRuntimeAppData.appConfig);
21
+ (0, common_1.setValidValue)(weAppData, 'themeVars', webRuntimeAppData.themeVars);
22
+ (0, common_1.setValidValue)(weAppData, 'presetColors', webRuntimeAppData.presetColors);
23
23
  handlePageInstanceList(webRuntimeAppData.pageInstanceList, weAppData.pageInstanceList);
24
24
  function handlePageInstanceList(pageInstanceList, collection) {
25
25
  pageInstanceList.map((pageData) => {
@@ -27,20 +27,20 @@ function serialize(webRuntimeAppData) {
27
27
  const newPage = {
28
28
  id: pageData.id,
29
29
  };
30
- common_1.setValidValue(newPage, 'isHome', pageData.isHome);
31
- common_1.setValidValue(newPage, 'data', readDynamicData(pageData));
32
- common_1.setValidValue(newPage, 'commonStyle', style_1.removeInvalidStyleFormValue(pageData.style));
33
- common_1.setValidValue(newPage, 'styleBindPath', pageData.styleBindPath);
34
- if (common_1.isValidStyleBind(pageData.styleBind)) {
35
- common_1.setValidValue(newPage, 'styleBind', pageData.styleBind);
30
+ (0, common_1.setValidValue)(newPage, 'isHome', pageData.isHome);
31
+ (0, common_1.setValidValue)(newPage, 'data', readDynamicData(pageData));
32
+ (0, common_1.setValidValue)(newPage, 'commonStyle', (0, style_1.removeInvalidStyleFormValue)(pageData.style));
33
+ (0, common_1.setValidValue)(newPage, 'styleBindPath', pageData.styleBindPath);
34
+ if ((0, common_1.isValidStyleBind)(pageData.styleBind)) {
35
+ (0, common_1.setValidValue)(newPage, 'styleBind', pageData.styleBind);
36
36
  }
37
- if (common_1.isValidClassNameListBind(pageData.classNameListBind)) {
38
- common_1.setValidValue(newPage, 'classNameListBind', pageData.classNameListBind);
37
+ if ((0, common_1.isValidClassNameListBind)(pageData.classNameListBind)) {
38
+ (0, common_1.setValidValue)(newPage, 'classNameListBind', pageData.classNameListBind);
39
39
  }
40
- common_1.setValidValue(newPage, 'componentInstances', readComponents(pageData.componentSchemaJson.properties));
41
- common_1.setValidValue(newPage, 'listeners', readListeners(pageData.listenerInstances));
42
- common_1.setValidValue(newPage, 'pluginInstances', pageData.pluginInstances);
43
- common_1.setValidValue(newPage, 'lowCodes', pageData.codeModules);
40
+ (0, common_1.setValidValue)(newPage, 'componentInstances', readComponents(pageData.componentSchemaJson.properties));
41
+ (0, common_1.setValidValue)(newPage, 'listeners', readListeners(pageData.listenerInstances));
42
+ (0, common_1.setValidValue)(newPage, 'pluginInstances', pageData.pluginInstances);
43
+ (0, common_1.setValidValue)(newPage, 'lowCodes', pageData.codeModules);
44
44
  if ((_a = pageData.children) === null || _a === void 0 ? void 0 : _a.length) {
45
45
  newPage.children = newPage.children || [];
46
46
  handlePageInstanceList(pageData.children, newPage.children);
@@ -60,41 +60,41 @@ function serialize(webRuntimeAppData) {
60
60
  if (srcProps) {
61
61
  const cmpParts = srcProps.sourceKey.split(':');
62
62
  cmps[key] = { genericComp: srcCmp['genericComp'] };
63
- common_1.setValidValue(cmps[key], 'xComponent', {
63
+ (0, common_1.setValidValue)(cmps[key], 'xComponent', {
64
64
  moduleName: cmpParts[0],
65
65
  name: cmpParts[1],
66
66
  });
67
67
  const componentXProps = {};
68
- common_1.setValidValue(componentXProps, 'data', readDynamicData(srcProps));
69
- common_1.setValidValue(componentXProps, 'listeners', readListeners(srcProps.listenerInstances));
70
- common_1.setValidValue(componentXProps, 'staticResourceAttribute', srcProps.staticResourceAttribute);
71
- common_1.setValidValue(componentXProps, 'directives', readDirectives(srcProps));
72
- common_1.setValidValue(componentXProps, 'customDataForm', srcProps.customDataForm);
73
- common_1.setValidValue(componentXProps, 'style', srcProps.style);
74
- common_1.setValidValue(componentXProps, 'commonStyle', style_1.removeInvalidStyleFormValue(srcProps.commonStyle));
75
- common_1.setValidValue(componentXProps, 'styleBindPath', srcProps.styleBindPath);
68
+ (0, common_1.setValidValue)(componentXProps, 'data', readDynamicData(srcProps));
69
+ (0, common_1.setValidValue)(componentXProps, 'listeners', readListeners(srcProps.listenerInstances));
70
+ (0, common_1.setValidValue)(componentXProps, 'staticResourceAttribute', srcProps.staticResourceAttribute);
71
+ (0, common_1.setValidValue)(componentXProps, 'directives', readDirectives(srcProps));
72
+ (0, common_1.setValidValue)(componentXProps, 'customDataForm', srcProps.customDataForm);
73
+ (0, common_1.setValidValue)(componentXProps, 'style', srcProps.style);
74
+ (0, common_1.setValidValue)(componentXProps, 'commonStyle', (0, style_1.removeInvalidStyleFormValue)(srcProps.commonStyle));
75
+ (0, common_1.setValidValue)(componentXProps, 'styleBindPath', srcProps.styleBindPath);
76
76
  if ((_a = srcProps.styleBind) === null || _a === void 0 ? void 0 : _a.bindDataPath) {
77
77
  componentXProps.styleBind = {
78
78
  type: srcProps.styleBind.type,
79
79
  value: srcProps.styleBind.bindDataPath,
80
80
  };
81
81
  }
82
- if (common_1.isValidClassNameListBind(srcProps.classNameListBind)) {
82
+ if ((0, common_1.isValidClassNameListBind)(srcProps.classNameListBind)) {
83
83
  const classList = srcProps.classNameListBind;
84
- common_1.setValidValue(componentXProps, 'classListBind', {
84
+ (0, common_1.setValidValue)(componentXProps, 'classListBind', {
85
85
  type: classList.type,
86
86
  value: classList.bindDataPath,
87
87
  });
88
88
  }
89
89
  if (srcProps.classNameList) {
90
- common_1.setValidValue(componentXProps, 'classList', srcProps.classNameList);
90
+ (0, common_1.setValidValue)(componentXProps, 'classList', srcProps.classNameList);
91
91
  }
92
- common_1.setValidValue(cmps[key], 'xProps', componentXProps);
93
- common_1.setValidValue(cmps[key], 'xIndex', srcCmp['x-index']);
92
+ (0, common_1.setValidValue)(cmps[key], 'xProps', componentXProps);
93
+ (0, common_1.setValidValue)(cmps[key], 'xIndex', srcCmp['x-index']);
94
94
  const excludeKeys = (srcProps.dataTypes || [])
95
95
  .filter((dataType) => dataType.type !== 'slot')
96
96
  .map((dataType) => dataType.propertyPath);
97
- common_1.setValidValue(cmps[key], 'properties', readComponents(srcCmp.properties, excludeKeys));
97
+ (0, common_1.setValidValue)(cmps[key], 'properties', readComponents(srcCmp.properties, excludeKeys));
98
98
  }
99
99
  else {
100
100
  cmps[key] = { properties: readComponents(srcCmp.properties) };
@@ -212,7 +212,7 @@ function deserialize(weAppData) {
212
212
  page.vars = srcPage.vars ? srcPage.vars : page.vars;
213
213
  page.isHome = srcPage.isHome || false;
214
214
  page.style = srcPage.commonStyle || {};
215
- common_1.setValidValue(page, 'styleBindPath', srcPage.styleBindPath);
215
+ (0, common_1.setValidValue)(page, 'styleBindPath', srcPage.styleBindPath);
216
216
  page.codeModules = srcPage.lowCodes || [];
217
217
  page.pluginInstances = srcPage.pluginInstances || [];
218
218
  page.componentSchemaJson = {
@@ -264,7 +264,7 @@ function readCmpInstances(cmps) {
264
264
  xProps.style = cmp.xProps.style || {};
265
265
  xProps.commonStyle = cmp.xProps.commonStyle || {};
266
266
  xProps.staticResourceAttribute = cmp.xProps.staticResourceAttribute || [];
267
- common_1.setValidValue(xProps, 'styleBindPath', cmp.xProps.styleBindPath);
267
+ (0, common_1.setValidValue)(xProps, 'styleBindPath', cmp.xProps.styleBindPath);
268
268
  let { classList, classListBind } = cmp.xProps;
269
269
  const { styleBind } = cmp.xProps;
270
270
  const legacyClassList = classList;
@@ -277,9 +277,9 @@ function readCmpInstances(cmps) {
277
277
  classListBind = classListBind;
278
278
  }
279
279
  }
280
- classList && common_1.setValidValue(xProps, 'classNameList', classList);
280
+ classList && (0, common_1.setValidValue)(xProps, 'classNameList', classList);
281
281
  classListBind &&
282
- common_1.setValidValue(xProps, 'classNameListBind', {
282
+ (0, common_1.setValidValue)(xProps, 'classNameListBind', {
283
283
  type: classListBind.type,
284
284
  propertyPath: 'classNameList',
285
285
  bindDataPath: classListBind.value,
@@ -330,10 +330,10 @@ function readCmpInstances(cmps) {
330
330
  xProps.data = xProps.data || {};
331
331
  xProps.data._visible = true;
332
332
  }
333
- common_1.setValidValue(target, 'x-component', xCmp.toLocaleLowerCase());
334
- common_1.setValidValue(xProps, 'customDataForm', cmp.xProps.customDataForm);
333
+ (0, common_1.setValidValue)(target, 'x-component', xCmp.toLocaleLowerCase());
334
+ (0, common_1.setValidValue)(xProps, 'customDataForm', cmp.xProps.customDataForm);
335
335
  target['x-props'] = xProps;
336
- common_1.setValidValue(target, 'x-index', cmp.xIndex);
336
+ (0, common_1.setValidValue)(target, 'x-index', cmp.xIndex);
337
337
  }
338
338
  }
339
339
  return properties;