@vercel/microfrontends 2.1.2 → 2.2.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/CHANGELOG.md +20 -0
- package/README.md +4 -0
- package/dist/bin/cli.cjs +125 -89
- package/dist/config.d.ts +2 -2
- package/dist/experimental/sveltekit.cjs +97 -62
- package/dist/experimental/sveltekit.cjs.map +1 -1
- package/dist/experimental/sveltekit.d.ts +6 -0
- package/dist/experimental/sveltekit.js +97 -62
- package/dist/experimental/sveltekit.js.map +1 -1
- package/dist/experimental/vite.cjs +96 -65
- package/dist/experimental/vite.cjs.map +1 -1
- package/dist/experimental/vite.js +96 -65
- package/dist/experimental/vite.js.map +1 -1
- package/dist/microfrontends/server.cjs +92 -59
- package/dist/microfrontends/server.cjs.map +1 -1
- package/dist/microfrontends/server.d.ts +2 -2
- package/dist/microfrontends/server.js +92 -59
- package/dist/microfrontends/server.js.map +1 -1
- package/dist/microfrontends/utils.cjs +3 -3
- package/dist/microfrontends/utils.cjs.map +1 -1
- package/dist/microfrontends/utils.d.ts +1 -1
- package/dist/microfrontends/utils.js +3 -3
- package/dist/microfrontends/utils.js.map +1 -1
- package/dist/next/config.cjs +133 -115
- package/dist/next/config.cjs.map +1 -1
- package/dist/next/config.d.ts +11 -1
- package/dist/next/config.js +133 -115
- package/dist/next/config.js.map +1 -1
- package/dist/next/middleware.cjs +35 -17
- package/dist/next/middleware.cjs.map +1 -1
- package/dist/next/middleware.js +35 -17
- package/dist/next/middleware.js.map +1 -1
- package/dist/next/testing.d.ts +2 -2
- package/dist/overrides.d.ts +3 -3
- package/dist/schema.d.ts +2 -2
- package/dist/{types-88602303.d.ts → types-b9ea41b2.d.ts} +1 -1
- package/dist/{types-e7523e61.d.ts → types-dcd8b17a.d.ts} +71 -24
- package/dist/utils/mfe-port.cjs +92 -59
- package/dist/utils/mfe-port.cjs.map +1 -1
- package/dist/utils/mfe-port.js +92 -59
- package/dist/utils/mfe-port.js.map +1 -1
- package/dist/validation.cjs +47 -38
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.d.ts +1 -1
- package/dist/validation.js +47 -38
- package/dist/validation.js.map +1 -1
- package/package.json +1 -1
- package/schema/schema.json +47 -38
|
@@ -34,12 +34,38 @@ __export(sveltekit_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(sveltekit_exports);
|
|
36
36
|
|
|
37
|
+
// src/bin/local-proxy-is-running.ts
|
|
38
|
+
function localProxyIsRunning() {
|
|
39
|
+
return process.env.TURBO_TASK_HAS_MFE_PROXY === "true";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// src/bin/logger.ts
|
|
43
|
+
function debug(...args) {
|
|
44
|
+
if (process.env.MFE_DEBUG) {
|
|
45
|
+
console.log(...args);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function info(...args) {
|
|
49
|
+
console.log(...args);
|
|
50
|
+
}
|
|
51
|
+
function warn(...args) {
|
|
52
|
+
console.warn(...args);
|
|
53
|
+
}
|
|
54
|
+
function error(...args) {
|
|
55
|
+
console.error(...args);
|
|
56
|
+
}
|
|
57
|
+
var logger = {
|
|
58
|
+
debug,
|
|
59
|
+
info,
|
|
60
|
+
warn,
|
|
61
|
+
error
|
|
62
|
+
};
|
|
63
|
+
|
|
37
64
|
// src/bin/check-proxy.ts
|
|
38
65
|
function displayLocalProxyInfo(port) {
|
|
39
|
-
|
|
40
|
-
if (TURBO_TASK_HAS_MFE_PROXY === "true" && MFE_PROXY_MESSAGE_PRINTED !== "true") {
|
|
66
|
+
if (localProxyIsRunning() && process.env.MFE_PROXY_MESSAGE_PRINTED !== "true") {
|
|
41
67
|
process.env.MFE_PROXY_MESSAGE_PRINTED = "true";
|
|
42
|
-
|
|
68
|
+
logger.info(`Microfrontends Proxy running on http://localhost:${port}`);
|
|
43
69
|
}
|
|
44
70
|
}
|
|
45
71
|
|
|
@@ -234,8 +260,8 @@ var import_fast_glob = __toESM(require("fast-glob"), 1);
|
|
|
234
260
|
|
|
235
261
|
// src/config/microfrontends/utils/get-config-file-name.ts
|
|
236
262
|
var DEFAULT_CONFIGURATION_FILENAMES = [
|
|
237
|
-
"microfrontends.
|
|
238
|
-
"microfrontends.
|
|
263
|
+
"microfrontends.json",
|
|
264
|
+
"microfrontends.jsonc"
|
|
239
265
|
];
|
|
240
266
|
function getPossibleConfigurationFilenames({
|
|
241
267
|
customConfigFilename
|
|
@@ -243,7 +269,7 @@ function getPossibleConfigurationFilenames({
|
|
|
243
269
|
if (customConfigFilename) {
|
|
244
270
|
if (!customConfigFilename.endsWith(".json") && !customConfigFilename.endsWith(".jsonc")) {
|
|
245
271
|
throw new Error(
|
|
246
|
-
`
|
|
272
|
+
`Found VC_MICROFRONTENDS_CONFIG_FILE_NAME but the name is invalid. Received: ${customConfigFilename}. The file name must end with '.json' or '.jsonc'. It's also possible for the env var to include the path, eg microfrontends-dev.json or /path/to/microfrontends-dev.json.`
|
|
247
273
|
);
|
|
248
274
|
}
|
|
249
275
|
return Array.from(
|
|
@@ -291,7 +317,7 @@ function findPackageWithMicrofrontendsConfig({
|
|
|
291
317
|
}
|
|
292
318
|
}
|
|
293
319
|
}
|
|
294
|
-
} catch (
|
|
320
|
+
} catch (error2) {
|
|
295
321
|
}
|
|
296
322
|
}
|
|
297
323
|
if (matchingPaths.length > 1) {
|
|
@@ -327,9 +353,9 @@ If you suspect this is thrown in error, please reach out to the Vercel team.`,
|
|
|
327
353
|
}
|
|
328
354
|
const [packageJsonPath] = matchingPaths;
|
|
329
355
|
return (0, import_node_path2.dirname)(packageJsonPath);
|
|
330
|
-
} catch (
|
|
331
|
-
if (
|
|
332
|
-
throw
|
|
356
|
+
} catch (error2) {
|
|
357
|
+
if (error2 instanceof MicrofrontendError) {
|
|
358
|
+
throw error2;
|
|
333
359
|
}
|
|
334
360
|
return null;
|
|
335
361
|
}
|
|
@@ -374,8 +400,8 @@ function isMonorepo({
|
|
|
374
400
|
import_node_fs3.default.readFileSync(packageJsonPath, "utf-8")
|
|
375
401
|
);
|
|
376
402
|
return packageJson.workspaces !== void 0;
|
|
377
|
-
} catch (
|
|
378
|
-
|
|
403
|
+
} catch (error2) {
|
|
404
|
+
logger.error("Error determining if repository is a monorepo", error2);
|
|
379
405
|
return false;
|
|
380
406
|
}
|
|
381
407
|
}
|
|
@@ -1169,38 +1195,28 @@ var schema_default = {
|
|
|
1169
1195
|
type: "object",
|
|
1170
1196
|
properties: {
|
|
1171
1197
|
$schema: {
|
|
1172
|
-
type: "string"
|
|
1198
|
+
type: "string",
|
|
1199
|
+
description: "See https://openapi.vercel.sh/microfrontends.json."
|
|
1173
1200
|
},
|
|
1174
1201
|
version: {
|
|
1175
1202
|
type: "string",
|
|
1176
|
-
const: "1"
|
|
1177
|
-
|
|
1178
|
-
options: {
|
|
1179
|
-
$ref: "#/definitions/Options"
|
|
1203
|
+
const: "1",
|
|
1204
|
+
description: "The version of the microfrontends config schema."
|
|
1180
1205
|
},
|
|
1181
1206
|
applications: {
|
|
1182
1207
|
$ref: "#/definitions/ApplicationRouting",
|
|
1183
|
-
description: "Mapping of
|
|
1208
|
+
description: "Mapping of Vercel project names to their microfrontend configurations."
|
|
1209
|
+
},
|
|
1210
|
+
options: {
|
|
1211
|
+
$ref: "#/definitions/Options",
|
|
1212
|
+
description: "Optional configuration options for the microfrontend."
|
|
1184
1213
|
}
|
|
1185
1214
|
},
|
|
1186
1215
|
required: [
|
|
1187
1216
|
"applications"
|
|
1188
1217
|
],
|
|
1189
|
-
additionalProperties: false
|
|
1190
|
-
|
|
1191
|
-
Options: {
|
|
1192
|
-
type: "object",
|
|
1193
|
-
properties: {
|
|
1194
|
-
disableOverrides: {
|
|
1195
|
-
type: "boolean",
|
|
1196
|
-
description: "If you want to disable the overrides for the site. For example, if you are managing rewrites between applications externally, you may wish to disable the overrides on the toolbar as they will have no effect."
|
|
1197
|
-
},
|
|
1198
|
-
localProxyPort: {
|
|
1199
|
-
type: "number",
|
|
1200
|
-
description: "The port number used by the local proxy server.\n\nThe default is `3024`."
|
|
1201
|
-
}
|
|
1202
|
-
},
|
|
1203
|
-
additionalProperties: false
|
|
1218
|
+
additionalProperties: false,
|
|
1219
|
+
description: "The microfrontends configuration schema. See https://vercel.com/docs/microfrontends/configuration."
|
|
1204
1220
|
},
|
|
1205
1221
|
ApplicationRouting: {
|
|
1206
1222
|
type: "object",
|
|
@@ -1208,8 +1224,9 @@ var schema_default = {
|
|
|
1208
1224
|
$ref: "#/definitions/Application"
|
|
1209
1225
|
},
|
|
1210
1226
|
propertyNames: {
|
|
1211
|
-
description: "The
|
|
1212
|
-
}
|
|
1227
|
+
description: "The Vercel project name of the microfrontend application.\n\nNote: If this name does not also match the name `name` from the `package.json`, set `packageName` with the name used in `package.json`.\n\nSee https://vercel.com/docs/microfrontends/configuration#application-naming."
|
|
1228
|
+
},
|
|
1229
|
+
description: "Mapping of Vercel project names to their microfrontend configurations."
|
|
1213
1230
|
},
|
|
1214
1231
|
Application: {
|
|
1215
1232
|
anyOf: [
|
|
@@ -1219,14 +1236,15 @@ var schema_default = {
|
|
|
1219
1236
|
{
|
|
1220
1237
|
$ref: "#/definitions/ChildApplication"
|
|
1221
1238
|
}
|
|
1222
|
-
]
|
|
1239
|
+
],
|
|
1240
|
+
description: "The configuration for a microfrontend application. There must always be one default application."
|
|
1223
1241
|
},
|
|
1224
1242
|
DefaultApplication: {
|
|
1225
1243
|
type: "object",
|
|
1226
1244
|
properties: {
|
|
1227
1245
|
packageName: {
|
|
1228
1246
|
type: "string",
|
|
1229
|
-
description: "The name used to run the application, e.g. the `name` field in the `package.json`.\n\nThis is used by the local proxy to map the application config to the locally running app.\n\nThis is only necessary when the application name does not match the `name` used in `package.json
|
|
1247
|
+
description: "The name used to run the application, e.g. the `name` field in the `package.json`.\n\nThis is used by the local proxy to map the application config to the locally running app.\n\nThis is only necessary when the application name does not match the `name` used in `package.json`.\n\nSee https://vercel.com/docs/microfrontends/configuration#application-naming."
|
|
1230
1248
|
},
|
|
1231
1249
|
development: {
|
|
1232
1250
|
$ref: "#/definitions/DefaultDevelopment",
|
|
@@ -1246,15 +1264,15 @@ var schema_default = {
|
|
|
1246
1264
|
"number",
|
|
1247
1265
|
"string"
|
|
1248
1266
|
],
|
|
1249
|
-
description: "A local port number or host
|
|
1267
|
+
description: "A local port number or host that this application runs on when it is running locally. If passing a string, include the protocol (optional), host (required) and port (optional).\n\nExamples of valid values: 8080, my.localhost.me, my.localhost.me:8080, https://my.localhost.me, https://my.localhost.me:8080.\n\nThe default value is http://localhost:<port> where port is a stable, unique port number (based on the application name).\n\nSee https://vercel.com/docs/microfrontends/local-development."
|
|
1250
1268
|
},
|
|
1251
1269
|
task: {
|
|
1252
1270
|
type: "string",
|
|
1253
|
-
description:
|
|
1271
|
+
description: 'The task to run when starting the development server. Should reference a script in the package.json of the application.\n\nThe default value is "dev".\n\nSee https://vercel.com/docs/microfrontends/local-development.'
|
|
1254
1272
|
},
|
|
1255
1273
|
fallback: {
|
|
1256
1274
|
type: "string",
|
|
1257
|
-
description: "Fallback for local development, could point to any environment. This is required for the default app. This value is used as the fallback for child apps as well if they do not have a fallback.\n\nIf passing a string, include the protocol (optional), host (required) and port (optional). For example: `https://this.ismyhost:8080`. If omitted, the protocol defaults to HTTPS. If omitted, the port defaults to `80` for HTTP and `443` for HTTPS."
|
|
1275
|
+
description: "Fallback for local development, could point to any environment. This is required for the default app. This value is used as the fallback for child apps as well if they do not have a fallback.\n\nIf passing a string, include the protocol (optional), host (required) and port (optional). For example: `https://this.ismyhost:8080`. If omitted, the protocol defaults to HTTPS. If omitted, the port defaults to `80` for HTTP and `443` for HTTPS.\n\nSee https://vercel.com/docs/microfrontends/local-development."
|
|
1258
1276
|
}
|
|
1259
1277
|
},
|
|
1260
1278
|
required: [
|
|
@@ -1267,7 +1285,7 @@ var schema_default = {
|
|
|
1267
1285
|
properties: {
|
|
1268
1286
|
packageName: {
|
|
1269
1287
|
type: "string",
|
|
1270
|
-
description: "The name used to run the application, e.g. the `name` field in the `package.json`.\n\nThis is used by the local proxy to map the application config to the locally running app.\n\nThis is only necessary when the application name does not match the `name` used in `package.json
|
|
1288
|
+
description: "The name used to run the application, e.g. the `name` field in the `package.json`.\n\nThis is used by the local proxy to map the application config to the locally running app.\n\nThis is only necessary when the application name does not match the `name` used in `package.json`.\n\nSee https://vercel.com/docs/microfrontends/configuration#application-naming."
|
|
1271
1289
|
},
|
|
1272
1290
|
development: {
|
|
1273
1291
|
$ref: "#/definitions/ChildDevelopment",
|
|
@@ -1275,11 +1293,11 @@ var schema_default = {
|
|
|
1275
1293
|
},
|
|
1276
1294
|
routing: {
|
|
1277
1295
|
$ref: "#/definitions/Routing",
|
|
1278
|
-
description: "Groups of path expressions that are routed to this application."
|
|
1296
|
+
description: "Groups of path expressions that are routed to this application.\n\nSee https://vercel.com/docs/microfrontends/path-routing."
|
|
1279
1297
|
},
|
|
1280
1298
|
assetPrefix: {
|
|
1281
1299
|
type: "string",
|
|
1282
|
-
description: "The name of the asset prefix to use instead of the auto-generated name.\n\nThe asset prefix is used to prefix all paths to static assets, such as JS, CSS, or images that are served by a specific application. It is necessary to ensure there are no conflicts with other applications on the same domain.\n\nAn auto-generated asset prefix of the form `vc-ap-<hash>` is used when this field is not provided.\n\nWhen this field is provided, `/${assetPrefix}/:path*` must also be added to the list of paths in the `routing` field. Changing the asset prefix after a microfrontend application has already been deployed is not a forwards and backwards compatible change, and the asset prefix should be added to the `routing` field and deployed before setting the `assetPrefix` field."
|
|
1300
|
+
description: "The name of the asset prefix to use instead of the auto-generated name.\n\nThe asset prefix is used to prefix all paths to static assets, such as JS, CSS, or images that are served by a specific application. It is necessary to ensure there are no conflicts with other applications on the same domain.\n\nAn auto-generated asset prefix of the form `vc-ap-<hash>` is used when this field is not provided.\n\nWhen this field is provided, `/${assetPrefix}/:path*` must also be added to the list of paths in the `routing` field. Changing the asset prefix after a microfrontend application has already been deployed is not a forwards and backwards compatible change, and the asset prefix should be added to the `routing` field and deployed before setting the `assetPrefix` field.\n\nThe default value is the auto-generated asset prefix of the form `vc-ap-<hash>`.\n\nSee https://vercel.com/docs/microfrontends/path-routing#asset-prefix."
|
|
1283
1301
|
}
|
|
1284
1302
|
},
|
|
1285
1303
|
required: [
|
|
@@ -1295,15 +1313,15 @@ var schema_default = {
|
|
|
1295
1313
|
"number",
|
|
1296
1314
|
"string"
|
|
1297
1315
|
],
|
|
1298
|
-
description: "A local port number or host
|
|
1316
|
+
description: "A local port number or host that this application runs on when it is running locally. If passing a string, include the protocol (optional), host (required) and port (optional).\n\nExamples of valid values: 8080, my.localhost.me, my.localhost.me:8080, https://my.localhost.me, https://my.localhost.me:8080.\n\nThe default value is http://localhost:<port> where port is a stable, unique port number (based on the application name).\n\nSee https://vercel.com/docs/microfrontends/local-development."
|
|
1299
1317
|
},
|
|
1300
1318
|
task: {
|
|
1301
1319
|
type: "string",
|
|
1302
|
-
description:
|
|
1320
|
+
description: 'The task to run when starting the development server. Should reference a script in the package.json of the application.\n\nThe default value is "dev".\n\nSee https://vercel.com/docs/microfrontends/local-development.'
|
|
1303
1321
|
},
|
|
1304
1322
|
fallback: {
|
|
1305
1323
|
type: "string",
|
|
1306
|
-
description: "Fallback for local development, could point to any environment.
|
|
1324
|
+
description: "Fallback for local development, could point to any environment. If not provided for child apps, the fallback of the default app will be used.\n\nIf passing a string, include the protocol (optional), host (required) and port (optional). For example: `https://this.ismyhost:8080`. If omitted, the protocol defaults to HTTPS. If omitted, the port defaults to `80` for HTTP and `443` for HTTPS.\n\nSee https://vercel.com/docs/microfrontends/local-development."
|
|
1307
1325
|
}
|
|
1308
1326
|
},
|
|
1309
1327
|
additionalProperties: false
|
|
@@ -1312,29 +1330,46 @@ var schema_default = {
|
|
|
1312
1330
|
type: "array",
|
|
1313
1331
|
items: {
|
|
1314
1332
|
$ref: "#/definitions/PathGroup"
|
|
1315
|
-
}
|
|
1333
|
+
},
|
|
1334
|
+
description: "A list of path groups that are routed to this application."
|
|
1316
1335
|
},
|
|
1317
1336
|
PathGroup: {
|
|
1318
1337
|
type: "object",
|
|
1319
1338
|
properties: {
|
|
1320
1339
|
group: {
|
|
1321
1340
|
type: "string",
|
|
1322
|
-
description: "
|
|
1341
|
+
description: "Group name for the paths."
|
|
1323
1342
|
},
|
|
1324
1343
|
flag: {
|
|
1325
1344
|
type: "string",
|
|
1326
|
-
description: "
|
|
1345
|
+
description: "The name of the feature flag that controls routing for this group of paths. See https://vercel.com/docs/microfrontends/path-routing#routing-changes-safely-with-flags."
|
|
1327
1346
|
},
|
|
1328
1347
|
paths: {
|
|
1329
1348
|
type: "array",
|
|
1330
1349
|
items: {
|
|
1331
1350
|
type: "string"
|
|
1332
|
-
}
|
|
1351
|
+
},
|
|
1352
|
+
description: "A list of path expressions that are routed to this application. See https://vercel.com/docs/microfrontends/path-routing#supported-path-expressions."
|
|
1333
1353
|
}
|
|
1334
1354
|
},
|
|
1335
1355
|
required: [
|
|
1336
1356
|
"paths"
|
|
1337
1357
|
],
|
|
1358
|
+
additionalProperties: false,
|
|
1359
|
+
description: "A group of paths that is routed to this application."
|
|
1360
|
+
},
|
|
1361
|
+
Options: {
|
|
1362
|
+
type: "object",
|
|
1363
|
+
properties: {
|
|
1364
|
+
disableOverrides: {
|
|
1365
|
+
type: "boolean",
|
|
1366
|
+
description: "If you want to disable the overrides for the site. For example, if you are managing rewrites between applications externally, you may wish to disable the overrides on the toolbar as they will have no effect.\n\nSee https://vercel.com/docs/microfrontends/managing-microfrontends/vercel-toolbar#routing-overrides."
|
|
1367
|
+
},
|
|
1368
|
+
localProxyPort: {
|
|
1369
|
+
type: "number",
|
|
1370
|
+
description: "The port number used by the local proxy server.\n\nThe default value is 3024.\n\nSee https://vercel.com/docs/microfrontends/local-development."
|
|
1371
|
+
}
|
|
1372
|
+
},
|
|
1338
1373
|
additionalProperties: false
|
|
1339
1374
|
}
|
|
1340
1375
|
}
|
|
@@ -1353,19 +1388,19 @@ function formatAjvErrors(errors) {
|
|
|
1353
1388
|
return [];
|
|
1354
1389
|
}
|
|
1355
1390
|
const errorMessages = [];
|
|
1356
|
-
for (const
|
|
1357
|
-
if (
|
|
1391
|
+
for (const error2 of errors) {
|
|
1392
|
+
if (error2.instancePath === "" && (error2.keyword === "anyOf" || error2.keyword === "required" && error2.params.missingProperty === "partOf")) {
|
|
1358
1393
|
continue;
|
|
1359
1394
|
}
|
|
1360
|
-
const instancePath =
|
|
1395
|
+
const instancePath = error2.instancePath.slice(1);
|
|
1361
1396
|
const formattedInstancePath = instancePath === "" ? "at the root" : `in field ${instancePath}`;
|
|
1362
|
-
if (
|
|
1397
|
+
if (error2.keyword === "required" && error2.params.missingProperty === "routing" && instancePath.split("/").length === 2) {
|
|
1363
1398
|
errorMessages.push(
|
|
1364
1399
|
`Unable to infer if ${instancePath} is the default app or a child app. This usually means that there is another error in the configuration.`
|
|
1365
1400
|
);
|
|
1366
|
-
} else if (
|
|
1401
|
+
} else if (error2.keyword === "anyOf" && instancePath.split("/").length > 2) {
|
|
1367
1402
|
const anyOfErrors = errors.filter(
|
|
1368
|
-
(e) => e.instancePath ===
|
|
1403
|
+
(e) => e.instancePath === error2.instancePath && e.keyword !== "anyOf"
|
|
1369
1404
|
);
|
|
1370
1405
|
if (anyOfErrors.every((e) => e.keyword === "type")) {
|
|
1371
1406
|
const allowedTypes = LIST_FORMATTER2.format(
|
|
@@ -1381,13 +1416,13 @@ function formatAjvErrors(errors) {
|
|
|
1381
1416
|
`Invalid field for ${instancePath}. Possible error messages are ${LIST_FORMATTER2.format(anyOfErrors.map((e) => e.message ?? ""))}`
|
|
1382
1417
|
);
|
|
1383
1418
|
}
|
|
1384
|
-
} else if (
|
|
1419
|
+
} else if (error2.keyword === "additionalProperties" && !(error2.params.additionalProperty === "routing" && instancePath.split("/").length === 2)) {
|
|
1385
1420
|
errorMessages.push(
|
|
1386
|
-
`Property '${
|
|
1421
|
+
`Property '${error2.params.additionalProperty}' is not allowed ${formattedInstancePath}`
|
|
1387
1422
|
);
|
|
1388
|
-
} else if (
|
|
1423
|
+
} else if (error2.keyword === "required") {
|
|
1389
1424
|
errorMessages.push(
|
|
1390
|
-
`Property '${
|
|
1425
|
+
`Property '${error2.params.missingProperty}' is required ${formattedInstancePath}`
|
|
1391
1426
|
);
|
|
1392
1427
|
}
|
|
1393
1428
|
}
|
|
@@ -1400,8 +1435,8 @@ function validateSchema(configString) {
|
|
|
1400
1435
|
const isValid = validate(parsedConfig);
|
|
1401
1436
|
if (!isValid) {
|
|
1402
1437
|
throw new MicrofrontendError(
|
|
1403
|
-
`Invalid microfrontends config:${formatAjvErrors(validate.errors).map((
|
|
1404
|
-
- ${
|
|
1438
|
+
`Invalid microfrontends config:${formatAjvErrors(validate.errors).map((error2) => `
|
|
1439
|
+
- ${error2}`).join(
|
|
1405
1440
|
""
|
|
1406
1441
|
)}
|
|
1407
1442
|
|