@next-core/brick-container 3.25.1 → 3.25.3

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.25.1",
3
+ "version": "3.25.3",
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": "75a534c3ddc816eb364a3f8141ef3c2c307badf6"
78
+ "gitHead": "008f5829ec08f6e473e3e2eac9268281932a8445"
79
79
  }
package/serve/getProxy.js CHANGED
@@ -254,15 +254,29 @@ 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
+ const remoteGroupId = remoteMenu.injectMenuGroupId;
258
258
  if (!appId || !menuId) {
259
259
  return remoteMenu;
260
260
  }
261
261
 
262
262
  const localAppId = localStoryboard.app.id;
263
- if (localStoryboard.meta && localStoryboard.meta.menus) {
263
+ if (
264
+ localStoryboard.meta &&
265
+ localStoryboard.meta.menus &&
266
+ localAppId === appId
267
+ ) {
268
+ // 同一个 menuId 可能存在多个 inject 菜单(按 injectMenuGroupId 区分注入目标),
269
+ // 按 menuId + injectMenuGroupId 精确匹配。无 group 时仅按 menuId 匹配。
264
270
  const localMenu = localStoryboard.meta.menus.find(
265
- (menu) => menu.menuId === menuId&&menu.type===menuType && localAppId === appId
271
+ (menu) => {
272
+ if (menu.menuId !== menuId) {
273
+ return false;
274
+ }
275
+ if (remoteGroupId) {
276
+ return menu.injectMenuGroupId === remoteGroupId;
277
+ }
278
+ return true;
279
+ }
266
280
  );
267
281
 
268
282
  if (localMenu) {