@cloudbase/lowcode-builder 1.8.44-alpha.2 → 1.8.45-alpha.0

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.
@@ -45,7 +45,11 @@ const config_1 = require("../config");
45
45
  const fs_extra_1 = __importDefault(require("fs-extra"));
46
46
  const junk = __importStar(require("../util/junk"));
47
47
  const url_1 = require("url");
48
- const transform_1 = require("../../utils/transform");
48
+ let BabelTransform = (code, options) => code;
49
+ if (!process.env.IS_WEB_WORKER) {
50
+ let transform = require('../../utils/transform');
51
+ BabelTransform = transform.BabelTransform;
52
+ }
49
53
  async function buildH5App({ buildContext, i18nConfig, extraData, cals: _cals, buildTypeList = [common_1.BuildType.WEB], subAppCalsList, mode, devTool, runtime = types_1.RUNTIME.NONE, deployOptions = { mode: types_1.DEPLOY_MODE.PREVIEW }, ignoreInstall = false, cdnEndpoints, }) {
50
54
  var _a, _b, _c;
51
55
  const { projDir: buildDir, domain, materialLibs: dependencies, appId: appKey, isPrivateMode, enableExpiredTag, } = buildContext;
@@ -246,7 +250,7 @@ function _BabelTransformCalsExpression(key, value) {
246
250
  value = value.replace(FOR_IN_REG, '');
247
251
  }
248
252
  }
249
- value = (0, transform_1.BabelTransform)(value, { IIFE: true });
253
+ value = BabelTransform(value, { IIFE: true });
250
254
  if (forPrefix) {
251
255
  value = `${forPrefix}${value}`;
252
256
  }
@@ -347,6 +347,7 @@ async function generatePkg(ctx, weapp, appRoot, pageConfigs) {
347
347
  const pageFileData = {
348
348
  [`api.js|api.js`]: {
349
349
  subLevelPath: rootPath ? `${path_1.default.posix.relative(rootPath, '')}/` : '',
350
+ packageName: rootPath || '',
350
351
  uuid: rootPath ? `${rootPath}/${page.id}` : page.id,
351
352
  label: ((_b = (_a = page === null || page === void 0 ? void 0 : page.data) === null || _a === void 0 ? void 0 : _a.navigationBarTitleText) === null || _b === void 0 ? void 0 : _b.value) || ((_d = (_c = page === null || page === void 0 ? void 0 : page.data) === null || _c === void 0 ? void 0 : _c.title) === null || _d === void 0 ? void 0 : _d.value),
352
353
  },