@next-core/brick-container 3.24.15 → 3.24.17
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-core/brick-container",
|
|
3
|
-
"version": "3.24.
|
|
3
|
+
"version": "3.24.17",
|
|
4
4
|
"description": "Brick Container Server",
|
|
5
5
|
"homepage": "https://github.com/easyops-cn/next-core/tree/v3/packages/brick-container",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"@next-core/runtime": "*",
|
|
76
76
|
"@next-core/utils": "*"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "7c5321e9771f9baf5660930b54ec2b09ad5796f5"
|
|
79
79
|
}
|
package/serve/getProxy.js
CHANGED
|
@@ -254,6 +254,7 @@ export default function getProxy(env, getRawIndexHtml) {
|
|
|
254
254
|
data.injectMenus = data.injectMenus.map((remoteMenu) => {
|
|
255
255
|
const appId = remoteMenu.app?.[0]?.appId;
|
|
256
256
|
const menuId = remoteMenu.menuId;
|
|
257
|
+
const menuType = remoteMenu.type;
|
|
257
258
|
if (!appId || !menuId) {
|
|
258
259
|
return remoteMenu;
|
|
259
260
|
}
|
|
@@ -261,7 +262,7 @@ export default function getProxy(env, getRawIndexHtml) {
|
|
|
261
262
|
const localAppId = localStoryboard.app.id;
|
|
262
263
|
if (localStoryboard.meta && localStoryboard.meta.menus) {
|
|
263
264
|
const localMenu = localStoryboard.meta.menus.find(
|
|
264
|
-
(menu) => menu.menuId === menuId && localAppId === appId
|
|
265
|
+
(menu) => menu.menuId === menuId&&menu.type===menuType && localAppId === appId
|
|
265
266
|
);
|
|
266
267
|
|
|
267
268
|
if (localMenu) {
|
|
@@ -465,6 +466,10 @@ export default function getProxy(env, getRawIndexHtml) {
|
|
|
465
466
|
}
|
|
466
467
|
}
|
|
467
468
|
}
|
|
469
|
+
const isBootstrapMini =
|
|
470
|
+
/^\/next\/sa-static\/.*\/bootstrap-mini\.[^.]+\.json$/.test(
|
|
471
|
+
req.path
|
|
472
|
+
);
|
|
468
473
|
if (
|
|
469
474
|
/^\/next\/[^/]+\/-\/bootstrap\.[^.]+\.json$/.test(req.path) ||
|
|
470
475
|
//ignore bootstrap.mini.ac3eb.json, because it has no brickPackages information
|
|
@@ -473,22 +478,33 @@ export default function getProxy(env, getRawIndexHtml) {
|
|
|
473
478
|
) ||
|
|
474
479
|
/^\/next\/sa-static\/.*\/bootstrap-union\.[^.]+\.json$/.test(
|
|
475
480
|
req.path
|
|
476
|
-
)
|
|
481
|
+
) ||
|
|
482
|
+
isBootstrapMini
|
|
477
483
|
) {
|
|
478
484
|
try {
|
|
479
485
|
const content = responseBuffer.toString("utf-8");
|
|
480
486
|
const result = JSON.parse(content);
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
487
|
+
// bootstrap-mini in union mode only has storyboards, no brickPackages
|
|
488
|
+
if (isBootstrapMini) {
|
|
489
|
+
const storyboards = await getStoryboards(
|
|
490
|
+
{ rootDir, localMicroApps },
|
|
491
|
+
true
|
|
492
|
+
);
|
|
493
|
+
result.storyboards = storyboards.concat(
|
|
494
|
+
result.storyboards || []
|
|
495
|
+
);
|
|
496
|
+
} else {
|
|
497
|
+
const [storyboards, brickPackages] = await Promise.all([
|
|
498
|
+
getStoryboards({ rootDir, localMicroApps }, true),
|
|
499
|
+
getBrickPackages(localBrickFolders, true, localBricks),
|
|
500
|
+
]);
|
|
501
|
+
|
|
502
|
+
result.brickPackages = concatBrickPackages(
|
|
503
|
+
brickPackages,
|
|
504
|
+
result.brickPackages
|
|
505
|
+
);
|
|
506
|
+
result.storyboards = storyboards.concat(result.storyboards);
|
|
507
|
+
}
|
|
492
508
|
|
|
493
509
|
// Make it compatible with v2 apps.
|
|
494
510
|
// delete result.templatePackages;
|