@cloudbase/lowcode-builder 1.8.78 → 1.8.79
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 +5 -3
- package/lib/builder/mp/materials.js +4 -13
- package/lib/builder.web.js +2 -2
- package/package.json +1 -1
package/lib/builder/mp/index.js
CHANGED
|
@@ -112,7 +112,11 @@ async function generateWxMp({ buildContext: _buildContext, weapps, calses, deplo
|
|
|
112
112
|
..._buildContext,
|
|
113
113
|
wedaRoot: (0, util_3.normalizeWedaRoot)(projectConfigJson.wedaRoot),
|
|
114
114
|
};
|
|
115
|
-
// #
|
|
115
|
+
// #1.5 安装依赖库,生成 materials 目录副作用修改了buildContext 因此需要早于页面生成
|
|
116
|
+
if (hasLowcodePkg) {
|
|
117
|
+
await (0, materials_1.installMaterials)(buildContext, localWedaRoot, used, weapps);
|
|
118
|
+
}
|
|
119
|
+
// #2 生成主包, 若主包为代码包上游已经处理过,不再处理
|
|
116
120
|
if (mainAppData.mpPkgUrl) {
|
|
117
121
|
}
|
|
118
122
|
else {
|
|
@@ -121,8 +125,6 @@ async function generateWxMp({ buildContext: _buildContext, weapps, calses, deplo
|
|
|
121
125
|
// #3 生成 wedaRoot 文件
|
|
122
126
|
if (hasLowcodePkg) {
|
|
123
127
|
await generateFramework(buildContext, { cals: calses[0], weapp: mainAppData }, localWedaRoot, { deployOptions });
|
|
124
|
-
// 安装依赖库,生成 materials 目录
|
|
125
|
-
await (0, materials_1.installMaterials)(buildContext, localWedaRoot, used, weapps);
|
|
126
128
|
await generateConfig({
|
|
127
129
|
domain,
|
|
128
130
|
isPrivateMode,
|
|
@@ -329,7 +329,7 @@ async function generateCompositeComponent(ctx, compositedComp, outDir, compLibCo
|
|
|
329
329
|
*/
|
|
330
330
|
const NAME_MANAGER = new name_mangler_1.default({ blackList: mp_1.builtinMpTags });
|
|
331
331
|
function getWxmlTag(ctx, cmp, nameMangler) {
|
|
332
|
-
var _a, _b, _c, _d, _e, _f
|
|
332
|
+
var _a, _b, _c, _d, _e, _f;
|
|
333
333
|
const { moduleName, name } = cmp;
|
|
334
334
|
const materialLib = ctx.materialLibs.find((lib) => lib.name === moduleName);
|
|
335
335
|
const miniprogramPlugin = (_a = ctx.miniprogramPlugins) === null || _a === void 0 ? void 0 : _a.find((plugin) => plugin.name === moduleName);
|
|
@@ -338,22 +338,16 @@ function getWxmlTag(ctx, cmp, nameMangler) {
|
|
|
338
338
|
const components = (materialLib === null || materialLib === void 0 ? void 0 : materialLib.components) || (miniprogramPlugin === null || miniprogramPlugin === void 0 ? void 0 : miniprogramPlugin.componentConfigs);
|
|
339
339
|
const findComponent = components === null || components === void 0 ? void 0 : components.find((comp) => comp.name === name);
|
|
340
340
|
if (!findComponent) {
|
|
341
|
-
if (moduleName === cals_1.OFFICIAL_COMPONENT_LIB_NAME) {
|
|
342
|
-
console.log('>>>>>>>>>>>>>>>>>>>>', (_c = (_b = components === null || components === void 0 ? void 0 : components.map) === null || _b === void 0 ? void 0 : _b.call(components, (comp) => comp.name)) === null || _c === void 0 ? void 0 : _c.join(','));
|
|
343
|
-
}
|
|
344
341
|
return { tagName };
|
|
345
342
|
}
|
|
346
343
|
if (materialLib) {
|
|
347
344
|
let cmpMeta = (findComponent === null || findComponent === void 0 ? void 0 : findComponent.meta) || { platforms: undefined };
|
|
348
345
|
if (!cmpMeta.platforms) {
|
|
349
|
-
if (moduleName === cals_1.OFFICIAL_COMPONENT_LIB_NAME) {
|
|
350
|
-
console.log('>>>>>>>>>>>>>>>>>>>>', JSON.stringify(cmpMeta));
|
|
351
|
-
}
|
|
352
346
|
return { tagName };
|
|
353
347
|
}
|
|
354
|
-
compPath = (
|
|
355
|
-
if ((
|
|
356
|
-
tagName = (
|
|
348
|
+
compPath = (_c = (_b = cmpMeta === null || cmpMeta === void 0 ? void 0 : cmpMeta.platforms) === null || _b === void 0 ? void 0 : _b.mp) === null || _c === void 0 ? void 0 : _c.path;
|
|
349
|
+
if ((_e = (_d = cmpMeta === null || cmpMeta === void 0 ? void 0 : cmpMeta.platforms) === null || _d === void 0 ? void 0 : _d.mp) === null || _e === void 0 ? void 0 : _e.tagName) {
|
|
350
|
+
tagName = (_f = cmpMeta === null || cmpMeta === void 0 ? void 0 : cmpMeta.platforms) === null || _f === void 0 ? void 0 : _f.mp.tagName;
|
|
357
351
|
}
|
|
358
352
|
if (compPath) {
|
|
359
353
|
compPath =
|
|
@@ -376,9 +370,6 @@ function getWxmlTag(ctx, cmp, nameMangler) {
|
|
|
376
370
|
if (!tagName) {
|
|
377
371
|
tagName = name.toLocaleUpperCase();
|
|
378
372
|
}
|
|
379
|
-
if (moduleName === cals_1.OFFICIAL_COMPONENT_LIB_NAME && !compPath) {
|
|
380
|
-
console.log('>>>>>>>>>>>>>>>>>>>>**sdfsdf');
|
|
381
|
-
}
|
|
382
373
|
return {
|
|
383
374
|
tagName,
|
|
384
375
|
path: compPath,
|