build(release): 1.10.3 [skip ci]

## [1.10.3](https://github.com/actions/create-github-app-token/compare/v1.10.2...v1.10.3) (2024-07-01)

### Bug Fixes

* **deps:** bump undici from 6.18.2 to 6.19.2 in the production-dependencies group ([#149](https://github.com/actions/create-github-app-token/issues/149)) ([cc82279](https://github.com/actions/create-github-app-token/commit/cc82279e84540c5543078cedc5af4fcfab0a96bb)), closes [#3337](https://github.com/actions/create-github-app-token/issues/3337) [nodejs/undici#3338](https://github.com/nodejs/undici/issues/3338) [nodejs/undici#3340](https://github.com/nodejs/undici/issues/3340) [nodejs/undici#3332](https://github.com/nodejs/undici/issues/3332) [nodejs/undici#3335](https://github.com/nodejs/undici/issues/3335) [nodejs/undici#3305](https://github.com/nodejs/undici/issues/3305) [nodejs/undici#3303](https://github.com/nodejs/undici/issues/3303) [nodejs/undici#3304](https://github.com/nodejs/undici/issues/3304) [nodejs/undici#3306](https://github.com/nodejs/undici/issues/3306) [nodejs/undici#3309](https://github.com/nodejs/undici/issues/3309) [nodejs/undici#3313](https://github.com/nodejs/undici/issues/3313) [nodejs/undici#3311](https://github.com/nodejs/undici/issues/3311) [nodejs/undici#3107](https://github.com/nodejs/undici/issues/3107) [nodejs/undici#3302](https://github.com/nodejs/undici/issues/3302) [nodejs/undici#3320](https://github.com/nodejs/undici/issues/3320) [nodejs/undici#3321](https://github.com/nodejs/undici/issues/3321) [nodejs/undici#3316](https://github.com/nodejs/undici/issues/3316) [nodejs/undici#3318](https://github.com/nodejs/undici/issues/3318) [nodejs/undici#3326](https://github.com/nodejs/undici/issues/3326) [nodejs/undici#3324](https://github.com/nodejs/undici/issues/3324) [nodejs/undici#3325](https://github.com/nodejs/undici/issues/3325) [nodejs/undici#3316](https://github.com/nodejs/undici/issues/3316) [nodejs/undici#3318](https://github.com/nodejs/undici/issues/3318) [#3342](https://github.com/actions/create-github-app-token/issues/3342) [#3332](https://github.com/actions/create-github-app-token/issues/3332) [#3340](https://github.com/actions/create-github-app-token/issues/3340) [#3337](https://github.com/actions/create-github-app-token/issues/3337) [#3338](https://github.com/actions/create-github-app-token/issues/3338) [#3336](https://github.com/actions/create-github-app-token/issues/3336) [#3335](https://github.com/actions/create-github-app-token/issues/3335) [#3325](https://github.com/actions/create-github-app-token/issues/3325) [#3324](https://github.com/actions/create-github-app-token/issues/3324) [#3326](https://github.com/actions/create-github-app-token/issues/3326)
This commit is contained in:
semantic-release-bot
2024-07-01 13:15:08 +00:00
parent cc82279e84
commit 31c86eb3b3
3 changed files with 217 additions and 247 deletions
+108 -123
View File
@@ -20172,6 +20172,27 @@ var require_util8 = __commonJS({
} }
var kEnumerableProperty = /* @__PURE__ */ Object.create(null); var kEnumerableProperty = /* @__PURE__ */ Object.create(null);
kEnumerableProperty.enumerable = true; kEnumerableProperty.enumerable = true;
var normalizedMethodRecordsBase = {
delete: "DELETE",
DELETE: "DELETE",
get: "GET",
GET: "GET",
head: "HEAD",
HEAD: "HEAD",
options: "OPTIONS",
OPTIONS: "OPTIONS",
post: "POST",
POST: "POST",
put: "PUT",
PUT: "PUT"
};
var normalizedMethodRecords = {
...normalizedMethodRecordsBase,
patch: "patch",
PATCH: "PATCH"
};
Object.setPrototypeOf(normalizedMethodRecordsBase, null);
Object.setPrototypeOf(normalizedMethodRecords, null);
module2.exports = { module2.exports = {
kEnumerableProperty, kEnumerableProperty,
nop, nop,
@@ -20210,6 +20231,8 @@ var require_util8 = __commonJS({
isValidHeaderValue, isValidHeaderValue,
isTokenCharCode, isTokenCharCode,
parseRangeHeader, parseRangeHeader,
normalizedMethodRecordsBase,
normalizedMethodRecords,
isValidPort, isValidPort,
isHttpOrHttpsPrefixed, isHttpOrHttpsPrefixed,
nodeMajor, nodeMajor,
@@ -20425,7 +20448,8 @@ var require_request3 = __commonJS({
isBlobLike, isBlobLike,
buildURL, buildURL,
validateHandler, validateHandler,
getServerName getServerName,
normalizedMethodRecords
} = require_util8(); } = require_util8();
var { channels } = require_diagnostics(); var { channels } = require_diagnostics();
var { headerNameLowerCasedRecord } = require_constants6(); var { headerNameLowerCasedRecord } = require_constants6();
@@ -20452,12 +20476,12 @@ var require_request3 = __commonJS({
throw new InvalidArgumentError("path must be a string"); throw new InvalidArgumentError("path must be a string");
} else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") { } else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") {
throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
} else if (invalidPathRegex.exec(path) !== null) { } else if (invalidPathRegex.test(path)) {
throw new InvalidArgumentError("invalid request path"); throw new InvalidArgumentError("invalid request path");
} }
if (typeof method !== "string") { if (typeof method !== "string") {
throw new InvalidArgumentError("method must be a string"); throw new InvalidArgumentError("method must be a string");
} else if (!isValidHTTPToken(method)) { } else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) {
throw new InvalidArgumentError("invalid request method"); throw new InvalidArgumentError("invalid request method");
} }
if (upgrade && typeof upgrade !== "string") { if (upgrade && typeof upgrade !== "string") {
@@ -21002,7 +21026,7 @@ var require_connect2 = __commonJS({
} }
}; };
} }
function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {
if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {
throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero");
} }
@@ -21018,7 +21042,7 @@ var require_connect2 = __commonJS({
} }
servername = servername || options.servername || util.getServerName(host) || null; servername = servername || options.servername || util.getServerName(host) || null;
const sessionKey = servername || hostname; const sessionKey = servername || hostname;
const session = sessionCache.get(sessionKey) || null; const session = customSession || sessionCache.get(sessionKey) || null;
assert(sessionKey); assert(sessionKey);
socket = tls.connect({ socket = tls.connect({
highWaterMark: 16384, highWaterMark: 16384,
@@ -22536,7 +22560,7 @@ var require_util9 = __commonJS({
var { getGlobalOrigin } = require_global3(); var { getGlobalOrigin } = require_global3();
var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url();
var { performance: performance2 } = require("node:perf_hooks"); var { performance: performance2 } = require("node:perf_hooks");
var { isBlobLike, ReadableStreamFrom, isValidHTTPToken } = require_util8(); var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util8();
var assert = require("node:assert"); var assert = require("node:assert");
var { isUint8Array } = require("node:util/types"); var { isUint8Array } = require("node:util/types");
var { webidl } = require_webidl2(); var { webidl } = require_webidl2();
@@ -22643,7 +22667,7 @@ var require_util9 = __commonJS({
} }
function appendRequestOriginHeader(request2) { function appendRequestOriginHeader(request2) {
let serializedOrigin = request2.origin; let serializedOrigin = request2.origin;
if (serializedOrigin === "client") { if (serializedOrigin === "client" || serializedOrigin === void 0) {
return; return;
} }
if (request2.responseTainting === "cors" || request2.mode === "websocket") { if (request2.responseTainting === "cors" || request2.mode === "websocket") {
@@ -22924,29 +22948,8 @@ var require_util9 = __commonJS({
function isCancelled(fetchParams) { function isCancelled(fetchParams) {
return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated";
} }
var normalizeMethodRecordBase = {
delete: "DELETE",
DELETE: "DELETE",
get: "GET",
GET: "GET",
head: "HEAD",
HEAD: "HEAD",
options: "OPTIONS",
OPTIONS: "OPTIONS",
post: "POST",
POST: "POST",
put: "PUT",
PUT: "PUT"
};
var normalizeMethodRecord = {
...normalizeMethodRecordBase,
patch: "patch",
PATCH: "PATCH"
};
Object.setPrototypeOf(normalizeMethodRecordBase, null);
Object.setPrototypeOf(normalizeMethodRecord, null);
function normalizeMethod(method) { function normalizeMethod(method) {
return normalizeMethodRecordBase[method.toLowerCase()] ?? method; return normalizedMethodRecordsBase[method.toLowerCase()] ?? method;
} }
function serializeJavascriptValueToJSONString(value) { function serializeJavascriptValueToJSONString(value) {
const result = JSON.stringify(value); const result = JSON.stringify(value);
@@ -23083,7 +23086,7 @@ var require_util9 = __commonJS({
} }
}); });
} }
async function fullyReadBody(body, processBody, processBodyError, shouldClone) { async function fullyReadBody(body, processBody, processBodyError) {
const successSteps = processBody; const successSteps = processBody;
const errorSteps = processBodyError; const errorSteps = processBodyError;
let reader; let reader;
@@ -23094,7 +23097,7 @@ var require_util9 = __commonJS({
return; return;
} }
try { try {
successSteps(await readAllBytes(reader, shouldClone)); successSteps(await readAllBytes(reader));
} catch (e) { } catch (e) {
errorSteps(e); errorSteps(e);
} }
@@ -23117,19 +23120,12 @@ var require_util9 = __commonJS({
assert(!invalidIsomorphicEncodeValueRegex.test(input)); assert(!invalidIsomorphicEncodeValueRegex.test(input));
return input; return input;
} }
async function readAllBytes(reader, shouldClone) { async function readAllBytes(reader) {
const bytes = []; const bytes = [];
let byteLength = 0; let byteLength = 0;
while (true) { while (true) {
const { done, value: chunk } = await reader.read(); const { done, value: chunk } = await reader.read();
if (done) { if (done) {
if (bytes.length === 1) {
const { buffer, byteOffset, byteLength: byteLength2 } = bytes[0];
if (shouldClone === false) {
return Buffer.from(buffer, byteOffset, byteLength2);
}
return Buffer.from(buffer.slice(byteOffset, byteOffset + byteLength2), 0, byteLength2);
}
return Buffer.concat(bytes, byteLength); return Buffer.concat(bytes, byteLength);
} }
if (!isUint8Array(chunk)) { if (!isUint8Array(chunk)) {
@@ -23392,7 +23388,6 @@ var require_util9 = __commonJS({
urlHasHttpsScheme, urlHasHttpsScheme,
urlIsHttpHttpsScheme, urlIsHttpHttpsScheme,
readAllBytes, readAllBytes,
normalizeMethodRecord,
simpleRangeHeaderValue, simpleRangeHeaderValue,
buildContentRange, buildContentRange,
parseMetadata, parseMetadata,
@@ -24064,18 +24059,18 @@ Content-Type: ${value.type || "application/octet-stream"}\r
mimeType = serializeAMimeType(mimeType); mimeType = serializeAMimeType(mimeType);
} }
return new Blob2([bytes], { type: mimeType }); return new Blob2([bytes], { type: mimeType });
}, instance, false); }, instance);
}, },
arrayBuffer() { arrayBuffer() {
return consumeBody(this, (bytes) => { return consumeBody(this, (bytes) => {
return bytes.buffer; return new Uint8Array(bytes).buffer;
}, instance, true); }, instance);
}, },
text() { text() {
return consumeBody(this, utf8DecodeBytes, instance, false); return consumeBody(this, utf8DecodeBytes, instance);
}, },
json() { json() {
return consumeBody(this, parseJSONFromBytes, instance, false); return consumeBody(this, parseJSONFromBytes, instance);
}, },
formData() { formData() {
return consumeBody(this, (value) => { return consumeBody(this, (value) => {
@@ -24104,12 +24099,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r
throw new TypeError( throw new TypeError(
'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".'
); );
}, instance, false); }, instance);
}, },
bytes() { bytes() {
return consumeBody(this, (bytes) => { return consumeBody(this, (bytes) => {
return new Uint8Array(bytes.buffer, 0, bytes.byteLength); return new Uint8Array(bytes);
}, instance, true); }, instance);
} }
}; };
return methods; return methods;
@@ -24117,7 +24112,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
function mixinBody(prototype) { function mixinBody(prototype) {
Object.assign(prototype.prototype, bodyMixinMethods(prototype)); Object.assign(prototype.prototype, bodyMixinMethods(prototype));
} }
async function consumeBody(object, convertBytesToJSValue, instance, shouldClone) { async function consumeBody(object, convertBytesToJSValue, instance) {
webidl.brandCheck(object, instance); webidl.brandCheck(object, instance);
if (bodyUnusable(object[kState].body)) { if (bodyUnusable(object[kState].body)) {
throw new TypeError("Body is unusable: Body has already been read"); throw new TypeError("Body is unusable: Body has already been read");
@@ -24136,7 +24131,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
successSteps(Buffer.allocUnsafe(0)); successSteps(Buffer.allocUnsafe(0));
return promise.promise; return promise.promise;
} }
await fullyReadBody(object[kState].body, successSteps, errorSteps, shouldClone); await fullyReadBody(object[kState].body, successSteps, errorSteps);
return promise.promise; return promise.promise;
} }
function bodyUnusable(body) { function bodyUnusable(body) {
@@ -24889,25 +24884,25 @@ upgrade: ${upgrade}\r
channels.sendHeaders.publish({ request: request2, headers: header, socket }); channels.sendHeaders.publish({ request: request2, headers: header, socket });
} }
if (!body || bodyLength === 0) { if (!body || bodyLength === 0) {
writeBuffer({ abort, body: null, client, request: request2, socket, contentLength, header, expectsPayload }); writeBuffer(abort, null, client, request2, socket, contentLength, header, expectsPayload);
} else if (util.isBuffer(body)) { } else if (util.isBuffer(body)) {
writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload);
} else if (util.isBlobLike(body)) { } else if (util.isBlobLike(body)) {
if (typeof body.stream === "function") { if (typeof body.stream === "function") {
writeIterable({ abort, body: body.stream(), client, request: request2, socket, contentLength, header, expectsPayload }); writeIterable(abort, body.stream(), client, request2, socket, contentLength, header, expectsPayload);
} else { } else {
writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload);
} }
} else if (util.isStream(body)) { } else if (util.isStream(body)) {
writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload);
} else if (util.isIterable(body)) { } else if (util.isIterable(body)) {
writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload);
} else { } else {
assert(false); assert(false);
} }
return true; return true;
} }
function writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { function writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
let finished = false; let finished = false;
const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header }); const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header });
@@ -24976,7 +24971,7 @@ upgrade: ${upgrade}\r
setImmediate(onClose); setImmediate(onClose);
} }
} }
function writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { function writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
try { try {
if (!body) { if (!body) {
if (contentLength === 0) { if (contentLength === 0) {
@@ -25007,7 +25002,7 @@ upgrade: ${upgrade}\r
abort(err); abort(err);
} }
} }
async function writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { async function writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
assert(contentLength === body.size, "blob body must have content length"); assert(contentLength === body.size, "blob body must have content length");
try { try {
if (contentLength != null && contentLength !== body.size) { if (contentLength != null && contentLength !== body.size) {
@@ -25030,7 +25025,7 @@ upgrade: ${upgrade}\r
abort(err); abort(err);
} }
} }
async function writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { async function writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
let callback = null; let callback = null;
function onDrain() { function onDrain() {
@@ -25493,81 +25488,79 @@ var require_client_h2 = __commonJS({
return true; return true;
function writeBodyH2() { function writeBodyH2() {
if (!body || contentLength === 0) { if (!body || contentLength === 0) {
writeBuffer({ writeBuffer(
abort, abort,
stream,
null,
client, client,
request: request2, request2,
client[kSocket],
contentLength, contentLength,
expectsPayload, expectsPayload
h2stream: stream, );
body: null,
socket: client[kSocket]
});
} else if (util.isBuffer(body)) { } else if (util.isBuffer(body)) {
writeBuffer({ writeBuffer(
abort, abort,
client, stream,
request: request2,
contentLength,
body, body,
expectsPayload, client,
h2stream: stream, request2,
socket: client[kSocket] client[kSocket],
}); contentLength,
expectsPayload
);
} else if (util.isBlobLike(body)) { } else if (util.isBlobLike(body)) {
if (typeof body.stream === "function") { if (typeof body.stream === "function") {
writeIterable({ writeIterable(
abort, abort,
stream,
body.stream(),
client, client,
request: request2, request2,
client[kSocket],
contentLength, contentLength,
expectsPayload, expectsPayload
h2stream: stream, );
body: body.stream(),
socket: client[kSocket]
});
} else { } else {
writeBlob({ writeBlob(
abort, abort,
stream,
body, body,
client, client,
request: request2, request2,
client[kSocket],
contentLength, contentLength,
expectsPayload, expectsPayload
h2stream: stream, );
socket: client[kSocket]
});
} }
} else if (util.isStream(body)) { } else if (util.isStream(body)) {
writeStream({ writeStream(
abort, abort,
client[kSocket],
expectsPayload,
stream,
body, body,
client, client,
request: request2, request2,
contentLength, contentLength
expectsPayload, );
socket: client[kSocket],
h2stream: stream,
header: ""
});
} else if (util.isIterable(body)) { } else if (util.isIterable(body)) {
writeIterable({ writeIterable(
abort, abort,
stream,
body, body,
client, client,
request: request2, request2,
client[kSocket],
contentLength, contentLength,
expectsPayload, expectsPayload
header: "", );
h2stream: stream,
socket: client[kSocket]
});
} else { } else {
assert(false); assert(false);
} }
} }
} }
function writeBuffer({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { function writeBuffer(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
try { try {
if (body != null && util.isBuffer(body)) { if (body != null && util.isBuffer(body)) {
assert(contentLength === body.byteLength, "buffer body must have content length"); assert(contentLength === body.byteLength, "buffer body must have content length");
@@ -25586,7 +25579,7 @@ var require_client_h2 = __commonJS({
abort(error); abort(error);
} }
} }
function writeStream({ abort, socket, expectsPayload, h2stream, body, client, request: request2, contentLength }) { function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) {
assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
const pipe = pipeline( const pipe = pipeline(
body, body,
@@ -25610,7 +25603,7 @@ var require_client_h2 = __commonJS({
request2.onBodySent(chunk); request2.onBodySent(chunk);
} }
} }
async function writeBlob({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { async function writeBlob(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
assert(contentLength === body.size, "blob body must have content length"); assert(contentLength === body.size, "blob body must have content length");
try { try {
if (contentLength != null && contentLength !== body.size) { if (contentLength != null && contentLength !== body.size) {
@@ -25631,7 +25624,7 @@ var require_client_h2 = __commonJS({
abort(err); abort(err);
} }
} }
async function writeIterable({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { async function writeIterable(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
let callback = null; let callback = null;
function onDrain() { function onDrain() {
@@ -27376,7 +27369,7 @@ var require_retry_handler = __commonJS({
this.abort( this.abort(
new RequestRetryError("Content-Range mismatch", statusCode, { new RequestRetryError("Content-Range mismatch", statusCode, {
headers, headers,
count: this.retryCount data: { count: this.retryCount }
}) })
); );
return false; return false;
@@ -27385,7 +27378,7 @@ var require_retry_handler = __commonJS({
this.abort( this.abort(
new RequestRetryError("ETag mismatch", statusCode, { new RequestRetryError("ETag mismatch", statusCode, {
headers, headers,
count: this.retryCount data: { count: this.retryCount }
}) })
); );
return false; return false;
@@ -30609,9 +30602,7 @@ var require_request4 = __commonJS({
var { var {
isValidHTTPToken, isValidHTTPToken,
sameOrigin, sameOrigin,
normalizeMethod, environmentSettingsObject
environmentSettingsObject,
normalizeMethodRecord
} = require_util9(); } = require_util9();
var { var {
forbiddenMethodsSet, forbiddenMethodsSet,
@@ -30623,7 +30614,7 @@ var require_request4 = __commonJS({
requestCache, requestCache,
requestDuplex requestDuplex
} = require_constants8(); } = require_constants8();
var { kEnumerableProperty } = util; var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util;
var { kHeaders, kSignal, kState, kDispatcher } = require_symbols7(); var { kHeaders, kSignal, kState, kDispatcher } = require_symbols7();
var { webidl } = require_webidl2(); var { webidl } = require_webidl2();
var { URLSerializer } = require_data_url(); var { URLSerializer } = require_data_url();
@@ -30820,17 +30811,18 @@ var require_request4 = __commonJS({
} }
if (init.method !== void 0) { if (init.method !== void 0) {
let method = init.method; let method = init.method;
const mayBeNormalized = normalizeMethodRecord[method]; const mayBeNormalized = normalizedMethodRecords[method];
if (mayBeNormalized !== void 0) { if (mayBeNormalized !== void 0) {
request2.method = mayBeNormalized; request2.method = mayBeNormalized;
} else { } else {
if (!isValidHTTPToken(method)) { if (!isValidHTTPToken(method)) {
throw new TypeError(`'${method}' is not a valid HTTP method.`); throw new TypeError(`'${method}' is not a valid HTTP method.`);
} }
if (forbiddenMethodsSet.has(method.toUpperCase())) { const upperCase = method.toUpperCase();
if (forbiddenMethodsSet.has(upperCase)) {
throw new TypeError(`'${method}' HTTP method is unsupported.`); throw new TypeError(`'${method}' HTTP method is unsupported.`);
} }
method = normalizeMethod(method); method = normalizedMethodRecordsBase[upperCase] ?? method;
request2.method = method; request2.method = method;
} }
if (!patchMethodWarning && request2.method === "patch") { if (!patchMethodWarning && request2.method === "patch") {
@@ -35546,7 +35538,6 @@ var require_websocket2 = __commonJS({
var { types } = require("node:util"); var { types } = require("node:util");
var { ErrorEvent, CloseEvent } = require_events2(); var { ErrorEvent, CloseEvent } = require_events2();
var { SendQueue } = require_sender(); var { SendQueue } = require_sender();
var experimentalWarned = false;
var WebSocket = class _WebSocket extends EventTarget { var WebSocket = class _WebSocket extends EventTarget {
#events = { #events = {
open: null, open: null,
@@ -35567,12 +35558,6 @@ var require_websocket2 = __commonJS({
super(); super();
const prefix = "WebSocket constructor"; const prefix = "WebSocket constructor";
webidl.argumentLengthCheck(arguments, 1, prefix); webidl.argumentLengthCheck(arguments, 1, prefix);
if (!experimentalWarned) {
experimentalWarned = true;
process.emitWarning("WebSockets are experimental, expect them to change at any time.", {
code: "UNDICI-WS"
});
}
const options = webidl.converters["DOMString or sequence<DOMString> or WebSocketInit"](protocols, prefix, "options"); const options = webidl.converters["DOMString or sequence<DOMString> or WebSocketInit"](protocols, prefix, "options");
url = webidl.converters.USVString(url, prefix, "url"); url = webidl.converters.USVString(url, prefix, "url");
protocols = options.protocols; protocols = options.protocols;
+108 -123
View File
@@ -19943,6 +19943,27 @@ var require_util8 = __commonJS({
} }
var kEnumerableProperty = /* @__PURE__ */ Object.create(null); var kEnumerableProperty = /* @__PURE__ */ Object.create(null);
kEnumerableProperty.enumerable = true; kEnumerableProperty.enumerable = true;
var normalizedMethodRecordsBase = {
delete: "DELETE",
DELETE: "DELETE",
get: "GET",
GET: "GET",
head: "HEAD",
HEAD: "HEAD",
options: "OPTIONS",
OPTIONS: "OPTIONS",
post: "POST",
POST: "POST",
put: "PUT",
PUT: "PUT"
};
var normalizedMethodRecords = {
...normalizedMethodRecordsBase,
patch: "patch",
PATCH: "PATCH"
};
Object.setPrototypeOf(normalizedMethodRecordsBase, null);
Object.setPrototypeOf(normalizedMethodRecords, null);
module2.exports = { module2.exports = {
kEnumerableProperty, kEnumerableProperty,
nop, nop,
@@ -19981,6 +20002,8 @@ var require_util8 = __commonJS({
isValidHeaderValue, isValidHeaderValue,
isTokenCharCode, isTokenCharCode,
parseRangeHeader, parseRangeHeader,
normalizedMethodRecordsBase,
normalizedMethodRecords,
isValidPort, isValidPort,
isHttpOrHttpsPrefixed, isHttpOrHttpsPrefixed,
nodeMajor, nodeMajor,
@@ -20196,7 +20219,8 @@ var require_request3 = __commonJS({
isBlobLike, isBlobLike,
buildURL, buildURL,
validateHandler, validateHandler,
getServerName getServerName,
normalizedMethodRecords
} = require_util8(); } = require_util8();
var { channels } = require_diagnostics(); var { channels } = require_diagnostics();
var { headerNameLowerCasedRecord } = require_constants6(); var { headerNameLowerCasedRecord } = require_constants6();
@@ -20223,12 +20247,12 @@ var require_request3 = __commonJS({
throw new InvalidArgumentError("path must be a string"); throw new InvalidArgumentError("path must be a string");
} else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") { } else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") {
throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
} else if (invalidPathRegex.exec(path) !== null) { } else if (invalidPathRegex.test(path)) {
throw new InvalidArgumentError("invalid request path"); throw new InvalidArgumentError("invalid request path");
} }
if (typeof method !== "string") { if (typeof method !== "string") {
throw new InvalidArgumentError("method must be a string"); throw new InvalidArgumentError("method must be a string");
} else if (!isValidHTTPToken(method)) { } else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) {
throw new InvalidArgumentError("invalid request method"); throw new InvalidArgumentError("invalid request method");
} }
if (upgrade && typeof upgrade !== "string") { if (upgrade && typeof upgrade !== "string") {
@@ -20773,7 +20797,7 @@ var require_connect2 = __commonJS({
} }
}; };
} }
function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {
if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {
throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero");
} }
@@ -20789,7 +20813,7 @@ var require_connect2 = __commonJS({
} }
servername = servername || options.servername || util.getServerName(host) || null; servername = servername || options.servername || util.getServerName(host) || null;
const sessionKey = servername || hostname; const sessionKey = servername || hostname;
const session = sessionCache.get(sessionKey) || null; const session = customSession || sessionCache.get(sessionKey) || null;
assert(sessionKey); assert(sessionKey);
socket = tls.connect({ socket = tls.connect({
highWaterMark: 16384, highWaterMark: 16384,
@@ -22307,7 +22331,7 @@ var require_util9 = __commonJS({
var { getGlobalOrigin } = require_global3(); var { getGlobalOrigin } = require_global3();
var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url();
var { performance: performance2 } = require("node:perf_hooks"); var { performance: performance2 } = require("node:perf_hooks");
var { isBlobLike, ReadableStreamFrom, isValidHTTPToken } = require_util8(); var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util8();
var assert = require("node:assert"); var assert = require("node:assert");
var { isUint8Array } = require("node:util/types"); var { isUint8Array } = require("node:util/types");
var { webidl } = require_webidl2(); var { webidl } = require_webidl2();
@@ -22414,7 +22438,7 @@ var require_util9 = __commonJS({
} }
function appendRequestOriginHeader(request2) { function appendRequestOriginHeader(request2) {
let serializedOrigin = request2.origin; let serializedOrigin = request2.origin;
if (serializedOrigin === "client") { if (serializedOrigin === "client" || serializedOrigin === void 0) {
return; return;
} }
if (request2.responseTainting === "cors" || request2.mode === "websocket") { if (request2.responseTainting === "cors" || request2.mode === "websocket") {
@@ -22695,29 +22719,8 @@ var require_util9 = __commonJS({
function isCancelled(fetchParams) { function isCancelled(fetchParams) {
return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated";
} }
var normalizeMethodRecordBase = {
delete: "DELETE",
DELETE: "DELETE",
get: "GET",
GET: "GET",
head: "HEAD",
HEAD: "HEAD",
options: "OPTIONS",
OPTIONS: "OPTIONS",
post: "POST",
POST: "POST",
put: "PUT",
PUT: "PUT"
};
var normalizeMethodRecord = {
...normalizeMethodRecordBase,
patch: "patch",
PATCH: "PATCH"
};
Object.setPrototypeOf(normalizeMethodRecordBase, null);
Object.setPrototypeOf(normalizeMethodRecord, null);
function normalizeMethod(method) { function normalizeMethod(method) {
return normalizeMethodRecordBase[method.toLowerCase()] ?? method; return normalizedMethodRecordsBase[method.toLowerCase()] ?? method;
} }
function serializeJavascriptValueToJSONString(value) { function serializeJavascriptValueToJSONString(value) {
const result = JSON.stringify(value); const result = JSON.stringify(value);
@@ -22854,7 +22857,7 @@ var require_util9 = __commonJS({
} }
}); });
} }
async function fullyReadBody(body, processBody, processBodyError, shouldClone) { async function fullyReadBody(body, processBody, processBodyError) {
const successSteps = processBody; const successSteps = processBody;
const errorSteps = processBodyError; const errorSteps = processBodyError;
let reader; let reader;
@@ -22865,7 +22868,7 @@ var require_util9 = __commonJS({
return; return;
} }
try { try {
successSteps(await readAllBytes(reader, shouldClone)); successSteps(await readAllBytes(reader));
} catch (e) { } catch (e) {
errorSteps(e); errorSteps(e);
} }
@@ -22888,19 +22891,12 @@ var require_util9 = __commonJS({
assert(!invalidIsomorphicEncodeValueRegex.test(input)); assert(!invalidIsomorphicEncodeValueRegex.test(input));
return input; return input;
} }
async function readAllBytes(reader, shouldClone) { async function readAllBytes(reader) {
const bytes = []; const bytes = [];
let byteLength = 0; let byteLength = 0;
while (true) { while (true) {
const { done, value: chunk } = await reader.read(); const { done, value: chunk } = await reader.read();
if (done) { if (done) {
if (bytes.length === 1) {
const { buffer, byteOffset, byteLength: byteLength2 } = bytes[0];
if (shouldClone === false) {
return Buffer.from(buffer, byteOffset, byteLength2);
}
return Buffer.from(buffer.slice(byteOffset, byteOffset + byteLength2), 0, byteLength2);
}
return Buffer.concat(bytes, byteLength); return Buffer.concat(bytes, byteLength);
} }
if (!isUint8Array(chunk)) { if (!isUint8Array(chunk)) {
@@ -23163,7 +23159,6 @@ var require_util9 = __commonJS({
urlHasHttpsScheme, urlHasHttpsScheme,
urlIsHttpHttpsScheme, urlIsHttpHttpsScheme,
readAllBytes, readAllBytes,
normalizeMethodRecord,
simpleRangeHeaderValue, simpleRangeHeaderValue,
buildContentRange, buildContentRange,
parseMetadata, parseMetadata,
@@ -23835,18 +23830,18 @@ Content-Type: ${value.type || "application/octet-stream"}\r
mimeType = serializeAMimeType(mimeType); mimeType = serializeAMimeType(mimeType);
} }
return new Blob2([bytes], { type: mimeType }); return new Blob2([bytes], { type: mimeType });
}, instance, false); }, instance);
}, },
arrayBuffer() { arrayBuffer() {
return consumeBody(this, (bytes) => { return consumeBody(this, (bytes) => {
return bytes.buffer; return new Uint8Array(bytes).buffer;
}, instance, true); }, instance);
}, },
text() { text() {
return consumeBody(this, utf8DecodeBytes, instance, false); return consumeBody(this, utf8DecodeBytes, instance);
}, },
json() { json() {
return consumeBody(this, parseJSONFromBytes, instance, false); return consumeBody(this, parseJSONFromBytes, instance);
}, },
formData() { formData() {
return consumeBody(this, (value) => { return consumeBody(this, (value) => {
@@ -23875,12 +23870,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r
throw new TypeError( throw new TypeError(
'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".'
); );
}, instance, false); }, instance);
}, },
bytes() { bytes() {
return consumeBody(this, (bytes) => { return consumeBody(this, (bytes) => {
return new Uint8Array(bytes.buffer, 0, bytes.byteLength); return new Uint8Array(bytes);
}, instance, true); }, instance);
} }
}; };
return methods; return methods;
@@ -23888,7 +23883,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
function mixinBody(prototype) { function mixinBody(prototype) {
Object.assign(prototype.prototype, bodyMixinMethods(prototype)); Object.assign(prototype.prototype, bodyMixinMethods(prototype));
} }
async function consumeBody(object, convertBytesToJSValue, instance, shouldClone) { async function consumeBody(object, convertBytesToJSValue, instance) {
webidl.brandCheck(object, instance); webidl.brandCheck(object, instance);
if (bodyUnusable(object[kState].body)) { if (bodyUnusable(object[kState].body)) {
throw new TypeError("Body is unusable: Body has already been read"); throw new TypeError("Body is unusable: Body has already been read");
@@ -23907,7 +23902,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
successSteps(Buffer.allocUnsafe(0)); successSteps(Buffer.allocUnsafe(0));
return promise.promise; return promise.promise;
} }
await fullyReadBody(object[kState].body, successSteps, errorSteps, shouldClone); await fullyReadBody(object[kState].body, successSteps, errorSteps);
return promise.promise; return promise.promise;
} }
function bodyUnusable(body) { function bodyUnusable(body) {
@@ -24660,25 +24655,25 @@ upgrade: ${upgrade}\r
channels.sendHeaders.publish({ request: request2, headers: header, socket }); channels.sendHeaders.publish({ request: request2, headers: header, socket });
} }
if (!body || bodyLength === 0) { if (!body || bodyLength === 0) {
writeBuffer({ abort, body: null, client, request: request2, socket, contentLength, header, expectsPayload }); writeBuffer(abort, null, client, request2, socket, contentLength, header, expectsPayload);
} else if (util.isBuffer(body)) { } else if (util.isBuffer(body)) {
writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload);
} else if (util.isBlobLike(body)) { } else if (util.isBlobLike(body)) {
if (typeof body.stream === "function") { if (typeof body.stream === "function") {
writeIterable({ abort, body: body.stream(), client, request: request2, socket, contentLength, header, expectsPayload }); writeIterable(abort, body.stream(), client, request2, socket, contentLength, header, expectsPayload);
} else { } else {
writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload);
} }
} else if (util.isStream(body)) { } else if (util.isStream(body)) {
writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload);
} else if (util.isIterable(body)) { } else if (util.isIterable(body)) {
writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }); writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload);
} else { } else {
assert(false); assert(false);
} }
return true; return true;
} }
function writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { function writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
let finished = false; let finished = false;
const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header }); const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header });
@@ -24747,7 +24742,7 @@ upgrade: ${upgrade}\r
setImmediate(onClose); setImmediate(onClose);
} }
} }
function writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { function writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
try { try {
if (!body) { if (!body) {
if (contentLength === 0) { if (contentLength === 0) {
@@ -24778,7 +24773,7 @@ upgrade: ${upgrade}\r
abort(err); abort(err);
} }
} }
async function writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { async function writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
assert(contentLength === body.size, "blob body must have content length"); assert(contentLength === body.size, "blob body must have content length");
try { try {
if (contentLength != null && contentLength !== body.size) { if (contentLength != null && contentLength !== body.size) {
@@ -24801,7 +24796,7 @@ upgrade: ${upgrade}\r
abort(err); abort(err);
} }
} }
async function writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) { async function writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
let callback = null; let callback = null;
function onDrain() { function onDrain() {
@@ -25264,81 +25259,79 @@ var require_client_h2 = __commonJS({
return true; return true;
function writeBodyH2() { function writeBodyH2() {
if (!body || contentLength === 0) { if (!body || contentLength === 0) {
writeBuffer({ writeBuffer(
abort, abort,
stream,
null,
client, client,
request: request2, request2,
client[kSocket],
contentLength, contentLength,
expectsPayload, expectsPayload
h2stream: stream, );
body: null,
socket: client[kSocket]
});
} else if (util.isBuffer(body)) { } else if (util.isBuffer(body)) {
writeBuffer({ writeBuffer(
abort, abort,
client, stream,
request: request2,
contentLength,
body, body,
expectsPayload, client,
h2stream: stream, request2,
socket: client[kSocket] client[kSocket],
}); contentLength,
expectsPayload
);
} else if (util.isBlobLike(body)) { } else if (util.isBlobLike(body)) {
if (typeof body.stream === "function") { if (typeof body.stream === "function") {
writeIterable({ writeIterable(
abort, abort,
stream,
body.stream(),
client, client,
request: request2, request2,
client[kSocket],
contentLength, contentLength,
expectsPayload, expectsPayload
h2stream: stream, );
body: body.stream(),
socket: client[kSocket]
});
} else { } else {
writeBlob({ writeBlob(
abort, abort,
stream,
body, body,
client, client,
request: request2, request2,
client[kSocket],
contentLength, contentLength,
expectsPayload, expectsPayload
h2stream: stream, );
socket: client[kSocket]
});
} }
} else if (util.isStream(body)) { } else if (util.isStream(body)) {
writeStream({ writeStream(
abort, abort,
client[kSocket],
expectsPayload,
stream,
body, body,
client, client,
request: request2, request2,
contentLength, contentLength
expectsPayload, );
socket: client[kSocket],
h2stream: stream,
header: ""
});
} else if (util.isIterable(body)) { } else if (util.isIterable(body)) {
writeIterable({ writeIterable(
abort, abort,
stream,
body, body,
client, client,
request: request2, request2,
client[kSocket],
contentLength, contentLength,
expectsPayload, expectsPayload
header: "", );
h2stream: stream,
socket: client[kSocket]
});
} else { } else {
assert(false); assert(false);
} }
} }
} }
function writeBuffer({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { function writeBuffer(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
try { try {
if (body != null && util.isBuffer(body)) { if (body != null && util.isBuffer(body)) {
assert(contentLength === body.byteLength, "buffer body must have content length"); assert(contentLength === body.byteLength, "buffer body must have content length");
@@ -25357,7 +25350,7 @@ var require_client_h2 = __commonJS({
abort(error); abort(error);
} }
} }
function writeStream({ abort, socket, expectsPayload, h2stream, body, client, request: request2, contentLength }) { function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) {
assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
const pipe = pipeline( const pipe = pipeline(
body, body,
@@ -25381,7 +25374,7 @@ var require_client_h2 = __commonJS({
request2.onBodySent(chunk); request2.onBodySent(chunk);
} }
} }
async function writeBlob({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { async function writeBlob(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
assert(contentLength === body.size, "blob body must have content length"); assert(contentLength === body.size, "blob body must have content length");
try { try {
if (contentLength != null && contentLength !== body.size) { if (contentLength != null && contentLength !== body.size) {
@@ -25402,7 +25395,7 @@ var require_client_h2 = __commonJS({
abort(err); abort(err);
} }
} }
async function writeIterable({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) { async function writeIterable(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
let callback = null; let callback = null;
function onDrain() { function onDrain() {
@@ -27147,7 +27140,7 @@ var require_retry_handler = __commonJS({
this.abort( this.abort(
new RequestRetryError("Content-Range mismatch", statusCode, { new RequestRetryError("Content-Range mismatch", statusCode, {
headers, headers,
count: this.retryCount data: { count: this.retryCount }
}) })
); );
return false; return false;
@@ -27156,7 +27149,7 @@ var require_retry_handler = __commonJS({
this.abort( this.abort(
new RequestRetryError("ETag mismatch", statusCode, { new RequestRetryError("ETag mismatch", statusCode, {
headers, headers,
count: this.retryCount data: { count: this.retryCount }
}) })
); );
return false; return false;
@@ -30380,9 +30373,7 @@ var require_request4 = __commonJS({
var { var {
isValidHTTPToken, isValidHTTPToken,
sameOrigin, sameOrigin,
normalizeMethod, environmentSettingsObject
environmentSettingsObject,
normalizeMethodRecord
} = require_util9(); } = require_util9();
var { var {
forbiddenMethodsSet, forbiddenMethodsSet,
@@ -30394,7 +30385,7 @@ var require_request4 = __commonJS({
requestCache, requestCache,
requestDuplex requestDuplex
} = require_constants8(); } = require_constants8();
var { kEnumerableProperty } = util; var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util;
var { kHeaders, kSignal, kState, kDispatcher } = require_symbols7(); var { kHeaders, kSignal, kState, kDispatcher } = require_symbols7();
var { webidl } = require_webidl2(); var { webidl } = require_webidl2();
var { URLSerializer } = require_data_url(); var { URLSerializer } = require_data_url();
@@ -30591,17 +30582,18 @@ var require_request4 = __commonJS({
} }
if (init.method !== void 0) { if (init.method !== void 0) {
let method = init.method; let method = init.method;
const mayBeNormalized = normalizeMethodRecord[method]; const mayBeNormalized = normalizedMethodRecords[method];
if (mayBeNormalized !== void 0) { if (mayBeNormalized !== void 0) {
request2.method = mayBeNormalized; request2.method = mayBeNormalized;
} else { } else {
if (!isValidHTTPToken(method)) { if (!isValidHTTPToken(method)) {
throw new TypeError(`'${method}' is not a valid HTTP method.`); throw new TypeError(`'${method}' is not a valid HTTP method.`);
} }
if (forbiddenMethodsSet.has(method.toUpperCase())) { const upperCase = method.toUpperCase();
if (forbiddenMethodsSet.has(upperCase)) {
throw new TypeError(`'${method}' HTTP method is unsupported.`); throw new TypeError(`'${method}' HTTP method is unsupported.`);
} }
method = normalizeMethod(method); method = normalizedMethodRecordsBase[upperCase] ?? method;
request2.method = method; request2.method = method;
} }
if (!patchMethodWarning && request2.method === "patch") { if (!patchMethodWarning && request2.method === "patch") {
@@ -35317,7 +35309,6 @@ var require_websocket2 = __commonJS({
var { types } = require("node:util"); var { types } = require("node:util");
var { ErrorEvent, CloseEvent } = require_events2(); var { ErrorEvent, CloseEvent } = require_events2();
var { SendQueue } = require_sender(); var { SendQueue } = require_sender();
var experimentalWarned = false;
var WebSocket = class _WebSocket extends EventTarget { var WebSocket = class _WebSocket extends EventTarget {
#events = { #events = {
open: null, open: null,
@@ -35338,12 +35329,6 @@ var require_websocket2 = __commonJS({
super(); super();
const prefix = "WebSocket constructor"; const prefix = "WebSocket constructor";
webidl.argumentLengthCheck(arguments, 1, prefix); webidl.argumentLengthCheck(arguments, 1, prefix);
if (!experimentalWarned) {
experimentalWarned = true;
process.emitWarning("WebSockets are experimental, expect them to change at any time.", {
code: "UNDICI-WS"
});
}
const options = webidl.converters["DOMString or sequence<DOMString> or WebSocketInit"](protocols, prefix, "options"); const options = webidl.converters["DOMString or sequence<DOMString> or WebSocketInit"](protocols, prefix, "options");
url = webidl.converters.USVString(url, prefix, "url"); url = webidl.converters.USVString(url, prefix, "url");
protocols = options.protocols; protocols = options.protocols;
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "create-github-app-token", "name": "create-github-app-token",
"private": true, "private": true,
"type": "module", "type": "module",
"version": "1.10.2", "version": "1.10.3",
"description": "GitHub Action for creating a GitHub App Installation Access Token", "description": "GitHub Action for creating a GitHub App Installation Access Token",
"scripts": { "scripts": {
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0", "build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0",