Skip to content

Commit

Permalink
fix: rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
kristof-mattei committed Oct 16, 2023
1 parent 0ad0d10 commit 8f5b0d3
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 19 deletions.
116 changes: 98 additions & 18 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20338,6 +20338,26 @@ function delay(timeInMs, options) {
});
}

// Copyright (c) Microsoft Corporation.
/**
* promise.race() wrapper that aborts rest of promises as soon as the first promise settles.
*/
async function cancelablePromiseRace(abortablePromiseBuilders, options) {
var _a, _b;
const aborter = new abortController.AbortController();
function abortHandler() {
aborter.abort();
}
(_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler);
try {
return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal })));
}
finally {
aborter.abort();
(_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler);
}
}

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
/**
Expand Down Expand Up @@ -20635,6 +20655,7 @@ function base64UrlToUint8Array(value) {
return Buffer.from(value, "base64url");
}

exports.cancelablePromiseRace = cancelablePromiseRace;
exports.computeSha256Hash = computeSha256Hash;
exports.computeSha256Hmac = computeSha256Hmac;
exports.createAbortablePromise = createAbortablePromise;
Expand Down Expand Up @@ -48632,7 +48653,7 @@ __export(dist_src_exports, {
module.exports = __toCommonJS(dist_src_exports);

// pkg/dist-src/version.js
var VERSION = "10.0.0";
var VERSION = "10.0.1";

// pkg/dist-src/generated/endpoints.js
var Endpoints = {
Expand Down Expand Up @@ -50515,11 +50536,41 @@ for (const [scope, endpoints] of Object.entries(endpoints_default)) {
}
}
var handler = {
has({ scope }, methodName) {
return endpointMethodsMap.get(scope).has(methodName);
},
getOwnPropertyDescriptor(target, methodName) {
return {
value: this.get(target, methodName),
// ensures method is in the cache
configurable: true,
writable: true,
enumerable: true
};
},
defineProperty(target, methodName, descriptor) {
Object.defineProperty(target.cache, methodName, descriptor);
return true;
},
deleteProperty(target, methodName) {
delete target.cache[methodName];
return true;
},
ownKeys({ scope }) {
return [...endpointMethodsMap.get(scope).keys()];
},
set(target, methodName, value) {
return target.cache[methodName] = value;
},
get({ octokit, scope, cache }, methodName) {
if (cache[methodName]) {
return cache[methodName];
}
const { decorations, endpointDefaults } = endpointMethodsMap.get(scope).get(methodName);
const method = endpointMethodsMap.get(scope).get(methodName);
if (!method) {
return void 0;
}
const { endpointDefaults, decorations } = method;
if (decorations) {
cache[methodName] = decorate(
octokit,
Expand Down Expand Up @@ -58128,6 +58179,7 @@ function onceStrict (fn) {
} catch (ex) {
Stream = function () {}
}
if (!Stream) Stream = function () {}

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

if (c === ';') {
parser[buffer] += parseEntity(parser)
parser.entity = ''
parser.state = returnState
if (parser.opt.unparsedEntities) {
var parsedEntity = parseEntity(parser)
parser.entity = ''
parser.state = returnState
parser.write(parsedEntity)
} else {
parser[buffer] += parseEntity(parser)
parser.entity = ''
parser.state = returnState
}
} else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {
parser.entity += c
} else {
Expand All @@ -59460,8 +59519,9 @@ function onceStrict (fn) {

continue

default:
default: /* istanbul ignore next */ {
throw new Error(parser, 'Unknown state: ' + parser.state)
}
}
} // while

Expand Down Expand Up @@ -66646,6 +66706,7 @@ module.exports = {

const assert = __nccwpck_require__(9491)
const net = __nccwpck_require__(1808)
const http = __nccwpck_require__(3685)
const { pipeline } = __nccwpck_require__(2781)
const util = __nccwpck_require__(3983)
const timers = __nccwpck_require__(9459)
Expand Down Expand Up @@ -66733,6 +66794,7 @@ const {
HTTP2_HEADER_AUTHORITY,
HTTP2_HEADER_METHOD,
HTTP2_HEADER_PATH,
HTTP2_HEADER_SCHEME,
HTTP2_HEADER_CONTENT_LENGTH,
HTTP2_HEADER_EXPECT,
HTTP2_HEADER_STATUS
Expand Down Expand Up @@ -66909,7 +66971,7 @@ class Client extends DispatcherBase {
this[kConnector] = connect
this[kSocket] = null
this[kPipelining] = pipelining != null ? pipelining : 1
this[kMaxHeadersSize] = maxHeaderSize || 16384
this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize
this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout
this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout
this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold
Expand Down Expand Up @@ -68329,7 +68391,7 @@ function writeH2 (client, session, request) {
const h2State = client[kHTTP2SessionState]

headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost]
headers[HTTP2_HEADER_PATH] = path
headers[HTTP2_HEADER_METHOD] = method

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

return true
} else {
headers[HTTP2_HEADER_METHOD] = method
}

// https://tools.ietf.org/html/rfc7540#section-8.3
// :path and :scheme headers must be omited when sending CONNECT

headers[HTTP2_HEADER_PATH] = path
headers[HTTP2_HEADER_SCHEME] = 'https'

// https://tools.ietf.org/html/rfc7231#section-4.3.1
// https://tools.ietf.org/html/rfc7231#section-4.3.2
// https://tools.ietf.org/html/rfc7231#section-4.3.5
Expand Down Expand Up @@ -68496,6 +68562,7 @@ function writeH2 (client, session, request) {
stream.cork()
stream.write(body)
stream.uncork()
stream.end()
request.onBodySent(body)
request.onRequestSent()
} else if (util.isBlobLike(body)) {
Expand Down Expand Up @@ -68730,13 +68797,17 @@ async function writeIterable ({ h2stream, body, client, request, socket, content
throw socket[kError]
}

if (!h2stream.write(chunk)) {
const res = h2stream.write(chunk)
request.onBodySent(chunk)
if (!res) {
await waitForDrain()
}
}
} catch (err) {
h2stream.destroy(err)
} finally {
request.onRequestSent()
h2stream.end()
h2stream
.off('close', onDrain)
.off('drain', onDrain)
Expand Down Expand Up @@ -68949,11 +69020,13 @@ class CompatFinalizer {
}

register (dispatcher, key) {
dispatcher.on('disconnect', () => {
if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) {
this.finalizer(key)
}
})
if (dispatcher.on) {
dispatcher.on('disconnect', () => {
if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) {
this.finalizer(key)
}
})
}
}
}

Expand Down Expand Up @@ -70619,7 +70692,8 @@ function processHeader (request, key, val, skipAppend = false) {
key.toLowerCase() === 'content-type'
) {
request.contentType = val
request.headers += processHeaderValue(key, val)
if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend)
else request.headers += processHeaderValue(key, val)
} else if (
key.length === 17 &&
key.toLowerCase() === 'transfer-encoding'
Expand Down Expand Up @@ -75309,6 +75383,10 @@ async function httpRedirectFetch (fetchParams, response) {
if (!sameOrigin(requestCurrentURL(request), locationURL)) {
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
request.headersList.delete('authorization')

// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
request.headersList.delete('cookie')
request.headersList.delete('host')
}

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

// 15. If httpRequest’s cache mode is "default" and httpRequest’s header
Expand Down Expand Up @@ -75515,6 +75593,8 @@ async function httpNetworkOrCacheFetch (
}
}

httpRequest.headersList.delete('host')

// 20. If includeCredentials is true, then:
if (includeCredentials) {
// 1. If the user agent is not configured to block cookies for httpRequest
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit 8f5b0d3

Please sign in to comment.