From c81818cd90cb309ec0c3d07feec613ccb1ce92c9 Mon Sep 17 00:00:00 2001 From: Josh Feldman Date: Thu, 14 Apr 2022 16:41:55 -0400 Subject: [PATCH] implemented solution proposed in https://github.com/romeovs/lcov-reporter-action/issues/33 --- dist/main.js | 1502 +++++++++++++++++++++++++------------------------- src/index.js | 8 +- 2 files changed, 770 insertions(+), 740 deletions(-) diff --git a/dist/main.js b/dist/main.js index 3f77464a..7e006962 100644 --- a/dist/main.js +++ b/dist/main.js @@ -1,20 +1,32 @@ 'use strict'; -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - var fs = require('fs'); -var fs__default = _interopDefault(fs); -var os = _interopDefault(require('os')); -var path = _interopDefault(require('path')); -var child_process = _interopDefault(require('child_process')); -var Stream = _interopDefault(require('stream')); -var assert = _interopDefault(require('assert')); -var events = _interopDefault(require('events')); -var util = _interopDefault(require('util')); -var http = _interopDefault(require('http')); -var Url = _interopDefault(require('url')); -var https = _interopDefault(require('https')); -var zlib = _interopDefault(require('zlib')); +var os = require('os'); +var path = require('path'); +var child_process = require('child_process'); +var Stream = require('stream'); +var assert = require('assert'); +var events = require('events'); +var util = require('util'); +var http = require('http'); +var Url = require('url'); +var https = require('https'); +var zlib = require('zlib'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs); +var os__default = /*#__PURE__*/_interopDefaultLegacy(os); +var path__default = /*#__PURE__*/_interopDefaultLegacy(path); +var child_process__default = /*#__PURE__*/_interopDefaultLegacy(child_process); +var Stream__default = /*#__PURE__*/_interopDefaultLegacy(Stream); +var assert__default = /*#__PURE__*/_interopDefaultLegacy(assert); +var events__default = /*#__PURE__*/_interopDefaultLegacy(events); +var util__default = /*#__PURE__*/_interopDefaultLegacy(util); +var http__default = /*#__PURE__*/_interopDefaultLegacy(http); +var Url__default = /*#__PURE__*/_interopDefaultLegacy(Url); +var https__default = /*#__PURE__*/_interopDefaultLegacy(https); +var zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib); var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; @@ -30,7 +42,7 @@ function getCjsExportFromNamespace (n) { return n && n['default'] || n; } -var command = createCommonjsModule(function (module, exports) { +var command$1 = createCommonjsModule(function (module, exports) { Object.defineProperty(exports, "__esModule", { value: true }); /** @@ -45,7 +57,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); */ function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); + process.stdout.write(cmd.toString() + os__default["default"].EOL); } exports.issueCommand = issueCommand; function issue(name, message = '') { @@ -98,11 +110,11 @@ function escape(s) { }); -unwrapExports(command); -var command_1 = command.issueCommand; -var command_2 = command.issue; +unwrapExports(command$1); +command$1.issueCommand; +command$1.issue; -var core = createCommonjsModule(function (module, exports) { +var core$2 = createCommonjsModule(function (module, exports) { var __awaiter = (commonjsGlobal && commonjsGlobal.__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) { @@ -140,7 +152,7 @@ var ExitCode; */ function exportVariable(name, val) { process.env[name] = val; - command.issueCommand('set-env', { name }, val); + command$1.issueCommand('set-env', { name }, val); } exports.exportVariable = exportVariable; /** @@ -148,7 +160,7 @@ exports.exportVariable = exportVariable; * @param secret value of the secret */ function setSecret(secret) { - command.issueCommand('add-mask', {}, secret); + command$1.issueCommand('add-mask', {}, secret); } exports.setSecret = setSecret; /** @@ -156,8 +168,8 @@ exports.setSecret = setSecret; * @param inputPath */ function addPath(inputPath) { - command.issueCommand('add-path', {}, inputPath); - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; + command$1.issueCommand('add-path', {}, inputPath); + process.env['PATH'] = `${inputPath}${path__default["default"].delimiter}${process.env['PATH']}`; } exports.addPath = addPath; /** @@ -182,7 +194,7 @@ exports.getInput = getInput; * @param value value to store */ function setOutput(name, value) { - command.issueCommand('set-output', { name }, value); + command$1.issueCommand('set-output', { name }, value); } exports.setOutput = setOutput; //----------------------------------------------------------------------- @@ -206,7 +218,7 @@ exports.setFailed = setFailed; * @param message debug message */ function debug(message) { - command.issueCommand('debug', {}, message); + command$1.issueCommand('debug', {}, message); } exports.debug = debug; /** @@ -214,7 +226,7 @@ exports.debug = debug; * @param message error issue message */ function error(message) { - command.issue('error', message); + command$1.issue('error', message); } exports.error = error; /** @@ -222,7 +234,7 @@ exports.error = error; * @param message warning issue message */ function warning(message) { - command.issue('warning', message); + command$1.issue('warning', message); } exports.warning = warning; /** @@ -230,7 +242,7 @@ exports.warning = warning; * @param message info message */ function info(message) { - process.stdout.write(message + os.EOL); + process.stdout.write(message + os__default["default"].EOL); } exports.info = info; /** @@ -241,14 +253,14 @@ exports.info = info; * @param name The name of the output group */ function startGroup(name) { - command.issue('group', name); + command$1.issue('group', name); } exports.startGroup = startGroup; /** * End an output group. */ function endGroup() { - command.issue('endgroup'); + command$1.issue('endgroup'); } exports.endGroup = endGroup; /** @@ -283,7 +295,7 @@ exports.group = group; * @param value value to store */ function saveState(name, value) { - command.issueCommand('save-state', { name }, value); + command$1.issueCommand('save-state', { name }, value); } exports.saveState = saveState; /** @@ -299,23 +311,23 @@ exports.getState = getState; }); -var core$1 = unwrapExports(core); -var core_1 = core.ExitCode; -var core_2 = core.exportVariable; -var core_3 = core.setSecret; -var core_4 = core.addPath; -var core_5 = core.getInput; -var core_6 = core.setOutput; -var core_7 = core.setFailed; -var core_8 = core.debug; -var core_9 = core.error; -var core_10 = core.warning; -var core_11 = core.info; -var core_12 = core.startGroup; -var core_13 = core.endGroup; -var core_14 = core.group; -var core_15 = core.saveState; -var core_16 = core.getState; +var core$3 = unwrapExports(core$2); +core$2.ExitCode; +core$2.exportVariable; +core$2.setSecret; +core$2.addPath; +core$2.getInput; +core$2.setOutput; +var core_7 = core$2.setFailed; +var core_8 = core$2.debug; +core$2.error; +core$2.warning; +core$2.info; +core$2.startGroup; +core$2.endGroup; +core$2.group; +core$2.saveState; +core$2.getState; /*! * isobject @@ -324,7 +336,7 @@ var core_16 = core.getState; * Released under the MIT License. */ -function isObject(val) { +function isObject$4(val) { return val != null && typeof val === 'object' && Array.isArray(val) === false; } @@ -335,15 +347,15 @@ function isObject(val) { * Released under the MIT License. */ -function isObjectObject(o) { - return isObject(o) === true +function isObjectObject$1(o) { + return isObject$4(o) === true && Object.prototype.toString.call(o) === '[object Object]'; } -function isPlainObject(o) { +function isPlainObject$1(o) { var ctor,prot; - if (isObjectObject(o) === false) return false; + if (isObjectObject$1(o) === false) return false; // If has modified constructor ctor = o.constructor; @@ -351,7 +363,7 @@ function isPlainObject(o) { // If has modified prototype prot = ctor.prototype; - if (isObjectObject(prot) === false) return false; + if (isObjectObject$1(prot) === false) return false; // If constructor does not have an Object-specific method if (prot.hasOwnProperty('isPrototypeOf') === false) { @@ -362,7 +374,7 @@ function isPlainObject(o) { return true; } -var index_cjs = isPlainObject; +var index_cjs$1 = isPlainObject$1; const nameMap = new Map([ [19, 'Catalina'], @@ -383,7 +395,7 @@ const nameMap = new Map([ ]); const macosRelease = release => { - release = Number((release || os.release()).split('.')[0]); + release = Number((release || os__default["default"].release()).split('.')[0]); return { name: nameMap.get(release), version: '10.' + (release - 4) @@ -406,8 +418,8 @@ var src = function(fn) { }; -var windows = isexe; -isexe.sync = sync; +var windows = isexe$2; +isexe$2.sync = sync$3; @@ -432,39 +444,39 @@ function checkPathExt (path, options) { return false } -function checkStat (stat, path, options) { +function checkStat$1 (stat, path, options) { if (!stat.isSymbolicLink() && !stat.isFile()) { return false } return checkPathExt(path, options) } -function isexe (path, options, cb) { - fs__default.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)); +function isexe$2 (path, options, cb) { + fs__default["default"].stat(path, function (er, stat) { + cb(er, er ? false : checkStat$1(stat, path, options)); }); } -function sync (path, options) { - return checkStat(fs__default.statSync(path), path, options) +function sync$3 (path, options) { + return checkStat$1(fs__default["default"].statSync(path), path, options) } var mode = isexe$1; -isexe$1.sync = sync$1; +isexe$1.sync = sync$2; function isexe$1 (path, options, cb) { - fs__default.stat(path, function (er, stat) { - cb(er, er ? false : checkStat$1(stat, options)); + fs__default["default"].stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)); }); } -function sync$1 (path, options) { - return checkStat$1(fs__default.statSync(path), options) +function sync$2 (path, options) { + return checkStat(fs__default["default"].statSync(path), options) } -function checkStat$1 (stat, options) { +function checkStat (stat, options) { return stat.isFile() && checkMode(stat, options) } @@ -491,17 +503,17 @@ function checkMode (stat, options) { return ret } -var core$2; +var core$1; if (process.platform === 'win32' || commonjsGlobal.TESTING_WINDOWS) { - core$2 = windows; + core$1 = windows; } else { - core$2 = mode; + core$1 = mode; } -var isexe_1 = isexe$2; -isexe$2.sync = sync$2; +var isexe_1 = isexe; +isexe.sync = sync$1; -function isexe$2 (path, options, cb) { +function isexe (path, options, cb) { if (typeof options === 'function') { cb = options; options = {}; @@ -513,7 +525,7 @@ function isexe$2 (path, options, cb) { } return new Promise(function (resolve, reject) { - isexe$2(path, options || {}, function (er, is) { + isexe(path, options || {}, function (er, is) { if (er) { reject(er); } else { @@ -523,7 +535,7 @@ function isexe$2 (path, options, cb) { }) } - core$2(path, options || {}, function (er, is) { + core$1(path, options || {}, function (er, is) { // ignore EACCES because that just means we aren't allowed to run it if (er) { if (er.code === 'EACCES' || options && options.ignoreErrors) { @@ -535,10 +547,10 @@ function isexe$2 (path, options, cb) { }); } -function sync$2 (path, options) { +function sync$1 (path, options) { // my kingdom for a filtered catch try { - return core$2.sync(path, options || {}) + return core$1.sync(path, options || {}) } catch (er) { if (options && options.ignoreErrors || er.code === 'EACCES') { return false @@ -622,7 +634,7 @@ function which (cmd, opt, cb) { if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1); - var p = path.join(pathPart, cmd); + var p = path__default["default"].join(pathPart, cmd); if (!pathPart && (/^\.[\\\/]/).test(cmd)) { p = cmd.slice(0, 2) + p; } @@ -656,7 +668,7 @@ function whichSync (cmd, opt) { if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1); - var p = path.join(pathPart, cmd); + var p = path__default["default"].join(pathPart, cmd); if (!pathPart && /^\.[\\\/]/.test(cmd)) { p = cmd.slice(0, 2) + p; } @@ -684,7 +696,7 @@ function whichSync (cmd, opt) { throw getNotFoundError(cmd) } -var pathKey = opts => { +var pathKey$1 = opts => { opts = opts || {}; const env = opts.env || process.env; @@ -697,7 +709,7 @@ var pathKey = opts => { return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; }; -const pathKey$1 = pathKey(); +const pathKey = pathKey$1(); function resolveCommandAttempt(parsed, withoutPathExt) { const cwd = process.cwd(); @@ -717,8 +729,8 @@ function resolveCommandAttempt(parsed, withoutPathExt) { try { resolved = which_1.sync(parsed.command, { - path: (parsed.options.env || process.env)[pathKey$1], - pathExt: withoutPathExt ? path.delimiter : undefined, + path: (parsed.options.env || process.env)[pathKey], + pathExt: withoutPathExt ? path__default["default"].delimiter : undefined, }); } catch (e) { /* Empty */ @@ -729,7 +741,7 @@ function resolveCommandAttempt(parsed, withoutPathExt) { // If we successfully resolved, ensure that an absolute path is returned // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it if (resolved) { - resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); + resolved = path__default["default"].resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); } return resolved; @@ -782,11 +794,11 @@ function escapeArgument(arg, doubleEscapeMetaChars) { return arg; } -var command$1 = escapeCommand; +var command = escapeCommand; var argument = escapeArgument; var _escape = { - command: command$1, + command: command, argument: argument }; @@ -826,9 +838,9 @@ function readShebang(command) { let fd; try { - fd = fs__default.openSync(command, 'r'); - fs__default.readSync(fd, buffer, 0, size, 0); - fs__default.closeSync(fd); + fd = fs__default["default"].openSync(command, 'r'); + fs__default["default"].readSync(fd, buffer, 0, size, 0); + fs__default["default"].closeSync(fd); } catch (e) { /* Empty */ } // Attempt to extract shebang (null is returned if not a shebang) @@ -2322,48 +2334,48 @@ function coerce (version) { '.' + (match[3] || '0')) } }); -var semver_1 = semver.SEMVER_SPEC_VERSION; -var semver_2 = semver.re; -var semver_3 = semver.src; -var semver_4 = semver.parse; -var semver_5 = semver.valid; -var semver_6 = semver.clean; -var semver_7 = semver.SemVer; -var semver_8 = semver.inc; -var semver_9 = semver.diff; -var semver_10 = semver.compareIdentifiers; -var semver_11 = semver.rcompareIdentifiers; -var semver_12 = semver.major; -var semver_13 = semver.minor; -var semver_14 = semver.patch; -var semver_15 = semver.compare; -var semver_16 = semver.compareLoose; -var semver_17 = semver.rcompare; -var semver_18 = semver.sort; -var semver_19 = semver.rsort; -var semver_20 = semver.gt; -var semver_21 = semver.lt; -var semver_22 = semver.eq; -var semver_23 = semver.neq; -var semver_24 = semver.gte; -var semver_25 = semver.lte; -var semver_26 = semver.cmp; -var semver_27 = semver.Comparator; -var semver_28 = semver.Range; -var semver_29 = semver.toComparators; -var semver_30 = semver.satisfies; -var semver_31 = semver.maxSatisfying; -var semver_32 = semver.minSatisfying; -var semver_33 = semver.minVersion; -var semver_34 = semver.validRange; -var semver_35 = semver.ltr; -var semver_36 = semver.gtr; -var semver_37 = semver.outside; -var semver_38 = semver.prerelease; -var semver_39 = semver.intersects; -var semver_40 = semver.coerce; +semver.SEMVER_SPEC_VERSION; +semver.re; +semver.src; +semver.parse; +semver.valid; +semver.clean; +semver.SemVer; +semver.inc; +semver.diff; +semver.compareIdentifiers; +semver.rcompareIdentifiers; +semver.major; +semver.minor; +semver.patch; +semver.compare; +semver.compareLoose; +semver.rcompare; +semver.sort; +semver.rsort; +semver.gt; +semver.lt; +semver.eq; +semver.neq; +semver.gte; +semver.lte; +semver.cmp; +semver.Comparator; +semver.Range; +semver.toComparators; +semver.satisfies; +semver.maxSatisfying; +semver.minSatisfying; +semver.minVersion; +semver.validRange; +semver.ltr; +semver.gtr; +semver.outside; +semver.prerelease; +semver.intersects; +semver.coerce; -const isWin = process.platform === 'win32'; +const isWin$1 = process.platform === 'win32'; const isExecutableRegExp = /\.(?:com|exe)$/i; const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; @@ -2386,7 +2398,7 @@ function detectShebang(parsed) { } function parseNonShell(parsed) { - if (!isWin) { + if (!isWin$1) { return parsed; } @@ -2407,7 +2419,7 @@ function parseNonShell(parsed) { // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) // This is necessary otherwise it will always fail with ENOENT in those cases - parsed.command = path.normalize(parsed.command); + parsed.command = path__default["default"].normalize(parsed.command); // Escape command & arguments parsed.command = _escape.command(parsed.command); @@ -2433,7 +2445,7 @@ function parseShell(parsed) { // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 const shellCommand = [parsed.command].concat(parsed.args).join(' '); - if (isWin) { + if (isWin$1) { 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; // Tell node's spawn that the arguments are already escaped @@ -2452,7 +2464,7 @@ function parseShell(parsed) { return parsed; } -function parse(command, args, options) { +function parse$2(command, args, options) { // Normalize arguments, similar to nodejs if (args && !Array.isArray(args)) { options = args; @@ -2478,9 +2490,9 @@ function parse(command, args, options) { return options.shell ? parseShell(parsed) : parseNonShell(parsed); } -var parse_1 = parse; +var parse_1 = parse$2; -const isWin$1 = process.platform === 'win32'; +const isWin = process.platform === 'win32'; function notFoundError(original, syscall) { return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { @@ -2493,7 +2505,7 @@ function notFoundError(original, syscall) { } function hookChildProcess(cp, parsed) { - if (!isWin$1) { + if (!isWin) { return; } @@ -2516,7 +2528,7 @@ function hookChildProcess(cp, parsed) { } function verifyENOENT(status, parsed) { - if (isWin$1 && status === 1 && !parsed.file) { + if (isWin && status === 1 && !parsed.file) { return notFoundError(parsed.original, 'spawn'); } @@ -2524,7 +2536,7 @@ function verifyENOENT(status, parsed) { } function verifyENOENTSync(status, parsed) { - if (isWin$1 && status === 1 && !parsed.file) { + if (isWin && status === 1 && !parsed.file) { return notFoundError(parsed.original, 'spawnSync'); } @@ -2537,13 +2549,17 @@ var enoent = { verifyENOENTSync, notFoundError, }; +enoent.hookChildProcess; +enoent.verifyENOENT; +enoent.verifyENOENTSync; +enoent.notFoundError; function spawn(command, args, options) { // Parse the arguments const parsed = parse_1(command, args, options); // Spawn the child process - const spawned = child_process.spawn(parsed.command, parsed.args, parsed.options); + const spawned = child_process__default["default"].spawn(parsed.command, parsed.args, parsed.options); // Hook into child process "exit" event to emit an error if the command // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 @@ -2557,7 +2573,7 @@ function spawnSync(command, args, options) { const parsed = parse_1(command, args, options); // Spawn the child process - const result = child_process.spawnSync(parsed.command, parsed.args, parsed.options); + const result = child_process__default["default"].spawnSync(parsed.command, parsed.args, parsed.options); // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); @@ -2567,12 +2583,12 @@ function spawnSync(command, args, options) { var crossSpawn = spawn; var spawn_1 = spawn; -var sync$3 = spawnSync; +var sync = spawnSync; var _parse = parse_1; var _enoent = enoent; crossSpawn.spawn = spawn_1; -crossSpawn.sync = sync$3; +crossSpawn.sync = sync; crossSpawn._parse = _parse; crossSpawn._enoent = _enoent; @@ -2598,23 +2614,23 @@ var npmRunPath = createCommonjsModule(function (module) { module.exports = opts => { opts = Object.assign({ cwd: process.cwd(), - path: process.env[pathKey()] + path: process.env[pathKey$1()] }, opts); let prev; - let pth = path.resolve(opts.cwd); + let pth = path__default["default"].resolve(opts.cwd); const ret = []; while (prev !== pth) { - ret.push(path.join(pth, 'node_modules/.bin')); + ret.push(path__default["default"].join(pth, 'node_modules/.bin')); prev = pth; - pth = path.resolve(pth, '..'); + pth = path__default["default"].resolve(pth, '..'); } // ensure the running `node` binary is used - ret.push(path.dirname(process.execPath)); + ret.push(path__default["default"].dirname(process.execPath)); - return ret.concat(opts.path).join(path.delimiter); + return ret.concat(opts.path).join(path__default["default"].delimiter); }; module.exports.env = opts => { @@ -2623,7 +2639,7 @@ module.exports.env = opts => { }, opts); const env = Object.assign({}, opts.env); - const path = pathKey({env}); + const path = pathKey$1({env}); opts.path = env[path]; env[path] = module.exports(opts); @@ -2631,7 +2647,7 @@ module.exports.env = opts => { return env; }; }); -var npmRunPath_1 = npmRunPath.env; +npmRunPath.env; var isStream_1 = createCommonjsModule(function (module) { @@ -2733,9 +2749,9 @@ function onceStrict (fn) { } once_1.strict = strict; -var noop = function() {}; +var noop$2 = function() {}; -var isRequest = function(stream) { +var isRequest$2 = function(stream) { return stream.setHeader && typeof stream.abort === 'function'; }; @@ -2747,7 +2763,7 @@ var eos = function(stream, opts, callback) { if (typeof opts === 'function') return eos(stream, null, opts); if (!opts) opts = {}; - callback = once_1(callback || noop); + callback = once_1(callback || noop$2); var ws = stream._writableState; var rs = stream._readableState; @@ -2791,7 +2807,7 @@ var eos = function(stream, opts, callback) { stream.req.on('finish', onfinish); }; - if (isRequest(stream)) { + if (isRequest$2(stream)) { stream.on('complete', onfinish); stream.on('abort', onclose); if (stream.req) onrequest(); @@ -2837,8 +2853,8 @@ var isFn = function (fn) { var isFS = function (stream) { if (!ancient) return false // newer node version do not need to care about fs is a special way - if (!fs__default) return false // browser - return (stream instanceof (fs__default.ReadStream || noop$1) || stream instanceof (fs__default.WriteStream || noop$1)) && isFn(stream.close) + if (!fs__default["default"]) return false // browser + return (stream instanceof (fs__default["default"].ReadStream || noop$1) || stream instanceof (fs__default["default"].WriteStream || noop$1)) && isFn(stream.close) }; var isRequest$1 = function (stream) { @@ -2907,7 +2923,7 @@ var pump = function () { var pump_1 = pump; -const {PassThrough} = Stream; +const {PassThrough: PassThrough$2} = Stream__default["default"]; var bufferStream = options => { options = Object.assign({}, options); @@ -2929,7 +2945,7 @@ var bufferStream = options => { let len = 0; const ret = []; - const stream = new PassThrough({objectMode}); + const stream = new PassThrough$2({objectMode}); if (encoding) { stream.setEncoding(encoding); @@ -3023,7 +3039,7 @@ var pFinally = (promise, onFinally) => { ); }; -var signals = createCommonjsModule(function (module) { +var signals$1 = createCommonjsModule(function (module) { // This is not the set of all possible signals. // // It IS, however, the set of all signals that trigger @@ -3083,9 +3099,9 @@ if (process.platform === 'linux') { // that are in the direct sync flow of nyc's outputCoverage are // ignored, since we can never get coverage for them. -var signals$1 = signals; +var signals = signals$1; -var EE = events; +var EE = events__default["default"]; /* istanbul ignore if */ if (typeof EE !== 'function') { EE = EE.EventEmitter; @@ -3110,7 +3126,7 @@ if (!emitter.infinite) { } var signalExit = function (cb, opts) { - assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler'); + assert__default["default"].equal(typeof cb, 'function', 'a callback must be provided for exit handler'); if (loaded === false) { load(); @@ -3140,7 +3156,7 @@ function unload () { } loaded = false; - signals$1.forEach(function (sig) { + signals.forEach(function (sig) { try { process.removeListener(sig, sigListeners[sig]); } catch (er) {} @@ -3160,7 +3176,7 @@ function emit (event, code, signal) { // { : , ... } var sigListeners = {}; -signals$1.forEach(function (sig) { +signals.forEach(function (sig) { sigListeners[sig] = function listener () { // If there are no other listeners, an exit is coming! // Simplest way: remove us and then re-send the signal. @@ -3179,7 +3195,7 @@ signals$1.forEach(function (sig) { }); var signals_1 = function () { - return signals$1 + return signals }; var load_1 = load; @@ -3198,7 +3214,7 @@ function load () { // handle it instead of us. emitter.count += 1; - signals$1 = signals$1.filter(function (sig) { + signals = signals.filter(function (sig) { try { process.on(sig, sigListeners[sig]); return true @@ -3247,8 +3263,8 @@ var errname_1 = createCommonjsModule(function (module) { let uv; -if (typeof util.getSystemErrorName === 'function') { - module.exports = util.getSystemErrorName; +if (typeof util__default["default"].getSystemErrorName === 'function') { + module.exports = util__default["default"].getSystemErrorName; } else { try { uv = process.binding('uv'); @@ -3279,7 +3295,7 @@ function errname(uv, code) { return `Unknown system error ${code}`; } }); -var errname_2 = errname_1.__test__; +errname_1.__test__; const alias = ['stdin', 'stdout', 'stderr']; @@ -3387,7 +3403,7 @@ function handleArgs(cmd, args, opts) { opts.cleanup = false; } - if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { + if (process.platform === 'win32' && path__default["default"].basename(parsed.command) === 'cmd.exe') { // #116 parsed.args.unshift('/q'); } @@ -3526,7 +3542,7 @@ module.exports = (cmd, args, opts) => { let spawned; try { - spawned = child_process.spawn(parsed.cmd, parsed.args, parsed.opts); + spawned = child_process__default["default"].spawn(parsed.cmd, parsed.args, parsed.opts); } catch (err) { return Promise.reject(err); } @@ -3655,7 +3671,7 @@ module.exports.sync = (cmd, args, opts) => { throw new TypeError('The `input` option cannot be a stream in sync mode'); } - const result = child_process.spawnSync(parsed.cmd, parsed.args, parsed.opts); + const result = child_process__default["default"].spawnSync(parsed.cmd, parsed.args, parsed.opts); result.code = result.status; if (result.error || result.status !== 0 || result.signal !== null) { @@ -3684,11 +3700,11 @@ module.exports.sync = (cmd, args, opts) => { module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); }); -var execa_1 = execa.stdout; -var execa_2 = execa.stderr; -var execa_3 = execa.shell; -var execa_4 = execa.sync; -var execa_5 = execa.shellSync; +execa.stdout; +execa.stderr; +execa.shell; +execa.sync; +execa.shellSync; // Reference: https://www.gaijin.at/en/lstwinver.php const names = new Map([ @@ -3706,7 +3722,7 @@ const names = new Map([ ]); const windowsRelease = release => { - const version = /\d+\.\d/.exec(release || os.release()); + const version = /\d+\.\d/.exec(release || os__default["default"].release()); if (release && !version) { throw new Error('`release` argument doesn\'t match `n.n`'); @@ -3718,7 +3734,7 @@ const windowsRelease = release => { // If `release` is omitted or we're on a Windows system, and the version number is an ambiguous version // then use `wmic` to get the OS caption: https://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx // If the resulting caption contains the year 2008, 2012 or 2016, it is a server version, so return a server OS name. - if ((!release || release === os.release()) && ['6.1', '6.2', '6.3', '10.0'].includes(ver)) { + if ((!release || release === os__default["default"].release()) && ['6.1', '6.2', '6.3', '10.0'].includes(ver)) { const stdout = execa.sync('wmic', ['os', 'get', 'Caption']).stdout || ''; const year = (stdout.match(/2008|2012|2016/) || [])[0]; if (year) { @@ -3736,13 +3752,13 @@ const osName = (platform, release) => { throw new Error('You can\'t specify a `release` without specifying `platform`'); } - platform = platform || os.platform(); + platform = platform || os__default["default"].platform(); let id; if (platform === 'darwin') { - if (!release && os.platform() === 'darwin') { - release = os.release(); + if (!release && os__default["default"].platform() === 'darwin') { + release = os__default["default"].release(); } const prefix = release ? (Number(release.split('.')[0]) > 15 ? 'macOS' : 'OS X') : 'macOS'; @@ -3751,8 +3767,8 @@ const osName = (platform, release) => { } if (platform === 'linux') { - if (!release && os.platform() === 'linux') { - release = os.release(); + if (!release && os__default["default"].platform() === 'linux') { + release = os__default["default"].release(); } id = release ? release.replace(/^(\d+\.\d+).*/, '$1') : ''; @@ -3760,8 +3776,8 @@ const osName = (platform, release) => { } if (platform === 'win32') { - if (!release && os.platform() === 'win32') { - release = os.release(); + if (!release && os__default["default"].platform() === 'win32') { + release = os__default["default"].release(); } id = release ? windowsRelease_1(release) : ''; @@ -3773,7 +3789,7 @@ const osName = (platform, release) => { var osName_1 = osName; -var distNode = createCommonjsModule(function (module, exports) { +var distNode$4 = createCommonjsModule(function (module, exports) { Object.defineProperty(exports, '__esModule', { value: true }); @@ -3797,16 +3813,18 @@ exports.getUserAgent = getUserAgent; }); -unwrapExports(distNode); -var distNode_1 = distNode.getUserAgent; +unwrapExports(distNode$4); +distNode$4.getUserAgent; -var distNode$1 = createCommonjsModule(function (module, exports) { +var require$$1$2 = distNode$4; + +var distNode$3 = createCommonjsModule(function (module, exports) { Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } -var isPlainObject = _interopDefault(index_cjs); +var isPlainObject = _interopDefault(index_cjs$1); function lowercaseKeys(object) { @@ -4159,7 +4177,7 @@ function withDefaults(oldDefaults, newDefaults) { const VERSION = "5.5.1"; -const userAgent = `octokit-endpoint.js/${VERSION} ${distNode.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. +const userAgent = `octokit-endpoint.js/${VERSION} ${require$$1$2.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. // So we use RequestParameters and add method as additional required property. const DEFAULTS = { @@ -4181,8 +4199,8 @@ exports.endpoint = endpoint; }); -unwrapExports(distNode$1); -var distNode_1$1 = distNode$1.endpoint; +unwrapExports(distNode$3); +distNode$3.endpoint; /*! * isobject @@ -4191,7 +4209,7 @@ var distNode_1$1 = distNode$1.endpoint; * Released under the MIT License. */ -function isObject$1(val) { +function isObject$3(val) { return val != null && typeof val === 'object' && Array.isArray(val) === false; } @@ -4202,15 +4220,15 @@ function isObject$1(val) { * Released under the MIT License. */ -function isObjectObject$1(o) { - return isObject$1(o) === true +function isObjectObject(o) { + return isObject$3(o) === true && Object.prototype.toString.call(o) === '[object Object]'; } -function isPlainObject$1(o) { +function isPlainObject(o) { var ctor,prot; - if (isObjectObject$1(o) === false) return false; + if (isObjectObject(o) === false) return false; // If has modified constructor ctor = o.constructor; @@ -4218,7 +4236,7 @@ function isPlainObject$1(o) { // If has modified prototype prot = ctor.prototype; - if (isObjectObject$1(prot) === false) return false; + if (isObjectObject(prot) === false) return false; // If constructor does not have an Object-specific method if (prot.hasOwnProperty('isPrototypeOf') === false) { @@ -4229,12 +4247,12 @@ function isPlainObject$1(o) { return true; } -var index_cjs$1 = isPlainObject$1; +var index_cjs = isPlainObject; // Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js // fix for "Readable" isn't a named export issue -const Readable = Stream.Readable; +const Readable = Stream__default["default"].Readable; const BUFFER = Symbol('buffer'); const TYPE = Symbol('type'); @@ -4386,7 +4404,7 @@ try { const INTERNALS = Symbol('Body internals'); // fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough$1 = Stream.PassThrough; +const PassThrough = Stream__default["default"].PassThrough; /** * Body mixin @@ -4419,7 +4437,7 @@ function Body(body) { } else if (ArrayBuffer.isView(body)) { // body is ArrayBufferView body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream) ; else { + } else if (body instanceof Stream__default["default"]) ; else { // none of the above // coerce to string then buffer body = Buffer.from(String(body)); @@ -4432,7 +4450,7 @@ function Body(body) { this.size = size; this.timeout = timeout; - if (body instanceof Stream) { + if (body instanceof Stream__default["default"]) { 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; @@ -4588,7 +4606,7 @@ function consumeBody() { } // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { + if (!(body instanceof Stream__default["default"])) { return Body.Promise.resolve(Buffer.alloc(0)); } @@ -4755,10 +4773,10 @@ function clone(instance) { // check that body is a stream and not form-data object // note: we can't clone the form-data object without having it as a dependency - if (body instanceof Stream && typeof body.getBoundary !== 'function') { + if (body instanceof Stream__default["default"] && typeof body.getBoundary !== 'function') { // tee instance body - p1 = new PassThrough$1(); - p2 = new PassThrough$1(); + p1 = new PassThrough(); + p2 = new PassThrough(); body.pipe(p1); body.pipe(p2); // set instance body to teed body and return the other teed body @@ -4803,7 +4821,7 @@ function extractContentType(body) { } else if (typeof body.getBoundary === 'function') { // detect form data input from form-data module return `multipart/form-data;boundary=${body.getBoundary()}`; - } else if (body instanceof Stream) { + } else if (body instanceof Stream__default["default"]) { // body is stream // can't really do much about this return null; @@ -5257,7 +5275,7 @@ function createHeadersLenient(obj) { const INTERNALS$1 = Symbol('Response internals'); // fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http.STATUS_CODES; +const STATUS_CODES = http__default["default"].STATUS_CODES; /** * Response class @@ -5358,10 +5376,10 @@ Object.defineProperty(Response.prototype, Symbol.toStringTag, { const INTERNALS$2 = Symbol('Request internals'); // fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = Url.parse; -const format_url = Url.format; +const parse_url = Url__default["default"].parse; +const format_url = Url__default["default"].format; -const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; +const streamDestructionSupported = 'destroy' in Stream__default["default"].Readable.prototype; /** * Check if a value is an instance of Request. @@ -5369,7 +5387,7 @@ const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; * @param Mixed input * @return Boolean */ -function isRequest$2(input) { +function isRequest(input) { return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; } @@ -5392,7 +5410,7 @@ class Request { let parsedURL; // normalize input - if (!isRequest$2(input)) { + if (!isRequest(input)) { if (input && input.href) { // in order to support Node.js' Url objects; though WHATWG's URL objects // will fall into this branch also (since their `toString()` will return @@ -5410,11 +5428,11 @@ class Request { let method = init.method || input.method || 'GET'; method = method.toUpperCase(); - if ((init.body != null || isRequest$2(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + 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$2(input) && input.body !== null ? clone(input) : null; + 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, @@ -5430,7 +5448,7 @@ class Request { } } - let signal = isRequest$2(input) ? input.signal : null; + let signal = isRequest(input) ? input.signal : null; if ('signal' in init) signal = init.signal; if (signal != null && !isAbortSignal(signal)) { @@ -5524,7 +5542,7 @@ function getNodeRequestOptions(request) { throw new TypeError('Only HTTP(S) protocols are supported'); } - if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + if (request.signal && request.body instanceof Stream__default["default"].Readable && !streamDestructionSupported) { throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); } @@ -5599,8 +5617,8 @@ AbortError.prototype.constructor = AbortError; AbortError.prototype.name = 'AbortError'; // fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1$1 = Stream.PassThrough; -const resolve_url = Url.resolve; +const PassThrough$1 = Stream__default["default"].PassThrough; +const resolve_url = Url__default["default"].resolve; /** * Fetch function @@ -5624,7 +5642,7 @@ function fetch(url, opts) { const request = new Request(url, opts); const options = getNodeRequestOptions(request); - const send = (options.protocol === 'https:' ? https : http).request; + const send = (options.protocol === 'https:' ? https__default["default"] : http__default["default"]).request; const signal = request.signal; let response = null; @@ -5632,7 +5650,7 @@ function fetch(url, opts) { const abort = function abort() { let error = new AbortError('The user aborted a request.'); reject(error); - if (request.body && request.body instanceof Stream.Readable) { + if (request.body && request.body instanceof Stream__default["default"].Readable) { request.body.destroy(error); } if (!response || !response.body) return; @@ -5760,7 +5778,7 @@ function fetch(url, opts) { res.once('end', function () { if (signal) signal.removeEventListener('abort', abortAndFinalize); }); - let body = res.pipe(new PassThrough$1$1()); + let body = res.pipe(new PassThrough$1()); const response_options = { url: request.url, @@ -5795,13 +5813,13 @@ function fetch(url, opts) { // by common browsers. // Always using Z_SYNC_FLUSH is what cURL does. const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH + flush: zlib__default["default"].Z_SYNC_FLUSH, + finishFlush: zlib__default["default"].Z_SYNC_FLUSH }; // for gzip if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib.createGunzip(zlibOptions)); + body = body.pipe(zlib__default["default"].createGunzip(zlibOptions)); response = new Response(body, response_options); resolve(response); return; @@ -5811,13 +5829,13 @@ function fetch(url, opts) { if (codings == 'deflate' || codings == 'x-deflate') { // handle the infamous raw deflate response from old servers // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1$1()); + const raw = res.pipe(new PassThrough$1()); raw.once('data', function (chunk) { // see http://stackoverflow.com/questions/37519828 if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib.createInflate()); + body = body.pipe(zlib__default["default"].createInflate()); } else { - body = body.pipe(zlib.createInflateRaw()); + body = body.pipe(zlib__default["default"].createInflateRaw()); } response = new Response(body, response_options); resolve(response); @@ -5826,8 +5844,8 @@ function fetch(url, opts) { } // for br - if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { - body = body.pipe(zlib.createBrotliDecompress()); + if (codings == 'br' && typeof zlib__default["default"].createBrotliDecompress === 'function') { + body = body.pipe(zlib__default["default"].createBrotliDecompress()); response = new Response(body, response_options); resolve(response); return; @@ -5854,7 +5872,7 @@ fetch.isRedirect = function (code) { // expose Promise fetch.Promise = global.Promise; -var lib = /*#__PURE__*/Object.freeze({ +var lib$1 = /*#__PURE__*/Object.freeze({ __proto__: null, 'default': fetch, Headers: Headers, @@ -5886,9 +5904,11 @@ exports.Deprecation = Deprecation; }); unwrapExports(distNode$2); -var distNode_1$2 = distNode$2.Deprecation; +distNode$2.Deprecation; -var distNode$3 = createCommonjsModule(function (module, exports) { +var require$$0$2 = distNode$2; + +var distNode$1 = createCommonjsModule(function (module, exports) { Object.defineProperty(exports, '__esModule', { value: true }); @@ -5916,7 +5936,7 @@ class RequestError extends Error { this.status = statusCode; Object.defineProperty(this, "code", { get() { - logOnce(new distNode$2.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + logOnce(new require$$0$2.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); return statusCode; } @@ -5945,12 +5965,16 @@ exports.RequestError = RequestError; }); -unwrapExports(distNode$3); -var distNode_1$3 = distNode$3.RequestError; +unwrapExports(distNode$1); +distNode$1.RequestError; -var require$$1 = getCjsExportFromNamespace(lib); +var endpoint = distNode$3; -var distNode$4 = createCommonjsModule(function (module, exports) { +var require$$1$1 = getCjsExportFromNamespace(lib$1); + +var require$$0$1 = distNode$1; + +var distNode = createCommonjsModule(function (module, exports) { Object.defineProperty(exports, '__esModule', { value: true }); @@ -5958,8 +5982,8 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau -var isPlainObject = _interopDefault(index_cjs$1); -var nodeFetch = _interopDefault(require$$1); +var isPlainObject = _interopDefault(index_cjs); +var nodeFetch = _interopDefault(require$$1$1); const VERSION = "5.3.1"; @@ -6000,14 +6024,14 @@ function fetchWrapper(requestOptions) { return; } - throw new distNode$3.RequestError(response.statusText, status, { + throw new require$$0$1.RequestError(response.statusText, status, { headers, request: requestOptions }); } if (status === 304) { - throw new distNode$3.RequestError("Not modified", status, { + throw new require$$0$1.RequestError("Not modified", status, { headers, request: requestOptions }); @@ -6015,7 +6039,7 @@ function fetchWrapper(requestOptions) { if (status >= 400) { return response.text().then(message => { - const error = new distNode$3.RequestError(message, status, { + const error = new require$$0$1.RequestError(message, status, { headers, request: requestOptions }); @@ -6052,11 +6076,11 @@ function fetchWrapper(requestOptions) { data }; }).catch(error => { - if (error instanceof distNode$3.RequestError) { + if (error instanceof require$$0$1.RequestError) { throw error; } - throw new distNode$3.RequestError(error.message, 500, { + throw new require$$0$1.RequestError(error.message, 500, { headers, request: requestOptions }); @@ -6090,9 +6114,9 @@ function withDefaults(oldEndpoint, newDefaults) { }); } -const request = withDefaults(distNode$1.endpoint, { +const request = withDefaults(endpoint.endpoint, { headers: { - "user-agent": `octokit-request.js/${VERSION} ${distNode.getUserAgent()}` + "user-agent": `octokit-request.js/${VERSION} ${require$$1$2.getUserAgent()}` } }); @@ -6100,8 +6124,8 @@ exports.request = request; }); -unwrapExports(distNode$4); -var distNode_1$4 = distNode$4.request; +unwrapExports(distNode); +distNode.request; var universalUserAgent = getUserAgentNode; @@ -6119,14 +6143,14 @@ function getUserAgentNode () { } } -var name = "@octokit/graphql"; -var version = "2.1.3"; -var publishConfig = { +var name$1 = "@octokit/graphql"; +var version$2 = "2.1.3"; +var publishConfig$1 = { access: "public" }; -var description = "GitHub GraphQL API client for browsers and Node"; -var main = "index.js"; -var scripts = { +var description$1 = "GitHub GraphQL API client for browsers and Node"; +var main$1 = "index.js"; +var scripts$1 = { prebuild: "mkdirp dist/", build: "npm-run-all build:*", "build:development": "webpack --mode development --entry . --output-library=octokitGraphql --output=./dist/octokit-graphql.js --profile --json > dist/bundle-stats.json", @@ -6138,27 +6162,27 @@ var scripts = { test: "nyc mocha test/*-test.js", "test:browser": "cypress run --browser chrome" }; -var repository = { +var repository$1 = { type: "git", url: "https://github.com/octokit/graphql.js.git" }; -var keywords = [ +var keywords$1 = [ "octokit", "github", "api", "graphql" ]; -var author = "Gregor Martynus (https://github.com/gr2m)"; -var license = "MIT"; +var author$1 = "Gregor Martynus (https://github.com/gr2m)"; +var license$1 = "MIT"; var bugs = { url: "https://github.com/octokit/graphql.js/issues" }; var homepage = "https://github.com/octokit/graphql.js#readme"; -var dependencies = { +var dependencies$1 = { "@octokit/request": "^5.0.0", "universal-user-agent": "^2.0.3" }; -var devDependencies = { +var devDependencies$1 = { chai: "^4.2.0", "compression-webpack-plugin": "^2.0.0", coveralls: "^3.0.3", @@ -6175,13 +6199,13 @@ var devDependencies = { "webpack-bundle-analyzer": "^3.1.0", "webpack-cli": "^3.2.3" }; -var bundlesize = [ +var bundlesize$1 = [ { path: "./dist/octokit-graphql.min.js.gz", maxSize: "5KB" } ]; -var release = { +var release$1 = { publish: [ "@semantic-release/npm", { @@ -6204,51 +6228,51 @@ var standard = { "expect" ] }; -var files = [ +var files$1 = [ "lib" ]; -var _package = { - name: name, - version: version, - publishConfig: publishConfig, - description: description, - main: main, - scripts: scripts, - repository: repository, - keywords: keywords, - author: author, - license: license, +var _package$2 = { + name: name$1, + version: version$2, + publishConfig: publishConfig$1, + description: description$1, + main: main$1, + scripts: scripts$1, + repository: repository$1, + keywords: keywords$1, + author: author$1, + license: license$1, bugs: bugs, homepage: homepage, - dependencies: dependencies, - devDependencies: devDependencies, - bundlesize: bundlesize, - release: release, + dependencies: dependencies$1, + devDependencies: devDependencies$1, + bundlesize: bundlesize$1, + release: release$1, standard: standard, - files: files + files: files$1 }; -var _package$1 = /*#__PURE__*/Object.freeze({ +var _package$3 = /*#__PURE__*/Object.freeze({ __proto__: null, - name: name, - version: version, - publishConfig: publishConfig, - description: description, - main: main, - scripts: scripts, - repository: repository, - keywords: keywords, - author: author, - license: license, + name: name$1, + version: version$2, + publishConfig: publishConfig$1, + description: description$1, + main: main$1, + scripts: scripts$1, + repository: repository$1, + keywords: keywords$1, + author: author$1, + license: license$1, bugs: bugs, homepage: homepage, - dependencies: dependencies, - devDependencies: devDependencies, - bundlesize: bundlesize, - release: release, + dependencies: dependencies$1, + devDependencies: devDependencies$1, + bundlesize: bundlesize$1, + release: release$1, standard: standard, - files: files, - 'default': _package + files: files$1, + 'default': _package$2 }); var error = class GraphqlError extends Error { @@ -6268,13 +6292,13 @@ var error = class GraphqlError extends Error { } }; -var graphql_1 = graphql; +var graphql_1 = graphql$1; const NON_VARIABLE_OPTIONS = ['method', 'baseUrl', 'url', 'headers', 'request', 'query']; -function graphql (request, query, options) { +function graphql$1 (request, query, options) { if (typeof query === 'string') { options = Object.assign({ query }, options); } else { @@ -6319,17 +6343,19 @@ function withDefaults (request, newDefaults) { return newApi } -var require$$1$1 = getCjsExportFromNamespace(_package$1); +var require$$0 = distNode; -const { request } = distNode$4; +var require$$1 = getCjsExportFromNamespace(_package$3); +const { request: request$1 } = require$$0; -const version$1 = require$$1$1.version; + +const version$1 = require$$1.version; const userAgent = `octokit-graphql.js/${version$1} ${universalUserAgent()}`; -var graphql$1 = withDefaults_1(request, { +var graphql = withDefaults_1(request$1, { method: 'POST', url: '/graphql', headers: { @@ -6488,19 +6514,19 @@ beforeAfterHook.Hook = Hook_1; beforeAfterHook.Singular = Singular; beforeAfterHook.Collection = Collection; -var name$1 = "@octokit/rest"; -var version$2 = "16.35.0"; -var publishConfig$1 = { +var name = "@octokit/rest"; +var version = "16.35.0"; +var publishConfig = { access: "public" }; -var description$1 = "GitHub REST API client for Node.js"; -var keywords$1 = [ +var description = "GitHub REST API client for Node.js"; +var keywords = [ "octokit", "github", "rest", "api-client" ]; -var author$1 = "Gregor Martynus (https://github.com/gr2m)"; +var author = "Gregor Martynus (https://github.com/gr2m)"; var contributors = [ { name: "Mike de Boer", @@ -6519,8 +6545,8 @@ var contributors = [ url: "https://github.com/gr2m" } ]; -var repository$1 = "https://github.com/octokit/rest.js"; -var dependencies$1 = { +var repository = "https://github.com/octokit/rest.js"; +var dependencies = { "@octokit/request": "^5.2.0", "@octokit/request-error": "^1.0.2", "atob-lite": "^2.0.0", @@ -6534,7 +6560,7 @@ var dependencies$1 = { once: "^1.4.0", "universal-user-agent": "^4.0.0" }; -var devDependencies$1 = { +var devDependencies = { "@gimenete/type-writer": "^0.1.3", "@octokit/fixtures-server": "^5.0.6", "@octokit/graphql": "^4.2.0", @@ -6568,7 +6594,7 @@ var devDependencies$1 = { "webpack-cli": "^3.0.0" }; var types = "index.d.ts"; -var scripts$1 = { +var 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", @@ -6591,8 +6617,8 @@ var scripts$1 = { "postvalidate:ts": "tsc --noEmit --target es6 test/typescript-validate.ts", "start-fixtures-server": "octokit-fixtures-server" }; -var license$1 = "MIT"; -var files$1 = [ +var license = "MIT"; +var files = [ "index.js", "index.d.ts", "lib", @@ -6603,7 +6629,7 @@ var nyc = { "test" ] }; -var release$1 = { +var release = { publish: [ "@semantic-release/npm", { @@ -6615,60 +6641,60 @@ var release$1 = { } ] }; -var bundlesize$1 = [ +var bundlesize = [ { path: "./dist/octokit-rest.min.js.gz", maxSize: "33 kB" } ]; -var _package$2 = { - name: name$1, - version: version$2, - publishConfig: publishConfig$1, - description: description$1, - keywords: keywords$1, - author: author$1, +var _package = { + name: name, + version: version, + publishConfig: publishConfig, + description: description, + keywords: keywords, + author: author, contributors: contributors, - repository: repository$1, - dependencies: dependencies$1, - devDependencies: devDependencies$1, + repository: repository, + dependencies: dependencies, + devDependencies: devDependencies, types: types, - scripts: scripts$1, - license: license$1, - files: files$1, + scripts: scripts, + license: license, + files: files, nyc: nyc, - release: release$1, - bundlesize: bundlesize$1 + release: release, + bundlesize: bundlesize }; -var _package$3 = /*#__PURE__*/Object.freeze({ +var _package$1 = /*#__PURE__*/Object.freeze({ __proto__: null, - name: name$1, - version: version$2, - publishConfig: publishConfig$1, - description: description$1, - keywords: keywords$1, - author: author$1, + name: name, + version: version, + publishConfig: publishConfig, + description: description, + keywords: keywords, + author: author, contributors: contributors, - repository: repository$1, - dependencies: dependencies$1, - devDependencies: devDependencies$1, + repository: repository, + dependencies: dependencies, + devDependencies: devDependencies, types: types, - scripts: scripts$1, - license: license$1, - files: files$1, + scripts: scripts, + license: license, + files: files, nyc: nyc, - release: release$1, - bundlesize: bundlesize$1, - 'default': _package$2 + release: release, + bundlesize: bundlesize, + 'default': _package }); -var pkg = getCjsExportFromNamespace(_package$3); +var pkg = getCjsExportFromNamespace(_package$1); var parseClientOptions = parseOptions; -const { Deprecation } = distNode$2; -const { getUserAgent } = distNode; +const { Deprecation: Deprecation$4 } = require$$0$2; +const { getUserAgent } = require$$1$2; @@ -6717,7 +6743,7 @@ function parseOptions(options, log, hook) { if (options.timeout) { deprecateOptionsTimeout( log, - new Deprecation( + new Deprecation$4( "[@octokit/rest] new Octokit({timeout}) is deprecated. Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request" ) ); @@ -6727,7 +6753,7 @@ function parseOptions(options, log, hook) { if (options.agent) { deprecateOptionsAgent( log, - new Deprecation( + new Deprecation$4( "[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/request.js#request" ) ); @@ -6737,7 +6763,7 @@ function parseOptions(options, log, hook) { if (options.headers) { deprecateOptionsHeaders( log, - new Deprecation( + new Deprecation$4( "[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request" ) ); @@ -6757,7 +6783,7 @@ function parseOptions(options, log, hook) { var constructor_1 = Octokit; -const { request: request$1 } = distNode$4; +const { request } = require$$0; @@ -6777,7 +6803,7 @@ function Octokit(plugins, options) { const api = { hook, log, - request: request$1.defaults(parseClientOptions(options, log, hook)) + request: request.defaults(parseClientOptions(options, log, hook)) }; plugins.forEach(pluginFunction => pluginFunction(api, options)); @@ -6785,12 +6811,14 @@ function Octokit(plugins, options) { return api; } +var factory$1 = factory_1; + var registerPlugin_1 = registerPlugin; function registerPlugin(plugins, pluginFunction) { - return factory_1( + return factory$1( plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction) ); } @@ -6806,7 +6834,7 @@ function factory(plugins) { return Api; } -var core$3 = factory_1(); +var core = factory$1(); var log = octokitDebug; @@ -6839,15 +6867,15 @@ function octokitDebug(octokit) { var authenticate_1 = authenticate; -const { Deprecation: Deprecation$1 } = distNode$2; +const { Deprecation: Deprecation$3 } = require$$0$2; -const deprecateAuthenticate = once_1((log, deprecation) => log.warn(deprecation)); +const deprecateAuthenticate$1 = once_1((log, deprecation) => log.warn(deprecation)); function authenticate(state, options) { - deprecateAuthenticate( + deprecateAuthenticate$1( state.octokit.log, - new Deprecation$1( + new Deprecation$3( '[@octokit/rest] octokit.authenticate() is deprecated. Use "auth" constructor option instead.' ) ); @@ -6907,32 +6935,32 @@ var btoaNode = function btoa(str) { var LARGE_ARRAY_SIZE = 200; /** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; +var HASH_UNDEFINED$2 = '__lodash_hash_undefined__'; /** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; +var INFINITY$2 = 1 / 0; /** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; +var funcTag$2 = '[object Function]', + genTag$2 = '[object GeneratorFunction]'; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; +var reRegExpChar$2 = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; +var reIsHostCtor$2 = /^\[object .+?Constructor\]$/; /** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; +var freeGlobal$2 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; /** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; +var freeSelf$2 = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); +var root$2 = freeGlobal$2 || freeSelf$2 || Function('return this')(); /** * A specialized version of `_.includes` for arrays without support for @@ -7047,7 +7075,7 @@ function cacheHas(cache, key) { * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ -function getValue(object, key) { +function getValue$2(object, key) { return object == null ? undefined : object[key]; } @@ -7058,7 +7086,7 @@ function getValue(object, key) { * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a host object, else `false`. */ -function isHostObject(value) { +function isHostObject$2(value) { // Many host objects are `Object` objects that can coerce to strings // despite having improperly defined `toString` methods. var result = false; @@ -7088,45 +7116,45 @@ function setToArray(set) { } /** Used for built-in method references. */ -var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; +var arrayProto$2 = Array.prototype, + funcProto$2 = Function.prototype, + objectProto$2 = Object.prototype; /** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; +var coreJsData$2 = root$2['__core-js_shared__']; /** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); +var maskSrcKey$2 = (function() { + var uid = /[^.]+$/.exec(coreJsData$2 && coreJsData$2.keys && coreJsData$2.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; +var funcToString$2 = funcProto$2.toString; /** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +var hasOwnProperty$2 = objectProto$2.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ -var objectToString = objectProto.toString; +var objectToString$2 = objectProto$2.toString; /** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') +var reIsNative$2 = RegExp('^' + + funcToString$2.call(hasOwnProperty$2).replace(reRegExpChar$2, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** Built-in value references. */ -var splice = arrayProto.splice; +var splice$2 = arrayProto$2.splice; /* Built-in method references that are verified to be native. */ -var Map$1 = getNative(root, 'Map'), - Set = getNative(root, 'Set'), - nativeCreate = getNative(Object, 'create'); +var Map$3 = getNative$2(root$2, 'Map'), + Set = getNative$2(root$2, 'Set'), + nativeCreate$2 = getNative$2(Object, 'create'); /** * Creates a hash object. @@ -7135,7 +7163,7 @@ var Map$1 = getNative(root, 'Map'), * @constructor * @param {Array} [entries] The key-value pairs to cache. */ -function Hash(entries) { +function Hash$2(entries) { var index = -1, length = entries ? entries.length : 0; @@ -7153,8 +7181,8 @@ function Hash(entries) { * @name clear * @memberOf Hash */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; +function hashClear$2() { + this.__data__ = nativeCreate$2 ? nativeCreate$2(null) : {}; } /** @@ -7167,7 +7195,7 @@ function hashClear() { * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function hashDelete(key) { +function hashDelete$2(key) { return this.has(key) && delete this.__data__[key]; } @@ -7180,13 +7208,13 @@ function hashDelete(key) { * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ -function hashGet(key) { +function hashGet$2(key) { var data = this.__data__; - if (nativeCreate) { + if (nativeCreate$2) { var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; + return result === HASH_UNDEFINED$2 ? undefined : result; } - return hasOwnProperty.call(data, key) ? data[key] : undefined; + return hasOwnProperty$2.call(data, key) ? data[key] : undefined; } /** @@ -7198,9 +7226,9 @@ function hashGet(key) { * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function hashHas(key) { +function hashHas$2(key) { var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + return nativeCreate$2 ? data[key] !== undefined : hasOwnProperty$2.call(data, key); } /** @@ -7213,18 +7241,18 @@ function hashHas(key) { * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ -function hashSet(key, value) { +function hashSet$2(key, value) { var data = this.__data__; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + data[key] = (nativeCreate$2 && value === undefined) ? HASH_UNDEFINED$2 : value; return this; } // Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; +Hash$2.prototype.clear = hashClear$2; +Hash$2.prototype['delete'] = hashDelete$2; +Hash$2.prototype.get = hashGet$2; +Hash$2.prototype.has = hashHas$2; +Hash$2.prototype.set = hashSet$2; /** * Creates an list cache object. @@ -7233,7 +7261,7 @@ Hash.prototype.set = hashSet; * @constructor * @param {Array} [entries] The key-value pairs to cache. */ -function ListCache(entries) { +function ListCache$2(entries) { var index = -1, length = entries ? entries.length : 0; @@ -7251,7 +7279,7 @@ function ListCache(entries) { * @name clear * @memberOf ListCache */ -function listCacheClear() { +function listCacheClear$2() { this.__data__ = []; } @@ -7264,9 +7292,9 @@ function listCacheClear() { * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function listCacheDelete(key) { +function listCacheDelete$2(key) { var data = this.__data__, - index = assocIndexOf(data, key); + index = assocIndexOf$2(data, key); if (index < 0) { return false; @@ -7275,7 +7303,7 @@ function listCacheDelete(key) { if (index == lastIndex) { data.pop(); } else { - splice.call(data, index, 1); + splice$2.call(data, index, 1); } return true; } @@ -7289,9 +7317,9 @@ function listCacheDelete(key) { * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ -function listCacheGet(key) { +function listCacheGet$2(key) { var data = this.__data__, - index = assocIndexOf(data, key); + index = assocIndexOf$2(data, key); return index < 0 ? undefined : data[index][1]; } @@ -7305,8 +7333,8 @@ function listCacheGet(key) { * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; +function listCacheHas$2(key) { + return assocIndexOf$2(this.__data__, key) > -1; } /** @@ -7319,9 +7347,9 @@ function listCacheHas(key) { * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ -function listCacheSet(key, value) { +function listCacheSet$2(key, value) { var data = this.__data__, - index = assocIndexOf(data, key); + index = assocIndexOf$2(data, key); if (index < 0) { data.push([key, value]); @@ -7332,11 +7360,11 @@ function listCacheSet(key, value) { } // Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; +ListCache$2.prototype.clear = listCacheClear$2; +ListCache$2.prototype['delete'] = listCacheDelete$2; +ListCache$2.prototype.get = listCacheGet$2; +ListCache$2.prototype.has = listCacheHas$2; +ListCache$2.prototype.set = listCacheSet$2; /** * Creates a map cache object to store key-value pairs. @@ -7345,7 +7373,7 @@ ListCache.prototype.set = listCacheSet; * @constructor * @param {Array} [entries] The key-value pairs to cache. */ -function MapCache(entries) { +function MapCache$2(entries) { var index = -1, length = entries ? entries.length : 0; @@ -7363,11 +7391,11 @@ function MapCache(entries) { * @name clear * @memberOf MapCache */ -function mapCacheClear() { +function mapCacheClear$2() { this.__data__ = { - 'hash': new Hash, - 'map': new (Map$1 || ListCache), - 'string': new Hash + 'hash': new Hash$2, + 'map': new (Map$3 || ListCache$2), + 'string': new Hash$2 }; } @@ -7380,8 +7408,8 @@ function mapCacheClear() { * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function mapCacheDelete(key) { - return getMapData(this, key)['delete'](key); +function mapCacheDelete$2(key) { + return getMapData$2(this, key)['delete'](key); } /** @@ -7393,8 +7421,8 @@ function mapCacheDelete(key) { * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); +function mapCacheGet$2(key) { + return getMapData$2(this, key).get(key); } /** @@ -7406,8 +7434,8 @@ function mapCacheGet(key) { * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); +function mapCacheHas$2(key) { + return getMapData$2(this, key).has(key); } /** @@ -7420,17 +7448,17 @@ function mapCacheHas(key) { * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ -function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); +function mapCacheSet$2(key, value) { + getMapData$2(this, key).set(key, value); return this; } // Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; +MapCache$2.prototype.clear = mapCacheClear$2; +MapCache$2.prototype['delete'] = mapCacheDelete$2; +MapCache$2.prototype.get = mapCacheGet$2; +MapCache$2.prototype.has = mapCacheHas$2; +MapCache$2.prototype.set = mapCacheSet$2; /** * @@ -7444,7 +7472,7 @@ function SetCache(values) { var index = -1, length = values ? values.length : 0; - this.__data__ = new MapCache; + this.__data__ = new MapCache$2; while (++index < length) { this.add(values[index]); } @@ -7461,7 +7489,7 @@ function SetCache(values) { * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); + this.__data__.set(value, HASH_UNDEFINED$2); return this; } @@ -7490,10 +7518,10 @@ SetCache.prototype.has = setCacheHas; * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ -function assocIndexOf(array, key) { +function assocIndexOf$2(array, key) { var length = array.length; while (length--) { - if (eq(array[length][0], key)) { + if (eq$2(array[length][0], key)) { return length; } } @@ -7508,12 +7536,12 @@ function assocIndexOf(array, key) { * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ -function baseIsNative(value) { - if (!isObject$2(value) || isMasked(value)) { +function baseIsNative$2(value) { + if (!isObject$2(value) || isMasked$2(value)) { return false; } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); + var pattern = (isFunction$2(value) || isHostObject$2(value)) ? reIsNative$2 : reIsHostCtor$2; + return pattern.test(toSource$2(value)); } /** @@ -7584,7 +7612,7 @@ function baseUniq(array, iteratee, comparator) { * @param {Array} values The values to add to the set. * @returns {Object} Returns the new set. */ -var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop$2 : function(values) { +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY$2) ? noop : function(values) { return new Set(values); }; @@ -7596,9 +7624,9 @@ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop * @param {string} key The reference key. * @returns {*} Returns the map data. */ -function getMapData(map, key) { +function getMapData$2(map, key) { var data = map.__data__; - return isKeyable(key) + return isKeyable$2(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } @@ -7611,9 +7639,9 @@ function getMapData(map, key) { * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; +function getNative$2(object, key) { + var value = getValue$2(object, key); + return baseIsNative$2(value) ? value : undefined; } /** @@ -7623,7 +7651,7 @@ function getNative(object, key) { * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ -function isKeyable(value) { +function isKeyable$2(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') @@ -7637,8 +7665,8 @@ function isKeyable(value) { * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); +function isMasked$2(func) { + return !!maskSrcKey$2 && (maskSrcKey$2 in func); } /** @@ -7648,10 +7676,10 @@ function isMasked(func) { * @param {Function} func The function to process. * @returns {string} Returns the source code. */ -function toSource(func) { +function toSource$2(func) { if (func != null) { try { - return funcToString.call(func); + return funcToString$2.call(func); } catch (e) {} try { return (func + ''); @@ -7715,7 +7743,7 @@ function uniq(array) { * _.eq(NaN, NaN); * // => true */ -function eq(value, other) { +function eq$2(value, other) { return value === other || (value !== value && other !== other); } @@ -7736,11 +7764,11 @@ function eq(value, other) { * _.isFunction(/abc/); * // => false */ -function isFunction(value) { +function isFunction$2(value) { // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject$2(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; + var tag = isObject$2(value) ? objectToString$2.call(value) : ''; + return tag == funcTag$2 || tag == genTag$2; } /** @@ -7785,18 +7813,18 @@ function isObject$2(value) { * _.times(2, _.noop); * // => [undefined, undefined] */ -function noop$2() { +function noop() { // No operation performed. } var lodash_uniq = uniq; -var beforeRequest = authenticationBeforeRequest; +var beforeRequest$1 = authenticationBeforeRequest$1; -function authenticationBeforeRequest(state, options) { +function authenticationBeforeRequest$1(state, options) { if (!state.auth.type) { return; } @@ -7835,11 +7863,11 @@ function authenticationBeforeRequest(state, options) { options.url += `client_id=${key}&client_secret=${secret}`; } -var requestError = authenticationRequestError; +var requestError$1 = authenticationRequestError$1; -const { RequestError } = distNode$3; +const { RequestError: RequestError$2 } = require$$0$1; -function authenticationRequestError(state, error, options) { +function authenticationRequestError$1(state, error, options) { /* istanbul ignore next */ if (!error.headers) throw error; @@ -7855,7 +7883,7 @@ function authenticationRequestError(state, error, options) { error.request && error.request.headers["x-github-otp"] ) { - throw new RequestError( + throw new RequestError$2( "Invalid one-time password for two-factor authentication", 401, { @@ -7866,7 +7894,7 @@ function authenticationRequestError(state, error, options) { } if (typeof state.auth.on2fa !== "function") { - throw new RequestError( + throw new RequestError$2( "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", 401, { @@ -7891,21 +7919,21 @@ function authenticationRequestError(state, error, options) { }); } -var authenticationDeprecated = authenticationPlugin; +var authenticationDeprecated = authenticationPlugin$1; -const { Deprecation: Deprecation$2 } = distNode$2; +const { Deprecation: Deprecation$2 } = require$$0$2; -const deprecateAuthenticate$1 = once_1((log, deprecation) => log.warn(deprecation)); +const deprecateAuthenticate = once_1((log, deprecation) => log.warn(deprecation)); -function authenticationPlugin(octokit, options) { +function authenticationPlugin$1(octokit, options) { if (options.auth) { octokit.authenticate = () => { - deprecateAuthenticate$1( + deprecateAuthenticate( octokit.log, new Deprecation$2( '[@octokit/rest] octokit.authenticate() is deprecated and has no effect when "auth" option is set on Octokit constructor' @@ -7919,8 +7947,8 @@ function authenticationPlugin(octokit, options) { auth: false }; octokit.authenticate = authenticate_1.bind(null, state); - octokit.hook.before("request", beforeRequest.bind(null, state)); - octokit.hook.error("request", requestError.bind(null, state)); + octokit.hook.before("request", beforeRequest$1.bind(null, state)); + octokit.hook.error("request", requestError$1.bind(null, state)); } var atobNode = function atob(str) { @@ -7951,13 +7979,13 @@ function withAuthorizationPrefix(authorization) { return `token ${authorization}`; } -var beforeRequest$1 = authenticationBeforeRequest$1; +var beforeRequest = authenticationBeforeRequest; -function authenticationBeforeRequest$1(state, options) { +function authenticationBeforeRequest(state, options) { if (typeof state.auth === "string") { options.headers.authorization = withAuthorizationPrefix_1(state.auth); @@ -8017,11 +8045,11 @@ function authenticationBeforeRequest$1(state, options) { }); } -var requestError$1 = authenticationRequestError$1; +var requestError = authenticationRequestError; -const { RequestError: RequestError$1 } = distNode$3; +const { RequestError: RequestError$1 } = require$$0$1; -function authenticationRequestError$1(state, error, options) { +function authenticationRequestError(state, error, options) { if (!error.headers) throw error; const otpRequired = /required/.test(error.headers["x-github-otp"] || ""); @@ -8079,7 +8107,7 @@ function authenticationRequestError$1(state, error, options) { }); } -var validate = validateAuth; +var validate$1 = validateAuth; function validateAuth(auth) { if (typeof auth === "string") { @@ -8101,26 +8129,26 @@ function validateAuth(auth) { throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`); } -var authentication = authenticationPlugin$1; +var authentication = authenticationPlugin; -function authenticationPlugin$1(octokit, options) { +function authenticationPlugin(octokit, options) { if (!options.auth) { return; } - validate(options.auth); + validate$1(options.auth); const state = { octokit, auth: options.auth }; - octokit.hook.before("request", beforeRequest$1.bind(null, state)); - octokit.hook.error("request", requestError$1.bind(null, state)); + octokit.hook.before("request", beforeRequest.bind(null, state)); + octokit.hook.error("request", requestError.bind(null, state)); } /** @@ -8147,7 +8175,7 @@ function authenticationPlugin$1(octokit, options) { var normalizePaginatedListResponse_1 = normalizePaginatedListResponse; -const { Deprecation: Deprecation$3 } = distNode$2; +const { Deprecation: Deprecation$1 } = require$$0$2; const deprecateIncompleteResults = once_1((log, deprecation) => @@ -8191,7 +8219,7 @@ function normalizePaginatedListResponse(octokit, url, response) { get() { deprecateNamespace( octokit.log, - new Deprecation$3( + new Deprecation$1( `[@octokit/rest] "result.data.${namespaceKey}" is deprecated. Use "result.data" instead` ) ); @@ -8204,7 +8232,7 @@ function normalizePaginatedListResponse(octokit, url, response) { get() { deprecateIncompleteResults( octokit.log, - new Deprecation$3( + new Deprecation$1( '[@octokit/rest] "result.data.incomplete_results" is deprecated.' ) ); @@ -8218,7 +8246,7 @@ function normalizePaginatedListResponse(octokit, url, response) { get() { deprecateTotalCount( octokit.log, - new Deprecation$3( + new Deprecation$1( '[@octokit/rest] "result.data.repository_selection" is deprecated.' ) ); @@ -8231,7 +8259,7 @@ function normalizePaginatedListResponse(octokit, url, response) { get() { deprecateTotalCount( octokit.log, - new Deprecation$3( + new Deprecation$1( '[@octokit/rest] "result.data.total_count" is deprecated.' ) ); @@ -8326,9 +8354,9 @@ function paginatePlugin(octokit) { octokit.paginate.iterator = iterator_1.bind(null, octokit); } -var registerEndpoints_1 = registerEndpoints; +var registerEndpoints_1$1 = registerEndpoints; -const { Deprecation: Deprecation$4 } = distNode$2; +const { Deprecation } = require$$0$2; function registerEndpoints(octokit, routes) { Object.keys(routes).forEach(namespaceName => { @@ -8381,7 +8409,7 @@ function registerEndpoints(octokit, routes) { if (apiOptions.deprecated) { octokit[namespaceName][apiName] = function deprecatedEndpointMethod() { octokit.log.warn( - new Deprecation$4(`[@octokit/rest] ${apiOptions.deprecated}`) + new Deprecation(`[@octokit/rest] ${apiOptions.deprecated}`) ); octokit[namespaceName][apiName] = request; return request.apply(null, arguments); @@ -8404,7 +8432,7 @@ function patchForDeprecation(octokit, apiOptions, method, methodName) { const aliasKey = apiOptions.params[key].alias; octokit.log.warn( - new Deprecation$4( + new Deprecation( `[@octokit/rest] "${key}" parameter is deprecated for "${methodName}". Use "${aliasKey}" instead` ) ); @@ -8425,12 +8453,12 @@ function patchForDeprecation(octokit, apiOptions, method, methodName) { return patchedMethod; } -var registerEndpoints_1$1 = octokitRegisterEndpoints; +var registerEndpoints_1 = octokitRegisterEndpoints; function octokitRegisterEndpoints(octokit) { - octokit.registerEndpoints = registerEndpoints_1.bind(null, octokit); + octokit.registerEndpoints = registerEndpoints_1$1.bind(null, octokit); } var activity = { @@ -20269,7 +20297,7 @@ function octokitRestApiEndpoints(octokit) { */ /** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; +var FUNC_ERROR_TEXT$1 = 'Expected a function'; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__'; @@ -20280,13 +20308,13 @@ var INFINITY$1 = 1 / 0; /** `Object#toString` result references. */ var funcTag$1 = '[object Function]', genTag$1 = '[object GeneratorFunction]', - symbolTag = '[object Symbol]'; + symbolTag$1 = '[object Symbol]'; /** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - reLeadingDot = /^\./, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; +var reIsDeepProp$1 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp$1 = /^\w*$/, + reLeadingDot$1 = /^\./, + rePropName$1 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** * Used to match `RegExp` @@ -20295,7 +20323,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, var reRegExpChar$1 = /[\\^$.*+?()[\]{}|]/g; /** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; +var reEscapeChar$1 = /\\(\\)?/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor$1 = /^\[object .+?Constructor\]$/; @@ -20374,7 +20402,7 @@ var reIsNative$1 = RegExp('^' + ); /** Built-in value references. */ -var Symbol$1 = root$1.Symbol, +var Symbol$2 = root$1.Symbol, splice$1 = arrayProto$1.splice; /* Built-in method references that are verified to be native. */ @@ -20382,8 +20410,8 @@ var Map$2 = getNative$1(root$1, 'Map'), nativeCreate$1 = getNative$1(Object, 'create'); /** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; +var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : undefined, + symbolToString$1 = symbolProto$1 ? symbolProto$1.toString : undefined; /** * Creates a hash object. @@ -20716,13 +20744,13 @@ function assocIndexOf$1(array, key) { * @returns {*} Returns the resolved value. */ function baseGet(object, path) { - path = isKey(path, object) ? [path] : castPath(path); + path = isKey$1(path, object) ? [path] : castPath$1(path); var index = 0, length = path.length; while (object != null && index < length) { - object = object[toKey(path[index++])]; + object = object[toKey$1(path[index++])]; } return (index && index == length) ? object : undefined; } @@ -20736,7 +20764,7 @@ function baseGet(object, path) { * else `false`. */ function baseIsNative$1(value) { - if (!isObject$3(value) || isMasked$1(value)) { + if (!isObject$1(value) || isMasked$1(value)) { return false; } var pattern = (isFunction$1(value) || isHostObject$1(value)) ? reIsNative$1 : reIsHostCtor$1; @@ -20751,13 +20779,13 @@ function baseIsNative$1(value) { * @param {*} value The value to process. * @returns {string} Returns the string. */ -function baseToString(value) { +function baseToString$1(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; + if (isSymbol$1(value)) { + return symbolToString$1 ? symbolToString$1.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result; @@ -20770,8 +20798,8 @@ function baseToString(value) { * @param {*} value The value to inspect. * @returns {Array} Returns the cast property path array. */ -function castPath(value) { - return isArray(value) ? value : stringToPath(value); +function castPath$1(value) { + return isArray$1(value) ? value : stringToPath$1(value); } /** @@ -20810,16 +20838,16 @@ function getNative$1(object, key) { * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ -function isKey(value, object) { - if (isArray(value)) { +function isKey$1(value, object) { + if (isArray$1(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { + value == null || isSymbol$1(value)) { return true; } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + return reIsPlainProp$1.test(value) || !reIsDeepProp$1.test(value) || (object != null && value in Object(object)); } @@ -20855,15 +20883,15 @@ function isMasked$1(func) { * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ -var stringToPath = memoize(function(string) { - string = toString(string); +var stringToPath$1 = memoize$1(function(string) { + string = toString$1(string); var result = []; - if (reLeadingDot.test(string)) { + if (reLeadingDot$1.test(string)) { result.push(''); } - string.replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + string.replace(rePropName$1, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar$1, '$1') : (number || match)); }); return result; }); @@ -20875,8 +20903,8 @@ var stringToPath = memoize(function(string) { * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { +function toKey$1(value) { + if (typeof value == 'string' || isSymbol$1(value)) { return value; } var result = (value + ''); @@ -20946,9 +20974,9 @@ function toSource$1(func) { * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ -function memoize(func, resolver) { +function memoize$1(func, resolver) { if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); + throw new TypeError(FUNC_ERROR_TEXT$1); } var memoized = function() { var args = arguments, @@ -20962,12 +20990,12 @@ function memoize(func, resolver) { memoized.cache = cache.set(key, result); return result; }; - memoized.cache = new (memoize.Cache || MapCache$1); + memoized.cache = new (memoize$1.Cache || MapCache$1); return memoized; } // Assign cache to `_.memoize`. -memoize.Cache = MapCache$1; +memoize$1.Cache = MapCache$1; /** * Performs a @@ -21028,7 +21056,7 @@ function eq$1(value, other) { * _.isArray(_.noop); * // => false */ -var isArray = Array.isArray; +var isArray$1 = Array.isArray; /** * Checks if `value` is classified as a `Function` object. @@ -21050,7 +21078,7 @@ var isArray = Array.isArray; function isFunction$1(value) { // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject$3(value) ? objectToString$1.call(value) : ''; + var tag = isObject$1(value) ? objectToString$1.call(value) : ''; return tag == funcTag$1 || tag == genTag$1; } @@ -21079,7 +21107,7 @@ function isFunction$1(value) { * _.isObject(null); * // => false */ -function isObject$3(value) { +function isObject$1(value) { var type = typeof value; return !!value && (type == 'object' || type == 'function'); } @@ -21108,7 +21136,7 @@ function isObject$3(value) { * _.isObjectLike(null); * // => false */ -function isObjectLike(value) { +function isObjectLike$1(value) { return !!value && typeof value == 'object'; } @@ -21129,9 +21157,9 @@ function isObjectLike(value) { * _.isSymbol('abc'); * // => false */ -function isSymbol(value) { +function isSymbol$1(value) { return typeof value == 'symbol' || - (isObjectLike(value) && objectToString$1.call(value) == symbolTag); + (isObjectLike$1(value) && objectToString$1.call(value) == symbolTag$1); } /** @@ -21155,8 +21183,8 @@ function isSymbol(value) { * _.toString([1, 2, 3]); * // => '1,2,3' */ -function toString(value) { - return value == null ? '' : baseToString(value); +function toString$1(value) { + return value == null ? '' : baseToString$1(value); } /** @@ -21201,49 +21229,49 @@ var lodash_get = get; */ /** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT$1 = 'Expected a function'; +var FUNC_ERROR_TEXT = 'Expected a function'; /** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED$2 = '__lodash_hash_undefined__'; +var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used as references for various `Number` constants. */ -var INFINITY$2 = 1 / 0, +var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ -var funcTag$2 = '[object Function]', - genTag$2 = '[object GeneratorFunction]', - symbolTag$1 = '[object Symbol]'; +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; /** Used to match property names within property paths. */ -var reIsDeepProp$1 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp$1 = /^\w*$/, - reLeadingDot$1 = /^\./, - rePropName$1 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ -var reRegExpChar$2 = /[\\^$.*+?()[\]{}|]/g; +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to match backslashes in property paths. */ -var reEscapeChar$1 = /\\(\\)?/g; +var reEscapeChar = /\\(\\)?/g; /** Used to detect host constructors (Safari). */ -var reIsHostCtor$2 = /^\[object .+?Constructor\]$/; +var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** Detect free variable `global` from Node.js. */ -var freeGlobal$2 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; +var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; /** Detect free variable `self`. */ -var freeSelf$2 = typeof self == 'object' && self && self.Object === Object && self; +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ -var root$2 = freeGlobal$2 || freeSelf$2 || Function('return this')(); +var root = freeGlobal || freeSelf || Function('return this')(); /** * Gets the value at `key` of `object`. @@ -21253,7 +21281,7 @@ var root$2 = freeGlobal$2 || freeSelf$2 || Function('return this')(); * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ -function getValue$2(object, key) { +function getValue(object, key) { return object == null ? undefined : object[key]; } @@ -21264,7 +21292,7 @@ function getValue$2(object, key) { * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a host object, else `false`. */ -function isHostObject$2(value) { +function isHostObject(value) { // Many host objects are `Object` objects that can coerce to strings // despite having improperly defined `toString` methods. var result = false; @@ -21277,49 +21305,49 @@ function isHostObject$2(value) { } /** Used for built-in method references. */ -var arrayProto$2 = Array.prototype, - funcProto$2 = Function.prototype, - objectProto$2 = Object.prototype; +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ -var coreJsData$2 = root$2['__core-js_shared__']; +var coreJsData = root['__core-js_shared__']; /** Used to detect methods masquerading as native. */ -var maskSrcKey$2 = (function() { - var uid = /[^.]+$/.exec(coreJsData$2 && coreJsData$2.keys && coreJsData$2.keys.IE_PROTO || ''); +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** Used to resolve the decompiled source of functions. */ -var funcToString$2 = funcProto$2.toString; +var funcToString = funcProto.toString; /** Used to check objects for own properties. */ -var hasOwnProperty$2 = objectProto$2.hasOwnProperty; +var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ -var objectToString$2 = objectProto$2.toString; +var objectToString = objectProto.toString; /** Used to detect if a method is native. */ -var reIsNative$2 = RegExp('^' + - funcToString$2.call(hasOwnProperty$2).replace(reRegExpChar$2, '\\$&') +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** Built-in value references. */ -var Symbol$2 = root$2.Symbol, - splice$2 = arrayProto$2.splice; +var Symbol$1 = root.Symbol, + splice = arrayProto.splice; /* Built-in method references that are verified to be native. */ -var Map$3 = getNative$2(root$2, 'Map'), - nativeCreate$2 = getNative$2(Object, 'create'); +var Map$1 = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); /** Used to convert symbols to primitives and strings. */ -var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : undefined, - symbolToString$1 = symbolProto$1 ? symbolProto$1.toString : undefined; +var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; /** * Creates a hash object. @@ -21328,7 +21356,7 @@ var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : undefined, * @constructor * @param {Array} [entries] The key-value pairs to cache. */ -function Hash$2(entries) { +function Hash(entries) { var index = -1, length = entries ? entries.length : 0; @@ -21346,8 +21374,8 @@ function Hash$2(entries) { * @name clear * @memberOf Hash */ -function hashClear$2() { - this.__data__ = nativeCreate$2 ? nativeCreate$2(null) : {}; +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; } /** @@ -21360,7 +21388,7 @@ function hashClear$2() { * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function hashDelete$2(key) { +function hashDelete(key) { return this.has(key) && delete this.__data__[key]; } @@ -21373,13 +21401,13 @@ function hashDelete$2(key) { * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ -function hashGet$2(key) { +function hashGet(key) { var data = this.__data__; - if (nativeCreate$2) { + if (nativeCreate) { var result = data[key]; - return result === HASH_UNDEFINED$2 ? undefined : result; + return result === HASH_UNDEFINED ? undefined : result; } - return hasOwnProperty$2.call(data, key) ? data[key] : undefined; + return hasOwnProperty.call(data, key) ? data[key] : undefined; } /** @@ -21391,9 +21419,9 @@ function hashGet$2(key) { * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function hashHas$2(key) { +function hashHas(key) { var data = this.__data__; - return nativeCreate$2 ? data[key] !== undefined : hasOwnProperty$2.call(data, key); + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } /** @@ -21406,18 +21434,18 @@ function hashHas$2(key) { * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ -function hashSet$2(key, value) { +function hashSet(key, value) { var data = this.__data__; - data[key] = (nativeCreate$2 && value === undefined) ? HASH_UNDEFINED$2 : value; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } // Add methods to `Hash`. -Hash$2.prototype.clear = hashClear$2; -Hash$2.prototype['delete'] = hashDelete$2; -Hash$2.prototype.get = hashGet$2; -Hash$2.prototype.has = hashHas$2; -Hash$2.prototype.set = hashSet$2; +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; /** * Creates an list cache object. @@ -21426,7 +21454,7 @@ Hash$2.prototype.set = hashSet$2; * @constructor * @param {Array} [entries] The key-value pairs to cache. */ -function ListCache$2(entries) { +function ListCache(entries) { var index = -1, length = entries ? entries.length : 0; @@ -21444,7 +21472,7 @@ function ListCache$2(entries) { * @name clear * @memberOf ListCache */ -function listCacheClear$2() { +function listCacheClear() { this.__data__ = []; } @@ -21457,9 +21485,9 @@ function listCacheClear$2() { * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function listCacheDelete$2(key) { +function listCacheDelete(key) { var data = this.__data__, - index = assocIndexOf$2(data, key); + index = assocIndexOf(data, key); if (index < 0) { return false; @@ -21468,7 +21496,7 @@ function listCacheDelete$2(key) { if (index == lastIndex) { data.pop(); } else { - splice$2.call(data, index, 1); + splice.call(data, index, 1); } return true; } @@ -21482,9 +21510,9 @@ function listCacheDelete$2(key) { * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ -function listCacheGet$2(key) { +function listCacheGet(key) { var data = this.__data__, - index = assocIndexOf$2(data, key); + index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } @@ -21498,8 +21526,8 @@ function listCacheGet$2(key) { * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function listCacheHas$2(key) { - return assocIndexOf$2(this.__data__, key) > -1; +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; } /** @@ -21512,9 +21540,9 @@ function listCacheHas$2(key) { * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ -function listCacheSet$2(key, value) { +function listCacheSet(key, value) { var data = this.__data__, - index = assocIndexOf$2(data, key); + index = assocIndexOf(data, key); if (index < 0) { data.push([key, value]); @@ -21525,11 +21553,11 @@ function listCacheSet$2(key, value) { } // Add methods to `ListCache`. -ListCache$2.prototype.clear = listCacheClear$2; -ListCache$2.prototype['delete'] = listCacheDelete$2; -ListCache$2.prototype.get = listCacheGet$2; -ListCache$2.prototype.has = listCacheHas$2; -ListCache$2.prototype.set = listCacheSet$2; +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; /** * Creates a map cache object to store key-value pairs. @@ -21538,7 +21566,7 @@ ListCache$2.prototype.set = listCacheSet$2; * @constructor * @param {Array} [entries] The key-value pairs to cache. */ -function MapCache$2(entries) { +function MapCache(entries) { var index = -1, length = entries ? entries.length : 0; @@ -21556,11 +21584,11 @@ function MapCache$2(entries) { * @name clear * @memberOf MapCache */ -function mapCacheClear$2() { +function mapCacheClear() { this.__data__ = { - 'hash': new Hash$2, - 'map': new (Map$3 || ListCache$2), - 'string': new Hash$2 + 'hash': new Hash, + 'map': new (Map$1 || ListCache), + 'string': new Hash }; } @@ -21573,8 +21601,8 @@ function mapCacheClear$2() { * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function mapCacheDelete$2(key) { - return getMapData$2(this, key)['delete'](key); +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); } /** @@ -21586,8 +21614,8 @@ function mapCacheDelete$2(key) { * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ -function mapCacheGet$2(key) { - return getMapData$2(this, key).get(key); +function mapCacheGet(key) { + return getMapData(this, key).get(key); } /** @@ -21599,8 +21627,8 @@ function mapCacheGet$2(key) { * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function mapCacheHas$2(key) { - return getMapData$2(this, key).has(key); +function mapCacheHas(key) { + return getMapData(this, key).has(key); } /** @@ -21613,17 +21641,17 @@ function mapCacheHas$2(key) { * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ -function mapCacheSet$2(key, value) { - getMapData$2(this, key).set(key, value); +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); return this; } // Add methods to `MapCache`. -MapCache$2.prototype.clear = mapCacheClear$2; -MapCache$2.prototype['delete'] = mapCacheDelete$2; -MapCache$2.prototype.get = mapCacheGet$2; -MapCache$2.prototype.has = mapCacheHas$2; -MapCache$2.prototype.set = mapCacheSet$2; +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent @@ -21637,7 +21665,7 @@ MapCache$2.prototype.set = mapCacheSet$2; */ function assignValue(object, key, value) { var objValue = object[key]; - if (!(hasOwnProperty$2.call(object, key) && eq$2(objValue, value)) || + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { object[key] = value; } @@ -21651,10 +21679,10 @@ function assignValue(object, key, value) { * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ -function assocIndexOf$2(array, key) { +function assocIndexOf(array, key) { var length = array.length; while (length--) { - if (eq$2(array[length][0], key)) { + if (eq(array[length][0], key)) { return length; } } @@ -21669,12 +21697,12 @@ function assocIndexOf$2(array, key) { * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ -function baseIsNative$2(value) { - if (!isObject$4(value) || isMasked$2(value)) { +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { return false; } - var pattern = (isFunction$2(value) || isHostObject$2(value)) ? reIsNative$2 : reIsHostCtor$2; - return pattern.test(toSource$2(value)); + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); } /** @@ -21688,10 +21716,10 @@ function baseIsNative$2(value) { * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { - if (!isObject$4(object)) { + if (!isObject(object)) { return object; } - path = isKey$1(path, object) ? [path] : castPath$1(path); + path = isKey(path, object) ? [path] : castPath(path); var index = -1, length = path.length, @@ -21699,14 +21727,14 @@ function baseSet(object, path, value, customizer) { nested = object; while (nested != null && ++index < length) { - var key = toKey$1(path[index]), + var key = toKey(path[index]), newValue = value; if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; if (newValue === undefined) { - newValue = isObject$4(objValue) + newValue = isObject(objValue) ? objValue : (isIndex(path[index + 1]) ? [] : {}); } @@ -21725,16 +21753,16 @@ function baseSet(object, path, value, customizer) { * @param {*} value The value to process. * @returns {string} Returns the string. */ -function baseToString$1(value) { +function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } - if (isSymbol$1(value)) { - return symbolToString$1 ? symbolToString$1.call(value) : ''; + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY$2) ? '-0' : result; + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } /** @@ -21744,8 +21772,8 @@ function baseToString$1(value) { * @param {*} value The value to inspect. * @returns {Array} Returns the cast property path array. */ -function castPath$1(value) { - return isArray$1(value) ? value : stringToPath$1(value); +function castPath(value) { + return isArray(value) ? value : stringToPath(value); } /** @@ -21756,9 +21784,9 @@ function castPath$1(value) { * @param {string} key The reference key. * @returns {*} Returns the map data. */ -function getMapData$2(map, key) { +function getMapData(map, key) { var data = map.__data__; - return isKeyable$2(key) + return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } @@ -21771,9 +21799,9 @@ function getMapData$2(map, key) { * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ -function getNative$2(object, key) { - var value = getValue$2(object, key); - return baseIsNative$2(value) ? value : undefined; +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; } /** @@ -21799,16 +21827,16 @@ function isIndex(value, length) { * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ -function isKey$1(value, object) { - if (isArray$1(value)) { +function isKey(value, object) { + if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol$1(value)) { + value == null || isSymbol(value)) { return true; } - return reIsPlainProp$1.test(value) || !reIsDeepProp$1.test(value) || + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } @@ -21819,7 +21847,7 @@ function isKey$1(value, object) { * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ -function isKeyable$2(value) { +function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') @@ -21833,8 +21861,8 @@ function isKeyable$2(value) { * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ -function isMasked$2(func) { - return !!maskSrcKey$2 && (maskSrcKey$2 in func); +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); } /** @@ -21844,15 +21872,15 @@ function isMasked$2(func) { * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ -var stringToPath$1 = memoize$1(function(string) { - string = toString$1(string); +var stringToPath = memoize(function(string) { + string = toString(string); var result = []; - if (reLeadingDot$1.test(string)) { + if (reLeadingDot.test(string)) { result.push(''); } - string.replace(rePropName$1, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar$1, '$1') : (number || match)); + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); @@ -21864,12 +21892,12 @@ var stringToPath$1 = memoize$1(function(string) { * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ -function toKey$1(value) { - if (typeof value == 'string' || isSymbol$1(value)) { +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY$2) ? '-0' : result; + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } /** @@ -21879,10 +21907,10 @@ function toKey$1(value) { * @param {Function} func The function to process. * @returns {string} Returns the source code. */ -function toSource$2(func) { +function toSource(func) { if (func != null) { try { - return funcToString$2.call(func); + return funcToString.call(func); } catch (e) {} try { return (func + ''); @@ -21935,9 +21963,9 @@ function toSource$2(func) { * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ -function memoize$1(func, resolver) { +function memoize(func, resolver) { if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT$1); + throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, @@ -21951,12 +21979,12 @@ function memoize$1(func, resolver) { memoized.cache = cache.set(key, result); return result; }; - memoized.cache = new (memoize$1.Cache || MapCache$2); + memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Assign cache to `_.memoize`. -memoize$1.Cache = MapCache$2; +memoize.Cache = MapCache; /** * Performs a @@ -21990,7 +22018,7 @@ memoize$1.Cache = MapCache$2; * _.eq(NaN, NaN); * // => true */ -function eq$2(value, other) { +function eq(value, other) { return value === other || (value !== value && other !== other); } @@ -22017,7 +22045,7 @@ function eq$2(value, other) { * _.isArray(_.noop); * // => false */ -var isArray$1 = Array.isArray; +var isArray = Array.isArray; /** * Checks if `value` is classified as a `Function` object. @@ -22036,11 +22064,11 @@ var isArray$1 = Array.isArray; * _.isFunction(/abc/); * // => false */ -function isFunction$2(value) { +function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject$4(value) ? objectToString$2.call(value) : ''; - return tag == funcTag$2 || tag == genTag$2; + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; } /** @@ -22068,7 +22096,7 @@ function isFunction$2(value) { * _.isObject(null); * // => false */ -function isObject$4(value) { +function isObject(value) { var type = typeof value; return !!value && (type == 'object' || type == 'function'); } @@ -22097,7 +22125,7 @@ function isObject$4(value) { * _.isObjectLike(null); * // => false */ -function isObjectLike$1(value) { +function isObjectLike(value) { return !!value && typeof value == 'object'; } @@ -22118,9 +22146,9 @@ function isObjectLike$1(value) { * _.isSymbol('abc'); * // => false */ -function isSymbol$1(value) { +function isSymbol(value) { return typeof value == 'symbol' || - (isObjectLike$1(value) && objectToString$2.call(value) == symbolTag$1); + (isObjectLike(value) && objectToString.call(value) == symbolTag); } /** @@ -22144,8 +22172,8 @@ function isSymbol$1(value) { * _.toString([1, 2, 3]); * // => '1,2,3' */ -function toString$1(value) { - return value == null ? '' : baseToString$1(value); +function toString(value) { + return value == null ? '' : baseToString(value); } /** @@ -22182,13 +22210,13 @@ function set(object, path, value) { var lodash_set = set; -var validate_1 = validate$1; +var validate_1$1 = validate; -const { RequestError: RequestError$2 } = distNode$3; +const { RequestError } = require$$0$1; -function validate$1(octokit, options) { +function validate(octokit, options) { if (!options.request.validate) { return; } @@ -22243,7 +22271,7 @@ function validate$1(octokit, options) { } if (!parameter.allowNull && valueIsNull) { - throw new RequestError$2( + throw new RequestError( `'${currentParameterName}' cannot be null`, 400, { @@ -22253,7 +22281,7 @@ function validate$1(octokit, options) { } if (parameter.required && !valueIsPresent) { - throw new RequestError$2( + throw new RequestError( `Empty value for parameter '${currentParameterName}': ${JSON.stringify( value )}`, @@ -22270,7 +22298,7 @@ function validate$1(octokit, options) { const unparsedValue = value; value = parseInt(value, 10); if (isNaN(value)) { - throw new RequestError$2( + throw new RequestError( `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( unparsedValue )} is NaN`, @@ -22283,7 +22311,7 @@ function validate$1(octokit, options) { } if (parameter.enum && parameter.enum.indexOf(String(value)) === -1) { - throw new RequestError$2( + throw new RequestError( `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( value )}`, @@ -22297,7 +22325,7 @@ function validate$1(octokit, options) { if (parameter.validation) { const regex = new RegExp(parameter.validation); if (!regex.test(value)) { - throw new RequestError$2( + throw new RequestError( `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( value )}`, @@ -22313,7 +22341,7 @@ function validate$1(octokit, options) { try { value = JSON.parse(value); } catch (exception) { - throw new RequestError$2( + throw new RequestError( `JSON parse error of value for parameter '${currentParameterName}': ${JSON.stringify( value )}`, @@ -22332,12 +22360,12 @@ function validate$1(octokit, options) { return options; } -var validate_1$1 = octokitValidate; +var validate_1 = octokitValidate; function octokitValidate(octokit) { - octokit.hook.before("request", validate_1.bind(null, octokit)); + octokit.hook.before("request", validate_1$1.bind(null, octokit)); } var deprecate_1 = deprecate; @@ -22514,14 +22542,14 @@ const CORE_PLUGINS = [ authenticationDeprecated, // deprecated: remove in v17 authentication, pagination, - registerEndpoints_1$1, + registerEndpoints_1, restApiEndpoints, - validate_1$1, + validate_1, octokitPaginationMethods // deprecated: remove in v17 ]; -var rest = core$3.plugin(CORE_PLUGINS); +var rest = core.plugin(CORE_PLUGINS); var context = createCommonjsModule(function (module, exports) { Object.defineProperty(exports, "__esModule", { value: true }); @@ -22534,11 +22562,11 @@ class Context { constructor() { this.payload = {}; if (process.env.GITHUB_EVENT_PATH) { - if (fs__default.existsSync(process.env.GITHUB_EVENT_PATH)) { - this.payload = JSON.parse(fs__default.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); + if (fs__default["default"].existsSync(process.env.GITHUB_EVENT_PATH)) { + this.payload = JSON.parse(fs__default["default"].readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); } else { - process.stdout.write(`GITHUB_EVENT_PATH ${process.env.GITHUB_EVENT_PATH} does not exist${os.EOL}`); + process.stdout.write(`GITHUB_EVENT_PATH ${process.env.GITHUB_EVENT_PATH} does not exist${os__default["default"].EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -22571,7 +22599,7 @@ exports.Context = Context; }); unwrapExports(context); -var context_1 = context.Context; +context.Context; var github = createCommonjsModule(function (module, exports) { var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) { @@ -22595,7 +22623,7 @@ exports.context = new Context.Context(); class GitHub extends rest_1.default { constructor(token, opts = {}) { super(Object.assign(Object.assign({}, opts), { auth: `token ${token}` })); - this.graphql = graphql$1.defaults({ + this.graphql = graphql.defaults({ headers: { authorization: `token ${token}` } }); } @@ -22617,7 +22645,7 @@ http://yuilibrary.com/license/ /* istanbul ignore next */ -var exists = fs__default.exists || path.exists; +var exists = fs__default["default"].exists || path__default["default"].exists; var walkFile = function(str, cb) { var data = [], item; @@ -22723,7 +22751,7 @@ var parse$1 = function(file, cb) { if (!x) { return walkFile(file, cb); } - fs__default.readFile(file, 'utf8', function(err, str) { + fs__default["default"].readFile(file, 'utf8', function(err, str) { walkFile(str, cb); }); }); @@ -22731,14 +22759,14 @@ var parse$1 = function(file, cb) { }; -var lib$1 = parse$1; +var lib = parse$1; var source = walkFile; -lib$1.source = source; +lib.source = source; // Parse lcov string into lcov data -function parse$2(data) { +function parse(data) { return new Promise(function(resolve, reject) { - lib$1(data, function(err, res) { + lib(data, function(err, res) { if (err) { reject(err); return @@ -22749,7 +22777,7 @@ function parse$2(data) { } // Get the total coverage percentage from the lcov data. -function percentage(lcov) { +function percentage$1(lcov) { let hit = 0; let found = 0; for (const entry of lcov) { @@ -22872,10 +22900,10 @@ function getStatement(file) { function toRow(file, indent, options) { return tr( td(filename(file, indent, options)), - td(percentage$1(getStatement(file))), - td(percentage$1(file.branches)), - td(percentage$1(file.functions)), - td(percentage$1(file.lines)), + td(percentage(getStatement(file))), + td(percentage(file.branches)), + td(percentage(file.functions)), + td(percentage(file.lines)), td(uncovered(file, options)), ) } @@ -22889,7 +22917,7 @@ function filename(file, indent, options) { return fragment(space, a({ href }, last)) } -function percentage$1(item) { +function percentage(item) { if (!item) { return "N/A" } @@ -22966,7 +22994,7 @@ function comment(lcov, options) { options.base, )} will be` : `Coverage for this commit`, - table(tbody(tr(th(percentage(lcov).toFixed(2), "%")))), + table(tbody(tr(th(percentage$1(lcov).toFixed(2), "%")))), "\n\n", details( summary( @@ -22984,8 +23012,8 @@ function diff(lcov, before, options) { return comment(lcov, options) } - const pbefore = percentage(before); - const pafter = percentage(lcov); + const pbefore = percentage$1(before); + const pafter = percentage$1(lcov); const pdiff = pafter - pbefore; const plus = pdiff > 0 ? "+" : ""; const arrow = pdiff === 0 ? "" : pdiff < 0 ? "▾" : "▴"; @@ -23089,14 +23117,16 @@ async function getExistingComments(github, options, context) { const MAX_COMMENT_CHARS = 65536; -async function main$1() { - const token = core$1.getInput("github-token"); +async function main() { + const token = core$3.getInput("github-token"); const githubClient = new github_2(token); - const lcovFile = core$1.getInput("lcov-file") || "./coverage/lcov.info"; - const baseFile = core$1.getInput("lcov-base"); - const shouldFilterChangedFiles = core$1.getInput("filter-changed-files").toLowerCase() === 'true'; - const shouldDeleteOldComments = core$1.getInput("delete-old-comments").toLowerCase() === 'true'; - const title = core$1.getInput("title"); + const lcovFile = core$3.getInput("lcov-file") || "./coverage/lcov.info"; + const baseFile = core$3.getInput("lcov-base"); + const shouldFilterChangedFiles = + core$3.getInput("filter-changed-files").toLowerCase() === "true"; + const shouldDeleteOldComments = + core$3.getInput("delete-old-comments").toLowerCase() === "true"; + const title = core$3.getInput("title"); const raw = await fs.promises.readFile(lcovFile, "utf-8").catch(err => null); if (!raw) { @@ -23133,15 +23163,15 @@ async function main$1() { options.changedFiles = await getChangedFiles(githubClient, options, github_1); } - const lcov = await parse$2(raw); - const baselcov = baseRaw && (await parse$2(baseRaw)); + const lcov = await parse(raw); + const baselcov = baseRaw && (await parse(baseRaw)); const body = diff(lcov, baselcov, options).substring(0, MAX_COMMENT_CHARS); - if (shouldDeleteOldComments) { - await deleteOldComments(githubClient, options, github_1); - } if (github_1.eventName === "pull_request") { + if (shouldDeleteOldComments) { + await deleteOldComments(githubClient, options, github_1); + } await githubClient.issues.createComment({ repo: github_1.repo.repo, owner: github_1.repo.owner, @@ -23158,7 +23188,7 @@ async function main$1() { } } -main$1().catch(function(err) { +main().catch(function (err) { console.log(err); - core$1.setFailed(err.message); + core$3.setFailed(err.message); }); diff --git a/src/index.js b/src/index.js index a2ace080..7d9c04bf 100644 --- a/src/index.js +++ b/src/index.js @@ -60,11 +60,11 @@ async function main() { const baselcov = baseRaw && (await parse(baseRaw)) const body = diff(lcov, baselcov, options).substring(0, MAX_COMMENT_CHARS) - if (shouldDeleteOldComments) { - await deleteOldComments(githubClient, options, context) - } if (context.eventName === "pull_request") { + if (shouldDeleteOldComments) { + await deleteOldComments(githubClient, options, context) + } await githubClient.issues.createComment({ repo: context.repo.repo, owner: context.repo.owner, @@ -81,7 +81,7 @@ async function main() { } } -main().catch(function(err) { +main().catch(function (err) { console.log(err) core.setFailed(err.message) })