@module-federation/manifest 0.0.0-next-20241030095049 → 0.0.0-next-20241101093646

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
@@ -10,8 +10,6 @@ var managers = require('@module-federation/managers');
10
10
  var PLUGIN_IDENTIFIER = 'Module Federation Manifest Plugin';
11
11
  var HOT_UPDATE_SUFFIX = '.hot-update';
12
12
 
13
- var logger = sdk.createLogger("[ ".concat(PLUGIN_IDENTIFIER, " ]"));
14
-
15
13
  function _array_like_to_array$2(arr, len) {
16
14
  if (len == null || len > arr.length) len = arr.length;
17
15
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -106,6 +104,16 @@ function _object_spread_props$2(target, source) {
106
104
  function _sliced_to_array$2(arr, i) {
107
105
  return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
108
106
  }
107
+ function _tagged_template_literal$2(strings, raw) {
108
+ if (!raw) {
109
+ raw = strings.slice(0);
110
+ }
111
+ return Object.freeze(Object.defineProperties(strings, {
112
+ raw: {
113
+ value: Object.freeze(raw)
114
+ }
115
+ }));
116
+ }
109
117
  function _to_consumable_array$1(arr) {
110
118
  return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$1();
111
119
  }
@@ -117,6 +125,17 @@ function _unsupported_iterable_to_array$2(o, minLen) {
117
125
  if (n === "Map" || n === "Set") return Array.from(n);
118
126
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
119
127
  }
128
+ function _templateObject$2() {
129
+ var data = _tagged_template_literal$2([
130
+ "{bold {yellow [ ",
131
+ " ]: getTypesMetaInfo failed, it will use the default types meta info, and the errors as belows: ",
132
+ " }}"
133
+ ]);
134
+ _templateObject$2 = function _templateObject() {
135
+ return data;
136
+ };
137
+ return data;
138
+ }
120
139
  function isHotFile(file) {
121
140
  return file.includes(HOT_UPDATE_SUFFIX);
122
141
  }
@@ -398,7 +417,7 @@ function getTypesMetaInfo(pluginOptions, context) {
398
417
  api: path.join(zipPrefix, apiFileName)
399
418
  };
400
419
  } catch (err) {
401
- logger.warn("getTypesMetaInfo failed, it will use the default types meta info, and the errors as belows: ".concat(err));
420
+ console.warn(chalk(_templateObject$2(), PLUGIN_IDENTIFIER, err));
402
421
  return defaultTypesMetaInfo;
403
422
  }
404
423
  }
@@ -478,6 +497,16 @@ function _object_spread$2(target) {
478
497
  }
479
498
  return target;
480
499
  }
500
+ function _tagged_template_literal$1(strings, raw) {
501
+ if (!raw) {
502
+ raw = strings.slice(0);
503
+ }
504
+ return Object.freeze(Object.defineProperties(strings, {
505
+ raw: {
506
+ value: Object.freeze(raw)
507
+ }
508
+ }));
509
+ }
481
510
  function _ts_generator$2(thisArg, body) {
482
511
  var f, y, t, g, _ = {
483
512
  label: 0,
@@ -573,6 +602,18 @@ function _ts_generator$2(thisArg, body) {
573
602
  };
574
603
  }
575
604
  }
605
+ function _templateObject$1() {
606
+ var data = _tagged_template_literal$1([
607
+ "{bold {greenBright [ ",
608
+ " ]} {greenBright Manifest Link:} {cyan ",
609
+ "",
610
+ "}}"
611
+ ]);
612
+ _templateObject$1 = function _templateObject() {
613
+ return data;
614
+ };
615
+ return data;
616
+ }
576
617
  var ManifestManager = /*#__PURE__*/ function() {
577
618
  function ManifestManager() {
578
619
  _class_call_check$3(this, ManifestManager);
@@ -687,7 +728,7 @@ var ManifestManager = /*#__PURE__*/ function() {
687
728
  compilation.emitAsset(manifestFileName, new compiler.webpack.sources.RawSource(JSON.stringify(_this._manifest, null, 2)));
688
729
  }
689
730
  if (isDev()) {
690
- logger.info("Manifest Link: ".concat(chalk.cyan("".concat(publicPath === 'auto' ? '{auto}/' : publicPath).concat(manifestFileName)), " "));
731
+ console.log(chalk(_templateObject$1(), PLUGIN_IDENTIFIER, publicPath === 'auto' ? '{auto}/' : publicPath, manifestFileName));
691
732
  }
692
733
  return [
693
734
  2,
@@ -1246,6 +1287,16 @@ function _object_spread_props(target, source) {
1246
1287
  function _sliced_to_array(arr, i) {
1247
1288
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
1248
1289
  }
1290
+ function _tagged_template_literal(strings, raw) {
1291
+ if (!raw) {
1292
+ raw = strings.slice(0);
1293
+ }
1294
+ return Object.freeze(Object.defineProperties(strings, {
1295
+ raw: {
1296
+ value: Object.freeze(raw)
1297
+ }
1298
+ }));
1299
+ }
1249
1300
  function _to_consumable_array(arr) {
1250
1301
  return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
1251
1302
  }
@@ -1356,6 +1407,28 @@ function _ts_generator$1(thisArg, body) {
1356
1407
  };
1357
1408
  }
1358
1409
  }
1410
+ function _templateObject() {
1411
+ var data = _tagged_template_literal([
1412
+ "{bold {yellow [ ",
1413
+ " ]: Manifest will not generate, because publicPath can only be string, but got '",
1414
+ "' }}"
1415
+ ]);
1416
+ _templateObject = function _templateObject() {
1417
+ return data;
1418
+ };
1419
+ return data;
1420
+ }
1421
+ function _templateObject1() {
1422
+ var data = _tagged_template_literal([
1423
+ "{bold {blue [ ",
1424
+ " ]: Manifest will use absolute path resolution via its host at runtime, reason: publicPath='",
1425
+ "'}}"
1426
+ ]);
1427
+ _templateObject1 = function _templateObject() {
1428
+ return data;
1429
+ };
1430
+ return data;
1431
+ }
1359
1432
  var StatsManager = /*#__PURE__*/ function() {
1360
1433
  function StatsManager() {
1361
1434
  _class_call_check$1(this, StatsManager);
@@ -1787,10 +1860,10 @@ var StatsManager = /*#__PURE__*/ function() {
1787
1860
  value: function validate(compiler) {
1788
1861
  var _compiler_options = compiler.options, publicPath = _compiler_options.output.publicPath;
1789
1862
  if (typeof publicPath !== 'string') {
1790
- logger.warn("Manifest will not generate, because publicPath can only be string, but got '".concat(publicPath, "'"));
1863
+ console.warn(chalk(_templateObject(), PLUGIN_IDENTIFIER, publicPath));
1791
1864
  return false;
1792
1865
  } else if (publicPath === 'auto') {
1793
- logger.warn("Manifest will use absolute path resolution via its host at runtime, reason: publicPath='".concat(publicPath, "'"));
1866
+ console.warn(chalk(_templateObject1(), PLUGIN_IDENTIFIER, publicPath));
1794
1867
  return true;
1795
1868
  }
1796
1869
  return true;
@@ -1992,7 +2065,7 @@ var StatsPlugin = /*#__PURE__*/ function() {
1992
2065
  if (_instanceof(err, Error)) {
1993
2066
  err.message = "[ ".concat(PLUGIN_IDENTIFIER, " ]: Manifest will not generate, because: ").concat(err.message);
1994
2067
  }
1995
- logger.error(err);
2068
+ console.error(err);
1996
2069
  this._enable = false;
1997
2070
  }
1998
2071
  }
package/dist/index.esm.js CHANGED
@@ -1,15 +1,13 @@
1
1
  import path from 'path';
2
2
  import fs from 'fs';
3
3
  import chalk from 'chalk';
4
- import { createLogger, StatsFileName, ManifestFileName, simpleJoinRemoteEntry, normalizeOptions, encodeName, MFPrefetchCommon } from '@module-federation/sdk';
4
+ import { StatsFileName, ManifestFileName, simpleJoinRemoteEntry, normalizeOptions, encodeName, MFPrefetchCommon } from '@module-federation/sdk';
5
5
  import { isTSProject, retrieveTypesAssetsInfo } from '@module-federation/dts-plugin/core';
6
6
  import { RemoteManager, SharedManager, ContainerManager, PKGJsonManager, utils } from '@module-federation/managers';
7
7
 
8
8
  var PLUGIN_IDENTIFIER = 'Module Federation Manifest Plugin';
9
9
  var HOT_UPDATE_SUFFIX = '.hot-update';
10
10
 
11
- var logger = createLogger("[ ".concat(PLUGIN_IDENTIFIER, " ]"));
12
-
13
11
  function _array_like_to_array$2(arr, len) {
14
12
  if (len == null || len > arr.length) len = arr.length;
15
13
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -104,6 +102,16 @@ function _object_spread_props$2(target, source) {
104
102
  function _sliced_to_array$2(arr, i) {
105
103
  return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
106
104
  }
105
+ function _tagged_template_literal$2(strings, raw) {
106
+ if (!raw) {
107
+ raw = strings.slice(0);
108
+ }
109
+ return Object.freeze(Object.defineProperties(strings, {
110
+ raw: {
111
+ value: Object.freeze(raw)
112
+ }
113
+ }));
114
+ }
107
115
  function _to_consumable_array$1(arr) {
108
116
  return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$1();
109
117
  }
@@ -115,6 +123,17 @@ function _unsupported_iterable_to_array$2(o, minLen) {
115
123
  if (n === "Map" || n === "Set") return Array.from(n);
116
124
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
117
125
  }
126
+ function _templateObject$2() {
127
+ var data = _tagged_template_literal$2([
128
+ "{bold {yellow [ ",
129
+ " ]: getTypesMetaInfo failed, it will use the default types meta info, and the errors as belows: ",
130
+ " }}"
131
+ ]);
132
+ _templateObject$2 = function _templateObject() {
133
+ return data;
134
+ };
135
+ return data;
136
+ }
118
137
  function isHotFile(file) {
119
138
  return file.includes(HOT_UPDATE_SUFFIX);
120
139
  }
@@ -396,7 +415,7 @@ function getTypesMetaInfo(pluginOptions, context) {
396
415
  api: path.join(zipPrefix, apiFileName)
397
416
  };
398
417
  } catch (err) {
399
- logger.warn("getTypesMetaInfo failed, it will use the default types meta info, and the errors as belows: ".concat(err));
418
+ console.warn(chalk(_templateObject$2(), PLUGIN_IDENTIFIER, err));
400
419
  return defaultTypesMetaInfo;
401
420
  }
402
421
  }
@@ -476,6 +495,16 @@ function _object_spread$2(target) {
476
495
  }
477
496
  return target;
478
497
  }
498
+ function _tagged_template_literal$1(strings, raw) {
499
+ if (!raw) {
500
+ raw = strings.slice(0);
501
+ }
502
+ return Object.freeze(Object.defineProperties(strings, {
503
+ raw: {
504
+ value: Object.freeze(raw)
505
+ }
506
+ }));
507
+ }
479
508
  function _ts_generator$2(thisArg, body) {
480
509
  var f, y, t, g, _ = {
481
510
  label: 0,
@@ -571,6 +600,18 @@ function _ts_generator$2(thisArg, body) {
571
600
  };
572
601
  }
573
602
  }
603
+ function _templateObject$1() {
604
+ var data = _tagged_template_literal$1([
605
+ "{bold {greenBright [ ",
606
+ " ]} {greenBright Manifest Link:} {cyan ",
607
+ "",
608
+ "}}"
609
+ ]);
610
+ _templateObject$1 = function _templateObject() {
611
+ return data;
612
+ };
613
+ return data;
614
+ }
574
615
  var ManifestManager = /*#__PURE__*/ function() {
575
616
  function ManifestManager() {
576
617
  _class_call_check$3(this, ManifestManager);
@@ -685,7 +726,7 @@ var ManifestManager = /*#__PURE__*/ function() {
685
726
  compilation.emitAsset(manifestFileName, new compiler.webpack.sources.RawSource(JSON.stringify(_this._manifest, null, 2)));
686
727
  }
687
728
  if (isDev()) {
688
- logger.info("Manifest Link: ".concat(chalk.cyan("".concat(publicPath === 'auto' ? '{auto}/' : publicPath).concat(manifestFileName)), " "));
729
+ console.log(chalk(_templateObject$1(), PLUGIN_IDENTIFIER, publicPath === 'auto' ? '{auto}/' : publicPath, manifestFileName));
689
730
  }
690
731
  return [
691
732
  2,
@@ -1244,6 +1285,16 @@ function _object_spread_props(target, source) {
1244
1285
  function _sliced_to_array(arr, i) {
1245
1286
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
1246
1287
  }
1288
+ function _tagged_template_literal(strings, raw) {
1289
+ if (!raw) {
1290
+ raw = strings.slice(0);
1291
+ }
1292
+ return Object.freeze(Object.defineProperties(strings, {
1293
+ raw: {
1294
+ value: Object.freeze(raw)
1295
+ }
1296
+ }));
1297
+ }
1247
1298
  function _to_consumable_array(arr) {
1248
1299
  return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
1249
1300
  }
@@ -1354,6 +1405,28 @@ function _ts_generator$1(thisArg, body) {
1354
1405
  };
1355
1406
  }
1356
1407
  }
1408
+ function _templateObject() {
1409
+ var data = _tagged_template_literal([
1410
+ "{bold {yellow [ ",
1411
+ " ]: Manifest will not generate, because publicPath can only be string, but got '",
1412
+ "' }}"
1413
+ ]);
1414
+ _templateObject = function _templateObject() {
1415
+ return data;
1416
+ };
1417
+ return data;
1418
+ }
1419
+ function _templateObject1() {
1420
+ var data = _tagged_template_literal([
1421
+ "{bold {blue [ ",
1422
+ " ]: Manifest will use absolute path resolution via its host at runtime, reason: publicPath='",
1423
+ "'}}"
1424
+ ]);
1425
+ _templateObject1 = function _templateObject() {
1426
+ return data;
1427
+ };
1428
+ return data;
1429
+ }
1357
1430
  var StatsManager = /*#__PURE__*/ function() {
1358
1431
  function StatsManager() {
1359
1432
  _class_call_check$1(this, StatsManager);
@@ -1785,10 +1858,10 @@ var StatsManager = /*#__PURE__*/ function() {
1785
1858
  value: function validate(compiler) {
1786
1859
  var _compiler_options = compiler.options, publicPath = _compiler_options.output.publicPath;
1787
1860
  if (typeof publicPath !== 'string') {
1788
- logger.warn("Manifest will not generate, because publicPath can only be string, but got '".concat(publicPath, "'"));
1861
+ console.warn(chalk(_templateObject(), PLUGIN_IDENTIFIER, publicPath));
1789
1862
  return false;
1790
1863
  } else if (publicPath === 'auto') {
1791
- logger.warn("Manifest will use absolute path resolution via its host at runtime, reason: publicPath='".concat(publicPath, "'"));
1864
+ console.warn(chalk(_templateObject1(), PLUGIN_IDENTIFIER, publicPath));
1792
1865
  return true;
1793
1866
  }
1794
1867
  return true;
@@ -1990,7 +2063,7 @@ var StatsPlugin = /*#__PURE__*/ function() {
1990
2063
  if (_instanceof(err, Error)) {
1991
2064
  err.message = "[ ".concat(PLUGIN_IDENTIFIER, " ]: Manifest will not generate, because: ").concat(err.message);
1992
2065
  }
1993
- logger.error(err);
2066
+ console.error(err);
1994
2067
  this._enable = false;
1995
2068
  }
1996
2069
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/manifest",
3
- "version": "0.6.14",
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.0.0-next-20241030095049",
3
+ "version": "0.0.0-next-20241101093646",
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-20241030095049",
28
- "@module-federation/dts-plugin": "0.0.0-next-20241030095049",
29
- "@module-federation/managers": "0.0.0-next-20241030095049"
27
+ "@module-federation/sdk": "0.0.0-next-20241101093646",
28
+ "@module-federation/dts-plugin": "0.0.0-next-20241101093646",
29
+ "@module-federation/managers": "0.0.0-next-20241101093646"
30
30
  },
31
31
  "exports": {
32
32
  ".": {
@@ -1,2 +0,0 @@
1
- declare const logger: import("@module-federation/sdk").Logger;
2
- export default logger;