@mf-toolkit/shared-inspector 0.5.2 → 0.5.3
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/README.md +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
[](https://github.com/zvitaly7/mf-toolkit/blob/main/LICENSE)
|
|
5
5
|
[](https://nodejs.org)
|
|
6
6
|
|
|
7
|
+

|
|
8
|
+
|
|
7
9
|
**Validate Module Federation `shared` config at build time.**
|
|
8
10
|
|
|
9
11
|
`shared` config errors are silent — mismatched versions, broken singleton negotiation, duplicate instances in the bundle. `shared-inspector` surfaces these issues before they reach production. Every finding includes a risk score and a ready-to-paste fix.
|
|
@@ -110,8 +112,6 @@ npx @mf-toolkit/shared-inspector
|
|
|
110
112
|
The tool scans `./src`, reads installed versions from `package.json`, and prints a diagnostic report. Each finding includes what's wrong, what breaks at runtime, and a ready-to-paste fix:
|
|
111
113
|
|
|
112
114
|
```
|
|
113
|
-
mf-inspector v0.4.0
|
|
114
|
-
|
|
115
115
|
✓ Scanned 47 files
|
|
116
116
|
|
|
117
117
|
[MfSharedInspector] checkout (depth: local-graph, 47 files scanned)
|
|
@@ -167,7 +167,7 @@ Every report ends with a score out of 100:
|
|
|
167
167
|
| 40–69 | 🟠 RISKY |
|
|
168
168
|
| 0–39 | 🔴 CRITICAL |
|
|
169
169
|
|
|
170
|
-
## CI
|
|
170
|
+
## Advanced: CI integration
|
|
171
171
|
|
|
172
172
|
Integrate into build pipelines to fail on findings, gate on score, or emit manifests for later federation analysis.
|
|
173
173
|
|
|
@@ -247,7 +247,9 @@ jobs:
|
|
|
247
247
|
with: { name: manifest-checkout, path: project-manifest.json }
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
-
## Federation mode
|
|
250
|
+
## Advanced: Federation mode
|
|
251
|
+
|
|
252
|
+

|
|
251
253
|
|
|
252
254
|
Once each MF has emitted its manifest, aggregate them to detect cross-team conflicts: version mismatches, singleton inconsistencies, and shared-config gaps across host and remotes.
|
|
253
255
|
|
|
@@ -576,6 +578,8 @@ No webpack build required. Runs in seconds on the source tree directly.
|
|
|
576
578
|
|
|
577
579
|
## Known limitations
|
|
578
580
|
|
|
581
|
+
The tool works well for the vast majority of typical Module Federation setups. The limitations below only apply to edge cases or highly dynamic configurations:
|
|
582
|
+
|
|
579
583
|
- **TypeScript path aliases without `tsconfigPath`**: aliased imports are treated as external package names.
|
|
580
584
|
- **Dynamic imports with variables** (`import(moduleName)`): not analysed — requires runtime information.
|
|
581
585
|
- **Exact tsconfig alias patterns** (non-wildcard): only `"@alias/*"` wildcard form is supported.
|
package/package.json
CHANGED