@@ -2062,6 +2062,7 @@ class Context {
2062
2062
this.action = process.env.GITHUB_ACTION;
2063
2063
this.actor = process.env.GITHUB_ACTOR;
2064
2064
this.job = process.env.GITHUB_JOB;
2065
+ this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
2065
2066
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
2066
2067
this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
2067
2068
this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
@@ -13189,7 +13190,7 @@ module.exports = {
13189
13190
13190
13191
13191
13192
const { parseSetCookie } = __nccwpck_require__(8915)
13192
- const { stringify, getHeadersList } = __nccwpck_require__(3834)
13193
+ const { stringify } = __nccwpck_require__(3834)
13193
13194
const { webidl } = __nccwpck_require__(4222)
13194
13195
const { Headers } = __nccwpck_require__(6349)
13195
13196
@@ -13265,14 +13266,13 @@ function getSetCookies (headers) {
13265
13266
13266
13267
webidl.brandCheck(headers, Headers, { strict: false })
13267
13268
13268
- const cookies = getHeadersList( headers).cookies
13269
+ const cookies = headers.getSetCookie()
13269
13270
13270
13271
if (!cookies) {
13271
13272
return []
13272
13273
}
13273
13274
13274
- // In older versions of undici, cookies is a list of name:value.
13275
- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
13275
+ return cookies.map((pair) => parseSetCookie(pair))
13276
13276
}
13277
13277
13278
13278
/**
@@ -13700,14 +13700,15 @@ module.exports = {
13700
13700
/***/ }),
13701
13701
13702
13702
/***/ 3834:
13703
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
13703
+ /***/ ((module) => {
13704
13704
13705
13705
"use strict";
13706
13706
13707
13707
13708
- const assert = __nccwpck_require__(2613)
13709
- const { kHeadersList } = __nccwpck_require__(6443)
13710
-
13708
+ /**
13709
+ * @param {string} value
13710
+ * @returns {boolean}
13711
+ */
13711
13712
function isCTLExcludingHtab (value) {
13712
13713
if (value.length === 0) {
13713
13714
return false
@@ -13968,31 +13969,13 @@ function stringify (cookie) {
13968
13969
return out.join('; ')
13969
13970
}
13970
13971
13971
- let kHeadersListNode
13972
-
13973
- function getHeadersList (headers) {
13974
- if (headers[kHeadersList]) {
13975
- return headers[kHeadersList]
13976
- }
13977
-
13978
- if (!kHeadersListNode) {
13979
- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
13980
- (symbol) => symbol.description === 'headers list'
13981
- )
13982
-
13983
- assert(kHeadersListNode, 'Headers cannot be parsed')
13984
- }
13985
-
13986
- const headersList = headers[kHeadersListNode]
13987
- assert(headersList)
13988
-
13989
- return headersList
13990
- }
13991
-
13992
13972
module.exports = {
13993
13973
isCTLExcludingHtab,
13994
- stringify,
13995
- getHeadersList
13974
+ validateCookieName,
13975
+ validateCookiePath,
13976
+ validateCookieValue,
13977
+ toIMFDate,
13978
+ stringify
13996
13979
}
13997
13980
13998
13981
@@ -17996,6 +17979,7 @@ const {
17996
17979
isValidHeaderName,
17997
17980
isValidHeaderValue
17998
17981
} = __nccwpck_require__(5523)
17982
+ const util = __nccwpck_require__(9023)
17999
17983
const { webidl } = __nccwpck_require__(4222)
18000
17984
const assert = __nccwpck_require__(2613)
18001
17985
@@ -18549,6 +18533,9 @@ Object.defineProperties(Headers.prototype, {
18549
18533
[Symbol.toStringTag]: {
18550
18534
value: 'Headers',
18551
18535
configurable: true
18536
+ },
18537
+ [util.inspect.custom]: {
18538
+ enumerable: false
18552
18539
}
18553
18540
})
18554
18541
@@ -27725,6 +27712,20 @@ class Pool extends PoolBase {
27725
27712
? { ...options.interceptors }
27726
27713
: undefined
27727
27714
this[kFactory] = factory
27715
+
27716
+ this.on('connectionError', (origin, targets, error) => {
27717
+ // If a connection error occurs, we remove the client from the pool,
27718
+ // and emit a connectionError event. They will not be re-used.
27719
+ // Fixes https://github.com/nodejs/undici/issues/3895
27720
+ for (const target of targets) {
27721
+ // Do not use kRemoveClient here, as it will close the client,
27722
+ // but the client cannot be closed in this state.
27723
+ const idx = this[kClients].indexOf(target)
27724
+ if (idx !== -1) {
27725
+ this[kClients].splice(idx, 1)
27726
+ }
27727
+ }
27728
+ })
27728
27729
}
27729
27730
27730
27731
[kGetDispatcher] () {
0 commit comments