@vc-shell/mf-host 2.0.4-pr228.833ff5f → 2.0.4
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.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { registerRemoteModules } from "./register-remote-modules.js";
|
|
2
|
-
export type { RegisterRemoteModulesOptions } from "./register-remote-modules.js";
|
|
2
|
+
export type { RegisterRemoteModulesOptions, ModuleRegistryEntry } from "./register-remote-modules.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { type App } from "vue";
|
|
2
2
|
import type { Router } from "vue-router";
|
|
3
|
+
export interface ModuleRegistryEntry {
|
|
4
|
+
id: string;
|
|
5
|
+
entry: string;
|
|
6
|
+
version: string;
|
|
7
|
+
compatibleWith?: {
|
|
8
|
+
dependencies?: Record<string, string>;
|
|
9
|
+
requires?: Record<string, string>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
3
12
|
export interface RegisterRemoteModulesOptions {
|
|
4
13
|
router: Router;
|
|
5
14
|
appName: string;
|
|
6
|
-
/**
|
|
7
|
-
* Optional manifest endpoint override. Defaults to
|
|
8
|
-
* `/api/apps/${encodeURIComponent(appName)}/manifest`.
|
|
9
|
-
* Useful for ops debugging or non-standard deployments.
|
|
10
|
-
*/
|
|
11
|
-
manifestUrl?: string;
|
|
12
15
|
}
|
|
13
16
|
/**
|
|
14
|
-
* Discover and load remote MF modules from the
|
|
15
|
-
* modularity manifest endpoint.
|
|
17
|
+
* Discover and load remote MF modules from the server registry.
|
|
16
18
|
*
|
|
17
19
|
* Call this in your app's main.ts BEFORE app.mount():
|
|
18
20
|
* ```ts
|
|
@@ -20,9 +22,9 @@ export interface RegisterRemoteModulesOptions {
|
|
|
20
22
|
* registerRemoteModules(app, { router, appName: "my-app" });
|
|
21
23
|
* ```
|
|
22
24
|
*
|
|
23
|
-
* The function is fire-and-forget (async internally).
|
|
24
|
-
* `ModulesReadyKey` and `ModulesLoadErrorKey` refs via
|
|
25
|
-
* components can react to loading state.
|
|
25
|
+
* The function is fire-and-forget (async internally).
|
|
26
|
+
* It provides `ModulesReadyKey` and `ModulesLoadErrorKey` refs via app.provide()
|
|
27
|
+
* so components can react to loading state.
|
|
26
28
|
*/
|
|
27
29
|
export declare function registerRemoteModules(app: App, options: RegisterRemoteModulesOptions): void;
|
|
28
30
|
//# sourceMappingURL=register-remote-modules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-remote-modules.d.ts","sourceRoot":"","sources":["../src/register-remote-modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,GAAG,EAAe,MAAM,KAAK,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"register-remote-modules.d.ts","sourceRoot":"","sources":["../src/register-remote-modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,GAAG,EAAe,MAAM,KAAK,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAyDzC,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE;QACf,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACnC,CAAC;CACH;AAMD,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAuCD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,4BAA4B,GAAG,IAAI,CAoI3F"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
|
+
import * as semver from "semver";
|
|
2
3
|
import { createInstance } from "@module-federation/runtime";
|
|
3
4
|
import { SHARED_DEPS_BASE } from "@vc-shell/mf-config";
|
|
4
5
|
// Shared deps — statically imported. No circular dependency because
|
|
@@ -20,6 +21,7 @@ import vueI18nPkg from "vue-i18n/package.json";
|
|
|
20
21
|
import lodashEsPkg from "lodash-es/package.json";
|
|
21
22
|
import vueusePkg from "@vueuse/core/package.json";
|
|
22
23
|
import frameworkPkg from "@vc-shell/framework/package.json";
|
|
24
|
+
const REGISTRY_URL = "/api/frontend-modules";
|
|
23
25
|
const RUNTIME_LIBS = {
|
|
24
26
|
vue: { lib: () => Vue, version: vuePkg.version },
|
|
25
27
|
"vue-router": { lib: () => VueRouter, version: vueRouterPkg.version },
|
|
@@ -44,15 +46,6 @@ const SHARED_LIBS = Object.fromEntries(Object.entries(SHARED_DEPS_BASE).map(([na
|
|
|
44
46
|
return [name, { ...runtime, requiredVersion: config.requiredVersion ?? "*" }];
|
|
45
47
|
}));
|
|
46
48
|
// --- Helper functions ---
|
|
47
|
-
function defaultManifestUrl(appName) {
|
|
48
|
-
return `/api/apps/${encodeURIComponent(appName)}/manifest`;
|
|
49
|
-
}
|
|
50
|
-
function buildEntryUrl(filePath, hash) {
|
|
51
|
-
return hash ? `${filePath}?v=${encodeURIComponent(hash)}` : filePath;
|
|
52
|
-
}
|
|
53
|
-
function stripLeadingDotSlash(s) {
|
|
54
|
-
return s.replace(/^\.\//, "");
|
|
55
|
-
}
|
|
56
49
|
/** Resolve Vue plugin(s) from MF module exports. */
|
|
57
50
|
function resolvePlugins(exports) {
|
|
58
51
|
const mod = exports;
|
|
@@ -77,10 +70,25 @@ function resolvePlugins(exports) {
|
|
|
77
70
|
}
|
|
78
71
|
return plugins;
|
|
79
72
|
}
|
|
73
|
+
/** Convert NuGet-style version range notation to semver. */
|
|
74
|
+
function humanizeRange(range) {
|
|
75
|
+
const exact = range.match(/^\[\s*([^\],]+?)\s*\]$/);
|
|
76
|
+
if (exact)
|
|
77
|
+
return exact[1];
|
|
78
|
+
const m = range.match(/^([[\(])\s*([^,]*?)\s*,\s*([^)\]]*?)\s*([)\]])$/);
|
|
79
|
+
if (!m)
|
|
80
|
+
return range;
|
|
81
|
+
const [, openBracket, lower, upper, closeBracket] = m;
|
|
82
|
+
const parts = [];
|
|
83
|
+
if (lower)
|
|
84
|
+
parts.push(`${openBracket === "[" ? ">=" : ">"}${lower}`);
|
|
85
|
+
if (upper)
|
|
86
|
+
parts.push(`${closeBracket === "]" ? "<=" : "<"}${upper}`);
|
|
87
|
+
return parts.join(" ") || range;
|
|
88
|
+
}
|
|
80
89
|
// --- Main function ---
|
|
81
90
|
/**
|
|
82
|
-
* Discover and load remote MF modules from the
|
|
83
|
-
* modularity manifest endpoint.
|
|
91
|
+
* Discover and load remote MF modules from the server registry.
|
|
84
92
|
*
|
|
85
93
|
* Call this in your app's main.ts BEFORE app.mount():
|
|
86
94
|
* ```ts
|
|
@@ -88,53 +96,67 @@ function resolvePlugins(exports) {
|
|
|
88
96
|
* registerRemoteModules(app, { router, appName: "my-app" });
|
|
89
97
|
* ```
|
|
90
98
|
*
|
|
91
|
-
* The function is fire-and-forget (async internally).
|
|
92
|
-
* `ModulesReadyKey` and `ModulesLoadErrorKey` refs via
|
|
93
|
-
* components can react to loading state.
|
|
99
|
+
* The function is fire-and-forget (async internally).
|
|
100
|
+
* It provides `ModulesReadyKey` and `ModulesLoadErrorKey` refs via app.provide()
|
|
101
|
+
* so components can react to loading state.
|
|
94
102
|
*/
|
|
95
103
|
export function registerRemoteModules(app, options) {
|
|
96
104
|
const { ModulesReadyKey, ModulesLoadErrorKey } = Framework;
|
|
97
105
|
const modulesReady = ref(false);
|
|
98
106
|
const modulesLoadError = ref(false);
|
|
107
|
+
// Capture the original URL before the blade router guard can redirect it away.
|
|
108
|
+
// During async module loading, the guard may not find workspaces (not registered yet)
|
|
109
|
+
// and redirect to root — losing the tenant prefix and blade URL.
|
|
110
|
+
const _initialUrl = window.location.hash.replace(/^#/, "") || "/";
|
|
99
111
|
app.provide(ModulesReadyKey, modulesReady);
|
|
100
112
|
app.provide(ModulesLoadErrorKey, modulesLoadError);
|
|
113
|
+
// Fire-and-forget async loading
|
|
101
114
|
(async () => {
|
|
102
115
|
try {
|
|
103
116
|
performance.mark("vc:modules-start");
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
117
|
+
const frameworkVersion = frameworkPkg.version;
|
|
118
|
+
// 1. Build provides dict
|
|
119
|
+
const provides = {};
|
|
120
|
+
for (const [name, entry] of Object.entries(SHARED_LIBS)) {
|
|
121
|
+
provides[name] = entry.version;
|
|
122
|
+
}
|
|
123
|
+
// 2. Fetch registry
|
|
124
|
+
const response = await fetch(REGISTRY_URL, {
|
|
125
|
+
method: "POST",
|
|
108
126
|
credentials: "same-origin",
|
|
109
|
-
headers: {
|
|
127
|
+
headers: { "Content-Type": "application/json" },
|
|
128
|
+
body: JSON.stringify({ appName: options.appName, provides }),
|
|
110
129
|
});
|
|
111
|
-
if (
|
|
112
|
-
// Unified policy: 401/403/404/5xx → warn + skip, no loadError.
|
|
113
|
-
console.warn(`[mf-host] manifest endpoint ${manifestUrl} returned HTTP ${response.status}; skipping plugin discovery.`);
|
|
130
|
+
if (response.status === 401 || response.status === 403) {
|
|
114
131
|
modulesReady.value = true;
|
|
115
132
|
performance.mark("vc:modules-done");
|
|
116
133
|
return;
|
|
117
134
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
typeof
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
135
|
+
if (!response.ok) {
|
|
136
|
+
throw new Error(`Registry fetch failed: ${response.status} ${response.statusText}`);
|
|
137
|
+
}
|
|
138
|
+
const registry = await response.json();
|
|
139
|
+
const modules = Array.isArray(registry.modules)
|
|
140
|
+
? registry.modules.filter((m) => typeof m?.id === "string" && typeof m?.entry === "string" && typeof m?.version === "string")
|
|
141
|
+
: [];
|
|
142
|
+
// 3. Compatibility filter
|
|
143
|
+
const compatible = modules.filter((mod) => {
|
|
144
|
+
const fwRange = mod.compatibleWith?.dependencies?.["@vc-shell/framework"];
|
|
145
|
+
if (!fwRange)
|
|
146
|
+
return true;
|
|
147
|
+
const range = humanizeRange(fwRange);
|
|
148
|
+
const coerced = semver.coerce(frameworkVersion)?.version ?? frameworkVersion;
|
|
149
|
+
const ok = semver.satisfies(coerced, range);
|
|
150
|
+
if (!ok)
|
|
151
|
+
console.warn(`[mf-host] Module "${mod.id}" v${mod.version} requires framework ${range}, current ${frameworkVersion}. Skipping.`);
|
|
152
|
+
return ok;
|
|
153
|
+
});
|
|
154
|
+
if (compatible.length === 0) {
|
|
133
155
|
modulesReady.value = true;
|
|
134
156
|
performance.mark("vc:modules-done");
|
|
135
157
|
return;
|
|
136
158
|
}
|
|
137
|
-
//
|
|
159
|
+
// 4. Init MF runtime
|
|
138
160
|
const shared = {};
|
|
139
161
|
for (const [name, entry] of Object.entries(SHARED_LIBS)) {
|
|
140
162
|
shared[name] = {
|
|
@@ -145,14 +167,11 @@ export function registerRemoteModules(app, options) {
|
|
|
145
167
|
}
|
|
146
168
|
const mfInstance = createInstance({
|
|
147
169
|
name: "host",
|
|
148
|
-
remotes:
|
|
170
|
+
remotes: compatible.map((mod) => ({ name: mod.id, entry: mod.entry, type: "module" })),
|
|
149
171
|
shared,
|
|
150
172
|
});
|
|
151
|
-
//
|
|
152
|
-
const results = await Promise.allSettled(
|
|
153
|
-
entry: e,
|
|
154
|
-
exports: await mfInstance.loadRemote(`${e.remoteName}/${e.exposedKey}`),
|
|
155
|
-
})));
|
|
173
|
+
// 5. Load all in parallel
|
|
174
|
+
const results = await Promise.allSettled(compatible.map(async (mod) => ({ mod, exports: await mfInstance.loadRemote(`${mod.id}/module`) })));
|
|
156
175
|
performance.mark("vc:modules-loaded");
|
|
157
176
|
const loaded = [];
|
|
158
177
|
const failed = [];
|
|
@@ -161,27 +180,24 @@ export function registerRemoteModules(app, options) {
|
|
|
161
180
|
if (r.status === "fulfilled")
|
|
162
181
|
loaded.push(r.value);
|
|
163
182
|
else
|
|
164
|
-
failed.push({
|
|
165
|
-
}
|
|
166
|
-
for (const { entry, error } of failed) {
|
|
167
|
-
console.error(`[mf-host] Failed to load "${entry.id}":`, error);
|
|
183
|
+
failed.push({ mod: compatible[i], error: r.reason });
|
|
168
184
|
}
|
|
169
|
-
|
|
170
|
-
|
|
185
|
+
for (const { mod, error } of failed)
|
|
186
|
+
console.error(`[mf-host] Failed to load "${mod.id}":`, error);
|
|
187
|
+
// 6. Install plugins
|
|
188
|
+
for (const { mod, exports } of loaded) {
|
|
171
189
|
const plugins = resolvePlugins(exports);
|
|
172
190
|
if (plugins.length > 0) {
|
|
173
191
|
for (const plugin of plugins)
|
|
174
192
|
app.use(plugin, { router: options.router });
|
|
175
|
-
console.info(`[mf-host] "${
|
|
193
|
+
console.info(`[mf-host] "${mod.id}" v${mod.version} installed (${plugins.length} sub-module(s)).`);
|
|
176
194
|
}
|
|
177
195
|
else {
|
|
178
|
-
console.error(`[mf-host] "${
|
|
196
|
+
console.error(`[mf-host] "${mod.id}" has no install function. Skipping.`);
|
|
179
197
|
}
|
|
180
198
|
}
|
|
181
199
|
if (failed.length > 0) {
|
|
182
|
-
console.warn(`[mf-host] ${loaded.length}/${
|
|
183
|
-
.map((f) => f.entry.id)
|
|
184
|
-
.join(", ")}]`);
|
|
200
|
+
console.warn(`[mf-host] ${loaded.length}/${compatible.length} modules loaded. Failed: [${failed.map((f) => f.mod.id).join(", ")}]`);
|
|
185
201
|
}
|
|
186
202
|
performance.mark("vc:modules-installed");
|
|
187
203
|
modulesReady.value = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-remote-modules.js","sourceRoot":"","sources":["../src/register-remote-modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAyB,MAAM,KAAK,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,oEAAoE;AACpE,qDAAqD;AACrD,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,UAAU,CAAC;AACpC,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,gBAAgB,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,mBAAmB,MAAM,gCAAgC,CAAC;AAEtE,uFAAuF;AACvF,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC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M,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC;YAChE,IAAI,YAAY,KAAK,GAAG;gBAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YAE/D,WAAW,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC;YACzD,gBAAgB,CAAC,KAAK,GAAG,IAAI,CAAC;YAC9B,WAAW,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;AACP,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/mf-host",
|
|
3
3
|
"description": "Module Federation host runtime for VC Shell — discovers and loads remote modules",
|
|
4
|
-
"version": "2.0.4
|
|
4
|
+
"version": "2.0.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -25,10 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@module-federation/runtime": "^2.1.0",
|
|
28
|
-
"@vc-shell/mf-config": "2.0.4
|
|
28
|
+
"@vc-shell/mf-config": "2.0.4",
|
|
29
|
+
"semver": "^7.6.2"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
|
-
"@vc-shell/framework": "^2.0.4
|
|
32
|
+
"@vc-shell/framework": "^2.0.4",
|
|
32
33
|
"@vueuse/core": "^10.0.0",
|
|
33
34
|
"lodash-es": "^4.0.0",
|
|
34
35
|
"vee-validate": "^4.12.0",
|
|
@@ -37,8 +38,9 @@
|
|
|
37
38
|
"vue-router": "^4.0.0 || ^5.0.0"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@
|
|
41
|
-
"@vc-shell/
|
|
41
|
+
"@types/semver": "^7.5.0",
|
|
42
|
+
"@vc-shell/framework": "2.0.4",
|
|
43
|
+
"@vc-shell/ts-config": "2.0.4",
|
|
42
44
|
"@vueuse/core": "^10.7.1",
|
|
43
45
|
"lodash-es": "^4.17.21",
|
|
44
46
|
"tsc-alias": "^1.8.8",
|