@cloudbase/lowcode-builder 1.8.43-alpha.0 → 1.8.44-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.
@@ -325,7 +325,7 @@ async function generatePkg(ctx, weapp, appRoot, pageConfigs) {
325
325
  console.log(`Generating ${em('page')} files`);
326
326
  (0, generateFiles_1.cleanDir)(path_1.default.join(appRoot, 'pages'), []);
327
327
  await Promise.all(weapp.pageInstanceList.map(async (page, index) => {
328
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
328
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
329
329
  // # Generating page
330
330
  const rootPath = weapp.rootPath || '';
331
331
  const usingComponents = {};
@@ -346,8 +346,10 @@ async function generatePkg(ctx, weapp, appRoot, pageConfigs) {
346
346
  const pageFileData = {
347
347
  [`api.js|api.js`]: {
348
348
  subLevelPath: rootPath ? `${path_1.default.posix.relative(rootPath, '')}/` : '',
349
+ packageName: rootPath || '',
350
+ subAppId: rootPath ? ((_a = weapp.extra) === null || _a === void 0 ? void 0 : _a.id) || weapp.id || '' : '',
349
351
  uuid: rootPath ? `${rootPath}/${page.id}` : page.id,
350
- 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
+ label: ((_c = (_b = page === null || page === void 0 ? void 0 : page.data) === null || _b === void 0 ? void 0 : _b.navigationBarTitleText) === null || _c === void 0 ? void 0 : _c.value) || ((_e = (_d = page === null || page === void 0 ? void 0 : page.data) === null || _d === void 0 ? void 0 : _d.title) === null || _e === void 0 ? void 0 : _e.value),
351
353
  },
352
354
  [`data.js|data.js`]: {
353
355
  widgetProps: (0, util_2.createWidgetProps)(ctx, componentInstances),
@@ -360,16 +362,16 @@ async function generatePkg(ctx, weapp, appRoot, pageConfigs) {
360
362
  eventHandlers: (0, util_2.createEventHandlers)(ctx, componentInstances, 'this', page),
361
363
  dataBinds: (0, util_2.createDataBinds)(ctx, componentInstances),
362
364
  pageAttributes: {
363
- ...(((_e = page.data) === null || _e === void 0 ? void 0 : _e.appShareMessage) ? { appShareMessage: page.data.appShareMessage.value } : {}),
365
+ ...(((_f = page.data) === null || _f === void 0 ? void 0 : _f.appShareMessage) ? { appShareMessage: page.data.appShareMessage.value } : {}),
364
366
  },
365
367
  debug: ctx.debugMode,
366
368
  stringifyObj: util_1.inspect,
367
369
  subLevelPath: rootPath ? `${path_1.default.posix.relative(rootPath, '')}/` : '',
368
370
  importor,
369
- query: (0, util_2.createTemplateQuery)(ctx, (_f = page.dataset) === null || _f === void 0 ? void 0 : _f.query),
371
+ query: (0, util_2.createTemplateQuery)(ctx, (_g = page.dataset) === null || _g === void 0 ? void 0 : _g.query),
370
372
  eventFlows: (0, util_2.createTemplateEventFlows)(ctx, page.eventFlows),
371
- resetShare: ((_j = (_h = (_g = page === null || page === void 0 ? void 0 : page.data) === null || _g === void 0 ? void 0 : _g.appShareMessage) === null || _h === void 0 ? void 0 : _h.value) === null || _j === void 0 ? void 0 : _j.enable) ||
372
- ((_k = allAppUsedComps === null || allAppUsedComps === void 0 ? void 0 : allAppUsedComps[cals_1.OFFICIAL_LIB_KEY]) === null || _k === void 0 ? void 0 : _k.has('Share')) ||
373
+ resetShare: ((_k = (_j = (_h = page === null || page === void 0 ? void 0 : page.data) === null || _h === void 0 ? void 0 : _h.appShareMessage) === null || _j === void 0 ? void 0 : _j.value) === null || _k === void 0 ? void 0 : _k.enable) ||
374
+ ((_l = allAppUsedComps === null || allAppUsedComps === void 0 ? void 0 : allAppUsedComps[cals_1.OFFICIAL_LIB_KEY]) === null || _l === void 0 ? void 0 : _l.has('Share')) ||
373
375
  /* 从 enablePageRoot 的版本开始支持按需reset share
374
376
  * 否则默认都开启
375
377
  */ !ctx.enablePageRoot,
@@ -383,7 +385,7 @@ async function generatePkg(ctx, weapp, appRoot, pageConfigs) {
383
385
  content: wxml,
384
386
  },
385
387
  [`index.wxss|${pageFileName}.wxss`]: {
386
- subWxss: rootPath && !((_l = ctx.mainAppData) === null || _l === void 0 ? void 0 : _l.mpPkgUrl)
388
+ subWxss: rootPath && !((_m = ctx.mainAppData) === null || _m === void 0 ? void 0 : _m.mpPkgUrl)
387
389
  ? `@import "${path_1.default.posix.relative(`/${rootPath}/pages/${page.id}`, '/lowcode')}/style.wxss";`
388
390
  : '',
389
391
  content: (0, weapps_core_1.toCssText)((0, cals_1.processCommonStyle2CSSProperties)(page.commonStyle, {
@@ -43,7 +43,6 @@ const chalk_1 = __importDefault(require("chalk"));
43
43
  function generateMpConfig(ctx, weapps, options) {
44
44
  var _a;
45
45
  const appConfig = {
46
- __usePrivacyCheck__: true,
47
46
  useExtendedLib: { weui: true },
48
47
  };
49
48
  const { miniprogramPlugins = [] } = ctx;