@module-federation/manifest 0.6.9 → 0.6.11

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/dist/index.cjs.js CHANGED
@@ -1300,6 +1300,10 @@ function _tagged_template_literal(strings, raw) {
1300
1300
  function _to_consumable_array(arr) {
1301
1301
  return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
1302
1302
  }
1303
+ function _type_of$1(obj) {
1304
+ "@swc/helpers - typeof";
1305
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1306
+ }
1303
1307
  function _unsupported_iterable_to_array(o, minLen) {
1304
1308
  if (!o) return;
1305
1309
  if (typeof o === "string") return _array_like_to_array(o, minLen);
@@ -1637,7 +1641,7 @@ var StatsManager = /*#__PURE__*/ function() {
1637
1641
  remotes: [],
1638
1642
  exposes: []
1639
1643
  };
1640
- if (typeof manifestOptions === 'object' && manifestOptions.disableAssetsAnalyze) {
1644
+ if ((typeof manifestOptions === "undefined" ? "undefined" : _type_of$1(manifestOptions)) === 'object' && manifestOptions.disableAssetsAnalyze) {
1641
1645
  remotes = _this._remoteManager.statsRemoteWithEmptyUsedIn;
1642
1646
  stats.remotes = remotes;
1643
1647
  return [
@@ -1700,11 +1704,19 @@ var StatsManager = /*#__PURE__*/ function() {
1700
1704
  4,
1701
1705
  Promise.all([
1702
1706
  new Promise(function(resolve) {
1707
+ var remoteMemo = new Set();
1703
1708
  stats.remotes = remotes1.map(function(remote) {
1709
+ remoteMemo.add(remote.federationContainerName);
1704
1710
  return _object_spread_props(_object_spread({}, remote), {
1705
1711
  usedIn: Array.from(remote.usedIn.values())
1706
1712
  });
1707
1713
  });
1714
+ var statsRemoteWithEmptyUsedIn = _this._remoteManager.statsRemoteWithEmptyUsedIn;
1715
+ statsRemoteWithEmptyUsedIn.forEach(function(remoteInfo) {
1716
+ if (!remoteMemo.has(remoteInfo.federationContainerName)) {
1717
+ stats.remotes.push(remoteInfo);
1718
+ }
1719
+ });
1708
1720
  resolve();
1709
1721
  }),
1710
1722
  new Promise(function(resolve) {
@@ -1802,7 +1814,7 @@ var StatsManager = /*#__PURE__*/ function() {
1802
1814
  ];
1803
1815
  case 1:
1804
1816
  stats = _state.sent();
1805
- if (!(typeof manifestOptions === 'object' && manifestOptions.additionalData)) return [
1817
+ if (!((typeof manifestOptions === "undefined" ? "undefined" : _type_of$1(manifestOptions)) === 'object' && manifestOptions.additionalData)) return [
1806
1818
  3,
1807
1819
  3
1808
1820
  ];
@@ -1928,6 +1940,10 @@ function _instanceof(left, right) {
1928
1940
  return left instanceof right;
1929
1941
  }
1930
1942
  }
1943
+ function _type_of(obj) {
1944
+ "@swc/helpers - typeof";
1945
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1946
+ }
1931
1947
  function _ts_generator(thisArg, body) {
1932
1948
  var f, y, t, g, _ = {
1933
1949
  label: 0,
@@ -2095,7 +2111,7 @@ var StatsPlugin = /*#__PURE__*/ function() {
2095
2111
  publicPath: _this1._statsManager.getPublicPath(compiler),
2096
2112
  compiler: compiler,
2097
2113
  bundler: _this1._bundler,
2098
- additionalData: typeof _this1._options.manifest === 'object' ? _this1._options.manifest.additionalData : undefined
2114
+ additionalData: _type_of(_this1._options.manifest) === 'object' ? _this1._options.manifest.additionalData : undefined
2099
2115
  }, {
2100
2116
  disableEmit: _this1.disableEmit
2101
2117
  })
package/dist/index.esm.js CHANGED
@@ -1298,6 +1298,10 @@ function _tagged_template_literal(strings, raw) {
1298
1298
  function _to_consumable_array(arr) {
1299
1299
  return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
1300
1300
  }
1301
+ function _type_of$1(obj) {
1302
+ "@swc/helpers - typeof";
1303
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1304
+ }
1301
1305
  function _unsupported_iterable_to_array(o, minLen) {
1302
1306
  if (!o) return;
1303
1307
  if (typeof o === "string") return _array_like_to_array(o, minLen);
@@ -1635,7 +1639,7 @@ var StatsManager = /*#__PURE__*/ function() {
1635
1639
  remotes: [],
1636
1640
  exposes: []
1637
1641
  };
1638
- if (typeof manifestOptions === 'object' && manifestOptions.disableAssetsAnalyze) {
1642
+ if ((typeof manifestOptions === "undefined" ? "undefined" : _type_of$1(manifestOptions)) === 'object' && manifestOptions.disableAssetsAnalyze) {
1639
1643
  remotes = _this._remoteManager.statsRemoteWithEmptyUsedIn;
1640
1644
  stats.remotes = remotes;
1641
1645
  return [
@@ -1698,11 +1702,19 @@ var StatsManager = /*#__PURE__*/ function() {
1698
1702
  4,
1699
1703
  Promise.all([
1700
1704
  new Promise(function(resolve) {
1705
+ var remoteMemo = new Set();
1701
1706
  stats.remotes = remotes1.map(function(remote) {
1707
+ remoteMemo.add(remote.federationContainerName);
1702
1708
  return _object_spread_props(_object_spread({}, remote), {
1703
1709
  usedIn: Array.from(remote.usedIn.values())
1704
1710
  });
1705
1711
  });
1712
+ var statsRemoteWithEmptyUsedIn = _this._remoteManager.statsRemoteWithEmptyUsedIn;
1713
+ statsRemoteWithEmptyUsedIn.forEach(function(remoteInfo) {
1714
+ if (!remoteMemo.has(remoteInfo.federationContainerName)) {
1715
+ stats.remotes.push(remoteInfo);
1716
+ }
1717
+ });
1706
1718
  resolve();
1707
1719
  }),
1708
1720
  new Promise(function(resolve) {
@@ -1800,7 +1812,7 @@ var StatsManager = /*#__PURE__*/ function() {
1800
1812
  ];
1801
1813
  case 1:
1802
1814
  stats = _state.sent();
1803
- if (!(typeof manifestOptions === 'object' && manifestOptions.additionalData)) return [
1815
+ if (!((typeof manifestOptions === "undefined" ? "undefined" : _type_of$1(manifestOptions)) === 'object' && manifestOptions.additionalData)) return [
1804
1816
  3,
1805
1817
  3
1806
1818
  ];
@@ -1926,6 +1938,10 @@ function _instanceof(left, right) {
1926
1938
  return left instanceof right;
1927
1939
  }
1928
1940
  }
1941
+ function _type_of(obj) {
1942
+ "@swc/helpers - typeof";
1943
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1944
+ }
1929
1945
  function _ts_generator(thisArg, body) {
1930
1946
  var f, y, t, g, _ = {
1931
1947
  label: 0,
@@ -2093,7 +2109,7 @@ var StatsPlugin = /*#__PURE__*/ function() {
2093
2109
  publicPath: _this1._statsManager.getPublicPath(compiler),
2094
2110
  compiler: compiler,
2095
2111
  bundler: _this1._bundler,
2096
- additionalData: typeof _this1._options.manifest === 'object' ? _this1._options.manifest.additionalData : undefined
2112
+ additionalData: _type_of(_this1._options.manifest) === 'object' ? _this1._options.manifest.additionalData : undefined
2097
2113
  }, {
2098
2114
  disableEmit: _this1.disableEmit
2099
2115
  })
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/manifest",
3
- "version": "0.6.9",
3
+ "version": "0.6.11",
4
4
  "license": "MIT",
5
5
  "description": "Provide manifest/stats for webpack/rspack MF project .",
6
6
  "keywords": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/manifest",
3
- "version": "0.6.9",
3
+ "version": "0.6.11",
4
4
  "license": "MIT",
5
5
  "description": "Provide manifest/stats for webpack/rspack MF project .",
6
6
  "keywords": [
@@ -24,9 +24,9 @@
24
24
  "dependencies": {
25
25
  "find-pkg": "2.0.0",
26
26
  "chalk": "3.0.0",
27
- "@module-federation/dts-plugin": "0.6.9",
28
- "@module-federation/sdk": "0.6.9",
29
- "@module-federation/managers": "0.6.9"
27
+ "@module-federation/sdk": "0.6.11",
28
+ "@module-federation/dts-plugin": "0.6.11",
29
+ "@module-federation/managers": "0.6.11"
30
30
  },
31
31
  "exports": {
32
32
  ".": {