From f83fb279aa2bc96a80fac0b8cb97b369ae18334f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 1 Mar 2024 10:01:48 -0800
Subject: [PATCH] fix(deps): bump the production-dependencies group with 3
updates (#107)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bumps the production-dependencies group with 3 updates:
[@octokit/auth-app](https://github.com/octokit/auth-app.js),
[@octokit/request](https://github.com/octokit/request.js) and
[undici](https://github.com/nodejs/undici).
Updates `@octokit/auth-app` from 6.0.3 to 6.0.4
Release notes
Sourced from @octokit/auth-app
's
releases.
v6.0.4
6.0.4
(2024-02-23)
Bug Fixes
Commits
61d61c2
fix(README): usage example (#579)
fb0624e
maint: fix some spelling errors (#576)
e167700
build(deps): lock file maintenance (#577)
0c15ee7
build(deps): lock file maintenance (#574)
c97c234
build(deps): lock file maintenance
f063a5e
chore(deps): update dependency prettier to v3.2.5 (#572)
94a8663
build(deps): lock file maintenance (#571)
bddd8ab
chore(deps): update dependency esbuild to ^0.20.0
9733c31
ci(action): update peter-evans/create-or-update-comment action to
v4
151f063
chore(deps): update dependency prettier to v3.2.4 (#567)
- Additional commits viewable in compare
view
Updates `@octokit/request` from 8.1.6 to 9.0.1
Release notes
Sourced from @octokit/request
's
releases.
v9.0.1
9.0.1
(2024-02-27)
Bug Fixes
v9.0.0
9.0.0
(2024-02-24)
Features
BREAKING CHANGES
- Output a single ESM bundle
v9.0.0-beta.1
Bug Fixes
Features
BREAKING CHANGES
- Output a single ESM bundle
v8.2.0
8.2.0
(2024-02-09)
Features
- add documentation link in error message (#667)
(dbfeab2)
Commits
1d834ae
fix(pkg): add main
export (#681)
a71ea0e
ci(action): update actions/add-to-project action to v0.6.0 (#680)
10214d9
docs(readme): examples use ESM (#609)
517fd98
feat: switch to ESM output (#678)
bb0e1e1
test: remove AbortController
and AbortSignal
polyfills (#676)
07b6259
ci(workflows): add write permissions to release workflow (#673)
8a58080
ci(workflows): add permissions (#669)
dbfeab2
feat: add documentation link in error message (#667)
c013de4
docs: fix spelling errors (#671)
3d22c38
chore(deps): update dependency prettier to v3.2.5
- Additional commits viewable in compare
view
Updates `undici` from 6.6.1 to 6.6.2
Release notes
Sourced from undici's
releases.
v6.6.2
What's Changed
New Contributors
Full Changelog: https://github.com/nodejs/undici/compare/v6.6.1...v6.6.2
Commits
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore ` will
remove the ignore condition of the specified dependency and ignore
conditions
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
---
dist/main.cjs | 3435 ++++++++++++++++++++++++++++++++++++++++-----
dist/post.cjs | 1382 ++++++++----------
package-lock.json | 217 ++-
package.json | 6 +-
4 files changed, 3898 insertions(+), 1142 deletions(-)
diff --git a/dist/main.cjs b/dist/main.cjs
index 6185429..0f42fa1 100644
--- a/dist/main.cjs
+++ b/dist/main.cjs
@@ -1027,7 +1027,7 @@ var require_lib = __commonJS({
}
exports2.isHttps = isHttps;
var HttpClient = class {
- constructor(userAgent, handlers, requestOptions) {
+ constructor(userAgent2, handlers, requestOptions) {
this._ignoreSslError = false;
this._allowRedirects = true;
this._allowRedirectDowngrade = false;
@@ -1036,7 +1036,7 @@ var require_lib = __commonJS({
this._maxRetries = 1;
this._keepAlive = false;
this._disposed = false;
- this.userAgent = userAgent;
+ this.userAgent = userAgent2;
this.handlers = handlers || [];
this.requestOptions = requestOptions;
if (requestOptions) {
@@ -1320,14 +1320,14 @@ var require_lib = __commonJS({
}
_mergeHeaders(headers) {
if (this.requestOptions && this.requestOptions.headers) {
- return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));
+ return Object.assign({}, lowercaseKeys2(this.requestOptions.headers), lowercaseKeys2(headers || {}));
}
- return lowercaseKeys(headers || {});
+ return lowercaseKeys2(headers || {});
}
_getExistingOrDefaultHeader(additionalHeaders, header, _default) {
let clientHeader;
if (this.requestOptions && this.requestOptions.headers) {
- clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
+ clientHeader = lowercaseKeys2(this.requestOptions.headers)[header];
}
return additionalHeaders[header] || clientHeader || _default;
}
@@ -1445,7 +1445,7 @@ var require_lib = __commonJS({
}
};
exports2.HttpClient = HttpClient;
- var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
+ var lowercaseKeys2 = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
}
});
@@ -2229,7 +2229,7 @@ var require_dist_node = __commonJS({
"node_modules/universal-user-agent/dist-node/index.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
- function getUserAgent() {
+ function getUserAgent3() {
if (typeof navigator === "object" && "userAgent" in navigator) {
return navigator.userAgent;
}
@@ -2238,40 +2238,13 @@ var require_dist_node = __commonJS({
}
return "";
}
- exports2.getUserAgent = getUserAgent;
+ exports2.getUserAgent = getUserAgent3;
}
});
-// node_modules/is-plain-object/dist/is-plain-object.js
-var require_is_plain_object = __commonJS({
- "node_modules/is-plain-object/dist/is-plain-object.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", { value: true });
- function isObject(o) {
- return Object.prototype.toString.call(o) === "[object Object]";
- }
- function isPlainObject(o) {
- var ctor, prot;
- if (isObject(o) === false)
- return false;
- ctor = o.constructor;
- if (ctor === void 0)
- return true;
- prot = ctor.prototype;
- if (isObject(prot) === false)
- return false;
- if (prot.hasOwnProperty("isPrototypeOf") === false) {
- return false;
- }
- return true;
- }
- exports2.isPlainObject = isPlainObject;
- }
-});
-
-// node_modules/@octokit/endpoint/dist-node/index.js
+// node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-node/index.js
var require_dist_node2 = __commonJS({
- "node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
+ "node_modules/@octokit/auth-app/node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
"use strict";
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -2292,24 +2265,24 @@ var require_dist_node2 = __commonJS({
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
var dist_src_exports = {};
__export2(dist_src_exports, {
- endpoint: () => endpoint
+ endpoint: () => endpoint2
});
module2.exports = __toCommonJS2(dist_src_exports);
- var import_universal_user_agent = require_dist_node();
- var VERSION = "9.0.1";
- var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
- var DEFAULTS = {
+ var import_universal_user_agent3 = require_dist_node();
+ var VERSION3 = "9.0.4";
+ var userAgent2 = `octokit-endpoint.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`;
+ var DEFAULTS2 = {
method: "GET",
baseUrl: "https://api.github.com",
headers: {
accept: "application/vnd.github.v3+json",
- "user-agent": userAgent
+ "user-agent": userAgent2
},
mediaType: {
format: ""
}
};
- function lowercaseKeys(object) {
+ function lowercaseKeys2(object) {
if (!object) {
return {};
}
@@ -2318,22 +2291,32 @@ var require_dist_node2 = __commonJS({
return newObj;
}, {});
}
- var import_is_plain_object = require_is_plain_object();
- function mergeDeep(defaults, options) {
+ function isPlainObject3(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+ }
+ function mergeDeep2(defaults, options) {
const result = Object.assign({}, defaults);
Object.keys(options).forEach((key) => {
- if ((0, import_is_plain_object.isPlainObject)(options[key])) {
+ if (isPlainObject3(options[key])) {
if (!(key in defaults))
Object.assign(result, { [key]: options[key] });
else
- result[key] = mergeDeep(defaults[key], options[key]);
+ result[key] = mergeDeep2(defaults[key], options[key]);
} else {
Object.assign(result, { [key]: options[key] });
}
});
return result;
}
- function removeUndefinedProperties(obj) {
+ function removeUndefinedProperties2(obj) {
for (const key in obj) {
if (obj[key] === void 0) {
delete obj[key];
@@ -2341,17 +2324,17 @@ var require_dist_node2 = __commonJS({
}
return obj;
}
- function merge(defaults, route, options) {
+ function merge2(defaults, route, options) {
if (typeof route === "string") {
let [method, url] = route.split(" ");
options = Object.assign(url ? { method, url } : { url: method }, options);
} else {
options = Object.assign({}, route);
}
- options.headers = lowercaseKeys(options.headers);
- removeUndefinedProperties(options);
- removeUndefinedProperties(options.headers);
- const mergedOptions = mergeDeep(defaults || {}, options);
+ options.headers = lowercaseKeys2(options.headers);
+ removeUndefinedProperties2(options);
+ removeUndefinedProperties2(options.headers);
+ const mergedOptions = mergeDeep2(defaults || {}, options);
if (options.url === "/graphql") {
if (defaults && defaults.mediaType.previews?.length) {
mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(
@@ -2362,7 +2345,7 @@ var require_dist_node2 = __commonJS({
}
return mergedOptions;
}
- function addQueryParameters(url, parameters) {
+ function addQueryParameters2(url, parameters) {
const separator = /\?/.test(url) ? "&" : "?";
const names = Object.keys(parameters);
if (names.length === 0) {
@@ -2375,24 +2358,27 @@ var require_dist_node2 = __commonJS({
return `${name}=${encodeURIComponent(parameters[name])}`;
}).join("&");
}
- var urlVariableRegex = /\{[^}]+\}/g;
- function removeNonChars(variableName) {
+ var urlVariableRegex2 = /\{[^}]+\}/g;
+ function removeNonChars2(variableName) {
return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
}
- function extractUrlVariableNames(url) {
- const matches = url.match(urlVariableRegex);
+ function extractUrlVariableNames2(url) {
+ const matches = url.match(urlVariableRegex2);
if (!matches) {
return [];
}
- return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
+ return matches.map(removeNonChars2).reduce((a, b) => a.concat(b), []);
}
- function omit(object, keysToOmit) {
- return Object.keys(object).filter((option) => !keysToOmit.includes(option)).reduce((obj, key) => {
- obj[key] = object[key];
- return obj;
- }, {});
+ function omit2(object, keysToOmit) {
+ const result = { __proto__: null };
+ for (const key of Object.keys(object)) {
+ if (keysToOmit.indexOf(key) === -1) {
+ result[key] = object[key];
+ }
+ }
+ return result;
}
- function encodeReserved(str) {
+ function encodeReserved2(str) {
return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
if (!/%[0-9A-Fa-f]/.test(part)) {
part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
@@ -2400,67 +2386,67 @@ var require_dist_node2 = __commonJS({
return part;
}).join("");
}
- function encodeUnreserved(str) {
+ function encodeUnreserved2(str) {
return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
});
}
- function encodeValue(operator, value, key) {
- value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value);
+ function encodeValue2(operator, value, key) {
+ value = operator === "+" || operator === "#" ? encodeReserved2(value) : encodeUnreserved2(value);
if (key) {
- return encodeUnreserved(key) + "=" + value;
+ return encodeUnreserved2(key) + "=" + value;
} else {
return value;
}
}
- function isDefined(value) {
+ function isDefined2(value) {
return value !== void 0 && value !== null;
}
- function isKeyOperator(operator) {
+ function isKeyOperator2(operator) {
return operator === ";" || operator === "&" || operator === "?";
}
- function getValues(context, operator, key, modifier) {
+ function getValues2(context, operator, key, modifier) {
var value = context[key], result = [];
- if (isDefined(value) && value !== "") {
+ if (isDefined2(value) && value !== "") {
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
value = value.toString();
if (modifier && modifier !== "*") {
value = value.substring(0, parseInt(modifier, 10));
}
result.push(
- encodeValue(operator, value, isKeyOperator(operator) ? key : "")
+ encodeValue2(operator, value, isKeyOperator2(operator) ? key : "")
);
} else {
if (modifier === "*") {
if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function(value2) {
+ value.filter(isDefined2).forEach(function(value2) {
result.push(
- encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
+ encodeValue2(operator, value2, isKeyOperator2(operator) ? key : "")
);
});
} else {
Object.keys(value).forEach(function(k) {
- if (isDefined(value[k])) {
- result.push(encodeValue(operator, value[k], k));
+ if (isDefined2(value[k])) {
+ result.push(encodeValue2(operator, value[k], k));
}
});
}
} else {
const tmp = [];
if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function(value2) {
- tmp.push(encodeValue(operator, value2));
+ value.filter(isDefined2).forEach(function(value2) {
+ tmp.push(encodeValue2(operator, value2));
});
} else {
Object.keys(value).forEach(function(k) {
- if (isDefined(value[k])) {
- tmp.push(encodeUnreserved(k));
- tmp.push(encodeValue(operator, value[k].toString()));
+ if (isDefined2(value[k])) {
+ tmp.push(encodeUnreserved2(k));
+ tmp.push(encodeValue2(operator, value[k].toString()));
}
});
}
- if (isKeyOperator(operator)) {
- result.push(encodeUnreserved(key) + "=" + tmp.join(","));
+ if (isKeyOperator2(operator)) {
+ result.push(encodeUnreserved2(key) + "=" + tmp.join(","));
} else if (tmp.length !== 0) {
result.push(tmp.join(","));
}
@@ -2468,25 +2454,25 @@ var require_dist_node2 = __commonJS({
}
} else {
if (operator === ";") {
- if (isDefined(value)) {
- result.push(encodeUnreserved(key));
+ if (isDefined2(value)) {
+ result.push(encodeUnreserved2(key));
}
} else if (value === "" && (operator === "&" || operator === "?")) {
- result.push(encodeUnreserved(key) + "=");
+ result.push(encodeUnreserved2(key) + "=");
} else if (value === "") {
result.push("");
}
}
return result;
}
- function parseUrl(template) {
+ function parseUrl2(template) {
return {
- expand: expand.bind(null, template)
+ expand: expand2.bind(null, template)
};
}
- function expand(template, context) {
+ function expand2(template, context) {
var operators = ["+", "#", ".", "/", ";", "?", "&"];
- return template.replace(
+ template = template.replace(
/\{([^\{\}]+)\}|([^\{\}]+)/g,
function(_, expression, literal) {
if (expression) {
@@ -2498,7 +2484,7 @@ var require_dist_node2 = __commonJS({
}
expression.split(/,/g).forEach(function(variable) {
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
- values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
+ values.push(getValues2(context, operator, tmp[1], tmp[2] || tmp[3]));
});
if (operator && operator !== "+") {
var separator = ",";
@@ -2512,17 +2498,22 @@ var require_dist_node2 = __commonJS({
return values.join(",");
}
} else {
- return encodeReserved(literal);
+ return encodeReserved2(literal);
}
}
);
+ if (template === "/") {
+ return template;
+ } else {
+ return template.replace(/\/$/, "");
+ }
}
- function parse2(options) {
+ function parse3(options) {
let method = options.method.toUpperCase();
let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
let headers = Object.assign({}, options.headers);
let body;
- let parameters = omit(options, [
+ let parameters = omit2(options, [
"method",
"baseUrl",
"url",
@@ -2530,13 +2521,13 @@ var require_dist_node2 = __commonJS({
"request",
"mediaType"
]);
- const urlVariableNames = extractUrlVariableNames(url);
- url = parseUrl(url).expand(parameters);
+ const urlVariableNames = extractUrlVariableNames2(url);
+ url = parseUrl2(url).expand(parameters);
if (!/^http/.test(url)) {
url = options.baseUrl + url;
}
const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
- const remainingParameters = omit(parameters, omittedParameters);
+ const remainingParameters = omit2(parameters, omittedParameters);
const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
if (!isBinaryRequest) {
if (options.mediaType.format) {
@@ -2558,7 +2549,7 @@ var require_dist_node2 = __commonJS({
}
}
if (["GET", "HEAD"].includes(method)) {
- url = addQueryParameters(url, remainingParameters);
+ url = addQueryParameters2(url, remainingParameters);
} else {
if ("data" in remainingParameters) {
body = remainingParameters.data;
@@ -2580,20 +2571,20 @@ var require_dist_node2 = __commonJS({
options.request ? { request: options.request } : null
);
}
- function endpointWithDefaults(defaults, route, options) {
- return parse2(merge(defaults, route, options));
- }
- function withDefaults(oldDefaults, newDefaults) {
- const DEFAULTS2 = merge(oldDefaults, newDefaults);
- const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);
- return Object.assign(endpoint2, {
- DEFAULTS: DEFAULTS2,
- defaults: withDefaults.bind(null, DEFAULTS2),
- merge: merge.bind(null, DEFAULTS2),
- parse: parse2
+ function endpointWithDefaults2(defaults, route, options) {
+ return parse3(merge2(defaults, route, options));
+ }
+ function withDefaults3(oldDefaults, newDefaults) {
+ const DEFAULTS22 = merge2(oldDefaults, newDefaults);
+ const endpoint22 = endpointWithDefaults2.bind(null, DEFAULTS22);
+ return Object.assign(endpoint22, {
+ DEFAULTS: DEFAULTS22,
+ defaults: withDefaults3.bind(null, DEFAULTS22),
+ merge: merge2.bind(null, DEFAULTS22),
+ parse: parse3
});
}
- var endpoint = withDefaults(null, DEFAULTS);
+ var endpoint2 = withDefaults3(null, DEFAULTS2);
}
});
@@ -2724,14 +2715,14 @@ var require_dist_node4 = __commonJS({
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
var dist_src_exports = {};
__export2(dist_src_exports, {
- RequestError: () => RequestError
+ RequestError: () => RequestError2
});
module2.exports = __toCommonJS2(dist_src_exports);
var import_deprecation = require_dist_node3();
var import_once = __toESM2(require_once());
var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));
var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));
- var RequestError = class extends Error {
+ var RequestError2 = class extends Error {
constructor(message, statusCode, options) {
super(message);
if (Error.captureStackTrace) {
@@ -2783,9 +2774,9 @@ var require_dist_node4 = __commonJS({
}
});
-// node_modules/@octokit/request/dist-node/index.js
+// node_modules/@octokit/auth-app/node_modules/@octokit/request/dist-node/index.js
var require_dist_node5 = __commonJS({
- "node_modules/@octokit/request/dist-node/index.js"(exports2, module2) {
+ "node_modules/@octokit/auth-app/node_modules/@octokit/request/dist-node/index.js"(exports2, module2) {
"use strict";
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -2809,10 +2800,10 @@ var require_dist_node5 = __commonJS({
request: () => request2
});
module2.exports = __toCommonJS2(dist_src_exports);
- var import_endpoint = require_dist_node2();
- var import_universal_user_agent = require_dist_node();
- var VERSION = "8.1.6";
- function isPlainObject(value) {
+ var import_endpoint2 = require_dist_node2();
+ var import_universal_user_agent3 = require_dist_node();
+ var VERSION3 = "8.2.0";
+ function isPlainObject3(value) {
if (typeof value !== "object" || value === null)
return false;
if (Object.prototype.toString.call(value) !== "[object Object]")
@@ -2823,15 +2814,15 @@ var require_dist_node5 = __commonJS({
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
}
- var import_request_error = require_dist_node4();
- function getBufferResponse(response) {
+ var import_request_error2 = require_dist_node4();
+ function getBufferResponse2(response) {
return response.arrayBuffer();
}
- function fetchWrapper(requestOptions) {
+ function fetchWrapper2(requestOptions) {
var _a, _b, _c;
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)) {
+ if (isPlainObject3(requestOptions.body) || Array.isArray(requestOptions.body)) {
requestOptions.body = JSON.stringify(requestOptions.body);
}
let headers = {};
@@ -2874,7 +2865,7 @@ var require_dist_node5 = __commonJS({
if (status < 400) {
return;
}
- throw new import_request_error.RequestError(response.statusText, status, {
+ throw new import_request_error2.RequestError(response.statusText, status, {
response: {
url,
status,
@@ -2885,19 +2876,19 @@ var require_dist_node5 = __commonJS({
});
}
if (status === 304) {
- throw new import_request_error.RequestError("Not modified", status, {
+ throw new import_request_error2.RequestError("Not modified", status, {
response: {
url,
status,
headers,
- data: await getResponseData(response)
+ data: await getResponseData2(response)
},
request: requestOptions
});
}
if (status >= 400) {
- const data = await getResponseData(response);
- const error = new import_request_error.RequestError(toErrorMessage(data), status, {
+ const data = await getResponseData2(response);
+ const error = new import_request_error2.RequestError(toErrorMessage2(data), status, {
response: {
url,
status,
@@ -2908,7 +2899,7 @@ var require_dist_node5 = __commonJS({
});
throw error;
}
- return parseSuccessResponseBody ? await getResponseData(response) : response.body;
+ return parseSuccessResponseBody ? await getResponseData2(response) : response.body;
}).then((data) => {
return {
status,
@@ -2917,7 +2908,7 @@ var require_dist_node5 = __commonJS({
data
};
}).catch((error) => {
- if (error instanceof import_request_error.RequestError)
+ if (error instanceof import_request_error2.RequestError)
throw error;
else if (error.name === "AbortError")
throw error;
@@ -2929,12 +2920,12 @@ var require_dist_node5 = __commonJS({
message = error.cause;
}
}
- throw new import_request_error.RequestError(message, 500, {
+ throw new import_request_error2.RequestError(message, 500, {
request: requestOptions
});
});
}
- async function getResponseData(response) {
+ async function getResponseData2(response) {
const contentType = response.headers.get("content-type");
if (/application\/json/.test(contentType)) {
return response.json().catch(() => response.text()).catch(() => "");
@@ -2942,62 +2933,59 @@ var require_dist_node5 = __commonJS({
if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
return response.text();
}
- return getBufferResponse(response);
+ return getBufferResponse2(response);
}
- function toErrorMessage(data) {
+ function toErrorMessage2(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)}`;
}
- function withDefaults(oldEndpoint, newDefaults) {
+ function withDefaults3(oldEndpoint, newDefaults) {
const endpoint2 = oldEndpoint.defaults(newDefaults);
const newApi = function(route, parameters) {
const endpointOptions = endpoint2.merge(route, parameters);
if (!endpointOptions.request || !endpointOptions.request.hook) {
- return fetchWrapper(endpoint2.parse(endpointOptions));
+ return fetchWrapper2(endpoint2.parse(endpointOptions));
}
const request22 = (route2, parameters2) => {
- return fetchWrapper(
+ return fetchWrapper2(
endpoint2.parse(endpoint2.merge(route2, parameters2))
);
};
Object.assign(request22, {
endpoint: endpoint2,
- defaults: withDefaults.bind(null, endpoint2)
+ defaults: withDefaults3.bind(null, endpoint2)
});
return endpointOptions.request.hook(request22, endpointOptions);
};
return Object.assign(newApi, {
endpoint: endpoint2,
- defaults: withDefaults.bind(null, endpoint2)
+ defaults: withDefaults3.bind(null, endpoint2)
});
}
- var request2 = withDefaults(import_endpoint.endpoint, {
+ var request2 = withDefaults3(import_endpoint2.endpoint, {
headers: {
- "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
+ "user-agent": `octokit-request.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`
}
});
}
});
-// node_modules/btoa-lite/btoa-node.js
-var require_btoa_node = __commonJS({
- "node_modules/btoa-lite/btoa-node.js"(exports2, module2) {
- module2.exports = function btoa(str) {
- return new Buffer(str).toString("base64");
- };
- }
-});
-
-// node_modules/@octokit/oauth-authorization-url/dist-node/index.js
+// node_modules/@octokit/auth-oauth-app/node_modules/@octokit/endpoint/dist-node/index.js
var require_dist_node6 = __commonJS({
- "node_modules/@octokit/oauth-authorization-url/dist-node/index.js"(exports2, module2) {
+ "node_modules/@octokit/auth-oauth-app/node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
"use strict";
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -3013,60 +3001,2289 @@ var require_dist_node6 = __commonJS({
if (!__hasOwnProp2.call(to, key) && key !== except)
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
}
- return to;
- };
- var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
- var dist_src_exports = {};
- __export2(dist_src_exports, {
- oauthAuthorizationUrl: () => oauthAuthorizationUrl
- });
- module2.exports = __toCommonJS2(dist_src_exports);
- function oauthAuthorizationUrl(options) {
- const clientType = options.clientType || "oauth-app";
- const baseUrl2 = options.baseUrl || "https://github.com";
- const result = {
- clientType,
- allowSignup: options.allowSignup === false ? false : true,
- clientId: options.clientId,
- login: options.login || null,
- redirectUrl: options.redirectUrl || null,
- state: options.state || Math.random().toString(36).substr(2),
- url: ""
- };
- if (clientType === "oauth-app") {
- const scopes = "scopes" in options ? options.scopes : [];
- result.scopes = typeof scopes === "string" ? scopes.split(/[,\s]+/).filter(Boolean) : scopes;
+ return to;
+ };
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+ var dist_src_exports = {};
+ __export2(dist_src_exports, {
+ endpoint: () => endpoint2
+ });
+ module2.exports = __toCommonJS2(dist_src_exports);
+ var import_universal_user_agent3 = require_dist_node();
+ var VERSION3 = "9.0.4";
+ var userAgent2 = `octokit-endpoint.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`;
+ var DEFAULTS2 = {
+ method: "GET",
+ baseUrl: "https://api.github.com",
+ headers: {
+ accept: "application/vnd.github.v3+json",
+ "user-agent": userAgent2
+ },
+ mediaType: {
+ format: ""
+ }
+ };
+ function lowercaseKeys2(object) {
+ if (!object) {
+ return {};
+ }
+ return Object.keys(object).reduce((newObj, key) => {
+ newObj[key.toLowerCase()] = object[key];
+ return newObj;
+ }, {});
+ }
+ function isPlainObject3(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+ }
+ function mergeDeep2(defaults, options) {
+ const result = Object.assign({}, defaults);
+ Object.keys(options).forEach((key) => {
+ if (isPlainObject3(options[key])) {
+ if (!(key in defaults))
+ Object.assign(result, { [key]: options[key] });
+ else
+ result[key] = mergeDeep2(defaults[key], options[key]);
+ } else {
+ Object.assign(result, { [key]: options[key] });
+ }
+ });
+ return result;
+ }
+ function removeUndefinedProperties2(obj) {
+ for (const key in obj) {
+ if (obj[key] === void 0) {
+ delete obj[key];
+ }
+ }
+ return obj;
+ }
+ function merge2(defaults, route, options) {
+ if (typeof route === "string") {
+ let [method, url] = route.split(" ");
+ options = Object.assign(url ? { method, url } : { url: method }, options);
+ } else {
+ options = Object.assign({}, route);
+ }
+ options.headers = lowercaseKeys2(options.headers);
+ removeUndefinedProperties2(options);
+ removeUndefinedProperties2(options.headers);
+ const mergedOptions = mergeDeep2(defaults || {}, options);
+ if (options.url === "/graphql") {
+ if (defaults && defaults.mediaType.previews?.length) {
+ mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(
+ (preview) => !mergedOptions.mediaType.previews.includes(preview)
+ ).concat(mergedOptions.mediaType.previews);
+ }
+ mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
+ }
+ return mergedOptions;
+ }
+ function addQueryParameters2(url, parameters) {
+ const separator = /\?/.test(url) ? "&" : "?";
+ const names = Object.keys(parameters);
+ if (names.length === 0) {
+ return url;
+ }
+ return url + separator + names.map((name) => {
+ if (name === "q") {
+ return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
+ }
+ return `${name}=${encodeURIComponent(parameters[name])}`;
+ }).join("&");
+ }
+ var urlVariableRegex2 = /\{[^}]+\}/g;
+ function removeNonChars2(variableName) {
+ return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
+ }
+ function extractUrlVariableNames2(url) {
+ const matches = url.match(urlVariableRegex2);
+ if (!matches) {
+ return [];
+ }
+ return matches.map(removeNonChars2).reduce((a, b) => a.concat(b), []);
+ }
+ function omit2(object, keysToOmit) {
+ const result = { __proto__: null };
+ for (const key of Object.keys(object)) {
+ if (keysToOmit.indexOf(key) === -1) {
+ result[key] = object[key];
+ }
+ }
+ return result;
+ }
+ function encodeReserved2(str) {
+ return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
+ if (!/%[0-9A-Fa-f]/.test(part)) {
+ part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
+ }
+ return part;
+ }).join("");
+ }
+ function encodeUnreserved2(str) {
+ return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
+ return "%" + c.charCodeAt(0).toString(16).toUpperCase();
+ });
+ }
+ function encodeValue2(operator, value, key) {
+ value = operator === "+" || operator === "#" ? encodeReserved2(value) : encodeUnreserved2(value);
+ if (key) {
+ return encodeUnreserved2(key) + "=" + value;
+ } else {
+ return value;
+ }
+ }
+ function isDefined2(value) {
+ return value !== void 0 && value !== null;
+ }
+ function isKeyOperator2(operator) {
+ return operator === ";" || operator === "&" || operator === "?";
+ }
+ function getValues2(context, operator, key, modifier) {
+ var value = context[key], result = [];
+ if (isDefined2(value) && value !== "") {
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
+ value = value.toString();
+ if (modifier && modifier !== "*") {
+ value = value.substring(0, parseInt(modifier, 10));
+ }
+ result.push(
+ encodeValue2(operator, value, isKeyOperator2(operator) ? key : "")
+ );
+ } else {
+ if (modifier === "*") {
+ if (Array.isArray(value)) {
+ value.filter(isDefined2).forEach(function(value2) {
+ result.push(
+ encodeValue2(operator, value2, isKeyOperator2(operator) ? key : "")
+ );
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined2(value[k])) {
+ result.push(encodeValue2(operator, value[k], k));
+ }
+ });
+ }
+ } else {
+ const tmp = [];
+ if (Array.isArray(value)) {
+ value.filter(isDefined2).forEach(function(value2) {
+ tmp.push(encodeValue2(operator, value2));
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined2(value[k])) {
+ tmp.push(encodeUnreserved2(k));
+ tmp.push(encodeValue2(operator, value[k].toString()));
+ }
+ });
+ }
+ if (isKeyOperator2(operator)) {
+ result.push(encodeUnreserved2(key) + "=" + tmp.join(","));
+ } else if (tmp.length !== 0) {
+ result.push(tmp.join(","));
+ }
+ }
+ }
+ } else {
+ if (operator === ";") {
+ if (isDefined2(value)) {
+ result.push(encodeUnreserved2(key));
+ }
+ } else if (value === "" && (operator === "&" || operator === "?")) {
+ result.push(encodeUnreserved2(key) + "=");
+ } else if (value === "") {
+ result.push("");
+ }
+ }
+ return result;
+ }
+ function parseUrl2(template) {
+ return {
+ expand: expand2.bind(null, template)
+ };
+ }
+ function expand2(template, context) {
+ var operators = ["+", "#", ".", "/", ";", "?", "&"];
+ template = template.replace(
+ /\{([^\{\}]+)\}|([^\{\}]+)/g,
+ function(_, expression, literal) {
+ if (expression) {
+ let operator = "";
+ const values = [];
+ if (operators.indexOf(expression.charAt(0)) !== -1) {
+ operator = expression.charAt(0);
+ expression = expression.substr(1);
+ }
+ expression.split(/,/g).forEach(function(variable) {
+ var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
+ values.push(getValues2(context, operator, tmp[1], tmp[2] || tmp[3]));
+ });
+ if (operator && operator !== "+") {
+ var separator = ",";
+ if (operator === "?") {
+ separator = "&";
+ } else if (operator !== "#") {
+ separator = operator;
+ }
+ return (values.length !== 0 ? operator : "") + values.join(separator);
+ } else {
+ return values.join(",");
+ }
+ } else {
+ return encodeReserved2(literal);
+ }
+ }
+ );
+ if (template === "/") {
+ return template;
+ } else {
+ return template.replace(/\/$/, "");
+ }
+ }
+ function parse3(options) {
+ let method = options.method.toUpperCase();
+ let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
+ let headers = Object.assign({}, options.headers);
+ let body;
+ let parameters = omit2(options, [
+ "method",
+ "baseUrl",
+ "url",
+ "headers",
+ "request",
+ "mediaType"
+ ]);
+ const urlVariableNames = extractUrlVariableNames2(url);
+ url = parseUrl2(url).expand(parameters);
+ if (!/^http/.test(url)) {
+ url = options.baseUrl + url;
+ }
+ const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
+ const remainingParameters = omit2(parameters, omittedParameters);
+ const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
+ if (!isBinaryRequest) {
+ if (options.mediaType.format) {
+ headers.accept = headers.accept.split(/,/).map(
+ (format) => format.replace(
+ /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
+ `application/vnd$1$2.${options.mediaType.format}`
+ )
+ ).join(",");
+ }
+ if (url.endsWith("/graphql")) {
+ if (options.mediaType.previews?.length) {
+ const previewsFromAcceptHeader = headers.accept.match(/[\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}`;
+ }).join(",");
+ }
+ }
+ }
+ if (["GET", "HEAD"].includes(method)) {
+ url = addQueryParameters2(url, remainingParameters);
+ } else {
+ if ("data" in remainingParameters) {
+ body = remainingParameters.data;
+ } else {
+ if (Object.keys(remainingParameters).length) {
+ body = remainingParameters;
+ }
+ }
+ }
+ if (!headers["content-type"] && typeof body !== "undefined") {
+ headers["content-type"] = "application/json; charset=utf-8";
+ }
+ if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
+ body = "";
+ }
+ return Object.assign(
+ { method, url, headers },
+ typeof body !== "undefined" ? { body } : null,
+ options.request ? { request: options.request } : null
+ );
+ }
+ function endpointWithDefaults2(defaults, route, options) {
+ return parse3(merge2(defaults, route, options));
+ }
+ function withDefaults3(oldDefaults, newDefaults) {
+ const DEFAULTS22 = merge2(oldDefaults, newDefaults);
+ const endpoint22 = endpointWithDefaults2.bind(null, DEFAULTS22);
+ return Object.assign(endpoint22, {
+ DEFAULTS: DEFAULTS22,
+ defaults: withDefaults3.bind(null, DEFAULTS22),
+ merge: merge2.bind(null, DEFAULTS22),
+ parse: parse3
+ });
+ }
+ var endpoint2 = withDefaults3(null, DEFAULTS2);
+ }
+});
+
+// node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request/dist-node/index.js
+var require_dist_node7 = __commonJS({
+ "node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request/dist-node/index.js"(exports2, module2) {
+ "use strict";
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps2 = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+ var dist_src_exports = {};
+ __export2(dist_src_exports, {
+ request: () => request2
+ });
+ module2.exports = __toCommonJS2(dist_src_exports);
+ var import_endpoint2 = require_dist_node6();
+ var import_universal_user_agent3 = require_dist_node();
+ var VERSION3 = "8.2.0";
+ function isPlainObject3(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+ }
+ var import_request_error2 = require_dist_node4();
+ function getBufferResponse2(response) {
+ return response.arrayBuffer();
+ }
+ function fetchWrapper2(requestOptions) {
+ var _a, _b, _c;
+ const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
+ const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
+ if (isPlainObject3(requestOptions.body) || Array.isArray(requestOptions.body)) {
+ requestOptions.body = JSON.stringify(requestOptions.body);
+ }
+ let headers = {};
+ let status;
+ let url;
+ let { fetch } = globalThis;
+ if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {
+ fetch = requestOptions.request.fetch;
+ }
+ if (!fetch) {
+ throw new Error(
+ "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
+ );
+ }
+ return fetch(requestOptions.url, {
+ method: requestOptions.method,
+ body: requestOptions.body,
+ headers: requestOptions.headers,
+ signal: (_c = requestOptions.request) == null ? void 0 : _c.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" }
+ }).then(async (response) => {
+ url = response.url;
+ status = response.status;
+ for (const keyAndValue of response.headers) {
+ headers[keyAndValue[0]] = keyAndValue[1];
+ }
+ if ("deprecation" in headers) {
+ 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}` : ""}`
+ );
+ }
+ if (status === 204 || status === 205) {
+ return;
+ }
+ if (requestOptions.method === "HEAD") {
+ if (status < 400) {
+ return;
+ }
+ throw new import_request_error2.RequestError(response.statusText, status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: void 0
+ },
+ request: requestOptions
+ });
+ }
+ if (status === 304) {
+ throw new import_request_error2.RequestError("Not modified", status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: await getResponseData2(response)
+ },
+ request: requestOptions
+ });
+ }
+ if (status >= 400) {
+ const data = await getResponseData2(response);
+ const error = new import_request_error2.RequestError(toErrorMessage2(data), status, {
+ response: {
+ url,
+ status,
+ headers,
+ data
+ },
+ request: requestOptions
+ });
+ throw error;
+ }
+ return parseSuccessResponseBody ? await getResponseData2(response) : response.body;
+ }).then((data) => {
+ return {
+ status,
+ url,
+ headers,
+ data
+ };
+ }).catch((error) => {
+ if (error instanceof import_request_error2.RequestError)
+ throw error;
+ else if (error.name === "AbortError")
+ throw error;
+ let message = error.message;
+ if (error.name === "TypeError" && "cause" in error) {
+ if (error.cause instanceof Error) {
+ message = error.cause.message;
+ } else if (typeof error.cause === "string") {
+ message = error.cause;
+ }
+ }
+ throw new import_request_error2.RequestError(message, 500, {
+ request: requestOptions
+ });
+ });
+ }
+ async function getResponseData2(response) {
+ const contentType = response.headers.get("content-type");
+ if (/application\/json/.test(contentType)) {
+ return response.json().catch(() => response.text()).catch(() => "");
+ }
+ if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
+ return response.text();
+ }
+ return getBufferResponse2(response);
+ }
+ function toErrorMessage2(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(", ")}${suffix}`;
+ }
+ return `${data.message}${suffix}`;
+ }
+ return `Unknown error: ${JSON.stringify(data)}`;
+ }
+ function withDefaults3(oldEndpoint, newDefaults) {
+ const endpoint2 = oldEndpoint.defaults(newDefaults);
+ const newApi = function(route, parameters) {
+ const endpointOptions = endpoint2.merge(route, parameters);
+ if (!endpointOptions.request || !endpointOptions.request.hook) {
+ return fetchWrapper2(endpoint2.parse(endpointOptions));
+ }
+ const request22 = (route2, parameters2) => {
+ return fetchWrapper2(
+ endpoint2.parse(endpoint2.merge(route2, parameters2))
+ );
+ };
+ Object.assign(request22, {
+ endpoint: endpoint2,
+ defaults: withDefaults3.bind(null, endpoint2)
+ });
+ return endpointOptions.request.hook(request22, endpointOptions);
+ };
+ return Object.assign(newApi, {
+ endpoint: endpoint2,
+ defaults: withDefaults3.bind(null, endpoint2)
+ });
+ }
+ var request2 = withDefaults3(import_endpoint2.endpoint, {
+ headers: {
+ "user-agent": `octokit-request.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`
+ }
+ });
+ }
+});
+
+// node_modules/btoa-lite/btoa-node.js
+var require_btoa_node = __commonJS({
+ "node_modules/btoa-lite/btoa-node.js"(exports2, module2) {
+ module2.exports = function btoa(str) {
+ return new Buffer(str).toString("base64");
+ };
+ }
+});
+
+// node_modules/@octokit/auth-oauth-user/node_modules/@octokit/endpoint/dist-node/index.js
+var require_dist_node8 = __commonJS({
+ "node_modules/@octokit/auth-oauth-user/node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
+ "use strict";
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps2 = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+ var dist_src_exports = {};
+ __export2(dist_src_exports, {
+ endpoint: () => endpoint2
+ });
+ module2.exports = __toCommonJS2(dist_src_exports);
+ var import_universal_user_agent3 = require_dist_node();
+ var VERSION3 = "9.0.4";
+ var userAgent2 = `octokit-endpoint.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`;
+ var DEFAULTS2 = {
+ method: "GET",
+ baseUrl: "https://api.github.com",
+ headers: {
+ accept: "application/vnd.github.v3+json",
+ "user-agent": userAgent2
+ },
+ mediaType: {
+ format: ""
+ }
+ };
+ function lowercaseKeys2(object) {
+ if (!object) {
+ return {};
+ }
+ return Object.keys(object).reduce((newObj, key) => {
+ newObj[key.toLowerCase()] = object[key];
+ return newObj;
+ }, {});
+ }
+ function isPlainObject3(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+ }
+ function mergeDeep2(defaults, options) {
+ const result = Object.assign({}, defaults);
+ Object.keys(options).forEach((key) => {
+ if (isPlainObject3(options[key])) {
+ if (!(key in defaults))
+ Object.assign(result, { [key]: options[key] });
+ else
+ result[key] = mergeDeep2(defaults[key], options[key]);
+ } else {
+ Object.assign(result, { [key]: options[key] });
+ }
+ });
+ return result;
+ }
+ function removeUndefinedProperties2(obj) {
+ for (const key in obj) {
+ if (obj[key] === void 0) {
+ delete obj[key];
+ }
+ }
+ return obj;
+ }
+ function merge2(defaults, route, options) {
+ if (typeof route === "string") {
+ let [method, url] = route.split(" ");
+ options = Object.assign(url ? { method, url } : { url: method }, options);
+ } else {
+ options = Object.assign({}, route);
+ }
+ options.headers = lowercaseKeys2(options.headers);
+ removeUndefinedProperties2(options);
+ removeUndefinedProperties2(options.headers);
+ const mergedOptions = mergeDeep2(defaults || {}, options);
+ if (options.url === "/graphql") {
+ if (defaults && defaults.mediaType.previews?.length) {
+ mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(
+ (preview) => !mergedOptions.mediaType.previews.includes(preview)
+ ).concat(mergedOptions.mediaType.previews);
+ }
+ mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
+ }
+ return mergedOptions;
+ }
+ function addQueryParameters2(url, parameters) {
+ const separator = /\?/.test(url) ? "&" : "?";
+ const names = Object.keys(parameters);
+ if (names.length === 0) {
+ return url;
+ }
+ return url + separator + names.map((name) => {
+ if (name === "q") {
+ return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
+ }
+ return `${name}=${encodeURIComponent(parameters[name])}`;
+ }).join("&");
+ }
+ var urlVariableRegex2 = /\{[^}]+\}/g;
+ function removeNonChars2(variableName) {
+ return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
+ }
+ function extractUrlVariableNames2(url) {
+ const matches = url.match(urlVariableRegex2);
+ if (!matches) {
+ return [];
+ }
+ return matches.map(removeNonChars2).reduce((a, b) => a.concat(b), []);
+ }
+ function omit2(object, keysToOmit) {
+ const result = { __proto__: null };
+ for (const key of Object.keys(object)) {
+ if (keysToOmit.indexOf(key) === -1) {
+ result[key] = object[key];
+ }
+ }
+ return result;
+ }
+ function encodeReserved2(str) {
+ return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
+ if (!/%[0-9A-Fa-f]/.test(part)) {
+ part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
+ }
+ return part;
+ }).join("");
+ }
+ function encodeUnreserved2(str) {
+ return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
+ return "%" + c.charCodeAt(0).toString(16).toUpperCase();
+ });
+ }
+ function encodeValue2(operator, value, key) {
+ value = operator === "+" || operator === "#" ? encodeReserved2(value) : encodeUnreserved2(value);
+ if (key) {
+ return encodeUnreserved2(key) + "=" + value;
+ } else {
+ return value;
+ }
+ }
+ function isDefined2(value) {
+ return value !== void 0 && value !== null;
+ }
+ function isKeyOperator2(operator) {
+ return operator === ";" || operator === "&" || operator === "?";
+ }
+ function getValues2(context, operator, key, modifier) {
+ var value = context[key], result = [];
+ if (isDefined2(value) && value !== "") {
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
+ value = value.toString();
+ if (modifier && modifier !== "*") {
+ value = value.substring(0, parseInt(modifier, 10));
+ }
+ result.push(
+ encodeValue2(operator, value, isKeyOperator2(operator) ? key : "")
+ );
+ } else {
+ if (modifier === "*") {
+ if (Array.isArray(value)) {
+ value.filter(isDefined2).forEach(function(value2) {
+ result.push(
+ encodeValue2(operator, value2, isKeyOperator2(operator) ? key : "")
+ );
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined2(value[k])) {
+ result.push(encodeValue2(operator, value[k], k));
+ }
+ });
+ }
+ } else {
+ const tmp = [];
+ if (Array.isArray(value)) {
+ value.filter(isDefined2).forEach(function(value2) {
+ tmp.push(encodeValue2(operator, value2));
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined2(value[k])) {
+ tmp.push(encodeUnreserved2(k));
+ tmp.push(encodeValue2(operator, value[k].toString()));
+ }
+ });
+ }
+ if (isKeyOperator2(operator)) {
+ result.push(encodeUnreserved2(key) + "=" + tmp.join(","));
+ } else if (tmp.length !== 0) {
+ result.push(tmp.join(","));
+ }
+ }
+ }
+ } else {
+ if (operator === ";") {
+ if (isDefined2(value)) {
+ result.push(encodeUnreserved2(key));
+ }
+ } else if (value === "" && (operator === "&" || operator === "?")) {
+ result.push(encodeUnreserved2(key) + "=");
+ } else if (value === "") {
+ result.push("");
+ }
+ }
+ return result;
+ }
+ function parseUrl2(template) {
+ return {
+ expand: expand2.bind(null, template)
+ };
+ }
+ function expand2(template, context) {
+ var operators = ["+", "#", ".", "/", ";", "?", "&"];
+ template = template.replace(
+ /\{([^\{\}]+)\}|([^\{\}]+)/g,
+ function(_, expression, literal) {
+ if (expression) {
+ let operator = "";
+ const values = [];
+ if (operators.indexOf(expression.charAt(0)) !== -1) {
+ operator = expression.charAt(0);
+ expression = expression.substr(1);
+ }
+ expression.split(/,/g).forEach(function(variable) {
+ var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
+ values.push(getValues2(context, operator, tmp[1], tmp[2] || tmp[3]));
+ });
+ if (operator && operator !== "+") {
+ var separator = ",";
+ if (operator === "?") {
+ separator = "&";
+ } else if (operator !== "#") {
+ separator = operator;
+ }
+ return (values.length !== 0 ? operator : "") + values.join(separator);
+ } else {
+ return values.join(",");
+ }
+ } else {
+ return encodeReserved2(literal);
+ }
+ }
+ );
+ if (template === "/") {
+ return template;
+ } else {
+ return template.replace(/\/$/, "");
+ }
+ }
+ function parse3(options) {
+ let method = options.method.toUpperCase();
+ let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
+ let headers = Object.assign({}, options.headers);
+ let body;
+ let parameters = omit2(options, [
+ "method",
+ "baseUrl",
+ "url",
+ "headers",
+ "request",
+ "mediaType"
+ ]);
+ const urlVariableNames = extractUrlVariableNames2(url);
+ url = parseUrl2(url).expand(parameters);
+ if (!/^http/.test(url)) {
+ url = options.baseUrl + url;
+ }
+ const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
+ const remainingParameters = omit2(parameters, omittedParameters);
+ const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
+ if (!isBinaryRequest) {
+ if (options.mediaType.format) {
+ headers.accept = headers.accept.split(/,/).map(
+ (format) => format.replace(
+ /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
+ `application/vnd$1$2.${options.mediaType.format}`
+ )
+ ).join(",");
+ }
+ if (url.endsWith("/graphql")) {
+ if (options.mediaType.previews?.length) {
+ const previewsFromAcceptHeader = headers.accept.match(/[\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}`;
+ }).join(",");
+ }
+ }
+ }
+ if (["GET", "HEAD"].includes(method)) {
+ url = addQueryParameters2(url, remainingParameters);
+ } else {
+ if ("data" in remainingParameters) {
+ body = remainingParameters.data;
+ } else {
+ if (Object.keys(remainingParameters).length) {
+ body = remainingParameters;
+ }
+ }
+ }
+ if (!headers["content-type"] && typeof body !== "undefined") {
+ headers["content-type"] = "application/json; charset=utf-8";
+ }
+ if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
+ body = "";
+ }
+ return Object.assign(
+ { method, url, headers },
+ typeof body !== "undefined" ? { body } : null,
+ options.request ? { request: options.request } : null
+ );
+ }
+ function endpointWithDefaults2(defaults, route, options) {
+ return parse3(merge2(defaults, route, options));
+ }
+ function withDefaults3(oldDefaults, newDefaults) {
+ const DEFAULTS22 = merge2(oldDefaults, newDefaults);
+ const endpoint22 = endpointWithDefaults2.bind(null, DEFAULTS22);
+ return Object.assign(endpoint22, {
+ DEFAULTS: DEFAULTS22,
+ defaults: withDefaults3.bind(null, DEFAULTS22),
+ merge: merge2.bind(null, DEFAULTS22),
+ parse: parse3
+ });
+ }
+ var endpoint2 = withDefaults3(null, DEFAULTS2);
+ }
+});
+
+// node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-node/index.js
+var require_dist_node9 = __commonJS({
+ "node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request/dist-node/index.js"(exports2, module2) {
+ "use strict";
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps2 = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+ var dist_src_exports = {};
+ __export2(dist_src_exports, {
+ request: () => request2
+ });
+ module2.exports = __toCommonJS2(dist_src_exports);
+ var import_endpoint2 = require_dist_node8();
+ var import_universal_user_agent3 = require_dist_node();
+ var VERSION3 = "8.2.0";
+ function isPlainObject3(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+ }
+ var import_request_error2 = require_dist_node4();
+ function getBufferResponse2(response) {
+ return response.arrayBuffer();
+ }
+ function fetchWrapper2(requestOptions) {
+ var _a, _b, _c;
+ const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
+ const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
+ if (isPlainObject3(requestOptions.body) || Array.isArray(requestOptions.body)) {
+ requestOptions.body = JSON.stringify(requestOptions.body);
+ }
+ let headers = {};
+ let status;
+ let url;
+ let { fetch } = globalThis;
+ if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {
+ fetch = requestOptions.request.fetch;
+ }
+ if (!fetch) {
+ throw new Error(
+ "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
+ );
+ }
+ return fetch(requestOptions.url, {
+ method: requestOptions.method,
+ body: requestOptions.body,
+ headers: requestOptions.headers,
+ signal: (_c = requestOptions.request) == null ? void 0 : _c.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" }
+ }).then(async (response) => {
+ url = response.url;
+ status = response.status;
+ for (const keyAndValue of response.headers) {
+ headers[keyAndValue[0]] = keyAndValue[1];
+ }
+ if ("deprecation" in headers) {
+ 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}` : ""}`
+ );
+ }
+ if (status === 204 || status === 205) {
+ return;
+ }
+ if (requestOptions.method === "HEAD") {
+ if (status < 400) {
+ return;
+ }
+ throw new import_request_error2.RequestError(response.statusText, status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: void 0
+ },
+ request: requestOptions
+ });
+ }
+ if (status === 304) {
+ throw new import_request_error2.RequestError("Not modified", status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: await getResponseData2(response)
+ },
+ request: requestOptions
+ });
+ }
+ if (status >= 400) {
+ const data = await getResponseData2(response);
+ const error = new import_request_error2.RequestError(toErrorMessage2(data), status, {
+ response: {
+ url,
+ status,
+ headers,
+ data
+ },
+ request: requestOptions
+ });
+ throw error;
+ }
+ return parseSuccessResponseBody ? await getResponseData2(response) : response.body;
+ }).then((data) => {
+ return {
+ status,
+ url,
+ headers,
+ data
+ };
+ }).catch((error) => {
+ if (error instanceof import_request_error2.RequestError)
+ throw error;
+ else if (error.name === "AbortError")
+ throw error;
+ let message = error.message;
+ if (error.name === "TypeError" && "cause" in error) {
+ if (error.cause instanceof Error) {
+ message = error.cause.message;
+ } else if (typeof error.cause === "string") {
+ message = error.cause;
+ }
+ }
+ throw new import_request_error2.RequestError(message, 500, {
+ request: requestOptions
+ });
+ });
+ }
+ async function getResponseData2(response) {
+ const contentType = response.headers.get("content-type");
+ if (/application\/json/.test(contentType)) {
+ return response.json().catch(() => response.text()).catch(() => "");
+ }
+ if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
+ return response.text();
+ }
+ return getBufferResponse2(response);
+ }
+ function toErrorMessage2(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(", ")}${suffix}`;
+ }
+ return `${data.message}${suffix}`;
+ }
+ return `Unknown error: ${JSON.stringify(data)}`;
+ }
+ function withDefaults3(oldEndpoint, newDefaults) {
+ const endpoint2 = oldEndpoint.defaults(newDefaults);
+ const newApi = function(route, parameters) {
+ const endpointOptions = endpoint2.merge(route, parameters);
+ if (!endpointOptions.request || !endpointOptions.request.hook) {
+ return fetchWrapper2(endpoint2.parse(endpointOptions));
+ }
+ const request22 = (route2, parameters2) => {
+ return fetchWrapper2(
+ endpoint2.parse(endpoint2.merge(route2, parameters2))
+ );
+ };
+ Object.assign(request22, {
+ endpoint: endpoint2,
+ defaults: withDefaults3.bind(null, endpoint2)
+ });
+ return endpointOptions.request.hook(request22, endpointOptions);
+ };
+ return Object.assign(newApi, {
+ endpoint: endpoint2,
+ defaults: withDefaults3.bind(null, endpoint2)
+ });
+ }
+ var request2 = withDefaults3(import_endpoint2.endpoint, {
+ headers: {
+ "user-agent": `octokit-request.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`
+ }
+ });
+ }
+});
+
+// node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-node/index.js
+var require_dist_node10 = __commonJS({
+ "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
+ "use strict";
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps2 = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+ var dist_src_exports = {};
+ __export2(dist_src_exports, {
+ endpoint: () => endpoint2
+ });
+ module2.exports = __toCommonJS2(dist_src_exports);
+ var import_universal_user_agent3 = require_dist_node();
+ var VERSION3 = "9.0.4";
+ var userAgent2 = `octokit-endpoint.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`;
+ var DEFAULTS2 = {
+ method: "GET",
+ baseUrl: "https://api.github.com",
+ headers: {
+ accept: "application/vnd.github.v3+json",
+ "user-agent": userAgent2
+ },
+ mediaType: {
+ format: ""
+ }
+ };
+ function lowercaseKeys2(object) {
+ if (!object) {
+ return {};
+ }
+ return Object.keys(object).reduce((newObj, key) => {
+ newObj[key.toLowerCase()] = object[key];
+ return newObj;
+ }, {});
+ }
+ function isPlainObject3(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+ }
+ function mergeDeep2(defaults, options) {
+ const result = Object.assign({}, defaults);
+ Object.keys(options).forEach((key) => {
+ if (isPlainObject3(options[key])) {
+ if (!(key in defaults))
+ Object.assign(result, { [key]: options[key] });
+ else
+ result[key] = mergeDeep2(defaults[key], options[key]);
+ } else {
+ Object.assign(result, { [key]: options[key] });
+ }
+ });
+ return result;
+ }
+ function removeUndefinedProperties2(obj) {
+ for (const key in obj) {
+ if (obj[key] === void 0) {
+ delete obj[key];
+ }
+ }
+ return obj;
+ }
+ function merge2(defaults, route, options) {
+ if (typeof route === "string") {
+ let [method, url] = route.split(" ");
+ options = Object.assign(url ? { method, url } : { url: method }, options);
+ } else {
+ options = Object.assign({}, route);
+ }
+ options.headers = lowercaseKeys2(options.headers);
+ removeUndefinedProperties2(options);
+ removeUndefinedProperties2(options.headers);
+ const mergedOptions = mergeDeep2(defaults || {}, options);
+ if (options.url === "/graphql") {
+ if (defaults && defaults.mediaType.previews?.length) {
+ mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(
+ (preview) => !mergedOptions.mediaType.previews.includes(preview)
+ ).concat(mergedOptions.mediaType.previews);
+ }
+ mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
+ }
+ return mergedOptions;
+ }
+ function addQueryParameters2(url, parameters) {
+ const separator = /\?/.test(url) ? "&" : "?";
+ const names = Object.keys(parameters);
+ if (names.length === 0) {
+ return url;
+ }
+ return url + separator + names.map((name) => {
+ if (name === "q") {
+ return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
+ }
+ return `${name}=${encodeURIComponent(parameters[name])}`;
+ }).join("&");
+ }
+ var urlVariableRegex2 = /\{[^}]+\}/g;
+ function removeNonChars2(variableName) {
+ return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
+ }
+ function extractUrlVariableNames2(url) {
+ const matches = url.match(urlVariableRegex2);
+ if (!matches) {
+ return [];
+ }
+ return matches.map(removeNonChars2).reduce((a, b) => a.concat(b), []);
+ }
+ function omit2(object, keysToOmit) {
+ const result = { __proto__: null };
+ for (const key of Object.keys(object)) {
+ if (keysToOmit.indexOf(key) === -1) {
+ result[key] = object[key];
+ }
+ }
+ return result;
+ }
+ function encodeReserved2(str) {
+ return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
+ if (!/%[0-9A-Fa-f]/.test(part)) {
+ part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
+ }
+ return part;
+ }).join("");
+ }
+ function encodeUnreserved2(str) {
+ return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
+ return "%" + c.charCodeAt(0).toString(16).toUpperCase();
+ });
+ }
+ function encodeValue2(operator, value, key) {
+ value = operator === "+" || operator === "#" ? encodeReserved2(value) : encodeUnreserved2(value);
+ if (key) {
+ return encodeUnreserved2(key) + "=" + value;
+ } else {
+ return value;
+ }
+ }
+ function isDefined2(value) {
+ return value !== void 0 && value !== null;
+ }
+ function isKeyOperator2(operator) {
+ return operator === ";" || operator === "&" || operator === "?";
+ }
+ function getValues2(context, operator, key, modifier) {
+ var value = context[key], result = [];
+ if (isDefined2(value) && value !== "") {
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
+ value = value.toString();
+ if (modifier && modifier !== "*") {
+ value = value.substring(0, parseInt(modifier, 10));
+ }
+ result.push(
+ encodeValue2(operator, value, isKeyOperator2(operator) ? key : "")
+ );
+ } else {
+ if (modifier === "*") {
+ if (Array.isArray(value)) {
+ value.filter(isDefined2).forEach(function(value2) {
+ result.push(
+ encodeValue2(operator, value2, isKeyOperator2(operator) ? key : "")
+ );
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined2(value[k])) {
+ result.push(encodeValue2(operator, value[k], k));
+ }
+ });
+ }
+ } else {
+ const tmp = [];
+ if (Array.isArray(value)) {
+ value.filter(isDefined2).forEach(function(value2) {
+ tmp.push(encodeValue2(operator, value2));
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined2(value[k])) {
+ tmp.push(encodeUnreserved2(k));
+ tmp.push(encodeValue2(operator, value[k].toString()));
+ }
+ });
+ }
+ if (isKeyOperator2(operator)) {
+ result.push(encodeUnreserved2(key) + "=" + tmp.join(","));
+ } else if (tmp.length !== 0) {
+ result.push(tmp.join(","));
+ }
+ }
+ }
+ } else {
+ if (operator === ";") {
+ if (isDefined2(value)) {
+ result.push(encodeUnreserved2(key));
+ }
+ } else if (value === "" && (operator === "&" || operator === "?")) {
+ result.push(encodeUnreserved2(key) + "=");
+ } else if (value === "") {
+ result.push("");
+ }
+ }
+ return result;
+ }
+ function parseUrl2(template) {
+ return {
+ expand: expand2.bind(null, template)
+ };
+ }
+ function expand2(template, context) {
+ var operators = ["+", "#", ".", "/", ";", "?", "&"];
+ template = template.replace(
+ /\{([^\{\}]+)\}|([^\{\}]+)/g,
+ function(_, expression, literal) {
+ if (expression) {
+ let operator = "";
+ const values = [];
+ if (operators.indexOf(expression.charAt(0)) !== -1) {
+ operator = expression.charAt(0);
+ expression = expression.substr(1);
+ }
+ expression.split(/,/g).forEach(function(variable) {
+ var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
+ values.push(getValues2(context, operator, tmp[1], tmp[2] || tmp[3]));
+ });
+ if (operator && operator !== "+") {
+ var separator = ",";
+ if (operator === "?") {
+ separator = "&";
+ } else if (operator !== "#") {
+ separator = operator;
+ }
+ return (values.length !== 0 ? operator : "") + values.join(separator);
+ } else {
+ return values.join(",");
+ }
+ } else {
+ return encodeReserved2(literal);
+ }
+ }
+ );
+ if (template === "/") {
+ return template;
+ } else {
+ return template.replace(/\/$/, "");
+ }
+ }
+ function parse3(options) {
+ let method = options.method.toUpperCase();
+ let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
+ let headers = Object.assign({}, options.headers);
+ let body;
+ let parameters = omit2(options, [
+ "method",
+ "baseUrl",
+ "url",
+ "headers",
+ "request",
+ "mediaType"
+ ]);
+ const urlVariableNames = extractUrlVariableNames2(url);
+ url = parseUrl2(url).expand(parameters);
+ if (!/^http/.test(url)) {
+ url = options.baseUrl + url;
+ }
+ const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
+ const remainingParameters = omit2(parameters, omittedParameters);
+ const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
+ if (!isBinaryRequest) {
+ if (options.mediaType.format) {
+ headers.accept = headers.accept.split(/,/).map(
+ (format) => format.replace(
+ /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
+ `application/vnd$1$2.${options.mediaType.format}`
+ )
+ ).join(",");
+ }
+ if (url.endsWith("/graphql")) {
+ if (options.mediaType.previews?.length) {
+ const previewsFromAcceptHeader = headers.accept.match(/[\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}`;
+ }).join(",");
+ }
+ }
+ }
+ if (["GET", "HEAD"].includes(method)) {
+ url = addQueryParameters2(url, remainingParameters);
+ } else {
+ if ("data" in remainingParameters) {
+ body = remainingParameters.data;
+ } else {
+ if (Object.keys(remainingParameters).length) {
+ body = remainingParameters;
+ }
+ }
+ }
+ if (!headers["content-type"] && typeof body !== "undefined") {
+ headers["content-type"] = "application/json; charset=utf-8";
+ }
+ if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
+ body = "";
+ }
+ return Object.assign(
+ { method, url, headers },
+ typeof body !== "undefined" ? { body } : null,
+ options.request ? { request: options.request } : null
+ );
+ }
+ function endpointWithDefaults2(defaults, route, options) {
+ return parse3(merge2(defaults, route, options));
+ }
+ function withDefaults3(oldDefaults, newDefaults) {
+ const DEFAULTS22 = merge2(oldDefaults, newDefaults);
+ const endpoint22 = endpointWithDefaults2.bind(null, DEFAULTS22);
+ return Object.assign(endpoint22, {
+ DEFAULTS: DEFAULTS22,
+ defaults: withDefaults3.bind(null, DEFAULTS22),
+ merge: merge2.bind(null, DEFAULTS22),
+ parse: parse3
+ });
+ }
+ var endpoint2 = withDefaults3(null, DEFAULTS2);
+ }
+});
+
+// node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-node/index.js
+var require_dist_node11 = __commonJS({
+ "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request/dist-node/index.js"(exports2, module2) {
+ "use strict";
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps2 = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+ var dist_src_exports = {};
+ __export2(dist_src_exports, {
+ request: () => request2
+ });
+ module2.exports = __toCommonJS2(dist_src_exports);
+ var import_endpoint2 = require_dist_node10();
+ var import_universal_user_agent3 = require_dist_node();
+ var VERSION3 = "8.2.0";
+ function isPlainObject3(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+ }
+ var import_request_error2 = require_dist_node4();
+ function getBufferResponse2(response) {
+ return response.arrayBuffer();
+ }
+ function fetchWrapper2(requestOptions) {
+ var _a, _b, _c;
+ const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
+ const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
+ if (isPlainObject3(requestOptions.body) || Array.isArray(requestOptions.body)) {
+ requestOptions.body = JSON.stringify(requestOptions.body);
+ }
+ let headers = {};
+ let status;
+ let url;
+ let { fetch } = globalThis;
+ if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {
+ fetch = requestOptions.request.fetch;
+ }
+ if (!fetch) {
+ throw new Error(
+ "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
+ );
+ }
+ return fetch(requestOptions.url, {
+ method: requestOptions.method,
+ body: requestOptions.body,
+ headers: requestOptions.headers,
+ signal: (_c = requestOptions.request) == null ? void 0 : _c.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" }
+ }).then(async (response) => {
+ url = response.url;
+ status = response.status;
+ for (const keyAndValue of response.headers) {
+ headers[keyAndValue[0]] = keyAndValue[1];
+ }
+ if ("deprecation" in headers) {
+ 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}` : ""}`
+ );
+ }
+ if (status === 204 || status === 205) {
+ return;
+ }
+ if (requestOptions.method === "HEAD") {
+ if (status < 400) {
+ return;
+ }
+ throw new import_request_error2.RequestError(response.statusText, status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: void 0
+ },
+ request: requestOptions
+ });
+ }
+ if (status === 304) {
+ throw new import_request_error2.RequestError("Not modified", status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: await getResponseData2(response)
+ },
+ request: requestOptions
+ });
+ }
+ if (status >= 400) {
+ const data = await getResponseData2(response);
+ const error = new import_request_error2.RequestError(toErrorMessage2(data), status, {
+ response: {
+ url,
+ status,
+ headers,
+ data
+ },
+ request: requestOptions
+ });
+ throw error;
+ }
+ return parseSuccessResponseBody ? await getResponseData2(response) : response.body;
+ }).then((data) => {
+ return {
+ status,
+ url,
+ headers,
+ data
+ };
+ }).catch((error) => {
+ if (error instanceof import_request_error2.RequestError)
+ throw error;
+ else if (error.name === "AbortError")
+ throw error;
+ let message = error.message;
+ if (error.name === "TypeError" && "cause" in error) {
+ if (error.cause instanceof Error) {
+ message = error.cause.message;
+ } else if (typeof error.cause === "string") {
+ message = error.cause;
+ }
+ }
+ throw new import_request_error2.RequestError(message, 500, {
+ request: requestOptions
+ });
+ });
+ }
+ async function getResponseData2(response) {
+ const contentType = response.headers.get("content-type");
+ if (/application\/json/.test(contentType)) {
+ return response.json().catch(() => response.text()).catch(() => "");
+ }
+ if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
+ return response.text();
+ }
+ return getBufferResponse2(response);
+ }
+ function toErrorMessage2(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(", ")}${suffix}`;
+ }
+ return `${data.message}${suffix}`;
+ }
+ return `Unknown error: ${JSON.stringify(data)}`;
+ }
+ function withDefaults3(oldEndpoint, newDefaults) {
+ const endpoint2 = oldEndpoint.defaults(newDefaults);
+ const newApi = function(route, parameters) {
+ const endpointOptions = endpoint2.merge(route, parameters);
+ if (!endpointOptions.request || !endpointOptions.request.hook) {
+ return fetchWrapper2(endpoint2.parse(endpointOptions));
+ }
+ const request22 = (route2, parameters2) => {
+ return fetchWrapper2(
+ endpoint2.parse(endpoint2.merge(route2, parameters2))
+ );
+ };
+ Object.assign(request22, {
+ endpoint: endpoint2,
+ defaults: withDefaults3.bind(null, endpoint2)
+ });
+ return endpointOptions.request.hook(request22, endpointOptions);
+ };
+ return Object.assign(newApi, {
+ endpoint: endpoint2,
+ defaults: withDefaults3.bind(null, endpoint2)
+ });
+ }
+ var request2 = withDefaults3(import_endpoint2.endpoint, {
+ headers: {
+ "user-agent": `octokit-request.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`
+ }
+ });
+ }
+});
+
+// node_modules/@octokit/oauth-authorization-url/dist-node/index.js
+var require_dist_node12 = __commonJS({
+ "node_modules/@octokit/oauth-authorization-url/dist-node/index.js"(exports2, module2) {
+ "use strict";
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps2 = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+ var dist_src_exports = {};
+ __export2(dist_src_exports, {
+ oauthAuthorizationUrl: () => oauthAuthorizationUrl
+ });
+ module2.exports = __toCommonJS2(dist_src_exports);
+ function oauthAuthorizationUrl(options) {
+ const clientType = options.clientType || "oauth-app";
+ const baseUrl2 = options.baseUrl || "https://github.com";
+ const result = {
+ clientType,
+ allowSignup: options.allowSignup === false ? false : true,
+ clientId: options.clientId,
+ login: options.login || null,
+ redirectUrl: options.redirectUrl || null,
+ state: options.state || Math.random().toString(36).substr(2),
+ url: ""
+ };
+ if (clientType === "oauth-app") {
+ const scopes = "scopes" in options ? options.scopes : [];
+ result.scopes = typeof scopes === "string" ? scopes.split(/[,\s]+/).filter(Boolean) : scopes;
+ }
+ result.url = urlBuilderAuthorize(`${baseUrl2}/login/oauth/authorize`, result);
+ return result;
+ }
+ function urlBuilderAuthorize(base, options) {
+ const map = {
+ allowSignup: "allow_signup",
+ clientId: "client_id",
+ login: "login",
+ redirectUrl: "redirect_uri",
+ scopes: "scope",
+ state: "state"
+ };
+ let url = base;
+ Object.keys(map).filter((k) => options[k] !== null).filter((k) => {
+ if (k !== "scopes")
+ return true;
+ if (options.clientType === "github-app")
+ return false;
+ return !Array.isArray(options[k]) || options[k].length > 0;
+ }).map((key) => [map[key], `${options[key]}`]).forEach(([key, value], index) => {
+ url += index === 0 ? `?` : "&";
+ url += `${key}=${encodeURIComponent(value)}`;
+ });
+ return url;
+ }
+ }
+});
+
+// node_modules/@octokit/oauth-methods/node_modules/@octokit/endpoint/dist-node/index.js
+var require_dist_node13 = __commonJS({
+ "node_modules/@octokit/oauth-methods/node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
+ "use strict";
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps2 = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+ var dist_src_exports = {};
+ __export2(dist_src_exports, {
+ endpoint: () => endpoint2
+ });
+ module2.exports = __toCommonJS2(dist_src_exports);
+ var import_universal_user_agent3 = require_dist_node();
+ var VERSION3 = "9.0.4";
+ var userAgent2 = `octokit-endpoint.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`;
+ var DEFAULTS2 = {
+ method: "GET",
+ baseUrl: "https://api.github.com",
+ headers: {
+ accept: "application/vnd.github.v3+json",
+ "user-agent": userAgent2
+ },
+ mediaType: {
+ format: ""
+ }
+ };
+ function lowercaseKeys2(object) {
+ if (!object) {
+ return {};
+ }
+ return Object.keys(object).reduce((newObj, key) => {
+ newObj[key.toLowerCase()] = object[key];
+ return newObj;
+ }, {});
+ }
+ function isPlainObject3(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+ }
+ function mergeDeep2(defaults, options) {
+ const result = Object.assign({}, defaults);
+ Object.keys(options).forEach((key) => {
+ if (isPlainObject3(options[key])) {
+ if (!(key in defaults))
+ Object.assign(result, { [key]: options[key] });
+ else
+ result[key] = mergeDeep2(defaults[key], options[key]);
+ } else {
+ Object.assign(result, { [key]: options[key] });
+ }
+ });
+ return result;
+ }
+ function removeUndefinedProperties2(obj) {
+ for (const key in obj) {
+ if (obj[key] === void 0) {
+ delete obj[key];
+ }
+ }
+ return obj;
+ }
+ function merge2(defaults, route, options) {
+ if (typeof route === "string") {
+ let [method, url] = route.split(" ");
+ options = Object.assign(url ? { method, url } : { url: method }, options);
+ } else {
+ options = Object.assign({}, route);
+ }
+ options.headers = lowercaseKeys2(options.headers);
+ removeUndefinedProperties2(options);
+ removeUndefinedProperties2(options.headers);
+ const mergedOptions = mergeDeep2(defaults || {}, options);
+ if (options.url === "/graphql") {
+ if (defaults && defaults.mediaType.previews?.length) {
+ mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(
+ (preview) => !mergedOptions.mediaType.previews.includes(preview)
+ ).concat(mergedOptions.mediaType.previews);
+ }
+ mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
+ }
+ return mergedOptions;
+ }
+ function addQueryParameters2(url, parameters) {
+ const separator = /\?/.test(url) ? "&" : "?";
+ const names = Object.keys(parameters);
+ if (names.length === 0) {
+ return url;
+ }
+ return url + separator + names.map((name) => {
+ if (name === "q") {
+ return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
+ }
+ return `${name}=${encodeURIComponent(parameters[name])}`;
+ }).join("&");
+ }
+ var urlVariableRegex2 = /\{[^}]+\}/g;
+ function removeNonChars2(variableName) {
+ return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
+ }
+ function extractUrlVariableNames2(url) {
+ const matches = url.match(urlVariableRegex2);
+ if (!matches) {
+ return [];
+ }
+ return matches.map(removeNonChars2).reduce((a, b) => a.concat(b), []);
+ }
+ function omit2(object, keysToOmit) {
+ const result = { __proto__: null };
+ for (const key of Object.keys(object)) {
+ if (keysToOmit.indexOf(key) === -1) {
+ result[key] = object[key];
+ }
+ }
+ return result;
+ }
+ function encodeReserved2(str) {
+ return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
+ if (!/%[0-9A-Fa-f]/.test(part)) {
+ part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
+ }
+ return part;
+ }).join("");
+ }
+ function encodeUnreserved2(str) {
+ return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
+ return "%" + c.charCodeAt(0).toString(16).toUpperCase();
+ });
+ }
+ function encodeValue2(operator, value, key) {
+ value = operator === "+" || operator === "#" ? encodeReserved2(value) : encodeUnreserved2(value);
+ if (key) {
+ return encodeUnreserved2(key) + "=" + value;
+ } else {
+ return value;
+ }
+ }
+ function isDefined2(value) {
+ return value !== void 0 && value !== null;
+ }
+ function isKeyOperator2(operator) {
+ return operator === ";" || operator === "&" || operator === "?";
+ }
+ function getValues2(context, operator, key, modifier) {
+ var value = context[key], result = [];
+ if (isDefined2(value) && value !== "") {
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
+ value = value.toString();
+ if (modifier && modifier !== "*") {
+ value = value.substring(0, parseInt(modifier, 10));
+ }
+ result.push(
+ encodeValue2(operator, value, isKeyOperator2(operator) ? key : "")
+ );
+ } else {
+ if (modifier === "*") {
+ if (Array.isArray(value)) {
+ value.filter(isDefined2).forEach(function(value2) {
+ result.push(
+ encodeValue2(operator, value2, isKeyOperator2(operator) ? key : "")
+ );
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined2(value[k])) {
+ result.push(encodeValue2(operator, value[k], k));
+ }
+ });
+ }
+ } else {
+ const tmp = [];
+ if (Array.isArray(value)) {
+ value.filter(isDefined2).forEach(function(value2) {
+ tmp.push(encodeValue2(operator, value2));
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined2(value[k])) {
+ tmp.push(encodeUnreserved2(k));
+ tmp.push(encodeValue2(operator, value[k].toString()));
+ }
+ });
+ }
+ if (isKeyOperator2(operator)) {
+ result.push(encodeUnreserved2(key) + "=" + tmp.join(","));
+ } else if (tmp.length !== 0) {
+ result.push(tmp.join(","));
+ }
+ }
+ }
+ } else {
+ if (operator === ";") {
+ if (isDefined2(value)) {
+ result.push(encodeUnreserved2(key));
+ }
+ } else if (value === "" && (operator === "&" || operator === "?")) {
+ result.push(encodeUnreserved2(key) + "=");
+ } else if (value === "") {
+ result.push("");
+ }
+ }
+ return result;
+ }
+ function parseUrl2(template) {
+ return {
+ expand: expand2.bind(null, template)
+ };
+ }
+ function expand2(template, context) {
+ var operators = ["+", "#", ".", "/", ";", "?", "&"];
+ template = template.replace(
+ /\{([^\{\}]+)\}|([^\{\}]+)/g,
+ function(_, expression, literal) {
+ if (expression) {
+ let operator = "";
+ const values = [];
+ if (operators.indexOf(expression.charAt(0)) !== -1) {
+ operator = expression.charAt(0);
+ expression = expression.substr(1);
+ }
+ expression.split(/,/g).forEach(function(variable) {
+ var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
+ values.push(getValues2(context, operator, tmp[1], tmp[2] || tmp[3]));
+ });
+ if (operator && operator !== "+") {
+ var separator = ",";
+ if (operator === "?") {
+ separator = "&";
+ } else if (operator !== "#") {
+ separator = operator;
+ }
+ return (values.length !== 0 ? operator : "") + values.join(separator);
+ } else {
+ return values.join(",");
+ }
+ } else {
+ return encodeReserved2(literal);
+ }
+ }
+ );
+ if (template === "/") {
+ return template;
+ } else {
+ return template.replace(/\/$/, "");
+ }
+ }
+ function parse3(options) {
+ let method = options.method.toUpperCase();
+ let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
+ let headers = Object.assign({}, options.headers);
+ let body;
+ let parameters = omit2(options, [
+ "method",
+ "baseUrl",
+ "url",
+ "headers",
+ "request",
+ "mediaType"
+ ]);
+ const urlVariableNames = extractUrlVariableNames2(url);
+ url = parseUrl2(url).expand(parameters);
+ if (!/^http/.test(url)) {
+ url = options.baseUrl + url;
+ }
+ const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
+ const remainingParameters = omit2(parameters, omittedParameters);
+ const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
+ if (!isBinaryRequest) {
+ if (options.mediaType.format) {
+ headers.accept = headers.accept.split(/,/).map(
+ (format) => format.replace(
+ /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
+ `application/vnd$1$2.${options.mediaType.format}`
+ )
+ ).join(",");
+ }
+ if (url.endsWith("/graphql")) {
+ if (options.mediaType.previews?.length) {
+ const previewsFromAcceptHeader = headers.accept.match(/[\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}`;
+ }).join(",");
+ }
+ }
+ }
+ if (["GET", "HEAD"].includes(method)) {
+ url = addQueryParameters2(url, remainingParameters);
+ } else {
+ if ("data" in remainingParameters) {
+ body = remainingParameters.data;
+ } else {
+ if (Object.keys(remainingParameters).length) {
+ body = remainingParameters;
+ }
+ }
+ }
+ if (!headers["content-type"] && typeof body !== "undefined") {
+ headers["content-type"] = "application/json; charset=utf-8";
+ }
+ if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
+ body = "";
+ }
+ return Object.assign(
+ { method, url, headers },
+ typeof body !== "undefined" ? { body } : null,
+ options.request ? { request: options.request } : null
+ );
+ }
+ function endpointWithDefaults2(defaults, route, options) {
+ return parse3(merge2(defaults, route, options));
+ }
+ function withDefaults3(oldDefaults, newDefaults) {
+ const DEFAULTS22 = merge2(oldDefaults, newDefaults);
+ const endpoint22 = endpointWithDefaults2.bind(null, DEFAULTS22);
+ return Object.assign(endpoint22, {
+ DEFAULTS: DEFAULTS22,
+ defaults: withDefaults3.bind(null, DEFAULTS22),
+ merge: merge2.bind(null, DEFAULTS22),
+ parse: parse3
+ });
+ }
+ var endpoint2 = withDefaults3(null, DEFAULTS2);
+ }
+});
+
+// node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-node/index.js
+var require_dist_node14 = __commonJS({
+ "node_modules/@octokit/oauth-methods/node_modules/@octokit/request/dist-node/index.js"(exports2, module2) {
+ "use strict";
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps2 = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
+ var dist_src_exports = {};
+ __export2(dist_src_exports, {
+ request: () => request2
+ });
+ module2.exports = __toCommonJS2(dist_src_exports);
+ var import_endpoint2 = require_dist_node13();
+ var import_universal_user_agent3 = require_dist_node();
+ var VERSION3 = "8.2.0";
+ function isPlainObject3(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+ }
+ var import_request_error2 = require_dist_node4();
+ function getBufferResponse2(response) {
+ return response.arrayBuffer();
+ }
+ function fetchWrapper2(requestOptions) {
+ var _a, _b, _c;
+ const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
+ const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
+ if (isPlainObject3(requestOptions.body) || Array.isArray(requestOptions.body)) {
+ requestOptions.body = JSON.stringify(requestOptions.body);
+ }
+ let headers = {};
+ let status;
+ let url;
+ let { fetch } = globalThis;
+ if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {
+ fetch = requestOptions.request.fetch;
+ }
+ if (!fetch) {
+ throw new Error(
+ "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
+ );
+ }
+ return fetch(requestOptions.url, {
+ method: requestOptions.method,
+ body: requestOptions.body,
+ headers: requestOptions.headers,
+ signal: (_c = requestOptions.request) == null ? void 0 : _c.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" }
+ }).then(async (response) => {
+ url = response.url;
+ status = response.status;
+ for (const keyAndValue of response.headers) {
+ headers[keyAndValue[0]] = keyAndValue[1];
+ }
+ if ("deprecation" in headers) {
+ 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}` : ""}`
+ );
+ }
+ if (status === 204 || status === 205) {
+ return;
+ }
+ if (requestOptions.method === "HEAD") {
+ if (status < 400) {
+ return;
+ }
+ throw new import_request_error2.RequestError(response.statusText, status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: void 0
+ },
+ request: requestOptions
+ });
+ }
+ if (status === 304) {
+ throw new import_request_error2.RequestError("Not modified", status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: await getResponseData2(response)
+ },
+ request: requestOptions
+ });
+ }
+ if (status >= 400) {
+ const data = await getResponseData2(response);
+ const error = new import_request_error2.RequestError(toErrorMessage2(data), status, {
+ response: {
+ url,
+ status,
+ headers,
+ data
+ },
+ request: requestOptions
+ });
+ throw error;
+ }
+ return parseSuccessResponseBody ? await getResponseData2(response) : response.body;
+ }).then((data) => {
+ return {
+ status,
+ url,
+ headers,
+ data
+ };
+ }).catch((error) => {
+ if (error instanceof import_request_error2.RequestError)
+ throw error;
+ else if (error.name === "AbortError")
+ throw error;
+ let message = error.message;
+ if (error.name === "TypeError" && "cause" in error) {
+ if (error.cause instanceof Error) {
+ message = error.cause.message;
+ } else if (typeof error.cause === "string") {
+ message = error.cause;
+ }
+ }
+ throw new import_request_error2.RequestError(message, 500, {
+ request: requestOptions
+ });
+ });
+ }
+ async function getResponseData2(response) {
+ const contentType = response.headers.get("content-type");
+ if (/application\/json/.test(contentType)) {
+ return response.json().catch(() => response.text()).catch(() => "");
+ }
+ if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
+ return response.text();
+ }
+ return getBufferResponse2(response);
+ }
+ function toErrorMessage2(data) {
+ if (typeof data === "string")
+ return data;
+ let suffix;
+ if ("documentation_url" in data) {
+ suffix = ` - ${data.documentation_url}`;
+ } else {
+ suffix = "";
}
- result.url = urlBuilderAuthorize(`${baseUrl2}/login/oauth/authorize`, result);
- return result;
+ if ("message" in data) {
+ if (Array.isArray(data.errors)) {
+ return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`;
+ }
+ return `${data.message}${suffix}`;
+ }
+ return `Unknown error: ${JSON.stringify(data)}`;
}
- function urlBuilderAuthorize(base, options) {
- const map = {
- allowSignup: "allow_signup",
- clientId: "client_id",
- login: "login",
- redirectUrl: "redirect_uri",
- scopes: "scope",
- state: "state"
+ function withDefaults3(oldEndpoint, newDefaults) {
+ const endpoint2 = oldEndpoint.defaults(newDefaults);
+ const newApi = function(route, parameters) {
+ const endpointOptions = endpoint2.merge(route, parameters);
+ if (!endpointOptions.request || !endpointOptions.request.hook) {
+ return fetchWrapper2(endpoint2.parse(endpointOptions));
+ }
+ const request22 = (route2, parameters2) => {
+ return fetchWrapper2(
+ endpoint2.parse(endpoint2.merge(route2, parameters2))
+ );
+ };
+ Object.assign(request22, {
+ endpoint: endpoint2,
+ defaults: withDefaults3.bind(null, endpoint2)
+ });
+ return endpointOptions.request.hook(request22, endpointOptions);
};
- let url = base;
- Object.keys(map).filter((k) => options[k] !== null).filter((k) => {
- if (k !== "scopes")
- return true;
- if (options.clientType === "github-app")
- return false;
- return !Array.isArray(options[k]) || options[k].length > 0;
- }).map((key) => [map[key], `${options[key]}`]).forEach(([key, value], index) => {
- url += index === 0 ? `?` : "&";
- url += `${key}=${encodeURIComponent(value)}`;
+ return Object.assign(newApi, {
+ endpoint: endpoint2,
+ defaults: withDefaults3.bind(null, endpoint2)
});
- return url;
}
+ var request2 = withDefaults3(import_endpoint2.endpoint, {
+ headers: {
+ "user-agent": `octokit-request.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`
+ }
+ });
}
});
// node_modules/@octokit/oauth-methods/dist-node/index.js
-var require_dist_node7 = __commonJS({
+var require_dist_node15 = __commonJS({
"node_modules/@octokit/oauth-methods/dist-node/index.js"(exports2, module2) {
"use strict";
var __create2 = Object.create;
@@ -3098,7 +5315,7 @@ var require_dist_node7 = __commonJS({
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
var dist_src_exports = {};
__export2(dist_src_exports, {
- VERSION: () => VERSION,
+ VERSION: () => VERSION3,
checkToken: () => checkToken,
createDeviceCode: () => createDeviceCode,
deleteAuthorization: () => deleteAuthorization,
@@ -3111,10 +5328,10 @@ var require_dist_node7 = __commonJS({
scopeToken: () => scopeToken
});
module2.exports = __toCommonJS2(dist_src_exports);
- var VERSION = "4.0.0";
- var import_oauth_authorization_url = require_dist_node6();
- var import_request3 = require_dist_node5();
- var import_request_error = require_dist_node4();
+ var VERSION3 = "4.0.0";
+ var import_oauth_authorization_url = require_dist_node12();
+ var import_request3 = require_dist_node14();
+ var import_request_error2 = require_dist_node4();
function requestToOAuthBaseUrl(request2) {
const endpointDefaults = request2.endpoint.DEFAULTS;
return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", "");
@@ -3129,7 +5346,7 @@ var require_dist_node7 = __commonJS({
};
const response = await request2(route, withOAuthParameters);
if ("error" in response.data) {
- const error = new import_request_error.RequestError(
+ const error = new import_request_error2.RequestError(
`${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`,
400,
{
@@ -3155,7 +5372,7 @@ var require_dist_node7 = __commonJS({
baseUrl: baseUrl2
});
}
- var import_request22 = require_dist_node5();
+ var import_request22 = require_dist_node14();
async function exchangeWebFlowCode(options) {
const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
import_request22.request;
@@ -3194,7 +5411,7 @@ var require_dist_node7 = __commonJS({
function toTimestamp(apiTimeInMs, expirationInSeconds) {
return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();
}
- var import_request32 = require_dist_node5();
+ var import_request32 = require_dist_node14();
async function createDeviceCode(options) {
const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
import_request32.request;
@@ -3206,7 +5423,7 @@ var require_dist_node7 = __commonJS({
}
return oauthRequest(request2, "POST /login/device/code", parameters);
}
- var import_request4 = require_dist_node5();
+ var import_request4 = require_dist_node14();
async function exchangeDeviceCode(options) {
const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
import_request4.request;
@@ -3246,7 +5463,7 @@ var require_dist_node7 = __commonJS({
function toTimestamp2(apiTimeInMs, expirationInSeconds) {
return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();
}
- var import_request5 = require_dist_node5();
+ var import_request5 = require_dist_node14();
var import_btoa_lite = __toESM2(require_btoa_node());
async function checkToken(options) {
const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
@@ -3274,7 +5491,7 @@ var require_dist_node7 = __commonJS({
}
return { ...response, authentication };
}
- var import_request6 = require_dist_node5();
+ var import_request6 = require_dist_node14();
async function refreshToken(options) {
const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
import_request6.request;
@@ -3306,7 +5523,7 @@ var require_dist_node7 = __commonJS({
function toTimestamp3(apiTimeInMs, expirationInSeconds) {
return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();
}
- var import_request7 = require_dist_node5();
+ var import_request7 = require_dist_node14();
var import_btoa_lite2 = __toESM2(require_btoa_node());
async function scopeToken(options) {
const {
@@ -3341,7 +5558,7 @@ var require_dist_node7 = __commonJS({
);
return { ...response, authentication };
}
- var import_request8 = require_dist_node5();
+ var import_request8 = require_dist_node14();
var import_btoa_lite3 = __toESM2(require_btoa_node());
async function resetToken(options) {
const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
@@ -3371,7 +5588,7 @@ var require_dist_node7 = __commonJS({
}
return { ...response, authentication };
}
- var import_request9 = require_dist_node5();
+ var import_request9 = require_dist_node14();
var import_btoa_lite4 = __toESM2(require_btoa_node());
async function deleteToken(options) {
const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
@@ -3388,7 +5605,7 @@ var require_dist_node7 = __commonJS({
}
);
}
- var import_request10 = require_dist_node5();
+ var import_request10 = require_dist_node14();
var import_btoa_lite5 = __toESM2(require_btoa_node());
async function deleteAuthorization(options) {
const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
@@ -3409,7 +5626,7 @@ var require_dist_node7 = __commonJS({
});
// node_modules/@octokit/auth-oauth-device/dist-node/index.js
-var require_dist_node8 = __commonJS({
+var require_dist_node16 = __commonJS({
"node_modules/@octokit/auth-oauth-device/dist-node/index.js"(exports2, module2) {
"use strict";
var __defProp2 = Object.defineProperty;
@@ -3434,9 +5651,9 @@ var require_dist_node8 = __commonJS({
createOAuthDeviceAuth: () => createOAuthDeviceAuth
});
module2.exports = __toCommonJS2(dist_src_exports);
- var import_universal_user_agent = require_dist_node();
- var import_request3 = require_dist_node5();
- var import_oauth_methods = require_dist_node7();
+ var import_universal_user_agent3 = require_dist_node();
+ var import_request3 = require_dist_node11();
+ var import_oauth_methods = require_dist_node15();
async function getOAuthAccessToken(state, options) {
const cachedAuthentication = getCachedAuthentication(state, options.auth);
if (cachedAuthentication)
@@ -3516,25 +5733,25 @@ var require_dist_node8 = __commonJS({
});
}
async function hook(state, request2, route, parameters) {
- let endpoint = request2.endpoint.merge(
+ let endpoint2 = request2.endpoint.merge(
route,
parameters
);
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request2(endpoint);
+ if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint2.url)) {
+ return request2(endpoint2);
}
const { token } = await getOAuthAccessToken(state, {
request: request2,
auth: { type: "oauth" }
});
- endpoint.headers.authorization = `token ${token}`;
- return request2(endpoint);
+ endpoint2.headers.authorization = `token ${token}`;
+ return request2(endpoint2);
}
- var VERSION = "6.0.1";
+ var VERSION3 = "6.0.1";
function createOAuthDeviceAuth(options) {
const requestWithDefaults = options.request || import_request3.request.defaults({
headers: {
- "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
+ "user-agent": `octokit-auth-oauth-device.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`
}
});
const { request: request2 = requestWithDefaults, ...otherOptions } = options;
@@ -3566,7 +5783,7 @@ var require_dist_node8 = __commonJS({
});
// node_modules/@octokit/auth-oauth-user/dist-node/index.js
-var require_dist_node9 = __commonJS({
+var require_dist_node17 = __commonJS({
"node_modules/@octokit/auth-oauth-user/dist-node/index.js"(exports2, module2) {
"use strict";
var __create2 = Object.create;
@@ -3602,11 +5819,11 @@ var require_dist_node9 = __commonJS({
requiresBasicAuth: () => requiresBasicAuth
});
module2.exports = __toCommonJS2(dist_src_exports);
- var import_universal_user_agent = require_dist_node();
- var import_request3 = require_dist_node5();
- var VERSION = "4.0.1";
- var import_auth_oauth_device = require_dist_node8();
- var import_oauth_methods = require_dist_node7();
+ var import_universal_user_agent3 = require_dist_node();
+ var import_request3 = require_dist_node9();
+ var VERSION3 = "4.0.1";
+ var import_auth_oauth_device = require_dist_node16();
+ var import_oauth_methods = require_dist_node15();
async function getAuthentication(state) {
if ("code" in state.strategyOptions) {
const { authentication } = await (0, import_oauth_methods.exchangeWebFlowCode)({
@@ -3652,7 +5869,7 @@ var require_dist_node9 = __commonJS({
}
throw new Error("[@octokit/auth-oauth-user] Invalid strategy options");
}
- var import_oauth_methods2 = require_dist_node7();
+ var import_oauth_methods2 = require_dist_node15();
async function auth(state, options = {}) {
var _a, _b;
if (!state.authentication) {
@@ -3748,21 +5965,21 @@ var require_dist_node9 = __commonJS({
return url && ROUTES_REQUIRING_BASIC_AUTH.test(url);
}
async function hook(state, request2, route, parameters = {}) {
- const endpoint = request2.endpoint.merge(
+ const endpoint2 = request2.endpoint.merge(
route,
parameters
);
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request2(endpoint);
+ if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint2.url)) {
+ return request2(endpoint2);
}
- if (requiresBasicAuth(endpoint.url)) {
+ if (requiresBasicAuth(endpoint2.url)) {
const credentials = (0, import_btoa_lite.default)(`${state.clientId}:${state.clientSecret}`);
- endpoint.headers.authorization = `basic ${credentials}`;
- return request2(endpoint);
+ endpoint2.headers.authorization = `basic ${credentials}`;
+ return request2(endpoint2);
}
const { token } = state.clientType === "oauth-app" ? await auth({ ...state, request: request2 }) : await auth({ ...state, request: request2 });
- endpoint.headers.authorization = "token " + token;
- return request2(endpoint);
+ endpoint2.headers.authorization = "token " + token;
+ return request2(endpoint2);
}
function createOAuthUserAuth2({
clientId,
@@ -3770,7 +5987,7 @@ var require_dist_node9 = __commonJS({
clientType = "oauth-app",
request: request2 = import_request3.request.defaults({
headers: {
- "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
+ "user-agent": `octokit-auth-oauth-app.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`
}
}),
onTokenCreated,
@@ -3789,12 +6006,12 @@ var require_dist_node9 = __commonJS({
hook: hook.bind(null, state)
});
}
- createOAuthUserAuth2.VERSION = VERSION;
+ createOAuthUserAuth2.VERSION = VERSION3;
}
});
// node_modules/@octokit/auth-oauth-app/dist-node/index.js
-var require_dist_node10 = __commonJS({
+var require_dist_node18 = __commonJS({
"node_modules/@octokit/auth-oauth-app/dist-node/index.js"(exports2, module2) {
"use strict";
var __create2 = Object.create;
@@ -3830,10 +6047,10 @@ var require_dist_node10 = __commonJS({
createOAuthUserAuth: () => import_auth_oauth_user3.createOAuthUserAuth
});
module2.exports = __toCommonJS2(dist_src_exports);
- var import_universal_user_agent = require_dist_node();
- var import_request3 = require_dist_node5();
+ var import_universal_user_agent3 = require_dist_node();
+ var import_request3 = require_dist_node7();
var import_btoa_lite = __toESM2(require_btoa_node());
- var import_auth_oauth_user = require_dist_node9();
+ var import_auth_oauth_user = require_dist_node17();
async function auth(state, authOptions) {
if (authOptions.type === "oauth-app") {
return {
@@ -3871,39 +6088,39 @@ var require_dist_node10 = __commonJS({
return userAuth();
}
var import_btoa_lite2 = __toESM2(require_btoa_node());
- var import_auth_oauth_user2 = require_dist_node9();
+ var import_auth_oauth_user2 = require_dist_node17();
async function hook(state, request2, route, parameters) {
- let endpoint = request2.endpoint.merge(
+ let endpoint2 = request2.endpoint.merge(
route,
parameters
);
- if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) {
- return request2(endpoint);
+ if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint2.url)) {
+ return request2(endpoint2);
}
- if (state.clientType === "github-app" && !(0, import_auth_oauth_user2.requiresBasicAuth)(endpoint.url)) {
+ if (state.clientType === "github-app" && !(0, import_auth_oauth_user2.requiresBasicAuth)(endpoint2.url)) {
throw new Error(
- `[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.`
+ `[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint2.method} ${endpoint2.url}" is not supported.`
);
}
const credentials = (0, import_btoa_lite2.default)(`${state.clientId}:${state.clientSecret}`);
- endpoint.headers.authorization = `basic ${credentials}`;
+ endpoint2.headers.authorization = `basic ${credentials}`;
try {
- return await request2(endpoint);
+ return await request2(endpoint2);
} catch (error) {
if (error.status !== 401)
throw error;
- error.message = `[@octokit/auth-oauth-app] "${endpoint.method} ${endpoint.url}" does not support clientId/clientSecret basic authentication.`;
+ error.message = `[@octokit/auth-oauth-app] "${endpoint2.method} ${endpoint2.url}" does not support clientId/clientSecret basic authentication.`;
throw error;
}
}
- var VERSION = "7.0.1";
- var import_auth_oauth_user3 = require_dist_node9();
+ var VERSION3 = "7.0.1";
+ var import_auth_oauth_user3 = require_dist_node17();
function createOAuthAppAuth(options) {
const state = Object.assign(
{
request: import_request3.request.defaults({
headers: {
- "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
+ "user-agent": `octokit-auth-oauth-app.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`
}
}),
clientType: "oauth-app"
@@ -4755,7 +6972,7 @@ var require_ms = __commonJS({
options = options || {};
var type = typeof val;
if (type === "string" && val.length > 0) {
- return parse2(val);
+ return parse3(val);
} else if (type === "number" && isFinite(val)) {
return options.long ? fmtLong(val) : fmtShort(val);
}
@@ -4763,7 +6980,7 @@ var require_ms = __commonJS({
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
);
};
- function parse2(str) {
+ function parse3(str) {
str = String(str);
if (str.length > 100) {
return;
@@ -5286,7 +7503,7 @@ var require_semver = __commonJS({
var require_parse = __commonJS({
"node_modules/semver/functions/parse.js"(exports2, module2) {
var SemVer = require_semver();
- var parse2 = (version2, options, throwErrors = false) => {
+ var parse3 = (version2, options, throwErrors = false) => {
if (version2 instanceof SemVer) {
return version2;
}
@@ -5299,16 +7516,16 @@ var require_parse = __commonJS({
throw er;
}
};
- module2.exports = parse2;
+ module2.exports = parse3;
}
});
// node_modules/semver/functions/valid.js
var require_valid = __commonJS({
"node_modules/semver/functions/valid.js"(exports2, module2) {
- var parse2 = require_parse();
+ var parse3 = require_parse();
var valid = (version2, options) => {
- const v = parse2(version2, options);
+ const v = parse3(version2, options);
return v ? v.version : null;
};
module2.exports = valid;
@@ -5318,9 +7535,9 @@ var require_valid = __commonJS({
// node_modules/semver/functions/clean.js
var require_clean = __commonJS({
"node_modules/semver/functions/clean.js"(exports2, module2) {
- var parse2 = require_parse();
+ var parse3 = require_parse();
var clean = (version2, options) => {
- const s = parse2(version2.trim().replace(/^[=v]+/, ""), options);
+ const s = parse3(version2.trim().replace(/^[=v]+/, ""), options);
return s ? s.version : null;
};
module2.exports = clean;
@@ -5353,10 +7570,10 @@ var require_inc = __commonJS({
// node_modules/semver/functions/diff.js
var require_diff = __commonJS({
"node_modules/semver/functions/diff.js"(exports2, module2) {
- var parse2 = require_parse();
+ var parse3 = require_parse();
var diff = (version1, version2) => {
- const v12 = parse2(version1, null, true);
- const v2 = parse2(version2, null, true);
+ const v12 = parse3(version1, null, true);
+ const v2 = parse3(version2, null, true);
const comparison = v12.compare(v2);
if (comparison === 0) {
return null;
@@ -5424,9 +7641,9 @@ var require_patch = __commonJS({
// node_modules/semver/functions/prerelease.js
var require_prerelease = __commonJS({
"node_modules/semver/functions/prerelease.js"(exports2, module2) {
- var parse2 = require_parse();
+ var parse3 = require_parse();
var prerelease = (version2, options) => {
- const parsed = parse2(version2, options);
+ const parsed = parse3(version2, options);
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
};
module2.exports = prerelease;
@@ -5598,7 +7815,7 @@ var require_cmp = __commonJS({
var require_coerce = __commonJS({
"node_modules/semver/functions/coerce.js"(exports2, module2) {
var SemVer = require_semver();
- var parse2 = require_parse();
+ var parse3 = require_parse();
var { safeRe: re, t } = require_re();
var coerce = (version2, options) => {
if (version2 instanceof SemVer) {
@@ -5627,7 +7844,7 @@ var require_coerce = __commonJS({
if (match === null) {
return null;
}
- return parse2(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
+ return parse3(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
};
module2.exports = coerce;
}
@@ -7224,7 +9441,7 @@ var require_semver2 = __commonJS({
var constants = require_constants();
var SemVer = require_semver();
var identifiers = require_identifiers();
- var parse2 = require_parse();
+ var parse3 = require_parse();
var valid = require_valid();
var clean = require_clean();
var inc = require_inc();
@@ -7262,7 +9479,7 @@ var require_semver2 = __commonJS({
var simplifyRange = require_simplify();
var subset = require_subset();
module2.exports = {
- parse: parse2,
+ parse: parse3,
valid,
clean,
inc,
@@ -7915,7 +10132,7 @@ var require_lodash5 = __commonJS({
function isObjectLike(value) {
return !!value && typeof value == "object";
}
- function isPlainObject(value) {
+ function isPlainObject3(value) {
if (!isObjectLike(value) || objectToString2.call(value) != objectTag || isHostObject(value)) {
return false;
}
@@ -7926,7 +10143,7 @@ var require_lodash5 = __commonJS({
var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
}
- module2.exports = isPlainObject;
+ module2.exports = isPlainObject3;
}
});
@@ -8039,7 +10256,7 @@ var require_sign = __commonJS({
var isBoolean = require_lodash2();
var isInteger = require_lodash3();
var isNumber = require_lodash4();
- var isPlainObject = require_lodash5();
+ var isPlainObject3 = require_lodash5();
var isString = require_lodash6();
var once = require_lodash7();
var { KeyObject, createSecretKey, createPrivateKey } = require("crypto");
@@ -8058,7 +10275,7 @@ var require_sign = __commonJS({
return isString(value) || Array.isArray(value);
}, message: '"audience" must be a string or array' },
algorithm: { isValid: includes.bind(null, SUPPORTED_ALGS), message: '"algorithm" must be a valid string enum value' },
- header: { isValid: isPlainObject, message: '"header" must be an object' },
+ header: { isValid: isPlainObject3, message: '"header" must be an object' },
encoding: { isValid: isString, message: '"encoding" must be a string' },
issuer: { isValid: isString, message: '"issuer" must be a string' },
subject: { isValid: isString, message: '"subject" must be a string' },
@@ -8075,7 +10292,7 @@ var require_sign = __commonJS({
nbf: { isValid: isNumber, message: '"nbf" should be a number of seconds' }
};
function validate2(schema, allowUnknown, object, parameterName) {
- if (!isPlainObject(object)) {
+ if (!isPlainObject3(object)) {
throw new Error('Expected "' + parameterName + '" to be a plain object.');
}
Object.keys(object).forEach(function(key) {
@@ -8268,7 +10485,7 @@ var require_jsonwebtoken = __commonJS({
});
// node_modules/universal-github-app-jwt/dist-node/index.js
-var require_dist_node11 = __commonJS({
+var require_dist_node19 = __commonJS({
"node_modules/universal-github-app-jwt/dist-node/index.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
@@ -9554,7 +11771,7 @@ var require_cjs = __commonJS({
});
// node_modules/@octokit/auth-app/dist-node/index.js
-var require_dist_node12 = __commonJS({
+var require_dist_node20 = __commonJS({
"node_modules/@octokit/auth-app/dist-node/index.js"(exports2, module2) {
"use strict";
var __create2 = Object.create;
@@ -9590,12 +11807,12 @@ var require_dist_node12 = __commonJS({
createOAuthUserAuth: () => import_auth_oauth_user2.createOAuthUserAuth
});
module2.exports = __toCommonJS2(dist_src_exports);
- var import_universal_user_agent = require_dist_node();
+ var import_universal_user_agent3 = require_dist_node();
var import_request3 = require_dist_node5();
- var import_auth_oauth_app = require_dist_node10();
+ var import_auth_oauth_app = require_dist_node18();
var import_deprecation = require_dist_node3();
- var OAuthAppAuth = __toESM2(require_dist_node10());
- var import_universal_github_app_jwt = require_dist_node11();
+ var OAuthAppAuth = __toESM2(require_dist_node18());
+ var import_universal_github_app_jwt = require_dist_node19();
async function getAppAuthentication({
appId: appId2,
privateKey: privateKey2,
@@ -9845,8 +12062,8 @@ var require_dist_node12 = __commonJS({
throw new Error(`Invalid auth type: ${authOptions.type}`);
}
}
- var import_auth_oauth_user = require_dist_node9();
- var import_request_error = require_dist_node4();
+ var import_auth_oauth_user = require_dist_node17();
+ var import_request_error2 = require_dist_node4();
var PATHS = [
"/app",
"/app/hook/config",
@@ -9889,17 +12106,17 @@ var require_dist_node12 = __commonJS({
));
}
async function hook(state, request2, route, parameters) {
- const endpoint = request2.endpoint.merge(route, parameters);
- const url = endpoint.url;
+ const endpoint2 = request2.endpoint.merge(route, parameters);
+ const url = endpoint2.url;
if (/\/login\/oauth\/access_token$/.test(url)) {
- return request2(endpoint);
+ return request2(endpoint2);
}
if (requiresAppAuth(url.replace(request2.endpoint.DEFAULTS.baseUrl, ""))) {
const { token: token2 } = await getAppAuthentication(state);
- endpoint.headers.authorization = `bearer ${token2}`;
+ endpoint2.headers.authorization = `bearer ${token2}`;
let response;
try {
- response = await request2(endpoint);
+ response = await request2(endpoint2);
} catch (error) {
if (isNotTimeSkewError(error)) {
throw error;
@@ -9918,15 +12135,15 @@ var require_dist_node12 = __commonJS({
...state,
timeDifference: diff
});
- endpoint.headers.authorization = `bearer ${token3}`;
- return request2(endpoint);
+ endpoint2.headers.authorization = `bearer ${token3}`;
+ return request2(endpoint2);
}
return response;
}
if ((0, import_auth_oauth_user.requiresBasicAuth)(url)) {
const authentication = await state.oauthApp({ type: "oauth-app" });
- endpoint.headers.authorization = authentication.headers.authorization;
- return request2(endpoint);
+ endpoint2.headers.authorization = authentication.headers.authorization;
+ return request2(endpoint2);
}
const { token, createdAt } = await getInstallationAuthentication(
state,
@@ -9934,11 +12151,11 @@ var require_dist_node12 = __commonJS({
{},
request2
);
- endpoint.headers.authorization = `token ${token}`;
+ endpoint2.headers.authorization = `token ${token}`;
return sendRequestWithRetries(
state,
request2,
- endpoint,
+ endpoint2,
createdAt
);
}
@@ -9965,8 +12182,8 @@ var require_dist_node12 = __commonJS({
return sendRequestWithRetries(state, request2, options, createdAt, retries);
}
}
- var VERSION = "6.0.3";
- var import_auth_oauth_user2 = require_dist_node9();
+ var VERSION3 = "6.0.4";
+ var import_auth_oauth_user2 = require_dist_node17();
function createAppAuth2(options) {
if (!options.appId) {
throw new Error("[@octokit/auth-app] appId option is required");
@@ -9992,7 +12209,7 @@ var require_dist_node12 = __commonJS({
);
const request2 = options.request || import_request3.request.defaults({
headers: {
- "user-agent": `octokit-auth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
+ "user-agent": `octokit-auth-app.js/${VERSION3} ${(0, import_universal_user_agent3.getUserAgent)()}`
}
});
const state = Object.assign(
@@ -14186,10 +16403,14 @@ var require_webidl = __commonJS({
});
};
webidl.brandCheck = function(V, I, opts = void 0) {
- if (opts?.strict !== false && !(V instanceof I)) {
- throw new TypeError("Illegal invocation");
+ if (opts?.strict !== false) {
+ if (!(V instanceof I)) {
+ throw new TypeError("Illegal invocation");
+ }
} else {
- return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag];
+ if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) {
+ throw new TypeError("Illegal invocation");
+ }
}
};
webidl.argumentLengthCheck = function({ length }, min, ctx) {
@@ -20002,7 +22223,7 @@ var require_mock_utils = __commonJS({
const headersMatch = matchHeaders(mockDispatch2, headers);
return pathMatch && methodMatch && bodyMatch && headersMatch;
}
- function getResponseData(data) {
+ function getResponseData2(data) {
if (Buffer.isBuffer(data)) {
return data;
} else if (typeof data === "object") {
@@ -20117,7 +22338,7 @@ var require_mock_utils = __commonJS({
body.then((newData) => handleReply(mockDispatches, newData));
return;
}
- const responseData = getResponseData(body);
+ const responseData = getResponseData2(body);
const responseHeaders = generateKeyValues(headers);
const responseTrailers = generateKeyValues(trailers);
handler.abort = nop;
@@ -20174,7 +22395,7 @@ var require_mock_utils = __commonJS({
}
}
module2.exports = {
- getResponseData,
+ getResponseData: getResponseData2,
getMockDispatch,
addMockDispatch,
deleteMockDispatch,
@@ -20196,7 +22417,7 @@ var require_mock_utils = __commonJS({
var require_mock_interceptor = __commonJS({
"node_modules/undici/lib/mock/mock-interceptor.js"(exports2, module2) {
"use strict";
- var { getResponseData, buildKey, addMockDispatch } = require_mock_utils();
+ var { getResponseData: getResponseData2, buildKey, addMockDispatch } = require_mock_utils();
var {
kDispatches,
kDispatchKey,
@@ -20268,7 +22489,7 @@ var require_mock_interceptor = __commonJS({
this[kContentLength] = false;
}
createMockScopeDispatchData(statusCode, data, responseOptions = {}) {
- const responseData = getResponseData(data);
+ const responseData = getResponseData2(data);
const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {};
const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers };
const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers };
@@ -23149,10 +25370,12 @@ var require_fetch = __commonJS({
internalResponse.body.stream.pipeThrough(transformStream);
const byteStream = new ReadableStream({
readableStream: transformStream.readable,
+ async start() {
+ this._bodyReader = this.readableStream.getReader();
+ },
async pull(controller) {
- const reader = this.readableStream.getReader();
while (controller.desiredSize >= 0) {
- const { done, value } = await reader.read();
+ const { done, value } = await this._bodyReader.read();
if (done) {
queueMicrotask(() => readableStreamClose(controller));
break;
@@ -23470,8 +25693,8 @@ var require_fetch = __commonJS({
}
return makeNetworkError(err);
}
- const pullAlgorithm = () => {
- fetchParams.controller.resume();
+ const pullAlgorithm = async () => {
+ await fetchParams.controller.resume();
};
const cancelAlgorithm = (reason) => {
fetchParams.controller.abort(reason);
@@ -23530,7 +25753,7 @@ var require_fetch = __commonJS({
fetchParams.controller.terminate();
return;
}
- if (!fetchParams.controller.controller.desiredSize) {
+ if (fetchParams.controller.controller.desiredSize <= 0) {
return;
}
}
@@ -27553,7 +29776,7 @@ var require_undici = __commonJS({
// main.js
var import_core2 = __toESM(require_core(), 1);
-var import_auth_app = __toESM(require_dist_node12(), 1);
+var import_auth_app = __toESM(require_dist_node20(), 1);
// node_modules/p-retry/index.js
var import_retry = __toESM(require_retry2(), 1);
@@ -27767,7 +29990,571 @@ async function getTokenFromRepository(request2, auth, parsedOwner, parsedReposit
// lib/request.js
var import_core = __toESM(require_core(), 1);
-var import_request = __toESM(require_dist_node5(), 1);
+
+// node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.js
+function getUserAgent() {
+ if (typeof navigator === "object" && "userAgent" in navigator) {
+ return navigator.userAgent;
+ }
+ if (typeof process === "object" && process.version !== void 0) {
+ return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
+ }
+ return "";
+}
+
+// node_modules/@octokit/endpoint/dist-bundle/index.js
+var VERSION = "0.0.0-development";
+var userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;
+var DEFAULTS = {
+ method: "GET",
+ baseUrl: "https://api.github.com",
+ headers: {
+ accept: "application/vnd.github.v3+json",
+ "user-agent": userAgent
+ },
+ mediaType: {
+ format: ""
+ }
+};
+function lowercaseKeys(object) {
+ if (!object) {
+ return {};
+ }
+ return Object.keys(object).reduce((newObj, key) => {
+ newObj[key.toLowerCase()] = object[key];
+ return newObj;
+ }, {});
+}
+function isPlainObject(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+}
+function mergeDeep(defaults, options) {
+ const result = Object.assign({}, defaults);
+ Object.keys(options).forEach((key) => {
+ if (isPlainObject(options[key])) {
+ if (!(key in defaults))
+ Object.assign(result, { [key]: options[key] });
+ else
+ result[key] = mergeDeep(defaults[key], options[key]);
+ } else {
+ Object.assign(result, { [key]: options[key] });
+ }
+ });
+ return result;
+}
+function removeUndefinedProperties(obj) {
+ for (const key in obj) {
+ if (obj[key] === void 0) {
+ delete obj[key];
+ }
+ }
+ return obj;
+}
+function merge(defaults, route, options) {
+ if (typeof route === "string") {
+ let [method, url] = route.split(" ");
+ options = Object.assign(url ? { method, url } : { url: method }, options);
+ } else {
+ options = Object.assign({}, route);
+ }
+ options.headers = lowercaseKeys(options.headers);
+ removeUndefinedProperties(options);
+ removeUndefinedProperties(options.headers);
+ const mergedOptions = mergeDeep(defaults || {}, options);
+ if (options.url === "/graphql") {
+ if (defaults && defaults.mediaType.previews?.length) {
+ mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(
+ (preview) => !mergedOptions.mediaType.previews.includes(preview)
+ ).concat(mergedOptions.mediaType.previews);
+ }
+ mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
+ }
+ return mergedOptions;
+}
+function addQueryParameters(url, parameters) {
+ const separator = /\?/.test(url) ? "&" : "?";
+ const names = Object.keys(parameters);
+ if (names.length === 0) {
+ return url;
+ }
+ return url + separator + names.map((name) => {
+ if (name === "q") {
+ return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
+ }
+ return `${name}=${encodeURIComponent(parameters[name])}`;
+ }).join("&");
+}
+var urlVariableRegex = /\{[^}]+\}/g;
+function removeNonChars(variableName) {
+ return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
+}
+function extractUrlVariableNames(url) {
+ const matches = url.match(urlVariableRegex);
+ if (!matches) {
+ return [];
+ }
+ return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
+}
+function omit(object, keysToOmit) {
+ const result = { __proto__: null };
+ for (const key of Object.keys(object)) {
+ if (keysToOmit.indexOf(key) === -1) {
+ result[key] = object[key];
+ }
+ }
+ return result;
+}
+function encodeReserved(str) {
+ return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
+ if (!/%[0-9A-Fa-f]/.test(part)) {
+ part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
+ }
+ return part;
+ }).join("");
+}
+function encodeUnreserved(str) {
+ return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
+ return "%" + c.charCodeAt(0).toString(16).toUpperCase();
+ });
+}
+function encodeValue(operator, value, key) {
+ value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value);
+ if (key) {
+ return encodeUnreserved(key) + "=" + value;
+ } else {
+ return value;
+ }
+}
+function isDefined(value) {
+ return value !== void 0 && value !== null;
+}
+function isKeyOperator(operator) {
+ return operator === ";" || operator === "&" || operator === "?";
+}
+function getValues(context, operator, key, modifier) {
+ var value = context[key], result = [];
+ if (isDefined(value) && value !== "") {
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
+ value = value.toString();
+ if (modifier && modifier !== "*") {
+ value = value.substring(0, parseInt(modifier, 10));
+ }
+ result.push(
+ encodeValue(operator, value, isKeyOperator(operator) ? key : "")
+ );
+ } else {
+ if (modifier === "*") {
+ if (Array.isArray(value)) {
+ value.filter(isDefined).forEach(function(value2) {
+ result.push(
+ encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
+ );
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined(value[k])) {
+ result.push(encodeValue(operator, value[k], k));
+ }
+ });
+ }
+ } else {
+ const tmp = [];
+ if (Array.isArray(value)) {
+ value.filter(isDefined).forEach(function(value2) {
+ tmp.push(encodeValue(operator, value2));
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined(value[k])) {
+ tmp.push(encodeUnreserved(k));
+ tmp.push(encodeValue(operator, value[k].toString()));
+ }
+ });
+ }
+ if (isKeyOperator(operator)) {
+ result.push(encodeUnreserved(key) + "=" + tmp.join(","));
+ } else if (tmp.length !== 0) {
+ result.push(tmp.join(","));
+ }
+ }
+ }
+ } else {
+ if (operator === ";") {
+ if (isDefined(value)) {
+ result.push(encodeUnreserved(key));
+ }
+ } else if (value === "" && (operator === "&" || operator === "?")) {
+ result.push(encodeUnreserved(key) + "=");
+ } else if (value === "") {
+ result.push("");
+ }
+ }
+ return result;
+}
+function parseUrl(template) {
+ return {
+ expand: expand.bind(null, template)
+ };
+}
+function expand(template, context) {
+ var operators = ["+", "#", ".", "/", ";", "?", "&"];
+ template = template.replace(
+ /\{([^\{\}]+)\}|([^\{\}]+)/g,
+ function(_, expression, literal) {
+ if (expression) {
+ let operator = "";
+ const values = [];
+ if (operators.indexOf(expression.charAt(0)) !== -1) {
+ operator = expression.charAt(0);
+ expression = expression.substr(1);
+ }
+ expression.split(/,/g).forEach(function(variable) {
+ var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
+ values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
+ });
+ if (operator && operator !== "+") {
+ var separator = ",";
+ if (operator === "?") {
+ separator = "&";
+ } else if (operator !== "#") {
+ separator = operator;
+ }
+ return (values.length !== 0 ? operator : "") + values.join(separator);
+ } else {
+ return values.join(",");
+ }
+ } else {
+ return encodeReserved(literal);
+ }
+ }
+ );
+ if (template === "/") {
+ return template;
+ } else {
+ return template.replace(/\/$/, "");
+ }
+}
+function parse2(options) {
+ let method = options.method.toUpperCase();
+ let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
+ let headers = Object.assign({}, options.headers);
+ let body;
+ let parameters = omit(options, [
+ "method",
+ "baseUrl",
+ "url",
+ "headers",
+ "request",
+ "mediaType"
+ ]);
+ const urlVariableNames = extractUrlVariableNames(url);
+ url = parseUrl(url).expand(parameters);
+ if (!/^http/.test(url)) {
+ url = options.baseUrl + url;
+ }
+ const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
+ const remainingParameters = omit(parameters, omittedParameters);
+ const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
+ if (!isBinaryRequest) {
+ if (options.mediaType.format) {
+ headers.accept = headers.accept.split(/,/).map(
+ (format) => format.replace(
+ /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
+ `application/vnd$1$2.${options.mediaType.format}`
+ )
+ ).join(",");
+ }
+ if (url.endsWith("/graphql")) {
+ if (options.mediaType.previews?.length) {
+ const previewsFromAcceptHeader = headers.accept.match(/[\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}`;
+ }).join(",");
+ }
+ }
+ }
+ if (["GET", "HEAD"].includes(method)) {
+ url = addQueryParameters(url, remainingParameters);
+ } else {
+ if ("data" in remainingParameters) {
+ body = remainingParameters.data;
+ } else {
+ if (Object.keys(remainingParameters).length) {
+ body = remainingParameters;
+ }
+ }
+ }
+ if (!headers["content-type"] && typeof body !== "undefined") {
+ headers["content-type"] = "application/json; charset=utf-8";
+ }
+ if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
+ body = "";
+ }
+ return Object.assign(
+ { method, url, headers },
+ typeof body !== "undefined" ? { body } : null,
+ options.request ? { request: options.request } : null
+ );
+}
+function endpointWithDefaults(defaults, route, options) {
+ return parse2(merge(defaults, route, options));
+}
+function withDefaults(oldDefaults, newDefaults) {
+ const DEFAULTS2 = merge(oldDefaults, newDefaults);
+ const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);
+ return Object.assign(endpoint2, {
+ DEFAULTS: DEFAULTS2,
+ defaults: withDefaults.bind(null, DEFAULTS2),
+ merge: merge.bind(null, DEFAULTS2),
+ parse: parse2
+ });
+}
+var endpoint = withDefaults(null, DEFAULTS);
+
+// node_modules/@octokit/request/node_modules/universal-user-agent/index.js
+function getUserAgent2() {
+ if (typeof navigator === "object" && "userAgent" in navigator) {
+ return navigator.userAgent;
+ }
+ if (typeof process === "object" && process.version !== void 0) {
+ return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
+ }
+ return "";
+}
+
+// node_modules/@octokit/request/node_modules/@octokit/request-error/dist-src/index.js
+var RequestError = class extends Error {
+ name;
+ /**
+ * http status code
+ */
+ status;
+ /**
+ * Request options that lead to the error.
+ */
+ request;
+ /**
+ * Response object if a response was received
+ */
+ response;
+ constructor(message, statusCode, options) {
+ super(message);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+ this.name = "HttpError";
+ this.status = statusCode;
+ if ("response" in options) {
+ this.response = options.response;
+ }
+ const requestCopy = Object.assign({}, options.request);
+ if (options.request.headers.authorization) {
+ requestCopy.headers = Object.assign({}, options.request.headers, {
+ authorization: options.request.headers.authorization.replace(
+ / .*$/,
+ " [REDACTED]"
+ )
+ });
+ }
+ requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
+ this.request = requestCopy;
+ }
+};
+
+// node_modules/@octokit/request/dist-bundle/index.js
+var VERSION2 = "0.0.0-development";
+function isPlainObject2(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+}
+function getBufferResponse(response) {
+ return response.arrayBuffer();
+}
+function fetchWrapper(requestOptions) {
+ const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
+ const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
+ if (isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body)) {
+ requestOptions.body = JSON.stringify(requestOptions.body);
+ }
+ let headers = {};
+ let status;
+ let url;
+ let { fetch } = globalThis;
+ if (requestOptions.request?.fetch) {
+ fetch = requestOptions.request.fetch;
+ }
+ if (!fetch) {
+ throw new Error(
+ "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
+ );
+ }
+ return fetch(requestOptions.url, {
+ method: requestOptions.method,
+ body: requestOptions.body,
+ // Header values must be `string`
+ headers: Object.fromEntries(
+ Object.entries(requestOptions.headers).map(([name, value]) => [
+ name,
+ String(value)
+ ])
+ ),
+ signal: requestOptions.request?.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" }
+ }).then(async (response) => {
+ url = response.url;
+ status = response.status;
+ for (const keyAndValue of response.headers) {
+ headers[keyAndValue[0]] = keyAndValue[1];
+ }
+ if ("deprecation" in headers) {
+ 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}` : ""}`
+ );
+ }
+ if (status === 204 || status === 205) {
+ return;
+ }
+ if (requestOptions.method === "HEAD") {
+ if (status < 400) {
+ return;
+ }
+ throw new RequestError(response.statusText, status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: void 0
+ },
+ request: requestOptions
+ });
+ }
+ if (status === 304) {
+ throw new RequestError("Not modified", status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: await getResponseData(response)
+ },
+ request: requestOptions
+ });
+ }
+ if (status >= 400) {
+ const data = await getResponseData(response);
+ const error = new RequestError(toErrorMessage(data), status, {
+ response: {
+ url,
+ status,
+ headers,
+ data
+ },
+ request: requestOptions
+ });
+ throw error;
+ }
+ return parseSuccessResponseBody ? await getResponseData(response) : response.body;
+ }).then((data) => {
+ return {
+ status,
+ url,
+ headers,
+ data
+ };
+ }).catch((error) => {
+ if (error instanceof RequestError)
+ throw error;
+ else if (error.name === "AbortError")
+ throw error;
+ let message = error.message;
+ if (error.name === "TypeError" && "cause" in error) {
+ if (error.cause instanceof Error) {
+ message = error.cause.message;
+ } else if (typeof error.cause === "string") {
+ message = error.cause;
+ }
+ }
+ throw new RequestError(message, 500, {
+ request: requestOptions
+ });
+ });
+}
+async function getResponseData(response) {
+ const contentType = response.headers.get("content-type");
+ if (/application\/json/.test(contentType)) {
+ return response.json().catch(() => response.text()).catch(() => "");
+ }
+ if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
+ return response.text();
+ }
+ return getBufferResponse(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(", ")}${suffix}`;
+ }
+ return `${data.message}${suffix}`;
+ }
+ return `Unknown error: ${JSON.stringify(data)}`;
+}
+function withDefaults2(oldEndpoint, newDefaults) {
+ const endpoint2 = oldEndpoint.defaults(newDefaults);
+ const newApi = function(route, parameters) {
+ const endpointOptions = endpoint2.merge(route, parameters);
+ if (!endpointOptions.request || !endpointOptions.request.hook) {
+ return fetchWrapper(endpoint2.parse(endpointOptions));
+ }
+ const request2 = (route2, parameters2) => {
+ return fetchWrapper(
+ endpoint2.parse(endpoint2.merge(route2, parameters2))
+ );
+ };
+ Object.assign(request2, {
+ endpoint: endpoint2,
+ defaults: withDefaults2.bind(null, endpoint2)
+ });
+ return endpointOptions.request.hook(request2, endpointOptions);
+ };
+ return Object.assign(newApi, {
+ endpoint: endpoint2,
+ defaults: withDefaults2.bind(null, endpoint2)
+ });
+}
+var request = withDefaults2(endpoint, {
+ headers: {
+ "user-agent": `octokit-request.js/${VERSION2} ${getUserAgent2()}`
+ }
+});
+
+// lib/request.js
var import_undici = __toESM(require_undici(), 1);
var baseUrl = import_core.default.getInput("github-api-url").replace(/\/$/, "");
var proxyUrl = process.env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY;
@@ -27784,7 +30571,7 @@ var proxyFetch = (url, options) => {
}
return (0, import_undici.fetch)(url, options);
};
-var request_default = import_request.request.defaults({
+var request_default = request.defaults({
headers: {
"user-agent": "actions/create-github-app-token"
},
@@ -27828,14 +30615,6 @@ main(
});
/*! Bundled license information:
-is-plain-object/dist/is-plain-object.js:
- (*!
- * is-plain-object
- *
- * Copyright (c) 2014-2017, Jon Schlinkert.
- * Released under the MIT License.
- *)
-
safe-buffer/index.js:
(*! safe-buffer. MIT License. Feross Aboukhadijeh *)
diff --git a/dist/post.cjs b/dist/post.cjs
index e128ad4..6e01dec 100644
--- a/dist/post.cjs
+++ b/dist/post.cjs
@@ -1027,7 +1027,7 @@ var require_lib = __commonJS({
}
exports2.isHttps = isHttps;
var HttpClient = class {
- constructor(userAgent, handlers, requestOptions) {
+ constructor(userAgent2, handlers, requestOptions) {
this._ignoreSslError = false;
this._allowRedirects = true;
this._allowRedirectDowngrade = false;
@@ -1036,7 +1036,7 @@ var require_lib = __commonJS({
this._maxRetries = 1;
this._keepAlive = false;
this._disposed = false;
- this.userAgent = userAgent;
+ this.userAgent = userAgent2;
this.handlers = handlers || [];
this.requestOptions = requestOptions;
if (requestOptions) {
@@ -1320,14 +1320,14 @@ var require_lib = __commonJS({
}
_mergeHeaders(headers) {
if (this.requestOptions && this.requestOptions.headers) {
- return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));
+ return Object.assign({}, lowercaseKeys2(this.requestOptions.headers), lowercaseKeys2(headers || {}));
}
- return lowercaseKeys(headers || {});
+ return lowercaseKeys2(headers || {});
}
_getExistingOrDefaultHeader(additionalHeaders, header, _default) {
let clientHeader;
if (this.requestOptions && this.requestOptions.headers) {
- clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
+ clientHeader = lowercaseKeys2(this.requestOptions.headers)[header];
}
return additionalHeaders[header] || clientHeader || _default;
}
@@ -1445,7 +1445,7 @@ var require_lib = __commonJS({
}
};
exports2.HttpClient = HttpClient;
- var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
+ var lowercaseKeys2 = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
}
});
@@ -2224,768 +2224,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
}
});
-// node_modules/universal-user-agent/dist-node/index.js
-var require_dist_node = __commonJS({
- "node_modules/universal-user-agent/dist-node/index.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", { value: true });
- function getUserAgent() {
- if (typeof navigator === "object" && "userAgent" in navigator) {
- return navigator.userAgent;
- }
- if (typeof process === "object" && "version" in process) {
- return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
- }
- return "";
- }
- exports2.getUserAgent = getUserAgent;
- }
-});
-
-// node_modules/is-plain-object/dist/is-plain-object.js
-var require_is_plain_object = __commonJS({
- "node_modules/is-plain-object/dist/is-plain-object.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", { value: true });
- function isObject(o) {
- return Object.prototype.toString.call(o) === "[object Object]";
- }
- function isPlainObject(o) {
- var ctor, prot;
- if (isObject(o) === false)
- return false;
- ctor = o.constructor;
- if (ctor === void 0)
- return true;
- prot = ctor.prototype;
- if (isObject(prot) === false)
- return false;
- if (prot.hasOwnProperty("isPrototypeOf") === false) {
- return false;
- }
- return true;
- }
- exports2.isPlainObject = isPlainObject;
- }
-});
-
-// node_modules/@octokit/endpoint/dist-node/index.js
-var require_dist_node2 = __commonJS({
- "node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) {
- "use strict";
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps2 = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
- var dist_src_exports = {};
- __export2(dist_src_exports, {
- endpoint: () => endpoint
- });
- module2.exports = __toCommonJS2(dist_src_exports);
- var import_universal_user_agent = require_dist_node();
- var VERSION = "9.0.1";
- var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
- var DEFAULTS = {
- method: "GET",
- baseUrl: "https://api.github.com",
- headers: {
- accept: "application/vnd.github.v3+json",
- "user-agent": userAgent
- },
- mediaType: {
- format: ""
- }
- };
- function lowercaseKeys(object) {
- if (!object) {
- return {};
- }
- return Object.keys(object).reduce((newObj, key) => {
- newObj[key.toLowerCase()] = object[key];
- return newObj;
- }, {});
- }
- var import_is_plain_object = require_is_plain_object();
- function mergeDeep(defaults, options) {
- const result = Object.assign({}, defaults);
- Object.keys(options).forEach((key) => {
- if ((0, import_is_plain_object.isPlainObject)(options[key])) {
- if (!(key in defaults))
- Object.assign(result, { [key]: options[key] });
- else
- result[key] = mergeDeep(defaults[key], options[key]);
- } else {
- Object.assign(result, { [key]: options[key] });
- }
- });
- return result;
- }
- function removeUndefinedProperties(obj) {
- for (const key in obj) {
- if (obj[key] === void 0) {
- delete obj[key];
- }
- }
- return obj;
- }
- function merge(defaults, route, options) {
- if (typeof route === "string") {
- let [method, url] = route.split(" ");
- options = Object.assign(url ? { method, url } : { url: method }, options);
- } else {
- options = Object.assign({}, route);
- }
- options.headers = lowercaseKeys(options.headers);
- removeUndefinedProperties(options);
- removeUndefinedProperties(options.headers);
- const mergedOptions = mergeDeep(defaults || {}, options);
- if (options.url === "/graphql") {
- if (defaults && defaults.mediaType.previews?.length) {
- mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(
- (preview) => !mergedOptions.mediaType.previews.includes(preview)
- ).concat(mergedOptions.mediaType.previews);
- }
- mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
- }
- return mergedOptions;
- }
- function addQueryParameters(url, parameters) {
- const separator = /\?/.test(url) ? "&" : "?";
- const names = Object.keys(parameters);
- if (names.length === 0) {
- return url;
- }
- return url + separator + names.map((name) => {
- if (name === "q") {
- return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
- }
- return `${name}=${encodeURIComponent(parameters[name])}`;
- }).join("&");
- }
- var urlVariableRegex = /\{[^}]+\}/g;
- function removeNonChars(variableName) {
- return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
- }
- function extractUrlVariableNames(url) {
- const matches = url.match(urlVariableRegex);
- if (!matches) {
- return [];
- }
- return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
- }
- function omit(object, keysToOmit) {
- return Object.keys(object).filter((option) => !keysToOmit.includes(option)).reduce((obj, key) => {
- obj[key] = object[key];
- return obj;
- }, {});
- }
- function encodeReserved(str) {
- return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
- if (!/%[0-9A-Fa-f]/.test(part)) {
- part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
- }
- return part;
- }).join("");
- }
- function encodeUnreserved(str) {
- return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
- return "%" + c.charCodeAt(0).toString(16).toUpperCase();
- });
- }
- function encodeValue(operator, value, key) {
- value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value);
- if (key) {
- return encodeUnreserved(key) + "=" + value;
- } else {
- return value;
- }
- }
- function isDefined(value) {
- return value !== void 0 && value !== null;
- }
- function isKeyOperator(operator) {
- return operator === ";" || operator === "&" || operator === "?";
- }
- function getValues(context, operator, key, modifier) {
- var value = context[key], result = [];
- if (isDefined(value) && value !== "") {
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
- value = value.toString();
- if (modifier && modifier !== "*") {
- value = value.substring(0, parseInt(modifier, 10));
- }
- result.push(
- encodeValue(operator, value, isKeyOperator(operator) ? key : "")
- );
- } else {
- if (modifier === "*") {
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function(value2) {
- result.push(
- encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
- );
- });
- } else {
- Object.keys(value).forEach(function(k) {
- if (isDefined(value[k])) {
- result.push(encodeValue(operator, value[k], k));
- }
- });
- }
- } else {
- const tmp = [];
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function(value2) {
- tmp.push(encodeValue(operator, value2));
- });
- } else {
- Object.keys(value).forEach(function(k) {
- if (isDefined(value[k])) {
- tmp.push(encodeUnreserved(k));
- tmp.push(encodeValue(operator, value[k].toString()));
- }
- });
- }
- if (isKeyOperator(operator)) {
- result.push(encodeUnreserved(key) + "=" + tmp.join(","));
- } else if (tmp.length !== 0) {
- result.push(tmp.join(","));
- }
- }
- }
- } else {
- if (operator === ";") {
- if (isDefined(value)) {
- result.push(encodeUnreserved(key));
- }
- } else if (value === "" && (operator === "&" || operator === "?")) {
- result.push(encodeUnreserved(key) + "=");
- } else if (value === "") {
- result.push("");
- }
- }
- return result;
- }
- function parseUrl(template) {
- return {
- expand: expand.bind(null, template)
- };
- }
- function expand(template, context) {
- var operators = ["+", "#", ".", "/", ";", "?", "&"];
- return template.replace(
- /\{([^\{\}]+)\}|([^\{\}]+)/g,
- function(_, expression, literal) {
- if (expression) {
- let operator = "";
- const values = [];
- if (operators.indexOf(expression.charAt(0)) !== -1) {
- operator = expression.charAt(0);
- expression = expression.substr(1);
- }
- expression.split(/,/g).forEach(function(variable) {
- var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
- values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
- });
- if (operator && operator !== "+") {
- var separator = ",";
- if (operator === "?") {
- separator = "&";
- } else if (operator !== "#") {
- separator = operator;
- }
- return (values.length !== 0 ? operator : "") + values.join(separator);
- } else {
- return values.join(",");
- }
- } else {
- return encodeReserved(literal);
- }
- }
- );
- }
- function parse2(options) {
- let method = options.method.toUpperCase();
- let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
- let headers = Object.assign({}, options.headers);
- let body;
- let parameters = omit(options, [
- "method",
- "baseUrl",
- "url",
- "headers",
- "request",
- "mediaType"
- ]);
- const urlVariableNames = extractUrlVariableNames(url);
- url = parseUrl(url).expand(parameters);
- if (!/^http/.test(url)) {
- url = options.baseUrl + url;
- }
- const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
- const remainingParameters = omit(parameters, omittedParameters);
- const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
- if (!isBinaryRequest) {
- if (options.mediaType.format) {
- headers.accept = headers.accept.split(/,/).map(
- (format) => format.replace(
- /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
- `application/vnd$1$2.${options.mediaType.format}`
- )
- ).join(",");
- }
- if (url.endsWith("/graphql")) {
- if (options.mediaType.previews?.length) {
- const previewsFromAcceptHeader = headers.accept.match(/[\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}`;
- }).join(",");
- }
- }
- }
- if (["GET", "HEAD"].includes(method)) {
- url = addQueryParameters(url, remainingParameters);
- } else {
- if ("data" in remainingParameters) {
- body = remainingParameters.data;
- } else {
- if (Object.keys(remainingParameters).length) {
- body = remainingParameters;
- }
- }
- }
- if (!headers["content-type"] && typeof body !== "undefined") {
- headers["content-type"] = "application/json; charset=utf-8";
- }
- if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
- body = "";
- }
- return Object.assign(
- { method, url, headers },
- typeof body !== "undefined" ? { body } : null,
- options.request ? { request: options.request } : null
- );
- }
- function endpointWithDefaults(defaults, route, options) {
- return parse2(merge(defaults, route, options));
- }
- function withDefaults(oldDefaults, newDefaults) {
- const DEFAULTS2 = merge(oldDefaults, newDefaults);
- const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);
- return Object.assign(endpoint2, {
- DEFAULTS: DEFAULTS2,
- defaults: withDefaults.bind(null, DEFAULTS2),
- merge: merge.bind(null, DEFAULTS2),
- parse: parse2
- });
- }
- var endpoint = withDefaults(null, DEFAULTS);
- }
-});
-
-// node_modules/deprecation/dist-node/index.js
-var require_dist_node3 = __commonJS({
- "node_modules/deprecation/dist-node/index.js"(exports2) {
- "use strict";
- Object.defineProperty(exports2, "__esModule", { value: true });
- var Deprecation = class extends Error {
- constructor(message) {
- super(message);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
- this.name = "Deprecation";
- }
- };
- exports2.Deprecation = Deprecation;
- }
-});
-
-// node_modules/wrappy/wrappy.js
-var require_wrappy = __commonJS({
- "node_modules/wrappy/wrappy.js"(exports2, module2) {
- module2.exports = wrappy;
- function wrappy(fn, cb) {
- if (fn && cb)
- return wrappy(fn)(cb);
- if (typeof fn !== "function")
- throw new TypeError("need wrapper function");
- Object.keys(fn).forEach(function(k) {
- wrapper[k] = fn[k];
- });
- return wrapper;
- function wrapper() {
- var args = new Array(arguments.length);
- for (var i = 0; i < args.length; i++) {
- args[i] = arguments[i];
- }
- var ret = fn.apply(this, args);
- var cb2 = args[args.length - 1];
- if (typeof ret === "function" && ret !== cb2) {
- Object.keys(cb2).forEach(function(k) {
- ret[k] = cb2[k];
- });
- }
- return ret;
- }
- }
- }
-});
-
-// node_modules/once/once.js
-var require_once = __commonJS({
- "node_modules/once/once.js"(exports2, module2) {
- var wrappy = require_wrappy();
- module2.exports = wrappy(once);
- module2.exports.strict = wrappy(onceStrict);
- once.proto = once(function() {
- Object.defineProperty(Function.prototype, "once", {
- value: function() {
- return once(this);
- },
- configurable: true
- });
- Object.defineProperty(Function.prototype, "onceStrict", {
- value: function() {
- return onceStrict(this);
- },
- configurable: true
- });
- });
- function once(fn) {
- var f = function() {
- if (f.called)
- return f.value;
- f.called = true;
- return f.value = fn.apply(this, arguments);
- };
- f.called = false;
- return f;
- }
- function onceStrict(fn) {
- var f = function() {
- if (f.called)
- throw new Error(f.onceError);
- f.called = true;
- return f.value = fn.apply(this, arguments);
- };
- var name = fn.name || "Function wrapped with `once`";
- f.onceError = name + " shouldn't be called more than once";
- f.called = false;
- return f;
- }
- }
-});
-
-// node_modules/@octokit/request-error/dist-node/index.js
-var require_dist_node4 = __commonJS({
- "node_modules/@octokit/request-error/dist-node/index.js"(exports2, module2) {
- "use strict";
- var __create2 = Object.create;
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __getProtoOf2 = Object.getPrototypeOf;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps2 = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
- // If the importer is in node compatibility mode or this is not an ESM
- // file that has been converted to a CommonJS file using a Babel-
- // compatible transform (i.e. "__esModule" has not been set), then set
- // "default" to the CommonJS "module.exports" for node compatibility.
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
- mod
- ));
- var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
- var dist_src_exports = {};
- __export2(dist_src_exports, {
- RequestError: () => RequestError
- });
- module2.exports = __toCommonJS2(dist_src_exports);
- var import_deprecation = require_dist_node3();
- var import_once = __toESM2(require_once());
- var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));
- var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));
- var RequestError = class extends Error {
- constructor(message, statusCode, options) {
- super(message);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
- this.name = "HttpError";
- this.status = statusCode;
- let headers;
- if ("headers" in options && typeof options.headers !== "undefined") {
- headers = options.headers;
- }
- if ("response" in options) {
- this.response = options.response;
- headers = options.response.headers;
- }
- const requestCopy = Object.assign({}, options.request);
- if (options.request.headers.authorization) {
- requestCopy.headers = Object.assign({}, options.request.headers, {
- authorization: options.request.headers.authorization.replace(
- / .*$/,
- " [REDACTED]"
- )
- });
- }
- requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
- this.request = requestCopy;
- Object.defineProperty(this, "code", {
- get() {
- logOnceCode(
- new import_deprecation.Deprecation(
- "[@octokit/request-error] `error.code` is deprecated, use `error.status`."
- )
- );
- return statusCode;
- }
- });
- Object.defineProperty(this, "headers", {
- get() {
- logOnceHeaders(
- new import_deprecation.Deprecation(
- "[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."
- )
- );
- return headers || {};
- }
- });
- }
- };
- }
-});
-
-// node_modules/@octokit/request/dist-node/index.js
-var require_dist_node5 = __commonJS({
- "node_modules/@octokit/request/dist-node/index.js"(exports2, module2) {
- "use strict";
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps2 = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
- var dist_src_exports = {};
- __export2(dist_src_exports, {
- request: () => request2
- });
- module2.exports = __toCommonJS2(dist_src_exports);
- var import_endpoint = require_dist_node2();
- var import_universal_user_agent = require_dist_node();
- var VERSION = "8.1.6";
- function isPlainObject(value) {
- if (typeof value !== "object" || value === null)
- return false;
- if (Object.prototype.toString.call(value) !== "[object Object]")
- return false;
- const proto = Object.getPrototypeOf(value);
- if (proto === null)
- return true;
- const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
- return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
- }
- var import_request_error = require_dist_node4();
- function getBufferResponse(response) {
- return response.arrayBuffer();
- }
- function fetchWrapper(requestOptions) {
- var _a, _b, _c;
- 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)) {
- requestOptions.body = JSON.stringify(requestOptions.body);
- }
- let headers = {};
- let status;
- let url;
- let { fetch } = globalThis;
- if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {
- fetch = requestOptions.request.fetch;
- }
- if (!fetch) {
- throw new Error(
- "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
- );
- }
- return fetch(requestOptions.url, {
- method: requestOptions.method,
- body: requestOptions.body,
- headers: requestOptions.headers,
- signal: (_c = requestOptions.request) == null ? void 0 : _c.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" }
- }).then(async (response) => {
- url = response.url;
- status = response.status;
- for (const keyAndValue of response.headers) {
- headers[keyAndValue[0]] = keyAndValue[1];
- }
- if ("deprecation" in headers) {
- 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}` : ""}`
- );
- }
- if (status === 204 || status === 205) {
- return;
- }
- if (requestOptions.method === "HEAD") {
- if (status < 400) {
- return;
- }
- throw new import_request_error.RequestError(response.statusText, status, {
- response: {
- url,
- status,
- headers,
- data: void 0
- },
- request: requestOptions
- });
- }
- if (status === 304) {
- throw new import_request_error.RequestError("Not modified", status, {
- response: {
- url,
- status,
- headers,
- data: await getResponseData(response)
- },
- request: requestOptions
- });
- }
- if (status >= 400) {
- const data = await getResponseData(response);
- const error = new import_request_error.RequestError(toErrorMessage(data), status, {
- response: {
- url,
- status,
- headers,
- data
- },
- request: requestOptions
- });
- throw error;
- }
- return parseSuccessResponseBody ? await getResponseData(response) : response.body;
- }).then((data) => {
- return {
- status,
- url,
- headers,
- data
- };
- }).catch((error) => {
- if (error instanceof import_request_error.RequestError)
- throw error;
- else if (error.name === "AbortError")
- throw error;
- let message = error.message;
- if (error.name === "TypeError" && "cause" in error) {
- if (error.cause instanceof Error) {
- message = error.cause.message;
- } else if (typeof error.cause === "string") {
- message = error.cause;
- }
- }
- throw new import_request_error.RequestError(message, 500, {
- request: requestOptions
- });
- });
- }
- async function getResponseData(response) {
- const contentType = response.headers.get("content-type");
- if (/application\/json/.test(contentType)) {
- return response.json().catch(() => response.text()).catch(() => "");
- }
- if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
- return response.text();
- }
- return getBufferResponse(response);
- }
- function toErrorMessage(data) {
- if (typeof data === "string")
- return data;
- if ("message" in data) {
- if (Array.isArray(data.errors)) {
- return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`;
- }
- return data.message;
- }
- return `Unknown error: ${JSON.stringify(data)}`;
- }
- function withDefaults(oldEndpoint, newDefaults) {
- const endpoint2 = oldEndpoint.defaults(newDefaults);
- const newApi = function(route, parameters) {
- const endpointOptions = endpoint2.merge(route, parameters);
- if (!endpointOptions.request || !endpointOptions.request.hook) {
- return fetchWrapper(endpoint2.parse(endpointOptions));
- }
- const request22 = (route2, parameters2) => {
- return fetchWrapper(
- endpoint2.parse(endpoint2.merge(route2, parameters2))
- );
- };
- Object.assign(request22, {
- endpoint: endpoint2,
- defaults: withDefaults.bind(null, endpoint2)
- });
- return endpointOptions.request.hook(request22, endpointOptions);
- };
- return Object.assign(newApi, {
- endpoint: endpoint2,
- defaults: withDefaults.bind(null, endpoint2)
- });
- }
- var request2 = withDefaults(import_endpoint.endpoint, {
- headers: {
- "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
- }
- });
- }
-});
-
// node_modules/undici/lib/core/symbols.js
var require_symbols = __commonJS({
"node_modules/undici/lib/core/symbols.js"(exports2, module2) {
@@ -6925,10 +6163,14 @@ var require_webidl = __commonJS({
});
};
webidl.brandCheck = function(V, I, opts = void 0) {
- if (opts?.strict !== false && !(V instanceof I)) {
- throw new TypeError("Illegal invocation");
+ if (opts?.strict !== false) {
+ if (!(V instanceof I)) {
+ throw new TypeError("Illegal invocation");
+ }
} else {
- return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag];
+ if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) {
+ throw new TypeError("Illegal invocation");
+ }
}
};
webidl.argumentLengthCheck = function({ length }, min, ctx) {
@@ -12741,7 +11983,7 @@ var require_mock_utils = __commonJS({
const headersMatch = matchHeaders(mockDispatch2, headers);
return pathMatch && methodMatch && bodyMatch && headersMatch;
}
- function getResponseData(data) {
+ function getResponseData2(data) {
if (Buffer.isBuffer(data)) {
return data;
} else if (typeof data === "object") {
@@ -12856,7 +12098,7 @@ var require_mock_utils = __commonJS({
body.then((newData) => handleReply(mockDispatches, newData));
return;
}
- const responseData = getResponseData(body);
+ const responseData = getResponseData2(body);
const responseHeaders = generateKeyValues(headers);
const responseTrailers = generateKeyValues(trailers);
handler.abort = nop;
@@ -12913,7 +12155,7 @@ var require_mock_utils = __commonJS({
}
}
module2.exports = {
- getResponseData,
+ getResponseData: getResponseData2,
getMockDispatch,
addMockDispatch,
deleteMockDispatch,
@@ -12935,7 +12177,7 @@ var require_mock_utils = __commonJS({
var require_mock_interceptor = __commonJS({
"node_modules/undici/lib/mock/mock-interceptor.js"(exports2, module2) {
"use strict";
- var { getResponseData, buildKey, addMockDispatch } = require_mock_utils();
+ var { getResponseData: getResponseData2, buildKey, addMockDispatch } = require_mock_utils();
var {
kDispatches,
kDispatchKey,
@@ -13007,7 +12249,7 @@ var require_mock_interceptor = __commonJS({
this[kContentLength] = false;
}
createMockScopeDispatchData(statusCode, data, responseOptions = {}) {
- const responseData = getResponseData(data);
+ const responseData = getResponseData2(data);
const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {};
const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers };
const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers };
@@ -15888,10 +15130,12 @@ var require_fetch = __commonJS({
internalResponse.body.stream.pipeThrough(transformStream);
const byteStream = new ReadableStream({
readableStream: transformStream.readable,
+ async start() {
+ this._bodyReader = this.readableStream.getReader();
+ },
async pull(controller) {
- const reader = this.readableStream.getReader();
while (controller.desiredSize >= 0) {
- const { done, value } = await reader.read();
+ const { done, value } = await this._bodyReader.read();
if (done) {
queueMicrotask(() => readableStreamClose(controller));
break;
@@ -16209,8 +15453,8 @@ var require_fetch = __commonJS({
}
return makeNetworkError(err);
}
- const pullAlgorithm = () => {
- fetchParams.controller.resume();
+ const pullAlgorithm = async () => {
+ await fetchParams.controller.resume();
};
const cancelAlgorithm = (reason) => {
fetchParams.controller.abort(reason);
@@ -16269,7 +15513,7 @@ var require_fetch = __commonJS({
fetchParams.controller.terminate();
return;
}
- if (!fetchParams.controller.controller.desiredSize) {
+ if (fetchParams.controller.controller.desiredSize <= 0) {
return;
}
}
@@ -20333,7 +19577,571 @@ function tokenExpiresIn(expiresAt) {
// lib/request.js
var import_core = __toESM(require_core(), 1);
-var import_request = __toESM(require_dist_node5(), 1);
+
+// node_modules/@octokit/endpoint/node_modules/universal-user-agent/index.js
+function getUserAgent() {
+ if (typeof navigator === "object" && "userAgent" in navigator) {
+ return navigator.userAgent;
+ }
+ if (typeof process === "object" && process.version !== void 0) {
+ return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
+ }
+ return "";
+}
+
+// node_modules/@octokit/endpoint/dist-bundle/index.js
+var VERSION = "0.0.0-development";
+var userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;
+var DEFAULTS = {
+ method: "GET",
+ baseUrl: "https://api.github.com",
+ headers: {
+ accept: "application/vnd.github.v3+json",
+ "user-agent": userAgent
+ },
+ mediaType: {
+ format: ""
+ }
+};
+function lowercaseKeys(object) {
+ if (!object) {
+ return {};
+ }
+ return Object.keys(object).reduce((newObj, key) => {
+ newObj[key.toLowerCase()] = object[key];
+ return newObj;
+ }, {});
+}
+function isPlainObject(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+}
+function mergeDeep(defaults, options) {
+ const result = Object.assign({}, defaults);
+ Object.keys(options).forEach((key) => {
+ if (isPlainObject(options[key])) {
+ if (!(key in defaults))
+ Object.assign(result, { [key]: options[key] });
+ else
+ result[key] = mergeDeep(defaults[key], options[key]);
+ } else {
+ Object.assign(result, { [key]: options[key] });
+ }
+ });
+ return result;
+}
+function removeUndefinedProperties(obj) {
+ for (const key in obj) {
+ if (obj[key] === void 0) {
+ delete obj[key];
+ }
+ }
+ return obj;
+}
+function merge(defaults, route, options) {
+ if (typeof route === "string") {
+ let [method, url] = route.split(" ");
+ options = Object.assign(url ? { method, url } : { url: method }, options);
+ } else {
+ options = Object.assign({}, route);
+ }
+ options.headers = lowercaseKeys(options.headers);
+ removeUndefinedProperties(options);
+ removeUndefinedProperties(options.headers);
+ const mergedOptions = mergeDeep(defaults || {}, options);
+ if (options.url === "/graphql") {
+ if (defaults && defaults.mediaType.previews?.length) {
+ mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(
+ (preview) => !mergedOptions.mediaType.previews.includes(preview)
+ ).concat(mergedOptions.mediaType.previews);
+ }
+ mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
+ }
+ return mergedOptions;
+}
+function addQueryParameters(url, parameters) {
+ const separator = /\?/.test(url) ? "&" : "?";
+ const names = Object.keys(parameters);
+ if (names.length === 0) {
+ return url;
+ }
+ return url + separator + names.map((name) => {
+ if (name === "q") {
+ return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
+ }
+ return `${name}=${encodeURIComponent(parameters[name])}`;
+ }).join("&");
+}
+var urlVariableRegex = /\{[^}]+\}/g;
+function removeNonChars(variableName) {
+ return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
+}
+function extractUrlVariableNames(url) {
+ const matches = url.match(urlVariableRegex);
+ if (!matches) {
+ return [];
+ }
+ return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
+}
+function omit(object, keysToOmit) {
+ const result = { __proto__: null };
+ for (const key of Object.keys(object)) {
+ if (keysToOmit.indexOf(key) === -1) {
+ result[key] = object[key];
+ }
+ }
+ return result;
+}
+function encodeReserved(str) {
+ return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
+ if (!/%[0-9A-Fa-f]/.test(part)) {
+ part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
+ }
+ return part;
+ }).join("");
+}
+function encodeUnreserved(str) {
+ return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
+ return "%" + c.charCodeAt(0).toString(16).toUpperCase();
+ });
+}
+function encodeValue(operator, value, key) {
+ value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value);
+ if (key) {
+ return encodeUnreserved(key) + "=" + value;
+ } else {
+ return value;
+ }
+}
+function isDefined(value) {
+ return value !== void 0 && value !== null;
+}
+function isKeyOperator(operator) {
+ return operator === ";" || operator === "&" || operator === "?";
+}
+function getValues(context, operator, key, modifier) {
+ var value = context[key], result = [];
+ if (isDefined(value) && value !== "") {
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
+ value = value.toString();
+ if (modifier && modifier !== "*") {
+ value = value.substring(0, parseInt(modifier, 10));
+ }
+ result.push(
+ encodeValue(operator, value, isKeyOperator(operator) ? key : "")
+ );
+ } else {
+ if (modifier === "*") {
+ if (Array.isArray(value)) {
+ value.filter(isDefined).forEach(function(value2) {
+ result.push(
+ encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
+ );
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined(value[k])) {
+ result.push(encodeValue(operator, value[k], k));
+ }
+ });
+ }
+ } else {
+ const tmp = [];
+ if (Array.isArray(value)) {
+ value.filter(isDefined).forEach(function(value2) {
+ tmp.push(encodeValue(operator, value2));
+ });
+ } else {
+ Object.keys(value).forEach(function(k) {
+ if (isDefined(value[k])) {
+ tmp.push(encodeUnreserved(k));
+ tmp.push(encodeValue(operator, value[k].toString()));
+ }
+ });
+ }
+ if (isKeyOperator(operator)) {
+ result.push(encodeUnreserved(key) + "=" + tmp.join(","));
+ } else if (tmp.length !== 0) {
+ result.push(tmp.join(","));
+ }
+ }
+ }
+ } else {
+ if (operator === ";") {
+ if (isDefined(value)) {
+ result.push(encodeUnreserved(key));
+ }
+ } else if (value === "" && (operator === "&" || operator === "?")) {
+ result.push(encodeUnreserved(key) + "=");
+ } else if (value === "") {
+ result.push("");
+ }
+ }
+ return result;
+}
+function parseUrl(template) {
+ return {
+ expand: expand.bind(null, template)
+ };
+}
+function expand(template, context) {
+ var operators = ["+", "#", ".", "/", ";", "?", "&"];
+ template = template.replace(
+ /\{([^\{\}]+)\}|([^\{\}]+)/g,
+ function(_, expression, literal) {
+ if (expression) {
+ let operator = "";
+ const values = [];
+ if (operators.indexOf(expression.charAt(0)) !== -1) {
+ operator = expression.charAt(0);
+ expression = expression.substr(1);
+ }
+ expression.split(/,/g).forEach(function(variable) {
+ var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
+ values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
+ });
+ if (operator && operator !== "+") {
+ var separator = ",";
+ if (operator === "?") {
+ separator = "&";
+ } else if (operator !== "#") {
+ separator = operator;
+ }
+ return (values.length !== 0 ? operator : "") + values.join(separator);
+ } else {
+ return values.join(",");
+ }
+ } else {
+ return encodeReserved(literal);
+ }
+ }
+ );
+ if (template === "/") {
+ return template;
+ } else {
+ return template.replace(/\/$/, "");
+ }
+}
+function parse2(options) {
+ let method = options.method.toUpperCase();
+ let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
+ let headers = Object.assign({}, options.headers);
+ let body;
+ let parameters = omit(options, [
+ "method",
+ "baseUrl",
+ "url",
+ "headers",
+ "request",
+ "mediaType"
+ ]);
+ const urlVariableNames = extractUrlVariableNames(url);
+ url = parseUrl(url).expand(parameters);
+ if (!/^http/.test(url)) {
+ url = options.baseUrl + url;
+ }
+ const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
+ const remainingParameters = omit(parameters, omittedParameters);
+ const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
+ if (!isBinaryRequest) {
+ if (options.mediaType.format) {
+ headers.accept = headers.accept.split(/,/).map(
+ (format) => format.replace(
+ /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
+ `application/vnd$1$2.${options.mediaType.format}`
+ )
+ ).join(",");
+ }
+ if (url.endsWith("/graphql")) {
+ if (options.mediaType.previews?.length) {
+ const previewsFromAcceptHeader = headers.accept.match(/[\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}`;
+ }).join(",");
+ }
+ }
+ }
+ if (["GET", "HEAD"].includes(method)) {
+ url = addQueryParameters(url, remainingParameters);
+ } else {
+ if ("data" in remainingParameters) {
+ body = remainingParameters.data;
+ } else {
+ if (Object.keys(remainingParameters).length) {
+ body = remainingParameters;
+ }
+ }
+ }
+ if (!headers["content-type"] && typeof body !== "undefined") {
+ headers["content-type"] = "application/json; charset=utf-8";
+ }
+ if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
+ body = "";
+ }
+ return Object.assign(
+ { method, url, headers },
+ typeof body !== "undefined" ? { body } : null,
+ options.request ? { request: options.request } : null
+ );
+}
+function endpointWithDefaults(defaults, route, options) {
+ return parse2(merge(defaults, route, options));
+}
+function withDefaults(oldDefaults, newDefaults) {
+ const DEFAULTS2 = merge(oldDefaults, newDefaults);
+ const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);
+ return Object.assign(endpoint2, {
+ DEFAULTS: DEFAULTS2,
+ defaults: withDefaults.bind(null, DEFAULTS2),
+ merge: merge.bind(null, DEFAULTS2),
+ parse: parse2
+ });
+}
+var endpoint = withDefaults(null, DEFAULTS);
+
+// node_modules/@octokit/request/node_modules/universal-user-agent/index.js
+function getUserAgent2() {
+ if (typeof navigator === "object" && "userAgent" in navigator) {
+ return navigator.userAgent;
+ }
+ if (typeof process === "object" && process.version !== void 0) {
+ return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;
+ }
+ return "";
+}
+
+// node_modules/@octokit/request/node_modules/@octokit/request-error/dist-src/index.js
+var RequestError = class extends Error {
+ name;
+ /**
+ * http status code
+ */
+ status;
+ /**
+ * Request options that lead to the error.
+ */
+ request;
+ /**
+ * Response object if a response was received
+ */
+ response;
+ constructor(message, statusCode, options) {
+ super(message);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ }
+ this.name = "HttpError";
+ this.status = statusCode;
+ if ("response" in options) {
+ this.response = options.response;
+ }
+ const requestCopy = Object.assign({}, options.request);
+ if (options.request.headers.authorization) {
+ requestCopy.headers = Object.assign({}, options.request.headers, {
+ authorization: options.request.headers.authorization.replace(
+ / .*$/,
+ " [REDACTED]"
+ )
+ });
+ }
+ requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
+ this.request = requestCopy;
+ }
+};
+
+// node_modules/@octokit/request/dist-bundle/index.js
+var VERSION2 = "0.0.0-development";
+function isPlainObject2(value) {
+ if (typeof value !== "object" || value === null)
+ return false;
+ if (Object.prototype.toString.call(value) !== "[object Object]")
+ return false;
+ const proto = Object.getPrototypeOf(value);
+ if (proto === null)
+ return true;
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
+}
+function getBufferResponse(response) {
+ return response.arrayBuffer();
+}
+function fetchWrapper(requestOptions) {
+ const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
+ const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
+ if (isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body)) {
+ requestOptions.body = JSON.stringify(requestOptions.body);
+ }
+ let headers = {};
+ let status;
+ let url;
+ let { fetch } = globalThis;
+ if (requestOptions.request?.fetch) {
+ fetch = requestOptions.request.fetch;
+ }
+ if (!fetch) {
+ throw new Error(
+ "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
+ );
+ }
+ return fetch(requestOptions.url, {
+ method: requestOptions.method,
+ body: requestOptions.body,
+ // Header values must be `string`
+ headers: Object.fromEntries(
+ Object.entries(requestOptions.headers).map(([name, value]) => [
+ name,
+ String(value)
+ ])
+ ),
+ signal: requestOptions.request?.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" }
+ }).then(async (response) => {
+ url = response.url;
+ status = response.status;
+ for (const keyAndValue of response.headers) {
+ headers[keyAndValue[0]] = keyAndValue[1];
+ }
+ if ("deprecation" in headers) {
+ 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}` : ""}`
+ );
+ }
+ if (status === 204 || status === 205) {
+ return;
+ }
+ if (requestOptions.method === "HEAD") {
+ if (status < 400) {
+ return;
+ }
+ throw new RequestError(response.statusText, status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: void 0
+ },
+ request: requestOptions
+ });
+ }
+ if (status === 304) {
+ throw new RequestError("Not modified", status, {
+ response: {
+ url,
+ status,
+ headers,
+ data: await getResponseData(response)
+ },
+ request: requestOptions
+ });
+ }
+ if (status >= 400) {
+ const data = await getResponseData(response);
+ const error = new RequestError(toErrorMessage(data), status, {
+ response: {
+ url,
+ status,
+ headers,
+ data
+ },
+ request: requestOptions
+ });
+ throw error;
+ }
+ return parseSuccessResponseBody ? await getResponseData(response) : response.body;
+ }).then((data) => {
+ return {
+ status,
+ url,
+ headers,
+ data
+ };
+ }).catch((error) => {
+ if (error instanceof RequestError)
+ throw error;
+ else if (error.name === "AbortError")
+ throw error;
+ let message = error.message;
+ if (error.name === "TypeError" && "cause" in error) {
+ if (error.cause instanceof Error) {
+ message = error.cause.message;
+ } else if (typeof error.cause === "string") {
+ message = error.cause;
+ }
+ }
+ throw new RequestError(message, 500, {
+ request: requestOptions
+ });
+ });
+}
+async function getResponseData(response) {
+ const contentType = response.headers.get("content-type");
+ if (/application\/json/.test(contentType)) {
+ return response.json().catch(() => response.text()).catch(() => "");
+ }
+ if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
+ return response.text();
+ }
+ return getBufferResponse(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(", ")}${suffix}`;
+ }
+ return `${data.message}${suffix}`;
+ }
+ return `Unknown error: ${JSON.stringify(data)}`;
+}
+function withDefaults2(oldEndpoint, newDefaults) {
+ const endpoint2 = oldEndpoint.defaults(newDefaults);
+ const newApi = function(route, parameters) {
+ const endpointOptions = endpoint2.merge(route, parameters);
+ if (!endpointOptions.request || !endpointOptions.request.hook) {
+ return fetchWrapper(endpoint2.parse(endpointOptions));
+ }
+ const request2 = (route2, parameters2) => {
+ return fetchWrapper(
+ endpoint2.parse(endpoint2.merge(route2, parameters2))
+ );
+ };
+ Object.assign(request2, {
+ endpoint: endpoint2,
+ defaults: withDefaults2.bind(null, endpoint2)
+ });
+ return endpointOptions.request.hook(request2, endpointOptions);
+ };
+ return Object.assign(newApi, {
+ endpoint: endpoint2,
+ defaults: withDefaults2.bind(null, endpoint2)
+ });
+}
+var request = withDefaults2(endpoint, {
+ headers: {
+ "user-agent": `octokit-request.js/${VERSION2} ${getUserAgent2()}`
+ }
+});
+
+// lib/request.js
var import_undici = __toESM(require_undici(), 1);
var baseUrl = import_core.default.getInput("github-api-url").replace(/\/$/, "");
var proxyUrl = process.env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY;
@@ -20350,7 +20158,7 @@ var proxyFetch = (url, options) => {
}
return (0, import_undici.fetch)(url, options);
};
-var request_default = import_request.request.defaults({
+var request_default = request.defaults({
headers: {
"user-agent": "actions/create-github-app-token"
},
@@ -20366,14 +20174,6 @@ post(import_core2.default, request_default).catch((error) => {
});
/*! Bundled license information:
-is-plain-object/dist/is-plain-object.js:
- (*!
- * is-plain-object
- *
- * Copyright (c) 2014-2017, Jon Schlinkert.
- * Released under the MIT License.
- *)
-
undici/lib/fetch/body.js:
(*! formdata-polyfill. MIT License. Jimmy Wärting *)
diff --git a/package-lock.json b/package-lock.json
index 2ac2b90..ebfcae9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,10 +10,10 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1",
- "@octokit/auth-app": "^6.0.3",
- "@octokit/request": "^8.1.6",
+ "@octokit/auth-app": "^6.0.4",
+ "@octokit/request": "^9.0.1",
"p-retry": "^6.2.0",
- "undici": "^6.6.1"
+ "undici": "^6.6.2"
},
"devDependencies": {
"@sinonjs/fake-timers": "^11.2.2",
@@ -539,9 +539,9 @@
}
},
"node_modules/@octokit/auth-app": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-6.0.3.tgz",
- "integrity": "sha512-9N7IlBAKEJR3tJgPSubCxIDYGXSdc+2xbkjYpk9nCyqREnH8qEMoMhiEB1WgoA9yTFp91El92XNXAi+AjuKnfw==",
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-6.0.4.tgz",
+ "integrity": "sha512-TPmJYgd05ok3nzHj7Y6we/V7Ez1wU3ztLFW3zo/afgYFtqYZg0W7zb6Kp5ag6E85r8nCE1JfS6YZoZusa14o9g==",
"dependencies": {
"@octokit/auth-oauth-app": "^7.0.0",
"@octokit/auth-oauth-user": "^4.0.0",
@@ -557,6 +557,32 @@
"node": ">= 18"
}
},
+ "node_modules/@octokit/auth-app/node_modules/@octokit/endpoint": {
+ "version": "9.0.4",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz",
+ "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==",
+ "dependencies": {
+ "@octokit/types": "^12.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/@octokit/auth-app/node_modules/@octokit/request": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.2.0.tgz",
+ "integrity": "sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^9.0.0",
+ "@octokit/request-error": "^5.0.0",
+ "@octokit/types": "^12.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
"node_modules/@octokit/auth-oauth-app": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-7.0.1.tgz",
@@ -574,6 +600,32 @@
"node": ">= 18"
}
},
+ "node_modules/@octokit/auth-oauth-app/node_modules/@octokit/endpoint": {
+ "version": "9.0.4",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz",
+ "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==",
+ "dependencies": {
+ "@octokit/types": "^12.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.2.0.tgz",
+ "integrity": "sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^9.0.0",
+ "@octokit/request-error": "^5.0.0",
+ "@octokit/types": "^12.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
"node_modules/@octokit/auth-oauth-device": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-6.0.1.tgz",
@@ -588,6 +640,32 @@
"node": ">= 18"
}
},
+ "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint": {
+ "version": "9.0.4",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz",
+ "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==",
+ "dependencies": {
+ "@octokit/types": "^12.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.2.0.tgz",
+ "integrity": "sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^9.0.0",
+ "@octokit/request-error": "^5.0.0",
+ "@octokit/types": "^12.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
"node_modules/@octokit/auth-oauth-user": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-4.0.1.tgz",
@@ -604,19 +682,49 @@
"node": ">= 18"
}
},
- "node_modules/@octokit/endpoint": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.1.tgz",
- "integrity": "sha512-hRlOKAovtINHQPYHZlfyFwaM8OyetxeoC81lAkBy34uLb8exrZB50SQdeW3EROqiY9G9yxQTpp5OHTV54QD+vA==",
+ "node_modules/@octokit/auth-oauth-user/node_modules/@octokit/endpoint": {
+ "version": "9.0.4",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz",
+ "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==",
"dependencies": {
"@octokit/types": "^12.0.0",
- "is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
},
"engines": {
"node": ">= 18"
}
},
+ "node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.2.0.tgz",
+ "integrity": "sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^9.0.0",
+ "@octokit/request-error": "^5.0.0",
+ "@octokit/types": "^12.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/@octokit/endpoint": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.0.0.tgz",
+ "integrity": "sha512-emBcNDxBdC1y3+knJonS5zhUB/CG6TihubxM2U1/pG/Z1y3a4oV0Gzz3lmkCvWWQI6h3tqBAX9MgCBFp+M68Jw==",
+ "dependencies": {
+ "@octokit/types": "^12.0.0",
+ "universal-user-agent": "^7.0.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/@octokit/endpoint/node_modules/universal-user-agent": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz",
+ "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q=="
+ },
"node_modules/@octokit/oauth-authorization-url": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-6.0.2.tgz",
@@ -640,11 +748,63 @@
"node": ">= 18"
}
},
+ "node_modules/@octokit/oauth-methods/node_modules/@octokit/endpoint": {
+ "version": "9.0.4",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz",
+ "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==",
+ "dependencies": {
+ "@octokit/types": "^12.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/@octokit/oauth-methods/node_modules/@octokit/endpoint/node_modules/@octokit/openapi-types": {
+ "version": "20.0.0",
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
+ "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
+ },
+ "node_modules/@octokit/oauth-methods/node_modules/@octokit/endpoint/node_modules/@octokit/types": {
+ "version": "12.6.0",
+ "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
+ "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
+ "dependencies": {
+ "@octokit/openapi-types": "^20.0.0"
+ }
+ },
"node_modules/@octokit/oauth-methods/node_modules/@octokit/openapi-types": {
"version": "18.1.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz",
"integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw=="
},
+ "node_modules/@octokit/oauth-methods/node_modules/@octokit/request": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.2.0.tgz",
+ "integrity": "sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^9.0.0",
+ "@octokit/request-error": "^5.0.0",
+ "@octokit/types": "^12.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/openapi-types": {
+ "version": "20.0.0",
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
+ "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
+ },
+ "node_modules/@octokit/oauth-methods/node_modules/@octokit/request/node_modules/@octokit/types": {
+ "version": "12.6.0",
+ "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
+ "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
+ "dependencies": {
+ "@octokit/openapi-types": "^20.0.0"
+ }
+ },
"node_modules/@octokit/oauth-methods/node_modules/@octokit/types": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-11.1.0.tgz",
@@ -659,14 +819,14 @@
"integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw=="
},
"node_modules/@octokit/request": {
- "version": "8.1.6",
- "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz",
- "integrity": "sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==",
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.0.1.tgz",
+ "integrity": "sha512-kL+cAcbSl3dctYLuJmLfx6Iku2MXXy0jszhaEIjQNaCp4zjHXrhVAHeuaRdNvJjW9qjl3u1MJ72+OuBP0YW/pg==",
"dependencies": {
- "@octokit/endpoint": "^9.0.0",
- "@octokit/request-error": "^5.0.0",
+ "@octokit/endpoint": "^10.0.0",
+ "@octokit/request-error": "^6.0.1",
"@octokit/types": "^12.0.0",
- "universal-user-agent": "^6.0.0"
+ "universal-user-agent": "^7.0.2"
},
"engines": {
"node": ">= 18"
@@ -685,6 +845,22 @@
"node": ">= 18"
}
},
+ "node_modules/@octokit/request/node_modules/@octokit/request-error": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.0.2.tgz",
+ "integrity": "sha512-WtRVpoHcNXs84+s9s/wqfHaxM68NGMg8Av7h59B50OVO0PwwMx+2GgQ/OliUd0iQBSNWgR6N8afi/KjSHbXHWw==",
+ "dependencies": {
+ "@octokit/types": "^12.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
+ "node_modules/@octokit/request/node_modules/universal-user-agent": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz",
+ "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q=="
+ },
"node_modules/@octokit/types": {
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.0.0.tgz",
@@ -2259,6 +2435,7 @@
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
+ "dev": true,
"engines": {
"node": ">=0.10.0"
}
@@ -3518,9 +3695,9 @@
}
},
"node_modules/undici": {
- "version": "6.6.1",
- "resolved": "https://registry.npmjs.org/undici/-/undici-6.6.1.tgz",
- "integrity": "sha512-J0GaEp0ztu/grIE2Uq57AbK6TRb+bWbOlxu0POCzhFKA6LKbwSAev+hDQaQcgUUA9CPs8Ky+cauzTHnQrtAQEA==",
+ "version": "6.6.2",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.6.2.tgz",
+ "integrity": "sha512-vSqvUE5skSxQJ5sztTZ/CdeJb1Wq0Hf44hlYMciqHghvz+K88U0l7D6u1VsndoFgskDcnU+nG3gYmMzJVzd9Qg==",
"dependencies": {
"@fastify/busboy": "^2.0.0"
},
diff --git a/package.json b/package.json
index 635d1ef..16baa47 100644
--- a/package.json
+++ b/package.json
@@ -13,10 +13,10 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1",
- "@octokit/auth-app": "^6.0.3",
- "@octokit/request": "^8.1.6",
+ "@octokit/auth-app": "^6.0.4",
+ "@octokit/request": "^9.0.1",
"p-retry": "^6.2.0",
- "undici": "^6.6.1"
+ "undici": "^6.6.2"
},
"devDependencies": {
"@sinonjs/fake-timers": "^11.2.2",