@module-federation/manifest 2.3.3 → 2.4.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.
- package/dist/StatsManager.js +0 -20
- package/dist/StatsManager.mjs +1 -21
- package/package.json +4 -4
package/dist/StatsManager.js
CHANGED
|
@@ -56,12 +56,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
56
56
|
StatsManager: () => (/* binding */ StatsManager)
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
;// CONCATENATED MODULE: external "fs"
|
|
60
|
-
const external_fs_namespaceObject = require("fs");
|
|
61
|
-
var external_fs_default = /*#__PURE__*/__webpack_require__.n(external_fs_namespaceObject);
|
|
62
|
-
;// CONCATENATED MODULE: external "path"
|
|
63
|
-
const external_path_namespaceObject = require("path");
|
|
64
|
-
var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_namespaceObject);
|
|
65
59
|
;// CONCATENATED MODULE: external "@module-federation/sdk"
|
|
66
60
|
const sdk_namespaceObject = require("@module-federation/sdk");
|
|
67
61
|
;// CONCATENATED MODULE: external "./utils.js"
|
|
@@ -82,8 +76,6 @@ const external_ModuleHandler_js_namespaceObject = require("./ModuleHandler.js");
|
|
|
82
76
|
|
|
83
77
|
|
|
84
78
|
|
|
85
|
-
|
|
86
|
-
|
|
87
79
|
class StatsManager {
|
|
88
80
|
getBuildInfo(context, target) {
|
|
89
81
|
const rootPath = context || process.cwd();
|
|
@@ -154,16 +146,6 @@ class StatsManager {
|
|
|
154
146
|
globalName: globalName,
|
|
155
147
|
pluginVersion: this._pluginVersion
|
|
156
148
|
};
|
|
157
|
-
let prefetchInterface = false;
|
|
158
|
-
const prefetchFilePath = external_path_default().resolve(compiler.options.context || process.cwd(), `node_modules/.mf/${(0,sdk_namespaceObject.encodeName)(name)}/${sdk_namespaceObject.MFPrefetchCommon.fileName}`);
|
|
159
|
-
const existPrefetch = external_fs_default().existsSync(prefetchFilePath);
|
|
160
|
-
if (existPrefetch) {
|
|
161
|
-
const content = external_fs_default().readFileSync(prefetchFilePath).toString();
|
|
162
|
-
if (content) {
|
|
163
|
-
prefetchInterface = true;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
metaData.prefetchInterface = prefetchInterface;
|
|
167
149
|
return this.setMetaDataPublicPath(metaData, compiler);
|
|
168
150
|
}
|
|
169
151
|
_getFilteredModules(stats) {
|
|
@@ -512,8 +494,6 @@ class StatsManager {
|
|
|
512
494
|
metaData.pluginVersion = this._pluginVersion;
|
|
513
495
|
}
|
|
514
496
|
this.setMetaDataPublicPath(metaData, compiler);
|
|
515
|
-
// rspack not support legacy prefetch, and this field should be removed in the future
|
|
516
|
-
metaData.prefetchInterface = false;
|
|
517
497
|
return stats;
|
|
518
498
|
}
|
|
519
499
|
async generateStats(compiler, compilation) {
|
package/dist/StatsManager.mjs
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import path from "path";
|
|
3
|
-
import { MFPrefetchCommon, composeKeyWithSeparator, encodeName, getManifestFileName } from "@module-federation/sdk";
|
|
1
|
+
import { composeKeyWithSeparator, getManifestFileName } from "@module-federation/sdk";
|
|
4
2
|
import { assert, findChunk, getAssetsByChunk, getAssetsByChunkIDs, getFileNameWithOutExt, getSharedModules, getTypesMetaInfo } from "./utils.mjs";
|
|
5
3
|
import logger from "./logger.mjs";
|
|
6
4
|
import { ContainerManager, PKGJsonManager, RemoteManager, SharedManager, UNKNOWN_MODULE_NAME, utils } from "@module-federation/managers";
|
|
7
5
|
import { HOT_UPDATE_SUFFIX } from "./constants.mjs";
|
|
8
6
|
import { ModuleHandler, getExposeItem, getExposeName, getShareItem } from "./ModuleHandler.mjs";
|
|
9
7
|
|
|
10
|
-
;// CONCATENATED MODULE: external "fs"
|
|
11
|
-
|
|
12
|
-
;// CONCATENATED MODULE: external "path"
|
|
13
|
-
|
|
14
8
|
;// CONCATENATED MODULE: external "@module-federation/sdk"
|
|
15
9
|
|
|
16
10
|
;// CONCATENATED MODULE: external "./utils.mjs"
|
|
@@ -30,8 +24,6 @@ import { ModuleHandler, getExposeItem, getExposeName, getShareItem } from "./Mod
|
|
|
30
24
|
|
|
31
25
|
|
|
32
26
|
|
|
33
|
-
|
|
34
|
-
|
|
35
27
|
class StatsManager {
|
|
36
28
|
getBuildInfo(context, target) {
|
|
37
29
|
const rootPath = context || process.cwd();
|
|
@@ -102,16 +94,6 @@ class StatsManager {
|
|
|
102
94
|
globalName: globalName,
|
|
103
95
|
pluginVersion: this._pluginVersion
|
|
104
96
|
};
|
|
105
|
-
let prefetchInterface = false;
|
|
106
|
-
const prefetchFilePath = path.resolve(compiler.options.context || process.cwd(), `node_modules/.mf/${encodeName(name)}/${MFPrefetchCommon.fileName}`);
|
|
107
|
-
const existPrefetch = fs.existsSync(prefetchFilePath);
|
|
108
|
-
if (existPrefetch) {
|
|
109
|
-
const content = fs.readFileSync(prefetchFilePath).toString();
|
|
110
|
-
if (content) {
|
|
111
|
-
prefetchInterface = true;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
metaData.prefetchInterface = prefetchInterface;
|
|
115
97
|
return this.setMetaDataPublicPath(metaData, compiler);
|
|
116
98
|
}
|
|
117
99
|
_getFilteredModules(stats) {
|
|
@@ -460,8 +442,6 @@ class StatsManager {
|
|
|
460
442
|
metaData.pluginVersion = this._pluginVersion;
|
|
461
443
|
}
|
|
462
444
|
this.setMetaDataPublicPath(metaData, compiler);
|
|
463
|
-
// rspack not support legacy prefetch, and this field should be removed in the future
|
|
464
|
-
metaData.prefetchInterface = false;
|
|
465
445
|
return stats;
|
|
466
446
|
}
|
|
467
447
|
async generateStats(compiler, compilation) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/manifest",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Provide manifest/stats for webpack/rspack MF project .",
|
|
6
6
|
"keywords": [
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"types": "./dist/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"find-pkg": "2.0.0",
|
|
31
|
-
"@module-federation/sdk": "2.
|
|
32
|
-
"@module-federation/
|
|
33
|
-
"@module-federation/
|
|
31
|
+
"@module-federation/sdk": "2.4.0",
|
|
32
|
+
"@module-federation/managers": "2.4.0",
|
|
33
|
+
"@module-federation/dts-plugin": "2.4.0"
|
|
34
34
|
},
|
|
35
35
|
"exports": {
|
|
36
36
|
".": {
|