@module-federation/manifest 0.0.0-next-20241014092946 → 0.0.0-next-20241015060033

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
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var path = require('path');
4
6
  var fs = require('fs');
5
7
  var chalk = require('chalk');
@@ -7,6 +9,12 @@ var sdk = require('@module-federation/sdk');
7
9
  var core = require('@module-federation/dts-plugin/core');
8
10
  var managers = require('@module-federation/managers');
9
11
 
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
15
+ var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
16
+ var chalk__default = /*#__PURE__*/_interopDefaultLegacy(chalk);
17
+
10
18
  var PLUGIN_IDENTIFIER = 'Module Federation Manifest Plugin';
11
19
  var HOT_UPDATE_SUFFIX = '.hot-update';
12
20
 
@@ -86,6 +94,11 @@ function ownKeys$2(object, enumerableOnly) {
86
94
  var keys = Object.keys(object);
87
95
  if (Object.getOwnPropertySymbols) {
88
96
  var symbols = Object.getOwnPropertySymbols(object);
97
+ if (enumerableOnly) {
98
+ symbols = symbols.filter(function(sym) {
99
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
100
+ });
101
+ }
89
102
  keys.push.apply(keys, symbols);
90
103
  }
91
104
  return keys;
@@ -355,7 +368,7 @@ function isDev() {
355
368
  return process.env['NODE_ENV'] === 'development';
356
369
  }
357
370
  function getFileNameWithOutExt(str) {
358
- return str.replace(path.extname(str), '');
371
+ return str.replace(path__default["default"].extname(str), '');
359
372
  }
360
373
  function getFileName(manifestOptions) {
361
374
  if (!manifestOptions) {
@@ -413,11 +426,11 @@ function getTypesMetaInfo(pluginOptions, context) {
413
426
  return {
414
427
  path: '',
415
428
  name: '',
416
- zip: path.join(zipPrefix, zipName),
417
- api: path.join(zipPrefix, apiFileName)
429
+ zip: path__default["default"].join(zipPrefix, zipName),
430
+ api: path__default["default"].join(zipPrefix, apiFileName)
418
431
  };
419
432
  } catch (err) {
420
- console.warn(chalk(_templateObject$2(), PLUGIN_IDENTIFIER, err));
433
+ console.warn(chalk__default["default"](_templateObject$2(), PLUGIN_IDENTIFIER, err));
421
434
  return defaultTypesMetaInfo;
422
435
  }
423
436
  }
@@ -467,6 +480,7 @@ function _defineProperties$3(target, props) {
467
480
  }
468
481
  function _create_class$3(Constructor, protoProps, staticProps) {
469
482
  if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
483
+ if (staticProps) _defineProperties$3(Constructor, staticProps);
470
484
  return Constructor;
471
485
  }
472
486
  function _define_property$3(obj, key, value) {
@@ -693,10 +707,10 @@ var ManifestManager = /*#__PURE__*/ function() {
693
707
  return sum;
694
708
  }, []);
695
709
  prefetchInterface = false;
696
- prefetchFilePath = path.resolve(compiler.options.context || process.cwd(), "node_modules/.mf/".concat(sdk.encodeName(stats.name), "/").concat(sdk.MFPrefetchCommon.fileName));
697
- existPrefetch = fs.existsSync(prefetchFilePath);
710
+ prefetchFilePath = path__default["default"].resolve(compiler.options.context || process.cwd(), "node_modules/.mf/".concat(sdk.encodeName(stats.name), "/").concat(sdk.MFPrefetchCommon.fileName));
711
+ existPrefetch = fs__default["default"].existsSync(prefetchFilePath);
698
712
  if (existPrefetch) {
699
- content = fs.readFileSync(prefetchFilePath).toString();
713
+ content = fs__default["default"].readFileSync(prefetchFilePath).toString();
700
714
  if (content) {
701
715
  prefetchInterface = true;
702
716
  }
@@ -728,7 +742,7 @@ var ManifestManager = /*#__PURE__*/ function() {
728
742
  compilation.emitAsset(manifestFileName, new compiler.webpack.sources.RawSource(JSON.stringify(_this._manifest, null, 2)));
729
743
  }
730
744
  if (isDev()) {
731
- console.log(chalk(_templateObject$1(), PLUGIN_IDENTIFIER, publicPath === 'auto' ? '{auto}/' : publicPath, manifestFileName));
745
+ console.log(chalk__default["default"](_templateObject$1(), PLUGIN_IDENTIFIER, publicPath === 'auto' ? '{auto}/' : publicPath, manifestFileName));
732
746
  }
733
747
  return [
734
748
  2,
@@ -770,6 +784,7 @@ function _defineProperties$2(target, props) {
770
784
  }
771
785
  function _create_class$2(Constructor, protoProps, staticProps) {
772
786
  if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
787
+ if (staticProps) _defineProperties$2(Constructor, staticProps);
773
788
  return Constructor;
774
789
  }
775
790
  function _define_property$2(obj, key, value) {
@@ -831,6 +846,11 @@ function ownKeys$1(object, enumerableOnly) {
831
846
  var keys = Object.keys(object);
832
847
  if (Object.getOwnPropertySymbols) {
833
848
  var symbols = Object.getOwnPropertySymbols(object);
849
+ if (enumerableOnly) {
850
+ symbols = symbols.filter(function(sym) {
851
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
852
+ });
853
+ }
834
854
  keys.push.apply(keys, symbols);
835
855
  }
836
856
  return keys;
@@ -1083,7 +1103,7 @@ var ModuleHandler = /*#__PURE__*/ function() {
1083
1103
  name: exposeModuleName,
1084
1104
  // @ts-ignore to deduplicate
1085
1105
  requires: new Set(),
1086
- file: path.relative(process.cwd(), file.import[0]),
1106
+ file: path__default["default"].relative(process.cwd(), file.import[0]),
1087
1107
  assets: {
1088
1108
  js: {
1089
1109
  async: [],
@@ -1202,6 +1222,7 @@ function _defineProperties$1(target, props) {
1202
1222
  }
1203
1223
  function _create_class$1(Constructor, protoProps, staticProps) {
1204
1224
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
1225
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
1205
1226
  return Constructor;
1206
1227
  }
1207
1228
  function _define_property$1(obj, key, value) {
@@ -1269,6 +1290,11 @@ function ownKeys(object, enumerableOnly) {
1269
1290
  var keys = Object.keys(object);
1270
1291
  if (Object.getOwnPropertySymbols) {
1271
1292
  var symbols = Object.getOwnPropertySymbols(object);
1293
+ if (enumerableOnly) {
1294
+ symbols = symbols.filter(function(sym) {
1295
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1296
+ });
1297
+ }
1272
1298
  keys.push.apply(keys, symbols);
1273
1299
  }
1274
1300
  return keys;
@@ -1852,10 +1878,10 @@ var StatsManager = /*#__PURE__*/ function() {
1852
1878
  value: function validate(compiler) {
1853
1879
  var _compiler_options = compiler.options, publicPath = _compiler_options.output.publicPath;
1854
1880
  if (typeof publicPath !== 'string') {
1855
- console.warn(chalk(_templateObject(), PLUGIN_IDENTIFIER, publicPath));
1881
+ console.warn(chalk__default["default"](_templateObject(), PLUGIN_IDENTIFIER, publicPath));
1856
1882
  return false;
1857
1883
  } else if (publicPath === 'auto') {
1858
- console.warn(chalk(_templateObject1(), PLUGIN_IDENTIFIER, publicPath));
1884
+ console.warn(chalk__default["default"](_templateObject1(), PLUGIN_IDENTIFIER, publicPath));
1859
1885
  return true;
1860
1886
  }
1861
1887
  return true;
@@ -1910,6 +1936,7 @@ function _defineProperties(target, props) {
1910
1936
  }
1911
1937
  function _create_class(Constructor, protoProps, staticProps) {
1912
1938
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1939
+ if (staticProps) _defineProperties(Constructor, staticProps);
1913
1940
  return Constructor;
1914
1941
  }
1915
1942
  function _define_property(obj, key, value) {
package/dist/index.esm.js CHANGED
@@ -84,6 +84,11 @@ function ownKeys$2(object, enumerableOnly) {
84
84
  var keys = Object.keys(object);
85
85
  if (Object.getOwnPropertySymbols) {
86
86
  var symbols = Object.getOwnPropertySymbols(object);
87
+ if (enumerableOnly) {
88
+ symbols = symbols.filter(function(sym) {
89
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
90
+ });
91
+ }
87
92
  keys.push.apply(keys, symbols);
88
93
  }
89
94
  return keys;
@@ -465,6 +470,7 @@ function _defineProperties$3(target, props) {
465
470
  }
466
471
  function _create_class$3(Constructor, protoProps, staticProps) {
467
472
  if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
473
+ if (staticProps) _defineProperties$3(Constructor, staticProps);
468
474
  return Constructor;
469
475
  }
470
476
  function _define_property$3(obj, key, value) {
@@ -768,6 +774,7 @@ function _defineProperties$2(target, props) {
768
774
  }
769
775
  function _create_class$2(Constructor, protoProps, staticProps) {
770
776
  if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
777
+ if (staticProps) _defineProperties$2(Constructor, staticProps);
771
778
  return Constructor;
772
779
  }
773
780
  function _define_property$2(obj, key, value) {
@@ -829,6 +836,11 @@ function ownKeys$1(object, enumerableOnly) {
829
836
  var keys = Object.keys(object);
830
837
  if (Object.getOwnPropertySymbols) {
831
838
  var symbols = Object.getOwnPropertySymbols(object);
839
+ if (enumerableOnly) {
840
+ symbols = symbols.filter(function(sym) {
841
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
842
+ });
843
+ }
832
844
  keys.push.apply(keys, symbols);
833
845
  }
834
846
  return keys;
@@ -1200,6 +1212,7 @@ function _defineProperties$1(target, props) {
1200
1212
  }
1201
1213
  function _create_class$1(Constructor, protoProps, staticProps) {
1202
1214
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
1215
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
1203
1216
  return Constructor;
1204
1217
  }
1205
1218
  function _define_property$1(obj, key, value) {
@@ -1267,6 +1280,11 @@ function ownKeys(object, enumerableOnly) {
1267
1280
  var keys = Object.keys(object);
1268
1281
  if (Object.getOwnPropertySymbols) {
1269
1282
  var symbols = Object.getOwnPropertySymbols(object);
1283
+ if (enumerableOnly) {
1284
+ symbols = symbols.filter(function(sym) {
1285
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1286
+ });
1287
+ }
1270
1288
  keys.push.apply(keys, symbols);
1271
1289
  }
1272
1290
  return keys;
@@ -1908,6 +1926,7 @@ function _defineProperties(target, props) {
1908
1926
  }
1909
1927
  function _create_class(Constructor, protoProps, staticProps) {
1910
1928
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1929
+ if (staticProps) _defineProperties(Constructor, staticProps);
1911
1930
  return Constructor;
1912
1931
  }
1913
1932
  function _define_property(obj, key, value) {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/manifest",
3
- "version": "0.6.10",
3
+ "version": "0.6.6",
4
4
  "license": "MIT",
5
5
  "description": "Provide manifest/stats for webpack/rspack MF project .",
6
6
  "keywords": [
@@ -42,4 +42,4 @@
42
42
  ]
43
43
  }
44
44
  }
45
- }
45
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/manifest",
3
- "version": "0.0.0-next-20241014092946",
3
+ "version": "0.0.0-next-20241015060033",
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/sdk": "0.0.0-next-20241014092946",
28
- "@module-federation/dts-plugin": "0.0.0-next-20241014092946",
29
- "@module-federation/managers": "0.0.0-next-20241014092946"
27
+ "@module-federation/sdk": "0.0.0-next-20241015060033",
28
+ "@module-federation/dts-plugin": "0.0.0-next-20241015060033",
29
+ "@module-federation/managers": "0.0.0-next-20241015060033"
30
30
  },
31
31
  "exports": {
32
32
  ".": {
@@ -1 +0,0 @@
1
- export * from "./src/index";