@@ -7802,7 +7802,7 @@ module.exports = __toCommonJS(dist_src_exports);
78027802var import_universal_user_agent = __nccwpck_require__(5030);
78037803
78047804// pkg/dist-src/version.js
7805- var VERSION = "9.0.5 ";
7805+ var VERSION = "9.0.6 ";
78067806
78077807// pkg/dist-src/defaults.js
78087808var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
@@ -7907,9 +7907,9 @@ function addQueryParameters(url, parameters) {
79077907}
79087908
79097909// pkg/dist-src/util/extract-url-variable-names.js
7910- var urlVariableRegex = /\{[^}]+\}/g;
7910+ var urlVariableRegex = /\{[^{} }]+\}/g;
79117911function removeNonChars(variableName) {
7912- return variableName.replace(/^\W+|\W+$ /g, "").split(/,/);
7912+ return variableName.replace(/(?: ^\W+)|(?:(?<!\W)\W+$) /g, "").split(/,/);
79137913}
79147914function extractUrlVariableNames(url) {
79157915 const matches = url.match(urlVariableRegex);
@@ -8095,7 +8095,7 @@ function parse(options) {
80958095 }
80968096 if (url.endsWith("/graphql")) {
80978097 if (options.mediaType.previews?.length) {
8098- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
8098+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-]) [\w-]+(?=-preview)/g) || [];
80998099 headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
81008100 const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
81018101 return `application/vnd.github.${preview}-preview${format}`;
@@ -8344,7 +8344,7 @@ __export(dist_src_exports, {
83448344module.exports = __toCommonJS(dist_src_exports);
83458345
83468346// pkg/dist-src/version.js
8347- var VERSION = "9.2.1 ";
8347+ var VERSION = "9.2.2 ";
83488348
83498349// pkg/dist-src/normalize-paginated-list-response.js
83508350function normalizePaginatedListResponse(response) {
@@ -8392,7 +8392,7 @@ function iterator(octokit, route, parameters) {
83928392 const response = await requestMethod({ method, url, headers });
83938393 const normalizedResponse = normalizePaginatedListResponse(response);
83948394 url = ((normalizedResponse.headers.link || "").match(
8395- /<([^>]+)>;\s*rel="next"/
8395+ /<([^< >]+)>;\s*rel="next"/
83968396 ) || [])[1];
83978397 return { value: normalizedResponse };
83988398 } catch (error) {
@@ -10944,7 +10944,7 @@ var RequestError = class extends Error {
1094410944 if (options.request.headers.authorization) {
1094510945 requestCopy.headers = Object.assign({}, options.request.headers, {
1094610946 authorization: options.request.headers.authorization.replace(
10947- / .*$/,
10947+ /(?<! ) .*$/,
1094810948 " [REDACTED]"
1094910949 )
1095010950 });
@@ -11012,7 +11012,7 @@ var import_endpoint = __nccwpck_require__(9440);
1101211012var import_universal_user_agent = __nccwpck_require__(5030);
1101311013
1101411014// pkg/dist-src/version.js
11015- var VERSION = "8.4.0 ";
11015+ var VERSION = "8.4.1 ";
1101611016
1101711017// pkg/dist-src/is-plain-object.js
1101811018function isPlainObject(value) {
@@ -11071,7 +11071,7 @@ function fetchWrapper(requestOptions) {
1107111071 headers[keyAndValue[0]] = keyAndValue[1];
1107211072 }
1107311073 if ("deprecation" in headers) {
11074- const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
11074+ const matches = headers.link && headers.link.match(/<([^< >]+)>; rel="deprecation"/);
1107511075 const deprecationLink = matches && matches.pop();
1107611076 log.warn(
1107711077 `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
@@ -18725,7 +18725,7 @@ module.exports = {
1872518725
1872618726
1872718727const { parseSetCookie } = __nccwpck_require__(4408)
18728- const { stringify, getHeadersList } = __nccwpck_require__(3121)
18728+ const { stringify } = __nccwpck_require__(3121)
1872918729const { webidl } = __nccwpck_require__(1744)
1873018730const { Headers } = __nccwpck_require__(554)
1873118731
@@ -18801,14 +18801,13 @@ function getSetCookies (headers) {
1880118801
1880218802 webidl.brandCheck(headers, Headers, { strict: false })
1880318803
18804- const cookies = getHeadersList( headers).cookies
18804+ const cookies = headers.getSetCookie()
1880518805
1880618806 if (!cookies) {
1880718807 return []
1880818808 }
1880918809
18810- // In older versions of undici, cookies is a list of name:value.
18811- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
18810+ return cookies.map((pair) => parseSetCookie(pair))
1881218811}
1881318812
1881418813/**
@@ -19236,14 +19235,15 @@ module.exports = {
1923619235/***/ }),
1923719236
1923819237/***/ 3121:
19239- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
19238+ /***/ ((module) => {
1924019239
1924119240"use strict";
1924219241
1924319242
19244- const assert = __nccwpck_require__(9491)
19245- const { kHeadersList } = __nccwpck_require__(2785)
19246-
19243+ /**
19244+ * @param {string} value
19245+ * @returns {boolean}
19246+ */
1924719247function isCTLExcludingHtab (value) {
1924819248 if (value.length === 0) {
1924919249 return false
@@ -19504,31 +19504,13 @@ function stringify (cookie) {
1950419504 return out.join('; ')
1950519505}
1950619506
19507- let kHeadersListNode
19508-
19509- function getHeadersList (headers) {
19510- if (headers[kHeadersList]) {
19511- return headers[kHeadersList]
19512- }
19513-
19514- if (!kHeadersListNode) {
19515- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
19516- (symbol) => symbol.description === 'headers list'
19517- )
19518-
19519- assert(kHeadersListNode, 'Headers cannot be parsed')
19520- }
19521-
19522- const headersList = headers[kHeadersListNode]
19523- assert(headersList)
19524-
19525- return headersList
19526- }
19527-
1952819507module.exports = {
1952919508 isCTLExcludingHtab,
19530- stringify,
19531- getHeadersList
19509+ validateCookieName,
19510+ validateCookiePath,
19511+ validateCookieValue,
19512+ toIMFDate,
19513+ stringify
1953219514}
1953319515
1953419516
@@ -21457,6 +21439,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(9830)
2145721439const { File: UndiciFile } = __nccwpck_require__(8511)
2145821440const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685)
2145921441
21442+ let random
21443+ try {
21444+ const crypto = __nccwpck_require__(6005)
21445+ random = (max) => crypto.randomInt(0, max)
21446+ } catch {
21447+ random = (max) => Math.floor(Math.random(max))
21448+ }
21449+
2146021450let ReadableStream = globalThis.ReadableStream
2146121451
2146221452/** @type {globalThis['File']} */
@@ -21542,7 +21532,7 @@ function extractBody (object, keepalive = false) {
2154221532 // Set source to a copy of the bytes held by object.
2154321533 source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
2154421534 } else if (util.isFormDataLike(object)) {
21545- const boundary = `----formdata-undici-0${`${Math.floor(Math. random() * 1e11)}`.padStart(11, '0')}`
21535+ const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
2154621536 const prefix = `--${boundary}\r\nContent-Disposition: form-data`
2154721537
2154821538 /*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
@@ -23524,6 +23514,7 @@ const {
2352423514 isValidHeaderName,
2352523515 isValidHeaderValue
2352623516} = __nccwpck_require__(2538)
23517+ const util = __nccwpck_require__(3837)
2352723518const { webidl } = __nccwpck_require__(1744)
2352823519const assert = __nccwpck_require__(9491)
2352923520
@@ -24077,6 +24068,9 @@ Object.defineProperties(Headers.prototype, {
2407724068 [Symbol.toStringTag]: {
2407824069 value: 'Headers',
2407924070 configurable: true
24071+ },
24072+ [util.inspect.custom]: {
24073+ enumerable: false
2408024074 }
2408124075})
2408224076
@@ -33253,6 +33247,20 @@ class Pool extends PoolBase {
3325333247 ? { ...options.interceptors }
3325433248 : undefined
3325533249 this[kFactory] = factory
33250+
33251+ this.on('connectionError', (origin, targets, error) => {
33252+ // If a connection error occurs, we remove the client from the pool,
33253+ // and emit a connectionError event. They will not be re-used.
33254+ // Fixes https://github.com/nodejs/undici/issues/3895
33255+ for (const target of targets) {
33256+ // Do not use kRemoveClient here, as it will close the client,
33257+ // but the client cannot be closed in this state.
33258+ const idx = this[kClients].indexOf(target)
33259+ if (idx !== -1) {
33260+ this[kClients].splice(idx, 1)
33261+ }
33262+ }
33263+ })
3325633264 }
3325733265
3325833266 [kGetDispatcher] () {
@@ -36408,6 +36416,14 @@ module.exports = require("net");
3640836416
3640936417/***/ }),
3641036418
36419+ /***/ 6005:
36420+ /***/ ((module) => {
36421+
36422+ "use strict";
36423+ module.exports = require("node:crypto");
36424+
36425+ /***/ }),
36426+
3641136427/***/ 5673:
3641236428/***/ ((module) => {
3641336429
0 commit comments