@stoplight/elements-core 7.13.3 → 7.13.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/index.esm.js +7 -7
- package/index.js +7 -7
- package/index.mjs +7 -7
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1625,43 +1625,43 @@ const runAuthRequestEhancements = (auths, queryParams, headers) => {
|
|
|
1625
1625
|
const newQueryParams = [...queryParams];
|
|
1626
1626
|
const newHeaders = [...headers];
|
|
1627
1627
|
auths.forEach(auth => {
|
|
1628
|
-
var _a
|
|
1628
|
+
var _a;
|
|
1629
1629
|
if (isApiKeySecurityScheme(auth.scheme)) {
|
|
1630
1630
|
if (auth.scheme.in === 'query') {
|
|
1631
1631
|
newQueryParams.push({
|
|
1632
1632
|
name: auth.scheme.name,
|
|
1633
|
-
value:
|
|
1633
|
+
value: auth.authValue || '123',
|
|
1634
1634
|
});
|
|
1635
1635
|
}
|
|
1636
1636
|
if (auth.scheme.in === 'header') {
|
|
1637
1637
|
newHeaders.push({
|
|
1638
1638
|
name: auth.scheme.name,
|
|
1639
|
-
value:
|
|
1639
|
+
value: auth.authValue || '123',
|
|
1640
1640
|
});
|
|
1641
1641
|
}
|
|
1642
1642
|
}
|
|
1643
1643
|
if (isOAuth2SecurityScheme(auth.scheme)) {
|
|
1644
1644
|
newHeaders.push({
|
|
1645
1645
|
name: 'Authorization',
|
|
1646
|
-
value:
|
|
1646
|
+
value: auth.authValue || 'Bearer 123',
|
|
1647
1647
|
});
|
|
1648
1648
|
}
|
|
1649
1649
|
if (isBearerSecurityScheme(auth.scheme)) {
|
|
1650
1650
|
newHeaders.push({
|
|
1651
1651
|
name: 'Authorization',
|
|
1652
|
-
value: `Bearer ${auth.authValue}`,
|
|
1652
|
+
value: `Bearer ${auth.authValue || '123'}`,
|
|
1653
1653
|
});
|
|
1654
1654
|
}
|
|
1655
1655
|
if (isDigestSecurityScheme(auth.scheme)) {
|
|
1656
1656
|
newHeaders.push({
|
|
1657
1657
|
name: 'Authorization',
|
|
1658
|
-
value: (
|
|
1658
|
+
value: ((_a = auth.authValue) === null || _a === void 0 ? void 0 : _a.replace(/\s\s+/g, ' ').trim()) || '123',
|
|
1659
1659
|
});
|
|
1660
1660
|
}
|
|
1661
1661
|
if (isBasicSecurityScheme(auth.scheme)) {
|
|
1662
1662
|
newHeaders.push({
|
|
1663
1663
|
name: 'Authorization',
|
|
1664
|
-
value: `Basic ${auth.authValue}`,
|
|
1664
|
+
value: `Basic ${auth.authValue || '123'}`,
|
|
1665
1665
|
});
|
|
1666
1666
|
}
|
|
1667
1667
|
});
|
package/index.js
CHANGED
|
@@ -1681,43 +1681,43 @@ const runAuthRequestEhancements = (auths, queryParams, headers) => {
|
|
|
1681
1681
|
const newQueryParams = [...queryParams];
|
|
1682
1682
|
const newHeaders = [...headers];
|
|
1683
1683
|
auths.forEach(auth => {
|
|
1684
|
-
var _a
|
|
1684
|
+
var _a;
|
|
1685
1685
|
if (isApiKeySecurityScheme(auth.scheme)) {
|
|
1686
1686
|
if (auth.scheme.in === 'query') {
|
|
1687
1687
|
newQueryParams.push({
|
|
1688
1688
|
name: auth.scheme.name,
|
|
1689
|
-
value:
|
|
1689
|
+
value: auth.authValue || '123',
|
|
1690
1690
|
});
|
|
1691
1691
|
}
|
|
1692
1692
|
if (auth.scheme.in === 'header') {
|
|
1693
1693
|
newHeaders.push({
|
|
1694
1694
|
name: auth.scheme.name,
|
|
1695
|
-
value:
|
|
1695
|
+
value: auth.authValue || '123',
|
|
1696
1696
|
});
|
|
1697
1697
|
}
|
|
1698
1698
|
}
|
|
1699
1699
|
if (isOAuth2SecurityScheme(auth.scheme)) {
|
|
1700
1700
|
newHeaders.push({
|
|
1701
1701
|
name: 'Authorization',
|
|
1702
|
-
value:
|
|
1702
|
+
value: auth.authValue || 'Bearer 123',
|
|
1703
1703
|
});
|
|
1704
1704
|
}
|
|
1705
1705
|
if (isBearerSecurityScheme(auth.scheme)) {
|
|
1706
1706
|
newHeaders.push({
|
|
1707
1707
|
name: 'Authorization',
|
|
1708
|
-
value: `Bearer ${auth.authValue}`,
|
|
1708
|
+
value: `Bearer ${auth.authValue || '123'}`,
|
|
1709
1709
|
});
|
|
1710
1710
|
}
|
|
1711
1711
|
if (isDigestSecurityScheme(auth.scheme)) {
|
|
1712
1712
|
newHeaders.push({
|
|
1713
1713
|
name: 'Authorization',
|
|
1714
|
-
value: (
|
|
1714
|
+
value: ((_a = auth.authValue) === null || _a === void 0 ? void 0 : _a.replace(/\s\s+/g, ' ').trim()) || '123',
|
|
1715
1715
|
});
|
|
1716
1716
|
}
|
|
1717
1717
|
if (isBasicSecurityScheme(auth.scheme)) {
|
|
1718
1718
|
newHeaders.push({
|
|
1719
1719
|
name: 'Authorization',
|
|
1720
|
-
value: `Basic ${auth.authValue}`,
|
|
1720
|
+
value: `Basic ${auth.authValue || '123'}`,
|
|
1721
1721
|
});
|
|
1722
1722
|
}
|
|
1723
1723
|
});
|
package/index.mjs
CHANGED
|
@@ -1625,43 +1625,43 @@ const runAuthRequestEhancements = (auths, queryParams, headers) => {
|
|
|
1625
1625
|
const newQueryParams = [...queryParams];
|
|
1626
1626
|
const newHeaders = [...headers];
|
|
1627
1627
|
auths.forEach(auth => {
|
|
1628
|
-
var _a
|
|
1628
|
+
var _a;
|
|
1629
1629
|
if (isApiKeySecurityScheme(auth.scheme)) {
|
|
1630
1630
|
if (auth.scheme.in === 'query') {
|
|
1631
1631
|
newQueryParams.push({
|
|
1632
1632
|
name: auth.scheme.name,
|
|
1633
|
-
value:
|
|
1633
|
+
value: auth.authValue || '123',
|
|
1634
1634
|
});
|
|
1635
1635
|
}
|
|
1636
1636
|
if (auth.scheme.in === 'header') {
|
|
1637
1637
|
newHeaders.push({
|
|
1638
1638
|
name: auth.scheme.name,
|
|
1639
|
-
value:
|
|
1639
|
+
value: auth.authValue || '123',
|
|
1640
1640
|
});
|
|
1641
1641
|
}
|
|
1642
1642
|
}
|
|
1643
1643
|
if (isOAuth2SecurityScheme(auth.scheme)) {
|
|
1644
1644
|
newHeaders.push({
|
|
1645
1645
|
name: 'Authorization',
|
|
1646
|
-
value:
|
|
1646
|
+
value: auth.authValue || 'Bearer 123',
|
|
1647
1647
|
});
|
|
1648
1648
|
}
|
|
1649
1649
|
if (isBearerSecurityScheme(auth.scheme)) {
|
|
1650
1650
|
newHeaders.push({
|
|
1651
1651
|
name: 'Authorization',
|
|
1652
|
-
value: `Bearer ${auth.authValue}`,
|
|
1652
|
+
value: `Bearer ${auth.authValue || '123'}`,
|
|
1653
1653
|
});
|
|
1654
1654
|
}
|
|
1655
1655
|
if (isDigestSecurityScheme(auth.scheme)) {
|
|
1656
1656
|
newHeaders.push({
|
|
1657
1657
|
name: 'Authorization',
|
|
1658
|
-
value: (
|
|
1658
|
+
value: ((_a = auth.authValue) === null || _a === void 0 ? void 0 : _a.replace(/\s\s+/g, ' ').trim()) || '123',
|
|
1659
1659
|
});
|
|
1660
1660
|
}
|
|
1661
1661
|
if (isBasicSecurityScheme(auth.scheme)) {
|
|
1662
1662
|
newHeaders.push({
|
|
1663
1663
|
name: 'Authorization',
|
|
1664
|
-
value: `Basic ${auth.authValue}`,
|
|
1664
|
+
value: `Basic ${auth.authValue || '123'}`,
|
|
1665
1665
|
});
|
|
1666
1666
|
}
|
|
1667
1667
|
});
|