@@ -524,8 +524,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
524
524
};
525
525
Object.defineProperty(exports, "__esModule", ({ value: true }));
526
526
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 );
529
529
const core_1 = __nccwpck_require__(2186);
530
530
class OidcClient {
531
531
static createHttpClient(allowRetry = true, maxRetry = 10) {
@@ -994,7 +994,7 @@ exports.toCommandProperties = toCommandProperties;
994
994
995
995
/***/ }),
996
996
997
- /***/ 6758 :
997
+ /***/ 5526 :
998
998
/***/ (function(__unused_webpack_module, exports) {
999
999
1000
1000
"use strict";
@@ -1082,7 +1082,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand
1082
1082
1083
1083
/***/ }),
1084
1084
1085
- /***/ 1404 :
1085
+ /***/ 6255 :
1086
1086
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
1087
1087
1088
1088
"use strict";
@@ -1124,7 +1124,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
1124
1124
exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
1125
1125
const http = __importStar(__nccwpck_require__(3685));
1126
1126
const https = __importStar(__nccwpck_require__(5687));
1127
- const pm = __importStar(__nccwpck_require__(2843 ));
1127
+ const pm = __importStar(__nccwpck_require__(9835 ));
1128
1128
const tunnel = __importStar(__nccwpck_require__(4294));
1129
1129
const undici_1 = __nccwpck_require__(1773);
1130
1130
var HttpCodes;
@@ -1649,7 +1649,7 @@ class HttpClient {
1649
1649
}
1650
1650
const usingSsl = parsedUrl.protocol === 'https:';
1651
1651
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') }`
1653
1653
})));
1654
1654
this._proxyAgentDispatcher = proxyAgent;
1655
1655
if (usingSsl && this._ignoreSslError) {
@@ -1741,7 +1741,7 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa
1741
1741
1742
1742
/***/ }),
1743
1743
1744
- /***/ 2843 :
1744
+ /***/ 9835 :
1745
1745
/***/ ((__unused_webpack_module, exports) => {
1746
1746
1747
1747
"use strict";
@@ -1763,11 +1763,11 @@ function getProxyUrl(reqUrl) {
1763
1763
})();
1764
1764
if (proxyVar) {
1765
1765
try {
1766
- return new URL (proxyVar);
1766
+ return new DecodedURL (proxyVar);
1767
1767
}
1768
1768
catch (_a) {
1769
1769
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
1770
- return new URL (`http://${proxyVar}`);
1770
+ return new DecodedURL (`http://${proxyVar}`);
1771
1771
}
1772
1772
}
1773
1773
else {
@@ -1826,6 +1826,19 @@ function isLoopbackAddress(host) {
1826
1826
hostLower.startsWith('[::1]') ||
1827
1827
hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
1828
1828
}
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
+ }
1829
1842
//# sourceMappingURL=proxy.js.map
1830
1843
1831
1844
/***/ }),
@@ -7438,7 +7451,7 @@ module.exports = {
7438
7451
7439
7452
7440
7453
const { parseSetCookie } = __nccwpck_require__(4408)
7441
- const { stringify, getHeadersList } = __nccwpck_require__(3121)
7454
+ const { stringify } = __nccwpck_require__(3121)
7442
7455
const { webidl } = __nccwpck_require__(1744)
7443
7456
const { Headers } = __nccwpck_require__(554)
7444
7457
@@ -7514,14 +7527,13 @@ function getSetCookies (headers) {
7514
7527
7515
7528
webidl.brandCheck(headers, Headers, { strict: false })
7516
7529
7517
- const cookies = getHeadersList( headers).cookies
7530
+ const cookies = headers.getSetCookie()
7518
7531
7519
7532
if (!cookies) {
7520
7533
return []
7521
7534
}
7522
7535
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))
7525
7537
}
7526
7538
7527
7539
/**
@@ -7949,14 +7961,15 @@ module.exports = {
7949
7961
/***/ }),
7950
7962
7951
7963
/***/ 3121:
7952
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
7964
+ /***/ ((module) => {
7953
7965
7954
7966
"use strict";
7955
7967
7956
7968
7957
- const assert = __nccwpck_require__(9491)
7958
- const { kHeadersList } = __nccwpck_require__(2785)
7959
-
7969
+ /**
7970
+ * @param {string} value
7971
+ * @returns {boolean}
7972
+ */
7960
7973
function isCTLExcludingHtab (value) {
7961
7974
if (value.length === 0) {
7962
7975
return false
@@ -8217,31 +8230,13 @@ function stringify (cookie) {
8217
8230
return out.join('; ')
8218
8231
}
8219
8232
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
-
8241
8233
module.exports = {
8242
8234
isCTLExcludingHtab,
8243
- stringify,
8244
- getHeadersList
8235
+ validateCookieName,
8236
+ validateCookiePath,
8237
+ validateCookieValue,
8238
+ toIMFDate,
8239
+ stringify
8245
8240
}
8246
8241
8247
8242
@@ -10170,6 +10165,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(9830)
10170
10165
const { File: UndiciFile } = __nccwpck_require__(8511)
10171
10166
const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685)
10172
10167
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
+
10173
10176
let ReadableStream = globalThis.ReadableStream
10174
10177
10175
10178
/** @type {globalThis['File']} */
@@ -10255,7 +10258,7 @@ function extractBody (object, keepalive = false) {
10255
10258
// Set source to a copy of the bytes held by object.
10256
10259
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
10257
10260
} 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')}`
10259
10262
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
10260
10263
10261
10264
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
@@ -12237,6 +12240,7 @@ const {
12237
12240
isValidHeaderName,
12238
12241
isValidHeaderValue
12239
12242
} = __nccwpck_require__(2538)
12243
+ const util = __nccwpck_require__(3837)
12240
12244
const { webidl } = __nccwpck_require__(1744)
12241
12245
const assert = __nccwpck_require__(9491)
12242
12246
@@ -12790,6 +12794,9 @@ Object.defineProperties(Headers.prototype, {
12790
12794
[Symbol.toStringTag]: {
12791
12795
value: 'Headers',
12792
12796
configurable: true
12797
+ },
12798
+ [util.inspect.custom]: {
12799
+ enumerable: false
12793
12800
}
12794
12801
})
12795
12802
@@ -21966,6 +21973,20 @@ class Pool extends PoolBase {
21966
21973
? { ...options.interceptors }
21967
21974
: undefined
21968
21975
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
+ })
21969
21990
}
21970
21991
21971
21992
[kGetDispatcher] () {
@@ -25020,6 +25041,14 @@ module.exports = require("net");
25020
25041
25021
25042
/***/ }),
25022
25043
25044
+ /***/ 6005:
25045
+ /***/ ((module) => {
25046
+
25047
+ "use strict";
25048
+ module.exports = require("node:crypto");
25049
+
25050
+ /***/ }),
25051
+
25023
25052
/***/ 5673:
25024
25053
/***/ ((module) => {
25025
25054
0 commit comments