@vercel/microfrontends 0.14.0 → 0.16.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/bin/cli.cjs +392 -1620
- package/dist/config.cjs +478 -1001
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.ts +4 -25
- package/dist/config.js +474 -980
- package/dist/config.js.map +1 -1
- package/dist/{v2/microfrontends → microfrontends}/server.cjs +91 -150
- package/dist/microfrontends/server.cjs.map +1 -0
- package/dist/{v2/microfrontends → microfrontends}/server.d.ts +4 -4
- package/dist/{v2/microfrontends → microfrontends}/server.js +91 -150
- package/dist/microfrontends/server.js.map +1 -0
- package/dist/{v2/microfrontends.cjs → microfrontends.cjs} +49 -28
- package/dist/microfrontends.cjs.map +1 -0
- package/dist/{v2/microfrontends.d.ts → microfrontends.d.ts} +4 -4
- package/dist/{v2/microfrontends.js → microfrontends.js} +48 -27
- package/dist/microfrontends.js.map +1 -0
- package/dist/next/client.cjs +1 -1
- package/dist/next/client.cjs.map +1 -1
- package/dist/next/client.js +1 -1
- package/dist/next/client.js.map +1 -1
- package/dist/next/config.cjs +1344 -1024
- package/dist/next/config.cjs.map +1 -1
- package/dist/next/config.d.ts +1 -1
- package/dist/next/config.js +1343 -1023
- package/dist/next/config.js.map +1 -1
- package/dist/next/endpoints.cjs +77 -18
- package/dist/next/endpoints.cjs.map +1 -1
- package/dist/next/endpoints.d.ts +13 -2
- package/dist/next/endpoints.js +77 -18
- package/dist/next/endpoints.js.map +1 -1
- package/dist/next/middleware.cjs +765 -395
- package/dist/next/middleware.cjs.map +1 -1
- package/dist/next/middleware.d.ts +10 -5
- package/dist/next/middleware.js +765 -395
- package/dist/next/middleware.js.map +1 -1
- package/dist/next/testing.cjs +615 -1031
- package/dist/next/testing.cjs.map +1 -1
- package/dist/next/testing.d.ts +14 -12
- package/dist/next/testing.js +609 -1015
- package/dist/next/testing.js.map +1 -1
- package/dist/overrides.cjs +40 -108
- package/dist/overrides.cjs.map +1 -1
- package/dist/overrides.d.ts +24 -2
- package/dist/overrides.js +36 -106
- package/dist/overrides.js.map +1 -1
- package/dist/{v2/routing.cjs → routing.cjs} +3 -3
- package/dist/routing.cjs.map +1 -0
- package/dist/{v2/schema.cjs → schema.cjs} +1 -1
- package/dist/schema.cjs.map +1 -0
- package/dist/schema.d.ts +1 -0
- package/dist/utils/mfe-port.cjs +237 -1338
- package/dist/utils/mfe-port.cjs.map +1 -1
- package/dist/utils/mfe-port.js +230 -1331
- package/dist/utils/mfe-port.js.map +1 -1
- package/dist/validation.cjs +31 -361
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.d.ts +3 -146
- package/dist/validation.js +30 -359
- package/dist/validation.js.map +1 -1
- package/package.json +29 -92
- package/schema/schema.json +174 -244
- package/dist/config/client.cjs +0 -54
- package/dist/config/client.cjs.map +0 -1
- package/dist/config/client.d.ts +0 -23
- package/dist/config/client.js +0 -28
- package/dist/config/client.js.map +0 -1
- package/dist/config/edge.cjs +0 -508
- package/dist/config/edge.cjs.map +0 -1
- package/dist/config/edge.d.ts +0 -20
- package/dist/config/edge.js +0 -481
- package/dist/config/edge.js.map +0 -1
- package/dist/microfrontend-config-983a5139.d.ts +0 -154
- package/dist/schema-2922d49e.d.ts +0 -182
- package/dist/v2/config.cjs +0 -709
- package/dist/v2/config.cjs.map +0 -1
- package/dist/v2/config.d.ts +0 -4
- package/dist/v2/config.js +0 -684
- package/dist/v2/config.js.map +0 -1
- package/dist/v2/microfrontends/server.cjs.map +0 -1
- package/dist/v2/microfrontends/server.js.map +0 -1
- package/dist/v2/microfrontends.cjs.map +0 -1
- package/dist/v2/microfrontends.js.map +0 -1
- package/dist/v2/next/client.cjs +0 -3
- package/dist/v2/next/client.cjs.map +0 -1
- package/dist/v2/next/client.d.ts +0 -45
- package/dist/v2/next/client.js +0 -3
- package/dist/v2/next/client.js.map +0 -1
- package/dist/v2/next/config.cjs +0 -2178
- package/dist/v2/next/config.cjs.map +0 -1
- package/dist/v2/next/config.d.ts +0 -22
- package/dist/v2/next/config.js +0 -2143
- package/dist/v2/next/config.js.map +0 -1
- package/dist/v2/next/endpoints.cjs +0 -141
- package/dist/v2/next/endpoints.cjs.map +0 -1
- package/dist/v2/next/endpoints.d.ts +0 -26
- package/dist/v2/next/endpoints.js +0 -116
- package/dist/v2/next/endpoints.js.map +0 -1
- package/dist/v2/next/middleware.cjs +0 -1099
- package/dist/v2/next/middleware.cjs.map +0 -1
- package/dist/v2/next/middleware.d.ts +0 -34
- package/dist/v2/next/middleware.js +0 -1071
- package/dist/v2/next/middleware.js.map +0 -1
- package/dist/v2/next/testing.cjs +0 -992
- package/dist/v2/next/testing.cjs.map +0 -1
- package/dist/v2/next/testing.d.ts +0 -55
- package/dist/v2/next/testing.js +0 -961
- package/dist/v2/next/testing.js.map +0 -1
- package/dist/v2/overrides.cjs +0 -75
- package/dist/v2/overrides.cjs.map +0 -1
- package/dist/v2/overrides.d.ts +0 -24
- package/dist/v2/overrides.js +0 -45
- package/dist/v2/overrides.js.map +0 -1
- package/dist/v2/routing.cjs.map +0 -1
- package/dist/v2/schema.cjs.map +0 -1
- package/dist/v2/schema.d.ts +0 -1
- package/schema/schema-v2.json +0 -266
- /package/dist/{v2/routing.d.ts → routing.d.ts} +0 -0
- /package/dist/{v2/routing.js → routing.js} +0 -0
- /package/dist/{v2/routing.js.map → routing.js.map} +0 -0
- /package/dist/{v2/schema.js → schema.js} +0 -0
- /package/dist/{v2/schema.js.map → schema.js.map} +0 -0
package/dist/config/edge.js
DELETED
|
@@ -1,481 +0,0 @@
|
|
|
1
|
-
// src/config/edge/microfrontend-config.ts
|
|
2
|
-
import { parse } from "jsonc-parser";
|
|
3
|
-
|
|
4
|
-
// src/config/errors.ts
|
|
5
|
-
var MicrofrontendError = class extends Error {
|
|
6
|
-
constructor(message, opts) {
|
|
7
|
-
super(message);
|
|
8
|
-
this.name = "MicrofrontendsError";
|
|
9
|
-
this.source = (opts == null ? void 0 : opts.source) ?? "@vercel/microfrontends";
|
|
10
|
-
this.type = (opts == null ? void 0 : opts.type) ?? "unknown";
|
|
11
|
-
this.subtype = opts == null ? void 0 : opts.subtype;
|
|
12
|
-
Error.captureStackTrace(this, MicrofrontendError);
|
|
13
|
-
}
|
|
14
|
-
isKnown() {
|
|
15
|
-
return this.type !== "unknown";
|
|
16
|
-
}
|
|
17
|
-
isUnknown() {
|
|
18
|
-
return !this.isKnown();
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Converts an error to a MicrofrontendsError.
|
|
22
|
-
* @param original - The original error to convert.
|
|
23
|
-
* @returns The converted MicrofrontendsError.
|
|
24
|
-
*/
|
|
25
|
-
static convert(original, opts) {
|
|
26
|
-
if (opts == null ? void 0 : opts.fileName) {
|
|
27
|
-
const err = MicrofrontendError.convertFSError(original, opts.fileName);
|
|
28
|
-
if (err) {
|
|
29
|
-
return err;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (original.message.includes(
|
|
33
|
-
"Code generation from strings disallowed for this context"
|
|
34
|
-
)) {
|
|
35
|
-
return new MicrofrontendError(original.message, {
|
|
36
|
-
type: "config",
|
|
37
|
-
subtype: "unsupported_validation_env",
|
|
38
|
-
source: "ajv"
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return new MicrofrontendError(original.message);
|
|
42
|
-
}
|
|
43
|
-
static convertFSError(original, fileName) {
|
|
44
|
-
if (original instanceof Error && "code" in original) {
|
|
45
|
-
if (original.code === "ENOENT") {
|
|
46
|
-
return new MicrofrontendError(`Could not find "${fileName}"`, {
|
|
47
|
-
type: "config",
|
|
48
|
-
subtype: "unable_to_read_file",
|
|
49
|
-
source: "fs"
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
if (original.code === "EACCES") {
|
|
53
|
-
return new MicrofrontendError(
|
|
54
|
-
`Permission denied while accessing "${fileName}"`,
|
|
55
|
-
{
|
|
56
|
-
type: "config",
|
|
57
|
-
subtype: "invalid_permissions",
|
|
58
|
-
source: "fs"
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
if (original instanceof SyntaxError) {
|
|
64
|
-
return new MicrofrontendError(
|
|
65
|
-
`Failed to parse "${fileName}": Invalid JSON format.`,
|
|
66
|
-
{
|
|
67
|
-
type: "config",
|
|
68
|
-
subtype: "invalid_syntax",
|
|
69
|
-
source: "fs"
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Handles an unknown error and returns a MicrofrontendsError instance.
|
|
77
|
-
* @param err - The error to handle.
|
|
78
|
-
* @returns A MicrofrontendsError instance.
|
|
79
|
-
*/
|
|
80
|
-
static handle(err, opts) {
|
|
81
|
-
if (err instanceof MicrofrontendError) {
|
|
82
|
-
return err;
|
|
83
|
-
}
|
|
84
|
-
if (err instanceof Error) {
|
|
85
|
-
return MicrofrontendError.convert(err, opts);
|
|
86
|
-
}
|
|
87
|
-
if (typeof err === "object" && err !== null) {
|
|
88
|
-
if ("message" in err && typeof err.message === "string") {
|
|
89
|
-
return MicrofrontendError.convert(new Error(err.message), opts);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return new MicrofrontendError("An unknown error occurred");
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// src/routing/url.ts
|
|
97
|
-
function buildUrlSafeString(givenOpts = {}) {
|
|
98
|
-
const options = {
|
|
99
|
-
joinString: "-",
|
|
100
|
-
lowercaseOnly: true,
|
|
101
|
-
maxLen: 100,
|
|
102
|
-
regexRemovePattern: /(?:(?!(?:[a-z0-9])).)/gi,
|
|
103
|
-
trimWhitespace: true,
|
|
104
|
-
...givenOpts
|
|
105
|
-
};
|
|
106
|
-
return {
|
|
107
|
-
generate: (...args) => {
|
|
108
|
-
const reJoinString = new RegExp(`${options.joinString}+`, "g");
|
|
109
|
-
let tag;
|
|
110
|
-
if (args.length === 0) {
|
|
111
|
-
throw new Error("generate method must be passed at least one argument");
|
|
112
|
-
}
|
|
113
|
-
for (let i = 0; i < args.length; i++) {
|
|
114
|
-
const arg = args[i];
|
|
115
|
-
if (typeof arg !== "string")
|
|
116
|
-
throw new Error("all supplied arguments must be Strings");
|
|
117
|
-
if (options.trimWhitespace) {
|
|
118
|
-
args[i] = arg.trim();
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
tag = args.join(options.joinString);
|
|
122
|
-
tag = tag.replace(/\s/g, options.joinString);
|
|
123
|
-
if (options.lowercaseOnly)
|
|
124
|
-
tag = tag.toLowerCase();
|
|
125
|
-
tag = tag.replace(options.regexRemovePattern, (match) => {
|
|
126
|
-
if (match === options.joinString)
|
|
127
|
-
return match;
|
|
128
|
-
return "";
|
|
129
|
-
});
|
|
130
|
-
if (tag.length > options.maxLen)
|
|
131
|
-
tag = tag.substring(0, options.maxLen);
|
|
132
|
-
tag = tag.replace(reJoinString, options.joinString);
|
|
133
|
-
return tag;
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
var urlSafeString = buildUrlSafeString().generate;
|
|
138
|
-
function makeUrlSafe(name) {
|
|
139
|
-
return urlSafeString(name.replace(/\//g, "-")).replace(/^-*/g, "").replace(/-*$/g, "");
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// src/config/overrides/config.ts
|
|
143
|
-
var OVERRIDES_COOKIE_PREFIX = "vercel-micro-frontends-override";
|
|
144
|
-
var _Overrides = class {
|
|
145
|
-
constructor(config) {
|
|
146
|
-
this.config = config;
|
|
147
|
-
}
|
|
148
|
-
static getAppEnvOverrideCookieName(zone) {
|
|
149
|
-
return `${_Overrides.overrideEnvCookiePrefix}${zone}`;
|
|
150
|
-
}
|
|
151
|
-
static isOverrideCookie(cookie) {
|
|
152
|
-
var _a;
|
|
153
|
-
return Boolean((_a = cookie.name) == null ? void 0 : _a.startsWith(OVERRIDES_COOKIE_PREFIX));
|
|
154
|
-
}
|
|
155
|
-
static getOverrideFromCookie(cookie) {
|
|
156
|
-
if (!_Overrides.isOverrideCookie(cookie) || !cookie.value)
|
|
157
|
-
return;
|
|
158
|
-
return {
|
|
159
|
-
zone: cookie.name.replace(_Overrides.overrideEnvCookiePrefix, ""),
|
|
160
|
-
host: cookie.value
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
static parseOverrides(cookies) {
|
|
164
|
-
const overridesConfig = { applications: {} };
|
|
165
|
-
cookies.forEach((cookie) => {
|
|
166
|
-
const override = _Overrides.getOverrideFromCookie(cookie);
|
|
167
|
-
if (!override)
|
|
168
|
-
return;
|
|
169
|
-
overridesConfig.applications[override.zone] = {
|
|
170
|
-
environment: { host: override.host }
|
|
171
|
-
};
|
|
172
|
-
});
|
|
173
|
-
return overridesConfig;
|
|
174
|
-
}
|
|
175
|
-
static validOverrideDomainsForZone(microfrontendConfig, zone) {
|
|
176
|
-
var _a, _b, _c, _d, _e;
|
|
177
|
-
const projectName = (_a = microfrontendConfig.getZone(zone).vercel) == null ? void 0 : _a.projectName;
|
|
178
|
-
if (!projectName) {
|
|
179
|
-
return [microfrontendConfig.getZone(zone).production.host];
|
|
180
|
-
}
|
|
181
|
-
const parsedProjectName = makeUrlSafe(projectName);
|
|
182
|
-
const previewDeploymentSuffix = (_c = (_b = microfrontendConfig.options) == null ? void 0 : _b.vercel) == null ? void 0 : _c.previewDeploymentSuffix;
|
|
183
|
-
const teamSlug = (_e = (_d = microfrontendConfig.options) == null ? void 0 : _d.vercel) == null ? void 0 : _e.teamSlug;
|
|
184
|
-
if (!teamSlug && !previewDeploymentSuffix) {
|
|
185
|
-
return [microfrontendConfig.getZone(zone).production.host];
|
|
186
|
-
}
|
|
187
|
-
const suffix = previewDeploymentSuffix ? `.${previewDeploymentSuffix}` : `-${teamSlug}.vercel.app`;
|
|
188
|
-
return [
|
|
189
|
-
`${parsedProjectName}-git-([a-zA-Z0-9-]+)${suffix}`,
|
|
190
|
-
microfrontendConfig.getZone(zone).production.host
|
|
191
|
-
];
|
|
192
|
-
}
|
|
193
|
-
static validateOverrideDomain(microfrontendConfig, zone, domain) {
|
|
194
|
-
return new RegExp(
|
|
195
|
-
`^${_Overrides.validOverrideDomainsForZone(microfrontendConfig, zone).join(
|
|
196
|
-
"|"
|
|
197
|
-
)}$`
|
|
198
|
-
).test(domain);
|
|
199
|
-
}
|
|
200
|
-
serialize() {
|
|
201
|
-
return this.config;
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
var Overrides = _Overrides;
|
|
205
|
-
Overrides.overrideEnvCookiePrefix = `${OVERRIDES_COOKIE_PREFIX}:env:`;
|
|
206
|
-
|
|
207
|
-
// src/config/common/host.ts
|
|
208
|
-
var Host = class {
|
|
209
|
-
constructor({ protocol, host, port }) {
|
|
210
|
-
this.protocol = protocol || "https";
|
|
211
|
-
this.host = host;
|
|
212
|
-
this.port = Host.getPort({ port, protocol: this.protocol });
|
|
213
|
-
this.serialized = {
|
|
214
|
-
protocol,
|
|
215
|
-
host,
|
|
216
|
-
...port ? { port } : void 0
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
isLocal() {
|
|
220
|
-
return this.host === "localhost" || this.host === "127.0.0.1";
|
|
221
|
-
}
|
|
222
|
-
static getPort({
|
|
223
|
-
protocol,
|
|
224
|
-
port
|
|
225
|
-
}) {
|
|
226
|
-
if (!port) {
|
|
227
|
-
if (protocol === "http") {
|
|
228
|
-
return 80;
|
|
229
|
-
}
|
|
230
|
-
return 443;
|
|
231
|
-
}
|
|
232
|
-
return port;
|
|
233
|
-
}
|
|
234
|
-
isDefaultPort() {
|
|
235
|
-
return this.port === Host.getPort({ protocol: this.protocol });
|
|
236
|
-
}
|
|
237
|
-
toString(opts = {}) {
|
|
238
|
-
const url = this.toUrl(opts);
|
|
239
|
-
return url.toString().replace(/\/$/, "");
|
|
240
|
-
}
|
|
241
|
-
toUrl(opts = {}) {
|
|
242
|
-
const { includeDefaultPort } = opts;
|
|
243
|
-
const url = `${this.protocol}://${this.host}${this.isDefaultPort() && !includeDefaultPort ? "" : `:${this.port}`}`;
|
|
244
|
-
return new URL(url);
|
|
245
|
-
}
|
|
246
|
-
serialize() {
|
|
247
|
-
return this.serialized;
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
// src/config/common/application.ts
|
|
252
|
-
var Application = class {
|
|
253
|
-
constructor(name, {
|
|
254
|
-
app,
|
|
255
|
-
overrides
|
|
256
|
-
}) {
|
|
257
|
-
Application.validate(name, app);
|
|
258
|
-
this.name = name;
|
|
259
|
-
this.default = app.default;
|
|
260
|
-
this.routing = app.routing;
|
|
261
|
-
this.development = {
|
|
262
|
-
local: new Host(app.development.local),
|
|
263
|
-
fallback: app.development.fallback ? new Host(app.development.fallback) : void 0
|
|
264
|
-
};
|
|
265
|
-
this.production = new Host(app.production);
|
|
266
|
-
this.vercel = app.vercel;
|
|
267
|
-
this.overrides = (overrides == null ? void 0 : overrides.environment) ? {
|
|
268
|
-
environment: new Host(overrides.environment)
|
|
269
|
-
} : void 0;
|
|
270
|
-
}
|
|
271
|
-
isDefault() {
|
|
272
|
-
return this.default;
|
|
273
|
-
}
|
|
274
|
-
static validate(name, app) {
|
|
275
|
-
var _a, _b, _c, _d, _e;
|
|
276
|
-
if (((_b = (_a = app.routing) == null ? void 0 : _a.assetPrefix) == null ? void 0 : _b.startsWith("/")) || ((_d = (_c = app.routing) == null ? void 0 : _c.assetPrefix) == null ? void 0 : _d.endsWith("/"))) {
|
|
277
|
-
throw new MicrofrontendError(
|
|
278
|
-
`Invalid assetPrefix for application "${name}". Must not start or end with a slash.`,
|
|
279
|
-
{ type: "zone", subtype: "invalid_asset_prefix" }
|
|
280
|
-
);
|
|
281
|
-
}
|
|
282
|
-
for (const group of ((_e = app.routing) == null ? void 0 : _e.matches) ?? []) {
|
|
283
|
-
for (const p of group.paths) {
|
|
284
|
-
if (p === "/") {
|
|
285
|
-
continue;
|
|
286
|
-
}
|
|
287
|
-
if (p.endsWith("/")) {
|
|
288
|
-
throw new MicrofrontendError(
|
|
289
|
-
`Invalid path for application "${name}". ${p} must not end with a slash.`,
|
|
290
|
-
{ type: "zone", subtype: "invalid_path" }
|
|
291
|
-
);
|
|
292
|
-
}
|
|
293
|
-
if (!p.startsWith("/")) {
|
|
294
|
-
throw new MicrofrontendError(
|
|
295
|
-
`Invalid path for application "${name}". ${p} must start with a slash.`,
|
|
296
|
-
{ type: "zone", subtype: "invalid_path" }
|
|
297
|
-
);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
serialize() {
|
|
303
|
-
var _a, _b;
|
|
304
|
-
if (this.routing === void 0 || this.default) {
|
|
305
|
-
return {
|
|
306
|
-
default: true,
|
|
307
|
-
development: {
|
|
308
|
-
local: this.development.local.serialize(),
|
|
309
|
-
fallback: (_a = this.development.fallback) == null ? void 0 : _a.serialize()
|
|
310
|
-
},
|
|
311
|
-
production: this.production.serialize(),
|
|
312
|
-
vercel: this.vercel
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
return {
|
|
316
|
-
default: false,
|
|
317
|
-
routing: this.routing,
|
|
318
|
-
development: {
|
|
319
|
-
local: this.development.local.serialize(),
|
|
320
|
-
fallback: (_b = this.development.fallback) == null ? void 0 : _b.serialize()
|
|
321
|
-
},
|
|
322
|
-
production: this.production.serialize(),
|
|
323
|
-
vercel: this.vercel
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
// src/config/common/microfrontend-config.ts
|
|
329
|
-
var SUPPORTED_VERSIONS = ["1"];
|
|
330
|
-
var DEFAULT_LOCAL_PROXY_PORT = 3024;
|
|
331
|
-
var MicrofrontendConfigCommon = class {
|
|
332
|
-
constructor({
|
|
333
|
-
config,
|
|
334
|
-
overrides
|
|
335
|
-
}) {
|
|
336
|
-
this.zones = {};
|
|
337
|
-
var _a, _b, _c;
|
|
338
|
-
if (!SUPPORTED_VERSIONS.includes(config.version)) {
|
|
339
|
-
throw new MicrofrontendError(
|
|
340
|
-
`Unsupported version: ${config.version}. Supported versions are: ${SUPPORTED_VERSIONS.join(
|
|
341
|
-
", "
|
|
342
|
-
)}`,
|
|
343
|
-
{ type: "config", subtype: "unsupported_version" }
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
|
-
const disableOverrides = ((_b = (_a = config.options) == null ? void 0 : _a.vercel) == null ? void 0 : _b.disableOverrides) ?? false;
|
|
347
|
-
this.overrides = overrides && !disableOverrides ? new Overrides(overrides) : void 0;
|
|
348
|
-
for (const [zoneName, zoneConfig] of Object.entries(config.applications)) {
|
|
349
|
-
this.zones[zoneName] = new Application(zoneName, {
|
|
350
|
-
app: zoneConfig,
|
|
351
|
-
overrides: !disableOverrides ? (_c = this.overrides) == null ? void 0 : _c.config.applications[zoneName] : void 0
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
this.config = config;
|
|
355
|
-
this.name = config.name;
|
|
356
|
-
this.version = config.version;
|
|
357
|
-
this.options = config.options;
|
|
358
|
-
this.$schema = config.$schema;
|
|
359
|
-
}
|
|
360
|
-
isOverridesDisabled() {
|
|
361
|
-
var _a, _b;
|
|
362
|
-
return ((_b = (_a = this.options) == null ? void 0 : _a.vercel) == null ? void 0 : _b.disableOverrides) ?? false;
|
|
363
|
-
}
|
|
364
|
-
static getConfigFromEnv() {
|
|
365
|
-
const config = process.env.MFE_CONFIG;
|
|
366
|
-
if (!config) {
|
|
367
|
-
throw new MicrofrontendError(`Missing "MFE_CONFIG" in environment.`, {
|
|
368
|
-
type: "config",
|
|
369
|
-
subtype: "not_found_in_env"
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
return config;
|
|
373
|
-
}
|
|
374
|
-
static fromEnv(_) {
|
|
375
|
-
throw new Error("Not implemented");
|
|
376
|
-
}
|
|
377
|
-
getConfig() {
|
|
378
|
-
return this.config;
|
|
379
|
-
}
|
|
380
|
-
getAllApplications() {
|
|
381
|
-
return Object.values(this.zones);
|
|
382
|
-
}
|
|
383
|
-
getZone(name) {
|
|
384
|
-
const zone = this.zones[name];
|
|
385
|
-
if (!zone) {
|
|
386
|
-
throw new MicrofrontendError(
|
|
387
|
-
`Could not find microfrontends configuration for application "${name}"`,
|
|
388
|
-
{
|
|
389
|
-
type: "zone",
|
|
390
|
-
subtype: "not_found"
|
|
391
|
-
}
|
|
392
|
-
);
|
|
393
|
-
}
|
|
394
|
-
return zone;
|
|
395
|
-
}
|
|
396
|
-
getApplicationByProjectId(projectId) {
|
|
397
|
-
return Object.values(this.zones).find(
|
|
398
|
-
(zone) => {
|
|
399
|
-
var _a;
|
|
400
|
-
return ((_a = zone.vercel) == null ? void 0 : _a.projectId) === projectId;
|
|
401
|
-
}
|
|
402
|
-
);
|
|
403
|
-
}
|
|
404
|
-
getDefaultZone() {
|
|
405
|
-
const zone = Object.values(this.zones).find((z) => z.default);
|
|
406
|
-
if (!zone) {
|
|
407
|
-
throw new MicrofrontendError(
|
|
408
|
-
`Could not find default zone in microfrontends configuration`,
|
|
409
|
-
{
|
|
410
|
-
type: "zone",
|
|
411
|
-
subtype: "not_found"
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
return zone;
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
* Returns the configured port for the local proxy
|
|
419
|
-
*/
|
|
420
|
-
getLocalProxyPort() {
|
|
421
|
-
var _a, _b;
|
|
422
|
-
return ((_b = (_a = this.config.options) == null ? void 0 : _a.localProxy) == null ? void 0 : _b.port) ?? DEFAULT_LOCAL_PROXY_PORT;
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* Serializes the class back to the Schema type.
|
|
426
|
-
*
|
|
427
|
-
* NOTE: This is used when writing the config to disk and must always match the input Schema
|
|
428
|
-
*/
|
|
429
|
-
toSchemaJson() {
|
|
430
|
-
const applications = {};
|
|
431
|
-
for (const [name, zone] of Object.entries(this.zones)) {
|
|
432
|
-
applications[name] = zone.serialize();
|
|
433
|
-
}
|
|
434
|
-
return {
|
|
435
|
-
$schema: this.$schema,
|
|
436
|
-
name: this.name,
|
|
437
|
-
version: this.version,
|
|
438
|
-
options: this.options,
|
|
439
|
-
applications
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
serialize() {
|
|
443
|
-
var _a;
|
|
444
|
-
const applications = {};
|
|
445
|
-
for (const [name, zone] of Object.entries(this.zones)) {
|
|
446
|
-
applications[name] = zone.serialize();
|
|
447
|
-
}
|
|
448
|
-
return {
|
|
449
|
-
config: {
|
|
450
|
-
name: this.name,
|
|
451
|
-
version: this.version,
|
|
452
|
-
applications,
|
|
453
|
-
options: this.options,
|
|
454
|
-
$schema: this.$schema
|
|
455
|
-
},
|
|
456
|
-
overrides: (_a = this.overrides) == null ? void 0 : _a.serialize()
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
write(_) {
|
|
460
|
-
throw new MicrofrontendError(
|
|
461
|
-
`Writing to file to disk requires using an instance of "MicrofrontendConfig".`,
|
|
462
|
-
{ type: "config", subtype: "unsupported_operation" }
|
|
463
|
-
);
|
|
464
|
-
}
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
// src/config/edge/microfrontend-config.ts
|
|
468
|
-
var MicrofrontendConfigEdge = class extends MicrofrontendConfigCommon {
|
|
469
|
-
static fromEnv({
|
|
470
|
-
cookies
|
|
471
|
-
}) {
|
|
472
|
-
return new MicrofrontendConfigCommon({
|
|
473
|
-
config: parse(MicrofrontendConfigCommon.getConfigFromEnv()),
|
|
474
|
-
overrides: Overrides.parseOverrides(cookies)
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
export {
|
|
479
|
-
MicrofrontendConfigEdge
|
|
480
|
-
};
|
|
481
|
-
//# sourceMappingURL=edge.js.map
|
package/dist/config/edge.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/config/edge/microfrontend-config.ts","../../src/config/errors.ts","../../src/routing/url.ts","../../src/config/overrides/config.ts","../../src/config/common/host.ts","../../src/config/common/application.ts","../../src/config/common/microfrontend-config.ts"],"sourcesContent":["/// <reference types=\"@edge-runtime/types\" />\n\nimport { parse } from 'jsonc-parser';\nimport { MicrofrontendConfigCommon } from '../common/microfrontend-config';\nimport type { Config } from '../schema';\nimport { Overrides } from '../overrides';\n\n/**\n * Edge Runtime does not support ajv validation, or fs access.\n * This version of the MicrofrontendConfig does not validate the config shape,\n * and requires the config to be set on the environment.\n *\n * It should be used for Next.js middleware which runs in the Edge Runtime.\n */\nexport class MicrofrontendConfigEdge extends MicrofrontendConfigCommon {\n static fromEnv({\n cookies,\n }: {\n cookies: { name: string; value: string }[];\n }): MicrofrontendConfigEdge {\n return new MicrofrontendConfigCommon({\n config: parse(MicrofrontendConfigCommon.getConfigFromEnv()) as Config,\n overrides: Overrides.parseOverrides(cookies),\n });\n }\n}\n","export type MicrofrontendErrorType =\n | 'config'\n | 'packageJson'\n | 'vercelJson'\n | 'zone'\n | 'unknown';\n\nexport type MicrofrontendErrorSubtype =\n | 'not_found'\n | 'not_found_in_env'\n | 'invalid_asset_prefix'\n | 'invalid_main_path'\n | 'does_not_match_schema'\n | 'unable_to_read_file'\n | 'unsupported_validation_env'\n | 'unsupported_version'\n | 'invalid_path'\n | 'invalid_permissions'\n | 'invalid_syntax'\n | 'missing_microfrontend_config_path'\n | 'unsupported_operation';\n\n// A mapping of error types to their subtypes.\ninterface TypeToSubtype {\n zone:\n | 'invalid_asset_prefix'\n | 'invalid_path'\n | 'multiple_package_managers'\n | 'not_found';\n config:\n | 'conflicting_paths'\n | 'does_not_match_schema'\n | 'invalid_main_path'\n | 'invalid_preview_deployment_suffix'\n | 'multiple_default_applications'\n | 'no_default_application'\n | 'not_found_in_env'\n | 'not_found'\n | 'unable_to_read_file'\n | 'invalid_syntax'\n | 'invalid_permissions'\n | 'unsupported_operation'\n | 'unsupported_validation_env'\n | 'unsupported_version';\n packageJson:\n | 'missing_field_name'\n | 'unable_to_read_file'\n | 'invalid_permissions'\n | 'invalid_syntax';\n vercelJson:\n | 'missing_field_microFrontend_config_path'\n | 'unable_to_read_file'\n | 'invalid_permissions'\n | 'invalid_syntax';\n unknown: never;\n}\n\nexport type MicrofrontendErrorSource =\n | '@vercel/microfrontends'\n | '@vercel/microfrontends/next'\n | 'fs'\n | 'ajv';\n\nexport interface MicrofrontendErrorOptions<T extends MicrofrontendErrorType> {\n source?: MicrofrontendErrorSource;\n type?: T;\n subtype?: TypeToSubtype[T];\n}\n\ninterface HandleOptions {\n fileName?: string;\n}\n\nexport class MicrofrontendError<\n T extends MicrofrontendErrorType = 'unknown',\n> extends Error {\n public source: MicrofrontendErrorSource;\n public type: T;\n public subtype?: TypeToSubtype[T];\n\n constructor(message: string, opts?: MicrofrontendErrorOptions<T>) {\n super(message);\n this.name = 'MicrofrontendsError';\n this.source = opts?.source ?? '@vercel/microfrontends';\n this.type = opts?.type ?? ('unknown' as T);\n this.subtype = opts?.subtype;\n Error.captureStackTrace(this, MicrofrontendError);\n }\n\n isKnown(): boolean {\n return this.type !== 'unknown';\n }\n\n isUnknown(): boolean {\n return !this.isKnown();\n }\n\n /**\n * Converts an error to a MicrofrontendsError.\n * @param original - The original error to convert.\n * @returns The converted MicrofrontendsError.\n */\n static convert(\n original: Error,\n opts?: HandleOptions,\n ): MicrofrontendError<MicrofrontendErrorType> {\n if (opts?.fileName) {\n const err = MicrofrontendError.convertFSError(original, opts.fileName);\n if (err) {\n return err;\n }\n }\n\n if (\n original.message.includes(\n 'Code generation from strings disallowed for this context',\n )\n ) {\n return new MicrofrontendError(original.message, {\n type: 'config',\n subtype: 'unsupported_validation_env',\n source: 'ajv',\n });\n }\n\n // unknown catch-all\n return new MicrofrontendError(original.message);\n }\n\n static convertFSError(\n original: Error,\n fileName: string,\n ): MicrofrontendError<MicrofrontendErrorType> | null {\n if (original instanceof Error && 'code' in original) {\n if (original.code === 'ENOENT') {\n return new MicrofrontendError(`Could not find \"${fileName}\"`, {\n type: 'config',\n subtype: 'unable_to_read_file',\n source: 'fs',\n });\n }\n if (original.code === 'EACCES') {\n return new MicrofrontendError(\n `Permission denied while accessing \"${fileName}\"`,\n {\n type: 'config',\n subtype: 'invalid_permissions',\n source: 'fs',\n },\n );\n }\n }\n\n if (original instanceof SyntaxError) {\n return new MicrofrontendError(\n `Failed to parse \"${fileName}\": Invalid JSON format.`,\n {\n type: 'config',\n subtype: 'invalid_syntax',\n source: 'fs',\n },\n );\n }\n\n return null;\n }\n\n /**\n * Handles an unknown error and returns a MicrofrontendsError instance.\n * @param err - The error to handle.\n * @returns A MicrofrontendsError instance.\n */\n static handle(\n err: unknown,\n opts?: HandleOptions,\n ): MicrofrontendError<MicrofrontendErrorType> {\n if (err instanceof MicrofrontendError) {\n return err as MicrofrontendError<MicrofrontendErrorType>;\n }\n\n // handle Error instances\n if (err instanceof Error) {\n return MicrofrontendError.convert(err, opts);\n }\n\n // handle object errors\n if (typeof err === 'object' && err !== null) {\n if ('message' in err && typeof err.message === 'string') {\n return MicrofrontendError.convert(new Error(err.message), opts);\n }\n }\n\n return new MicrofrontendError('An unknown error occurred');\n }\n}\n","// NOTE: This is copied from https://github.com/vercel/api/blob/main/packages/util-func/src/url-safe-string.ts.\n// See https://linear.app/vercel/issue/FDRTN-199/spike-move-preview-domain-generation-logic-into-build-and-deploy\n// for cleaning this up before release.\n\ninterface Options {\n joinString?: string;\n lowercaseOnly?: boolean;\n maxLen?: number;\n regexRemovePattern?: RegExp;\n trimWhitespace?: boolean;\n}\n\n/**\n * This function allows to convert single string to URL-safe tags to use for routing,\n * SEO purposes, etc. It is taken from https://www.npmjs.com/package/url-safe-string\n * and implemented here to be typed and skip the dependency.\n */\nfunction buildUrlSafeString(givenOpts: Options = {}): {\n generate: (...args: string[]) => string;\n} {\n const options = {\n joinString: '-',\n lowercaseOnly: true,\n maxLen: 100,\n regexRemovePattern: /(?:(?!(?:[a-z0-9])).)/gi,\n trimWhitespace: true,\n ...givenOpts,\n };\n\n return {\n generate: (...args: string[]) => {\n const reJoinString = new RegExp(`${options.joinString}+`, 'g');\n\n // biome-ignore lint/suspicious/noImplicitAnyLet: Ignored using `--suppress`\n let tag;\n\n if (args.length === 0) {\n throw new Error('generate method must be passed at least one argument');\n }\n\n // Validate, trim all arguments:\n for (let i = 0; i < args.length; i++) {\n const arg = args[i];\n if (typeof arg !== 'string')\n throw new Error('all supplied arguments must be Strings');\n\n if (options.trimWhitespace) {\n args[i] = arg.trim();\n }\n }\n\n // Join strings and convert whitespace between words to join string\n tag = args.join(options.joinString);\n tag = tag.replace(/\\s/g, options.joinString);\n if (options.lowercaseOnly) tag = tag.toLowerCase();\n // Regex away anything \"unsafe\", but ignore the join string!\n tag = tag.replace(options.regexRemovePattern, (match) => {\n if (match === options.joinString) return match;\n\n return '';\n });\n\n // Truncate in excess of maxLen\n if (tag.length > options.maxLen) tag = tag.substring(0, options.maxLen);\n\n // Remove any duplicates of the join string using this pattern: /<join string>+/g\n tag = tag.replace(reJoinString, options.joinString);\n\n return tag;\n },\n };\n}\n\n/**\n * Export a preconfigured version for convenience.\n */\nexport const urlSafeString = buildUrlSafeString().generate;\n\nexport function makeUrlSafe(name: string): string {\n return urlSafeString(name.replace(/\\//g, '-'))\n .replace(/^-*/g, '')\n .replace(/-*$/g, '');\n}\n","import { makeUrlSafe } from '../../routing/url';\nimport type { MicrofrontendConfig } from '../microfrontend-config';\nimport type { OverridesConfig } from './types';\n\nexport const OVERRIDES_COOKIE_PREFIX = 'vercel-micro-frontends-override';\n\nexport class Overrides {\n config: OverridesConfig;\n\n constructor(config: OverridesConfig) {\n this.config = config;\n }\n\n static overrideEnvCookiePrefix = `${OVERRIDES_COOKIE_PREFIX}:env:`;\n\n static getAppEnvOverrideCookieName(zone: string): string {\n return `${Overrides.overrideEnvCookiePrefix}${zone}`;\n }\n\n static isOverrideCookie(cookie: { name?: string }): boolean {\n return Boolean(cookie.name?.startsWith(OVERRIDES_COOKIE_PREFIX));\n }\n\n static getOverrideFromCookie(cookie: {\n name: string;\n value?: string | null;\n }): { zone: string; host: string } | undefined {\n if (!Overrides.isOverrideCookie(cookie) || !cookie.value) return;\n return {\n zone: cookie.name.replace(Overrides.overrideEnvCookiePrefix, ''),\n host: cookie.value,\n };\n }\n\n static parseOverrides(\n cookies: { name: string; value?: string | null }[],\n ): OverridesConfig {\n const overridesConfig: OverridesConfig = { applications: {} };\n\n cookies.forEach((cookie) => {\n const override = Overrides.getOverrideFromCookie(cookie);\n if (!override) return;\n overridesConfig.applications[override.zone] = {\n environment: { host: override.host },\n };\n });\n\n return overridesConfig;\n }\n\n static validOverrideDomainsForZone(\n microfrontendConfig: MicrofrontendConfig,\n zone: string,\n ): string[] {\n const projectName = microfrontendConfig.getZone(zone).vercel?.projectName;\n if (!projectName) {\n return [microfrontendConfig.getZone(zone).production.host];\n }\n const parsedProjectName = makeUrlSafe(projectName);\n const previewDeploymentSuffix =\n microfrontendConfig.options?.vercel?.previewDeploymentSuffix;\n const teamSlug = microfrontendConfig.options?.vercel?.teamSlug;\n if (!teamSlug && !previewDeploymentSuffix) {\n return [microfrontendConfig.getZone(zone).production.host];\n }\n\n const suffix = previewDeploymentSuffix\n ? `.${previewDeploymentSuffix}`\n : `-${teamSlug}.vercel.app`;\n\n // <project-name>-git-<branch-name>-<scope-slug>.vercel.app\n // <project-name>-git-<branch-name>.<custom-suffix>\n return [\n `${parsedProjectName}-git-([a-zA-Z0-9-]+)${suffix}`,\n microfrontendConfig.getZone(zone).production.host,\n ];\n }\n\n static validateOverrideDomain(\n microfrontendConfig: MicrofrontendConfig,\n zone: string,\n domain: string,\n ): boolean {\n return new RegExp(\n `^${Overrides.validOverrideDomainsForZone(microfrontendConfig, zone).join(\n '|',\n )}$`,\n ).test(domain);\n }\n\n serialize(): OverridesConfig {\n return this.config;\n }\n}\n","import type { HostConfig } from '../schema';\n\ninterface HostDisplayOptions {\n includeDefaultPort?: boolean;\n}\n\nexport class Host {\n protocol: 'http' | 'https';\n host: HostConfig['host'];\n port: number;\n serialized: HostConfig;\n\n constructor({ protocol, host, port }: HostConfig) {\n this.protocol = protocol || 'https';\n this.host = host;\n this.port = Host.getPort({ port, protocol: this.protocol });\n this.serialized = {\n protocol,\n host,\n ...(port ? { port } : undefined),\n };\n }\n\n isLocal(): boolean {\n return this.host === 'localhost' || this.host === '127.0.0.1';\n }\n\n static getPort({\n protocol,\n port,\n }: { protocol: HostConfig['protocol']; port?: HostConfig['port'] }): number {\n if (!port) {\n if (protocol === 'http') {\n return 80;\n }\n return 443;\n }\n\n return port;\n }\n\n isDefaultPort(): boolean {\n return this.port === Host.getPort({ protocol: this.protocol });\n }\n\n toString(opts: HostDisplayOptions = {}): string {\n const url = this.toUrl(opts);\n // strip the trailing slash\n return url.toString().replace(/\\/$/, '');\n }\n\n toUrl(opts: HostDisplayOptions = {}): URL {\n const { includeDefaultPort } = opts;\n const url = `${this.protocol}://${this.host}${this.isDefaultPort() && !includeDefaultPort ? '' : `:${this.port}`}`;\n\n return new URL(url);\n }\n\n serialize(): HostConfig {\n return this.serialized;\n }\n}\n","import type { ApplicationConfig, Routing, Vercel } from '../schema';\nimport type { ApplicationOverrideConfig } from '../overrides';\nimport { MicrofrontendError } from '../errors';\nimport { Host } from './host';\n\nexport class Application {\n default: boolean;\n routing?: Routing;\n name: string;\n development: {\n local: Host;\n fallback?: Host;\n };\n production: Host;\n vercel?: Vercel;\n overrides?: {\n environment?: Host;\n };\n\n constructor(\n name: string,\n {\n app,\n overrides,\n }: { app: ApplicationConfig; overrides?: ApplicationOverrideConfig },\n ) {\n // validate\n Application.validate(name, app);\n\n this.name = name;\n this.default = app.default;\n this.routing = app.routing;\n this.development = {\n local: new Host(app.development.local),\n fallback: app.development.fallback\n ? new Host(app.development.fallback)\n : undefined,\n };\n this.production = new Host(app.production);\n this.vercel = app.vercel;\n this.overrides = overrides?.environment\n ? {\n environment: new Host(overrides.environment),\n }\n : undefined;\n }\n\n isDefault(): boolean {\n return this.default;\n }\n\n static validate(name: string, app: ApplicationConfig): void {\n // validate assetPrefix\n if (\n app.routing?.assetPrefix?.startsWith('/') ||\n app.routing?.assetPrefix?.endsWith('/')\n ) {\n throw new MicrofrontendError(\n `Invalid assetPrefix for application \"${name}\". Must not start or end with a slash.`,\n { type: 'zone', subtype: 'invalid_asset_prefix' },\n );\n }\n\n // validate routes\n for (const group of app.routing?.matches ?? []) {\n for (const p of group.paths) {\n if (p === '/') {\n continue;\n }\n if (p.endsWith('/')) {\n throw new MicrofrontendError(\n `Invalid path for application \"${name}\". ${p} must not end with a slash.`,\n { type: 'zone', subtype: 'invalid_path' },\n );\n }\n\n if (!p.startsWith('/')) {\n throw new MicrofrontendError(\n `Invalid path for application \"${name}\". ${p} must start with a slash.`,\n { type: 'zone', subtype: 'invalid_path' },\n );\n }\n }\n }\n }\n\n serialize(): ApplicationConfig {\n if (this.routing === undefined || this.default) {\n return {\n default: true,\n development: {\n local: this.development.local.serialize(),\n fallback: this.development.fallback?.serialize(),\n },\n production: this.production.serialize(),\n vercel: this.vercel,\n };\n }\n\n return {\n default: false,\n routing: this.routing,\n development: {\n local: this.development.local.serialize(),\n fallback: this.development.fallback?.serialize(),\n },\n production: this.production.serialize(),\n vercel: this.vercel,\n };\n }\n}\n","import type { ApplicationConfig, Config, Options } from '../schema';\nimport { MicrofrontendError } from '../errors';\nimport type { OverridesConfig } from '../overrides';\nimport { Overrides } from '../overrides/config';\nimport { Application } from './application';\n\nconst SUPPORTED_VERSIONS = ['1'];\nconst DEFAULT_LOCAL_PROXY_PORT = 3024;\n\n/**\n * A class to manage the microfrontends configuration.\n *\n * This class should not be used directly. Instead, use the `MicrofrontendConfig` or `MicrofrontendConfigEdgeRuntime` classes.\n */\nexport class MicrofrontendConfigCommon {\n config: Config;\n name?: string;\n zones: Record<string, Application> = {};\n version: string;\n overrides?: Overrides;\n options?: Options;\n $schema: string | undefined;\n\n constructor({\n config,\n overrides,\n }: { config: Config; overrides?: OverridesConfig }) {\n if (!SUPPORTED_VERSIONS.includes(config.version)) {\n throw new MicrofrontendError(\n `Unsupported version: ${config.version}. Supported versions are: ${SUPPORTED_VERSIONS.join(\n ', ',\n )}`,\n { type: 'config', subtype: 'unsupported_version' },\n );\n }\n const disableOverrides = config.options?.vercel?.disableOverrides ?? false;\n\n this.overrides =\n overrides && !disableOverrides ? new Overrides(overrides) : undefined;\n\n // create zones\n for (const [zoneName, zoneConfig] of Object.entries(config.applications)) {\n this.zones[zoneName] = new Application(zoneName, {\n app: zoneConfig,\n overrides: !disableOverrides\n ? this.overrides?.config.applications[zoneName]\n : undefined,\n });\n }\n\n this.config = config;\n this.name = config.name;\n this.version = config.version;\n this.options = config.options;\n this.$schema = config.$schema;\n }\n\n isOverridesDisabled(): boolean {\n return this.options?.vercel?.disableOverrides ?? false;\n }\n\n protected static getConfigFromEnv(): string {\n const config = process.env.MFE_CONFIG;\n if (!config) {\n throw new MicrofrontendError(`Missing \"MFE_CONFIG\" in environment.`, {\n type: 'config',\n subtype: 'not_found_in_env',\n });\n }\n return config;\n }\n\n static fromEnv(_: {\n cookies: { name: string; value: string }[];\n }): MicrofrontendConfigCommon | Promise<MicrofrontendConfigCommon> {\n throw new Error('Not implemented');\n }\n\n getConfig(): Config {\n return this.config;\n }\n\n getAllApplications(): Application[] {\n return Object.values(this.zones);\n }\n\n getZone(name: string): Application {\n const zone = this.zones[name];\n if (!zone) {\n throw new MicrofrontendError(\n `Could not find microfrontends configuration for application \"${name}\"`,\n {\n type: 'zone',\n subtype: 'not_found',\n },\n );\n }\n\n return zone;\n }\n\n getApplicationByProjectId(projectId: string): Application | undefined {\n return Object.values(this.zones).find(\n (zone) => zone.vercel?.projectId === projectId,\n );\n }\n\n getDefaultZone(): Application {\n const zone = Object.values(this.zones).find((z) => z.default);\n if (!zone) {\n throw new MicrofrontendError(\n `Could not find default zone in microfrontends configuration`,\n {\n type: 'zone',\n subtype: 'not_found',\n },\n );\n }\n\n return zone;\n }\n\n /**\n * Returns the configured port for the local proxy\n */\n getLocalProxyPort(): number {\n return this.config.options?.localProxy?.port ?? DEFAULT_LOCAL_PROXY_PORT;\n }\n\n /**\n * Serializes the class back to the Schema type.\n *\n * NOTE: This is used when writing the config to disk and must always match the input Schema\n */\n toSchemaJson(): Config {\n const applications: Record<string, ApplicationConfig> = {};\n for (const [name, zone] of Object.entries(this.zones)) {\n applications[name] = zone.serialize();\n }\n\n return {\n $schema: this.$schema,\n name: this.name,\n version: this.version,\n options: this.options,\n applications,\n };\n }\n\n serialize(): { config: Config; overrides?: OverridesConfig } {\n const applications: Record<string, ApplicationConfig> = {};\n for (const [name, zone] of Object.entries(this.zones)) {\n applications[name] = zone.serialize();\n }\n\n return {\n config: {\n name: this.name,\n version: this.version,\n applications,\n options: this.options,\n $schema: this.$schema,\n },\n overrides: this.overrides?.serialize(),\n };\n }\n\n write(_: string): void {\n throw new MicrofrontendError(\n `Writing to file to disk requires using an instance of \"MicrofrontendConfig\".`,\n { type: 'config', subtype: 'unsupported_operation' },\n );\n }\n}\n"],"mappings":";AAEA,SAAS,aAAa;;;ACuEf,IAAM,qBAAN,cAEG,MAAM;AAAA,EAKd,YAAY,SAAiB,MAAqC;AAChE,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,UAAS,6BAAM,WAAU;AAC9B,SAAK,QAAO,6BAAM,SAAS;AAC3B,SAAK,UAAU,6BAAM;AACrB,UAAM,kBAAkB,MAAM,kBAAkB;AAAA,EAClD;AAAA,EAEA,UAAmB;AACjB,WAAO,KAAK,SAAS;AAAA,EACvB;AAAA,EAEA,YAAqB;AACnB,WAAO,CAAC,KAAK,QAAQ;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,OAAO,QACL,UACA,MAC4C;AAC5C,QAAI,6BAAM,UAAU;AAClB,YAAM,MAAM,mBAAmB,eAAe,UAAU,KAAK,QAAQ;AACrE,UAAI,KAAK;AACP,eAAO;AAAA,MACT;AAAA,IACF;AAEA,QACE,SAAS,QAAQ;AAAA,MACf;A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