@next-core/brick-kit 2.165.7 → 2.166.0

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.
@@ -644,10 +644,25 @@
644
644
  };
645
645
  }
646
646
 
647
- function imagesFactory(appId, isBuildPush) {
647
+ function imagesFactory(appId, isBuildPush, version) {
648
648
  return {
649
649
  get(name) {
650
- return isBuildPush ? "api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/".concat(name) : "".concat(window.APP_ROOT ? "".concat(window.APP_ROOT, "-/") : "", "micro-apps/").concat(appId, "/images/").concat(name);
650
+ var getSuffix = () => {
651
+ var suffix = window.APP_ROOT ? "".concat(window.APP_ROOT, "-/") : "";
652
+ if (!suffix.startsWith("/")) {
653
+ suffix = getBasePath() + suffix;
654
+ }
655
+ if (window.APP_ID && window.APP_ID !== appId) {
656
+ return suffix.replace(new RegExp("/(".concat(window.APP_ID, "|\\d+.\\d+.\\d+)/"), "g"), (_, p1) => {
657
+ if (p1 === window.APP_ID) {
658
+ return "/".concat(appId, "/");
659
+ }
660
+ return "/".concat(version, "/");
661
+ });
662
+ }
663
+ return suffix;
664
+ };
665
+ return isBuildPush ? "".concat(getBasePath(), "api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/").concat(name) : "".concat(getSuffix(), "micro-apps/").concat(appId, "/images/").concat(name);
651
666
  }
652
667
  };
653
668
  }
@@ -1402,7 +1417,7 @@
1402
1417
  case "FN":
1403
1418
  return storyboardFunctions;
1404
1419
  case "IMG":
1405
- return collectCoverage ? fakeImageFactory() : widgetId ? widgetImagesFactory(widgetId, widgetVersion) : imagesFactory(app.id, app.isBuildPush);
1420
+ return collectCoverage ? fakeImageFactory() : widgetId ? widgetImagesFactory(widgetId, widgetVersion) : imagesFactory(app.id, app.isBuildPush, app.currentVersion);
1406
1421
  case "I18N":
1407
1422
  return collectCoverage ? _.identity : widgetId ? widgetI18nFactory(widgetId) : i18next.getFixedT(null, [appendI18nNamespace, getI18nNamespace("app", app.id)].filter(Boolean));
1408
1423
  case "I18N_TEXT":
@@ -2907,7 +2922,7 @@
2907
2922
  function _computeRealValueWithOverrideApp() {
2908
2923
  _computeRealValueWithOverrideApp = _asyncToGenerator__default["default"](function* (data, overrideAppId, context, kernel) {
2909
2924
  var newContext = context;
2910
- if (overrideAppId !== context.app.id && attemptToVisit(data, ["APP", "I18N"])) {
2925
+ if (overrideAppId !== context.app.id && attemptToVisit(data, ["APP", "I18N", "IMG"])) {
2911
2926
  if (window.STANDALONE_MICRO_APPS) {
2912
2927
  if (data[symbolOverrideApp]) {
2913
2928
  data[symbolOverrideApp].config = brickUtils.deepFreeze(_.merge({}, data[symbolOverrideApp].defaultConfig, data[symbolOverrideApp].userConfig));