@@ -2073,6 +2073,7 @@ class Context {
2073
2073
this.action = process.env.GITHUB_ACTION;
2074
2074
this.actor = process.env.GITHUB_ACTOR;
2075
2075
this.job = process.env.GITHUB_JOB;
2076
+ this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
2076
2077
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
2077
2078
this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
2078
2079
this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
@@ -13200,7 +13201,7 @@ module.exports = {
13200
13201
13201
13202
13202
13203
const { parseSetCookie } = __nccwpck_require__(8915)
13203
- const { stringify, getHeadersList } = __nccwpck_require__(3834)
13204
+ const { stringify } = __nccwpck_require__(3834)
13204
13205
const { webidl } = __nccwpck_require__(4222)
13205
13206
const { Headers } = __nccwpck_require__(6349)
13206
13207
@@ -13276,14 +13277,13 @@ function getSetCookies (headers) {
13276
13277
13277
13278
webidl.brandCheck(headers, Headers, { strict: false })
13278
13279
13279
- const cookies = getHeadersList( headers).cookies
13280
+ const cookies = headers.getSetCookie()
13280
13281
13281
13282
if (!cookies) {
13282
13283
return []
13283
13284
}
13284
13285
13285
- // In older versions of undici, cookies is a list of name:value.
13286
- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
13286
+ return cookies.map((pair) => parseSetCookie(pair))
13287
13287
}
13288
13288
13289
13289
/**
@@ -13711,14 +13711,15 @@ module.exports = {
13711
13711
/***/ }),
13712
13712
13713
13713
/***/ 3834:
13714
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
13714
+ /***/ ((module) => {
13715
13715
13716
13716
"use strict";
13717
13717
13718
13718
13719
- const assert = __nccwpck_require__(2613)
13720
- const { kHeadersList } = __nccwpck_require__(6443)
13721
-
13719
+ /**
13720
+ * @param {string} value
13721
+ * @returns {boolean}
13722
+ */
13722
13723
function isCTLExcludingHtab (value) {
13723
13724
if (value.length === 0) {
13724
13725
return false
@@ -13979,31 +13980,13 @@ function stringify (cookie) {
13979
13980
return out.join('; ')
13980
13981
}
13981
13982
13982
- let kHeadersListNode
13983
-
13984
- function getHeadersList (headers) {
13985
- if (headers[kHeadersList]) {
13986
- return headers[kHeadersList]
13987
- }
13988
-
13989
- if (!kHeadersListNode) {
13990
- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
13991
- (symbol) => symbol.description === 'headers list'
13992
- )
13993
-
13994
- assert(kHeadersListNode, 'Headers cannot be parsed')
13995
- }
13996
-
13997
- const headersList = headers[kHeadersListNode]
13998
- assert(headersList)
13999
-
14000
- return headersList
14001
- }
14002
-
14003
13983
module.exports = {
14004
13984
isCTLExcludingHtab,
14005
- stringify,
14006
- getHeadersList
13985
+ validateCookieName,
13986
+ validateCookiePath,
13987
+ validateCookieValue,
13988
+ toIMFDate,
13989
+ stringify
14007
13990
}
14008
13991
14009
13992
@@ -18007,6 +17990,7 @@ const {
18007
17990
isValidHeaderName,
18008
17991
isValidHeaderValue
18009
17992
} = __nccwpck_require__(5523)
17993
+ const util = __nccwpck_require__(9023)
18010
17994
const { webidl } = __nccwpck_require__(4222)
18011
17995
const assert = __nccwpck_require__(2613)
18012
17996
@@ -18560,6 +18544,9 @@ Object.defineProperties(Headers.prototype, {
18560
18544
[Symbol.toStringTag]: {
18561
18545
value: 'Headers',
18562
18546
configurable: true
18547
+ },
18548
+ [util.inspect.custom]: {
18549
+ enumerable: false
18563
18550
}
18564
18551
})
18565
18552
@@ -27736,6 +27723,20 @@ class Pool extends PoolBase {
27736
27723
? { ...options.interceptors }
27737
27724
: undefined
27738
27725
this[kFactory] = factory
27726
+
27727
+ this.on('connectionError', (origin, targets, error) => {
27728
+ // If a connection error occurs, we remove the client from the pool,
27729
+ // and emit a connectionError event. They will not be re-used.
27730
+ // Fixes https://github.com/nodejs/undici/issues/3895
27731
+ for (const target of targets) {
27732
+ // Do not use kRemoveClient here, as it will close the client,
27733
+ // but the client cannot be closed in this state.
27734
+ const idx = this[kClients].indexOf(target)
27735
+ if (idx !== -1) {
27736
+ this[kClients].splice(idx, 1)
27737
+ }
27738
+ }
27739
+ })
27739
27740
}
27740
27741
27741
27742
[kGetDispatcher] () {
0 commit comments