@next-core/brick-kit 2.188.1 → 2.188.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.
@@ -701,7 +701,7 @@
701
701
  return {
702
702
  get(name) {
703
703
  var getSuffix = () => {
704
- var suffix = window.APP_ROOT ? "".concat(window.APP_ROOT).concat(window.PUBLIC_DEPS ? "" : "-/") : "";
704
+ var suffix = window.APP_ROOT ? "".concat(window.APP_ROOT).concat(window.BOOTSTRAP_UNION_FILE && window.PUBLIC_DEPS ? "" : "-/") : "";
705
705
  if (!suffix.startsWith("/")) {
706
706
  suffix = getBasePath() + suffix;
707
707
  }
@@ -715,7 +715,7 @@
715
715
  }
716
716
  return suffix;
717
717
  };
718
- return isBuildPush ? "".concat(getBasePath(), "api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/").concat(name) : window.PUBLIC_DEPS ? "".concat(getSuffix(), "images/").concat(name) : "".concat(getSuffix(), "micro-apps/").concat(appId, "/images/").concat(name);
718
+ return isBuildPush ? "".concat(getBasePath(), "api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/").concat(name) : window.BOOTSTRAP_UNION_FILE && window.PUBLIC_DEPS ? "".concat(getSuffix(), "images/").concat(name) : "".concat(getSuffix(), "micro-apps/").concat(appId, "/images/").concat(name);
719
719
  }
720
720
  };
721
721
  }
@@ -9026,9 +9026,22 @@
9026
9026
  });
9027
9027
  })();
9028
9028
  }
9029
+ processPublicDepsPackages() {
9030
+ var brickPackages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
9031
+ var pubDeps = arguments.length > 1 ? arguments[1] : undefined;
9032
+ if (!(pubDeps !== null && pubDeps !== void 0 && pubDeps.length)) return brickPackages;
9033
+ var bricksMap = new Map();
9034
+
9035
+ // bootstrapData 数据和 pubDeps 中可能同时存在同一个包名,需要过滤去重, 以 pubDeps 中的包为准
9036
+ [...brickPackages, ...pubDeps].forEach(pkg => {
9037
+ var pkgName = pkg.filePath.split("/")[1];
9038
+ bricksMap.set(pkgName, pkg);
9039
+ });
9040
+ return Array.from(bricksMap.values());
9041
+ }
9029
9042
  getBrickPackages() {
9030
- var _this$bootstrapData, _this$bootstrapData$b, _window$PUBLIC_DEPS;
9031
- return (_this$bootstrapData = this.bootstrapData) === null || _this$bootstrapData === void 0 ? void 0 : (_this$bootstrapData$b = _this$bootstrapData.brickPackages) === null || _this$bootstrapData$b === void 0 ? void 0 : _this$bootstrapData$b.concat((_window$PUBLIC_DEPS = window.PUBLIC_DEPS) !== null && _window$PUBLIC_DEPS !== void 0 ? _window$PUBLIC_DEPS : []);
9043
+ var _this$bootstrapData;
9044
+ return this.processPublicDepsPackages((_this$bootstrapData = this.bootstrapData) === null || _this$bootstrapData === void 0 ? void 0 : _this$bootstrapData.brickPackages, window.PUBLIC_DEPS);
9032
9045
  }
9033
9046
  reloadMicroApps(params, interceptorParams) {
9034
9047
  // There is no need to reload standalone micro-apps.