mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Rebuild dist
This commit is contained in:
parent
ebe4a9b005
commit
b0baeedf4a
1 changed files with 402 additions and 100 deletions
500
dist/index.js
generated
vendored
500
dist/index.js
generated
vendored
|
|
@ -4567,6 +4567,7 @@ class Context {
|
|||
this.action = process.env.GITHUB_ACTION;
|
||||
this.actor = process.env.GITHUB_ACTOR;
|
||||
this.job = process.env.GITHUB_JOB;
|
||||
this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
|
||||
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
|
||||
this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
|
||||
this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
|
||||
|
|
@ -7152,11 +7153,11 @@ var __copyProps = (to, from, except, desc) => {
|
|||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// pkg/dist-src/index.js
|
||||
var dist_src_exports = {};
|
||||
__export(dist_src_exports, {
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
Octokit: () => Octokit
|
||||
});
|
||||
module.exports = __toCommonJS(dist_src_exports);
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
var import_universal_user_agent = __nccwpck_require__(3843);
|
||||
var import_before_after_hook = __nccwpck_require__(2732);
|
||||
var import_request = __nccwpck_require__(8636);
|
||||
|
|
@ -7164,7 +7165,7 @@ var import_graphql = __nccwpck_require__(7);
|
|||
var import_auth_token = __nccwpck_require__(7864);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "5.0.2";
|
||||
var VERSION = "5.2.1";
|
||||
|
||||
// pkg/dist-src/index.js
|
||||
var noop = () => {
|
||||
|
|
@ -7331,7 +7332,7 @@ module.exports = __toCommonJS(dist_src_exports);
|
|||
var import_universal_user_agent = __nccwpck_require__(3843);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "9.0.4";
|
||||
var VERSION = "9.0.6";
|
||||
|
||||
// pkg/dist-src/defaults.js
|
||||
var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
|
||||
|
|
@ -7436,9 +7437,9 @@ function addQueryParameters(url, parameters) {
|
|||
}
|
||||
|
||||
// pkg/dist-src/util/extract-url-variable-names.js
|
||||
var urlVariableRegex = /\{[^}]+\}/g;
|
||||
var urlVariableRegex = /\{[^{}}]+\}/g;
|
||||
function removeNonChars(variableName) {
|
||||
return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
|
||||
return variableName.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
|
||||
}
|
||||
function extractUrlVariableNames(url) {
|
||||
const matches = url.match(urlVariableRegex);
|
||||
|
|
@ -7624,7 +7625,7 @@ function parse(options) {
|
|||
}
|
||||
if (url.endsWith("/graphql")) {
|
||||
if (options.mediaType.previews?.length) {
|
||||
const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
|
||||
const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || [];
|
||||
headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
|
||||
const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
|
||||
return `application/vnd.github.${preview}-preview${format}`;
|
||||
|
|
@ -7705,18 +7706,18 @@ var __copyProps = (to, from, except, desc) => {
|
|||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// pkg/dist-src/index.js
|
||||
var dist_src_exports = {};
|
||||
__export(dist_src_exports, {
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
GraphqlResponseError: () => GraphqlResponseError,
|
||||
graphql: () => graphql2,
|
||||
withCustomRequest: () => withCustomRequest
|
||||
});
|
||||
module.exports = __toCommonJS(dist_src_exports);
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
var import_request3 = __nccwpck_require__(8636);
|
||||
var import_universal_user_agent = __nccwpck_require__(3843);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "7.0.2";
|
||||
var VERSION = "7.1.1";
|
||||
|
||||
// pkg/dist-src/with-defaults.js
|
||||
var import_request2 = __nccwpck_require__(8636);
|
||||
|
|
@ -7764,8 +7765,7 @@ function graphql(request2, query, options) {
|
|||
);
|
||||
}
|
||||
for (const key in options) {
|
||||
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))
|
||||
continue;
|
||||
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
|
||||
return Promise.reject(
|
||||
new Error(
|
||||
`[@octokit/graphql] "${key}" cannot be used as variable name`
|
||||
|
|
@ -7873,7 +7873,7 @@ __export(dist_src_exports, {
|
|||
module.exports = __toCommonJS(dist_src_exports);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "9.1.5";
|
||||
var VERSION = "9.2.2";
|
||||
|
||||
// pkg/dist-src/normalize-paginated-list-response.js
|
||||
function normalizePaginatedListResponse(response) {
|
||||
|
|
@ -7921,7 +7921,7 @@ function iterator(octokit, route, parameters) {
|
|||
const response = await requestMethod({ method, url, headers });
|
||||
const normalizedResponse = normalizePaginatedListResponse(response);
|
||||
url = ((normalizedResponse.headers.link || "").match(
|
||||
/<([^>]+)>;\s*rel="next"/
|
||||
/<([^<>]+)>;\s*rel="next"/
|
||||
) || [])[1];
|
||||
return { value: normalizedResponse };
|
||||
} catch (error) {
|
||||
|
|
@ -8034,6 +8034,8 @@ var paginatingEndpoints = [
|
|||
"GET /orgs/{org}/members/{username}/codespaces",
|
||||
"GET /orgs/{org}/migrations",
|
||||
"GET /orgs/{org}/migrations/{migration_id}/repositories",
|
||||
"GET /orgs/{org}/organization-roles/{role_id}/teams",
|
||||
"GET /orgs/{org}/organization-roles/{role_id}/users",
|
||||
"GET /orgs/{org}/outside_collaborators",
|
||||
"GET /orgs/{org}/packages",
|
||||
"GET /orgs/{org}/packages/{package_type}/{package_name}/versions",
|
||||
|
|
@ -8270,7 +8272,7 @@ __export(dist_src_exports, {
|
|||
module.exports = __toCommonJS(dist_src_exports);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "10.2.0";
|
||||
var VERSION = "10.4.1";
|
||||
|
||||
// pkg/dist-src/generated/endpoints.js
|
||||
var Endpoints = {
|
||||
|
|
@ -8397,6 +8399,9 @@ var Endpoints = {
|
|||
"GET /repos/{owner}/{repo}/actions/permissions/selected-actions"
|
||||
],
|
||||
getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
|
||||
getCustomOidcSubClaimForRepo: [
|
||||
"GET /repos/{owner}/{repo}/actions/oidc/customization/sub"
|
||||
],
|
||||
getEnvironmentPublicKey: [
|
||||
"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"
|
||||
],
|
||||
|
|
@ -8549,6 +8554,9 @@ var Endpoints = {
|
|||
setCustomLabelsForSelfHostedRunnerForRepo: [
|
||||
"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
|
||||
],
|
||||
setCustomOidcSubClaimForRepo: [
|
||||
"PUT /repos/{owner}/{repo}/actions/oidc/customization/sub"
|
||||
],
|
||||
setGithubActionsDefaultWorkflowPermissionsOrganization: [
|
||||
"PUT /orgs/{org}/actions/permissions/workflow"
|
||||
],
|
||||
|
|
@ -8618,6 +8626,7 @@ var Endpoints = {
|
|||
listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"],
|
||||
markNotificationsAsRead: ["PUT /notifications"],
|
||||
markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"],
|
||||
markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"],
|
||||
markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"],
|
||||
setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"],
|
||||
setThreadSubscription: [
|
||||
|
|
@ -8894,10 +8903,10 @@ var Endpoints = {
|
|||
updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"]
|
||||
},
|
||||
copilot: {
|
||||
addCopilotForBusinessSeatsForTeams: [
|
||||
addCopilotSeatsForTeams: [
|
||||
"POST /orgs/{org}/copilot/billing/selected_teams"
|
||||
],
|
||||
addCopilotForBusinessSeatsForUsers: [
|
||||
addCopilotSeatsForUsers: [
|
||||
"POST /orgs/{org}/copilot/billing/selected_users"
|
||||
],
|
||||
cancelCopilotSeatAssignmentForTeams: [
|
||||
|
|
@ -9210,10 +9219,24 @@ var Endpoints = {
|
|||
}
|
||||
]
|
||||
},
|
||||
oidc: {
|
||||
getOidcCustomSubTemplateForOrg: [
|
||||
"GET /orgs/{org}/actions/oidc/customization/sub"
|
||||
],
|
||||
updateOidcCustomSubTemplateForOrg: [
|
||||
"PUT /orgs/{org}/actions/oidc/customization/sub"
|
||||
]
|
||||
},
|
||||
orgs: {
|
||||
addSecurityManagerTeam: [
|
||||
"PUT /orgs/{org}/security-managers/teams/{team_slug}"
|
||||
],
|
||||
assignTeamToOrgRole: [
|
||||
"PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"
|
||||
],
|
||||
assignUserToOrgRole: [
|
||||
"PUT /orgs/{org}/organization-roles/users/{username}/{role_id}"
|
||||
],
|
||||
blockUser: ["PUT /orgs/{org}/blocks/{username}"],
|
||||
cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"],
|
||||
checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"],
|
||||
|
|
@ -9222,6 +9245,7 @@ var Endpoints = {
|
|||
convertMemberToOutsideCollaborator: [
|
||||
"PUT /orgs/{org}/outside_collaborators/{username}"
|
||||
],
|
||||
createCustomOrganizationRole: ["POST /orgs/{org}/organization-roles"],
|
||||
createInvitation: ["POST /orgs/{org}/invitations"],
|
||||
createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
|
||||
createOrUpdateCustomPropertiesValuesForRepos: [
|
||||
|
|
@ -9232,6 +9256,9 @@ var Endpoints = {
|
|||
],
|
||||
createWebhook: ["POST /orgs/{org}/hooks"],
|
||||
delete: ["DELETE /orgs/{org}"],
|
||||
deleteCustomOrganizationRole: [
|
||||
"DELETE /orgs/{org}/organization-roles/{role_id}"
|
||||
],
|
||||
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
|
||||
enableOrDisableSecurityProductOnAllOrgRepos: [
|
||||
"POST /orgs/{org}/{security_product}/{enablement}"
|
||||
|
|
@ -9243,6 +9270,7 @@ var Endpoints = {
|
|||
],
|
||||
getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"],
|
||||
getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"],
|
||||
getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"],
|
||||
getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"],
|
||||
getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"],
|
||||
getWebhookDelivery: [
|
||||
|
|
@ -9258,6 +9286,12 @@ var Endpoints = {
|
|||
listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"],
|
||||
listMembers: ["GET /orgs/{org}/members"],
|
||||
listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"],
|
||||
listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"],
|
||||
listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"],
|
||||
listOrgRoles: ["GET /orgs/{org}/organization-roles"],
|
||||
listOrganizationFineGrainedPermissions: [
|
||||
"GET /orgs/{org}/organization-fine-grained-permissions"
|
||||
],
|
||||
listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"],
|
||||
listPatGrantRepositories: [
|
||||
"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"
|
||||
|
|
@ -9272,6 +9306,9 @@ var Endpoints = {
|
|||
listSecurityManagerTeams: ["GET /orgs/{org}/security-managers"],
|
||||
listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"],
|
||||
listWebhooks: ["GET /orgs/{org}/hooks"],
|
||||
patchCustomOrganizationRole: [
|
||||
"PATCH /orgs/{org}/organization-roles/{role_id}"
|
||||
],
|
||||
pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"],
|
||||
redeliverWebhookDelivery: [
|
||||
"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"
|
||||
|
|
@ -9296,6 +9333,18 @@ var Endpoints = {
|
|||
reviewPatGrantRequestsInBulk: [
|
||||
"POST /orgs/{org}/personal-access-token-requests"
|
||||
],
|
||||
revokeAllOrgRolesTeam: [
|
||||
"DELETE /orgs/{org}/organization-roles/teams/{team_slug}"
|
||||
],
|
||||
revokeAllOrgRolesUser: [
|
||||
"DELETE /orgs/{org}/organization-roles/users/{username}"
|
||||
],
|
||||
revokeOrgRoleTeam: [
|
||||
"DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"
|
||||
],
|
||||
revokeOrgRoleUser: [
|
||||
"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"
|
||||
],
|
||||
setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"],
|
||||
setPublicMembershipForAuthenticatedUser: [
|
||||
"PUT /orgs/{org}/public_members/{username}"
|
||||
|
|
@ -9586,6 +9635,9 @@ var Endpoints = {
|
|||
{},
|
||||
{ mapToData: "users" }
|
||||
],
|
||||
cancelPagesDeployment: [
|
||||
"POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"
|
||||
],
|
||||
checkAutomatedSecurityFixes: [
|
||||
"GET /repos/{owner}/{repo}/automated-security-fixes"
|
||||
],
|
||||
|
|
@ -9621,12 +9673,15 @@ var Endpoints = {
|
|||
createForAuthenticatedUser: ["POST /user/repos"],
|
||||
createFork: ["POST /repos/{owner}/{repo}/forks"],
|
||||
createInOrg: ["POST /orgs/{org}/repos"],
|
||||
createOrUpdateCustomPropertiesValues: [
|
||||
"PATCH /repos/{owner}/{repo}/properties/values"
|
||||
],
|
||||
createOrUpdateEnvironment: [
|
||||
"PUT /repos/{owner}/{repo}/environments/{environment_name}"
|
||||
],
|
||||
createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"],
|
||||
createOrgRuleset: ["POST /orgs/{org}/rulesets"],
|
||||
createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployment"],
|
||||
createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"],
|
||||
createPagesSite: ["POST /repos/{owner}/{repo}/pages"],
|
||||
createRelease: ["POST /repos/{owner}/{repo}/releases"],
|
||||
createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"],
|
||||
|
|
@ -9779,6 +9834,9 @@ var Endpoints = {
|
|||
getOrgRulesets: ["GET /orgs/{org}/rulesets"],
|
||||
getPages: ["GET /repos/{owner}/{repo}/pages"],
|
||||
getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],
|
||||
getPagesDeployment: [
|
||||
"GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}"
|
||||
],
|
||||
getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"],
|
||||
getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"],
|
||||
getPullRequestReviewProtection: [
|
||||
|
|
@ -9989,6 +10047,9 @@ var Endpoints = {
|
|||
]
|
||||
},
|
||||
securityAdvisories: {
|
||||
createFork: [
|
||||
"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"
|
||||
],
|
||||
createPrivateVulnerabilityReport: [
|
||||
"POST /repos/{owner}/{repo}/security-advisories/reports"
|
||||
],
|
||||
|
|
@ -10412,7 +10473,7 @@ var RequestError = class extends Error {
|
|||
if (options.request.headers.authorization) {
|
||||
requestCopy.headers = Object.assign({}, options.request.headers, {
|
||||
authorization: options.request.headers.authorization.replace(
|
||||
/ .*$/,
|
||||
/(?<! ) .*$/,
|
||||
" [REDACTED]"
|
||||
)
|
||||
});
|
||||
|
|
@ -10480,7 +10541,7 @@ var import_endpoint = __nccwpck_require__(4471);
|
|||
var import_universal_user_agent = __nccwpck_require__(3843);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "8.1.6";
|
||||
var VERSION = "8.4.1";
|
||||
|
||||
// pkg/dist-src/is-plain-object.js
|
||||
function isPlainObject(value) {
|
||||
|
|
@ -10505,7 +10566,7 @@ function getBufferResponse(response) {
|
|||
|
||||
// pkg/dist-src/fetch-wrapper.js
|
||||
function fetchWrapper(requestOptions) {
|
||||
var _a, _b, _c;
|
||||
var _a, _b, _c, _d;
|
||||
const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
|
||||
const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
|
||||
if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
|
||||
|
|
@ -10526,8 +10587,9 @@ function fetchWrapper(requestOptions) {
|
|||
return fetch(requestOptions.url, {
|
||||
method: requestOptions.method,
|
||||
body: requestOptions.body,
|
||||
redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,
|
||||
headers: requestOptions.headers,
|
||||
signal: (_c = requestOptions.request) == null ? void 0 : _c.signal,
|
||||
signal: (_d = requestOptions.request) == null ? void 0 : _d.signal,
|
||||
// duplex must be set if request.body is ReadableStream or Async Iterables.
|
||||
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
|
||||
...requestOptions.body && { duplex: "half" }
|
||||
|
|
@ -10538,7 +10600,7 @@ function fetchWrapper(requestOptions) {
|
|||
headers[keyAndValue[0]] = keyAndValue[1];
|
||||
}
|
||||
if ("deprecation" in headers) {
|
||||
const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
|
||||
const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/);
|
||||
const deprecationLink = matches && matches.pop();
|
||||
log.warn(
|
||||
`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
|
||||
|
|
@ -10624,11 +10686,17 @@ async function getResponseData(response) {
|
|||
function toErrorMessage(data) {
|
||||
if (typeof data === "string")
|
||||
return data;
|
||||
let suffix;
|
||||
if ("documentation_url" in data) {
|
||||
suffix = ` - ${data.documentation_url}`;
|
||||
} else {
|
||||
suffix = "";
|
||||
}
|
||||
if ("message" in data) {
|
||||
if (Array.isArray(data.errors)) {
|
||||
return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`;
|
||||
return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`;
|
||||
}
|
||||
return data.message;
|
||||
return `${data.message}${suffix}`;
|
||||
}
|
||||
return `Unknown error: ${JSON.stringify(data)}`;
|
||||
}
|
||||
|
|
@ -37679,7 +37747,7 @@ module.exports = {
|
|||
|
||||
|
||||
const { parseSetCookie } = __nccwpck_require__(8915)
|
||||
const { stringify, getHeadersList } = __nccwpck_require__(3834)
|
||||
const { stringify } = __nccwpck_require__(3834)
|
||||
const { webidl } = __nccwpck_require__(4222)
|
||||
const { Headers } = __nccwpck_require__(6349)
|
||||
|
||||
|
|
@ -37755,14 +37823,13 @@ function getSetCookies (headers) {
|
|||
|
||||
webidl.brandCheck(headers, Headers, { strict: false })
|
||||
|
||||
const cookies = getHeadersList(headers).cookies
|
||||
const cookies = headers.getSetCookie()
|
||||
|
||||
if (!cookies) {
|
||||
return []
|
||||
}
|
||||
|
||||
// In older versions of undici, cookies is a list of name:value.
|
||||
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
|
||||
return cookies.map((pair) => parseSetCookie(pair))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -38190,14 +38257,15 @@ module.exports = {
|
|||
/***/ }),
|
||||
|
||||
/***/ 3834:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const assert = __nccwpck_require__(2613)
|
||||
const { kHeadersList } = __nccwpck_require__(6443)
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function isCTLExcludingHtab (value) {
|
||||
if (value.length === 0) {
|
||||
return false
|
||||
|
|
@ -38458,31 +38526,13 @@ function stringify (cookie) {
|
|||
return out.join('; ')
|
||||
}
|
||||
|
||||
let kHeadersListNode
|
||||
|
||||
function getHeadersList (headers) {
|
||||
if (headers[kHeadersList]) {
|
||||
return headers[kHeadersList]
|
||||
}
|
||||
|
||||
if (!kHeadersListNode) {
|
||||
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
|
||||
(symbol) => symbol.description === 'headers list'
|
||||
)
|
||||
|
||||
assert(kHeadersListNode, 'Headers cannot be parsed')
|
||||
}
|
||||
|
||||
const headersList = headers[kHeadersListNode]
|
||||
assert(headersList)
|
||||
|
||||
return headersList
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isCTLExcludingHtab,
|
||||
stringify,
|
||||
getHeadersList
|
||||
validateCookieName,
|
||||
validateCookiePath,
|
||||
validateCookieValue,
|
||||
toIMFDate,
|
||||
stringify
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -38683,6 +38733,132 @@ function onConnectTimeout (socket) {
|
|||
module.exports = buildConnector
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 735:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
/** @type {Record<string, string | undefined>} */
|
||||
const headerNameLowerCasedRecord = {}
|
||||
|
||||
// https://developer.mozilla.org/docs/Web/HTTP/Headers
|
||||
const wellknownHeaderNames = [
|
||||
'Accept',
|
||||
'Accept-Encoding',
|
||||
'Accept-Language',
|
||||
'Accept-Ranges',
|
||||
'Access-Control-Allow-Credentials',
|
||||
'Access-Control-Allow-Headers',
|
||||
'Access-Control-Allow-Methods',
|
||||
'Access-Control-Allow-Origin',
|
||||
'Access-Control-Expose-Headers',
|
||||
'Access-Control-Max-Age',
|
||||
'Access-Control-Request-Headers',
|
||||
'Access-Control-Request-Method',
|
||||
'Age',
|
||||
'Allow',
|
||||
'Alt-Svc',
|
||||
'Alt-Used',
|
||||
'Authorization',
|
||||
'Cache-Control',
|
||||
'Clear-Site-Data',
|
||||
'Connection',
|
||||
'Content-Disposition',
|
||||
'Content-Encoding',
|
||||
'Content-Language',
|
||||
'Content-Length',
|
||||
'Content-Location',
|
||||
'Content-Range',
|
||||
'Content-Security-Policy',
|
||||
'Content-Security-Policy-Report-Only',
|
||||
'Content-Type',
|
||||
'Cookie',
|
||||
'Cross-Origin-Embedder-Policy',
|
||||
'Cross-Origin-Opener-Policy',
|
||||
'Cross-Origin-Resource-Policy',
|
||||
'Date',
|
||||
'Device-Memory',
|
||||
'Downlink',
|
||||
'ECT',
|
||||
'ETag',
|
||||
'Expect',
|
||||
'Expect-CT',
|
||||
'Expires',
|
||||
'Forwarded',
|
||||
'From',
|
||||
'Host',
|
||||
'If-Match',
|
||||
'If-Modified-Since',
|
||||
'If-None-Match',
|
||||
'If-Range',
|
||||
'If-Unmodified-Since',
|
||||
'Keep-Alive',
|
||||
'Last-Modified',
|
||||
'Link',
|
||||
'Location',
|
||||
'Max-Forwards',
|
||||
'Origin',
|
||||
'Permissions-Policy',
|
||||
'Pragma',
|
||||
'Proxy-Authenticate',
|
||||
'Proxy-Authorization',
|
||||
'RTT',
|
||||
'Range',
|
||||
'Referer',
|
||||
'Referrer-Policy',
|
||||
'Refresh',
|
||||
'Retry-After',
|
||||
'Sec-WebSocket-Accept',
|
||||
'Sec-WebSocket-Extensions',
|
||||
'Sec-WebSocket-Key',
|
||||
'Sec-WebSocket-Protocol',
|
||||
'Sec-WebSocket-Version',
|
||||
'Server',
|
||||
'Server-Timing',
|
||||
'Service-Worker-Allowed',
|
||||
'Service-Worker-Navigation-Preload',
|
||||
'Set-Cookie',
|
||||
'SourceMap',
|
||||
'Strict-Transport-Security',
|
||||
'Supports-Loading-Mode',
|
||||
'TE',
|
||||
'Timing-Allow-Origin',
|
||||
'Trailer',
|
||||
'Transfer-Encoding',
|
||||
'Upgrade',
|
||||
'Upgrade-Insecure-Requests',
|
||||
'User-Agent',
|
||||
'Vary',
|
||||
'Via',
|
||||
'WWW-Authenticate',
|
||||
'X-Content-Type-Options',
|
||||
'X-DNS-Prefetch-Control',
|
||||
'X-Frame-Options',
|
||||
'X-Permitted-Cross-Domain-Policies',
|
||||
'X-Powered-By',
|
||||
'X-Requested-With',
|
||||
'X-XSS-Protection'
|
||||
]
|
||||
|
||||
for (let i = 0; i < wellknownHeaderNames.length; ++i) {
|
||||
const key = wellknownHeaderNames[i]
|
||||
const lowerCasedKey = key.toLowerCase()
|
||||
headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] =
|
||||
lowerCasedKey
|
||||
}
|
||||
|
||||
// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.
|
||||
Object.setPrototypeOf(headerNameLowerCasedRecord, null)
|
||||
|
||||
module.exports = {
|
||||
wellknownHeaderNames,
|
||||
headerNameLowerCasedRecord
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8707:
|
||||
|
|
@ -39515,6 +39691,7 @@ const { InvalidArgumentError } = __nccwpck_require__(8707)
|
|||
const { Blob } = __nccwpck_require__(181)
|
||||
const nodeUtil = __nccwpck_require__(9023)
|
||||
const { stringify } = __nccwpck_require__(3480)
|
||||
const { headerNameLowerCasedRecord } = __nccwpck_require__(735)
|
||||
|
||||
const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v))
|
||||
|
||||
|
|
@ -39724,6 +39901,15 @@ function parseKeepAliveTimeout (val) {
|
|||
return m ? parseInt(m[1], 10) * 1000 : null
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a header name and returns its lowercase value.
|
||||
* @param {string | Buffer} value Header name
|
||||
* @returns {string}
|
||||
*/
|
||||
function headerNameToString (value) {
|
||||
return headerNameLowerCasedRecord[value] || value.toLowerCase()
|
||||
}
|
||||
|
||||
function parseHeaders (headers, obj = {}) {
|
||||
// For H2 support
|
||||
if (!Array.isArray(headers)) return headers
|
||||
|
|
@ -39995,6 +40181,7 @@ module.exports = {
|
|||
isIterable,
|
||||
isAsyncIterable,
|
||||
isDestroyed,
|
||||
headerNameToString,
|
||||
parseRawHeaders,
|
||||
parseHeaders,
|
||||
parseKeepAliveTimeout,
|
||||
|
|
@ -40274,6 +40461,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(8253)
|
|||
const { File: UndiciFile } = __nccwpck_require__(3041)
|
||||
const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(4322)
|
||||
|
||||
let random
|
||||
try {
|
||||
const crypto = __nccwpck_require__(7598)
|
||||
random = (max) => crypto.randomInt(0, max)
|
||||
} catch {
|
||||
random = (max) => Math.floor(Math.random(max))
|
||||
}
|
||||
|
||||
let ReadableStream = globalThis.ReadableStream
|
||||
|
||||
/** @type {globalThis['File']} */
|
||||
|
|
@ -40359,7 +40554,7 @@ function extractBody (object, keepalive = false) {
|
|||
// Set source to a copy of the bytes held by object.
|
||||
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
|
||||
} else if (util.isFormDataLike(object)) {
|
||||
const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`
|
||||
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
|
||||
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
|
||||
|
||||
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||||
|
|
@ -42341,6 +42536,7 @@ const {
|
|||
isValidHeaderName,
|
||||
isValidHeaderValue
|
||||
} = __nccwpck_require__(5523)
|
||||
const util = __nccwpck_require__(9023)
|
||||
const { webidl } = __nccwpck_require__(4222)
|
||||
const assert = __nccwpck_require__(2613)
|
||||
|
||||
|
|
@ -42894,6 +43090,9 @@ Object.defineProperties(Headers.prototype, {
|
|||
[Symbol.toStringTag]: {
|
||||
value: 'Headers',
|
||||
configurable: true
|
||||
},
|
||||
[util.inspect.custom]: {
|
||||
enumerable: false
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -44131,6 +44330,9 @@ function httpRedirectFetch (fetchParams, response) {
|
|||
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
|
||||
request.headersList.delete('authorization')
|
||||
|
||||
// https://fetch.spec.whatwg.org/#authentication-entries
|
||||
request.headersList.delete('proxy-authorization', true)
|
||||
|
||||
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
|
||||
request.headersList.delete('cookie')
|
||||
request.headersList.delete('host')
|
||||
|
|
@ -46639,14 +46841,18 @@ const { isBlobLike, toUSVString, ReadableStreamFrom } = __nccwpck_require__(3440
|
|||
const assert = __nccwpck_require__(2613)
|
||||
const { isUint8Array } = __nccwpck_require__(8253)
|
||||
|
||||
let supportedHashes = []
|
||||
|
||||
// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable
|
||||
/** @type {import('crypto')|undefined} */
|
||||
let crypto
|
||||
|
||||
try {
|
||||
crypto = __nccwpck_require__(6982)
|
||||
const possibleRelevantHashes = ['sha256', 'sha384', 'sha512']
|
||||
supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash))
|
||||
/* c8 ignore next 3 */
|
||||
} catch {
|
||||
|
||||
}
|
||||
|
||||
function responseURL (response) {
|
||||
|
|
@ -47174,66 +47380,56 @@ function bytesMatch (bytes, metadataList) {
|
|||
return true
|
||||
}
|
||||
|
||||
// 3. If parsedMetadata is the empty set, return true.
|
||||
// 3. If response is not eligible for integrity validation, return false.
|
||||
// TODO
|
||||
|
||||
// 4. If parsedMetadata is the empty set, return true.
|
||||
if (parsedMetadata.length === 0) {
|
||||
return true
|
||||
}
|
||||
|
||||
// 4. Let metadata be the result of getting the strongest
|
||||
// 5. Let metadata be the result of getting the strongest
|
||||
// metadata from parsedMetadata.
|
||||
const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo))
|
||||
// get the strongest algorithm
|
||||
const strongest = list[0].algo
|
||||
// get all entries that use the strongest algorithm; ignore weaker
|
||||
const metadata = list.filter((item) => item.algo === strongest)
|
||||
const strongest = getStrongestMetadata(parsedMetadata)
|
||||
const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest)
|
||||
|
||||
// 5. For each item in metadata:
|
||||
// 6. For each item in metadata:
|
||||
for (const item of metadata) {
|
||||
// 1. Let algorithm be the alg component of item.
|
||||
const algorithm = item.algo
|
||||
|
||||
// 2. Let expectedValue be the val component of item.
|
||||
let expectedValue = item.hash
|
||||
const expectedValue = item.hash
|
||||
|
||||
// See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e
|
||||
// "be liberal with padding". This is annoying, and it's not even in the spec.
|
||||
|
||||
if (expectedValue.endsWith('==')) {
|
||||
expectedValue = expectedValue.slice(0, -2)
|
||||
}
|
||||
|
||||
// 3. Let actualValue be the result of applying algorithm to bytes.
|
||||
let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64')
|
||||
|
||||
if (actualValue.endsWith('==')) {
|
||||
if (actualValue[actualValue.length - 1] === '=') {
|
||||
if (actualValue[actualValue.length - 2] === '=') {
|
||||
actualValue = actualValue.slice(0, -2)
|
||||
} else {
|
||||
actualValue = actualValue.slice(0, -1)
|
||||
}
|
||||
}
|
||||
|
||||
// 4. If actualValue is a case-sensitive match for expectedValue,
|
||||
// return true.
|
||||
if (actualValue === expectedValue) {
|
||||
return true
|
||||
}
|
||||
|
||||
let actualBase64URL = crypto.createHash(algorithm).update(bytes).digest('base64url')
|
||||
|
||||
if (actualBase64URL.endsWith('==')) {
|
||||
actualBase64URL = actualBase64URL.slice(0, -2)
|
||||
}
|
||||
|
||||
if (actualBase64URL === expectedValue) {
|
||||
if (compareBase64Mixed(actualValue, expectedValue)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
// 6. Return false.
|
||||
// 7. Return false.
|
||||
return false
|
||||
}
|
||||
|
||||
// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options
|
||||
// https://www.w3.org/TR/CSP2/#source-list-syntax
|
||||
// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1
|
||||
const parseHashWithOptions = /((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i
|
||||
const parseHashWithOptions = /(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i
|
||||
|
||||
/**
|
||||
* @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
|
||||
|
|
@ -47247,8 +47443,6 @@ function parseMetadata (metadata) {
|
|||
// 2. Let empty be equal to true.
|
||||
let empty = true
|
||||
|
||||
const supportedHashes = crypto.getHashes()
|
||||
|
||||
// 3. For each token returned by splitting metadata on spaces:
|
||||
for (const token of metadata.split(' ')) {
|
||||
// 1. Set empty to false.
|
||||
|
|
@ -47258,7 +47452,11 @@ function parseMetadata (metadata) {
|
|||
const parsedToken = parseHashWithOptions.exec(token)
|
||||
|
||||
// 3. If token does not parse, continue to the next token.
|
||||
if (parsedToken === null || parsedToken.groups === undefined) {
|
||||
if (
|
||||
parsedToken === null ||
|
||||
parsedToken.groups === undefined ||
|
||||
parsedToken.groups.algo === undefined
|
||||
) {
|
||||
// Note: Chromium blocks the request at this point, but Firefox
|
||||
// gives a warning that an invalid integrity was given. The
|
||||
// correct behavior is to ignore these, and subsequently not
|
||||
|
|
@ -47267,11 +47465,11 @@ function parseMetadata (metadata) {
|
|||
}
|
||||
|
||||
// 4. Let algorithm be the hash-algo component of token.
|
||||
const algorithm = parsedToken.groups.algo
|
||||
const algorithm = parsedToken.groups.algo.toLowerCase()
|
||||
|
||||
// 5. If algorithm is a hash function recognized by the user
|
||||
// agent, add the parsed token to result.
|
||||
if (supportedHashes.includes(algorithm.toLowerCase())) {
|
||||
if (supportedHashes.includes(algorithm)) {
|
||||
result.push(parsedToken.groups)
|
||||
}
|
||||
}
|
||||
|
|
@ -47284,6 +47482,82 @@ function parseMetadata (metadata) {
|
|||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList
|
||||
*/
|
||||
function getStrongestMetadata (metadataList) {
|
||||
// Let algorithm be the algo component of the first item in metadataList.
|
||||
// Can be sha256
|
||||
let algorithm = metadataList[0].algo
|
||||
// If the algorithm is sha512, then it is the strongest
|
||||
// and we can return immediately
|
||||
if (algorithm[3] === '5') {
|
||||
return algorithm
|
||||
}
|
||||
|
||||
for (let i = 1; i < metadataList.length; ++i) {
|
||||
const metadata = metadataList[i]
|
||||
// If the algorithm is sha512, then it is the strongest
|
||||
// and we can break the loop immediately
|
||||
if (metadata.algo[3] === '5') {
|
||||
algorithm = 'sha512'
|
||||
break
|
||||
// If the algorithm is sha384, then a potential sha256 or sha384 is ignored
|
||||
} else if (algorithm[3] === '3') {
|
||||
continue
|
||||
// algorithm is sha256, check if algorithm is sha384 and if so, set it as
|
||||
// the strongest
|
||||
} else if (metadata.algo[3] === '3') {
|
||||
algorithm = 'sha384'
|
||||
}
|
||||
}
|
||||
return algorithm
|
||||
}
|
||||
|
||||
function filterMetadataListByAlgorithm (metadataList, algorithm) {
|
||||
if (metadataList.length === 1) {
|
||||
return metadataList
|
||||
}
|
||||
|
||||
let pos = 0
|
||||
for (let i = 0; i < metadataList.length; ++i) {
|
||||
if (metadataList[i].algo === algorithm) {
|
||||
metadataList[pos++] = metadataList[i]
|
||||
}
|
||||
}
|
||||
|
||||
metadataList.length = pos
|
||||
|
||||
return metadataList
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares two base64 strings, allowing for base64url
|
||||
* in the second string.
|
||||
*
|
||||
* @param {string} actualValue always base64
|
||||
* @param {string} expectedValue base64 or base64url
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function compareBase64Mixed (actualValue, expectedValue) {
|
||||
if (actualValue.length !== expectedValue.length) {
|
||||
return false
|
||||
}
|
||||
for (let i = 0; i < actualValue.length; ++i) {
|
||||
if (actualValue[i] !== expectedValue[i]) {
|
||||
if (
|
||||
(actualValue[i] === '+' && expectedValue[i] === '-') ||
|
||||
(actualValue[i] === '/' && expectedValue[i] === '_')
|
||||
) {
|
||||
continue
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request
|
||||
function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {
|
||||
// TODO
|
||||
|
|
@ -47699,7 +47973,8 @@ module.exports = {
|
|||
urlHasHttpsScheme,
|
||||
urlIsHttpHttpsScheme,
|
||||
readAllBytes,
|
||||
normalizeMethodRecord
|
||||
normalizeMethodRecord,
|
||||
parseMetadata
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -49786,12 +50061,17 @@ function parseLocation (statusCode, headers) {
|
|||
|
||||
// https://tools.ietf.org/html/rfc7231#section-6.4.4
|
||||
function shouldRemoveHeader (header, removeContent, unknownOrigin) {
|
||||
return (
|
||||
(header.length === 4 && header.toString().toLowerCase() === 'host') ||
|
||||
(removeContent && header.toString().toLowerCase().indexOf('content-') === 0) ||
|
||||
(unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') ||
|
||||
(unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie')
|
||||
)
|
||||
if (header.length === 4) {
|
||||
return util.headerNameToString(header) === 'host'
|
||||
}
|
||||
if (removeContent && util.headerNameToString(header).startsWith('content-')) {
|
||||
return true
|
||||
}
|
||||
if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) {
|
||||
const name = util.headerNameToString(header)
|
||||
return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization'
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// https://tools.ietf.org/html/rfc7231#section-6.4
|
||||
|
|
@ -51989,6 +52269,20 @@ class Pool extends PoolBase {
|
|||
? { ...options.interceptors }
|
||||
: undefined
|
||||
this[kFactory] = factory
|
||||
|
||||
this.on('connectionError', (origin, targets, error) => {
|
||||
// If a connection error occurs, we remove the client from the pool,
|
||||
// and emit a connectionError event. They will not be re-used.
|
||||
// Fixes https://github.com/nodejs/undici/issues/3895
|
||||
for (const target of targets) {
|
||||
// Do not use kRemoveClient here, as it will close the client,
|
||||
// but the client cannot be closed in this state.
|
||||
const idx = this[kClients].indexOf(target)
|
||||
if (idx !== -1) {
|
||||
this[kClients].splice(idx, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
[kGetDispatcher] () {
|
||||
|
|
@ -59488,6 +59782,14 @@ module.exports = require("net");
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 7598:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = require("node:crypto");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8474:
|
||||
/***/ ((module) => {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue