autotag/dist/main.js

27316 lines
1.1 MiB
JavaScript
Raw Normal View History

2022-10-13 08:49:37 +07:00
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// node_modules/@actions/core/lib/utils.js
var require_utils = __commonJS({
"node_modules/@actions/core/lib/utils.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toCommandProperties = exports.toCommandValue = void 0;
function toCommandValue(input) {
if (input === null || input === void 0) {
return "";
} else if (typeof input === "string" || input instanceof String) {
return input;
}
return JSON.stringify(input);
}
exports.toCommandValue = toCommandValue;
function toCommandProperties(annotationProperties) {
if (!Object.keys(annotationProperties).length) {
return {};
}
return {
title: annotationProperties.title,
file: annotationProperties.file,
line: annotationProperties.startLine,
endLine: annotationProperties.endLine,
col: annotationProperties.startColumn,
endColumn: annotationProperties.endColumn
};
}
exports.toCommandProperties = toCommandProperties;
}
});
// node_modules/@actions/core/lib/command.js
var require_command = __commonJS({
"node_modules/@actions/core/lib/command.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
return m[k];
} });
} : function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
o[k2] = m[k];
});
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
if (mod != null) {
for (var k in mod)
if (k !== "default" && Object.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k);
}
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.issue = exports.issueCommand = void 0;
var os3 = __importStar(require("os"));
var utils_1 = require_utils();
function issueCommand(command, properties, message) {
const cmd = new Command(command, properties, message);
process.stdout.write(cmd.toString() + os3.EOL);
}
exports.issueCommand = issueCommand;
function issue(name, message = "") {
issueCommand(name, {}, message);
}
exports.issue = issue;
var CMD_STRING = "::";
var Command = class {
constructor(command, properties, message) {
if (!command) {
command = "missing.command";
}
this.command = command;
this.properties = properties;
this.message = message;
}
toString() {
let cmdStr = CMD_STRING + this.command;
if (this.properties && Object.keys(this.properties).length > 0) {
cmdStr += " ";
let first = true;
for (const key in this.properties) {
if (this.properties.hasOwnProperty(key)) {
const val = this.properties[key];
if (val) {
if (first) {
first = false;
} else {
cmdStr += ",";
}
cmdStr += `${key}=${escapeProperty(val)}`;
}
}
}
}
cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
return cmdStr;
}
};
function escapeData(s) {
return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A");
}
function escapeProperty(s) {
return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C");
}
}
});
// node_modules/uuid/dist/rng.js
var require_rng = __commonJS({
"node_modules/uuid/dist/rng.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = rng;
var _crypto = _interopRequireDefault(require("crypto"));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
var rnds8Pool = new Uint8Array(256);
var poolPtr = rnds8Pool.length;
function rng() {
if (poolPtr > rnds8Pool.length - 16) {
_crypto.default.randomFillSync(rnds8Pool);
poolPtr = 0;
}
return rnds8Pool.slice(poolPtr, poolPtr += 16);
}
}
});
// node_modules/uuid/dist/regex.js
var require_regex = __commonJS({
"node_modules/uuid/dist/regex.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
exports.default = _default;
}
});
// node_modules/uuid/dist/validate.js
var require_validate = __commonJS({
"node_modules/uuid/dist/validate.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _regex = _interopRequireDefault(require_regex());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function validate(uuid) {
return typeof uuid === "string" && _regex.default.test(uuid);
}
var _default = validate;
exports.default = _default;
}
});
// node_modules/uuid/dist/stringify.js
var require_stringify = __commonJS({
"node_modules/uuid/dist/stringify.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _validate = _interopRequireDefault(require_validate());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
var byteToHex = [];
for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 256).toString(16).substr(1));
}
function stringify(arr, offset = 0) {
const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
if (!(0, _validate.default)(uuid)) {
throw TypeError("Stringified UUID is invalid");
}
return uuid;
}
var _default = stringify;
exports.default = _default;
}
});
// node_modules/uuid/dist/v1.js
var require_v1 = __commonJS({
"node_modules/uuid/dist/v1.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _rng = _interopRequireDefault(require_rng());
var _stringify = _interopRequireDefault(require_stringify());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
var _nodeId;
var _clockseq;
var _lastMSecs = 0;
var _lastNSecs = 0;
function v1(options, buf, offset) {
let i = buf && offset || 0;
const b = buf || new Array(16);
options = options || {};
let node = options.node || _nodeId;
let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq;
if (node == null || clockseq == null) {
const seedBytes = options.random || (options.rng || _rng.default)();
if (node == null) {
node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
}
if (clockseq == null) {
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;
}
}
let msecs = options.msecs !== void 0 ? options.msecs : Date.now();
let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1;
const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
if (dt < 0 && options.clockseq === void 0) {
clockseq = clockseq + 1 & 16383;
}
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) {
nsecs = 0;
}
if (nsecs >= 1e4) {
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
}
_lastMSecs = msecs;
_lastNSecs = nsecs;
_clockseq = clockseq;
msecs += 122192928e5;
const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
b[i++] = tl >>> 24 & 255;
b[i++] = tl >>> 16 & 255;
b[i++] = tl >>> 8 & 255;
b[i++] = tl & 255;
const tmh = msecs / 4294967296 * 1e4 & 268435455;
b[i++] = tmh >>> 8 & 255;
b[i++] = tmh & 255;
b[i++] = tmh >>> 24 & 15 | 16;
b[i++] = tmh >>> 16 & 255;
b[i++] = clockseq >>> 8 | 128;
b[i++] = clockseq & 255;
for (let n = 0; n < 6; ++n) {
b[i + n] = node[n];
}
return buf || (0, _stringify.default)(b);
}
var _default = v1;
exports.default = _default;
}
});
// node_modules/uuid/dist/parse.js
var require_parse = __commonJS({
"node_modules/uuid/dist/parse.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _validate = _interopRequireDefault(require_validate());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function parse(uuid) {
if (!(0, _validate.default)(uuid)) {
throw TypeError("Invalid UUID");
}
let v;
const arr = new Uint8Array(16);
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
arr[1] = v >>> 16 & 255;
arr[2] = v >>> 8 & 255;
arr[3] = v & 255;
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
arr[5] = v & 255;
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
arr[7] = v & 255;
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
arr[9] = v & 255;
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;
arr[11] = v / 4294967296 & 255;
arr[12] = v >>> 24 & 255;
arr[13] = v >>> 16 & 255;
arr[14] = v >>> 8 & 255;
arr[15] = v & 255;
return arr;
}
var _default = parse;
exports.default = _default;
}
});
// node_modules/uuid/dist/v35.js
var require_v35 = __commonJS({
"node_modules/uuid/dist/v35.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
exports.URL = exports.DNS = void 0;
var _stringify = _interopRequireDefault(require_stringify());
var _parse = _interopRequireDefault(require_parse());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function stringToBytes(str) {
str = unescape(encodeURIComponent(str));
const bytes = [];
for (let i = 0; i < str.length; ++i) {
bytes.push(str.charCodeAt(i));
}
return bytes;
}
var DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
exports.DNS = DNS;
var URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
exports.URL = URL2;
function _default(name, version, hashfunc) {
function generateUUID(value, namespace, buf, offset) {
if (typeof value === "string") {
value = stringToBytes(value);
}
if (typeof namespace === "string") {
namespace = (0, _parse.default)(namespace);
}
if (namespace.length !== 16) {
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
}
let bytes = new Uint8Array(16 + value.length);
bytes.set(namespace);
bytes.set(value, namespace.length);
bytes = hashfunc(bytes);
bytes[6] = bytes[6] & 15 | version;
bytes[8] = bytes[8] & 63 | 128;
if (buf) {
offset = offset || 0;
for (let i = 0; i < 16; ++i) {
buf[offset + i] = bytes[i];
}
return buf;
}
return (0, _stringify.default)(bytes);
}
try {
generateUUID.name = name;
} catch (err) {
}
generateUUID.DNS = DNS;
generateUUID.URL = URL2;
return generateUUID;
}
}
});
// node_modules/uuid/dist/md5.js
var require_md5 = __commonJS({
"node_modules/uuid/dist/md5.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _crypto = _interopRequireDefault(require("crypto"));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function md5(bytes) {
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === "string") {
bytes = Buffer.from(bytes, "utf8");
}
return _crypto.default.createHash("md5").update(bytes).digest();
}
var _default = md5;
exports.default = _default;
}
});
// node_modules/uuid/dist/v3.js
var require_v3 = __commonJS({
"node_modules/uuid/dist/v3.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _v = _interopRequireDefault(require_v35());
var _md = _interopRequireDefault(require_md5());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
var v3 = (0, _v.default)("v3", 48, _md.default);
var _default = v3;
exports.default = _default;
}
});
// node_modules/uuid/dist/v4.js
var require_v4 = __commonJS({
"node_modules/uuid/dist/v4.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _rng = _interopRequireDefault(require_rng());
var _stringify = _interopRequireDefault(require_stringify());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function v4(options, buf, offset) {
options = options || {};
const rnds = options.random || (options.rng || _rng.default)();
rnds[6] = rnds[6] & 15 | 64;
rnds[8] = rnds[8] & 63 | 128;
if (buf) {
offset = offset || 0;
for (let i = 0; i < 16; ++i) {
buf[offset + i] = rnds[i];
}
return buf;
}
return (0, _stringify.default)(rnds);
}
var _default = v4;
exports.default = _default;
}
});
// node_modules/uuid/dist/sha1.js
var require_sha1 = __commonJS({
"node_modules/uuid/dist/sha1.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _crypto = _interopRequireDefault(require("crypto"));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function sha1(bytes) {
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === "string") {
bytes = Buffer.from(bytes, "utf8");
}
return _crypto.default.createHash("sha1").update(bytes).digest();
}
var _default = sha1;
exports.default = _default;
}
});
// node_modules/uuid/dist/v5.js
var require_v5 = __commonJS({
"node_modules/uuid/dist/v5.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _v = _interopRequireDefault(require_v35());
var _sha = _interopRequireDefault(require_sha1());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
var v5 = (0, _v.default)("v5", 80, _sha.default);
var _default = v5;
exports.default = _default;
}
});
// node_modules/uuid/dist/nil.js
var require_nil = __commonJS({
"node_modules/uuid/dist/nil.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = "00000000-0000-0000-0000-000000000000";
exports.default = _default;
}
});
// node_modules/uuid/dist/version.js
var require_version = __commonJS({
"node_modules/uuid/dist/version.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _validate = _interopRequireDefault(require_validate());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function version(uuid) {
if (!(0, _validate.default)(uuid)) {
throw TypeError("Invalid UUID");
}
return parseInt(uuid.substr(14, 1), 16);
}
var _default = version;
exports.default = _default;
}
});
// node_modules/uuid/dist/index.js
var require_dist = __commonJS({
"node_modules/uuid/dist/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "v1", {
enumerable: true,
get: function() {
return _v.default;
}
});
Object.defineProperty(exports, "v3", {
enumerable: true,
get: function() {
return _v2.default;
}
});
Object.defineProperty(exports, "v4", {
enumerable: true,
get: function() {
return _v3.default;
}
});
Object.defineProperty(exports, "v5", {
enumerable: true,
get: function() {
return _v4.default;
}
});
Object.defineProperty(exports, "NIL", {
enumerable: true,
get: function() {
return _nil.default;
}
});
Object.defineProperty(exports, "version", {
enumerable: true,
get: function() {
return _version.default;
}
});
Object.defineProperty(exports, "validate", {
enumerable: true,
get: function() {
return _validate.default;
}
});
Object.defineProperty(exports, "stringify", {
enumerable: true,
get: function() {
return _stringify.default;
}
});
Object.defineProperty(exports, "parse", {
enumerable: true,
get: function() {
return _parse.default;
}
});
var _v = _interopRequireDefault(require_v1());
var _v2 = _interopRequireDefault(require_v3());
var _v3 = _interopRequireDefault(require_v4());
var _v4 = _interopRequireDefault(require_v5());
var _nil = _interopRequireDefault(require_nil());
var _version = _interopRequireDefault(require_version());
var _validate = _interopRequireDefault(require_validate());
var _stringify = _interopRequireDefault(require_stringify());
var _parse = _interopRequireDefault(require_parse());
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
}
});
// node_modules/@actions/core/lib/file-command.js
var require_file_command = __commonJS({
"node_modules/@actions/core/lib/file-command.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
return m[k];
} });
} : function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
o[k2] = m[k];
});
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
if (mod != null) {
for (var k in mod)
if (k !== "default" && Object.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k);
}
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
var fs5 = __importStar(require("fs"));
var os3 = __importStar(require("os"));
var uuid_1 = require_dist();
var utils_1 = require_utils();
function issueFileCommand(command, message) {
const filePath = process.env[`GITHUB_${command}`];
if (!filePath) {
throw new Error(`Unable to find environment variable for file command ${command}`);
}
if (!fs5.existsSync(filePath)) {
throw new Error(`Missing file at path: ${filePath}`);
}
fs5.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os3.EOL}`, {
encoding: "utf8"
});
}
exports.issueFileCommand = issueFileCommand;
function prepareKeyValueMessage(key, value) {
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
const convertedValue = utils_1.toCommandValue(value);
if (key.includes(delimiter)) {
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
}
if (convertedValue.includes(delimiter)) {
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
}
return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`;
}
exports.prepareKeyValueMessage = prepareKeyValueMessage;
}
});
// node_modules/@actions/http-client/lib/proxy.js
var require_proxy = __commonJS({
"node_modules/@actions/http-client/lib/proxy.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkBypass = exports.getProxyUrl = void 0;
function getProxyUrl(reqUrl) {
const usingSsl = reqUrl.protocol === "https:";
if (checkBypass(reqUrl)) {
return void 0;
}
const proxyVar = (() => {
if (usingSsl) {
return process.env["https_proxy"] || process.env["HTTPS_PROXY"];
} else {
return process.env["http_proxy"] || process.env["HTTP_PROXY"];
}
})();
if (proxyVar) {
return new URL(proxyVar);
} else {
return void 0;
}
}
exports.getProxyUrl = getProxyUrl;
function checkBypass(reqUrl) {
if (!reqUrl.hostname) {
return false;
}
const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || "";
if (!noProxy) {
return false;
}
let reqPort;
if (reqUrl.port) {
reqPort = Number(reqUrl.port);
} else if (reqUrl.protocol === "http:") {
reqPort = 80;
} else if (reqUrl.protocol === "https:") {
reqPort = 443;
}
const upperReqHosts = [reqUrl.hostname.toUpperCase()];
if (typeof reqPort === "number") {
upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
}
for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) {
if (upperReqHosts.some((x) => x === upperNoProxyItem)) {
return true;
}
}
return false;
}
exports.checkBypass = checkBypass;
}
});
// node_modules/tunnel/lib/tunnel.js
var require_tunnel = __commonJS({
"node_modules/tunnel/lib/tunnel.js"(exports) {
"use strict";
var net = require("net");
var tls = require("tls");
var http = require("http");
var https = require("https");
var events = require("events");
var assert = require("assert");
var util = require("util");
exports.httpOverHttp = httpOverHttp;
exports.httpsOverHttp = httpsOverHttp;
exports.httpOverHttps = httpOverHttps;
exports.httpsOverHttps = httpsOverHttps;
function httpOverHttp(options) {
var agent = new TunnelingAgent(options);
agent.request = http.request;
return agent;
}
function httpsOverHttp(options) {
var agent = new TunnelingAgent(options);
agent.request = http.request;
agent.createSocket = createSecureSocket;
agent.defaultPort = 443;
return agent;
}
function httpOverHttps(options) {
var agent = new TunnelingAgent(options);
agent.request = https.request;
return agent;
}
function httpsOverHttps(options) {
var agent = new TunnelingAgent(options);
agent.request = https.request;
agent.createSocket = createSecureSocket;
agent.defaultPort = 443;
return agent;
}
function TunnelingAgent(options) {
var self2 = this;
self2.options = options || {};
self2.proxyOptions = self2.options.proxy || {};
self2.maxSockets = self2.options.maxSockets || http.Agent.defaultMaxSockets;
self2.requests = [];
self2.sockets = [];
self2.on("free", function onFree(socket, host, port, localAddress) {
var options2 = toOptions(host, port, localAddress);
for (var i = 0, len = self2.requests.length; i < len; ++i) {
var pending = self2.requests[i];
if (pending.host === options2.host && pending.port === options2.port) {
self2.requests.splice(i, 1);
pending.request.onSocket(socket);
return;
}
}
socket.destroy();
self2.removeSocket(socket);
});
}
util.inherits(TunnelingAgent, events.EventEmitter);
TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {
var self2 = this;
var options = mergeOptions({ request: req }, self2.options, toOptions(host, port, localAddress));
if (self2.sockets.length >= this.maxSockets) {
self2.requests.push(options);
return;
}
self2.createSocket(options, function(socket) {
socket.on("free", onFree);
socket.on("close", onCloseOrRemove);
socket.on("agentRemove", onCloseOrRemove);
req.onSocket(socket);
function onFree() {
self2.emit("free", socket, options);
}
function onCloseOrRemove(err) {
self2.removeSocket(socket);
socket.removeListener("free", onFree);
socket.removeListener("close", onCloseOrRemove);
socket.removeListener("agentRemove", onCloseOrRemove);
}
});
};
TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
var self2 = this;
var placeholder = {};
self2.sockets.push(placeholder);
var connectOptions = mergeOptions({}, self2.proxyOptions, {
method: "CONNECT",
path: options.host + ":" + options.port,
agent: false,
headers: {
host: options.host + ":" + options.port
}
});
if (options.localAddress) {
connectOptions.localAddress = options.localAddress;
}
if (connectOptions.proxyAuth) {
connectOptions.headers = connectOptions.headers || {};
connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64");
}
debug2("making CONNECT request");
var connectReq = self2.request(connectOptions);
connectReq.useChunkedEncodingByDefault = false;
connectReq.once("response", onResponse);
connectReq.once("upgrade", onUpgrade);
connectReq.once("connect", onConnect);
connectReq.once("error", onError);
connectReq.end();
function onResponse(res) {
res.upgrade = true;
}
function onUpgrade(res, socket, head) {
process.nextTick(function() {
onConnect(res, socket, head);
});
}
function onConnect(res, socket, head) {
connectReq.removeAllListeners();
socket.removeAllListeners();
if (res.statusCode !== 200) {
debug2(
"tunneling socket could not be established, statusCode=%d",
res.statusCode
);
socket.destroy();
var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode);
error.code = "ECONNRESET";
options.request.emit("error", error);
self2.removeSocket(placeholder);
return;
}
if (head.length > 0) {
debug2("got illegal response body from proxy");
socket.destroy();
var error = new Error("got illegal response body from proxy");
error.code = "ECONNRESET";
options.request.emit("error", error);
self2.removeSocket(placeholder);
return;
}
debug2("tunneling connection has established");
self2.sockets[self2.sockets.indexOf(placeholder)] = socket;
return cb(socket);
}
function onError(cause) {
connectReq.removeAllListeners();
debug2(
"tunneling socket could not be established, cause=%s\n",
cause.message,
cause.stack
);
var error = new Error("tunneling socket could not be established, cause=" + cause.message);
error.code = "ECONNRESET";
options.request.emit("error", error);
self2.removeSocket(placeholder);
}
};
TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
var pos = this.sockets.indexOf(socket);
if (pos === -1) {
return;
}
this.sockets.splice(pos, 1);
var pending = this.requests.shift();
if (pending) {
this.createSocket(pending, function(socket2) {
pending.request.onSocket(socket2);
});
}
};
function createSecureSocket(options, cb) {
var self2 = this;
TunnelingAgent.prototype.createSocket.call(self2, options, function(socket) {
var hostHeader = options.request.getHeader("host");
var tlsOptions = mergeOptions({}, self2.options, {
socket,
servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host
});
var secureSocket = tls.connect(0, tlsOptions);
self2.sockets[self2.sockets.indexOf(socket)] = secureSocket;
cb(secureSocket);
});
}
function toOptions(host, port, localAddress) {
if (typeof host === "string") {
return {
host,
port,
localAddress
};
}
return host;
}
function mergeOptions(target) {
for (var i = 1, len = arguments.length; i < len; ++i) {
var overrides = arguments[i];
if (typeof overrides === "object") {
var keys = Object.keys(overrides);
for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {
var k = keys[j];
if (overrides[k] !== void 0) {
target[k] = overrides[k];
}
}
}
}
return target;
}
var debug2;
if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
debug2 = function() {
var args = Array.prototype.slice.call(arguments);
if (typeof args[0] === "string") {
args[0] = "TUNNEL: " + args[0];
} else {
args.unshift("TUNNEL:");
}
console.error.apply(console, args);
};
} else {
debug2 = function() {
};
}
exports.debug = debug2;
}
});
// node_modules/tunnel/index.js
var require_tunnel2 = __commonJS({
"node_modules/tunnel/index.js"(exports, module2) {
module2.exports = require_tunnel();
}
});
// node_modules/@actions/http-client/lib/index.js
var require_lib = __commonJS({
"node_modules/@actions/http-client/lib/index.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
return m[k];
} });
} : function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
o[k2] = m[k];
});
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
if (mod != null) {
for (var k in mod)
if (k !== "default" && Object.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k);
}
__setModuleDefault(result, mod);
return result;
};
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
var http = __importStar(require("http"));
var https = __importStar(require("https"));
var pm = __importStar(require_proxy());
var tunnel = __importStar(require_tunnel2());
var HttpCodes;
(function(HttpCodes2) {
HttpCodes2[HttpCodes2["OK"] = 200] = "OK";
HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices";
HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently";
HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved";
HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther";
HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified";
HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy";
HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy";
HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect";
HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect";
HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest";
HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized";
HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired";
HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden";
HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound";
HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed";
HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable";
HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout";
HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict";
HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone";
HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests";
HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError";
HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented";
HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway";
HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable";
HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout";
})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
var Headers;
(function(Headers2) {
Headers2["Accept"] = "accept";
Headers2["ContentType"] = "content-type";
})(Headers = exports.Headers || (exports.Headers = {}));
var MediaTypes;
(function(MediaTypes2) {
MediaTypes2["ApplicationJson"] = "application/json";
})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
function getProxyUrl(serverUrl) {
const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
return proxyUrl ? proxyUrl.href : "";
}
exports.getProxyUrl = getProxyUrl;
var HttpRedirectCodes = [
HttpCodes.MovedPermanently,
HttpCodes.ResourceMoved,
HttpCodes.SeeOther,
HttpCodes.TemporaryRedirect,
HttpCodes.PermanentRedirect
];
var HttpResponseRetryCodes = [
HttpCodes.BadGateway,
HttpCodes.ServiceUnavailable,
HttpCodes.GatewayTimeout
];
var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"];
var ExponentialBackoffCeiling = 10;
var ExponentialBackoffTimeSlice = 5;
var HttpClientError = class extends Error {
constructor(message, statusCode) {
super(message);
this.name = "HttpClientError";
this.statusCode = statusCode;
Object.setPrototypeOf(this, HttpClientError.prototype);
}
};
exports.HttpClientError = HttpClientError;
var HttpClientResponse = class {
constructor(message) {
this.message = message;
}
readBody() {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
let output = Buffer.alloc(0);
this.message.on("data", (chunk) => {
output = Buffer.concat([output, chunk]);
});
this.message.on("end", () => {
resolve(output.toString());
});
}));
});
}
};
exports.HttpClientResponse = HttpClientResponse;
function isHttps(requestUrl) {
const parsedUrl = new URL(requestUrl);
return parsedUrl.protocol === "https:";
}
exports.isHttps = isHttps;
var HttpClient = class {
constructor(userAgent, handlers, requestOptions) {
this._ignoreSslError = false;
this._allowRedirects = true;
this._allowRedirectDowngrade = false;
this._maxRedirects = 50;
this._allowRetries = false;
this._maxRetries = 1;
this._keepAlive = false;
this._disposed = false;
this.userAgent = userAgent;
this.handlers = handlers || [];
this.requestOptions = requestOptions;
if (requestOptions) {
if (requestOptions.ignoreSslError != null) {
this._ignoreSslError = requestOptions.ignoreSslError;
}
this._socketTimeout = requestOptions.socketTimeout;
if (requestOptions.allowRedirects != null) {
this._allowRedirects = requestOptions.allowRedirects;
}
if (requestOptions.allowRedirectDowngrade != null) {
this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
}
if (requestOptions.maxRedirects != null) {
this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
}
if (requestOptions.keepAlive != null) {
this._keepAlive = requestOptions.keepAlive;
}
if (requestOptions.allowRetries != null) {
this._allowRetries = requestOptions.allowRetries;
}
if (requestOptions.maxRetries != null) {
this._maxRetries = requestOptions.maxRetries;
}
}
}
options(requestUrl, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request("OPTIONS", requestUrl, null, additionalHeaders || {});
});
}
get(requestUrl, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request("GET", requestUrl, null, additionalHeaders || {});
});
}
del(requestUrl, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request("DELETE", requestUrl, null, additionalHeaders || {});
});
}
post(requestUrl, data, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request("POST", requestUrl, data, additionalHeaders || {});
});
}
patch(requestUrl, data, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request("PATCH", requestUrl, data, additionalHeaders || {});
});
}
put(requestUrl, data, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request("PUT", requestUrl, data, additionalHeaders || {});
});
}
head(requestUrl, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request("HEAD", requestUrl, null, additionalHeaders || {});
});
}
sendStream(verb, requestUrl, stream, additionalHeaders) {
return __awaiter(this, void 0, void 0, function* () {
return this.request(verb, requestUrl, stream, additionalHeaders);
});
}
getJson(requestUrl, additionalHeaders = {}) {
return __awaiter(this, void 0, void 0, function* () {
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
const res = yield this.get(requestUrl, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
}
postJson(requestUrl, obj, additionalHeaders = {}) {
return __awaiter(this, void 0, void 0, function* () {
const data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
const res = yield this.post(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
}
putJson(requestUrl, obj, additionalHeaders = {}) {
return __awaiter(this, void 0, void 0, function* () {
const data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
const res = yield this.put(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
}
patchJson(requestUrl, obj, additionalHeaders = {}) {
return __awaiter(this, void 0, void 0, function* () {
const data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
const res = yield this.patch(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
}
request(verb, requestUrl, data, headers) {
return __awaiter(this, void 0, void 0, function* () {
if (this._disposed) {
throw new Error("Client has already been disposed.");
}
const parsedUrl = new URL(requestUrl);
let info2 = this._prepareRequest(verb, parsedUrl, headers);
const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1;
let numTries = 0;
let response;
do {
response = yield this.requestRaw(info2, data);
if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) {
let authenticationHandler;
for (const handler of this.handlers) {
if (handler.canHandleAuthentication(response)) {
authenticationHandler = handler;
break;
}
}
if (authenticationHandler) {
return authenticationHandler.handleAuthentication(this, info2, data);
} else {
return response;
}
}
let redirectsRemaining = this._maxRedirects;
while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) {
const redirectUrl = response.message.headers["location"];
if (!redirectUrl) {
break;
}
const parsedRedirectUrl = new URL(redirectUrl);
if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) {
throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");
}
yield response.readBody();
if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
for (const header in headers) {
if (header.toLowerCase() === "authorization") {
delete headers[header];
}
}
}
info2 = this._prepareRequest(verb, parsedRedirectUrl, headers);
response = yield this.requestRaw(info2, data);
redirectsRemaining--;
}
if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) {
return response;
}
numTries += 1;
if (numTries < maxTries) {
yield response.readBody();
yield this._performExponentialBackoff(numTries);
}
} while (numTries < maxTries);
return response;
});
}
dispose() {
if (this._agent) {
this._agent.destroy();
}
this._disposed = true;
}
requestRaw(info2, data) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
function callbackForResult(err, res) {
if (err) {
reject(err);
} else if (!res) {
reject(new Error("Unknown error"));
} else {
resolve(res);
}
}
this.requestRawWithCallback(info2, data, callbackForResult);
});
});
}
requestRawWithCallback(info2, data, onResult) {
if (typeof data === "string") {
if (!info2.options.headers) {
info2.options.headers = {};
}
info2.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8");
}
let callbackCalled = false;
function handleResult(err, res) {
if (!callbackCalled) {
callbackCalled = true;
onResult(err, res);
}
}
const req = info2.httpModule.request(info2.options, (msg) => {
const res = new HttpClientResponse(msg);
handleResult(void 0, res);
});
let socket;
req.on("socket", (sock) => {
socket = sock;
});
req.setTimeout(this._socketTimeout || 3 * 6e4, () => {
if (socket) {
socket.end();
}
handleResult(new Error(`Request timeout: ${info2.options.path}`));
});
req.on("error", function(err) {
handleResult(err);
});
if (data && typeof data === "string") {
req.write(data, "utf8");
}
if (data && typeof data !== "string") {
data.on("close", function() {
req.end();
});
data.pipe(req);
} else {
req.end();
}
}
getAgent(serverUrl) {
const parsedUrl = new URL(serverUrl);
return this._getAgent(parsedUrl);
}
_prepareRequest(method, requestUrl, headers) {
const info2 = {};
info2.parsedUrl = requestUrl;
const usingSsl = info2.parsedUrl.protocol === "https:";
info2.httpModule = usingSsl ? https : http;
const defaultPort = usingSsl ? 443 : 80;
info2.options = {};
info2.options.host = info2.parsedUrl.hostname;
info2.options.port = info2.parsedUrl.port ? parseInt(info2.parsedUrl.port) : defaultPort;
info2.options.path = (info2.parsedUrl.pathname || "") + (info2.parsedUrl.search || "");
info2.options.method = method;
info2.options.headers = this._mergeHeaders(headers);
if (this.userAgent != null) {
info2.options.headers["user-agent"] = this.userAgent;
}
info2.options.agent = this._getAgent(info2.parsedUrl);
if (this.handlers) {
for (const handler of this.handlers) {
handler.prepareRequest(info2.options);
}
}
return info2;
}
_mergeHeaders(headers) {
if (this.requestOptions && this.requestOptions.headers) {
return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));
}
return lowercaseKeys(headers || {});
}
_getExistingOrDefaultHeader(additionalHeaders, header, _default) {
let clientHeader;
if (this.requestOptions && this.requestOptions.headers) {
clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
}
return additionalHeaders[header] || clientHeader || _default;
}
_getAgent(parsedUrl) {
let agent;
const proxyUrl = pm.getProxyUrl(parsedUrl);
const useProxy = proxyUrl && proxyUrl.hostname;
if (this._keepAlive && useProxy) {
agent = this._proxyAgent;
}
if (this._keepAlive && !useProxy) {
agent = this._agent;
}
if (agent) {
return agent;
}
const usingSsl = parsedUrl.protocol === "https:";
let maxSockets = 100;
if (this.requestOptions) {
maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
}
if (proxyUrl && proxyUrl.hostname) {
const agentOptions = {
maxSockets,
keepAlive: this._keepAlive,
proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && {
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
}), { host: proxyUrl.hostname, port: proxyUrl.port })
};
let tunnelAgent;
const overHttps = proxyUrl.protocol === "https:";
if (usingSsl) {
tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
} else {
tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
}
agent = tunnelAgent(agentOptions);
this._proxyAgent = agent;
}
if (this._keepAlive && !agent) {
const options = { keepAlive: this._keepAlive, maxSockets };
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
this._agent = agent;
}
if (!agent) {
agent = usingSsl ? https.globalAgent : http.globalAgent;
}
if (usingSsl && this._ignoreSslError) {
agent.options = Object.assign(agent.options || {}, {
rejectUnauthorized: false
});
}
return agent;
}
_performExponentialBackoff(retryNumber) {
return __awaiter(this, void 0, void 0, function* () {
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
return new Promise((resolve) => setTimeout(() => resolve(), ms));
});
}
_processResponse(res, options) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
const statusCode = res.message.statusCode || 0;
const response = {
statusCode,
result: null,
headers: {}
};
if (statusCode === HttpCodes.NotFound) {
resolve(response);
}
function dateTimeDeserializer(key, value) {
if (typeof value === "string") {
const a = new Date(value);
if (!isNaN(a.valueOf())) {
return a;
}
}
return value;
}
let obj;
let contents;
try {
contents = yield res.readBody();
if (contents && contents.length > 0) {
if (options && options.deserializeDates) {
obj = JSON.parse(contents, dateTimeDeserializer);
} else {
obj = JSON.parse(contents);
}
response.result = obj;
}
response.headers = res.message.headers;
} catch (err) {
}
if (statusCode > 299) {
let msg;
if (obj && obj.message) {
msg = obj.message;
} else if (contents && contents.length > 0) {
msg = contents;
} else {
msg = `Failed request: (${statusCode})`;
}
const err = new HttpClientError(msg, statusCode);
err.result = response.result;
reject(err);
} else {
resolve(response);
}
}));
});
}
};
exports.HttpClient = HttpClient;
var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
}
});
// node_modules/@actions/http-client/lib/auth.js
var require_auth = __commonJS({
"node_modules/@actions/http-client/lib/auth.js"(exports) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;
var BasicCredentialHandler = class {
constructor(username, password) {
this.username = username;
this.password = password;
}
prepareRequest(options) {
if (!options.headers) {
throw Error("The request has no headers");
}
options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`;
}
canHandleAuthentication() {
return false;
}
handleAuthentication() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error("not implemented");
});
}
};
exports.BasicCredentialHandler = BasicCredentialHandler;
var BearerCredentialHandler = class {
constructor(token) {
this.token = token;
}
prepareRequest(options) {
if (!options.headers) {
throw Error("The request has no headers");
}
options.headers["Authorization"] = `Bearer ${this.token}`;
}
canHandleAuthentication() {
return false;
}
handleAuthentication() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error("not implemented");
});
}
};
exports.BearerCredentialHandler = BearerCredentialHandler;
var PersonalAccessTokenCredentialHandler = class {
constructor(token) {
this.token = token;
}
prepareRequest(options) {
if (!options.headers) {
throw Error("The request has no headers");
}
options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`;
}
canHandleAuthentication() {
return false;
}
handleAuthentication() {
return __awaiter(this, void 0, void 0, function* () {
throw new Error("not implemented");
});
}
};
exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
}
});
// node_modules/@actions/core/lib/oidc-utils.js
var require_oidc_utils = __commonJS({
"node_modules/@actions/core/lib/oidc-utils.js"(exports) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.OidcClient = void 0;
var http_client_1 = require_lib();
var auth_1 = require_auth();
var core_1 = require_core();
var OidcClient = class {
static createHttpClient(allowRetry = true, maxRetry = 10) {
const requestOptions = {
allowRetries: allowRetry,
maxRetries: maxRetry
};
return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
}
static getRequestToken() {
const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];
if (!token) {
throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable");
}
return token;
}
static getIDTokenUrl() {
const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];
if (!runtimeUrl) {
throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");
}
return runtimeUrl;
}
static getCall(id_token_url) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const httpclient = OidcClient.createHttpClient();
const res = yield httpclient.getJson(id_token_url).catch((error) => {
throw new Error(`Failed to get ID Token.
Error Code : ${error.statusCode}
Error Message: ${error.result.message}`);
});
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
if (!id_token) {
throw new Error("Response json body do not have ID Token field");
}
return id_token;
});
}
static getIDToken(audience) {
return __awaiter(this, void 0, void 0, function* () {
try {
let id_token_url = OidcClient.getIDTokenUrl();
if (audience) {
const encodedAudience = encodeURIComponent(audience);
id_token_url = `${id_token_url}&audience=${encodedAudience}`;
}
core_1.debug(`ID token url is ${id_token_url}`);
const id_token = yield OidcClient.getCall(id_token_url);
core_1.setSecret(id_token);
return id_token;
} catch (error) {
throw new Error(`Error message: ${error.message}`);
}
});
}
};
exports.OidcClient = OidcClient;
}
});
// node_modules/@actions/core/lib/summary.js
var require_summary = __commonJS({
"node_modules/@actions/core/lib/summary.js"(exports) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
var os_1 = require("os");
var fs_1 = require("fs");
var { access, appendFile, writeFile } = fs_1.promises;
exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY";
exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";
var Summary = class {
constructor() {
this._buffer = "";
}
filePath() {
return __awaiter(this, void 0, void 0, function* () {
if (this._filePath) {
return this._filePath;
}
const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
if (!pathFromEnv) {
throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
}
try {
yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
} catch (_a) {
throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);
}
this._filePath = pathFromEnv;
return this._filePath;
});
}
wrap(tag, content, attrs = {}) {
const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join("");
if (!content) {
return `<${tag}${htmlAttrs}>`;
}
return `<${tag}${htmlAttrs}>${content}</${tag}>`;
}
write(options) {
return __awaiter(this, void 0, void 0, function* () {
const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);
const filePath = yield this.filePath();
const writeFunc = overwrite ? writeFile : appendFile;
yield writeFunc(filePath, this._buffer, { encoding: "utf8" });
return this.emptyBuffer();
});
}
clear() {
return __awaiter(this, void 0, void 0, function* () {
return this.emptyBuffer().write({ overwrite: true });
});
}
stringify() {
return this._buffer;
}
isEmptyBuffer() {
return this._buffer.length === 0;
}
emptyBuffer() {
this._buffer = "";
return this;
}
addRaw(text, addEOL = false) {
this._buffer += text;
return addEOL ? this.addEOL() : this;
}
addEOL() {
return this.addRaw(os_1.EOL);
}
addCodeBlock(code, lang) {
const attrs = Object.assign({}, lang && { lang });
const element = this.wrap("pre", this.wrap("code", code), attrs);
return this.addRaw(element).addEOL();
}
addList(items, ordered = false) {
const tag = ordered ? "ol" : "ul";
const listItems = items.map((item) => this.wrap("li", item)).join("");
const element = this.wrap(tag, listItems);
return this.addRaw(element).addEOL();
}
addTable(rows) {
const tableBody = rows.map((row) => {
const cells = row.map((cell) => {
if (typeof cell === "string") {
return this.wrap("td", cell);
}
const { header, data, colspan, rowspan } = cell;
const tag = header ? "th" : "td";
const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan });
return this.wrap(tag, data, attrs);
}).join("");
return this.wrap("tr", cells);
}).join("");
const element = this.wrap("table", tableBody);
return this.addRaw(element).addEOL();
}
addDetails(label, content) {
const element = this.wrap("details", this.wrap("summary", label) + content);
return this.addRaw(element).addEOL();
}
addImage(src, alt, options) {
const { width, height } = options || {};
const attrs = Object.assign(Object.assign({}, width && { width }), height && { height });
const element = this.wrap("img", null, Object.assign({ src, alt }, attrs));
return this.addRaw(element).addEOL();
}
addHeading(text, level) {
const tag = `h${level}`;
const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1";
const element = this.wrap(allowedTag, text);
return this.addRaw(element).addEOL();
}
addSeparator() {
const element = this.wrap("hr", null);
return this.addRaw(element).addEOL();
}
addBreak() {
const element = this.wrap("br", null);
return this.addRaw(element).addEOL();
}
addQuote(text, cite) {
const attrs = Object.assign({}, cite && { cite });
const element = this.wrap("blockquote", text, attrs);
return this.addRaw(element).addEOL();
}
addLink(text, href) {
const element = this.wrap("a", text, { href });
return this.addRaw(element).addEOL();
}
};
var _summary = new Summary();
exports.markdownSummary = _summary;
exports.summary = _summary;
}
});
// node_modules/@actions/core/lib/path-utils.js
var require_path_utils = __commonJS({
"node_modules/@actions/core/lib/path-utils.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
return m[k];
} });
} : function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
o[k2] = m[k];
});
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
if (mod != null) {
for (var k in mod)
if (k !== "default" && Object.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k);
}
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;
var path5 = __importStar(require("path"));
function toPosixPath(pth) {
return pth.replace(/[\\]/g, "/");
}
exports.toPosixPath = toPosixPath;
function toWin32Path(pth) {
return pth.replace(/[/]/g, "\\");
}
exports.toWin32Path = toWin32Path;
function toPlatformPath(pth) {
return pth.replace(/[/\\]/g, path5.sep);
}
exports.toPlatformPath = toPlatformPath;
}
});
// node_modules/@actions/core/lib/core.js
var require_core = __commonJS({
"node_modules/@actions/core/lib/core.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
return m[k];
} });
} : function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
o[k2] = m[k];
});
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
});
var __importStar = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
if (mod != null) {
for (var k in mod)
if (k !== "default" && Object.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k);
}
__setModuleDefault(result, mod);
return result;
};
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
var command_1 = require_command();
var file_command_1 = require_file_command();
var utils_1 = require_utils();
var os3 = __importStar(require("os"));
var path5 = __importStar(require("path"));
var oidc_utils_1 = require_oidc_utils();
var ExitCode;
(function(ExitCode2) {
ExitCode2[ExitCode2["Success"] = 0] = "Success";
ExitCode2[ExitCode2["Failure"] = 1] = "Failure";
})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));
function exportVariable(name, val) {
const convertedVal = utils_1.toCommandValue(val);
process.env[name] = convertedVal;
const filePath = process.env["GITHUB_ENV"] || "";
if (filePath) {
return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val));
}
command_1.issueCommand("set-env", { name }, convertedVal);
}
exports.exportVariable = exportVariable;
function setSecret(secret) {
command_1.issueCommand("add-mask", {}, secret);
}
exports.setSecret = setSecret;
function addPath(inputPath) {
const filePath = process.env["GITHUB_PATH"] || "";
if (filePath) {
file_command_1.issueFileCommand("PATH", inputPath);
} else {
command_1.issueCommand("add-path", {}, inputPath);
}
process.env["PATH"] = `${inputPath}${path5.delimiter}${process.env["PATH"]}`;
}
exports.addPath = addPath;
function getInput2(name, options) {
const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || "";
if (options && options.required && !val) {
throw new Error(`Input required and not supplied: ${name}`);
}
if (options && options.trimWhitespace === false) {
return val;
}
return val.trim();
}
exports.getInput = getInput2;
function getMultilineInput(name, options) {
const inputs = getInput2(name, options).split("\n").filter((x) => x !== "");
if (options && options.trimWhitespace === false) {
return inputs;
}
return inputs.map((input) => input.trim());
}
exports.getMultilineInput = getMultilineInput;
function getBooleanInput(name, options) {
const trueValue = ["true", "True", "TRUE"];
const falseValue = ["false", "False", "FALSE"];
const val = getInput2(name, options);
if (trueValue.includes(val))
return true;
if (falseValue.includes(val))
return false;
throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
}
exports.getBooleanInput = getBooleanInput;
function setOutput2(name, value) {
const filePath = process.env["GITHUB_OUTPUT"] || "";
if (filePath) {
return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value));
}
process.stdout.write(os3.EOL);
command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value));
}
exports.setOutput = setOutput2;
function setCommandEcho(enabled) {
command_1.issue("echo", enabled ? "on" : "off");
}
exports.setCommandEcho = setCommandEcho;
function setFailed2(message) {
process.exitCode = ExitCode.Failure;
error(message);
}
exports.setFailed = setFailed2;
function isDebug() {
return process.env["RUNNER_DEBUG"] === "1";
}
exports.isDebug = isDebug;
function debug2(message) {
command_1.issueCommand("debug", {}, message);
}
exports.debug = debug2;
function error(message, properties = {}) {
command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.error = error;
function warning2(message, properties = {}) {
command_1.issueCommand("warning", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.warning = warning2;
function notice2(message, properties = {}) {
command_1.issueCommand("notice", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
}
exports.notice = notice2;
function info2(message) {
process.stdout.write(message + os3.EOL);
}
exports.info = info2;
function startGroup(name) {
command_1.issue("group", name);
}
exports.startGroup = startGroup;
function endGroup() {
command_1.issue("endgroup");
}
exports.endGroup = endGroup;
function group(name, fn) {
return __awaiter(this, void 0, void 0, function* () {
startGroup(name);
let result;
try {
result = yield fn();
} finally {
endGroup();
}
return result;
});
}
exports.group = group;
function saveState(name, value) {
const filePath = process.env["GITHUB_STATE"] || "";
if (filePath) {
return file_command_1.issueFileCommand("STATE", file_command_1.prepareKeyValueMessage(name, value));
}
command_1.issueCommand("save-state", { name }, utils_1.toCommandValue(value));
}
exports.saveState = saveState;
function getState(name) {
return process.env[`STATE_${name}`] || "";
}
exports.getState = getState;
function getIDToken(aud) {
return __awaiter(this, void 0, void 0, function* () {
return yield oidc_utils_1.OidcClient.getIDToken(aud);
});
}
exports.getIDToken = getIDToken;
var summary_1 = require_summary();
Object.defineProperty(exports, "summary", { enumerable: true, get: function() {
return summary_1.summary;
} });
var summary_2 = require_summary();
Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function() {
return summary_2.markdownSummary;
} });
var path_utils_1 = require_path_utils();
Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function() {
return path_utils_1.toPosixPath;
} });
Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function() {
return path_utils_1.toWin32Path;
} });
Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function() {
return path_utils_1.toPlatformPath;
} });
}
});
// node_modules/semver/internal/constants.js
var require_constants = __commonJS({
"node_modules/semver/internal/constants.js"(exports, module2) {
var SEMVER_SPEC_VERSION = "2.0.0";
var MAX_LENGTH = 256;
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
var MAX_SAFE_COMPONENT_LENGTH = 16;
module2.exports = {
SEMVER_SPEC_VERSION,
MAX_LENGTH,
MAX_SAFE_INTEGER,
MAX_SAFE_COMPONENT_LENGTH
};
}
});
// node_modules/semver/internal/debug.js
var require_debug = __commonJS({
"node_modules/semver/internal/debug.js"(exports, module2) {
var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
};
module2.exports = debug2;
}
});
// node_modules/semver/internal/re.js
var require_re = __commonJS({
"node_modules/semver/internal/re.js"(exports, module2) {
var { MAX_SAFE_COMPONENT_LENGTH } = require_constants();
var debug2 = require_debug();
exports = module2.exports = {};
var re = exports.re = [];
var src = exports.src = [];
var t = exports.t = {};
var R = 0;
var createToken = (name, value, isGlobal) => {
const index = R++;
debug2(name, index, value);
t[name] = index;
src[index] = value;
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
};
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*");
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+");
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
createToken("GTLT", "((?:<|>)?=?)");
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`);
createToken("COERCERTL", src[t.COERCE], true);
createToken("LONETILDE", "(?:~>?)");
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
exports.tildeTrimReplace = "$1~";
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
createToken("LONECARET", "(?:\\^)");
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
exports.caretTrimReplace = "$1^";
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
exports.comparatorTrimReplace = "$1$2$3";
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
createToken("STAR", "(<|>)?=?\\s*\\*");
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
}
});
// node_modules/semver/internal/parse-options.js
var require_parse_options = __commonJS({
"node_modules/semver/internal/parse-options.js"(exports, module2) {
var opts = ["includePrerelease", "loose", "rtl"];
var parseOptions = (options) => !options ? {} : typeof options !== "object" ? { loose: true } : opts.filter((k) => options[k]).reduce((o, k) => {
o[k] = true;
return o;
}, {});
module2.exports = parseOptions;
}
});
// node_modules/semver/internal/identifiers.js
var require_identifiers = __commonJS({
"node_modules/semver/internal/identifiers.js"(exports, module2) {
var numeric = /^[0-9]+$/;
var compareIdentifiers = (a, b) => {
const anum = numeric.test(a);
const bnum = numeric.test(b);
if (anum && bnum) {
a = +a;
b = +b;
}
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
};
var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
module2.exports = {
compareIdentifiers,
rcompareIdentifiers
};
}
});
// node_modules/semver/classes/semver.js
var require_semver = __commonJS({
"node_modules/semver/classes/semver.js"(exports, module2) {
var debug2 = require_debug();
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
var { re, t } = require_re();
var parseOptions = require_parse_options();
var { compareIdentifiers } = require_identifiers();
var SemVer = class {
constructor(version, options) {
options = parseOptions(options);
if (version instanceof SemVer) {
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
return version;
} else {
version = version.version;
}
} else if (typeof version !== "string") {
throw new TypeError(`Invalid Version: ${version}`);
}
if (version.length > MAX_LENGTH) {
throw new TypeError(
`version is longer than ${MAX_LENGTH} characters`
);
}
debug2("SemVer", version, options);
this.options = options;
this.loose = !!options.loose;
this.includePrerelease = !!options.includePrerelease;
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
if (!m) {
throw new TypeError(`Invalid Version: ${version}`);
}
this.raw = version;
this.major = +m[1];
this.minor = +m[2];
this.patch = +m[3];
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
throw new TypeError("Invalid major version");
}
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
throw new TypeError("Invalid minor version");
}
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
throw new TypeError("Invalid patch version");
}
if (!m[4]) {
this.prerelease = [];
} else {
this.prerelease = m[4].split(".").map((id) => {
if (/^[0-9]+$/.test(id)) {
const num = +id;
if (num >= 0 && num < MAX_SAFE_INTEGER) {
return num;
}
}
return id;
});
}
this.build = m[5] ? m[5].split(".") : [];
this.format();
}
format() {
this.version = `${this.major}.${this.minor}.${this.patch}`;
if (this.prerelease.length) {
this.version += `-${this.prerelease.join(".")}`;
}
return this.version;
}
toString() {
return this.version;
}
compare(other) {
debug2("SemVer.compare", this.version, this.options, other);
if (!(other instanceof SemVer)) {
if (typeof other === "string" && other === this.version) {
return 0;
}
other = new SemVer(other, this.options);
}
if (other.version === this.version) {
return 0;
}
return this.compareMain(other) || this.comparePre(other);
}
compareMain(other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
}
comparePre(other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
if (this.prerelease.length && !other.prerelease.length) {
return -1;
} else if (!this.prerelease.length && other.prerelease.length) {
return 1;
} else if (!this.prerelease.length && !other.prerelease.length) {
return 0;
}
let i = 0;
do {
const a = this.prerelease[i];
const b = other.prerelease[i];
debug2("prerelease compare", i, a, b);
if (a === void 0 && b === void 0) {
return 0;
} else if (b === void 0) {
return 1;
} else if (a === void 0) {
return -1;
} else if (a === b) {
continue;
} else {
return compareIdentifiers(a, b);
}
} while (++i);
}
compareBuild(other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
let i = 0;
do {
const a = this.build[i];
const b = other.build[i];
debug2("prerelease compare", i, a, b);
if (a === void 0 && b === void 0) {
return 0;
} else if (b === void 0) {
return 1;
} else if (a === void 0) {
return -1;
} else if (a === b) {
continue;
} else {
return compareIdentifiers(a, b);
}
} while (++i);
}
inc(release, identifier) {
switch (release) {
case "premajor":
this.prerelease.length = 0;
this.patch = 0;
this.minor = 0;
this.major++;
this.inc("pre", identifier);
break;
case "preminor":
this.prerelease.length = 0;
this.patch = 0;
this.minor++;
this.inc("pre", identifier);
break;
case "prepatch":
this.prerelease.length = 0;
this.inc("patch", identifier);
this.inc("pre", identifier);
break;
case "prerelease":
if (this.prerelease.length === 0) {
this.inc("patch", identifier);
}
this.inc("pre", identifier);
break;
case "major":
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
this.major++;
}
this.minor = 0;
this.patch = 0;
this.prerelease = [];
break;
case "minor":
if (this.patch !== 0 || this.prerelease.length === 0) {
this.minor++;
}
this.patch = 0;
this.prerelease = [];
break;
case "patch":
if (this.prerelease.length === 0) {
this.patch++;
}
this.prerelease = [];
break;
case "pre":
if (this.prerelease.length === 0) {
this.prerelease = [0];
} else {
let i = this.prerelease.length;
while (--i >= 0) {
if (typeof this.prerelease[i] === "number") {
this.prerelease[i]++;
i = -2;
}
}
if (i === -1) {
this.prerelease.push(0);
}
}
if (identifier) {
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
if (isNaN(this.prerelease[1])) {
this.prerelease = [identifier, 0];
}
} else {
this.prerelease = [identifier, 0];
}
}
break;
default:
throw new Error(`invalid increment argument: ${release}`);
}
this.format();
this.raw = this.version;
return this;
}
};
module2.exports = SemVer;
}
});
// node_modules/semver/functions/parse.js
var require_parse2 = __commonJS({
"node_modules/semver/functions/parse.js"(exports, module2) {
var { MAX_LENGTH } = require_constants();
var { re, t } = require_re();
var SemVer = require_semver();
var parseOptions = require_parse_options();
var parse = (version, options) => {
options = parseOptions(options);
if (version instanceof SemVer) {
return version;
}
if (typeof version !== "string") {
return null;
}
if (version.length > MAX_LENGTH) {
return null;
}
const r = options.loose ? re[t.LOOSE] : re[t.FULL];
if (!r.test(version)) {
return null;
}
try {
return new SemVer(version, options);
} catch (er) {
return null;
}
};
module2.exports = parse;
}
});
// node_modules/semver/functions/valid.js
var require_valid = __commonJS({
"node_modules/semver/functions/valid.js"(exports, module2) {
var parse = require_parse2();
var valid = (version, options) => {
const v = parse(version, options);
return v ? v.version : null;
};
module2.exports = valid;
}
});
// node_modules/semver/functions/clean.js
var require_clean = __commonJS({
"node_modules/semver/functions/clean.js"(exports, module2) {
var parse = require_parse2();
var clean = (version, options) => {
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
return s ? s.version : null;
};
module2.exports = clean;
}
});
// node_modules/semver/functions/inc.js
var require_inc = __commonJS({
"node_modules/semver/functions/inc.js"(exports, module2) {
var SemVer = require_semver();
var inc = (version, release, options, identifier) => {
if (typeof options === "string") {
identifier = options;
options = void 0;
}
try {
return new SemVer(
version instanceof SemVer ? version.version : version,
options
).inc(release, identifier).version;
} catch (er) {
return null;
}
};
module2.exports = inc;
}
});
// node_modules/semver/functions/compare.js
var require_compare = __commonJS({
"node_modules/semver/functions/compare.js"(exports, module2) {
var SemVer = require_semver();
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
module2.exports = compare;
}
});
// node_modules/semver/functions/eq.js
var require_eq = __commonJS({
"node_modules/semver/functions/eq.js"(exports, module2) {
var compare = require_compare();
var eq = (a, b, loose) => compare(a, b, loose) === 0;
module2.exports = eq;
}
});
// node_modules/semver/functions/diff.js
var require_diff = __commonJS({
"node_modules/semver/functions/diff.js"(exports, module2) {
var parse = require_parse2();
var eq = require_eq();
var diff = (version1, version2) => {
if (eq(version1, version2)) {
return null;
} else {
const v1 = parse(version1);
const v2 = parse(version2);
const hasPre = v1.prerelease.length || v2.prerelease.length;
const prefix = hasPre ? "pre" : "";
const defaultResult = hasPre ? "prerelease" : "";
for (const key in v1) {
if (key === "major" || key === "minor" || key === "patch") {
if (v1[key] !== v2[key]) {
return prefix + key;
}
}
}
return defaultResult;
}
};
module2.exports = diff;
}
});
// node_modules/semver/functions/major.js
var require_major = __commonJS({
"node_modules/semver/functions/major.js"(exports, module2) {
var SemVer = require_semver();
var major = (a, loose) => new SemVer(a, loose).major;
module2.exports = major;
}
});
// node_modules/semver/functions/minor.js
var require_minor = __commonJS({
"node_modules/semver/functions/minor.js"(exports, module2) {
var SemVer = require_semver();
var minor = (a, loose) => new SemVer(a, loose).minor;
module2.exports = minor;
}
});
// node_modules/semver/functions/patch.js
var require_patch = __commonJS({
"node_modules/semver/functions/patch.js"(exports, module2) {
var SemVer = require_semver();
var patch = (a, loose) => new SemVer(a, loose).patch;
module2.exports = patch;
}
});
// node_modules/semver/functions/prerelease.js
var require_prerelease = __commonJS({
"node_modules/semver/functions/prerelease.js"(exports, module2) {
var parse = require_parse2();
var prerelease = (version, options) => {
const parsed = parse(version, options);
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
};
module2.exports = prerelease;
}
});
// node_modules/semver/functions/rcompare.js
var require_rcompare = __commonJS({
"node_modules/semver/functions/rcompare.js"(exports, module2) {
var compare = require_compare();
var rcompare = (a, b, loose) => compare(b, a, loose);
module2.exports = rcompare;
}
});
// node_modules/semver/functions/compare-loose.js
var require_compare_loose = __commonJS({
"node_modules/semver/functions/compare-loose.js"(exports, module2) {
var compare = require_compare();
var compareLoose = (a, b) => compare(a, b, true);
module2.exports = compareLoose;
}
});
// node_modules/semver/functions/compare-build.js
var require_compare_build = __commonJS({
"node_modules/semver/functions/compare-build.js"(exports, module2) {
var SemVer = require_semver();
var compareBuild = (a, b, loose) => {
const versionA = new SemVer(a, loose);
const versionB = new SemVer(b, loose);
return versionA.compare(versionB) || versionA.compareBuild(versionB);
};
module2.exports = compareBuild;
}
});
// node_modules/semver/functions/sort.js
var require_sort = __commonJS({
"node_modules/semver/functions/sort.js"(exports, module2) {
var compareBuild = require_compare_build();
var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
module2.exports = sort;
}
});
// node_modules/semver/functions/rsort.js
var require_rsort = __commonJS({
"node_modules/semver/functions/rsort.js"(exports, module2) {
var compareBuild = require_compare_build();
var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
module2.exports = rsort;
}
});
// node_modules/semver/functions/gt.js
var require_gt = __commonJS({
"node_modules/semver/functions/gt.js"(exports, module2) {
var compare = require_compare();
var gt = (a, b, loose) => compare(a, b, loose) > 0;
module2.exports = gt;
}
});
// node_modules/semver/functions/lt.js
var require_lt = __commonJS({
"node_modules/semver/functions/lt.js"(exports, module2) {
var compare = require_compare();
var lt = (a, b, loose) => compare(a, b, loose) < 0;
module2.exports = lt;
}
});
// node_modules/semver/functions/neq.js
var require_neq = __commonJS({
"node_modules/semver/functions/neq.js"(exports, module2) {
var compare = require_compare();
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
module2.exports = neq;
}
});
// node_modules/semver/functions/gte.js
var require_gte = __commonJS({
"node_modules/semver/functions/gte.js"(exports, module2) {
var compare = require_compare();
var gte = (a, b, loose) => compare(a, b, loose) >= 0;
module2.exports = gte;
}
});
// node_modules/semver/functions/lte.js
var require_lte = __commonJS({
"node_modules/semver/functions/lte.js"(exports, module2) {
var compare = require_compare();
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
module2.exports = lte;
}
});
// node_modules/semver/functions/cmp.js
var require_cmp = __commonJS({
"node_modules/semver/functions/cmp.js"(exports, module2) {
var eq = require_eq();
var neq = require_neq();
var gt = require_gt();
var gte = require_gte();
var lt = require_lt();
var lte = require_lte();
var cmp = (a, op, b, loose) => {
switch (op) {
case "===":
if (typeof a === "object") {
a = a.version;
}
if (typeof b === "object") {
b = b.version;
}
return a === b;
case "!==":
if (typeof a === "object") {
a = a.version;
}
if (typeof b === "object") {
b = b.version;
}
return a !== b;
case "":
case "=":
case "==":
return eq(a, b, loose);
case "!=":
return neq(a, b, loose);
case ">":
return gt(a, b, loose);
case ">=":
return gte(a, b, loose);
case "<":
return lt(a, b, loose);
case "<=":
return lte(a, b, loose);
default:
throw new TypeError(`Invalid operator: ${op}`);
}
};
module2.exports = cmp;
}
});
// node_modules/semver/functions/coerce.js
var require_coerce = __commonJS({
"node_modules/semver/functions/coerce.js"(exports, module2) {
var SemVer = require_semver();
var parse = require_parse2();
var { re, t } = require_re();
var coerce = (version, options) => {
if (version instanceof SemVer) {
return version;
}
if (typeof version === "number") {
version = String(version);
}
if (typeof version !== "string") {
return null;
}
options = options || {};
let match = null;
if (!options.rtl) {
match = version.match(re[t.COERCE]);
} else {
let next;
while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
if (!match || next.index + next[0].length !== match.index + match[0].length) {
match = next;
}
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
}
re[t.COERCERTL].lastIndex = -1;
}
if (match === null) {
return null;
}
return parse(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options);
};
module2.exports = coerce;
}
});
// node_modules/yallist/iterator.js
var require_iterator = __commonJS({
"node_modules/yallist/iterator.js"(exports, module2) {
"use strict";
module2.exports = function(Yallist) {
Yallist.prototype[Symbol.iterator] = function* () {
for (let walker = this.head; walker; walker = walker.next) {
yield walker.value;
}
};
};
}
});
// node_modules/yallist/yallist.js
var require_yallist = __commonJS({
"node_modules/yallist/yallist.js"(exports, module2) {
"use strict";
module2.exports = Yallist;
Yallist.Node = Node;
Yallist.create = Yallist;
function Yallist(list) {
var self2 = this;
if (!(self2 instanceof Yallist)) {
self2 = new Yallist();
}
self2.tail = null;
self2.head = null;
self2.length = 0;
if (list && typeof list.forEach === "function") {
list.forEach(function(item) {
self2.push(item);
});
} else if (arguments.length > 0) {
for (var i = 0, l = arguments.length; i < l; i++) {
self2.push(arguments[i]);
}
}
return self2;
}
Yallist.prototype.removeNode = function(node) {
if (node.list !== this) {
throw new Error("removing node which does not belong to this list");
}
var next = node.next;
var prev = node.prev;
if (next) {
next.prev = prev;
}
if (prev) {
prev.next = next;
}
if (node === this.head) {
this.head = next;
}
if (node === this.tail) {
this.tail = prev;
}
node.list.length--;
node.next = null;
node.prev = null;
node.list = null;
return next;
};
Yallist.prototype.unshiftNode = function(node) {
if (node === this.head) {
return;
}
if (node.list) {
node.list.removeNode(node);
}
var head = this.head;
node.list = this;
node.next = head;
if (head) {
head.prev = node;
}
this.head = node;
if (!this.tail) {
this.tail = node;
}
this.length++;
};
Yallist.prototype.pushNode = function(node) {
if (node === this.tail) {
return;
}
if (node.list) {
node.list.removeNode(node);
}
var tail = this.tail;
node.list = this;
node.prev = tail;
if (tail) {
tail.next = node;
}
this.tail = node;
if (!this.head) {
this.head = node;
}
this.length++;
};
Yallist.prototype.push = function() {
for (var i = 0, l = arguments.length; i < l; i++) {
push(this, arguments[i]);
}
return this.length;
};
Yallist.prototype.unshift = function() {
for (var i = 0, l = arguments.length; i < l; i++) {
unshift(this, arguments[i]);
}
return this.length;
};
Yallist.prototype.pop = function() {
if (!this.tail) {
return void 0;
}
var res = this.tail.value;
this.tail = this.tail.prev;
if (this.tail) {
this.tail.next = null;
} else {
this.head = null;
}
this.length--;
return res;
};
Yallist.prototype.shift = function() {
if (!this.head) {
return void 0;
}
var res = this.head.value;
this.head = this.head.next;
if (this.head) {
this.head.prev = null;
} else {
this.tail = null;
}
this.length--;
return res;
};
Yallist.prototype.forEach = function(fn, thisp) {
thisp = thisp || this;
for (var walker = this.head, i = 0; walker !== null; i++) {
fn.call(thisp, walker.value, i, this);
walker = walker.next;
}
};
Yallist.prototype.forEachReverse = function(fn, thisp) {
thisp = thisp || this;
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
fn.call(thisp, walker.value, i, this);
walker = walker.prev;
}
};
Yallist.prototype.get = function(n) {
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
walker = walker.next;
}
if (i === n && walker !== null) {
return walker.value;
}
};
Yallist.prototype.getReverse = function(n) {
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
walker = walker.prev;
}
if (i === n && walker !== null) {
return walker.value;
}
};
Yallist.prototype.map = function(fn, thisp) {
thisp = thisp || this;
var res = new Yallist();
for (var walker = this.head; walker !== null; ) {
res.push(fn.call(thisp, walker.value, this));
walker = walker.next;
}
return res;
};
Yallist.prototype.mapReverse = function(fn, thisp) {
thisp = thisp || this;
var res = new Yallist();
for (var walker = this.tail; walker !== null; ) {
res.push(fn.call(thisp, walker.value, this));
walker = walker.prev;
}
return res;
};
Yallist.prototype.reduce = function(fn, initial) {
var acc;
var walker = this.head;
if (arguments.length > 1) {
acc = initial;
} else if (this.head) {
walker = this.head.next;
acc = this.head.value;
} else {
throw new TypeError("Reduce of empty list with no initial value");
}
for (var i = 0; walker !== null; i++) {
acc = fn(acc, walker.value, i);
walker = walker.next;
}
return acc;
};
Yallist.prototype.reduceReverse = function(fn, initial) {
var acc;
var walker = this.tail;
if (arguments.length > 1) {
acc = initial;
} else if (this.tail) {
walker = this.tail.prev;
acc = this.tail.value;
} else {
throw new TypeError("Reduce of empty list with no initial value");
}
for (var i = this.length - 1; walker !== null; i--) {
acc = fn(acc, walker.value, i);
walker = walker.prev;
}
return acc;
};
Yallist.prototype.toArray = function() {
var arr = new Array(this.length);
for (var i = 0, walker = this.head; walker !== null; i++) {
arr[i] = walker.value;
walker = walker.next;
}
return arr;
};
Yallist.prototype.toArrayReverse = function() {
var arr = new Array(this.length);
for (var i = 0, walker = this.tail; walker !== null; i++) {
arr[i] = walker.value;
walker = walker.prev;
}
return arr;
};
Yallist.prototype.slice = function(from, to) {
to = to || this.length;
if (to < 0) {
to += this.length;
}
from = from || 0;
if (from < 0) {
from += this.length;
}
var ret = new Yallist();
if (to < from || to < 0) {
return ret;
}
if (from < 0) {
from = 0;
}
if (to > this.length) {
to = this.length;
}
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
walker = walker.next;
}
for (; walker !== null && i < to; i++, walker = walker.next) {
ret.push(walker.value);
}
return ret;
};
Yallist.prototype.sliceReverse = function(from, to) {
to = to || this.length;
if (to < 0) {
to += this.length;
}
from = from || 0;
if (from < 0) {
from += this.length;
}
var ret = new Yallist();
if (to < from || to < 0) {
return ret;
}
if (from < 0) {
from = 0;
}
if (to > this.length) {
to = this.length;
}
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
walker = walker.prev;
}
for (; walker !== null && i > from; i--, walker = walker.prev) {
ret.push(walker.value);
}
return ret;
};
Yallist.prototype.splice = function(start, deleteCount, ...nodes) {
if (start > this.length) {
start = this.length - 1;
}
if (start < 0) {
start = this.length + start;
}
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
walker = walker.next;
}
var ret = [];
for (var i = 0; walker && i < deleteCount; i++) {
ret.push(walker.value);
walker = this.removeNode(walker);
}
if (walker === null) {
walker = this.tail;
}
if (walker !== this.head && walker !== this.tail) {
walker = walker.prev;
}
for (var i = 0; i < nodes.length; i++) {
walker = insert(this, walker, nodes[i]);
}
return ret;
};
Yallist.prototype.reverse = function() {
var head = this.head;
var tail = this.tail;
for (var walker = head; walker !== null; walker = walker.prev) {
var p = walker.prev;
walker.prev = walker.next;
walker.next = p;
}
this.head = tail;
this.tail = head;
return this;
};
function insert(self2, node, value) {
var inserted = node === self2.head ? new Node(value, null, node, self2) : new Node(value, node, node.next, self2);
if (inserted.next === null) {
self2.tail = inserted;
}
if (inserted.prev === null) {
self2.head = inserted;
}
self2.length++;
return inserted;
}
function push(self2, item) {
self2.tail = new Node(item, self2.tail, null, self2);
if (!self2.head) {
self2.head = self2.tail;
}
self2.length++;
}
function unshift(self2, item) {
self2.head = new Node(item, null, self2.head, self2);
if (!self2.tail) {
self2.tail = self2.head;
}
self2.length++;
}
function Node(value, prev, next, list) {
if (!(this instanceof Node)) {
return new Node(value, prev, next, list);
}
this.list = list;
this.value = value;
if (prev) {
prev.next = this;
this.prev = prev;
} else {
this.prev = null;
}
if (next) {
next.prev = this;
this.next = next;
} else {
this.next = null;
}
}
try {
require_iterator()(Yallist);
} catch (er) {
}
}
});
// node_modules/lru-cache/index.js
var require_lru_cache = __commonJS({
"node_modules/lru-cache/index.js"(exports, module2) {
"use strict";
var Yallist = require_yallist();
var MAX = Symbol("max");
var LENGTH = Symbol("length");
var LENGTH_CALCULATOR = Symbol("lengthCalculator");
var ALLOW_STALE = Symbol("allowStale");
var MAX_AGE = Symbol("maxAge");
var DISPOSE = Symbol("dispose");
var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
var LRU_LIST = Symbol("lruList");
var CACHE = Symbol("cache");
var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
var naiveLength = () => 1;
var LRUCache = class {
constructor(options) {
if (typeof options === "number")
options = { max: options };
if (!options)
options = {};
if (options.max && (typeof options.max !== "number" || options.max < 0))
throw new TypeError("max must be a non-negative number");
const max = this[MAX] = options.max || Infinity;
const lc = options.length || naiveLength;
this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
this[ALLOW_STALE] = options.stale || false;
if (options.maxAge && typeof options.maxAge !== "number")
throw new TypeError("maxAge must be a number");
this[MAX_AGE] = options.maxAge || 0;
this[DISPOSE] = options.dispose;
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
this.reset();
}
set max(mL) {
if (typeof mL !== "number" || mL < 0)
throw new TypeError("max must be a non-negative number");
this[MAX] = mL || Infinity;
trim(this);
}
get max() {
return this[MAX];
}
set allowStale(allowStale) {
this[ALLOW_STALE] = !!allowStale;
}
get allowStale() {
return this[ALLOW_STALE];
}
set maxAge(mA) {
if (typeof mA !== "number")
throw new TypeError("maxAge must be a non-negative number");
this[MAX_AGE] = mA;
trim(this);
}
get maxAge() {
return this[MAX_AGE];
}
set lengthCalculator(lC) {
if (typeof lC !== "function")
lC = naiveLength;
if (lC !== this[LENGTH_CALCULATOR]) {
this[LENGTH_CALCULATOR] = lC;
this[LENGTH] = 0;
this[LRU_LIST].forEach((hit) => {
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
this[LENGTH] += hit.length;
});
}
trim(this);
}
get lengthCalculator() {
return this[LENGTH_CALCULATOR];
}
get length() {
return this[LENGTH];
}
get itemCount() {
return this[LRU_LIST].length;
}
rforEach(fn, thisp) {
thisp = thisp || this;
for (let walker = this[LRU_LIST].tail; walker !== null; ) {
const prev = walker.prev;
forEachStep(this, fn, walker, thisp);
walker = prev;
}
}
forEach(fn, thisp) {
thisp = thisp || this;
for (let walker = this[LRU_LIST].head; walker !== null; ) {
const next = walker.next;
forEachStep(this, fn, walker, thisp);
walker = next;
}
}
keys() {
return this[LRU_LIST].toArray().map((k) => k.key);
}
values() {
return this[LRU_LIST].toArray().map((k) => k.value);
}
reset() {
if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
}
this[CACHE] = /* @__PURE__ */ new Map();
this[LRU_LIST] = new Yallist();
this[LENGTH] = 0;
}
dump() {
return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
k: hit.key,
v: hit.value,
e: hit.now + (hit.maxAge || 0)
}).toArray().filter((h) => h);
}
dumpLru() {
return this[LRU_LIST];
}
set(key, value, maxAge) {
maxAge = maxAge || this[MAX_AGE];
if (maxAge && typeof maxAge !== "number")
throw new TypeError("maxAge must be a number");
const now = maxAge ? Date.now() : 0;
const len = this[LENGTH_CALCULATOR](value, key);
if (this[CACHE].has(key)) {
if (len > this[MAX]) {
del(this, this[CACHE].get(key));
return false;
}
const node = this[CACHE].get(key);
const item = node.value;
if (this[DISPOSE]) {
if (!this[NO_DISPOSE_ON_SET])
this[DISPOSE](key, item.value);
}
item.now = now;
item.maxAge = maxAge;
item.value = value;
this[LENGTH] += len - item.length;
item.length = len;
this.get(key);
trim(this);
return true;
}
const hit = new Entry(key, value, len, now, maxAge);
if (hit.length > this[MAX]) {
if (this[DISPOSE])
this[DISPOSE](key, value);
return false;
}
this[LENGTH] += hit.length;
this[LRU_LIST].unshift(hit);
this[CACHE].set(key, this[LRU_LIST].head);
trim(this);
return true;
}
has(key) {
if (!this[CACHE].has(key))
return false;
const hit = this[CACHE].get(key).value;
return !isStale(this, hit);
}
get(key) {
return get(this, key, true);
}
peek(key) {
return get(this, key, false);
}
pop() {
const node = this[LRU_LIST].tail;
if (!node)
return null;
del(this, node);
return node.value;
}
del(key) {
del(this, this[CACHE].get(key));
}
load(arr) {
this.reset();
const now = Date.now();
for (let l = arr.length - 1; l >= 0; l--) {
const hit = arr[l];
const expiresAt = hit.e || 0;
if (expiresAt === 0)
this.set(hit.k, hit.v);
else {
const maxAge = expiresAt - now;
if (maxAge > 0) {
this.set(hit.k, hit.v, maxAge);
}
}
}
}
prune() {
this[CACHE].forEach((value, key) => get(this, key, false));
}
};
var get = (self2, key, doUse) => {
const node = self2[CACHE].get(key);
if (node) {
const hit = node.value;
if (isStale(self2, hit)) {
del(self2, node);
if (!self2[ALLOW_STALE])
return void 0;
} else {
if (doUse) {
if (self2[UPDATE_AGE_ON_GET])
node.value.now = Date.now();
self2[LRU_LIST].unshiftNode(node);
}
}
return hit.value;
}
};
var isStale = (self2, hit) => {
if (!hit || !hit.maxAge && !self2[MAX_AGE])
return false;
const diff = Date.now() - hit.now;
return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE];
};
var trim = (self2) => {
if (self2[LENGTH] > self2[MAX]) {
for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
const prev = walker.prev;
del(self2, walker);
walker = prev;
}
}
};
var del = (self2, node) => {
if (node) {
const hit = node.value;
if (self2[DISPOSE])
self2[DISPOSE](hit.key, hit.value);
self2[LENGTH] -= hit.length;
self2[CACHE].delete(hit.key);
self2[LRU_LIST].removeNode(node);
}
};
var Entry = class {
constructor(key, value, length, now, maxAge) {
this.key = key;
this.value = value;
this.length = length;
this.now = now;
this.maxAge = maxAge || 0;
}
};
var forEachStep = (self2, fn, node, thisp) => {
let hit = node.value;
if (isStale(self2, hit)) {
del(self2, node);
if (!self2[ALLOW_STALE])
hit = void 0;
}
if (hit)
fn.call(thisp, hit.value, hit.key, self2);
};
module2.exports = LRUCache;
}
});
// node_modules/semver/classes/range.js
var require_range = __commonJS({
"node_modules/semver/classes/range.js"(exports, module2) {
var Range = class {
constructor(range, options) {
options = parseOptions(options);
if (range instanceof Range) {
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
return range;
} else {
return new Range(range.raw, options);
}
}
if (range instanceof Comparator) {
this.raw = range.value;
this.set = [[range]];
this.format();
return this;
}
this.options = options;
this.loose = !!options.loose;
this.includePrerelease = !!options.includePrerelease;
this.raw = range;
this.set = range.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
if (!this.set.length) {
throw new TypeError(`Invalid SemVer Range: ${range}`);
}
if (this.set.length > 1) {
const first = this.set[0];
this.set = this.set.filter((c) => !isNullSet(c[0]));
if (this.set.length === 0) {
this.set = [first];
} else if (this.set.length > 1) {
for (const c of this.set) {
if (c.length === 1 && isAny(c[0])) {
this.set = [c];
break;
}
}
}
}
this.format();
}
format() {
this.range = this.set.map((comps) => {
return comps.join(" ").trim();
}).join("||").trim();
return this.range;
}
toString() {
return this.range;
}
parseRange(range) {
range = range.trim();
const memoOpts = Object.keys(this.options).join(",");
const memoKey = `parseRange:${memoOpts}:${range}`;
const cached = cache.get(memoKey);
if (cached) {
return cached;
}
const loose = this.options.loose;
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
debug2("hyphen replace", range);
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
debug2("comparator trim", range);
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
range = range.split(/\s+/).join(" ");
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
if (loose) {
rangeList = rangeList.filter((comp) => {
debug2("loose invalid filter", comp, this.options);
return !!comp.match(re[t.COMPARATORLOOSE]);
});
}
debug2("range list", rangeList);
const rangeMap = /* @__PURE__ */ new Map();
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
for (const comp of comparators) {
if (isNullSet(comp)) {
return [comp];
}
rangeMap.set(comp.value, comp);
}
if (rangeMap.size > 1 && rangeMap.has("")) {
rangeMap.delete("");
}
const result = [...rangeMap.values()];
cache.set(memoKey, result);
return result;
}
intersects(range, options) {
if (!(range instanceof Range)) {
throw new TypeError("a Range is required");
}
return this.set.some((thisComparators) => {
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
return rangeComparators.every((rangeComparator) => {
return thisComparator.intersects(rangeComparator, options);
});
});
});
});
}
test(version) {
if (!version) {
return false;
}
if (typeof version === "string") {
try {
version = new SemVer(version, this.options);
} catch (er) {
return false;
}
}
for (let i = 0; i < this.set.length; i++) {
if (testSet(this.set[i], version, this.options)) {
return true;
}
}
return false;
}
};
module2.exports = Range;
var LRU = require_lru_cache();
var cache = new LRU({ max: 1e3 });
var parseOptions = require_parse_options();
var Comparator = require_comparator();
var debug2 = require_debug();
var SemVer = require_semver();
var {
re,
t,
comparatorTrimReplace,
tildeTrimReplace,
caretTrimReplace
} = require_re();
var isNullSet = (c) => c.value === "<0.0.0-0";
var isAny = (c) => c.value === "";
var isSatisfiable = (comparators, options) => {
let result = true;
const remainingComparators = comparators.slice();
let testComparator = remainingComparators.pop();
while (result && remainingComparators.length) {
result = remainingComparators.every((otherComparator) => {
return testComparator.intersects(otherComparator, options);
});
testComparator = remainingComparators.pop();
}
return result;
};
var parseComparator = (comp, options) => {
debug2("comp", comp, options);
comp = replaceCarets(comp, options);
debug2("caret", comp);
comp = replaceTildes(comp, options);
debug2("tildes", comp);
comp = replaceXRanges(comp, options);
debug2("xrange", comp);
comp = replaceStars(comp, options);
debug2("stars", comp);
return comp;
};
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => {
return replaceTilde(c, options);
}).join(" ");
var replaceTilde = (comp, options) => {
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
return comp.replace(r, (_, M, m, p, pr) => {
debug2("tilde", comp, _, M, m, p, pr);
let ret;
if (isX(M)) {
ret = "";
} else if (isX(m)) {
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
} else if (isX(p)) {
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
} else if (pr) {
debug2("replaceTilde pr", pr);
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
} else {
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
}
debug2("tilde return", ret);
return ret;
});
};
var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => {
return replaceCaret(c, options);
}).join(" ");
var replaceCaret = (comp, options) => {
debug2("caret", comp, options);
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
const z = options.includePrerelease ? "-0" : "";
return comp.replace(r, (_, M, m, p, pr) => {
debug2("caret", comp, _, M, m, p, pr);
let ret;
if (isX(M)) {
ret = "";
} else if (isX(m)) {
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
} else if (isX(p)) {
if (M === "0") {
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
} else {
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
}
} else if (pr) {
debug2("replaceCaret pr", pr);
if (M === "0") {
if (m === "0") {
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
} else {
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
}
} else {
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
}
} else {
debug2("no pr");
if (M === "0") {
if (m === "0") {
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
} else {
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
}
} else {
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
}
}
debug2("caret return", ret);
return ret;
});
};
var replaceXRanges = (comp, options) => {
debug2("replaceXRanges", comp, options);
return comp.split(/\s+/).map((c) => {
return replaceXRange(c, options);
}).join(" ");
};
var replaceXRange = (comp, options) => {
comp = comp.trim();
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
debug2("xRange", comp, ret, gtlt, M, m, p, pr);
const xM = isX(M);
const xm = xM || isX(m);
const xp = xm || isX(p);
const anyX = xp;
if (gtlt === "=" && anyX) {
gtlt = "";
}
pr = options.includePrerelease ? "-0" : "";
if (xM) {
if (gtlt === ">" || gtlt === "<") {
ret = "<0.0.0-0";
} else {
ret = "*";
}
} else if (gtlt && anyX) {
if (xm) {
m = 0;
}
p = 0;
if (gtlt === ">") {
gtlt = ">=";
if (xm) {
M = +M + 1;
m = 0;
p = 0;
} else {
m = +m + 1;
p = 0;
}
} else if (gtlt === "<=") {
gtlt = "<";
if (xm) {
M = +M + 1;
} else {
m = +m + 1;
}
}
if (gtlt === "<") {
pr = "-0";
}
ret = `${gtlt + M}.${m}.${p}${pr}`;
} else if (xm) {
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
} else if (xp) {
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
}
debug2("xRange return", ret);
return ret;
});
};
var replaceStars = (comp, options) => {
debug2("replaceStars", comp, options);
return comp.trim().replace(re[t.STAR], "");
};
var replaceGTE0 = (comp, options) => {
debug2("replaceGTE0", comp, options);
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
};
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
if (isX(fM)) {
from = "";
} else if (isX(fm)) {
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
} else if (isX(fp)) {
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
} else if (fpr) {
from = `>=${from}`;
} else {
from = `>=${from}${incPr ? "-0" : ""}`;
}
if (isX(tM)) {
to = "";
} else if (isX(tm)) {
to = `<${+tM + 1}.0.0-0`;
} else if (isX(tp)) {
to = `<${tM}.${+tm + 1}.0-0`;
} else if (tpr) {
to = `<=${tM}.${tm}.${tp}-${tpr}`;
} else if (incPr) {
to = `<${tM}.${tm}.${+tp + 1}-0`;
} else {
to = `<=${to}`;
}
return `${from} ${to}`.trim();
};
var testSet = (set, version, options) => {
for (let i = 0; i < set.length; i++) {
if (!set[i].test(version)) {
return false;
}
}
if (version.prerelease.length && !options.includePrerelease) {
for (let i = 0; i < set.length; i++) {
debug2(set[i].semver);
if (set[i].semver === Comparator.ANY) {
continue;
}
if (set[i].semver.prerelease.length > 0) {
const allowed = set[i].semver;
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
return true;
}
}
}
return false;
}
return true;
};
}
});
// node_modules/semver/classes/comparator.js
var require_comparator = __commonJS({
"node_modules/semver/classes/comparator.js"(exports, module2) {
var ANY = Symbol("SemVer ANY");
var Comparator = class {
static get ANY() {
return ANY;
}
constructor(comp, options) {
options = parseOptions(options);
if (comp instanceof Comparator) {
if (comp.loose === !!options.loose) {
return comp;
} else {
comp = comp.value;
}
}
debug2("comparator", comp, options);
this.options = options;
this.loose = !!options.loose;
this.parse(comp);
if (this.semver === ANY) {
this.value = "";
} else {
this.value = this.operator + this.semver.version;
}
debug2("comp", this);
}
parse(comp) {
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
const m = comp.match(r);
if (!m) {
throw new TypeError(`Invalid comparator: ${comp}`);
}
this.operator = m[1] !== void 0 ? m[1] : "";
if (this.operator === "=") {
this.operator = "";
}
if (!m[2]) {
this.semver = ANY;
} else {
this.semver = new SemVer(m[2], this.options.loose);
}
}
toString() {
return this.value;
}
test(version) {
debug2("Comparator.test", version, this.options.loose);
if (this.semver === ANY || version === ANY) {
return true;
}
if (typeof version === "string") {
try {
version = new SemVer(version, this.options);
} catch (er) {
return false;
}
}
return cmp(version, this.operator, this.semver, this.options);
}
intersects(comp, options) {
if (!(comp instanceof Comparator)) {
throw new TypeError("a Comparator is required");
}
if (!options || typeof options !== "object") {
options = {
loose: !!options,
includePrerelease: false
};
}
if (this.operator === "") {
if (this.value === "") {
return true;
}
return new Range(comp.value, options).test(this.value);
} else if (comp.operator === "") {
if (comp.value === "") {
return true;
}
return new Range(this.value, options).test(comp.semver);
}
const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
const sameSemVer = this.semver.version === comp.semver.version;
const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
const oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<");
const oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">");
return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
}
};
module2.exports = Comparator;
var parseOptions = require_parse_options();
var { re, t } = require_re();
var cmp = require_cmp();
var debug2 = require_debug();
var SemVer = require_semver();
var Range = require_range();
}
});
// node_modules/semver/functions/satisfies.js
var require_satisfies = __commonJS({
"node_modules/semver/functions/satisfies.js"(exports, module2) {
var Range = require_range();
var satisfies = (version, range, options) => {
try {
range = new Range(range, options);
} catch (er) {
return false;
}
return range.test(version);
};
module2.exports = satisfies;
}
});
// node_modules/semver/ranges/to-comparators.js
var require_to_comparators = __commonJS({
"node_modules/semver/ranges/to-comparators.js"(exports, module2) {
var Range = require_range();
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
module2.exports = toComparators;
}
});
// node_modules/semver/ranges/max-satisfying.js
var require_max_satisfying = __commonJS({
"node_modules/semver/ranges/max-satisfying.js"(exports, module2) {
var SemVer = require_semver();
var Range = require_range();
var maxSatisfying = (versions, range, options) => {
let max = null;
let maxSV = null;
let rangeObj = null;
try {
rangeObj = new Range(range, options);
} catch (er) {
return null;
}
versions.forEach((v) => {
if (rangeObj.test(v)) {
if (!max || maxSV.compare(v) === -1) {
max = v;
maxSV = new SemVer(max, options);
}
}
});
return max;
};
module2.exports = maxSatisfying;
}
});
// node_modules/semver/ranges/min-satisfying.js
var require_min_satisfying = __commonJS({
"node_modules/semver/ranges/min-satisfying.js"(exports, module2) {
var SemVer = require_semver();
var Range = require_range();
var minSatisfying = (versions, range, options) => {
let min = null;
let minSV = null;
let rangeObj = null;
try {
rangeObj = new Range(range, options);
} catch (er) {
return null;
}
versions.forEach((v) => {
if (rangeObj.test(v)) {
if (!min || minSV.compare(v) === 1) {
min = v;
minSV = new SemVer(min, options);
}
}
});
return min;
};
module2.exports = minSatisfying;
}
});
// node_modules/semver/ranges/min-version.js
var require_min_version = __commonJS({
"node_modules/semver/ranges/min-version.js"(exports, module2) {
var SemVer = require_semver();
var Range = require_range();
var gt = require_gt();
var minVersion = (range, loose) => {
range = new Range(range, loose);
let minver = new SemVer("0.0.0");
if (range.test(minver)) {
return minver;
}
minver = new SemVer("0.0.0-0");
if (range.test(minver)) {
return minver;
}
minver = null;
for (let i = 0; i < range.set.length; ++i) {
const comparators = range.set[i];
let setMin = null;
comparators.forEach((comparator) => {
const compver = new SemVer(comparator.semver.version);
switch (comparator.operator) {
case ">":
if (compver.prerelease.length === 0) {
compver.patch++;
} else {
compver.prerelease.push(0);
}
compver.raw = compver.format();
case "":
case ">=":
if (!setMin || gt(compver, setMin)) {
setMin = compver;
}
break;
case "<":
case "<=":
break;
default:
throw new Error(`Unexpected operation: ${comparator.operator}`);
}
});
if (setMin && (!minver || gt(minver, setMin))) {
minver = setMin;
}
}
if (minver && range.test(minver)) {
return minver;
}
return null;
};
module2.exports = minVersion;
}
});
// node_modules/semver/ranges/valid.js
var require_valid2 = __commonJS({
"node_modules/semver/ranges/valid.js"(exports, module2) {
var Range = require_range();
var validRange = (range, options) => {
try {
return new Range(range, options).range || "*";
} catch (er) {
return null;
}
};
module2.exports = validRange;
}
});
// node_modules/semver/ranges/outside.js
var require_outside = __commonJS({
"node_modules/semver/ranges/outside.js"(exports, module2) {
var SemVer = require_semver();
var Comparator = require_comparator();
var { ANY } = Comparator;
var Range = require_range();
var satisfies = require_satisfies();
var gt = require_gt();
var lt = require_lt();
var lte = require_lte();
var gte = require_gte();
var outside = (version, range, hilo, options) => {
version = new SemVer(version, options);
range = new Range(range, options);
let gtfn, ltefn, ltfn, comp, ecomp;
switch (hilo) {
case ">":
gtfn = gt;
ltefn = lte;
ltfn = lt;
comp = ">";
ecomp = ">=";
break;
case "<":
gtfn = lt;
ltefn = gte;
ltfn = gt;
comp = "<";
ecomp = "<=";
break;
default:
throw new TypeError('Must provide a hilo val of "<" or ">"');
}
if (satisfies(version, range, options)) {
return false;
}
for (let i = 0; i < range.set.length; ++i) {
const comparators = range.set[i];
let high = null;
let low = null;
comparators.forEach((comparator) => {
if (comparator.semver === ANY) {
comparator = new Comparator(">=0.0.0");
}
high = high || comparator;
low = low || comparator;
if (gtfn(comparator.semver, high.semver, options)) {
high = comparator;
} else if (ltfn(comparator.semver, low.semver, options)) {
low = comparator;
}
});
if (high.operator === comp || high.operator === ecomp) {
return false;
}
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
return false;
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
return false;
}
}
return true;
};
module2.exports = outside;
}
});
// node_modules/semver/ranges/gtr.js
var require_gtr = __commonJS({
"node_modules/semver/ranges/gtr.js"(exports, module2) {
var outside = require_outside();
var gtr = (version, range, options) => outside(version, range, ">", options);
module2.exports = gtr;
}
});
// node_modules/semver/ranges/ltr.js
var require_ltr = __commonJS({
"node_modules/semver/ranges/ltr.js"(exports, module2) {
var outside = require_outside();
var ltr = (version, range, options) => outside(version, range, "<", options);
module2.exports = ltr;
}
});
// node_modules/semver/ranges/intersects.js
var require_intersects = __commonJS({
"node_modules/semver/ranges/intersects.js"(exports, module2) {
var Range = require_range();
var intersects = (r1, r2, options) => {
r1 = new Range(r1, options);
r2 = new Range(r2, options);
return r1.intersects(r2);
};
module2.exports = intersects;
}
});
// node_modules/semver/ranges/simplify.js
var require_simplify = __commonJS({
"node_modules/semver/ranges/simplify.js"(exports, module2) {
var satisfies = require_satisfies();
var compare = require_compare();
module2.exports = (versions, range, options) => {
const set = [];
let first = null;
let prev = null;
const v = versions.sort((a, b) => compare(a, b, options));
for (const version of v) {
const included = satisfies(version, range, options);
if (included) {
prev = version;
if (!first) {
first = version;
}
} else {
if (prev) {
set.push([first, prev]);
}
prev = null;
first = null;
}
}
if (first) {
set.push([first, null]);
}
const ranges = [];
for (const [min, max] of set) {
if (min === max) {
ranges.push(min);
} else if (!max && min === v[0]) {
ranges.push("*");
} else if (!max) {
ranges.push(`>=${min}`);
} else if (min === v[0]) {
ranges.push(`<=${max}`);
} else {
ranges.push(`${min} - ${max}`);
}
}
const simplified = ranges.join(" || ");
const original = typeof range.raw === "string" ? range.raw : String(range);
return simplified.length < original.length ? simplified : range;
};
}
});
// node_modules/semver/ranges/subset.js
var require_subset = __commonJS({
"node_modules/semver/ranges/subset.js"(exports, module2) {
var Range = require_range();
var Comparator = require_comparator();
var { ANY } = Comparator;
var satisfies = require_satisfies();
var compare = require_compare();
var subset = (sub, dom, options = {}) => {
if (sub === dom) {
return true;
}
sub = new Range(sub, options);
dom = new Range(dom, options);
let sawNonNull = false;
OUTER:
for (const simpleSub of sub.set) {
for (const simpleDom of dom.set) {
const isSub = simpleSubset(simpleSub, simpleDom, options);
sawNonNull = sawNonNull || isSub !== null;
if (isSub) {
continue OUTER;
}
}
if (sawNonNull) {
return false;
}
}
return true;
};
var simpleSubset = (sub, dom, options) => {
if (sub === dom) {
return true;
}
if (sub.length === 1 && sub[0].semver === ANY) {
if (dom.length === 1 && dom[0].semver === ANY) {
return true;
} else if (options.includePrerelease) {
sub = [new Comparator(">=0.0.0-0")];
} else {
sub = [new Comparator(">=0.0.0")];
}
}
if (dom.length === 1 && dom[0].semver === ANY) {
if (options.includePrerelease) {
return true;
} else {
dom = [new Comparator(">=0.0.0")];
}
}
const eqSet = /* @__PURE__ */ new Set();
let gt, lt;
for (const c of sub) {
if (c.operator === ">" || c.operator === ">=") {
gt = higherGT(gt, c, options);
} else if (c.operator === "<" || c.operator === "<=") {
lt = lowerLT(lt, c, options);
} else {
eqSet.add(c.semver);
}
}
if (eqSet.size > 1) {
return null;
}
let gtltComp;
if (gt && lt) {
gtltComp = compare(gt.semver, lt.semver, options);
if (gtltComp > 0) {
return null;
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
return null;
}
}
for (const eq of eqSet) {
if (gt && !satisfies(eq, String(gt), options)) {
return null;
}
if (lt && !satisfies(eq, String(lt), options)) {
return null;
}
for (const c of dom) {
if (!satisfies(eq, String(c), options)) {
return false;
}
}
return true;
}
let higher, lower;
let hasDomLT, hasDomGT;
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
needDomLTPre = false;
}
for (const c of dom) {
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
if (gt) {
if (needDomGTPre) {
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
needDomGTPre = false;
}
}
if (c.operator === ">" || c.operator === ">=") {
higher = higherGT(gt, c, options);
if (higher === c && higher !== gt) {
return false;
}
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
return false;
}
}
if (lt) {
if (needDomLTPre) {
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
needDomLTPre = false;
}
}
if (c.operator === "<" || c.operator === "<=") {
lower = lowerLT(lt, c, options);
if (lower === c && lower !== lt) {
return false;
}
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
return false;
}
}
if (!c.operator && (lt || gt) && gtltComp !== 0) {
return false;
}
}
if (gt && hasDomLT && !lt && gtltComp !== 0) {
return false;
}
if (lt && hasDomGT && !gt && gtltComp !== 0) {
return false;
}
if (needDomGTPre || needDomLTPre) {
return false;
}
return true;
};
var higherGT = (a, b, options) => {
if (!a) {
return b;
}
const comp = compare(a.semver, b.semver, options);
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
};
var lowerLT = (a, b, options) => {
if (!a) {
return b;
}
const comp = compare(a.semver, b.semver, options);
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
};
module2.exports = subset;
}
});
// node_modules/semver/index.js
var require_semver2 = __commonJS({
"node_modules/semver/index.js"(exports, module2) {
var internalRe = require_re();
var constants = require_constants();
var SemVer = require_semver();
var identifiers = require_identifiers();
var parse = require_parse2();
var valid = require_valid();
var clean = require_clean();
var inc = require_inc();
var diff = require_diff();
var major = require_major();
var minor = require_minor();
var patch = require_patch();
var prerelease = require_prerelease();
var compare = require_compare();
var rcompare = require_rcompare();
var compareLoose = require_compare_loose();
var compareBuild = require_compare_build();
var sort = require_sort();
var rsort = require_rsort();
var gt = require_gt();
var lt = require_lt();
var eq = require_eq();
var neq = require_neq();
var gte = require_gte();
var lte = require_lte();
var cmp = require_cmp();
var coerce = require_coerce();
var Comparator = require_comparator();
var Range = require_range();
var satisfies = require_satisfies();
var toComparators = require_to_comparators();
var maxSatisfying = require_max_satisfying();
var minSatisfying = require_min_satisfying();
var minVersion = require_min_version();
var validRange = require_valid2();
var outside = require_outside();
var gtr = require_gtr();
var ltr = require_ltr();
var intersects = require_intersects();
var simplifyRange = require_simplify();
var subset = require_subset();
module2.exports = {
parse,
valid,
clean,
inc,
diff,
major,
minor,
patch,
prerelease,
compare,
rcompare,
compareLoose,
compareBuild,
sort,
rsort,
gt,
lt,
eq,
neq,
gte,
lte,
cmp,
coerce,
Comparator,
Range,
satisfies,
toComparators,
maxSatisfying,
minSatisfying,
minVersion,
validRange,
outside,
gtr,
ltr,
intersects,
simplifyRange,
subset,
SemVer,
re: internalRe.re,
src: internalRe.src,
tokens: internalRe.t,
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
compareIdentifiers: identifiers.compareIdentifiers,
rcompareIdentifiers: identifiers.rcompareIdentifiers
};
}
});
// 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"(exports) {
"use strict";
Object.defineProperty(exports, "__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;
}
exports.isPlainObject = isPlainObject;
}
});
// node_modules/universal-user-agent/dist-node/index.js
var require_dist_node = __commonJS({
"node_modules/universal-user-agent/dist-node/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__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 "<environment undetectable>";
}
exports.getUserAgent = getUserAgent;
}
});
// node_modules/@octokit/endpoint/dist-node/index.js
var require_dist_node2 = __commonJS({
"node_modules/@octokit/endpoint/dist-node/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var isPlainObject = require_is_plain_object();
var universalUserAgent = require_dist_node();
function lowercaseKeys(object) {
if (!object) {
return {};
}
return Object.keys(object).reduce((newObj, key) => {
newObj[key.toLowerCase()] = object[key];
return newObj;
}, {});
}
function mergeDeep(defaults, options) {
const result = Object.assign({}, defaults);
Object.keys(options).forEach((key) => {
if (isPlainObject.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 (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 parse(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((preview) => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(",");
}
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;
} else {
headers["content-length"] = 0;
}
}
}
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 parse(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
});
}
var VERSION = "6.0.12";
var userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`;
var DEFAULTS = {
method: "GET",
baseUrl: "https://api.github.com",
headers: {
accept: "application/vnd.github.v3+json",
"user-agent": userAgent
},
mediaType: {
format: "",
previews: []
}
};
var endpoint = withDefaults(null, DEFAULTS);
exports.endpoint = endpoint;
}
});
// node_modules/webidl-conversions/lib/index.js
var require_lib2 = __commonJS({
"node_modules/webidl-conversions/lib/index.js"(exports, module2) {
"use strict";
var conversions = {};
module2.exports = conversions;
function sign(x) {
return x < 0 ? -1 : 1;
}
function evenRound(x) {
if (x % 1 === 0.5 && (x & 1) === 0) {
return Math.floor(x);
} else {
return Math.round(x);
}
}
function createNumberConversion(bitLength, typeOpts) {
if (!typeOpts.unsigned) {
--bitLength;
}
const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength);
const upperBound = Math.pow(2, bitLength) - 1;
const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength);
const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1);
return function(V, opts) {
if (!opts)
opts = {};
let x = +V;
if (opts.enforceRange) {
if (!Number.isFinite(x)) {
throw new TypeError("Argument is not a finite number");
}
x = sign(x) * Math.floor(Math.abs(x));
if (x < lowerBound || x > upperBound) {
throw new TypeError("Argument is not in byte range");
}
return x;
}
if (!isNaN(x) && opts.clamp) {
x = evenRound(x);
if (x < lowerBound)
x = lowerBound;
if (x > upperBound)
x = upperBound;
return x;
}
if (!Number.isFinite(x) || x === 0) {
return 0;
}
x = sign(x) * Math.floor(Math.abs(x));
x = x % moduloVal;
if (!typeOpts.unsigned && x >= moduloBound) {
return x - moduloVal;
} else if (typeOpts.unsigned) {
if (x < 0) {
x += moduloVal;
} else if (x === -0) {
return 0;
}
}
return x;
};
}
conversions["void"] = function() {
return void 0;
};
conversions["boolean"] = function(val) {
return !!val;
};
conversions["byte"] = createNumberConversion(8, { unsigned: false });
conversions["octet"] = createNumberConversion(8, { unsigned: true });
conversions["short"] = createNumberConversion(16, { unsigned: false });
conversions["unsigned short"] = createNumberConversion(16, { unsigned: true });
conversions["long"] = createNumberConversion(32, { unsigned: false });
conversions["unsigned long"] = createNumberConversion(32, { unsigned: true });
conversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 });
conversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 });
conversions["double"] = function(V) {
const x = +V;
if (!Number.isFinite(x)) {
throw new TypeError("Argument is not a finite floating-point value");
}
return x;
};
conversions["unrestricted double"] = function(V) {
const x = +V;
if (isNaN(x)) {
throw new TypeError("Argument is NaN");
}
return x;
};
conversions["float"] = conversions["double"];
conversions["unrestricted float"] = conversions["unrestricted double"];
conversions["DOMString"] = function(V, opts) {
if (!opts)
opts = {};
if (opts.treatNullAsEmptyString && V === null) {
return "";
}
return String(V);
};
conversions["ByteString"] = function(V, opts) {
const x = String(V);
let c = void 0;
for (let i = 0; (c = x.codePointAt(i)) !== void 0; ++i) {
if (c > 255) {
throw new TypeError("Argument is not a valid bytestring");
}
}
return x;
};
conversions["USVString"] = function(V) {
const S = String(V);
const n = S.length;
const U = [];
for (let i = 0; i < n; ++i) {
const c = S.charCodeAt(i);
if (c < 55296 || c > 57343) {
U.push(String.fromCodePoint(c));
} else if (56320 <= c && c <= 57343) {
U.push(String.fromCodePoint(65533));
} else {
if (i === n - 1) {
U.push(String.fromCodePoint(65533));
} else {
const d = S.charCodeAt(i + 1);
if (56320 <= d && d <= 57343) {
const a = c & 1023;
const b = d & 1023;
U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b));
++i;
} else {
U.push(String.fromCodePoint(65533));
}
}
}
}
return U.join("");
};
conversions["Date"] = function(V, opts) {
if (!(V instanceof Date)) {
throw new TypeError("Argument is not a Date object");
}
if (isNaN(V)) {
return void 0;
}
return V;
};
conversions["RegExp"] = function(V, opts) {
if (!(V instanceof RegExp)) {
V = new RegExp(V);
}
return V;
};
}
});
// node_modules/whatwg-url/lib/utils.js
var require_utils2 = __commonJS({
"node_modules/whatwg-url/lib/utils.js"(exports, module2) {
"use strict";
module2.exports.mixin = function mixin(target, source) {
const keys = Object.getOwnPropertyNames(source);
for (let i = 0; i < keys.length; ++i) {
Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));
}
};
module2.exports.wrapperSymbol = Symbol("wrapper");
module2.exports.implSymbol = Symbol("impl");
module2.exports.wrapperForImpl = function(impl) {
return impl[module2.exports.wrapperSymbol];
};
module2.exports.implForWrapper = function(wrapper) {
return wrapper[module2.exports.implSymbol];
};
}
});
// node_modules/tr46/lib/mappingTable.json
var require_mappingTable = __commonJS({
"node_modules/tr46/lib/mappingTable.json"(exports, module2) {
module2.exports = [[[0, 44], "disallowed_STD3_valid"], [[45, 46], "valid"], [[47, 47], "disallowed_STD3_valid"], [[48, 57], "valid"], [[58, 64], "disallowed_STD3_valid"], [[65, 65], "mapped", [97]], [[66, 66], "mapped", [98]], [[67, 67], "mapped", [99]], [[68, 68], "mapped", [100]], [[69, 69], "mapped", [101]], [[70, 70], "mapped", [102]], [[71, 71], "mapped", [103]], [[72, 72], "mapped", [104]], [[73, 73], "mapped", [105]], [[74, 74], "mapped", [106]], [[75, 75], "mapped", [107]], [[76, 76], "mapped", [108]], [[77, 77], "mapped", [109]], [[78, 78], "mapped", [110]], [[79, 79], "mapped", [111]], [[80, 80], "mapped", [112]], [[81, 81], "mapped", [113]], [[82, 82], "mapped", [114]], [[83, 83], "mapped", [115]], [[84, 84], "mapped", [116]], [[85, 85], "mapped", [117]], [[86, 86], "mapped", [118]], [[87, 87], "mapped", [119]], [[88, 88], "mapped", [120]], [[89, 89], "mapped", [121]], [[90, 90], "mapped", [122]], [[91, 96], "disallowed_STD3_valid"], [[97, 122], "valid"], [[123, 127], "disallowed_STD3_valid"], [[128, 159], "disallowed"], [[160, 160], "disallowed_STD3_mapped", [32]], [[161, 167], "valid", [], "NV8"], [[168, 168], "disallowed_STD3_mapped", [32, 776]], [[169, 169], "valid", [], "NV8"], [[170, 170], "mapped", [97]], [[171, 172], "valid", [], "NV8"], [[173, 173], "ignored"], [[174, 174], "valid", [], "NV8"], [[175, 175], "disallowed_STD3_mapped", [32, 772]], [[176, 177], "valid", [], "NV8"], [[178, 178], "mapped", [50]], [[179, 179], "mapped", [51]], [[180, 180], "disallowed_STD3_mapped", [32, 769]], [[181, 181], "mapped", [956]], [[182, 182], "valid", [], "NV8"], [[183, 183], "valid"], [[184, 184], "disallowed_STD3_mapped", [32, 807]], [[185, 185], "mapped", [49]], [[186, 186], "mapped", [111]], [[187, 187], "valid", [], "NV8"], [[188, 188], "mapped", [49, 8260, 52]], [[189, 189], "mapped", [49, 8260, 50]], [[190, 190], "mapped", [51, 8260, 52]], [[191, 191], "valid", [], "NV8"], [[192, 192], "mapped", [224]], [[193, 193], "mapped", [225]], [[194, 194], "mapped", [226]], [[195, 195], "mapped", [227]], [[196, 196], "mapped", [228]], [[197, 197], "mapped", [229]], [[198, 198], "mapped", [230]], [[199, 199], "mapped", [231]], [[200, 200], "mapped", [232]], [[201, 201], "mapped", [233]], [[202, 202], "mapped", [234]], [[203, 203], "mapped", [235]], [[204, 204], "mapped", [236]], [[205, 205], "mapped", [237]], [[206, 206], "mapped", [238]], [[207, 207], "mapped", [239]], [[208, 208], "mapped", [240]], [[209, 209], "mapped", [241]], [[210, 210], "mapped", [242]], [[211, 211], "mapped", [243]], [[212, 212], "mapped", [244]], [[213, 213], "mapped", [245]], [[214, 214], "mapped", [246]], [[215, 215], "valid", [], "NV8"], [[216, 216], "mapped", [248]], [[217, 217], "mapped", [249]], [[218, 218], "mapped", [250]], [[219, 219], "mapped", [251]], [[220, 220], "mapped", [252]], [[221, 221], "mapped", [253]], [[222, 222], "mapped", [254]], [[223, 223], "deviation", [115, 115]], [[224, 246], "valid"], [[247, 247], "valid", [], "NV8"], [[248, 255], "valid"], [[256, 256], "mapped", [257]], [[257, 257], "valid"], [[258, 258], "mapped", [259]], [[259, 259], "valid"], [[260, 260], "mapped", [261]], [[261, 261], "valid"], [[262, 262], "mapped", [263]], [[263, 263], "valid"], [[264, 264], "mapped", [265]], [[265, 265], "valid"], [[266, 266], "mapped", [267]], [[267, 267], "valid"], [[268, 268], "mapped", [269]], [[269, 269], "valid"], [[270, 270], "mapped", [271]], [[271, 271], "valid"], [[272, 272], "mapped", [273]], [[273, 273], "valid"], [[274, 274], "mapped", [275]], [[275, 275], "valid"], [[276, 276], "mapped", [277]], [[277, 277], "valid"], [[278, 278], "mapped", [279]], [[279, 279], "valid"], [[280, 280], "mapped", [281]], [[281, 281], "valid"], [[282, 282], "mapped", [283]], [[283, 283], "valid"], [[284, 284], "mapped", [285]], [[285, 285], "valid"], [[286, 286], "mapped", [287]], [[287, 287], "valid"], [[288, 288], "mapped", [289]], [[289, 289], "valid"], [[290, 290], "mapped", [291]], [[291, 291], "valid"], [[292, 292], "mapped", [293]], [[293, 293], "valid"], [[294, 294], "mapped", [295]], [[295, 295], "valid"], [[296, 2
}
});
// node_modules/tr46/index.js
var require_tr46 = __commonJS({
"node_modules/tr46/index.js"(exports, module2) {
"use strict";
var punycode = require("punycode");
var mappingTable = require_mappingTable();
var PROCESSING_OPTIONS = {
TRANSITIONAL: 0,
NONTRANSITIONAL: 1
};
function normalize(str) {
return str.split("\0").map(function(s) {
return s.normalize("NFC");
}).join("\0");
}
function findStatus(val) {
var start = 0;
var end = mappingTable.length - 1;
while (start <= end) {
var mid = Math.floor((start + end) / 2);
var target = mappingTable[mid];
if (target[0][0] <= val && target[0][1] >= val) {
return target;
} else if (target[0][0] > val) {
end = mid - 1;
} else {
start = mid + 1;
}
}
return null;
}
var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
function countSymbols(string) {
return string.replace(regexAstralSymbols, "_").length;
}
function mapChars(domain_name, useSTD3, processing_option) {
var hasError = false;
var processed = "";
var len = countSymbols(domain_name);
for (var i = 0; i < len; ++i) {
var codePoint = domain_name.codePointAt(i);
var status = findStatus(codePoint);
switch (status[1]) {
case "disallowed":
hasError = true;
processed += String.fromCodePoint(codePoint);
break;
case "ignored":
break;
case "mapped":
processed += String.fromCodePoint.apply(String, status[2]);
break;
case "deviation":
if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {
processed += String.fromCodePoint.apply(String, status[2]);
} else {
processed += String.fromCodePoint(codePoint);
}
break;
case "valid":
processed += String.fromCodePoint(codePoint);
break;
case "disallowed_STD3_mapped":
if (useSTD3) {
hasError = true;
processed += String.fromCodePoint(codePoint);
} else {
processed += String.fromCodePoint.apply(String, status[2]);
}
break;
case "disallowed_STD3_valid":
if (useSTD3) {
hasError = true;
}
processed += String.fromCodePoint(codePoint);
break;
}
}
return {
string: processed,
error: hasError
};
}
var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;
function validateLabel(label, processing_option) {
if (label.substr(0, 4) === "xn--") {
label = punycode.toUnicode(label);
processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;
}
var error = false;
if (normalize(label) !== label || label[3] === "-" && label[4] === "-" || label[0] === "-" || label[label.length - 1] === "-" || label.indexOf(".") !== -1 || label.search(combiningMarksRegex) === 0) {
error = true;
}
var len = countSymbols(label);
for (var i = 0; i < len; ++i) {
var status = findStatus(label.codePointAt(i));
if (processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid" || processing === PROCESSING_OPTIONS.NONTRANSITIONAL && status[1] !== "valid" && status[1] !== "deviation") {
error = true;
break;
}
}
return {
label,
error
};
}
function processing(domain_name, useSTD3, processing_option) {
var result = mapChars(domain_name, useSTD3, processing_option);
result.string = normalize(result.string);
var labels = result.string.split(".");
for (var i = 0; i < labels.length; ++i) {
try {
var validation = validateLabel(labels[i]);
labels[i] = validation.label;
result.error = result.error || validation.error;
} catch (e) {
result.error = true;
}
}
return {
string: labels.join("."),
error: result.error
};
}
module2.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {
var result = processing(domain_name, useSTD3, processing_option);
var labels = result.string.split(".");
labels = labels.map(function(l) {
try {
return punycode.toASCII(l);
} catch (e) {
result.error = true;
return l;
}
});
if (verifyDnsLength) {
var total = labels.slice(0, labels.length - 1).join(".").length;
if (total.length > 253 || total.length === 0) {
result.error = true;
}
for (var i = 0; i < labels.length; ++i) {
if (labels.length > 63 || labels.length === 0) {
result.error = true;
break;
}
}
}
if (result.error)
return null;
return labels.join(".");
};
module2.exports.toUnicode = function(domain_name, useSTD3) {
var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);
return {
domain: result.string,
error: result.error
};
};
module2.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;
}
});
// node_modules/whatwg-url/lib/url-state-machine.js
var require_url_state_machine = __commonJS({
"node_modules/whatwg-url/lib/url-state-machine.js"(exports, module2) {
"use strict";
var punycode = require("punycode");
var tr46 = require_tr46();
var specialSchemes = {
ftp: 21,
file: null,
gopher: 70,
http: 80,
https: 443,
ws: 80,
wss: 443
};
var failure = Symbol("failure");
function countSymbols(str) {
return punycode.ucs2.decode(str).length;
}
function at(input, idx) {
const c = input[idx];
return isNaN(c) ? void 0 : String.fromCodePoint(c);
}
function isASCIIDigit(c) {
return c >= 48 && c <= 57;
}
function isASCIIAlpha(c) {
return c >= 65 && c <= 90 || c >= 97 && c <= 122;
}
function isASCIIAlphanumeric(c) {
return isASCIIAlpha(c) || isASCIIDigit(c);
}
function isASCIIHex(c) {
return isASCIIDigit(c) || c >= 65 && c <= 70 || c >= 97 && c <= 102;
}
function isSingleDot(buffer) {
return buffer === "." || buffer.toLowerCase() === "%2e";
}
function isDoubleDot(buffer) {
buffer = buffer.toLowerCase();
return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e";
}
function isWindowsDriveLetterCodePoints(cp1, cp2) {
return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124);
}
function isWindowsDriveLetterString(string) {
return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|");
}
function isNormalizedWindowsDriveLetterString(string) {
return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":";
}
function containsForbiddenHostCodePoint(string) {
return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1;
}
function containsForbiddenHostCodePointExcludingPercent(string) {
return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1;
}
function isSpecialScheme(scheme) {
return specialSchemes[scheme] !== void 0;
}
function isSpecial(url) {
return isSpecialScheme(url.scheme);
}
function defaultPort(scheme) {
return specialSchemes[scheme];
}
function percentEncode(c) {
let hex = c.toString(16).toUpperCase();
if (hex.length === 1) {
hex = "0" + hex;
}
return "%" + hex;
}
function utf8PercentEncode(c) {
const buf = new Buffer(c);
let str = "";
for (let i = 0; i < buf.length; ++i) {
str += percentEncode(buf[i]);
}
return str;
}
function utf8PercentDecode(str) {
const input = new Buffer(str);
const output = [];
for (let i = 0; i < input.length; ++i) {
if (input[i] !== 37) {
output.push(input[i]);
} else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {
output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));
i += 2;
} else {
output.push(input[i]);
}
}
return new Buffer(output).toString();
}
function isC0ControlPercentEncode(c) {
return c <= 31 || c > 126;
}
var extraPathPercentEncodeSet = /* @__PURE__ */ new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]);
function isPathPercentEncode(c) {
return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c);
}
var extraUserinfoPercentEncodeSet = /* @__PURE__ */ new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]);
function isUserinfoPercentEncode(c) {
return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);
}
function percentEncodeChar(c, encodeSetPredicate) {
const cStr = String.fromCodePoint(c);
if (encodeSetPredicate(c)) {
return utf8PercentEncode(cStr);
}
return cStr;
}
function parseIPv4Number(input) {
let R = 10;
if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") {
input = input.substring(2);
R = 16;
} else if (input.length >= 2 && input.charAt(0) === "0") {
input = input.substring(1);
R = 8;
}
if (input === "") {
return 0;
}
const regex = R === 10 ? /[^0-9]/ : R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/;
if (regex.test(input)) {
return failure;
}
return parseInt(input, R);
}
function parseIPv4(input) {
const parts = input.split(".");
if (parts[parts.length - 1] === "") {
if (parts.length > 1) {
parts.pop();
}
}
if (parts.length > 4) {
return input;
}
const numbers = [];
for (const part of parts) {
if (part === "") {
return input;
}
const n = parseIPv4Number(part);
if (n === failure) {
return input;
}
numbers.push(n);
}
for (let i = 0; i < numbers.length - 1; ++i) {
if (numbers[i] > 255) {
return failure;
}
}
if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) {
return failure;
}
let ipv4 = numbers.pop();
let counter = 0;
for (const n of numbers) {
ipv4 += n * Math.pow(256, 3 - counter);
++counter;
}
return ipv4;
}
function serializeIPv4(address) {
let output = "";
let n = address;
for (let i = 1; i <= 4; ++i) {
output = String(n % 256) + output;
if (i !== 4) {
output = "." + output;
}
n = Math.floor(n / 256);
}
return output;
}
function parseIPv6(input) {
const address = [0, 0, 0, 0, 0, 0, 0, 0];
let pieceIndex = 0;
let compress = null;
let pointer = 0;
input = punycode.ucs2.decode(input);
if (input[pointer] === 58) {
if (input[pointer + 1] !== 58) {
return failure;
}
pointer += 2;
++pieceIndex;
compress = pieceIndex;
}
while (pointer < input.length) {
if (pieceIndex === 8) {
return failure;
}
if (input[pointer] === 58) {
if (compress !== null) {
return failure;
}
++pointer;
++pieceIndex;
compress = pieceIndex;
continue;
}
let value = 0;
let length = 0;
while (length < 4 && isASCIIHex(input[pointer])) {
value = value * 16 + parseInt(at(input, pointer), 16);
++pointer;
++length;
}
if (input[pointer] === 46) {
if (length === 0) {
return failure;
}
pointer -= length;
if (pieceIndex > 6) {
return failure;
}
let numbersSeen = 0;
while (input[pointer] !== void 0) {
let ipv4Piece = null;
if (numbersSeen > 0) {
if (input[pointer] === 46 && numbersSeen < 4) {
++pointer;
} else {
return failure;
}
}
if (!isASCIIDigit(input[pointer])) {
return failure;
}
while (isASCIIDigit(input[pointer])) {
const number = parseInt(at(input, pointer));
if (ipv4Piece === null) {
ipv4Piece = number;
} else if (ipv4Piece === 0) {
return failure;
} else {
ipv4Piece = ipv4Piece * 10 + number;
}
if (ipv4Piece > 255) {
return failure;
}
++pointer;
}
address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
++numbersSeen;
if (numbersSeen === 2 || numbersSeen === 4) {
++pieceIndex;
}
}
if (numbersSeen !== 4) {
return failure;
}
break;
} else if (input[pointer] === 58) {
++pointer;
if (input[pointer] === void 0) {
return failure;
}
} else if (input[pointer] !== void 0) {
return failure;
}
address[pieceIndex] = value;
++pieceIndex;
}
if (compress !== null) {
let swaps = pieceIndex - compress;
pieceIndex = 7;
while (pieceIndex !== 0 && swaps > 0) {
const temp = address[compress + swaps - 1];
address[compress + swaps - 1] = address[pieceIndex];
address[pieceIndex] = temp;
--pieceIndex;
--swaps;
}
} else if (compress === null && pieceIndex !== 8) {
return failure;
}
return address;
}
function serializeIPv6(address) {
let output = "";
const seqResult = findLongestZeroSequence(address);
const compress = seqResult.idx;
let ignore0 = false;
for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {
if (ignore0 && address[pieceIndex] === 0) {
continue;
} else if (ignore0) {
ignore0 = false;
}
if (compress === pieceIndex) {
const separator = pieceIndex === 0 ? "::" : ":";
output += separator;
ignore0 = true;
continue;
}
output += address[pieceIndex].toString(16);
if (pieceIndex !== 7) {
output += ":";
}
}
return output;
}
function parseHost(input, isSpecialArg) {
if (input[0] === "[") {
if (input[input.length - 1] !== "]") {
return failure;
}
return parseIPv6(input.substring(1, input.length - 1));
}
if (!isSpecialArg) {
return parseOpaqueHost(input);
}
const domain = utf8PercentDecode(input);
const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false);
if (asciiDomain === null) {
return failure;
}
if (containsForbiddenHostCodePoint(asciiDomain)) {
return failure;
}
const ipv4Host = parseIPv4(asciiDomain);
if (typeof ipv4Host === "number" || ipv4Host === failure) {
return ipv4Host;
}
return asciiDomain;
}
function parseOpaqueHost(input) {
if (containsForbiddenHostCodePointExcludingPercent(input)) {
return failure;
}
let output = "";
const decoded = punycode.ucs2.decode(input);
for (let i = 0; i < decoded.length; ++i) {
output += percentEncodeChar(decoded[i], isC0ControlPercentEncode);
}
return output;
}
function findLongestZeroSequence(arr) {
let maxIdx = null;
let maxLen = 1;
let currStart = null;
let currLen = 0;
for (let i = 0; i < arr.length; ++i) {
if (arr[i] !== 0) {
if (currLen > maxLen) {
maxIdx = currStart;
maxLen = currLen;
}
currStart = null;
currLen = 0;
} else {
if (currStart === null) {
currStart = i;
}
++currLen;
}
}
if (currLen > maxLen) {
maxIdx = currStart;
maxLen = currLen;
}
return {
idx: maxIdx,
len: maxLen
};
}
function serializeHost(host) {
if (typeof host === "number") {
return serializeIPv4(host);
}
if (host instanceof Array) {
return "[" + serializeIPv6(host) + "]";
}
return host;
}
function trimControlChars(url) {
return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, "");
}
function trimTabAndNewline(url) {
return url.replace(/\u0009|\u000A|\u000D/g, "");
}
function shortenPath(url) {
const path5 = url.path;
if (path5.length === 0) {
return;
}
if (url.scheme === "file" && path5.length === 1 && isNormalizedWindowsDriveLetter(path5[0])) {
return;
}
path5.pop();
}
function includesCredentials(url) {
return url.username !== "" || url.password !== "";
}
function cannotHaveAUsernamePasswordPort(url) {
return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file";
}
function isNormalizedWindowsDriveLetter(string) {
return /^[A-Za-z]:$/.test(string);
}
function URLStateMachine(input, base, encodingOverride, url, stateOverride) {
this.pointer = 0;
this.input = input;
this.base = base || null;
this.encodingOverride = encodingOverride || "utf-8";
this.stateOverride = stateOverride;
this.url = url;
this.failure = false;
this.parseError = false;
if (!this.url) {
this.url = {
scheme: "",
username: "",
password: "",
host: null,
port: null,
path: [],
query: null,
fragment: null,
cannotBeABaseURL: false
};
const res2 = trimControlChars(this.input);
if (res2 !== this.input) {
this.parseError = true;
}
this.input = res2;
}
const res = trimTabAndNewline(this.input);
if (res !== this.input) {
this.parseError = true;
}
this.input = res;
this.state = stateOverride || "scheme start";
this.buffer = "";
this.atFlag = false;
this.arrFlag = false;
this.passwordTokenSeenFlag = false;
this.input = punycode.ucs2.decode(this.input);
for (; this.pointer <= this.input.length; ++this.pointer) {
const c = this.input[this.pointer];
const cStr = isNaN(c) ? void 0 : String.fromCodePoint(c);
const ret = this["parse " + this.state](c, cStr);
if (!ret) {
break;
} else if (ret === failure) {
this.failure = true;
break;
}
}
}
URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) {
if (isASCIIAlpha(c)) {
this.buffer += cStr.toLowerCase();
this.state = "scheme";
} else if (!this.stateOverride) {
this.state = "no scheme";
--this.pointer;
} else {
this.parseError = true;
return failure;
}
return true;
};
URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) {
if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) {
this.buffer += cStr.toLowerCase();
} else if (c === 58) {
if (this.stateOverride) {
if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {
return false;
}
if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {
return false;
}
if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") {
return false;
}
if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) {
return false;
}
}
this.url.scheme = this.buffer;
this.buffer = "";
if (this.stateOverride) {
return false;
}
if (this.url.scheme === "file") {
if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) {
this.parseError = true;
}
this.state = "file";
} else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {
this.state = "special relative or authority";
} else if (isSpecial(this.url)) {
this.state = "special authority slashes";
} else if (this.input[this.pointer + 1] === 47) {
this.state = "path or authority";
++this.pointer;
} else {
this.url.cannotBeABaseURL = true;
this.url.path.push("");
this.state = "cannot-be-a-base-URL path";
}
} else if (!this.stateOverride) {
this.buffer = "";
this.state = "no scheme";
this.pointer = -1;
} else {
this.parseError = true;
return failure;
}
return true;
};
URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) {
if (this.base === null || this.base.cannotBeABaseURL && c !== 35) {
return failure;
} else if (this.base.cannotBeABaseURL && c === 35) {
this.url.scheme = this.base.scheme;
this.url.path = this.base.path.slice();
this.url.query = this.base.query;
this.url.fragment = "";
this.url.cannotBeABaseURL = true;
this.state = "fragment";
} else if (this.base.scheme === "file") {
this.state = "file";
--this.pointer;
} else {
this.state = "relative";
--this.pointer;
}
return true;
};
URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) {
if (c === 47 && this.input[this.pointer + 1] === 47) {
this.state = "special authority ignore slashes";
++this.pointer;
} else {
this.parseError = true;
this.state = "relative";
--this.pointer;
}
return true;
};
URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) {
if (c === 47) {
this.state = "authority";
} else {
this.state = "path";
--this.pointer;
}
return true;
};
URLStateMachine.prototype["parse relative"] = function parseRelative(c) {
this.url.scheme = this.base.scheme;
if (isNaN(c)) {
this.url.username = this.base.username;
this.url.password = this.base.password;
this.url.host = this.base.host;
this.url.port = this.base.port;
this.url.path = this.base.path.slice();
this.url.query = this.base.query;
} else if (c === 47) {
this.state = "relative slash";
} else if (c === 63) {
this.url.username = this.base.username;
this.url.password = this.base.password;
this.url.host = this.base.host;
this.url.port = this.base.port;
this.url.path = this.base.path.slice();
this.url.query = "";
this.state = "query";
} else if (c === 35) {
this.url.username = this.base.username;
this.url.password = this.base.password;
this.url.host = this.base.host;
this.url.port = this.base.port;
this.url.path = this.base.path.slice();
this.url.query = this.base.query;
this.url.fragment = "";
this.state = "fragment";
} else if (isSpecial(this.url) && c === 92) {
this.parseError = true;
this.state = "relative slash";
} else {
this.url.username = this.base.username;
this.url.password = this.base.password;
this.url.host = this.base.host;
this.url.port = this.base.port;
this.url.path = this.base.path.slice(0, this.base.path.length - 1);
this.state = "path";
--this.pointer;
}
return true;
};
URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) {
if (isSpecial(this.url) && (c === 47 || c === 92)) {
if (c === 92) {
this.parseError = true;
}
this.state = "special authority ignore slashes";
} else if (c === 47) {
this.state = "authority";
} else {
this.url.username = this.base.username;
this.url.password = this.base.password;
this.url.host = this.base.host;
this.url.port = this.base.port;
this.state = "path";
--this.pointer;
}
return true;
};
URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) {
if (c === 47 && this.input[this.pointer + 1] === 47) {
this.state = "special authority ignore slashes";
++this.pointer;
} else {
this.parseError = true;
this.state = "special authority ignore slashes";
--this.pointer;
}
return true;
};
URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) {
if (c !== 47 && c !== 92) {
this.state = "authority";
--this.pointer;
} else {
this.parseError = true;
}
return true;
};
URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) {
if (c === 64) {
this.parseError = true;
if (this.atFlag) {
this.buffer = "%40" + this.buffer;
}
this.atFlag = true;
const len = countSymbols(this.buffer);
for (let pointer = 0; pointer < len; ++pointer) {
const codePoint = this.buffer.codePointAt(pointer);
if (codePoint === 58 && !this.passwordTokenSeenFlag) {
this.passwordTokenSeenFlag = true;
continue;
}
const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode);
if (this.passwordTokenSeenFlag) {
this.url.password += encodedCodePoints;
} else {
this.url.username += encodedCodePoints;
}
}
this.buffer = "";
} else if (isNaN(c) || c === 47 || c === 63 || c === 35 || isSpecial(this.url) && c === 92) {
if (this.atFlag && this.buffer === "") {
this.parseError = true;
return failure;
}
this.pointer -= countSymbols(this.buffer) + 1;
this.buffer = "";
this.state = "host";
} else {
this.buffer += cStr;
}
return true;
};
URLStateMachine.prototype["parse hostname"] = URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) {
if (this.stateOverride && this.url.scheme === "file") {
--this.pointer;
this.state = "file host";
} else if (c === 58 && !this.arrFlag) {
if (this.buffer === "") {
this.parseError = true;
return failure;
}
const host = parseHost(this.buffer, isSpecial(this.url));
if (host === failure) {
return failure;
}
this.url.host = host;
this.buffer = "";
this.state = "port";
if (this.stateOverride === "hostname") {
return false;
}
} else if (isNaN(c) || c === 47 || c === 63 || c === 35 || isSpecial(this.url) && c === 92) {
--this.pointer;
if (isSpecial(this.url) && this.buffer === "") {
this.parseError = true;
return failure;
} else if (this.stateOverride && this.buffer === "" && (includesCredentials(this.url) || this.url.port !== null)) {
this.parseError = true;
return false;
}
const host = parseHost(this.buffer, isSpecial(this.url));
if (host === failure) {
return failure;
}
this.url.host = host;
this.buffer = "";
this.state = "path start";
if (this.stateOverride) {
return false;
}
} else {
if (c === 91) {
this.arrFlag = true;
} else if (c === 93) {
this.arrFlag = false;
}
this.buffer += cStr;
}
return true;
};
URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) {
if (isASCIIDigit(c)) {
this.buffer += cStr;
} else if (isNaN(c) || c === 47 || c === 63 || c === 35 || isSpecial(this.url) && c === 92 || this.stateOverride) {
if (this.buffer !== "") {
const port = parseInt(this.buffer);
if (port > Math.pow(2, 16) - 1) {
this.parseError = true;
return failure;
}
this.url.port = port === defaultPort(this.url.scheme) ? null : port;
this.buffer = "";
}
if (this.stateOverride) {
return false;
}
this.state = "path start";
--this.pointer;
} else {
this.parseError = true;
return failure;
}
return true;
};
var fileOtherwiseCodePoints = /* @__PURE__ */ new Set([47, 92, 63, 35]);
URLStateMachine.prototype["parse file"] = function parseFile(c) {
this.url.scheme = "file";
if (c === 47 || c === 92) {
if (c === 92) {
this.parseError = true;
}
this.state = "file slash";
} else if (this.base !== null && this.base.scheme === "file") {
if (isNaN(c)) {
this.url.host = this.base.host;
this.url.path = this.base.path.slice();
this.url.query = this.base.query;
} else if (c === 63) {
this.url.host = this.base.host;
this.url.path = this.base.path.slice();
this.url.query = "";
this.state = "query";
} else if (c === 35) {
this.url.host = this.base.host;
this.url.path = this.base.path.slice();
this.url.query = this.base.query;
this.url.fragment = "";
this.state = "fragment";
} else {
if (this.input.length - this.pointer - 1 === 0 || !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || this.input.length - this.pointer - 1 >= 2 && !fileOtherwiseCodePoints.has(this.input[this.pointer + 2])) {
this.url.host = this.base.host;
this.url.path = this.base.path.slice();
shortenPath(this.url);
} else {
this.parseError = true;
}
this.state = "path";
--this.pointer;
}
} else {
this.state = "path";
--this.pointer;
}
return true;
};
URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) {
if (c === 47 || c === 92) {
if (c === 92) {
this.parseError = true;
}
this.state = "file host";
} else {
if (this.base !== null && this.base.scheme === "file") {
if (isNormalizedWindowsDriveLetterString(this.base.path[0])) {
this.url.path.push(this.base.path[0]);
} else {
this.url.host = this.base.host;
}
}
this.state = "path";
--this.pointer;
}
return true;
};
URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) {
if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) {
--this.pointer;
if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {
this.parseError = true;
this.state = "path";
} else if (this.buffer === "") {
this.url.host = "";
if (this.stateOverride) {
return false;
}
this.state = "path start";
} else {
let host = parseHost(this.buffer, isSpecial(this.url));
if (host === failure) {
return failure;
}
if (host === "localhost") {
host = "";
}
this.url.host = host;
if (this.stateOverride) {
return false;
}
this.buffer = "";
this.state = "path start";
}
} else {
this.buffer += cStr;
}
return true;
};
URLStateMachine.prototype["parse path start"] = function parsePathStart(c) {
if (isSpecial(this.url)) {
if (c === 92) {
this.parseError = true;
}
this.state = "path";
if (c !== 47 && c !== 92) {
--this.pointer;
}
} else if (!this.stateOverride && c === 63) {
this.url.query = "";
this.state = "query";
} else if (!this.stateOverride && c === 35) {
this.url.fragment = "";
this.state = "fragment";
} else if (c !== void 0) {
this.state = "path";
if (c !== 47) {
--this.pointer;
}
}
return true;
};
URLStateMachine.prototype["parse path"] = function parsePath(c) {
if (isNaN(c) || c === 47 || isSpecial(this.url) && c === 92 || !this.stateOverride && (c === 63 || c === 35)) {
if (isSpecial(this.url) && c === 92) {
this.parseError = true;
}
if (isDoubleDot(this.buffer)) {
shortenPath(this.url);
if (c !== 47 && !(isSpecial(this.url) && c === 92)) {
this.url.path.push("");
}
} else if (isSingleDot(this.buffer) && c !== 47 && !(isSpecial(this.url) && c === 92)) {
this.url.path.push("");
} else if (!isSingleDot(this.buffer)) {
if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {
if (this.url.host !== "" && this.url.host !== null) {
this.parseError = true;
this.url.host = "";
}
this.buffer = this.buffer[0] + ":";
}
this.url.path.push(this.buffer);
}
this.buffer = "";
if (this.url.scheme === "file" && (c === void 0 || c === 63 || c === 35)) {
while (this.url.path.length > 1 && this.url.path[0] === "") {
this.parseError = true;
this.url.path.shift();
}
}
if (c === 63) {
this.url.query = "";
this.state = "query";
}
if (c === 35) {
this.url.fragment = "";
this.state = "fragment";
}
} else {
if (c === 37 && (!isASCIIHex(this.input[this.pointer + 1]) || !isASCIIHex(this.input[this.pointer + 2]))) {
this.parseError = true;
}
this.buffer += percentEncodeChar(c, isPathPercentEncode);
}
return true;
};
URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) {
if (c === 63) {
this.url.query = "";
this.state = "query";
} else if (c === 35) {
this.url.fragment = "";
this.state = "fragment";
} else {
if (!isNaN(c) && c !== 37) {
this.parseError = true;
}
if (c === 37 && (!isASCIIHex(this.input[this.pointer + 1]) || !isASCIIHex(this.input[this.pointer + 2]))) {
this.parseError = true;
}
if (!isNaN(c)) {
this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode);
}
}
return true;
};
URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) {
if (isNaN(c) || !this.stateOverride && c === 35) {
if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") {
this.encodingOverride = "utf-8";
}
const buffer = new Buffer(this.buffer);
for (let i = 0; i < buffer.length; ++i) {
if (buffer[i] < 33 || buffer[i] > 126 || buffer[i] === 34 || buffer[i] === 35 || buffer[i] === 60 || buffer[i] === 62) {
this.url.query += percentEncode(buffer[i]);
} else {
this.url.query += String.fromCodePoint(buffer[i]);
}
}
this.buffer = "";
if (c === 35) {
this.url.fragment = "";
this.state = "fragment";
}
} else {
if (c === 37 && (!isASCIIHex(this.input[this.pointer + 1]) || !isASCIIHex(this.input[this.pointer + 2]))) {
this.parseError = true;
}
this.buffer += cStr;
}
return true;
};
URLStateMachine.prototype["parse fragment"] = function parseFragment(c) {
if (isNaN(c)) {
} else if (c === 0) {
this.parseError = true;
} else {
if (c === 37 && (!isASCIIHex(this.input[this.pointer + 1]) || !isASCIIHex(this.input[this.pointer + 2]))) {
this.parseError = true;
}
this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode);
}
return true;
};
function serializeURL(url, excludeFragment) {
let output = url.scheme + ":";
if (url.host !== null) {
output += "//";
if (url.username !== "" || url.password !== "") {
output += url.username;
if (url.password !== "") {
output += ":" + url.password;
}
output += "@";
}
output += serializeHost(url.host);
if (url.port !== null) {
output += ":" + url.port;
}
} else if (url.host === null && url.scheme === "file") {
output += "//";
}
if (url.cannotBeABaseURL) {
output += url.path[0];
} else {
for (const string of url.path) {
output += "/" + string;
}
}
if (url.query !== null) {
output += "?" + url.query;
}
if (!excludeFragment && url.fragment !== null) {
output += "#" + url.fragment;
}
return output;
}
function serializeOrigin(tuple) {
let result = tuple.scheme + "://";
result += serializeHost(tuple.host);
if (tuple.port !== null) {
result += ":" + tuple.port;
}
return result;
}
module2.exports.serializeURL = serializeURL;
module2.exports.serializeURLOrigin = function(url) {
switch (url.scheme) {
case "blob":
try {
return module2.exports.serializeURLOrigin(module2.exports.parseURL(url.path[0]));
} catch (e) {
return "null";
}
case "ftp":
case "gopher":
case "http":
case "https":
case "ws":
case "wss":
return serializeOrigin({
scheme: url.scheme,
host: url.host,
port: url.port
});
case "file":
return "file://";
default:
return "null";
}
};
module2.exports.basicURLParse = function(input, options) {
if (options === void 0) {
options = {};
}
const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);
if (usm.failure) {
return "failure";
}
return usm.url;
};
module2.exports.setTheUsername = function(url, username) {
url.username = "";
const decoded = punycode.ucs2.decode(username);
for (let i = 0; i < decoded.length; ++i) {
url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);
}
};
module2.exports.setThePassword = function(url, password) {
url.password = "";
const decoded = punycode.ucs2.decode(password);
for (let i = 0; i < decoded.length; ++i) {
url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);
}
};
module2.exports.serializeHost = serializeHost;
module2.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;
module2.exports.serializeInteger = function(integer) {
return String(integer);
};
module2.exports.parseURL = function(input, options) {
if (options === void 0) {
options = {};
}
return module2.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });
};
}
});
// node_modules/whatwg-url/lib/URL-impl.js
var require_URL_impl = __commonJS({
"node_modules/whatwg-url/lib/URL-impl.js"(exports) {
"use strict";
var usm = require_url_state_machine();
exports.implementation = class URLImpl {
constructor(constructorArgs) {
const url = constructorArgs[0];
const base = constructorArgs[1];
let parsedBase = null;
if (base !== void 0) {
parsedBase = usm.basicURLParse(base);
if (parsedBase === "failure") {
throw new TypeError("Invalid base URL");
}
}
const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });
if (parsedURL === "failure") {
throw new TypeError("Invalid URL");
}
this._url = parsedURL;
}
get href() {
return usm.serializeURL(this._url);
}
set href(v) {
const parsedURL = usm.basicURLParse(v);
if (parsedURL === "failure") {
throw new TypeError("Invalid URL");
}
this._url = parsedURL;
}
get origin() {
return usm.serializeURLOrigin(this._url);
}
get protocol() {
return this._url.scheme + ":";
}
set protocol(v) {
usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" });
}
get username() {
return this._url.username;
}
set username(v) {
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
return;
}
usm.setTheUsername(this._url, v);
}
get password() {
return this._url.password;
}
set password(v) {
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
return;
}
usm.setThePassword(this._url, v);
}
get host() {
const url = this._url;
if (url.host === null) {
return "";
}
if (url.port === null) {
return usm.serializeHost(url.host);
}
return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port);
}
set host(v) {
if (this._url.cannotBeABaseURL) {
return;
}
usm.basicURLParse(v, { url: this._url, stateOverride: "host" });
}
get hostname() {
if (this._url.host === null) {
return "";
}
return usm.serializeHost(this._url.host);
}
set hostname(v) {
if (this._url.cannotBeABaseURL) {
return;
}
usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" });
}
get port() {
if (this._url.port === null) {
return "";
}
return usm.serializeInteger(this._url.port);
}
set port(v) {
if (usm.cannotHaveAUsernamePasswordPort(this._url)) {
return;
}
if (v === "") {
this._url.port = null;
} else {
usm.basicURLParse(v, { url: this._url, stateOverride: "port" });
}
}
get pathname() {
if (this._url.cannotBeABaseURL) {
return this._url.path[0];
}
if (this._url.path.length === 0) {
return "";
}
return "/" + this._url.path.join("/");
}
set pathname(v) {
if (this._url.cannotBeABaseURL) {
return;
}
this._url.path = [];
usm.basicURLParse(v, { url: this._url, stateOverride: "path start" });
}
get search() {
if (this._url.query === null || this._url.query === "") {
return "";
}
return "?" + this._url.query;
}
set search(v) {
const url = this._url;
if (v === "") {
url.query = null;
return;
}
const input = v[0] === "?" ? v.substring(1) : v;
url.query = "";
usm.basicURLParse(input, { url, stateOverride: "query" });
}
get hash() {
if (this._url.fragment === null || this._url.fragment === "") {
return "";
}
return "#" + this._url.fragment;
}
set hash(v) {
if (v === "") {
this._url.fragment = null;
return;
}
const input = v[0] === "#" ? v.substring(1) : v;
this._url.fragment = "";
usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" });
}
toJSON() {
return this.href;
}
};
}
});
// node_modules/whatwg-url/lib/URL.js
var require_URL = __commonJS({
"node_modules/whatwg-url/lib/URL.js"(exports, module2) {
"use strict";
var conversions = require_lib2();
var utils = require_utils2();
var Impl = require_URL_impl();
var impl = utils.implSymbol;
function URL2(url) {
if (!this || this[impl] || !(this instanceof URL2)) {
throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");
}
if (arguments.length < 1) {
throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present.");
}
const args = [];
for (let i = 0; i < arguments.length && i < 2; ++i) {
args[i] = arguments[i];
}
args[0] = conversions["USVString"](args[0]);
if (args[1] !== void 0) {
args[1] = conversions["USVString"](args[1]);
}
module2.exports.setup(this, args);
}
URL2.prototype.toJSON = function toJSON() {
if (!this || !module2.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
const args = [];
for (let i = 0; i < arguments.length && i < 0; ++i) {
args[i] = arguments[i];
}
return this[impl].toJSON.apply(this[impl], args);
};
Object.defineProperty(URL2.prototype, "href", {
get() {
return this[impl].href;
},
set(V) {
V = conversions["USVString"](V);
this[impl].href = V;
},
enumerable: true,
configurable: true
});
URL2.prototype.toString = function() {
if (!this || !module2.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
return this.href;
};
Object.defineProperty(URL2.prototype, "origin", {
get() {
return this[impl].origin;
},
enumerable: true,
configurable: true
});
Object.defineProperty(URL2.prototype, "protocol", {
get() {
return this[impl].protocol;
},
set(V) {
V = conversions["USVString"](V);
this[impl].protocol = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(URL2.prototype, "username", {
get() {
return this[impl].username;
},
set(V) {
V = conversions["USVString"](V);
this[impl].username = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(URL2.prototype, "password", {
get() {
return this[impl].password;
},
set(V) {
V = conversions["USVString"](V);
this[impl].password = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(URL2.prototype, "host", {
get() {
return this[impl].host;
},
set(V) {
V = conversions["USVString"](V);
this[impl].host = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(URL2.prototype, "hostname", {
get() {
return this[impl].hostname;
},
set(V) {
V = conversions["USVString"](V);
this[impl].hostname = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(URL2.prototype, "port", {
get() {
return this[impl].port;
},
set(V) {
V = conversions["USVString"](V);
this[impl].port = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(URL2.prototype, "pathname", {
get() {
return this[impl].pathname;
},
set(V) {
V = conversions["USVString"](V);
this[impl].pathname = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(URL2.prototype, "search", {
get() {
return this[impl].search;
},
set(V) {
V = conversions["USVString"](V);
this[impl].search = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(URL2.prototype, "hash", {
get() {
return this[impl].hash;
},
set(V) {
V = conversions["USVString"](V);
this[impl].hash = V;
},
enumerable: true,
configurable: true
});
module2.exports = {
is(obj) {
return !!obj && obj[impl] instanceof Impl.implementation;
},
create(constructorArgs, privateData) {
let obj = Object.create(URL2.prototype);
this.setup(obj, constructorArgs, privateData);
return obj;
},
setup(obj, constructorArgs, privateData) {
if (!privateData)
privateData = {};
privateData.wrapper = obj;
obj[impl] = new Impl.implementation(constructorArgs, privateData);
obj[impl][utils.wrapperSymbol] = obj;
},
interface: URL2,
expose: {
Window: { URL: URL2 },
Worker: { URL: URL2 }
}
};
}
});
// node_modules/whatwg-url/lib/public-api.js
var require_public_api = __commonJS({
"node_modules/whatwg-url/lib/public-api.js"(exports) {
"use strict";
exports.URL = require_URL().interface;
exports.serializeURL = require_url_state_machine().serializeURL;
exports.serializeURLOrigin = require_url_state_machine().serializeURLOrigin;
exports.basicURLParse = require_url_state_machine().basicURLParse;
exports.setTheUsername = require_url_state_machine().setTheUsername;
exports.setThePassword = require_url_state_machine().setThePassword;
exports.serializeHost = require_url_state_machine().serializeHost;
exports.serializeInteger = require_url_state_machine().serializeInteger;
exports.parseURL = require_url_state_machine().parseURL;
}
});
// node_modules/node-fetch/lib/index.js
var require_lib3 = __commonJS({
"node_modules/node-fetch/lib/index.js"(exports, module2) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function _interopDefault(ex) {
return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
}
var Stream = _interopDefault(require("stream"));
var http = _interopDefault(require("http"));
var Url = _interopDefault(require("url"));
var whatwgUrl = _interopDefault(require_public_api());
var https = _interopDefault(require("https"));
var zlib = _interopDefault(require("zlib"));
var Readable = Stream.Readable;
var BUFFER = Symbol("buffer");
var TYPE = Symbol("type");
var Blob = class {
constructor() {
this[TYPE] = "";
const blobParts = arguments[0];
const options = arguments[1];
const buffers = [];
let size = 0;
if (blobParts) {
const a = blobParts;
const length = Number(a.length);
for (let i = 0; i < length; i++) {
const element = a[i];
let buffer;
if (element instanceof Buffer) {
buffer = element;
} else if (ArrayBuffer.isView(element)) {
buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
} else if (element instanceof ArrayBuffer) {
buffer = Buffer.from(element);
} else if (element instanceof Blob) {
buffer = element[BUFFER];
} else {
buffer = Buffer.from(typeof element === "string" ? element : String(element));
}
size += buffer.length;
buffers.push(buffer);
}
}
this[BUFFER] = Buffer.concat(buffers);
let type = options && options.type !== void 0 && String(options.type).toLowerCase();
if (type && !/[^\u0020-\u007E]/.test(type)) {
this[TYPE] = type;
}
}
get size() {
return this[BUFFER].length;
}
get type() {
return this[TYPE];
}
text() {
return Promise.resolve(this[BUFFER].toString());
}
arrayBuffer() {
const buf = this[BUFFER];
const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
return Promise.resolve(ab);
}
stream() {
const readable = new Readable();
readable._read = function() {
};
readable.push(this[BUFFER]);
readable.push(null);
return readable;
}
toString() {
return "[object Blob]";
}
slice() {
const size = this.size;
const start = arguments[0];
const end = arguments[1];
let relativeStart, relativeEnd;
if (start === void 0) {
relativeStart = 0;
} else if (start < 0) {
relativeStart = Math.max(size + start, 0);
} else {
relativeStart = Math.min(start, size);
}
if (end === void 0) {
relativeEnd = size;
} else if (end < 0) {
relativeEnd = Math.max(size + end, 0);
} else {
relativeEnd = Math.min(end, size);
}
const span = Math.max(relativeEnd - relativeStart, 0);
const buffer = this[BUFFER];
const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
const blob = new Blob([], { type: arguments[2] });
blob[BUFFER] = slicedBuffer;
return blob;
}
};
Object.defineProperties(Blob.prototype, {
size: { enumerable: true },
type: { enumerable: true },
slice: { enumerable: true }
});
Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
value: "Blob",
writable: false,
enumerable: false,
configurable: true
});
function FetchError(message, type, systemError) {
Error.call(this, message);
this.message = message;
this.type = type;
if (systemError) {
this.code = this.errno = systemError.code;
}
Error.captureStackTrace(this, this.constructor);
}
FetchError.prototype = Object.create(Error.prototype);
FetchError.prototype.constructor = FetchError;
FetchError.prototype.name = "FetchError";
var convert;
try {
convert = require("encoding").convert;
} catch (e) {
}
var INTERNALS = Symbol("Body internals");
var PassThrough = Stream.PassThrough;
function Body(body) {
var _this = this;
var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref$size = _ref.size;
let size = _ref$size === void 0 ? 0 : _ref$size;
var _ref$timeout = _ref.timeout;
let timeout = _ref$timeout === void 0 ? 0 : _ref$timeout;
if (body == null) {
body = null;
} else if (isURLSearchParams(body)) {
body = Buffer.from(body.toString());
} else if (isBlob(body))
;
else if (Buffer.isBuffer(body))
;
else if (Object.prototype.toString.call(body) === "[object ArrayBuffer]") {
body = Buffer.from(body);
} else if (ArrayBuffer.isView(body)) {
body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
} else if (body instanceof Stream)
;
else {
body = Buffer.from(String(body));
}
this[INTERNALS] = {
body,
disturbed: false,
error: null
};
this.size = size;
this.timeout = timeout;
if (body instanceof Stream) {
body.on("error", function(err) {
const error = err.name === "AbortError" ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, "system", err);
_this[INTERNALS].error = error;
});
}
}
Body.prototype = {
get body() {
return this[INTERNALS].body;
},
get bodyUsed() {
return this[INTERNALS].disturbed;
},
arrayBuffer() {
return consumeBody.call(this).then(function(buf) {
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
});
},
blob() {
let ct = this.headers && this.headers.get("content-type") || "";
return consumeBody.call(this).then(function(buf) {
return Object.assign(
new Blob([], {
type: ct.toLowerCase()
}),
{
[BUFFER]: buf
}
);
});
},
json() {
var _this2 = this;
return consumeBody.call(this).then(function(buffer) {
try {
return JSON.parse(buffer.toString());
} catch (err) {
return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, "invalid-json"));
}
});
},
text() {
return consumeBody.call(this).then(function(buffer) {
return buffer.toString();
});
},
buffer() {
return consumeBody.call(this);
},
textConverted() {
var _this3 = this;
return consumeBody.call(this).then(function(buffer) {
return convertBody(buffer, _this3.headers);
});
}
};
Object.defineProperties(Body.prototype, {
body: { enumerable: true },
bodyUsed: { enumerable: true },
arrayBuffer: { enumerable: true },
blob: { enumerable: true },
json: { enumerable: true },
text: { enumerable: true }
});
Body.mixIn = function(proto) {
for (const name of Object.getOwnPropertyNames(Body.prototype)) {
if (!(name in proto)) {
const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
Object.defineProperty(proto, name, desc);
}
}
};
function consumeBody() {
var _this4 = this;
if (this[INTERNALS].disturbed) {
return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
}
this[INTERNALS].disturbed = true;
if (this[INTERNALS].error) {
return Body.Promise.reject(this[INTERNALS].error);
}
let body = this.body;
if (body === null) {
return Body.Promise.resolve(Buffer.alloc(0));
}
if (isBlob(body)) {
body = body.stream();
}
if (Buffer.isBuffer(body)) {
return Body.Promise.resolve(body);
}
if (!(body instanceof Stream)) {
return Body.Promise.resolve(Buffer.alloc(0));
}
let accum = [];
let accumBytes = 0;
let abort = false;
return new Body.Promise(function(resolve, reject) {
let resTimeout;
if (_this4.timeout) {
resTimeout = setTimeout(function() {
abort = true;
reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, "body-timeout"));
}, _this4.timeout);
}
body.on("error", function(err) {
if (err.name === "AbortError") {
abort = true;
reject(err);
} else {
reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, "system", err));
}
});
body.on("data", function(chunk) {
if (abort || chunk === null) {
return;
}
if (_this4.size && accumBytes + chunk.length > _this4.size) {
abort = true;
reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, "max-size"));
return;
}
accumBytes += chunk.length;
accum.push(chunk);
});
body.on("end", function() {
if (abort) {
return;
}
clearTimeout(resTimeout);
try {
resolve(Buffer.concat(accum, accumBytes));
} catch (err) {
reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, "system", err));
}
});
});
}
function convertBody(buffer, headers) {
if (typeof convert !== "function") {
throw new Error("The package `encoding` must be installed to use the textConverted() function");
}
const ct = headers.get("content-type");
let charset = "utf-8";
let res, str;
if (ct) {
res = /charset=([^;]*)/i.exec(ct);
}
str = buffer.slice(0, 1024).toString();
if (!res && str) {
res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
}
if (!res && str) {
res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
if (!res) {
res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str);
if (res) {
res.pop();
}
}
if (res) {
res = /charset=(.*)/i.exec(res.pop());
}
}
if (!res && str) {
res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
}
if (res) {
charset = res.pop();
if (charset === "gb2312" || charset === "gbk") {
charset = "gb18030";
}
}
return convert(buffer, "UTF-8", charset).toString();
}
function isURLSearchParams(obj) {
if (typeof obj !== "object" || typeof obj.append !== "function" || typeof obj.delete !== "function" || typeof obj.get !== "function" || typeof obj.getAll !== "function" || typeof obj.has !== "function" || typeof obj.set !== "function") {
return false;
}
return obj.constructor.name === "URLSearchParams" || Object.prototype.toString.call(obj) === "[object URLSearchParams]" || typeof obj.sort === "function";
}
function isBlob(obj) {
return typeof obj === "object" && typeof obj.arrayBuffer === "function" && typeof obj.type === "string" && typeof obj.stream === "function" && typeof obj.constructor === "function" && typeof obj.constructor.name === "string" && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
}
function clone(instance) {
let p1, p2;
let body = instance.body;
if (instance.bodyUsed) {
throw new Error("cannot clone body after it is used");
}
if (body instanceof Stream && typeof body.getBoundary !== "function") {
p1 = new PassThrough();
p2 = new PassThrough();
body.pipe(p1);
body.pipe(p2);
instance[INTERNALS].body = p1;
body = p2;
}
return body;
}
function extractContentType(body) {
if (body === null) {
return null;
} else if (typeof body === "string") {
return "text/plain;charset=UTF-8";
} else if (isURLSearchParams(body)) {
return "application/x-www-form-urlencoded;charset=UTF-8";
} else if (isBlob(body)) {
return body.type || null;
} else if (Buffer.isBuffer(body)) {
return null;
} else if (Object.prototype.toString.call(body) === "[object ArrayBuffer]") {
return null;
} else if (ArrayBuffer.isView(body)) {
return null;
} else if (typeof body.getBoundary === "function") {
return `multipart/form-data;boundary=${body.getBoundary()}`;
} else if (body instanceof Stream) {
return null;
} else {
return "text/plain;charset=UTF-8";
}
}
function getTotalBytes(instance) {
const body = instance.body;
if (body === null) {
return 0;
} else if (isBlob(body)) {
return body.size;
} else if (Buffer.isBuffer(body)) {
return body.length;
} else if (body && typeof body.getLengthSync === "function") {
if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || body.hasKnownLength && body.hasKnownLength()) {
return body.getLengthSync();
}
return null;
} else {
return null;
}
}
function writeToStream(dest, instance) {
const body = instance.body;
if (body === null) {
dest.end();
} else if (isBlob(body)) {
body.stream().pipe(dest);
} else if (Buffer.isBuffer(body)) {
dest.write(body);
dest.end();
} else {
body.pipe(dest);
}
}
Body.Promise = global.Promise;
var invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
var invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
function validateName(name) {
name = `${name}`;
if (invalidTokenRegex.test(name) || name === "") {
throw new TypeError(`${name} is not a legal HTTP header name`);
}
}
function validateValue(value) {
value = `${value}`;
if (invalidHeaderCharRegex.test(value)) {
throw new TypeError(`${value} is not a legal HTTP header value`);
}
}
function find(map, name) {
name = name.toLowerCase();
for (const key in map) {
if (key.toLowerCase() === name) {
return key;
}
}
return void 0;
}
var MAP = Symbol("map");
var Headers = class {
constructor() {
let init = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : void 0;
this[MAP] = /* @__PURE__ */ Object.create(null);
if (init instanceof Headers) {
const rawHeaders = init.raw();
const headerNames = Object.keys(rawHeaders);
for (const headerName of headerNames) {
for (const value of rawHeaders[headerName]) {
this.append(headerName, value);
}
}
return;
}
if (init == null)
;
else if (typeof init === "object") {
const method = init[Symbol.iterator];
if (method != null) {
if (typeof method !== "function") {
throw new TypeError("Header pairs must be iterable");
}
const pairs = [];
for (const pair of init) {
if (typeof pair !== "object" || typeof pair[Symbol.iterator] !== "function") {
throw new TypeError("Each header pair must be iterable");
}
pairs.push(Array.from(pair));
}
for (const pair of pairs) {
if (pair.length !== 2) {
throw new TypeError("Each header pair must be a name/value tuple");
}
this.append(pair[0], pair[1]);
}
} else {
for (const key of Object.keys(init)) {
const value = init[key];
this.append(key, value);
}
}
} else {
throw new TypeError("Provided initializer must be an object");
}
}
get(name) {
name = `${name}`;
validateName(name);
const key = find(this[MAP], name);
if (key === void 0) {
return null;
}
return this[MAP][key].join(", ");
}
forEach(callback) {
let thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0;
let pairs = getHeaders(this);
let i = 0;
while (i < pairs.length) {
var _pairs$i = pairs[i];
const name = _pairs$i[0], value = _pairs$i[1];
callback.call(thisArg, value, name, this);
pairs = getHeaders(this);
i++;
}
}
set(name, value) {
name = `${name}`;
value = `${value}`;
validateName(name);
validateValue(value);
const key = find(this[MAP], name);
this[MAP][key !== void 0 ? key : name] = [value];
}
append(name, value) {
name = `${name}`;
value = `${value}`;
validateName(name);
validateValue(value);
const key = find(this[MAP], name);
if (key !== void 0) {
this[MAP][key].push(value);
} else {
this[MAP][name] = [value];
}
}
has(name) {
name = `${name}`;
validateName(name);
return find(this[MAP], name) !== void 0;
}
delete(name) {
name = `${name}`;
validateName(name);
const key = find(this[MAP], name);
if (key !== void 0) {
delete this[MAP][key];
}
}
raw() {
return this[MAP];
}
keys() {
return createHeadersIterator(this, "key");
}
values() {
return createHeadersIterator(this, "value");
}
[Symbol.iterator]() {
return createHeadersIterator(this, "key+value");
}
};
Headers.prototype.entries = Headers.prototype[Symbol.iterator];
Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
value: "Headers",
writable: false,
enumerable: false,
configurable: true
});
Object.defineProperties(Headers.prototype, {
get: { enumerable: true },
forEach: { enumerable: true },
set: { enumerable: true },
append: { enumerable: true },
has: { enumerable: true },
delete: { enumerable: true },
keys: { enumerable: true },
values: { enumerable: true },
entries: { enumerable: true }
});
function getHeaders(headers) {
let kind = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "key+value";
const keys = Object.keys(headers[MAP]).sort();
return keys.map(kind === "key" ? function(k) {
return k.toLowerCase();
} : kind === "value" ? function(k) {
return headers[MAP][k].join(", ");
} : function(k) {
return [k.toLowerCase(), headers[MAP][k].join(", ")];
});
}
var INTERNAL = Symbol("internal");
function createHeadersIterator(target, kind) {
const iterator = Object.create(HeadersIteratorPrototype);
iterator[INTERNAL] = {
target,
kind,
index: 0
};
return iterator;
}
var HeadersIteratorPrototype = Object.setPrototypeOf({
next() {
if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
throw new TypeError("Value of `this` is not a HeadersIterator");
}
var _INTERNAL = this[INTERNAL];
const target = _INTERNAL.target, kind = _INTERNAL.kind, index = _INTERNAL.index;
const values = getHeaders(target, kind);
const len = values.length;
if (index >= len) {
return {
value: void 0,
done: true
};
}
this[INTERNAL].index = index + 1;
return {
value: values[index],
done: false
};
}
}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
value: "HeadersIterator",
writable: false,
enumerable: false,
configurable: true
});
function exportNodeCompatibleHeaders(headers) {
const obj = Object.assign({ __proto__: null }, headers[MAP]);
const hostHeaderKey = find(headers[MAP], "Host");
if (hostHeaderKey !== void 0) {
obj[hostHeaderKey] = obj[hostHeaderKey][0];
}
return obj;
}
function createHeadersLenient(obj) {
const headers = new Headers();
for (const name of Object.keys(obj)) {
if (invalidTokenRegex.test(name)) {
continue;
}
if (Array.isArray(obj[name])) {
for (const val of obj[name]) {
if (invalidHeaderCharRegex.test(val)) {
continue;
}
if (headers[MAP][name] === void 0) {
headers[MAP][name] = [val];
} else {
headers[MAP][name].push(val);
}
}
} else if (!invalidHeaderCharRegex.test(obj[name])) {
headers[MAP][name] = [obj[name]];
}
}
return headers;
}
var INTERNALS$1 = Symbol("Response internals");
var STATUS_CODES = http.STATUS_CODES;
var Response = class {
constructor() {
let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
Body.call(this, body, opts);
const status = opts.status || 200;
const headers = new Headers(opts.headers);
if (body != null && !headers.has("Content-Type")) {
const contentType = extractContentType(body);
if (contentType) {
headers.append("Content-Type", contentType);
}
}
this[INTERNALS$1] = {
url: opts.url,
status,
statusText: opts.statusText || STATUS_CODES[status],
headers,
counter: opts.counter
};
}
get url() {
return this[INTERNALS$1].url || "";
}
get status() {
return this[INTERNALS$1].status;
}
get ok() {
return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
}
get redirected() {
return this[INTERNALS$1].counter > 0;
}
get statusText() {
return this[INTERNALS$1].statusText;
}
get headers() {
return this[INTERNALS$1].headers;
}
clone() {
return new Response(clone(this), {
url: this.url,
status: this.status,
statusText: this.statusText,
headers: this.headers,
ok: this.ok,
redirected: this.redirected
});
}
};
Body.mixIn(Response.prototype);
Object.defineProperties(Response.prototype, {
url: { enumerable: true },
status: { enumerable: true },
ok: { enumerable: true },
redirected: { enumerable: true },
statusText: { enumerable: true },
headers: { enumerable: true },
clone: { enumerable: true }
});
Object.defineProperty(Response.prototype, Symbol.toStringTag, {
value: "Response",
writable: false,
enumerable: false,
configurable: true
});
var INTERNALS$2 = Symbol("Request internals");
var URL2 = Url.URL || whatwgUrl.URL;
var parse_url = Url.parse;
var format_url = Url.format;
function parseURL(urlStr) {
if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) {
urlStr = new URL2(urlStr).toString();
}
return parse_url(urlStr);
}
var streamDestructionSupported = "destroy" in Stream.Readable.prototype;
function isRequest(input) {
return typeof input === "object" && typeof input[INTERNALS$2] === "object";
}
function isAbortSignal(signal) {
const proto = signal && typeof signal === "object" && Object.getPrototypeOf(signal);
return !!(proto && proto.constructor.name === "AbortSignal");
}
var Request = class {
constructor(input) {
let init = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
let parsedURL;
if (!isRequest(input)) {
if (input && input.href) {
parsedURL = parseURL(input.href);
} else {
parsedURL = parseURL(`${input}`);
}
input = {};
} else {
parsedURL = parseURL(input.url);
}
let method = init.method || input.method || "GET";
method = method.toUpperCase();
if ((init.body != null || isRequest(input) && input.body !== null) && (method === "GET" || method === "HEAD")) {
throw new TypeError("Request with GET/HEAD method cannot have body");
}
let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
Body.call(this, inputBody, {
timeout: init.timeout || input.timeout || 0,
size: init.size || input.size || 0
});
const headers = new Headers(init.headers || input.headers || {});
if (inputBody != null && !headers.has("Content-Type")) {
const contentType = extractContentType(inputBody);
if (contentType) {
headers.append("Content-Type", contentType);
}
}
let signal = isRequest(input) ? input.signal : null;
if ("signal" in init)
signal = init.signal;
if (signal != null && !isAbortSignal(signal)) {
throw new TypeError("Expected signal to be an instanceof AbortSignal");
}
this[INTERNALS$2] = {
method,
redirect: init.redirect || input.redirect || "follow",
headers,
parsedURL,
signal
};
this.follow = init.follow !== void 0 ? init.follow : input.follow !== void 0 ? input.follow : 20;
this.compress = init.compress !== void 0 ? init.compress : input.compress !== void 0 ? input.compress : true;
this.counter = init.counter || input.counter || 0;
this.agent = init.agent || input.agent;
}
get method() {
return this[INTERNALS$2].method;
}
get url() {
return format_url(this[INTERNALS$2].parsedURL);
}
get headers() {
return this[INTERNALS$2].headers;
}
get redirect() {
return this[INTERNALS$2].redirect;
}
get signal() {
return this[INTERNALS$2].signal;
}
clone() {
return new Request(this);
}
};
Body.mixIn(Request.prototype);
Object.defineProperty(Request.prototype, Symbol.toStringTag, {
value: "Request",
writable: false,
enumerable: false,
configurable: true
});
Object.defineProperties(Request.prototype, {
method: { enumerable: true },
url: { enumerable: true },
headers: { enumerable: true },
redirect: { enumerable: true },
clone: { enumerable: true },
signal: { enumerable: true }
});
function getNodeRequestOptions(request) {
const parsedURL = request[INTERNALS$2].parsedURL;
const headers = new Headers(request[INTERNALS$2].headers);
if (!headers.has("Accept")) {
headers.set("Accept", "*/*");
}
if (!parsedURL.protocol || !parsedURL.hostname) {
throw new TypeError("Only absolute URLs are supported");
}
if (!/^https?:$/.test(parsedURL.protocol)) {
throw new TypeError("Only HTTP(S) protocols are supported");
}
if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");
}
let contentLengthValue = null;
if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
contentLengthValue = "0";
}
if (request.body != null) {
const totalBytes = getTotalBytes(request);
if (typeof totalBytes === "number") {
contentLengthValue = String(totalBytes);
}
}
if (contentLengthValue) {
headers.set("Content-Length", contentLengthValue);
}
if (!headers.has("User-Agent")) {
headers.set("User-Agent", "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)");
}
if (request.compress && !headers.has("Accept-Encoding")) {
headers.set("Accept-Encoding", "gzip,deflate");
}
let agent = request.agent;
if (typeof agent === "function") {
agent = agent(parsedURL);
}
if (!headers.has("Connection") && !agent) {
headers.set("Connection", "close");
}
return Object.assign({}, parsedURL, {
method: request.method,
headers: exportNodeCompatibleHeaders(headers),
agent
});
}
function AbortError(message) {
Error.call(this, message);
this.type = "aborted";
this.message = message;
Error.captureStackTrace(this, this.constructor);
}
AbortError.prototype = Object.create(Error.prototype);
AbortError.prototype.constructor = AbortError;
AbortError.prototype.name = "AbortError";
var URL$1 = Url.URL || whatwgUrl.URL;
var PassThrough$1 = Stream.PassThrough;
var isDomainOrSubdomain = function isDomainOrSubdomain2(destination, original) {
const orig = new URL$1(original).hostname;
const dest = new URL$1(destination).hostname;
return orig === dest || orig[orig.length - dest.length - 1] === "." && orig.endsWith(dest);
};
function fetch(url, opts) {
if (!fetch.Promise) {
throw new Error("native promise missing, set fetch.Promise to your favorite alternative");
}
Body.Promise = fetch.Promise;
return new fetch.Promise(function(resolve, reject) {
const request = new Request(url, opts);
const options = getNodeRequestOptions(request);
const send = (options.protocol === "https:" ? https : http).request;
const signal = request.signal;
let response = null;
const abort = function abort2() {
let error = new AbortError("The user aborted a request.");
reject(error);
if (request.body && request.body instanceof Stream.Readable) {
request.body.destroy(error);
}
if (!response || !response.body)
return;
response.body.emit("error", error);
};
if (signal && signal.aborted) {
abort();
return;
}
const abortAndFinalize = function abortAndFinalize2() {
abort();
finalize();
};
const req = send(options);
let reqTimeout;
if (signal) {
signal.addEventListener("abort", abortAndFinalize);
}
function finalize() {
req.abort();
if (signal)
signal.removeEventListener("abort", abortAndFinalize);
clearTimeout(reqTimeout);
}
if (request.timeout) {
req.once("socket", function(socket) {
reqTimeout = setTimeout(function() {
reject(new FetchError(`network timeout at: ${request.url}`, "request-timeout"));
finalize();
}, request.timeout);
});
}
req.on("error", function(err) {
reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, "system", err));
finalize();
});
req.on("response", function(res) {
clearTimeout(reqTimeout);
const headers = createHeadersLenient(res.headers);
if (fetch.isRedirect(res.statusCode)) {
const location = headers.get("Location");
let locationURL = null;
try {
locationURL = location === null ? null : new URL$1(location, request.url).toString();
} catch (err) {
if (request.redirect !== "manual") {
reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, "invalid-redirect"));
finalize();
return;
}
}
switch (request.redirect) {
case "error":
reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, "no-redirect"));
finalize();
return;
case "manual":
if (locationURL !== null) {
try {
headers.set("Location", locationURL);
} catch (err) {
reject(err);
}
}
break;
case "follow":
if (locationURL === null) {
break;
}
if (request.counter >= request.follow) {
reject(new FetchError(`maximum redirect reached at: ${request.url}`, "max-redirect"));
finalize();
return;
}
const requestOpts = {
headers: new Headers(request.headers),
follow: request.follow,
counter: request.counter + 1,
agent: request.agent,
compress: request.compress,
method: request.method,
body: request.body,
signal: request.signal,
timeout: request.timeout,
size: request.size
};
if (!isDomainOrSubdomain(request.url, locationURL)) {
for (const name of ["authorization", "www-authenticate", "cookie", "cookie2"]) {
requestOpts.headers.delete(name);
}
}
if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
reject(new FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect"));
finalize();
return;
}
if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === "POST") {
requestOpts.method = "GET";
requestOpts.body = void 0;
requestOpts.headers.delete("content-length");
}
resolve(fetch(new Request(locationURL, requestOpts)));
finalize();
return;
}
}
res.once("end", function() {
if (signal)
signal.removeEventListener("abort", abortAndFinalize);
});
let body = res.pipe(new PassThrough$1());
const response_options = {
url: request.url,
status: res.statusCode,
statusText: res.statusMessage,
headers,
size: request.size,
timeout: request.timeout,
counter: request.counter
};
const codings = headers.get("Content-Encoding");
if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
response = new Response(body, response_options);
resolve(response);
return;
}
const zlibOptions = {
flush: zlib.Z_SYNC_FLUSH,
finishFlush: zlib.Z_SYNC_FLUSH
};
if (codings == "gzip" || codings == "x-gzip") {
body = body.pipe(zlib.createGunzip(zlibOptions));
response = new Response(body, response_options);
resolve(response);
return;
}
if (codings == "deflate" || codings == "x-deflate") {
const raw = res.pipe(new PassThrough$1());
raw.once("data", function(chunk) {
if ((chunk[0] & 15) === 8) {
body = body.pipe(zlib.createInflate());
} else {
body = body.pipe(zlib.createInflateRaw());
}
response = new Response(body, response_options);
resolve(response);
});
return;
}
if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
body = body.pipe(zlib.createBrotliDecompress());
response = new Response(body, response_options);
resolve(response);
return;
}
response = new Response(body, response_options);
resolve(response);
});
writeToStream(req, request);
});
}
fetch.isRedirect = function(code) {
return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
};
fetch.Promise = global.Promise;
module2.exports = exports = fetch;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = exports;
exports.Headers = Headers;
exports.Request = Request;
exports.Response = Response;
exports.FetchError = FetchError;
}
});
// node_modules/deprecation/dist-node/index.js
var require_dist_node3 = __commonJS({
"node_modules/deprecation/dist-node/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Deprecation = class extends Error {
constructor(message) {
super(message);
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
}
this.name = "Deprecation";
}
};
exports.Deprecation = Deprecation;
}
});
// node_modules/wrappy/wrappy.js
var require_wrappy = __commonJS({
"node_modules/wrappy/wrappy.js"(exports, 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"(exports, 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"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function _interopDefault(ex) {
return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
}
var deprecation = require_dist_node3();
var once = _interopDefault(require_once());
var logOnceCode = once((deprecation2) => console.warn(deprecation2));
var logOnceHeaders = once((deprecation2) => console.warn(deprecation2));
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 deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
return statusCode;
}
});
Object.defineProperty(this, "headers", {
get() {
logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));
return headers || {};
}
});
}
};
exports.RequestError = RequestError;
}
});
// node_modules/@octokit/request/dist-node/index.js
var require_dist_node5 = __commonJS({
"node_modules/@octokit/request/dist-node/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function _interopDefault(ex) {
return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
}
var endpoint = require_dist_node2();
var universalUserAgent = require_dist_node();
var isPlainObject = require_is_plain_object();
var nodeFetch = _interopDefault(require_lib3());
var requestError = require_dist_node4();
var VERSION = "5.6.3";
function getBufferResponse(response) {
return response.arrayBuffer();
}
function fetchWrapper(requestOptions) {
const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
requestOptions.body = JSON.stringify(requestOptions.body);
}
let headers = {};
let status;
let url;
const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch;
return fetch(requestOptions.url, Object.assign(
{
method: requestOptions.method,
body: requestOptions.body,
headers: requestOptions.headers,
redirect: requestOptions.redirect
},
requestOptions.request
)).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.RequestError(response.statusText, status, {
response: {
url,
status,
headers,
data: void 0
},
request: requestOptions
});
}
if (status === 304) {
throw new requestError.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.RequestError(toErrorMessage(data), status, {
response: {
url,
status,
headers,
data
},
request: requestOptions
});
throw error;
}
return getResponseData(response);
}).then((data) => {
return {
status,
url,
headers,
data
};
}).catch((error) => {
if (error instanceof requestError.RequestError)
throw error;
throw new requestError.RequestError(error.message, 500, {
request: requestOptions
});
});
}
async function getResponseData(response) {
const contentType = response.headers.get("content-type");
if (/application\/json/.test(contentType)) {
return response.json();
}
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 request2 = (route2, parameters2) => {
return fetchWrapper(endpoint2.parse(endpoint2.merge(route2, parameters2)));
};
Object.assign(request2, {
endpoint: endpoint2,
defaults: withDefaults.bind(null, endpoint2)
});
return endpointOptions.request.hook(request2, endpointOptions);
};
return Object.assign(newApi, {
endpoint: endpoint2,
defaults: withDefaults.bind(null, endpoint2)
});
}
var request = withDefaults(endpoint.endpoint, {
headers: {
"user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}`
}
});
exports.request = request;
}
});
// node_modules/@octokit/graphql/dist-node/index.js
var require_dist_node6 = __commonJS({
"node_modules/@octokit/graphql/dist-node/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var request = require_dist_node5();
var universalUserAgent = require_dist_node();
var VERSION = "4.8.0";
function _buildMessageForResponseErrors(data) {
return `Request failed due to following response errors:
` + data.errors.map((e) => ` - ${e.message}`).join("\n");
}
var GraphqlResponseError = class extends Error {
constructor(request2, headers, response) {
super(_buildMessageForResponseErrors(response));
this.request = request2;
this.headers = headers;
this.response = response;
this.name = "GraphqlResponseError";
this.errors = response.errors;
this.data = response.data;
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
}
}
};
var NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"];
var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
function graphql(request2, query, options) {
if (options) {
if (typeof query === "string" && "query" in options) {
return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`));
}
for (const key in options) {
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))
continue;
return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`));
}
}
const parsedOptions = typeof query === "string" ? Object.assign({
query
}, options) : query;
const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {
if (NON_VARIABLE_OPTIONS.includes(key)) {
result[key] = parsedOptions[key];
return result;
}
if (!result.variables) {
result.variables = {};
}
result.variables[key] = parsedOptions[key];
return result;
}, {});
const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;
if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
}
return request2(requestOptions).then((response) => {
if (response.data.errors) {
const headers = {};
for (const key of Object.keys(response.headers)) {
headers[key] = response.headers[key];
}
throw new GraphqlResponseError(requestOptions, headers, response.data);
}
return response.data.data;
});
}
function withDefaults(request$1, newDefaults) {
const newRequest = request$1.defaults(newDefaults);
const newApi = (query, options) => {
return graphql(newRequest, query, options);
};
return Object.assign(newApi, {
defaults: withDefaults.bind(null, newRequest),
endpoint: request.request.endpoint
});
}
var graphql$1 = withDefaults(request.request, {
headers: {
"user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}`
},
method: "POST",
url: "/graphql"
});
function withCustomRequest(customRequest) {
return withDefaults(customRequest, {
method: "POST",
url: "/graphql"
});
}
exports.GraphqlResponseError = GraphqlResponseError;
exports.graphql = graphql$1;
exports.withCustomRequest = withCustomRequest;
}
});
// node_modules/@octokit/plugin-request-log/dist-node/index.js
var require_dist_node7 = __commonJS({
"node_modules/@octokit/plugin-request-log/dist-node/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var VERSION = "1.0.4";
function requestLog(octokit) {
octokit.hook.wrap("request", (request, options) => {
octokit.log.debug("request", options);
const start = Date.now();
const requestOptions = octokit.request.endpoint.parse(options);
const path5 = requestOptions.url.replace(options.baseUrl, "");
return request(options).then((response) => {
octokit.log.info(`${requestOptions.method} ${path5} - ${response.status} in ${Date.now() - start}ms`);
return response;
}).catch((error) => {
octokit.log.info(`${requestOptions.method} ${path5} - ${error.status} in ${Date.now() - start}ms`);
throw error;
});
});
}
requestLog.VERSION = VERSION;
exports.requestLog = requestLog;
}
});
// node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js
var require_dist_node8 = __commonJS({
"node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var deprecation = require_dist_node3();
var endpointsByScope = {
actions: {
cancelWorkflowRun: {
method: "POST",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
run_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/actions/runs/:run_id/cancel"
},
createOrUpdateSecretForRepo: {
method: "PUT",
params: {
encrypted_value: {
type: "string"
},
key_id: {
type: "string"
},
name: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/secrets/:name"
},
createRegistrationToken: {
method: "POST",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/runners/registration-token"
},
createRemoveToken: {
method: "POST",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/runners/remove-token"
},
deleteArtifact: {
method: "DELETE",
params: {
artifact_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/artifacts/:artifact_id"
},
deleteSecretFromRepo: {
method: "DELETE",
params: {
name: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/secrets/:name"
},
downloadArtifact: {
method: "GET",
params: {
archive_format: {
required: true,
type: "string"
},
artifact_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/artifacts/:artifact_id/:archive_format"
},
getArtifact: {
method: "GET",
params: {
artifact_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/artifacts/:artifact_id"
},
getPublicKey: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/secrets/public-key"
},
getSecret: {
method: "GET",
params: {
name: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/secrets/:name"
},
getSelfHostedRunner: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
runner_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/actions/runners/:runner_id"
},
getWorkflow: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
workflow_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/actions/workflows/:workflow_id"
},
getWorkflowJob: {
method: "GET",
params: {
job_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/jobs/:job_id"
},
getWorkflowRun: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
run_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/actions/runs/:run_id"
},
listDownloadsForSelfHostedRunnerApplication: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/runners/downloads"
},
listJobsForWorkflowRun: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
run_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/actions/runs/:run_id/jobs"
},
listRepoWorkflowRuns: {
method: "GET",
params: {
actor: {
type: "string"
},
branch: {
type: "string"
},
event: {
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
status: {
enum: ["completed", "status", "conclusion"],
type: "string"
}
},
url: "/repos/:owner/:repo/actions/runs"
},
listRepoWorkflows: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/workflows"
},
listSecretsForRepo: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/secrets"
},
listSelfHostedRunnersForRepo: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/runners"
},
listWorkflowJobLogs: {
method: "GET",
params: {
job_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/actions/jobs/:job_id/logs"
},
listWorkflowRunArtifacts: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
run_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/actions/runs/:run_id/artifacts"
},
listWorkflowRunLogs: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
run_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/actions/runs/:run_id/logs"
},
listWorkflowRuns: {
method: "GET",
params: {
actor: {
type: "string"
},
branch: {
type: "string"
},
event: {
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
status: {
enum: ["completed", "status", "conclusion"],
type: "string"
},
workflow_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/actions/workflows/:workflow_id/runs"
},
reRunWorkflow: {
method: "POST",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
run_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/actions/runs/:run_id/rerun"
},
removeSelfHostedRunner: {
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
runner_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/actions/runners/:runner_id"
}
},
activity: {
checkStarringRepo: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/user/starred/:owner/:repo"
},
deleteRepoSubscription: {
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/subscription"
},
deleteThreadSubscription: {
method: "DELETE",
params: {
thread_id: {
required: true,
type: "integer"
}
},
url: "/notifications/threads/:thread_id/subscription"
},
getRepoSubscription: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/subscription"
},
getThread: {
method: "GET",
params: {
thread_id: {
required: true,
type: "integer"
}
},
url: "/notifications/threads/:thread_id"
},
getThreadSubscription: {
method: "GET",
params: {
thread_id: {
required: true,
type: "integer"
}
},
url: "/notifications/threads/:thread_id/subscription"
},
listEventsForOrg: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/events/orgs/:org"
},
listEventsForUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/events"
},
listFeeds: {
method: "GET",
params: {},
url: "/feeds"
},
listNotifications: {
method: "GET",
params: {
all: {
type: "boolean"
},
before: {
type: "string"
},
page: {
type: "integer"
},
participating: {
type: "boolean"
},
per_page: {
type: "integer"
},
since: {
type: "string"
}
},
url: "/notifications"
},
listNotificationsForRepo: {
method: "GET",
params: {
all: {
type: "boolean"
},
before: {
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
participating: {
type: "boolean"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
since: {
type: "string"
}
},
url: "/repos/:owner/:repo/notifications"
},
listPublicEvents: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/events"
},
listPublicEventsForOrg: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/orgs/:org/events"
},
listPublicEventsForRepoNetwork: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/networks/:owner/:repo/events"
},
listPublicEventsForUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/events/public"
},
listReceivedEventsForUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/received_events"
},
listReceivedPublicEventsForUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/received_events/public"
},
listRepoEvents: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/events"
},
listReposStarredByAuthenticatedUser: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
sort: {
enum: ["created", "updated"],
type: "string"
}
},
url: "/user/starred"
},
listReposStarredByUser: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
sort: {
enum: ["created", "updated"],
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/starred"
},
listReposWatchedByUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/subscriptions"
},
listStargazersForRepo: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/stargazers"
},
listWatchedReposForAuthenticatedUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/subscriptions"
},
listWatchersForRepo: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/subscribers"
},
markAsRead: {
method: "PUT",
params: {
last_read_at: {
type: "string"
}
},
url: "/notifications"
},
markNotificationsAsReadForRepo: {
method: "PUT",
params: {
last_read_at: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/notifications"
},
markThreadAsRead: {
method: "PATCH",
params: {
thread_id: {
required: true,
type: "integer"
}
},
url: "/notifications/threads/:thread_id"
},
setRepoSubscription: {
method: "PUT",
params: {
ignored: {
type: "boolean"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
subscribed: {
type: "boolean"
}
},
url: "/repos/:owner/:repo/subscription"
},
setThreadSubscription: {
method: "PUT",
params: {
ignored: {
type: "boolean"
},
thread_id: {
required: true,
type: "integer"
}
},
url: "/notifications/threads/:thread_id/subscription"
},
starRepo: {
method: "PUT",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/user/starred/:owner/:repo"
},
unstarRepo: {
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/user/starred/:owner/:repo"
}
},
apps: {
addRepoToInstallation: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "PUT",
params: {
installation_id: {
required: true,
type: "integer"
},
repository_id: {
required: true,
type: "integer"
}
},
url: "/user/installations/:installation_id/repositories/:repository_id"
},
checkAccountIsAssociatedWithAny: {
method: "GET",
params: {
account_id: {
required: true,
type: "integer"
}
},
url: "/marketplace_listing/accounts/:account_id"
},
checkAccountIsAssociatedWithAnyStubbed: {
method: "GET",
params: {
account_id: {
required: true,
type: "integer"
}
},
url: "/marketplace_listing/stubbed/accounts/:account_id"
},
checkAuthorization: {
deprecated: "octokit.apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization",
method: "GET",
params: {
access_token: {
required: true,
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/tokens/:access_token"
},
checkToken: {
headers: {
accept: "application/vnd.github.doctor-strange-preview+json"
},
method: "POST",
params: {
access_token: {
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/token"
},
createContentAttachment: {
headers: {
accept: "application/vnd.github.corsair-preview+json"
},
method: "POST",
params: {
body: {
required: true,
type: "string"
},
content_reference_id: {
required: true,
type: "integer"
},
title: {
required: true,
type: "string"
}
},
url: "/content_references/:content_reference_id/attachments"
},
createFromManifest: {
headers: {
accept: "application/vnd.github.fury-preview+json"
},
method: "POST",
params: {
code: {
required: true,
type: "string"
}
},
url: "/app-manifests/:code/conversions"
},
createInstallationToken: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "POST",
params: {
installation_id: {
required: true,
type: "integer"
},
permissions: {
type: "object"
},
repository_ids: {
type: "integer[]"
}
},
url: "/app/installations/:installation_id/access_tokens"
},
deleteAuthorization: {
headers: {
accept: "application/vnd.github.doctor-strange-preview+json"
},
method: "DELETE",
params: {
access_token: {
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/grant"
},
deleteInstallation: {
headers: {
accept: "application/vnd.github.gambit-preview+json,application/vnd.github.machine-man-preview+json"
},
method: "DELETE",
params: {
installation_id: {
required: true,
type: "integer"
}
},
url: "/app/installations/:installation_id"
},
deleteToken: {
headers: {
accept: "application/vnd.github.doctor-strange-preview+json"
},
method: "DELETE",
params: {
access_token: {
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/token"
},
findOrgInstallation: {
deprecated: "octokit.apps.findOrgInstallation() has been renamed to octokit.apps.getOrgInstallation() (2019-04-10)",
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/installation"
},
findRepoInstallation: {
deprecated: "octokit.apps.findRepoInstallation() has been renamed to octokit.apps.getRepoInstallation() (2019-04-10)",
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/installation"
},
findUserInstallation: {
deprecated: "octokit.apps.findUserInstallation() has been renamed to octokit.apps.getUserInstallation() (2019-04-10)",
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
username: {
required: true,
type: "string"
}
},
url: "/users/:username/installation"
},
getAuthenticated: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {},
url: "/app"
},
getBySlug: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
app_slug: {
required: true,
type: "string"
}
},
url: "/apps/:app_slug"
},
getInstallation: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
installation_id: {
required: true,
type: "integer"
}
},
url: "/app/installations/:installation_id"
},
getOrgInstallation: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/installation"
},
getRepoInstallation: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/installation"
},
getUserInstallation: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
username: {
required: true,
type: "string"
}
},
url: "/users/:username/installation"
},
listAccountsUserOrOrgOnPlan: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
plan_id: {
required: true,
type: "integer"
},
sort: {
enum: ["created", "updated"],
type: "string"
}
},
url: "/marketplace_listing/plans/:plan_id/accounts"
},
listAccountsUserOrOrgOnPlanStubbed: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
plan_id: {
required: true,
type: "integer"
},
sort: {
enum: ["created", "updated"],
type: "string"
}
},
url: "/marketplace_listing/stubbed/plans/:plan_id/accounts"
},
listInstallationReposForAuthenticatedUser: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
installation_id: {
required: true,
type: "integer"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/installations/:installation_id/repositories"
},
listInstallations: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/app/installations"
},
listInstallationsForAuthenticatedUser: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/installations"
},
listMarketplacePurchasesForAuthenticatedUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/marketplace_purchases"
},
listMarketplacePurchasesForAuthenticatedUserStubbed: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/marketplace_purchases/stubbed"
},
listPlans: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/marketplace_listing/plans"
},
listPlansStubbed: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/marketplace_listing/stubbed/plans"
},
listRepos: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/installation/repositories"
},
removeRepoFromInstallation: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "DELETE",
params: {
installation_id: {
required: true,
type: "integer"
},
repository_id: {
required: true,
type: "integer"
}
},
url: "/user/installations/:installation_id/repositories/:repository_id"
},
resetAuthorization: {
deprecated: "octokit.apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization",
method: "POST",
params: {
access_token: {
required: true,
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/tokens/:access_token"
},
resetToken: {
headers: {
accept: "application/vnd.github.doctor-strange-preview+json"
},
method: "PATCH",
params: {
access_token: {
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/token"
},
revokeAuthorizationForApplication: {
deprecated: "octokit.apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application",
method: "DELETE",
params: {
access_token: {
required: true,
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/tokens/:access_token"
},
revokeGrantForApplication: {
deprecated: "octokit.apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application",
method: "DELETE",
params: {
access_token: {
required: true,
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/grants/:access_token"
},
revokeInstallationToken: {
headers: {
accept: "application/vnd.github.gambit-preview+json"
},
method: "DELETE",
params: {},
url: "/installation/token"
}
},
checks: {
create: {
headers: {
accept: "application/vnd.github.antiope-preview+json"
},
method: "POST",
params: {
actions: {
type: "object[]"
},
"actions[].description": {
required: true,
type: "string"
},
"actions[].identifier": {
required: true,
type: "string"
},
"actions[].label": {
required: true,
type: "string"
},
completed_at: {
type: "string"
},
conclusion: {
enum: ["success", "failure", "neutral", "cancelled", "timed_out", "action_required"],
type: "string"
},
details_url: {
type: "string"
},
external_id: {
type: "string"
},
head_sha: {
required: true,
type: "string"
},
name: {
required: true,
type: "string"
},
output: {
type: "object"
},
"output.annotations": {
type: "object[]"
},
"output.annotations[].annotation_level": {
enum: ["notice", "warning", "failure"],
required: true,
type: "string"
},
"output.annotations[].end_column": {
type: "integer"
},
"output.annotations[].end_line": {
required: true,
type: "integer"
},
"output.annotations[].message": {
required: true,
type: "string"
},
"output.annotations[].path": {
required: true,
type: "string"
},
"output.annotations[].raw_details": {
type: "string"
},
"output.annotations[].start_column": {
type: "integer"
},
"output.annotations[].start_line": {
required: true,
type: "integer"
},
"output.annotations[].title": {
type: "string"
},
"output.images": {
type: "object[]"
},
"output.images[].alt": {
required: true,
type: "string"
},
"output.images[].caption": {
type: "string"
},
"output.images[].image_url": {
required: true,
type: "string"
},
"output.summary": {
required: true,
type: "string"
},
"output.text": {
type: "string"
},
"output.title": {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
started_at: {
type: "string"
},
status: {
enum: ["queued", "in_progress", "completed"],
type: "string"
}
},
url: "/repos/:owner/:repo/check-runs"
},
createSuite: {
headers: {
accept: "application/vnd.github.antiope-preview+json"
},
method: "POST",
params: {
head_sha: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/check-suites"
},
get: {
headers: {
accept: "application/vnd.github.antiope-preview+json"
},
method: "GET",
params: {
check_run_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/check-runs/:check_run_id"
},
getSuite: {
headers: {
accept: "application/vnd.github.antiope-preview+json"
},
method: "GET",
params: {
check_suite_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/check-suites/:check_suite_id"
},
listAnnotations: {
headers: {
accept: "application/vnd.github.antiope-preview+json"
},
method: "GET",
params: {
check_run_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/check-runs/:check_run_id/annotations"
},
listForRef: {
headers: {
accept: "application/vnd.github.antiope-preview+json"
},
method: "GET",
params: {
check_name: {
type: "string"
},
filter: {
enum: ["latest", "all"],
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
status: {
enum: ["queued", "in_progress", "completed"],
type: "string"
}
},
url: "/repos/:owner/:repo/commits/:ref/check-runs"
},
listForSuite: {
headers: {
accept: "application/vnd.github.antiope-preview+json"
},
method: "GET",
params: {
check_name: {
type: "string"
},
check_suite_id: {
required: true,
type: "integer"
},
filter: {
enum: ["latest", "all"],
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
status: {
enum: ["queued", "in_progress", "completed"],
type: "string"
}
},
url: "/repos/:owner/:repo/check-suites/:check_suite_id/check-runs"
},
listSuitesForRef: {
headers: {
accept: "application/vnd.github.antiope-preview+json"
},
method: "GET",
params: {
app_id: {
type: "integer"
},
check_name: {
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/commits/:ref/check-suites"
},
rerequestSuite: {
headers: {
accept: "application/vnd.github.antiope-preview+json"
},
method: "POST",
params: {
check_suite_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/check-suites/:check_suite_id/rerequest"
},
setSuitesPreferences: {
headers: {
accept: "application/vnd.github.antiope-preview+json"
},
method: "PATCH",
params: {
auto_trigger_checks: {
type: "object[]"
},
"auto_trigger_checks[].app_id": {
required: true,
type: "integer"
},
"auto_trigger_checks[].setting": {
required: true,
type: "boolean"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/check-suites/preferences"
},
update: {
headers: {
accept: "application/vnd.github.antiope-preview+json"
},
method: "PATCH",
params: {
actions: {
type: "object[]"
},
"actions[].description": {
required: true,
type: "string"
},
"actions[].identifier": {
required: true,
type: "string"
},
"actions[].label": {
required: true,
type: "string"
},
check_run_id: {
required: true,
type: "integer"
},
completed_at: {
type: "string"
},
conclusion: {
enum: ["success", "failure", "neutral", "cancelled", "timed_out", "action_required"],
type: "string"
},
details_url: {
type: "string"
},
external_id: {
type: "string"
},
name: {
type: "string"
},
output: {
type: "object"
},
"output.annotations": {
type: "object[]"
},
"output.annotations[].annotation_level": {
enum: ["notice", "warning", "failure"],
required: true,
type: "string"
},
"output.annotations[].end_column": {
type: "integer"
},
"output.annotations[].end_line": {
required: true,
type: "integer"
},
"output.annotations[].message": {
required: true,
type: "string"
},
"output.annotations[].path": {
required: true,
type: "string"
},
"output.annotations[].raw_details": {
type: "string"
},
"output.annotations[].start_column": {
type: "integer"
},
"output.annotations[].start_line": {
required: true,
type: "integer"
},
"output.annotations[].title": {
type: "string"
},
"output.images": {
type: "object[]"
},
"output.images[].alt": {
required: true,
type: "string"
},
"output.images[].caption": {
type: "string"
},
"output.images[].image_url": {
required: true,
type: "string"
},
"output.summary": {
required: true,
type: "string"
},
"output.text": {
type: "string"
},
"output.title": {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
started_at: {
type: "string"
},
status: {
enum: ["queued", "in_progress", "completed"],
type: "string"
}
},
url: "/repos/:owner/:repo/check-runs/:check_run_id"
}
},
codesOfConduct: {
getConductCode: {
headers: {
accept: "application/vnd.github.scarlet-witch-preview+json"
},
method: "GET",
params: {
key: {
required: true,
type: "string"
}
},
url: "/codes_of_conduct/:key"
},
getForRepo: {
headers: {
accept: "application/vnd.github.scarlet-witch-preview+json"
},
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/community/code_of_conduct"
},
listConductCodes: {
headers: {
accept: "application/vnd.github.scarlet-witch-preview+json"
},
method: "GET",
params: {},
url: "/codes_of_conduct"
}
},
emojis: {
get: {
method: "GET",
params: {},
url: "/emojis"
}
},
gists: {
checkIsStarred: {
method: "GET",
params: {
gist_id: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id/star"
},
create: {
method: "POST",
params: {
description: {
type: "string"
},
files: {
required: true,
type: "object"
},
"files.content": {
type: "string"
},
public: {
type: "boolean"
}
},
url: "/gists"
},
createComment: {
method: "POST",
params: {
body: {
required: true,
type: "string"
},
gist_id: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id/comments"
},
delete: {
method: "DELETE",
params: {
gist_id: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id"
},
deleteComment: {
method: "DELETE",
params: {
comment_id: {
required: true,
type: "integer"
},
gist_id: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id/comments/:comment_id"
},
fork: {
method: "POST",
params: {
gist_id: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id/forks"
},
get: {
method: "GET",
params: {
gist_id: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id"
},
getComment: {
method: "GET",
params: {
comment_id: {
required: true,
type: "integer"
},
gist_id: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id/comments/:comment_id"
},
getRevision: {
method: "GET",
params: {
gist_id: {
required: true,
type: "string"
},
sha: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id/:sha"
},
list: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
since: {
type: "string"
}
},
url: "/gists"
},
listComments: {
method: "GET",
params: {
gist_id: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/gists/:gist_id/comments"
},
listCommits: {
method: "GET",
params: {
gist_id: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/gists/:gist_id/commits"
},
listForks: {
method: "GET",
params: {
gist_id: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/gists/:gist_id/forks"
},
listPublic: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
since: {
type: "string"
}
},
url: "/gists/public"
},
listPublicForUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
since: {
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/gists"
},
listStarred: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
since: {
type: "string"
}
},
url: "/gists/starred"
},
star: {
method: "PUT",
params: {
gist_id: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id/star"
},
unstar: {
method: "DELETE",
params: {
gist_id: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id/star"
},
update: {
method: "PATCH",
params: {
description: {
type: "string"
},
files: {
type: "object"
},
"files.content": {
type: "string"
},
"files.filename": {
type: "string"
},
gist_id: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id"
},
updateComment: {
method: "PATCH",
params: {
body: {
required: true,
type: "string"
},
comment_id: {
required: true,
type: "integer"
},
gist_id: {
required: true,
type: "string"
}
},
url: "/gists/:gist_id/comments/:comment_id"
}
},
git: {
createBlob: {
method: "POST",
params: {
content: {
required: true,
type: "string"
},
encoding: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/blobs"
},
createCommit: {
method: "POST",
params: {
author: {
type: "object"
},
"author.date": {
type: "string"
},
"author.email": {
type: "string"
},
"author.name": {
type: "string"
},
committer: {
type: "object"
},
"committer.date": {
type: "string"
},
"committer.email": {
type: "string"
},
"committer.name": {
type: "string"
},
message: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
parents: {
required: true,
type: "string[]"
},
repo: {
required: true,
type: "string"
},
signature: {
type: "string"
},
tree: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/commits"
},
createRef: {
method: "POST",
params: {
owner: {
required: true,
type: "string"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
sha: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/refs"
},
createTag: {
method: "POST",
params: {
message: {
required: true,
type: "string"
},
object: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
tag: {
required: true,
type: "string"
},
tagger: {
type: "object"
},
"tagger.date": {
type: "string"
},
"tagger.email": {
type: "string"
},
"tagger.name": {
type: "string"
},
type: {
enum: ["commit", "tree", "blob"],
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/tags"
},
createTree: {
method: "POST",
params: {
base_tree: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
tree: {
required: true,
type: "object[]"
},
"tree[].content": {
type: "string"
},
"tree[].mode": {
enum: ["100644", "100755", "040000", "160000", "120000"],
type: "string"
},
"tree[].path": {
type: "string"
},
"tree[].sha": {
allowNull: true,
type: "string"
},
"tree[].type": {
enum: ["blob", "tree", "commit"],
type: "string"
}
},
url: "/repos/:owner/:repo/git/trees"
},
deleteRef: {
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/refs/:ref"
},
getBlob: {
method: "GET",
params: {
file_sha: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/blobs/:file_sha"
},
getCommit: {
method: "GET",
params: {
commit_sha: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/commits/:commit_sha"
},
getRef: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/ref/:ref"
},
getTag: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
tag_sha: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/tags/:tag_sha"
},
getTree: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
recursive: {
enum: ["1"],
type: "integer"
},
repo: {
required: true,
type: "string"
},
tree_sha: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/trees/:tree_sha"
},
listMatchingRefs: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/matching-refs/:ref"
},
listRefs: {
method: "GET",
params: {
namespace: {
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/refs/:namespace"
},
updateRef: {
method: "PATCH",
params: {
force: {
type: "boolean"
},
owner: {
required: true,
type: "string"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
sha: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/git/refs/:ref"
}
},
gitignore: {
getTemplate: {
method: "GET",
params: {
name: {
required: true,
type: "string"
}
},
url: "/gitignore/templates/:name"
},
listTemplates: {
method: "GET",
params: {},
url: "/gitignore/templates"
}
},
interactions: {
addOrUpdateRestrictionsForOrg: {
headers: {
accept: "application/vnd.github.sombra-preview+json"
},
method: "PUT",
params: {
limit: {
enum: ["existing_users", "contributors_only", "collaborators_only"],
required: true,
type: "string"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/interaction-limits"
},
addOrUpdateRestrictionsForRepo: {
headers: {
accept: "application/vnd.github.sombra-preview+json"
},
method: "PUT",
params: {
limit: {
enum: ["existing_users", "contributors_only", "collaborators_only"],
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/interaction-limits"
},
getRestrictionsForOrg: {
headers: {
accept: "application/vnd.github.sombra-preview+json"
},
method: "GET",
params: {
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/interaction-limits"
},
getRestrictionsForRepo: {
headers: {
accept: "application/vnd.github.sombra-preview+json"
},
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/interaction-limits"
},
removeRestrictionsForOrg: {
headers: {
accept: "application/vnd.github.sombra-preview+json"
},
method: "DELETE",
params: {
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/interaction-limits"
},
removeRestrictionsForRepo: {
headers: {
accept: "application/vnd.github.sombra-preview+json"
},
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/interaction-limits"
}
},
issues: {
addAssignees: {
method: "POST",
params: {
assignees: {
type: "string[]"
},
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/assignees"
},
addLabels: {
method: "POST",
params: {
issue_number: {
required: true,
type: "integer"
},
labels: {
required: true,
type: "string[]"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/labels"
},
checkAssignee: {
method: "GET",
params: {
assignee: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/assignees/:assignee"
},
create: {
method: "POST",
params: {
assignee: {
type: "string"
},
assignees: {
type: "string[]"
},
body: {
type: "string"
},
labels: {
type: "string[]"
},
milestone: {
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
title: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues"
},
createComment: {
method: "POST",
params: {
body: {
required: true,
type: "string"
},
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/comments"
},
createLabel: {
method: "POST",
params: {
color: {
required: true,
type: "string"
},
description: {
type: "string"
},
name: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/labels"
},
createMilestone: {
method: "POST",
params: {
description: {
type: "string"
},
due_on: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
state: {
enum: ["open", "closed"],
type: "string"
},
title: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/milestones"
},
deleteComment: {
method: "DELETE",
params: {
comment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/comments/:comment_id"
},
deleteLabel: {
method: "DELETE",
params: {
name: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/labels/:name"
},
deleteMilestone: {
method: "DELETE",
params: {
milestone_number: {
required: true,
type: "integer"
},
number: {
alias: "milestone_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/milestones/:milestone_number"
},
get: {
method: "GET",
params: {
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number"
},
getComment: {
method: "GET",
params: {
comment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/comments/:comment_id"
},
getEvent: {
method: "GET",
params: {
event_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/events/:event_id"
},
getLabel: {
method: "GET",
params: {
name: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/labels/:name"
},
getMilestone: {
method: "GET",
params: {
milestone_number: {
required: true,
type: "integer"
},
number: {
alias: "milestone_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/milestones/:milestone_number"
},
list: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
filter: {
enum: ["assigned", "created", "mentioned", "subscribed", "all"],
type: "string"
},
labels: {
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
since: {
type: "string"
},
sort: {
enum: ["created", "updated", "comments"],
type: "string"
},
state: {
enum: ["open", "closed", "all"],
type: "string"
}
},
url: "/issues"
},
listAssignees: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/assignees"
},
listComments: {
method: "GET",
params: {
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
since: {
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/comments"
},
listCommentsForRepo: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
since: {
type: "string"
},
sort: {
enum: ["created", "updated"],
type: "string"
}
},
url: "/repos/:owner/:repo/issues/comments"
},
listEvents: {
method: "GET",
params: {
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/events"
},
listEventsForRepo: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/events"
},
listEventsForTimeline: {
headers: {
accept: "application/vnd.github.mockingbird-preview+json"
},
method: "GET",
params: {
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/timeline"
},
listForAuthenticatedUser: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
filter: {
enum: ["assigned", "created", "mentioned", "subscribed", "all"],
type: "string"
},
labels: {
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
since: {
type: "string"
},
sort: {
enum: ["created", "updated", "comments"],
type: "string"
},
state: {
enum: ["open", "closed", "all"],
type: "string"
}
},
url: "/user/issues"
},
listForOrg: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
filter: {
enum: ["assigned", "created", "mentioned", "subscribed", "all"],
type: "string"
},
labels: {
type: "string"
},
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
since: {
type: "string"
},
sort: {
enum: ["created", "updated", "comments"],
type: "string"
},
state: {
enum: ["open", "closed", "all"],
type: "string"
}
},
url: "/orgs/:org/issues"
},
listForRepo: {
method: "GET",
params: {
assignee: {
type: "string"
},
creator: {
type: "string"
},
direction: {
enum: ["asc", "desc"],
type: "string"
},
labels: {
type: "string"
},
mentioned: {
type: "string"
},
milestone: {
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
since: {
type: "string"
},
sort: {
enum: ["created", "updated", "comments"],
type: "string"
},
state: {
enum: ["open", "closed", "all"],
type: "string"
}
},
url: "/repos/:owner/:repo/issues"
},
listLabelsForMilestone: {
method: "GET",
params: {
milestone_number: {
required: true,
type: "integer"
},
number: {
alias: "milestone_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/milestones/:milestone_number/labels"
},
listLabelsForRepo: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/labels"
},
listLabelsOnIssue: {
method: "GET",
params: {
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/labels"
},
listMilestonesForRepo: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
sort: {
enum: ["due_on", "completeness"],
type: "string"
},
state: {
enum: ["open", "closed", "all"],
type: "string"
}
},
url: "/repos/:owner/:repo/milestones"
},
lock: {
method: "PUT",
params: {
issue_number: {
required: true,
type: "integer"
},
lock_reason: {
enum: ["off-topic", "too heated", "resolved", "spam"],
type: "string"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/lock"
},
removeAssignees: {
method: "DELETE",
params: {
assignees: {
type: "string[]"
},
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/assignees"
},
removeLabel: {
method: "DELETE",
params: {
issue_number: {
required: true,
type: "integer"
},
name: {
required: true,
type: "string"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/labels/:name"
},
removeLabels: {
method: "DELETE",
params: {
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/labels"
},
replaceLabels: {
method: "PUT",
params: {
issue_number: {
required: true,
type: "integer"
},
labels: {
type: "string[]"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/labels"
},
unlock: {
method: "DELETE",
params: {
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/lock"
},
update: {
method: "PATCH",
params: {
assignee: {
type: "string"
},
assignees: {
type: "string[]"
},
body: {
type: "string"
},
issue_number: {
required: true,
type: "integer"
},
labels: {
type: "string[]"
},
milestone: {
allowNull: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
state: {
enum: ["open", "closed"],
type: "string"
},
title: {
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number"
},
updateComment: {
method: "PATCH",
params: {
body: {
required: true,
type: "string"
},
comment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/comments/:comment_id"
},
updateLabel: {
method: "PATCH",
params: {
color: {
type: "string"
},
current_name: {
required: true,
type: "string"
},
description: {
type: "string"
},
name: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/labels/:current_name"
},
updateMilestone: {
method: "PATCH",
params: {
description: {
type: "string"
},
due_on: {
type: "string"
},
milestone_number: {
required: true,
type: "integer"
},
number: {
alias: "milestone_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
state: {
enum: ["open", "closed"],
type: "string"
},
title: {
type: "string"
}
},
url: "/repos/:owner/:repo/milestones/:milestone_number"
}
},
licenses: {
get: {
method: "GET",
params: {
license: {
required: true,
type: "string"
}
},
url: "/licenses/:license"
},
getForRepo: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/license"
},
list: {
deprecated: "octokit.licenses.list() has been renamed to octokit.licenses.listCommonlyUsed() (2019-03-05)",
method: "GET",
params: {},
url: "/licenses"
},
listCommonlyUsed: {
method: "GET",
params: {},
url: "/licenses"
}
},
markdown: {
render: {
method: "POST",
params: {
context: {
type: "string"
},
mode: {
enum: ["markdown", "gfm"],
type: "string"
},
text: {
required: true,
type: "string"
}
},
url: "/markdown"
},
renderRaw: {
headers: {
"content-type": "text/plain; charset=utf-8"
},
method: "POST",
params: {
data: {
mapTo: "data",
required: true,
type: "string"
}
},
url: "/markdown/raw"
}
},
meta: {
get: {
method: "GET",
params: {},
url: "/meta"
}
},
migrations: {
cancelImport: {
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/import"
},
deleteArchiveForAuthenticatedUser: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "DELETE",
params: {
migration_id: {
required: true,
type: "integer"
}
},
url: "/user/migrations/:migration_id/archive"
},
deleteArchiveForOrg: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "DELETE",
params: {
migration_id: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/migrations/:migration_id/archive"
},
downloadArchiveForOrg: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "GET",
params: {
migration_id: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/migrations/:migration_id/archive"
},
getArchiveForAuthenticatedUser: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "GET",
params: {
migration_id: {
required: true,
type: "integer"
}
},
url: "/user/migrations/:migration_id/archive"
},
getArchiveForOrg: {
deprecated: "octokit.migrations.getArchiveForOrg() has been renamed to octokit.migrations.downloadArchiveForOrg() (2020-01-27)",
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "GET",
params: {
migration_id: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/migrations/:migration_id/archive"
},
getCommitAuthors: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
since: {
type: "string"
}
},
url: "/repos/:owner/:repo/import/authors"
},
getImportProgress: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/import"
},
getLargeFiles: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/import/large_files"
},
getStatusForAuthenticatedUser: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "GET",
params: {
migration_id: {
required: true,
type: "integer"
}
},
url: "/user/migrations/:migration_id"
},
getStatusForOrg: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "GET",
params: {
migration_id: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/migrations/:migration_id"
},
listForAuthenticatedUser: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/migrations"
},
listForOrg: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/orgs/:org/migrations"
},
listReposForOrg: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "GET",
params: {
migration_id: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/orgs/:org/migrations/:migration_id/repositories"
},
listReposForUser: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "GET",
params: {
migration_id: {
required: true,
type: "integer"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/:migration_id/repositories"
},
mapCommitAuthor: {
method: "PATCH",
params: {
author_id: {
required: true,
type: "integer"
},
email: {
type: "string"
},
name: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/import/authors/:author_id"
},
setLfsPreference: {
method: "PATCH",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
use_lfs: {
enum: ["opt_in", "opt_out"],
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/import/lfs"
},
startForAuthenticatedUser: {
method: "POST",
params: {
exclude_attachments: {
type: "boolean"
},
lock_repositories: {
type: "boolean"
},
repositories: {
required: true,
type: "string[]"
}
},
url: "/user/migrations"
},
startForOrg: {
method: "POST",
params: {
exclude_attachments: {
type: "boolean"
},
lock_repositories: {
type: "boolean"
},
org: {
required: true,
type: "string"
},
repositories: {
required: true,
type: "string[]"
}
},
url: "/orgs/:org/migrations"
},
startImport: {
method: "PUT",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
tfvc_project: {
type: "string"
},
vcs: {
enum: ["subversion", "git", "mercurial", "tfvc"],
type: "string"
},
vcs_password: {
type: "string"
},
vcs_url: {
required: true,
type: "string"
},
vcs_username: {
type: "string"
}
},
url: "/repos/:owner/:repo/import"
},
unlockRepoForAuthenticatedUser: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "DELETE",
params: {
migration_id: {
required: true,
type: "integer"
},
repo_name: {
required: true,
type: "string"
}
},
url: "/user/migrations/:migration_id/repos/:repo_name/lock"
},
unlockRepoForOrg: {
headers: {
accept: "application/vnd.github.wyandotte-preview+json"
},
method: "DELETE",
params: {
migration_id: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
repo_name: {
required: true,
type: "string"
}
},
url: "/orgs/:org/migrations/:migration_id/repos/:repo_name/lock"
},
updateImport: {
method: "PATCH",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
vcs_password: {
type: "string"
},
vcs_username: {
type: "string"
}
},
url: "/repos/:owner/:repo/import"
}
},
oauthAuthorizations: {
checkAuthorization: {
deprecated: "octokit.oauthAuthorizations.checkAuthorization() has been renamed to octokit.apps.checkAuthorization() (2019-11-05)",
method: "GET",
params: {
access_token: {
required: true,
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/tokens/:access_token"
},
createAuthorization: {
deprecated: "octokit.oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization",
method: "POST",
params: {
client_id: {
type: "string"
},
client_secret: {
type: "string"
},
fingerprint: {
type: "string"
},
note: {
required: true,
type: "string"
},
note_url: {
type: "string"
},
scopes: {
type: "string[]"
}
},
url: "/authorizations"
},
deleteAuthorization: {
deprecated: "octokit.oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization",
method: "DELETE",
params: {
authorization_id: {
required: true,
type: "integer"
}
},
url: "/authorizations/:authorization_id"
},
deleteGrant: {
deprecated: "octokit.oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant",
method: "DELETE",
params: {
grant_id: {
required: true,
type: "integer"
}
},
url: "/applications/grants/:grant_id"
},
getAuthorization: {
deprecated: "octokit.oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization",
method: "GET",
params: {
authorization_id: {
required: true,
type: "integer"
}
},
url: "/authorizations/:authorization_id"
},
getGrant: {
deprecated: "octokit.oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant",
method: "GET",
params: {
grant_id: {
required: true,
type: "integer"
}
},
url: "/applications/grants/:grant_id"
},
getOrCreateAuthorizationForApp: {
deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app",
method: "PUT",
params: {
client_id: {
required: true,
type: "string"
},
client_secret: {
required: true,
type: "string"
},
fingerprint: {
type: "string"
},
note: {
type: "string"
},
note_url: {
type: "string"
},
scopes: {
type: "string[]"
}
},
url: "/authorizations/clients/:client_id"
},
getOrCreateAuthorizationForAppAndFingerprint: {
deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint",
method: "PUT",
params: {
client_id: {
required: true,
type: "string"
},
client_secret: {
required: true,
type: "string"
},
fingerprint: {
required: true,
type: "string"
},
note: {
type: "string"
},
note_url: {
type: "string"
},
scopes: {
type: "string[]"
}
},
url: "/authorizations/clients/:client_id/:fingerprint"
},
getOrCreateAuthorizationForAppFingerprint: {
deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() has been renamed to octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() (2018-12-27)",
method: "PUT",
params: {
client_id: {
required: true,
type: "string"
},
client_secret: {
required: true,
type: "string"
},
fingerprint: {
required: true,
type: "string"
},
note: {
type: "string"
},
note_url: {
type: "string"
},
scopes: {
type: "string[]"
}
},
url: "/authorizations/clients/:client_id/:fingerprint"
},
listAuthorizations: {
deprecated: "octokit.oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations",
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/authorizations"
},
listGrants: {
deprecated: "octokit.oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants",
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/applications/grants"
},
resetAuthorization: {
deprecated: "octokit.oauthAuthorizations.resetAuthorization() has been renamed to octokit.apps.resetAuthorization() (2019-11-05)",
method: "POST",
params: {
access_token: {
required: true,
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/tokens/:access_token"
},
revokeAuthorizationForApplication: {
deprecated: "octokit.oauthAuthorizations.revokeAuthorizationForApplication() has been renamed to octokit.apps.revokeAuthorizationForApplication() (2019-11-05)",
method: "DELETE",
params: {
access_token: {
required: true,
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/tokens/:access_token"
},
revokeGrantForApplication: {
deprecated: "octokit.oauthAuthorizations.revokeGrantForApplication() has been renamed to octokit.apps.revokeGrantForApplication() (2019-11-05)",
method: "DELETE",
params: {
access_token: {
required: true,
type: "string"
},
client_id: {
required: true,
type: "string"
}
},
url: "/applications/:client_id/grants/:access_token"
},
updateAuthorization: {
deprecated: "octokit.oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization",
method: "PATCH",
params: {
add_scopes: {
type: "string[]"
},
authorization_id: {
required: true,
type: "integer"
},
fingerprint: {
type: "string"
},
note: {
type: "string"
},
note_url: {
type: "string"
},
remove_scopes: {
type: "string[]"
},
scopes: {
type: "string[]"
}
},
url: "/authorizations/:authorization_id"
}
},
orgs: {
addOrUpdateMembership: {
method: "PUT",
params: {
org: {
required: true,
type: "string"
},
role: {
enum: ["admin", "member"],
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/memberships/:username"
},
blockUser: {
method: "PUT",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/blocks/:username"
},
checkBlockedUser: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/blocks/:username"
},
checkMembership: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/members/:username"
},
checkPublicMembership: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/public_members/:username"
},
concealMembership: {
method: "DELETE",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/public_members/:username"
},
convertMemberToOutsideCollaborator: {
method: "PUT",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/outside_collaborators/:username"
},
createHook: {
method: "POST",
params: {
active: {
type: "boolean"
},
config: {
required: true,
type: "object"
},
"config.content_type": {
type: "string"
},
"config.insecure_ssl": {
type: "string"
},
"config.secret": {
type: "string"
},
"config.url": {
required: true,
type: "string"
},
events: {
type: "string[]"
},
name: {
required: true,
type: "string"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/hooks"
},
createInvitation: {
method: "POST",
params: {
email: {
type: "string"
},
invitee_id: {
type: "integer"
},
org: {
required: true,
type: "string"
},
role: {
enum: ["admin", "direct_member", "billing_manager"],
type: "string"
},
team_ids: {
type: "integer[]"
}
},
url: "/orgs/:org/invitations"
},
deleteHook: {
method: "DELETE",
params: {
hook_id: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/hooks/:hook_id"
},
get: {
method: "GET",
params: {
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org"
},
getHook: {
method: "GET",
params: {
hook_id: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/hooks/:hook_id"
},
getMembership: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/memberships/:username"
},
getMembershipForAuthenticatedUser: {
method: "GET",
params: {
org: {
required: true,
type: "string"
}
},
url: "/user/memberships/orgs/:org"
},
list: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
since: {
type: "integer"
}
},
url: "/organizations"
},
listBlockedUsers: {
method: "GET",
params: {
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/blocks"
},
listForAuthenticatedUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/orgs"
},
listForUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/orgs"
},
listHooks: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/orgs/:org/hooks"
},
listInstallations: {
headers: {
accept: "application/vnd.github.machine-man-preview+json"
},
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/orgs/:org/installations"
},
listInvitationTeams: {
method: "GET",
params: {
invitation_id: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/orgs/:org/invitations/:invitation_id/teams"
},
listMembers: {
method: "GET",
params: {
filter: {
enum: ["2fa_disabled", "all"],
type: "string"
},
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
role: {
enum: ["all", "admin", "member"],
type: "string"
}
},
url: "/orgs/:org/members"
},
listMemberships: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
state: {
enum: ["active", "pending"],
type: "string"
}
},
url: "/user/memberships/orgs"
},
listOutsideCollaborators: {
method: "GET",
params: {
filter: {
enum: ["2fa_disabled", "all"],
type: "string"
},
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/orgs/:org/outside_collaborators"
},
listPendingInvitations: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/orgs/:org/invitations"
},
listPublicMembers: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/orgs/:org/public_members"
},
pingHook: {
method: "POST",
params: {
hook_id: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/hooks/:hook_id/pings"
},
publicizeMembership: {
method: "PUT",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/public_members/:username"
},
removeMember: {
method: "DELETE",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/members/:username"
},
removeMembership: {
method: "DELETE",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/memberships/:username"
},
removeOutsideCollaborator: {
method: "DELETE",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/outside_collaborators/:username"
},
unblockUser: {
method: "DELETE",
params: {
org: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/blocks/:username"
},
update: {
method: "PATCH",
params: {
billing_email: {
type: "string"
},
company: {
type: "string"
},
default_repository_permission: {
enum: ["read", "write", "admin", "none"],
type: "string"
},
description: {
type: "string"
},
email: {
type: "string"
},
has_organization_projects: {
type: "boolean"
},
has_repository_projects: {
type: "boolean"
},
location: {
type: "string"
},
members_allowed_repository_creation_type: {
enum: ["all", "private", "none"],
type: "string"
},
members_can_create_internal_repositories: {
type: "boolean"
},
members_can_create_private_repositories: {
type: "boolean"
},
members_can_create_public_repositories: {
type: "boolean"
},
members_can_create_repositories: {
type: "boolean"
},
name: {
type: "string"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org"
},
updateHook: {
method: "PATCH",
params: {
active: {
type: "boolean"
},
config: {
type: "object"
},
"config.content_type": {
type: "string"
},
"config.insecure_ssl": {
type: "string"
},
"config.secret": {
type: "string"
},
"config.url": {
required: true,
type: "string"
},
events: {
type: "string[]"
},
hook_id: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/hooks/:hook_id"
},
updateMembership: {
method: "PATCH",
params: {
org: {
required: true,
type: "string"
},
state: {
enum: ["active"],
required: true,
type: "string"
}
},
url: "/user/memberships/orgs/:org"
}
},
projects: {
addCollaborator: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "PUT",
params: {
permission: {
enum: ["read", "write", "admin"],
type: "string"
},
project_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/projects/:project_id/collaborators/:username"
},
createCard: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "POST",
params: {
column_id: {
required: true,
type: "integer"
},
content_id: {
type: "integer"
},
content_type: {
type: "string"
},
note: {
type: "string"
}
},
url: "/projects/columns/:column_id/cards"
},
createColumn: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "POST",
params: {
name: {
required: true,
type: "string"
},
project_id: {
required: true,
type: "integer"
}
},
url: "/projects/:project_id/columns"
},
createForAuthenticatedUser: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "POST",
params: {
body: {
type: "string"
},
name: {
required: true,
type: "string"
}
},
url: "/user/projects"
},
createForOrg: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "POST",
params: {
body: {
type: "string"
},
name: {
required: true,
type: "string"
},
org: {
required: true,
type: "string"
}
},
url: "/orgs/:org/projects"
},
createForRepo: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "POST",
params: {
body: {
type: "string"
},
name: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/projects"
},
delete: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "DELETE",
params: {
project_id: {
required: true,
type: "integer"
}
},
url: "/projects/:project_id"
},
deleteCard: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "DELETE",
params: {
card_id: {
required: true,
type: "integer"
}
},
url: "/projects/columns/cards/:card_id"
},
deleteColumn: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "DELETE",
params: {
column_id: {
required: true,
type: "integer"
}
},
url: "/projects/columns/:column_id"
},
get: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
project_id: {
required: true,
type: "integer"
}
},
url: "/projects/:project_id"
},
getCard: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
card_id: {
required: true,
type: "integer"
}
},
url: "/projects/columns/cards/:card_id"
},
getColumn: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
column_id: {
required: true,
type: "integer"
}
},
url: "/projects/columns/:column_id"
},
listCards: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
archived_state: {
enum: ["all", "archived", "not_archived"],
type: "string"
},
column_id: {
required: true,
type: "integer"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/projects/columns/:column_id/cards"
},
listCollaborators: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
affiliation: {
enum: ["outside", "direct", "all"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
project_id: {
required: true,
type: "integer"
}
},
url: "/projects/:project_id/collaborators"
},
listColumns: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
project_id: {
required: true,
type: "integer"
}
},
url: "/projects/:project_id/columns"
},
listForOrg: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
state: {
enum: ["open", "closed", "all"],
type: "string"
}
},
url: "/orgs/:org/projects"
},
listForRepo: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
state: {
enum: ["open", "closed", "all"],
type: "string"
}
},
url: "/repos/:owner/:repo/projects"
},
listForUser: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
state: {
enum: ["open", "closed", "all"],
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/projects"
},
moveCard: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "POST",
params: {
card_id: {
required: true,
type: "integer"
},
column_id: {
type: "integer"
},
position: {
required: true,
type: "string",
validation: "^(top|bottom|after:\\d+)$"
}
},
url: "/projects/columns/cards/:card_id/moves"
},
moveColumn: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "POST",
params: {
column_id: {
required: true,
type: "integer"
},
position: {
required: true,
type: "string",
validation: "^(first|last|after:\\d+)$"
}
},
url: "/projects/columns/:column_id/moves"
},
removeCollaborator: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "DELETE",
params: {
project_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/projects/:project_id/collaborators/:username"
},
reviewUserPermissionLevel: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
project_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/projects/:project_id/collaborators/:username/permission"
},
update: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "PATCH",
params: {
body: {
type: "string"
},
name: {
type: "string"
},
organization_permission: {
type: "string"
},
private: {
type: "boolean"
},
project_id: {
required: true,
type: "integer"
},
state: {
enum: ["open", "closed"],
type: "string"
}
},
url: "/projects/:project_id"
},
updateCard: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "PATCH",
params: {
archived: {
type: "boolean"
},
card_id: {
required: true,
type: "integer"
},
note: {
type: "string"
}
},
url: "/projects/columns/cards/:card_id"
},
updateColumn: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "PATCH",
params: {
column_id: {
required: true,
type: "integer"
},
name: {
required: true,
type: "string"
}
},
url: "/projects/columns/:column_id"
}
},
pulls: {
checkIfMerged: {
method: "GET",
params: {
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/merge"
},
create: {
method: "POST",
params: {
base: {
required: true,
type: "string"
},
body: {
type: "string"
},
draft: {
type: "boolean"
},
head: {
required: true,
type: "string"
},
maintainer_can_modify: {
type: "boolean"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
title: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls"
},
createComment: {
method: "POST",
params: {
body: {
required: true,
type: "string"
},
commit_id: {
required: true,
type: "string"
},
in_reply_to: {
deprecated: true,
description: "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.",
type: "integer"
},
line: {
type: "integer"
},
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
path: {
required: true,
type: "string"
},
position: {
type: "integer"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
side: {
enum: ["LEFT", "RIGHT"],
type: "string"
},
start_line: {
type: "integer"
},
start_side: {
enum: ["LEFT", "RIGHT", "side"],
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/comments"
},
createCommentReply: {
deprecated: "octokit.pulls.createCommentReply() has been renamed to octokit.pulls.createComment() (2019-09-09)",
method: "POST",
params: {
body: {
required: true,
type: "string"
},
commit_id: {
required: true,
type: "string"
},
in_reply_to: {
deprecated: true,
description: "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.",
type: "integer"
},
line: {
type: "integer"
},
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
path: {
required: true,
type: "string"
},
position: {
type: "integer"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
side: {
enum: ["LEFT", "RIGHT"],
type: "string"
},
start_line: {
type: "integer"
},
start_side: {
enum: ["LEFT", "RIGHT", "side"],
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/comments"
},
createFromIssue: {
deprecated: "octokit.pulls.createFromIssue() is deprecated, see https://developer.github.com/v3/pulls/#create-a-pull-request",
method: "POST",
params: {
base: {
required: true,
type: "string"
},
draft: {
type: "boolean"
},
head: {
required: true,
type: "string"
},
issue: {
required: true,
type: "integer"
},
maintainer_can_modify: {
type: "boolean"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls"
},
createReview: {
method: "POST",
params: {
body: {
type: "string"
},
comments: {
type: "object[]"
},
"comments[].body": {
required: true,
type: "string"
},
"comments[].path": {
required: true,
type: "string"
},
"comments[].position": {
required: true,
type: "integer"
},
commit_id: {
type: "string"
},
event: {
enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"],
type: "string"
},
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/reviews"
},
createReviewCommentReply: {
method: "POST",
params: {
body: {
required: true,
type: "string"
},
comment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/comments/:comment_id/replies"
},
createReviewRequest: {
method: "POST",
params: {
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
reviewers: {
type: "string[]"
},
team_reviewers: {
type: "string[]"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers"
},
deleteComment: {
method: "DELETE",
params: {
comment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/comments/:comment_id"
},
deletePendingReview: {
method: "DELETE",
params: {
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
review_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id"
},
deleteReviewRequest: {
method: "DELETE",
params: {
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
reviewers: {
type: "string[]"
},
team_reviewers: {
type: "string[]"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers"
},
dismissReview: {
method: "PUT",
params: {
message: {
required: true,
type: "string"
},
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
review_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals"
},
get: {
method: "GET",
params: {
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number"
},
getComment: {
method: "GET",
params: {
comment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/comments/:comment_id"
},
getCommentsForReview: {
method: "GET",
params: {
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
review_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments"
},
getReview: {
method: "GET",
params: {
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
review_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id"
},
list: {
method: "GET",
params: {
base: {
type: "string"
},
direction: {
enum: ["asc", "desc"],
type: "string"
},
head: {
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
sort: {
enum: ["created", "updated", "popularity", "long-running"],
type: "string"
},
state: {
enum: ["open", "closed", "all"],
type: "string"
}
},
url: "/repos/:owner/:repo/pulls"
},
listComments: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
since: {
type: "string"
},
sort: {
enum: ["created", "updated"],
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/comments"
},
listCommentsForRepo: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
since: {
type: "string"
},
sort: {
enum: ["created", "updated"],
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/comments"
},
listCommits: {
method: "GET",
params: {
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/commits"
},
listFiles: {
method: "GET",
params: {
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/files"
},
listReviewRequests: {
method: "GET",
params: {
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers"
},
listReviews: {
method: "GET",
params: {
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/reviews"
},
merge: {
method: "PUT",
params: {
commit_message: {
type: "string"
},
commit_title: {
type: "string"
},
merge_method: {
enum: ["merge", "squash", "rebase"],
type: "string"
},
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
sha: {
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/merge"
},
submitReview: {
method: "POST",
params: {
body: {
type: "string"
},
event: {
enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"],
required: true,
type: "string"
},
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
review_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events"
},
update: {
method: "PATCH",
params: {
base: {
type: "string"
},
body: {
type: "string"
},
maintainer_can_modify: {
type: "boolean"
},
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
state: {
enum: ["open", "closed"],
type: "string"
},
title: {
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number"
},
updateBranch: {
headers: {
accept: "application/vnd.github.lydian-preview+json"
},
method: "PUT",
params: {
expected_head_sha: {
type: "string"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/update-branch"
},
updateComment: {
method: "PATCH",
params: {
body: {
required: true,
type: "string"
},
comment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/comments/:comment_id"
},
updateReview: {
method: "PUT",
params: {
body: {
required: true,
type: "string"
},
number: {
alias: "pull_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
pull_number: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
review_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id"
}
},
rateLimit: {
get: {
method: "GET",
params: {},
url: "/rate_limit"
}
},
reactions: {
createForCommitComment: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "POST",
params: {
comment_id: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/comments/:comment_id/reactions"
},
createForIssue: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "POST",
params: {
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
required: true,
type: "string"
},
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/reactions"
},
createForIssueComment: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "POST",
params: {
comment_id: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/comments/:comment_id/reactions"
},
createForPullRequestReviewComment: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "POST",
params: {
comment_id: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/comments/:comment_id/reactions"
},
createForTeamDiscussion: {
deprecated: "octokit.reactions.createForTeamDiscussion() has been renamed to octokit.reactions.createForTeamDiscussionLegacy() (2020-01-16)",
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "POST",
params: {
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
required: true,
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/reactions"
},
createForTeamDiscussionComment: {
deprecated: "octokit.reactions.createForTeamDiscussionComment() has been renamed to octokit.reactions.createForTeamDiscussionCommentLegacy() (2020-01-16)",
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "POST",
params: {
comment_number: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
required: true,
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions"
},
createForTeamDiscussionCommentInOrg: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "POST",
params: {
comment_number: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
required: true,
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions"
},
createForTeamDiscussionCommentLegacy: {
deprecated: "octokit.reactions.createForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy",
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "POST",
params: {
comment_number: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
required: true,
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions"
},
createForTeamDiscussionInOrg: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "POST",
params: {
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
required: true,
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions"
},
createForTeamDiscussionLegacy: {
deprecated: "octokit.reactions.createForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy",
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "POST",
params: {
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
required: true,
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/reactions"
},
delete: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "DELETE",
params: {
reaction_id: {
required: true,
type: "integer"
}
},
url: "/reactions/:reaction_id"
},
listForCommitComment: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "GET",
params: {
comment_id: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/comments/:comment_id/reactions"
},
listForIssue: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "GET",
params: {
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
type: "string"
},
issue_number: {
required: true,
type: "integer"
},
number: {
alias: "issue_number",
deprecated: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/:issue_number/reactions"
},
listForIssueComment: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "GET",
params: {
comment_id: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/issues/comments/:comment_id/reactions"
},
listForPullRequestReviewComment: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "GET",
params: {
comment_id: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pulls/comments/:comment_id/reactions"
},
listForTeamDiscussion: {
deprecated: "octokit.reactions.listForTeamDiscussion() has been renamed to octokit.reactions.listForTeamDiscussionLegacy() (2020-01-16)",
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "GET",
params: {
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/reactions"
},
listForTeamDiscussionComment: {
deprecated: "octokit.reactions.listForTeamDiscussionComment() has been renamed to octokit.reactions.listForTeamDiscussionCommentLegacy() (2020-01-16)",
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "GET",
params: {
comment_number: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions"
},
listForTeamDiscussionCommentInOrg: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "GET",
params: {
comment_number: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions"
},
listForTeamDiscussionCommentLegacy: {
deprecated: "octokit.reactions.listForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy",
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "GET",
params: {
comment_number: {
required: true,
type: "integer"
},
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions"
},
listForTeamDiscussionInOrg: {
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "GET",
params: {
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions"
},
listForTeamDiscussionLegacy: {
deprecated: "octokit.reactions.listForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy",
headers: {
accept: "application/vnd.github.squirrel-girl-preview+json"
},
method: "GET",
params: {
content: {
enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/reactions"
}
},
repos: {
acceptInvitation: {
method: "PATCH",
params: {
invitation_id: {
required: true,
type: "integer"
}
},
url: "/user/repository_invitations/:invitation_id"
},
addCollaborator: {
method: "PUT",
params: {
owner: {
required: true,
type: "string"
},
permission: {
enum: ["pull", "push", "admin"],
type: "string"
},
repo: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/collaborators/:username"
},
addDeployKey: {
method: "POST",
params: {
key: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
read_only: {
type: "boolean"
},
repo: {
required: true,
type: "string"
},
title: {
type: "string"
}
},
url: "/repos/:owner/:repo/keys"
},
addProtectedBranchAdminEnforcement: {
method: "POST",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins"
},
addProtectedBranchAppRestrictions: {
method: "POST",
params: {
apps: {
mapTo: "data",
required: true,
type: "string[]"
},
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"
},
addProtectedBranchRequiredSignatures: {
headers: {
accept: "application/vnd.github.zzzax-preview+json"
},
method: "POST",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures"
},
addProtectedBranchRequiredStatusChecksContexts: {
method: "POST",
params: {
branch: {
required: true,
type: "string"
},
contexts: {
mapTo: "data",
required: true,
type: "string[]"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"
},
addProtectedBranchTeamRestrictions: {
method: "POST",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
teams: {
mapTo: "data",
required: true,
type: "string[]"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
},
addProtectedBranchUserRestrictions: {
method: "POST",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
users: {
mapTo: "data",
required: true,
type: "string[]"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
},
checkCollaborator: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/collaborators/:username"
},
checkVulnerabilityAlerts: {
headers: {
accept: "application/vnd.github.dorian-preview+json"
},
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/vulnerability-alerts"
},
compareCommits: {
method: "GET",
params: {
base: {
required: true,
type: "string"
},
head: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/compare/:base...:head"
},
createCommitComment: {
method: "POST",
params: {
body: {
required: true,
type: "string"
},
commit_sha: {
required: true,
type: "string"
},
line: {
type: "integer"
},
owner: {
required: true,
type: "string"
},
path: {
type: "string"
},
position: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
sha: {
alias: "commit_sha",
deprecated: true,
type: "string"
}
},
url: "/repos/:owner/:repo/commits/:commit_sha/comments"
},
createDeployment: {
method: "POST",
params: {
auto_merge: {
type: "boolean"
},
description: {
type: "string"
},
environment: {
type: "string"
},
owner: {
required: true,
type: "string"
},
payload: {
type: "string"
},
production_environment: {
type: "boolean"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
required_contexts: {
type: "string[]"
},
task: {
type: "string"
},
transient_environment: {
type: "boolean"
}
},
url: "/repos/:owner/:repo/deployments"
},
createDeploymentStatus: {
method: "POST",
params: {
auto_inactive: {
type: "boolean"
},
deployment_id: {
required: true,
type: "integer"
},
description: {
type: "string"
},
environment: {
enum: ["production", "staging", "qa"],
type: "string"
},
environment_url: {
type: "string"
},
log_url: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
state: {
enum: ["error", "failure", "inactive", "in_progress", "queued", "pending", "success"],
required: true,
type: "string"
},
target_url: {
type: "string"
}
},
url: "/repos/:owner/:repo/deployments/:deployment_id/statuses"
},
createDispatchEvent: {
method: "POST",
params: {
client_payload: {
type: "object"
},
event_type: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/dispatches"
},
createFile: {
deprecated: "octokit.repos.createFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)",
method: "PUT",
params: {
author: {
type: "object"
},
"author.email": {
required: true,
type: "string"
},
"author.name": {
required: true,
type: "string"
},
branch: {
type: "string"
},
committer: {
type: "object"
},
"committer.email": {
required: true,
type: "string"
},
"committer.name": {
required: true,
type: "string"
},
content: {
required: true,
type: "string"
},
message: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
path: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
sha: {
type: "string"
}
},
url: "/repos/:owner/:repo/contents/:path"
},
createForAuthenticatedUser: {
method: "POST",
params: {
allow_merge_commit: {
type: "boolean"
},
allow_rebase_merge: {
type: "boolean"
},
allow_squash_merge: {
type: "boolean"
},
auto_init: {
type: "boolean"
},
delete_branch_on_merge: {
type: "boolean"
},
description: {
type: "string"
},
gitignore_template: {
type: "string"
},
has_issues: {
type: "boolean"
},
has_projects: {
type: "boolean"
},
has_wiki: {
type: "boolean"
},
homepage: {
type: "string"
},
is_template: {
type: "boolean"
},
license_template: {
type: "string"
},
name: {
required: true,
type: "string"
},
private: {
type: "boolean"
},
team_id: {
type: "integer"
},
visibility: {
enum: ["public", "private", "visibility", "internal"],
type: "string"
}
},
url: "/user/repos"
},
createFork: {
method: "POST",
params: {
organization: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/forks"
},
createHook: {
method: "POST",
params: {
active: {
type: "boolean"
},
config: {
required: true,
type: "object"
},
"config.content_type": {
type: "string"
},
"config.insecure_ssl": {
type: "string"
},
"config.secret": {
type: "string"
},
"config.url": {
required: true,
type: "string"
},
events: {
type: "string[]"
},
name: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/hooks"
},
createInOrg: {
method: "POST",
params: {
allow_merge_commit: {
type: "boolean"
},
allow_rebase_merge: {
type: "boolean"
},
allow_squash_merge: {
type: "boolean"
},
auto_init: {
type: "boolean"
},
delete_branch_on_merge: {
type: "boolean"
},
description: {
type: "string"
},
gitignore_template: {
type: "string"
},
has_issues: {
type: "boolean"
},
has_projects: {
type: "boolean"
},
has_wiki: {
type: "boolean"
},
homepage: {
type: "string"
},
is_template: {
type: "boolean"
},
license_template: {
type: "string"
},
name: {
required: true,
type: "string"
},
org: {
required: true,
type: "string"
},
private: {
type: "boolean"
},
team_id: {
type: "integer"
},
visibility: {
enum: ["public", "private", "visibility", "internal"],
type: "string"
}
},
url: "/orgs/:org/repos"
},
createOrUpdateFile: {
method: "PUT",
params: {
author: {
type: "object"
},
"author.email": {
required: true,
type: "string"
},
"author.name": {
required: true,
type: "string"
},
branch: {
type: "string"
},
committer: {
type: "object"
},
"committer.email": {
required: true,
type: "string"
},
"committer.name": {
required: true,
type: "string"
},
content: {
required: true,
type: "string"
},
message: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
path: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
sha: {
type: "string"
}
},
url: "/repos/:owner/:repo/contents/:path"
},
createRelease: {
method: "POST",
params: {
body: {
type: "string"
},
draft: {
type: "boolean"
},
name: {
type: "string"
},
owner: {
required: true,
type: "string"
},
prerelease: {
type: "boolean"
},
repo: {
required: true,
type: "string"
},
tag_name: {
required: true,
type: "string"
},
target_commitish: {
type: "string"
}
},
url: "/repos/:owner/:repo/releases"
},
createStatus: {
method: "POST",
params: {
context: {
type: "string"
},
description: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
sha: {
required: true,
type: "string"
},
state: {
enum: ["error", "failure", "pending", "success"],
required: true,
type: "string"
},
target_url: {
type: "string"
}
},
url: "/repos/:owner/:repo/statuses/:sha"
},
createUsingTemplate: {
headers: {
accept: "application/vnd.github.baptiste-preview+json"
},
method: "POST",
params: {
description: {
type: "string"
},
name: {
required: true,
type: "string"
},
owner: {
type: "string"
},
private: {
type: "boolean"
},
template_owner: {
required: true,
type: "string"
},
template_repo: {
required: true,
type: "string"
}
},
url: "/repos/:template_owner/:template_repo/generate"
},
declineInvitation: {
method: "DELETE",
params: {
invitation_id: {
required: true,
type: "integer"
}
},
url: "/user/repository_invitations/:invitation_id"
},
delete: {
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo"
},
deleteCommitComment: {
method: "DELETE",
params: {
comment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/comments/:comment_id"
},
deleteDownload: {
method: "DELETE",
params: {
download_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/downloads/:download_id"
},
deleteFile: {
method: "DELETE",
params: {
author: {
type: "object"
},
"author.email": {
type: "string"
},
"author.name": {
type: "string"
},
branch: {
type: "string"
},
committer: {
type: "object"
},
"committer.email": {
type: "string"
},
"committer.name": {
type: "string"
},
message: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
path: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
sha: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/contents/:path"
},
deleteHook: {
method: "DELETE",
params: {
hook_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/hooks/:hook_id"
},
deleteInvitation: {
method: "DELETE",
params: {
invitation_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/invitations/:invitation_id"
},
deleteRelease: {
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
release_id: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/releases/:release_id"
},
deleteReleaseAsset: {
method: "DELETE",
params: {
asset_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/releases/assets/:asset_id"
},
disableAutomatedSecurityFixes: {
headers: {
accept: "application/vnd.github.london-preview+json"
},
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/automated-security-fixes"
},
disablePagesSite: {
headers: {
accept: "application/vnd.github.switcheroo-preview+json"
},
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pages"
},
disableVulnerabilityAlerts: {
headers: {
accept: "application/vnd.github.dorian-preview+json"
},
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/vulnerability-alerts"
},
enableAutomatedSecurityFixes: {
headers: {
accept: "application/vnd.github.london-preview+json"
},
method: "PUT",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/automated-security-fixes"
},
enablePagesSite: {
headers: {
accept: "application/vnd.github.switcheroo-preview+json"
},
method: "POST",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
source: {
type: "object"
},
"source.branch": {
enum: ["master", "gh-pages"],
type: "string"
},
"source.path": {
type: "string"
}
},
url: "/repos/:owner/:repo/pages"
},
enableVulnerabilityAlerts: {
headers: {
accept: "application/vnd.github.dorian-preview+json"
},
method: "PUT",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/vulnerability-alerts"
},
get: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo"
},
getAppsWithAccessToProtectedBranch: {
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"
},
getArchiveLink: {
method: "GET",
params: {
archive_format: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/:archive_format/:ref"
},
getBranch: {
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch"
},
getBranchProtection: {
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection"
},
getClones: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
per: {
enum: ["day", "week"],
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/traffic/clones"
},
getCodeFrequencyStats: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/stats/code_frequency"
},
getCollaboratorPermissionLevel: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/collaborators/:username/permission"
},
getCombinedStatusForRef: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/commits/:ref/status"
},
getCommit: {
method: "GET",
params: {
commit_sha: {
alias: "ref",
deprecated: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
sha: {
alias: "ref",
deprecated: true,
type: "string"
}
},
url: "/repos/:owner/:repo/commits/:ref"
},
getCommitActivityStats: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/stats/commit_activity"
},
getCommitComment: {
method: "GET",
params: {
comment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/comments/:comment_id"
},
getCommitRefSha: {
deprecated: "octokit.repos.getCommitRefSha() is deprecated, see https://developer.github.com/v3/repos/commits/#get-a-single-commit",
headers: {
accept: "application/vnd.github.v3.sha"
},
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/commits/:ref"
},
getContents: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
path: {
required: true,
type: "string"
},
ref: {
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/contents/:path"
},
getContributorsStats: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/stats/contributors"
},
getDeployKey: {
method: "GET",
params: {
key_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/keys/:key_id"
},
getDeployment: {
method: "GET",
params: {
deployment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/deployments/:deployment_id"
},
getDeploymentStatus: {
method: "GET",
params: {
deployment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
status_id: {
required: true,
type: "integer"
}
},
url: "/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id"
},
getDownload: {
method: "GET",
params: {
download_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/downloads/:download_id"
},
getHook: {
method: "GET",
params: {
hook_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/hooks/:hook_id"
},
getLatestPagesBuild: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pages/builds/latest"
},
getLatestRelease: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/releases/latest"
},
getPages: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pages"
},
getPagesBuild: {
method: "GET",
params: {
build_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pages/builds/:build_id"
},
getParticipationStats: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/stats/participation"
},
getProtectedBranchAdminEnforcement: {
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins"
},
getProtectedBranchPullRequestReviewEnforcement: {
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews"
},
getProtectedBranchRequiredSignatures: {
headers: {
accept: "application/vnd.github.zzzax-preview+json"
},
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures"
},
getProtectedBranchRequiredStatusChecks: {
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks"
},
getProtectedBranchRestrictions: {
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions"
},
getPunchCardStats: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/stats/punch_card"
},
getReadme: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
ref: {
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/readme"
},
getRelease: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
release_id: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/releases/:release_id"
},
getReleaseAsset: {
method: "GET",
params: {
asset_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/releases/assets/:asset_id"
},
getReleaseByTag: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
tag: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/releases/tags/:tag"
},
getTeamsWithAccessToProtectedBranch: {
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
},
getTopPaths: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/traffic/popular/paths"
},
getTopReferrers: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/traffic/popular/referrers"
},
getUsersWithAccessToProtectedBranch: {
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
},
getViews: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
per: {
enum: ["day", "week"],
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/traffic/views"
},
list: {
method: "GET",
params: {
affiliation: {
type: "string"
},
direction: {
enum: ["asc", "desc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
sort: {
enum: ["created", "updated", "pushed", "full_name"],
type: "string"
},
type: {
enum: ["all", "owner", "public", "private", "member"],
type: "string"
},
visibility: {
enum: ["all", "public", "private"],
type: "string"
}
},
url: "/user/repos"
},
listAppsWithAccessToProtectedBranch: {
deprecated: "octokit.repos.listAppsWithAccessToProtectedBranch() has been renamed to octokit.repos.getAppsWithAccessToProtectedBranch() (2019-09-13)",
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"
},
listAssetsForRelease: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
release_id: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/releases/:release_id/assets"
},
listBranches: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
protected: {
type: "boolean"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches"
},
listBranchesForHeadCommit: {
headers: {
accept: "application/vnd.github.groot-preview+json"
},
method: "GET",
params: {
commit_sha: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/commits/:commit_sha/branches-where-head"
},
listCollaborators: {
method: "GET",
params: {
affiliation: {
enum: ["outside", "direct", "all"],
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/collaborators"
},
listCommentsForCommit: {
method: "GET",
params: {
commit_sha: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
ref: {
alias: "commit_sha",
deprecated: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/commits/:commit_sha/comments"
},
listCommitComments: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/comments"
},
listCommits: {
method: "GET",
params: {
author: {
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
path: {
type: "string"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
sha: {
type: "string"
},
since: {
type: "string"
},
until: {
type: "string"
}
},
url: "/repos/:owner/:repo/commits"
},
listContributors: {
method: "GET",
params: {
anon: {
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/contributors"
},
listDeployKeys: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/keys"
},
listDeploymentStatuses: {
method: "GET",
params: {
deployment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/deployments/:deployment_id/statuses"
},
listDeployments: {
method: "GET",
params: {
environment: {
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
ref: {
type: "string"
},
repo: {
required: true,
type: "string"
},
sha: {
type: "string"
},
task: {
type: "string"
}
},
url: "/repos/:owner/:repo/deployments"
},
listDownloads: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/downloads"
},
listForOrg: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
sort: {
enum: ["created", "updated", "pushed", "full_name"],
type: "string"
},
type: {
enum: ["all", "public", "private", "forks", "sources", "member", "internal"],
type: "string"
}
},
url: "/orgs/:org/repos"
},
listForUser: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
sort: {
enum: ["created", "updated", "pushed", "full_name"],
type: "string"
},
type: {
enum: ["all", "owner", "member"],
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/repos"
},
listForks: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
},
sort: {
enum: ["newest", "oldest", "stargazers"],
type: "string"
}
},
url: "/repos/:owner/:repo/forks"
},
listHooks: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/hooks"
},
listInvitations: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/invitations"
},
listInvitationsForAuthenticatedUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/repository_invitations"
},
listLanguages: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/languages"
},
listPagesBuilds: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pages/builds"
},
listProtectedBranchRequiredStatusChecksContexts: {
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"
},
listProtectedBranchTeamRestrictions: {
deprecated: "octokit.repos.listProtectedBranchTeamRestrictions() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-09)",
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
},
listProtectedBranchUserRestrictions: {
deprecated: "octokit.repos.listProtectedBranchUserRestrictions() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-09)",
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
},
listPublic: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
since: {
type: "integer"
}
},
url: "/repositories"
},
listPullRequestsAssociatedWithCommit: {
headers: {
accept: "application/vnd.github.groot-preview+json"
},
method: "GET",
params: {
commit_sha: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/commits/:commit_sha/pulls"
},
listReleases: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/releases"
},
listStatusesForRef: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
ref: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/commits/:ref/statuses"
},
listTags: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/tags"
},
listTeams: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/teams"
},
listTeamsWithAccessToProtectedBranch: {
deprecated: "octokit.repos.listTeamsWithAccessToProtectedBranch() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-13)",
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
},
listTopics: {
headers: {
accept: "application/vnd.github.mercy-preview+json"
},
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/topics"
},
listUsersWithAccessToProtectedBranch: {
deprecated: "octokit.repos.listUsersWithAccessToProtectedBranch() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-13)",
method: "GET",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
},
merge: {
method: "POST",
params: {
base: {
required: true,
type: "string"
},
commit_message: {
type: "string"
},
head: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/merges"
},
pingHook: {
method: "POST",
params: {
hook_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/hooks/:hook_id/pings"
},
removeBranchProtection: {
method: "DELETE",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection"
},
removeCollaborator: {
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/collaborators/:username"
},
removeDeployKey: {
method: "DELETE",
params: {
key_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/keys/:key_id"
},
removeProtectedBranchAdminEnforcement: {
method: "DELETE",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins"
},
removeProtectedBranchAppRestrictions: {
method: "DELETE",
params: {
apps: {
mapTo: "data",
required: true,
type: "string[]"
},
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"
},
removeProtectedBranchPullRequestReviewEnforcement: {
method: "DELETE",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews"
},
removeProtectedBranchRequiredSignatures: {
headers: {
accept: "application/vnd.github.zzzax-preview+json"
},
method: "DELETE",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures"
},
removeProtectedBranchRequiredStatusChecks: {
method: "DELETE",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks"
},
removeProtectedBranchRequiredStatusChecksContexts: {
method: "DELETE",
params: {
branch: {
required: true,
type: "string"
},
contexts: {
mapTo: "data",
required: true,
type: "string[]"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"
},
removeProtectedBranchRestrictions: {
method: "DELETE",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions"
},
removeProtectedBranchTeamRestrictions: {
method: "DELETE",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
teams: {
mapTo: "data",
required: true,
type: "string[]"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
},
removeProtectedBranchUserRestrictions: {
method: "DELETE",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
users: {
mapTo: "data",
required: true,
type: "string[]"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
},
replaceProtectedBranchAppRestrictions: {
method: "PUT",
params: {
apps: {
mapTo: "data",
required: true,
type: "string[]"
},
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"
},
replaceProtectedBranchRequiredStatusChecksContexts: {
method: "PUT",
params: {
branch: {
required: true,
type: "string"
},
contexts: {
mapTo: "data",
required: true,
type: "string[]"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"
},
replaceProtectedBranchTeamRestrictions: {
method: "PUT",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
teams: {
mapTo: "data",
required: true,
type: "string[]"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
},
replaceProtectedBranchUserRestrictions: {
method: "PUT",
params: {
branch: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
users: {
mapTo: "data",
required: true,
type: "string[]"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
},
replaceTopics: {
headers: {
accept: "application/vnd.github.mercy-preview+json"
},
method: "PUT",
params: {
names: {
required: true,
type: "string[]"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/topics"
},
requestPageBuild: {
method: "POST",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/pages/builds"
},
retrieveCommunityProfileMetrics: {
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/community/profile"
},
testPushHook: {
method: "POST",
params: {
hook_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/hooks/:hook_id/tests"
},
transfer: {
method: "POST",
params: {
new_owner: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
team_ids: {
type: "integer[]"
}
},
url: "/repos/:owner/:repo/transfer"
},
update: {
method: "PATCH",
params: {
allow_merge_commit: {
type: "boolean"
},
allow_rebase_merge: {
type: "boolean"
},
allow_squash_merge: {
type: "boolean"
},
archived: {
type: "boolean"
},
default_branch: {
type: "string"
},
delete_branch_on_merge: {
type: "boolean"
},
description: {
type: "string"
},
has_issues: {
type: "boolean"
},
has_projects: {
type: "boolean"
},
has_wiki: {
type: "boolean"
},
homepage: {
type: "string"
},
is_template: {
type: "boolean"
},
name: {
type: "string"
},
owner: {
required: true,
type: "string"
},
private: {
type: "boolean"
},
repo: {
required: true,
type: "string"
},
visibility: {
enum: ["public", "private", "visibility", "internal"],
type: "string"
}
},
url: "/repos/:owner/:repo"
},
updateBranchProtection: {
method: "PUT",
params: {
allow_deletions: {
type: "boolean"
},
allow_force_pushes: {
allowNull: true,
type: "boolean"
},
branch: {
required: true,
type: "string"
},
enforce_admins: {
allowNull: true,
required: true,
type: "boolean"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
required_linear_history: {
type: "boolean"
},
required_pull_request_reviews: {
allowNull: true,
required: true,
type: "object"
},
"required_pull_request_reviews.dismiss_stale_reviews": {
type: "boolean"
},
"required_pull_request_reviews.dismissal_restrictions": {
type: "object"
},
"required_pull_request_reviews.dismissal_restrictions.teams": {
type: "string[]"
},
"required_pull_request_reviews.dismissal_restrictions.users": {
type: "string[]"
},
"required_pull_request_reviews.require_code_owner_reviews": {
type: "boolean"
},
"required_pull_request_reviews.required_approving_review_count": {
type: "integer"
},
required_status_checks: {
allowNull: true,
required: true,
type: "object"
},
"required_status_checks.contexts": {
required: true,
type: "string[]"
},
"required_status_checks.strict": {
required: true,
type: "boolean"
},
restrictions: {
allowNull: true,
required: true,
type: "object"
},
"restrictions.apps": {
type: "string[]"
},
"restrictions.teams": {
required: true,
type: "string[]"
},
"restrictions.users": {
required: true,
type: "string[]"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection"
},
updateCommitComment: {
method: "PATCH",
params: {
body: {
required: true,
type: "string"
},
comment_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/comments/:comment_id"
},
updateFile: {
deprecated: "octokit.repos.updateFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)",
method: "PUT",
params: {
author: {
type: "object"
},
"author.email": {
required: true,
type: "string"
},
"author.name": {
required: true,
type: "string"
},
branch: {
type: "string"
},
committer: {
type: "object"
},
"committer.email": {
required: true,
type: "string"
},
"committer.name": {
required: true,
type: "string"
},
content: {
required: true,
type: "string"
},
message: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
path: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
sha: {
type: "string"
}
},
url: "/repos/:owner/:repo/contents/:path"
},
updateHook: {
method: "PATCH",
params: {
active: {
type: "boolean"
},
add_events: {
type: "string[]"
},
config: {
type: "object"
},
"config.content_type": {
type: "string"
},
"config.insecure_ssl": {
type: "string"
},
"config.secret": {
type: "string"
},
"config.url": {
required: true,
type: "string"
},
events: {
type: "string[]"
},
hook_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
remove_events: {
type: "string[]"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/hooks/:hook_id"
},
updateInformationAboutPagesSite: {
method: "PUT",
params: {
cname: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
source: {
enum: ['"gh-pages"', '"master"', '"master /docs"'],
type: "string"
}
},
url: "/repos/:owner/:repo/pages"
},
updateInvitation: {
method: "PATCH",
params: {
invitation_id: {
required: true,
type: "integer"
},
owner: {
required: true,
type: "string"
},
permissions: {
enum: ["read", "write", "admin"],
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/invitations/:invitation_id"
},
updateProtectedBranchPullRequestReviewEnforcement: {
method: "PATCH",
params: {
branch: {
required: true,
type: "string"
},
dismiss_stale_reviews: {
type: "boolean"
},
dismissal_restrictions: {
type: "object"
},
"dismissal_restrictions.teams": {
type: "string[]"
},
"dismissal_restrictions.users": {
type: "string[]"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
require_code_owner_reviews: {
type: "boolean"
},
required_approving_review_count: {
type: "integer"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews"
},
updateProtectedBranchRequiredStatusChecks: {
method: "PATCH",
params: {
branch: {
required: true,
type: "string"
},
contexts: {
type: "string[]"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
strict: {
type: "boolean"
}
},
url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks"
},
updateRelease: {
method: "PATCH",
params: {
body: {
type: "string"
},
draft: {
type: "boolean"
},
name: {
type: "string"
},
owner: {
required: true,
type: "string"
},
prerelease: {
type: "boolean"
},
release_id: {
required: true,
type: "integer"
},
repo: {
required: true,
type: "string"
},
tag_name: {
type: "string"
},
target_commitish: {
type: "string"
}
},
url: "/repos/:owner/:repo/releases/:release_id"
},
updateReleaseAsset: {
method: "PATCH",
params: {
asset_id: {
required: true,
type: "integer"
},
label: {
type: "string"
},
name: {
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
}
},
url: "/repos/:owner/:repo/releases/assets/:asset_id"
},
uploadReleaseAsset: {
method: "POST",
params: {
data: {
mapTo: "data",
required: true,
type: "string | object"
},
file: {
alias: "data",
deprecated: true,
type: "string | object"
},
headers: {
required: true,
type: "object"
},
"headers.content-length": {
required: true,
type: "integer"
},
"headers.content-type": {
required: true,
type: "string"
},
label: {
type: "string"
},
name: {
required: true,
type: "string"
},
url: {
required: true,
type: "string"
}
},
url: ":url"
}
},
search: {
code: {
method: "GET",
params: {
order: {
enum: ["desc", "asc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
q: {
required: true,
type: "string"
},
sort: {
enum: ["indexed"],
type: "string"
}
},
url: "/search/code"
},
commits: {
headers: {
accept: "application/vnd.github.cloak-preview+json"
},
method: "GET",
params: {
order: {
enum: ["desc", "asc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
q: {
required: true,
type: "string"
},
sort: {
enum: ["author-date", "committer-date"],
type: "string"
}
},
url: "/search/commits"
},
issues: {
deprecated: "octokit.search.issues() has been renamed to octokit.search.issuesAndPullRequests() (2018-12-27)",
method: "GET",
params: {
order: {
enum: ["desc", "asc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
q: {
required: true,
type: "string"
},
sort: {
enum: ["comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated"],
type: "string"
}
},
url: "/search/issues"
},
issuesAndPullRequests: {
method: "GET",
params: {
order: {
enum: ["desc", "asc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
q: {
required: true,
type: "string"
},
sort: {
enum: ["comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated"],
type: "string"
}
},
url: "/search/issues"
},
labels: {
method: "GET",
params: {
order: {
enum: ["desc", "asc"],
type: "string"
},
q: {
required: true,
type: "string"
},
repository_id: {
required: true,
type: "integer"
},
sort: {
enum: ["created", "updated"],
type: "string"
}
},
url: "/search/labels"
},
repos: {
method: "GET",
params: {
order: {
enum: ["desc", "asc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
q: {
required: true,
type: "string"
},
sort: {
enum: ["stars", "forks", "help-wanted-issues", "updated"],
type: "string"
}
},
url: "/search/repositories"
},
topics: {
method: "GET",
params: {
q: {
required: true,
type: "string"
}
},
url: "/search/topics"
},
users: {
method: "GET",
params: {
order: {
enum: ["desc", "asc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
q: {
required: true,
type: "string"
},
sort: {
enum: ["followers", "repositories", "joined"],
type: "string"
}
},
url: "/search/users"
}
},
teams: {
addMember: {
deprecated: "octokit.teams.addMember() has been renamed to octokit.teams.addMemberLegacy() (2020-01-16)",
method: "PUT",
params: {
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/members/:username"
},
addMemberLegacy: {
deprecated: "octokit.teams.addMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member-legacy",
method: "PUT",
params: {
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/members/:username"
},
addOrUpdateMembership: {
deprecated: "octokit.teams.addOrUpdateMembership() has been renamed to octokit.teams.addOrUpdateMembershipLegacy() (2020-01-16)",
method: "PUT",
params: {
role: {
enum: ["member", "maintainer"],
type: "string"
},
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/memberships/:username"
},
addOrUpdateMembershipInOrg: {
method: "PUT",
params: {
org: {
required: true,
type: "string"
},
role: {
enum: ["member", "maintainer"],
type: "string"
},
team_slug: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/memberships/:username"
},
addOrUpdateMembershipLegacy: {
deprecated: "octokit.teams.addOrUpdateMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-or-update-team-membership-legacy",
method: "PUT",
params: {
role: {
enum: ["member", "maintainer"],
type: "string"
},
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/memberships/:username"
},
addOrUpdateProject: {
deprecated: "octokit.teams.addOrUpdateProject() has been renamed to octokit.teams.addOrUpdateProjectLegacy() (2020-01-16)",
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "PUT",
params: {
permission: {
enum: ["read", "write", "admin"],
type: "string"
},
project_id: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/projects/:project_id"
},
addOrUpdateProjectInOrg: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "PUT",
params: {
org: {
required: true,
type: "string"
},
permission: {
enum: ["read", "write", "admin"],
type: "string"
},
project_id: {
required: true,
type: "integer"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/projects/:project_id"
},
addOrUpdateProjectLegacy: {
deprecated: "octokit.teams.addOrUpdateProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-project-legacy",
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "PUT",
params: {
permission: {
enum: ["read", "write", "admin"],
type: "string"
},
project_id: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/projects/:project_id"
},
addOrUpdateRepo: {
deprecated: "octokit.teams.addOrUpdateRepo() has been renamed to octokit.teams.addOrUpdateRepoLegacy() (2020-01-16)",
method: "PUT",
params: {
owner: {
required: true,
type: "string"
},
permission: {
enum: ["pull", "push", "admin"],
type: "string"
},
repo: {
required: true,
type: "string"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/repos/:owner/:repo"
},
addOrUpdateRepoInOrg: {
method: "PUT",
params: {
org: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
permission: {
enum: ["pull", "push", "admin"],
type: "string"
},
repo: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo"
},
addOrUpdateRepoLegacy: {
deprecated: "octokit.teams.addOrUpdateRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-repository-legacy",
method: "PUT",
params: {
owner: {
required: true,
type: "string"
},
permission: {
enum: ["pull", "push", "admin"],
type: "string"
},
repo: {
required: true,
type: "string"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/repos/:owner/:repo"
},
checkManagesRepo: {
deprecated: "octokit.teams.checkManagesRepo() has been renamed to octokit.teams.checkManagesRepoLegacy() (2020-01-16)",
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/repos/:owner/:repo"
},
checkManagesRepoInOrg: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo"
},
checkManagesRepoLegacy: {
deprecated: "octokit.teams.checkManagesRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository-legacy",
method: "GET",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/repos/:owner/:repo"
},
create: {
method: "POST",
params: {
description: {
type: "string"
},
maintainers: {
type: "string[]"
},
name: {
required: true,
type: "string"
},
org: {
required: true,
type: "string"
},
parent_team_id: {
type: "integer"
},
permission: {
enum: ["pull", "push", "admin"],
type: "string"
},
privacy: {
enum: ["secret", "closed"],
type: "string"
},
repo_names: {
type: "string[]"
}
},
url: "/orgs/:org/teams"
},
createDiscussion: {
deprecated: "octokit.teams.createDiscussion() has been renamed to octokit.teams.createDiscussionLegacy() (2020-01-16)",
method: "POST",
params: {
body: {
required: true,
type: "string"
},
private: {
type: "boolean"
},
team_id: {
required: true,
type: "integer"
},
title: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/discussions"
},
createDiscussionComment: {
deprecated: "octokit.teams.createDiscussionComment() has been renamed to octokit.teams.createDiscussionCommentLegacy() (2020-01-16)",
method: "POST",
params: {
body: {
required: true,
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments"
},
createDiscussionCommentInOrg: {
method: "POST",
params: {
body: {
required: true,
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments"
},
createDiscussionCommentLegacy: {
deprecated: "octokit.teams.createDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#create-a-comment-legacy",
method: "POST",
params: {
body: {
required: true,
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments"
},
createDiscussionInOrg: {
method: "POST",
params: {
body: {
required: true,
type: "string"
},
org: {
required: true,
type: "string"
},
private: {
type: "boolean"
},
team_slug: {
required: true,
type: "string"
},
title: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions"
},
createDiscussionLegacy: {
deprecated: "octokit.teams.createDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#create-a-discussion-legacy",
method: "POST",
params: {
body: {
required: true,
type: "string"
},
private: {
type: "boolean"
},
team_id: {
required: true,
type: "integer"
},
title: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/discussions"
},
delete: {
deprecated: "octokit.teams.delete() has been renamed to octokit.teams.deleteLegacy() (2020-01-16)",
method: "DELETE",
params: {
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id"
},
deleteDiscussion: {
deprecated: "octokit.teams.deleteDiscussion() has been renamed to octokit.teams.deleteDiscussionLegacy() (2020-01-16)",
method: "DELETE",
params: {
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number"
},
deleteDiscussionComment: {
deprecated: "octokit.teams.deleteDiscussionComment() has been renamed to octokit.teams.deleteDiscussionCommentLegacy() (2020-01-16)",
method: "DELETE",
params: {
comment_number: {
required: true,
type: "integer"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
},
deleteDiscussionCommentInOrg: {
method: "DELETE",
params: {
comment_number: {
required: true,
type: "integer"
},
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number"
},
deleteDiscussionCommentLegacy: {
deprecated: "octokit.teams.deleteDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment-legacy",
method: "DELETE",
params: {
comment_number: {
required: true,
type: "integer"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
},
deleteDiscussionInOrg: {
method: "DELETE",
params: {
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number"
},
deleteDiscussionLegacy: {
deprecated: "octokit.teams.deleteDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#delete-a-discussion-legacy",
method: "DELETE",
params: {
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number"
},
deleteInOrg: {
method: "DELETE",
params: {
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug"
},
deleteLegacy: {
deprecated: "octokit.teams.deleteLegacy() is deprecated, see https://developer.github.com/v3/teams/#delete-team-legacy",
method: "DELETE",
params: {
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id"
},
get: {
deprecated: "octokit.teams.get() has been renamed to octokit.teams.getLegacy() (2020-01-16)",
method: "GET",
params: {
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id"
},
getByName: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug"
},
getDiscussion: {
deprecated: "octokit.teams.getDiscussion() has been renamed to octokit.teams.getDiscussionLegacy() (2020-01-16)",
method: "GET",
params: {
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number"
},
getDiscussionComment: {
deprecated: "octokit.teams.getDiscussionComment() has been renamed to octokit.teams.getDiscussionCommentLegacy() (2020-01-16)",
method: "GET",
params: {
comment_number: {
required: true,
type: "integer"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
},
getDiscussionCommentInOrg: {
method: "GET",
params: {
comment_number: {
required: true,
type: "integer"
},
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number"
},
getDiscussionCommentLegacy: {
deprecated: "octokit.teams.getDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment-legacy",
method: "GET",
params: {
comment_number: {
required: true,
type: "integer"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
},
getDiscussionInOrg: {
method: "GET",
params: {
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number"
},
getDiscussionLegacy: {
deprecated: "octokit.teams.getDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#get-a-single-discussion-legacy",
method: "GET",
params: {
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number"
},
getLegacy: {
deprecated: "octokit.teams.getLegacy() is deprecated, see https://developer.github.com/v3/teams/#get-team-legacy",
method: "GET",
params: {
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id"
},
getMember: {
deprecated: "octokit.teams.getMember() has been renamed to octokit.teams.getMemberLegacy() (2020-01-16)",
method: "GET",
params: {
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/members/:username"
},
getMemberLegacy: {
deprecated: "octokit.teams.getMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member-legacy",
method: "GET",
params: {
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/members/:username"
},
getMembership: {
deprecated: "octokit.teams.getMembership() has been renamed to octokit.teams.getMembershipLegacy() (2020-01-16)",
method: "GET",
params: {
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/memberships/:username"
},
getMembershipInOrg: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/memberships/:username"
},
getMembershipLegacy: {
deprecated: "octokit.teams.getMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-membership-legacy",
method: "GET",
params: {
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/memberships/:username"
},
list: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/orgs/:org/teams"
},
listChild: {
deprecated: "octokit.teams.listChild() has been renamed to octokit.teams.listChildLegacy() (2020-01-16)",
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/teams"
},
listChildInOrg: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/teams"
},
listChildLegacy: {
deprecated: "octokit.teams.listChildLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-child-teams-legacy",
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/teams"
},
listDiscussionComments: {
deprecated: "octokit.teams.listDiscussionComments() has been renamed to octokit.teams.listDiscussionCommentsLegacy() (2020-01-16)",
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments"
},
listDiscussionCommentsInOrg: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments"
},
listDiscussionCommentsLegacy: {
deprecated: "octokit.teams.listDiscussionCommentsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#list-comments-legacy",
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments"
},
listDiscussions: {
deprecated: "octokit.teams.listDiscussions() has been renamed to octokit.teams.listDiscussionsLegacy() (2020-01-16)",
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions"
},
listDiscussionsInOrg: {
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions"
},
listDiscussionsLegacy: {
deprecated: "octokit.teams.listDiscussionsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#list-discussions-legacy",
method: "GET",
params: {
direction: {
enum: ["asc", "desc"],
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions"
},
listForAuthenticatedUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/teams"
},
listMembers: {
deprecated: "octokit.teams.listMembers() has been renamed to octokit.teams.listMembersLegacy() (2020-01-16)",
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
role: {
enum: ["member", "maintainer", "all"],
type: "string"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/members"
},
listMembersInOrg: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
role: {
enum: ["member", "maintainer", "all"],
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/members"
},
listMembersLegacy: {
deprecated: "octokit.teams.listMembersLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-team-members-legacy",
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
role: {
enum: ["member", "maintainer", "all"],
type: "string"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/members"
},
listPendingInvitations: {
deprecated: "octokit.teams.listPendingInvitations() has been renamed to octokit.teams.listPendingInvitationsLegacy() (2020-01-16)",
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/invitations"
},
listPendingInvitationsInOrg: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/invitations"
},
listPendingInvitationsLegacy: {
deprecated: "octokit.teams.listPendingInvitationsLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-pending-team-invitations-legacy",
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/invitations"
},
listProjects: {
deprecated: "octokit.teams.listProjects() has been renamed to octokit.teams.listProjectsLegacy() (2020-01-16)",
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/projects"
},
listProjectsInOrg: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/projects"
},
listProjectsLegacy: {
deprecated: "octokit.teams.listProjectsLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-projects-legacy",
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/projects"
},
listRepos: {
deprecated: "octokit.teams.listRepos() has been renamed to octokit.teams.listReposLegacy() (2020-01-16)",
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/repos"
},
listReposInOrg: {
method: "GET",
params: {
org: {
required: true,
type: "string"
},
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/repos"
},
listReposLegacy: {
deprecated: "octokit.teams.listReposLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-repos-legacy",
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/repos"
},
removeMember: {
deprecated: "octokit.teams.removeMember() has been renamed to octokit.teams.removeMemberLegacy() (2020-01-16)",
method: "DELETE",
params: {
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/members/:username"
},
removeMemberLegacy: {
deprecated: "octokit.teams.removeMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member-legacy",
method: "DELETE",
params: {
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/members/:username"
},
removeMembership: {
deprecated: "octokit.teams.removeMembership() has been renamed to octokit.teams.removeMembershipLegacy() (2020-01-16)",
method: "DELETE",
params: {
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/memberships/:username"
},
removeMembershipInOrg: {
method: "DELETE",
params: {
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/memberships/:username"
},
removeMembershipLegacy: {
deprecated: "octokit.teams.removeMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-membership-legacy",
method: "DELETE",
params: {
team_id: {
required: true,
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/teams/:team_id/memberships/:username"
},
removeProject: {
deprecated: "octokit.teams.removeProject() has been renamed to octokit.teams.removeProjectLegacy() (2020-01-16)",
method: "DELETE",
params: {
project_id: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/projects/:project_id"
},
removeProjectInOrg: {
method: "DELETE",
params: {
org: {
required: true,
type: "string"
},
project_id: {
required: true,
type: "integer"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/projects/:project_id"
},
removeProjectLegacy: {
deprecated: "octokit.teams.removeProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-project-legacy",
method: "DELETE",
params: {
project_id: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/projects/:project_id"
},
removeRepo: {
deprecated: "octokit.teams.removeRepo() has been renamed to octokit.teams.removeRepoLegacy() (2020-01-16)",
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/repos/:owner/:repo"
},
removeRepoInOrg: {
method: "DELETE",
params: {
org: {
required: true,
type: "string"
},
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo"
},
removeRepoLegacy: {
deprecated: "octokit.teams.removeRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-repository-legacy",
method: "DELETE",
params: {
owner: {
required: true,
type: "string"
},
repo: {
required: true,
type: "string"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/repos/:owner/:repo"
},
reviewProject: {
deprecated: "octokit.teams.reviewProject() has been renamed to octokit.teams.reviewProjectLegacy() (2020-01-16)",
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
project_id: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/projects/:project_id"
},
reviewProjectInOrg: {
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
org: {
required: true,
type: "string"
},
project_id: {
required: true,
type: "integer"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/projects/:project_id"
},
reviewProjectLegacy: {
deprecated: "octokit.teams.reviewProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#review-a-team-project-legacy",
headers: {
accept: "application/vnd.github.inertia-preview+json"
},
method: "GET",
params: {
project_id: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/projects/:project_id"
},
update: {
deprecated: "octokit.teams.update() has been renamed to octokit.teams.updateLegacy() (2020-01-16)",
method: "PATCH",
params: {
description: {
type: "string"
},
name: {
required: true,
type: "string"
},
parent_team_id: {
type: "integer"
},
permission: {
enum: ["pull", "push", "admin"],
type: "string"
},
privacy: {
enum: ["secret", "closed"],
type: "string"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id"
},
updateDiscussion: {
deprecated: "octokit.teams.updateDiscussion() has been renamed to octokit.teams.updateDiscussionLegacy() (2020-01-16)",
method: "PATCH",
params: {
body: {
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
},
title: {
type: "string"
}
},
url: "/teams/:team_id/discussions/:discussion_number"
},
updateDiscussionComment: {
deprecated: "octokit.teams.updateDiscussionComment() has been renamed to octokit.teams.updateDiscussionCommentLegacy() (2020-01-16)",
method: "PATCH",
params: {
body: {
required: true,
type: "string"
},
comment_number: {
required: true,
type: "integer"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
},
updateDiscussionCommentInOrg: {
method: "PATCH",
params: {
body: {
required: true,
type: "string"
},
comment_number: {
required: true,
type: "integer"
},
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number"
},
updateDiscussionCommentLegacy: {
deprecated: "octokit.teams.updateDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment-legacy",
method: "PATCH",
params: {
body: {
required: true,
type: "string"
},
comment_number: {
required: true,
type: "integer"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
},
updateDiscussionInOrg: {
method: "PATCH",
params: {
body: {
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
org: {
required: true,
type: "string"
},
team_slug: {
required: true,
type: "string"
},
title: {
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number"
},
updateDiscussionLegacy: {
deprecated: "octokit.teams.updateDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#edit-a-discussion-legacy",
method: "PATCH",
params: {
body: {
type: "string"
},
discussion_number: {
required: true,
type: "integer"
},
team_id: {
required: true,
type: "integer"
},
title: {
type: "string"
}
},
url: "/teams/:team_id/discussions/:discussion_number"
},
updateInOrg: {
method: "PATCH",
params: {
description: {
type: "string"
},
name: {
required: true,
type: "string"
},
org: {
required: true,
type: "string"
},
parent_team_id: {
type: "integer"
},
permission: {
enum: ["pull", "push", "admin"],
type: "string"
},
privacy: {
enum: ["secret", "closed"],
type: "string"
},
team_slug: {
required: true,
type: "string"
}
},
url: "/orgs/:org/teams/:team_slug"
},
updateLegacy: {
deprecated: "octokit.teams.updateLegacy() is deprecated, see https://developer.github.com/v3/teams/#edit-team-legacy",
method: "PATCH",
params: {
description: {
type: "string"
},
name: {
required: true,
type: "string"
},
parent_team_id: {
type: "integer"
},
permission: {
enum: ["pull", "push", "admin"],
type: "string"
},
privacy: {
enum: ["secret", "closed"],
type: "string"
},
team_id: {
required: true,
type: "integer"
}
},
url: "/teams/:team_id"
}
},
users: {
addEmails: {
method: "POST",
params: {
emails: {
required: true,
type: "string[]"
}
},
url: "/user/emails"
},
block: {
method: "PUT",
params: {
username: {
required: true,
type: "string"
}
},
url: "/user/blocks/:username"
},
checkBlocked: {
method: "GET",
params: {
username: {
required: true,
type: "string"
}
},
url: "/user/blocks/:username"
},
checkFollowing: {
method: "GET",
params: {
username: {
required: true,
type: "string"
}
},
url: "/user/following/:username"
},
checkFollowingForUser: {
method: "GET",
params: {
target_user: {
required: true,
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/following/:target_user"
},
createGpgKey: {
method: "POST",
params: {
armored_public_key: {
type: "string"
}
},
url: "/user/gpg_keys"
},
createPublicKey: {
method: "POST",
params: {
key: {
type: "string"
},
title: {
type: "string"
}
},
url: "/user/keys"
},
deleteEmails: {
method: "DELETE",
params: {
emails: {
required: true,
type: "string[]"
}
},
url: "/user/emails"
},
deleteGpgKey: {
method: "DELETE",
params: {
gpg_key_id: {
required: true,
type: "integer"
}
},
url: "/user/gpg_keys/:gpg_key_id"
},
deletePublicKey: {
method: "DELETE",
params: {
key_id: {
required: true,
type: "integer"
}
},
url: "/user/keys/:key_id"
},
follow: {
method: "PUT",
params: {
username: {
required: true,
type: "string"
}
},
url: "/user/following/:username"
},
getAuthenticated: {
method: "GET",
params: {},
url: "/user"
},
getByUsername: {
method: "GET",
params: {
username: {
required: true,
type: "string"
}
},
url: "/users/:username"
},
getContextForUser: {
method: "GET",
params: {
subject_id: {
type: "string"
},
subject_type: {
enum: ["organization", "repository", "issue", "pull_request"],
type: "string"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/hovercard"
},
getGpgKey: {
method: "GET",
params: {
gpg_key_id: {
required: true,
type: "integer"
}
},
url: "/user/gpg_keys/:gpg_key_id"
},
getPublicKey: {
method: "GET",
params: {
key_id: {
required: true,
type: "integer"
}
},
url: "/user/keys/:key_id"
},
list: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
since: {
type: "string"
}
},
url: "/users"
},
listBlocked: {
method: "GET",
params: {},
url: "/user/blocks"
},
listEmails: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/emails"
},
listFollowersForAuthenticatedUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/followers"
},
listFollowersForUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/followers"
},
listFollowingForAuthenticatedUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/following"
},
listFollowingForUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/following"
},
listGpgKeys: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/gpg_keys"
},
listGpgKeysForUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/gpg_keys"
},
listPublicEmails: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/public_emails"
},
listPublicKeys: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
}
},
url: "/user/keys"
},
listPublicKeysForUser: {
method: "GET",
params: {
page: {
type: "integer"
},
per_page: {
type: "integer"
},
username: {
required: true,
type: "string"
}
},
url: "/users/:username/keys"
},
togglePrimaryEmailVisibility: {
method: "PATCH",
params: {
email: {
required: true,
type: "string"
},
visibility: {
required: true,
type: "string"
}
},
url: "/user/email/visibility"
},
unblock: {
method: "DELETE",
params: {
username: {
required: true,
type: "string"
}
},
url: "/user/blocks/:username"
},
unfollow: {
method: "DELETE",
params: {
username: {
required: true,
type: "string"
}
},
url: "/user/following/:username"
},
updateAuthenticated: {
method: "PATCH",
params: {
bio: {
type: "string"
},
blog: {
type: "string"
},
company: {
type: "string"
},
email: {
type: "string"
},
hireable: {
type: "boolean"
},
location: {
type: "string"
},
name: {
type: "string"
}
},
url: "/user"
}
}
};
var VERSION = "2.4.0";
function registerEndpoints(octokit, routes) {
Object.keys(routes).forEach((namespaceName) => {
if (!octokit[namespaceName]) {
octokit[namespaceName] = {};
}
Object.keys(routes[namespaceName]).forEach((apiName) => {
const apiOptions = routes[namespaceName][apiName];
const endpointDefaults = ["method", "url", "headers"].reduce((map, key) => {
if (typeof apiOptions[key] !== "undefined") {
map[key] = apiOptions[key];
}
return map;
}, {});
endpointDefaults.request = {
validate: apiOptions.params
};
let request = octokit.request.defaults(endpointDefaults);
const hasDeprecatedParam = Object.keys(apiOptions.params || {}).find((key) => apiOptions.params[key].deprecated);
if (hasDeprecatedParam) {
const patch = patchForDeprecation.bind(null, octokit, apiOptions);
request = patch(octokit.request.defaults(endpointDefaults), `.${namespaceName}.${apiName}()`);
request.endpoint = patch(request.endpoint, `.${namespaceName}.${apiName}.endpoint()`);
request.endpoint.merge = patch(request.endpoint.merge, `.${namespaceName}.${apiName}.endpoint.merge()`);
}
if (apiOptions.deprecated) {
octokit[namespaceName][apiName] = Object.assign(function deprecatedEndpointMethod() {
octokit.log.warn(new deprecation.Deprecation(`[@octokit/rest] ${apiOptions.deprecated}`));
octokit[namespaceName][apiName] = request;
return request.apply(null, arguments);
}, request);
return;
}
octokit[namespaceName][apiName] = request;
});
});
}
function patchForDeprecation(octokit, apiOptions, method, methodName) {
const patchedMethod = (options) => {
options = Object.assign({}, options);
Object.keys(options).forEach((key) => {
if (apiOptions.params[key] && apiOptions.params[key].deprecated) {
const aliasKey = apiOptions.params[key].alias;
octokit.log.warn(new deprecation.Deprecation(`[@octokit/rest] "${key}" parameter is deprecated for "${methodName}". Use "${aliasKey}" instead`));
if (!(aliasKey in options)) {
options[aliasKey] = options[key];
}
delete options[key];
}
});
return method(options);
};
Object.keys(method).forEach((key) => {
patchedMethod[key] = method[key];
});
return patchedMethod;
}
function restEndpointMethods(octokit) {
octokit.registerEndpoints = registerEndpoints.bind(null, octokit);
registerEndpoints(octokit, endpointsByScope);
[["gitdata", "git"], ["authorization", "oauthAuthorizations"], ["pullRequests", "pulls"]].forEach(([deprecatedScope, scope]) => {
Object.defineProperty(octokit, deprecatedScope, {
get() {
octokit.log.warn(
new deprecation.Deprecation(`[@octokit/plugin-rest-endpoint-methods] "octokit.${deprecatedScope}.*" methods are deprecated, use "octokit.${scope}.*" instead`)
);
return octokit[scope];
}
});
});
return {};
}
restEndpointMethods.VERSION = VERSION;
exports.restEndpointMethods = restEndpointMethods;
}
});
// node_modules/before-after-hook/lib/register.js
var require_register = __commonJS({
"node_modules/before-after-hook/lib/register.js"(exports, module2) {
module2.exports = register;
function register(state, name, method, options) {
if (typeof method !== "function") {
throw new Error("method for before hook must be a function");
}
if (!options) {
options = {};
}
if (Array.isArray(name)) {
return name.reverse().reduce(function(callback, name2) {
return register.bind(null, state, name2, callback, options);
}, method)();
}
return Promise.resolve().then(function() {
if (!state.registry[name]) {
return method(options);
}
return state.registry[name].reduce(function(method2, registered) {
return registered.hook.bind(null, method2, options);
}, method)();
});
}
}
});
// node_modules/before-after-hook/lib/add.js
var require_add = __commonJS({
"node_modules/before-after-hook/lib/add.js"(exports, module2) {
module2.exports = addHook;
function addHook(state, kind, name, hook) {
var orig = hook;
if (!state.registry[name]) {
state.registry[name] = [];
}
if (kind === "before") {
hook = function(method, options) {
return Promise.resolve().then(orig.bind(null, options)).then(method.bind(null, options));
};
}
if (kind === "after") {
hook = function(method, options) {
var result;
return Promise.resolve().then(method.bind(null, options)).then(function(result_) {
result = result_;
return orig(result, options);
}).then(function() {
return result;
});
};
}
if (kind === "error") {
hook = function(method, options) {
return Promise.resolve().then(method.bind(null, options)).catch(function(error) {
return orig(error, options);
});
};
}
state.registry[name].push({
hook,
orig
});
}
}
});
// node_modules/before-after-hook/lib/remove.js
var require_remove = __commonJS({
"node_modules/before-after-hook/lib/remove.js"(exports, module2) {
module2.exports = removeHook;
function removeHook(state, name, method) {
if (!state.registry[name]) {
return;
}
var index = state.registry[name].map(function(registered) {
return registered.orig;
}).indexOf(method);
if (index === -1) {
return;
}
state.registry[name].splice(index, 1);
}
}
});
// node_modules/before-after-hook/index.js
var require_before_after_hook = __commonJS({
"node_modules/before-after-hook/index.js"(exports, module2) {
var register = require_register();
var addHook = require_add();
var removeHook = require_remove();
var bind = Function.bind;
var bindable = bind.bind(bind);
function bindApi(hook, state, name) {
var removeHookRef = bindable(removeHook, null).apply(
null,
name ? [state, name] : [state]
);
hook.api = { remove: removeHookRef };
hook.remove = removeHookRef;
["before", "error", "after", "wrap"].forEach(function(kind) {
var args = name ? [state, kind, name] : [state, kind];
hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args);
});
}
function HookSingular() {
var singularHookName = "h";
var singularHookState = {
registry: {}
};
var singularHook = register.bind(null, singularHookState, singularHookName);
bindApi(singularHook, singularHookState, singularHookName);
return singularHook;
}
function HookCollection() {
var state = {
registry: {}
};
var hook = register.bind(null, state);
bindApi(hook, state);
return hook;
}
var collectionHookDeprecationMessageDisplayed = false;
function Hook() {
if (!collectionHookDeprecationMessageDisplayed) {
console.warn(
'[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4'
);
collectionHookDeprecationMessageDisplayed = true;
}
return HookCollection();
}
Hook.Singular = HookSingular.bind();
Hook.Collection = HookCollection.bind();
module2.exports = Hook;
module2.exports.Hook = Hook;
module2.exports.Singular = Hook.Singular;
module2.exports.Collection = Hook.Collection;
}
});
// node_modules/macos-release/index.js
var require_macos_release = __commonJS({
"node_modules/macos-release/index.js"(exports, module2) {
"use strict";
var os3 = require("os");
var nameMap = /* @__PURE__ */ new Map([
[21, ["Monterey", "12"]],
[20, ["Big Sur", "11"]],
[19, ["Catalina", "10.15"]],
[18, ["Mojave", "10.14"]],
[17, ["High Sierra", "10.13"]],
[16, ["Sierra", "10.12"]],
[15, ["El Capitan", "10.11"]],
[14, ["Yosemite", "10.10"]],
[13, ["Mavericks", "10.9"]],
[12, ["Mountain Lion", "10.8"]],
[11, ["Lion", "10.7"]],
[10, ["Snow Leopard", "10.6"]],
[9, ["Leopard", "10.5"]],
[8, ["Tiger", "10.4"]],
[7, ["Panther", "10.3"]],
[6, ["Jaguar", "10.2"]],
[5, ["Puma", "10.1"]]
]);
var macosRelease = (release) => {
release = Number((release || os3.release()).split(".")[0]);
const [name, version] = nameMap.get(release);
return {
name,
version
};
};
module2.exports = macosRelease;
module2.exports.default = macosRelease;
}
});
// node_modules/nice-try/src/index.js
var require_src = __commonJS({
"node_modules/nice-try/src/index.js"(exports, module2) {
"use strict";
module2.exports = function(fn) {
try {
return fn();
} catch (e) {
}
};
}
});
// node_modules/isexe/windows.js
var require_windows = __commonJS({
"node_modules/isexe/windows.js"(exports, module2) {
module2.exports = isexe;
isexe.sync = sync;
var fs5 = require("fs");
function checkPathExt(path5, options) {
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
if (!pathext) {
return true;
}
pathext = pathext.split(";");
if (pathext.indexOf("") !== -1) {
return true;
}
for (var i = 0; i < pathext.length; i++) {
var p = pathext[i].toLowerCase();
if (p && path5.substr(-p.length).toLowerCase() === p) {
return true;
}
}
return false;
}
function checkStat(stat, path5, options) {
if (!stat.isSymbolicLink() && !stat.isFile()) {
return false;
}
return checkPathExt(path5, options);
}
function isexe(path5, options, cb) {
fs5.stat(path5, function(er, stat) {
cb(er, er ? false : checkStat(stat, path5, options));
});
}
function sync(path5, options) {
return checkStat(fs5.statSync(path5), path5, options);
}
}
});
// node_modules/isexe/mode.js
var require_mode = __commonJS({
"node_modules/isexe/mode.js"(exports, module2) {
module2.exports = isexe;
isexe.sync = sync;
var fs5 = require("fs");
function isexe(path5, options, cb) {
fs5.stat(path5, function(er, stat) {
cb(er, er ? false : checkStat(stat, options));
});
}
function sync(path5, options) {
return checkStat(fs5.statSync(path5), options);
}
function checkStat(stat, options) {
return stat.isFile() && checkMode(stat, options);
}
function checkMode(stat, options) {
var mod = stat.mode;
var uid = stat.uid;
var gid = stat.gid;
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
var u = parseInt("100", 8);
var g = parseInt("010", 8);
var o = parseInt("001", 8);
var ug = u | g;
var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
return ret;
}
}
});
// node_modules/isexe/index.js
var require_isexe = __commonJS({
"node_modules/isexe/index.js"(exports, module2) {
var fs5 = require("fs");
var core5;
if (process.platform === "win32" || global.TESTING_WINDOWS) {
core5 = require_windows();
} else {
core5 = require_mode();
}
module2.exports = isexe;
isexe.sync = sync;
function isexe(path5, options, cb) {
if (typeof options === "function") {
cb = options;
options = {};
}
if (!cb) {
if (typeof Promise !== "function") {
throw new TypeError("callback not provided");
}
return new Promise(function(resolve, reject) {
isexe(path5, options || {}, function(er, is) {
if (er) {
reject(er);
} else {
resolve(is);
}
});
});
}
core5(path5, options || {}, function(er, is) {
if (er) {
if (er.code === "EACCES" || options && options.ignoreErrors) {
er = null;
is = false;
}
}
cb(er, is);
});
}
function sync(path5, options) {
try {
return core5.sync(path5, options || {});
} catch (er) {
if (options && options.ignoreErrors || er.code === "EACCES") {
return false;
} else {
throw er;
}
}
}
}
});
// node_modules/which/which.js
var require_which = __commonJS({
"node_modules/which/which.js"(exports, module2) {
module2.exports = which;
which.sync = whichSync;
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
var path5 = require("path");
var COLON = isWindows ? ";" : ":";
var isexe = require_isexe();
function getNotFoundError(cmd) {
var er = new Error("not found: " + cmd);
er.code = "ENOENT";
return er;
}
function getPathInfo(cmd, opt) {
var colon = opt.colon || COLON;
var pathEnv = opt.path || process.env.PATH || "";
var pathExt = [""];
pathEnv = pathEnv.split(colon);
var pathExtExe = "";
if (isWindows) {
pathEnv.unshift(process.cwd());
pathExtExe = opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM";
pathExt = pathExtExe.split(colon);
if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
pathExt.unshift("");
}
if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
pathEnv = [""];
return {
env: pathEnv,
ext: pathExt,
extExe: pathExtExe
};
}
function which(cmd, opt, cb) {
if (typeof opt === "function") {
cb = opt;
opt = {};
}
var info2 = getPathInfo(cmd, opt);
var pathEnv = info2.env;
var pathExt = info2.ext;
var pathExtExe = info2.extExe;
var found = [];
(function F(i, l) {
if (i === l) {
if (opt.all && found.length)
return cb(null, found);
else
return cb(getNotFoundError(cmd));
}
var pathPart = pathEnv[i];
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
pathPart = pathPart.slice(1, -1);
var p = path5.join(pathPart, cmd);
if (!pathPart && /^\.[\\\/]/.test(cmd)) {
p = cmd.slice(0, 2) + p;
}
;
(function E(ii, ll) {
if (ii === ll)
return F(i + 1, l);
var ext = pathExt[ii];
isexe(p + ext, { pathExt: pathExtExe }, function(er, is) {
if (!er && is) {
if (opt.all)
found.push(p + ext);
else
return cb(null, p + ext);
}
return E(ii + 1, ll);
});
})(0, pathExt.length);
})(0, pathEnv.length);
}
function whichSync(cmd, opt) {
opt = opt || {};
var info2 = getPathInfo(cmd, opt);
var pathEnv = info2.env;
var pathExt = info2.ext;
var pathExtExe = info2.extExe;
var found = [];
for (var i = 0, l = pathEnv.length; i < l; i++) {
var pathPart = pathEnv[i];
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
pathPart = pathPart.slice(1, -1);
var p = path5.join(pathPart, cmd);
if (!pathPart && /^\.[\\\/]/.test(cmd)) {
p = cmd.slice(0, 2) + p;
}
for (var j = 0, ll = pathExt.length; j < ll; j++) {
var cur = p + pathExt[j];
var is;
try {
is = isexe.sync(cur, { pathExt: pathExtExe });
if (is) {
if (opt.all)
found.push(cur);
else
return cur;
}
} catch (ex) {
}
}
}
if (opt.all && found.length)
return found;
if (opt.nothrow)
return null;
throw getNotFoundError(cmd);
}
}
});
// node_modules/path-key/index.js
var require_path_key = __commonJS({
"node_modules/path-key/index.js"(exports, module2) {
"use strict";
module2.exports = (opts) => {
opts = opts || {};
const env = opts.env || process.env;
const platform = opts.platform || process.platform;
if (platform !== "win32") {
return "PATH";
}
return Object.keys(env).find((x) => x.toUpperCase() === "PATH") || "Path";
};
}
});
// node_modules/cross-spawn/lib/util/resolveCommand.js
var require_resolveCommand = __commonJS({
"node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) {
"use strict";
var path5 = require("path");
var which = require_which();
var pathKey = require_path_key()();
function resolveCommandAttempt(parsed, withoutPathExt) {
const cwd = process.cwd();
const hasCustomCwd = parsed.options.cwd != null;
if (hasCustomCwd) {
try {
process.chdir(parsed.options.cwd);
} catch (err) {
}
}
let resolved;
try {
resolved = which.sync(parsed.command, {
path: (parsed.options.env || process.env)[pathKey],
pathExt: withoutPathExt ? path5.delimiter : void 0
});
} catch (e) {
} finally {
process.chdir(cwd);
}
if (resolved) {
resolved = path5.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
}
return resolved;
}
function resolveCommand(parsed) {
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
}
module2.exports = resolveCommand;
}
});
// node_modules/cross-spawn/lib/util/escape.js
var require_escape = __commonJS({
"node_modules/cross-spawn/lib/util/escape.js"(exports, module2) {
"use strict";
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
function escapeCommand(arg) {
arg = arg.replace(metaCharsRegExp, "^$1");
return arg;
}
function escapeArgument(arg, doubleEscapeMetaChars) {
arg = `${arg}`;
arg = arg.replace(/(\\*)"/g, '$1$1\\"');
arg = arg.replace(/(\\*)$/, "$1$1");
arg = `"${arg}"`;
arg = arg.replace(metaCharsRegExp, "^$1");
if (doubleEscapeMetaChars) {
arg = arg.replace(metaCharsRegExp, "^$1");
}
return arg;
}
module2.exports.command = escapeCommand;
module2.exports.argument = escapeArgument;
}
});
// node_modules/shebang-regex/index.js
var require_shebang_regex = __commonJS({
"node_modules/shebang-regex/index.js"(exports, module2) {
"use strict";
module2.exports = /^#!.*/;
}
});
// node_modules/shebang-command/index.js
var require_shebang_command = __commonJS({
"node_modules/shebang-command/index.js"(exports, module2) {
"use strict";
var shebangRegex = require_shebang_regex();
module2.exports = function(str) {
var match = str.match(shebangRegex);
if (!match) {
return null;
}
var arr = match[0].replace(/#! ?/, "").split(" ");
var bin = arr[0].split("/").pop();
var arg = arr[1];
return bin === "env" ? arg : bin + (arg ? " " + arg : "");
};
}
});
// node_modules/cross-spawn/lib/util/readShebang.js
var require_readShebang = __commonJS({
"node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) {
"use strict";
var fs5 = require("fs");
var shebangCommand = require_shebang_command();
function readShebang(command) {
const size = 150;
let buffer;
if (Buffer.alloc) {
buffer = Buffer.alloc(size);
} else {
buffer = new Buffer(size);
buffer.fill(0);
}
let fd;
try {
fd = fs5.openSync(command, "r");
fs5.readSync(fd, buffer, 0, size, 0);
fs5.closeSync(fd);
} catch (e) {
}
return shebangCommand(buffer.toString());
}
module2.exports = readShebang;
}
});
// node_modules/cross-spawn/node_modules/semver/semver.js
var require_semver3 = __commonJS({
"node_modules/cross-spawn/node_modules/semver/semver.js"(exports, module2) {
exports = module2.exports = SemVer;
var debug2;
if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
debug2 = function() {
var args = Array.prototype.slice.call(arguments, 0);
args.unshift("SEMVER");
console.log.apply(console, args);
};
} else {
debug2 = function() {
};
}
exports.SEMVER_SPEC_VERSION = "2.0.0";
var MAX_LENGTH = 256;
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
var MAX_SAFE_COMPONENT_LENGTH = 16;
var re = exports.re = [];
var src = exports.src = [];
var R = 0;
var NUMERICIDENTIFIER = R++;
src[NUMERICIDENTIFIER] = "0|[1-9]\\d*";
var NUMERICIDENTIFIERLOOSE = R++;
src[NUMERICIDENTIFIERLOOSE] = "[0-9]+";
var NONNUMERICIDENTIFIER = R++;
src[NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
var MAINVERSION = R++;
src[MAINVERSION] = "(" + src[NUMERICIDENTIFIER] + ")\\.(" + src[NUMERICIDENTIFIER] + ")\\.(" + src[NUMERICIDENTIFIER] + ")";
var MAINVERSIONLOOSE = R++;
src[MAINVERSIONLOOSE] = "(" + src[NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[NUMERICIDENTIFIERLOOSE] + ")";
var PRERELEASEIDENTIFIER = R++;
src[PRERELEASEIDENTIFIER] = "(?:" + src[NUMERICIDENTIFIER] + "|" + src[NONNUMERICIDENTIFIER] + ")";
var PRERELEASEIDENTIFIERLOOSE = R++;
src[PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[NUMERICIDENTIFIERLOOSE] + "|" + src[NONNUMERICIDENTIFIER] + ")";
var PRERELEASE = R++;
src[PRERELEASE] = "(?:-(" + src[PRERELEASEIDENTIFIER] + "(?:\\." + src[PRERELEASEIDENTIFIER] + ")*))";
var PRERELEASELOOSE = R++;
src[PRERELEASELOOSE] = "(?:-?(" + src[PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[PRERELEASEIDENTIFIERLOOSE] + ")*))";
var BUILDIDENTIFIER = R++;
src[BUILDIDENTIFIER] = "[0-9A-Za-z-]+";
var BUILD = R++;
src[BUILD] = "(?:\\+(" + src[BUILDIDENTIFIER] + "(?:\\." + src[BUILDIDENTIFIER] + ")*))";
var FULL = R++;
var FULLPLAIN = "v?" + src[MAINVERSION] + src[PRERELEASE] + "?" + src[BUILD] + "?";
src[FULL] = "^" + FULLPLAIN + "$";
var LOOSEPLAIN = "[v=\\s]*" + src[MAINVERSIONLOOSE] + src[PRERELEASELOOSE] + "?" + src[BUILD] + "?";
var LOOSE = R++;
src[LOOSE] = "^" + LOOSEPLAIN + "$";
var GTLT = R++;
src[GTLT] = "((?:<|>)?=?)";
var XRANGEIDENTIFIERLOOSE = R++;
src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + "|x|X|\\*";
var XRANGEIDENTIFIER = R++;
src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + "|x|X|\\*";
var XRANGEPLAIN = R++;
src[XRANGEPLAIN] = "[v=\\s]*(" + src[XRANGEIDENTIFIER] + ")(?:\\.(" + src[XRANGEIDENTIFIER] + ")(?:\\.(" + src[XRANGEIDENTIFIER] + ")(?:" + src[PRERELEASE] + ")?" + src[BUILD] + "?)?)?";
var XRANGEPLAINLOOSE = R++;
src[XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[XRANGEIDENTIFIERLOOSE] + ")(?:" + src[PRERELEASELOOSE] + ")?" + src[BUILD] + "?)?)?";
var XRANGE = R++;
src[XRANGE] = "^" + src[GTLT] + "\\s*" + src[XRANGEPLAIN] + "$";
var XRANGELOOSE = R++;
src[XRANGELOOSE] = "^" + src[GTLT] + "\\s*" + src[XRANGEPLAINLOOSE] + "$";
var COERCE = R++;
src[COERCE] = "(?:^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])";
var LONETILDE = R++;
src[LONETILDE] = "(?:~>?)";
var TILDETRIM = R++;
src[TILDETRIM] = "(\\s*)" + src[LONETILDE] + "\\s+";
re[TILDETRIM] = new RegExp(src[TILDETRIM], "g");
var tildeTrimReplace = "$1~";
var TILDE = R++;
src[TILDE] = "^" + src[LONETILDE] + src[XRANGEPLAIN] + "$";
var TILDELOOSE = R++;
src[TILDELOOSE] = "^" + src[LONETILDE] + src[XRANGEPLAINLOOSE] + "$";
var LONECARET = R++;
src[LONECARET] = "(?:\\^)";
var CARETTRIM = R++;
src[CARETTRIM] = "(\\s*)" + src[LONECARET] + "\\s+";
re[CARETTRIM] = new RegExp(src[CARETTRIM], "g");
var caretTrimReplace = "$1^";
var CARET = R++;
src[CARET] = "^" + src[LONECARET] + src[XRANGEPLAIN] + "$";
var CARETLOOSE = R++;
src[CARETLOOSE] = "^" + src[LONECARET] + src[XRANGEPLAINLOOSE] + "$";
var COMPARATORLOOSE = R++;
src[COMPARATORLOOSE] = "^" + src[GTLT] + "\\s*(" + LOOSEPLAIN + ")$|^$";
var COMPARATOR = R++;
src[COMPARATOR] = "^" + src[GTLT] + "\\s*(" + FULLPLAIN + ")$|^$";
var COMPARATORTRIM = R++;
src[COMPARATORTRIM] = "(\\s*)" + src[GTLT] + "\\s*(" + LOOSEPLAIN + "|" + src[XRANGEPLAIN] + ")";
re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], "g");
var comparatorTrimReplace = "$1$2$3";
var HYPHENRANGE = R++;
src[HYPHENRANGE] = "^\\s*(" + src[XRANGEPLAIN] + ")\\s+-\\s+(" + src[XRANGEPLAIN] + ")\\s*$";
var HYPHENRANGELOOSE = R++;
src[HYPHENRANGELOOSE] = "^\\s*(" + src[XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[XRANGEPLAINLOOSE] + ")\\s*$";
var STAR = R++;
src[STAR] = "(<|>)?=?\\s*\\*";
for (i = 0; i < R; i++) {
debug2(i, src[i]);
if (!re[i]) {
re[i] = new RegExp(src[i]);
}
}
var i;
exports.parse = parse;
function parse(version, options) {
if (!options || typeof options !== "object") {
options = {
loose: !!options,
includePrerelease: false
};
}
if (version instanceof SemVer) {
return version;
}
if (typeof version !== "string") {
return null;
}
if (version.length > MAX_LENGTH) {
return null;
}
var r = options.loose ? re[LOOSE] : re[FULL];
if (!r.test(version)) {
return null;
}
try {
return new SemVer(version, options);
} catch (er) {
return null;
}
}
exports.valid = valid;
function valid(version, options) {
var v = parse(version, options);
return v ? v.version : null;
}
exports.clean = clean;
function clean(version, options) {
var s = parse(version.trim().replace(/^[=v]+/, ""), options);
return s ? s.version : null;
}
exports.SemVer = SemVer;
function SemVer(version, options) {
if (!options || typeof options !== "object") {
options = {
loose: !!options,
includePrerelease: false
};
}
if (version instanceof SemVer) {
if (version.loose === options.loose) {
return version;
} else {
version = version.version;
}
} else if (typeof version !== "string") {
throw new TypeError("Invalid Version: " + version);
}
if (version.length > MAX_LENGTH) {
throw new TypeError("version is longer than " + MAX_LENGTH + " characters");
}
if (!(this instanceof SemVer)) {
return new SemVer(version, options);
}
debug2("SemVer", version, options);
this.options = options;
this.loose = !!options.loose;
var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]);
if (!m) {
throw new TypeError("Invalid Version: " + version);
}
this.raw = version;
this.major = +m[1];
this.minor = +m[2];
this.patch = +m[3];
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
throw new TypeError("Invalid major version");
}
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
throw new TypeError("Invalid minor version");
}
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
throw new TypeError("Invalid patch version");
}
if (!m[4]) {
this.prerelease = [];
} else {
this.prerelease = m[4].split(".").map(function(id) {
if (/^[0-9]+$/.test(id)) {
var num = +id;
if (num >= 0 && num < MAX_SAFE_INTEGER) {
return num;
}
}
return id;
});
}
this.build = m[5] ? m[5].split(".") : [];
this.format();
}
SemVer.prototype.format = function() {
this.version = this.major + "." + this.minor + "." + this.patch;
if (this.prerelease.length) {
this.version += "-" + this.prerelease.join(".");
}
return this.version;
};
SemVer.prototype.toString = function() {
return this.version;
};
SemVer.prototype.compare = function(other) {
debug2("SemVer.compare", this.version, this.options, other);
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
return this.compareMain(other) || this.comparePre(other);
};
SemVer.prototype.compareMain = function(other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
};
SemVer.prototype.comparePre = function(other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options);
}
if (this.prerelease.length && !other.prerelease.length) {
return -1;
} else if (!this.prerelease.length && other.prerelease.length) {
return 1;
} else if (!this.prerelease.length && !other.prerelease.length) {
return 0;
}
var i2 = 0;
do {
var a = this.prerelease[i2];
var b = other.prerelease[i2];
debug2("prerelease compare", i2, a, b);
if (a === void 0 && b === void 0) {
return 0;
} else if (b === void 0) {
return 1;
} else if (a === void 0) {
return -1;
} else if (a === b) {
continue;
} else {
return compareIdentifiers(a, b);
}
} while (++i2);
};
SemVer.prototype.inc = function(release, identifier) {
switch (release) {
case "premajor":
this.prerelease.length = 0;
this.patch = 0;
this.minor = 0;
this.major++;
this.inc("pre", identifier);
break;
case "preminor":
this.prerelease.length = 0;
this.patch = 0;
this.minor++;
this.inc("pre", identifier);
break;
case "prepatch":
this.prerelease.length = 0;
this.inc("patch", identifier);
this.inc("pre", identifier);
break;
case "prerelease":
if (this.prerelease.length === 0) {
this.inc("patch", identifier);
}
this.inc("pre", identifier);
break;
case "major":
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
this.major++;
}
this.minor = 0;
this.patch = 0;
this.prerelease = [];
break;
case "minor":
if (this.patch !== 0 || this.prerelease.length === 0) {
this.minor++;
}
this.patch = 0;
this.prerelease = [];
break;
case "patch":
if (this.prerelease.length === 0) {
this.patch++;
}
this.prerelease = [];
break;
case "pre":
if (this.prerelease.length === 0) {
this.prerelease = [0];
} else {
var i2 = this.prerelease.length;
while (--i2 >= 0) {
if (typeof this.prerelease[i2] === "number") {
this.prerelease[i2]++;
i2 = -2;
}
}
if (i2 === -1) {
this.prerelease.push(0);
}
}
if (identifier) {
if (this.prerelease[0] === identifier) {
if (isNaN(this.prerelease[1])) {
this.prerelease = [identifier, 0];
}
} else {
this.prerelease = [identifier, 0];
}
}
break;
default:
throw new Error("invalid increment argument: " + release);
}
this.format();
this.raw = this.version;
return this;
};
exports.inc = inc;
function inc(version, release, loose, identifier) {
if (typeof loose === "string") {
identifier = loose;
loose = void 0;
}
try {
return new SemVer(version, loose).inc(release, identifier).version;
} catch (er) {
return null;
}
}
exports.diff = diff;
function diff(version1, version2) {
if (eq(version1, version2)) {
return null;
} else {
var v1 = parse(version1);
var v2 = parse(version2);
var prefix = "";
if (v1.prerelease.length || v2.prerelease.length) {
prefix = "pre";
var defaultResult = "prerelease";
}
for (var key in v1) {
if (key === "major" || key === "minor" || key === "patch") {
if (v1[key] !== v2[key]) {
return prefix + key;
}
}
}
return defaultResult;
}
}
exports.compareIdentifiers = compareIdentifiers;
var numeric = /^[0-9]+$/;
function compareIdentifiers(a, b) {
var anum = numeric.test(a);
var bnum = numeric.test(b);
if (anum && bnum) {
a = +a;
b = +b;
}
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
}
exports.rcompareIdentifiers = rcompareIdentifiers;
function rcompareIdentifiers(a, b) {
return compareIdentifiers(b, a);
}
exports.major = major;
function major(a, loose) {
return new SemVer(a, loose).major;
}
exports.minor = minor;
function minor(a, loose) {
return new SemVer(a, loose).minor;
}
exports.patch = patch;
function patch(a, loose) {
return new SemVer(a, loose).patch;
}
exports.compare = compare;
function compare(a, b, loose) {
return new SemVer(a, loose).compare(new SemVer(b, loose));
}
exports.compareLoose = compareLoose;
function compareLoose(a, b) {
return compare(a, b, true);
}
exports.rcompare = rcompare;
function rcompare(a, b, loose) {
return compare(b, a, loose);
}
exports.sort = sort;
function sort(list, loose) {
return list.sort(function(a, b) {
return exports.compare(a, b, loose);
});
}
exports.rsort = rsort;
function rsort(list, loose) {
return list.sort(function(a, b) {
return exports.rcompare(a, b, loose);
});
}
exports.gt = gt;
function gt(a, b, loose) {
return compare(a, b, loose) > 0;
}
exports.lt = lt;
function lt(a, b, loose) {
return compare(a, b, loose) < 0;
}
exports.eq = eq;
function eq(a, b, loose) {
return compare(a, b, loose) === 0;
}
exports.neq = neq;
function neq(a, b, loose) {
return compare(a, b, loose) !== 0;
}
exports.gte = gte;
function gte(a, b, loose) {
return compare(a, b, loose) >= 0;
}
exports.lte = lte;
function lte(a, b, loose) {
return compare(a, b, loose) <= 0;
}
exports.cmp = cmp;
function cmp(a, op, b, loose) {
switch (op) {
case "===":
if (typeof a === "object")
a = a.version;
if (typeof b === "object")
b = b.version;
return a === b;
case "!==":
if (typeof a === "object")
a = a.version;
if (typeof b === "object")
b = b.version;
return a !== b;
case "":
case "=":
case "==":
return eq(a, b, loose);
case "!=":
return neq(a, b, loose);
case ">":
return gt(a, b, loose);
case ">=":
return gte(a, b, loose);
case "<":
return lt(a, b, loose);
case "<=":
return lte(a, b, loose);
default:
throw new TypeError("Invalid operator: " + op);
}
}
exports.Comparator = Comparator;
function Comparator(comp, options) {
if (!options || typeof options !== "object") {
options = {
loose: !!options,
includePrerelease: false
};
}
if (comp instanceof Comparator) {
if (comp.loose === !!options.loose) {
return comp;
} else {
comp = comp.value;
}
}
if (!(this instanceof Comparator)) {
return new Comparator(comp, options);
}
debug2("comparator", comp, options);
this.options = options;
this.loose = !!options.loose;
this.parse(comp);
if (this.semver === ANY) {
this.value = "";
} else {
this.value = this.operator + this.semver.version;
}
debug2("comp", this);
}
var ANY = {};
Comparator.prototype.parse = function(comp) {
var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
var m = comp.match(r);
if (!m) {
throw new TypeError("Invalid comparator: " + comp);
}
this.operator = m[1];
if (this.operator === "=") {
this.operator = "";
}
if (!m[2]) {
this.semver = ANY;
} else {
this.semver = new SemVer(m[2], this.options.loose);
}
};
Comparator.prototype.toString = function() {
return this.value;
};
Comparator.prototype.test = function(version) {
debug2("Comparator.test", version, this.options.loose);
if (this.semver === ANY) {
return true;
}
if (typeof version === "string") {
version = new SemVer(version, this.options);
}
return cmp(version, this.operator, this.semver, this.options);
};
Comparator.prototype.intersects = function(comp, options) {
if (!(comp instanceof Comparator)) {
throw new TypeError("a Comparator is required");
}
if (!options || typeof options !== "object") {
options = {
loose: !!options,
includePrerelease: false
};
}
var rangeTmp;
if (this.operator === "") {
rangeTmp = new Range(comp.value, options);
return satisfies(this.value, rangeTmp, options);
} else if (comp.operator === "") {
rangeTmp = new Range(this.value, options);
return satisfies(comp.semver, rangeTmp, options);
}
var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">");
var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<");
var sameSemVer = this.semver.version === comp.semver.version;
var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<=");
var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"));
var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"));
return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
};
exports.Range = Range;
function Range(range, options) {
if (!options || typeof options !== "object") {
options = {
loose: !!options,
includePrerelease: false
};
}
if (range instanceof Range) {
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
return range;
} else {
return new Range(range.raw, options);
}
}
if (range instanceof Comparator) {
return new Range(range.value, options);
}
if (!(this instanceof Range)) {
return new Range(range, options);
}
this.options = options;
this.loose = !!options.loose;
this.includePrerelease = !!options.includePrerelease;
this.raw = range;
this.set = range.split(/\s*\|\|\s*/).map(function(range2) {
return this.parseRange(range2.trim());
}, this).filter(function(c) {
return c.length;
});
if (!this.set.length) {
throw new TypeError("Invalid SemVer Range: " + range);
}
this.format();
}
Range.prototype.format = function() {
this.range = this.set.map(function(comps) {
return comps.join(" ").trim();
}).join("||").trim();
return this.range;
};
Range.prototype.toString = function() {
return this.range;
};
Range.prototype.parseRange = function(range) {
var loose = this.options.loose;
range = range.trim();
var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
range = range.replace(hr, hyphenReplace);
debug2("hyphen replace", range);
range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
debug2("comparator trim", range, re[COMPARATORTRIM]);
range = range.replace(re[TILDETRIM], tildeTrimReplace);
range = range.replace(re[CARETTRIM], caretTrimReplace);
range = range.split(/\s+/).join(" ");
var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
var set = range.split(" ").map(function(comp) {
return parseComparator(comp, this.options);
}, this).join(" ").split(/\s+/);
if (this.options.loose) {
set = set.filter(function(comp) {
return !!comp.match(compRe);
});
}
set = set.map(function(comp) {
return new Comparator(comp, this.options);
}, this);
return set;
};
Range.prototype.intersects = function(range, options) {
if (!(range instanceof Range)) {
throw new TypeError("a Range is required");
}
return this.set.some(function(thisComparators) {
return thisComparators.every(function(thisComparator) {
return range.set.some(function(rangeComparators) {
return rangeComparators.every(function(rangeComparator) {
return thisComparator.intersects(rangeComparator, options);
});
});
});
});
};
exports.toComparators = toComparators;
function toComparators(range, options) {
return new Range(range, options).set.map(function(comp) {
return comp.map(function(c) {
return c.value;
}).join(" ").trim().split(" ");
});
}
function parseComparator(comp, options) {
debug2("comp", comp, options);
comp = replaceCarets(comp, options);
debug2("caret", comp);
comp = replaceTildes(comp, options);
debug2("tildes", comp);
comp = replaceXRanges(comp, options);
debug2("xrange", comp);
comp = replaceStars(comp, options);
debug2("stars", comp);
return comp;
}
function isX(id) {
return !id || id.toLowerCase() === "x" || id === "*";
}
function replaceTildes(comp, options) {
return comp.trim().split(/\s+/).map(function(comp2) {
return replaceTilde(comp2, options);
}).join(" ");
}
function replaceTilde(comp, options) {
var r = options.loose ? re[TILDELOOSE] : re[TILDE];
return comp.replace(r, function(_, M, m, p, pr) {
debug2("tilde", comp, _, M, m, p, pr);
var ret;
if (isX(M)) {
ret = "";
} else if (isX(m)) {
ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
} else if (isX(p)) {
ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
} else if (pr) {
debug2("replaceTilde pr", pr);
ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
} else {
ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
}
debug2("tilde return", ret);
return ret;
});
}
function replaceCarets(comp, options) {
return comp.trim().split(/\s+/).map(function(comp2) {
return replaceCaret(comp2, options);
}).join(" ");
}
function replaceCaret(comp, options) {
debug2("caret", comp, options);
var r = options.loose ? re[CARETLOOSE] : re[CARET];
return comp.replace(r, function(_, M, m, p, pr) {
debug2("caret", comp, _, M, m, p, pr);
var ret;
if (isX(M)) {
ret = "";
} else if (isX(m)) {
ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
} else if (isX(p)) {
if (M === "0") {
ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
} else {
ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0";
}
} else if (pr) {
debug2("replaceCaret pr", pr);
if (M === "0") {
if (m === "0") {
ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1);
} else {
ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0";
}
} else {
ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0";
}
} else {
debug2("no pr");
if (M === "0") {
if (m === "0") {
ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1);
} else {
ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
}
} else {
ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0";
}
}
debug2("caret return", ret);
return ret;
});
}
function replaceXRanges(comp, options) {
debug2("replaceXRanges", comp, options);
return comp.split(/\s+/).map(function(comp2) {
return replaceXRange(comp2, options);
}).join(" ");
}
function replaceXRange(comp, options) {
comp = comp.trim();
var r = options.loose ? re[XRANGELOOSE] : re[XRANGE];
return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
debug2("xRange", comp, ret, gtlt, M, m, p, pr);
var xM = isX(M);
var xm = xM || isX(m);
var xp = xm || isX(p);
var anyX = xp;
if (gtlt === "=" && anyX) {
gtlt = "";
}
if (xM) {
if (gtlt === ">" || gtlt === "<") {
ret = "<0.0.0";
} else {
ret = "*";
}
} else if (gtlt && anyX) {
if (xm) {
m = 0;
}
p = 0;
if (gtlt === ">") {
gtlt = ">=";
if (xm) {
M = +M + 1;
m = 0;
p = 0;
} else {
m = +m + 1;
p = 0;
}
} else if (gtlt === "<=") {
gtlt = "<";
if (xm) {
M = +M + 1;
} else {
m = +m + 1;
}
}
ret = gtlt + M + "." + m + "." + p;
} else if (xm) {
ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
} else if (xp) {
ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
}
debug2("xRange return", ret);
return ret;
});
}
function replaceStars(comp, options) {
debug2("replaceStars", comp, options);
return comp.trim().replace(re[STAR], "");
}
function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
if (isX(fM)) {
from = "";
} else if (isX(fm)) {
from = ">=" + fM + ".0.0";
} else if (isX(fp)) {
from = ">=" + fM + "." + fm + ".0";
} else {
from = ">=" + from;
}
if (isX(tM)) {
to = "";
} else if (isX(tm)) {
to = "<" + (+tM + 1) + ".0.0";
} else if (isX(tp)) {
to = "<" + tM + "." + (+tm + 1) + ".0";
} else if (tpr) {
to = "<=" + tM + "." + tm + "." + tp + "-" + tpr;
} else {
to = "<=" + to;
}
return (from + " " + to).trim();
}
Range.prototype.test = function(version) {
if (!version) {
return false;
}
if (typeof version === "string") {
version = new SemVer(version, this.options);
}
for (var i2 = 0; i2 < this.set.length; i2++) {
if (testSet(this.set[i2], version, this.options)) {
return true;
}
}
return false;
};
function testSet(set, version, options) {
for (var i2 = 0; i2 < set.length; i2++) {
if (!set[i2].test(version)) {
return false;
}
}
if (version.prerelease.length && !options.includePrerelease) {
for (i2 = 0; i2 < set.length; i2++) {
debug2(set[i2].semver);
if (set[i2].semver === ANY) {
continue;
}
if (set[i2].semver.prerelease.length > 0) {
var allowed = set[i2].semver;
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
return true;
}
}
}
return false;
}
return true;
}
exports.satisfies = satisfies;
function satisfies(version, range, options) {
try {
range = new Range(range, options);
} catch (er) {
return false;
}
return range.test(version);
}
exports.maxSatisfying = maxSatisfying;
function maxSatisfying(versions, range, options) {
var max = null;
var maxSV = null;
try {
var rangeObj = new Range(range, options);
} catch (er) {
return null;
}
versions.forEach(function(v) {
if (rangeObj.test(v)) {
if (!max || maxSV.compare(v) === -1) {
max = v;
maxSV = new SemVer(max, options);
}
}
});
return max;
}
exports.minSatisfying = minSatisfying;
function minSatisfying(versions, range, options) {
var min = null;
var minSV = null;
try {
var rangeObj = new Range(range, options);
} catch (er) {
return null;
}
versions.forEach(function(v) {
if (rangeObj.test(v)) {
if (!min || minSV.compare(v) === 1) {
min = v;
minSV = new SemVer(min, options);
}
}
});
return min;
}
exports.minVersion = minVersion;
function minVersion(range, loose) {
range = new Range(range, loose);
var minver = new SemVer("0.0.0");
if (range.test(minver)) {
return minver;
}
minver = new SemVer("0.0.0-0");
if (range.test(minver)) {
return minver;
}
minver = null;
for (var i2 = 0; i2 < range.set.length; ++i2) {
var comparators = range.set[i2];
comparators.forEach(function(comparator) {
var compver = new SemVer(comparator.semver.version);
switch (comparator.operator) {
case ">":
if (compver.prerelease.length === 0) {
compver.patch++;
} else {
compver.prerelease.push(0);
}
compver.raw = compver.format();
case "":
case ">=":
if (!minver || gt(minver, compver)) {
minver = compver;
}
break;
case "<":
case "<=":
break;
default:
throw new Error("Unexpected operation: " + comparator.operator);
}
});
}
if (minver && range.test(minver)) {
return minver;
}
return null;
}
exports.validRange = validRange;
function validRange(range, options) {
try {
return new Range(range, options).range || "*";
} catch (er) {
return null;
}
}
exports.ltr = ltr;
function ltr(version, range, options) {
return outside(version, range, "<", options);
}
exports.gtr = gtr;
function gtr(version, range, options) {
return outside(version, range, ">", options);
}
exports.outside = outside;
function outside(version, range, hilo, options) {
version = new SemVer(version, options);
range = new Range(range, options);
var gtfn, ltefn, ltfn, comp, ecomp;
switch (hilo) {
case ">":
gtfn = gt;
ltefn = lte;
ltfn = lt;
comp = ">";
ecomp = ">=";
break;
case "<":
gtfn = lt;
ltefn = gte;
ltfn = gt;
comp = "<";
ecomp = "<=";
break;
default:
throw new TypeError('Must provide a hilo val of "<" or ">"');
}
if (satisfies(version, range, options)) {
return false;
}
for (var i2 = 0; i2 < range.set.length; ++i2) {
var comparators = range.set[i2];
var high = null;
var low = null;
comparators.forEach(function(comparator) {
if (comparator.semver === ANY) {
comparator = new Comparator(">=0.0.0");
}
high = high || comparator;
low = low || comparator;
if (gtfn(comparator.semver, high.semver, options)) {
high = comparator;
} else if (ltfn(comparator.semver, low.semver, options)) {
low = comparator;
}
});
if (high.operator === comp || high.operator === ecomp) {
return false;
}
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
return false;
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
return false;
}
}
return true;
}
exports.prerelease = prerelease;
function prerelease(version, options) {
var parsed = parse(version, options);
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
}
exports.intersects = intersects;
function intersects(r1, r2, options) {
r1 = new Range(r1, options);
r2 = new Range(r2, options);
return r1.intersects(r2);
}
exports.coerce = coerce;
function coerce(version) {
if (version instanceof SemVer) {
return version;
}
if (typeof version !== "string") {
return null;
}
var match = version.match(re[COERCE]);
if (match == null) {
return null;
}
return parse(match[1] + "." + (match[2] || "0") + "." + (match[3] || "0"));
}
}
});
// node_modules/cross-spawn/lib/parse.js
var require_parse3 = __commonJS({
"node_modules/cross-spawn/lib/parse.js"(exports, module2) {
"use strict";
var path5 = require("path");
var niceTry = require_src();
var resolveCommand = require_resolveCommand();
var escape = require_escape();
var readShebang = require_readShebang();
var semver2 = require_semver3();
var isWin = process.platform === "win32";
var isExecutableRegExp = /\.(?:com|exe)$/i;
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
var supportsShellOption = niceTry(() => semver2.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", true)) || false;
function detectShebang(parsed) {
parsed.file = resolveCommand(parsed);
const shebang = parsed.file && readShebang(parsed.file);
if (shebang) {
parsed.args.unshift(parsed.file);
parsed.command = shebang;
return resolveCommand(parsed);
}
return parsed.file;
}
function parseNonShell(parsed) {
if (!isWin) {
return parsed;
}
const commandFile = detectShebang(parsed);
const needsShell = !isExecutableRegExp.test(commandFile);
if (parsed.options.forceShell || needsShell) {
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
parsed.command = path5.normalize(parsed.command);
parsed.command = escape.command(parsed.command);
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
parsed.command = process.env.comspec || "cmd.exe";
parsed.options.windowsVerbatimArguments = true;
}
return parsed;
}
function parseShell(parsed) {
if (supportsShellOption) {
return parsed;
}
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
if (isWin) {
parsed.command = typeof parsed.options.shell === "string" ? parsed.options.shell : process.env.comspec || "cmd.exe";
parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
parsed.options.windowsVerbatimArguments = true;
} else {
if (typeof parsed.options.shell === "string") {
parsed.command = parsed.options.shell;
} else if (process.platform === "android") {
parsed.command = "/system/bin/sh";
} else {
parsed.command = "/bin/sh";
}
parsed.args = ["-c", shellCommand];
}
return parsed;
}
function parse(command, args, options) {
if (args && !Array.isArray(args)) {
options = args;
args = null;
}
args = args ? args.slice(0) : [];
options = Object.assign({}, options);
const parsed = {
command,
args,
options,
file: void 0,
original: {
command,
args
}
};
return options.shell ? parseShell(parsed) : parseNonShell(parsed);
}
module2.exports = parse;
}
});
// node_modules/cross-spawn/lib/enoent.js
var require_enoent = __commonJS({
"node_modules/cross-spawn/lib/enoent.js"(exports, module2) {
"use strict";
var isWin = process.platform === "win32";
function notFoundError(original, syscall) {
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
code: "ENOENT",
errno: "ENOENT",
syscall: `${syscall} ${original.command}`,
path: original.command,
spawnargs: original.args
});
}
function hookChildProcess(cp, parsed) {
if (!isWin) {
return;
}
const originalEmit = cp.emit;
cp.emit = function(name, arg1) {
if (name === "exit") {
const err = verifyENOENT(arg1, parsed, "spawn");
if (err) {
return originalEmit.call(cp, "error", err);
}
}
return originalEmit.apply(cp, arguments);
};
}
function verifyENOENT(status, parsed) {
if (isWin && status === 1 && !parsed.file) {
return notFoundError(parsed.original, "spawn");
}
return null;
}
function verifyENOENTSync(status, parsed) {
if (isWin && status === 1 && !parsed.file) {
return notFoundError(parsed.original, "spawnSync");
}
return null;
}
module2.exports = {
hookChildProcess,
verifyENOENT,
verifyENOENTSync,
notFoundError
};
}
});
// node_modules/cross-spawn/index.js
var require_cross_spawn = __commonJS({
"node_modules/cross-spawn/index.js"(exports, module2) {
"use strict";
var cp = require("child_process");
var parse = require_parse3();
var enoent = require_enoent();
function spawn(command, args, options) {
const parsed = parse(command, args, options);
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
enoent.hookChildProcess(spawned, parsed);
return spawned;
}
function spawnSync(command, args, options) {
const parsed = parse(command, args, options);
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
return result;
}
module2.exports = spawn;
module2.exports.spawn = spawn;
module2.exports.sync = spawnSync;
module2.exports._parse = parse;
module2.exports._enoent = enoent;
}
});
// node_modules/strip-eof/index.js
var require_strip_eof = __commonJS({
"node_modules/strip-eof/index.js"(exports, module2) {
"use strict";
module2.exports = function(x) {
var lf = typeof x === "string" ? "\n" : "\n".charCodeAt();
var cr = typeof x === "string" ? "\r" : "\r".charCodeAt();
if (x[x.length - 1] === lf) {
x = x.slice(0, x.length - 1);
}
if (x[x.length - 1] === cr) {
x = x.slice(0, x.length - 1);
}
return x;
};
}
});
// node_modules/npm-run-path/index.js
var require_npm_run_path = __commonJS({
"node_modules/npm-run-path/index.js"(exports, module2) {
"use strict";
var path5 = require("path");
var pathKey = require_path_key();
module2.exports = (opts) => {
opts = Object.assign({
cwd: process.cwd(),
path: process.env[pathKey()]
}, opts);
let prev;
let pth = path5.resolve(opts.cwd);
const ret = [];
while (prev !== pth) {
ret.push(path5.join(pth, "node_modules/.bin"));
prev = pth;
pth = path5.resolve(pth, "..");
}
ret.push(path5.dirname(process.execPath));
return ret.concat(opts.path).join(path5.delimiter);
};
module2.exports.env = (opts) => {
opts = Object.assign({
env: process.env
}, opts);
const env = Object.assign({}, opts.env);
const path6 = pathKey({ env });
opts.path = env[path6];
env[path6] = module2.exports(opts);
return env;
};
}
});
// node_modules/is-stream/index.js
var require_is_stream = __commonJS({
"node_modules/is-stream/index.js"(exports, module2) {
"use strict";
var isStream = module2.exports = function(stream) {
return stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
};
isStream.writable = function(stream) {
return isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
};
isStream.readable = function(stream) {
return isStream(stream) && stream.readable !== false && typeof stream._read === "function" && typeof stream._readableState === "object";
};
isStream.duplex = function(stream) {
return isStream.writable(stream) && isStream.readable(stream);
};
isStream.transform = function(stream) {
return isStream.duplex(stream) && typeof stream._transform === "function" && typeof stream._transformState === "object";
};
}
});
// node_modules/end-of-stream/index.js
var require_end_of_stream = __commonJS({
"node_modules/end-of-stream/index.js"(exports, module2) {
var once = require_once();
var noop = function() {
};
var isRequest = function(stream) {
return stream.setHeader && typeof stream.abort === "function";
};
var isChildProcess = function(stream) {
return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3;
};
var eos = function(stream, opts, callback) {
if (typeof opts === "function")
return eos(stream, null, opts);
if (!opts)
opts = {};
callback = once(callback || noop);
var ws = stream._writableState;
var rs = stream._readableState;
var readable = opts.readable || opts.readable !== false && stream.readable;
var writable = opts.writable || opts.writable !== false && stream.writable;
var cancelled = false;
var onlegacyfinish = function() {
if (!stream.writable)
onfinish();
};
var onfinish = function() {
writable = false;
if (!readable)
callback.call(stream);
};
var onend = function() {
readable = false;
if (!writable)
callback.call(stream);
};
var onexit = function(exitCode) {
callback.call(stream, exitCode ? new Error("exited with error code: " + exitCode) : null);
};
var onerror = function(err) {
callback.call(stream, err);
};
var onclose = function() {
process.nextTick(onclosenexttick);
};
var onclosenexttick = function() {
if (cancelled)
return;
if (readable && !(rs && (rs.ended && !rs.destroyed)))
return callback.call(stream, new Error("premature close"));
if (writable && !(ws && (ws.ended && !ws.destroyed)))
return callback.call(stream, new Error("premature close"));
};
var onrequest = function() {
stream.req.on("finish", onfinish);
};
if (isRequest(stream)) {
stream.on("complete", onfinish);
stream.on("abort", onclose);
if (stream.req)
onrequest();
else
stream.on("request", onrequest);
} else if (writable && !ws) {
stream.on("end", onlegacyfinish);
stream.on("close", onlegacyfinish);
}
if (isChildProcess(stream))
stream.on("exit", onexit);
stream.on("end", onend);
stream.on("finish", onfinish);
if (opts.error !== false)
stream.on("error", onerror);
stream.on("close", onclose);
return function() {
cancelled = true;
stream.removeListener("complete", onfinish);
stream.removeListener("abort", onclose);
stream.removeListener("request", onrequest);
if (stream.req)
stream.req.removeListener("finish", onfinish);
stream.removeListener("end", onlegacyfinish);
stream.removeListener("close", onlegacyfinish);
stream.removeListener("finish", onfinish);
stream.removeListener("exit", onexit);
stream.removeListener("end", onend);
stream.removeListener("error", onerror);
stream.removeListener("close", onclose);
};
};
module2.exports = eos;
}
});
// node_modules/pump/index.js
var require_pump = __commonJS({
"node_modules/pump/index.js"(exports, module2) {
var once = require_once();
var eos = require_end_of_stream();
var fs5 = require("fs");
var noop = function() {
};
var ancient = /^v?\.0/.test(process.version);
var isFn = function(fn) {
return typeof fn === "function";
};
var isFS = function(stream) {
if (!ancient)
return false;
if (!fs5)
return false;
return (stream instanceof (fs5.ReadStream || noop) || stream instanceof (fs5.WriteStream || noop)) && isFn(stream.close);
};
var isRequest = function(stream) {
return stream.setHeader && isFn(stream.abort);
};
var destroyer = function(stream, reading, writing, callback) {
callback = once(callback);
var closed = false;
stream.on("close", function() {
closed = true;
});
eos(stream, { readable: reading, writable: writing }, function(err) {
if (err)
return callback(err);
closed = true;
callback();
});
var destroyed = false;
return function(err) {
if (closed)
return;
if (destroyed)
return;
destroyed = true;
if (isFS(stream))
return stream.close(noop);
if (isRequest(stream))
return stream.abort();
if (isFn(stream.destroy))
return stream.destroy();
callback(err || new Error("stream was destroyed"));
};
};
var call = function(fn) {
fn();
};
var pipe = function(from, to) {
return from.pipe(to);
};
var pump = function() {
var streams = Array.prototype.slice.call(arguments);
var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop;
if (Array.isArray(streams[0]))
streams = streams[0];
if (streams.length < 2)
throw new Error("pump requires two streams per minimum");
var error;
var destroys = streams.map(function(stream, i) {
var reading = i < streams.length - 1;
var writing = i > 0;
return destroyer(stream, reading, writing, function(err) {
if (!error)
error = err;
if (err)
destroys.forEach(call);
if (reading)
return;
destroys.forEach(call);
callback(error);
});
});
return streams.reduce(pipe);
};
module2.exports = pump;
}
});
// node_modules/get-stream/buffer-stream.js
var require_buffer_stream = __commonJS({
"node_modules/get-stream/buffer-stream.js"(exports, module2) {
"use strict";
var { PassThrough } = require("stream");
module2.exports = (options) => {
options = Object.assign({}, options);
const { array } = options;
let { encoding } = options;
const buffer = encoding === "buffer";
let objectMode = false;
if (array) {
objectMode = !(encoding || buffer);
} else {
encoding = encoding || "utf8";
}
if (buffer) {
encoding = null;
}
let len = 0;
const ret = [];
const stream = new PassThrough({ objectMode });
if (encoding) {
stream.setEncoding(encoding);
}
stream.on("data", (chunk) => {
ret.push(chunk);
if (objectMode) {
len = ret.length;
} else {
len += chunk.length;
}
});
stream.getBufferedValue = () => {
if (array) {
return ret;
}
return buffer ? Buffer.concat(ret, len) : ret.join("");
};
stream.getBufferedLength = () => len;
return stream;
};
}
});
// node_modules/get-stream/index.js
var require_get_stream = __commonJS({
"node_modules/get-stream/index.js"(exports, module2) {
"use strict";
var pump = require_pump();
var bufferStream = require_buffer_stream();
var MaxBufferError = class extends Error {
constructor() {
super("maxBuffer exceeded");
this.name = "MaxBufferError";
}
};
function getStream(inputStream, options) {
if (!inputStream) {
return Promise.reject(new Error("Expected a stream"));
}
options = Object.assign({ maxBuffer: Infinity }, options);
const { maxBuffer } = options;
let stream;
return new Promise((resolve, reject) => {
const rejectPromise = (error) => {
if (error) {
error.bufferedData = stream.getBufferedValue();
}
reject(error);
};
stream = pump(inputStream, bufferStream(options), (error) => {
if (error) {
rejectPromise(error);
return;
}
resolve();
});
stream.on("data", () => {
if (stream.getBufferedLength() > maxBuffer) {
rejectPromise(new MaxBufferError());
}
});
}).then(() => stream.getBufferedValue());
}
module2.exports = getStream;
module2.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, { encoding: "buffer" }));
module2.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, { array: true }));
module2.exports.MaxBufferError = MaxBufferError;
}
});
// node_modules/p-finally/index.js
var require_p_finally = __commonJS({
"node_modules/p-finally/index.js"(exports, module2) {
"use strict";
module2.exports = (promise, onFinally) => {
onFinally = onFinally || (() => {
});
return promise.then(
(val) => new Promise((resolve) => {
resolve(onFinally());
}).then(() => val),
(err) => new Promise((resolve) => {
resolve(onFinally());
}).then(() => {
throw err;
})
);
};
}
});
// node_modules/signal-exit/signals.js
var require_signals = __commonJS({
"node_modules/signal-exit/signals.js"(exports, module2) {
module2.exports = [
"SIGABRT",
"SIGALRM",
"SIGHUP",
"SIGINT",
"SIGTERM"
];
if (process.platform !== "win32") {
module2.exports.push(
"SIGVTALRM",
"SIGXCPU",
"SIGXFSZ",
"SIGUSR2",
"SIGTRAP",
"SIGSYS",
"SIGQUIT",
"SIGIOT"
);
}
if (process.platform === "linux") {
module2.exports.push(
"SIGIO",
"SIGPOLL",
"SIGPWR",
"SIGSTKFLT",
"SIGUNUSED"
);
}
}
});
// node_modules/signal-exit/index.js
var require_signal_exit = __commonJS({
"node_modules/signal-exit/index.js"(exports, module2) {
var process2 = global.process;
var processOk = function(process3) {
return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
};
if (!processOk(process2)) {
module2.exports = function() {
return function() {
};
};
} else {
assert = require("assert");
signals = require_signals();
isWin = /^win/i.test(process2.platform);
EE = require("events");
if (typeof EE !== "function") {
EE = EE.EventEmitter;
}
if (process2.__signal_exit_emitter__) {
emitter = process2.__signal_exit_emitter__;
} else {
emitter = process2.__signal_exit_emitter__ = new EE();
emitter.count = 0;
emitter.emitted = {};
}
if (!emitter.infinite) {
emitter.setMaxListeners(Infinity);
emitter.infinite = true;
}
module2.exports = function(cb, opts) {
if (!processOk(global.process)) {
return function() {
};
}
assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
if (loaded === false) {
load();
}
var ev = "exit";
if (opts && opts.alwaysLast) {
ev = "afterexit";
}
var remove = function() {
emitter.removeListener(ev, cb);
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
unload();
}
};
emitter.on(ev, cb);
return remove;
};
unload = function unload2() {
if (!loaded || !processOk(global.process)) {
return;
}
loaded = false;
signals.forEach(function(sig) {
try {
process2.removeListener(sig, sigListeners[sig]);
} catch (er) {
}
});
process2.emit = originalProcessEmit;
process2.reallyExit = originalProcessReallyExit;
emitter.count -= 1;
};
module2.exports.unload = unload;
emit = function emit2(event, code, signal) {
if (emitter.emitted[event]) {
return;
}
emitter.emitted[event] = true;
emitter.emit(event, code, signal);
};
sigListeners = {};
signals.forEach(function(sig) {
sigListeners[sig] = function listener() {
if (!processOk(global.process)) {
return;
}
var listeners = process2.listeners(sig);
if (listeners.length === emitter.count) {
unload();
emit("exit", null, sig);
emit("afterexit", null, sig);
if (isWin && sig === "SIGHUP") {
sig = "SIGINT";
}
process2.kill(process2.pid, sig);
}
};
});
module2.exports.signals = function() {
return signals;
};
loaded = false;
load = function load2() {
if (loaded || !processOk(global.process)) {
return;
}
loaded = true;
emitter.count += 1;
signals = signals.filter(function(sig) {
try {
process2.on(sig, sigListeners[sig]);
return true;
} catch (er) {
return false;
}
});
process2.emit = processEmit;
process2.reallyExit = processReallyExit;
};
module2.exports.load = load;
originalProcessReallyExit = process2.reallyExit;
processReallyExit = function processReallyExit2(code) {
if (!processOk(global.process)) {
return;
}
process2.exitCode = code || 0;
emit("exit", process2.exitCode, null);
emit("afterexit", process2.exitCode, null);
originalProcessReallyExit.call(process2, process2.exitCode);
};
originalProcessEmit = process2.emit;
processEmit = function processEmit2(ev, arg) {
if (ev === "exit" && processOk(global.process)) {
if (arg !== void 0) {
process2.exitCode = arg;
}
var ret = originalProcessEmit.apply(this, arguments);
emit("exit", process2.exitCode, null);
emit("afterexit", process2.exitCode, null);
return ret;
} else {
return originalProcessEmit.apply(this, arguments);
}
};
}
var assert;
var signals;
var isWin;
var EE;
var emitter;
var unload;
var emit;
var sigListeners;
var loaded;
var load;
var originalProcessReallyExit;
var processReallyExit;
var originalProcessEmit;
var processEmit;
}
});
// node_modules/execa/lib/errname.js
var require_errname = __commonJS({
"node_modules/execa/lib/errname.js"(exports, module2) {
"use strict";
var util = require("util");
var uv;
if (typeof util.getSystemErrorName === "function") {
module2.exports = util.getSystemErrorName;
} else {
try {
uv = process.binding("uv");
if (typeof uv.errname !== "function") {
throw new TypeError("uv.errname is not a function");
}
} catch (err) {
console.error("execa/lib/errname: unable to establish process.binding('uv')", err);
uv = null;
}
module2.exports = (code) => errname(uv, code);
}
module2.exports.__test__ = errname;
function errname(uv2, code) {
if (uv2) {
return uv2.errname(code);
}
if (!(code < 0)) {
throw new Error("err >= 0");
}
return `Unknown system error ${code}`;
}
}
});
// node_modules/execa/lib/stdio.js
var require_stdio = __commonJS({
"node_modules/execa/lib/stdio.js"(exports, module2) {
"use strict";
var alias = ["stdin", "stdout", "stderr"];
var hasAlias = (opts) => alias.some((x) => Boolean(opts[x]));
module2.exports = (opts) => {
if (!opts) {
return null;
}
if (opts.stdio && hasAlias(opts)) {
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map((x) => `\`${x}\``).join(", ")}`);
}
if (typeof opts.stdio === "string") {
return opts.stdio;
}
const stdio = opts.stdio || [];
if (!Array.isArray(stdio)) {
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
}
const result = [];
const len = Math.max(stdio.length, alias.length);
for (let i = 0; i < len; i++) {
let value = null;
if (stdio[i] !== void 0) {
value = stdio[i];
} else if (opts[alias[i]] !== void 0) {
value = opts[alias[i]];
}
result[i] = value;
}
return result;
};
}
});
// node_modules/execa/index.js
var require_execa = __commonJS({
"node_modules/execa/index.js"(exports, module2) {
"use strict";
var path5 = require("path");
var childProcess = require("child_process");
var crossSpawn = require_cross_spawn();
var stripEof = require_strip_eof();
var npmRunPath = require_npm_run_path();
var isStream = require_is_stream();
var _getStream = require_get_stream();
var pFinally = require_p_finally();
var onExit = require_signal_exit();
var errname = require_errname();
var stdio = require_stdio();
var TEN_MEGABYTES = 1e3 * 1e3 * 10;
function handleArgs(cmd, args, opts) {
let parsed;
opts = Object.assign({
extendEnv: true,
env: {}
}, opts);
if (opts.extendEnv) {
opts.env = Object.assign({}, process.env, opts.env);
}
if (opts.__winShell === true) {
delete opts.__winShell;
parsed = {
command: cmd,
args,
options: opts,
file: cmd,
original: {
cmd,
args
}
};
} else {
parsed = crossSpawn._parse(cmd, args, opts);
}
opts = Object.assign({
maxBuffer: TEN_MEGABYTES,
buffer: true,
stripEof: true,
preferLocal: true,
localDir: parsed.options.cwd || process.cwd(),
encoding: "utf8",
reject: true,
cleanup: true
}, parsed.options);
opts.stdio = stdio(opts);
if (opts.preferLocal) {
opts.env = npmRunPath.env(Object.assign({}, opts, { cwd: opts.localDir }));
}
if (opts.detached) {
opts.cleanup = false;
}
if (process.platform === "win32" && path5.basename(parsed.command) === "cmd.exe") {
parsed.args.unshift("/q");
}
return {
cmd: parsed.command,
args: parsed.args,
opts,
parsed
};
}
function handleInput(spawned, input) {
if (input === null || input === void 0) {
return;
}
if (isStream(input)) {
input.pipe(spawned.stdin);
} else {
spawned.stdin.end(input);
}
}
function handleOutput(opts, val) {
if (val && opts.stripEof) {
val = stripEof(val);
}
return val;
}
function handleShell(fn, cmd, opts) {
let file = "/bin/sh";
let args = ["-c", cmd];
opts = Object.assign({}, opts);
if (process.platform === "win32") {
opts.__winShell = true;
file = process.env.comspec || "cmd.exe";
args = ["/s", "/c", `"${cmd}"`];
opts.windowsVerbatimArguments = true;
}
if (opts.shell) {
file = opts.shell;
delete opts.shell;
}
return fn(file, args, opts);
}
function getStream(process2, stream, { encoding, buffer, maxBuffer }) {
if (!process2[stream]) {
return null;
}
let ret;
if (!buffer) {
ret = new Promise((resolve, reject) => {
process2[stream].once("end", resolve).once("error", reject);
});
} else if (encoding) {
ret = _getStream(process2[stream], {
encoding,
maxBuffer
});
} else {
ret = _getStream.buffer(process2[stream], { maxBuffer });
}
return ret.catch((err) => {
err.stream = stream;
err.message = `${stream} ${err.message}`;
throw err;
});
}
function makeError(result, options) {
const { stdout, stderr } = result;
let err = result.error;
const { code, signal } = result;
const { parsed, joinedCmd } = options;
const timedOut = options.timedOut || false;
if (!err) {
let output = "";
if (Array.isArray(parsed.opts.stdio)) {
if (parsed.opts.stdio[2] !== "inherit") {
output += output.length > 0 ? stderr : `
${stderr}`;
}
if (parsed.opts.stdio[1] !== "inherit") {
output += `
${stdout}`;
}
} else if (parsed.opts.stdio !== "inherit") {
output = `
${stderr}${stdout}`;
}
err = new Error(`Command failed: ${joinedCmd}${output}`);
err.code = code < 0 ? errname(code) : code;
}
err.stdout = stdout;
err.stderr = stderr;
err.failed = true;
err.signal = signal || null;
err.cmd = joinedCmd;
err.timedOut = timedOut;
return err;
}
function joinCmd(cmd, args) {
let joinedCmd = cmd;
if (Array.isArray(args) && args.length > 0) {
joinedCmd += " " + args.join(" ");
}
return joinedCmd;
}
module2.exports = (cmd, args, opts) => {
const parsed = handleArgs(cmd, args, opts);
const { encoding, buffer, maxBuffer } = parsed.opts;
const joinedCmd = joinCmd(cmd, args);
let spawned;
try {
spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts);
} catch (err) {
return Promise.reject(err);
}
let removeExitHandler;
if (parsed.opts.cleanup) {
removeExitHandler = onExit(() => {
spawned.kill();
});
}
let timeoutId = null;
let timedOut = false;
const cleanup = () => {
if (timeoutId) {
clearTimeout(timeoutId);
timeoutId = null;
}
if (removeExitHandler) {
removeExitHandler();
}
};
if (parsed.opts.timeout > 0) {
timeoutId = setTimeout(() => {
timeoutId = null;
timedOut = true;
spawned.kill(parsed.opts.killSignal);
}, parsed.opts.timeout);
}
const processDone = new Promise((resolve) => {
spawned.on("exit", (code, signal) => {
cleanup();
resolve({ code, signal });
});
spawned.on("error", (err) => {
cleanup();
resolve({ error: err });
});
if (spawned.stdin) {
spawned.stdin.on("error", (err) => {
cleanup();
resolve({ error: err });
});
}
});
function destroy() {
if (spawned.stdout) {
spawned.stdout.destroy();
}
if (spawned.stderr) {
spawned.stderr.destroy();
}
}
const handlePromise = () => pFinally(Promise.all([
processDone,
getStream(spawned, "stdout", { encoding, buffer, maxBuffer }),
getStream(spawned, "stderr", { encoding, buffer, maxBuffer })
]).then((arr) => {
const result = arr[0];
result.stdout = arr[1];
result.stderr = arr[2];
if (result.error || result.code !== 0 || result.signal !== null) {
const err = makeError(result, {
joinedCmd,
parsed,
timedOut
});
err.killed = err.killed || spawned.killed;
if (!parsed.opts.reject) {
return err;
}
throw err;
}
return {
stdout: handleOutput(parsed.opts, result.stdout),
stderr: handleOutput(parsed.opts, result.stderr),
code: 0,
failed: false,
killed: false,
signal: null,
cmd: joinedCmd,
timedOut: false
};
}), destroy);
crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
handleInput(spawned, parsed.opts.input);
spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected);
spawned.catch = (onrejected) => handlePromise().catch(onrejected);
return spawned;
};
module2.exports.stdout = (...args) => module2.exports(...args).then((x) => x.stdout);
module2.exports.stderr = (...args) => module2.exports(...args).then((x) => x.stderr);
module2.exports.shell = (cmd, opts) => handleShell(module2.exports, cmd, opts);
module2.exports.sync = (cmd, args, opts) => {
const parsed = handleArgs(cmd, args, opts);
const joinedCmd = joinCmd(cmd, args);
if (isStream(parsed.opts.input)) {
throw new TypeError("The `input` option cannot be a stream in sync mode");
}
const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts);
result.code = result.status;
if (result.error || result.status !== 0 || result.signal !== null) {
const err = makeError(result, {
joinedCmd,
parsed
});
if (!parsed.opts.reject) {
return err;
}
throw err;
}
return {
stdout: handleOutput(parsed.opts, result.stdout),
stderr: handleOutput(parsed.opts, result.stderr),
code: 0,
failed: false,
signal: null,
cmd: joinedCmd,
timedOut: false
};
};
module2.exports.shellSync = (cmd, opts) => handleShell(module2.exports.sync, cmd, opts);
}
});
// node_modules/windows-release/index.js
var require_windows_release = __commonJS({
"node_modules/windows-release/index.js"(exports, module2) {
"use strict";
var os3 = require("os");
var execa = require_execa();
var names = /* @__PURE__ */ new Map([
["10.0", "10"],
["6.3", "8.1"],
["6.2", "8"],
["6.1", "7"],
["6.0", "Vista"],
["5.2", "Server 2003"],
["5.1", "XP"],
["5.0", "2000"],
["4.9", "ME"],
["4.1", "98"],
["4.0", "95"]
]);
var windowsRelease = (release) => {
const version = /\d+\.\d/.exec(release || os3.release());
if (release && !version) {
throw new Error("`release` argument doesn't match `n.n`");
}
const ver = (version || [])[0];
if ((!release || release === os3.release()) && ["6.1", "6.2", "6.3", "10.0"].includes(ver)) {
let stdout;
try {
stdout = execa.sync("wmic", ["os", "get", "Caption"]).stdout || "";
} catch (_) {
stdout = execa.sync("powershell", ["(Get-CimInstance -ClassName Win32_OperatingSystem).caption"]).stdout || "";
}
const year = (stdout.match(/2008|2012|2016|2019/) || [])[0];
if (year) {
return `Server ${year}`;
}
}
return names.get(ver);
};
module2.exports = windowsRelease;
}
});
// node_modules/os-name/index.js
var require_os_name = __commonJS({
"node_modules/os-name/index.js"(exports, module2) {
"use strict";
var os3 = require("os");
var macosRelease = require_macos_release();
var winRelease = require_windows_release();
var osName = (platform, release) => {
if (!platform && release) {
throw new Error("You can't specify a `release` without specifying `platform`");
}
platform = platform || os3.platform();
let id;
if (platform === "darwin") {
if (!release && os3.platform() === "darwin") {
release = os3.release();
}
const prefix = release ? Number(release.split(".")[0]) > 15 ? "macOS" : "OS X" : "macOS";
id = release ? macosRelease(release).name : "";
return prefix + (id ? " " + id : "");
}
if (platform === "linux") {
if (!release && os3.platform() === "linux") {
release = os3.release();
}
id = release ? release.replace(/^(\d+\.\d+).*/, "$1") : "";
return "Linux" + (id ? " " + id : "");
}
if (platform === "win32") {
if (!release && os3.platform() === "win32") {
release = os3.release();
}
id = release ? winRelease(release) : "";
return "Windows" + (id ? " " + id : "");
}
return platform;
};
module2.exports = osName;
}
});
// node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js
var require_dist_node9 = __commonJS({
"node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function _interopDefault(ex) {
return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
}
var osName = _interopDefault(require_os_name());
function getUserAgent() {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
} catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return "Windows <version undetectable>";
}
throw error;
}
}
exports.getUserAgent = getUserAgent;
}
});
// node_modules/@octokit/rest/package.json
var require_package = __commonJS({
"node_modules/@octokit/rest/package.json"(exports, module2) {
module2.exports = {
name: "@octokit/rest",
version: "16.43.2",
publishConfig: {
access: "public"
},
description: "GitHub REST API client for Node.js",
keywords: [
"octokit",
"github",
"rest",
"api-client"
],
author: "Gregor Martynus (https://github.com/gr2m)",
contributors: [
{
name: "Mike de Boer",
email: "info@mikedeboer.nl"
},
{
name: "Fabian Jakobs",
email: "fabian@c9.io"
},
{
name: "Joe Gallo",
email: "joe@brassafrax.com"
},
{
name: "Gregor Martynus",
url: "https://github.com/gr2m"
}
],
repository: "https://github.com/octokit/rest.js",
dependencies: {
"@octokit/auth-token": "^2.4.0",
"@octokit/plugin-paginate-rest": "^1.1.1",
"@octokit/plugin-request-log": "^1.0.0",
"@octokit/plugin-rest-endpoint-methods": "2.4.0",
"@octokit/request": "^5.2.0",
"@octokit/request-error": "^1.0.2",
"atob-lite": "^2.0.0",
"before-after-hook": "^2.0.0",
"btoa-lite": "^1.0.0",
deprecation: "^2.0.0",
"lodash.get": "^4.4.2",
"lodash.set": "^4.3.2",
"lodash.uniq": "^4.5.0",
"octokit-pagination-methods": "^1.1.0",
once: "^1.4.0",
"universal-user-agent": "^4.0.0"
},
devDependencies: {
"@gimenete/type-writer": "^0.1.3",
"@octokit/auth": "^1.1.1",
"@octokit/fixtures-server": "^5.0.6",
"@octokit/graphql": "^4.2.0",
"@types/node": "^13.1.0",
bundlesize: "^0.18.0",
chai: "^4.1.2",
"compression-webpack-plugin": "^3.1.0",
cypress: "^4.0.0",
glob: "^7.1.2",
"http-proxy-agent": "^4.0.0",
"lodash.camelcase": "^4.3.0",
"lodash.merge": "^4.6.1",
"lodash.upperfirst": "^4.3.1",
lolex: "^6.0.0",
mkdirp: "^1.0.0",
mocha: "^7.0.1",
mustache: "^4.0.0",
nock: "^11.3.3",
"npm-run-all": "^4.1.2",
nyc: "^15.0.0",
prettier: "^1.14.2",
proxy: "^1.0.0",
"semantic-release": "^17.0.0",
sinon: "^8.0.0",
"sinon-chai": "^3.0.0",
"sort-keys": "^4.0.0",
"string-to-arraybuffer": "^1.0.0",
"string-to-jsdoc-comment": "^1.0.0",
typescript: "^3.3.1",
webpack: "^4.0.0",
"webpack-bundle-analyzer": "^3.0.0",
"webpack-cli": "^3.0.0"
},
types: "index.d.ts",
scripts: {
coverage: "nyc report --reporter=html && open coverage/index.html",
lint: "prettier --check '{lib,plugins,scripts,test}/**/*.{js,json,ts}' 'docs/*.{js,json}' 'docs/src/**/*' index.js README.md package.json",
"lint:fix": "prettier --write '{lib,plugins,scripts,test}/**/*.{js,json,ts}' 'docs/*.{js,json}' 'docs/src/**/*' index.js README.md package.json",
pretest: "npm run -s lint",
test: 'nyc mocha test/mocha-node-setup.js "test/*/**/*-test.js"',
"test:browser": "cypress run --browser chrome",
build: "npm-run-all build:*",
"build:ts": "npm run -s update-endpoints:typescript",
"prebuild:browser": "mkdirp dist/",
"build:browser": "npm-run-all build:browser:*",
"build:browser:development": "webpack --mode development --entry . --output-library=Octokit --output=./dist/octokit-rest.js --profile --json > dist/bundle-stats.json",
"build:browser:production": "webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=Octokit --output-path=./dist --output-filename=octokit-rest.min.js --devtool source-map",
"generate-bundle-report": "webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html",
"update-endpoints": "npm-run-all update-endpoints:*",
"update-endpoints:fetch-json": "node scripts/update-endpoints/fetch-json",
"update-endpoints:typescript": "node scripts/update-endpoints/typescript",
"prevalidate:ts": "npm run -s build:ts",
"validate:ts": "tsc --target es6 --noImplicitAny index.d.ts",
"postvalidate:ts": "tsc --noEmit --target es6 test/typescript-validate.ts",
"start-fixtures-server": "octokit-fixtures-server"
},
license: "MIT",
files: [
"index.js",
"index.d.ts",
"lib",
"plugins"
],
nyc: {
ignore: [
"test"
]
},
release: {
publish: [
"@semantic-release/npm",
{
path: "@semantic-release/github",
assets: [
"dist/*",
"!dist/*.map.gz"
]
}
]
},
bundlesize: [
{
path: "./dist/octokit-rest.min.js.gz",
maxSize: "33 kB"
}
]
};
}
});
// node_modules/@octokit/rest/lib/parse-client-options.js
var require_parse_client_options = __commonJS({
"node_modules/@octokit/rest/lib/parse-client-options.js"(exports, module2) {
module2.exports = parseOptions;
var { Deprecation } = require_dist_node3();
var { getUserAgent } = require_dist_node9();
var once = require_once();
var pkg = require_package();
var deprecateOptionsTimeout = once(
(log, deprecation) => log.warn(deprecation)
);
var deprecateOptionsAgent = once((log, deprecation) => log.warn(deprecation));
var deprecateOptionsHeaders = once(
(log, deprecation) => log.warn(deprecation)
);
function parseOptions(options, log, hook) {
if (options.headers) {
options.headers = Object.keys(options.headers).reduce((newObj, key) => {
newObj[key.toLowerCase()] = options.headers[key];
return newObj;
}, {});
}
const clientDefaults = {
headers: options.headers || {},
request: options.request || {},
mediaType: {
previews: [],
format: ""
}
};
if (options.baseUrl) {
clientDefaults.baseUrl = options.baseUrl;
}
if (options.userAgent) {
clientDefaults.headers["user-agent"] = options.userAgent;
}
if (options.previews) {
clientDefaults.mediaType.previews = options.previews;
}
if (options.timeZone) {
clientDefaults.headers["time-zone"] = options.timeZone;
}
if (options.timeout) {
deprecateOptionsTimeout(
log,
new Deprecation(
"[@octokit/rest] new Octokit({timeout}) is deprecated. Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request"
)
);
clientDefaults.request.timeout = options.timeout;
}
if (options.agent) {
deprecateOptionsAgent(
log,
new Deprecation(
"[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/request.js#request"
)
);
clientDefaults.request.agent = options.agent;
}
if (options.headers) {
deprecateOptionsHeaders(
log,
new Deprecation(
"[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request"
)
);
}
const userAgentOption = clientDefaults.headers["user-agent"];
const defaultUserAgent = `octokit.js/${pkg.version} ${getUserAgent()}`;
clientDefaults.headers["user-agent"] = [userAgentOption, defaultUserAgent].filter(Boolean).join(" ");
clientDefaults.request.hook = hook.bind(null, "request");
return clientDefaults;
}
}
});
// node_modules/@octokit/rest/lib/constructor.js
var require_constructor = __commonJS({
"node_modules/@octokit/rest/lib/constructor.js"(exports, module2) {
module2.exports = Octokit;
var { request } = require_dist_node5();
var Hook = require_before_after_hook();
var parseClientOptions = require_parse_client_options();
function Octokit(plugins, options) {
options = options || {};
const hook = new Hook.Collection();
const log = Object.assign(
{
debug: () => {
},
info: () => {
},
warn: console.warn,
error: console.error
},
options && options.log
);
const api = {
hook,
log,
request: request.defaults(parseClientOptions(options, log, hook))
};
plugins.forEach((pluginFunction) => pluginFunction(api, options));
return api;
}
}
});
// node_modules/@octokit/rest/lib/register-plugin.js
var require_register_plugin = __commonJS({
"node_modules/@octokit/rest/lib/register-plugin.js"(exports, module2) {
module2.exports = registerPlugin;
var factory = require_factory();
function registerPlugin(plugins, pluginFunction) {
return factory(
plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction)
);
}
}
});
// node_modules/@octokit/rest/lib/factory.js
var require_factory = __commonJS({
"node_modules/@octokit/rest/lib/factory.js"(exports, module2) {
module2.exports = factory;
var Octokit = require_constructor();
var registerPlugin = require_register_plugin();
function factory(plugins) {
const Api = Octokit.bind(null, plugins || []);
Api.plugin = registerPlugin.bind(null, plugins || []);
return Api;
}
}
});
// node_modules/@octokit/rest/lib/core.js
var require_core2 = __commonJS({
"node_modules/@octokit/rest/lib/core.js"(exports, module2) {
var factory = require_factory();
module2.exports = factory();
}
});
// node_modules/@octokit/auth-token/dist-node/index.js
var require_dist_node10 = __commonJS({
"node_modules/@octokit/auth-token/dist-node/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
var REGEX_IS_INSTALLATION = /^ghs_/;
var REGEX_IS_USER_TO_SERVER = /^ghu_/;
async function auth(token) {
const isApp = token.split(/\./).length === 3;
const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
return {
type: "token",
token,
tokenType
};
}
function withAuthorizationPrefix(token) {
if (token.split(/\./).length === 3) {
return `bearer ${token}`;
}
return `token ${token}`;
}
async function hook(token, request, route, parameters) {
const endpoint = request.endpoint.merge(route, parameters);
endpoint.headers.authorization = withAuthorizationPrefix(token);
return request(endpoint);
}
var createTokenAuth = function createTokenAuth2(token) {
if (!token) {
throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
}
if (typeof token !== "string") {
throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
}
token = token.replace(/^(token|bearer) +/i, "");
return Object.assign(auth.bind(null, token), {
hook: hook.bind(null, token)
});
};
exports.createTokenAuth = createTokenAuth;
}
});
// node_modules/btoa-lite/btoa-node.js
var require_btoa_node = __commonJS({
"node_modules/btoa-lite/btoa-node.js"(exports, module2) {
module2.exports = function btoa(str) {
return new Buffer(str).toString("base64");
};
}
});
// node_modules/atob-lite/atob-node.js
var require_atob_node = __commonJS({
"node_modules/atob-lite/atob-node.js"(exports, module2) {
module2.exports = function atob(str) {
return Buffer.from(str, "base64").toString("binary");
};
}
});
// node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js
var require_with_authorization_prefix = __commonJS({
"node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js"(exports, module2) {
module2.exports = withAuthorizationPrefix;
var atob = require_atob_node();
var REGEX_IS_BASIC_AUTH = /^[\w-]+:/;
function withAuthorizationPrefix(authorization) {
if (/^(basic|bearer|token) /i.test(authorization)) {
return authorization;
}
try {
if (REGEX_IS_BASIC_AUTH.test(atob(authorization))) {
return `basic ${authorization}`;
}
} catch (error) {
}
if (authorization.split(/\./).length === 3) {
return `bearer ${authorization}`;
}
return `token ${authorization}`;
}
}
});
// node_modules/@octokit/rest/plugins/authentication/before-request.js
var require_before_request = __commonJS({
"node_modules/@octokit/rest/plugins/authentication/before-request.js"(exports, module2) {
module2.exports = authenticationBeforeRequest;
var btoa = require_btoa_node();
var withAuthorizationPrefix = require_with_authorization_prefix();
function authenticationBeforeRequest(state, options) {
if (typeof state.auth === "string") {
options.headers.authorization = withAuthorizationPrefix(state.auth);
return;
}
if (state.auth.username) {
const hash = btoa(`${state.auth.username}:${state.auth.password}`);
options.headers.authorization = `Basic ${hash}`;
if (state.otp) {
options.headers["x-github-otp"] = state.otp;
}
return;
}
if (state.auth.clientId) {
if (/\/applications\/:?[\w_]+\/tokens\/:?[\w_]+($|\?)/.test(options.url)) {
const hash = btoa(`${state.auth.clientId}:${state.auth.clientSecret}`);
options.headers.authorization = `Basic ${hash}`;
return;
}
options.url += options.url.indexOf("?") === -1 ? "?" : "&";
options.url += `client_id=${state.auth.clientId}&client_secret=${state.auth.clientSecret}`;
return;
}
return Promise.resolve().then(() => {
return state.auth();
}).then((authorization) => {
options.headers.authorization = withAuthorizationPrefix(authorization);
});
}
}
});
// node_modules/@octokit/rest/node_modules/@octokit/request-error/dist-node/index.js
var require_dist_node11 = __commonJS({
"node_modules/@octokit/rest/node_modules/@octokit/request-error/dist-node/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function _interopDefault(ex) {
return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
}
var deprecation = require_dist_node3();
var once = _interopDefault(require_once());
var logOnce = once((deprecation2) => console.warn(deprecation2));
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;
Object.defineProperty(this, "code", {
get() {
logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
return statusCode;
}
});
this.headers = options.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;
}
};
exports.RequestError = RequestError;
}
});
// node_modules/@octokit/rest/plugins/authentication/request-error.js
var require_request_error = __commonJS({
"node_modules/@octokit/rest/plugins/authentication/request-error.js"(exports, module2) {
module2.exports = authenticationRequestError;
var { RequestError } = require_dist_node11();
function authenticationRequestError(state, error, options) {
if (!error.headers)
throw error;
const otpRequired = /required/.test(error.headers["x-github-otp"] || "");
if (error.status !== 401 || !otpRequired) {
throw error;
}
if (error.status === 401 && otpRequired && error.request && error.request.headers["x-github-otp"]) {
if (state.otp) {
delete state.otp;
} else {
throw new RequestError(
"Invalid one-time password for two-factor authentication",
401,
{
headers: error.headers,
request: options
}
);
}
}
if (typeof state.auth.on2fa !== "function") {
throw new RequestError(
"2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication",
401,
{
headers: error.headers,
request: options
}
);
}
return Promise.resolve().then(() => {
return state.auth.on2fa();
}).then((oneTimePassword) => {
const newOptions = Object.assign(options, {
headers: Object.assign(options.headers, {
"x-github-otp": oneTimePassword
})
});
return state.octokit.request(newOptions).then((response) => {
state.otp = oneTimePassword;
return response;
});
});
}
}
});
// node_modules/@octokit/rest/plugins/authentication/validate.js
var require_validate2 = __commonJS({
"node_modules/@octokit/rest/plugins/authentication/validate.js"(exports, module2) {
module2.exports = validateAuth;
function validateAuth(auth) {
if (typeof auth === "string") {
return;
}
if (typeof auth === "function") {
return;
}
if (auth.username && auth.password) {
return;
}
if (auth.clientId && auth.clientSecret) {
return;
}
throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`);
}
}
});
// node_modules/@octokit/rest/plugins/authentication/index.js
var require_authentication = __commonJS({
"node_modules/@octokit/rest/plugins/authentication/index.js"(exports, module2) {
module2.exports = authenticationPlugin;
var { createTokenAuth } = require_dist_node10();
var { Deprecation } = require_dist_node3();
var once = require_once();
var beforeRequest = require_before_request();
var requestError = require_request_error();
var validate = require_validate2();
var withAuthorizationPrefix = require_with_authorization_prefix();
var deprecateAuthBasic = once((log, deprecation) => log.warn(deprecation));
var deprecateAuthObject = once((log, deprecation) => log.warn(deprecation));
function authenticationPlugin(octokit, options) {
if (options.authStrategy) {
const auth = options.authStrategy(options.auth);
octokit.hook.wrap("request", auth.hook);
octokit.auth = auth;
return;
}
if (!options.auth) {
octokit.auth = () => Promise.resolve({
type: "unauthenticated"
});
return;
}
const isBasicAuthString = typeof options.auth === "string" && /^basic/.test(withAuthorizationPrefix(options.auth));
if (typeof options.auth === "string" && !isBasicAuthString) {
const auth = createTokenAuth(options.auth);
octokit.hook.wrap("request", auth.hook);
octokit.auth = auth;
return;
}
const [deprecationMethod, deprecationMessapge] = isBasicAuthString ? [
deprecateAuthBasic,
'Setting the "new Octokit({ auth })" option to a Basic Auth string is deprecated. Use https://github.com/octokit/auth-basic.js instead. See (https://octokit.github.io/rest.js/#authentication)'
] : [
deprecateAuthObject,
'Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17. See (https://octokit.github.io/rest.js/#authentication)'
];
deprecationMethod(
octokit.log,
new Deprecation("[@octokit/rest] " + deprecationMessapge)
);
octokit.auth = () => Promise.resolve({
type: "deprecated",
message: deprecationMessapge
});
validate(options.auth);
const state = {
octokit,
auth: options.auth
};
octokit.hook.before("request", beforeRequest.bind(null, state));
octokit.hook.error("request", requestError.bind(null, state));
}
}
});
// node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js
var require_authenticate = __commonJS({
"node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js"(exports, module2) {
module2.exports = authenticate;
var { Deprecation } = require_dist_node3();
var once = require_once();
var deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation));
function authenticate(state, options) {
deprecateAuthenticate(
state.octokit.log,
new Deprecation(
'[@octokit/rest] octokit.authenticate() is deprecated. Use "auth" constructor option instead.'
)
);
if (!options) {
state.auth = false;
return;
}
switch (options.type) {
case "basic":
if (!options.username || !options.password) {
throw new Error(
"Basic authentication requires both a username and password to be set"
);
}
break;
case "oauth":
if (!options.token && !(options.key && options.secret)) {
throw new Error(
"OAuth2 authentication requires a token or key & secret to be set"
);
}
break;
case "token":
case "app":
if (!options.token) {
throw new Error("Token authentication requires a token to be set");
}
break;
default:
throw new Error(
"Invalid authentication type, must be 'basic', 'oauth', 'token' or 'app'"
);
}
state.auth = options;
}
}
});
// node_modules/lodash.uniq/index.js
var require_lodash = __commonJS({
"node_modules/lodash.uniq/index.js"(exports, module2) {
var LARGE_ARRAY_SIZE = 200;
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var INFINITY = 1 / 0;
var funcTag = "[object Function]";
var genTag = "[object GeneratorFunction]";
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function("return this")();
function arrayIncludes(array, value) {
var length = array ? array.length : 0;
return !!length && baseIndexOf(array, value, 0) > -1;
}
function arrayIncludesWith(array, value, comparator) {
var index = -1, length = array ? array.length : 0;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
while (fromRight ? index-- : ++index < length) {
if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
function baseIndexOf(array, value, fromIndex) {
if (value !== value) {
return baseFindIndex(array, baseIsNaN, fromIndex);
}
var index = fromIndex - 1, length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
function baseIsNaN(value) {
return value !== value;
}
function cacheHas(cache, key) {
return cache.has(key);
}
function getValue(object, key) {
return object == null ? void 0 : object[key];
}
function isHostObject(value) {
var result = false;
if (value != null && typeof value.toString != "function") {
try {
result = !!(value + "");
} catch (e) {
}
}
return result;
}
function setToArray(set) {
var index = -1, result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
var arrayProto = Array.prototype;
var funcProto = Function.prototype;
var objectProto = Object.prototype;
var coreJsData = root["__core-js_shared__"];
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
var reIsNative = RegExp(
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
var splice = arrayProto.splice;
var Map2 = getNative(root, "Map");
var Set2 = getNative(root, "Set");
var nativeCreate = getNative(Object, "create");
function Hash(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
}
function hashDelete(key) {
return this.has(key) && delete this.__data__[key];
}
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty.call(data, key) ? data[key] : void 0;
}
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
}
function hashSet(key, value) {
var data = this.__data__;
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
return this;
}
Hash.prototype.clear = hashClear;
Hash.prototype["delete"] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
function ListCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function listCacheClear() {
this.__data__ = [];
}
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
return true;
}
function listCacheGet(key) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? void 0 : data[index][1];
}
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
function listCacheSet(key, value) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype["delete"] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
function MapCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function mapCacheClear() {
this.__data__ = {
"hash": new Hash(),
"map": new (Map2 || ListCache)(),
"string": new Hash()
};
}
function mapCacheDelete(key) {
return getMapData(this, key)["delete"](key);
}
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
function mapCacheSet(key, value) {
getMapData(this, key).set(key, value);
return this;
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype["delete"] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
function SetCache(values) {
var index = -1, length = values ? values.length : 0;
this.__data__ = new MapCache();
while (++index < length) {
this.add(values[index]);
}
}
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
function setCacheHas(value) {
return this.__data__.has(value);
}
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
function baseUniq(array, iteratee, comparator) {
var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
if (comparator) {
isCommon = false;
includes = arrayIncludesWith;
} else if (length >= LARGE_ARRAY_SIZE) {
var set = iteratee ? null : createSet(array);
if (set) {
return setToArray(set);
}
isCommon = false;
includes = cacheHas;
seen = new SetCache();
} else {
seen = iteratee ? [] : result;
}
outer:
while (++index < length) {
var value = array[index], computed = iteratee ? iteratee(value) : value;
value = comparator || value !== 0 ? value : 0;
if (isCommon && computed === computed) {
var seenIndex = seen.length;
while (seenIndex--) {
if (seen[seenIndex] === computed) {
continue outer;
}
}
if (iteratee) {
seen.push(computed);
}
result.push(value);
} else if (!includes(seen, computed, comparator)) {
if (seen !== result) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) {
return new Set2(values);
};
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : void 0;
}
function isKeyable(value) {
var type = typeof value;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {
}
try {
return func + "";
} catch (e) {
}
}
return "";
}
function uniq(array) {
return array && array.length ? baseUniq(array) : [];
}
function eq(value, other) {
return value === other || value !== value && other !== other;
}
function isFunction(value) {
var tag = isObject(value) ? objectToString.call(value) : "";
return tag == funcTag || tag == genTag;
}
function isObject(value) {
var type = typeof value;
return !!value && (type == "object" || type == "function");
}
function noop() {
}
module2.exports = uniq;
}
});
// node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js
var require_before_request2 = __commonJS({
"node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js"(exports, module2) {
module2.exports = authenticationBeforeRequest;
var btoa = require_btoa_node();
var uniq = require_lodash();
function authenticationBeforeRequest(state, options) {
if (!state.auth.type) {
return;
}
if (state.auth.type === "basic") {
const hash = btoa(`${state.auth.username}:${state.auth.password}`);
options.headers.authorization = `Basic ${hash}`;
return;
}
if (state.auth.type === "token") {
options.headers.authorization = `token ${state.auth.token}`;
return;
}
if (state.auth.type === "app") {
options.headers.authorization = `Bearer ${state.auth.token}`;
const acceptHeaders = options.headers.accept.split(",").concat("application/vnd.github.machine-man-preview+json");
options.headers.accept = uniq(acceptHeaders).filter(Boolean).join(",");
return;
}
options.url += options.url.indexOf("?") === -1 ? "?" : "&";
if (state.auth.token) {
options.url += `access_token=${encodeURIComponent(state.auth.token)}`;
return;
}
const key = encodeURIComponent(state.auth.key);
const secret = encodeURIComponent(state.auth.secret);
options.url += `client_id=${key}&client_secret=${secret}`;
}
}
});
// node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js
var require_request_error2 = __commonJS({
"node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js"(exports, module2) {
module2.exports = authenticationRequestError;
var { RequestError } = require_dist_node11();
function authenticationRequestError(state, error, options) {
if (!error.headers)
throw error;
const otpRequired = /required/.test(error.headers["x-github-otp"] || "");
if (error.status !== 401 || !otpRequired) {
throw error;
}
if (error.status === 401 && otpRequired && error.request && error.request.headers["x-github-otp"]) {
throw new RequestError(
"Invalid one-time password for two-factor authentication",
401,
{
headers: error.headers,
request: options
}
);
}
if (typeof state.auth.on2fa !== "function") {
throw new RequestError(
"2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication",
401,
{
headers: error.headers,
request: options
}
);
}
return Promise.resolve().then(() => {
return state.auth.on2fa();
}).then((oneTimePassword) => {
const newOptions = Object.assign(options, {
headers: Object.assign(
{ "x-github-otp": oneTimePassword },
options.headers
)
});
return state.octokit.request(newOptions);
});
}
}
});
// node_modules/@octokit/rest/plugins/authentication-deprecated/index.js
var require_authentication_deprecated = __commonJS({
"node_modules/@octokit/rest/plugins/authentication-deprecated/index.js"(exports, module2) {
module2.exports = authenticationPlugin;
var { Deprecation } = require_dist_node3();
var once = require_once();
var deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation));
var authenticate = require_authenticate();
var beforeRequest = require_before_request2();
var requestError = require_request_error2();
function authenticationPlugin(octokit, options) {
if (options.auth) {
octokit.authenticate = () => {
deprecateAuthenticate(
octokit.log,
new Deprecation(
'[@octokit/rest] octokit.authenticate() is deprecated and has no effect when "auth" option is set on Octokit constructor'
)
);
};
return;
}
const state = {
octokit,
auth: false
};
octokit.authenticate = authenticate.bind(null, state);
octokit.hook.before("request", beforeRequest.bind(null, state));
octokit.hook.error("request", requestError.bind(null, state));
}
}
});
// node_modules/@octokit/plugin-paginate-rest/dist-node/index.js
var require_dist_node12 = __commonJS({
"node_modules/@octokit/plugin-paginate-rest/dist-node/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var VERSION = "1.1.2";
var REGEX = [/^\/search\//, /^\/repos\/[^/]+\/[^/]+\/commits\/[^/]+\/(check-runs|check-suites)([^/]|$)/, /^\/installation\/repositories([^/]|$)/, /^\/user\/installations([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/secrets([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/workflows(\/[^/]+\/runs)?([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/runs(\/[^/]+\/(artifacts|jobs))?([^/]|$)/];
function normalizePaginatedListResponse(octokit, url, response) {
const path5 = url.replace(octokit.request.endpoint.DEFAULTS.baseUrl, "");
const responseNeedsNormalization = REGEX.find((regex) => regex.test(path5));
if (!responseNeedsNormalization)
return;
const incompleteResults = response.data.incomplete_results;
const repositorySelection = response.data.repository_selection;
const totalCount = response.data.total_count;
delete response.data.incomplete_results;
delete response.data.repository_selection;
delete response.data.total_count;
const namespaceKey = Object.keys(response.data)[0];
const data = response.data[namespaceKey];
response.data = data;
if (typeof incompleteResults !== "undefined") {
response.data.incomplete_results = incompleteResults;
}
if (typeof repositorySelection !== "undefined") {
response.data.repository_selection = repositorySelection;
}
response.data.total_count = totalCount;
Object.defineProperty(response.data, namespaceKey, {
get() {
octokit.log.warn(`[@octokit/paginate-rest] "response.data.${namespaceKey}" is deprecated for "GET ${path5}". Get the results directly from "response.data"`);
return Array.from(data);
}
});
}
function iterator(octokit, route, parameters) {
const options = octokit.request.endpoint(route, parameters);
const method = options.method;
const headers = options.headers;
let url = options.url;
return {
[Symbol.asyncIterator]: () => ({
next() {
if (!url) {
return Promise.resolve({
done: true
});
}
return octokit.request({
method,
url,
headers
}).then((response) => {
normalizePaginatedListResponse(octokit, url, response);
url = ((response.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
return {
value: response
};
});
}
})
};
}
function paginate(octokit, route, parameters, mapFn) {
if (typeof parameters === "function") {
mapFn = parameters;
parameters = void 0;
}
return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);
}
function gather(octokit, results, iterator2, mapFn) {
return iterator2.next().then((result) => {
if (result.done) {
return results;
}
let earlyExit = false;
function done() {
earlyExit = true;
}
results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);
if (earlyExit) {
return results;
}
return gather(octokit, results, iterator2, mapFn);
});
}
function paginateRest(octokit) {
return {
paginate: Object.assign(paginate.bind(null, octokit), {
iterator: iterator.bind(null, octokit)
})
};
}
paginateRest.VERSION = VERSION;
exports.paginateRest = paginateRest;
}
});
// node_modules/@octokit/rest/plugins/pagination/index.js
var require_pagination = __commonJS({
"node_modules/@octokit/rest/plugins/pagination/index.js"(exports, module2) {
module2.exports = paginatePlugin;
var { paginateRest } = require_dist_node12();
function paginatePlugin(octokit) {
Object.assign(octokit, paginateRest(octokit));
}
}
});
// node_modules/lodash.get/index.js
var require_lodash2 = __commonJS({
"node_modules/lodash.get/index.js"(exports, module2) {
var FUNC_ERROR_TEXT = "Expected a function";
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var INFINITY = 1 / 0;
var funcTag = "[object Function]";
var genTag = "[object GeneratorFunction]";
var symbolTag = "[object Symbol]";
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
var reIsPlainProp = /^\w*$/;
var reLeadingDot = /^\./;
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reEscapeChar = /\\(\\)?/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function("return this")();
function getValue(object, key) {
return object == null ? void 0 : object[key];
}
function isHostObject(value) {
var result = false;
if (value != null && typeof value.toString != "function") {
try {
result = !!(value + "");
} catch (e) {
}
}
return result;
}
var arrayProto = Array.prototype;
var funcProto = Function.prototype;
var objectProto = Object.prototype;
var coreJsData = root["__core-js_shared__"];
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
var reIsNative = RegExp(
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
var Symbol2 = root.Symbol;
var splice = arrayProto.splice;
var Map2 = getNative(root, "Map");
var nativeCreate = getNative(Object, "create");
var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
var symbolToString = symbolProto ? symbolProto.toString : void 0;
function Hash(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
}
function hashDelete(key) {
return this.has(key) && delete this.__data__[key];
}
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty.call(data, key) ? data[key] : void 0;
}
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
}
function hashSet(key, value) {
var data = this.__data__;
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
return this;
}
Hash.prototype.clear = hashClear;
Hash.prototype["delete"] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
function ListCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function listCacheClear() {
this.__data__ = [];
}
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
return true;
}
function listCacheGet(key) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? void 0 : data[index][1];
}
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
function listCacheSet(key, value) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype["delete"] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
function MapCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function mapCacheClear() {
this.__data__ = {
"hash": new Hash(),
"map": new (Map2 || ListCache)(),
"string": new Hash()
};
}
function mapCacheDelete(key) {
return getMapData(this, key)["delete"](key);
}
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
function mapCacheSet(key, value) {
getMapData(this, key).set(key, value);
return this;
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype["delete"] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
function baseGet(object, path5) {
path5 = isKey(path5, object) ? [path5] : castPath(path5);
var index = 0, length = path5.length;
while (object != null && index < length) {
object = object[toKey(path5[index++])];
}
return index && index == length ? object : void 0;
}
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
function baseToString(value) {
if (typeof value == "string") {
return value;
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : "";
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
function castPath(value) {
return isArray(value) ? value : stringToPath(value);
}
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : void 0;
}
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
function isKeyable(value) {
var type = typeof value;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
var stringToPath = memoize(function(string) {
string = toString(string);
var result = [];
if (reLeadingDot.test(string)) {
result.push("");
}
string.replace(rePropName, function(match, number, quote, string2) {
result.push(quote ? string2.replace(reEscapeChar, "$1") : number || match);
});
return result;
});
function toKey(value) {
if (typeof value == "string" || isSymbol(value)) {
return value;
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {
}
try {
return func + "";
} catch (e) {
}
}
return "";
}
function memoize(func, resolver) {
if (typeof func != "function" || resolver && typeof resolver != "function") {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result);
return result;
};
memoized.cache = new (memoize.Cache || MapCache)();
return memoized;
}
memoize.Cache = MapCache;
function eq(value, other) {
return value === other || value !== value && other !== other;
}
var isArray = Array.isArray;
function isFunction(value) {
var tag = isObject(value) ? objectToString.call(value) : "";
return tag == funcTag || tag == genTag;
}
function isObject(value) {
var type = typeof value;
return !!value && (type == "object" || type == "function");
}
function isObjectLike(value) {
return !!value && typeof value == "object";
}
function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
}
function toString(value) {
return value == null ? "" : baseToString(value);
}
function get(object, path5, defaultValue) {
var result = object == null ? void 0 : baseGet(object, path5);
return result === void 0 ? defaultValue : result;
}
module2.exports = get;
}
});
// node_modules/lodash.set/index.js
var require_lodash3 = __commonJS({
"node_modules/lodash.set/index.js"(exports, module2) {
var FUNC_ERROR_TEXT = "Expected a function";
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var INFINITY = 1 / 0;
var MAX_SAFE_INTEGER = 9007199254740991;
var funcTag = "[object Function]";
var genTag = "[object GeneratorFunction]";
var symbolTag = "[object Symbol]";
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
var reIsPlainProp = /^\w*$/;
var reLeadingDot = /^\./;
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reEscapeChar = /\\(\\)?/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var reIsUint = /^(?:0|[1-9]\d*)$/;
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function("return this")();
function getValue(object, key) {
return object == null ? void 0 : object[key];
}
function isHostObject(value) {
var result = false;
if (value != null && typeof value.toString != "function") {
try {
result = !!(value + "");
} catch (e) {
}
}
return result;
}
var arrayProto = Array.prototype;
var funcProto = Function.prototype;
var objectProto = Object.prototype;
var coreJsData = root["__core-js_shared__"];
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
var reIsNative = RegExp(
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
var Symbol2 = root.Symbol;
var splice = arrayProto.splice;
var Map2 = getNative(root, "Map");
var nativeCreate = getNative(Object, "create");
var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
var symbolToString = symbolProto ? symbolProto.toString : void 0;
function Hash(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
}
function hashDelete(key) {
return this.has(key) && delete this.__data__[key];
}
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty.call(data, key) ? data[key] : void 0;
}
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
}
function hashSet(key, value) {
var data = this.__data__;
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
return this;
}
Hash.prototype.clear = hashClear;
Hash.prototype["delete"] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
function ListCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function listCacheClear() {
this.__data__ = [];
}
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
return true;
}
function listCacheGet(key) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? void 0 : data[index][1];
}
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
function listCacheSet(key, value) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype["delete"] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
function MapCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function mapCacheClear() {
this.__data__ = {
"hash": new Hash(),
"map": new (Map2 || ListCache)(),
"string": new Hash()
};
}
function mapCacheDelete(key) {
return getMapData(this, key)["delete"](key);
}
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
function mapCacheSet(key, value) {
getMapData(this, key).set(key, value);
return this;
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype["delete"] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
object[key] = value;
}
}
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
function baseSet(object, path5, value, customizer) {
if (!isObject(object)) {
return object;
}
path5 = isKey(path5, object) ? [path5] : castPath(path5);
var index = -1, length = path5.length, lastIndex = length - 1, nested = object;
while (nested != null && ++index < length) {
var key = toKey(path5[index]), newValue = value;
if (index != lastIndex) {
var objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : void 0;
if (newValue === void 0) {
newValue = isObject(objValue) ? objValue : isIndex(path5[index + 1]) ? [] : {};
}
}
assignValue(nested, key, newValue);
nested = nested[key];
}
return object;
}
function baseToString(value) {
if (typeof value == "string") {
return value;
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : "";
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
function castPath(value) {
return isArray(value) ? value : stringToPath(value);
}
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : void 0;
}
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
}
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
function isKeyable(value) {
var type = typeof value;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
var stringToPath = memoize(function(string) {
string = toString(string);
var result = [];
if (reLeadingDot.test(string)) {
result.push("");
}
string.replace(rePropName, function(match, number, quote, string2) {
result.push(quote ? string2.replace(reEscapeChar, "$1") : number || match);
});
return result;
});
function toKey(value) {
if (typeof value == "string" || isSymbol(value)) {
return value;
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {
}
try {
return func + "";
} catch (e) {
}
}
return "";
}
function memoize(func, resolver) {
if (typeof func != "function" || resolver && typeof resolver != "function") {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result);
return result;
};
memoized.cache = new (memoize.Cache || MapCache)();
return memoized;
}
memoize.Cache = MapCache;
function eq(value, other) {
return value === other || value !== value && other !== other;
}
var isArray = Array.isArray;
function isFunction(value) {
var tag = isObject(value) ? objectToString.call(value) : "";
return tag == funcTag || tag == genTag;
}
function isObject(value) {
var type = typeof value;
return !!value && (type == "object" || type == "function");
}
function isObjectLike(value) {
return !!value && typeof value == "object";
}
function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
}
function toString(value) {
return value == null ? "" : baseToString(value);
}
function set(object, path5, value) {
return object == null ? object : baseSet(object, path5, value);
}
module2.exports = set;
}
});
// node_modules/@octokit/rest/plugins/validate/validate.js
var require_validate3 = __commonJS({
"node_modules/@octokit/rest/plugins/validate/validate.js"(exports, module2) {
"use strict";
module2.exports = validate;
var { RequestError } = require_dist_node11();
var get = require_lodash2();
var set = require_lodash3();
function validate(octokit, options) {
if (!options.request.validate) {
return;
}
const { validate: params } = options.request;
Object.keys(params).forEach((parameterName) => {
const parameter = get(params, parameterName);
const expectedType = parameter.type;
let parentParameterName;
let parentValue;
let parentParamIsPresent = true;
let parentParameterIsArray = false;
if (/\./.test(parameterName)) {
parentParameterName = parameterName.replace(/\.[^.]+$/, "");
parentParameterIsArray = parentParameterName.slice(-2) === "[]";
if (parentParameterIsArray) {
parentParameterName = parentParameterName.slice(0, -2);
}
parentValue = get(options, parentParameterName);
parentParamIsPresent = parentParameterName === "headers" || typeof parentValue === "object" && parentValue !== null;
}
const values = parentParameterIsArray ? (get(options, parentParameterName) || []).map(
(value) => value[parameterName.split(/\./).pop()]
) : [get(options, parameterName)];
values.forEach((value, i) => {
const valueIsPresent = typeof value !== "undefined";
const valueIsNull = value === null;
const currentParameterName = parentParameterIsArray ? parameterName.replace(/\[\]/, `[${i}]`) : parameterName;
if (!parameter.required && !valueIsPresent) {
return;
}
if (!parentParamIsPresent) {
return;
}
if (parameter.allowNull && valueIsNull) {
return;
}
if (!parameter.allowNull && valueIsNull) {
throw new RequestError(
`'${currentParameterName}' cannot be null`,
400,
{
request: options
}
);
}
if (parameter.required && !valueIsPresent) {
throw new RequestError(
`Empty value for parameter '${currentParameterName}': ${JSON.stringify(
value
)}`,
400,
{
request: options
}
);
}
if (expectedType === "integer") {
const unparsedValue = value;
value = parseInt(value, 10);
if (isNaN(value)) {
throw new RequestError(
`Invalid value for parameter '${currentParameterName}': ${JSON.stringify(
unparsedValue
)} is NaN`,
400,
{
request: options
}
);
}
}
if (parameter.enum && parameter.enum.indexOf(String(value)) === -1) {
throw new RequestError(
`Invalid value for parameter '${currentParameterName}': ${JSON.stringify(
value
)}`,
400,
{
request: options
}
);
}
if (parameter.validation) {
const regex = new RegExp(parameter.validation);
if (!regex.test(value)) {
throw new RequestError(
`Invalid value for parameter '${currentParameterName}': ${JSON.stringify(
value
)}`,
400,
{
request: options
}
);
}
}
if (expectedType === "object" && typeof value === "string") {
try {
value = JSON.parse(value);
} catch (exception) {
throw new RequestError(
`JSON parse error of value for parameter '${currentParameterName}': ${JSON.stringify(
value
)}`,
400,
{
request: options
}
);
}
}
set(options, parameter.mapTo || currentParameterName, value);
});
});
return options;
}
}
});
// node_modules/@octokit/rest/plugins/validate/index.js
var require_validate4 = __commonJS({
"node_modules/@octokit/rest/plugins/validate/index.js"(exports, module2) {
module2.exports = octokitValidate;
var validate = require_validate3();
function octokitValidate(octokit) {
octokit.hook.before("request", validate.bind(null, octokit));
}
}
});
// node_modules/octokit-pagination-methods/lib/deprecate.js
var require_deprecate = __commonJS({
"node_modules/octokit-pagination-methods/lib/deprecate.js"(exports, module2) {
module2.exports = deprecate;
var loggedMessages = {};
function deprecate(message) {
if (loggedMessages[message]) {
return;
}
console.warn(`DEPRECATED (@octokit/rest): ${message}`);
loggedMessages[message] = 1;
}
}
});
// node_modules/octokit-pagination-methods/lib/get-page-links.js
var require_get_page_links = __commonJS({
"node_modules/octokit-pagination-methods/lib/get-page-links.js"(exports, module2) {
module2.exports = getPageLinks;
function getPageLinks(link) {
link = link.link || link.headers.link || "";
const links = {};
link.replace(/<([^>]*)>;\s*rel="([\w]*)"/g, (m, uri, type) => {
links[type] = uri;
});
return links;
}
}
});
// node_modules/octokit-pagination-methods/lib/http-error.js
var require_http_error = __commonJS({
"node_modules/octokit-pagination-methods/lib/http-error.js"(exports, module2) {
module2.exports = class HttpError extends Error {
constructor(message, code, headers) {
super(message);
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
}
this.name = "HttpError";
this.code = code;
this.headers = headers;
}
};
}
});
// node_modules/octokit-pagination-methods/lib/get-page.js
var require_get_page = __commonJS({
"node_modules/octokit-pagination-methods/lib/get-page.js"(exports, module2) {
module2.exports = getPage;
var deprecate = require_deprecate();
var getPageLinks = require_get_page_links();
var HttpError = require_http_error();
function getPage(octokit, link, which, headers) {
deprecate(`octokit.get${which.charAt(0).toUpperCase() + which.slice(1)}Page() \u2013 You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);
const url = getPageLinks(link)[which];
if (!url) {
const urlError = new HttpError(`No ${which} page found`, 404);
return Promise.reject(urlError);
}
const requestOptions = {
url,
headers: applyAcceptHeader(link, headers)
};
const promise = octokit.request(requestOptions);
return promise;
}
function applyAcceptHeader(res, headers) {
const previous = res.headers && res.headers["x-github-media-type"];
if (!previous || headers && headers.accept) {
return headers;
}
headers = headers || {};
headers.accept = "application/vnd." + previous.replace("; param=", ".").replace("; format=", "+");
return headers;
}
}
});
// node_modules/octokit-pagination-methods/lib/get-first-page.js
var require_get_first_page = __commonJS({
"node_modules/octokit-pagination-methods/lib/get-first-page.js"(exports, module2) {
module2.exports = getFirstPage;
var getPage = require_get_page();
function getFirstPage(octokit, link, headers) {
return getPage(octokit, link, "first", headers);
}
}
});
// node_modules/octokit-pagination-methods/lib/get-last-page.js
var require_get_last_page = __commonJS({
"node_modules/octokit-pagination-methods/lib/get-last-page.js"(exports, module2) {
module2.exports = getLastPage;
var getPage = require_get_page();
function getLastPage(octokit, link, headers) {
return getPage(octokit, link, "last", headers);
}
}
});
// node_modules/octokit-pagination-methods/lib/get-next-page.js
var require_get_next_page = __commonJS({
"node_modules/octokit-pagination-methods/lib/get-next-page.js"(exports, module2) {
module2.exports = getNextPage;
var getPage = require_get_page();
function getNextPage(octokit, link, headers) {
return getPage(octokit, link, "next", headers);
}
}
});
// node_modules/octokit-pagination-methods/lib/get-previous-page.js
var require_get_previous_page = __commonJS({
"node_modules/octokit-pagination-methods/lib/get-previous-page.js"(exports, module2) {
module2.exports = getPreviousPage;
var getPage = require_get_page();
function getPreviousPage(octokit, link, headers) {
return getPage(octokit, link, "prev", headers);
}
}
});
// node_modules/octokit-pagination-methods/lib/has-first-page.js
var require_has_first_page = __commonJS({
"node_modules/octokit-pagination-methods/lib/has-first-page.js"(exports, module2) {
module2.exports = hasFirstPage;
var deprecate = require_deprecate();
var getPageLinks = require_get_page_links();
function hasFirstPage(link) {
deprecate(`octokit.hasFirstPage() \u2013 You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);
return getPageLinks(link).first;
}
}
});
// node_modules/octokit-pagination-methods/lib/has-last-page.js
var require_has_last_page = __commonJS({
"node_modules/octokit-pagination-methods/lib/has-last-page.js"(exports, module2) {
module2.exports = hasLastPage;
var deprecate = require_deprecate();
var getPageLinks = require_get_page_links();
function hasLastPage(link) {
deprecate(`octokit.hasLastPage() \u2013 You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);
return getPageLinks(link).last;
}
}
});
// node_modules/octokit-pagination-methods/lib/has-next-page.js
var require_has_next_page = __commonJS({
"node_modules/octokit-pagination-methods/lib/has-next-page.js"(exports, module2) {
module2.exports = hasNextPage;
var deprecate = require_deprecate();
var getPageLinks = require_get_page_links();
function hasNextPage(link) {
deprecate(`octokit.hasNextPage() \u2013 You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);
return getPageLinks(link).next;
}
}
});
// node_modules/octokit-pagination-methods/lib/has-previous-page.js
var require_has_previous_page = __commonJS({
"node_modules/octokit-pagination-methods/lib/has-previous-page.js"(exports, module2) {
module2.exports = hasPreviousPage;
var deprecate = require_deprecate();
var getPageLinks = require_get_page_links();
function hasPreviousPage(link) {
deprecate(`octokit.hasPreviousPage() \u2013 You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);
return getPageLinks(link).prev;
}
}
});
// node_modules/octokit-pagination-methods/index.js
var require_octokit_pagination_methods = __commonJS({
"node_modules/octokit-pagination-methods/index.js"(exports, module2) {
module2.exports = paginationMethodsPlugin;
function paginationMethodsPlugin(octokit) {
octokit.getFirstPage = require_get_first_page().bind(null, octokit);
octokit.getLastPage = require_get_last_page().bind(null, octokit);
octokit.getNextPage = require_get_next_page().bind(null, octokit);
octokit.getPreviousPage = require_get_previous_page().bind(null, octokit);
octokit.hasFirstPage = require_has_first_page();
octokit.hasLastPage = require_has_last_page();
octokit.hasNextPage = require_has_next_page();
octokit.hasPreviousPage = require_has_previous_page();
}
}
});
// node_modules/@octokit/rest/index.js
var require_rest = __commonJS({
"node_modules/@octokit/rest/index.js"(exports, module2) {
var { requestLog } = require_dist_node7();
var {
restEndpointMethods
} = require_dist_node8();
var Core = require_core2();
var CORE_PLUGINS = [
require_authentication(),
require_authentication_deprecated(),
requestLog,
require_pagination(),
restEndpointMethods,
require_validate4(),
require_octokit_pagination_methods()
];
var OctokitRest = Core.plugin(CORE_PLUGINS);
function DeprecatedOctokit(options) {
const warn = options && options.log && options.log.warn ? options.log.warn : console.warn;
warn(
'[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead'
);
return new OctokitRest(options);
}
var Octokit = Object.assign(DeprecatedOctokit, {
Octokit: OctokitRest
});
Object.keys(OctokitRest).forEach((key) => {
if (OctokitRest.hasOwnProperty(key)) {
Octokit[key] = OctokitRest[key];
}
});
module2.exports = Octokit;
}
});
// node_modules/@actions/github/lib/context.js
var require_context = __commonJS({
"node_modules/@actions/github/lib/context.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fs_1 = require("fs");
var os_1 = require("os");
var Context = class {
constructor() {
this.payload = {};
if (process.env.GITHUB_EVENT_PATH) {
if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) {
this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" }));
} else {
const path5 = process.env.GITHUB_EVENT_PATH;
process.stdout.write(`GITHUB_EVENT_PATH ${path5} does not exist${os_1.EOL}`);
}
}
this.eventName = process.env.GITHUB_EVENT_NAME;
this.sha = process.env.GITHUB_SHA;
this.ref = process.env.GITHUB_REF;
this.workflow = process.env.GITHUB_WORKFLOW;
this.action = process.env.GITHUB_ACTION;
this.actor = process.env.GITHUB_ACTOR;
}
get issue() {
const payload = this.payload;
return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });
}
get repo() {
if (process.env.GITHUB_REPOSITORY) {
const [owner2, repo2] = process.env.GITHUB_REPOSITORY.split("/");
return { owner: owner2, repo: repo2 };
}
if (this.payload.repository) {
return {
owner: this.payload.repository.owner.login,
repo: this.payload.repository.name
};
}
throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'");
}
};
exports.Context = Context;
}
});
// node_modules/@actions/github/node_modules/@actions/http-client/proxy.js
var require_proxy2 = __commonJS({
"node_modules/@actions/github/node_modules/@actions/http-client/proxy.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getProxyUrl(reqUrl) {
let usingSsl = reqUrl.protocol === "https:";
let proxyUrl;
if (checkBypass(reqUrl)) {
return proxyUrl;
}
let proxyVar;
if (usingSsl) {
proxyVar = process.env["https_proxy"] || process.env["HTTPS_PROXY"];
} else {
proxyVar = process.env["http_proxy"] || process.env["HTTP_PROXY"];
}
if (proxyVar) {
proxyUrl = new URL(proxyVar);
}
return proxyUrl;
}
exports.getProxyUrl = getProxyUrl;
function checkBypass(reqUrl) {
if (!reqUrl.hostname) {
return false;
}
let noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || "";
if (!noProxy) {
return false;
}
let reqPort;
if (reqUrl.port) {
reqPort = Number(reqUrl.port);
} else if (reqUrl.protocol === "http:") {
reqPort = 80;
} else if (reqUrl.protocol === "https:") {
reqPort = 443;
}
let upperReqHosts = [reqUrl.hostname.toUpperCase()];
if (typeof reqPort === "number") {
upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
}
for (let upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) {
if (upperReqHosts.some((x) => x === upperNoProxyItem)) {
return true;
}
}
return false;
}
exports.checkBypass = checkBypass;
}
});
// node_modules/@actions/github/node_modules/@actions/http-client/index.js
var require_http_client = __commonJS({
"node_modules/@actions/github/node_modules/@actions/http-client/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var http = require("http");
var https = require("https");
var pm = require_proxy2();
var tunnel;
var HttpCodes;
(function(HttpCodes2) {
HttpCodes2[HttpCodes2["OK"] = 200] = "OK";
HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices";
HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently";
HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved";
HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther";
HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified";
HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy";
HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy";
HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect";
HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect";
HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest";
HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized";
HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired";
HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden";
HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound";
HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed";
HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable";
HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout";
HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict";
HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone";
HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests";
HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError";
HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented";
HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway";
HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable";
HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout";
})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
var Headers;
(function(Headers2) {
Headers2["Accept"] = "accept";
Headers2["ContentType"] = "content-type";
})(Headers = exports.Headers || (exports.Headers = {}));
var MediaTypes;
(function(MediaTypes2) {
MediaTypes2["ApplicationJson"] = "application/json";
})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
function getProxyUrl(serverUrl) {
let proxyUrl = pm.getProxyUrl(new URL(serverUrl));
return proxyUrl ? proxyUrl.href : "";
}
exports.getProxyUrl = getProxyUrl;
var HttpRedirectCodes = [
HttpCodes.MovedPermanently,
HttpCodes.ResourceMoved,
HttpCodes.SeeOther,
HttpCodes.TemporaryRedirect,
HttpCodes.PermanentRedirect
];
var HttpResponseRetryCodes = [
HttpCodes.BadGateway,
HttpCodes.ServiceUnavailable,
HttpCodes.GatewayTimeout
];
var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"];
var ExponentialBackoffCeiling = 10;
var ExponentialBackoffTimeSlice = 5;
var HttpClientError = class extends Error {
constructor(message, statusCode) {
super(message);
this.name = "HttpClientError";
this.statusCode = statusCode;
Object.setPrototypeOf(this, HttpClientError.prototype);
}
};
exports.HttpClientError = HttpClientError;
var HttpClientResponse = class {
constructor(message) {
this.message = message;
}
readBody() {
return new Promise(async (resolve, reject) => {
let output = Buffer.alloc(0);
this.message.on("data", (chunk) => {
output = Buffer.concat([output, chunk]);
});
this.message.on("end", () => {
resolve(output.toString());
});
});
}
};
exports.HttpClientResponse = HttpClientResponse;
function isHttps(requestUrl) {
let parsedUrl = new URL(requestUrl);
return parsedUrl.protocol === "https:";
}
exports.isHttps = isHttps;
var HttpClient = class {
constructor(userAgent, handlers, requestOptions) {
this._ignoreSslError = false;
this._allowRedirects = true;
this._allowRedirectDowngrade = false;
this._maxRedirects = 50;
this._allowRetries = false;
this._maxRetries = 1;
this._keepAlive = false;
this._disposed = false;
this.userAgent = userAgent;
this.handlers = handlers || [];
this.requestOptions = requestOptions;
if (requestOptions) {
if (requestOptions.ignoreSslError != null) {
this._ignoreSslError = requestOptions.ignoreSslError;
}
this._socketTimeout = requestOptions.socketTimeout;
if (requestOptions.allowRedirects != null) {
this._allowRedirects = requestOptions.allowRedirects;
}
if (requestOptions.allowRedirectDowngrade != null) {
this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
}
if (requestOptions.maxRedirects != null) {
this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
}
if (requestOptions.keepAlive != null) {
this._keepAlive = requestOptions.keepAlive;
}
if (requestOptions.allowRetries != null) {
this._allowRetries = requestOptions.allowRetries;
}
if (requestOptions.maxRetries != null) {
this._maxRetries = requestOptions.maxRetries;
}
}
}
options(requestUrl, additionalHeaders) {
return this.request("OPTIONS", requestUrl, null, additionalHeaders || {});
}
get(requestUrl, additionalHeaders) {
return this.request("GET", requestUrl, null, additionalHeaders || {});
}
del(requestUrl, additionalHeaders) {
return this.request("DELETE", requestUrl, null, additionalHeaders || {});
}
post(requestUrl, data, additionalHeaders) {
return this.request("POST", requestUrl, data, additionalHeaders || {});
}
patch(requestUrl, data, additionalHeaders) {
return this.request("PATCH", requestUrl, data, additionalHeaders || {});
}
put(requestUrl, data, additionalHeaders) {
return this.request("PUT", requestUrl, data, additionalHeaders || {});
}
head(requestUrl, additionalHeaders) {
return this.request("HEAD", requestUrl, null, additionalHeaders || {});
}
sendStream(verb, requestUrl, stream, additionalHeaders) {
return this.request(verb, requestUrl, stream, additionalHeaders);
}
async getJson(requestUrl, additionalHeaders = {}) {
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
let res = await this.get(requestUrl, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async postJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
let res = await this.post(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async putJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
let res = await this.put(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async patchJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
let res = await this.patch(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async request(verb, requestUrl, data, headers) {
if (this._disposed) {
throw new Error("Client has already been disposed.");
}
let parsedUrl = new URL(requestUrl);
let info2 = this._prepareRequest(verb, parsedUrl, headers);
let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 ? this._maxRetries + 1 : 1;
let numTries = 0;
let response;
while (numTries < maxTries) {
response = await this.requestRaw(info2, data);
if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) {
let authenticationHandler;
for (let i = 0; i < this.handlers.length; i++) {
if (this.handlers[i].canHandleAuthentication(response)) {
authenticationHandler = this.handlers[i];
break;
}
}
if (authenticationHandler) {
return authenticationHandler.handleAuthentication(this, info2, data);
} else {
return response;
}
}
let redirectsRemaining = this._maxRedirects;
while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && this._allowRedirects && redirectsRemaining > 0) {
const redirectUrl = response.message.headers["location"];
if (!redirectUrl) {
break;
}
let parsedRedirectUrl = new URL(redirectUrl);
if (parsedUrl.protocol == "https:" && parsedUrl.protocol != parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) {
throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");
}
await response.readBody();
if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
for (let header in headers) {
if (header.toLowerCase() === "authorization") {
delete headers[header];
}
}
}
info2 = this._prepareRequest(verb, parsedRedirectUrl, headers);
response = await this.requestRaw(info2, data);
redirectsRemaining--;
}
if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) {
return response;
}
numTries += 1;
if (numTries < maxTries) {
await response.readBody();
await this._performExponentialBackoff(numTries);
}
}
return response;
}
dispose() {
if (this._agent) {
this._agent.destroy();
}
this._disposed = true;
}
requestRaw(info2, data) {
return new Promise((resolve, reject) => {
let callbackForResult = function(err, res) {
if (err) {
reject(err);
}
resolve(res);
};
this.requestRawWithCallback(info2, data, callbackForResult);
});
}
requestRawWithCallback(info2, data, onResult) {
let socket;
if (typeof data === "string") {
info2.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8");
}
let callbackCalled = false;
let handleResult = (err, res) => {
if (!callbackCalled) {
callbackCalled = true;
onResult(err, res);
}
};
let req = info2.httpModule.request(info2.options, (msg) => {
let res = new HttpClientResponse(msg);
handleResult(null, res);
});
req.on("socket", (sock) => {
socket = sock;
});
req.setTimeout(this._socketTimeout || 3 * 6e4, () => {
if (socket) {
socket.end();
}
handleResult(new Error("Request timeout: " + info2.options.path), null);
});
req.on("error", function(err) {
handleResult(err, null);
});
if (data && typeof data === "string") {
req.write(data, "utf8");
}
if (data && typeof data !== "string") {
data.on("close", function() {
req.end();
});
data.pipe(req);
} else {
req.end();
}
}
getAgent(serverUrl) {
let parsedUrl = new URL(serverUrl);
return this._getAgent(parsedUrl);
}
_prepareRequest(method, requestUrl, headers) {
const info2 = {};
info2.parsedUrl = requestUrl;
const usingSsl = info2.parsedUrl.protocol === "https:";
info2.httpModule = usingSsl ? https : http;
const defaultPort = usingSsl ? 443 : 80;
info2.options = {};
info2.options.host = info2.parsedUrl.hostname;
info2.options.port = info2.parsedUrl.port ? parseInt(info2.parsedUrl.port) : defaultPort;
info2.options.path = (info2.parsedUrl.pathname || "") + (info2.parsedUrl.search || "");
info2.options.method = method;
info2.options.headers = this._mergeHeaders(headers);
if (this.userAgent != null) {
info2.options.headers["user-agent"] = this.userAgent;
}
info2.options.agent = this._getAgent(info2.parsedUrl);
if (this.handlers) {
this.handlers.forEach((handler) => {
handler.prepareRequest(info2.options);
});
}
return info2;
}
_mergeHeaders(headers) {
const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
if (this.requestOptions && this.requestOptions.headers) {
return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers));
}
return lowercaseKeys(headers || {});
}
_getExistingOrDefaultHeader(additionalHeaders, header, _default) {
const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
let clientHeader;
if (this.requestOptions && this.requestOptions.headers) {
clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
}
return additionalHeaders[header] || clientHeader || _default;
}
_getAgent(parsedUrl) {
let agent;
let proxyUrl = pm.getProxyUrl(parsedUrl);
let useProxy = proxyUrl && proxyUrl.hostname;
if (this._keepAlive && useProxy) {
agent = this._proxyAgent;
}
if (this._keepAlive && !useProxy) {
agent = this._agent;
}
if (!!agent) {
return agent;
}
const usingSsl = parsedUrl.protocol === "https:";
let maxSockets = 100;
if (!!this.requestOptions) {
maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
}
if (useProxy) {
if (!tunnel) {
tunnel = require_tunnel2();
}
const agentOptions = {
maxSockets,
keepAlive: this._keepAlive,
proxy: {
...(proxyUrl.username || proxyUrl.password) && {
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
},
host: proxyUrl.hostname,
port: proxyUrl.port
}
};
let tunnelAgent;
const overHttps = proxyUrl.protocol === "https:";
if (usingSsl) {
tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
} else {
tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
}
agent = tunnelAgent(agentOptions);
this._proxyAgent = agent;
}
if (this._keepAlive && !agent) {
const options = { keepAlive: this._keepAlive, maxSockets };
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
this._agent = agent;
}
if (!agent) {
agent = usingSsl ? https.globalAgent : http.globalAgent;
}
if (usingSsl && this._ignoreSslError) {
agent.options = Object.assign(agent.options || {}, {
rejectUnauthorized: false
});
}
return agent;
}
_performExponentialBackoff(retryNumber) {
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
return new Promise((resolve) => setTimeout(() => resolve(), ms));
}
static dateTimeDeserializer(key, value) {
if (typeof value === "string") {
let a = new Date(value);
if (!isNaN(a.valueOf())) {
return a;
}
}
return value;
}
async _processResponse(res, options) {
return new Promise(async (resolve, reject) => {
const statusCode = res.message.statusCode;
const response = {
statusCode,
result: null,
headers: {}
};
if (statusCode == HttpCodes.NotFound) {
resolve(response);
}
let obj;
let contents;
try {
contents = await res.readBody();
if (contents && contents.length > 0) {
if (options && options.deserializeDates) {
obj = JSON.parse(contents, HttpClient.dateTimeDeserializer);
} else {
obj = JSON.parse(contents);
}
response.result = obj;
}
response.headers = res.message.headers;
} catch (err) {
}
if (statusCode > 299) {
let msg;
if (obj && obj.message) {
msg = obj.message;
} else if (contents && contents.length > 0) {
msg = contents;
} else {
msg = "Failed request: (" + statusCode + ")";
}
let err = new HttpClientError(msg, statusCode);
err.result = response.result;
reject(err);
} else {
resolve(response);
}
});
}
};
exports.HttpClient = HttpClient;
}
});
// node_modules/@actions/github/lib/github.js
var require_github = __commonJS({
"node_modules/@actions/github/lib/github.js"(exports) {
"use strict";
var __importStar = exports && exports.__importStar || function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
if (mod != null) {
for (var k in mod)
if (Object.hasOwnProperty.call(mod, k))
result[k] = mod[k];
}
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var graphql_1 = require_dist_node6();
var rest_1 = require_rest();
var Context = __importStar(require_context());
var httpClient = __importStar(require_http_client());
rest_1.Octokit.prototype = new rest_1.Octokit();
exports.context = new Context.Context();
var GitHub = class extends rest_1.Octokit {
constructor(token, opts) {
super(GitHub.getOctokitOptions(GitHub.disambiguate(token, opts)));
this.graphql = GitHub.getGraphQL(GitHub.disambiguate(token, opts));
}
static disambiguate(token, opts) {
return [
typeof token === "string" ? token : "",
typeof token === "object" ? token : opts || {}
];
}
static getOctokitOptions(args) {
const token = args[0];
const options = Object.assign({}, args[1]);
options.baseUrl = options.baseUrl || this.getApiBaseUrl();
const auth = GitHub.getAuthString(token, options);
if (auth) {
options.auth = auth;
}
const agent = GitHub.getProxyAgent(options.baseUrl, options);
if (agent) {
options.request = options.request ? Object.assign({}, options.request) : {};
options.request.agent = agent;
}
return options;
}
static getGraphQL(args) {
const defaults = {};
defaults.baseUrl = this.getGraphQLBaseUrl();
const token = args[0];
const options = args[1];
const auth = this.getAuthString(token, options);
if (auth) {
defaults.headers = {
authorization: auth
};
}
const agent = GitHub.getProxyAgent(defaults.baseUrl, options);
if (agent) {
defaults.request = { agent };
}
return graphql_1.graphql.defaults(defaults);
}
static getAuthString(token, options) {
if (!token && !options.auth) {
throw new Error("Parameter token or opts.auth is required");
} else if (token && options.auth) {
throw new Error("Parameters token and opts.auth may not both be specified");
}
return typeof options.auth === "string" ? options.auth : `token ${token}`;
}
static getProxyAgent(destinationUrl, options) {
var _a;
if (!((_a = options.request) === null || _a === void 0 ? void 0 : _a.agent)) {
if (httpClient.getProxyUrl(destinationUrl)) {
const hc = new httpClient.HttpClient();
return hc.getAgent(destinationUrl);
}
}
return void 0;
}
static getApiBaseUrl() {
return process.env["GITHUB_API_URL"] || "https://api.github.com";
}
static getGraphQLBaseUrl() {
let url = process.env["GITHUB_GRAPHQL_URL"] || "https://api.github.com/graphql";
if (url.endsWith("/")) {
url = url.substr(0, url.length - 1);
}
if (url.toUpperCase().endsWith("/GRAPHQL")) {
url = url.substr(0, url.length - "/graphql".length);
}
return url;
}
};
exports.GitHub = GitHub;
}
});
// src/main.js
var core4 = __toESM(require_core(), 1);
var import_os2 = __toESM(require("os"), 1);
var import_semver = __toESM(require_semver2(), 1);
// src/lib/setup.js
var import_core = __toESM(require_core(), 1);
var import_fs = __toESM(require("fs"), 1);
var import_path = __toESM(require("path"), 1);
var Setup = class {
static debug() {
import_core.default.debug(
` Available environment variables:
-> ${Object.keys(process.env).map((i) => i + " :: " + process.env[i]).join("\n -> ")}`
);
const dir = import_fs.default.readdirSync(import_path.default.resolve(process.env.GITHUB_WORKSPACE), { withFileTypes: true }).map((entry) => {
return `${entry.isDirectory() ? "> " : " - "}${entry.name}`;
}).join("\n");
import_core.default.debug(` Working Directory: ${process.env.GITHUB_WORKSPACE}:
${dir}`);
}
static requireAnyEnv() {
for (const arg of arguments) {
if (!process.env.hasOwnProperty(arg)) {
return;
}
}
throw new Error("At least one of the following environment variables is required: " + Array.slice(arguments).join(", "));
}
};
// src/lib/package.js
var import_fs2 = __toESM(require("fs"), 1);
var import_path2 = __toESM(require("path"), 1);
var Package = class {
constructor(root = "./") {
root = import_path2.default.join(process.env.GITHUB_WORKSPACE, root);
if (import_fs2.default.statSync(root).isDirectory()) {
root = import_path2.default.join(root, "package.json");
}
if (!import_fs2.default.existsSync(root)) {
throw new Error(`package.json does not exist at ${root}.`);
}
this.root = root;
this.data = JSON.parse(import_fs2.default.readFileSync(root));
}
get version() {
return this.data.version;
}
};
// src/lib/tag.js
var import_core2 = __toESM(require_core(), 1);
var import_os = __toESM(require("os"), 1);
var import_github = __toESM(require_github(), 1);
var github = new import_github.default.GitHub(process.env.GITHUB_TOKEN || process.env.INPUT_GITHUB_TOKEN);
var { owner, repo } = import_github.default.context.repo;
var Tag = class {
constructor(prefix, version, postfix) {
this.prefix = prefix;
this.version = version;
this.postfix = postfix;
this._tags = null;
this._message = null;
this._exists = null;
this._sha = "";
this._uri = "";
this._ref = "";
}
get name() {
return `${this.prefix.trim()}${this.version.trim()}${this.postfix.trim()}`;
}
set message(value) {
if (value && value.length > 0) {
this._message = value;
}
}
get message() {
return this._message || "";
}
get sha() {
return this._sha || "";
}
get uri() {
return this._uri || "";
}
get ref() {
return this._ref || "";
}
get prerelease() {
return /([0-9\.]{5}(-[\w\.0-9]+)?)/i.test(this.version);
}
get build() {
return /([0-9\.]{5}(\+[\w\.0-9]+)?)/i.test(this.version);
}
async getMessage() {
if (this._message !== null) {
return this._message;
}
try {
let tags = await this.getTags();
if (tags.length === 0) {
return `Version ${this.version}`;
}
const changelog = await github.repos.compareCommits({ owner, repo, base: tags.shift().name, head: "master" });
const tpl = (import_core2.default.getInput("commit_message_template", { required: false }) || "").trim();
return changelog.data.commits.map(
(commit, i) => {
if (tpl.length > 0) {
return tpl.replace(/\{\{\s?(number)\s?\}\}/gi, i + 1).replace(/\{\{\s?(message)\s?\}\}/gi, commit.commit.message).replace(/\{\{\s?(author)\s?\}\}/gi, commit.hasOwnProperty("author") ? commit.author.hasOwnProperty("login") ? commit.author.login : "" : "").replace(/\{\{\s?(sha)\s?\}\}/gi, commit.sha).trim() + "\n";
} else {
return `${i === 0 ? "\n" : ""}${i + 1}) ${commit.commit.message}${commit.hasOwnProperty("author") ? commit.author.hasOwnProperty("login") ? " (" + commit.author.login + ")" : "" : ""}
(SHA: ${commit.sha})
`;
}
}
).join("\n");
} catch (e) {
import_core2.default.warning("Failed to generate changelog from commits: " + e.message + import_os.default.EOL);
return `Version ${this.version}`;
}
}
async getTags() {
if (this._tags !== null) {
return this._tags.data;
}
this._tags = await github.repos.listTags({ owner, repo, per_page: 100 });
return this._tags.data;
}
async exists() {
if (this._exists !== null) {
return this._exists;
}
const currentTag = this.name;
const tags = await this.getTags();
for (const tag of tags) {
if (tag.name === currentTag) {
this._exists = true;
return true;
}
}
this._exists = false;
return false;
}
async push() {
let tagexists = await this.exists();
if (!tagexists) {
const message = await this.getMessage();
const newTag = await github.git.createTag({
owner,
repo,
tag: this.name,
message,
object: process.env.GITHUB_SHA,
type: "commit"
});
this._sha = newTag.data.sha;
import_core2.default.warning(`Created new tag: ${newTag.data.tag}`);
let newReference;
try {
newReference = await github.git.createRef({
owner,
repo,
ref: `refs/tags/${newTag.data.tag}`,
sha: newTag.data.sha
});
} catch (e) {
import_core2.default.warning({
owner,
repo,
ref: `refs/tags/${newTag.data.tag}`,
sha: newTag.data.sha
});
throw e;
}
this._uri = newReference.data.url;
this._ref = newReference.data.ref;
this._message = message;
import_core2.default.warning(`Reference ${newReference.data.ref} available at ${newReference.data.url}` + import_os.default.EOL);
} else {
import_core2.default.warning("Cannot push tag (it already exists).");
}
}
};
// src/lib/regex.js
var import_fs3 = __toESM(require("fs"), 1);
var import_path3 = __toESM(require("path"), 1);
var Regex = class {
constructor(root = "./", pattern) {
root = import_path3.default.resolve(root);
if (import_fs3.default.statSync(root).isDirectory()) {
throw new Error(`${root} is a directory. The Regex tag identification strategy requires a file.`);
}
if (!import_fs3.default.existsSync(root)) {
throw new Error(`"${root}" does not exist.`);
}
this.content = import_fs3.default.readFileSync(root).toString();
let content = pattern.exec(this.content);
if (!content) {
this._version = null;
} else if (content.groups && content.groups.version) {
this._version = content.groups.version;
} else {
this._version = content[1];
}
}
get version() {
return this._version;
}
get versionFound() {
return this._version !== null;
}
};
// src/lib/docker.js
var import_path4 = __toESM(require("path"), 1);
var import_fs4 = __toESM(require("fs"), 1);
var import_core3 = __toESM(require_core(), 1);
var Dockerfile = class extends Regex {
constructor(root = null) {
root = import_path4.default.join(process.env.GITHUB_WORKSPACE, root);
if (import_fs4.default.statSync(root).isDirectory()) {
root = import_path4.default.join(root, "Dockerfile");
}
super(root, /LABEL[\s\t]+version=[\t\s+]?[\"\']?([0-9\.]+)[\"\']?/i);
}
};
// src/main.js
async function run() {
try {
Setup.debug();
Setup.requireAnyEnv("GITHUB_TOKEN", "INPUT_GITHUB_TOKEN");
core4.setOutput("tagcreated", "no");
const strategy = (core4.getInput("regex_pattern", { required: false }) || "").trim().length > 0 ? "regex" : (core4.getInput("strategy", { required: false }) || "package").trim().toLowerCase();
const root = core4.getInput("root", { required: false }) || core4.getInput("package_root", { required: false }) || (strategy === "composer" ? "./composer.json" : "./");
const isDryRun = (core4.getInput("dry_run", { required: false }) || "").trim().toLowerCase() === "true";
let version = core4.getInput("root", { required: false });
version = version === null || version.trim().length === 0 ? null : version;
const pattern = core4.getInput("regex_pattern", { required: false });
const versionSemVer = import_semver.default.coerce(version);
if (!versionSemVer) {
switch (strategy) {
case "docker":
version = new Dockerfile(root).version;
break;
case "composer":
case "package":
version = new Package(root).version;
break;
case "regex":
version = new Regex(root, new RegExp(pattern, "gim")).version;
break;
default:
core4.setFailed(`"${strategy}" is not a recognized tagging strategy. Choose from: 'package' (package.json), 'composer' (composer.json), 'docker' (uses Dockerfile), or 'regex' (JS-based RegExp).`);
return;
}
}
const msg = ` using the ${strategy} extraction${strategy === "regex" ? " with the /" + pattern + "/gim pattern." : ""}.`;
if (!version) {
throw new Error(`No version identified${msg}`);
}
const minVersion = core4.getInput("min_version", { required: false });
const minVersionSemVer = import_semver.default.coerce(minVersion);
if (!minVersionSemVer) {
core4.info(`Skipping min version check. ${minVersion} is not valid SemVer`);
}
if (!versionSemVer) {
core4.info(`Skipping min version check. ${version} is not valid SemVer`);
}
if (minVersionSemVer && versionSemVer && import_semver.default.lt(versionSemVer, minVersionSemVer)) {
core4.info(`Version "${version}" is lower than minimum "${minVersion}"`);
return;
}
core4.notice(`Recognized "${version}"${msg}`);
core4.setOutput("version", version);
core4.debug(` Detected version ${version}`);
const tag = new Tag(
core4.getInput("tag_prefix", { required: false }),
version,
core4.getInput("tag_suffix", { required: false })
);
if (isDryRun) {
core4.notice(`"${tag.name}" tag was not pushed because the dry_run option was set.`);
} else {
core4.info(`Attempting to create ${tag.name} tag.`);
}
core4.setOutput("tagrequested", tag.name);
core4.setOutput("prerelease", tag.prerelease ? "yes" : "no");
core4.setOutput("build", tag.build ? "yes" : "no");
if (await tag.exists()) {
core4.setFailed(`"${tag.name}" tag already exists.` + import_os2.default.EOL);
core4.setOutput("tagname", "");
return;
}
tag.message = core4.getInput("tag_message", { required: false }).trim();
if (!isDryRun) {
await tag.push();
core4.setOutput("tagcreated", "yes");
}
core4.setOutput("tagname", tag.name);
core4.setOutput("tagsha", tag.sha);
core4.setOutput("taguri", tag.uri);
core4.setOutput("tagmessage", tag.message);
core4.setOutput("tagref", tag.ref);
} catch (error) {
core4.warning(error.message);
core4.warning(error.stack);
core4.setOutput("tagname", "");
core4.setOutput("tagsha", "");
core4.setOutput("taguri", "");
core4.setOutput("tagmessage", "");
core4.setOutput("tagref", "");
core4.setOutput("tagcreated", "no");
}
}
run();
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/