@vercel/microfrontends 1.0.1-canary.4 → 1.1.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 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: "1.0.1-canary.4",
32
+ version: "1.1.0",
33
33
  private: false,
34
34
  description: "Defines configuration and utilities for microfrontends development",
35
35
  keywords: [
@@ -1143,6 +1143,9 @@ var import_node_fs = __toESM(require("fs"), 1);
1143
1143
  var import_node_path = __toESM(require("path"), 1);
1144
1144
  var GIT_DIRECTORY = ".git";
1145
1145
  function findRepositoryRoot(startDir) {
1146
+ if (process.env.NX_WORKSPACE_ROOT) {
1147
+ return process.env.NX_WORKSPACE_ROOT;
1148
+ }
1146
1149
  let currentDir = startDir || process.cwd();
1147
1150
  while (currentDir !== import_node_path.default.parse(currentDir).root) {
1148
1151
  const gitPath = import_node_path.default.join(currentDir, GIT_DIRECTORY);
@@ -1431,9 +1434,7 @@ var schema_default = {
1431
1434
  description: "Mapping of application names to the routes that they host. Only needs to be defined in the application that owns the primary microfrontend domain"
1432
1435
  }
1433
1436
  },
1434
- required: [
1435
- "applications"
1436
- ],
1437
+ required: ["applications"],
1437
1438
  additionalProperties: false
1438
1439
  },
1439
1440
  Options: {
@@ -1528,9 +1529,7 @@ var schema_default = {
1528
1529
  description: "Vercel project ID"
1529
1530
  }
1530
1531
  },
1531
- required: [
1532
- "projectId"
1533
- ],
1532
+ required: ["projectId"],
1534
1533
  additionalProperties: false
1535
1534
  },
1536
1535
  HostConfig: {
@@ -1538,10 +1537,7 @@ var schema_default = {
1538
1537
  properties: {
1539
1538
  protocol: {
1540
1539
  type: "string",
1541
- enum: [
1542
- "http",
1543
- "https"
1544
- ],
1540
+ enum: ["http", "https"],
1545
1541
  description: "The protocol to be used for the connection.\n- `http`: Hypertext Transfer Protocol (HTTP).\n- `https`: Secure Hypertext Transfer Protocol (HTTPS).\n\n*"
1546
1542
  },
1547
1543
  host: {
@@ -1553,9 +1549,7 @@ var schema_default = {
1553
1549
  description: "The port number to be used for the connection. Common values include `80` for HTTP and `443` for HTTPS."
1554
1550
  }
1555
1551
  },
1556
- required: [
1557
- "host"
1558
- ],
1552
+ required: ["host"],
1559
1553
  additionalProperties: false
1560
1554
  },
1561
1555
  Development: {
@@ -1597,10 +1591,7 @@ var schema_default = {
1597
1591
  },
1598
1592
  protocol: {
1599
1593
  type: "string",
1600
- enum: [
1601
- "http",
1602
- "https"
1603
- ],
1594
+ enum: ["http", "https"],
1604
1595
  description: "The protocol to be used for the connection.\n- `http`: Hypertext Transfer Protocol (HTTP).\n- `https`: Secure Hypertext Transfer Protocol (HTTPS).\n\n*"
1605
1596
  },
1606
1597
  port: {
@@ -1632,9 +1623,7 @@ var schema_default = {
1632
1623
  description: "Groups of path expressions that are routed to this application."
1633
1624
  }
1634
1625
  },
1635
- required: [
1636
- "routing"
1637
- ],
1626
+ required: ["routing"],
1638
1627
  additionalProperties: false
1639
1628
  },
1640
1629
  Routing: {
@@ -1661,9 +1650,7 @@ var schema_default = {
1661
1650
  }
1662
1651
  }
1663
1652
  },
1664
- required: [
1665
- "paths"
1666
- ],
1653
+ required: ["paths"],
1667
1654
  additionalProperties: false
1668
1655
  },
1669
1656
  ChildConfig: {
@@ -1684,9 +1671,7 @@ var schema_default = {
1684
1671
  description: "Applications that only serve a subset of the microfrontend routes only need to reference the name of the primary application that owns the full microfrontends configuration."
1685
1672
  }
1686
1673
  },
1687
- required: [
1688
- "partOf"
1689
- ],
1674
+ required: ["partOf"],
1690
1675
  additionalProperties: false
1691
1676
  }
1692
1677
  }
@@ -920,6 +920,9 @@ var import_node_fs = __toESM(require("fs"), 1);
920
920
  var import_node_path = __toESM(require("path"), 1);
921
921
  var GIT_DIRECTORY = ".git";
922
922
  function findRepositoryRoot(startDir) {
923
+ if (process.env.NX_WORKSPACE_ROOT) {
924
+ return process.env.NX_WORKSPACE_ROOT;
925
+ }
923
926
  let currentDir = startDir || process.cwd();
924
927
  while (currentDir !== import_node_path.default.parse(currentDir).root) {
925
928
  const gitPath = import_node_path.default.join(currentDir, GIT_DIRECTORY);
@@ -1208,9 +1211,7 @@ var schema_default = {
1208
1211
  description: "Mapping of application names to the routes that they host. Only needs to be defined in the application that owns the primary microfrontend domain"
1209
1212
  }
1210
1213
  },
1211
- required: [
1212
- "applications"
1213
- ],
1214
+ required: ["applications"],
1214
1215
  additionalProperties: false
1215
1216
  },
1216
1217
  Options: {
@@ -1305,9 +1306,7 @@ var schema_default = {
1305
1306
  description: "Vercel project ID"
1306
1307
  }
1307
1308
  },
1308
- required: [
1309
- "projectId"
1310
- ],
1309
+ required: ["projectId"],
1311
1310
  additionalProperties: false
1312
1311
  },
1313
1312
  HostConfig: {
@@ -1315,10 +1314,7 @@ var schema_default = {
1315
1314
  properties: {
1316
1315
  protocol: {
1317
1316
  type: "string",
1318
- enum: [
1319
- "http",
1320
- "https"
1321
- ],
1317
+ enum: ["http", "https"],
1322
1318
  description: "The protocol to be used for the connection.\n- `http`: Hypertext Transfer Protocol (HTTP).\n- `https`: Secure Hypertext Transfer Protocol (HTTPS).\n\n*"
1323
1319
  },
1324
1320
  host: {
@@ -1330,9 +1326,7 @@ var schema_default = {
1330
1326
  description: "The port number to be used for the connection. Common values include `80` for HTTP and `443` for HTTPS."
1331
1327
  }
1332
1328
  },
1333
- required: [
1334
- "host"
1335
- ],
1329
+ required: ["host"],
1336
1330
  additionalProperties: false
1337
1331
  },
1338
1332
  Development: {
@@ -1374,10 +1368,7 @@ var schema_default = {
1374
1368
  },
1375
1369
  protocol: {
1376
1370
  type: "string",
1377
- enum: [
1378
- "http",
1379
- "https"
1380
- ],
1371
+ enum: ["http", "https"],
1381
1372
  description: "The protocol to be used for the connection.\n- `http`: Hypertext Transfer Protocol (HTTP).\n- `https`: Secure Hypertext Transfer Protocol (HTTPS).\n\n*"
1382
1373
  },
1383
1374
  port: {
@@ -1409,9 +1400,7 @@ var schema_default = {
1409
1400
  description: "Groups of path expressions that are routed to this application."
1410
1401
  }
1411
1402
  },
1412
- required: [
1413
- "routing"
1414
- ],
1403
+ required: ["routing"],
1415
1404
  additionalProperties: false
1416
1405
  },
1417
1406
  Routing: {
@@ -1438,9 +1427,7 @@ var schema_default = {
1438
1427
  }
1439
1428
  }
1440
1429
  },
1441
- required: [
1442
- "paths"
1443
- ],
1430
+ required: ["paths"],
1444
1431
  additionalProperties: false
1445
1432
  },
1446
1433
  ChildConfig: {
@@ -1461,9 +1448,7 @@ var schema_default = {
1461
1448
  description: "Applications that only serve a subset of the microfrontend routes only need to reference the name of the primary application that owns the full microfrontends configuration."
1462
1449
  }
1463
1450
  },
1464
- required: [
1465
- "partOf"
1466
- ],
1451
+ required: ["partOf"],
1467
1452
  additionalProperties: false
1468
1453
  }
1469
1454
  }