@vercel/gatsby-plugin-vercel-builder 2.0.83 → 2.0.84
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.js +113 -13
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1049,14 +1049,26 @@ var require_superstatic = __commonJS({
|
|
|
1049
1049
|
}
|
|
1050
1050
|
return hasItems;
|
|
1051
1051
|
};
|
|
1052
|
+
function getStringValueForRegex(value) {
|
|
1053
|
+
if (typeof value === "string") {
|
|
1054
|
+
return value;
|
|
1055
|
+
}
|
|
1056
|
+
if (value && typeof value === "object" && value !== null) {
|
|
1057
|
+
if ("re" in value && typeof value.re === "string") {
|
|
1058
|
+
return value.re;
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
return null;
|
|
1062
|
+
}
|
|
1052
1063
|
function collectHasSegments(has) {
|
|
1053
1064
|
const hasSegments = /* @__PURE__ */ new Set();
|
|
1054
1065
|
for (const hasItem of has || []) {
|
|
1055
1066
|
if (!hasItem.value && "key" in hasItem) {
|
|
1056
1067
|
hasSegments.add(hasItem.key);
|
|
1057
1068
|
}
|
|
1058
|
-
|
|
1059
|
-
|
|
1069
|
+
const stringValue = getStringValueForRegex(hasItem.value);
|
|
1070
|
+
if (stringValue) {
|
|
1071
|
+
for (const match of stringValue.matchAll(namedGroupsRegex)) {
|
|
1060
1072
|
if (match[1]) {
|
|
1061
1073
|
hasSegments.add(match[1]);
|
|
1062
1074
|
}
|
|
@@ -1404,6 +1416,101 @@ var require_schemas = __commonJS({
|
|
|
1404
1416
|
trailingSlashSchema: () => trailingSlashSchema
|
|
1405
1417
|
});
|
|
1406
1418
|
module2.exports = __toCommonJS2(schemas_exports);
|
|
1419
|
+
var mitigateSchema = {
|
|
1420
|
+
description: "Mitigation action to take on a route",
|
|
1421
|
+
type: "object",
|
|
1422
|
+
additionalProperties: false,
|
|
1423
|
+
required: ["action"],
|
|
1424
|
+
properties: {
|
|
1425
|
+
action: {
|
|
1426
|
+
description: "The mitigation action to take",
|
|
1427
|
+
type: "string",
|
|
1428
|
+
enum: ["challenge", "deny"]
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
};
|
|
1432
|
+
var matchableValueSchema = {
|
|
1433
|
+
description: "A value to match against. Can be a string (regex) or a condition operation object",
|
|
1434
|
+
anyOf: [
|
|
1435
|
+
{
|
|
1436
|
+
description: "A regular expression used to match thev value. Named groups can be used in the destination.",
|
|
1437
|
+
type: "string",
|
|
1438
|
+
maxLength: 4096
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
description: "A condition operation object",
|
|
1442
|
+
type: "object",
|
|
1443
|
+
additionalProperties: false,
|
|
1444
|
+
minProperties: 1,
|
|
1445
|
+
properties: {
|
|
1446
|
+
eq: {
|
|
1447
|
+
description: "Equal to",
|
|
1448
|
+
anyOf: [
|
|
1449
|
+
{
|
|
1450
|
+
type: "string",
|
|
1451
|
+
maxLength: 4096
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
type: "number"
|
|
1455
|
+
}
|
|
1456
|
+
]
|
|
1457
|
+
},
|
|
1458
|
+
neq: {
|
|
1459
|
+
description: "Not equal",
|
|
1460
|
+
type: "string",
|
|
1461
|
+
maxLength: 4096
|
|
1462
|
+
},
|
|
1463
|
+
inc: {
|
|
1464
|
+
description: "In array",
|
|
1465
|
+
type: "array",
|
|
1466
|
+
items: {
|
|
1467
|
+
type: "string",
|
|
1468
|
+
maxLength: 4096
|
|
1469
|
+
}
|
|
1470
|
+
},
|
|
1471
|
+
ninc: {
|
|
1472
|
+
description: "Not in array",
|
|
1473
|
+
type: "array",
|
|
1474
|
+
items: {
|
|
1475
|
+
type: "string",
|
|
1476
|
+
maxLength: 4096
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
pre: {
|
|
1480
|
+
description: "Starts with",
|
|
1481
|
+
type: "string",
|
|
1482
|
+
maxLength: 4096
|
|
1483
|
+
},
|
|
1484
|
+
suf: {
|
|
1485
|
+
description: "Ends with",
|
|
1486
|
+
type: "string",
|
|
1487
|
+
maxLength: 4096
|
|
1488
|
+
},
|
|
1489
|
+
re: {
|
|
1490
|
+
description: "Regex",
|
|
1491
|
+
type: "string",
|
|
1492
|
+
maxLength: 4096
|
|
1493
|
+
},
|
|
1494
|
+
gt: {
|
|
1495
|
+
description: "Greater than",
|
|
1496
|
+
type: "number"
|
|
1497
|
+
},
|
|
1498
|
+
gte: {
|
|
1499
|
+
description: "Greater than or equal to",
|
|
1500
|
+
type: "number"
|
|
1501
|
+
},
|
|
1502
|
+
lt: {
|
|
1503
|
+
description: "Less than",
|
|
1504
|
+
type: "number"
|
|
1505
|
+
},
|
|
1506
|
+
lte: {
|
|
1507
|
+
description: "Less than or equal to",
|
|
1508
|
+
type: "number"
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
]
|
|
1513
|
+
};
|
|
1407
1514
|
var hasSchema = {
|
|
1408
1515
|
description: "An array of requirements that are needed to match",
|
|
1409
1516
|
type: "array",
|
|
@@ -1420,11 +1527,7 @@ var require_schemas = __commonJS({
|
|
|
1420
1527
|
type: "string",
|
|
1421
1528
|
enum: ["host"]
|
|
1422
1529
|
},
|
|
1423
|
-
value:
|
|
1424
|
-
description: "A regular expression used to match the value. Named groups can be used in the destination",
|
|
1425
|
-
type: "string",
|
|
1426
|
-
maxLength: 4096
|
|
1427
|
-
}
|
|
1530
|
+
value: matchableValueSchema
|
|
1428
1531
|
}
|
|
1429
1532
|
},
|
|
1430
1533
|
{
|
|
@@ -1442,11 +1545,7 @@ var require_schemas = __commonJS({
|
|
|
1442
1545
|
type: "string",
|
|
1443
1546
|
maxLength: 4096
|
|
1444
1547
|
},
|
|
1445
|
-
value:
|
|
1446
|
-
description: "A regular expression used to match the value. Named groups can be used in the destination",
|
|
1447
|
-
type: "string",
|
|
1448
|
-
maxLength: 4096
|
|
1449
|
-
}
|
|
1548
|
+
value: matchableValueSchema
|
|
1450
1549
|
}
|
|
1451
1550
|
}
|
|
1452
1551
|
]
|
|
@@ -1563,7 +1662,8 @@ var require_schemas = __commonJS({
|
|
|
1563
1662
|
}
|
|
1564
1663
|
},
|
|
1565
1664
|
has: hasSchema,
|
|
1566
|
-
missing: hasSchema
|
|
1665
|
+
missing: hasSchema,
|
|
1666
|
+
mitigate: mitigateSchema
|
|
1567
1667
|
}
|
|
1568
1668
|
},
|
|
1569
1669
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/gatsby-plugin-vercel-builder",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.84",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@sinclair/typebox": "0.25.24",
|
|
17
|
-
"@vercel/build-utils": "10.6.
|
|
17
|
+
"@vercel/build-utils": "10.6.1",
|
|
18
18
|
"esbuild": "0.14.47",
|
|
19
19
|
"etag": "1.8.1",
|
|
20
20
|
"fs-extra": "11.1.0"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@types/jest": "27.5.1",
|
|
26
26
|
"@types/node": "14.18.33",
|
|
27
27
|
"@types/react": "18.0.26",
|
|
28
|
-
"@vercel/routing-utils": "5.0.
|
|
28
|
+
"@vercel/routing-utils": "5.0.6",
|
|
29
29
|
"jest-junit": "16.0.0",
|
|
30
30
|
"typescript": "4.9.5"
|
|
31
31
|
},
|