@cloudbase/lowcode-builder 1.8.83 → 1.8.85

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.
@@ -84,7 +84,7 @@ async function generateWxMp({ buildContext: _buildContext, weapps, calses, deplo
84
84
  * 依据所有应用的低码配置生成默认项目json
85
85
  * 次高优先级,生成整个小程序的配置信息
86
86
  */
87
- const { projConfig, appConfig, pageConfigs } = (0, mp_config_1.generateMpConfig)(_buildContext, weapps, {
87
+ const { projConfig, appConfig, pageConfigs } = (0, mp_config_1.generateMpConfig)(_buildContext, weapps, calses, {
88
88
  mpAppId: options.mpAppId,
89
89
  mpConfig,
90
90
  });
@@ -248,9 +248,18 @@ async function generateWxMp({ buildContext: _buildContext, weapps, calses, deplo
248
248
  console.log(`Generating ${em('system subpackage')} files`);
249
249
  await (0, generateFiles_1.copyRecursiveSync)(path_1.default.join(templateDir, 'packages/$wd_system/pages'), path_1.default.join(subpackageRootPath, 'pages'), {
250
250
  filter: (src) => {
251
+ var _a, _b;
251
252
  if (/.tpl$/.test(src)) {
252
253
  return false;
253
254
  }
255
+ if (/login\//.test(src)) {
256
+ if ((_b = (_a = calses[0]) === null || _a === void 0 ? void 0 : _a.extra) === null || _b === void 0 ? void 0 : _b.loginConfigVersion) {
257
+ return true;
258
+ }
259
+ else {
260
+ return false;
261
+ }
262
+ }
254
263
  return true;
255
264
  },
256
265
  });
@@ -1,13 +1,14 @@
1
1
  import { IWeAppData } from '@cloudbase/lowcode-generator/lib/weapps-core';
2
2
  import { IBuildContext } from './BuildContext';
3
3
  import { IBuildWedaApp } from '../core';
4
+ import { IPlatformApp } from '@cloudbase/cals';
4
5
  /**
5
6
  * generate app.json & page.json for mp
6
7
  *
7
8
  * @param kboneConfig https://wechat-miniprogram.github.io/kbone/docs/config/
8
9
  * @param appConfigs app config from prop edit panel
9
10
  */
10
- export declare function generateMpConfig(ctx: Omit<IBuildContext, 'wedaRoot'>, weapps: IWeAppData[], options: {
11
+ export declare function generateMpConfig(ctx: Omit<IBuildContext, 'wedaRoot'>, weapps: IWeAppData[], calses: IPlatformApp[], options: {
11
12
  mpAppId?: string;
12
13
  mpConfig?: IBuildWedaApp['mpConfig'];
13
14
  }): {
@@ -41,8 +41,8 @@ const util_1 = require("../util");
41
41
  * @param kboneConfig https://wechat-miniprogram.github.io/kbone/docs/config/
42
42
  * @param appConfigs app config from prop edit panel
43
43
  */
44
- function generateMpConfig(ctx, weapps, options) {
45
- var _a, _b, _c;
44
+ function generateMpConfig(ctx, weapps, calses, options) {
45
+ var _a, _b, _c, _d, _e;
46
46
  const appConfig = {
47
47
  useExtendedLib: { weui: true },
48
48
  };
@@ -117,7 +117,7 @@ function generateMpConfig(ctx, weapps, options) {
117
117
  {
118
118
  root: path.posix.join(projConfig.wedaRoot || '', 'packages/$wd_system'),
119
119
  name: 'wd-sys-module',
120
- pages: ['pages/login/index'],
120
+ pages: ((_e = (_d = calses === null || calses === void 0 ? void 0 : calses[0]) === null || _d === void 0 ? void 0 : _d.extra) === null || _e === void 0 ? void 0 : _e.loginConfigVersion) ? ['pages/login/index'] : [],
121
121
  },
122
122
  ]
123
123
  .concat(ctx.enableAsyncMaterials