@module-federation/manifest 0.8.1 → 0.8.2

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,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var path = require('path');
4
- var fs = require('fs');
5
3
  var chalk = require('chalk');
4
+ var path = require('path');
6
5
  var sdk = require('@module-federation/sdk');
7
6
  var core = require('@module-federation/dts-plugin/core');
7
+ var fs = require('fs');
8
8
  var managers = require('@module-federation/managers');
9
9
 
10
10
  var PLUGIN_IDENTIFIER = 'Module Federation Manifest Plugin';
@@ -604,7 +604,7 @@ var ManifestManager = /*#__PURE__*/ function() {
604
604
  var extraOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
605
605
  var _this = this;
606
606
  return _async_to_generator$2(function() {
607
- var compilation, publicPath, stats, compiler, bundler, additionalData, disableEmit, manifest, prefetchInterface, prefetchFilePath, existPrefetch, content, manifestFileName, ret;
607
+ var compilation, publicPath, stats, compiler, bundler, additionalData, disableEmit, manifest, manifestFileName, ret;
608
608
  return _ts_generator$2(this, function(_state) {
609
609
  switch(_state.label){
610
610
  case 0:
@@ -651,16 +651,6 @@ var ManifestManager = /*#__PURE__*/ function() {
651
651
  sum.push(remote);
652
652
  return sum;
653
653
  }, []);
654
- prefetchInterface = false;
655
- prefetchFilePath = path.resolve(compiler.options.context || process.cwd(), "node_modules/.mf/".concat(sdk.encodeName(stats.name), "/").concat(sdk.MFPrefetchCommon.fileName));
656
- existPrefetch = fs.existsSync(prefetchFilePath);
657
- if (existPrefetch) {
658
- content = fs.readFileSync(prefetchFilePath).toString();
659
- if (content) {
660
- prefetchInterface = true;
661
- }
662
- }
663
- stats.metaData.prefetchInterface = prefetchInterface;
664
654
  _this._manifest = manifest;
665
655
  manifestFileName = _this.fileName;
666
656
  if (!additionalData) return [
@@ -1427,6 +1417,16 @@ var StatsManager = /*#__PURE__*/ function() {
1427
1417
  globalName: globalName,
1428
1418
  pluginVersion: this._pluginVersion
1429
1419
  };
1420
+ var prefetchInterface = false;
1421
+ var prefetchFilePath = path.resolve(compiler.options.context || process.cwd(), "node_modules/.mf/".concat(sdk.encodeName(name), "/").concat(sdk.MFPrefetchCommon.fileName));
1422
+ var existPrefetch = fs.existsSync(prefetchFilePath);
1423
+ if (existPrefetch) {
1424
+ var content = fs.readFileSync(prefetchFilePath).toString();
1425
+ if (content) {
1426
+ prefetchInterface = true;
1427
+ }
1428
+ }
1429
+ metaData.prefetchInterface = prefetchInterface;
1430
1430
  if (this._options.getPublicPath) {
1431
1431
  if ('publicPath' in metaData) {
1432
1432
  delete metaData.publicPath;
package/dist/index.esm.js CHANGED
@@ -1,8 +1,8 @@
1
- import path from 'path';
2
- import fs from 'fs';
3
1
  import chalk from 'chalk';
2
+ import path from 'path';
4
3
  import { createLogger, StatsFileName, ManifestFileName, simpleJoinRemoteEntry, normalizeOptions, encodeName, MFPrefetchCommon } from '@module-federation/sdk';
5
4
  import { isTSProject, retrieveTypesAssetsInfo } from '@module-federation/dts-plugin/core';
5
+ import fs from 'fs';
6
6
  import { RemoteManager, SharedManager, ContainerManager, PKGJsonManager, utils } from '@module-federation/managers';
7
7
 
8
8
  var PLUGIN_IDENTIFIER = 'Module Federation Manifest Plugin';
@@ -602,7 +602,7 @@ var ManifestManager = /*#__PURE__*/ function() {
602
602
  var extraOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
603
603
  var _this = this;
604
604
  return _async_to_generator$2(function() {
605
- var compilation, publicPath, stats, compiler, bundler, additionalData, disableEmit, manifest, prefetchInterface, prefetchFilePath, existPrefetch, content, manifestFileName, ret;
605
+ var compilation, publicPath, stats, compiler, bundler, additionalData, disableEmit, manifest, manifestFileName, ret;
606
606
  return _ts_generator$2(this, function(_state) {
607
607
  switch(_state.label){
608
608
  case 0:
@@ -649,16 +649,6 @@ var ManifestManager = /*#__PURE__*/ function() {
649
649
  sum.push(remote);
650
650
  return sum;
651
651
  }, []);
652
- prefetchInterface = false;
653
- prefetchFilePath = path.resolve(compiler.options.context || process.cwd(), "node_modules/.mf/".concat(encodeName(stats.name), "/").concat(MFPrefetchCommon.fileName));
654
- existPrefetch = fs.existsSync(prefetchFilePath);
655
- if (existPrefetch) {
656
- content = fs.readFileSync(prefetchFilePath).toString();
657
- if (content) {
658
- prefetchInterface = true;
659
- }
660
- }
661
- stats.metaData.prefetchInterface = prefetchInterface;
662
652
  _this._manifest = manifest;
663
653
  manifestFileName = _this.fileName;
664
654
  if (!additionalData) return [
@@ -1425,6 +1415,16 @@ var StatsManager = /*#__PURE__*/ function() {
1425
1415
  globalName: globalName,
1426
1416
  pluginVersion: this._pluginVersion
1427
1417
  };
1418
+ var prefetchInterface = false;
1419
+ var prefetchFilePath = path.resolve(compiler.options.context || process.cwd(), "node_modules/.mf/".concat(encodeName(name), "/").concat(MFPrefetchCommon.fileName));
1420
+ var existPrefetch = fs.existsSync(prefetchFilePath);
1421
+ if (existPrefetch) {
1422
+ var content = fs.readFileSync(prefetchFilePath).toString();
1423
+ if (content) {
1424
+ prefetchInterface = true;
1425
+ }
1426
+ }
1427
+ metaData.prefetchInterface = prefetchInterface;
1428
1428
  if (this._options.getPublicPath) {
1429
1429
  if ('publicPath' in metaData) {
1430
1430
  delete metaData.publicPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/manifest",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
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.8.1",
28
- "@module-federation/dts-plugin": "0.8.1",
29
- "@module-federation/managers": "0.8.1"
27
+ "@module-federation/sdk": "0.8.2",
28
+ "@module-federation/dts-plugin": "0.8.2",
29
+ "@module-federation/managers": "0.8.2"
30
30
  },
31
31
  "exports": {
32
32
  ".": {