@vercel/microfrontends 0.19.2 → 0.19.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/bin/cli.cjs +46 -36
- package/dist/microfrontends/server.cjs +37 -35
- package/dist/microfrontends/server.cjs.map +1 -1
- package/dist/microfrontends/server.js +37 -35
- package/dist/microfrontends/server.js.map +1 -1
- package/dist/next/config.cjs +37 -35
- package/dist/next/config.cjs.map +1 -1
- package/dist/next/config.js +37 -35
- package/dist/next/config.js.map +1 -1
- package/dist/utils/mfe-port.cjs +37 -35
- package/dist/utils/mfe-port.cjs.map +1 -1
- package/dist/utils/mfe-port.js +37 -35
- package/dist/utils/mfe-port.js.map +1 -1
- package/dist/validation.cjs +27 -28
- package/dist/validation.cjs.map +1 -1
- package/dist/validation.js +27 -28
- package/dist/validation.js.map +1 -1
- package/package.json +9 -1
package/dist/bin/cli.cjs
CHANGED
|
@@ -29,7 +29,7 @@ var import_commander = require("commander");
|
|
|
29
29
|
// package.json
|
|
30
30
|
var package_default = {
|
|
31
31
|
name: "@vercel/microfrontends",
|
|
32
|
-
version: "0.19.
|
|
32
|
+
version: "0.19.4",
|
|
33
33
|
private: false,
|
|
34
34
|
description: "Defines configuration and utilities for microfrontends development",
|
|
35
35
|
keywords: [
|
|
@@ -203,11 +203,19 @@ var package_default = {
|
|
|
203
203
|
webpack: "5"
|
|
204
204
|
},
|
|
205
205
|
peerDependencies: {
|
|
206
|
+
"@vercel/analytics": ">=1.5.0",
|
|
207
|
+
"@vercel/speed-insights": ">=1.2.0",
|
|
206
208
|
next: ">=13",
|
|
207
209
|
react: ">=17.0.0",
|
|
208
210
|
"react-dom": ">=17.0.0"
|
|
209
211
|
},
|
|
210
212
|
peerDependenciesMeta: {
|
|
213
|
+
"@vercel/analytics": {
|
|
214
|
+
optional: true
|
|
215
|
+
},
|
|
216
|
+
"@vercel/speed-insights": {
|
|
217
|
+
optional: true
|
|
218
|
+
},
|
|
211
219
|
next: {
|
|
212
220
|
optional: true
|
|
213
221
|
},
|
|
@@ -1153,13 +1161,16 @@ function findDefaultMicrofrontendsPackages({
|
|
|
1153
1161
|
);
|
|
1154
1162
|
const matchingPaths = [];
|
|
1155
1163
|
for (const microfrontendsJsonPath of microfrontendsJsonPaths) {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1164
|
+
try {
|
|
1165
|
+
const microfrontendsJsonContent = (0, import_node_fs3.readFileSync)(
|
|
1166
|
+
microfrontendsJsonPath,
|
|
1167
|
+
"utf-8"
|
|
1168
|
+
);
|
|
1169
|
+
const microfrontendsJson = (0, import_jsonc_parser2.parse)(microfrontendsJsonContent);
|
|
1170
|
+
if (isMainConfig(microfrontendsJson) && microfrontendsJson.applications[applicationName]) {
|
|
1171
|
+
matchingPaths.push(microfrontendsJsonPath);
|
|
1172
|
+
}
|
|
1173
|
+
} catch (error) {
|
|
1163
1174
|
}
|
|
1164
1175
|
}
|
|
1165
1176
|
if (matchingPaths.length > 1) {
|
|
@@ -1378,15 +1389,14 @@ var schema_default = {
|
|
|
1378
1389
|
type: "string",
|
|
1379
1390
|
description: "Vercel project ID"
|
|
1380
1391
|
},
|
|
1381
|
-
development: {
|
|
1382
|
-
$ref: "#/definitions/Development"
|
|
1383
|
-
},
|
|
1384
1392
|
production: {
|
|
1385
1393
|
$ref: "#/definitions/HostConfig",
|
|
1386
1394
|
deprecated: "This is a duplicate of the `development.fallback` field and this will be removed soon."
|
|
1395
|
+
},
|
|
1396
|
+
development: {
|
|
1397
|
+
$ref: "#/definitions/Development"
|
|
1387
1398
|
}
|
|
1388
1399
|
},
|
|
1389
|
-
required: ["production"],
|
|
1390
1400
|
additionalProperties: false
|
|
1391
1401
|
},
|
|
1392
1402
|
Vercel: {
|
|
@@ -1400,6 +1410,26 @@ var schema_default = {
|
|
|
1400
1410
|
required: ["projectId"],
|
|
1401
1411
|
additionalProperties: false
|
|
1402
1412
|
},
|
|
1413
|
+
HostConfig: {
|
|
1414
|
+
type: "object",
|
|
1415
|
+
properties: {
|
|
1416
|
+
protocol: {
|
|
1417
|
+
type: "string",
|
|
1418
|
+
enum: ["http", "https"],
|
|
1419
|
+
description: "The protocol to be used for the connection.\n- `http`: Hypertext Transfer Protocol (HTTP).\n- `https`: Secure Hypertext Transfer Protocol (HTTPS).\n\n*"
|
|
1420
|
+
},
|
|
1421
|
+
host: {
|
|
1422
|
+
type: "string",
|
|
1423
|
+
description: "The hostname or IP address of the server. This can be a domain name (e.g., `example.com`) or an IP address (e.g., `192.168.1.1`)."
|
|
1424
|
+
},
|
|
1425
|
+
port: {
|
|
1426
|
+
type: "number",
|
|
1427
|
+
description: "The port number to be used for the connection. Common values include `80` for HTTP and `443` for HTTPS."
|
|
1428
|
+
}
|
|
1429
|
+
},
|
|
1430
|
+
required: ["host"],
|
|
1431
|
+
additionalProperties: false
|
|
1432
|
+
},
|
|
1403
1433
|
Development: {
|
|
1404
1434
|
type: "object",
|
|
1405
1435
|
properties: {
|
|
@@ -1448,26 +1478,6 @@ var schema_default = {
|
|
|
1448
1478
|
}
|
|
1449
1479
|
}
|
|
1450
1480
|
},
|
|
1451
|
-
HostConfig: {
|
|
1452
|
-
type: "object",
|
|
1453
|
-
properties: {
|
|
1454
|
-
protocol: {
|
|
1455
|
-
type: "string",
|
|
1456
|
-
enum: ["http", "https"],
|
|
1457
|
-
description: "The protocol to be used for the connection.\n- `http`: Hypertext Transfer Protocol (HTTP).\n- `https`: Secure Hypertext Transfer Protocol (HTTPS).\n\n*"
|
|
1458
|
-
},
|
|
1459
|
-
host: {
|
|
1460
|
-
type: "string",
|
|
1461
|
-
description: "The hostname or IP address of the server. This can be a domain name (e.g., `example.com`) or an IP address (e.g., `192.168.1.1`)."
|
|
1462
|
-
},
|
|
1463
|
-
port: {
|
|
1464
|
-
type: "number",
|
|
1465
|
-
description: "The port number to be used for the connection. Common values include `80` for HTTP and `443` for HTTPS."
|
|
1466
|
-
}
|
|
1467
|
-
},
|
|
1468
|
-
required: ["host"],
|
|
1469
|
-
additionalProperties: false
|
|
1470
|
-
},
|
|
1471
1481
|
ChildApplication: {
|
|
1472
1482
|
type: "object",
|
|
1473
1483
|
properties: {
|
|
@@ -1479,16 +1489,16 @@ var schema_default = {
|
|
|
1479
1489
|
type: "string",
|
|
1480
1490
|
description: "Vercel project ID"
|
|
1481
1491
|
},
|
|
1492
|
+
production: {
|
|
1493
|
+
$ref: "#/definitions/HostConfig",
|
|
1494
|
+
deprecated: "This is a duplicate of the `development.fallback` field and this will be removed soon."
|
|
1495
|
+
},
|
|
1482
1496
|
development: {
|
|
1483
1497
|
$ref: "#/definitions/Development"
|
|
1484
1498
|
},
|
|
1485
1499
|
routing: {
|
|
1486
1500
|
$ref: "#/definitions/Routing",
|
|
1487
1501
|
description: "Groups of path expressions that are routed to this application."
|
|
1488
|
-
},
|
|
1489
|
-
production: {
|
|
1490
|
-
$ref: "#/definitions/HostConfig",
|
|
1491
|
-
deprecated: "This is a duplicate of the `development.fallback` field and this will be removed soon."
|
|
1492
1502
|
}
|
|
1493
1503
|
},
|
|
1494
1504
|
required: ["routing"],
|
|
@@ -952,13 +952,16 @@ function findDefaultMicrofrontendsPackages({
|
|
|
952
952
|
);
|
|
953
953
|
const matchingPaths = [];
|
|
954
954
|
for (const microfrontendsJsonPath of microfrontendsJsonPaths) {
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
955
|
+
try {
|
|
956
|
+
const microfrontendsJsonContent = (0, import_node_fs3.readFileSync)(
|
|
957
|
+
microfrontendsJsonPath,
|
|
958
|
+
"utf-8"
|
|
959
|
+
);
|
|
960
|
+
const microfrontendsJson = (0, import_jsonc_parser2.parse)(microfrontendsJsonContent);
|
|
961
|
+
if (isMainConfig(microfrontendsJson) && microfrontendsJson.applications[applicationName]) {
|
|
962
|
+
matchingPaths.push(microfrontendsJsonPath);
|
|
963
|
+
}
|
|
964
|
+
} catch (error) {
|
|
962
965
|
}
|
|
963
966
|
}
|
|
964
967
|
if (matchingPaths.length > 1) {
|
|
@@ -1177,15 +1180,14 @@ var schema_default = {
|
|
|
1177
1180
|
type: "string",
|
|
1178
1181
|
description: "Vercel project ID"
|
|
1179
1182
|
},
|
|
1180
|
-
development: {
|
|
1181
|
-
$ref: "#/definitions/Development"
|
|
1182
|
-
},
|
|
1183
1183
|
production: {
|
|
1184
1184
|
$ref: "#/definitions/HostConfig",
|
|
1185
1185
|
deprecated: "This is a duplicate of the `development.fallback` field and this will be removed soon."
|
|
1186
|
+
},
|
|
1187
|
+
development: {
|
|
1188
|
+
$ref: "#/definitions/Development"
|
|
1186
1189
|
}
|
|
1187
1190
|
},
|
|
1188
|
-
required: ["production"],
|
|
1189
1191
|
additionalProperties: false
|
|
1190
1192
|
},
|
|
1191
1193
|
Vercel: {
|
|
@@ -1199,6 +1201,26 @@ var schema_default = {
|
|
|
1199
1201
|
required: ["projectId"],
|
|
1200
1202
|
additionalProperties: false
|
|
1201
1203
|
},
|
|
1204
|
+
HostConfig: {
|
|
1205
|
+
type: "object",
|
|
1206
|
+
properties: {
|
|
1207
|
+
protocol: {
|
|
1208
|
+
type: "string",
|
|
1209
|
+
enum: ["http", "https"],
|
|
1210
|
+
description: "The protocol to be used for the connection.\n- `http`: Hypertext Transfer Protocol (HTTP).\n- `https`: Secure Hypertext Transfer Protocol (HTTPS).\n\n*"
|
|
1211
|
+
},
|
|
1212
|
+
host: {
|
|
1213
|
+
type: "string",
|
|
1214
|
+
description: "The hostname or IP address of the server. This can be a domain name (e.g., `example.com`) or an IP address (e.g., `192.168.1.1`)."
|
|
1215
|
+
},
|
|
1216
|
+
port: {
|
|
1217
|
+
type: "number",
|
|
1218
|
+
description: "The port number to be used for the connection. Common values include `80` for HTTP and `443` for HTTPS."
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
required: ["host"],
|
|
1222
|
+
additionalProperties: false
|
|
1223
|
+
},
|
|
1202
1224
|
Development: {
|
|
1203
1225
|
type: "object",
|
|
1204
1226
|
properties: {
|
|
@@ -1247,26 +1269,6 @@ var schema_default = {
|
|
|
1247
1269
|
}
|
|
1248
1270
|
}
|
|
1249
1271
|
},
|
|
1250
|
-
HostConfig: {
|
|
1251
|
-
type: "object",
|
|
1252
|
-
properties: {
|
|
1253
|
-
protocol: {
|
|
1254
|
-
type: "string",
|
|
1255
|
-
enum: ["http", "https"],
|
|
1256
|
-
description: "The protocol to be used for the connection.\n- `http`: Hypertext Transfer Protocol (HTTP).\n- `https`: Secure Hypertext Transfer Protocol (HTTPS).\n\n*"
|
|
1257
|
-
},
|
|
1258
|
-
host: {
|
|
1259
|
-
type: "string",
|
|
1260
|
-
description: "The hostname or IP address of the server. This can be a domain name (e.g., `example.com`) or an IP address (e.g., `192.168.1.1`)."
|
|
1261
|
-
},
|
|
1262
|
-
port: {
|
|
1263
|
-
type: "number",
|
|
1264
|
-
description: "The port number to be used for the connection. Common values include `80` for HTTP and `443` for HTTPS."
|
|
1265
|
-
}
|
|
1266
|
-
},
|
|
1267
|
-
required: ["host"],
|
|
1268
|
-
additionalProperties: false
|
|
1269
|
-
},
|
|
1270
1272
|
ChildApplication: {
|
|
1271
1273
|
type: "object",
|
|
1272
1274
|
properties: {
|
|
@@ -1278,16 +1280,16 @@ var schema_default = {
|
|
|
1278
1280
|
type: "string",
|
|
1279
1281
|
description: "Vercel project ID"
|
|
1280
1282
|
},
|
|
1283
|
+
production: {
|
|
1284
|
+
$ref: "#/definitions/HostConfig",
|
|
1285
|
+
deprecated: "This is a duplicate of the `development.fallback` field and this will be removed soon."
|
|
1286
|
+
},
|
|
1281
1287
|
development: {
|
|
1282
1288
|
$ref: "#/definitions/Development"
|
|
1283
1289
|
},
|
|
1284
1290
|
routing: {
|
|
1285
1291
|
$ref: "#/definitions/Routing",
|
|
1286
1292
|
description: "Groups of path expressions that are routed to this application."
|
|
1287
|
-
},
|
|
1288
|
-
production: {
|
|
1289
|
-
$ref: "#/definitions/HostConfig",
|
|
1290
|
-
deprecated: "This is a duplicate of the `development.fallback` field and this will be removed soon."
|
|
1291
1293
|
}
|
|
1292
1294
|
},
|
|
1293
1295
|
required: ["routing"],
|