@cloudbase/lowcode-builder 1.8.98 → 1.8.100

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.
@@ -335,7 +335,9 @@ function normalizeCals(cals, { buildTypeList, envId, deployOptions, appId, getWe
335
335
  cals.extra.historyType = types_1.HISTORY_TYPE.HASH;
336
336
  }
337
337
  }
338
- cals.extra.envId = envId;
338
+ if (envId) {
339
+ cals.extra.envId = envId;
340
+ }
339
341
  if ((0, common_1.buildAsWebByBuildType)(buildTypeList)) {
340
342
  // web 构建不处理小程序插件
341
343
  if (cals.extra.miniprogramPlugins) {
@@ -501,7 +501,7 @@ async function generatePkg(ctx, { cals, weapp }, appRoot, pageConfigs, cssVarMap
501
501
  return map;
502
502
  }, {});
503
503
  await Promise.all(weapp.pageInstanceList.map(async (page, index) => {
504
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
504
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
505
505
  // # Generating page
506
506
  const rootPath = weapp.rootPath || '';
507
507
  const usingComponents = {};
@@ -519,7 +519,7 @@ async function generatePkg(ctx, { cals, weapp }, appRoot, pageConfigs, cssVarMap
519
519
  const subLevelPath = rootPath ? `${path_1.default.posix.relative(`packages/${rootPath}`, '')}/` : '';
520
520
  const pageDataBinds = {};
521
521
  Object.entries(page.data || {}).forEach(([prop, val]) => {
522
- if (/^(appShareMessage)/.test(prop)) {
522
+ if (/^(appShareMessage|shareTimeline)/.test(prop)) {
523
523
  (0, util_2.setDataBind)(pageDataBinds, prop, val);
524
524
  }
525
525
  });
@@ -562,7 +562,8 @@ async function generatePkg(ctx, { cals, weapp }, appRoot, pageConfigs, cssVarMap
562
562
  eventHandlers: (0, util_2.createEventHandlers)(ctx, componentInstances, 'this', page),
563
563
  dataBinds: (0, util_2.createDataBinds)(ctx, componentInstances),
564
564
  pageAttributes: {
565
- ...(((_e = page.data) === null || _e === void 0 ? void 0 : _e.appShareMessage) ? { appShareMessage: page.data.appShareMessage.value } : {}),
565
+ appShareMessage: (_f = (_e = page.data) === null || _e === void 0 ? void 0 : _e.appShareMessage) === null || _f === void 0 ? void 0 : _f.value,
566
+ shareTimeline: (_h = (_g = page.data) === null || _g === void 0 ? void 0 : _g.shareTimeline) === null || _h === void 0 ? void 0 : _h.value,
566
567
  },
567
568
  pageDataBinds,
568
569
  debug: ctx.debugMode,
@@ -572,11 +573,11 @@ async function generatePkg(ctx, { cals, weapp }, appRoot, pageConfigs, cssVarMap
572
573
  stringifyObj: util_1.inspect,
573
574
  subLevelPath,
574
575
  importor,
575
- query: (0, util_2.createTemplateQuery)(ctx, (_f = page.dataset) === null || _f === void 0 ? void 0 : _f.query),
576
+ query: (0, util_2.createTemplateQuery)(ctx, (_j = page.dataset) === null || _j === void 0 ? void 0 : _j.query),
576
577
  datasetProfile: (0, util_3.JsonToStringWithVariableName)((0, lowcode_generator_1.generateDynamicDataset)(page.dataset || {}), { EOL: true }),
577
578
  eventFlows: (0, util_2.createTemplateEventFlows)(ctx, page.eventFlows),
578
- 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) ||
579
- ((_k = allAppUsedComps === null || allAppUsedComps === void 0 ? void 0 : allAppUsedComps[cals_1.OFFICIAL_LIB_KEY]) === null || _k === void 0 ? void 0 : _k.has('Share')) ||
579
+ resetShare: ((_m = (_l = (_k = page === null || page === void 0 ? void 0 : page.data) === null || _k === void 0 ? void 0 : _k.appShareMessage) === null || _l === void 0 ? void 0 : _l.value) === null || _m === void 0 ? void 0 : _m.enable) ||
580
+ ((_o = allAppUsedComps === null || allAppUsedComps === void 0 ? void 0 : allAppUsedComps[cals_1.OFFICIAL_LIB_KEY]) === null || _o === void 0 ? void 0 : _o.has('Share')) ||
580
581
  /* 从 enablePageRoot 的版本开始支持按需reset share
581
582
  * 否则默认都开启
582
583
  */ !ctx.enablePageRoot,
@@ -591,13 +592,13 @@ async function generatePkg(ctx, { cals, weapp }, appRoot, pageConfigs, cssVarMap
591
592
  content: wxml,
592
593
  },
593
594
  [`index.wxss|${pageFileName}.wxss`]: {
594
- subWxss: rootPath && !((_l = ctx.mainAppData) === null || _l === void 0 ? void 0 : _l.mpPkgUrl)
595
+ subWxss: rootPath && !((_p = ctx.mainAppData) === null || _p === void 0 ? void 0 : _p.mpPkgUrl)
595
596
  ? `@import "${path_1.default.posix.relative(`/packages/${rootPath}/pages/${page.id}`, '/lowcode')}/style.wxss";`
596
597
  : '',
597
598
  content: [
598
- (0, weapps_core_1.toCssText)(((_o = (_m = CALS_PAGE_MAP[page.id]) === null || _m === void 0 ? void 0 : _m.attributes) === null || _o === void 0 ? void 0 : _o.style) &&
599
- ((_r = Object.keys(((_q = (_p = CALS_PAGE_MAP[page.id]) === null || _p === void 0 ? void 0 : _p.attributes) === null || _q === void 0 ? void 0 : _q.style) || {})) === null || _r === void 0 ? void 0 : _r.length)
600
- ? (0, cals_1.processCSSPropertiesUnit)(((_t = (_s = CALS_PAGE_MAP[page.id]) === null || _s === void 0 ? void 0 : _s.attributes) === null || _t === void 0 ? void 0 : _t.style) || {}, processCssUnit)
599
+ (0, weapps_core_1.toCssText)(((_r = (_q = CALS_PAGE_MAP[page.id]) === null || _q === void 0 ? void 0 : _q.attributes) === null || _r === void 0 ? void 0 : _r.style) &&
600
+ ((_u = Object.keys(((_t = (_s = CALS_PAGE_MAP[page.id]) === null || _s === void 0 ? void 0 : _s.attributes) === null || _t === void 0 ? void 0 : _t.style) || {})) === null || _u === void 0 ? void 0 : _u.length)
601
+ ? (0, cals_1.processCSSPropertiesUnit)(((_w = (_v = CALS_PAGE_MAP[page.id]) === null || _v === void 0 ? void 0 : _v.attributes) === null || _w === void 0 ? void 0 : _w.style) || {}, processCssUnit)
601
602
  : (0, cals_1.processCommonStyle2CSSProperties)(page.commonStyle, {
602
603
  defaultUnit: processCssUnit,
603
604
  }), 'page'),
@@ -729,7 +730,7 @@ async function writeLowCodeFiles(ctx, appData, outDir, cssVarMap) {
729
730
  exports.writeLowCodeFiles = writeLowCodeFiles;
730
731
  // {a: 1} -> , "a": 1
731
732
  function getAppendableJson(json = {}) {
732
- const { namespace, appShareMessage, ...restJson } = json;
733
+ const { namespace, appShareMessage, shareTimeline, ...restJson } = json;
733
734
  const obj = { ...restJson };
734
735
  if (obj.reachBottomDistance) {
735
736
  obj.onReachBottomDistance = parseInt(obj.reachBottomDistance, 10) || 0;