Skip to content

Commit 8f5b0d3

Browse files
fix: rebuild
1 parent 0ad0d10 commit 8f5b0d3

File tree

2 files changed

+99
-19
lines changed

2 files changed

+99
-19
lines changed

dist/index.js

+98-18
Original file line numberDiff line numberDiff line change
@@ -20338,6 +20338,26 @@ function delay(timeInMs, options) {
2033820338
});
2033920339
}
2034020340

20341+
// Copyright (c) Microsoft Corporation.
20342+
/**
20343+
* promise.race() wrapper that aborts rest of promises as soon as the first promise settles.
20344+
*/
20345+
async function cancelablePromiseRace(abortablePromiseBuilders, options) {
20346+
var _a, _b;
20347+
const aborter = new abortController.AbortController();
20348+
function abortHandler() {
20349+
aborter.abort();
20350+
}
20351+
(_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler);
20352+
try {
20353+
return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal })));
20354+
}
20355+
finally {
20356+
aborter.abort();
20357+
(_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler);
20358+
}
20359+
}
20360+
2034120361
// Copyright (c) Microsoft Corporation.
2034220362
// Licensed under the MIT license.
2034320363
/**
@@ -20635,6 +20655,7 @@ function base64UrlToUint8Array(value) {
2063520655
return Buffer.from(value, "base64url");
2063620656
}
2063720657

20658+
exports.cancelablePromiseRace = cancelablePromiseRace;
2063820659
exports.computeSha256Hash = computeSha256Hash;
2063920660
exports.computeSha256Hmac = computeSha256Hmac;
2064020661
exports.createAbortablePromise = createAbortablePromise;
@@ -48632,7 +48653,7 @@ __export(dist_src_exports, {
4863248653
module.exports = __toCommonJS(dist_src_exports);
4863348654

4863448655
// pkg/dist-src/version.js
48635-
var VERSION = "10.0.0";
48656+
var VERSION = "10.0.1";
4863648657

4863748658
// pkg/dist-src/generated/endpoints.js
4863848659
var Endpoints = {
@@ -50515,11 +50536,41 @@ for (const [scope, endpoints] of Object.entries(endpoints_default)) {
5051550536
}
5051650537
}
5051750538
var handler = {
50539+
has({ scope }, methodName) {
50540+
return endpointMethodsMap.get(scope).has(methodName);
50541+
},
50542+
getOwnPropertyDescriptor(target, methodName) {
50543+
return {
50544+
value: this.get(target, methodName),
50545+
// ensures method is in the cache
50546+
configurable: true,
50547+
writable: true,
50548+
enumerable: true
50549+
};
50550+
},
50551+
defineProperty(target, methodName, descriptor) {
50552+
Object.defineProperty(target.cache, methodName, descriptor);
50553+
return true;
50554+
},
50555+
deleteProperty(target, methodName) {
50556+
delete target.cache[methodName];
50557+
return true;
50558+
},
50559+
ownKeys({ scope }) {
50560+
return [...endpointMethodsMap.get(scope).keys()];
50561+
},
50562+
set(target, methodName, value) {
50563+
return target.cache[methodName] = value;
50564+
},
5051850565
get({ octokit, scope, cache }, methodName) {
5051950566
if (cache[methodName]) {
5052050567
return cache[methodName];
5052150568
}
50522-
const { decorations, endpointDefaults } = endpointMethodsMap.get(scope).get(methodName);
50569+
const method = endpointMethodsMap.get(scope).get(methodName);
50570+
if (!method) {
50571+
return void 0;
50572+
}
50573+
const { endpointDefaults, decorations } = method;
5052350574
if (decorations) {
5052450575
cache[methodName] = decorate(
5052550576
octokit,
@@ -58128,6 +58179,7 @@ function onceStrict (fn) {
5812858179
} catch (ex) {
5812958180
Stream = function () {}
5813058181
}
58182+
if (!Stream) Stream = function () {}
5813158183

5813258184
var streamWraps = sax.EVENTS.filter(function (ev) {
5813358185
return ev !== 'error' && ev !== 'end'
@@ -59446,9 +59498,16 @@ function onceStrict (fn) {
5944659498
}
5944759499

5944859500
if (c === ';') {
59449-
parser[buffer] += parseEntity(parser)
59450-
parser.entity = ''
59451-
parser.state = returnState
59501+
if (parser.opt.unparsedEntities) {
59502+
var parsedEntity = parseEntity(parser)
59503+
parser.entity = ''
59504+
parser.state = returnState
59505+
parser.write(parsedEntity)
59506+
} else {
59507+
parser[buffer] += parseEntity(parser)
59508+
parser.entity = ''
59509+
parser.state = returnState
59510+
}
5945259511
} else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {
5945359512
parser.entity += c
5945459513
} else {
@@ -59460,8 +59519,9 @@ function onceStrict (fn) {
5946059519

5946159520
continue
5946259521

59463-
default:
59522+
default: /* istanbul ignore next */ {
5946459523
throw new Error(parser, 'Unknown state: ' + parser.state)
59524+
}
5946559525
}
5946659526
} // while
5946759527

@@ -66646,6 +66706,7 @@ module.exports = {
6664666706

6664766707
const assert = __nccwpck_require__(9491)
6664866708
const net = __nccwpck_require__(1808)
66709+
const http = __nccwpck_require__(3685)
6664966710
const { pipeline } = __nccwpck_require__(2781)
6665066711
const util = __nccwpck_require__(3983)
6665166712
const timers = __nccwpck_require__(9459)
@@ -66733,6 +66794,7 @@ const {
6673366794
HTTP2_HEADER_AUTHORITY,
6673466795
HTTP2_HEADER_METHOD,
6673566796
HTTP2_HEADER_PATH,
66797+
HTTP2_HEADER_SCHEME,
6673666798
HTTP2_HEADER_CONTENT_LENGTH,
6673766799
HTTP2_HEADER_EXPECT,
6673866800
HTTP2_HEADER_STATUS
@@ -66909,7 +66971,7 @@ class Client extends DispatcherBase {
6690966971
this[kConnector] = connect
6691066972
this[kSocket] = null
6691166973
this[kPipelining] = pipelining != null ? pipelining : 1
66912-
this[kMaxHeadersSize] = maxHeaderSize || 16384
66974+
this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize
6691366975
this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout
6691466976
this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout
6691566977
this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold
@@ -68329,7 +68391,7 @@ function writeH2 (client, session, request) {
6832968391
const h2State = client[kHTTP2SessionState]
6833068392

6833168393
headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost]
68332-
headers[HTTP2_HEADER_PATH] = path
68394+
headers[HTTP2_HEADER_METHOD] = method
6833368395

6833468396
if (method === 'CONNECT') {
6833568397
session.ref()
@@ -68356,10 +68418,14 @@ function writeH2 (client, session, request) {
6835668418
})
6835768419

6835868420
return true
68359-
} else {
68360-
headers[HTTP2_HEADER_METHOD] = method
6836168421
}
6836268422

68423+
// https://tools.ietf.org/html/rfc7540#section-8.3
68424+
// :path and :scheme headers must be omited when sending CONNECT
68425+
68426+
headers[HTTP2_HEADER_PATH] = path
68427+
headers[HTTP2_HEADER_SCHEME] = 'https'
68428+
6836368429
// https://tools.ietf.org/html/rfc7231#section-4.3.1
6836468430
// https://tools.ietf.org/html/rfc7231#section-4.3.2
6836568431
// https://tools.ietf.org/html/rfc7231#section-4.3.5
@@ -68496,6 +68562,7 @@ function writeH2 (client, session, request) {
6849668562
stream.cork()
6849768563
stream.write(body)
6849868564
stream.uncork()
68565+
stream.end()
6849968566
request.onBodySent(body)
6850068567
request.onRequestSent()
6850168568
} else if (util.isBlobLike(body)) {
@@ -68730,13 +68797,17 @@ async function writeIterable ({ h2stream, body, client, request, socket, content
6873068797
throw socket[kError]
6873168798
}
6873268799

68733-
if (!h2stream.write(chunk)) {
68800+
const res = h2stream.write(chunk)
68801+
request.onBodySent(chunk)
68802+
if (!res) {
6873468803
await waitForDrain()
6873568804
}
6873668805
}
6873768806
} catch (err) {
6873868807
h2stream.destroy(err)
6873968808
} finally {
68809+
request.onRequestSent()
68810+
h2stream.end()
6874068811
h2stream
6874168812
.off('close', onDrain)
6874268813
.off('drain', onDrain)
@@ -68949,11 +69020,13 @@ class CompatFinalizer {
6894969020
}
6895069021

6895169022
register (dispatcher, key) {
68952-
dispatcher.on('disconnect', () => {
68953-
if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) {
68954-
this.finalizer(key)
68955-
}
68956-
})
69023+
if (dispatcher.on) {
69024+
dispatcher.on('disconnect', () => {
69025+
if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) {
69026+
this.finalizer(key)
69027+
}
69028+
})
69029+
}
6895769030
}
6895869031
}
6895969032

@@ -70619,7 +70692,8 @@ function processHeader (request, key, val, skipAppend = false) {
7061970692
key.toLowerCase() === 'content-type'
7062070693
) {
7062170694
request.contentType = val
70622-
request.headers += processHeaderValue(key, val)
70695+
if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend)
70696+
else request.headers += processHeaderValue(key, val)
7062370697
} else if (
7062470698
key.length === 17 &&
7062570699
key.toLowerCase() === 'transfer-encoding'
@@ -75309,6 +75383,10 @@ async function httpRedirectFetch (fetchParams, response) {
7530975383
if (!sameOrigin(requestCurrentURL(request), locationURL)) {
7531075384
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
7531175385
request.headersList.delete('authorization')
75386+
75387+
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
75388+
request.headersList.delete('cookie')
75389+
request.headersList.delete('host')
7531275390
}
7531375391

7531475392
// 14. If request’s body is non-null, then set request’s body to the first return
@@ -75453,7 +75531,7 @@ async function httpNetworkOrCacheFetch (
7545375531
// user agents should append `User-Agent`/default `User-Agent` value to
7545475532
// httpRequest’s header list.
7545575533
if (!httpRequest.headersList.contains('user-agent')) {
75456-
httpRequest.headersList.append('user-agent', 'undici')
75534+
httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node')
7545775535
}
7545875536

7545975537
// 15. If httpRequest’s cache mode is "default" and httpRequest’s header
@@ -75515,6 +75593,8 @@ async function httpNetworkOrCacheFetch (
7551575593
}
7551675594
}
7551775595

75596+
httpRequest.headersList.delete('host')
75597+
7551875598
// 20. If includeCredentials is true, then:
7551975599
if (includeCredentials) {
7552075600
// 1. If the user agent is not configured to block cookies for httpRequest

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)