Skip to content

Commit 4b25932

Browse files
iBotPeachesgithub-actions[bot]
authored andcommitted
Update dist
1 parent 76059c9 commit 4b25932

File tree

2 files changed

+71
-42
lines changed

2 files changed

+71
-42
lines changed

dist/index.js

Lines changed: 70 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
524524
};
525525
Object.defineProperty(exports, "__esModule", ({ value: true }));
526526
exports.OidcClient = void 0;
527-
const http_client_1 = __nccwpck_require__(1404);
528-
const auth_1 = __nccwpck_require__(6758);
527+
const http_client_1 = __nccwpck_require__(6255);
528+
const auth_1 = __nccwpck_require__(5526);
529529
const core_1 = __nccwpck_require__(2186);
530530
class OidcClient {
531531
static createHttpClient(allowRetry = true, maxRetry = 10) {
@@ -994,7 +994,7 @@ exports.toCommandProperties = toCommandProperties;
994994

995995
/***/ }),
996996

997-
/***/ 6758:
997+
/***/ 5526:
998998
/***/ (function(__unused_webpack_module, exports) {
999999

10001000
"use strict";
@@ -1082,7 +1082,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand
10821082

10831083
/***/ }),
10841084

1085-
/***/ 1404:
1085+
/***/ 6255:
10861086
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
10871087

10881088
"use strict";
@@ -1124,7 +1124,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
11241124
exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
11251125
const http = __importStar(__nccwpck_require__(3685));
11261126
const https = __importStar(__nccwpck_require__(5687));
1127-
const pm = __importStar(__nccwpck_require__(2843));
1127+
const pm = __importStar(__nccwpck_require__(9835));
11281128
const tunnel = __importStar(__nccwpck_require__(4294));
11291129
const undici_1 = __nccwpck_require__(1773);
11301130
var HttpCodes;
@@ -1649,7 +1649,7 @@ class HttpClient {
16491649
}
16501650
const usingSsl = parsedUrl.protocol === 'https:';
16511651
proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
1652-
token: `${proxyUrl.username}:${proxyUrl.password}`
1652+
token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
16531653
})));
16541654
this._proxyAgentDispatcher = proxyAgent;
16551655
if (usingSsl && this._ignoreSslError) {
@@ -1741,7 +1741,7 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa
17411741

17421742
/***/ }),
17431743

1744-
/***/ 2843:
1744+
/***/ 9835:
17451745
/***/ ((__unused_webpack_module, exports) => {
17461746

17471747
"use strict";
@@ -1763,11 +1763,11 @@ function getProxyUrl(reqUrl) {
17631763
})();
17641764
if (proxyVar) {
17651765
try {
1766-
return new URL(proxyVar);
1766+
return new DecodedURL(proxyVar);
17671767
}
17681768
catch (_a) {
17691769
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
1770-
return new URL(`http://${proxyVar}`);
1770+
return new DecodedURL(`http://${proxyVar}`);
17711771
}
17721772
}
17731773
else {
@@ -1826,6 +1826,19 @@ function isLoopbackAddress(host) {
18261826
hostLower.startsWith('[::1]') ||
18271827
hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
18281828
}
1829+
class DecodedURL extends URL {
1830+
constructor(url, base) {
1831+
super(url, base);
1832+
this._decodedUsername = decodeURIComponent(super.username);
1833+
this._decodedPassword = decodeURIComponent(super.password);
1834+
}
1835+
get username() {
1836+
return this._decodedUsername;
1837+
}
1838+
get password() {
1839+
return this._decodedPassword;
1840+
}
1841+
}
18291842
//# sourceMappingURL=proxy.js.map
18301843

18311844
/***/ }),
@@ -7438,7 +7451,7 @@ module.exports = {
74387451

74397452

74407453
const { parseSetCookie } = __nccwpck_require__(4408)
7441-
const { stringify, getHeadersList } = __nccwpck_require__(3121)
7454+
const { stringify } = __nccwpck_require__(3121)
74427455
const { webidl } = __nccwpck_require__(1744)
74437456
const { Headers } = __nccwpck_require__(554)
74447457

@@ -7514,14 +7527,13 @@ function getSetCookies (headers) {
75147527

75157528
webidl.brandCheck(headers, Headers, { strict: false })
75167529

7517-
const cookies = getHeadersList(headers).cookies
7530+
const cookies = headers.getSetCookie()
75187531

75197532
if (!cookies) {
75207533
return []
75217534
}
75227535

7523-
// In older versions of undici, cookies is a list of name:value.
7524-
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
7536+
return cookies.map((pair) => parseSetCookie(pair))
75257537
}
75267538

75277539
/**
@@ -7949,14 +7961,15 @@ module.exports = {
79497961
/***/ }),
79507962

79517963
/***/ 3121:
7952-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
7964+
/***/ ((module) => {
79537965

79547966
"use strict";
79557967

79567968

7957-
const assert = __nccwpck_require__(9491)
7958-
const { kHeadersList } = __nccwpck_require__(2785)
7959-
7969+
/**
7970+
* @param {string} value
7971+
* @returns {boolean}
7972+
*/
79607973
function isCTLExcludingHtab (value) {
79617974
if (value.length === 0) {
79627975
return false
@@ -8217,31 +8230,13 @@ function stringify (cookie) {
82178230
return out.join('; ')
82188231
}
82198232

8220-
let kHeadersListNode
8221-
8222-
function getHeadersList (headers) {
8223-
if (headers[kHeadersList]) {
8224-
return headers[kHeadersList]
8225-
}
8226-
8227-
if (!kHeadersListNode) {
8228-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
8229-
(symbol) => symbol.description === 'headers list'
8230-
)
8231-
8232-
assert(kHeadersListNode, 'Headers cannot be parsed')
8233-
}
8234-
8235-
const headersList = headers[kHeadersListNode]
8236-
assert(headersList)
8237-
8238-
return headersList
8239-
}
8240-
82418233
module.exports = {
82428234
isCTLExcludingHtab,
8243-
stringify,
8244-
getHeadersList
8235+
validateCookieName,
8236+
validateCookiePath,
8237+
validateCookieValue,
8238+
toIMFDate,
8239+
stringify
82458240
}
82468241

82478242

@@ -10170,6 +10165,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(9830)
1017010165
const { File: UndiciFile } = __nccwpck_require__(8511)
1017110166
const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685)
1017210167

10168+
let random
10169+
try {
10170+
const crypto = __nccwpck_require__(6005)
10171+
random = (max) => crypto.randomInt(0, max)
10172+
} catch {
10173+
random = (max) => Math.floor(Math.random(max))
10174+
}
10175+
1017310176
let ReadableStream = globalThis.ReadableStream
1017410177

1017510178
/** @type {globalThis['File']} */
@@ -10255,7 +10258,7 @@ function extractBody (object, keepalive = false) {
1025510258
// Set source to a copy of the bytes held by object.
1025610259
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
1025710260
} else if (util.isFormDataLike(object)) {
10258-
const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`
10261+
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
1025910262
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
1026010263

1026110264
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
@@ -12237,6 +12240,7 @@ const {
1223712240
isValidHeaderName,
1223812241
isValidHeaderValue
1223912242
} = __nccwpck_require__(2538)
12243+
const util = __nccwpck_require__(3837)
1224012244
const { webidl } = __nccwpck_require__(1744)
1224112245
const assert = __nccwpck_require__(9491)
1224212246

@@ -12790,6 +12794,9 @@ Object.defineProperties(Headers.prototype, {
1279012794
[Symbol.toStringTag]: {
1279112795
value: 'Headers',
1279212796
configurable: true
12797+
},
12798+
[util.inspect.custom]: {
12799+
enumerable: false
1279312800
}
1279412801
})
1279512802

@@ -21966,6 +21973,20 @@ class Pool extends PoolBase {
2196621973
? { ...options.interceptors }
2196721974
: undefined
2196821975
this[kFactory] = factory
21976+
21977+
this.on('connectionError', (origin, targets, error) => {
21978+
// If a connection error occurs, we remove the client from the pool,
21979+
// and emit a connectionError event. They will not be re-used.
21980+
// Fixes https://github.com/nodejs/undici/issues/3895
21981+
for (const target of targets) {
21982+
// Do not use kRemoveClient here, as it will close the client,
21983+
// but the client cannot be closed in this state.
21984+
const idx = this[kClients].indexOf(target)
21985+
if (idx !== -1) {
21986+
this[kClients].splice(idx, 1)
21987+
}
21988+
}
21989+
})
2196921990
}
2197021991

2197121992
[kGetDispatcher] () {
@@ -25020,6 +25041,14 @@ module.exports = require("net");
2502025041

2502125042
/***/ }),
2502225043

25044+
/***/ 6005:
25045+
/***/ ((module) => {
25046+
25047+
"use strict";
25048+
module.exports = require("node:crypto");
25049+
25050+
/***/ }),
25051+
2502325052
/***/ 5673:
2502425053
/***/ ((module) => {
2502525054

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)