@cloudbase/lowcode-builder 1.9.11 → 1.9.12
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.
package/lib/builder/mp/index.js
CHANGED
|
@@ -112,7 +112,7 @@ async function generateWedaRootCommonFile({ buildContext, buildTypeList, localWe
|
|
|
112
112
|
}
|
|
113
113
|
exports.generateWedaRootCommonFile = generateWedaRootCommonFile;
|
|
114
114
|
async function generateWxMp({ buildContext: _buildContext, weapps, calses, deployOptions, options, buildTypeList, ignoreInstall = false, cdnEndpoints = {}, mpConfig = {}, }) {
|
|
115
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
115
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
116
116
|
const operationLabel = em('Wexin MiniProgram Generated');
|
|
117
117
|
console.time(operationLabel);
|
|
118
118
|
console.log(`Generating ${em('Wexin MiniProgram')} to ${_buildContext.projDir}`);
|
|
@@ -243,8 +243,8 @@ async function generateWxMp({ buildContext: _buildContext, weapps, calses, deplo
|
|
|
243
243
|
? JSON.stringify(buildContext.privatelinkConfig, undefined, 2)
|
|
244
244
|
: undefined,
|
|
245
245
|
defaultLoginType: buildContext.__defaultLoginType__,
|
|
246
|
-
pureAnonymousLogin: !!((_k = (_j = calses[0]) === null || _j === void 0 ? void 0 : _j.extra) === null || _k === void 0 ? void 0 : _k.pureAnonymousLogin),
|
|
247
|
-
publicPage: JSON.stringify((
|
|
246
|
+
pureAnonymousLogin: !!((_l = (_k = (_j = calses[0]) === null || _j === void 0 ? void 0 : _j.extra) === null || _k === void 0 ? void 0 : _k.access) === null || _l === void 0 ? void 0 : _l.pureAnonymousLogin),
|
|
247
|
+
publicPage: JSON.stringify((_p = (_o = (_m = calses[0]) === null || _m === void 0 ? void 0 : _m.extra) === null || _o === void 0 ? void 0 : _o.access) === null || _p === void 0 ? void 0 : _p.publicPage) || 'undefined',
|
|
248
248
|
},
|
|
249
249
|
'datasources/datasource-profiles.js.tpl': {
|
|
250
250
|
datasourceProfiles: (0, util_3.JsonToStringWithVariableName)([], { EOL: false }),
|
|
@@ -313,8 +313,8 @@ async function generateWxMp({ buildContext: _buildContext, weapps, calses, deplo
|
|
|
313
313
|
projectConfigJson.setting = {
|
|
314
314
|
...projectConfigJson.setting,
|
|
315
315
|
...projConfig.setting,
|
|
316
|
-
packNpmRelationList: ((
|
|
317
|
-
? (0, mp_config_1.mergePackNpmRelationList)(projConfig.setting.packNpmRelationList, (
|
|
316
|
+
packNpmRelationList: ((_q = projConfig.setting) === null || _q === void 0 ? void 0 : _q.packNpmRelationList) || ((_r = projectConfigJson.setting) === null || _r === void 0 ? void 0 : _r.packNpmRelationList)
|
|
317
|
+
? (0, mp_config_1.mergePackNpmRelationList)(projConfig.setting.packNpmRelationList, (_s = projectConfigJson.setting) === null || _s === void 0 ? void 0 : _s.packNpmRelationList)
|
|
318
318
|
: undefined,
|
|
319
319
|
};
|
|
320
320
|
const wedaRoot = path_1.default.posix.join('./', projectConfigJson.miniprogramRoot || '/', projectConfigJson.wedaRoot || '');
|
|
@@ -334,7 +334,7 @@ async function generateWxMp({ buildContext: _buildContext, weapps, calses, deplo
|
|
|
334
334
|
}
|
|
335
335
|
const appJsonPath = path_1.default.join(miniprogramRoot, 'app.json');
|
|
336
336
|
const appJson = await fs.readJson(appJsonPath);
|
|
337
|
-
appJson.subpackages = (0, mp_config_1.mergeSubPackages)(((
|
|
337
|
+
appJson.subpackages = (0, mp_config_1.mergeSubPackages)(((_u = (_t = appJson.subpackages) === null || _t === void 0 ? void 0 : _t.filter) === null || _u === void 0 ? void 0 : _u.call(_t, (item) => item.name !== 'wd-sys-module' && item.name !== 'wd-sys-materials')) || [], appConfig.subpackages);
|
|
338
338
|
await (0, generateFiles_1.writeFile)(appJsonPath, JSON.stringify(appJson, undefined, 2));
|
|
339
339
|
}
|
|
340
340
|
else {
|
|
@@ -633,7 +633,7 @@ async function generatePkg(ctx, { cals, weapp }, appRoot, pageConfigs, cssVarMap
|
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
async function generateFramework(ctx, { cals, weapp: appData }, outDir, options) {
|
|
636
|
-
var _a, _b, _c, _d, _e;
|
|
636
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
637
637
|
let fileData = {};
|
|
638
638
|
if (appData.mpPkgUrl) {
|
|
639
639
|
/**
|
|
@@ -687,6 +687,7 @@ async function generateFramework(ctx, { cals, weapp: appData }, outDir, options)
|
|
|
687
687
|
version: (_a = options === null || options === void 0 ? void 0 : options.deployOptions) === null || _a === void 0 ? void 0 : _a.version,
|
|
688
688
|
loginConfigVersion: (_b = cals.extra) === null || _b === void 0 ? void 0 : _b.loginConfigVersion,
|
|
689
689
|
pureAnonymousLogin: !!((_d = (_c = cals.extra) === null || _c === void 0 ? void 0 : _c.access) === null || _d === void 0 ? void 0 : _d.pureAnonymousLogin),
|
|
690
|
+
publicPage: (_f = (_e = cals === null || cals === void 0 ? void 0 : cals.extra) === null || _e === void 0 ? void 0 : _e.access) === null || _f === void 0 ? void 0 : _f.publicPage,
|
|
690
691
|
basename: ctx.wedaRoot,
|
|
691
692
|
pages: appData.pageInstanceList
|
|
692
693
|
.sort((item) => (item.isHome ? -1 : 1))
|
|
@@ -702,7 +703,7 @@ async function generateFramework(ctx, { cals, weapp: appData }, outDir, options)
|
|
|
702
703
|
});
|
|
703
704
|
}),
|
|
704
705
|
}),
|
|
705
|
-
appQuery: (0, util_2.createTemplateQuery)(ctx, (
|
|
706
|
+
appQuery: (0, util_2.createTemplateQuery)(ctx, (_g = appData.dataset) === null || _g === void 0 ? void 0 : _g.query),
|
|
706
707
|
/**
|
|
707
708
|
* @deprecated
|
|
708
709
|
*/
|