@vercel/gatsby-plugin-vercel-builder 2.0.84 → 2.0.85

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.
Files changed (2) hide show
  1. package/dist/index.js +191 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1551,9 +1551,197 @@ var require_schemas = __commonJS({
1551
1551
  ]
1552
1552
  }
1553
1553
  };
1554
+ var transformsSchema = {
1555
+ description: "A list of transform rules to adjust the query parameters of a request or HTTP headers of request or response",
1556
+ type: "array",
1557
+ minItems: 1,
1558
+ items: {
1559
+ type: "object",
1560
+ additionalProperties: false,
1561
+ required: ["type", "op", "target"],
1562
+ properties: {
1563
+ type: {
1564
+ description: "The scope of the transform to apply",
1565
+ type: "string",
1566
+ enum: ["request.headers", "request.query", "response.headers"]
1567
+ },
1568
+ op: {
1569
+ description: "The operation to perform on the target",
1570
+ type: "string",
1571
+ enum: ["append", "set", "delete"]
1572
+ },
1573
+ target: {
1574
+ description: "The target of the transform",
1575
+ type: "object",
1576
+ required: ["key"],
1577
+ properties: {
1578
+ // re is not supported for transforms. Once supported, replace target.key with matchableValueSchema
1579
+ key: {
1580
+ description: "A value to match against. Can be a string or a condition operation object (without regex support)",
1581
+ anyOf: [
1582
+ {
1583
+ description: "A valid header name (letters, numbers, hyphens, underscores)",
1584
+ type: "string",
1585
+ maxLength: 4096
1586
+ },
1587
+ {
1588
+ description: "A condition operation object",
1589
+ type: "object",
1590
+ additionalProperties: false,
1591
+ minProperties: 1,
1592
+ properties: {
1593
+ eq: {
1594
+ description: "Equal to",
1595
+ anyOf: [
1596
+ {
1597
+ type: "string",
1598
+ maxLength: 4096
1599
+ },
1600
+ {
1601
+ type: "number"
1602
+ }
1603
+ ]
1604
+ },
1605
+ neq: {
1606
+ description: "Not equal",
1607
+ type: "string",
1608
+ maxLength: 4096
1609
+ },
1610
+ inc: {
1611
+ description: "In array",
1612
+ type: "array",
1613
+ items: {
1614
+ type: "string",
1615
+ maxLength: 4096
1616
+ }
1617
+ },
1618
+ ninc: {
1619
+ description: "Not in array",
1620
+ type: "array",
1621
+ items: {
1622
+ type: "string",
1623
+ maxLength: 4096
1624
+ }
1625
+ },
1626
+ pre: {
1627
+ description: "Starts with",
1628
+ type: "string",
1629
+ maxLength: 4096
1630
+ },
1631
+ suf: {
1632
+ description: "Ends with",
1633
+ type: "string",
1634
+ maxLength: 4096
1635
+ },
1636
+ gt: {
1637
+ description: "Greater than",
1638
+ type: "number"
1639
+ },
1640
+ gte: {
1641
+ description: "Greater than or equal to",
1642
+ type: "number"
1643
+ },
1644
+ lt: {
1645
+ description: "Less than",
1646
+ type: "number"
1647
+ },
1648
+ lte: {
1649
+ description: "Less than or equal to",
1650
+ type: "number"
1651
+ }
1652
+ }
1653
+ }
1654
+ ]
1655
+ }
1656
+ }
1657
+ },
1658
+ args: {
1659
+ description: "The arguments to the operation",
1660
+ anyOf: [
1661
+ {
1662
+ type: "string",
1663
+ maxLength: 4096
1664
+ },
1665
+ {
1666
+ type: "array",
1667
+ minItems: 1,
1668
+ items: {
1669
+ type: "string",
1670
+ maxLength: 4096
1671
+ }
1672
+ }
1673
+ ]
1674
+ }
1675
+ },
1676
+ allOf: [
1677
+ {
1678
+ if: {
1679
+ properties: {
1680
+ op: {
1681
+ enum: ["append", "set"]
1682
+ }
1683
+ }
1684
+ },
1685
+ then: {
1686
+ required: ["args"]
1687
+ }
1688
+ },
1689
+ {
1690
+ if: {
1691
+ allOf: [
1692
+ {
1693
+ properties: {
1694
+ type: {
1695
+ enum: ["request.headers", "response.headers"]
1696
+ }
1697
+ }
1698
+ },
1699
+ {
1700
+ properties: {
1701
+ op: {
1702
+ enum: ["set", "append"]
1703
+ }
1704
+ }
1705
+ }
1706
+ ]
1707
+ },
1708
+ then: {
1709
+ properties: {
1710
+ target: {
1711
+ properties: {
1712
+ key: {
1713
+ if: {
1714
+ type: "string"
1715
+ },
1716
+ then: {
1717
+ pattern: "^[a-zA-Z0-9_-]+$"
1718
+ }
1719
+ }
1720
+ }
1721
+ },
1722
+ args: {
1723
+ anyOf: [
1724
+ {
1725
+ type: "string",
1726
+ pattern: "^[a-zA-Z0-9_ :;.,\"'?!(){}\\[\\]@<>=+*#$&`|~\\^%/-]+$"
1727
+ },
1728
+ {
1729
+ type: "array",
1730
+ items: {
1731
+ type: "string",
1732
+ pattern: "^[a-zA-Z0-9_ :;.,\"'?!(){}\\[\\]@<>=+*#$&`|~\\^%/-]+$"
1733
+ }
1734
+ }
1735
+ ]
1736
+ }
1737
+ }
1738
+ }
1739
+ }
1740
+ ]
1741
+ }
1742
+ };
1554
1743
  var routesSchema = {
1555
1744
  type: "array",
1556
- maxItems: 2048,
1557
1745
  deprecated: true,
1558
1746
  description: "A list of routes objects used to rewrite paths to point towards other internal or external paths",
1559
1747
  example: [{ dest: "https://docs.example.com", src: "/docs" }],
@@ -1663,7 +1851,8 @@ var require_schemas = __commonJS({
1663
1851
  },
1664
1852
  has: hasSchema,
1665
1853
  missing: hasSchema,
1666
- mitigate: mitigateSchema
1854
+ mitigate: mitigateSchema,
1855
+ transforms: transformsSchema
1667
1856
  }
1668
1857
  },
1669
1858
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/gatsby-plugin-vercel-builder",
3
- "version": "2.0.84",
3
+ "version": "2.0.85",
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.1",
17
+ "@vercel/build-utils": "10.6.2",
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.6",
28
+ "@vercel/routing-utils": "5.1.0",
29
29
  "jest-junit": "16.0.0",
30
30
  "typescript": "4.9.5"
31
31
  },