diff --git a/.gitignore b/.gitignore index 58c1d9962..8856f5534 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ __tests__/runner/* # actions requires a node_modules dir https://github.com/actions/toolkit/blob/master/docs/javascript-action.md#publish-a-releasesv1-action # but its recommended not to check these in https://github.com/actions/toolkit/blob/master/docs/action-versioning.md#recommendations -#node_modules +node_modules diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime deleted file mode 120000 index fbb7ee0ee..000000000 --- a/node_modules/.bin/mime +++ /dev/null @@ -1 +0,0 @@ -../mime/cli.js \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver deleted file mode 120000 index 317eb293d..000000000 --- a/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/node_modules/.bin/which b/node_modules/.bin/which deleted file mode 120000 index f62471c85..000000000 --- a/node_modules/.bin/which +++ /dev/null @@ -1 +0,0 @@ -../which/bin/which \ No newline at end of file diff --git a/node_modules/@actions/core/LICENSE.md b/node_modules/@actions/core/LICENSE.md deleted file mode 100644 index e5a73f40e..000000000 --- a/node_modules/@actions/core/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2019 GitHub - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/core/README.md b/node_modules/@actions/core/README.md deleted file mode 100644 index 58a8287fa..000000000 --- a/node_modules/@actions/core/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# `@actions/core` - -> Core functions for setting results, logging, registering secrets and exporting variables across actions - -## Usage - -#### Inputs/Outputs - -You can use this library to get inputs or set outputs: - -```js -const core = require('@actions/core'); - -const myInput = core.getInput('inputName', { required: true }); - -// Do stuff - -core.setOutput('outputKey', 'outputVal'); -``` - -#### Exporting variables - -You can also export variables for future steps. Variables get set in the environment. - -```js -const core = require('@actions/core'); - -// Do stuff - -core.exportVariable('envVar', 'Val'); -``` - -#### PATH Manipulation - -You can explicitly add items to the path for all remaining steps in a workflow: - -```js -const core = require('@actions/core'); - -core.addPath('pathToTool'); -``` - -#### Exit codes - -You should use this library to set the failing exit code for your action: - -```js -const core = require('@actions/core'); - -try { - // Do stuff -} -catch (err) { - // setFailed logs the message and sets a failing exit code - core.setFailed(`Action failed with error ${err}`); -} - -``` - -#### Logging - -Finally, this library provides some utilities for logging. Note that debug logging is hidden from the logs by default. This behavior can be toggled by enabling the [Step Debug Logs](../../docs/action-debugging.md#step-debug-logs). - -```js -const core = require('@actions/core'); - -const myInput = core.getInput('input'); -try { - core.debug('Inside try block'); - - if (!myInput) { - core.warning('myInput was not set'); - } - - // Do stuff -} -catch (err) { - core.error(`Error ${err}, action may still succeed though`); -} -``` - -This library can also wrap chunks of output in foldable groups. - -```js -const core = require('@actions/core') - -// Manually wrap output -core.startGroup('Do some function') -doSomeFunction() -core.endGroup() - -// Wrap an asynchronous function call -const result = await core.group('Do something async', async () => { - const response = await doSomeHTTPRequest() - return response -}) -``` \ No newline at end of file diff --git a/node_modules/@actions/core/lib/command.d.ts b/node_modules/@actions/core/lib/command.d.ts deleted file mode 100644 index 7f6fecbe7..000000000 --- a/node_modules/@actions/core/lib/command.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -interface CommandProperties { - [key: string]: string; -} -/** - * Commands - * - * Command Format: - * ##[name key=value;key=value]message - * - * Examples: - * ##[warning]This is the user warning message - * ##[set-secret name=mypassword]definitelyNotAPassword! - */ -export declare function issueCommand(command: string, properties: CommandProperties, message: string): void; -export declare function issue(name: string, message?: string): void; -export {}; diff --git a/node_modules/@actions/core/lib/command.js b/node_modules/@actions/core/lib/command.js deleted file mode 100644 index f2297f5df..000000000 --- a/node_modules/@actions/core/lib/command.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const os = require("os"); -/** - * Commands - * - * Command Format: - * ##[name key=value;key=value]message - * - * Examples: - * ##[warning]This is the user warning message - * ##[set-secret name=mypassword]definitelyNotAPassword! - */ -function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); -} -exports.issueCommand = issueCommand; -function issue(name, message = '') { - issueCommand(name, {}, message); -} -exports.issue = issue; -const CMD_PREFIX = '##['; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_PREFIX + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - // safely append the val - avoid blowing up when attempting to - // call .replace() if message is not a string for some reason - cmdStr += `${key}=${escape(`${val || ''}`)};`; - } - } - } - } - cmdStr += ']'; - // safely append the message - avoid blowing up when attempting to - // call .replace() if message is not a string for some reason - const message = `${this.message || ''}`; - cmdStr += escapeData(message); - return cmdStr; - } -} -function escapeData(s) { - return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A'); -} -function escape(s) { - return s - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/]/g, '%5D') - .replace(/;/g, '%3B'); -} -//# sourceMappingURL=command.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/command.js.map b/node_modules/@actions/core/lib/command.js.map deleted file mode 100644 index 6d3dacc7c..000000000 --- a/node_modules/@actions/core/lib/command.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;AAAA,yBAAwB;AAQxB;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAe;IAEf,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,UAAkB,EAAE;IACtD,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,KAAK,CAAA;AAExB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,QAAQ;QACN,IAAI,MAAM,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAA;QAEtC,IAAI,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9D,MAAM,IAAI,GAAG,CAAA;YACb,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACvC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;oBAChC,IAAI,GAAG,EAAE;wBACP,8DAA8D;wBAC9D,6DAA6D;wBAC7D,MAAM,IAAI,GAAG,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE,EAAE,CAAC,GAAG,CAAA;qBAC9C;iBACF;aACF;SACF;QAED,MAAM,IAAI,GAAG,CAAA;QAEb,kEAAkE;QAClE,6DAA6D;QAC7D,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,CAAA;QACvC,MAAM,IAAI,UAAU,CAAC,OAAO,CAAC,CAAA;QAE7B,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AACtD,CAAC;AAED,SAAS,MAAM,CAAC,CAAS;IACvB,OAAO,CAAC;SACL,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.d.ts b/node_modules/@actions/core/lib/core.d.ts deleted file mode 100644 index b741d431e..000000000 --- a/node_modules/@actions/core/lib/core.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Interface for getInput options - */ -export interface InputOptions { - /** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */ - required?: boolean; -} -/** - * The code to exit an action - */ -export declare enum ExitCode { - /** - * A code indicating that the action was successful - */ - Success = 0, - /** - * A code indicating that the action was a failure - */ - Failure = 1 -} -/** - * sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable - */ -export declare function exportVariable(name: string, val: string): void; -/** - * exports the variable and registers a secret which will get masked from logs - * @param name the name of the variable to set - * @param val value of the secret - */ -export declare function exportSecret(name: string, val: string): void; -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -export declare function addPath(inputPath: string): void; -/** - * Gets the value of an input. The value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -export declare function getInput(name: string, options?: InputOptions): string; -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store - */ -export declare function setOutput(name: string, value: string): void; -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -export declare function setFailed(message: string): void; -/** - * Writes debug message to user log - * @param message debug message - */ -export declare function debug(message: string): void; -/** - * Adds an error issue - * @param message error issue message - */ -export declare function error(message: string): void; -/** - * Adds an warning issue - * @param message warning issue message - */ -export declare function warning(message: string): void; -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ -export declare function startGroup(name: string): void; -/** - * End an output group. - */ -export declare function endGroup(): void; -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ -export declare function group(name: string, fn: () => Promise): Promise; diff --git a/node_modules/@actions/core/lib/core.js b/node_modules/@actions/core/lib/core.js deleted file mode 100644 index 54ce8e8ce..000000000 --- a/node_modules/@actions/core/lib/core.js +++ /dev/null @@ -1,168 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const command_1 = require("./command"); -const path = require("path"); -/** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable - */ -function exportVariable(name, val) { - process.env[name] = val; - command_1.issueCommand('set-env', { name }, val); -} -exports.exportVariable = exportVariable; -/** - * exports the variable and registers a secret which will get masked from logs - * @param name the name of the variable to set - * @param val value of the secret - */ -function exportSecret(name, val) { - exportVariable(name, val); - // the runner will error with not implemented - // leaving the function but raising the error earlier - command_1.issueCommand('set-secret', {}, val); - throw new Error('Not implemented.'); -} -exports.exportSecret = exportSecret; -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - command_1.issueCommand('add-path', {}, inputPath); - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -exports.addPath = addPath; -/** - * Gets the value of an input. The value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(' ', '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - return val.trim(); -} -exports.getInput = getInput; -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store - */ -function setOutput(name, value) { - command_1.issueCommand('set-output', { name }, value); -} -exports.setOutput = setOutput; -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -exports.setFailed = setFailed; -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Writes debug message to user log - * @param message debug message - */ -function debug(message) { - command_1.issueCommand('debug', {}, message); -} -exports.debug = debug; -/** - * Adds an error issue - * @param message error issue message - */ -function error(message) { - command_1.issue('error', message); -} -exports.error = error; -/** - * Adds an warning issue - * @param message warning issue message - */ -function warning(message) { - command_1.issue('warning', message); -} -exports.warning = warning; -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ -function startGroup(name) { - command_1.issue('group', name); -} -exports.startGroup = startGroup; -/** - * End an output group. - */ -function endGroup() { - command_1.issue('endgroup'); -} -exports.endGroup = endGroup; -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ -function group(name, fn) { - return __awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -exports.group = group; -//# sourceMappingURL=core.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.js.map b/node_modules/@actions/core/lib/core.js.map deleted file mode 100644 index e47240ed8..000000000 --- a/node_modules/@actions/core/lib/core.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uCAA6C;AAE7C,6BAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACvB,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAHD,wCAGC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,IAAY,EAAE,GAAW;IACpD,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAEzB,6CAA6C;IAC7C,qDAAqD;IACrD,sBAAY,CAAC,YAAY,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;IACnC,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAA;AACrC,CAAC;AAPD,oCAOC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;IACvC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AAHD,0BAGC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAsB;IAC3D,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;IACpE,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAA;KAC5D;IAED,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC;AARD,4BAQC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED,yEAAyE;AACzE,UAAU;AACV,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAe;IACvC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAA;IACnC,KAAK,CAAC,OAAO,CAAC,CAAA;AAChB,CAAC;AAHD,8BAGC;AAED,yEAAyE;AACzE,mBAAmB;AACnB,yEAAyE;AAEzE;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,sBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACpC,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,eAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;AACzB,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,OAAe;IACrC,eAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;AAC3B,CAAC;AAFD,0BAEC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,eAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC"} \ No newline at end of file diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json deleted file mode 100644 index b0b9a355e..000000000 --- a/node_modules/@actions/core/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_args": [ - [ - "@actions/core@1.1.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "@actions/core@1.1.0", - "_id": "@actions/core@1.1.0", - "_inBundle": false, - "_integrity": "sha512-KKpo3xzo0Zsikni9tbOsEQkxZBGDsYSJZNkTvmo0gPSXrc98TBOcdTvKwwjitjkjHkreTggWdB1ACiAFVgsuzA==", - "_location": "/@actions/core", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@actions/core@1.1.0", - "name": "@actions/core", - "escapedName": "@actions%2fcore", - "scope": "@actions", - "rawSpec": "1.1.0", - "saveSpec": null, - "fetchSpec": "1.1.0" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.1.0.tgz", - "_spec": "1.1.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "description": "Actions core lib", - "devDependencies": { - "@types/node": "^12.0.2" - }, - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib" - ], - "gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52", - "homepage": "https://github.com/actions/toolkit/tree/master/packages/core", - "keywords": [ - "github", - "actions", - "core" - ], - "license": "MIT", - "main": "lib/core.js", - "name": "@actions/core", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/actions/toolkit.git" - }, - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1", - "tsc": "tsc" - }, - "version": "1.1.0" -} diff --git a/node_modules/@actions/github/LICENSE.md b/node_modules/@actions/github/LICENSE.md deleted file mode 100644 index e5a73f40e..000000000 --- a/node_modules/@actions/github/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2019 GitHub - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/github/README.md b/node_modules/@actions/github/README.md deleted file mode 100644 index b4312568d..000000000 --- a/node_modules/@actions/github/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# `@actions/github` - -> A hydrated Octokit client. - -## Usage - -Returns an Octokit client. See https://octokit.github.io/rest.js for the API. - -```js -const github = require('@actions/github'); -const core = require('@actions/core'); - -// This should be a token with access to your repository scoped in as a secret. -const myToken = core.getInput('myToken'); - -const octokit = new github.GitHub(myToken); - -const { data: pullRequest } = await octokit.pulls.get({ - owner: 'octokit', - repo: 'rest.js', - pull_number: 123, - mediaType: { - format: 'diff' - } -}); - -console.log(pullRequest); -``` - -You can pass client options (except `auth`, which is handled by the token argument), as specified by [Octokit](https://octokit.github.io/rest.js/), as a second argument to the `GitHub` constructor. - -You can also make GraphQL requests. See https://github.com/octokit/graphql.js for the API. - -```js -const result = await octokit.graphql(query, variables); -``` - -Finally, you can get the context of the current action: - -```js -const github = require('@actions/github'); - -const context = github.context; - -const newIssue = await octokit.issues.create({ - ...context.repo, - title: 'New issue!', - body: 'Hello Universe!' -}); -``` diff --git a/node_modules/@actions/github/lib/context.d.ts b/node_modules/@actions/github/lib/context.d.ts deleted file mode 100644 index 3ee758334..000000000 --- a/node_modules/@actions/github/lib/context.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { WebhookPayload } from './interfaces'; -export declare class Context { - /** - * Webhook payload object that triggered the workflow - */ - payload: WebhookPayload; - eventName: string; - sha: string; - ref: string; - workflow: string; - action: string; - actor: string; - /** - * Hydrate the context from the environment - */ - constructor(); - readonly issue: { - owner: string; - repo: string; - number: number; - }; - readonly repo: { - owner: string; - repo: string; - }; -} diff --git a/node_modules/@actions/github/lib/context.js b/node_modules/@actions/github/lib/context.js deleted file mode 100644 index 0df128f7a..000000000 --- a/node_modules/@actions/github/lib/context.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const fs_1 = require("fs"); -const os_1 = require("os"); -class Context { - /** - * Hydrate the context from the environment - */ - constructor() { - this.payload = {}; - if (process.env.GITHUB_EVENT_PATH) { - if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { - this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); - } - else { - process.stdout.write(`GITHUB_EVENT_PATH ${process.env.GITHUB_EVENT_PATH} does not exist${os_1.EOL}`); - } - } - this.eventName = process.env.GITHUB_EVENT_NAME; - this.sha = process.env.GITHUB_SHA; - this.ref = process.env.GITHUB_REF; - this.workflow = process.env.GITHUB_WORKFLOW; - this.action = process.env.GITHUB_ACTION; - this.actor = process.env.GITHUB_ACTOR; - } - get issue() { - const payload = this.payload; - return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pullRequest || payload).number }); - } - get repo() { - if (process.env.GITHUB_REPOSITORY) { - const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); - return { owner, repo }; - } - if (this.payload.repository) { - return { - owner: this.payload.repository.owner.login, - repo: this.payload.repository.name - }; - } - throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); - } -} -exports.Context = Context; -//# sourceMappingURL=context.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/context.js.map b/node_modules/@actions/github/lib/context.js.map deleted file mode 100644 index 24eabd873..000000000 --- a/node_modules/@actions/github/lib/context.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;AAEA,2BAA2C;AAC3C,2BAAsB;AAEtB,MAAa,OAAO;IAalB;;OAEG;IACH;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,IAAI,eAAU,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CACvB,iBAAY,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC,CAChE,CAAA;aACF;iBAAM;gBACL,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,qBACE,OAAO,CAAC,GAAG,CAAC,iBACd,kBAAkB,QAAG,EAAE,CACxB,CAAA;aACF;SACF;QACD,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,iBAA2B,CAAA;QACxD,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAyB,CAAA;QACrD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAuB,CAAA;QACjD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,YAAsB,CAAA;IACjD,CAAC;IAED,IAAI,KAAK;QACP,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAE5B,uCACK,IAAI,CAAC,IAAI,KACZ,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,CAAC,MAAM,IACjE;IACH,CAAC;IAED,IAAI,IAAI;QACN,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAC9D,OAAO,EAAC,KAAK,EAAE,IAAI,EAAC,CAAA;SACrB;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC3B,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK;gBAC1C,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI;aACnC,CAAA;SACF;QAED,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAA;IACH,CAAC;CACF;AAjED,0BAiEC"} \ No newline at end of file diff --git a/node_modules/@actions/github/lib/github.d.ts b/node_modules/@actions/github/lib/github.d.ts deleted file mode 100644 index 7c5b9f2bc..000000000 --- a/node_modules/@actions/github/lib/github.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { GraphQlQueryResponse, Variables } from '@octokit/graphql'; -import Octokit from '@octokit/rest'; -import * as Context from './context'; -export declare const context: Context.Context; -export declare class GitHub extends Octokit { - graphql: (query: string, variables?: Variables) => Promise; - constructor(token: string, opts?: Omit); -} diff --git a/node_modules/@actions/github/lib/github.js b/node_modules/@actions/github/lib/github.js deleted file mode 100644 index d5c782f6d..000000000 --- a/node_modules/@actions/github/lib/github.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -// Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/github.ts -const graphql_1 = require("@octokit/graphql"); -const rest_1 = __importDefault(require("@octokit/rest")); -const Context = __importStar(require("./context")); -// We need this in order to extend Octokit -rest_1.default.prototype = new rest_1.default(); -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({ - headers: { authorization: `token ${token}` } - }); - } -} -exports.GitHub = GitHub; -//# sourceMappingURL=github.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/github.js.map b/node_modules/@actions/github/lib/github.js.map deleted file mode 100644 index 0c268e8c4..000000000 --- a/node_modules/@actions/github/lib/github.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gGAAgG;AAChG,8CAA0E;AAC1E,yDAAmC;AACnC,mDAAoC;AAEpC,0CAA0C;AAC1C,cAAO,CAAC,SAAS,GAAG,IAAI,cAAO,EAAE,CAAA;AAEpB,QAAA,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;AAE5C,MAAa,MAAO,SAAQ,cAAO;IAMjC,YAAY,KAAa,EAAE,OAAsC,EAAE;QACjE,KAAK,iCAAK,IAAI,KAAE,IAAI,EAAE,SAAS,KAAK,EAAE,IAAE,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,kBAAQ,CAAC;YACtB,OAAO,EAAE,EAAC,aAAa,EAAE,SAAS,KAAK,EAAE,EAAC;SAC3C,CAAC,CAAA;IACJ,CAAC;CACF;AAZD,wBAYC"} \ No newline at end of file diff --git a/node_modules/@actions/github/lib/interfaces.d.ts b/node_modules/@actions/github/lib/interfaces.d.ts deleted file mode 100644 index 23788cced..000000000 --- a/node_modules/@actions/github/lib/interfaces.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export interface PayloadRepository { - [key: string]: any; - full_name?: string; - name: string; - owner: { - [key: string]: any; - login: string; - name?: string; - }; - html_url?: string; -} -export interface WebhookPayload { - [key: string]: any; - repository?: PayloadRepository; - issue?: { - [key: string]: any; - number: number; - html_url?: string; - body?: string; - }; - pull_request?: { - [key: string]: any; - number: number; - html_url?: string; - body?: string; - }; - sender?: { - [key: string]: any; - type: string; - }; - action?: string; - installation?: { - id: number; - [key: string]: any; - }; -} diff --git a/node_modules/@actions/github/lib/interfaces.js b/node_modules/@actions/github/lib/interfaces.js deleted file mode 100644 index a660b5e30..000000000 --- a/node_modules/@actions/github/lib/interfaces.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -/* eslint-disable @typescript-eslint/no-explicit-any */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/interfaces.js.map b/node_modules/@actions/github/lib/interfaces.js.map deleted file mode 100644 index dc2c9609f..000000000 --- a/node_modules/@actions/github/lib/interfaces.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA,uDAAuD"} \ No newline at end of file diff --git a/node_modules/@actions/github/package.json b/node_modules/@actions/github/package.json deleted file mode 100644 index 453a84b51..000000000 --- a/node_modules/@actions/github/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_args": [ - [ - "@actions/github@1.1.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "@actions/github@1.1.0", - "_id": "@actions/github@1.1.0", - "_inBundle": false, - "_integrity": "sha512-cHf6PyoNMdei13jEdGPhKprIMFmjVVW/dnM5/9QmQDJ1ZTaGVyezUSCUIC/ySNLRvDUpeFwPYMdThSEJldSbUw==", - "_location": "/@actions/github", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@actions/github@1.1.0", - "name": "@actions/github", - "escapedName": "@actions%2fgithub", - "scope": "@actions", - "rawSpec": "1.1.0", - "saveSpec": null, - "fetchSpec": "1.1.0" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@actions/github/-/github-1.1.0.tgz", - "_spec": "1.1.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "dependencies": { - "@octokit/graphql": "^2.0.1", - "@octokit/rest": "^16.15.0" - }, - "description": "Actions github lib", - "devDependencies": { - "jest": "^24.7.1" - }, - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib" - ], - "gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52", - "homepage": "https://github.com/actions/toolkit/tree/master/packages/github", - "keywords": [ - "github", - "actions" - ], - "license": "MIT", - "main": "lib/github.js", - "name": "@actions/github", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/actions/toolkit.git" - }, - "scripts": { - "build": "tsc", - "test": "jest", - "tsc": "tsc" - }, - "version": "1.1.0" -} diff --git a/node_modules/@octokit/endpoint/LICENSE b/node_modules/@octokit/endpoint/LICENSE deleted file mode 100644 index af5366d0d..000000000 --- a/node_modules/@octokit/endpoint/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2018 Octokit contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@octokit/endpoint/README.md b/node_modules/@octokit/endpoint/README.md deleted file mode 100644 index ad26c377c..000000000 --- a/node_modules/@octokit/endpoint/README.md +++ /dev/null @@ -1,421 +0,0 @@ -# endpoint.js - -> Turns GitHub REST API endpoints into generic request options - -[![@latest](https://img.shields.io/npm/v/@octokit/endpoint.svg)](https://www.npmjs.com/package/@octokit/endpoint) -[![Build Status](https://travis-ci.org/octokit/endpoint.js.svg?branch=master)](https://travis-ci.org/octokit/endpoint.js) -[![Greenkeeper](https://badges.greenkeeper.io/octokit/endpoint.js.svg)](https://greenkeeper.io/) - -`@octokit/endpoint` combines [GitHub REST API routes](https://developer.github.com/v3/) with your parameters and turns them into generic request options that can be used in any request library. - - - - -- [Usage](#usage) -- [API](#api) - - [endpoint()](#endpoint) - - [endpoint.defaults()](#endpointdefaults) - - [endpoint.DEFAULTS](#endpointdefaults) - - [endpoint.merge()](#endpointmerge) - - [endpoint.parse()](#endpointparse) -- [Special cases](#special-cases) - - [The `data` parameter – set request body directly](#the-data-parameter-%E2%80%93-set-request-body-directly) - - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body) -- [LICENSE](#license) - - - -## Usage - - - - - - -
-Browsers - -Load @octokit/endpoint directly from cdn.pika.dev - -```html - -``` - -
-Node - - -Install with npm install @octokit/endpoint - -```js -const { endpoint } = require("@octokit/endpoint"); -// or: import { endpoint } from "@octokit/endpoint"; -``` - -
- -Example for [List organization repositories](https://developer.github.com/v3/repos/#list-organization-repositories) - -```js -const requestOptions = endpoint("GET /orgs/:org/repos", { - headers: { - authorization: "token 0000000000000000000000000000000000000001" - }, - org: "octokit", - type: "private" -}); -``` - -The resulting `requestOptions` looks as follows - -```json -{ - "method": "GET", - "url": "https://api.github.com/orgs/octokit/repos?type=private", - "headers": { - "accept": "application/vnd.github.v3+json", - "authorization": "token 0000000000000000000000000000000000000001", - "user-agent": "octokit/endpoint.js v1.2.3" - } -} -``` - -You can pass `requestOptions` to commen request libraries - -```js -const { url, ...options } = requestOptions; -// using with fetch (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) -fetch(url, options); -// using with request (https://github.com/request/request) -request(requestOptions); -// using with got (https://github.com/sindresorhus/got) -got[options.method](url, options); -// using with axios -axios(requestOptions); -``` - -## API - -### `endpoint(route, options)` or `endpoint(options)` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- name - - type - - description -
- route - - String - - If set, it has to be a string consisting of URL and the request method, e.g., GET /orgs/:org. If it’s set to a URL, only the method defaults to GET. -
- options.method - - String - - Required unless route is set. Any supported http verb. Defaults to GET. -
- options.url - - String - - Required unless route is set. A path or full URL which may contain :variable or {variable} placeholders, - e.g., /orgs/:org/repos. The url is parsed using url-template. -
- options.baseUrl - - String - - Defaults to https://api.github.com. -
- options.headers - - Object - - Custom headers. Passed headers are merged with defaults:
- headers['user-agent'] defaults to octokit-endpoint.js/1.2.3 (where 1.2.3 is the released version).
- headers['accept'] defaults to application/vnd.github.v3+json.
-
- options.mediaType.format - - String - - Media type param, such as raw, diff, or text+json. See Media Types. Setting options.mediaType.format will amend the headers.accept value. -
- options.mediaType.previews - - Array of Strings - - Name of previews, such as mercy, symmetra, or scarlet-witch. See API Previews. If options.mediaType.previews was set as default, the new previews will be merged into the default ones. Setting options.mediaType.previews will amend the headers.accept value. options.mediaType.previews will be merged with an existing array set using .defaults(). -
- options.data - - Any - - Set request body directly instead of setting it to JSON based on additional parameters. See "The data parameter" below. -
- options.request - - Object - - Pass custom meta information for the request. The request object will be returned as is. -
- -All other options will be passed depending on the `method` and `url` options. - -1. If the option key has a placeholder in the `url`, it will be used as the replacement. For example, if the passed options are `{url: '/orgs/:org/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos`. -2. If the `method` is `GET` or `HEAD`, the option is passed as a query parameter. -3. Otherwise, the parameter is passed in the request body as a JSON key. - -**Result** - -`endpoint()` is a synchronous method and returns an object with the following keys: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- key - - type - - description -
methodStringThe http method. Always lowercase.
urlStringThe url with placeholders replaced with passed parameters.
headersObjectAll header names are lowercased.
bodyAnyThe request body if one is present. Only for PATCH, POST, PUT, DELETE requests.
requestObjectRequest meta option, it will be returned as it was passed into endpoint()
- -### `endpoint.defaults()` - -Override or set default options. Example: - -```js -const request = require("request"); -const myEndpoint = require("@octokit/endpoint").defaults({ - baseUrl: "https://github-enterprise.acme-inc.com/api/v3", - headers: { - "user-agent": "myApp/1.2.3", - authorization: `token 0000000000000000000000000000000000000001` - }, - org: "my-project", - per_page: 100 -}); - -request(myEndpoint(`GET /orgs/:org/repos`)); -``` - -You can call `.defaults()` again on the returned method, the defaults will cascade. - -```js -const myProjectEndpoint = endpoint.defaults({ - baseUrl: "https://github-enterprise.acme-inc.com/api/v3", - headers: { - "user-agent": "myApp/1.2.3" - }, - org: "my-project" -}); -const myProjectEndpointWithAuth = myProjectEndpoint.defaults({ - headers: { - authorization: `token 0000000000000000000000000000000000000001` - } -}); -``` - -`myProjectEndpointWithAuth` now defaults the `baseUrl`, `headers['user-agent']`, -`org` and `headers['authorization']` on top of `headers['accept']` that is set -by the global default. - -### `endpoint.DEFAULTS` - -The current default options. - -```js -endpoint.DEFAULTS.baseUrl; // https://api.github.com -const myEndpoint = endpoint.defaults({ - baseUrl: "https://github-enterprise.acme-inc.com/api/v3" -}); -myEndpoint.DEFAULTS.baseUrl; // https://github-enterprise.acme-inc.com/api/v3 -``` - -### `endpoint.merge(route, options)` or `endpoint.merge(options)` - -Get the defaulted endpoint options, but without parsing them into request options: - -```js -const myProjectEndpoint = endpoint.defaults({ - baseUrl: "https://github-enterprise.acme-inc.com/api/v3", - headers: { - "user-agent": "myApp/1.2.3" - }, - org: "my-project" -}); -myProjectEndpoint.merge("GET /orgs/:org/repos", { - headers: { - authorization: `token 0000000000000000000000000000000000000001` - }, - org: "my-secret-project", - type: "private" -}); - -// { -// baseUrl: 'https://github-enterprise.acme-inc.com/api/v3', -// method: 'GET', -// url: '/orgs/:org/repos', -// headers: { -// accept: 'application/vnd.github.v3+json', -// authorization: `token 0000000000000000000000000000000000000001`, -// 'user-agent': 'myApp/1.2.3' -// }, -// org: 'my-secret-project', -// type: 'private' -// } -``` - -### `endpoint.parse()` - -Stateless method to turn endpoint options into request options. Calling -`endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`. - -## Special cases - - - -### The `data` parameter – set request body directly - -Some endpoints such as [Render a Markdown document in raw mode](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode) don’t have parameters that are sent as request body keys, instead, the request body needs to be set directly. In these cases, set the `data` parameter. - -```js -const options = endpoint("POST /markdown/raw", { - data: "Hello world github/linguist#1 **cool**, and #1!", - headers: { - accept: "text/html;charset=utf-8", - "content-type": "text/plain" - } -}); - -// options is -// { -// method: 'post', -// url: 'https://api.github.com/markdown/raw', -// headers: { -// accept: 'text/html;charset=utf-8', -// 'content-type': 'text/plain', -// 'user-agent': userAgent -// }, -// body: 'Hello world github/linguist#1 **cool**, and #1!' -// } -``` - -### Set parameters for both the URL/query and the request body - -There are API endpoints that accept both query parameters as well as a body. In that case, you need to add the query parameters as templates to `options.url`, as defined in the [RFC 6570 URI Template specification](https://tools.ietf.org/html/rfc6570). - -Example - -```js -endpoint( - "POST https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", - { - name: "example.zip", - label: "short description", - headers: { - "content-type": "text/plain", - "content-length": 14, - authorization: `token 0000000000000000000000000000000000000001` - }, - data: "Hello, world!" - } -); -``` - -## LICENSE - -[MIT](LICENSE) diff --git a/node_modules/@octokit/endpoint/dist-node/index.js b/node_modules/@octokit/endpoint/dist-node/index.js deleted file mode 100644 index fe7211998..000000000 --- a/node_modules/@octokit/endpoint/dist-node/index.js +++ /dev/null @@ -1,377 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var isPlainObject = _interopDefault(require('is-plain-object')); -var universalUserAgent = require('universal-user-agent'); - -function lowercaseKeys(object) { - if (!object) { - return {}; - } - - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} - -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach(key => { - if (isPlainObject(options[key])) { - if (!(key in defaults)) Object.assign(result, { - [key]: options[key] - });else result[key] = mergeDeep(defaults[key], options[key]); - } else { - Object.assign(result, { - [key]: options[key] - }); - } - }); - return result; -} - -function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { - method, - url - } : { - url: method - }, options); - } else { - options = route || {}; - } // lowercase header names before merging with defaults to avoid duplicates - - - options.headers = lowercaseKeys(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten - - if (defaults && defaults.mediaType.previews.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); - } - - mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); - return mergedOptions; -} - -function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - - if (names.length === 0) { - return url; - } - - return url + separator + names.map(name => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); - } - - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} - -const urlVariableRegex = /\{[^}]+\}/g; - -function removeNonChars(variableName) { - return variableName.replace(/^\W+|\W+$/g, "").split(/,/); -} - -function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); - - if (!matches) { - return []; - } - - return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); -} - -function omit(object, keysToOmit) { - return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { - obj[key] = object[key]; - return obj; - }, {}); -} - -// Based on https://github.com/bramstein/url-template, licensed under BSD -// TODO: create separate package. -// -// Copyright (c) 2012-2014, Bram Stein -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. The name of the author may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* istanbul ignore file */ -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); - } - - return part; - }).join(""); -} - -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} - -function encodeValue(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; - } -} - -function isDefined(value) { - return value !== undefined && value !== null; -} - -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} - -function getValues(context, operator, key, modifier) { - var value = context[key], - result = []; - - if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { - value = value.toString(); - - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - const tmp = []; - - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - tmp.push(encodeValue(operator, value)); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } - } - } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); - } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); - } - } - - return result; -} - -function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} - -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - - expression.split(/,/g).forEach(function (variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - - if (operator && operator !== "+") { - var separator = ","; - - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; - } - - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); - } - } else { - return encodeReserved(literal); - } - }); -} - -function parse(options) { - // https://fetch.spec.whatwg.org/#methods - let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible - - let url = options.url.replace(/:([a-z]\w+)/g, "{+$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later - - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - - const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequset = /application\/octet-stream/i.test(headers.accept); - - if (!isBinaryRequset) { - if (options.mediaType.format) { - // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw - headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(","); - } - - if (options.mediaType.previews.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); - } - } // for GET/HEAD requests, set URL query parameters from remaining parameters - // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters - - - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } else { - headers["content-length"] = 0; - } - } - } // default content-type for JSON if body is set - - - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. - // fetch does not allow to set `content-length` header, but we can set body to an empty string - - - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } // Only return body/request keys if present - - - return Object.assign({ - method, - url, - headers - }, typeof body !== "undefined" ? { - body - } : null, options.request ? { - request: options.request - } : null); -} - -function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); -} - -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS = merge(oldDefaults, newDefaults); - const endpoint = endpointWithDefaults.bind(null, DEFAULTS); - return Object.assign(endpoint, { - DEFAULTS, - defaults: withDefaults.bind(null, DEFAULTS), - merge: merge.bind(null, DEFAULTS), - parse - }); -} - -const VERSION = "0.0.0-development"; - -const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; -const DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "", - previews: [] - } -}; - -const endpoint = withDefaults(null, DEFAULTS); - -exports.endpoint = endpoint; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/endpoint/dist-node/index.js.map b/node_modules/@octokit/endpoint/dist-node/index.js.map deleted file mode 100644 index ef4498147..000000000 --- a/node_modules/@octokit/endpoint/dist-node/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import isPlainObject from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach(key => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = route || {};\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter(preview => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map(name => {\n if (name === \"q\") {\n return (\"q=\" +\n parameters\n .q.split(\"+\")\n .map(encodeURIComponent)\n .join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter(option => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part)\n .replace(/%5B/g, \"[\")\n .replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return (\"%\" +\n c\n .charCodeAt(0)\n .toString(16)\n .toUpperCase());\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = options.url.replace(/:([a-z]\\w+)/g, \"{+$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter(option => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequset = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequset) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map(preview => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map(preview => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n else {\n headers[\"content-length\"] = 0;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse\n });\n}\n","export const VERSION = \"0.0.0-development\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\",\n previews: []\n }\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":["lowercaseKeys","object","Object","keys","reduce","newObj","key","toLowerCase","mergeDeep","defaults","options","result","assign","forEach","isPlainObject","merge","route","method","url","split","headers","mergedOptions","mediaType","previews","length","filter","preview","includes","concat","map","replace","addQueryParameters","parameters","separator","test","names","name","q","encodeURIComponent","join","urlVariableRegex","removeNonChars","variableName","extractUrlVariableNames","matches","match","a","b","omit","keysToOmit","option","obj","encodeReserved","str","part","encodeURI","encodeUnreserved","c","charCodeAt","toString","toUpperCase","encodeValue","operator","value","isDefined","undefined","isKeyOperator","getValues","context","modifier","substring","parseInt","push","Array","isArray","k","tmp","parseUrl","template","expand","bind","operators","_","expression","literal","values","indexOf","charAt","substr","variable","exec","parse","body","urlVariableNames","baseUrl","omittedParameters","remainingParameters","isBinaryRequset","accept","format","previewsFromAcceptHeader","data","request","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS","endpoint","VERSION","userAgent","getUserAgent"],"mappings":";;;;;;;;;AAAO,SAASA,aAAT,CAAuBC,MAAvB,EAA+B;MAC9B,CAACA,MAAL,EAAa;WACF,EAAP;;;SAEGC,MAAM,CAACC,IAAP,CAAYF,MAAZ,EAAoBG,MAApB,CAA2B,CAACC,MAAD,EAASC,GAAT,KAAiB;IAC/CD,MAAM,CAACC,GAAG,CAACC,WAAJ,EAAD,CAAN,GAA4BN,MAAM,CAACK,GAAD,CAAlC;WACOD,MAAP;GAFG,EAGJ,EAHI,CAAP;;;ACHG,SAASG,SAAT,CAAmBC,QAAnB,EAA6BC,OAA7B,EAAsC;QACnCC,MAAM,GAAGT,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBH,QAAlB,CAAf;EACAP,MAAM,CAACC,IAAP,CAAYO,OAAZ,EAAqBG,OAArB,CAA6BP,GAAG,IAAI;QAC5BQ,aAAa,CAACJ,OAAO,CAACJ,GAAD,CAAR,CAAjB,EAAiC;UACzB,EAAEA,GAAG,IAAIG,QAAT,CAAJ,EACIP,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;SAAGL,GAAD,GAAOI,OAAO,CAACJ,GAAD;OAAtC,EADJ,KAGIK,MAAM,CAACL,GAAD,CAAN,GAAcE,SAAS,CAACC,QAAQ,CAACH,GAAD,CAAT,EAAgBI,OAAO,CAACJ,GAAD,CAAvB,CAAvB;KAJR,MAMK;MACDJ,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;SAAGL,GAAD,GAAOI,OAAO,CAACJ,GAAD;OAAtC;;GARR;SAWOK,MAAP;;;ACZG,SAASI,KAAT,CAAeN,QAAf,EAAyBO,KAAzB,EAAgCN,OAAhC,EAAyC;MACxC,OAAOM,KAAP,KAAiB,QAArB,EAA+B;QACvB,CAACC,MAAD,EAASC,GAAT,IAAgBF,KAAK,CAACG,KAAN,CAAY,GAAZ,CAApB;IACAT,OAAO,GAAGR,MAAM,CAACU,MAAP,CAAcM,GAAG,GAAG;MAAED,MAAF;MAAUC;KAAb,GAAqB;MAAEA,GAAG,EAAED;KAA7C,EAAuDP,OAAvD,CAAV;GAFJ,MAIK;IACDA,OAAO,GAAGM,KAAK,IAAI,EAAnB;GANwC;;;EAS5CN,OAAO,CAACU,OAAR,GAAkBpB,aAAa,CAACU,OAAO,CAACU,OAAT,CAA/B;QACMC,aAAa,GAAGb,SAAS,CAACC,QAAQ,IAAI,EAAb,EAAiBC,OAAjB,CAA/B,CAV4C;;MAYxCD,QAAQ,IAAIA,QAAQ,CAACa,SAAT,CAAmBC,QAAnB,CAA4BC,MAA5C,EAAoD;IAChDH,aAAa,CAACC,SAAd,CAAwBC,QAAxB,GAAmCd,QAAQ,CAACa,SAAT,CAAmBC,QAAnB,CAC9BE,MAD8B,CACvBC,OAAO,IAAI,CAACL,aAAa,CAACC,SAAd,CAAwBC,QAAxB,CAAiCI,QAAjC,CAA0CD,OAA1C,CADW,EAE9BE,MAF8B,CAEvBP,aAAa,CAACC,SAAd,CAAwBC,QAFD,CAAnC;;;EAIJF,aAAa,CAACC,SAAd,CAAwBC,QAAxB,GAAmCF,aAAa,CAACC,SAAd,CAAwBC,QAAxB,CAAiCM,GAAjC,CAAsCH,OAAD,IAAaA,OAAO,CAACI,OAAR,CAAgB,UAAhB,EAA4B,EAA5B,CAAlD,CAAnC;SACOT,aAAP;;;ACpBG,SAASU,kBAAT,CAA4Bb,GAA5B,EAAiCc,UAAjC,EAA6C;QAC1CC,SAAS,GAAG,KAAKC,IAAL,CAAUhB,GAAV,IAAiB,GAAjB,GAAuB,GAAzC;QACMiB,KAAK,GAAGjC,MAAM,CAACC,IAAP,CAAY6B,UAAZ,CAAd;;MACIG,KAAK,CAACX,MAAN,KAAiB,CAArB,EAAwB;WACbN,GAAP;;;SAEIA,GAAG,GACPe,SADI,GAEJE,KAAK,CACAN,GADL,CACSO,IAAI,IAAI;QACTA,IAAI,KAAK,GAAb,EAAkB;aACN,OACJJ,UAAU,CACLK,CADL,CACOlB,KADP,CACa,GADb,EAEKU,GAFL,CAESS,kBAFT,EAGKC,IAHL,CAGU,GAHV,CADJ;;;WAMI,GAAEH,IAAK,IAAGE,kBAAkB,CAACN,UAAU,CAACI,IAAD,CAAX,CAAmB,EAAvD;GATJ,EAWKG,IAXL,CAWU,GAXV,CAFJ;;;ACNJ,MAAMC,gBAAgB,GAAG,YAAzB;;AACA,SAASC,cAAT,CAAwBC,YAAxB,EAAsC;SAC3BA,YAAY,CAACZ,OAAb,CAAqB,YAArB,EAAmC,EAAnC,EAAuCX,KAAvC,CAA6C,GAA7C,CAAP;;;AAEJ,AAAO,SAASwB,uBAAT,CAAiCzB,GAAjC,EAAsC;QACnC0B,OAAO,GAAG1B,GAAG,CAAC2B,KAAJ,CAAUL,gBAAV,CAAhB;;MACI,CAACI,OAAL,EAAc;WACH,EAAP;;;SAEGA,OAAO,CAACf,GAAR,CAAYY,cAAZ,EAA4BrC,MAA5B,CAAmC,CAAC0C,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAAClB,MAAF,CAASmB,CAAT,CAA7C,EAA0D,EAA1D,CAAP;;;ACTG,SAASC,IAAT,CAAc/C,MAAd,EAAsBgD,UAAtB,EAAkC;SAC9B/C,MAAM,CAACC,IAAP,CAAYF,MAAZ,EACFwB,MADE,CACKyB,MAAM,IAAI,CAACD,UAAU,CAACtB,QAAX,CAAoBuB,MAApB,CADhB,EAEF9C,MAFE,CAEK,CAAC+C,GAAD,EAAM7C,GAAN,KAAc;IACtB6C,GAAG,CAAC7C,GAAD,CAAH,GAAWL,MAAM,CAACK,GAAD,CAAjB;WACO6C,GAAP;GAJG,EAKJ,EALI,CAAP;;;ACDJ;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAASC,cAAT,CAAwBC,GAAxB,EAA6B;SAClBA,GAAG,CACLlC,KADE,CACI,oBADJ,EAEFU,GAFE,CAEE,UAAUyB,IAAV,EAAgB;QACjB,CAAC,eAAepB,IAAf,CAAoBoB,IAApB,CAAL,EAAgC;MAC5BA,IAAI,GAAGC,SAAS,CAACD,IAAD,CAAT,CACFxB,OADE,CACM,MADN,EACc,GADd,EAEFA,OAFE,CAEM,MAFN,EAEc,GAFd,CAAP;;;WAIGwB,IAAP;GARG,EAUFf,IAVE,CAUG,EAVH,CAAP;;;AAYJ,SAASiB,gBAAT,CAA0BH,GAA1B,EAA+B;SACpBf,kBAAkB,CAACe,GAAD,CAAlB,CAAwBvB,OAAxB,CAAgC,UAAhC,EAA4C,UAAU2B,CAAV,EAAa;WACpD,MACJA,CAAC,CACIC,UADL,CACgB,CADhB,EAEKC,QAFL,CAEc,EAFd,EAGKC,WAHL,EADJ;GADG,CAAP;;;AAQJ,SAASC,WAAT,CAAqBC,QAArB,EAA+BC,KAA/B,EAAsCzD,GAAtC,EAA2C;EACvCyD,KAAK,GACDD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,GACMV,cAAc,CAACW,KAAD,CADpB,GAEMP,gBAAgB,CAACO,KAAD,CAH1B;;MAIIzD,GAAJ,EAAS;WACEkD,gBAAgB,CAAClD,GAAD,CAAhB,GAAwB,GAAxB,GAA8ByD,KAArC;GADJ,MAGK;WACMA,KAAP;;;;AAGR,SAASC,SAAT,CAAmBD,KAAnB,EAA0B;SACfA,KAAK,KAAKE,SAAV,IAAuBF,KAAK,KAAK,IAAxC;;;AAEJ,SAASG,aAAT,CAAuBJ,QAAvB,EAAiC;SACtBA,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,IAAwCA,QAAQ,KAAK,GAA5D;;;AAEJ,SAASK,SAAT,CAAmBC,OAAnB,EAA4BN,QAA5B,EAAsCxD,GAAtC,EAA2C+D,QAA3C,EAAqD;MAC7CN,KAAK,GAAGK,OAAO,CAAC9D,GAAD,CAAnB;MAA0BK,MAAM,GAAG,EAAnC;;MACIqD,SAAS,CAACD,KAAD,CAAT,IAAoBA,KAAK,KAAK,EAAlC,EAAsC;QAC9B,OAAOA,KAAP,KAAiB,QAAjB,IACA,OAAOA,KAAP,KAAiB,QADjB,IAEA,OAAOA,KAAP,KAAiB,SAFrB,EAEgC;MAC5BA,KAAK,GAAGA,KAAK,CAACJ,QAAN,EAAR;;UACIU,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;QAC9BN,KAAK,GAAGA,KAAK,CAACO,SAAN,CAAgB,CAAhB,EAAmBC,QAAQ,CAACF,QAAD,EAAW,EAAX,CAA3B,CAAR;;;MAEJ1D,MAAM,CAAC6D,IAAP,CAAYX,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBG,aAAa,CAACJ,QAAD,CAAb,GAA0BxD,GAA1B,GAAgC,EAAlD,CAAvB;KAPJ,MASK;UACG+D,QAAQ,KAAK,GAAjB,EAAsB;YACdI,KAAK,CAACC,OAAN,CAAcX,KAAd,CAAJ,EAA0B;UACtBA,KAAK,CAACtC,MAAN,CAAauC,SAAb,EAAwBnD,OAAxB,CAAgC,UAAUkD,KAAV,EAAiB;YAC7CpD,MAAM,CAAC6D,IAAP,CAAYX,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBG,aAAa,CAACJ,QAAD,CAAb,GAA0BxD,GAA1B,GAAgC,EAAlD,CAAvB;WADJ;SADJ,MAKK;UACDJ,MAAM,CAACC,IAAP,CAAY4D,KAAZ,EAAmBlD,OAAnB,CAA2B,UAAU8D,CAAV,EAAa;gBAChCX,SAAS,CAACD,KAAK,CAACY,CAAD,CAAN,CAAb,EAAyB;cACrBhE,MAAM,CAAC6D,IAAP,CAAYX,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACY,CAAD,CAAhB,EAAqBA,CAArB,CAAvB;;WAFR;;OAPR,MAcK;cACKC,GAAG,GAAG,EAAZ;;YACIH,KAAK,CAACC,OAAN,CAAcX,KAAd,CAAJ,EAA0B;UACtBA,KAAK,CAACtC,MAAN,CAAauC,SAAb,EAAwBnD,OAAxB,CAAgC,UAAUkD,KAAV,EAAiB;YAC7Ca,GAAG,CAACJ,IAAJ,CAASX,WAAW,CAACC,QAAD,EAAWC,KAAX,CAApB;WADJ;SADJ,MAKK;UACD7D,MAAM,CAACC,IAAP,CAAY4D,KAAZ,EAAmBlD,OAAnB,CAA2B,UAAU8D,CAAV,EAAa;gBAChCX,SAAS,CAACD,KAAK,CAACY,CAAD,CAAN,CAAb,EAAyB;cACrBC,GAAG,CAACJ,IAAJ,CAAShB,gBAAgB,CAACmB,CAAD,CAAzB;cACAC,GAAG,CAACJ,IAAJ,CAASX,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACY,CAAD,CAAL,CAAShB,QAAT,EAAX,CAApB;;WAHR;;;YAOAO,aAAa,CAACJ,QAAD,CAAjB,EAA6B;UACzBnD,MAAM,CAAC6D,IAAP,CAAYhB,gBAAgB,CAAClD,GAAD,CAAhB,GAAwB,GAAxB,GAA8BsE,GAAG,CAACrC,IAAJ,CAAS,GAAT,CAA1C;SADJ,MAGK,IAAIqC,GAAG,CAACpD,MAAJ,KAAe,CAAnB,EAAsB;UACvBb,MAAM,CAAC6D,IAAP,CAAYI,GAAG,CAACrC,IAAJ,CAAS,GAAT,CAAZ;;;;GA5ChB,MAiDK;QACGuB,QAAQ,KAAK,GAAjB,EAAsB;UACdE,SAAS,CAACD,KAAD,CAAb,EAAsB;QAClBpD,MAAM,CAAC6D,IAAP,CAAYhB,gBAAgB,CAAClD,GAAD,CAA5B;;KAFR,MAKK,IAAIyD,KAAK,KAAK,EAAV,KAAiBD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAlD,CAAJ,EAA4D;MAC7DnD,MAAM,CAAC6D,IAAP,CAAYhB,gBAAgB,CAAClD,GAAD,CAAhB,GAAwB,GAApC;KADC,MAGA,IAAIyD,KAAK,KAAK,EAAd,EAAkB;MACnBpD,MAAM,CAAC6D,IAAP,CAAY,EAAZ;;;;SAGD7D,MAAP;;;AAEJ,AAAO,SAASkE,QAAT,CAAkBC,QAAlB,EAA4B;SACxB;IACHC,MAAM,EAAEA,MAAM,CAACC,IAAP,CAAY,IAAZ,EAAkBF,QAAlB;GADZ;;;AAIJ,SAASC,MAAT,CAAgBD,QAAhB,EAA0BV,OAA1B,EAAmC;MAC3Ba,SAAS,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,GAA/B,CAAhB;SACOH,QAAQ,CAAChD,OAAT,CAAiB,4BAAjB,EAA+C,UAAUoD,CAAV,EAAaC,UAAb,EAAyBC,OAAzB,EAAkC;QAChFD,UAAJ,EAAgB;UACRrB,QAAQ,GAAG,EAAf;YACMuB,MAAM,GAAG,EAAf;;UACIJ,SAAS,CAACK,OAAV,CAAkBH,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAlB,MAA4C,CAAC,CAAjD,EAAoD;QAChDzB,QAAQ,GAAGqB,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAX;QACAJ,UAAU,GAAGA,UAAU,CAACK,MAAX,CAAkB,CAAlB,CAAb;;;MAEJL,UAAU,CAAChE,KAAX,CAAiB,IAAjB,EAAuBN,OAAvB,CAA+B,UAAU4E,QAAV,EAAoB;YAC3Cb,GAAG,GAAG,4BAA4Bc,IAA5B,CAAiCD,QAAjC,CAAV;QACAJ,MAAM,CAACb,IAAP,CAAYL,SAAS,CAACC,OAAD,EAAUN,QAAV,EAAoBc,GAAG,CAAC,CAAD,CAAvB,EAA4BA,GAAG,CAAC,CAAD,CAAH,IAAUA,GAAG,CAAC,CAAD,CAAzC,CAArB;OAFJ;;UAIId,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;YAC1B7B,SAAS,GAAG,GAAhB;;YACI6B,QAAQ,KAAK,GAAjB,EAAsB;UAClB7B,SAAS,GAAG,GAAZ;SADJ,MAGK,IAAI6B,QAAQ,KAAK,GAAjB,EAAsB;UACvB7B,SAAS,GAAG6B,QAAZ;;;eAEG,CAACuB,MAAM,CAAC7D,MAAP,KAAkB,CAAlB,GAAsBsC,QAAtB,GAAiC,EAAlC,IAAwCuB,MAAM,CAAC9C,IAAP,CAAYN,SAAZ,CAA/C;OARJ,MAUK;eACMoD,MAAM,CAAC9C,IAAP,CAAY,GAAZ,CAAP;;KAtBR,MAyBK;aACMa,cAAc,CAACgC,OAAD,CAArB;;GA3BD,CAAP;;;ACvIG,SAASO,KAAT,CAAejF,OAAf,EAAwB;;MAEvBO,MAAM,GAAGP,OAAO,CAACO,MAAR,CAAe2C,WAAf,EAAb,CAF2B;;MAIvB1C,GAAG,GAAGR,OAAO,CAACQ,GAAR,CAAYY,OAAZ,CAAoB,cAApB,EAAoC,OAApC,CAAV;MACIV,OAAO,GAAGlB,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBF,OAAO,CAACU,OAA1B,CAAd;MACIwE,IAAJ;MACI5D,UAAU,GAAGgB,IAAI,CAACtC,OAAD,EAAU,CAC3B,QAD2B,EAE3B,SAF2B,EAG3B,KAH2B,EAI3B,SAJ2B,EAK3B,SAL2B,EAM3B,WAN2B,CAAV,CAArB,CAP2B;;QAgBrBmF,gBAAgB,GAAGlD,uBAAuB,CAACzB,GAAD,CAAhD;EACAA,GAAG,GAAG2D,QAAQ,CAAC3D,GAAD,CAAR,CAAc6D,MAAd,CAAqB/C,UAArB,CAAN;;MACI,CAAC,QAAQE,IAAR,CAAahB,GAAb,CAAL,EAAwB;IACpBA,GAAG,GAAGR,OAAO,CAACoF,OAAR,GAAkB5E,GAAxB;;;QAEE6E,iBAAiB,GAAG7F,MAAM,CAACC,IAAP,CAAYO,OAAZ,EACrBe,MADqB,CACdyB,MAAM,IAAI2C,gBAAgB,CAAClE,QAAjB,CAA0BuB,MAA1B,CADI,EAErBtB,MAFqB,CAEd,SAFc,CAA1B;QAGMoE,mBAAmB,GAAGhD,IAAI,CAAChB,UAAD,EAAa+D,iBAAb,CAAhC;QACME,eAAe,GAAG,6BAA6B/D,IAA7B,CAAkCd,OAAO,CAAC8E,MAA1C,CAAxB;;MACI,CAACD,eAAL,EAAsB;QACdvF,OAAO,CAACY,SAAR,CAAkB6E,MAAtB,EAA8B;;MAE1B/E,OAAO,CAAC8E,MAAR,GAAiB9E,OAAO,CAAC8E,MAAR,CACZ/E,KADY,CACN,GADM,EAEZU,GAFY,CAERH,OAAO,IAAIA,OAAO,CAACI,OAAR,CAAgB,kDAAhB,EAAqE,uBAAsBpB,OAAO,CAACY,SAAR,CAAkB6E,MAAO,EAApH,CAFH,EAGZ5D,IAHY,CAGP,GAHO,CAAjB;;;QAKA7B,OAAO,CAACY,SAAR,CAAkBC,QAAlB,CAA2BC,MAA/B,EAAuC;YAC7B4E,wBAAwB,GAAGhF,OAAO,CAAC8E,MAAR,CAAerD,KAAf,CAAqB,qBAArB,KAA+C,EAAhF;MACAzB,OAAO,CAAC8E,MAAR,GAAiBE,wBAAwB,CACpCxE,MADY,CACLlB,OAAO,CAACY,SAAR,CAAkBC,QADb,EAEZM,GAFY,CAERH,OAAO,IAAI;cACVyE,MAAM,GAAGzF,OAAO,CAACY,SAAR,CAAkB6E,MAAlB,GACR,IAAGzF,OAAO,CAACY,SAAR,CAAkB6E,MAAO,EADpB,GAET,OAFN;eAGQ,0BAAyBzE,OAAQ,WAAUyE,MAAO,EAA1D;OANa,EAQZ5D,IARY,CAQP,GARO,CAAjB;;GApCmB;;;;MAiDvB,CAAC,KAAD,EAAQ,MAAR,EAAgBZ,QAAhB,CAAyBV,MAAzB,CAAJ,EAAsC;IAClCC,GAAG,GAAGa,kBAAkB,CAACb,GAAD,EAAM8E,mBAAN,CAAxB;GADJ,MAGK;QACG,UAAUA,mBAAd,EAAmC;MAC/BJ,IAAI,GAAGI,mBAAmB,CAACK,IAA3B;KADJ,MAGK;UACGnG,MAAM,CAACC,IAAP,CAAY6F,mBAAZ,EAAiCxE,MAArC,EAA6C;QACzCoE,IAAI,GAAGI,mBAAP;OADJ,MAGK;QACD5E,OAAO,CAAC,gBAAD,CAAP,GAA4B,CAA5B;;;GA7De;;;MAkEvB,CAACA,OAAO,CAAC,cAAD,CAAR,IAA4B,OAAOwE,IAAP,KAAgB,WAAhD,EAA6D;IACzDxE,OAAO,CAAC,cAAD,CAAP,GAA0B,iCAA1B;GAnEuB;;;;MAuEvB,CAAC,OAAD,EAAU,KAAV,EAAiBO,QAAjB,CAA0BV,MAA1B,KAAqC,OAAO2E,IAAP,KAAgB,WAAzD,EAAsE;IAClEA,IAAI,GAAG,EAAP;GAxEuB;;;SA2EpB1F,MAAM,CAACU,MAAP,CAAc;IAAEK,MAAF;IAAUC,GAAV;IAAeE;GAA7B,EAAwC,OAAOwE,IAAP,KAAgB,WAAhB,GAA8B;IAAEA;GAAhC,GAAyC,IAAjF,EAAuFlF,OAAO,CAAC4F,OAAR,GAAkB;IAAEA,OAAO,EAAE5F,OAAO,CAAC4F;GAArC,GAAiD,IAAxI,CAAP;;;AC7EG,SAASC,oBAAT,CAA8B9F,QAA9B,EAAwCO,KAAxC,EAA+CN,OAA/C,EAAwD;SACpDiF,KAAK,CAAC5E,KAAK,CAACN,QAAD,EAAWO,KAAX,EAAkBN,OAAlB,CAAN,CAAZ;;;ACAG,SAAS8F,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;QAC7CC,QAAQ,GAAG5F,KAAK,CAAC0F,WAAD,EAAcC,WAAd,CAAtB;QACME,QAAQ,GAAGL,oBAAoB,CAACvB,IAArB,CAA0B,IAA1B,EAAgC2B,QAAhC,CAAjB;SACOzG,MAAM,CAACU,MAAP,CAAcgG,QAAd,EAAwB;IAC3BD,QAD2B;IAE3BlG,QAAQ,EAAE+F,YAAY,CAACxB,IAAb,CAAkB,IAAlB,EAAwB2B,QAAxB,CAFiB;IAG3B5F,KAAK,EAAEA,KAAK,CAACiE,IAAN,CAAW,IAAX,EAAiB2B,QAAjB,CAHoB;IAI3BhB;GAJG,CAAP;;;ACNG,MAAMkB,OAAO,GAAG,mBAAhB;;ACEP,MAAMC,SAAS,GAAI,uBAAsBD,OAAQ,IAAGE,+BAAY,EAAG,EAAnE;AACA,AAAO,MAAMJ,QAAQ,GAAG;EACpB1F,MAAM,EAAE,KADY;EAEpB6E,OAAO,EAAE,wBAFW;EAGpB1E,OAAO,EAAE;IACL8E,MAAM,EAAE,gCADH;kBAESY;GALE;EAOpBxF,SAAS,EAAE;IACP6E,MAAM,EAAE,EADD;IAEP5E,QAAQ,EAAE;;CATX;;MCDMqF,QAAQ,GAAGJ,YAAY,CAAC,IAAD,EAAOG,QAAP,CAA7B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/dist-src/defaults.js b/node_modules/@octokit/endpoint/dist-src/defaults.js deleted file mode 100644 index 0266b4954..000000000 --- a/node_modules/@octokit/endpoint/dist-src/defaults.js +++ /dev/null @@ -1,15 +0,0 @@ -import { getUserAgent } from "universal-user-agent"; -import { VERSION } from "./version"; -const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; -export const DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "", - previews: [] - } -}; diff --git a/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js b/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js deleted file mode 100644 index 5763758fa..000000000 --- a/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js +++ /dev/null @@ -1,5 +0,0 @@ -import { merge } from "./merge"; -import { parse } from "./parse"; -export function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); -} diff --git a/node_modules/@octokit/endpoint/dist-src/generated/routes.js b/node_modules/@octokit/endpoint/dist-src/generated/routes.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/node_modules/@octokit/endpoint/dist-src/index.js b/node_modules/@octokit/endpoint/dist-src/index.js deleted file mode 100644 index 599917f98..000000000 --- a/node_modules/@octokit/endpoint/dist-src/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import { withDefaults } from "./with-defaults"; -import { DEFAULTS } from "./defaults"; -export const endpoint = withDefaults(null, DEFAULTS); diff --git a/node_modules/@octokit/endpoint/dist-src/merge.js b/node_modules/@octokit/endpoint/dist-src/merge.js deleted file mode 100644 index 91ed1ae42..000000000 --- a/node_modules/@octokit/endpoint/dist-src/merge.js +++ /dev/null @@ -1,22 +0,0 @@ -import { lowercaseKeys } from "./util/lowercase-keys"; -import { mergeDeep } from "./util/merge-deep"; -export function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); - } - else { - options = route || {}; - } - // lowercase header names before merging with defaults to avoid duplicates - options.headers = lowercaseKeys(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); - // mediaType.previews arrays are merged, instead of overwritten - if (defaults && defaults.mediaType.previews.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews - .filter(preview => !mergedOptions.mediaType.previews.includes(preview)) - .concat(mergedOptions.mediaType.previews); - } - mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); - return mergedOptions; -} diff --git a/node_modules/@octokit/endpoint/dist-src/parse.js b/node_modules/@octokit/endpoint/dist-src/parse.js deleted file mode 100644 index 8cf649ff2..000000000 --- a/node_modules/@octokit/endpoint/dist-src/parse.js +++ /dev/null @@ -1,81 +0,0 @@ -import { addQueryParameters } from "./util/add-query-parameters"; -import { extractUrlVariableNames } from "./util/extract-url-variable-names"; -import { omit } from "./util/omit"; -import { parseUrl } from "./util/url-template"; -export function parse(options) { - // https://fetch.spec.whatwg.org/#methods - let method = options.method.toUpperCase(); - // replace :varname with {varname} to make it RFC 6570 compatible - let url = options.url.replace(/:([a-z]\w+)/g, "{+$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType" - ]); - // extract variable names from URL to calculate remaining variables later - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - const omittedParameters = Object.keys(options) - .filter(option => urlVariableNames.includes(option)) - .concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequset = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequset) { - if (options.mediaType.format) { - // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw - headers.accept = headers.accept - .split(/,/) - .map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)) - .join(","); - } - if (options.mediaType.previews.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader - .concat(options.mediaType.previews) - .map(preview => { - const format = options.mediaType.format - ? `.${options.mediaType.format}` - : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }) - .join(","); - } - } - // for GET/HEAD requests, set URL query parameters from remaining parameters - // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } - else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } - else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } - else { - headers["content-length"] = 0; - } - } - } - // default content-type for JSON if body is set - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } - // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. - // fetch does not allow to set `content-length` header, but we can set body to an empty string - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } - // Only return body/request keys if present - return Object.assign({ method, url, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null); -} diff --git a/node_modules/@octokit/endpoint/dist-src/types.js b/node_modules/@octokit/endpoint/dist-src/types.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js b/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js deleted file mode 100644 index a78812f77..000000000 --- a/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js +++ /dev/null @@ -1,21 +0,0 @@ -export function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - if (names.length === 0) { - return url; - } - return (url + - separator + - names - .map(name => { - if (name === "q") { - return ("q=" + - parameters - .q.split("+") - .map(encodeURIComponent) - .join("+")); - } - return `${name}=${encodeURIComponent(parameters[name])}`; - }) - .join("&")); -} diff --git a/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js b/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js deleted file mode 100644 index 3e75db283..000000000 --- a/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js +++ /dev/null @@ -1,11 +0,0 @@ -const urlVariableRegex = /\{[^}]+\}/g; -function removeNonChars(variableName) { - return variableName.replace(/^\W+|\W+$/g, "").split(/,/); -} -export function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); - if (!matches) { - return []; - } - return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); -} diff --git a/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js b/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js deleted file mode 100644 index 078064255..000000000 --- a/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js +++ /dev/null @@ -1,9 +0,0 @@ -export function lowercaseKeys(object) { - if (!object) { - return {}; - } - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} diff --git a/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js b/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js deleted file mode 100644 index d1c5402d9..000000000 --- a/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js +++ /dev/null @@ -1,16 +0,0 @@ -import isPlainObject from "is-plain-object"; -export function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach(key => { - if (isPlainObject(options[key])) { - if (!(key in defaults)) - Object.assign(result, { [key]: options[key] }); - else - result[key] = mergeDeep(defaults[key], options[key]); - } - else { - Object.assign(result, { [key]: options[key] }); - } - }); - return result; -} diff --git a/node_modules/@octokit/endpoint/dist-src/util/omit.js b/node_modules/@octokit/endpoint/dist-src/util/omit.js deleted file mode 100644 index 7e1aa6b4b..000000000 --- a/node_modules/@octokit/endpoint/dist-src/util/omit.js +++ /dev/null @@ -1,8 +0,0 @@ -export function omit(object, keysToOmit) { - return Object.keys(object) - .filter(option => !keysToOmit.includes(option)) - .reduce((obj, key) => { - obj[key] = object[key]; - return obj; - }, {}); -} diff --git a/node_modules/@octokit/endpoint/dist-src/util/url-template.js b/node_modules/@octokit/endpoint/dist-src/util/url-template.js deleted file mode 100644 index f6d9885ee..000000000 --- a/node_modules/@octokit/endpoint/dist-src/util/url-template.js +++ /dev/null @@ -1,170 +0,0 @@ -// Based on https://github.com/bramstein/url-template, licensed under BSD -// TODO: create separate package. -// -// Copyright (c) 2012-2014, Bram Stein -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. The name of the author may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -/* istanbul ignore file */ -function encodeReserved(str) { - return str - .split(/(%[0-9A-Fa-f]{2})/g) - .map(function (part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part) - .replace(/%5B/g, "[") - .replace(/%5D/g, "]"); - } - return part; - }) - .join(""); -} -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { - return ("%" + - c - .charCodeAt(0) - .toString(16) - .toUpperCase()); - }); -} -function encodeValue(operator, value, key) { - value = - operator === "+" || operator === "#" - ? encodeReserved(value) - : encodeUnreserved(value); - if (key) { - return encodeUnreserved(key) + "=" + value; - } - else { - return value; - } -} -function isDefined(value) { - return value !== undefined && value !== null; -} -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} -function getValues(context, operator, key, modifier) { - var value = context[key], result = []; - if (isDefined(value) && value !== "") { - if (typeof value === "string" || - typeof value === "number" || - typeof value === "boolean") { - value = value.toString(); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); - } - else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); - }); - } - else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } - else { - const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - tmp.push(encodeValue(operator, value)); - }); - } - else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } - else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } - } - } - } - else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); - } - } - else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } - else if (value === "") { - result.push(""); - } - } - return result; -} -export function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - expression.split(/,/g).forEach(function (variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - if (operator && operator !== "+") { - var separator = ","; - if (operator === "?") { - separator = "&"; - } - else if (operator !== "#") { - separator = operator; - } - return (values.length !== 0 ? operator : "") + values.join(separator); - } - else { - return values.join(","); - } - } - else { - return encodeReserved(literal); - } - }); -} diff --git a/node_modules/@octokit/endpoint/dist-src/version.js b/node_modules/@octokit/endpoint/dist-src/version.js deleted file mode 100644 index 86383b116..000000000 --- a/node_modules/@octokit/endpoint/dist-src/version.js +++ /dev/null @@ -1 +0,0 @@ -export const VERSION = "0.0.0-development"; diff --git a/node_modules/@octokit/endpoint/dist-src/with-defaults.js b/node_modules/@octokit/endpoint/dist-src/with-defaults.js deleted file mode 100644 index 9a1c886ab..000000000 --- a/node_modules/@octokit/endpoint/dist-src/with-defaults.js +++ /dev/null @@ -1,13 +0,0 @@ -import { endpointWithDefaults } from "./endpoint-with-defaults"; -import { merge } from "./merge"; -import { parse } from "./parse"; -export function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS = merge(oldDefaults, newDefaults); - const endpoint = endpointWithDefaults.bind(null, DEFAULTS); - return Object.assign(endpoint, { - DEFAULTS, - defaults: withDefaults.bind(null, DEFAULTS), - merge: merge.bind(null, DEFAULTS), - parse - }); -} diff --git a/node_modules/@octokit/endpoint/dist-types/defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/defaults.d.ts deleted file mode 100644 index 7984bd2e7..000000000 --- a/node_modules/@octokit/endpoint/dist-types/defaults.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Defaults } from "./types"; -export declare const DEFAULTS: Defaults; diff --git a/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts deleted file mode 100644 index 406b4cc93..000000000 --- a/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Defaults, Endpoint, RequestOptions, Route, Parameters } from "./types"; -export declare function endpointWithDefaults(defaults: Defaults, route: Route | Endpoint, options?: Parameters): RequestOptions; diff --git a/node_modules/@octokit/endpoint/dist-types/generated/routes.d.ts b/node_modules/@octokit/endpoint/dist-types/generated/routes.d.ts deleted file mode 100644 index dbbd82dde..000000000 --- a/node_modules/@octokit/endpoint/dist-types/generated/routes.d.ts +++ /dev/null @@ -1,6745 +0,0 @@ -import { Url, Headers, EndpointRequestOptions } from "../types"; -export interface Routes { - "GET /events": [ActivityListPublicEventsEndpoint, ActivityListPublicEventsRequestOptions]; - "GET /repos/:owner/:repo/events": [ActivityListRepoEventsEndpoint, ActivityListRepoEventsRequestOptions]; - "GET /networks/:owner/:repo/events": [ActivityListPublicEventsForRepoNetworkEndpoint, ActivityListPublicEventsForRepoNetworkRequestOptions]; - "GET /orgs/:org/events": [ActivityListPublicEventsForOrgEndpoint, ActivityListPublicEventsForOrgRequestOptions]; - "GET /users/:username/received_events": [ActivityListReceivedEventsForUserEndpoint, ActivityListReceivedEventsForUserRequestOptions]; - "GET /users/:username/received_events/public": [ActivityListReceivedPublicEventsForUserEndpoint, ActivityListReceivedPublicEventsForUserRequestOptions]; - "GET /users/:username/events": [ActivityListEventsForUserEndpoint, ActivityListEventsForUserRequestOptions]; - "GET /users/:username/events/public": [ActivityListPublicEventsForUserEndpoint, ActivityListPublicEventsForUserRequestOptions]; - "GET /users/:username/events/orgs/:org": [ActivityListEventsForOrgEndpoint, ActivityListEventsForOrgRequestOptions]; - "GET /feeds": [ActivityListFeedsEndpoint, ActivityListFeedsRequestOptions]; - "GET /notifications": [ActivityListNotificationsEndpoint, ActivityListNotificationsRequestOptions]; - "GET /repos/:owner/:repo/notifications": [ActivityListNotificationsForRepoEndpoint, ActivityListNotificationsForRepoRequestOptions]; - "PUT /notifications": [ActivityMarkAsReadEndpoint, ActivityMarkAsReadRequestOptions]; - "PUT /repos/:owner/:repo/notifications": [ActivityMarkNotificationsAsReadForRepoEndpoint, ActivityMarkNotificationsAsReadForRepoRequestOptions]; - "GET /notifications/threads/:thread_id": [ActivityGetThreadEndpoint, ActivityGetThreadRequestOptions]; - "PATCH /notifications/threads/:thread_id": [ActivityMarkThreadAsReadEndpoint, ActivityMarkThreadAsReadRequestOptions]; - "GET /notifications/threads/:thread_id/subscription": [ActivityGetThreadSubscriptionEndpoint, ActivityGetThreadSubscriptionRequestOptions]; - "PUT /notifications/threads/:thread_id/subscription": [ActivitySetThreadSubscriptionEndpoint, ActivitySetThreadSubscriptionRequestOptions]; - "DELETE /notifications/threads/:thread_id/subscription": [ActivityDeleteThreadSubscriptionEndpoint, ActivityDeleteThreadSubscriptionRequestOptions]; - "GET /repos/:owner/:repo/stargazers": [ActivityListStargazersForRepoEndpoint, ActivityListStargazersForRepoRequestOptions]; - "GET /users/:username/starred": [ActivityListReposStarredByUserEndpoint, ActivityListReposStarredByUserRequestOptions]; - "GET /user/starred": [ActivityListReposStarredByAuthenticatedUserEndpoint, ActivityListReposStarredByAuthenticatedUserRequestOptions]; - "GET /user/starred/:owner/:repo": [ActivityCheckStarringRepoEndpoint, ActivityCheckStarringRepoRequestOptions]; - "PUT /user/starred/:owner/:repo": [ActivityStarRepoEndpoint, ActivityStarRepoRequestOptions]; - "DELETE /user/starred/:owner/:repo": [ActivityUnstarRepoEndpoint, ActivityUnstarRepoRequestOptions]; - "GET /repos/:owner/:repo/subscribers": [ActivityListWatchersForRepoEndpoint, ActivityListWatchersForRepoRequestOptions]; - "GET /users/:username/subscriptions": [ActivityListReposWatchedByUserEndpoint, ActivityListReposWatchedByUserRequestOptions]; - "GET /user/subscriptions": [ActivityListWatchedReposForAuthenticatedUserEndpoint, ActivityListWatchedReposForAuthenticatedUserRequestOptions]; - "GET /repos/:owner/:repo/subscription": [ActivityGetRepoSubscriptionEndpoint, ActivityGetRepoSubscriptionRequestOptions]; - "PUT /repos/:owner/:repo/subscription": [ActivitySetRepoSubscriptionEndpoint, ActivitySetRepoSubscriptionRequestOptions]; - "DELETE /repos/:owner/:repo/subscription": [ActivityDeleteRepoSubscriptionEndpoint, ActivityDeleteRepoSubscriptionRequestOptions]; - "GET /user/subscriptions/:owner/:repo": [ActivityCheckWatchingRepoLegacyEndpoint, ActivityCheckWatchingRepoLegacyRequestOptions]; - "PUT /user/subscriptions/:owner/:repo": [ActivityWatchRepoLegacyEndpoint, ActivityWatchRepoLegacyRequestOptions]; - "DELETE /user/subscriptions/:owner/:repo": [ActivityStopWatchingRepoLegacyEndpoint, ActivityStopWatchingRepoLegacyRequestOptions]; - "GET /apps/:app_slug": [AppsGetBySlugEndpoint, AppsGetBySlugRequestOptions]; - "GET /app": [AppsGetAuthenticatedEndpoint, AppsGetAuthenticatedRequestOptions]; - "GET /app/installations": [AppsListInstallationsEndpoint, AppsListInstallationsRequestOptions]; - "GET /app/installations/:installation_id": [AppsGetInstallationEndpoint, AppsGetInstallationRequestOptions]; - "DELETE /app/installations/:installation_id": [AppsDeleteInstallationEndpoint, AppsDeleteInstallationRequestOptions]; - "POST /app/installations/:installation_id/access_tokens": [AppsCreateInstallationTokenEndpoint, AppsCreateInstallationTokenRequestOptions]; - "GET /orgs/:org/installation": [AppsGetOrgInstallationEndpoint | AppsFindOrgInstallationEndpoint, AppsGetOrgInstallationRequestOptions | AppsFindOrgInstallationRequestOptions]; - "GET /repos/:owner/:repo/installation": [AppsGetRepoInstallationEndpoint | AppsFindRepoInstallationEndpoint, AppsGetRepoInstallationRequestOptions | AppsFindRepoInstallationRequestOptions]; - "GET /users/:username/installation": [AppsGetUserInstallationEndpoint | AppsFindUserInstallationEndpoint, AppsGetUserInstallationRequestOptions | AppsFindUserInstallationRequestOptions]; - "POST /app-manifests/:code/conversions": [AppsCreateFromManifestEndpoint, AppsCreateFromManifestRequestOptions]; - "GET /installation/repositories": [AppsListReposEndpoint, AppsListReposRequestOptions]; - "GET /user/installations": [AppsListInstallationsForAuthenticatedUserEndpoint, AppsListInstallationsForAuthenticatedUserRequestOptions]; - "GET /user/installations/:installation_id/repositories": [AppsListInstallationReposForAuthenticatedUserEndpoint, AppsListInstallationReposForAuthenticatedUserRequestOptions]; - "PUT /user/installations/:installation_id/repositories/:repository_id": [AppsAddRepoToInstallationEndpoint, AppsAddRepoToInstallationRequestOptions]; - "DELETE /user/installations/:installation_id/repositories/:repository_id": [AppsRemoveRepoFromInstallationEndpoint, AppsRemoveRepoFromInstallationRequestOptions]; - "POST /content_references/:content_reference_id/attachments": [AppsCreateContentAttachmentEndpoint, AppsCreateContentAttachmentRequestOptions]; - "GET /marketplace_listing/plans": [AppsListPlansEndpoint, AppsListPlansRequestOptions]; - "GET /marketplace_listing/stubbed/plans": [AppsListPlansStubbedEndpoint, AppsListPlansStubbedRequestOptions]; - "GET /marketplace_listing/plans/:plan_id/accounts": [AppsListAccountsUserOrOrgOnPlanEndpoint, AppsListAccountsUserOrOrgOnPlanRequestOptions]; - "GET /marketplace_listing/stubbed/plans/:plan_id/accounts": [AppsListAccountsUserOrOrgOnPlanStubbedEndpoint, AppsListAccountsUserOrOrgOnPlanStubbedRequestOptions]; - "GET /marketplace_listing/accounts/:account_id": [AppsCheckAccountIsAssociatedWithAnyEndpoint, AppsCheckAccountIsAssociatedWithAnyRequestOptions]; - "GET /marketplace_listing/stubbed/accounts/:account_id": [AppsCheckAccountIsAssociatedWithAnyStubbedEndpoint, AppsCheckAccountIsAssociatedWithAnyStubbedRequestOptions]; - "GET /user/marketplace_purchases": [AppsListMarketplacePurchasesForAuthenticatedUserEndpoint, AppsListMarketplacePurchasesForAuthenticatedUserRequestOptions]; - "GET /user/marketplace_purchases/stubbed": [AppsListMarketplacePurchasesForAuthenticatedUserStubbedEndpoint, AppsListMarketplacePurchasesForAuthenticatedUserStubbedRequestOptions]; - "POST /repos/:owner/:repo/check-runs": [ChecksCreateEndpoint, ChecksCreateRequestOptions]; - "PATCH /repos/:owner/:repo/check-runs/:check_run_id": [ChecksUpdateEndpoint, ChecksUpdateRequestOptions]; - "GET /repos/:owner/:repo/commits/:ref/check-runs": [ChecksListForRefEndpoint, ChecksListForRefRequestOptions]; - "GET /repos/:owner/:repo/check-suites/:check_suite_id/check-runs": [ChecksListForSuiteEndpoint, ChecksListForSuiteRequestOptions]; - "GET /repos/:owner/:repo/check-runs/:check_run_id": [ChecksGetEndpoint, ChecksGetRequestOptions]; - "GET /repos/:owner/:repo/check-runs/:check_run_id/annotations": [ChecksListAnnotationsEndpoint, ChecksListAnnotationsRequestOptions]; - "GET /repos/:owner/:repo/check-suites/:check_suite_id": [ChecksGetSuiteEndpoint, ChecksGetSuiteRequestOptions]; - "GET /repos/:owner/:repo/commits/:ref/check-suites": [ChecksListSuitesForRefEndpoint, ChecksListSuitesForRefRequestOptions]; - "PATCH /repos/:owner/:repo/check-suites/preferences": [ChecksSetSuitesPreferencesEndpoint, ChecksSetSuitesPreferencesRequestOptions]; - "POST /repos/:owner/:repo/check-suites": [ChecksCreateSuiteEndpoint, ChecksCreateSuiteRequestOptions]; - "POST /repos/:owner/:repo/check-suites/:check_suite_id/rerequest": [ChecksRerequestSuiteEndpoint, ChecksRerequestSuiteRequestOptions]; - "GET /codes_of_conduct": [CodesOfConductListConductCodesEndpoint, CodesOfConductListConductCodesRequestOptions]; - "GET /codes_of_conduct/:key": [CodesOfConductGetConductCodeEndpoint, CodesOfConductGetConductCodeRequestOptions]; - "GET /repos/:owner/:repo/community/code_of_conduct": [CodesOfConductGetForRepoEndpoint, CodesOfConductGetForRepoRequestOptions]; - "GET /emojis": [EmojisGetEndpoint, EmojisGetRequestOptions]; - "GET /users/:username/gists": [GistsListPublicForUserEndpoint, GistsListPublicForUserRequestOptions]; - "GET /gists": [GistsListEndpoint, GistsListRequestOptions]; - "GET /gists/public": [GistsListPublicEndpoint, GistsListPublicRequestOptions]; - "GET /gists/starred": [GistsListStarredEndpoint, GistsListStarredRequestOptions]; - "GET /gists/:gist_id": [GistsGetEndpoint, GistsGetRequestOptions]; - "GET /gists/:gist_id/:sha": [GistsGetRevisionEndpoint, GistsGetRevisionRequestOptions]; - "POST /gists": [GistsCreateEndpoint, GistsCreateRequestOptions]; - "PATCH /gists/:gist_id": [GistsUpdateEndpoint, GistsUpdateRequestOptions]; - "GET /gists/:gist_id/commits": [GistsListCommitsEndpoint, GistsListCommitsRequestOptions]; - "PUT /gists/:gist_id/star": [GistsStarEndpoint, GistsStarRequestOptions]; - "DELETE /gists/:gist_id/star": [GistsUnstarEndpoint, GistsUnstarRequestOptions]; - "GET /gists/:gist_id/star": [GistsCheckIsStarredEndpoint, GistsCheckIsStarredRequestOptions]; - "POST /gists/:gist_id/forks": [GistsForkEndpoint, GistsForkRequestOptions]; - "GET /gists/:gist_id/forks": [GistsListForksEndpoint, GistsListForksRequestOptions]; - "DELETE /gists/:gist_id": [GistsDeleteEndpoint, GistsDeleteRequestOptions]; - "GET /gists/:gist_id/comments": [GistsListCommentsEndpoint, GistsListCommentsRequestOptions]; - "GET /gists/:gist_id/comments/:comment_id": [GistsGetCommentEndpoint, GistsGetCommentRequestOptions]; - "POST /gists/:gist_id/comments": [GistsCreateCommentEndpoint, GistsCreateCommentRequestOptions]; - "PATCH /gists/:gist_id/comments/:comment_id": [GistsUpdateCommentEndpoint, GistsUpdateCommentRequestOptions]; - "DELETE /gists/:gist_id/comments/:comment_id": [GistsDeleteCommentEndpoint, GistsDeleteCommentRequestOptions]; - "GET /repos/:owner/:repo/git/blobs/:file_sha": [GitGetBlobEndpoint, GitGetBlobRequestOptions]; - "POST /repos/:owner/:repo/git/blobs": [GitCreateBlobEndpoint, GitCreateBlobRequestOptions]; - "GET /repos/:owner/:repo/git/commits/:commit_sha": [GitGetCommitEndpoint, GitGetCommitRequestOptions]; - "POST /repos/:owner/:repo/git/commits": [GitCreateCommitEndpoint, GitCreateCommitRequestOptions]; - "GET /repos/:owner/:repo/git/refs/:ref": [GitGetRefEndpoint, GitGetRefRequestOptions]; - "GET /repos/:owner/:repo/git/refs/:namespace": [GitListRefsEndpoint, GitListRefsRequestOptions]; - "POST /repos/:owner/:repo/git/refs": [GitCreateRefEndpoint, GitCreateRefRequestOptions]; - "PATCH /repos/:owner/:repo/git/refs/:ref": [GitUpdateRefEndpoint, GitUpdateRefRequestOptions]; - "DELETE /repos/:owner/:repo/git/refs/:ref": [GitDeleteRefEndpoint, GitDeleteRefRequestOptions]; - "GET /repos/:owner/:repo/git/tags/:tag_sha": [GitGetTagEndpoint, GitGetTagRequestOptions]; - "POST /repos/:owner/:repo/git/tags": [GitCreateTagEndpoint, GitCreateTagRequestOptions]; - "GET /repos/:owner/:repo/git/trees/:tree_sha": [GitGetTreeEndpoint, GitGetTreeRequestOptions]; - "POST /repos/:owner/:repo/git/trees": [GitCreateTreeEndpoint, GitCreateTreeRequestOptions]; - "GET /gitignore/templates": [GitignoreListTemplatesEndpoint, GitignoreListTemplatesRequestOptions]; - "GET /gitignore/templates/:name": [GitignoreGetTemplateEndpoint, GitignoreGetTemplateRequestOptions]; - "GET /orgs/:org/interaction-limits": [InteractionsGetRestrictionsForOrgEndpoint, InteractionsGetRestrictionsForOrgRequestOptions]; - "PUT /orgs/:org/interaction-limits": [InteractionsAddOrUpdateRestrictionsForOrgEndpoint, InteractionsAddOrUpdateRestrictionsForOrgRequestOptions]; - "DELETE /orgs/:org/interaction-limits": [InteractionsRemoveRestrictionsForOrgEndpoint, InteractionsRemoveRestrictionsForOrgRequestOptions]; - "GET /repos/:owner/:repo/interaction-limits": [InteractionsGetRestrictionsForRepoEndpoint, InteractionsGetRestrictionsForRepoRequestOptions]; - "PUT /repos/:owner/:repo/interaction-limits": [InteractionsAddOrUpdateRestrictionsForRepoEndpoint, InteractionsAddOrUpdateRestrictionsForRepoRequestOptions]; - "DELETE /repos/:owner/:repo/interaction-limits": [InteractionsRemoveRestrictionsForRepoEndpoint, InteractionsRemoveRestrictionsForRepoRequestOptions]; - "GET /issues": [IssuesListEndpoint, IssuesListRequestOptions]; - "GET /user/issues": [IssuesListForAuthenticatedUserEndpoint, IssuesListForAuthenticatedUserRequestOptions]; - "GET /orgs/:org/issues": [IssuesListForOrgEndpoint, IssuesListForOrgRequestOptions]; - "GET /repos/:owner/:repo/issues": [IssuesListForRepoEndpoint, IssuesListForRepoRequestOptions]; - "GET /repos/:owner/:repo/issues/:issue_number": [IssuesGetEndpoint, IssuesGetRequestOptions]; - "POST /repos/:owner/:repo/issues": [IssuesCreateEndpoint, IssuesCreateRequestOptions]; - "PATCH /repos/:owner/:repo/issues/:issue_number": [IssuesUpdateEndpoint, IssuesUpdateRequestOptions]; - "PUT /repos/:owner/:repo/issues/:issue_number/lock": [IssuesLockEndpoint, IssuesLockRequestOptions]; - "DELETE /repos/:owner/:repo/issues/:issue_number/lock": [IssuesUnlockEndpoint, IssuesUnlockRequestOptions]; - "GET /repos/:owner/:repo/assignees": [IssuesListAssigneesEndpoint, IssuesListAssigneesRequestOptions]; - "GET /repos/:owner/:repo/assignees/:assignee": [IssuesCheckAssigneeEndpoint, IssuesCheckAssigneeRequestOptions]; - "POST /repos/:owner/:repo/issues/:issue_number/assignees": [IssuesAddAssigneesEndpoint, IssuesAddAssigneesRequestOptions]; - "DELETE /repos/:owner/:repo/issues/:issue_number/assignees": [IssuesRemoveAssigneesEndpoint, IssuesRemoveAssigneesRequestOptions]; - "GET /repos/:owner/:repo/issues/:issue_number/comments": [IssuesListCommentsEndpoint, IssuesListCommentsRequestOptions]; - "GET /repos/:owner/:repo/issues/comments": [IssuesListCommentsForRepoEndpoint, IssuesListCommentsForRepoRequestOptions]; - "GET /repos/:owner/:repo/issues/comments/:comment_id": [IssuesGetCommentEndpoint, IssuesGetCommentRequestOptions]; - "POST /repos/:owner/:repo/issues/:issue_number/comments": [IssuesCreateCommentEndpoint, IssuesCreateCommentRequestOptions]; - "PATCH /repos/:owner/:repo/issues/comments/:comment_id": [IssuesUpdateCommentEndpoint, IssuesUpdateCommentRequestOptions]; - "DELETE /repos/:owner/:repo/issues/comments/:comment_id": [IssuesDeleteCommentEndpoint, IssuesDeleteCommentRequestOptions]; - "GET /repos/:owner/:repo/issues/:issue_number/events": [IssuesListEventsEndpoint, IssuesListEventsRequestOptions]; - "GET /repos/:owner/:repo/issues/events": [IssuesListEventsForRepoEndpoint, IssuesListEventsForRepoRequestOptions]; - "GET /repos/:owner/:repo/issues/events/:event_id": [IssuesGetEventEndpoint, IssuesGetEventRequestOptions]; - "GET /repos/:owner/:repo/labels": [IssuesListLabelsForRepoEndpoint, IssuesListLabelsForRepoRequestOptions]; - "GET /repos/:owner/:repo/labels/:name": [IssuesGetLabelEndpoint, IssuesGetLabelRequestOptions]; - "POST /repos/:owner/:repo/labels": [IssuesCreateLabelEndpoint, IssuesCreateLabelRequestOptions]; - "PATCH /repos/:owner/:repo/labels/:current_name": [IssuesUpdateLabelEndpoint, IssuesUpdateLabelRequestOptions]; - "DELETE /repos/:owner/:repo/labels/:name": [IssuesDeleteLabelEndpoint, IssuesDeleteLabelRequestOptions]; - "GET /repos/:owner/:repo/issues/:issue_number/labels": [IssuesListLabelsOnIssueEndpoint, IssuesListLabelsOnIssueRequestOptions]; - "POST /repos/:owner/:repo/issues/:issue_number/labels": [IssuesAddLabelsEndpoint, IssuesAddLabelsRequestOptions]; - "DELETE /repos/:owner/:repo/issues/:issue_number/labels/:name": [IssuesRemoveLabelEndpoint, IssuesRemoveLabelRequestOptions]; - "PUT /repos/:owner/:repo/issues/:issue_number/labels": [IssuesReplaceLabelsEndpoint, IssuesReplaceLabelsRequestOptions]; - "DELETE /repos/:owner/:repo/issues/:issue_number/labels": [IssuesRemoveLabelsEndpoint, IssuesRemoveLabelsRequestOptions]; - "GET /repos/:owner/:repo/milestones/:milestone_number/labels": [IssuesListLabelsForMilestoneEndpoint, IssuesListLabelsForMilestoneRequestOptions]; - "GET /repos/:owner/:repo/milestones": [IssuesListMilestonesForRepoEndpoint, IssuesListMilestonesForRepoRequestOptions]; - "GET /repos/:owner/:repo/milestones/:milestone_number": [IssuesGetMilestoneEndpoint, IssuesGetMilestoneRequestOptions]; - "POST /repos/:owner/:repo/milestones": [IssuesCreateMilestoneEndpoint, IssuesCreateMilestoneRequestOptions]; - "PATCH /repos/:owner/:repo/milestones/:milestone_number": [IssuesUpdateMilestoneEndpoint, IssuesUpdateMilestoneRequestOptions]; - "DELETE /repos/:owner/:repo/milestones/:milestone_number": [IssuesDeleteMilestoneEndpoint, IssuesDeleteMilestoneRequestOptions]; - "GET /repos/:owner/:repo/issues/:issue_number/timeline": [IssuesListEventsForTimelineEndpoint, IssuesListEventsForTimelineRequestOptions]; - "GET /licenses": [LicensesListCommonlyUsedEndpoint | LicensesListEndpoint, LicensesListCommonlyUsedRequestOptions | LicensesListRequestOptions]; - "GET /licenses/:license": [LicensesGetEndpoint, LicensesGetRequestOptions]; - "GET /repos/:owner/:repo/license": [LicensesGetForRepoEndpoint, LicensesGetForRepoRequestOptions]; - "POST /markdown": [MarkdownRenderEndpoint, MarkdownRenderRequestOptions]; - "POST /markdown/raw": [MarkdownRenderRawEndpoint, MarkdownRenderRawRequestOptions]; - "GET /meta": [MetaGetEndpoint, MetaGetRequestOptions]; - "POST /orgs/:org/migrations": [MigrationsStartForOrgEndpoint, MigrationsStartForOrgRequestOptions]; - "GET /orgs/:org/migrations": [MigrationsListForOrgEndpoint, MigrationsListForOrgRequestOptions]; - "GET /orgs/:org/migrations/:migration_id": [MigrationsGetStatusForOrgEndpoint, MigrationsGetStatusForOrgRequestOptions]; - "GET /orgs/:org/migrations/:migration_id/archive": [MigrationsGetArchiveForOrgEndpoint, MigrationsGetArchiveForOrgRequestOptions]; - "DELETE /orgs/:org/migrations/:migration_id/archive": [MigrationsDeleteArchiveForOrgEndpoint, MigrationsDeleteArchiveForOrgRequestOptions]; - "DELETE /orgs/:org/migrations/:migration_id/repos/:repo_name/lock": [MigrationsUnlockRepoForOrgEndpoint, MigrationsUnlockRepoForOrgRequestOptions]; - "PUT /repos/:owner/:repo/import": [MigrationsStartImportEndpoint, MigrationsStartImportRequestOptions]; - "GET /repos/:owner/:repo/import": [MigrationsGetImportProgressEndpoint, MigrationsGetImportProgressRequestOptions]; - "PATCH /repos/:owner/:repo/import": [MigrationsUpdateImportEndpoint, MigrationsUpdateImportRequestOptions]; - "GET /repos/:owner/:repo/import/authors": [MigrationsGetCommitAuthorsEndpoint, MigrationsGetCommitAuthorsRequestOptions]; - "PATCH /repos/:owner/:repo/import/authors/:author_id": [MigrationsMapCommitAuthorEndpoint, MigrationsMapCommitAuthorRequestOptions]; - "PATCH /repos/:owner/:repo/import/lfs": [MigrationsSetLfsPreferenceEndpoint, MigrationsSetLfsPreferenceRequestOptions]; - "GET /repos/:owner/:repo/import/large_files": [MigrationsGetLargeFilesEndpoint, MigrationsGetLargeFilesRequestOptions]; - "DELETE /repos/:owner/:repo/import": [MigrationsCancelImportEndpoint, MigrationsCancelImportRequestOptions]; - "POST /user/migrations": [MigrationsStartForAuthenticatedUserEndpoint, MigrationsStartForAuthenticatedUserRequestOptions]; - "GET /user/migrations": [MigrationsListForAuthenticatedUserEndpoint, MigrationsListForAuthenticatedUserRequestOptions]; - "GET /user/migrations/:migration_id": [MigrationsGetStatusForAuthenticatedUserEndpoint, MigrationsGetStatusForAuthenticatedUserRequestOptions]; - "GET /user/migrations/:migration_id/archive": [MigrationsGetArchiveForAuthenticatedUserEndpoint, MigrationsGetArchiveForAuthenticatedUserRequestOptions]; - "DELETE /user/migrations/:migration_id/archive": [MigrationsDeleteArchiveForAuthenticatedUserEndpoint, MigrationsDeleteArchiveForAuthenticatedUserRequestOptions]; - "DELETE /user/migrations/:migration_id/repos/:repo_name/lock": [MigrationsUnlockRepoForAuthenticatedUserEndpoint, MigrationsUnlockRepoForAuthenticatedUserRequestOptions]; - "GET /applications/grants": [OauthAuthorizationsListGrantsEndpoint, OauthAuthorizationsListGrantsRequestOptions]; - "GET /applications/grants/:grant_id": [OauthAuthorizationsGetGrantEndpoint, OauthAuthorizationsGetGrantRequestOptions]; - "DELETE /applications/grants/:grant_id": [OauthAuthorizationsDeleteGrantEndpoint, OauthAuthorizationsDeleteGrantRequestOptions]; - "GET /authorizations": [OauthAuthorizationsListAuthorizationsEndpoint, OauthAuthorizationsListAuthorizationsRequestOptions]; - "GET /authorizations/:authorization_id": [OauthAuthorizationsGetAuthorizationEndpoint, OauthAuthorizationsGetAuthorizationRequestOptions]; - "POST /authorizations": [OauthAuthorizationsCreateAuthorizationEndpoint, OauthAuthorizationsCreateAuthorizationRequestOptions]; - "PUT /authorizations/clients/:client_id": [OauthAuthorizationsGetOrCreateAuthorizationForAppEndpoint, OauthAuthorizationsGetOrCreateAuthorizationForAppRequestOptions]; - "PUT /authorizations/clients/:client_id/:fingerprint": [OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintEndpoint | OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintEndpoint, OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRequestOptions | OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintRequestOptions]; - "PATCH /authorizations/:authorization_id": [OauthAuthorizationsUpdateAuthorizationEndpoint, OauthAuthorizationsUpdateAuthorizationRequestOptions]; - "DELETE /authorizations/:authorization_id": [OauthAuthorizationsDeleteAuthorizationEndpoint, OauthAuthorizationsDeleteAuthorizationRequestOptions]; - "GET /applications/:client_id/tokens/:access_token": [OauthAuthorizationsCheckAuthorizationEndpoint, OauthAuthorizationsCheckAuthorizationRequestOptions]; - "POST /applications/:client_id/tokens/:access_token": [OauthAuthorizationsResetAuthorizationEndpoint, OauthAuthorizationsResetAuthorizationRequestOptions]; - "DELETE /applications/:client_id/tokens/:access_token": [OauthAuthorizationsRevokeAuthorizationForApplicationEndpoint, OauthAuthorizationsRevokeAuthorizationForApplicationRequestOptions]; - "DELETE /applications/:client_id/grants/:access_token": [OauthAuthorizationsRevokeGrantForApplicationEndpoint, OauthAuthorizationsRevokeGrantForApplicationRequestOptions]; - "GET /user/orgs": [OrgsListForAuthenticatedUserEndpoint, OrgsListForAuthenticatedUserRequestOptions]; - "GET /organizations": [OrgsListEndpoint, OrgsListRequestOptions]; - "GET /users/:username/orgs": [OrgsListForUserEndpoint, OrgsListForUserRequestOptions]; - "GET /orgs/:org": [OrgsGetEndpoint, OrgsGetRequestOptions]; - "PATCH /orgs/:org": [OrgsUpdateEndpoint, OrgsUpdateRequestOptions]; - "GET /orgs/:org/credential-authorizations": [OrgsListCredentialAuthorizationsEndpoint, OrgsListCredentialAuthorizationsRequestOptions]; - "DELETE /orgs/:org/credential-authorizations/:credential_id": [OrgsRemoveCredentialAuthorizationEndpoint, OrgsRemoveCredentialAuthorizationRequestOptions]; - "GET /orgs/:org/blocks": [OrgsListBlockedUsersEndpoint, OrgsListBlockedUsersRequestOptions]; - "GET /orgs/:org/blocks/:username": [OrgsCheckBlockedUserEndpoint, OrgsCheckBlockedUserRequestOptions]; - "PUT /orgs/:org/blocks/:username": [OrgsBlockUserEndpoint, OrgsBlockUserRequestOptions]; - "DELETE /orgs/:org/blocks/:username": [OrgsUnblockUserEndpoint, OrgsUnblockUserRequestOptions]; - "GET /orgs/:org/hooks": [OrgsListHooksEndpoint, OrgsListHooksRequestOptions]; - "GET /orgs/:org/hooks/:hook_id": [OrgsGetHookEndpoint, OrgsGetHookRequestOptions]; - "POST /orgs/:org/hooks": [OrgsCreateHookEndpoint, OrgsCreateHookRequestOptions]; - "PATCH /orgs/:org/hooks/:hook_id": [OrgsUpdateHookEndpoint, OrgsUpdateHookRequestOptions]; - "POST /orgs/:org/hooks/:hook_id/pings": [OrgsPingHookEndpoint, OrgsPingHookRequestOptions]; - "DELETE /orgs/:org/hooks/:hook_id": [OrgsDeleteHookEndpoint, OrgsDeleteHookRequestOptions]; - "GET /orgs/:org/members": [OrgsListMembersEndpoint, OrgsListMembersRequestOptions]; - "GET /orgs/:org/members/:username": [OrgsCheckMembershipEndpoint, OrgsCheckMembershipRequestOptions]; - "DELETE /orgs/:org/members/:username": [OrgsRemoveMemberEndpoint, OrgsRemoveMemberRequestOptions]; - "GET /orgs/:org/public_members": [OrgsListPublicMembersEndpoint, OrgsListPublicMembersRequestOptions]; - "GET /orgs/:org/public_members/:username": [OrgsCheckPublicMembershipEndpoint, OrgsCheckPublicMembershipRequestOptions]; - "PUT /orgs/:org/public_members/:username": [OrgsPublicizeMembershipEndpoint, OrgsPublicizeMembershipRequestOptions]; - "DELETE /orgs/:org/public_members/:username": [OrgsConcealMembershipEndpoint, OrgsConcealMembershipRequestOptions]; - "GET /orgs/:org/memberships/:username": [OrgsGetMembershipEndpoint, OrgsGetMembershipRequestOptions]; - "PUT /orgs/:org/memberships/:username": [OrgsAddOrUpdateMembershipEndpoint, OrgsAddOrUpdateMembershipRequestOptions]; - "DELETE /orgs/:org/memberships/:username": [OrgsRemoveMembershipEndpoint, OrgsRemoveMembershipRequestOptions]; - "GET /orgs/:org/invitations/:invitation_id/teams": [OrgsListInvitationTeamsEndpoint, OrgsListInvitationTeamsRequestOptions]; - "GET /orgs/:org/invitations": [OrgsListPendingInvitationsEndpoint, OrgsListPendingInvitationsRequestOptions]; - "POST /orgs/:org/invitations": [OrgsCreateInvitationEndpoint, OrgsCreateInvitationRequestOptions]; - "GET /user/memberships/orgs": [OrgsListMembershipsEndpoint, OrgsListMembershipsRequestOptions]; - "GET /user/memberships/orgs/:org": [OrgsGetMembershipForAuthenticatedUserEndpoint, OrgsGetMembershipForAuthenticatedUserRequestOptions]; - "PATCH /user/memberships/orgs/:org": [OrgsUpdateMembershipEndpoint, OrgsUpdateMembershipRequestOptions]; - "GET /orgs/:org/outside_collaborators": [OrgsListOutsideCollaboratorsEndpoint, OrgsListOutsideCollaboratorsRequestOptions]; - "DELETE /orgs/:org/outside_collaborators/:username": [OrgsRemoveOutsideCollaboratorEndpoint, OrgsRemoveOutsideCollaboratorRequestOptions]; - "PUT /orgs/:org/outside_collaborators/:username": [OrgsConvertMemberToOutsideCollaboratorEndpoint, OrgsConvertMemberToOutsideCollaboratorRequestOptions]; - "GET /repos/:owner/:repo/projects": [ProjectsListForRepoEndpoint, ProjectsListForRepoRequestOptions]; - "GET /orgs/:org/projects": [ProjectsListForOrgEndpoint, ProjectsListForOrgRequestOptions]; - "GET /users/:username/projects": [ProjectsListForUserEndpoint, ProjectsListForUserRequestOptions]; - "GET /projects/:project_id": [ProjectsGetEndpoint, ProjectsGetRequestOptions]; - "POST /repos/:owner/:repo/projects": [ProjectsCreateForRepoEndpoint, ProjectsCreateForRepoRequestOptions]; - "POST /orgs/:org/projects": [ProjectsCreateForOrgEndpoint, ProjectsCreateForOrgRequestOptions]; - "POST /user/projects": [ProjectsCreateForAuthenticatedUserEndpoint, ProjectsCreateForAuthenticatedUserRequestOptions]; - "PATCH /projects/:project_id": [ProjectsUpdateEndpoint, ProjectsUpdateRequestOptions]; - "DELETE /projects/:project_id": [ProjectsDeleteEndpoint, ProjectsDeleteRequestOptions]; - "GET /projects/columns/:column_id/cards": [ProjectsListCardsEndpoint, ProjectsListCardsRequestOptions]; - "GET /projects/columns/cards/:card_id": [ProjectsGetCardEndpoint, ProjectsGetCardRequestOptions]; - "POST /projects/columns/:column_id/cards": [ProjectsCreateCardEndpoint, ProjectsCreateCardRequestOptions]; - "PATCH /projects/columns/cards/:card_id": [ProjectsUpdateCardEndpoint, ProjectsUpdateCardRequestOptions]; - "DELETE /projects/columns/cards/:card_id": [ProjectsDeleteCardEndpoint, ProjectsDeleteCardRequestOptions]; - "POST /projects/columns/cards/:card_id/moves": [ProjectsMoveCardEndpoint, ProjectsMoveCardRequestOptions]; - "GET /projects/:project_id/collaborators": [ProjectsListCollaboratorsEndpoint, ProjectsListCollaboratorsRequestOptions]; - "GET /projects/:project_id/collaborators/:username/permission": [ProjectsReviewUserPermissionLevelEndpoint, ProjectsReviewUserPermissionLevelRequestOptions]; - "PUT /projects/:project_id/collaborators/:username": [ProjectsAddCollaboratorEndpoint, ProjectsAddCollaboratorRequestOptions]; - "DELETE /projects/:project_id/collaborators/:username": [ProjectsRemoveCollaboratorEndpoint, ProjectsRemoveCollaboratorRequestOptions]; - "GET /projects/:project_id/columns": [ProjectsListColumnsEndpoint, ProjectsListColumnsRequestOptions]; - "GET /projects/columns/:column_id": [ProjectsGetColumnEndpoint, ProjectsGetColumnRequestOptions]; - "POST /projects/:project_id/columns": [ProjectsCreateColumnEndpoint, ProjectsCreateColumnRequestOptions]; - "PATCH /projects/columns/:column_id": [ProjectsUpdateColumnEndpoint, ProjectsUpdateColumnRequestOptions]; - "DELETE /projects/columns/:column_id": [ProjectsDeleteColumnEndpoint, ProjectsDeleteColumnRequestOptions]; - "POST /projects/columns/:column_id/moves": [ProjectsMoveColumnEndpoint, ProjectsMoveColumnRequestOptions]; - "GET /repos/:owner/:repo/pulls": [PullsListEndpoint, PullsListRequestOptions]; - "GET /repos/:owner/:repo/pulls/:pull_number": [PullsGetEndpoint, PullsGetRequestOptions]; - "POST /repos/:owner/:repo/pulls": [PullsCreateEndpoint | PullsCreateFromIssueEndpoint, PullsCreateRequestOptions | PullsCreateFromIssueRequestOptions]; - "PUT /repos/:owner/:repo/pulls/:pull_number/update-branch": [PullsUpdateBranchEndpoint, PullsUpdateBranchRequestOptions]; - "PATCH /repos/:owner/:repo/pulls/:pull_number": [PullsUpdateEndpoint, PullsUpdateRequestOptions]; - "GET /repos/:owner/:repo/pulls/:pull_number/commits": [PullsListCommitsEndpoint, PullsListCommitsRequestOptions]; - "GET /repos/:owner/:repo/pulls/:pull_number/files": [PullsListFilesEndpoint, PullsListFilesRequestOptions]; - "GET /repos/:owner/:repo/pulls/:pull_number/merge": [PullsCheckIfMergedEndpoint, PullsCheckIfMergedRequestOptions]; - "PUT /repos/:owner/:repo/pulls/:pull_number/merge": [PullsMergeEndpoint, PullsMergeRequestOptions]; - "GET /repos/:owner/:repo/pulls/:pull_number/comments": [PullsListCommentsEndpoint, PullsListCommentsRequestOptions]; - "GET /repos/:owner/:repo/pulls/comments": [PullsListCommentsForRepoEndpoint, PullsListCommentsForRepoRequestOptions]; - "GET /repos/:owner/:repo/pulls/comments/:comment_id": [PullsGetCommentEndpoint, PullsGetCommentRequestOptions]; - "POST /repos/:owner/:repo/pulls/:pull_number/comments": [PullsCreateCommentEndpoint | PullsCreateCommentReplyEndpoint, PullsCreateCommentRequestOptions | PullsCreateCommentReplyRequestOptions]; - "PATCH /repos/:owner/:repo/pulls/comments/:comment_id": [PullsUpdateCommentEndpoint, PullsUpdateCommentRequestOptions]; - "DELETE /repos/:owner/:repo/pulls/comments/:comment_id": [PullsDeleteCommentEndpoint, PullsDeleteCommentRequestOptions]; - "GET /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [PullsListReviewRequestsEndpoint, PullsListReviewRequestsRequestOptions]; - "POST /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [PullsCreateReviewRequestEndpoint, PullsCreateReviewRequestRequestOptions]; - "DELETE /repos/:owner/:repo/pulls/:pull_number/requested_reviewers": [PullsDeleteReviewRequestEndpoint, PullsDeleteReviewRequestRequestOptions]; - "GET /repos/:owner/:repo/pulls/:pull_number/reviews": [PullsListReviewsEndpoint, PullsListReviewsRequestOptions]; - "GET /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [PullsGetReviewEndpoint, PullsGetReviewRequestOptions]; - "DELETE /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [PullsDeletePendingReviewEndpoint, PullsDeletePendingReviewRequestOptions]; - "GET /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments": [PullsGetCommentsForReviewEndpoint, PullsGetCommentsForReviewRequestOptions]; - "POST /repos/:owner/:repo/pulls/:pull_number/reviews": [PullsCreateReviewEndpoint, PullsCreateReviewRequestOptions]; - "PUT /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id": [PullsUpdateReviewEndpoint, PullsUpdateReviewRequestOptions]; - "POST /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events": [PullsSubmitReviewEndpoint, PullsSubmitReviewRequestOptions]; - "PUT /repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals": [PullsDismissReviewEndpoint, PullsDismissReviewRequestOptions]; - "GET /rate_limit": [RateLimitGetEndpoint, RateLimitGetRequestOptions]; - "GET /repos/:owner/:repo/comments/:comment_id/reactions": [ReactionsListForCommitCommentEndpoint, ReactionsListForCommitCommentRequestOptions]; - "POST /repos/:owner/:repo/comments/:comment_id/reactions": [ReactionsCreateForCommitCommentEndpoint, ReactionsCreateForCommitCommentRequestOptions]; - "GET /repos/:owner/:repo/issues/:issue_number/reactions": [ReactionsListForIssueEndpoint, ReactionsListForIssueRequestOptions]; - "POST /repos/:owner/:repo/issues/:issue_number/reactions": [ReactionsCreateForIssueEndpoint, ReactionsCreateForIssueRequestOptions]; - "GET /repos/:owner/:repo/issues/comments/:comment_id/reactions": [ReactionsListForIssueCommentEndpoint, ReactionsListForIssueCommentRequestOptions]; - "POST /repos/:owner/:repo/issues/comments/:comment_id/reactions": [ReactionsCreateForIssueCommentEndpoint, ReactionsCreateForIssueCommentRequestOptions]; - "GET /repos/:owner/:repo/pulls/comments/:comment_id/reactions": [ReactionsListForPullRequestReviewCommentEndpoint, ReactionsListForPullRequestReviewCommentRequestOptions]; - "POST /repos/:owner/:repo/pulls/comments/:comment_id/reactions": [ReactionsCreateForPullRequestReviewCommentEndpoint, ReactionsCreateForPullRequestReviewCommentRequestOptions]; - "GET /teams/:team_id/discussions/:discussion_number/reactions": [ReactionsListForTeamDiscussionEndpoint, ReactionsListForTeamDiscussionRequestOptions]; - "POST /teams/:team_id/discussions/:discussion_number/reactions": [ReactionsCreateForTeamDiscussionEndpoint, ReactionsCreateForTeamDiscussionRequestOptions]; - "GET /teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions": [ReactionsListForTeamDiscussionCommentEndpoint, ReactionsListForTeamDiscussionCommentRequestOptions]; - "POST /teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions": [ReactionsCreateForTeamDiscussionCommentEndpoint, ReactionsCreateForTeamDiscussionCommentRequestOptions]; - "DELETE /reactions/:reaction_id": [ReactionsDeleteEndpoint, ReactionsDeleteRequestOptions]; - "GET /user/repos": [ReposListEndpoint, ReposListRequestOptions]; - "GET /users/:username/repos": [ReposListForUserEndpoint, ReposListForUserRequestOptions]; - "GET /orgs/:org/repos": [ReposListForOrgEndpoint, ReposListForOrgRequestOptions]; - "GET /repositories": [ReposListPublicEndpoint, ReposListPublicRequestOptions]; - "POST /user/repos": [ReposCreateForAuthenticatedUserEndpoint, ReposCreateForAuthenticatedUserRequestOptions]; - "POST /orgs/:org/repos": [ReposCreateInOrgEndpoint, ReposCreateInOrgRequestOptions]; - "POST /repos/:template_owner/:template_repo/generate": [ReposCreateUsingTemplateEndpoint, ReposCreateUsingTemplateRequestOptions]; - "GET /repos/:owner/:repo": [ReposGetEndpoint, ReposGetRequestOptions]; - "PATCH /repos/:owner/:repo": [ReposUpdateEndpoint, ReposUpdateRequestOptions]; - "GET /repos/:owner/:repo/topics": [ReposListTopicsEndpoint, ReposListTopicsRequestOptions]; - "PUT /repos/:owner/:repo/topics": [ReposReplaceTopicsEndpoint, ReposReplaceTopicsRequestOptions]; - "GET /repos/:owner/:repo/vulnerability-alerts": [ReposCheckVulnerabilityAlertsEndpoint, ReposCheckVulnerabilityAlertsRequestOptions]; - "PUT /repos/:owner/:repo/vulnerability-alerts": [ReposEnableVulnerabilityAlertsEndpoint, ReposEnableVulnerabilityAlertsRequestOptions]; - "DELETE /repos/:owner/:repo/vulnerability-alerts": [ReposDisableVulnerabilityAlertsEndpoint, ReposDisableVulnerabilityAlertsRequestOptions]; - "PUT /repos/:owner/:repo/automated-security-fixes": [ReposEnableAutomatedSecurityFixesEndpoint, ReposEnableAutomatedSecurityFixesRequestOptions]; - "DELETE /repos/:owner/:repo/automated-security-fixes": [ReposDisableAutomatedSecurityFixesEndpoint, ReposDisableAutomatedSecurityFixesRequestOptions]; - "GET /repos/:owner/:repo/contributors": [ReposListContributorsEndpoint, ReposListContributorsRequestOptions]; - "GET /repos/:owner/:repo/languages": [ReposListLanguagesEndpoint, ReposListLanguagesRequestOptions]; - "GET /repos/:owner/:repo/teams": [ReposListTeamsEndpoint, ReposListTeamsRequestOptions]; - "GET /repos/:owner/:repo/tags": [ReposListTagsEndpoint, ReposListTagsRequestOptions]; - "DELETE /repos/:owner/:repo": [ReposDeleteEndpoint, ReposDeleteRequestOptions]; - "POST /repos/:owner/:repo/transfer": [ReposTransferEndpoint, ReposTransferRequestOptions]; - "GET /repos/:owner/:repo/branches": [ReposListBranchesEndpoint, ReposListBranchesRequestOptions]; - "GET /repos/:owner/:repo/branches/:branch": [ReposGetBranchEndpoint, ReposGetBranchRequestOptions]; - "GET /repos/:owner/:repo/branches/:branch/protection": [ReposGetBranchProtectionEndpoint, ReposGetBranchProtectionRequestOptions]; - "PUT /repos/:owner/:repo/branches/:branch/protection": [ReposUpdateBranchProtectionEndpoint, ReposUpdateBranchProtectionRequestOptions]; - "DELETE /repos/:owner/:repo/branches/:branch/protection": [ReposRemoveBranchProtectionEndpoint, ReposRemoveBranchProtectionRequestOptions]; - "GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ReposGetProtectedBranchRequiredStatusChecksEndpoint, ReposGetProtectedBranchRequiredStatusChecksRequestOptions]; - "PATCH /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ReposUpdateProtectedBranchRequiredStatusChecksEndpoint, ReposUpdateProtectedBranchRequiredStatusChecksRequestOptions]; - "DELETE /repos/:owner/:repo/branches/:branch/protection/required_status_checks": [ReposRemoveProtectedBranchRequiredStatusChecksEndpoint, ReposRemoveProtectedBranchRequiredStatusChecksRequestOptions]; - "GET /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ReposListProtectedBranchRequiredStatusChecksContextsEndpoint, ReposListProtectedBranchRequiredStatusChecksContextsRequestOptions]; - "PUT /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ReposReplaceProtectedBranchRequiredStatusChecksContextsEndpoint, ReposReplaceProtectedBranchRequiredStatusChecksContextsRequestOptions]; - "POST /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ReposAddProtectedBranchRequiredStatusChecksContextsEndpoint, ReposAddProtectedBranchRequiredStatusChecksContextsRequestOptions]; - "DELETE /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts": [ReposRemoveProtectedBranchRequiredStatusChecksContextsEndpoint, ReposRemoveProtectedBranchRequiredStatusChecksContextsRequestOptions]; - "GET /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ReposGetProtectedBranchPullRequestReviewEnforcementEndpoint, ReposGetProtectedBranchPullRequestReviewEnforcementRequestOptions]; - "PATCH /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ReposUpdateProtectedBranchPullRequestReviewEnforcementEndpoint, ReposUpdateProtectedBranchPullRequestReviewEnforcementRequestOptions]; - "DELETE /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews": [ReposRemoveProtectedBranchPullRequestReviewEnforcementEndpoint, ReposRemoveProtectedBranchPullRequestReviewEnforcementRequestOptions]; - "GET /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ReposGetProtectedBranchRequiredSignaturesEndpoint, ReposGetProtectedBranchRequiredSignaturesRequestOptions]; - "POST /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ReposAddProtectedBranchRequiredSignaturesEndpoint, ReposAddProtectedBranchRequiredSignaturesRequestOptions]; - "DELETE /repos/:owner/:repo/branches/:branch/protection/required_signatures": [ReposRemoveProtectedBranchRequiredSignaturesEndpoint, ReposRemoveProtectedBranchRequiredSignaturesRequestOptions]; - "GET /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ReposGetProtectedBranchAdminEnforcementEndpoint, ReposGetProtectedBranchAdminEnforcementRequestOptions]; - "POST /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ReposAddProtectedBranchAdminEnforcementEndpoint, ReposAddProtectedBranchAdminEnforcementRequestOptions]; - "DELETE /repos/:owner/:repo/branches/:branch/protection/enforce_admins": [ReposRemoveProtectedBranchAdminEnforcementEndpoint, ReposRemoveProtectedBranchAdminEnforcementRequestOptions]; - "GET /repos/:owner/:repo/branches/:branch/protection/restrictions": [ReposGetProtectedBranchRestrictionsEndpoint, ReposGetProtectedBranchRestrictionsRequestOptions]; - "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions": [ReposRemoveProtectedBranchRestrictionsEndpoint, ReposRemoveProtectedBranchRestrictionsRequestOptions]; - "GET /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ReposListProtectedBranchTeamRestrictionsEndpoint, ReposListProtectedBranchTeamRestrictionsRequestOptions]; - "PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ReposReplaceProtectedBranchTeamRestrictionsEndpoint, ReposReplaceProtectedBranchTeamRestrictionsRequestOptions]; - "POST /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ReposAddProtectedBranchTeamRestrictionsEndpoint, ReposAddProtectedBranchTeamRestrictionsRequestOptions]; - "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/teams": [ReposRemoveProtectedBranchTeamRestrictionsEndpoint, ReposRemoveProtectedBranchTeamRestrictionsRequestOptions]; - "GET /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ReposListProtectedBranchUserRestrictionsEndpoint, ReposListProtectedBranchUserRestrictionsRequestOptions]; - "PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ReposReplaceProtectedBranchUserRestrictionsEndpoint, ReposReplaceProtectedBranchUserRestrictionsRequestOptions]; - "POST /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ReposAddProtectedBranchUserRestrictionsEndpoint, ReposAddProtectedBranchUserRestrictionsRequestOptions]; - "DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/users": [ReposRemoveProtectedBranchUserRestrictionsEndpoint, ReposRemoveProtectedBranchUserRestrictionsRequestOptions]; - "GET /repos/:owner/:repo/collaborators": [ReposListCollaboratorsEndpoint, ReposListCollaboratorsRequestOptions]; - "GET /repos/:owner/:repo/collaborators/:username": [ReposCheckCollaboratorEndpoint, ReposCheckCollaboratorRequestOptions]; - "GET /repos/:owner/:repo/collaborators/:username/permission": [ReposGetCollaboratorPermissionLevelEndpoint, ReposGetCollaboratorPermissionLevelRequestOptions]; - "PUT /repos/:owner/:repo/collaborators/:username": [ReposAddCollaboratorEndpoint, ReposAddCollaboratorRequestOptions]; - "DELETE /repos/:owner/:repo/collaborators/:username": [ReposRemoveCollaboratorEndpoint, ReposRemoveCollaboratorRequestOptions]; - "GET /repos/:owner/:repo/comments": [ReposListCommitCommentsEndpoint, ReposListCommitCommentsRequestOptions]; - "GET /repos/:owner/:repo/commits/:commit_sha/comments": [ReposListCommentsForCommitEndpoint, ReposListCommentsForCommitRequestOptions]; - "POST /repos/:owner/:repo/commits/:commit_sha/comments": [ReposCreateCommitCommentEndpoint, ReposCreateCommitCommentRequestOptions]; - "GET /repos/:owner/:repo/comments/:comment_id": [ReposGetCommitCommentEndpoint, ReposGetCommitCommentRequestOptions]; - "PATCH /repos/:owner/:repo/comments/:comment_id": [ReposUpdateCommitCommentEndpoint, ReposUpdateCommitCommentRequestOptions]; - "DELETE /repos/:owner/:repo/comments/:comment_id": [ReposDeleteCommitCommentEndpoint, ReposDeleteCommitCommentRequestOptions]; - "GET /repos/:owner/:repo/commits": [ReposListCommitsEndpoint, ReposListCommitsRequestOptions]; - "GET /repos/:owner/:repo/commits/:ref": [ReposGetCommitEndpoint | ReposGetCommitRefShaEndpoint, ReposGetCommitRequestOptions | ReposGetCommitRefShaRequestOptions]; - "GET /repos/:owner/:repo/compare/:base...:head": [ReposCompareCommitsEndpoint, ReposCompareCommitsRequestOptions]; - "GET /repos/:owner/:repo/commits/:commit_sha/branches-where-head": [ReposListBranchesForHeadCommitEndpoint, ReposListBranchesForHeadCommitRequestOptions]; - "GET /repos/:owner/:repo/commits/:commit_sha/pulls": [ReposListPullRequestsAssociatedWithCommitEndpoint, ReposListPullRequestsAssociatedWithCommitRequestOptions]; - "GET /repos/:owner/:repo/community/profile": [ReposRetrieveCommunityProfileMetricsEndpoint, ReposRetrieveCommunityProfileMetricsRequestOptions]; - "GET /repos/:owner/:repo/readme": [ReposGetReadmeEndpoint, ReposGetReadmeRequestOptions]; - "GET /repos/:owner/:repo/contents/:path": [ReposGetContentsEndpoint, ReposGetContentsRequestOptions]; - "PUT /repos/:owner/:repo/contents/:path": [ReposCreateOrUpdateFileEndpoint | ReposCreateFileEndpoint | ReposUpdateFileEndpoint, ReposCreateOrUpdateFileRequestOptions | ReposCreateFileRequestOptions | ReposUpdateFileRequestOptions]; - "DELETE /repos/:owner/:repo/contents/:path": [ReposDeleteFileEndpoint, ReposDeleteFileRequestOptions]; - "GET /repos/:owner/:repo/:archive_format/:ref": [ReposGetArchiveLinkEndpoint, ReposGetArchiveLinkRequestOptions]; - "GET /repos/:owner/:repo/deployments": [ReposListDeploymentsEndpoint, ReposListDeploymentsRequestOptions]; - "GET /repos/:owner/:repo/deployments/:deployment_id": [ReposGetDeploymentEndpoint, ReposGetDeploymentRequestOptions]; - "POST /repos/:owner/:repo/deployments": [ReposCreateDeploymentEndpoint, ReposCreateDeploymentRequestOptions]; - "GET /repos/:owner/:repo/deployments/:deployment_id/statuses": [ReposListDeploymentStatusesEndpoint, ReposListDeploymentStatusesRequestOptions]; - "GET /repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id": [ReposGetDeploymentStatusEndpoint, ReposGetDeploymentStatusRequestOptions]; - "POST /repos/:owner/:repo/deployments/:deployment_id/statuses": [ReposCreateDeploymentStatusEndpoint, ReposCreateDeploymentStatusRequestOptions]; - "GET /repos/:owner/:repo/downloads": [ReposListDownloadsEndpoint, ReposListDownloadsRequestOptions]; - "GET /repos/:owner/:repo/downloads/:download_id": [ReposGetDownloadEndpoint, ReposGetDownloadRequestOptions]; - "DELETE /repos/:owner/:repo/downloads/:download_id": [ReposDeleteDownloadEndpoint, ReposDeleteDownloadRequestOptions]; - "GET /repos/:owner/:repo/forks": [ReposListForksEndpoint, ReposListForksRequestOptions]; - "POST /repos/:owner/:repo/forks": [ReposCreateForkEndpoint, ReposCreateForkRequestOptions]; - "GET /repos/:owner/:repo/hooks": [ReposListHooksEndpoint, ReposListHooksRequestOptions]; - "GET /repos/:owner/:repo/hooks/:hook_id": [ReposGetHookEndpoint, ReposGetHookRequestOptions]; - "POST /repos/:owner/:repo/hooks": [ReposCreateHookEndpoint, ReposCreateHookRequestOptions]; - "PATCH /repos/:owner/:repo/hooks/:hook_id": [ReposUpdateHookEndpoint, ReposUpdateHookRequestOptions]; - "POST /repos/:owner/:repo/hooks/:hook_id/tests": [ReposTestPushHookEndpoint, ReposTestPushHookRequestOptions]; - "POST /repos/:owner/:repo/hooks/:hook_id/pings": [ReposPingHookEndpoint, ReposPingHookRequestOptions]; - "DELETE /repos/:owner/:repo/hooks/:hook_id": [ReposDeleteHookEndpoint, ReposDeleteHookRequestOptions]; - "GET /repos/:owner/:repo/invitations": [ReposListInvitationsEndpoint, ReposListInvitationsRequestOptions]; - "DELETE /repos/:owner/:repo/invitations/:invitation_id": [ReposDeleteInvitationEndpoint, ReposDeleteInvitationRequestOptions]; - "PATCH /repos/:owner/:repo/invitations/:invitation_id": [ReposUpdateInvitationEndpoint, ReposUpdateInvitationRequestOptions]; - "GET /user/repository_invitations": [ReposListInvitationsForAuthenticatedUserEndpoint, ReposListInvitationsForAuthenticatedUserRequestOptions]; - "PATCH /user/repository_invitations/:invitation_id": [ReposAcceptInvitationEndpoint, ReposAcceptInvitationRequestOptions]; - "DELETE /user/repository_invitations/:invitation_id": [ReposDeclineInvitationEndpoint, ReposDeclineInvitationRequestOptions]; - "GET /repos/:owner/:repo/keys": [ReposListDeployKeysEndpoint, ReposListDeployKeysRequestOptions]; - "GET /repos/:owner/:repo/keys/:key_id": [ReposGetDeployKeyEndpoint, ReposGetDeployKeyRequestOptions]; - "POST /repos/:owner/:repo/keys": [ReposAddDeployKeyEndpoint, ReposAddDeployKeyRequestOptions]; - "DELETE /repos/:owner/:repo/keys/:key_id": [ReposRemoveDeployKeyEndpoint, ReposRemoveDeployKeyRequestOptions]; - "POST /repos/:owner/:repo/merges": [ReposMergeEndpoint, ReposMergeRequestOptions]; - "GET /repos/:owner/:repo/pages": [ReposGetPagesEndpoint, ReposGetPagesRequestOptions]; - "POST /repos/:owner/:repo/pages": [ReposEnablePagesSiteEndpoint, ReposEnablePagesSiteRequestOptions]; - "DELETE /repos/:owner/:repo/pages": [ReposDisablePagesSiteEndpoint, ReposDisablePagesSiteRequestOptions]; - "PUT /repos/:owner/:repo/pages": [ReposUpdateInformationAboutPagesSiteEndpoint, ReposUpdateInformationAboutPagesSiteRequestOptions]; - "POST /repos/:owner/:repo/pages/builds": [ReposRequestPageBuildEndpoint, ReposRequestPageBuildRequestOptions]; - "GET /repos/:owner/:repo/pages/builds": [ReposListPagesBuildsEndpoint, ReposListPagesBuildsRequestOptions]; - "GET /repos/:owner/:repo/pages/builds/latest": [ReposGetLatestPagesBuildEndpoint, ReposGetLatestPagesBuildRequestOptions]; - "GET /repos/:owner/:repo/pages/builds/:build_id": [ReposGetPagesBuildEndpoint, ReposGetPagesBuildRequestOptions]; - "GET /repos/:owner/:repo/releases": [ReposListReleasesEndpoint, ReposListReleasesRequestOptions]; - "GET /repos/:owner/:repo/releases/:release_id": [ReposGetReleaseEndpoint, ReposGetReleaseRequestOptions]; - "GET /repos/:owner/:repo/releases/latest": [ReposGetLatestReleaseEndpoint, ReposGetLatestReleaseRequestOptions]; - "GET /repos/:owner/:repo/releases/tags/:tag": [ReposGetReleaseByTagEndpoint, ReposGetReleaseByTagRequestOptions]; - "POST /repos/:owner/:repo/releases": [ReposCreateReleaseEndpoint, ReposCreateReleaseRequestOptions]; - "PATCH /repos/:owner/:repo/releases/:release_id": [ReposUpdateReleaseEndpoint, ReposUpdateReleaseRequestOptions]; - "DELETE /repos/:owner/:repo/releases/:release_id": [ReposDeleteReleaseEndpoint, ReposDeleteReleaseRequestOptions]; - "GET /repos/:owner/:repo/releases/:release_id/assets": [ReposListAssetsForReleaseEndpoint, ReposListAssetsForReleaseRequestOptions]; - "POST :url": [ReposUploadReleaseAssetEndpoint, ReposUploadReleaseAssetRequestOptions]; - "GET /repos/:owner/:repo/releases/assets/:asset_id": [ReposGetReleaseAssetEndpoint, ReposGetReleaseAssetRequestOptions]; - "PATCH /repos/:owner/:repo/releases/assets/:asset_id": [ReposUpdateReleaseAssetEndpoint, ReposUpdateReleaseAssetRequestOptions]; - "DELETE /repos/:owner/:repo/releases/assets/:asset_id": [ReposDeleteReleaseAssetEndpoint, ReposDeleteReleaseAssetRequestOptions]; - "GET /repos/:owner/:repo/stats/contributors": [ReposGetContributorsStatsEndpoint, ReposGetContributorsStatsRequestOptions]; - "GET /repos/:owner/:repo/stats/commit_activity": [ReposGetCommitActivityStatsEndpoint, ReposGetCommitActivityStatsRequestOptions]; - "GET /repos/:owner/:repo/stats/code_frequency": [ReposGetCodeFrequencyStatsEndpoint, ReposGetCodeFrequencyStatsRequestOptions]; - "GET /repos/:owner/:repo/stats/participation": [ReposGetParticipationStatsEndpoint, ReposGetParticipationStatsRequestOptions]; - "GET /repos/:owner/:repo/stats/punch_card": [ReposGetPunchCardStatsEndpoint, ReposGetPunchCardStatsRequestOptions]; - "POST /repos/:owner/:repo/statuses/:sha": [ReposCreateStatusEndpoint, ReposCreateStatusRequestOptions]; - "GET /repos/:owner/:repo/commits/:ref/statuses": [ReposListStatusesForRefEndpoint, ReposListStatusesForRefRequestOptions]; - "GET /repos/:owner/:repo/commits/:ref/status": [ReposGetCombinedStatusForRefEndpoint, ReposGetCombinedStatusForRefRequestOptions]; - "GET /repos/:owner/:repo/traffic/popular/referrers": [ReposGetTopReferrersEndpoint, ReposGetTopReferrersRequestOptions]; - "GET /repos/:owner/:repo/traffic/popular/paths": [ReposGetTopPathsEndpoint, ReposGetTopPathsRequestOptions]; - "GET /repos/:owner/:repo/traffic/views": [ReposGetViewsEndpoint, ReposGetViewsRequestOptions]; - "GET /repos/:owner/:repo/traffic/clones": [ReposGetClonesEndpoint, ReposGetClonesRequestOptions]; - "GET /scim/v2/organizations/:org/Users": [ScimListProvisionedIdentitiesEndpoint, ScimListProvisionedIdentitiesRequestOptions]; - "GET /scim/v2/organizations/:org/Users/:scim_user_id": [ScimGetProvisioningDetailsForUserEndpoint, ScimGetProvisioningDetailsForUserRequestOptions]; - "POST /scim/v2/organizations/:org/Users": [ScimProvisionAndInviteUsersEndpoint | ScimProvisionInviteUsersEndpoint, ScimProvisionAndInviteUsersRequestOptions | ScimProvisionInviteUsersRequestOptions]; - "PUT /scim/v2/organizations/:org/Users/:scim_user_id": [ScimReplaceProvisionedUserInformationEndpoint | ScimUpdateProvisionedOrgMembershipEndpoint, ScimReplaceProvisionedUserInformationRequestOptions | ScimUpdateProvisionedOrgMembershipRequestOptions]; - "PATCH /scim/v2/organizations/:org/Users/:scim_user_id": [ScimUpdateUserAttributeEndpoint, ScimUpdateUserAttributeRequestOptions]; - "DELETE /scim/v2/organizations/:org/Users/:scim_user_id": [ScimRemoveUserFromOrgEndpoint, ScimRemoveUserFromOrgRequestOptions]; - "GET /search/repositories": [SearchReposEndpoint, SearchReposRequestOptions]; - "GET /search/commits": [SearchCommitsEndpoint, SearchCommitsRequestOptions]; - "GET /search/code": [SearchCodeEndpoint, SearchCodeRequestOptions]; - "GET /search/issues": [SearchIssuesAndPullRequestsEndpoint | SearchIssuesEndpoint, SearchIssuesAndPullRequestsRequestOptions | SearchIssuesRequestOptions]; - "GET /search/users": [SearchUsersEndpoint, SearchUsersRequestOptions]; - "GET /search/topics": [SearchTopicsEndpoint, SearchTopicsRequestOptions]; - "GET /search/labels": [SearchLabelsEndpoint, SearchLabelsRequestOptions]; - "GET /legacy/issues/search/:owner/:repository/:state/:keyword": [SearchIssuesLegacyEndpoint, SearchIssuesLegacyRequestOptions]; - "GET /legacy/repos/search/:keyword": [SearchReposLegacyEndpoint, SearchReposLegacyRequestOptions]; - "GET /legacy/user/search/:keyword": [SearchUsersLegacyEndpoint, SearchUsersLegacyRequestOptions]; - "GET /legacy/user/email/:email": [SearchEmailLegacyEndpoint, SearchEmailLegacyRequestOptions]; - "GET /orgs/:org/teams": [TeamsListEndpoint, TeamsListRequestOptions]; - "GET /teams/:team_id": [TeamsGetEndpoint, TeamsGetRequestOptions]; - "GET /orgs/:org/teams/:team_slug": [TeamsGetByNameEndpoint, TeamsGetByNameRequestOptions]; - "POST /orgs/:org/teams": [TeamsCreateEndpoint, TeamsCreateRequestOptions]; - "PATCH /teams/:team_id": [TeamsUpdateEndpoint, TeamsUpdateRequestOptions]; - "DELETE /teams/:team_id": [TeamsDeleteEndpoint, TeamsDeleteRequestOptions]; - "GET /teams/:team_id/teams": [TeamsListChildEndpoint, TeamsListChildRequestOptions]; - "GET /teams/:team_id/repos": [TeamsListReposEndpoint, TeamsListReposRequestOptions]; - "GET /teams/:team_id/repos/:owner/:repo": [TeamsCheckManagesRepoEndpoint, TeamsCheckManagesRepoRequestOptions]; - "PUT /teams/:team_id/repos/:owner/:repo": [TeamsAddOrUpdateRepoEndpoint, TeamsAddOrUpdateRepoRequestOptions]; - "DELETE /teams/:team_id/repos/:owner/:repo": [TeamsRemoveRepoEndpoint, TeamsRemoveRepoRequestOptions]; - "GET /user/teams": [TeamsListForAuthenticatedUserEndpoint, TeamsListForAuthenticatedUserRequestOptions]; - "GET /teams/:team_id/projects": [TeamsListProjectsEndpoint, TeamsListProjectsRequestOptions]; - "GET /teams/:team_id/projects/:project_id": [TeamsReviewProjectEndpoint, TeamsReviewProjectRequestOptions]; - "PUT /teams/:team_id/projects/:project_id": [TeamsAddOrUpdateProjectEndpoint, TeamsAddOrUpdateProjectRequestOptions]; - "DELETE /teams/:team_id/projects/:project_id": [TeamsRemoveProjectEndpoint, TeamsRemoveProjectRequestOptions]; - "GET /teams/:team_id/discussions/:discussion_number/comments": [TeamsListDiscussionCommentsEndpoint, TeamsListDiscussionCommentsRequestOptions]; - "GET /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [TeamsGetDiscussionCommentEndpoint, TeamsGetDiscussionCommentRequestOptions]; - "POST /teams/:team_id/discussions/:discussion_number/comments": [TeamsCreateDiscussionCommentEndpoint, TeamsCreateDiscussionCommentRequestOptions]; - "PATCH /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [TeamsUpdateDiscussionCommentEndpoint, TeamsUpdateDiscussionCommentRequestOptions]; - "DELETE /teams/:team_id/discussions/:discussion_number/comments/:comment_number": [TeamsDeleteDiscussionCommentEndpoint, TeamsDeleteDiscussionCommentRequestOptions]; - "GET /teams/:team_id/discussions": [TeamsListDiscussionsEndpoint, TeamsListDiscussionsRequestOptions]; - "GET /teams/:team_id/discussions/:discussion_number": [TeamsGetDiscussionEndpoint, TeamsGetDiscussionRequestOptions]; - "POST /teams/:team_id/discussions": [TeamsCreateDiscussionEndpoint, TeamsCreateDiscussionRequestOptions]; - "PATCH /teams/:team_id/discussions/:discussion_number": [TeamsUpdateDiscussionEndpoint, TeamsUpdateDiscussionRequestOptions]; - "DELETE /teams/:team_id/discussions/:discussion_number": [TeamsDeleteDiscussionEndpoint, TeamsDeleteDiscussionRequestOptions]; - "GET /teams/:team_id/members": [TeamsListMembersEndpoint, TeamsListMembersRequestOptions]; - "GET /teams/:team_id/members/:username": [TeamsGetMemberEndpoint, TeamsGetMemberRequestOptions]; - "PUT /teams/:team_id/members/:username": [TeamsAddMemberEndpoint, TeamsAddMemberRequestOptions]; - "DELETE /teams/:team_id/members/:username": [TeamsRemoveMemberEndpoint, TeamsRemoveMemberRequestOptions]; - "GET /teams/:team_id/memberships/:username": [TeamsGetMembershipEndpoint, TeamsGetMembershipRequestOptions]; - "PUT /teams/:team_id/memberships/:username": [TeamsAddOrUpdateMembershipEndpoint, TeamsAddOrUpdateMembershipRequestOptions]; - "DELETE /teams/:team_id/memberships/:username": [TeamsRemoveMembershipEndpoint, TeamsRemoveMembershipRequestOptions]; - "GET /teams/:team_id/invitations": [TeamsListPendingInvitationsEndpoint, TeamsListPendingInvitationsRequestOptions]; - "GET /orgs/:org/team-sync/groups": [TeamsListIdPGroupsForOrgEndpoint, TeamsListIdPGroupsForOrgRequestOptions]; - "GET /teams/:team_id/team-sync/group-mappings": [TeamsListIdPGroupsEndpoint, TeamsListIdPGroupsRequestOptions]; - "PATCH /teams/:team_id/team-sync/group-mappings": [TeamsCreateOrUpdateIdPGroupConnectionsEndpoint, TeamsCreateOrUpdateIdPGroupConnectionsRequestOptions]; - "GET /users/:username": [UsersGetByUsernameEndpoint, UsersGetByUsernameRequestOptions]; - "GET /user": [UsersGetAuthenticatedEndpoint, UsersGetAuthenticatedRequestOptions]; - "PATCH /user": [UsersUpdateAuthenticatedEndpoint, UsersUpdateAuthenticatedRequestOptions]; - "GET /users/:username/hovercard": [UsersGetContextForUserEndpoint, UsersGetContextForUserRequestOptions]; - "GET /users": [UsersListEndpoint, UsersListRequestOptions]; - "GET /user/blocks": [UsersListBlockedEndpoint, UsersListBlockedRequestOptions]; - "GET /user/blocks/:username": [UsersCheckBlockedEndpoint, UsersCheckBlockedRequestOptions]; - "PUT /user/blocks/:username": [UsersBlockEndpoint, UsersBlockRequestOptions]; - "DELETE /user/blocks/:username": [UsersUnblockEndpoint, UsersUnblockRequestOptions]; - "GET /user/emails": [UsersListEmailsEndpoint, UsersListEmailsRequestOptions]; - "GET /user/public_emails": [UsersListPublicEmailsEndpoint, UsersListPublicEmailsRequestOptions]; - "POST /user/emails": [UsersAddEmailsEndpoint, UsersAddEmailsRequestOptions]; - "DELETE /user/emails": [UsersDeleteEmailsEndpoint, UsersDeleteEmailsRequestOptions]; - "PATCH /user/email/visibility": [UsersTogglePrimaryEmailVisibilityEndpoint, UsersTogglePrimaryEmailVisibilityRequestOptions]; - "GET /users/:username/followers": [UsersListFollowersForUserEndpoint, UsersListFollowersForUserRequestOptions]; - "GET /user/followers": [UsersListFollowersForAuthenticatedUserEndpoint, UsersListFollowersForAuthenticatedUserRequestOptions]; - "GET /users/:username/following": [UsersListFollowingForUserEndpoint, UsersListFollowingForUserRequestOptions]; - "GET /user/following": [UsersListFollowingForAuthenticatedUserEndpoint, UsersListFollowingForAuthenticatedUserRequestOptions]; - "GET /user/following/:username": [UsersCheckFollowingEndpoint, UsersCheckFollowingRequestOptions]; - "GET /users/:username/following/:target_user": [UsersCheckFollowingForUserEndpoint, UsersCheckFollowingForUserRequestOptions]; - "PUT /user/following/:username": [UsersFollowEndpoint, UsersFollowRequestOptions]; - "DELETE /user/following/:username": [UsersUnfollowEndpoint, UsersUnfollowRequestOptions]; - "GET /users/:username/gpg_keys": [UsersListGpgKeysForUserEndpoint, UsersListGpgKeysForUserRequestOptions]; - "GET /user/gpg_keys": [UsersListGpgKeysEndpoint, UsersListGpgKeysRequestOptions]; - "GET /user/gpg_keys/:gpg_key_id": [UsersGetGpgKeyEndpoint, UsersGetGpgKeyRequestOptions]; - "POST /user/gpg_keys": [UsersCreateGpgKeyEndpoint, UsersCreateGpgKeyRequestOptions]; - "DELETE /user/gpg_keys/:gpg_key_id": [UsersDeleteGpgKeyEndpoint, UsersDeleteGpgKeyRequestOptions]; - "GET /users/:username/keys": [UsersListPublicKeysForUserEndpoint, UsersListPublicKeysForUserRequestOptions]; - "GET /user/keys": [UsersListPublicKeysEndpoint, UsersListPublicKeysRequestOptions]; - "GET /user/keys/:key_id": [UsersGetPublicKeyEndpoint, UsersGetPublicKeyRequestOptions]; - "POST /user/keys": [UsersCreatePublicKeyEndpoint, UsersCreatePublicKeyRequestOptions]; - "DELETE /user/keys/:key_id": [UsersDeletePublicKeyEndpoint, UsersDeletePublicKeyRequestOptions]; -} -declare type ActivityListPublicEventsEndpoint = { - per_page?: number; - page?: number; -}; -declare type ActivityListPublicEventsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListRepoEventsEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ActivityListRepoEventsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListPublicEventsForRepoNetworkEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ActivityListPublicEventsForRepoNetworkRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListPublicEventsForOrgEndpoint = { - org: string; - per_page?: number; - page?: number; -}; -declare type ActivityListPublicEventsForOrgRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListReceivedEventsForUserEndpoint = { - username: string; - per_page?: number; - page?: number; -}; -declare type ActivityListReceivedEventsForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListReceivedPublicEventsForUserEndpoint = { - username: string; - per_page?: number; - page?: number; -}; -declare type ActivityListReceivedPublicEventsForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListEventsForUserEndpoint = { - username: string; - per_page?: number; - page?: number; -}; -declare type ActivityListEventsForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListPublicEventsForUserEndpoint = { - username: string; - per_page?: number; - page?: number; -}; -declare type ActivityListPublicEventsForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListEventsForOrgEndpoint = { - username: string; - org: string; - per_page?: number; - page?: number; -}; -declare type ActivityListEventsForOrgRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListFeedsEndpoint = {}; -declare type ActivityListFeedsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListNotificationsEndpoint = { - all?: boolean; - participating?: boolean; - since?: string; - before?: string; - per_page?: number; - page?: number; -}; -declare type ActivityListNotificationsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListNotificationsForRepoEndpoint = { - owner: string; - repo: string; - all?: boolean; - participating?: boolean; - since?: string; - before?: string; - per_page?: number; - page?: number; -}; -declare type ActivityListNotificationsForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityMarkAsReadEndpoint = { - last_read_at?: string; -}; -declare type ActivityMarkAsReadRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityMarkNotificationsAsReadForRepoEndpoint = { - owner: string; - repo: string; - last_read_at?: string; -}; -declare type ActivityMarkNotificationsAsReadForRepoRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityGetThreadEndpoint = { - thread_id: number; -}; -declare type ActivityGetThreadRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityMarkThreadAsReadEndpoint = { - thread_id: number; -}; -declare type ActivityMarkThreadAsReadRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityGetThreadSubscriptionEndpoint = { - thread_id: number; -}; -declare type ActivityGetThreadSubscriptionRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivitySetThreadSubscriptionEndpoint = { - thread_id: number; - ignored?: boolean; -}; -declare type ActivitySetThreadSubscriptionRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityDeleteThreadSubscriptionEndpoint = { - thread_id: number; -}; -declare type ActivityDeleteThreadSubscriptionRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListStargazersForRepoEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ActivityListStargazersForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListReposStarredByUserEndpoint = { - username: string; - sort?: string; - direction?: string; - per_page?: number; - page?: number; -}; -declare type ActivityListReposStarredByUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListReposStarredByAuthenticatedUserEndpoint = { - sort?: string; - direction?: string; - per_page?: number; - page?: number; -}; -declare type ActivityListReposStarredByAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityCheckStarringRepoEndpoint = { - owner: string; - repo: string; -}; -declare type ActivityCheckStarringRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityStarRepoEndpoint = { - owner: string; - repo: string; -}; -declare type ActivityStarRepoRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityUnstarRepoEndpoint = { - owner: string; - repo: string; -}; -declare type ActivityUnstarRepoRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListWatchersForRepoEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ActivityListWatchersForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListReposWatchedByUserEndpoint = { - username: string; - per_page?: number; - page?: number; -}; -declare type ActivityListReposWatchedByUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityListWatchedReposForAuthenticatedUserEndpoint = { - per_page?: number; - page?: number; -}; -declare type ActivityListWatchedReposForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityGetRepoSubscriptionEndpoint = { - owner: string; - repo: string; -}; -declare type ActivityGetRepoSubscriptionRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivitySetRepoSubscriptionEndpoint = { - owner: string; - repo: string; - subscribed?: boolean; - ignored?: boolean; -}; -declare type ActivitySetRepoSubscriptionRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityDeleteRepoSubscriptionEndpoint = { - owner: string; - repo: string; -}; -declare type ActivityDeleteRepoSubscriptionRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityCheckWatchingRepoLegacyEndpoint = { - owner: string; - repo: string; -}; -declare type ActivityCheckWatchingRepoLegacyRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityWatchRepoLegacyEndpoint = { - owner: string; - repo: string; -}; -declare type ActivityWatchRepoLegacyRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ActivityStopWatchingRepoLegacyEndpoint = { - owner: string; - repo: string; -}; -declare type ActivityStopWatchingRepoLegacyRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsGetBySlugEndpoint = { - app_slug: string; -}; -declare type AppsGetBySlugRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsGetAuthenticatedEndpoint = {}; -declare type AppsGetAuthenticatedRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsListInstallationsEndpoint = { - per_page?: number; - page?: number; -}; -declare type AppsListInstallationsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsGetInstallationEndpoint = { - installation_id: number; -}; -declare type AppsGetInstallationRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsDeleteInstallationEndpoint = { - installation_id: number; -}; -declare type AppsDeleteInstallationRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsCreateInstallationTokenEndpoint = { - installation_id: number; - repository_ids?: number[]; - permissions?: object; -}; -declare type AppsCreateInstallationTokenRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsGetOrgInstallationEndpoint = { - org: string; -}; -declare type AppsGetOrgInstallationRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsFindOrgInstallationEndpoint = { - org: string; -}; -declare type AppsFindOrgInstallationRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsGetRepoInstallationEndpoint = { - owner: string; - repo: string; -}; -declare type AppsGetRepoInstallationRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsFindRepoInstallationEndpoint = { - owner: string; - repo: string; -}; -declare type AppsFindRepoInstallationRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsGetUserInstallationEndpoint = { - username: string; -}; -declare type AppsGetUserInstallationRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsFindUserInstallationEndpoint = { - username: string; -}; -declare type AppsFindUserInstallationRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsCreateFromManifestEndpoint = { - code: string; -}; -declare type AppsCreateFromManifestRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsListReposEndpoint = { - per_page?: number; - page?: number; -}; -declare type AppsListReposRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsListInstallationsForAuthenticatedUserEndpoint = { - per_page?: number; - page?: number; -}; -declare type AppsListInstallationsForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsListInstallationReposForAuthenticatedUserEndpoint = { - installation_id: number; - per_page?: number; - page?: number; -}; -declare type AppsListInstallationReposForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsAddRepoToInstallationEndpoint = { - installation_id: number; - repository_id: number; -}; -declare type AppsAddRepoToInstallationRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsRemoveRepoFromInstallationEndpoint = { - installation_id: number; - repository_id: number; -}; -declare type AppsRemoveRepoFromInstallationRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsCreateContentAttachmentEndpoint = { - content_reference_id: number; - title: string; - body: string; -}; -declare type AppsCreateContentAttachmentRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsListPlansEndpoint = { - per_page?: number; - page?: number; -}; -declare type AppsListPlansRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsListPlansStubbedEndpoint = { - per_page?: number; - page?: number; -}; -declare type AppsListPlansStubbedRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsListAccountsUserOrOrgOnPlanEndpoint = { - plan_id: number; - sort?: string; - direction?: string; - per_page?: number; - page?: number; -}; -declare type AppsListAccountsUserOrOrgOnPlanRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsListAccountsUserOrOrgOnPlanStubbedEndpoint = { - plan_id: number; - sort?: string; - direction?: string; - per_page?: number; - page?: number; -}; -declare type AppsListAccountsUserOrOrgOnPlanStubbedRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsCheckAccountIsAssociatedWithAnyEndpoint = { - account_id: number; - per_page?: number; - page?: number; -}; -declare type AppsCheckAccountIsAssociatedWithAnyRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsCheckAccountIsAssociatedWithAnyStubbedEndpoint = { - account_id: number; - per_page?: number; - page?: number; -}; -declare type AppsCheckAccountIsAssociatedWithAnyStubbedRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsListMarketplacePurchasesForAuthenticatedUserEndpoint = { - per_page?: number; - page?: number; -}; -declare type AppsListMarketplacePurchasesForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type AppsListMarketplacePurchasesForAuthenticatedUserStubbedEndpoint = { - per_page?: number; - page?: number; -}; -declare type AppsListMarketplacePurchasesForAuthenticatedUserStubbedRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ChecksCreateEndpoint = { - owner: string; - repo: string; - name: string; - head_sha: string; - details_url?: string; - external_id?: string; - status?: string; - started_at?: string; - conclusion?: string; - completed_at?: string; - output?: object; - "output.title": string; - "output.summary": string; - "output.text"?: string; - "output.annotations"?: object[]; - "output.annotations[].path": string; - "output.annotations[].start_line": number; - "output.annotations[].end_line": number; - "output.annotations[].start_column"?: number; - "output.annotations[].end_column"?: number; - "output.annotations[].annotation_level": string; - "output.annotations[].message": string; - "output.annotations[].title"?: string; - "output.annotations[].raw_details"?: string; - "output.images"?: object[]; - "output.images[].alt": string; - "output.images[].image_url": string; - "output.images[].caption"?: string; - actions?: object[]; - "actions[].label": string; - "actions[].description": string; - "actions[].identifier": string; -}; -declare type ChecksCreateRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ChecksUpdateEndpoint = { - owner: string; - repo: string; - check_run_id: number; - name?: string; - details_url?: string; - external_id?: string; - started_at?: string; - status?: string; - conclusion?: string; - completed_at?: string; - output?: object; - "output.title"?: string; - "output.summary": string; - "output.text"?: string; - "output.annotations"?: object[]; - "output.annotations[].path": string; - "output.annotations[].start_line": number; - "output.annotations[].end_line": number; - "output.annotations[].start_column"?: number; - "output.annotations[].end_column"?: number; - "output.annotations[].annotation_level": string; - "output.annotations[].message": string; - "output.annotations[].title"?: string; - "output.annotations[].raw_details"?: string; - "output.images"?: object[]; - "output.images[].alt": string; - "output.images[].image_url": string; - "output.images[].caption"?: string; - actions?: object[]; - "actions[].label": string; - "actions[].description": string; - "actions[].identifier": string; -}; -declare type ChecksUpdateRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ChecksListForRefEndpoint = { - owner: string; - repo: string; - ref: string; - check_name?: string; - status?: string; - filter?: string; - per_page?: number; - page?: number; -}; -declare type ChecksListForRefRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ChecksListForSuiteEndpoint = { - owner: string; - repo: string; - check_suite_id: number; - check_name?: string; - status?: string; - filter?: string; - per_page?: number; - page?: number; -}; -declare type ChecksListForSuiteRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ChecksGetEndpoint = { - owner: string; - repo: string; - check_run_id: number; -}; -declare type ChecksGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ChecksListAnnotationsEndpoint = { - owner: string; - repo: string; - check_run_id: number; - per_page?: number; - page?: number; -}; -declare type ChecksListAnnotationsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ChecksGetSuiteEndpoint = { - owner: string; - repo: string; - check_suite_id: number; -}; -declare type ChecksGetSuiteRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ChecksListSuitesForRefEndpoint = { - owner: string; - repo: string; - ref: string; - app_id?: number; - check_name?: string; - per_page?: number; - page?: number; -}; -declare type ChecksListSuitesForRefRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ChecksSetSuitesPreferencesEndpoint = { - owner: string; - repo: string; - auto_trigger_checks?: object[]; - "auto_trigger_checks[].app_id": number; - "auto_trigger_checks[].setting": boolean; -}; -declare type ChecksSetSuitesPreferencesRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ChecksCreateSuiteEndpoint = { - owner: string; - repo: string; - head_sha: string; -}; -declare type ChecksCreateSuiteRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ChecksRerequestSuiteEndpoint = { - owner: string; - repo: string; - check_suite_id: number; -}; -declare type ChecksRerequestSuiteRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type CodesOfConductListConductCodesEndpoint = {}; -declare type CodesOfConductListConductCodesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type CodesOfConductGetConductCodeEndpoint = { - key: string; -}; -declare type CodesOfConductGetConductCodeRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type CodesOfConductGetForRepoEndpoint = { - owner: string; - repo: string; -}; -declare type CodesOfConductGetForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type EmojisGetEndpoint = {}; -declare type EmojisGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsListPublicForUserEndpoint = { - username: string; - since?: string; - per_page?: number; - page?: number; -}; -declare type GistsListPublicForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsListEndpoint = { - since?: string; - per_page?: number; - page?: number; -}; -declare type GistsListRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsListPublicEndpoint = { - since?: string; - per_page?: number; - page?: number; -}; -declare type GistsListPublicRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsListStarredEndpoint = { - since?: string; - per_page?: number; - page?: number; -}; -declare type GistsListStarredRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsGetEndpoint = { - gist_id: string; -}; -declare type GistsGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsGetRevisionEndpoint = { - gist_id: string; - sha: string; -}; -declare type GistsGetRevisionRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsCreateEndpoint = { - files: object; - "files.content"?: string; - description?: string; - public?: boolean; -}; -declare type GistsCreateRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsUpdateEndpoint = { - gist_id: string; - description?: string; - files?: object; - "files.content"?: string; - "files.filename"?: string; -}; -declare type GistsUpdateRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsListCommitsEndpoint = { - gist_id: string; - per_page?: number; - page?: number; -}; -declare type GistsListCommitsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsStarEndpoint = { - gist_id: string; -}; -declare type GistsStarRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsUnstarEndpoint = { - gist_id: string; -}; -declare type GistsUnstarRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsCheckIsStarredEndpoint = { - gist_id: string; -}; -declare type GistsCheckIsStarredRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsForkEndpoint = { - gist_id: string; -}; -declare type GistsForkRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsListForksEndpoint = { - gist_id: string; - per_page?: number; - page?: number; -}; -declare type GistsListForksRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsDeleteEndpoint = { - gist_id: string; -}; -declare type GistsDeleteRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsListCommentsEndpoint = { - gist_id: string; - per_page?: number; - page?: number; -}; -declare type GistsListCommentsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsGetCommentEndpoint = { - gist_id: string; - comment_id: number; -}; -declare type GistsGetCommentRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsCreateCommentEndpoint = { - gist_id: string; - body: string; -}; -declare type GistsCreateCommentRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsUpdateCommentEndpoint = { - gist_id: string; - comment_id: number; - body: string; -}; -declare type GistsUpdateCommentRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GistsDeleteCommentEndpoint = { - gist_id: string; - comment_id: number; -}; -declare type GistsDeleteCommentRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitGetBlobEndpoint = { - owner: string; - repo: string; - file_sha: string; -}; -declare type GitGetBlobRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitCreateBlobEndpoint = { - owner: string; - repo: string; - content: string; - encoding?: string; -}; -declare type GitCreateBlobRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitGetCommitEndpoint = { - owner: string; - repo: string; - commit_sha: string; -}; -declare type GitGetCommitRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitCreateCommitEndpoint = { - owner: string; - repo: string; - message: string; - tree: string; - parents: string[]; - author?: object; - "author.name"?: string; - "author.email"?: string; - "author.date"?: string; - committer?: object; - "committer.name"?: string; - "committer.email"?: string; - "committer.date"?: string; - signature?: string; -}; -declare type GitCreateCommitRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitGetRefEndpoint = { - owner: string; - repo: string; - ref: string; -}; -declare type GitGetRefRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitListRefsEndpoint = { - owner: string; - repo: string; - namespace?: string; - per_page?: number; - page?: number; -}; -declare type GitListRefsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitCreateRefEndpoint = { - owner: string; - repo: string; - ref: string; - sha: string; -}; -declare type GitCreateRefRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitUpdateRefEndpoint = { - owner: string; - repo: string; - ref: string; - sha: string; - force?: boolean; -}; -declare type GitUpdateRefRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitDeleteRefEndpoint = { - owner: string; - repo: string; - ref: string; -}; -declare type GitDeleteRefRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitGetTagEndpoint = { - owner: string; - repo: string; - tag_sha: string; -}; -declare type GitGetTagRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitCreateTagEndpoint = { - owner: string; - repo: string; - tag: string; - message: string; - object: string; - type: string; - tagger?: object; - "tagger.name"?: string; - "tagger.email"?: string; - "tagger.date"?: string; -}; -declare type GitCreateTagRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitGetTreeEndpoint = { - owner: string; - repo: string; - tree_sha: string; - recursive?: number; -}; -declare type GitGetTreeRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitCreateTreeEndpoint = { - owner: string; - repo: string; - tree: object[]; - "tree[].path"?: string; - "tree[].mode"?: string; - "tree[].type"?: string; - "tree[].sha"?: string; - "tree[].content"?: string; - base_tree?: string; -}; -declare type GitCreateTreeRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitignoreListTemplatesEndpoint = {}; -declare type GitignoreListTemplatesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type GitignoreGetTemplateEndpoint = { - name: string; -}; -declare type GitignoreGetTemplateRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type InteractionsGetRestrictionsForOrgEndpoint = { - org: string; -}; -declare type InteractionsGetRestrictionsForOrgRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type InteractionsAddOrUpdateRestrictionsForOrgEndpoint = { - org: string; - limit: string; -}; -declare type InteractionsAddOrUpdateRestrictionsForOrgRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type InteractionsRemoveRestrictionsForOrgEndpoint = { - org: string; -}; -declare type InteractionsRemoveRestrictionsForOrgRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type InteractionsGetRestrictionsForRepoEndpoint = { - owner: string; - repo: string; -}; -declare type InteractionsGetRestrictionsForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type InteractionsAddOrUpdateRestrictionsForRepoEndpoint = { - owner: string; - repo: string; - limit: string; -}; -declare type InteractionsAddOrUpdateRestrictionsForRepoRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type InteractionsRemoveRestrictionsForRepoEndpoint = { - owner: string; - repo: string; -}; -declare type InteractionsRemoveRestrictionsForRepoRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListEndpoint = { - filter?: string; - state?: string; - labels?: string; - sort?: string; - direction?: string; - since?: string; - per_page?: number; - page?: number; -}; -declare type IssuesListRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListForAuthenticatedUserEndpoint = { - filter?: string; - state?: string; - labels?: string; - sort?: string; - direction?: string; - since?: string; - per_page?: number; - page?: number; -}; -declare type IssuesListForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListForOrgEndpoint = { - org: string; - filter?: string; - state?: string; - labels?: string; - sort?: string; - direction?: string; - since?: string; - per_page?: number; - page?: number; -}; -declare type IssuesListForOrgRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListForRepoEndpoint = { - owner: string; - repo: string; - milestone?: string; - state?: string; - assignee?: string; - creator?: string; - mentioned?: string; - labels?: string; - sort?: string; - direction?: string; - since?: string; - per_page?: number; - page?: number; -}; -declare type IssuesListForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesGetEndpoint = { - owner: string; - repo: string; - issue_number: number; - number?: number; -}; -declare type IssuesGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesCreateEndpoint = { - owner: string; - repo: string; - title: string; - body?: string; - assignee?: string; - milestone?: number; - labels?: string[]; - assignees?: string[]; -}; -declare type IssuesCreateRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesUpdateEndpoint = { - owner: string; - repo: string; - issue_number: number; - title?: string; - body?: string; - assignee?: string; - state?: string; - milestone?: number | null; - labels?: string[]; - assignees?: string[]; - number?: number; -}; -declare type IssuesUpdateRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesLockEndpoint = { - owner: string; - repo: string; - issue_number: number; - lock_reason?: string; - number?: number; -}; -declare type IssuesLockRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesUnlockEndpoint = { - owner: string; - repo: string; - issue_number: number; - number?: number; -}; -declare type IssuesUnlockRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListAssigneesEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type IssuesListAssigneesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesCheckAssigneeEndpoint = { - owner: string; - repo: string; - assignee: string; -}; -declare type IssuesCheckAssigneeRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesAddAssigneesEndpoint = { - owner: string; - repo: string; - issue_number: number; - assignees?: string[]; - number?: number; -}; -declare type IssuesAddAssigneesRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesRemoveAssigneesEndpoint = { - owner: string; - repo: string; - issue_number: number; - assignees?: string[]; - number?: number; -}; -declare type IssuesRemoveAssigneesRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListCommentsEndpoint = { - owner: string; - repo: string; - issue_number: number; - since?: string; - per_page?: number; - page?: number; - number?: number; -}; -declare type IssuesListCommentsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListCommentsForRepoEndpoint = { - owner: string; - repo: string; - sort?: string; - direction?: string; - since?: string; -}; -declare type IssuesListCommentsForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesGetCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; - per_page?: number; - page?: number; -}; -declare type IssuesGetCommentRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesCreateCommentEndpoint = { - owner: string; - repo: string; - issue_number: number; - body: string; - number?: number; -}; -declare type IssuesCreateCommentRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesUpdateCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; - body: string; -}; -declare type IssuesUpdateCommentRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesDeleteCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; -}; -declare type IssuesDeleteCommentRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListEventsEndpoint = { - owner: string; - repo: string; - issue_number: number; - per_page?: number; - page?: number; - number?: number; -}; -declare type IssuesListEventsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListEventsForRepoEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type IssuesListEventsForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesGetEventEndpoint = { - owner: string; - repo: string; - event_id: number; -}; -declare type IssuesGetEventRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListLabelsForRepoEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type IssuesListLabelsForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesGetLabelEndpoint = { - owner: string; - repo: string; - name: string; -}; -declare type IssuesGetLabelRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesCreateLabelEndpoint = { - owner: string; - repo: string; - name: string; - color: string; - description?: string; -}; -declare type IssuesCreateLabelRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesUpdateLabelEndpoint = { - owner: string; - repo: string; - current_name: string; - name?: string; - color?: string; - description?: string; -}; -declare type IssuesUpdateLabelRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesDeleteLabelEndpoint = { - owner: string; - repo: string; - name: string; -}; -declare type IssuesDeleteLabelRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListLabelsOnIssueEndpoint = { - owner: string; - repo: string; - issue_number: number; - per_page?: number; - page?: number; - number?: number; -}; -declare type IssuesListLabelsOnIssueRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesAddLabelsEndpoint = { - owner: string; - repo: string; - issue_number: number; - labels: string[]; - number?: number; -}; -declare type IssuesAddLabelsRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesRemoveLabelEndpoint = { - owner: string; - repo: string; - issue_number: number; - name: string; - number?: number; -}; -declare type IssuesRemoveLabelRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesReplaceLabelsEndpoint = { - owner: string; - repo: string; - issue_number: number; - labels?: string[]; - number?: number; -}; -declare type IssuesReplaceLabelsRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesRemoveLabelsEndpoint = { - owner: string; - repo: string; - issue_number: number; - number?: number; -}; -declare type IssuesRemoveLabelsRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListLabelsForMilestoneEndpoint = { - owner: string; - repo: string; - milestone_number: number; - per_page?: number; - page?: number; - number?: number; -}; -declare type IssuesListLabelsForMilestoneRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListMilestonesForRepoEndpoint = { - owner: string; - repo: string; - state?: string; - sort?: string; - direction?: string; - per_page?: number; - page?: number; -}; -declare type IssuesListMilestonesForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesGetMilestoneEndpoint = { - owner: string; - repo: string; - milestone_number: number; - number?: number; -}; -declare type IssuesGetMilestoneRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesCreateMilestoneEndpoint = { - owner: string; - repo: string; - title: string; - state?: string; - description?: string; - due_on?: string; -}; -declare type IssuesCreateMilestoneRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesUpdateMilestoneEndpoint = { - owner: string; - repo: string; - milestone_number: number; - title?: string; - state?: string; - description?: string; - due_on?: string; - number?: number; -}; -declare type IssuesUpdateMilestoneRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesDeleteMilestoneEndpoint = { - owner: string; - repo: string; - milestone_number: number; - number?: number; -}; -declare type IssuesDeleteMilestoneRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type IssuesListEventsForTimelineEndpoint = { - owner: string; - repo: string; - issue_number: number; - per_page?: number; - page?: number; - number?: number; -}; -declare type IssuesListEventsForTimelineRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type LicensesListCommonlyUsedEndpoint = {}; -declare type LicensesListCommonlyUsedRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type LicensesListEndpoint = {}; -declare type LicensesListRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type LicensesGetEndpoint = { - license: string; -}; -declare type LicensesGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type LicensesGetForRepoEndpoint = { - owner: string; - repo: string; -}; -declare type LicensesGetForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MarkdownRenderEndpoint = { - text: string; - mode?: string; - context?: string; -}; -declare type MarkdownRenderRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MarkdownRenderRawEndpoint = { - data: string; -}; -declare type MarkdownRenderRawRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MetaGetEndpoint = {}; -declare type MetaGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsStartForOrgEndpoint = { - org: string; - repositories: string[]; - lock_repositories?: boolean; - exclude_attachments?: boolean; -}; -declare type MigrationsStartForOrgRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsListForOrgEndpoint = { - org: string; - per_page?: number; - page?: number; -}; -declare type MigrationsListForOrgRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsGetStatusForOrgEndpoint = { - org: string; - migration_id: number; -}; -declare type MigrationsGetStatusForOrgRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsGetArchiveForOrgEndpoint = { - org: string; - migration_id: number; -}; -declare type MigrationsGetArchiveForOrgRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsDeleteArchiveForOrgEndpoint = { - org: string; - migration_id: number; -}; -declare type MigrationsDeleteArchiveForOrgRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsUnlockRepoForOrgEndpoint = { - org: string; - migration_id: number; - repo_name: string; -}; -declare type MigrationsUnlockRepoForOrgRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsStartImportEndpoint = { - owner: string; - repo: string; - vcs_url: string; - vcs?: string; - vcs_username?: string; - vcs_password?: string; - tfvc_project?: string; -}; -declare type MigrationsStartImportRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsGetImportProgressEndpoint = { - owner: string; - repo: string; -}; -declare type MigrationsGetImportProgressRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsUpdateImportEndpoint = { - owner: string; - repo: string; - vcs_username?: string; - vcs_password?: string; -}; -declare type MigrationsUpdateImportRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsGetCommitAuthorsEndpoint = { - owner: string; - repo: string; - since?: string; -}; -declare type MigrationsGetCommitAuthorsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsMapCommitAuthorEndpoint = { - owner: string; - repo: string; - author_id: number; - email?: string; - name?: string; -}; -declare type MigrationsMapCommitAuthorRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsSetLfsPreferenceEndpoint = { - owner: string; - repo: string; - use_lfs: string; -}; -declare type MigrationsSetLfsPreferenceRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsGetLargeFilesEndpoint = { - owner: string; - repo: string; -}; -declare type MigrationsGetLargeFilesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsCancelImportEndpoint = { - owner: string; - repo: string; -}; -declare type MigrationsCancelImportRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsStartForAuthenticatedUserEndpoint = { - repositories: string[]; - lock_repositories?: boolean; - exclude_attachments?: boolean; -}; -declare type MigrationsStartForAuthenticatedUserRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsListForAuthenticatedUserEndpoint = { - per_page?: number; - page?: number; -}; -declare type MigrationsListForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsGetStatusForAuthenticatedUserEndpoint = { - migration_id: number; -}; -declare type MigrationsGetStatusForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsGetArchiveForAuthenticatedUserEndpoint = { - migration_id: number; -}; -declare type MigrationsGetArchiveForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsDeleteArchiveForAuthenticatedUserEndpoint = { - migration_id: number; -}; -declare type MigrationsDeleteArchiveForAuthenticatedUserRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type MigrationsUnlockRepoForAuthenticatedUserEndpoint = { - migration_id: number; - repo_name: string; -}; -declare type MigrationsUnlockRepoForAuthenticatedUserRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsListGrantsEndpoint = { - per_page?: number; - page?: number; -}; -declare type OauthAuthorizationsListGrantsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsGetGrantEndpoint = { - grant_id: number; -}; -declare type OauthAuthorizationsGetGrantRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsDeleteGrantEndpoint = { - grant_id: number; -}; -declare type OauthAuthorizationsDeleteGrantRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsListAuthorizationsEndpoint = { - per_page?: number; - page?: number; -}; -declare type OauthAuthorizationsListAuthorizationsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsGetAuthorizationEndpoint = { - authorization_id: number; -}; -declare type OauthAuthorizationsGetAuthorizationRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsCreateAuthorizationEndpoint = { - scopes?: string[]; - note: string; - note_url?: string; - client_id?: string; - client_secret?: string; - fingerprint?: string; -}; -declare type OauthAuthorizationsCreateAuthorizationRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsGetOrCreateAuthorizationForAppEndpoint = { - client_id: string; - client_secret: string; - scopes?: string[]; - note?: string; - note_url?: string; - fingerprint?: string; -}; -declare type OauthAuthorizationsGetOrCreateAuthorizationForAppRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintEndpoint = { - client_id: string; - fingerprint: string; - client_secret: string; - scopes?: string[]; - note?: string; - note_url?: string; -}; -declare type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintEndpoint = { - client_id: string; - fingerprint: string; - client_secret: string; - scopes?: string[]; - note?: string; - note_url?: string; -}; -declare type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsUpdateAuthorizationEndpoint = { - authorization_id: number; - scopes?: string[]; - add_scopes?: string[]; - remove_scopes?: string[]; - note?: string; - note_url?: string; - fingerprint?: string; -}; -declare type OauthAuthorizationsUpdateAuthorizationRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsDeleteAuthorizationEndpoint = { - authorization_id: number; -}; -declare type OauthAuthorizationsDeleteAuthorizationRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsCheckAuthorizationEndpoint = { - client_id: string; - access_token: string; -}; -declare type OauthAuthorizationsCheckAuthorizationRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsResetAuthorizationEndpoint = { - client_id: string; - access_token: string; -}; -declare type OauthAuthorizationsResetAuthorizationRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsRevokeAuthorizationForApplicationEndpoint = { - client_id: string; - access_token: string; -}; -declare type OauthAuthorizationsRevokeAuthorizationForApplicationRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OauthAuthorizationsRevokeGrantForApplicationEndpoint = { - client_id: string; - access_token: string; -}; -declare type OauthAuthorizationsRevokeGrantForApplicationRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListForAuthenticatedUserEndpoint = { - per_page?: number; - page?: number; -}; -declare type OrgsListForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListEndpoint = { - since?: string; - per_page?: number; - page?: number; -}; -declare type OrgsListRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListForUserEndpoint = { - username: string; - per_page?: number; - page?: number; -}; -declare type OrgsListForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsGetEndpoint = { - org: string; -}; -declare type OrgsGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsUpdateEndpoint = { - org: string; - billing_email?: string; - company?: string; - email?: string; - location?: string; - name?: string; - description?: string; - has_organization_projects?: boolean; - has_repository_projects?: boolean; - default_repository_permission?: string; - members_can_create_repositories?: boolean; - members_allowed_repository_creation_type?: string; -}; -declare type OrgsUpdateRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListCredentialAuthorizationsEndpoint = { - org: string; -}; -declare type OrgsListCredentialAuthorizationsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsRemoveCredentialAuthorizationEndpoint = { - org: string; - credential_id: number; -}; -declare type OrgsRemoveCredentialAuthorizationRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListBlockedUsersEndpoint = { - org: string; -}; -declare type OrgsListBlockedUsersRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsCheckBlockedUserEndpoint = { - org: string; - username: string; -}; -declare type OrgsCheckBlockedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsBlockUserEndpoint = { - org: string; - username: string; -}; -declare type OrgsBlockUserRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsUnblockUserEndpoint = { - org: string; - username: string; -}; -declare type OrgsUnblockUserRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListHooksEndpoint = { - org: string; - per_page?: number; - page?: number; -}; -declare type OrgsListHooksRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsGetHookEndpoint = { - org: string; - hook_id: number; -}; -declare type OrgsGetHookRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsCreateHookEndpoint = { - org: string; - name: string; - config: object; - "config.url": string; - "config.content_type"?: string; - "config.secret"?: string; - "config.insecure_ssl"?: string; - events?: string[]; - active?: boolean; -}; -declare type OrgsCreateHookRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsUpdateHookEndpoint = { - org: string; - hook_id: number; - config?: object; - "config.url": string; - "config.content_type"?: string; - "config.secret"?: string; - "config.insecure_ssl"?: string; - events?: string[]; - active?: boolean; -}; -declare type OrgsUpdateHookRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsPingHookEndpoint = { - org: string; - hook_id: number; -}; -declare type OrgsPingHookRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsDeleteHookEndpoint = { - org: string; - hook_id: number; -}; -declare type OrgsDeleteHookRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListMembersEndpoint = { - org: string; - filter?: string; - role?: string; - per_page?: number; - page?: number; -}; -declare type OrgsListMembersRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsCheckMembershipEndpoint = { - org: string; - username: string; -}; -declare type OrgsCheckMembershipRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsRemoveMemberEndpoint = { - org: string; - username: string; -}; -declare type OrgsRemoveMemberRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListPublicMembersEndpoint = { - org: string; - per_page?: number; - page?: number; -}; -declare type OrgsListPublicMembersRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsCheckPublicMembershipEndpoint = { - org: string; - username: string; -}; -declare type OrgsCheckPublicMembershipRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsPublicizeMembershipEndpoint = { - org: string; - username: string; -}; -declare type OrgsPublicizeMembershipRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsConcealMembershipEndpoint = { - org: string; - username: string; -}; -declare type OrgsConcealMembershipRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsGetMembershipEndpoint = { - org: string; - username: string; -}; -declare type OrgsGetMembershipRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsAddOrUpdateMembershipEndpoint = { - org: string; - username: string; - role?: string; -}; -declare type OrgsAddOrUpdateMembershipRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsRemoveMembershipEndpoint = { - org: string; - username: string; -}; -declare type OrgsRemoveMembershipRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListInvitationTeamsEndpoint = { - org: string; - invitation_id: number; - per_page?: number; - page?: number; -}; -declare type OrgsListInvitationTeamsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListPendingInvitationsEndpoint = { - org: string; - per_page?: number; - page?: number; -}; -declare type OrgsListPendingInvitationsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsCreateInvitationEndpoint = { - org: string; - invitee_id?: number; - email?: string; - role?: string; - team_ids?: number[]; -}; -declare type OrgsCreateInvitationRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListMembershipsEndpoint = { - state?: string; - per_page?: number; - page?: number; -}; -declare type OrgsListMembershipsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsGetMembershipForAuthenticatedUserEndpoint = { - org: string; -}; -declare type OrgsGetMembershipForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsUpdateMembershipEndpoint = { - org: string; - state: string; -}; -declare type OrgsUpdateMembershipRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsListOutsideCollaboratorsEndpoint = { - org: string; - filter?: string; - per_page?: number; - page?: number; -}; -declare type OrgsListOutsideCollaboratorsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsRemoveOutsideCollaboratorEndpoint = { - org: string; - username: string; -}; -declare type OrgsRemoveOutsideCollaboratorRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type OrgsConvertMemberToOutsideCollaboratorEndpoint = { - org: string; - username: string; -}; -declare type OrgsConvertMemberToOutsideCollaboratorRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsListForRepoEndpoint = { - owner: string; - repo: string; - state?: string; - per_page?: number; - page?: number; -}; -declare type ProjectsListForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsListForOrgEndpoint = { - org: string; - state?: string; - per_page?: number; - page?: number; -}; -declare type ProjectsListForOrgRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsListForUserEndpoint = { - username: string; - state?: string; - per_page?: number; - page?: number; -}; -declare type ProjectsListForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsGetEndpoint = { - project_id: number; - per_page?: number; - page?: number; -}; -declare type ProjectsGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsCreateForRepoEndpoint = { - owner: string; - repo: string; - name: string; - body?: string; - per_page?: number; - page?: number; -}; -declare type ProjectsCreateForRepoRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsCreateForOrgEndpoint = { - org: string; - name: string; - body?: string; - per_page?: number; - page?: number; -}; -declare type ProjectsCreateForOrgRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsCreateForAuthenticatedUserEndpoint = { - name: string; - body?: string; - per_page?: number; - page?: number; -}; -declare type ProjectsCreateForAuthenticatedUserRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsUpdateEndpoint = { - project_id: number; - name?: string; - body?: string; - state?: string; - organization_permission?: string; - private?: boolean; - per_page?: number; - page?: number; -}; -declare type ProjectsUpdateRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsDeleteEndpoint = { - project_id: number; -}; -declare type ProjectsDeleteRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsListCardsEndpoint = { - column_id: number; - archived_state?: string; - per_page?: number; - page?: number; -}; -declare type ProjectsListCardsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsGetCardEndpoint = { - card_id: number; -}; -declare type ProjectsGetCardRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsCreateCardEndpoint = { - column_id: number; - note?: string; - content_id?: number; - content_type?: string; -}; -declare type ProjectsCreateCardRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsUpdateCardEndpoint = { - card_id: number; - note?: string; - archived?: boolean; -}; -declare type ProjectsUpdateCardRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsDeleteCardEndpoint = { - card_id: number; -}; -declare type ProjectsDeleteCardRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsMoveCardEndpoint = { - card_id: number; - position: string; - column_id?: number; -}; -declare type ProjectsMoveCardRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsListCollaboratorsEndpoint = { - project_id: number; - affiliation?: string; - per_page?: number; - page?: number; -}; -declare type ProjectsListCollaboratorsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsReviewUserPermissionLevelEndpoint = { - project_id: number; - username: string; -}; -declare type ProjectsReviewUserPermissionLevelRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsAddCollaboratorEndpoint = { - project_id: number; - username: string; - permission?: string; -}; -declare type ProjectsAddCollaboratorRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsRemoveCollaboratorEndpoint = { - project_id: number; - username: string; -}; -declare type ProjectsRemoveCollaboratorRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsListColumnsEndpoint = { - project_id: number; - per_page?: number; - page?: number; -}; -declare type ProjectsListColumnsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsGetColumnEndpoint = { - column_id: number; -}; -declare type ProjectsGetColumnRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsCreateColumnEndpoint = { - project_id: number; - name: string; -}; -declare type ProjectsCreateColumnRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsUpdateColumnEndpoint = { - column_id: number; - name: string; -}; -declare type ProjectsUpdateColumnRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsDeleteColumnEndpoint = { - column_id: number; -}; -declare type ProjectsDeleteColumnRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ProjectsMoveColumnEndpoint = { - column_id: number; - position: string; -}; -declare type ProjectsMoveColumnRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsListEndpoint = { - owner: string; - repo: string; - state?: string; - head?: string; - base?: string; - sort?: string; - direction?: string; - per_page?: number; - page?: number; -}; -declare type PullsListRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsGetEndpoint = { - owner: string; - repo: string; - pull_number: number; - number?: number; -}; -declare type PullsGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsCreateEndpoint = { - owner: string; - repo: string; - title: string; - head: string; - base: string; - body?: string; - maintainer_can_modify?: boolean; - draft?: boolean; -}; -declare type PullsCreateRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsCreateFromIssueEndpoint = { - owner: string; - repo: string; - issue: number; - head: string; - base: string; - maintainer_can_modify?: boolean; - draft?: boolean; -}; -declare type PullsCreateFromIssueRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsUpdateBranchEndpoint = { - owner: string; - repo: string; - pull_number: number; - expected_head_sha?: string; -}; -declare type PullsUpdateBranchRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsUpdateEndpoint = { - owner: string; - repo: string; - pull_number: number; - title?: string; - body?: string; - state?: string; - base?: string; - maintainer_can_modify?: boolean; - number?: number; -}; -declare type PullsUpdateRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsListCommitsEndpoint = { - owner: string; - repo: string; - pull_number: number; - per_page?: number; - page?: number; - number?: number; -}; -declare type PullsListCommitsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsListFilesEndpoint = { - owner: string; - repo: string; - pull_number: number; - per_page?: number; - page?: number; - number?: number; -}; -declare type PullsListFilesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsCheckIfMergedEndpoint = { - owner: string; - repo: string; - pull_number: number; - number?: number; -}; -declare type PullsCheckIfMergedRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsMergeEndpoint = { - owner: string; - repo: string; - pull_number: number; - commit_title?: string; - commit_message?: string; - sha?: string; - merge_method?: string; - number?: number; -}; -declare type PullsMergeRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsListCommentsEndpoint = { - owner: string; - repo: string; - pull_number: number; - sort?: string; - direction?: string; - since?: string; - per_page?: number; - page?: number; - number?: number; -}; -declare type PullsListCommentsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsListCommentsForRepoEndpoint = { - owner: string; - repo: string; - sort?: string; - direction?: string; - since?: string; - per_page?: number; - page?: number; -}; -declare type PullsListCommentsForRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsGetCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; -}; -declare type PullsGetCommentRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsCreateCommentEndpoint = { - owner: string; - repo: string; - pull_number: number; - body: string; - commit_id: string; - path: string; - position: number; - number?: number; -}; -declare type PullsCreateCommentRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsCreateCommentReplyEndpoint = { - owner: string; - repo: string; - pull_number: number; - body: string; - in_reply_to: number; - number?: number; -}; -declare type PullsCreateCommentReplyRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsUpdateCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; - body: string; -}; -declare type PullsUpdateCommentRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsDeleteCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; -}; -declare type PullsDeleteCommentRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsListReviewRequestsEndpoint = { - owner: string; - repo: string; - pull_number: number; - per_page?: number; - page?: number; - number?: number; -}; -declare type PullsListReviewRequestsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsCreateReviewRequestEndpoint = { - owner: string; - repo: string; - pull_number: number; - reviewers?: string[]; - team_reviewers?: string[]; - number?: number; -}; -declare type PullsCreateReviewRequestRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsDeleteReviewRequestEndpoint = { - owner: string; - repo: string; - pull_number: number; - reviewers?: string[]; - team_reviewers?: string[]; - number?: number; -}; -declare type PullsDeleteReviewRequestRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsListReviewsEndpoint = { - owner: string; - repo: string; - pull_number: number; - per_page?: number; - page?: number; - number?: number; -}; -declare type PullsListReviewsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsGetReviewEndpoint = { - owner: string; - repo: string; - pull_number: number; - review_id: number; - number?: number; -}; -declare type PullsGetReviewRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsDeletePendingReviewEndpoint = { - owner: string; - repo: string; - pull_number: number; - review_id: number; - number?: number; -}; -declare type PullsDeletePendingReviewRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsGetCommentsForReviewEndpoint = { - owner: string; - repo: string; - pull_number: number; - review_id: number; - per_page?: number; - page?: number; - number?: number; -}; -declare type PullsGetCommentsForReviewRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsCreateReviewEndpoint = { - owner: string; - repo: string; - pull_number: number; - commit_id?: string; - body?: string; - event?: string; - comments?: object[]; - "comments[].path": string; - "comments[].position": number; - "comments[].body": string; - number?: number; -}; -declare type PullsCreateReviewRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsUpdateReviewEndpoint = { - owner: string; - repo: string; - pull_number: number; - review_id: number; - body: string; - number?: number; -}; -declare type PullsUpdateReviewRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsSubmitReviewEndpoint = { - owner: string; - repo: string; - pull_number: number; - review_id: number; - body?: string; - event: string; - number?: number; -}; -declare type PullsSubmitReviewRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type PullsDismissReviewEndpoint = { - owner: string; - repo: string; - pull_number: number; - review_id: number; - message: string; - number?: number; -}; -declare type PullsDismissReviewRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type RateLimitGetEndpoint = {}; -declare type RateLimitGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsListForCommitCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; - content?: string; - per_page?: number; - page?: number; -}; -declare type ReactionsListForCommitCommentRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsCreateForCommitCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; - content: string; -}; -declare type ReactionsCreateForCommitCommentRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsListForIssueEndpoint = { - owner: string; - repo: string; - issue_number: number; - content?: string; - per_page?: number; - page?: number; - number?: number; -}; -declare type ReactionsListForIssueRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsCreateForIssueEndpoint = { - owner: string; - repo: string; - issue_number: number; - content: string; - number?: number; -}; -declare type ReactionsCreateForIssueRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsListForIssueCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; - content?: string; - per_page?: number; - page?: number; -}; -declare type ReactionsListForIssueCommentRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsCreateForIssueCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; - content: string; -}; -declare type ReactionsCreateForIssueCommentRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsListForPullRequestReviewCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; - content?: string; - per_page?: number; - page?: number; -}; -declare type ReactionsListForPullRequestReviewCommentRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsCreateForPullRequestReviewCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; - content: string; -}; -declare type ReactionsCreateForPullRequestReviewCommentRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsListForTeamDiscussionEndpoint = { - team_id: number; - discussion_number: number; - content?: string; - per_page?: number; - page?: number; -}; -declare type ReactionsListForTeamDiscussionRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsCreateForTeamDiscussionEndpoint = { - team_id: number; - discussion_number: number; - content: string; -}; -declare type ReactionsCreateForTeamDiscussionRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsListForTeamDiscussionCommentEndpoint = { - team_id: number; - discussion_number: number; - comment_number: number; - content?: string; - per_page?: number; - page?: number; -}; -declare type ReactionsListForTeamDiscussionCommentRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsCreateForTeamDiscussionCommentEndpoint = { - team_id: number; - discussion_number: number; - comment_number: number; - content: string; -}; -declare type ReactionsCreateForTeamDiscussionCommentRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReactionsDeleteEndpoint = { - reaction_id: number; -}; -declare type ReactionsDeleteRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListEndpoint = { - visibility?: string; - affiliation?: string; - type?: string; - sort?: string; - direction?: string; - per_page?: number; - page?: number; -}; -declare type ReposListRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListForUserEndpoint = { - username: string; - type?: string; - sort?: string; - direction?: string; - per_page?: number; - page?: number; -}; -declare type ReposListForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListForOrgEndpoint = { - org: string; - type?: string; - sort?: string; - direction?: string; - per_page?: number; - page?: number; -}; -declare type ReposListForOrgRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListPublicEndpoint = { - since?: string; - per_page?: number; - page?: number; -}; -declare type ReposListPublicRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateForAuthenticatedUserEndpoint = { - name: string; - description?: string; - homepage?: string; - private?: boolean; - has_issues?: boolean; - has_projects?: boolean; - has_wiki?: boolean; - is_template?: boolean; - team_id?: number; - auto_init?: boolean; - gitignore_template?: string; - license_template?: string; - allow_squash_merge?: boolean; - allow_merge_commit?: boolean; - allow_rebase_merge?: boolean; -}; -declare type ReposCreateForAuthenticatedUserRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateInOrgEndpoint = { - org: string; - name: string; - description?: string; - homepage?: string; - private?: boolean; - has_issues?: boolean; - has_projects?: boolean; - has_wiki?: boolean; - is_template?: boolean; - team_id?: number; - auto_init?: boolean; - gitignore_template?: string; - license_template?: string; - allow_squash_merge?: boolean; - allow_merge_commit?: boolean; - allow_rebase_merge?: boolean; -}; -declare type ReposCreateInOrgRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateUsingTemplateEndpoint = { - template_owner: string; - template_repo: string; - owner?: string; - name: string; - description?: string; - private?: boolean; -}; -declare type ReposCreateUsingTemplateRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetEndpoint = { - owner: string; - repo: string; -}; -declare type ReposGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUpdateEndpoint = { - owner: string; - repo: string; - name?: string; - description?: string; - homepage?: string; - private?: boolean; - has_issues?: boolean; - has_projects?: boolean; - has_wiki?: boolean; - is_template?: boolean; - default_branch?: string; - allow_squash_merge?: boolean; - allow_merge_commit?: boolean; - allow_rebase_merge?: boolean; - archived?: boolean; -}; -declare type ReposUpdateRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListTopicsEndpoint = { - owner: string; - repo: string; -}; -declare type ReposListTopicsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposReplaceTopicsEndpoint = { - owner: string; - repo: string; - names: string[]; -}; -declare type ReposReplaceTopicsRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCheckVulnerabilityAlertsEndpoint = { - owner: string; - repo: string; -}; -declare type ReposCheckVulnerabilityAlertsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposEnableVulnerabilityAlertsEndpoint = { - owner: string; - repo: string; -}; -declare type ReposEnableVulnerabilityAlertsRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDisableVulnerabilityAlertsEndpoint = { - owner: string; - repo: string; -}; -declare type ReposDisableVulnerabilityAlertsRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposEnableAutomatedSecurityFixesEndpoint = { - owner: string; - repo: string; -}; -declare type ReposEnableAutomatedSecurityFixesRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDisableAutomatedSecurityFixesEndpoint = { - owner: string; - repo: string; -}; -declare type ReposDisableAutomatedSecurityFixesRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListContributorsEndpoint = { - owner: string; - repo: string; - anon?: string; - per_page?: number; - page?: number; -}; -declare type ReposListContributorsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListLanguagesEndpoint = { - owner: string; - repo: string; -}; -declare type ReposListLanguagesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListTeamsEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ReposListTeamsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListTagsEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ReposListTagsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDeleteEndpoint = { - owner: string; - repo: string; -}; -declare type ReposDeleteRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposTransferEndpoint = { - owner: string; - repo: string; - new_owner?: string; - team_ids?: number[]; -}; -declare type ReposTransferRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListBranchesEndpoint = { - owner: string; - repo: string; - protected?: boolean; - per_page?: number; - page?: number; -}; -declare type ReposListBranchesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetBranchEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposGetBranchRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetBranchProtectionEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposGetBranchProtectionRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUpdateBranchProtectionEndpoint = { - owner: string; - repo: string; - branch: string; - required_status_checks: object | null; - "required_status_checks.strict": boolean; - "required_status_checks.contexts": string[]; - enforce_admins: boolean | null; - required_pull_request_reviews: object | null; - "required_pull_request_reviews.dismissal_restrictions"?: object; - "required_pull_request_reviews.dismissal_restrictions.users"?: string[]; - "required_pull_request_reviews.dismissal_restrictions.teams"?: string[]; - "required_pull_request_reviews.dismiss_stale_reviews"?: boolean; - "required_pull_request_reviews.require_code_owner_reviews"?: boolean; - "required_pull_request_reviews.required_approving_review_count"?: number; - restrictions: object | null; - "restrictions.users"?: string[]; - "restrictions.teams"?: string[]; -}; -declare type ReposUpdateBranchProtectionRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRemoveBranchProtectionEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposRemoveBranchProtectionRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetProtectedBranchRequiredStatusChecksEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposGetProtectedBranchRequiredStatusChecksRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUpdateProtectedBranchRequiredStatusChecksEndpoint = { - owner: string; - repo: string; - branch: string; - strict?: boolean; - contexts?: string[]; -}; -declare type ReposUpdateProtectedBranchRequiredStatusChecksRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRemoveProtectedBranchRequiredStatusChecksEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposRemoveProtectedBranchRequiredStatusChecksRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListProtectedBranchRequiredStatusChecksContextsEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposListProtectedBranchRequiredStatusChecksContextsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposReplaceProtectedBranchRequiredStatusChecksContextsEndpoint = { - owner: string; - repo: string; - branch: string; - contexts: string[]; -}; -declare type ReposReplaceProtectedBranchRequiredStatusChecksContextsRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposAddProtectedBranchRequiredStatusChecksContextsEndpoint = { - owner: string; - repo: string; - branch: string; - contexts: string[]; -}; -declare type ReposAddProtectedBranchRequiredStatusChecksContextsRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRemoveProtectedBranchRequiredStatusChecksContextsEndpoint = { - owner: string; - repo: string; - branch: string; - contexts: string[]; -}; -declare type ReposRemoveProtectedBranchRequiredStatusChecksContextsRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetProtectedBranchPullRequestReviewEnforcementEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposGetProtectedBranchPullRequestReviewEnforcementRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUpdateProtectedBranchPullRequestReviewEnforcementEndpoint = { - owner: string; - repo: string; - branch: string; - dismissal_restrictions?: object; - "dismissal_restrictions.users"?: string[]; - "dismissal_restrictions.teams"?: string[]; - dismiss_stale_reviews?: boolean; - require_code_owner_reviews?: boolean; - required_approving_review_count?: number; -}; -declare type ReposUpdateProtectedBranchPullRequestReviewEnforcementRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRemoveProtectedBranchPullRequestReviewEnforcementEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposRemoveProtectedBranchPullRequestReviewEnforcementRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetProtectedBranchRequiredSignaturesEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposGetProtectedBranchRequiredSignaturesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposAddProtectedBranchRequiredSignaturesEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposAddProtectedBranchRequiredSignaturesRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRemoveProtectedBranchRequiredSignaturesEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposRemoveProtectedBranchRequiredSignaturesRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetProtectedBranchAdminEnforcementEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposGetProtectedBranchAdminEnforcementRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposAddProtectedBranchAdminEnforcementEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposAddProtectedBranchAdminEnforcementRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRemoveProtectedBranchAdminEnforcementEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposRemoveProtectedBranchAdminEnforcementRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetProtectedBranchRestrictionsEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposGetProtectedBranchRestrictionsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRemoveProtectedBranchRestrictionsEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposRemoveProtectedBranchRestrictionsRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListProtectedBranchTeamRestrictionsEndpoint = { - owner: string; - repo: string; - branch: string; - per_page?: number; - page?: number; -}; -declare type ReposListProtectedBranchTeamRestrictionsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposReplaceProtectedBranchTeamRestrictionsEndpoint = { - owner: string; - repo: string; - branch: string; - teams: string[]; -}; -declare type ReposReplaceProtectedBranchTeamRestrictionsRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposAddProtectedBranchTeamRestrictionsEndpoint = { - owner: string; - repo: string; - branch: string; - teams: string[]; -}; -declare type ReposAddProtectedBranchTeamRestrictionsRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRemoveProtectedBranchTeamRestrictionsEndpoint = { - owner: string; - repo: string; - branch: string; - teams: string[]; -}; -declare type ReposRemoveProtectedBranchTeamRestrictionsRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListProtectedBranchUserRestrictionsEndpoint = { - owner: string; - repo: string; - branch: string; -}; -declare type ReposListProtectedBranchUserRestrictionsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposReplaceProtectedBranchUserRestrictionsEndpoint = { - owner: string; - repo: string; - branch: string; - users: string[]; -}; -declare type ReposReplaceProtectedBranchUserRestrictionsRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposAddProtectedBranchUserRestrictionsEndpoint = { - owner: string; - repo: string; - branch: string; - users: string[]; -}; -declare type ReposAddProtectedBranchUserRestrictionsRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRemoveProtectedBranchUserRestrictionsEndpoint = { - owner: string; - repo: string; - branch: string; - users: string[]; -}; -declare type ReposRemoveProtectedBranchUserRestrictionsRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListCollaboratorsEndpoint = { - owner: string; - repo: string; - affiliation?: string; - per_page?: number; - page?: number; -}; -declare type ReposListCollaboratorsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCheckCollaboratorEndpoint = { - owner: string; - repo: string; - username: string; -}; -declare type ReposCheckCollaboratorRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetCollaboratorPermissionLevelEndpoint = { - owner: string; - repo: string; - username: string; -}; -declare type ReposGetCollaboratorPermissionLevelRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposAddCollaboratorEndpoint = { - owner: string; - repo: string; - username: string; - permission?: string; -}; -declare type ReposAddCollaboratorRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRemoveCollaboratorEndpoint = { - owner: string; - repo: string; - username: string; -}; -declare type ReposRemoveCollaboratorRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListCommitCommentsEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ReposListCommitCommentsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListCommentsForCommitEndpoint = { - owner: string; - repo: string; - commit_sha: string; - per_page?: number; - page?: number; - ref?: string; -}; -declare type ReposListCommentsForCommitRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateCommitCommentEndpoint = { - owner: string; - repo: string; - commit_sha: string; - body: string; - path?: string; - position?: number; - line?: number; - sha?: string; -}; -declare type ReposCreateCommitCommentRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetCommitCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; -}; -declare type ReposGetCommitCommentRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUpdateCommitCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; - body: string; -}; -declare type ReposUpdateCommitCommentRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDeleteCommitCommentEndpoint = { - owner: string; - repo: string; - comment_id: number; -}; -declare type ReposDeleteCommitCommentRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListCommitsEndpoint = { - owner: string; - repo: string; - sha?: string; - path?: string; - author?: string; - since?: string; - until?: string; - per_page?: number; - page?: number; -}; -declare type ReposListCommitsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetCommitEndpoint = { - owner: string; - repo: string; - ref: string; - sha?: string; - commit_sha?: string; -}; -declare type ReposGetCommitRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetCommitRefShaEndpoint = { - owner: string; - repo: string; - ref: string; -}; -declare type ReposGetCommitRefShaRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCompareCommitsEndpoint = { - owner: string; - repo: string; - base: string; - head: string; -}; -declare type ReposCompareCommitsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListBranchesForHeadCommitEndpoint = { - owner: string; - repo: string; - commit_sha: string; -}; -declare type ReposListBranchesForHeadCommitRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListPullRequestsAssociatedWithCommitEndpoint = { - owner: string; - repo: string; - commit_sha: string; - per_page?: number; - page?: number; -}; -declare type ReposListPullRequestsAssociatedWithCommitRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRetrieveCommunityProfileMetricsEndpoint = { - owner: string; - repo: string; -}; -declare type ReposRetrieveCommunityProfileMetricsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetReadmeEndpoint = { - owner: string; - repo: string; - ref?: string; -}; -declare type ReposGetReadmeRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetContentsEndpoint = { - owner: string; - repo: string; - path: string; - ref?: string; -}; -declare type ReposGetContentsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateOrUpdateFileEndpoint = { - owner: string; - repo: string; - path: string; - message: string; - content: string; - sha?: string; - branch?: string; - committer?: object; - "committer.name": string; - "committer.email": string; - author?: object; - "author.name": string; - "author.email": string; -}; -declare type ReposCreateOrUpdateFileRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateFileEndpoint = { - owner: string; - repo: string; - path: string; - message: string; - content: string; - sha?: string; - branch?: string; - committer?: object; - "committer.name": string; - "committer.email": string; - author?: object; - "author.name": string; - "author.email": string; -}; -declare type ReposCreateFileRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUpdateFileEndpoint = { - owner: string; - repo: string; - path: string; - message: string; - content: string; - sha?: string; - branch?: string; - committer?: object; - "committer.name": string; - "committer.email": string; - author?: object; - "author.name": string; - "author.email": string; -}; -declare type ReposUpdateFileRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDeleteFileEndpoint = { - owner: string; - repo: string; - path: string; - message: string; - sha: string; - branch?: string; - committer?: object; - "committer.name"?: string; - "committer.email"?: string; - author?: object; - "author.name"?: string; - "author.email"?: string; -}; -declare type ReposDeleteFileRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetArchiveLinkEndpoint = { - owner: string; - repo: string; - archive_format: string; - ref: string; -}; -declare type ReposGetArchiveLinkRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListDeploymentsEndpoint = { - owner: string; - repo: string; - sha?: string; - ref?: string; - task?: string; - environment?: string; - per_page?: number; - page?: number; -}; -declare type ReposListDeploymentsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetDeploymentEndpoint = { - owner: string; - repo: string; - deployment_id: number; -}; -declare type ReposGetDeploymentRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateDeploymentEndpoint = { - owner: string; - repo: string; - ref: string; - task?: string; - auto_merge?: boolean; - required_contexts?: string[]; - payload?: string; - environment?: string; - description?: string; - transient_environment?: boolean; - production_environment?: boolean; -}; -declare type ReposCreateDeploymentRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListDeploymentStatusesEndpoint = { - owner: string; - repo: string; - deployment_id: number; - per_page?: number; - page?: number; -}; -declare type ReposListDeploymentStatusesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetDeploymentStatusEndpoint = { - owner: string; - repo: string; - deployment_id: number; - status_id: number; -}; -declare type ReposGetDeploymentStatusRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateDeploymentStatusEndpoint = { - owner: string; - repo: string; - deployment_id: number; - state: string; - target_url?: string; - log_url?: string; - description?: string; - environment?: string; - environment_url?: string; - auto_inactive?: boolean; -}; -declare type ReposCreateDeploymentStatusRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListDownloadsEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ReposListDownloadsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetDownloadEndpoint = { - owner: string; - repo: string; - download_id: number; -}; -declare type ReposGetDownloadRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDeleteDownloadEndpoint = { - owner: string; - repo: string; - download_id: number; -}; -declare type ReposDeleteDownloadRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListForksEndpoint = { - owner: string; - repo: string; - sort?: string; - per_page?: number; - page?: number; -}; -declare type ReposListForksRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateForkEndpoint = { - owner: string; - repo: string; - organization?: string; -}; -declare type ReposCreateForkRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListHooksEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ReposListHooksRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetHookEndpoint = { - owner: string; - repo: string; - hook_id: number; -}; -declare type ReposGetHookRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateHookEndpoint = { - owner: string; - repo: string; - name?: string; - config: object; - "config.url": string; - "config.content_type"?: string; - "config.secret"?: string; - "config.insecure_ssl"?: string; - events?: string[]; - active?: boolean; -}; -declare type ReposCreateHookRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUpdateHookEndpoint = { - owner: string; - repo: string; - hook_id: number; - config?: object; - "config.url": string; - "config.content_type"?: string; - "config.secret"?: string; - "config.insecure_ssl"?: string; - events?: string[]; - add_events?: string[]; - remove_events?: string[]; - active?: boolean; -}; -declare type ReposUpdateHookRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposTestPushHookEndpoint = { - owner: string; - repo: string; - hook_id: number; -}; -declare type ReposTestPushHookRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposPingHookEndpoint = { - owner: string; - repo: string; - hook_id: number; -}; -declare type ReposPingHookRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDeleteHookEndpoint = { - owner: string; - repo: string; - hook_id: number; -}; -declare type ReposDeleteHookRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListInvitationsEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ReposListInvitationsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDeleteInvitationEndpoint = { - owner: string; - repo: string; - invitation_id: number; -}; -declare type ReposDeleteInvitationRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUpdateInvitationEndpoint = { - owner: string; - repo: string; - invitation_id: number; - permissions?: string; -}; -declare type ReposUpdateInvitationRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListInvitationsForAuthenticatedUserEndpoint = { - per_page?: number; - page?: number; -}; -declare type ReposListInvitationsForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposAcceptInvitationEndpoint = { - invitation_id: number; -}; -declare type ReposAcceptInvitationRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDeclineInvitationEndpoint = { - invitation_id: number; -}; -declare type ReposDeclineInvitationRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListDeployKeysEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ReposListDeployKeysRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetDeployKeyEndpoint = { - owner: string; - repo: string; - key_id: number; -}; -declare type ReposGetDeployKeyRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposAddDeployKeyEndpoint = { - owner: string; - repo: string; - title?: string; - key: string; - read_only?: boolean; -}; -declare type ReposAddDeployKeyRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRemoveDeployKeyEndpoint = { - owner: string; - repo: string; - key_id: number; -}; -declare type ReposRemoveDeployKeyRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposMergeEndpoint = { - owner: string; - repo: string; - base: string; - head: string; - commit_message?: string; -}; -declare type ReposMergeRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetPagesEndpoint = { - owner: string; - repo: string; -}; -declare type ReposGetPagesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposEnablePagesSiteEndpoint = { - owner: string; - repo: string; - source?: object; - "source.branch"?: string; - "source.path"?: string; -}; -declare type ReposEnablePagesSiteRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDisablePagesSiteEndpoint = { - owner: string; - repo: string; -}; -declare type ReposDisablePagesSiteRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUpdateInformationAboutPagesSiteEndpoint = { - owner: string; - repo: string; - cname?: string; - source?: string; -}; -declare type ReposUpdateInformationAboutPagesSiteRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposRequestPageBuildEndpoint = { - owner: string; - repo: string; -}; -declare type ReposRequestPageBuildRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListPagesBuildsEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ReposListPagesBuildsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetLatestPagesBuildEndpoint = { - owner: string; - repo: string; -}; -declare type ReposGetLatestPagesBuildRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetPagesBuildEndpoint = { - owner: string; - repo: string; - build_id: number; -}; -declare type ReposGetPagesBuildRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListReleasesEndpoint = { - owner: string; - repo: string; - per_page?: number; - page?: number; -}; -declare type ReposListReleasesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetReleaseEndpoint = { - owner: string; - repo: string; - release_id: number; -}; -declare type ReposGetReleaseRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetLatestReleaseEndpoint = { - owner: string; - repo: string; -}; -declare type ReposGetLatestReleaseRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetReleaseByTagEndpoint = { - owner: string; - repo: string; - tag: string; -}; -declare type ReposGetReleaseByTagRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateReleaseEndpoint = { - owner: string; - repo: string; - tag_name: string; - target_commitish?: string; - name?: string; - body?: string; - draft?: boolean; - prerelease?: boolean; -}; -declare type ReposCreateReleaseRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUpdateReleaseEndpoint = { - owner: string; - repo: string; - release_id: number; - tag_name?: string; - target_commitish?: string; - name?: string; - body?: string; - draft?: boolean; - prerelease?: boolean; -}; -declare type ReposUpdateReleaseRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDeleteReleaseEndpoint = { - owner: string; - repo: string; - release_id: number; -}; -declare type ReposDeleteReleaseRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListAssetsForReleaseEndpoint = { - owner: string; - repo: string; - release_id: number; - per_page?: number; - page?: number; -}; -declare type ReposListAssetsForReleaseRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUploadReleaseAssetEndpoint = { - url: string; - headers: object; - "headers.content-length": number; - "headers.content-type": string; - name: string; - label?: string; - file: string | object; -}; -declare type ReposUploadReleaseAssetRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetReleaseAssetEndpoint = { - owner: string; - repo: string; - asset_id: number; -}; -declare type ReposGetReleaseAssetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposUpdateReleaseAssetEndpoint = { - owner: string; - repo: string; - asset_id: number; - name?: string; - label?: string; -}; -declare type ReposUpdateReleaseAssetRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposDeleteReleaseAssetEndpoint = { - owner: string; - repo: string; - asset_id: number; -}; -declare type ReposDeleteReleaseAssetRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetContributorsStatsEndpoint = { - owner: string; - repo: string; -}; -declare type ReposGetContributorsStatsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetCommitActivityStatsEndpoint = { - owner: string; - repo: string; -}; -declare type ReposGetCommitActivityStatsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetCodeFrequencyStatsEndpoint = { - owner: string; - repo: string; -}; -declare type ReposGetCodeFrequencyStatsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetParticipationStatsEndpoint = { - owner: string; - repo: string; -}; -declare type ReposGetParticipationStatsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetPunchCardStatsEndpoint = { - owner: string; - repo: string; -}; -declare type ReposGetPunchCardStatsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposCreateStatusEndpoint = { - owner: string; - repo: string; - sha: string; - state: string; - target_url?: string; - description?: string; - context?: string; -}; -declare type ReposCreateStatusRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposListStatusesForRefEndpoint = { - owner: string; - repo: string; - ref: string; - per_page?: number; - page?: number; -}; -declare type ReposListStatusesForRefRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetCombinedStatusForRefEndpoint = { - owner: string; - repo: string; - ref: string; -}; -declare type ReposGetCombinedStatusForRefRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetTopReferrersEndpoint = { - owner: string; - repo: string; -}; -declare type ReposGetTopReferrersRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetTopPathsEndpoint = { - owner: string; - repo: string; -}; -declare type ReposGetTopPathsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetViewsEndpoint = { - owner: string; - repo: string; - per?: string; -}; -declare type ReposGetViewsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ReposGetClonesEndpoint = { - owner: string; - repo: string; - per?: string; -}; -declare type ReposGetClonesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ScimListProvisionedIdentitiesEndpoint = { - org: string; - startIndex?: number; - count?: number; - filter?: string; -}; -declare type ScimListProvisionedIdentitiesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ScimGetProvisioningDetailsForUserEndpoint = { - org: string; - scim_user_id: number; - external_identity_guid?: number; -}; -declare type ScimGetProvisioningDetailsForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ScimProvisionAndInviteUsersEndpoint = { - org: string; -}; -declare type ScimProvisionAndInviteUsersRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ScimProvisionInviteUsersEndpoint = { - org: string; -}; -declare type ScimProvisionInviteUsersRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ScimReplaceProvisionedUserInformationEndpoint = { - org: string; - scim_user_id: number; - external_identity_guid?: number; -}; -declare type ScimReplaceProvisionedUserInformationRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ScimUpdateProvisionedOrgMembershipEndpoint = { - org: string; - scim_user_id: number; - external_identity_guid?: number; -}; -declare type ScimUpdateProvisionedOrgMembershipRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ScimUpdateUserAttributeEndpoint = { - org: string; - scim_user_id: number; - external_identity_guid?: number; -}; -declare type ScimUpdateUserAttributeRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type ScimRemoveUserFromOrgEndpoint = { - org: string; - scim_user_id: number; - external_identity_guid?: number; -}; -declare type ScimRemoveUserFromOrgRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchReposEndpoint = { - q: string; - sort?: string; - order?: string; - per_page?: number; - page?: number; -}; -declare type SearchReposRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchCommitsEndpoint = { - q: string; - sort?: string; - order?: string; - per_page?: number; - page?: number; -}; -declare type SearchCommitsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchCodeEndpoint = { - q: string; - sort?: string; - order?: string; - per_page?: number; - page?: number; -}; -declare type SearchCodeRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchIssuesAndPullRequestsEndpoint = { - q: string; - sort?: string; - order?: string; - per_page?: number; - page?: number; -}; -declare type SearchIssuesAndPullRequestsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchIssuesEndpoint = { - q: string; - sort?: string; - order?: string; - per_page?: number; - page?: number; -}; -declare type SearchIssuesRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchUsersEndpoint = { - q: string; - sort?: string; - order?: string; - per_page?: number; - page?: number; -}; -declare type SearchUsersRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchTopicsEndpoint = { - q: string; -}; -declare type SearchTopicsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchLabelsEndpoint = { - repository_id: number; - q: string; - sort?: string; - order?: string; -}; -declare type SearchLabelsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchIssuesLegacyEndpoint = { - owner: string; - repository: string; - state: string; - keyword: string; -}; -declare type SearchIssuesLegacyRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchReposLegacyEndpoint = { - keyword: string; - language?: string; - start_page?: string; - sort?: string; - order?: string; -}; -declare type SearchReposLegacyRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchUsersLegacyEndpoint = { - keyword: string; - start_page?: string; - sort?: string; - order?: string; -}; -declare type SearchUsersLegacyRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type SearchEmailLegacyEndpoint = { - email: string; -}; -declare type SearchEmailLegacyRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsListEndpoint = { - org: string; - per_page?: number; - page?: number; -}; -declare type TeamsListRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsGetEndpoint = { - team_id: number; -}; -declare type TeamsGetRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsGetByNameEndpoint = { - org: string; - team_slug: string; -}; -declare type TeamsGetByNameRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsCreateEndpoint = { - org: string; - name: string; - description?: string; - maintainers?: string[]; - repo_names?: string[]; - privacy?: string; - permission?: string; - parent_team_id?: number; -}; -declare type TeamsCreateRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsUpdateEndpoint = { - team_id: number; - name: string; - description?: string; - privacy?: string; - permission?: string; - parent_team_id?: number; -}; -declare type TeamsUpdateRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsDeleteEndpoint = { - team_id: number; -}; -declare type TeamsDeleteRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsListChildEndpoint = { - team_id: number; - per_page?: number; - page?: number; -}; -declare type TeamsListChildRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsListReposEndpoint = { - team_id: number; - per_page?: number; - page?: number; -}; -declare type TeamsListReposRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsCheckManagesRepoEndpoint = { - team_id: number; - owner: string; - repo: string; -}; -declare type TeamsCheckManagesRepoRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsAddOrUpdateRepoEndpoint = { - team_id: number; - owner: string; - repo: string; - permission?: string; -}; -declare type TeamsAddOrUpdateRepoRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsRemoveRepoEndpoint = { - team_id: number; - owner: string; - repo: string; -}; -declare type TeamsRemoveRepoRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsListForAuthenticatedUserEndpoint = { - per_page?: number; - page?: number; -}; -declare type TeamsListForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsListProjectsEndpoint = { - team_id: number; - per_page?: number; - page?: number; -}; -declare type TeamsListProjectsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsReviewProjectEndpoint = { - team_id: number; - project_id: number; -}; -declare type TeamsReviewProjectRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsAddOrUpdateProjectEndpoint = { - team_id: number; - project_id: number; - permission?: string; -}; -declare type TeamsAddOrUpdateProjectRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsRemoveProjectEndpoint = { - team_id: number; - project_id: number; -}; -declare type TeamsRemoveProjectRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsListDiscussionCommentsEndpoint = { - team_id: number; - discussion_number: number; - direction?: string; - per_page?: number; - page?: number; -}; -declare type TeamsListDiscussionCommentsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsGetDiscussionCommentEndpoint = { - team_id: number; - discussion_number: number; - comment_number: number; -}; -declare type TeamsGetDiscussionCommentRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsCreateDiscussionCommentEndpoint = { - team_id: number; - discussion_number: number; - body: string; -}; -declare type TeamsCreateDiscussionCommentRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsUpdateDiscussionCommentEndpoint = { - team_id: number; - discussion_number: number; - comment_number: number; - body: string; -}; -declare type TeamsUpdateDiscussionCommentRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsDeleteDiscussionCommentEndpoint = { - team_id: number; - discussion_number: number; - comment_number: number; -}; -declare type TeamsDeleteDiscussionCommentRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsListDiscussionsEndpoint = { - team_id: number; - direction?: string; - per_page?: number; - page?: number; -}; -declare type TeamsListDiscussionsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsGetDiscussionEndpoint = { - team_id: number; - discussion_number: number; -}; -declare type TeamsGetDiscussionRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsCreateDiscussionEndpoint = { - team_id: number; - title: string; - body: string; - private?: boolean; -}; -declare type TeamsCreateDiscussionRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsUpdateDiscussionEndpoint = { - team_id: number; - discussion_number: number; - title?: string; - body?: string; -}; -declare type TeamsUpdateDiscussionRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsDeleteDiscussionEndpoint = { - team_id: number; - discussion_number: number; -}; -declare type TeamsDeleteDiscussionRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsListMembersEndpoint = { - team_id: number; - role?: string; - per_page?: number; - page?: number; -}; -declare type TeamsListMembersRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsGetMemberEndpoint = { - team_id: number; - username: string; -}; -declare type TeamsGetMemberRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsAddMemberEndpoint = { - team_id: number; - username: string; -}; -declare type TeamsAddMemberRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsRemoveMemberEndpoint = { - team_id: number; - username: string; -}; -declare type TeamsRemoveMemberRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsGetMembershipEndpoint = { - team_id: number; - username: string; -}; -declare type TeamsGetMembershipRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsAddOrUpdateMembershipEndpoint = { - team_id: number; - username: string; - role?: string; -}; -declare type TeamsAddOrUpdateMembershipRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsRemoveMembershipEndpoint = { - team_id: number; - username: string; -}; -declare type TeamsRemoveMembershipRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsListPendingInvitationsEndpoint = { - team_id: number; - per_page?: number; - page?: number; -}; -declare type TeamsListPendingInvitationsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsListIdPGroupsForOrgEndpoint = { - org: string; - per_page?: number; - page?: number; -}; -declare type TeamsListIdPGroupsForOrgRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsListIdPGroupsEndpoint = { - team_id: number; -}; -declare type TeamsListIdPGroupsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type TeamsCreateOrUpdateIdPGroupConnectionsEndpoint = { - team_id: number; - groups: object[]; - "groups[].group_id": string; - "groups[].group_name": string; - "groups[].group_description": string; -}; -declare type TeamsCreateOrUpdateIdPGroupConnectionsRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersGetByUsernameEndpoint = { - username: string; -}; -declare type UsersGetByUsernameRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersGetAuthenticatedEndpoint = {}; -declare type UsersGetAuthenticatedRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersUpdateAuthenticatedEndpoint = { - name?: string; - email?: string; - blog?: string; - company?: string; - location?: string; - hireable?: boolean; - bio?: string; -}; -declare type UsersUpdateAuthenticatedRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersGetContextForUserEndpoint = { - username: string; - subject_type?: string; - subject_id?: string; -}; -declare type UsersGetContextForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListEndpoint = { - since?: string; - per_page?: number; - page?: number; -}; -declare type UsersListRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListBlockedEndpoint = {}; -declare type UsersListBlockedRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersCheckBlockedEndpoint = { - username: string; -}; -declare type UsersCheckBlockedRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersBlockEndpoint = { - username: string; -}; -declare type UsersBlockRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersUnblockEndpoint = { - username: string; -}; -declare type UsersUnblockRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListEmailsEndpoint = { - per_page?: number; - page?: number; -}; -declare type UsersListEmailsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListPublicEmailsEndpoint = { - per_page?: number; - page?: number; -}; -declare type UsersListPublicEmailsRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersAddEmailsEndpoint = { - emails: string[]; -}; -declare type UsersAddEmailsRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersDeleteEmailsEndpoint = { - emails: string[]; -}; -declare type UsersDeleteEmailsRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersTogglePrimaryEmailVisibilityEndpoint = { - email: string; - visibility: string; -}; -declare type UsersTogglePrimaryEmailVisibilityRequestOptions = { - method: "PATCH"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListFollowersForUserEndpoint = { - username: string; - per_page?: number; - page?: number; -}; -declare type UsersListFollowersForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListFollowersForAuthenticatedUserEndpoint = { - per_page?: number; - page?: number; -}; -declare type UsersListFollowersForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListFollowingForUserEndpoint = { - username: string; - per_page?: number; - page?: number; -}; -declare type UsersListFollowingForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListFollowingForAuthenticatedUserEndpoint = { - per_page?: number; - page?: number; -}; -declare type UsersListFollowingForAuthenticatedUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersCheckFollowingEndpoint = { - username: string; -}; -declare type UsersCheckFollowingRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersCheckFollowingForUserEndpoint = { - username: string; - target_user: string; -}; -declare type UsersCheckFollowingForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersFollowEndpoint = { - username: string; -}; -declare type UsersFollowRequestOptions = { - method: "PUT"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersUnfollowEndpoint = { - username: string; -}; -declare type UsersUnfollowRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListGpgKeysForUserEndpoint = { - username: string; - per_page?: number; - page?: number; -}; -declare type UsersListGpgKeysForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListGpgKeysEndpoint = { - per_page?: number; - page?: number; -}; -declare type UsersListGpgKeysRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersGetGpgKeyEndpoint = { - gpg_key_id: number; -}; -declare type UsersGetGpgKeyRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersCreateGpgKeyEndpoint = { - armored_public_key?: string; -}; -declare type UsersCreateGpgKeyRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersDeleteGpgKeyEndpoint = { - gpg_key_id: number; -}; -declare type UsersDeleteGpgKeyRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListPublicKeysForUserEndpoint = { - username: string; - per_page?: number; - page?: number; -}; -declare type UsersListPublicKeysForUserRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersListPublicKeysEndpoint = { - per_page?: number; - page?: number; -}; -declare type UsersListPublicKeysRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersGetPublicKeyEndpoint = { - key_id: number; -}; -declare type UsersGetPublicKeyRequestOptions = { - method: "GET"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersCreatePublicKeyEndpoint = { - title?: string; - key?: string; -}; -declare type UsersCreatePublicKeyRequestOptions = { - method: "POST"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -declare type UsersDeletePublicKeyEndpoint = { - key_id: number; -}; -declare type UsersDeletePublicKeyRequestOptions = { - method: "DELETE"; - url: Url; - headers: Headers; - request: EndpointRequestOptions; -}; -export {}; diff --git a/node_modules/@octokit/endpoint/dist-types/index.d.ts b/node_modules/@octokit/endpoint/dist-types/index.d.ts deleted file mode 100644 index 9977f0902..000000000 --- a/node_modules/@octokit/endpoint/dist-types/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const endpoint: import("./types").endpoint; diff --git a/node_modules/@octokit/endpoint/dist-types/merge.d.ts b/node_modules/@octokit/endpoint/dist-types/merge.d.ts deleted file mode 100644 index 966470f97..000000000 --- a/node_modules/@octokit/endpoint/dist-types/merge.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Defaults, Route, Parameters } from "./types"; -export declare function merge(defaults: Defaults | null, route?: Route | Parameters, options?: Parameters): Defaults; diff --git a/node_modules/@octokit/endpoint/dist-types/parse.d.ts b/node_modules/@octokit/endpoint/dist-types/parse.d.ts deleted file mode 100644 index 3bc65d692..000000000 --- a/node_modules/@octokit/endpoint/dist-types/parse.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Defaults, RequestOptions } from "./types"; -export declare function parse(options: Defaults): RequestOptions; diff --git a/node_modules/@octokit/endpoint/dist-types/types.d.ts b/node_modules/@octokit/endpoint/dist-types/types.d.ts deleted file mode 100644 index 979c064fb..000000000 --- a/node_modules/@octokit/endpoint/dist-types/types.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { Routes as KnownRoutes } from "./generated/routes"; -export interface endpoint { - /** - * Transforms a GitHub REST API endpoint into generic request options - * - * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. - */ - (options: Endpoint): RequestOptions; - /** - * Transforms a GitHub REST API endpoint into generic request options - * - * @param {string} route Request method + URL. Example: `'GET /orgs/:org'` - * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. - */ - (route: keyof KnownRoutes | R, options?: R extends keyof KnownRoutes ? KnownRoutes[R][0] & Parameters : Parameters): R extends keyof KnownRoutes ? KnownRoutes[R][1] : RequestOptions; - /** - * Object with current default route and parameters - */ - DEFAULTS: Defaults; - /** - * Returns a new `endpoint` with updated route and parameters - */ - defaults: (newDefaults: Parameters) => endpoint; - merge: { - /** - * Merges current endpoint defaults with passed route and parameters, - * without transforming them into request options. - * - * @param {string} route Request method + URL. Example: `'GET /orgs/:org'` - * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. - * - */ - (route: Route, parameters?: Parameters): Defaults; - /** - * Merges current endpoint defaults with passed route and parameters, - * without transforming them into request options. - * - * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. - */ - (options: Parameters): Defaults; - /** - * Returns current default options. - * - * @deprecated use endpoint.DEFAULTS instead - */ - (): Defaults; - }; - /** - * Stateless method to turn endpoint options into request options. - * Calling `endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`. - * - * @param {object} options `method`, `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. - */ - parse: (options: Defaults) => RequestOptions; -} -/** - * Request method + URL. Example: `'GET /orgs/:org'` - */ -export declare type Route = string; -/** - * Relative or absolute URL. Examples: `'/orgs/:org'`, `https://example.com/foo/bar` - */ -export declare type Url = string; -/** - * Request method - */ -export declare type Method = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; -/** - * Endpoint parameters - */ -export declare type Parameters = { - /** - * Base URL to be used when a relative URL is passed, such as `/orgs/:org`. - * If `baseUrl` is `https://enterprise.acme-inc.com/api/v3`, then the resulting - * `RequestOptions.url` will be `https://enterprise.acme-inc.com/api/v3/orgs/:org`. - */ - baseUrl?: string; - /** - * HTTP headers. Use lowercase keys. - */ - headers?: Headers; - /** - * Media type options, see {@link https://developer.github.com/v3/media/|GitHub Developer Guide} - */ - mediaType?: { - /** - * `json` by default. Can be `raw`, `text`, `html`, `full`, `diff`, `patch`, `sha`, `base64`. Depending on endpoint - */ - format?: string; - /** - * Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix. - * Example for single preview: `['squirrel-girl']`. - * Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`. - */ - previews?: string[]; - }; - /** - * Pass custom meta information for the request. The `request` object will be returned as is. - */ - request?: EndpointRequestOptions; - /** - * Any additional parameter will be passed as follows - * 1. URL parameter if `':parameter'` or `{parameter}` is part of `url` - * 2. Query parameter if `method` is `'GET'` or `'HEAD'` - * 3. Request body if `parameter` is `'data'` - * 4. JSON in the request body in the form of `body[parameter]` unless `parameter` key is `'data'` - */ - [parameter: string]: any; -}; -export declare type Endpoint = Parameters & { - method: Method; - url: Url; -}; -export declare type Defaults = Parameters & { - method: Method; - baseUrl: string; - headers: Headers & { - accept: string; - "user-agent": string; - }; - mediaType: { - format: string; - previews: string[]; - }; -}; -export declare type RequestOptions = { - method: Method; - url: Url; - headers: Headers; - body?: any; - request?: EndpointRequestOptions; -}; -export declare type Headers = { - /** - * Avoid setting `accept`, use `mediaFormat.{format|previews}` instead. - */ - accept?: string; - /** - * Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678` - */ - authorization?: string; - /** - * `user-agent` is set do a default and can be overwritten as needed. - */ - "user-agent"?: string; - [header: string]: string | number | undefined; -}; -export declare type EndpointRequestOptions = { - [option: string]: any; -}; diff --git a/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts b/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts deleted file mode 100644 index 4b192ac41..000000000 --- a/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare function addQueryParameters(url: string, parameters: { - [x: string]: string | undefined; - q?: string; -}): string; diff --git a/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts b/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts deleted file mode 100644 index 93586d4db..000000000 --- a/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function extractUrlVariableNames(url: string): string[]; diff --git a/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts b/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts deleted file mode 100644 index 1daf30736..000000000 --- a/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare function lowercaseKeys(object?: { - [key: string]: any; -}): { - [key: string]: any; -}; diff --git a/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts b/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts deleted file mode 100644 index 914411cf9..000000000 --- a/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function mergeDeep(defaults: any, options: any): object; diff --git a/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts b/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts deleted file mode 100644 index 06927d6bd..000000000 --- a/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare function omit(object: { - [key: string]: any; -}, keysToOmit: string[]): { - [key: string]: any; -}; diff --git a/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts b/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts deleted file mode 100644 index 5d967cab3..000000000 --- a/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare function parseUrl(template: string): { - expand: (context: object) => string; -}; diff --git a/node_modules/@octokit/endpoint/dist-types/version.d.ts b/node_modules/@octokit/endpoint/dist-types/version.d.ts deleted file mode 100644 index 15711f02c..000000000 --- a/node_modules/@octokit/endpoint/dist-types/version.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const VERSION = "0.0.0-development"; diff --git a/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts deleted file mode 100644 index bdbb3c5d1..000000000 --- a/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Defaults, endpoint, Parameters } from "./types"; -export declare function withDefaults(oldDefaults: Defaults | null, newDefaults: Parameters): endpoint; diff --git a/node_modules/@octokit/endpoint/dist-web/index.js b/node_modules/@octokit/endpoint/dist-web/index.js deleted file mode 100644 index cb6a4bf6b..000000000 --- a/node_modules/@octokit/endpoint/dist-web/index.js +++ /dev/null @@ -1,377 +0,0 @@ -import isPlainObject from 'is-plain-object'; -import { getUserAgent } from 'universal-user-agent'; - -function lowercaseKeys(object) { - if (!object) { - return {}; - } - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} - -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach(key => { - if (isPlainObject(options[key])) { - if (!(key in defaults)) - Object.assign(result, { [key]: options[key] }); - else - result[key] = mergeDeep(defaults[key], options[key]); - } - else { - Object.assign(result, { [key]: options[key] }); - } - }); - return result; -} - -function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); - } - else { - options = route || {}; - } - // lowercase header names before merging with defaults to avoid duplicates - options.headers = lowercaseKeys(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); - // mediaType.previews arrays are merged, instead of overwritten - if (defaults && defaults.mediaType.previews.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews - .filter(preview => !mergedOptions.mediaType.previews.includes(preview)) - .concat(mergedOptions.mediaType.previews); - } - mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); - return mergedOptions; -} - -function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - if (names.length === 0) { - return url; - } - return (url + - separator + - names - .map(name => { - if (name === "q") { - return ("q=" + - parameters - .q.split("+") - .map(encodeURIComponent) - .join("+")); - } - return `${name}=${encodeURIComponent(parameters[name])}`; - }) - .join("&")); -} - -const urlVariableRegex = /\{[^}]+\}/g; -function removeNonChars(variableName) { - return variableName.replace(/^\W+|\W+$/g, "").split(/,/); -} -function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); - if (!matches) { - return []; - } - return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); -} - -function omit(object, keysToOmit) { - return Object.keys(object) - .filter(option => !keysToOmit.includes(option)) - .reduce((obj, key) => { - obj[key] = object[key]; - return obj; - }, {}); -} - -// Based on https://github.com/bramstein/url-template, licensed under BSD -// TODO: create separate package. -// -// Copyright (c) 2012-2014, Bram Stein -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. The name of the author may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -/* istanbul ignore file */ -function encodeReserved(str) { - return str - .split(/(%[0-9A-Fa-f]{2})/g) - .map(function (part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part) - .replace(/%5B/g, "[") - .replace(/%5D/g, "]"); - } - return part; - }) - .join(""); -} -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { - return ("%" + - c - .charCodeAt(0) - .toString(16) - .toUpperCase()); - }); -} -function encodeValue(operator, value, key) { - value = - operator === "+" || operator === "#" - ? encodeReserved(value) - : encodeUnreserved(value); - if (key) { - return encodeUnreserved(key) + "=" + value; - } - else { - return value; - } -} -function isDefined(value) { - return value !== undefined && value !== null; -} -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} -function getValues(context, operator, key, modifier) { - var value = context[key], result = []; - if (isDefined(value) && value !== "") { - if (typeof value === "string" || - typeof value === "number" || - typeof value === "boolean") { - value = value.toString(); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); - } - else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); - }); - } - else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } - else { - const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - tmp.push(encodeValue(operator, value)); - }); - } - else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } - else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } - } - } - } - else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); - } - } - else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } - else if (value === "") { - result.push(""); - } - } - return result; -} -function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - expression.split(/,/g).forEach(function (variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - if (operator && operator !== "+") { - var separator = ","; - if (operator === "?") { - separator = "&"; - } - else if (operator !== "#") { - separator = operator; - } - return (values.length !== 0 ? operator : "") + values.join(separator); - } - else { - return values.join(","); - } - } - else { - return encodeReserved(literal); - } - }); -} - -function parse(options) { - // https://fetch.spec.whatwg.org/#methods - let method = options.method.toUpperCase(); - // replace :varname with {varname} to make it RFC 6570 compatible - let url = options.url.replace(/:([a-z]\w+)/g, "{+$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType" - ]); - // extract variable names from URL to calculate remaining variables later - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - const omittedParameters = Object.keys(options) - .filter(option => urlVariableNames.includes(option)) - .concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequset = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequset) { - if (options.mediaType.format) { - // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw - headers.accept = headers.accept - .split(/,/) - .map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)) - .join(","); - } - if (options.mediaType.previews.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader - .concat(options.mediaType.previews) - .map(preview => { - const format = options.mediaType.format - ? `.${options.mediaType.format}` - : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }) - .join(","); - } - } - // for GET/HEAD requests, set URL query parameters from remaining parameters - // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } - else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } - else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } - else { - headers["content-length"] = 0; - } - } - } - // default content-type for JSON if body is set - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } - // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. - // fetch does not allow to set `content-length` header, but we can set body to an empty string - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } - // Only return body/request keys if present - return Object.assign({ method, url, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null); -} - -function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); -} - -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS = merge(oldDefaults, newDefaults); - const endpoint = endpointWithDefaults.bind(null, DEFAULTS); - return Object.assign(endpoint, { - DEFAULTS, - defaults: withDefaults.bind(null, DEFAULTS), - merge: merge.bind(null, DEFAULTS), - parse - }); -} - -const VERSION = "0.0.0-development"; - -const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; -const DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "", - previews: [] - } -}; - -const endpoint = withDefaults(null, DEFAULTS); - -export { endpoint }; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/endpoint/dist-web/index.js.map b/node_modules/@octokit/endpoint/dist-web/index.js.map deleted file mode 100644 index 1d5218682..000000000 --- a/node_modules/@octokit/endpoint/dist-web/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import isPlainObject from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach(key => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = route || {};\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter(preview => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map(name => {\n if (name === \"q\") {\n return (\"q=\" +\n parameters\n .q.split(\"+\")\n .map(encodeURIComponent)\n .join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter(option => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part)\n .replace(/%5B/g, \"[\")\n .replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return (\"%\" +\n c\n .charCodeAt(0)\n .toString(16)\n .toUpperCase());\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = options.url.replace(/:([a-z]\\w+)/g, \"{+$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter(option => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequset = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequset) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map(preview => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map(preview => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n else {\n headers[\"content-length\"] = 0;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse\n });\n}\n","export const VERSION = \"0.0.0-development\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\",\n previews: []\n }\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":[],"mappings":";;;AAAO,SAAS,aAAa,CAAC,MAAM,EAAE;IAClC,IAAI,CAAC,MAAM,EAAE;QACT,OAAO,EAAE,CAAC;KACb;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;QAC/C,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QACxC,OAAO,MAAM,CAAC;KACjB,EAAE,EAAE,CAAC,CAAC;CACV;;ACPM,SAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE;IACzC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC3C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI;QAChC,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE;YAC7B,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC;gBAClB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;;gBAE/C,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;SAC5D;aACI;YACD,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;SAClD;KACJ,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;CACjB;;ACbM,SAAS,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;KAC7E;SACI;QACD,OAAO,GAAG,KAAK,IAAI,EAAE,CAAC;KACzB;;IAED,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;;IAEzD,IAAI,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;QAChD,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ;aACzD,MAAM,CAAC,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;aACtE,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;KACjD;IACD,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC;IACtH,OAAO,aAAa,CAAC;CACxB;;ACrBM,SAAS,kBAAkB,CAAC,GAAG,EAAE,UAAU,EAAE;IAChD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;IAC7C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC;KACd;IACD,QAAQ,GAAG;QACP,SAAS;QACT,KAAK;aACA,GAAG,CAAC,IAAI,IAAI;YACb,IAAI,IAAI,KAAK,GAAG,EAAE;gBACd,QAAQ,IAAI;oBACR,UAAU;yBACL,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;yBACZ,GAAG,CAAC,kBAAkB,CAAC;yBACvB,IAAI,CAAC,GAAG,CAAC,EAAE;aACvB;YACD,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;SAC5D,CAAC;aACG,IAAI,CAAC,GAAG,CAAC,EAAE;CACvB;;ACpBD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AACtC,SAAS,cAAc,CAAC,YAAY,EAAE;IAClC,OAAO,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;CAC5D;AACD,AAAO,SAAS,uBAAuB,CAAC,GAAG,EAAE;IACzC,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC5C,IAAI,CAAC,OAAO,EAAE;QACV,OAAO,EAAE,CAAC;KACb;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;CACxE;;ACVM,SAAS,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE;IACrC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;SACrB,MAAM,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SAC9C,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;QACtB,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QACvB,OAAO,GAAG,CAAC;KACd,EAAE,EAAE,CAAC,CAAC;CACV;;ACPD;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAS,cAAc,CAAC,GAAG,EAAE;IACzB,OAAO,GAAG;SACL,KAAK,CAAC,oBAAoB,CAAC;SAC3B,GAAG,CAAC,UAAU,IAAI,EAAE;QACrB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC5B,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;iBACjB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;iBACpB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC;KACf,CAAC;SACG,IAAI,CAAC,EAAE,CAAC,CAAC;CACjB;AACD,SAAS,gBAAgB,CAAC,GAAG,EAAE;IAC3B,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;QAC5D,QAAQ,GAAG;YACP,CAAC;iBACI,UAAU,CAAC,CAAC,CAAC;iBACb,QAAQ,CAAC,EAAE,CAAC;iBACZ,WAAW,EAAE,EAAE;KAC3B,CAAC,CAAC;CACN;AACD,SAAS,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;IACvC,KAAK;QACD,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG;cAC9B,cAAc,CAAC,KAAK,CAAC;cACrB,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,GAAG,EAAE;QACL,OAAO,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC;KAC9C;SACI;QACD,OAAO,KAAK,CAAC;KAChB;CACJ;AACD,SAAS,SAAS,CAAC,KAAK,EAAE;IACtB,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;CAChD;AACD,SAAS,aAAa,CAAC,QAAQ,EAAE;IAC7B,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;CACnE;AACD,SAAS,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;IACjD,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;IACtC,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE;QAClC,IAAI,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,KAAK,QAAQ;YACzB,OAAO,KAAK,KAAK,SAAS,EAAE;YAC5B,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;YACzB,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;gBAC9B,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;aACtD;YACD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;SACjF;aACI;YACD,IAAI,QAAQ,KAAK,GAAG,EAAE;gBAClB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBACtB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;wBAC7C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;qBACjF,CAAC,CAAC;iBACN;qBACI;oBACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;wBACpC,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;4BACrB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;yBACnD;qBACJ,CAAC,CAAC;iBACN;aACJ;iBACI;gBACD,MAAM,GAAG,GAAG,EAAE,CAAC;gBACf,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBACtB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;wBAC7C,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;qBAC1C,CAAC,CAAC;iBACN;qBACI;oBACD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;wBACpC,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;4BACrB,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;4BAC9B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;yBACxD;qBACJ,CAAC,CAAC;iBACN;gBACD,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;oBACzB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC5D;qBACI,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;oBACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC9B;aACJ;SACJ;KACJ;SACI;QACD,IAAI,QAAQ,KAAK,GAAG,EAAE;YAClB,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;gBAClB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;aACtC;SACJ;aACI,IAAI,KAAK,KAAK,EAAE,KAAK,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC,EAAE;YAC7D,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;SAC5C;aACI,IAAI,KAAK,KAAK,EAAE,EAAE;YACnB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACnB;KACJ;IACD,OAAO,MAAM,CAAC;CACjB;AACD,AAAO,SAAS,QAAQ,CAAC,QAAQ,EAAE;IAC/B,OAAO;QACH,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;KACtC,CAAC;CACL;AACD,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;IAC/B,IAAI,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACpD,OAAO,QAAQ,CAAC,OAAO,CAAC,4BAA4B,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE;QACpF,IAAI,UAAU,EAAE;YACZ,IAAI,QAAQ,GAAG,EAAE,CAAC;YAClB,MAAM,MAAM,GAAG,EAAE,CAAC;YAClB,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;gBAChD,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAChC,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aACrC;YACD,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,QAAQ,EAAE;gBAC/C,IAAI,GAAG,GAAG,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACrD,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACvE,CAAC,CAAC;YACH,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;gBAC9B,IAAI,SAAS,GAAG,GAAG,CAAC;gBACpB,IAAI,QAAQ,KAAK,GAAG,EAAE;oBAClB,SAAS,GAAG,GAAG,CAAC;iBACnB;qBACI,IAAI,QAAQ,KAAK,GAAG,EAAE;oBACvB,SAAS,GAAG,QAAQ,CAAC;iBACxB;gBACD,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aACzE;iBACI;gBACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aAC3B;SACJ;aACI;YACD,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;SAClC;KACJ,CAAC,CAAC;CACN;;ACrKM,SAAS,KAAK,CAAC,OAAO,EAAE;;IAE3B,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;;IAE1C,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACvD,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD,IAAI,IAAI,CAAC;IACT,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE;QAC3B,QAAQ;QACR,SAAS;QACT,KAAK;QACL,SAAS;QACT,SAAS;QACT,WAAW;KACd,CAAC,CAAC;;IAEH,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtD,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACvC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACpB,GAAG,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;KAC/B;IACD,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;SACzC,MAAM,CAAC,MAAM,IAAI,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACnD,MAAM,CAAC,SAAS,CAAC,CAAC;IACvB,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAChE,MAAM,eAAe,GAAG,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1E,IAAI,CAAC,eAAe,EAAE;QAClB,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;;YAE1B,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;iBAC1B,KAAK,CAAC,GAAG,CAAC;iBACV,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,kDAAkD,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;iBACtI,IAAI,CAAC,GAAG,CAAC,CAAC;SAClB;QACD,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;YACnC,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;YACnF,OAAO,CAAC,MAAM,GAAG,wBAAwB;iBACpC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;iBAClC,GAAG,CAAC,OAAO,IAAI;gBAChB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM;sBACjC,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;sBAC9B,OAAO,CAAC;gBACd,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;aAC/D,CAAC;iBACG,IAAI,CAAC,GAAG,CAAC,CAAC;SAClB;KACJ;;;IAGD,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAClC,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;KACtD;SACI;QACD,IAAI,MAAM,IAAI,mBAAmB,EAAE;YAC/B,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;SACnC;aACI;YACD,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;gBACzC,IAAI,GAAG,mBAAmB,CAAC;aAC9B;iBACI;gBACD,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;aACjC;SACJ;KACJ;;IAED,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QACzD,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;KAC/D;;;IAGD,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QAClE,IAAI,GAAG,EAAE,CAAC;KACb;;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,OAAO,IAAI,KAAK,WAAW,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;CACxJ;;AC9EM,SAAS,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;IAC3D,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;CACjD;;ACDM,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;IACnD,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;QAC3B,QAAQ;QACR,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;QAC3C,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;QACjC,KAAK;KACR,CAAC,CAAC;CACN;;ACZM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACE3C,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;AACrE,AAAO,MAAM,QAAQ,GAAG;IACpB,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE;QACL,MAAM,EAAE,gCAAgC;QACxC,YAAY,EAAE,SAAS;KAC1B;IACD,SAAS,EAAE;QACP,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,EAAE;KACf;CACJ,CAAC;;ACZU,MAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/LICENSE b/node_modules/@octokit/endpoint/node_modules/is-plain-object/LICENSE deleted file mode 100644 index 3f2eca18f..000000000 --- a/node_modules/@octokit/endpoint/node_modules/is-plain-object/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/README.md b/node_modules/@octokit/endpoint/node_modules/is-plain-object/README.md deleted file mode 100644 index 60b7b591f..000000000 --- a/node_modules/@octokit/endpoint/node_modules/is-plain-object/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) - -> Returns true if an object was created by the `Object` constructor. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-plain-object -``` - -Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. - -## Usage - -```js -import isPlainObject from 'is-plain-object'; -``` - -**true** when created by the `Object` constructor. - -```js -isPlainObject(Object.create({})); -//=> true -isPlainObject(Object.create(Object.prototype)); -//=> true -isPlainObject({foo: 'bar'}); -//=> true -isPlainObject({}); -//=> true -``` - -**false** when not created by the `Object` constructor. - -```js -isPlainObject(1); -//=> false -isPlainObject(['foo', 'bar']); -//=> false -isPlainObject([]); -//=> false -isPlainObject(new Foo); -//=> false -isPlainObject(null); -//=> false -isPlainObject(Object.create(null)); -//=> false -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") -* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") -* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 19 | [jonschlinkert](https://github.com/jonschlinkert) | -| 6 | [TrySound](https://github.com/TrySound) | -| 6 | [stevenvachon](https://github.com/stevenvachon) | -| 3 | [onokumus](https://github.com/onokumus) | -| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -### License - -Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.cjs.js b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.cjs.js deleted file mode 100644 index d7dda9510..000000000 --- a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.cjs.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -/*! - * isobject - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -function isObject(val) { - return val != null && typeof val === 'object' && Array.isArray(val) === false; -} - -/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -function isObjectObject(o) { - return isObject(o) === true - && Object.prototype.toString.call(o) === '[object Object]'; -} - -function isPlainObject(o) { - var ctor,prot; - - if (isObjectObject(o) === false) return false; - - // If has modified constructor - ctor = o.constructor; - if (typeof ctor !== 'function') return false; - - // If has modified prototype - prot = ctor.prototype; - if (isObjectObject(prot) === false) return false; - - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; - } - - // Most likely a plain Object - return true; -} - -module.exports = isPlainObject; diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.d.ts b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.d.ts deleted file mode 100644 index fd131f01c..000000000 --- a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isPlainObject(o: any): boolean; - -export default isPlainObject; diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.js b/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.js deleted file mode 100644 index 565ce9e43..000000000 --- a/node_modules/@octokit/endpoint/node_modules/is-plain-object/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -import isObject from 'isobject'; - -function isObjectObject(o) { - return isObject(o) === true - && Object.prototype.toString.call(o) === '[object Object]'; -} - -export default function isPlainObject(o) { - var ctor,prot; - - if (isObjectObject(o) === false) return false; - - // If has modified constructor - ctor = o.constructor; - if (typeof ctor !== 'function') return false; - - // If has modified prototype - prot = ctor.prototype; - if (isObjectObject(prot) === false) return false; - - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; - } - - // Most likely a plain Object - return true; -}; diff --git a/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json b/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json deleted file mode 100644 index 2cdcf0845..000000000 --- a/node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "_args": [ - [ - "is-plain-object@3.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "is-plain-object@3.0.0", - "_id": "is-plain-object@3.0.0", - "_inBundle": false, - "_integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", - "_location": "/@octokit/endpoint/is-plain-object", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-plain-object@3.0.0", - "name": "is-plain-object", - "escapedName": "is-plain-object", - "rawSpec": "3.0.0", - "saveSpec": null, - "fetchSpec": "3.0.0" - }, - "_requiredBy": [ - "/@octokit/endpoint" - ], - "_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", - "_spec": "3.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-plain-object/issues" - }, - "contributors": [ - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Osman Nuri Okumuş", - "url": "http://onokumus.com" - }, - { - "name": "Steven Vachon", - "url": "https://svachon.com" - }, - { - "url": "https://github.com/wtgtybhertgeghgtwtg" - } - ], - "dependencies": { - "isobject": "^4.0.0" - }, - "description": "Returns true if an object was created by the `Object` constructor.", - "devDependencies": { - "chai": "^4.2.0", - "esm": "^3.2.22", - "gulp-format-md": "^1.0.0", - "mocha": "^6.1.4", - "mocha-headless-chrome": "^2.0.2", - "rollup": "^1.10.1", - "rollup-plugin-node-resolve": "^4.2.3" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.d.ts", - "index.js", - "index.cjs.js" - ], - "homepage": "https://github.com/jonschlinkert/is-plain-object", - "keywords": [ - "check", - "is", - "is-object", - "isobject", - "javascript", - "kind", - "kind-of", - "object", - "plain", - "type", - "typeof", - "value" - ], - "license": "MIT", - "main": "index.cjs.js", - "module": "index.js", - "name": "is-plain-object", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-plain-object.git" - }, - "scripts": { - "build": "rollup -c", - "prepare": "rollup -c", - "test": "npm run test_node && npm run build && npm run test_browser", - "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", - "test_node": "mocha -r esm" - }, - "types": "index.d.ts", - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "is-number", - "isobject", - "kind-of" - ] - }, - "lint": { - "reflinks": true - } - }, - "version": "3.0.0" -} diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/LICENSE b/node_modules/@octokit/endpoint/node_modules/isobject/LICENSE deleted file mode 100644 index 943e71d05..000000000 --- a/node_modules/@octokit/endpoint/node_modules/isobject/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/README.md b/node_modules/@octokit/endpoint/node_modules/isobject/README.md deleted file mode 100644 index 1c6e21fa0..000000000 --- a/node_modules/@octokit/endpoint/node_modules/isobject/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) - -> Returns true if the value is an object and not an array or null. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save isobject -``` - -Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install isobject -``` - -## Usage - -```js -import isObject from 'isobject'; -``` - -**True** - -All of the following return `true`: - -```js -isObject({}); -isObject(Object.create({})); -isObject(Object.create(Object.prototype)); -isObject(Object.create(null)); -isObject({}); -isObject(new Foo); -isObject(/foo/); -``` - -**False** - -All of the following return `false`: - -```js -isObject(); -isObject(function () {}); -isObject(1); -isObject([]); -isObject(undefined); -isObject(null); -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") -* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") -* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") -* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 30 | [jonschlinkert](https://github.com/jonschlinkert) | -| 8 | [doowb](https://github.com/doowb) | -| 7 | [TrySound](https://github.com/TrySound) | -| 3 | [onokumus](https://github.com/onokumus) | -| 1 | [LeSuisse](https://github.com/LeSuisse) | -| 1 | [tmcw](https://github.com/tmcw) | -| 1 | [ZhouHansen](https://github.com/ZhouHansen) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -### License - -Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/index.cjs.js b/node_modules/@octokit/endpoint/node_modules/isobject/index.cjs.js deleted file mode 100644 index 49debe736..000000000 --- a/node_modules/@octokit/endpoint/node_modules/isobject/index.cjs.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -/*! - * isobject - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -function isObject(val) { - return val != null && typeof val === 'object' && Array.isArray(val) === false; -} - -module.exports = isObject; diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/index.d.ts b/node_modules/@octokit/endpoint/node_modules/isobject/index.d.ts deleted file mode 100644 index c471c7156..000000000 --- a/node_modules/@octokit/endpoint/node_modules/isobject/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isObject(val: any): boolean; - -export default isObject; diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/index.js b/node_modules/@octokit/endpoint/node_modules/isobject/index.js deleted file mode 100644 index e9f038225..000000000 --- a/node_modules/@octokit/endpoint/node_modules/isobject/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * isobject - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -export default function isObject(val) { - return val != null && typeof val === 'object' && Array.isArray(val) === false; -}; diff --git a/node_modules/@octokit/endpoint/node_modules/isobject/package.json b/node_modules/@octokit/endpoint/node_modules/isobject/package.json deleted file mode 100644 index 2c6d10a0b..000000000 --- a/node_modules/@octokit/endpoint/node_modules/isobject/package.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "_args": [ - [ - "isobject@4.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "isobject@4.0.0", - "_id": "isobject@4.0.0", - "_inBundle": false, - "_integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", - "_location": "/@octokit/endpoint/isobject", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "isobject@4.0.0", - "name": "isobject", - "escapedName": "isobject", - "rawSpec": "4.0.0", - "saveSpec": null, - "fetchSpec": "4.0.0" - }, - "_requiredBy": [ - "/@octokit/endpoint/is-plain-object" - ], - "_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", - "_spec": "4.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/isobject/issues" - }, - "contributors": [ - { - "url": "https://github.com/LeSuisse" - }, - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Magnús Dæhlen", - "url": "https://github.com/magnudae" - }, - { - "name": "Tom MacWright", - "url": "https://macwright.org" - } - ], - "dependencies": {}, - "description": "Returns true if the value is an object and not an array or null.", - "devDependencies": { - "esm": "^3.2.22", - "gulp-format-md": "^0.1.9", - "mocha": "^2.4.5", - "rollup": "^1.10.1" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.d.ts", - "index.cjs.js", - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/isobject", - "keywords": [ - "check", - "is", - "is-object", - "isobject", - "kind", - "kind-of", - "kindof", - "native", - "object", - "type", - "typeof", - "value" - ], - "license": "MIT", - "main": "index.cjs.js", - "module": "index.js", - "name": "isobject", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/isobject.git" - }, - "scripts": { - "build": "rollup -i index.js -o index.cjs.js -f cjs", - "prepublish": "npm run build", - "test": "mocha -r esm" - }, - "types": "index.d.ts", - "verb": { - "related": { - "list": [ - "extend-shallow", - "is-plain-object", - "kind-of", - "merge-deep" - ] - }, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "reflinks": [ - "verb" - ] - }, - "version": "4.0.0" -} diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/LICENSE.md b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/LICENSE.md deleted file mode 100644 index f105ab0c0..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -# [ISC License](https://spdx.org/licenses/ISC) - -Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/README.md b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/README.md deleted file mode 100644 index d00d14c1f..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# universal-user-agent - -> Get a user agent string in both browser and node - -[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) -[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) -[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) - -```js -const { getUserAgent } = require("universal-user-agent"); -// or import { getUserAgent } from "universal-user-agent"; - -const userAgent = getUserAgent(); -// userAgent will look like this -// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" -// in node: Node.js/v8.9.4 (macOS High Sierra; x64) -``` - -## Credits - -The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). - -## License - -[ISC](LICENSE.md) diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js deleted file mode 100644 index 80a07105f..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var osName = _interopDefault(require('os-name')); - -function getUserAgent() { - try { - return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; - } catch (error) { - if (/wmic os get Caption/.test(error.message)) { - return "Windows "; - } - - throw error; - } -} - -exports.getUserAgent = getUserAgent; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js.map b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js.map deleted file mode 100644 index aff09ec41..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/node.js"],"sourcesContent":["import osName from \"os-name\";\nexport function getUserAgent() {\n try {\n return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;\n }\n catch (error) {\n if (/wmic os get Caption/.test(error.message)) {\n return \"Windows \";\n }\n throw error;\n }\n}\n"],"names":["getUserAgent","process","version","substr","osName","arch","error","test","message"],"mappings":";;;;;;;;AACO,SAASA,YAAT,GAAwB;MACvB;WACQ,WAAUC,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIC,MAAM,EAAG,KAAIH,OAAO,CAACI,IAAK,GAA1E;GADJ,CAGA,OAAOC,KAAP,EAAc;QACN,sBAAsBC,IAAtB,CAA2BD,KAAK,CAACE,OAAjC,CAAJ,EAA+C;aACpC,gCAAP;;;UAEEF,KAAN;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/browser.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/browser.js deleted file mode 100644 index 6f52232cb..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/browser.js +++ /dev/null @@ -1,3 +0,0 @@ -export function getUserAgent() { - return navigator.userAgent; -} diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/index.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/index.js deleted file mode 100644 index c6253f5ad..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/index.js +++ /dev/null @@ -1 +0,0 @@ -export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/node.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/node.js deleted file mode 100644 index 8b70a038c..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/node.js +++ /dev/null @@ -1,12 +0,0 @@ -import osName from "os-name"; -export function getUserAgent() { - try { - return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; - } - catch (error) { - if (/wmic os get Caption/.test(error.message)) { - return "Windows "; - } - throw error; - } -} diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/browser.d.ts b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/browser.d.ts deleted file mode 100644 index a7bb1c440..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/browser.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/index.d.ts b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/index.d.ts deleted file mode 100644 index c6253f5ad..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/node.d.ts b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/node.d.ts deleted file mode 100644 index a7bb1c440..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/node.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js deleted file mode 100644 index 11ec79b32..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js +++ /dev/null @@ -1,6 +0,0 @@ -function getUserAgent() { - return navigator.userAgent; -} - -export { getUserAgent }; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js.map b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js.map deleted file mode 100644 index 549407ecb..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/browser.js"],"sourcesContent":["export function getUserAgent() {\n return navigator.userAgent;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;IAC3B,OAAO,SAAS,CAAC,SAAS,CAAC;CAC9B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json b/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json deleted file mode 100644 index 0e2022d60..000000000 --- a/node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_args": [ - [ - "universal-user-agent@4.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "universal-user-agent@4.0.0", - "_id": "universal-user-agent@4.0.0", - "_inBundle": false, - "_integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==", - "_location": "/@octokit/endpoint/universal-user-agent", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "universal-user-agent@4.0.0", - "name": "universal-user-agent", - "escapedName": "universal-user-agent", - "rawSpec": "4.0.0", - "saveSpec": null, - "fetchSpec": "4.0.0" - }, - "_requiredBy": [ - "/@octokit/endpoint" - ], - "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz", - "_spec": "4.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "bugs": { - "url": "https://github.com/gr2m/universal-user-agent/issues" - }, - "dependencies": { - "os-name": "^3.1.0" - }, - "description": "Get a user agent string in both browser and node", - "devDependencies": { - "@gr2m/pika-plugin-build-web": "^0.6.0-issue-84.1", - "@pika/pack": "^0.5.0", - "@pika/plugin-build-node": "^0.6.0", - "@pika/plugin-ts-standard-pkg": "^0.6.0", - "@types/jest": "^24.0.18", - "jest": "^24.9.0", - "prettier": "^1.18.2", - "semantic-release": "^15.9.15", - "ts-jest": "^24.0.2", - "typescript": "^3.6.2" - }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/gr2m/universal-user-agent#readme", - "keywords": [], - "license": "ISC", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "universal-user-agent", - "pika": true, - "repository": { - "type": "git", - "url": "git+https://github.com/gr2m/universal-user-agent.git" - }, - "sideEffects": false, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "version": "4.0.0" -} diff --git a/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/endpoint/package.json deleted file mode 100644 index 0720353a8..000000000 --- a/node_modules/@octokit/endpoint/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_args": [ - [ - "@octokit/endpoint@5.3.5", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "@octokit/endpoint@5.3.5", - "_id": "@octokit/endpoint@5.3.5", - "_inBundle": false, - "_integrity": "sha512-f8KqzIrnzPLiezDsZZPB+K8v8YSv6aKFl7eOu59O46lmlW4HagWl1U6NWl6LmT8d1w7NsKBI3paVtzcnRGO1gw==", - "_location": "/@octokit/endpoint", - "_phantomChildren": { - "os-name": "3.1.0" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "@octokit/endpoint@5.3.5", - "name": "@octokit/endpoint", - "escapedName": "@octokit%2fendpoint", - "scope": "@octokit", - "rawSpec": "5.3.5", - "saveSpec": null, - "fetchSpec": "5.3.5" - }, - "_requiredBy": [ - "/@octokit/request" - ], - "_resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.3.5.tgz", - "_spec": "5.3.5", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "bugs": { - "url": "https://github.com/octokit/endpoint.js/issues" - }, - "dependencies": { - "is-plain-object": "^3.0.0", - "universal-user-agent": "^4.0.0" - }, - "description": "Turns REST API endpoints into generic request options", - "devDependencies": { - "@octokit/routes": "20.9.2", - "@pika/pack": "^0.5.0", - "@pika/plugin-build-node": "^0.6.0", - "@pika/plugin-build-web": "^0.6.0", - "@pika/plugin-ts-standard-pkg": "^0.6.0", - "@types/jest": "^24.0.11", - "handlebars": "^4.1.2", - "jest": "^24.7.1", - "lodash.set": "^4.3.2", - "pascal-case": "^2.0.1", - "prettier": "1.18.2", - "semantic-release": "^15.13.8", - "semantic-release-plugin-update-version-in-files": "^1.0.0", - "string-to-jsdoc-comment": "^1.0.0", - "ts-jest": "^24.0.2", - "typescript": "^3.4.5" - }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/octokit/endpoint.js#readme", - "keywords": [ - "octokit", - "github", - "api", - "rest" - ], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "@octokit/endpoint", - "pika": true, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/endpoint.js.git" - }, - "sideEffects": false, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "version": "5.3.5" -} diff --git a/node_modules/@octokit/graphql/LICENSE b/node_modules/@octokit/graphql/LICENSE deleted file mode 100644 index af5366d0d..000000000 --- a/node_modules/@octokit/graphql/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2018 Octokit contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@octokit/graphql/README.md b/node_modules/@octokit/graphql/README.md deleted file mode 100644 index 4e44592ce..000000000 --- a/node_modules/@octokit/graphql/README.md +++ /dev/null @@ -1,292 +0,0 @@ -# graphql.js - -> GitHub GraphQL API client for browsers and Node - -[![@latest](https://img.shields.io/npm/v/@octokit/graphql.svg)](https://www.npmjs.com/package/@octokit/graphql) -[![Build Status](https://travis-ci.com/octokit/graphql.js.svg?branch=master)](https://travis-ci.com/octokit/graphql.js) -[![Coverage Status](https://coveralls.io/repos/github/octokit/graphql.js/badge.svg)](https://coveralls.io/github/octokit/graphql.js) -[![Greenkeeper](https://badges.greenkeeper.io/octokit/graphql.js.svg)](https://greenkeeper.io/) - - - -- [Usage](#usage) -- [Errors](#errors) -- [Writing tests](#writing-tests) -- [License](#license) - - - -## Usage - -Send a simple query - -```js -const graphql = require('@octokit/graphql') -const { repository } = await graphql(`{ - repository(owner:"octokit", name:"graphql.js") { - issues(last:3) { - edges { - node { - title - } - } - } - } -}`, { - headers: { - authorization: `token secret123` - } -}) -``` - -⚠️ Do not use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) in the query strings as they make your code vulnerable to query injection attacks (see [#2](https://github.com/octokit/graphql.js/issues/2)). Use variables instead: - -```js -const graphql = require('@octokit/graphql') -const { lastIssues } = await graphql(`query lastIssues($owner: String!, $repo: String!, $num: Int = 3) { - repository(owner:$owner, name:$repo) { - issues(last:$num) { - edges { - node { - title - } - } - } - } - }`, { - owner: 'octokit', - repo: 'graphql.js' - headers: { - authorization: `token secret123` - } - } -}) -``` - -Create two new clients and set separate default configs for them. - -```js -const graphql1 = require('@octokit/graphql').defaults({ - headers: { - authorization: `token secret123` - } -}) - -const graphql2 = require('@octokit/graphql').defaults({ - headers: { - authorization: `token foobar` - } -}) -``` - -Create two clients, the second inherits config from the first. - -```js -const graphql1 = require('@octokit/graphql').defaults({ - headers: { - authorization: `token secret123` - } -}) - -const graphql2 = graphql1.defaults({ - headers: { - 'user-agent': 'my-user-agent/v1.2.3' - } -}) -``` - -Create a new client with default options and run query - -```js -const graphql = require('@octokit/graphql').defaults({ - headers: { - authorization: `token secret123` - } -}) -const { repository } = await graphql(`{ - repository(owner:"octokit", name:"graphql.js") { - issues(last:3) { - edges { - node { - title - } - } - } - } -}`) -``` - -Pass query together with headers and variables - -```js -const graphql = require('@octokit/graphql') -const { lastIssues } = await graphql({ - query: `query lastIssues($owner: String!, $repo: String!, $num: Int = 3) { - repository(owner:$owner, name:$repo) { - issues(last:$num) { - edges { - node { - title - } - } - } - } - }`, - owner: 'octokit', - repo: 'graphql.js' - headers: { - authorization: `token secret123` - } -}) -``` - -Use with GitHub Enterprise - -```js -const graphql = require('@octokit/graphql').defaults({ - baseUrl: 'https://github-enterprise.acme-inc.com/api', - headers: { - authorization: `token secret123` - } -}) -const { repository } = await graphql(`{ - repository(owner:"acme-project", name:"acme-repo") { - issues(last:3) { - edges { - node { - title - } - } - } - } -}`) -``` - -## Errors - -In case of a GraphQL error, `error.message` is set to the first error from the response’s `errors` array. All errors can be accessed at `error.errors`. `error.request` has the request options such as query, variables and headers set for easier debugging. - -```js -const graphql = require('@octokit/graphql').defaults({ - headers: { - authorization: `token secret123` - } -}) -const query = `{ - viewer { - bioHtml - } -}` - -try { - const result = await graphql(query) -} catch (error) { - // server responds with - // { - // "data": null, - // "errors": [{ - // "message": "Field 'bioHtml' doesn't exist on type 'User'", - // "locations": [{ - // "line": 3, - // "column": 5 - // }] - // }] - // } - - console.log('Request failed:', error.request) // { query, variables: {}, headers: { authorization: 'token secret123' } } - console.log(error.message) // Field 'bioHtml' doesn't exist on type 'User' -} -``` - -## Partial responses - -A GraphQL query may respond with partial data accompanied by errors. In this case we will throw an error but the partial data will still be accessible through `error.data` - -```js -const graphql = require('@octokit/graphql').defaults({ - headers: { - authorization: `token secret123` - } -}) -const query = `{ - repository(name: "probot", owner: "probot") { - name - ref(qualifiedName: "master") { - target { - ... on Commit { - history(first: 25, after: "invalid cursor") { - nodes { - message - } - } - } - } - } - } -}` - -try { - const result = await graphql(query) -} catch (error) { - // server responds with - // {  - // "data": {  - // "repository": {  - // "name": "probot",  - // "ref": null  - // }  - // },  - // "errors": [  - // {  - // "type": "INVALID_CURSOR_ARGUMENTS",  - // "path": [  - // "repository",  - // "ref",  - // "target",  - // "history"  - // ],  - // "locations": [  - // {  - // "line": 7,  - // "column": 11  - // }  - // ],  - // "message": "`invalid cursor` does not appear to be a valid cursor."  - // }  - // ]  - // }  - - console.log('Request failed:', error.request) // { query, variables: {}, headers: { authorization: 'token secret123' } } - console.log(error.message) // `invalid cursor` does not appear to be a valid cursor. - console.log(error.data) // { repository: { name: 'probot', ref: null } } -} -``` - -## Writing tests - -You can pass a replacement for [the built-in fetch implementation](https://github.com/bitinn/node-fetch) as `request.fetch` option. For example, using [fetch-mock](http://www.wheresrhys.co.uk/fetch-mock/) works great to write tests - -```js -const assert = require('assert') -const fetchMock = require('fetch-mock/es5/server') - -const graphql = require('@octokit/graphql') - -graphql('{ viewer { login } }', { - headers: { - authorization: 'token secret123' - }, - request: { - fetch: fetchMock.sandbox() - .post('https://api.github.com/graphql', (url, options) => { - assert.strictEqual(options.headers.authorization, 'token secret123') - assert.strictEqual(options.body, '{"query":"{ viewer { login } }"}', 'Sends correct query') - return { data: {} } - }) - } -}) -``` - -## License - -[MIT](LICENSE) diff --git a/node_modules/@octokit/graphql/index.js b/node_modules/@octokit/graphql/index.js deleted file mode 100644 index 7f8278c9b..000000000 --- a/node_modules/@octokit/graphql/index.js +++ /dev/null @@ -1,15 +0,0 @@ -const { request } = require('@octokit/request') -const getUserAgent = require('universal-user-agent') - -const version = require('./package.json').version -const userAgent = `octokit-graphql.js/${version} ${getUserAgent()}` - -const withDefaults = require('./lib/with-defaults') - -module.exports = withDefaults(request, { - method: 'POST', - url: '/graphql', - headers: { - 'user-agent': userAgent - } -}) diff --git a/node_modules/@octokit/graphql/lib/error.js b/node_modules/@octokit/graphql/lib/error.js deleted file mode 100644 index 4478abd27..000000000 --- a/node_modules/@octokit/graphql/lib/error.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = class GraphqlError extends Error { - constructor (request, response) { - const message = response.data.errors[0].message - super(message) - - Object.assign(this, response.data) - this.name = 'GraphqlError' - this.request = request - - // Maintains proper stack trace (only available on V8) - /* istanbul ignore next */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor) - } - } -} diff --git a/node_modules/@octokit/graphql/lib/graphql.js b/node_modules/@octokit/graphql/lib/graphql.js deleted file mode 100644 index 4a5b21195..000000000 --- a/node_modules/@octokit/graphql/lib/graphql.js +++ /dev/null @@ -1,36 +0,0 @@ -module.exports = graphql - -const GraphqlError = require('./error') - -const NON_VARIABLE_OPTIONS = ['method', 'baseUrl', 'url', 'headers', 'request', 'query'] - -function graphql (request, query, options) { - if (typeof query === 'string') { - options = Object.assign({ query }, options) - } else { - options = query - } - - const requestOptions = Object.keys(options).reduce((result, key) => { - if (NON_VARIABLE_OPTIONS.includes(key)) { - result[key] = options[key] - return result - } - - if (!result.variables) { - result.variables = {} - } - - result.variables[key] = options[key] - return result - }, {}) - - return request(requestOptions) - .then(response => { - if (response.data.errors) { - throw new GraphqlError(requestOptions, response) - } - - return response.data.data - }) -} diff --git a/node_modules/@octokit/graphql/lib/with-defaults.js b/node_modules/@octokit/graphql/lib/with-defaults.js deleted file mode 100644 index a5b14935c..000000000 --- a/node_modules/@octokit/graphql/lib/with-defaults.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = withDefaults - -const graphql = require('./graphql') - -function withDefaults (request, newDefaults) { - const newRequest = request.defaults(newDefaults) - const newApi = function (query, options) { - return graphql(newRequest, query, options) - } - - newApi.defaults = withDefaults.bind(null, newRequest) - return newApi -} diff --git a/node_modules/@octokit/graphql/package.json b/node_modules/@octokit/graphql/package.json deleted file mode 100644 index db18b76f4..000000000 --- a/node_modules/@octokit/graphql/package.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "_args": [ - [ - "@octokit/graphql@2.1.3", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "@octokit/graphql@2.1.3", - "_id": "@octokit/graphql@2.1.3", - "_inBundle": false, - "_integrity": "sha512-XoXJqL2ondwdnMIW3wtqJWEwcBfKk37jO/rYkoxNPEVeLBDGsGO1TCWggrAlq3keGt/O+C/7VepXnukUxwt5vA==", - "_location": "/@octokit/graphql", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@octokit/graphql@2.1.3", - "name": "@octokit/graphql", - "escapedName": "@octokit%2fgraphql", - "scope": "@octokit", - "rawSpec": "2.1.3", - "saveSpec": null, - "fetchSpec": "2.1.3" - }, - "_requiredBy": [ - "/@actions/github" - ], - "_resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-2.1.3.tgz", - "_spec": "2.1.3", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Gregor Martynus", - "url": "https://github.com/gr2m" - }, - "bugs": { - "url": "https://github.com/octokit/graphql.js/issues" - }, - "bundlesize": [ - { - "path": "./dist/octokit-graphql.min.js.gz", - "maxSize": "5KB" - } - ], - "dependencies": { - "@octokit/request": "^5.0.0", - "universal-user-agent": "^2.0.3" - }, - "description": "GitHub GraphQL API client for browsers and Node", - "devDependencies": { - "chai": "^4.2.0", - "compression-webpack-plugin": "^2.0.0", - "coveralls": "^3.0.3", - "cypress": "^3.1.5", - "fetch-mock": "^7.3.1", - "mkdirp": "^0.5.1", - "mocha": "^6.0.0", - "npm-run-all": "^4.1.3", - "nyc": "^14.0.0", - "semantic-release": "^15.13.3", - "simple-mock": "^0.8.0", - "standard": "^12.0.1", - "webpack": "^4.29.6", - "webpack-bundle-analyzer": "^3.1.0", - "webpack-cli": "^3.2.3" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/octokit/graphql.js#readme", - "keywords": [ - "octokit", - "github", - "api", - "graphql" - ], - "license": "MIT", - "main": "index.js", - "name": "@octokit/graphql", - "publishConfig": { - "access": "public" - }, - "release": { - "publish": [ - "@semantic-release/npm", - { - "path": "@semantic-release/github", - "assets": [ - "dist/*", - "!dist/*.map.gz" - ] - } - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/graphql.js.git" - }, - "scripts": { - "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", - "build:production": "webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=octokitGraphql --output-path=./dist --output-filename=octokit-graphql.min.js --devtool source-map", - "bundle-report": "webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html", - "coverage": "nyc report --reporter=html && open coverage/index.html", - "coverage:upload": "nyc report --reporter=text-lcov | coveralls", - "prebuild": "mkdirp dist/", - "pretest": "standard", - "test": "nyc mocha test/*-test.js", - "test:browser": "cypress run --browser chrome" - }, - "standard": { - "globals": [ - "describe", - "before", - "beforeEach", - "afterEach", - "after", - "it", - "expect" - ] - }, - "version": "2.1.3" -} diff --git a/node_modules/@octokit/plugin-throttling/.travis.yml b/node_modules/@octokit/plugin-throttling/.travis.yml deleted file mode 100644 index 1d25c8c1c..000000000 --- a/node_modules/@octokit/plugin-throttling/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -language: node_js -cache: npm - -# Trigger a push build on master and greenkeeper branches + PRs build on every branches -# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) -branches: - only: - - master - - /^greenkeeper.*$/ - -jobs: - include: - - stage: test - node_js: 8 - - node_js: 10 - env: Node 10 & coverage upload - after_script: - - npm run coverage:upload - - node_js: lts/* - env: memory-test - script: npm run test:memory - - stage: release - env: semantic-release - node_js: lts/* - script: npx semantic-release - - # when Greenkeeper updates @octokit/routes, run "generate-routes" script - # and push new routes.json file to the pull request - - stage: greenkeeper-routes-update - node_js: lts/* - script: - - git checkout $TRAVIS_BRANCH - - node scripts/generate-routes - # commit changes and push back to branch on GitHub. If there are no changes then exit without error - - 'git commit -a -m "build: routes" --author="Octokit Bot " && git push "https://${GH_TOKEN}@github.com/$TRAVIS_REPO_SLUG" ${TRAVIS_BRANCH} || true' - -stages: - - test - - name: release - if: branch = master AND type IN (push) - - name: greenkeeper-routes-update - if: branch =~ ^greenkeeper/@octokit/routes diff --git a/node_modules/@octokit/plugin-throttling/CODE_OF_CONDUCT.md b/node_modules/@octokit/plugin-throttling/CODE_OF_CONDUCT.md deleted file mode 100644 index 8124607bc..000000000 --- a/node_modules/@octokit/plugin-throttling/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at opensource+octokit@github.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/node_modules/@octokit/plugin-throttling/LICENSE b/node_modules/@octokit/plugin-throttling/LICENSE deleted file mode 100644 index af5366d0d..000000000 --- a/node_modules/@octokit/plugin-throttling/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2018 Octokit contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@octokit/plugin-throttling/README.md b/node_modules/@octokit/plugin-throttling/README.md deleted file mode 100644 index 49ca1bf49..000000000 --- a/node_modules/@octokit/plugin-throttling/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# plugin-throttling.js - -> Octokit plugin for GitHub’s recommended request throttling - -[![npm](https://img.shields.io/npm/v/@octokit/plugin-throttling.svg)](https://www.npmjs.com/package/@octokit/plugin-throttling) -[![Build Status](https://travis-ci.com/octokit/plugin-throttling.js.svg)](https://travis-ci.com/octokit/plugin-throttling.js) -[![Coverage Status](https://img.shields.io/coveralls/github/octokit/plugin-throttling.js.svg)](https://coveralls.io/github/octokit/plugin-throttling.js) -[![Greenkeeper](https://badges.greenkeeper.io/octokit/plugin-throttling.js.svg)](https://greenkeeper.io/) - -Implements all [recommended best practises](https://developer.github.com/v3/guides/best-practices-for-integrators/) to prevent hitting abuse rate limits. - -## Usage - -The code below creates a "Hello, world!" issue on every repository in a given organization. Without the throttling plugin it would send many requests in parallel and would hit rate limits very quickly. But the `@octokit/plugin-throttling` slows down your requests according to the official guidelines, so you don't get blocked before your quota is exhausted. - -The `throttle.onAbuseLimit` and `throttle.onRateLimit` options are required. Return `true` to automatically retry the request after `retryAfter` seconds. - -```js -const Octokit = require('@octokit/rest') - .plugin(require('@octokit/plugin-throttling')) - -const octokit = new Octokit({ - auth: `token ${process.env.TOKEN}`, - throttle: { - onRateLimit: (retryAfter, options) => { - console.warn(`Request quota exhausted for request ${options.method} ${options.url}`) - - if (options.request.retryCount === 0) { // only retries once - console.log(`Retrying after ${retryAfter} seconds!`) - return true - } - }, - onAbuseLimit: (retryAfter, options) => { - // does not retry, only logs a warning - console.warn(`Abuse detected for request ${options.method} ${options.url}`) - } - } -}) - -async function createIssueOnAllRepos (org) { - const repos = await octokit.paginate(octokit.repos.listForOrg.endpoint({ org })) - return Promise.all(repos.forEach(({ name } => { - octokit.issues.create({ - owner, - repo: name, - title: 'Hello, world!' - }) - }))) -} -``` - -Pass `{ throttle: { enabled: false } }` to disable this plugin. - -### Clustering - -Enabling Clustering support ensures that your application will not go over rate limits **across Octokit instances and across Nodejs processes**. - -First install either `redis` or `ioredis`: -``` -# NodeRedis (https://github.com/NodeRedis/node_redis) -npm install --save redis - -# or ioredis (https://github.com/luin/ioredis) -npm install --save ioredis -``` - -Then in your application: -```js -const Bottleneck = require('bottleneck') -const Redis = require('redis') - -const client = Redis.createClient({ /* options */ }) -const connection = new Bottleneck.RedisConnection({ client }) -connection.on('error', err => console.error(err)) - -const octokit = new Octokit({ - throttle: { - onAbuseLimit: (retryAfter, options) => { /* ... */ }, - onRateLimit: (retryAfter, options) => { /* ... */ }, - - // The Bottleneck connection object - connection, - - // A "throttling ID". All octokit instances with the same ID - // using the same Redis server will share the throttling. - id: 'my-super-app', - - // Otherwise the plugin uses a lighter version of Bottleneck without Redis support - Bottleneck - } -}) - -// To close the connection and allow your application to exit cleanly: -await connection.disconnect() -``` - -To use the `ioredis` library instead: -```js -const Redis = require('ioredis') -const client = new Redis({ /* options */ }) -const connection = new Bottleneck.IORedisConnection({ client }) -connection.on('error', err => console.error(err)) -``` - -## LICENSE - -[MIT](LICENSE) diff --git a/node_modules/@octokit/plugin-throttling/lib/index.js b/node_modules/@octokit/plugin-throttling/lib/index.js deleted file mode 100644 index babdb9dd9..000000000 --- a/node_modules/@octokit/plugin-throttling/lib/index.js +++ /dev/null @@ -1,128 +0,0 @@ -module.exports = throttlingPlugin - -const BottleneckLight = require('bottleneck/light') -const wrapRequest = require('./wrap-request') -const triggersNotificationPaths = require('./triggers-notification-paths') -const routeMatcher = require('./route-matcher')(triggersNotificationPaths) - -// Workaround to allow tests to directly access the triggersNotification function. -const triggersNotification = throttlingPlugin.triggersNotification = - routeMatcher.test.bind(routeMatcher) - -const groups = {} - -const createGroups = function (Bottleneck, common) { - groups.global = new Bottleneck.Group({ - id: 'octokit-global', - maxConcurrent: 10, - ...common - }) - groups.search = new Bottleneck.Group({ - id: 'octokit-search', - maxConcurrent: 1, - minTime: 2000, - ...common - }) - groups.write = new Bottleneck.Group({ - id: 'octokit-write', - maxConcurrent: 1, - minTime: 1000, - ...common - }) - groups.notifications = new Bottleneck.Group({ - id: 'octokit-notifications', - maxConcurrent: 1, - minTime: 3000, - ...common - }) -} - -function throttlingPlugin (octokit, octokitOptions = {}) { - const { - enabled = true, - Bottleneck = BottleneckLight, - id = 'no-id', - timeout = 1000 * 60 * 2, // Redis TTL: 2 minutes - connection - } = octokitOptions.throttle || {} - if (!enabled) { - return - } - const common = { connection, timeout } - - if (groups.global == null) { - createGroups(Bottleneck, common) - } - - const state = Object.assign({ - clustering: connection != null, - triggersNotification, - minimumAbuseRetryAfter: 5, - retryAfterBaseValue: 1000, - retryLimiter: new Bottleneck(), - id, - ...groups - }, octokitOptions.throttle) - - if (typeof state.onAbuseLimit !== 'function' || typeof state.onRateLimit !== 'function') { - throw new Error(`octokit/plugin-throttling error: - You must pass the onAbuseLimit and onRateLimit error handlers. - See https://github.com/octokit/rest.js#throttling - - const octokit = new Octokit({ - throttle: { - onAbuseLimit: (error, options) => {/* ... */}, - onRateLimit: (error, options) => {/* ... */} - } - }) - `) - } - - const events = {} - const emitter = new Bottleneck.Events(events) - events.on('abuse-limit', state.onAbuseLimit) - events.on('rate-limit', state.onRateLimit) - events.on('error', e => console.warn('Error in throttling-plugin limit handler', e)) - - state.retryLimiter.on('failed', async function (error, info) { - const options = info.args[info.args.length - 1] - const isGraphQL = options.url.startsWith('/graphql') - - if (!(isGraphQL || error.status === 403)) { - return - } - - const retryCount = ~~options.request.retryCount - options.request.retryCount = retryCount - - const { wantRetry, retryAfter } = await (async function () { - if (/\babuse\b/i.test(error.message)) { - // The user has hit the abuse rate limit. (REST only) - // https://developer.github.com/v3/#abuse-rate-limits - - // The Retry-After header can sometimes be blank when hitting an abuse limit, - // but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default. - const retryAfter = Math.max(~~error.headers['retry-after'], state.minimumAbuseRetryAfter) - const wantRetry = await emitter.trigger('abuse-limit', retryAfter, options) - return { wantRetry, retryAfter } - } - if (error.headers != null && error.headers['x-ratelimit-remaining'] === '0') { - // The user has used all their allowed calls for the current time period (REST and GraphQL) - // https://developer.github.com/v3/#rate-limiting - - const rateLimitReset = new Date(~~error.headers['x-ratelimit-reset'] * 1000).getTime() - const retryAfter = Math.max(Math.ceil((rateLimitReset - Date.now()) / 1000), 0) - const wantRetry = await emitter.trigger('rate-limit', retryAfter, options) - return { wantRetry, retryAfter } - } - return {} - })() - - if (wantRetry) { - options.request.retryCount++ - return retryAfter * state.retryAfterBaseValue - } - }) - - octokit.hook.wrap('request', wrapRequest.bind(null, state)) -} diff --git a/node_modules/@octokit/plugin-throttling/lib/route-matcher.js b/node_modules/@octokit/plugin-throttling/lib/route-matcher.js deleted file mode 100644 index c24426e97..000000000 --- a/node_modules/@octokit/plugin-throttling/lib/route-matcher.js +++ /dev/null @@ -1,31 +0,0 @@ -module.exports = routeMatcher - -function routeMatcher (paths) { - // EXAMPLE. For the following paths: - /* [ - "/orgs/:org/invitations", - "/repos/:owner/:repo/collaborators/:username" - ] */ - - const regexes = paths.map(p => - p.split('/') - .map(c => c.startsWith(':') ? '(?:.+?)' : c) - .join('/') - ) - // 'regexes' would contain: - /* [ - '/orgs/(?:.+?)/invitations', - '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)' - ] */ - - const regex = `^(?:${regexes.map(r => `(?:${r})`).join('|')})[^/]*$` - // 'regex' would contain: - /* - ^(?:(?:\/orgs\/(?:.+?)\/invitations)|(?:\/repos\/(?:.+?)\/(?:.+?)\/collaborators\/(?:.+?)))[^\/]*$ - - It may look scary, but paste it into https://www.debuggex.com/ - and it will make a lot more sense! - */ - - return new RegExp(regex, 'i') -} diff --git a/node_modules/@octokit/plugin-throttling/lib/triggers-notification-paths.json b/node_modules/@octokit/plugin-throttling/lib/triggers-notification-paths.json deleted file mode 100644 index 41c507580..000000000 --- a/node_modules/@octokit/plugin-throttling/lib/triggers-notification-paths.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - "/orgs/:org/invitations", - "/repos/:owner/:repo/collaborators/:username", - "/repos/:owner/:repo/commits/:sha/comments", - "/repos/:owner/:repo/issues", - "/repos/:owner/:repo/issues/:issue_number/comments", - "/repos/:owner/:repo/pulls", - "/repos/:owner/:repo/pulls/:pull_number/comments", - "/repos/:owner/:repo/pulls/:pull_number/merge", - "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers", - "/repos/:owner/:repo/pulls/:pull_number/reviews", - "/repos/:owner/:repo/releases", - "/teams/:team_id/discussions", - "/teams/:team_id/discussions/:discussion_number/comments" -] diff --git a/node_modules/@octokit/plugin-throttling/lib/wrap-request.js b/node_modules/@octokit/plugin-throttling/lib/wrap-request.js deleted file mode 100644 index f17b75702..000000000 --- a/node_modules/@octokit/plugin-throttling/lib/wrap-request.js +++ /dev/null @@ -1,49 +0,0 @@ -module.exports = wrapRequest - -const noop = () => Promise.resolve() - -function wrapRequest (state, request, options) { - return state.retryLimiter.schedule(doRequest, state, request, options) -} - -async function doRequest (state, request, options) { - const isWrite = options.method !== 'GET' && options.method !== 'HEAD' - const isSearch = options.method === 'GET' && options.url.startsWith('/search/') - const isGraphQL = options.url.startsWith('/graphql') - - const retryCount = ~~options.request.retryCount - const jobOptions = retryCount > 0 ? { priority: 0, weight: 0 } : {} - if (state.clustering) { - // Remove a job from Redis if it has not completed or failed within 60s - // Examples: Node process terminated, client disconnected, etc. - jobOptions.expiration = 1000 * 60 - } - - // Guarantee at least 1000ms between writes - // GraphQL can also trigger writes - if (isWrite || isGraphQL) { - await state.write.key(state.id).schedule(jobOptions, noop) - } - - // Guarantee at least 3000ms between requests that trigger notifications - if (isWrite && state.triggersNotification(options.url)) { - await state.notifications.key(state.id).schedule(jobOptions, noop) - } - - // Guarantee at least 2000ms between search requests - if (isSearch) { - await state.search.key(state.id).schedule(jobOptions, noop) - } - - const req = state.global.key(state.id).schedule(jobOptions, request, options) - if (isGraphQL) { - const res = await req - if (res.data.errors != null && res.data.errors.some((err) => err.type === 'RATE_LIMITED')) { - const err = new Error('GraphQL Rate Limit Exceeded') - err.headers = res.headers - err.data = res.data - throw err - } - } - return req -} diff --git a/node_modules/@octokit/plugin-throttling/package.json b/node_modules/@octokit/plugin-throttling/package.json deleted file mode 100644 index d1befca4e..000000000 --- a/node_modules/@octokit/plugin-throttling/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_args": [ - [ - "@octokit/plugin-throttling@2.6.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "@octokit/plugin-throttling@2.6.0", - "_id": "@octokit/plugin-throttling@2.6.0", - "_inBundle": false, - "_integrity": "sha512-E0xQrcD36sVEeBhut6j9nWX38vm/1LKMRSUqjvJ/mqGLXfHr4jYMsrR3I/nT2QC0eJL1/SKMt7zxOt7pZiFhDA==", - "_location": "/@octokit/plugin-throttling", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@octokit/plugin-throttling@2.6.0", - "name": "@octokit/plugin-throttling", - "escapedName": "@octokit%2fplugin-throttling", - "scope": "@octokit", - "rawSpec": "2.6.0", - "saveSpec": null, - "fetchSpec": "2.6.0" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-2.6.0.tgz", - "_spec": "2.6.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Simon Grondin", - "url": "http://github.com/SGrondin" - }, - "bugs": { - "url": "https://github.com/octokit/plugin-throttling.js/issues" - }, - "dependencies": { - "bottleneck": "^2.15.3" - }, - "description": "Automatic rate limiting plugin for octokit", - "devDependencies": { - "@octokit/request": "3.0.3", - "@octokit/rest": "^16.3.0", - "@octokit/routes": "20.2.4", - "chai": "^4.2.0", - "coveralls": "^3.0.2", - "leakage": "^0.4.0", - "mocha": "^6.0.2", - "nyc": "^14.0.0", - "semantic-release": "^15.13.8", - "standard": "^12.0.1" - }, - "homepage": "https://github.com/octokit/plugin-throttling.js#readme", - "license": "MIT", - "main": "lib/index.js", - "name": "@octokit/plugin-throttling", - "publishConfig": { - "access": "public", - "tag": "latest" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/plugin-throttling.js.git" - }, - "scripts": { - "coverage": "nyc report --reporter=html && open coverage/index.html", - "coverage:upload": "nyc report --reporter=text-lcov | coveralls", - "pretest": "standard", - "test": "nyc mocha test/integration/", - "test:memory": "node test/memory-leakage-test" - }, - "standard": { - "globals": [ - "describe", - "before", - "beforeEach", - "afterEach", - "after", - "it", - "expect" - ] - }, - "version": "2.6.0" -} diff --git a/node_modules/@octokit/plugin-throttling/scripts/generate-routes.js b/node_modules/@octokit/plugin-throttling/scripts/generate-routes.js deleted file mode 100644 index acd747def..000000000 --- a/node_modules/@octokit/plugin-throttling/scripts/generate-routes.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * We do not want to have `@octokit/routes` as a production dependency due to - * its huge size. We are only interested in the REST API endpoint paths that - * trigger notifications. So instead we automatically generate a file that - * only contains these paths when @octokit/routes has a new release. - */ -const { writeFileSync } = require('fs') - -const routes = require('@octokit/routes') -const paths = [] - -Object.keys(routes).forEach(scope => { - const scopeEndpoints = routes[scope] - scopeEndpoints.forEach(endpoint => { - if (endpoint.triggersNotification) { - paths.push(endpoint.path) - } - }) -}) - -const uniquePaths = [...new Set(paths.sort())] -writeFileSync('./lib/triggers-notification-paths.json', JSON.stringify(uniquePaths, null, 2) + '\n') diff --git a/node_modules/@octokit/plugin-throttling/test/integration/events.js b/node_modules/@octokit/plugin-throttling/test/integration/events.js deleted file mode 100644 index 8ebfa7797..000000000 --- a/node_modules/@octokit/plugin-throttling/test/integration/events.js +++ /dev/null @@ -1,170 +0,0 @@ -const expect = require('chai').expect -const Octokit = require('./octokit') - -describe('Events', function () { - it('Should support non-limit 403s', async function () { - const octokit = new Octokit({ throttle: { onAbuseLimit: () => 1, onRateLimit: () => 1 } }) - let caught = false - - await octokit.request('GET /route1', { - request: { - responses: [{ status: 201, headers: {}, data: {} }] - } - }) - - try { - await octokit.request('GET /route2', { - request: { - responses: [{ status: 403, headers: {}, data: {} }] - } - }) - } catch (error) { - expect(error.message).to.equal('Test failed request (403)') - caught = true - } - - expect(caught).to.equal(true) - expect(octokit.__requestLog).to.deep.equal([ - 'START GET /route1', - 'END GET /route1', - 'START GET /route2' - ]) - }) - - describe('\'abuse-limit\'', function () { - it('Should detect abuse limit and broadcast event', async function () { - let eventCount = 0 - const octokit = new Octokit({ - throttle: { - onAbuseLimit: (retryAfter, options) => { - expect(retryAfter).to.equal(60) - expect(options).to.include({ method: 'GET', url: '/route2' }) - expect(options.request.retryCount).to.equal(0) - eventCount++ - }, - onRateLimit: () => 1 - } - }) - - await octokit.request('GET /route1', { - request: { - responses: [{ status: 201, headers: {}, data: {} }] - } - }) - try { - await octokit.request('GET /route2', { - request: { - responses: [{ status: 403, headers: { 'retry-after': '60' }, data: { message: 'You have been rate limited to prevent abuse' } }] - } - }) - throw new Error('Should not reach this point') - } catch (error) { - expect(error.status).to.equal(403) - } - - expect(eventCount).to.equal(1) - }) - - it('Should ensure retryAfter is a minimum of 5s', async function () { - let eventCount = 0 - const octokit = new Octokit({ - throttle: { - onAbuseLimit: (retryAfter, options) => { - expect(retryAfter).to.equal(5) - expect(options).to.include({ method: 'GET', url: '/route2' }) - expect(options.request.retryCount).to.equal(0) - eventCount++ - }, - onRateLimit: () => 1 - } - }) - - await octokit.request('GET /route1', { - request: { - responses: [{ status: 201, headers: {}, data: {} }] - } - }) - try { - await octokit.request('GET /route2', { - request: { - responses: [{ status: 403, headers: { 'retry-after': '2' }, data: { message: 'You have been rate limited to prevent abuse' } }] - } - }) - throw new Error('Should not reach this point') - } catch (error) { - expect(error.status).to.equal(403) - } - - expect(eventCount).to.equal(1) - }) - - it('Should broadcast retryAfter of 5s even when the header is missing', async function () { - let eventCount = 0 - const octokit = new Octokit({ - throttle: { - onAbuseLimit: (retryAfter, options) => { - expect(retryAfter).to.equal(5) - expect(options).to.include({ method: 'GET', url: '/route2' }) - expect(options.request.retryCount).to.equal(0) - eventCount++ - }, - onRateLimit: () => 1 - } - }) - - await octokit.request('GET /route1', { - request: { - responses: [{ status: 201, headers: {}, data: {} }] - } - }) - try { - await octokit.request('GET /route2', { - request: { - responses: [{ status: 403, headers: {}, data: { message: 'You have been rate limited to prevent abuse' } }] - } - }) - throw new Error('Should not reach this point') - } catch (error) { - expect(error.status).to.equal(403) - } - - expect(eventCount).to.equal(1) - }) - }) - - describe('\'rate-limit\'', function () { - it('Should detect rate limit exceeded and broadcast event', async function () { - let eventCount = 0 - const octokit = new Octokit({ - throttle: { - onRateLimit: (retryAfter, options) => { - expect(retryAfter).to.be.closeTo(30, 1) - expect(options).to.include({ method: 'GET', url: '/route2' }) - expect(options.request.retryCount).to.equal(0) - eventCount++ - }, - onAbuseLimit: () => 1 - } - }) - const t0 = Date.now() - - await octokit.request('GET /route1', { - request: { - responses: [{ status: 201, headers: {}, data: {} }] - } - }) - try { - await octokit.request('GET /route2', { - request: { - responses: [{ status: 403, headers: { 'x-ratelimit-remaining': '0', 'x-ratelimit-reset': `${Math.round(t0 / 1000) + 30}` }, data: {} }] - } - }) - throw new Error('Should not reach this point') - } catch (error) { - expect(error.status).to.equal(403) - } - - expect(eventCount).to.equal(1) - }) - }) -}) diff --git a/node_modules/@octokit/plugin-throttling/test/integration/index.js b/node_modules/@octokit/plugin-throttling/test/integration/index.js deleted file mode 100644 index 7b2960d47..000000000 --- a/node_modules/@octokit/plugin-throttling/test/integration/index.js +++ /dev/null @@ -1,291 +0,0 @@ -const Bottleneck = require('bottleneck') -const expect = require('chai').expect -const Octokit = require('./octokit') - -describe('General', function () { - it('Should be possible to disable the plugin', async function () { - const octokit = new Octokit({ throttle: { enabled: false } }) - - const req1 = octokit.request('GET /route1', { - request: { - responses: [{ status: 201, headers: {}, data: {} }] - } - }) - - const req2 = octokit.request('GET /route2', { - request: { - responses: [{ status: 202, headers: {}, data: {} }] - } - }) - - const req3 = octokit.request('GET /route3', { - request: { - responses: [{ status: 203, headers: {}, data: {} }] - } - }) - - await Promise.all([req1, req2, req3]) - expect(octokit.__requestLog).to.deep.equal([ - 'START GET /route1', - 'START GET /route2', - 'START GET /route3', - 'END GET /route1', - 'END GET /route2', - 'END GET /route3' - ]) - }) - - it('Should require the user to pass both limit handlers', function () { - const message = 'You must pass the onAbuseLimit and onRateLimit error handlers' - - expect(() => new Octokit()).to.throw(message) - expect(() => new Octokit({ throttle: {} })).to.throw(message) - expect(() => new Octokit({ throttle: { onAbuseLimit: 5, onRateLimit: 5 } })).to.throw(message) - expect(() => new Octokit({ throttle: { onAbuseLimit: 5, onRateLimit: () => 1 } })).to.throw(message) - expect(() => new Octokit({ throttle: { onAbuseLimit: () => 1 } })).to.throw(message) - expect(() => new Octokit({ throttle: { onRateLimit: () => 1 } })).to.throw(message) - expect(() => new Octokit({ throttle: { onAbuseLimit: () => 1, onRateLimit: () => 1 } })).to.not.throw() - }) -}) - -describe('Github API best practices', function () { - it('Should linearize requests', async function () { - const octokit = new Octokit({ throttle: { onAbuseLimit: () => 1, onRateLimit: () => 1 } }) - const req1 = octokit.request('GET /route1', { - request: { - responses: [{ status: 201, headers: {}, data: {} }] - } - }) - - const req2 = octokit.request('GET /route2', { - request: { - responses: [{ status: 202, headers: {}, data: {} }] - } - }) - - const req3 = octokit.request('GET /route3', { - request: { - responses: [{ status: 203, headers: {}, data: {} }] - } - }) - - await Promise.all([req1, req2, req3]) - expect(octokit.__requestLog).to.deep.equal([ - 'START GET /route1', - 'END GET /route1', - 'START GET /route2', - 'END GET /route2', - 'START GET /route3', - 'END GET /route3' - ]) - }) - - it('Should maintain 1000ms between mutating or GraphQL requests', async function () { - const octokit = new Octokit({ - throttle: { - write: new Bottleneck.Group({ minTime: 50 }), - onAbuseLimit: () => 1, - onRateLimit: () => 1 - } - }) - - const req1 = octokit.request('POST /route1', { - request: { - responses: [{ status: 201, headers: {}, data: {} }] - } - }) - const req2 = octokit.request('GET /route2', { - request: { - responses: [{ status: 202, headers: {}, data: {} }] - } - }) - const req3 = octokit.request('POST /route3', { - request: { - responses: [{ status: 203, headers: {}, data: {} }] - } - }) - const req4 = octokit.request('POST /graphql', { - request: { - responses: [{ status: 200, headers: {}, data: {} }] - } - }) - - await Promise.all([req1, req2, req3, req4]) - expect(octokit.__requestLog).to.deep.equal([ - 'START GET /route2', - 'END GET /route2', - 'START POST /route1', - 'END POST /route1', - 'START POST /route3', - 'END POST /route3', - 'START POST /graphql', - 'END POST /graphql' - ]) - expect(octokit.__requestTimings[4] - octokit.__requestTimings[0]).to.be.closeTo(50, 20) - expect(octokit.__requestTimings[6] - octokit.__requestTimings[4]).to.be.closeTo(50, 20) - }) - - it('Should maintain 3000ms between requests that trigger notifications', async function () { - const octokit = new Octokit({ - throttle: { - write: new Bottleneck.Group({ minTime: 50 }), - notifications: new Bottleneck.Group({ minTime: 100 }), - onAbuseLimit: () => 1, - onRateLimit: () => 1 - } - }) - - const req1 = octokit.request('POST /orgs/:org/invitations', { - request: { - responses: [{ status: 201, headers: {}, data: {} }] - } - }) - const req2 = octokit.request('POST /route2', { - request: { - responses: [{ status: 202, headers: {}, data: {} }] - } - }) - const req3 = octokit.request('POST /repos/:owner/:repo/commits/:sha/comments', { - request: { - responses: [{ status: 302, headers: {}, data: {} }] - } - }) - - await Promise.all([req1, req2, req3]) - expect(octokit.__requestLog).to.deep.equal([ - 'START POST /orgs/:org/invitations', - 'END POST /orgs/:org/invitations', - 'START POST /route2', - 'END POST /route2', - 'START POST /repos/:owner/:repo/commits/:sha/comments', - 'END POST /repos/:owner/:repo/commits/:sha/comments' - ]) - expect(octokit.__requestTimings[5] - octokit.__requestTimings[0]).to.be.closeTo(100, 20) - }) - - it('Should match custom routes when checking notification triggers', function () { - const plugin = require('../../lib') - - expect(plugin.triggersNotification('/abc/def')).to.equal(false) - expect(plugin.triggersNotification('/orgs/abc/invitation')).to.equal(false) - expect(plugin.triggersNotification('/repos/abc/releases')).to.equal(false) - expect(plugin.triggersNotification('/repos/abc/def/pulls/5')).to.equal(false) - - expect(plugin.triggersNotification('/repos/abc/def/pulls')).to.equal(true) - expect(plugin.triggersNotification('/repos/abc/def/pulls/5/comments')).to.equal(true) - expect(plugin.triggersNotification('/repos/foo/bar/issues')).to.equal(true) - - expect(plugin.triggersNotification('/repos/:owner/:repo/pulls')).to.equal(true) - expect(plugin.triggersNotification('/repos/:owner/:repo/pulls/5/comments')).to.equal(true) - expect(plugin.triggersNotification('/repos/:foo/:bar/issues')).to.equal(true) - }) - - it('Should maintain 2000ms between search requests', async function () { - const octokit = new Octokit({ - throttle: { - search: new Bottleneck.Group({ minTime: 50 }), - onAbuseLimit: () => 1, - onRateLimit: () => 1 - } - }) - - const req1 = octokit.request('GET /search/route1', { - request: { - responses: [{ status: 201, headers: {}, data: {} }] - } - }) - const req2 = octokit.request('GET /route2', { - request: { - responses: [{ status: 202, headers: {}, data: {} }] - } - }) - const req3 = octokit.request('GET /search/route3', { - request: { - responses: [{ status: 203, headers: {}, data: {} }] - } - }) - - await Promise.all([req1, req2, req3]) - expect(octokit.__requestLog).to.deep.equal([ - 'START GET /route2', - 'END GET /route2', - 'START GET /search/route1', - 'END GET /search/route1', - 'START GET /search/route3', - 'END GET /search/route3' - ]) - expect(octokit.__requestTimings[4] - octokit.__requestTimings[2]).to.be.closeTo(50, 20) - }) - - it('Should optimize throughput rather than maintain ordering', async function () { - const octokit = new Octokit({ - throttle: { - write: new Bottleneck.Group({ minTime: 50 }), - notifications: new Bottleneck.Group({ minTime: 150 }), - onAbuseLimit: () => 1, - onRateLimit: () => 1 - } - }) - - const req1 = octokit.request('POST /orgs/abc/invitations', { - request: { - responses: [{ status: 200, headers: {}, data: {} }] - } - }) - const req2 = octokit.request('GET /route2', { - request: { - responses: [{ status: 200, headers: {}, data: {} }] - } - }) - const req3 = octokit.request('GET /route3', { - request: { - responses: [{ status: 200, headers: {}, data: {} }] - } - }) - const req4 = octokit.request('POST /route4', { - request: { - responses: [{ status: 200, headers: {}, data: {} }] - } - }) - const req5 = octokit.request('POST /repos/abc/def/commits/12345/comments', { - request: { - responses: [{ status: 200, headers: {}, data: {} }] - } - }) - const req6 = octokit.request('PATCH /orgs/abc/invitations', { - request: { - responses: [{ status: 200, headers: {}, data: {} }] - } - }) - - await Promise.all([req1, req2, req3, req4, req5, req6]) - await octokit.request('GET /route6', { - request: { - responses: [{ status: 200, headers: {}, data: {} }] - } - }) - expect(octokit.__requestLog).to.deep.equal([ - 'START GET /route2', - 'END GET /route2', - 'START GET /route3', - 'END GET /route3', - 'START POST /orgs/abc/invitations', - 'END POST /orgs/abc/invitations', - 'START POST /route4', - 'END POST /route4', - 'START POST /repos/abc/def/commits/12345/comments', - 'END POST /repos/abc/def/commits/12345/comments', - 'START PATCH /orgs/abc/invitations', - 'END PATCH /orgs/abc/invitations', - 'START GET /route6', - 'END GET /route6' - ]) - - expect(octokit.__requestTimings[2] - octokit.__requestTimings[0]).to.be.closeTo(0, 20) - expect(octokit.__requestTimings[4] - octokit.__requestTimings[2]).to.be.closeTo(0, 20) - expect(octokit.__requestTimings[6] - octokit.__requestTimings[4]).to.be.closeTo(50, 20) - expect(octokit.__requestTimings[8] - octokit.__requestTimings[6]).to.be.closeTo(100, 20) - expect(octokit.__requestTimings[10] - octokit.__requestTimings[8]).to.be.closeTo(150, 20) - expect(octokit.__requestTimings[12] - octokit.__requestTimings[10]).to.be.closeTo(0, 30) - }) -}) diff --git a/node_modules/@octokit/plugin-throttling/test/integration/octokit.js b/node_modules/@octokit/plugin-throttling/test/integration/octokit.js deleted file mode 100644 index 97b3a13f4..000000000 --- a/node_modules/@octokit/plugin-throttling/test/integration/octokit.js +++ /dev/null @@ -1,28 +0,0 @@ -const Octokit = require('@octokit/rest') -const HttpError = require('@octokit/request/lib/http-error') -const throttlingPlugin = require('../..') - -module.exports = Octokit - .plugin((octokit) => { - octokit.__t0 = Date.now() - octokit.__requestLog = [] - octokit.__requestTimings = [] - - octokit.hook.wrap('request', async (request, options) => { - octokit.__requestLog.push(`START ${options.method} ${options.url}`) - octokit.__requestTimings.push(Date.now() - octokit.__t0) - await new Promise(resolve => setTimeout(resolve, 0)) - - const res = options.request.responses.shift() - if (res.status >= 400) { - const message = res.data.message != null ? res.data.message : `Test failed request (${res.status})` - const error = new HttpError(message, res.status, res.headers, options) - throw error - } else { - octokit.__requestLog.push(`END ${options.method} ${options.url}`) - octokit.__requestTimings.push(Date.now() - octokit.__t0) - return res - } - }) - }) - .plugin(throttlingPlugin) diff --git a/node_modules/@octokit/plugin-throttling/test/integration/retry.js b/node_modules/@octokit/plugin-throttling/test/integration/retry.js deleted file mode 100644 index cf35d1b05..000000000 --- a/node_modules/@octokit/plugin-throttling/test/integration/retry.js +++ /dev/null @@ -1,193 +0,0 @@ -const Bottleneck = require('bottleneck') -const expect = require('chai').expect -const Octokit = require('./octokit') - -describe('Retry', function () { - describe('REST', function () { - it('Should retry \'abuse-limit\' and succeed', async function () { - let eventCount = 0 - const octokit = new Octokit({ - throttle: { - minimumAbuseRetryAfter: 0, - retryAfterBaseValue: 50, - onAbuseLimit: (retryAfter, options) => { - expect(options).to.include({ method: 'GET', url: '/route' }) - expect(options.request.retryCount).to.equal(eventCount) - expect(retryAfter).to.equal(eventCount + 1) - eventCount++ - return true - }, - onRateLimit: () => 1 - } - }) - - const res = await octokit.request('GET /route', { - request: { - responses: [ - { status: 403, headers: { 'retry-after': '1' }, data: { message: 'You have been rate limited to prevent abuse' } }, - { status: 200, headers: {}, data: { message: 'Success!' } } - ] - } - }) - - expect(res.status).to.equal(200) - expect(res.data).to.include({ message: 'Success!' }) - expect(eventCount).to.equal(1) - expect(octokit.__requestLog).to.deep.equal([ - 'START GET /route', - 'START GET /route', - 'END GET /route' - ]) - expect(octokit.__requestTimings[1] - octokit.__requestTimings[0]).to.be.closeTo(50, 20) - }) - - it('Should retry \'abuse-limit\' twice and fail', async function () { - let eventCount = 0 - const octokit = new Octokit({ - throttle: { - minimumAbuseRetryAfter: 0, - retryAfterBaseValue: 50, - onAbuseLimit: (retryAfter, options) => { - expect(options).to.include({ method: 'GET', url: '/route' }) - expect(options.request.retryCount).to.equal(eventCount) - expect(retryAfter).to.equal(eventCount + 1) - eventCount++ - return true - }, - onRateLimit: () => 1 - } - }) - - const message = 'You have been rate limited to prevent abuse' - try { - await octokit.request('GET /route', { - request: { - responses: [ - { status: 403, headers: { 'retry-after': '1' }, data: { message } }, - { status: 403, headers: { 'retry-after': '2' }, data: { message } }, - { status: 404, headers: { 'retry-after': '3' }, data: { message: 'Nope!' } } - ] - } - }) - throw new Error('Should not reach this point') - } catch (error) { - expect(error.status).to.equal(404) - expect(error.message).to.equal('Nope!') - } - - expect(eventCount).to.equal(2) - expect(octokit.__requestLog).to.deep.equal([ - 'START GET /route', - 'START GET /route', - 'START GET /route' - ]) - expect(octokit.__requestTimings[1] - octokit.__requestTimings[0]).to.be.closeTo(50, 20) - expect(octokit.__requestTimings[2] - octokit.__requestTimings[1]).to.be.closeTo(100, 20) - }) - - it('Should retry \'rate-limit\' and succeed', async function () { - let eventCount = 0 - const octokit = new Octokit({ - throttle: { - onRateLimit: (retryAfter, options) => { - expect(options).to.include({ method: 'GET', url: '/route' }) - expect(options.request.retryCount).to.equal(eventCount) - expect(retryAfter).to.equal(0) - eventCount++ - return true - }, - onAbuseLimit: () => 1 - } - }) - - const res = await octokit.request('GET /route', { - request: { - responses: [ - { status: 403, headers: { 'x-ratelimit-remaining': '0', 'x-ratelimit-reset': `123` }, data: {} }, - { status: 202, headers: {}, data: { message: 'Yay!' } } - ] - } - }) - - expect(res.status).to.equal(202) - expect(res.data).to.include({ message: 'Yay!' }) - expect(eventCount).to.equal(1) - expect(octokit.__requestLog).to.deep.equal([ - 'START GET /route', - 'START GET /route', - 'END GET /route' - ]) - expect(octokit.__requestTimings[1] - octokit.__requestTimings[0]).to.be.closeTo(0, 20) - }) - }) - - describe('GraphQL', function () { - it('Should retry \'rate-limit\' and succeed', async function () { - let eventCount = 0 - const octokit = new Octokit({ - throttle: { - write: new Bottleneck.Group({ minTime: 50 }), - onRateLimit: (retryAfter, options) => { - expect(options).to.include({ method: 'POST', url: '/graphql' }) - expect(options.request.retryCount).to.equal(eventCount) - expect(retryAfter).to.equal(0) - eventCount++ - return true - }, - onAbuseLimit: () => 1 - } - }) - - const res = await octokit.request('POST /graphql', { - request: { - responses: [ - { status: 200, headers: { 'x-ratelimit-remaining': '0', 'x-ratelimit-reset': `123` }, data: { errors: [{ type: 'RATE_LIMITED' }] } }, - { status: 200, headers: {}, data: { message: 'Yay!' } } - ] - } - }) - - expect(res.status).to.equal(200) - expect(res.data).to.include({ message: 'Yay!' }) - expect(eventCount).to.equal(1) - expect(octokit.__requestLog).to.deep.equal([ - 'START POST /graphql', - 'END POST /graphql', - 'START POST /graphql', - 'END POST /graphql' - ]) - expect(octokit.__requestTimings[2] - octokit.__requestTimings[0]).to.be.closeTo(50, 20) - }) - - it('Should ignore other error types', async function () { - let eventCount = 0 - const octokit = new Octokit({ - throttle: { - write: new Bottleneck.Group({ minTime: 50 }), - onRateLimit: (retryAfter, options) => { - eventCount++ - return true - }, - onAbuseLimit: () => 1 - } - }) - - const res = await octokit.request('POST /graphql', { - request: { - responses: [ - { status: 200, headers: { 'x-ratelimit-remaining': '0', 'x-ratelimit-reset': `123` }, data: { errors: [{ type: 'HELLO_WORLD' }] } }, - { status: 200, headers: {}, data: { message: 'Yay!' } } - ] - } - }) - - expect(res.status).to.equal(200) - expect(res.data).to.deep.equal({ errors: [ { type: 'HELLO_WORLD' } ] }) - expect(eventCount).to.equal(0) - expect(octokit.__requestLog).to.deep.equal([ - 'START POST /graphql', - 'END POST /graphql' - ]) - }) - }) -}) diff --git a/node_modules/@octokit/plugin-throttling/test/memory-leakage-test.js b/node_modules/@octokit/plugin-throttling/test/memory-leakage-test.js deleted file mode 100644 index b5dc5d055..000000000 --- a/node_modules/@octokit/plugin-throttling/test/memory-leakage-test.js +++ /dev/null @@ -1,14 +0,0 @@ -const { iterate } = require('leakage') -const Octokit = require('@octokit/rest') - .plugin(require('..')) - -const result = iterate(() => { - Octokit({ - throttle: { - onAbuseLimit: () => {}, - onRateLimit: () => {} - } - }) -}) - -result.printSummary() diff --git a/node_modules/@octokit/request-error/LICENSE b/node_modules/@octokit/request-error/LICENSE deleted file mode 100644 index ef2c18ee5..000000000 --- a/node_modules/@octokit/request-error/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2019 Octokit contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@octokit/request-error/README.md b/node_modules/@octokit/request-error/README.md deleted file mode 100644 index bcb711d91..000000000 --- a/node_modules/@octokit/request-error/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# http-error.js - -> Error class for Octokit request errors - -[![@latest](https://img.shields.io/npm/v/@octokit/request-error.svg)](https://www.npmjs.com/package/@octokit/request-error) -[![Build Status](https://travis-ci.com/octokit/request-error.js.svg?branch=master)](https://travis-ci.com/octokit/request-error.js) -[![Greenkeeper](https://badges.greenkeeper.io/octokit/request-error.js.svg)](https://greenkeeper.io/) - -## Usage - - - - - - -
-Browsers - -Load @octokit/request-error directly from cdn.pika.dev - -```html - -``` - -
-Node - - -Install with npm install @octokit/request-error - -```js -const { RequestError } = require("@octokit/request-error"); -// or: import { RequestError } from "@octokit/request-error"; -``` - -
- -```js -const error = new RequestError("Oops", 500, { - headers: { - "x-github-request-id": "1:2:3:4" - }, // response headers - request: { - method: "POST", - url: "https://api.github.com/foo", - body: { - bar: "baz" - }, - headers: { - authorization: "token secret123" - } - } -}); - -error.message; // Oops -error.status; // 500 -error.headers; // { 'x-github-request-id': '1:2:3:4' } -error.request.method; // POST -error.request.url; // https://api.github.com/foo -error.request.body; // { bar: 'baz' } -error.request.headers; // { authorization: 'token [REDACTED]' } -``` - -## LICENSE - -[MIT](LICENSE) diff --git a/node_modules/@octokit/request-error/dist-node/index.js b/node_modules/@octokit/request-error/dist-node/index.js deleted file mode 100644 index aa89664c2..000000000 --- a/node_modules/@octokit/request-error/dist-node/index.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var deprecation = require('deprecation'); -var once = _interopDefault(require('once')); - -const logOnce = once(deprecation => console.warn(deprecation)); -/** - * Error with extra properties to help with debugging - */ - -class RequestError extends Error { - constructor(message, statusCode, options) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = "HttpError"; - this.status = statusCode; - Object.defineProperty(this, "code", { - get() { - logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); - return statusCode; - } - - }); - this.headers = options.headers; // redact request credentials without mutating original request options - - const requestCopy = Object.assign({}, options.request); - - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") - }); - } - - requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit - // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications - .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended - // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header - .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; - } - -} - -exports.RequestError = RequestError; diff --git a/node_modules/@octokit/request-error/dist-src/index.js b/node_modules/@octokit/request-error/dist-src/index.js deleted file mode 100644 index 10eb5c7e6..000000000 --- a/node_modules/@octokit/request-error/dist-src/index.js +++ /dev/null @@ -1,40 +0,0 @@ -import { Deprecation } from "deprecation"; -import once from "once"; -const logOnce = once((deprecation) => console.warn(deprecation)); -/** - * Error with extra properties to help with debugging - */ -export class RequestError extends Error { - constructor(message, statusCode, options) { - super(message); - // Maintains proper stack trace (only available on V8) - /* istanbul ignore next */ - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = "HttpError"; - this.status = statusCode; - Object.defineProperty(this, "code", { - get() { - logOnce(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); - return statusCode; - } - }); - this.headers = options.headers; - // redact request credentials without mutating original request options - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") - }); - } - requestCopy.url = requestCopy.url - // client_id & client_secret can be passed as URL query parameters to increase rate limit - // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications - .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") - // OAuth tokens can be passed as URL query parameters, although it is not recommended - // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header - .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; - } -} diff --git a/node_modules/@octokit/request-error/dist-src/types.js b/node_modules/@octokit/request-error/dist-src/types.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/node_modules/@octokit/request-error/dist-types/index.d.ts b/node_modules/@octokit/request-error/dist-types/index.d.ts deleted file mode 100644 index b12f21d8e..000000000 --- a/node_modules/@octokit/request-error/dist-types/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { RequestOptions, ResponseHeaders, RequestErrorOptions } from "./types"; -/** - * Error with extra properties to help with debugging - */ -export declare class RequestError extends Error { - name: "HttpError"; - /** - * http status code - */ - status: number; - /** - * http status code - * - * @deprecated `error.code` is deprecated in favor of `error.status` - */ - code: number; - /** - * error response headers - */ - headers: ResponseHeaders; - /** - * Request options that lead to the error. - */ - request: RequestOptions; - constructor(message: string, statusCode: number, options: RequestErrorOptions); -} diff --git a/node_modules/@octokit/request-error/dist-types/types.d.ts b/node_modules/@octokit/request-error/dist-types/types.d.ts deleted file mode 100644 index 444254eff..000000000 --- a/node_modules/@octokit/request-error/dist-types/types.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Relative or absolute URL. Examples: `'/orgs/:org'`, `https://example.com/foo/bar` - */ -export declare type Url = string; -/** - * Request method - */ -export declare type Method = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; -export declare type RequestHeaders = { - /** - * Used for API previews and custom formats - */ - accept?: string; - /** - * Redacted authorization header - */ - authorization?: string; - "user-agent"?: string; - [header: string]: string | number | undefined; -}; -export declare type ResponseHeaders = { - [header: string]: string; -}; -export declare type EndpointRequestOptions = { - [option: string]: any; -}; -export declare type RequestOptions = { - method: Method; - url: Url; - headers: RequestHeaders; - body?: any; - request?: EndpointRequestOptions; -}; -export declare type RequestErrorOptions = { - headers: ResponseHeaders; - request: RequestOptions; -}; diff --git a/node_modules/@octokit/request-error/dist-web/index.js b/node_modules/@octokit/request-error/dist-web/index.js deleted file mode 100644 index 52ff28a3a..000000000 --- a/node_modules/@octokit/request-error/dist-web/index.js +++ /dev/null @@ -1,48 +0,0 @@ -import { Deprecation } from 'deprecation'; -import once from 'once'; - -const logOnce = once(deprecation => console.warn(deprecation)); -/** - * Error with extra properties to help with debugging - */ - -class RequestError extends Error { - constructor(message, statusCode, options) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = "HttpError"; - this.status = statusCode; - Object.defineProperty(this, "code", { - get() { - logOnce(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); - return statusCode; - } - - }); - this.headers = options.headers; // redact request credentials without mutating original request options - - const requestCopy = Object.assign({}, options.request); - - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") - }); - } - - requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit - // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications - .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended - // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header - .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; - } - -} - -export { RequestError }; diff --git a/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/request-error/package.json deleted file mode 100644 index e5f4e11d7..000000000 --- a/node_modules/@octokit/request-error/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_args": [ - [ - "@octokit/request-error@1.0.4", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "@octokit/request-error@1.0.4", - "_id": "@octokit/request-error@1.0.4", - "_inBundle": false, - "_integrity": "sha512-L4JaJDXn8SGT+5G0uX79rZLv0MNJmfGa4vb4vy1NnpjSnWDLJRy6m90udGwvMmavwsStgbv2QNkPzzTCMmL+ig==", - "_location": "/@octokit/request-error", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@octokit/request-error@1.0.4", - "name": "@octokit/request-error", - "escapedName": "@octokit%2frequest-error", - "scope": "@octokit", - "rawSpec": "1.0.4", - "saveSpec": null, - "fetchSpec": "1.0.4" - }, - "_requiredBy": [ - "/@octokit/request", - "/@octokit/rest" - ], - "_resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.0.4.tgz", - "_spec": "1.0.4", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "bugs": { - "url": "https://github.com/octokit/request-error.js/issues" - }, - "dependencies": { - "deprecation": "^2.0.0", - "once": "^1.4.0" - }, - "description": "Error class for Octokit request errors", - "devDependencies": { - "@pika/pack": "^0.3.7", - "@pika/plugin-build-node": "^0.4.0", - "@pika/plugin-build-web": "^0.4.0", - "@pika/plugin-bundle-web": "^0.4.0", - "@pika/plugin-ts-standard-pkg": "^0.4.0", - "@semantic-release/git": "^7.0.12", - "@types/jest": "^24.0.12", - "@types/node": "^12.0.2", - "@types/once": "^1.4.0", - "jest": "^24.7.1", - "pika-plugin-unpkg-field": "^1.1.0", - "prettier": "^1.17.0", - "semantic-release": "^15.10.5", - "ts-jest": "^24.0.2", - "typescript": "^3.4.5" - }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/octokit/request-error.js#readme", - "keywords": [ - "octokit", - "github", - "api", - "error" - ], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "@octokit/request-error", - "pika": true, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/request-error.js.git" - }, - "sideEffects": false, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "version": "1.0.4" -} diff --git a/node_modules/@octokit/request/LICENSE b/node_modules/@octokit/request/LICENSE deleted file mode 100644 index af5366d0d..000000000 --- a/node_modules/@octokit/request/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2018 Octokit contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@octokit/request/README.md b/node_modules/@octokit/request/README.md deleted file mode 100644 index 4cf0bd92e..000000000 --- a/node_modules/@octokit/request/README.md +++ /dev/null @@ -1,538 +0,0 @@ -# request.js - -> Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node - -[![@latest](https://img.shields.io/npm/v/@octokit/request.svg)](https://www.npmjs.com/package/@octokit/request) -[![Build Status](https://travis-ci.org/octokit/request.js.svg?branch=master)](https://travis-ci.org/octokit/request.js) -[![Greenkeeper](https://badges.greenkeeper.io/octokit/request.js.svg)](https://greenkeeper.io/) - -`@octokit/request` is a request library for browsers & node that makes it easier -to interact with [GitHub’s REST API](https://developer.github.com/v3/) and -[GitHub’s GraphQL API](https://developer.github.com/v4/guides/forming-calls/#the-graphql-endpoint). - -It uses [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) to parse -the passed options and sends the request using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) -([node-fetch](https://github.com/bitinn/node-fetch) in Node). - - - - - -- [Features](#features) -- [Usage](#usage) - - [REST API example](#rest-api-example) - - [GraphQL example](#graphql-example) - - [Alternative: pass `method` & `url` as part of options](#alternative-pass-method--url-as-part-of-options) -- [request()](#request) -- [`request.defaults()`](#requestdefaults) -- [`request.endpoint`](#requestendpoint) -- [Special cases](#special-cases) - - [The `data` parameter – set request body directly](#the-data-parameter-%E2%80%93-set-request-body-directly) - - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body) -- [LICENSE](#license) - - - -## Features - -🤩 1:1 mapping of REST API endpoint documentation, e.g. [Add labels to an issue](https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue) becomes - -```js -request("POST /repos/:owner/:repo/issues/:number/labels", { - mediaType: { - previews: ["symmetra"] - }, - owner: "octokit", - repo: "request.js", - number: 1, - labels: ["🐛 bug"] -}); -``` - -👶 [Small bundle size](https://bundlephobia.com/result?p=@octokit/request@5.0.3) (\<4kb minified + gzipped) - -😎 [Authenticate](#authentication) with any of [GitHubs Authentication Strategies](https://github.com/octokit/auth.js). - -👍 Sensible defaults - -- `baseUrl`: `https://api.github.com` -- `headers.accept`: `application/vnd.github.v3+json` -- `headers.agent`: `octokit-request.js/ `, e.g. `octokit-request.js/1.2.3 Node.js/10.15.0 (macOS Mojave; x64)` - -👌 Simple to test: mock requests by passing a custom fetch method. - -🧐 Simple to debug: Sets `error.request` to request options causing the error (with redacted credentials). - -## Usage - - - - - - -
-Browsers - -Load @octokit/request directly from cdn.pika.dev - -```html - -``` - -
-Node - - -Install with npm install @octokit/request - -```js -const { request } = require("@octokit/request"); -// or: import { request } from "@octokit/request"; -``` - -
- -### REST API example - -```js -// Following GitHub docs formatting: -// https://developer.github.com/v3/repos/#list-organization-repositories -const result = await request("GET /orgs/:org/repos", { - headers: { - authorization: "token 0000000000000000000000000000000000000001" - }, - org: "octokit", - type: "private" -}); - -console.log(`${result.data.length} repos found.`); -``` - -### GraphQL example - -For GraphQL request we recommend using [`@octokit/graphql`](https://github.com/octokit/graphql.js#readme) - -```js -const result = await request("POST /graphql", { - headers: { - authorization: "token 0000000000000000000000000000000000000001" - }, - query: `query ($login: String!) { - organization(login: $login) { - repositories(privacy: PRIVATE) { - totalCount - } - } - }`, - variables: { - login: "octokit" - } -}); -``` - -### Alternative: pass `method` & `url` as part of options - -Alternatively, pass in a method and a url - -```js -const result = await request({ - method: "GET", - url: "/orgs/:org/repos", - headers: { - authorization: "token 0000000000000000000000000000000000000001" - }, - org: "octokit", - type: "private" -}); -``` - -## Authentication - -The simplest way to authenticate a request is to set the `Authorization` header directly, e.g. to a [personal access token](https://github.com/settings/tokens/). - -```js -const requestWithAuth = request.defaults({ - headers: { - authorization: "token 0000000000000000000000000000000000000001" - } -}); -const result = await request("GET /user"); -``` - -For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). - -```js -const { createAppAuth } = require("@octokit/auth-app"); -const auth = createAppAuth({ - id: process.env.APP_ID, - privateKey: process.env.PRIVATE_KEY, - installationId: 123 -}); -const requestWithAuth = request.defaults({ - request: { - hook: auth.hook - }, - mediaType: { - previews: ["machine-man"] - } -}); - -const { data: app } = await requestWithAuth("GET /app"); -const { data: app } = await requestWithAuth("POST /repos/:owner/:repo/issues", { - owner: "octocat", - repo: "hello-world", - title: "Hello from the engine room" -}); -``` - -## request() - -`request(route, options)` or `request(options)`. - -**Options** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- name - - type - - description -
- route - - String - - If route is set it has to be a string consisting of the request method and URL, e.g. GET /orgs/:org -
- options.baseUrl - - String - - Required. Any supported http verb, case insensitive. Defaults to https://api.github.com. -
- options.headers - - Object - - Custom headers. Passed headers are merged with defaults:
- headers['user-agent'] defaults to octokit-rest.js/1.2.3 (where 1.2.3 is the released version).
- headers['accept'] defaults to application/vnd.github.v3+json.
Use options.mediaType.{format,previews} to request API previews and custom media types. -
- options.mediaType.format - - String - - Media type param, such as `raw`, `html`, or `full`. See Media Types. -
- options.mediaType.previews - - Array of strings - - Name of previews, such as `mercy`, `symmetra`, or `scarlet-witch`. See API Previews. -
- options.method - - String - - Required. Any supported http verb, case insensitive. Defaults to Get. -
- options.url - - String - - Required. A path or full URL which may contain :variable or {variable} placeholders, - e.g. /orgs/:org/repos. The url is parsed using url-template. -
- options.data - - Any - - Set request body directly instead of setting it to JSON based on additional parameters. See "The `data` parameter" below. -
- options.request.agent - - http(s).Agent instance - - Node only. Useful for custom proxy, certificate, or dns lookup. -
- options.request.fetch - - Function - - Custom replacement for built-in fetch method. Useful for testing or request hooks. -
- options.request.hook - - Function - - Function with the signature hook(request, endpointOptions), where endpointOptions are the parsed options as returned by endpoint.merge(), and request is request(). This option works great in conjuction with before-after-hook. -
- options.request.signal - - new AbortController().signal - - Use an AbortController instance to cancel a request. In node you can only cancel streamed requests. -
- options.request.timeout - - Number - - Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). options.request.signal is recommended instead. -
- -All other options except `options.request.*` will be passed depending on the `method` and `url` options. - -1. If the option key is a placeholder in the `url`, it will be used as replacement. For example, if the passed options are `{url: '/orgs/:org/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos` -2. If the `method` is `GET` or `HEAD`, the option is passed as query parameter -3. Otherwise the parameter is passed in the request body as JSON key. - -**Result** - -`request` returns a promise and resolves with 4 keys - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- key - - type - - description -
statusIntegerResponse status status
urlStringURL of response. If a request results in redirects, this is the final URL. You can send a HEAD request to retrieve it without loading the full response body.
headersObjectAll response headers
dataAnyThe response body as returned from server. If the response is JSON then it will be parsed into an object
- -If an error occurs, the `error` instance has additional properties to help with debugging - -- `error.status` The http response status code -- `error.headers` The http response headers as an object -- `error.request` The request options such as `method`, `url` and `data` - -## `request.defaults()` - -Override or set default options. Example: - -```js -const myrequest = require("@octokit/request").defaults({ - baseUrl: "https://github-enterprise.acme-inc.com/api/v3", - headers: { - "user-agent": "myApp/1.2.3", - authorization: `token 0000000000000000000000000000000000000001` - }, - org: "my-project", - per_page: 100 -}); - -myrequest(`GET /orgs/:org/repos`); -``` - -You can call `.defaults()` again on the returned method, the defaults will cascade. - -```js -const myProjectRequest = request.defaults({ - baseUrl: "https://github-enterprise.acme-inc.com/api/v3", - headers: { - "user-agent": "myApp/1.2.3" - }, - org: "my-project" -}); -const myProjectRequestWithAuth = myProjectRequest.defaults({ - headers: { - authorization: `token 0000000000000000000000000000000000000001` - } -}); -``` - -`myProjectRequest` now defaults the `baseUrl`, `headers['user-agent']`, -`org` and `headers['authorization']` on top of `headers['accept']` that is set -by the global default. - -## `request.endpoint` - -See https://github.com/octokit/endpoint.js. Example - -```js -const options = request.endpoint("GET /orgs/:org/repos", { - org: "my-project", - type: "private" -}); - -// { -// method: 'GET', -// url: 'https://api.github.com/orgs/my-project/repos?type=private', -// headers: { -// accept: 'application/vnd.github.v3+json', -// authorization: 'token 0000000000000000000000000000000000000001', -// 'user-agent': 'octokit/endpoint.js v1.2.3' -// } -// } -``` - -All of the [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) API can be used: - -- [`octokitRequest.endpoint()`](#endpoint) -- [`octokitRequest.endpoint.defaults()`](#endpointdefaults) -- [`octokitRequest.endpoint.merge()`](#endpointdefaults) -- [`octokitRequest.endpoint.parse()`](#endpointmerge) - -## Special cases - - - -### The `data` parameter – set request body directly - -Some endpoints such as [Render a Markdown document in raw mode](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode) don’t have parameters that are sent as request body keys, instead the request body needs to be set directly. In these cases, set the `data` parameter. - -```js -const response = await request("POST /markdown/raw", { - data: "Hello world github/linguist#1 **cool**, and #1!", - headers: { - accept: "text/html;charset=utf-8", - "content-type": "text/plain" - } -}); - -// Request is sent as -// -// { -// method: 'post', -// url: 'https://api.github.com/markdown/raw', -// headers: { -// accept: 'text/html;charset=utf-8', -// 'content-type': 'text/plain', -// 'user-agent': userAgent -// }, -// body: 'Hello world github/linguist#1 **cool**, and #1!' -// } -// -// not as -// -// { -// ... -// body: '{"data": "Hello world github/linguist#1 **cool**, and #1!"}' -// } -``` - -### Set parameters for both the URL/query and the request body - -There are API endpoints that accept both query parameters as well as a body. In that case you need to add the query parameters as templates to `options.url`, as defined in the [RFC 6570 URI Template specification](https://tools.ietf.org/html/rfc6570). - -Example - -```js -request( - "POST https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", - { - name: "example.zip", - label: "short description", - headers: { - "content-type": "text/plain", - "content-length": 14, - authorization: `token 0000000000000000000000000000000000000001` - }, - data: "Hello, world!" - } -); -``` - -## LICENSE - -[MIT](LICENSE) diff --git a/node_modules/@octokit/request/dist-node/index.js b/node_modules/@octokit/request/dist-node/index.js deleted file mode 100644 index d1bdaa662..000000000 --- a/node_modules/@octokit/request/dist-node/index.js +++ /dev/null @@ -1,144 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var endpoint = require('@octokit/endpoint'); -var universalUserAgent = require('universal-user-agent'); -var isPlainObject = _interopDefault(require('is-plain-object')); -var nodeFetch = _interopDefault(require('node-fetch')); -var requestError = require('@octokit/request-error'); - -const VERSION = "0.0.0-development"; - -function getBufferResponse(response) { - return response.arrayBuffer(); -} - -function fetchWrapper(requestOptions) { - if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - - let headers = {}; - let status; - let url; - const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; - return fetch(requestOptions.url, Object.assign({ - method: requestOptions.method, - body: requestOptions.body, - headers: requestOptions.headers, - redirect: requestOptions.redirect - }, requestOptions.request)).then(response => { - url = response.url; - status = response.status; - - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - - if (status === 204 || status === 205) { - return; - } // GitHub API returns 200 for HEAD requsets - - - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; - } - - throw new requestError.RequestError(response.statusText, status, { - headers, - request: requestOptions - }); - } - - if (status === 304) { - throw new requestError.RequestError("Not modified", status, { - headers, - request: requestOptions - }); - } - - if (status >= 400) { - return response.text().then(message => { - const error = new requestError.RequestError(message, status, { - headers, - request: requestOptions - }); - - try { - Object.assign(error, JSON.parse(error.message)); - } catch (e) {// ignore, see octokit/rest.js#684 - } - - throw error; - }); - } - - const contentType = response.headers.get("content-type"); - - if (/application\/json/.test(contentType)) { - return response.json(); - } - - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - - return getBufferResponse(response); - }).then(data => { - return { - status, - url, - headers, - data - }; - }).catch(error => { - if (error instanceof requestError.RequestError) { - throw error; - } - - throw new requestError.RequestError(error.message, 500, { - headers, - request: requestOptions - }); - }); -} - -function withDefaults(oldEndpoint, newDefaults) { - const endpoint = oldEndpoint.defaults(newDefaults); - - const newApi = function (route, parameters) { - const endpointOptions = endpoint.merge(route, parameters); - - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint.parse(endpointOptions)); - } - - const request = (route, parameters) => { - return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); - }; - - Object.assign(request, { - endpoint, - defaults: withDefaults.bind(null, endpoint) - }); - return endpointOptions.request.hook(request, endpointOptions); - }; - - return Object.assign(newApi, { - endpoint, - defaults: withDefaults.bind(null, endpoint) - }); -} - -const request = withDefaults(endpoint.endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` - } -}); - -exports.request = request; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request/dist-node/index.js.map b/node_modules/@octokit/request/dist-node/index.js.map deleted file mode 100644 index 1bdc65bf9..000000000 --- a/node_modules/@octokit/request/dist-node/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import isPlainObject from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect\n }, requestOptions.request))\n .then(response => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requsets\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n headers,\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n headers,\n request: requestOptions\n });\n }\n if (status >= 400) {\n return response\n .text()\n .then(message => {\n const error = new RequestError(message, status, {\n headers,\n request: requestOptions\n });\n try {\n Object.assign(error, JSON.parse(error.message));\n }\n catch (e) {\n // ignore, see octokit/rest.js#684\n }\n throw error;\n });\n }\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n })\n .then(data => {\n return {\n status,\n url,\n headers,\n data\n };\n })\n .catch(error => {\n if (error instanceof RequestError) {\n throw error;\n }\n throw new RequestError(error.message, 500, {\n headers,\n request: requestOptions\n });\n });\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`\n }\n});\n"],"names":["VERSION","getBufferResponse","response","arrayBuffer","fetchWrapper","requestOptions","isPlainObject","body","Array","isArray","JSON","stringify","headers","status","url","fetch","request","nodeFetch","Object","assign","method","redirect","then","keyAndValue","RequestError","statusText","text","message","error","parse","e","contentType","get","test","json","getBuffer","data","catch","withDefaults","oldEndpoint","newDefaults","endpoint","defaults","newApi","route","parameters","endpointOptions","merge","hook","bind","getUserAgent"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAQ,SAASC,iBAAT,CAA2BC,QAA3B,EAAqC;SACzCA,QAAQ,CAACC,WAAT,EAAP;;;ACGW,SAASC,YAAT,CAAsBC,cAAtB,EAAsC;MAC7CC,aAAa,CAACD,cAAc,CAACE,IAAhB,CAAb,IACAC,KAAK,CAACC,OAAN,CAAcJ,cAAc,CAACE,IAA7B,CADJ,EACwC;IACpCF,cAAc,CAACE,IAAf,GAAsBG,IAAI,CAACC,SAAL,CAAeN,cAAc,CAACE,IAA9B,CAAtB;;;MAEAK,OAAO,GAAG,EAAd;MACIC,MAAJ;MACIC,GAAJ;QACMC,KAAK,GAAIV,cAAc,CAACW,OAAf,IAA0BX,cAAc,CAACW,OAAf,CAAuBD,KAAlD,IAA4DE,SAA1E;SACOF,KAAK,CAACV,cAAc,CAACS,GAAhB,EAAqBI,MAAM,CAACC,MAAP,CAAc;IAC3CC,MAAM,EAAEf,cAAc,CAACe,MADoB;IAE3Cb,IAAI,EAAEF,cAAc,CAACE,IAFsB;IAG3CK,OAAO,EAAEP,cAAc,CAACO,OAHmB;IAI3CS,QAAQ,EAAEhB,cAAc,CAACgB;GAJI,EAK9BhB,cAAc,CAACW,OALe,CAArB,CAAL,CAMFM,IANE,CAMGpB,QAAQ,IAAI;IAClBY,GAAG,GAAGZ,QAAQ,CAACY,GAAf;IACAD,MAAM,GAAGX,QAAQ,CAACW,MAAlB;;SACK,MAAMU,WAAX,IAA0BrB,QAAQ,CAACU,OAAnC,EAA4C;MACxCA,OAAO,CAACW,WAAW,CAAC,CAAD,CAAZ,CAAP,GAA0BA,WAAW,CAAC,CAAD,CAArC;;;QAEAV,MAAM,KAAK,GAAX,IAAkBA,MAAM,KAAK,GAAjC,EAAsC;;KANpB;;;QAUdR,cAAc,CAACe,MAAf,KAA0B,MAA9B,EAAsC;UAC9BP,MAAM,GAAG,GAAb,EAAkB;;;;YAGZ,IAAIW,yBAAJ,CAAiBtB,QAAQ,CAACuB,UAA1B,EAAsCZ,MAAtC,EAA8C;QAChDD,OADgD;QAEhDI,OAAO,EAAEX;OAFP,CAAN;;;QAKAQ,MAAM,KAAK,GAAf,EAAoB;YACV,IAAIW,yBAAJ,CAAiB,cAAjB,EAAiCX,MAAjC,EAAyC;QAC3CD,OAD2C;QAE3CI,OAAO,EAAEX;OAFP,CAAN;;;QAKAQ,MAAM,IAAI,GAAd,EAAmB;aACRX,QAAQ,CACVwB,IADE,GAEFJ,IAFE,CAEGK,OAAO,IAAI;cACXC,KAAK,GAAG,IAAIJ,yBAAJ,CAAiBG,OAAjB,EAA0Bd,MAA1B,EAAkC;UAC5CD,OAD4C;UAE5CI,OAAO,EAAEX;SAFC,CAAd;;YAII;UACAa,MAAM,CAACC,MAAP,CAAcS,KAAd,EAAqBlB,IAAI,CAACmB,KAAL,CAAWD,KAAK,CAACD,OAAjB,CAArB;SADJ,CAGA,OAAOG,CAAP,EAAU;;;cAGJF,KAAN;OAbG,CAAP;;;UAgBEG,WAAW,GAAG7B,QAAQ,CAACU,OAAT,CAAiBoB,GAAjB,CAAqB,cAArB,CAApB;;QACI,oBAAoBC,IAApB,CAAyBF,WAAzB,CAAJ,EAA2C;aAChC7B,QAAQ,CAACgC,IAAT,EAAP;;;QAEA,CAACH,WAAD,IAAgB,yBAAyBE,IAAzB,CAA8BF,WAA9B,CAApB,EAAgE;aACrD7B,QAAQ,CAACwB,IAAT,EAAP;;;WAEGS,iBAAS,CAACjC,QAAD,CAAhB;GAvDG,EAyDFoB,IAzDE,CAyDGc,IAAI,IAAI;WACP;MACHvB,MADG;MAEHC,GAFG;MAGHF,OAHG;MAIHwB;KAJJ;GA1DG,EAiEFC,KAjEE,CAiEIT,KAAK,IAAI;QACZA,KAAK,YAAYJ,yBAArB,EAAmC;YACzBI,KAAN;;;UAEE,IAAIJ,yBAAJ,CAAiBI,KAAK,CAACD,OAAvB,EAAgC,GAAhC,EAAqC;MACvCf,OADuC;MAEvCI,OAAO,EAAEX;KAFP,CAAN;GArEG,CAAP;;;ACZW,SAASiC,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;QACrDC,QAAQ,GAAGF,WAAW,CAACG,QAAZ,CAAqBF,WAArB,CAAjB;;QACMG,MAAM,GAAG,UAAUC,KAAV,EAAiBC,UAAjB,EAA6B;UAClCC,eAAe,GAAGL,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAxB;;QACI,CAACC,eAAe,CAAC9B,OAAjB,IAA4B,CAAC8B,eAAe,CAAC9B,OAAhB,CAAwBgC,IAAzD,EAA+D;aACpD5C,YAAY,CAACqC,QAAQ,CAACZ,KAAT,CAAeiB,eAAf,CAAD,CAAnB;;;UAEE9B,OAAO,GAAG,CAAC4B,KAAD,EAAQC,UAAR,KAAuB;aAC5BzC,YAAY,CAACqC,QAAQ,CAACZ,KAAT,CAAeY,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAf,CAAD,CAAnB;KADJ;;IAGA3B,MAAM,CAACC,MAAP,CAAcH,OAAd,EAAuB;MACnByB,QADmB;MAEnBC,QAAQ,EAAEJ,YAAY,CAACW,IAAb,CAAkB,IAAlB,EAAwBR,QAAxB;KAFd;WAIOK,eAAe,CAAC9B,OAAhB,CAAwBgC,IAAxB,CAA6BhC,OAA7B,EAAsC8B,eAAtC,CAAP;GAZJ;;SAcO5B,MAAM,CAACC,MAAP,CAAcwB,MAAd,EAAsB;IACzBF,QADyB;IAEzBC,QAAQ,EAAEJ,YAAY,CAACW,IAAb,CAAkB,IAAlB,EAAwBR,QAAxB;GAFP,CAAP;;;MCbSzB,OAAO,GAAGsB,YAAY,CAACG,iBAAD,EAAW;EAC1C7B,OAAO,EAAE;kBACU,sBAAqBZ,OAAQ,IAAGkD,+BAAY,EAAG;;CAFnC,CAA5B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/node_modules/@octokit/request/dist-src/fetch-wrapper.js deleted file mode 100644 index 6592532e6..000000000 --- a/node_modules/@octokit/request/dist-src/fetch-wrapper.js +++ /dev/null @@ -1,88 +0,0 @@ -import isPlainObject from "is-plain-object"; -import nodeFetch from "node-fetch"; -import { RequestError } from "@octokit/request-error"; -import getBuffer from "./get-buffer-response"; -export default function fetchWrapper(requestOptions) { - if (isPlainObject(requestOptions.body) || - Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - let headers = {}; - let status; - let url; - const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch; - return fetch(requestOptions.url, Object.assign({ - method: requestOptions.method, - body: requestOptions.body, - headers: requestOptions.headers, - redirect: requestOptions.redirect - }, requestOptions.request)) - .then(response => { - url = response.url; - status = response.status; - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - if (status === 204 || status === 205) { - return; - } - // GitHub API returns 200 for HEAD requsets - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; - } - throw new RequestError(response.statusText, status, { - headers, - request: requestOptions - }); - } - if (status === 304) { - throw new RequestError("Not modified", status, { - headers, - request: requestOptions - }); - } - if (status >= 400) { - return response - .text() - .then(message => { - const error = new RequestError(message, status, { - headers, - request: requestOptions - }); - try { - Object.assign(error, JSON.parse(error.message)); - } - catch (e) { - // ignore, see octokit/rest.js#684 - } - throw error; - }); - } - const contentType = response.headers.get("content-type"); - if (/application\/json/.test(contentType)) { - return response.json(); - } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - return getBuffer(response); - }) - .then(data => { - return { - status, - url, - headers, - data - }; - }) - .catch(error => { - if (error instanceof RequestError) { - throw error; - } - throw new RequestError(error.message, 500, { - headers, - request: requestOptions - }); - }); -} diff --git a/node_modules/@octokit/request/dist-src/get-buffer-response.js b/node_modules/@octokit/request/dist-src/get-buffer-response.js deleted file mode 100644 index 845a3947b..000000000 --- a/node_modules/@octokit/request/dist-src/get-buffer-response.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function getBufferResponse(response) { - return response.arrayBuffer(); -} diff --git a/node_modules/@octokit/request/dist-src/index.js b/node_modules/@octokit/request/dist-src/index.js deleted file mode 100644 index 6a36142dc..000000000 --- a/node_modules/@octokit/request/dist-src/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import { endpoint } from "@octokit/endpoint"; -import { getUserAgent } from "universal-user-agent"; -import { VERSION } from "./version"; -import withDefaults from "./with-defaults"; -export const request = withDefaults(endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}` - } -}); diff --git a/node_modules/@octokit/request/dist-src/types.js b/node_modules/@octokit/request/dist-src/types.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/node_modules/@octokit/request/dist-src/version.js b/node_modules/@octokit/request/dist-src/version.js deleted file mode 100644 index 86383b116..000000000 --- a/node_modules/@octokit/request/dist-src/version.js +++ /dev/null @@ -1 +0,0 @@ -export const VERSION = "0.0.0-development"; diff --git a/node_modules/@octokit/request/dist-src/with-defaults.js b/node_modules/@octokit/request/dist-src/with-defaults.js deleted file mode 100644 index 8e44f46e4..000000000 --- a/node_modules/@octokit/request/dist-src/with-defaults.js +++ /dev/null @@ -1,22 +0,0 @@ -import fetchWrapper from "./fetch-wrapper"; -export default function withDefaults(oldEndpoint, newDefaults) { - const endpoint = oldEndpoint.defaults(newDefaults); - const newApi = function (route, parameters) { - const endpointOptions = endpoint.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint.parse(endpointOptions)); - } - const request = (route, parameters) => { - return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); - }; - Object.assign(request, { - endpoint, - defaults: withDefaults.bind(null, endpoint) - }); - return endpointOptions.request.hook(request, endpointOptions); - }; - return Object.assign(newApi, { - endpoint, - defaults: withDefaults.bind(null, endpoint) - }); -} diff --git a/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts b/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts deleted file mode 100644 index 0308f6933..000000000 --- a/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { endpoint } from "./types"; -export default function fetchWrapper(requestOptions: ReturnType & { - redirect?: string; -}): Promise<{ - status: number; - url: string; - headers: { - [header: string]: string; - }; - data: any; -}>; diff --git a/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts b/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts deleted file mode 100644 index 915b70577..000000000 --- a/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Response } from "node-fetch"; -export default function getBufferResponse(response: Response): Promise; diff --git a/node_modules/@octokit/request/dist-types/index.d.ts b/node_modules/@octokit/request/dist-types/index.d.ts deleted file mode 100644 index e2cff5d4a..000000000 --- a/node_modules/@octokit/request/dist-types/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const request: import("./types").request; diff --git a/node_modules/@octokit/request/dist-types/types.d.ts b/node_modules/@octokit/request/dist-types/types.d.ts deleted file mode 100644 index f20f2b589..000000000 --- a/node_modules/@octokit/request/dist-types/types.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -/// -import { Agent } from "http"; -import { endpoint } from "@octokit/endpoint"; -export interface request { - /** - * Sends a request based on endpoint options - * - * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. - */ - (options: Endpoint): Promise>; - /** - * Sends a request based on endpoint options - * - * @param {string} route Request method + URL. Example: `'GET /orgs/:org'` - * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. - */ - (route: Route, parameters?: Parameters): Promise>; - /** - * Returns a new `endpoint` with updated route and parameters - */ - defaults: (newDefaults: Parameters) => request; - /** - * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} - */ - endpoint: typeof endpoint; -} -export declare type endpoint = typeof endpoint; -/** - * Request method + URL. Example: `'GET /orgs/:org'` - */ -export declare type Route = string; -/** - * Relative or absolute URL. Examples: `'/orgs/:org'`, `https://example.com/foo/bar` - */ -export declare type Url = string; -/** - * Request method - */ -export declare type Method = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; -/** - * Endpoint parameters - */ -export declare type Parameters = { - /** - * Base URL to be used when a relative URL is passed, such as `/orgs/:org`. - * If `baseUrl` is `https://enterprise.acme-inc.com/api/v3`, then the request - * will be sent to `https://enterprise.acme-inc.com/api/v3/orgs/:org`. - */ - baseUrl?: string; - /** - * HTTP headers. Use lowercase keys. - */ - headers?: RequestHeaders; - /** - * Media type options, see {@link https://developer.github.com/v3/media/|GitHub Developer Guide} - */ - mediaType?: { - /** - * `json` by default. Can be `raw`, `text`, `html`, `full`, `diff`, `patch`, `sha`, `base64`. Depending on endpoint - */ - format?: string; - /** - * Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix. - * Example for single preview: `['squirrel-girl']`. - * Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`. - */ - previews?: string[]; - }; - /** - * Pass custom meta information for the request. The `request` object will be returned as is. - */ - request?: OctokitRequestOptions; - /** - * Any additional parameter will be passed as follows - * 1. URL parameter if `':parameter'` or `{parameter}` is part of `url` - * 2. Query parameter if `method` is `'GET'` or `'HEAD'` - * 3. Request body if `parameter` is `'data'` - * 4. JSON in the request body in the form of `body[parameter]` unless `parameter` key is `'data'` - */ - [parameter: string]: any; -}; -export declare type Endpoint = Parameters & { - method: Method; - url: Url; -}; -export declare type Defaults = Parameters & { - method: Method; - baseUrl: string; - headers: RequestHeaders & { - accept: string; - "user-agent": string; - }; - mediaType: { - format: string; - previews: string[]; - }; -}; -export declare type OctokitResponse = { - headers: ResponseHeaders; - /** - * http response code - */ - status: number; - /** - * URL of response after all redirects - */ - url: string; - /** - * This is the data you would see in https://developer.Octokit.com/v3/ - */ - data: T; -}; -export declare type AnyResponse = OctokitResponse; -export declare type RequestHeaders = { - /** - * Avoid setting `accept`, use `mediaFormat.{format|previews}` instead. - */ - accept?: string; - /** - * Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678` - */ - authorization?: string; - /** - * `user-agent` is set do a default and can be overwritten as needed. - */ - "user-agent"?: string; - [header: string]: string | number | undefined; -}; -export declare type ResponseHeaders = { - [header: string]: string; -}; -export declare type Fetch = any; -export declare type Signal = any; -export declare type OctokitRequestOptions = { - /** - * Node only. Useful for custom proxy, certificate, or dns lookup. - */ - agent?: Agent; - /** - * Custom replacement for built-in fetch method. Useful for testing or request hooks. - */ - fetch?: Fetch; - /** - * Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests. - */ - signal?: Signal; - /** - * Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). `options.request.signal` is recommended instead. - */ - timeout?: number; - [option: string]: any; -}; diff --git a/node_modules/@octokit/request/dist-types/version.d.ts b/node_modules/@octokit/request/dist-types/version.d.ts deleted file mode 100644 index 15711f02c..000000000 --- a/node_modules/@octokit/request/dist-types/version.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const VERSION = "0.0.0-development"; diff --git a/node_modules/@octokit/request/dist-types/with-defaults.d.ts b/node_modules/@octokit/request/dist-types/with-defaults.d.ts deleted file mode 100644 index bca6cd03b..000000000 --- a/node_modules/@octokit/request/dist-types/with-defaults.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { request, endpoint, Parameters } from "./types"; -export default function withDefaults(oldEndpoint: endpoint, newDefaults: Parameters): request; diff --git a/node_modules/@octokit/request/dist-web/index.js b/node_modules/@octokit/request/dist-web/index.js deleted file mode 100644 index 1c3732ced..000000000 --- a/node_modules/@octokit/request/dist-web/index.js +++ /dev/null @@ -1,127 +0,0 @@ -import { endpoint } from '@octokit/endpoint'; -import { getUserAgent } from 'universal-user-agent'; -import isPlainObject from 'is-plain-object'; -import nodeFetch from 'node-fetch'; -import { RequestError } from '@octokit/request-error'; - -const VERSION = "0.0.0-development"; - -function getBufferResponse(response) { - return response.arrayBuffer(); -} - -function fetchWrapper(requestOptions) { - if (isPlainObject(requestOptions.body) || - Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - let headers = {}; - let status; - let url; - const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch; - return fetch(requestOptions.url, Object.assign({ - method: requestOptions.method, - body: requestOptions.body, - headers: requestOptions.headers, - redirect: requestOptions.redirect - }, requestOptions.request)) - .then(response => { - url = response.url; - status = response.status; - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - if (status === 204 || status === 205) { - return; - } - // GitHub API returns 200 for HEAD requsets - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; - } - throw new RequestError(response.statusText, status, { - headers, - request: requestOptions - }); - } - if (status === 304) { - throw new RequestError("Not modified", status, { - headers, - request: requestOptions - }); - } - if (status >= 400) { - return response - .text() - .then(message => { - const error = new RequestError(message, status, { - headers, - request: requestOptions - }); - try { - Object.assign(error, JSON.parse(error.message)); - } - catch (e) { - // ignore, see octokit/rest.js#684 - } - throw error; - }); - } - const contentType = response.headers.get("content-type"); - if (/application\/json/.test(contentType)) { - return response.json(); - } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - return getBufferResponse(response); - }) - .then(data => { - return { - status, - url, - headers, - data - }; - }) - .catch(error => { - if (error instanceof RequestError) { - throw error; - } - throw new RequestError(error.message, 500, { - headers, - request: requestOptions - }); - }); -} - -function withDefaults(oldEndpoint, newDefaults) { - const endpoint = oldEndpoint.defaults(newDefaults); - const newApi = function (route, parameters) { - const endpointOptions = endpoint.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint.parse(endpointOptions)); - } - const request = (route, parameters) => { - return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); - }; - Object.assign(request, { - endpoint, - defaults: withDefaults.bind(null, endpoint) - }); - return endpointOptions.request.hook(request, endpointOptions); - }; - return Object.assign(newApi, { - endpoint, - defaults: withDefaults.bind(null, endpoint) - }); -} - -const request = withDefaults(endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}` - } -}); - -export { request }; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request/dist-web/index.js.map b/node_modules/@octokit/request/dist-web/index.js.map deleted file mode 100644 index 35561ceb4..000000000 --- a/node_modules/@octokit/request/dist-web/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import isPlainObject from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect\n }, requestOptions.request))\n .then(response => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requsets\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n headers,\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n headers,\n request: requestOptions\n });\n }\n if (status >= 400) {\n return response\n .text()\n .then(message => {\n const error = new RequestError(message, status, {\n headers,\n request: requestOptions\n });\n try {\n Object.assign(error, JSON.parse(error.message));\n }\n catch (e) {\n // ignore, see octokit/rest.js#684\n }\n throw error;\n });\n }\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n })\n .then(data => {\n return {\n status,\n url,\n headers,\n data\n };\n })\n .catch(error => {\n if (error instanceof RequestError) {\n throw error;\n }\n throw new RequestError(error.message, 500, {\n headers,\n request: requestOptions\n });\n });\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`\n }\n});\n"],"names":["getBuffer"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACA5B,SAAS,iBAAiB,CAAC,QAAQ,EAAE;IAChD,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;CACjC;;ACEc,SAAS,YAAY,CAAC,cAAc,EAAE;IACjD,IAAI,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC;QAClC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;QACpC,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;KAC7D;IACD,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,MAAM,CAAC;IACX,IAAI,GAAG,CAAC;IACR,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC;IACpF,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;QAC3C,MAAM,EAAE,cAAc,CAAC,MAAM;QAC7B,IAAI,EAAE,cAAc,CAAC,IAAI;QACzB,OAAO,EAAE,cAAc,CAAC,OAAO;QAC/B,QAAQ,EAAE,cAAc,CAAC,QAAQ;KACpC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;SACtB,IAAI,CAAC,QAAQ,IAAI;QAClB,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;QACnB,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QACzB,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE;YACxC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;SAC5C;QACD,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;YAClC,OAAO;SACV;;QAED,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,EAAE;YAClC,IAAI,MAAM,GAAG,GAAG,EAAE;gBACd,OAAO;aACV;YACD,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;gBAChD,OAAO;gBACP,OAAO,EAAE,cAAc;aAC1B,CAAC,CAAC;SACN;QACD,IAAI,MAAM,KAAK,GAAG,EAAE;YAChB,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE;gBAC3C,OAAO;gBACP,OAAO,EAAE,cAAc;aAC1B,CAAC,CAAC;SACN;QACD,IAAI,MAAM,IAAI,GAAG,EAAE;YACf,OAAO,QAAQ;iBACV,IAAI,EAAE;iBACN,IAAI,CAAC,OAAO,IAAI;gBACjB,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE;oBAC5C,OAAO;oBACP,OAAO,EAAE,cAAc;iBAC1B,CAAC,CAAC;gBACH,IAAI;oBACA,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;iBACnD;gBACD,OAAO,CAAC,EAAE;;iBAET;gBACD,MAAM,KAAK,CAAC;aACf,CAAC,CAAC;SACN;QACD,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACzD,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YACvC,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;SAC1B;QACD,IAAI,CAAC,WAAW,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YAC5D,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;SAC1B;QACD,OAAOA,iBAAS,CAAC,QAAQ,CAAC,CAAC;KAC9B,CAAC;SACG,IAAI,CAAC,IAAI,IAAI;QACd,OAAO;YACH,MAAM;YACN,GAAG;YACH,OAAO;YACP,IAAI;SACP,CAAC;KACL,CAAC;SACG,KAAK,CAAC,KAAK,IAAI;QAChB,IAAI,KAAK,YAAY,YAAY,EAAE;YAC/B,MAAM,KAAK,CAAC;SACf;QACD,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE;YACvC,OAAO;YACP,OAAO,EAAE,cAAc;SAC1B,CAAC,CAAC;KACN,CAAC,CAAC;CACN;;ACtFc,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;IAC3D,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE;QACxC,MAAM,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAC1D,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;YAC3D,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;SACxD;QACD,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK;YACnC,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;SAC1E,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACnB,QAAQ;YACR,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;SAC9C,CAAC,CAAC;QACH,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;KACjE,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;QACzB,QAAQ;QACR,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;KAC9C,CAAC,CAAC;CACN;;ACjBW,MAAC,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE;IAC1C,OAAO,EAAE;QACL,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;KAClE;CACJ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/LICENSE b/node_modules/@octokit/request/node_modules/is-plain-object/LICENSE deleted file mode 100644 index 3f2eca18f..000000000 --- a/node_modules/@octokit/request/node_modules/is-plain-object/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/README.md b/node_modules/@octokit/request/node_modules/is-plain-object/README.md deleted file mode 100644 index 60b7b591f..000000000 --- a/node_modules/@octokit/request/node_modules/is-plain-object/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) - -> Returns true if an object was created by the `Object` constructor. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-plain-object -``` - -Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. - -## Usage - -```js -import isPlainObject from 'is-plain-object'; -``` - -**true** when created by the `Object` constructor. - -```js -isPlainObject(Object.create({})); -//=> true -isPlainObject(Object.create(Object.prototype)); -//=> true -isPlainObject({foo: 'bar'}); -//=> true -isPlainObject({}); -//=> true -``` - -**false** when not created by the `Object` constructor. - -```js -isPlainObject(1); -//=> false -isPlainObject(['foo', 'bar']); -//=> false -isPlainObject([]); -//=> false -isPlainObject(new Foo); -//=> false -isPlainObject(null); -//=> false -isPlainObject(Object.create(null)); -//=> false -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") -* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") -* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 19 | [jonschlinkert](https://github.com/jonschlinkert) | -| 6 | [TrySound](https://github.com/TrySound) | -| 6 | [stevenvachon](https://github.com/stevenvachon) | -| 3 | [onokumus](https://github.com/onokumus) | -| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -### License - -Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/index.cjs.js b/node_modules/@octokit/request/node_modules/is-plain-object/index.cjs.js deleted file mode 100644 index d7dda9510..000000000 --- a/node_modules/@octokit/request/node_modules/is-plain-object/index.cjs.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -/*! - * isobject - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -function isObject(val) { - return val != null && typeof val === 'object' && Array.isArray(val) === false; -} - -/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -function isObjectObject(o) { - return isObject(o) === true - && Object.prototype.toString.call(o) === '[object Object]'; -} - -function isPlainObject(o) { - var ctor,prot; - - if (isObjectObject(o) === false) return false; - - // If has modified constructor - ctor = o.constructor; - if (typeof ctor !== 'function') return false; - - // If has modified prototype - prot = ctor.prototype; - if (isObjectObject(prot) === false) return false; - - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; - } - - // Most likely a plain Object - return true; -} - -module.exports = isPlainObject; diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/index.d.ts b/node_modules/@octokit/request/node_modules/is-plain-object/index.d.ts deleted file mode 100644 index fd131f01c..000000000 --- a/node_modules/@octokit/request/node_modules/is-plain-object/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isPlainObject(o: any): boolean; - -export default isPlainObject; diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/index.js b/node_modules/@octokit/request/node_modules/is-plain-object/index.js deleted file mode 100644 index 565ce9e43..000000000 --- a/node_modules/@octokit/request/node_modules/is-plain-object/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -import isObject from 'isobject'; - -function isObjectObject(o) { - return isObject(o) === true - && Object.prototype.toString.call(o) === '[object Object]'; -} - -export default function isPlainObject(o) { - var ctor,prot; - - if (isObjectObject(o) === false) return false; - - // If has modified constructor - ctor = o.constructor; - if (typeof ctor !== 'function') return false; - - // If has modified prototype - prot = ctor.prototype; - if (isObjectObject(prot) === false) return false; - - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; - } - - // Most likely a plain Object - return true; -}; diff --git a/node_modules/@octokit/request/node_modules/is-plain-object/package.json b/node_modules/@octokit/request/node_modules/is-plain-object/package.json deleted file mode 100644 index f118b43ad..000000000 --- a/node_modules/@octokit/request/node_modules/is-plain-object/package.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "_args": [ - [ - "is-plain-object@3.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "is-plain-object@3.0.0", - "_id": "is-plain-object@3.0.0", - "_inBundle": false, - "_integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", - "_location": "/@octokit/request/is-plain-object", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-plain-object@3.0.0", - "name": "is-plain-object", - "escapedName": "is-plain-object", - "rawSpec": "3.0.0", - "saveSpec": null, - "fetchSpec": "3.0.0" - }, - "_requiredBy": [ - "/@octokit/request" - ], - "_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", - "_spec": "3.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-plain-object/issues" - }, - "contributors": [ - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Osman Nuri Okumuş", - "url": "http://onokumus.com" - }, - { - "name": "Steven Vachon", - "url": "https://svachon.com" - }, - { - "url": "https://github.com/wtgtybhertgeghgtwtg" - } - ], - "dependencies": { - "isobject": "^4.0.0" - }, - "description": "Returns true if an object was created by the `Object` constructor.", - "devDependencies": { - "chai": "^4.2.0", - "esm": "^3.2.22", - "gulp-format-md": "^1.0.0", - "mocha": "^6.1.4", - "mocha-headless-chrome": "^2.0.2", - "rollup": "^1.10.1", - "rollup-plugin-node-resolve": "^4.2.3" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.d.ts", - "index.js", - "index.cjs.js" - ], - "homepage": "https://github.com/jonschlinkert/is-plain-object", - "keywords": [ - "check", - "is", - "is-object", - "isobject", - "javascript", - "kind", - "kind-of", - "object", - "plain", - "type", - "typeof", - "value" - ], - "license": "MIT", - "main": "index.cjs.js", - "module": "index.js", - "name": "is-plain-object", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-plain-object.git" - }, - "scripts": { - "build": "rollup -c", - "prepare": "rollup -c", - "test": "npm run test_node && npm run build && npm run test_browser", - "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", - "test_node": "mocha -r esm" - }, - "types": "index.d.ts", - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "is-number", - "isobject", - "kind-of" - ] - }, - "lint": { - "reflinks": true - } - }, - "version": "3.0.0" -} diff --git a/node_modules/@octokit/request/node_modules/isobject/LICENSE b/node_modules/@octokit/request/node_modules/isobject/LICENSE deleted file mode 100644 index 943e71d05..000000000 --- a/node_modules/@octokit/request/node_modules/isobject/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/isobject/README.md b/node_modules/@octokit/request/node_modules/isobject/README.md deleted file mode 100644 index 1c6e21fa0..000000000 --- a/node_modules/@octokit/request/node_modules/isobject/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# isobject [![NPM version](https://img.shields.io/npm/v/isobject.svg?style=flat)](https://www.npmjs.com/package/isobject) [![NPM monthly downloads](https://img.shields.io/npm/dm/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![NPM total downloads](https://img.shields.io/npm/dt/isobject.svg?style=flat)](https://npmjs.org/package/isobject) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/isobject.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/isobject) - -> Returns true if the value is an object and not an array or null. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save isobject -``` - -Use [is-plain-object](https://github.com/jonschlinkert/is-plain-object) if you want only objects that are created by the `Object` constructor. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install isobject -``` - -## Usage - -```js -import isObject from 'isobject'; -``` - -**True** - -All of the following return `true`: - -```js -isObject({}); -isObject(Object.create({})); -isObject(Object.create(Object.prototype)); -isObject(Object.create(null)); -isObject({}); -isObject(new Foo); -isObject(/foo/); -``` - -**False** - -All of the following return `false`: - -```js -isObject(); -isObject(function () {}); -isObject(1); -isObject([]); -isObject(undefined); -isObject(null); -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") -* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") -* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") -* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 30 | [jonschlinkert](https://github.com/jonschlinkert) | -| 8 | [doowb](https://github.com/doowb) | -| 7 | [TrySound](https://github.com/TrySound) | -| 3 | [onokumus](https://github.com/onokumus) | -| 1 | [LeSuisse](https://github.com/LeSuisse) | -| 1 | [tmcw](https://github.com/tmcw) | -| 1 | [ZhouHansen](https://github.com/ZhouHansen) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -### License - -Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/isobject/index.cjs.js b/node_modules/@octokit/request/node_modules/isobject/index.cjs.js deleted file mode 100644 index 49debe736..000000000 --- a/node_modules/@octokit/request/node_modules/isobject/index.cjs.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -/*! - * isobject - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -function isObject(val) { - return val != null && typeof val === 'object' && Array.isArray(val) === false; -} - -module.exports = isObject; diff --git a/node_modules/@octokit/request/node_modules/isobject/index.d.ts b/node_modules/@octokit/request/node_modules/isobject/index.d.ts deleted file mode 100644 index c471c7156..000000000 --- a/node_modules/@octokit/request/node_modules/isobject/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isObject(val: any): boolean; - -export default isObject; diff --git a/node_modules/@octokit/request/node_modules/isobject/index.js b/node_modules/@octokit/request/node_modules/isobject/index.js deleted file mode 100644 index e9f038225..000000000 --- a/node_modules/@octokit/request/node_modules/isobject/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * isobject - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -export default function isObject(val) { - return val != null && typeof val === 'object' && Array.isArray(val) === false; -}; diff --git a/node_modules/@octokit/request/node_modules/isobject/package.json b/node_modules/@octokit/request/node_modules/isobject/package.json deleted file mode 100644 index 19e7c00d4..000000000 --- a/node_modules/@octokit/request/node_modules/isobject/package.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "_args": [ - [ - "isobject@4.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "isobject@4.0.0", - "_id": "isobject@4.0.0", - "_inBundle": false, - "_integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", - "_location": "/@octokit/request/isobject", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "isobject@4.0.0", - "name": "isobject", - "escapedName": "isobject", - "rawSpec": "4.0.0", - "saveSpec": null, - "fetchSpec": "4.0.0" - }, - "_requiredBy": [ - "/@octokit/request/is-plain-object" - ], - "_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", - "_spec": "4.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/isobject/issues" - }, - "contributors": [ - { - "url": "https://github.com/LeSuisse" - }, - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Magnús Dæhlen", - "url": "https://github.com/magnudae" - }, - { - "name": "Tom MacWright", - "url": "https://macwright.org" - } - ], - "dependencies": {}, - "description": "Returns true if the value is an object and not an array or null.", - "devDependencies": { - "esm": "^3.2.22", - "gulp-format-md": "^0.1.9", - "mocha": "^2.4.5", - "rollup": "^1.10.1" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.d.ts", - "index.cjs.js", - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/isobject", - "keywords": [ - "check", - "is", - "is-object", - "isobject", - "kind", - "kind-of", - "kindof", - "native", - "object", - "type", - "typeof", - "value" - ], - "license": "MIT", - "main": "index.cjs.js", - "module": "index.js", - "name": "isobject", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/isobject.git" - }, - "scripts": { - "build": "rollup -i index.js -o index.cjs.js -f cjs", - "prepublish": "npm run build", - "test": "mocha -r esm" - }, - "types": "index.d.ts", - "verb": { - "related": { - "list": [ - "extend-shallow", - "is-plain-object", - "kind-of", - "merge-deep" - ] - }, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "reflinks": [ - "verb" - ] - }, - "version": "4.0.0" -} diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/LICENSE.md b/node_modules/@octokit/request/node_modules/universal-user-agent/LICENSE.md deleted file mode 100644 index f105ab0c0..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -# [ISC License](https://spdx.org/licenses/ISC) - -Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/README.md b/node_modules/@octokit/request/node_modules/universal-user-agent/README.md deleted file mode 100644 index d00d14c1f..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# universal-user-agent - -> Get a user agent string in both browser and node - -[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) -[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) -[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) - -```js -const { getUserAgent } = require("universal-user-agent"); -// or import { getUserAgent } from "universal-user-agent"; - -const userAgent = getUserAgent(); -// userAgent will look like this -// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" -// in node: Node.js/v8.9.4 (macOS High Sierra; x64) -``` - -## Credits - -The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). - -## License - -[ISC](LICENSE.md) diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js deleted file mode 100644 index 80a07105f..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var osName = _interopDefault(require('os-name')); - -function getUserAgent() { - try { - return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; - } catch (error) { - if (/wmic os get Caption/.test(error.message)) { - return "Windows "; - } - - throw error; - } -} - -exports.getUserAgent = getUserAgent; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js.map b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js.map deleted file mode 100644 index aff09ec41..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/node.js"],"sourcesContent":["import osName from \"os-name\";\nexport function getUserAgent() {\n try {\n return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;\n }\n catch (error) {\n if (/wmic os get Caption/.test(error.message)) {\n return \"Windows \";\n }\n throw error;\n }\n}\n"],"names":["getUserAgent","process","version","substr","osName","arch","error","test","message"],"mappings":";;;;;;;;AACO,SAASA,YAAT,GAAwB;MACvB;WACQ,WAAUC,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIC,MAAM,EAAG,KAAIH,OAAO,CAACI,IAAK,GAA1E;GADJ,CAGA,OAAOC,KAAP,EAAc;QACN,sBAAsBC,IAAtB,CAA2BD,KAAK,CAACE,OAAjC,CAAJ,EAA+C;aACpC,gCAAP;;;UAEEF,KAAN;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/browser.js b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/browser.js deleted file mode 100644 index 6f52232cb..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/browser.js +++ /dev/null @@ -1,3 +0,0 @@ -export function getUserAgent() { - return navigator.userAgent; -} diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/index.js b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/index.js deleted file mode 100644 index c6253f5ad..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/index.js +++ /dev/null @@ -1 +0,0 @@ -export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/node.js b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/node.js deleted file mode 100644 index 8b70a038c..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/node.js +++ /dev/null @@ -1,12 +0,0 @@ -import osName from "os-name"; -export function getUserAgent() { - try { - return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; - } - catch (error) { - if (/wmic os get Caption/.test(error.message)) { - return "Windows "; - } - throw error; - } -} diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/browser.d.ts b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/browser.d.ts deleted file mode 100644 index a7bb1c440..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/browser.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/index.d.ts b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/index.d.ts deleted file mode 100644 index c6253f5ad..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/node.d.ts b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/node.d.ts deleted file mode 100644 index a7bb1c440..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/node.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js deleted file mode 100644 index 11ec79b32..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js +++ /dev/null @@ -1,6 +0,0 @@ -function getUserAgent() { - return navigator.userAgent; -} - -export { getUserAgent }; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js.map b/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js.map deleted file mode 100644 index 549407ecb..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/browser.js"],"sourcesContent":["export function getUserAgent() {\n return navigator.userAgent;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;IAC3B,OAAO,SAAS,CAAC,SAAS,CAAC;CAC9B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/node_modules/universal-user-agent/package.json b/node_modules/@octokit/request/node_modules/universal-user-agent/package.json deleted file mode 100644 index e3e5f87b2..000000000 --- a/node_modules/@octokit/request/node_modules/universal-user-agent/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_args": [ - [ - "universal-user-agent@4.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "universal-user-agent@4.0.0", - "_id": "universal-user-agent@4.0.0", - "_inBundle": false, - "_integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==", - "_location": "/@octokit/request/universal-user-agent", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "universal-user-agent@4.0.0", - "name": "universal-user-agent", - "escapedName": "universal-user-agent", - "rawSpec": "4.0.0", - "saveSpec": null, - "fetchSpec": "4.0.0" - }, - "_requiredBy": [ - "/@octokit/request" - ], - "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz", - "_spec": "4.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "bugs": { - "url": "https://github.com/gr2m/universal-user-agent/issues" - }, - "dependencies": { - "os-name": "^3.1.0" - }, - "description": "Get a user agent string in both browser and node", - "devDependencies": { - "@gr2m/pika-plugin-build-web": "^0.6.0-issue-84.1", - "@pika/pack": "^0.5.0", - "@pika/plugin-build-node": "^0.6.0", - "@pika/plugin-ts-standard-pkg": "^0.6.0", - "@types/jest": "^24.0.18", - "jest": "^24.9.0", - "prettier": "^1.18.2", - "semantic-release": "^15.9.15", - "ts-jest": "^24.0.2", - "typescript": "^3.6.2" - }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/gr2m/universal-user-agent#readme", - "keywords": [], - "license": "ISC", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "universal-user-agent", - "pika": true, - "repository": { - "type": "git", - "url": "git+https://github.com/gr2m/universal-user-agent.git" - }, - "sideEffects": false, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "version": "4.0.0" -} diff --git a/node_modules/@octokit/request/package.json b/node_modules/@octokit/request/package.json deleted file mode 100644 index bbdbfb886..000000000 --- a/node_modules/@octokit/request/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - "@octokit/request@5.1.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "@octokit/request@5.1.0", - "_id": "@octokit/request@5.1.0", - "_inBundle": false, - "_integrity": "sha512-I15T9PwjFs4tbWyhtFU2Kq7WDPidYMvRB7spmxoQRZfxSmiqullG+Nz+KbSmpkfnlvHwTr1e31R5WReFRKMXjg==", - "_location": "/@octokit/request", - "_phantomChildren": { - "os-name": "3.1.0" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "@octokit/request@5.1.0", - "name": "@octokit/request", - "escapedName": "@octokit%2frequest", - "scope": "@octokit", - "rawSpec": "5.1.0", - "saveSpec": null, - "fetchSpec": "5.1.0" - }, - "_requiredBy": [ - "/@octokit/graphql", - "/@octokit/rest" - ], - "_resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.1.0.tgz", - "_spec": "5.1.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "bugs": { - "url": "https://github.com/octokit/request.js/issues" - }, - "dependencies": { - "@octokit/endpoint": "^5.1.0", - "@octokit/request-error": "^1.0.1", - "deprecation": "^2.0.0", - "is-plain-object": "^3.0.0", - "node-fetch": "^2.3.0", - "once": "^1.4.0", - "universal-user-agent": "^4.0.0" - }, - "description": "Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node", - "devDependencies": { - "@octokit/auth-app": "^2.1.2", - "@pika/pack": "^0.5.0", - "@pika/plugin-build-node": "^0.6.0", - "@pika/plugin-build-web": "^0.6.0", - "@pika/plugin-ts-standard-pkg": "^0.6.0", - "@types/fetch-mock": "^7.2.4", - "@types/jest": "^24.0.12", - "@types/lolex": "^3.1.1", - "@types/node": "^12.0.3", - "@types/node-fetch": "^2.3.3", - "@types/once": "^1.4.0", - "fetch-mock": "^7.2.0", - "jest": "^24.7.1", - "lolex": "^4.2.0", - "prettier": "^1.17.0", - "semantic-release": "^15.10.5", - "semantic-release-plugin-update-version-in-files": "^1.0.0", - "ts-jest": "^24.0.2", - "typescript": "^3.4.5" - }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/octokit/request.js#readme", - "keywords": [ - "octokit", - "github", - "api", - "request" - ], - "license": "MIT", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "@octokit/request", - "pika": true, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/request.js.git" - }, - "sideEffects": false, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "version": "5.1.0" -} diff --git a/node_modules/@octokit/rest/LICENSE b/node_modules/@octokit/rest/LICENSE deleted file mode 100644 index 4c0d268a2..000000000 --- a/node_modules/@octokit/rest/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer) -Copyright (c) 2017-2018 Octokit contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@octokit/rest/README.md b/node_modules/@octokit/rest/README.md deleted file mode 100644 index 378def23f..000000000 --- a/node_modules/@octokit/rest/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# rest.js - -> GitHub REST API client for JavaScript - -[![@latest](https://img.shields.io/npm/v/@octokit/rest.svg)](https://www.npmjs.com/package/@octokit/rest) -[![Build Status](https://travis-ci.org/octokit/rest.js.svg?branch=master)](https://travis-ci.org/octokit/rest.js) -[![Coverage Status](https://coveralls.io/repos/github/octokit/rest.js/badge.svg)](https://coveralls.io/github/octokit/rest.js) -[![Greenkeeper](https://badges.greenkeeper.io/octokit/rest.js.svg)](https://greenkeeper.io/) - -## Installation -```shell -npm install @octokit/rest -``` - -## Usage - -```js -const Octokit = require('@octokit/rest') -const octokit = new Octokit() - -// Compare: https://developer.github.com/v3/repos/#list-organization-repositories -octokit.repos.listForOrg({ - org: 'octokit', - type: 'public' -}).then(({ data }) => { - // handle data -}) -``` - -See https://octokit.github.io/rest.js/ for full documentation. - -## Contributing - -We would love you to contribute to `@octokit/rest`, pull requests are very welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information. - -## Credits - -`@octokit/rest` was originally created as [`node-github`](https://www.npmjs.com/package/github) in 2012 by Mike de Boer from Cloud9 IDE, Inc. - -It was adopted and renamed by GitHub in 2017 - -## LICENSE - -[MIT](LICENSE) diff --git a/node_modules/@octokit/rest/index.d.ts b/node_modules/@octokit/rest/index.d.ts deleted file mode 100644 index f353a5317..000000000 --- a/node_modules/@octokit/rest/index.d.ts +++ /dev/null @@ -1,32082 +0,0 @@ -/** - * This declaration file requires TypeScript 3.1 or above. - */ - -/// - -import * as http from "http"; - -declare namespace Octokit { - type json = any; - type date = string; - - export interface Static { - plugin(plugin: Plugin): Static; - new (options?: Octokit.Options): Octokit; - } - - export interface Response { - /** This is the data you would see in https://developer.github.com/v3/ */ - data: T; - - /** Response status number */ - status: number; - - /** Response headers */ - headers: { - date: string; - "x-ratelimit-limit": string; - "x-ratelimit-remaining": string; - "x-ratelimit-reset": string; - "x-Octokit-request-id": string; - "x-Octokit-media-type": string; - link: string; - "last-modified": string; - etag: string; - status: string; - }; - - [Symbol.iterator](): Iterator; - } - - export type AnyResponse = Response; - - export interface EmptyParams {} - - export interface Options { - auth?: - | string - | { username: string; password: string; on2fa: () => Promise } - | { clientId: string; clientSecret: string } - | { (): string | Promise }; - userAgent?: string; - previews?: string[]; - baseUrl?: string; - log?: { - debug?: (message: string, info?: object) => void; - info?: (message: string, info?: object) => void; - warn?: (message: string, info?: object) => void; - error?: (message: string, info?: object) => void; - }; - request?: { - agent?: http.Agent; - timeout?: number; - }; - timeout?: number; // Deprecated - headers?: { [header: string]: any }; // Deprecated - agent?: http.Agent; // Deprecated - [option: string]: any; - } - - export type RequestMethod = - | "DELETE" - | "GET" - | "HEAD" - | "PATCH" - | "POST" - | "PUT"; - - export interface EndpointOptions { - baseUrl?: string; - method?: RequestMethod; - url?: string; - headers?: { [header: string]: any }; - data?: any; - request?: { [option: string]: any }; - [parameter: string]: any; - } - - export interface RequestOptions { - method?: RequestMethod; - url?: string; - headers?: { [header: string]: any }; - body?: any; - request?: { [option: string]: any }; - } - - export interface Log { - debug: (message: string, additionalInfo?: object) => void; - info: (message: string, additionalInfo?: object) => void; - warn: (message: string, additionalInfo?: object) => void; - error: (message: string, additionalInfo?: object) => void; - } - - export interface Endpoint { - ( - Route: string, - EndpointOptions?: Octokit.EndpointOptions - ): Octokit.RequestOptions; - (EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; - /** - * Current default options - */ - DEFAULTS: Octokit.EndpointOptions; - /** - * Get the defaulted endpoint options, but without parsing them into request options: - */ - merge( - Route: string, - EndpointOptions?: Octokit.EndpointOptions - ): Octokit.RequestOptions; - merge(EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; - /** - * Stateless method to turn endpoint options into request options. Calling endpoint(options) is the same as calling endpoint.parse(endpoint.merge(options)). - */ - parse(EndpointOptions: Octokit.EndpointOptions): Octokit.RequestOptions; - /** - * Merges existing defaults with passed options and returns new endpoint() method with new defaults - */ - defaults(EndpointOptions: Octokit.EndpointOptions): Octokit.Endpoint; - } - - export interface Request { - (Route: string, EndpointOptions?: Octokit.EndpointOptions): Promise< - Octokit.AnyResponse - >; - (EndpointOptions: Octokit.EndpointOptions): Promise; - endpoint: Octokit.Endpoint; - } - - export interface AuthBasic { - type: "basic"; - username: string; - password: string; - } - - export interface AuthOAuthToken { - type: "oauth"; - token: string; - } - - export interface AuthOAuthSecret { - type: "oauth"; - key: string; - secret: string; - } - - export interface AuthUserToken { - type: "token"; - token: string; - } - - export interface AuthJWT { - type: "app"; - token: string; - } - - export type Link = { link: string } | { headers: { link: string } } | string; - - export interface Callback { - (error: Error | null, result: T): any; - } - - export type Plugin = (octokit: Octokit, options: Octokit.Options) => void; - - // See https://github.com/octokit/request.js#octokitrequest - export type HookOptions = { - baseUrl: string; - headers: { [header: string]: string }; - method: string; - url: string; - data: any; - // See https://github.com/bitinn/node-fetch#options - request: { - follow?: number; - timeout?: number; - compress?: boolean; - size?: number; - agent?: string | null; - }; - [index: string]: any; - }; - - export type HookError = Error & { - status: number; - headers: { [header: string]: string }; - documentation_url?: string; - errors?: [ - { - resource: string; - field: string; - code: string; - } - ]; - }; - - export interface Paginate { - ( - Route: string, - EndpointOptions?: Octokit.EndpointOptions, - callback?: (response: Octokit.AnyResponse) => any - ): Promise; - ( - EndpointOptions: Octokit.EndpointOptions, - callback?: (response: Octokit.AnyResponse) => any - ): Promise; - iterator: ( - EndpointOptions: Octokit.EndpointOptions - ) => AsyncIterableIterator; - } - - type UsersDeletePublicKeyResponse = {}; - type UsersCreatePublicKeyResponse = { - id: number; - key: string; - url: string; - title: string; - verified: boolean; - created_at: string; - read_only: boolean; - }; - type UsersGetPublicKeyResponse = { - id: number; - key: string; - url: string; - title: string; - verified: boolean; - created_at: string; - read_only: boolean; - }; - type UsersListPublicKeysResponseItem = { - id: number; - key: string; - url: string; - title: string; - verified: boolean; - created_at: string; - read_only: boolean; - }; - type UsersListPublicKeysForUserResponseItem = { id: number; key: string }; - type UsersDeleteGpgKeyResponse = {}; - type UsersCreateGpgKeyResponseSubkeysItem = { - id: number; - primary_key_id: number; - key_id: string; - public_key: string; - emails: Array; - subkeys: Array; - can_sign: boolean; - can_encrypt_comms: boolean; - can_encrypt_storage: boolean; - can_certify: boolean; - created_at: string; - expires_at: null; - }; - type UsersCreateGpgKeyResponseEmailsItem = { - email: string; - verified: boolean; - }; - type UsersCreateGpgKeyResponse = { - id: number; - primary_key_id: null; - key_id: string; - public_key: string; - emails: Array; - subkeys: Array; - can_sign: boolean; - can_encrypt_comms: boolean; - can_encrypt_storage: boolean; - can_certify: boolean; - created_at: string; - expires_at: null; - }; - type UsersGetGpgKeyResponseSubkeysItem = { - id: number; - primary_key_id: number; - key_id: string; - public_key: string; - emails: Array; - subkeys: Array; - can_sign: boolean; - can_encrypt_comms: boolean; - can_encrypt_storage: boolean; - can_certify: boolean; - created_at: string; - expires_at: null; - }; - type UsersGetGpgKeyResponseEmailsItem = { email: string; verified: boolean }; - type UsersGetGpgKeyResponse = { - id: number; - primary_key_id: null; - key_id: string; - public_key: string; - emails: Array; - subkeys: Array; - can_sign: boolean; - can_encrypt_comms: boolean; - can_encrypt_storage: boolean; - can_certify: boolean; - created_at: string; - expires_at: null; - }; - type UsersListGpgKeysResponseItemSubkeysItem = { - id: number; - primary_key_id: number; - key_id: string; - public_key: string; - emails: Array; - subkeys: Array; - can_sign: boolean; - can_encrypt_comms: boolean; - can_encrypt_storage: boolean; - can_certify: boolean; - created_at: string; - expires_at: null; - }; - type UsersListGpgKeysResponseItemEmailsItem = { - email: string; - verified: boolean; - }; - type UsersListGpgKeysResponseItem = { - id: number; - primary_key_id: null; - key_id: string; - public_key: string; - emails: Array; - subkeys: Array; - can_sign: boolean; - can_encrypt_comms: boolean; - can_encrypt_storage: boolean; - can_certify: boolean; - created_at: string; - expires_at: null; - }; - type UsersListGpgKeysForUserResponseItemSubkeysItem = { - id: number; - primary_key_id: number; - key_id: string; - public_key: string; - emails: Array; - subkeys: Array; - can_sign: boolean; - can_encrypt_comms: boolean; - can_encrypt_storage: boolean; - can_certify: boolean; - created_at: string; - expires_at: null; - }; - type UsersListGpgKeysForUserResponseItemEmailsItem = { - email: string; - verified: boolean; - }; - type UsersListGpgKeysForUserResponseItem = { - id: number; - primary_key_id: null; - key_id: string; - public_key: string; - emails: Array; - subkeys: Array; - can_sign: boolean; - can_encrypt_comms: boolean; - can_encrypt_storage: boolean; - can_certify: boolean; - created_at: string; - expires_at: null; - }; - type UsersUnfollowResponse = {}; - type UsersFollowResponse = {}; - type UsersListFollowingForAuthenticatedUserResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type UsersListFollowingForUserResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type UsersListFollowersForAuthenticatedUserResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type UsersListFollowersForUserResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type UsersTogglePrimaryEmailVisibilityResponseItem = { - email: string; - primary: boolean; - verified: boolean; - visibility: string; - }; - type UsersDeleteEmailsResponse = {}; - type UsersAddEmailsResponseItem = { - email: string; - primary: boolean; - verified: boolean; - visibility: string | null; - }; - type UsersListPublicEmailsResponseItem = { - email: string; - verified: boolean; - primary: boolean; - visibility: string; - }; - type UsersListEmailsResponseItem = { - email: string; - verified: boolean; - primary: boolean; - visibility: string; - }; - type UsersUnblockResponse = {}; - type UsersBlockResponse = {}; - type UsersCheckBlockedResponse = {}; - type UsersListBlockedResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type UsersListResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type UsersUpdateAuthenticatedResponsePlan = { - name: string; - space: number; - private_repos: number; - collaborators: number; - }; - type UsersUpdateAuthenticatedResponse = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - name: string; - company: string; - blog: string; - location: string; - email: string; - hireable: boolean; - bio: string; - public_repos: number; - public_gists: number; - followers: number; - following: number; - created_at: string; - updated_at: string; - private_gists: number; - total_private_repos: number; - owned_private_repos: number; - disk_usage: number; - collaborators: number; - two_factor_authentication: boolean; - plan: UsersUpdateAuthenticatedResponsePlan; - }; - type UsersGetByUsernameResponse = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - name: string; - company: string; - blog: string; - location: string; - email: string; - hireable: boolean; - bio: string; - public_repos: number; - public_gists: number; - followers: number; - following: number; - created_at: string; - updated_at: string; - }; - type TeamsListPendingInvitationsResponseItemInviter = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsListPendingInvitationsResponseItem = { - id: number; - login: string; - email: string; - role: string; - created_at: string; - inviter: TeamsListPendingInvitationsResponseItemInviter; - team_count: number; - invitation_team_url: string; - }; - type TeamsRemoveMembershipResponse = {}; - type TeamsRemoveMemberResponse = {}; - type TeamsAddMemberResponse = {}; - type TeamsListMembersResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsDeleteDiscussionResponse = {}; - type TeamsUpdateDiscussionResponseReactions = { - url: string; - total_count: number; - "+1": number; - "-1": number; - laugh: number; - confused: number; - heart: number; - hooray: number; - }; - type TeamsUpdateDiscussionResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsUpdateDiscussionResponse = { - author: TeamsUpdateDiscussionResponseAuthor; - body: string; - body_html: string; - body_version: string; - comments_count: number; - comments_url: string; - created_at: string; - last_edited_at: string; - html_url: string; - node_id: string; - number: number; - pinned: boolean; - private: boolean; - team_url: string; - title: string; - updated_at: string; - url: string; - reactions: TeamsUpdateDiscussionResponseReactions; - }; - type TeamsCreateDiscussionResponseReactions = { - url: string; - total_count: number; - "+1": number; - "-1": number; - laugh: number; - confused: number; - heart: number; - hooray: number; - }; - type TeamsCreateDiscussionResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsCreateDiscussionResponse = { - author: TeamsCreateDiscussionResponseAuthor; - body: string; - body_html: string; - body_version: string; - comments_count: number; - comments_url: string; - created_at: string; - last_edited_at: null; - html_url: string; - node_id: string; - number: number; - pinned: boolean; - private: boolean; - team_url: string; - title: string; - updated_at: string; - url: string; - reactions: TeamsCreateDiscussionResponseReactions; - }; - type TeamsGetDiscussionResponseReactions = { - url: string; - total_count: number; - "+1": number; - "-1": number; - laugh: number; - confused: number; - heart: number; - hooray: number; - }; - type TeamsGetDiscussionResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsGetDiscussionResponse = { - author: TeamsGetDiscussionResponseAuthor; - body: string; - body_html: string; - body_version: string; - comments_count: number; - comments_url: string; - created_at: string; - last_edited_at: null; - html_url: string; - node_id: string; - number: number; - pinned: boolean; - private: boolean; - team_url: string; - title: string; - updated_at: string; - url: string; - reactions: TeamsGetDiscussionResponseReactions; - }; - type TeamsListDiscussionsResponseItemReactions = { - url: string; - total_count: number; - "+1": number; - "-1": number; - laugh: number; - confused: number; - heart: number; - hooray: number; - }; - type TeamsListDiscussionsResponseItemAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsListDiscussionsResponseItem = { - author: TeamsListDiscussionsResponseItemAuthor; - body: string; - body_html: string; - body_version: string; - comments_count: number; - comments_url: string; - created_at: string; - last_edited_at: null; - html_url: string; - node_id: string; - number: number; - pinned: boolean; - private: boolean; - team_url: string; - title: string; - updated_at: string; - url: string; - reactions: TeamsListDiscussionsResponseItemReactions; - }; - type TeamsDeleteDiscussionCommentResponse = {}; - type TeamsUpdateDiscussionCommentResponseReactions = { - url: string; - total_count: number; - "+1": number; - "-1": number; - laugh: number; - confused: number; - heart: number; - hooray: number; - }; - type TeamsUpdateDiscussionCommentResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsUpdateDiscussionCommentResponse = { - author: TeamsUpdateDiscussionCommentResponseAuthor; - body: string; - body_html: string; - body_version: string; - created_at: string; - last_edited_at: string; - discussion_url: string; - html_url: string; - node_id: string; - number: number; - updated_at: string; - url: string; - reactions: TeamsUpdateDiscussionCommentResponseReactions; - }; - type TeamsCreateDiscussionCommentResponseReactions = { - url: string; - total_count: number; - "+1": number; - "-1": number; - laugh: number; - confused: number; - heart: number; - hooray: number; - }; - type TeamsCreateDiscussionCommentResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsCreateDiscussionCommentResponse = { - author: TeamsCreateDiscussionCommentResponseAuthor; - body: string; - body_html: string; - body_version: string; - created_at: string; - last_edited_at: null; - discussion_url: string; - html_url: string; - node_id: string; - number: number; - updated_at: string; - url: string; - reactions: TeamsCreateDiscussionCommentResponseReactions; - }; - type TeamsGetDiscussionCommentResponseReactions = { - url: string; - total_count: number; - "+1": number; - "-1": number; - laugh: number; - confused: number; - heart: number; - hooray: number; - }; - type TeamsGetDiscussionCommentResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsGetDiscussionCommentResponse = { - author: TeamsGetDiscussionCommentResponseAuthor; - body: string; - body_html: string; - body_version: string; - created_at: string; - last_edited_at: null; - discussion_url: string; - html_url: string; - node_id: string; - number: number; - updated_at: string; - url: string; - reactions: TeamsGetDiscussionCommentResponseReactions; - }; - type TeamsListDiscussionCommentsResponseItemReactions = { - url: string; - total_count: number; - "+1": number; - "-1": number; - laugh: number; - confused: number; - heart: number; - hooray: number; - }; - type TeamsListDiscussionCommentsResponseItemAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsListDiscussionCommentsResponseItem = { - author: TeamsListDiscussionCommentsResponseItemAuthor; - body: string; - body_html: string; - body_version: string; - created_at: string; - last_edited_at: null; - discussion_url: string; - html_url: string; - node_id: string; - number: number; - updated_at: string; - url: string; - reactions: TeamsListDiscussionCommentsResponseItemReactions; - }; - type TeamsRemoveProjectResponse = {}; - type TeamsAddOrUpdateProjectResponse = {}; - type TeamsReviewProjectResponsePermissions = { - read: boolean; - write: boolean; - admin: boolean; - }; - type TeamsReviewProjectResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsReviewProjectResponse = { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - name: string; - body: string; - number: number; - state: string; - creator: TeamsReviewProjectResponseCreator; - created_at: string; - updated_at: string; - organization_permission: string; - private: boolean; - permissions: TeamsReviewProjectResponsePermissions; - }; - type TeamsListProjectsResponseItemPermissions = { - read: boolean; - write: boolean; - admin: boolean; - }; - type TeamsListProjectsResponseItemCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsListProjectsResponseItem = { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - name: string; - body: string; - number: number; - state: string; - creator: TeamsListProjectsResponseItemCreator; - created_at: string; - updated_at: string; - organization_permission: string; - private: boolean; - permissions: TeamsListProjectsResponseItemPermissions; - }; - type TeamsListForAuthenticatedUserResponseItemOrganization = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - name: string; - company: string; - blog: string; - location: string; - email: string; - is_verified: boolean; - has_organization_projects: boolean; - has_repository_projects: boolean; - public_repos: number; - public_gists: number; - followers: number; - following: number; - html_url: string; - created_at: string; - type: string; - }; - type TeamsListForAuthenticatedUserResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - members_count: number; - repos_count: number; - created_at: string; - updated_at: string; - organization: TeamsListForAuthenticatedUserResponseItemOrganization; - }; - type TeamsRemoveRepoResponse = {}; - type TeamsAddOrUpdateRepoResponse = {}; - type TeamsListReposResponseItemLicense = { - key: string; - name: string; - spdx_id: string; - url: string; - node_id: string; - }; - type TeamsListReposResponseItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type TeamsListReposResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type TeamsListReposResponseItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: TeamsListReposResponseItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: TeamsListReposResponseItemPermissions; - template_repository: null; - subscribers_count: number; - network_count: number; - license: TeamsListReposResponseItemLicense; - }; - type TeamsDeleteResponse = {}; - type TeamsUpdateResponseOrganization = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - name: string; - company: string; - blog: string; - location: string; - email: string; - is_verified: boolean; - has_organization_projects: boolean; - has_repository_projects: boolean; - public_repos: number; - public_gists: number; - followers: number; - following: number; - html_url: string; - created_at: string; - type: string; - }; - type TeamsUpdateResponse = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - members_count: number; - repos_count: number; - created_at: string; - updated_at: string; - organization: TeamsUpdateResponseOrganization; - }; - type TeamsCreateResponseOrganization = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - name: string; - company: string; - blog: string; - location: string; - email: string; - is_verified: boolean; - has_organization_projects: boolean; - has_repository_projects: boolean; - public_repos: number; - public_gists: number; - followers: number; - following: number; - html_url: string; - created_at: string; - type: string; - }; - type TeamsCreateResponse = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - members_count: number; - repos_count: number; - created_at: string; - updated_at: string; - organization: TeamsCreateResponseOrganization; - }; - type TeamsGetByNameResponseOrganization = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - name: string; - company: string; - blog: string; - location: string; - email: string; - is_verified: boolean; - has_organization_projects: boolean; - has_repository_projects: boolean; - public_repos: number; - public_gists: number; - followers: number; - following: number; - html_url: string; - created_at: string; - type: string; - }; - type TeamsGetByNameResponse = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - members_count: number; - repos_count: number; - created_at: string; - updated_at: string; - organization: TeamsGetByNameResponseOrganization; - }; - type TeamsGetResponseOrganization = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - name: string; - company: string; - blog: string; - location: string; - email: string; - is_verified: boolean; - has_organization_projects: boolean; - has_repository_projects: boolean; - public_repos: number; - public_gists: number; - followers: number; - following: number; - html_url: string; - created_at: string; - type: string; - }; - type TeamsGetResponse = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - members_count: number; - repos_count: number; - created_at: string; - updated_at: string; - organization: TeamsGetResponseOrganization; - }; - type TeamsListResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type ReposGetClonesResponseClonesItem = { - timestamp: string; - count: number; - uniques: number; - }; - type ReposGetClonesResponse = { - count: number; - uniques: number; - clones: Array; - }; - type ReposGetViewsResponseViewsItem = { - timestamp: string; - count: number; - uniques: number; - }; - type ReposGetViewsResponse = { - count: number; - uniques: number; - views: Array; - }; - type ReposGetTopPathsResponseItem = { - path: string; - title: string; - count: number; - uniques: number; - }; - type ReposGetTopReferrersResponseItem = { - referrer: string; - count: number; - uniques: number; - }; - type ReposGetCombinedStatusForRefResponseRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetCombinedStatusForRefResponseRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposGetCombinedStatusForRefResponseRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - }; - type ReposGetCombinedStatusForRefResponseStatusesItem = { - url: string; - avatar_url: string; - id: number; - node_id: string; - state: string; - description: string; - target_url: string; - context: string; - created_at: string; - updated_at: string; - }; - type ReposGetCombinedStatusForRefResponse = { - state: string; - statuses: Array; - sha: string; - total_count: number; - repository: ReposGetCombinedStatusForRefResponseRepository; - commit_url: string; - url: string; - }; - type ReposListStatusesForRefResponseItemCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListStatusesForRefResponseItem = { - url: string; - avatar_url: string; - id: number; - node_id: string; - state: string; - description: string; - target_url: string; - context: string; - created_at: string; - updated_at: string; - creator: ReposListStatusesForRefResponseItemCreator; - }; - type ReposCreateStatusResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposCreateStatusResponse = { - url: string; - avatar_url: string; - id: number; - node_id: string; - state: string; - description: string; - target_url: string; - context: string; - created_at: string; - updated_at: string; - creator: ReposCreateStatusResponseCreator; - }; - type ReposGetParticipationStatsResponse = { - all: Array; - owner: Array; - }; - type ReposGetCommitActivityStatsResponseItem = { - days: Array; - total: number; - week: number; - }; - type ReposGetContributorsStatsResponseItemWeeksItem = { - w: string; - a: number; - d: number; - c: number; - }; - type ReposGetContributorsStatsResponseItemAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetContributorsStatsResponseItem = { - author: ReposGetContributorsStatsResponseItemAuthor; - total: number; - weeks: Array; - }; - type ReposDeleteReleaseAssetResponse = {}; - type ReposUpdateReleaseAssetResponseUploader = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateReleaseAssetResponse = { - url: string; - browser_download_url: string; - id: number; - node_id: string; - name: string; - label: string; - state: string; - content_type: string; - size: number; - download_count: number; - created_at: string; - updated_at: string; - uploader: ReposUpdateReleaseAssetResponseUploader; - }; - type ReposGetReleaseAssetResponseUploader = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetReleaseAssetResponse = { - url: string; - browser_download_url: string; - id: number; - node_id: string; - name: string; - label: string; - state: string; - content_type: string; - size: number; - download_count: number; - created_at: string; - updated_at: string; - uploader: ReposGetReleaseAssetResponseUploader; - }; - type ReposListAssetsForReleaseResponseItemUploader = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListAssetsForReleaseResponseItem = { - url: string; - browser_download_url: string; - id: number; - node_id: string; - name: string; - label: string; - state: string; - content_type: string; - size: number; - download_count: number; - created_at: string; - updated_at: string; - uploader: ReposListAssetsForReleaseResponseItemUploader; - }; - type ReposDeleteReleaseResponse = {}; - type ReposUpdateReleaseResponseAssetsItemUploader = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateReleaseResponseAssetsItem = { - url: string; - browser_download_url: string; - id: number; - node_id: string; - name: string; - label: string; - state: string; - content_type: string; - size: number; - download_count: number; - created_at: string; - updated_at: string; - uploader: ReposUpdateReleaseResponseAssetsItemUploader; - }; - type ReposUpdateReleaseResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateReleaseResponse = { - url: string; - html_url: string; - assets_url: string; - upload_url: string; - tarball_url: string; - zipball_url: string; - id: number; - node_id: string; - tag_name: string; - target_commitish: string; - name: string; - body: string; - draft: boolean; - prerelease: boolean; - created_at: string; - published_at: string; - author: ReposUpdateReleaseResponseAuthor; - assets: Array; - }; - type ReposCreateReleaseResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposCreateReleaseResponse = { - url: string; - html_url: string; - assets_url: string; - upload_url: string; - tarball_url: string; - zipball_url: string; - id: number; - node_id: string; - tag_name: string; - target_commitish: string; - name: string; - body: string; - draft: boolean; - prerelease: boolean; - created_at: string; - published_at: string; - author: ReposCreateReleaseResponseAuthor; - assets: Array; - }; - type ReposGetReleaseByTagResponseAssetsItemUploader = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetReleaseByTagResponseAssetsItem = { - url: string; - browser_download_url: string; - id: number; - node_id: string; - name: string; - label: string; - state: string; - content_type: string; - size: number; - download_count: number; - created_at: string; - updated_at: string; - uploader: ReposGetReleaseByTagResponseAssetsItemUploader; - }; - type ReposGetReleaseByTagResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetReleaseByTagResponse = { - url: string; - html_url: string; - assets_url: string; - upload_url: string; - tarball_url: string; - zipball_url: string; - id: number; - node_id: string; - tag_name: string; - target_commitish: string; - name: string; - body: string; - draft: boolean; - prerelease: boolean; - created_at: string; - published_at: string; - author: ReposGetReleaseByTagResponseAuthor; - assets: Array; - }; - type ReposGetLatestReleaseResponseAssetsItemUploader = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetLatestReleaseResponseAssetsItem = { - url: string; - browser_download_url: string; - id: number; - node_id: string; - name: string; - label: string; - state: string; - content_type: string; - size: number; - download_count: number; - created_at: string; - updated_at: string; - uploader: ReposGetLatestReleaseResponseAssetsItemUploader; - }; - type ReposGetLatestReleaseResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetLatestReleaseResponse = { - url: string; - html_url: string; - assets_url: string; - upload_url: string; - tarball_url: string; - zipball_url: string; - id: number; - node_id: string; - tag_name: string; - target_commitish: string; - name: string; - body: string; - draft: boolean; - prerelease: boolean; - created_at: string; - published_at: string; - author: ReposGetLatestReleaseResponseAuthor; - assets: Array; - }; - type ReposGetReleaseResponseAssetsItemUploader = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetReleaseResponseAssetsItem = { - url: string; - browser_download_url: string; - id: number; - node_id: string; - name: string; - label: string; - state: string; - content_type: string; - size: number; - download_count: number; - created_at: string; - updated_at: string; - uploader: ReposGetReleaseResponseAssetsItemUploader; - }; - type ReposGetReleaseResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetReleaseResponse = { - url: string; - html_url: string; - assets_url: string; - upload_url: string; - tarball_url: string; - zipball_url: string; - id: number; - node_id: string; - tag_name: string; - target_commitish: string; - name: string; - body: string; - draft: boolean; - prerelease: boolean; - created_at: string; - published_at: string; - author: ReposGetReleaseResponseAuthor; - assets: Array; - }; - type ReposListReleasesResponseItemAssetsItemUploader = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListReleasesResponseItemAssetsItem = { - url: string; - browser_download_url: string; - id: number; - node_id: string; - name: string; - label: string; - state: string; - content_type: string; - size: number; - download_count: number; - created_at: string; - updated_at: string; - uploader: ReposListReleasesResponseItemAssetsItemUploader; - }; - type ReposListReleasesResponseItemAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListReleasesResponseItem = { - url: string; - html_url: string; - assets_url: string; - upload_url: string; - tarball_url: string; - zipball_url: string; - id: number; - node_id: string; - tag_name: string; - target_commitish: string; - name: string; - body: string; - draft: boolean; - prerelease: boolean; - created_at: string; - published_at: string; - author: ReposListReleasesResponseItemAuthor; - assets: Array; - }; - type ReposGetPagesBuildResponsePusher = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetPagesBuildResponseError = { message: null }; - type ReposGetPagesBuildResponse = { - url: string; - status: string; - error: ReposGetPagesBuildResponseError; - pusher: ReposGetPagesBuildResponsePusher; - commit: string; - duration: number; - created_at: string; - updated_at: string; - }; - type ReposGetLatestPagesBuildResponsePusher = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetLatestPagesBuildResponseError = { message: null }; - type ReposGetLatestPagesBuildResponse = { - url: string; - status: string; - error: ReposGetLatestPagesBuildResponseError; - pusher: ReposGetLatestPagesBuildResponsePusher; - commit: string; - duration: number; - created_at: string; - updated_at: string; - }; - type ReposListPagesBuildsResponseItemPusher = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListPagesBuildsResponseItemError = { message: null }; - type ReposListPagesBuildsResponseItem = { - url: string; - status: string; - error: ReposListPagesBuildsResponseItemError; - pusher: ReposListPagesBuildsResponseItemPusher; - commit: string; - duration: number; - created_at: string; - updated_at: string; - }; - type ReposRequestPageBuildResponse = { url: string; status: string }; - type ReposUpdateInformationAboutPagesSiteResponse = {}; - type ReposDisablePagesSiteResponse = {}; - type ReposEnablePagesSiteResponseSource = { - branch: string; - directory: string; - }; - type ReposEnablePagesSiteResponse = { - url: string; - status: string; - cname: string; - custom_404: boolean; - html_url: string; - source: ReposEnablePagesSiteResponseSource; - }; - type ReposGetPagesResponseSource = { branch: string; directory: string }; - type ReposGetPagesResponse = { - url: string; - status: string; - cname: string; - custom_404: boolean; - html_url: string; - source: ReposGetPagesResponseSource; - }; - type ReposRemoveDeployKeyResponse = {}; - type ReposAddDeployKeyResponse = { - id: number; - key: string; - url: string; - title: string; - verified: boolean; - created_at: string; - read_only: boolean; - }; - type ReposGetDeployKeyResponse = { - id: number; - key: string; - url: string; - title: string; - verified: boolean; - created_at: string; - read_only: boolean; - }; - type ReposListDeployKeysResponseItem = { - id: number; - key: string; - url: string; - title: string; - verified: boolean; - created_at: string; - read_only: boolean; - }; - type ReposDeclineInvitationResponse = {}; - type ReposAcceptInvitationResponse = {}; - type ReposListInvitationsForAuthenticatedUserResponseItemInviter = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListInvitationsForAuthenticatedUserResponseItemInvitee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListInvitationsForAuthenticatedUserResponseItemRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - }; - type ReposListInvitationsForAuthenticatedUserResponseItem = { - id: number; - repository: ReposListInvitationsForAuthenticatedUserResponseItemRepository; - invitee: ReposListInvitationsForAuthenticatedUserResponseItemInvitee; - inviter: ReposListInvitationsForAuthenticatedUserResponseItemInviter; - permissions: string; - created_at: string; - url: string; - html_url: string; - }; - type ReposUpdateInvitationResponseInviter = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateInvitationResponseInvitee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateInvitationResponseRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateInvitationResponseRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposUpdateInvitationResponseRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - }; - type ReposUpdateInvitationResponse = { - id: number; - repository: ReposUpdateInvitationResponseRepository; - invitee: ReposUpdateInvitationResponseInvitee; - inviter: ReposUpdateInvitationResponseInviter; - permissions: string; - created_at: string; - url: string; - html_url: string; - }; - type ReposDeleteInvitationResponse = {}; - type ReposListInvitationsResponseItemInviter = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListInvitationsResponseItemInvitee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListInvitationsResponseItemRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListInvitationsResponseItemRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposListInvitationsResponseItemRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - }; - type ReposListInvitationsResponseItem = { - id: number; - repository: ReposListInvitationsResponseItemRepository; - invitee: ReposListInvitationsResponseItemInvitee; - inviter: ReposListInvitationsResponseItemInviter; - permissions: string; - created_at: string; - url: string; - html_url: string; - }; - type ReposDeleteHookResponse = {}; - type ReposPingHookResponse = {}; - type ReposTestPushHookResponse = {}; - type ReposUpdateHookResponseLastResponse = { - code: null; - status: string; - message: null; - }; - type ReposUpdateHookResponseConfig = { - content_type: string; - insecure_ssl: string; - url: string; - }; - type ReposUpdateHookResponse = { - type: string; - id: number; - name: string; - active: boolean; - events: Array; - config: ReposUpdateHookResponseConfig; - updated_at: string; - created_at: string; - url: string; - test_url: string; - ping_url: string; - last_response: ReposUpdateHookResponseLastResponse; - }; - type ReposCreateHookResponseLastResponse = { - code: null; - status: string; - message: null; - }; - type ReposCreateHookResponseConfig = { - content_type: string; - insecure_ssl: string; - url: string; - }; - type ReposCreateHookResponse = { - type: string; - id: number; - name: string; - active: boolean; - events: Array; - config: ReposCreateHookResponseConfig; - updated_at: string; - created_at: string; - url: string; - test_url: string; - ping_url: string; - last_response: ReposCreateHookResponseLastResponse; - }; - type ReposGetHookResponseLastResponse = { - code: null; - status: string; - message: null; - }; - type ReposGetHookResponseConfig = { - content_type: string; - insecure_ssl: string; - url: string; - }; - type ReposGetHookResponse = { - type: string; - id: number; - name: string; - active: boolean; - events: Array; - config: ReposGetHookResponseConfig; - updated_at: string; - created_at: string; - url: string; - test_url: string; - ping_url: string; - last_response: ReposGetHookResponseLastResponse; - }; - type ReposListHooksResponseItemLastResponse = { - code: null; - status: string; - message: null; - }; - type ReposListHooksResponseItemConfig = { - content_type: string; - insecure_ssl: string; - url: string; - }; - type ReposListHooksResponseItem = { - type: string; - id: number; - name: string; - active: boolean; - events: Array; - config: ReposListHooksResponseItemConfig; - updated_at: string; - created_at: string; - url: string; - test_url: string; - ping_url: string; - last_response: ReposListHooksResponseItemLastResponse; - }; - type ReposCreateForkResponsePermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposCreateForkResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposCreateForkResponse = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposCreateForkResponseOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposCreateForkResponsePermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposListForksResponseItemLicense = { - key: string; - name: string; - spdx_id: string; - url: string; - node_id: string; - }; - type ReposListForksResponseItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposListForksResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListForksResponseItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposListForksResponseItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposListForksResponseItemPermissions; - template_repository: null; - subscribers_count: number; - network_count: number; - license: ReposListForksResponseItemLicense; - }; - type ReposDeleteDownloadResponse = {}; - type ReposGetDownloadResponse = { - url: string; - html_url: string; - id: number; - name: string; - description: string; - size: number; - download_count: number; - content_type: string; - }; - type ReposListDownloadsResponseItem = { - url: string; - html_url: string; - id: number; - name: string; - description: string; - size: number; - download_count: number; - content_type: string; - }; - type ReposCreateDeploymentStatusResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposCreateDeploymentStatusResponse = { - url: string; - id: number; - node_id: string; - state: string; - creator: ReposCreateDeploymentStatusResponseCreator; - description: string; - environment: string; - target_url: string; - created_at: string; - updated_at: string; - deployment_url: string; - repository_url: string; - environment_url: string; - log_url: string; - }; - type ReposGetDeploymentStatusResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetDeploymentStatusResponse = { - url: string; - id: number; - node_id: string; - state: string; - creator: ReposGetDeploymentStatusResponseCreator; - description: string; - environment: string; - target_url: string; - created_at: string; - updated_at: string; - deployment_url: string; - repository_url: string; - environment_url: string; - log_url: string; - }; - type ReposListDeploymentStatusesResponseItemCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListDeploymentStatusesResponseItem = { - url: string; - id: number; - node_id: string; - state: string; - creator: ReposListDeploymentStatusesResponseItemCreator; - description: string; - environment: string; - target_url: string; - created_at: string; - updated_at: string; - deployment_url: string; - repository_url: string; - environment_url: string; - log_url: string; - }; - type ReposGetDeploymentResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetDeploymentResponsePayload = { deploy: string }; - type ReposGetDeploymentResponse = { - url: string; - id: number; - node_id: string; - sha: string; - ref: string; - task: string; - payload: ReposGetDeploymentResponsePayload; - original_environment: string; - environment: string; - description: string; - creator: ReposGetDeploymentResponseCreator; - created_at: string; - updated_at: string; - statuses_url: string; - repository_url: string; - transient_environment: boolean; - production_environment: boolean; - }; - type ReposListDeploymentsResponseItemCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListDeploymentsResponseItemPayload = { deploy: string }; - type ReposListDeploymentsResponseItem = { - url: string; - id: number; - node_id: string; - sha: string; - ref: string; - task: string; - payload: ReposListDeploymentsResponseItemPayload; - original_environment: string; - environment: string; - description: string; - creator: ReposListDeploymentsResponseItemCreator; - created_at: string; - updated_at: string; - statuses_url: string; - repository_url: string; - transient_environment: boolean; - production_environment: boolean; - }; - type ReposGetArchiveLinkResponse = {}; - type ReposDeleteFileResponseCommitVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type ReposDeleteFileResponseCommitParentsItem = { - url: string; - html_url: string; - sha: string; - }; - type ReposDeleteFileResponseCommitTree = { url: string; sha: string }; - type ReposDeleteFileResponseCommitCommitter = { - date: string; - name: string; - email: string; - }; - type ReposDeleteFileResponseCommitAuthor = { - date: string; - name: string; - email: string; - }; - type ReposDeleteFileResponseCommit = { - sha: string; - node_id: string; - url: string; - html_url: string; - author: ReposDeleteFileResponseCommitAuthor; - committer: ReposDeleteFileResponseCommitCommitter; - message: string; - tree: ReposDeleteFileResponseCommitTree; - parents: Array; - verification: ReposDeleteFileResponseCommitVerification; - }; - type ReposDeleteFileResponse = { - content: null; - commit: ReposDeleteFileResponseCommit; - }; - type ReposUpdateFileResponseCommitVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type ReposUpdateFileResponseCommitParentsItem = { - url: string; - html_url: string; - sha: string; - }; - type ReposUpdateFileResponseCommitTree = { url: string; sha: string }; - type ReposUpdateFileResponseCommitCommitter = { - date: string; - name: string; - email: string; - }; - type ReposUpdateFileResponseCommitAuthor = { - date: string; - name: string; - email: string; - }; - type ReposUpdateFileResponseCommit = { - sha: string; - node_id: string; - url: string; - html_url: string; - author: ReposUpdateFileResponseCommitAuthor; - committer: ReposUpdateFileResponseCommitCommitter; - message: string; - tree: ReposUpdateFileResponseCommitTree; - parents: Array; - verification: ReposUpdateFileResponseCommitVerification; - }; - type ReposUpdateFileResponseContentLinks = { - self: string; - git: string; - html: string; - }; - type ReposUpdateFileResponseContent = { - name: string; - path: string; - sha: string; - size: number; - url: string; - html_url: string; - git_url: string; - download_url: string; - type: string; - _links: ReposUpdateFileResponseContentLinks; - }; - type ReposUpdateFileResponse = { - content: ReposUpdateFileResponseContent; - commit: ReposUpdateFileResponseCommit; - }; - type ReposCreateFileResponseCommitVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type ReposCreateFileResponseCommitParentsItem = { - url: string; - html_url: string; - sha: string; - }; - type ReposCreateFileResponseCommitTree = { url: string; sha: string }; - type ReposCreateFileResponseCommitCommitter = { - date: string; - name: string; - email: string; - }; - type ReposCreateFileResponseCommitAuthor = { - date: string; - name: string; - email: string; - }; - type ReposCreateFileResponseCommit = { - sha: string; - node_id: string; - url: string; - html_url: string; - author: ReposCreateFileResponseCommitAuthor; - committer: ReposCreateFileResponseCommitCommitter; - message: string; - tree: ReposCreateFileResponseCommitTree; - parents: Array; - verification: ReposCreateFileResponseCommitVerification; - }; - type ReposCreateFileResponseContentLinks = { - self: string; - git: string; - html: string; - }; - type ReposCreateFileResponseContent = { - name: string; - path: string; - sha: string; - size: number; - url: string; - html_url: string; - git_url: string; - download_url: string; - type: string; - _links: ReposCreateFileResponseContentLinks; - }; - type ReposCreateFileResponse = { - content: ReposCreateFileResponseContent; - commit: ReposCreateFileResponseCommit; - }; - type ReposCreateOrUpdateFileResponseCommitVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type ReposCreateOrUpdateFileResponseCommitParentsItem = { - url: string; - html_url: string; - sha: string; - }; - type ReposCreateOrUpdateFileResponseCommitTree = { url: string; sha: string }; - type ReposCreateOrUpdateFileResponseCommitCommitter = { - date: string; - name: string; - email: string; - }; - type ReposCreateOrUpdateFileResponseCommitAuthor = { - date: string; - name: string; - email: string; - }; - type ReposCreateOrUpdateFileResponseCommit = { - sha: string; - node_id: string; - url: string; - html_url: string; - author: ReposCreateOrUpdateFileResponseCommitAuthor; - committer: ReposCreateOrUpdateFileResponseCommitCommitter; - message: string; - tree: ReposCreateOrUpdateFileResponseCommitTree; - parents: Array; - verification: ReposCreateOrUpdateFileResponseCommitVerification; - }; - type ReposCreateOrUpdateFileResponseContentLinks = { - self: string; - git: string; - html: string; - }; - type ReposCreateOrUpdateFileResponseContent = { - name: string; - path: string; - sha: string; - size: number; - url: string; - html_url: string; - git_url: string; - download_url: string; - type: string; - _links: ReposCreateOrUpdateFileResponseContentLinks; - }; - type ReposCreateOrUpdateFileResponse = { - content: ReposCreateOrUpdateFileResponseContent; - commit: ReposCreateOrUpdateFileResponseCommit; - }; - type ReposGetReadmeResponseLinks = { - git: string; - self: string; - html: string; - }; - type ReposGetReadmeResponse = { - type: string; - encoding: string; - size: number; - name: string; - path: string; - content: string; - sha: string; - url: string; - git_url: string; - html_url: string; - download_url: string; - _links: ReposGetReadmeResponseLinks; - }; - type ReposRetrieveCommunityProfileMetricsResponseFilesReadme = { - url: string; - html_url: string; - }; - type ReposRetrieveCommunityProfileMetricsResponseFilesLicense = { - name: string; - key: string; - spdx_id: string; - url: string; - html_url: string; - }; - type ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate = { - url: string; - html_url: string; - }; - type ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate = { - url: string; - html_url: string; - }; - type ReposRetrieveCommunityProfileMetricsResponseFilesContributing = { - url: string; - html_url: string; - }; - type ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct = { - name: string; - key: string; - url: string; - html_url: string; - }; - type ReposRetrieveCommunityProfileMetricsResponseFiles = { - code_of_conduct: ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct; - contributing: ReposRetrieveCommunityProfileMetricsResponseFilesContributing; - issue_template: ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate; - pull_request_template: ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate; - license: ReposRetrieveCommunityProfileMetricsResponseFilesLicense; - readme: ReposRetrieveCommunityProfileMetricsResponseFilesReadme; - }; - type ReposRetrieveCommunityProfileMetricsResponse = { - health_percentage: number; - description: string; - documentation: boolean; - files: ReposRetrieveCommunityProfileMetricsResponseFiles; - updated_at: string; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses = { - href: string; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits = { - href: string; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment = { - href: string; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments = { - href: string; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments = { - href: string; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue = { - href: string; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml = { - href: string; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf = { - href: string; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemLinks = { - self: ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf; - html: ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml; - issue: ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue; - comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments; - review_comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments; - review_comment: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment; - commits: ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits; - statuses: ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemBase = { - label: string; - ref: string; - sha: string; - user: ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser; - repo: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemHead = { - label: string; - ref: string; - sha: string; - user: ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser; - repo: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListPullRequestsAssociatedWithCommitResponseItem = { - url: string; - id: number; - node_id: string; - html_url: string; - diff_url: string; - patch_url: string; - issue_url: string; - commits_url: string; - review_comments_url: string; - review_comment_url: string; - comments_url: string; - statuses_url: string; - number: number; - state: string; - locked: boolean; - title: string; - user: ReposListPullRequestsAssociatedWithCommitResponseItemUser; - body: string; - labels: Array< - ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem - >; - milestone: ReposListPullRequestsAssociatedWithCommitResponseItemMilestone; - active_lock_reason: string; - created_at: string; - updated_at: string; - closed_at: string; - merged_at: string; - merge_commit_sha: string; - assignee: ReposListPullRequestsAssociatedWithCommitResponseItemAssignee; - assignees: Array< - ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem - >; - requested_reviewers: Array< - ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem - >; - requested_teams: Array< - ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem - >; - head: ReposListPullRequestsAssociatedWithCommitResponseItemHead; - base: ReposListPullRequestsAssociatedWithCommitResponseItemBase; - _links: ReposListPullRequestsAssociatedWithCommitResponseItemLinks; - author_association: string; - draft: boolean; - }; - type ReposListBranchesForHeadCommitResponseItemCommit = { - sha: string; - url: string; - }; - type ReposListBranchesForHeadCommitResponseItem = { - name: string; - commit: ReposListBranchesForHeadCommitResponseItemCommit; - protected: string; - }; - type ReposGetCommitRefShaResponse = {}; - type ReposGetCommitResponseFilesItem = { - filename: string; - additions: number; - deletions: number; - changes: number; - status: string; - raw_url: string; - blob_url: string; - patch: string; - }; - type ReposGetCommitResponseStats = { - additions: number; - deletions: number; - total: number; - }; - type ReposGetCommitResponseParentsItem = { url: string; sha: string }; - type ReposGetCommitResponseCommitter = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetCommitResponseAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetCommitResponseCommitVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type ReposGetCommitResponseCommitTree = { url: string; sha: string }; - type ReposGetCommitResponseCommitCommitter = { - name: string; - email: string; - date: string; - }; - type ReposGetCommitResponseCommitAuthor = { - name: string; - email: string; - date: string; - }; - type ReposGetCommitResponseCommit = { - url: string; - author: ReposGetCommitResponseCommitAuthor; - committer: ReposGetCommitResponseCommitCommitter; - message: string; - tree: ReposGetCommitResponseCommitTree; - comment_count: number; - verification: ReposGetCommitResponseCommitVerification; - }; - type ReposGetCommitResponse = { - url: string; - sha: string; - node_id: string; - html_url: string; - comments_url: string; - commit: ReposGetCommitResponseCommit; - author: ReposGetCommitResponseAuthor; - committer: ReposGetCommitResponseCommitter; - parents: Array; - stats: ReposGetCommitResponseStats; - files: Array; - }; - type ReposListCommitsResponseItemParentsItem = { url: string; sha: string }; - type ReposListCommitsResponseItemCommitter = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListCommitsResponseItemAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListCommitsResponseItemCommitVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type ReposListCommitsResponseItemCommitTree = { url: string; sha: string }; - type ReposListCommitsResponseItemCommitCommitter = { - name: string; - email: string; - date: string; - }; - type ReposListCommitsResponseItemCommitAuthor = { - name: string; - email: string; - date: string; - }; - type ReposListCommitsResponseItemCommit = { - url: string; - author: ReposListCommitsResponseItemCommitAuthor; - committer: ReposListCommitsResponseItemCommitCommitter; - message: string; - tree: ReposListCommitsResponseItemCommitTree; - comment_count: number; - verification: ReposListCommitsResponseItemCommitVerification; - }; - type ReposListCommitsResponseItem = { - url: string; - sha: string; - node_id: string; - html_url: string; - comments_url: string; - commit: ReposListCommitsResponseItemCommit; - author: ReposListCommitsResponseItemAuthor; - committer: ReposListCommitsResponseItemCommitter; - parents: Array; - }; - type ReposDeleteCommitCommentResponse = {}; - type ReposUpdateCommitCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateCommitCommentResponse = { - html_url: string; - url: string; - id: number; - node_id: string; - body: string; - path: string; - position: number; - line: number; - commit_id: string; - user: ReposUpdateCommitCommentResponseUser; - created_at: string; - updated_at: string; - }; - type ReposGetCommitCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetCommitCommentResponse = { - html_url: string; - url: string; - id: number; - node_id: string; - body: string; - path: string; - position: number; - line: number; - commit_id: string; - user: ReposGetCommitCommentResponseUser; - created_at: string; - updated_at: string; - }; - type ReposCreateCommitCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposCreateCommitCommentResponse = { - html_url: string; - url: string; - id: number; - node_id: string; - body: string; - path: string; - position: number; - line: number; - commit_id: string; - user: ReposCreateCommitCommentResponseUser; - created_at: string; - updated_at: string; - }; - type ReposListCommentsForCommitResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListCommentsForCommitResponseItem = { - html_url: string; - url: string; - id: number; - node_id: string; - body: string; - path: string; - position: number; - line: number; - commit_id: string; - user: ReposListCommentsForCommitResponseItemUser; - created_at: string; - updated_at: string; - }; - type ReposListCommitCommentsResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListCommitCommentsResponseItem = { - html_url: string; - url: string; - id: number; - node_id: string; - body: string; - path: string; - position: number; - line: number; - commit_id: string; - user: ReposListCommitCommentsResponseItemUser; - created_at: string; - updated_at: string; - }; - type ReposRemoveCollaboratorResponse = {}; - type ReposListCollaboratorsResponseItemPermissions = { - pull: boolean; - push: boolean; - admin: boolean; - }; - type ReposListCollaboratorsResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - permissions: ReposListCollaboratorsResponseItemPermissions; - }; - type ReposRemoveProtectedBranchUserRestrictionsResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposAddProtectedBranchUserRestrictionsResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposReplaceProtectedBranchUserRestrictionsResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposRemoveProtectedBranchTeamRestrictionsResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type ReposAddProtectedBranchTeamRestrictionsResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type ReposReplaceProtectedBranchTeamRestrictionsResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type ReposAddProtectedBranchAdminEnforcementResponse = { - url: string; - enabled: boolean; - }; - type ReposAddProtectedBranchRequiredSignaturesResponse = { - url: string; - enabled: boolean; - }; - type ReposGetProtectedBranchRequiredSignaturesResponse = { - url: string; - enabled: boolean; - }; - type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions = { - url: string; - users_url: string; - teams_url: string; - users: Array< - ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem - >; - teams: Array< - ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem - >; - }; - type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse = { - url: string; - dismissal_restrictions: ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions; - dismiss_stale_reviews: boolean; - require_code_owner_reviews: boolean; - required_approving_review_count: number; - }; - type ReposUpdateProtectedBranchRequiredStatusChecksResponse = { - url: string; - strict: boolean; - contexts: Array; - contexts_url: string; - }; - type ReposGetProtectedBranchRequiredStatusChecksResponse = { - url: string; - strict: boolean; - contexts: Array; - contexts_url: string; - }; - type ReposRemoveBranchProtectionResponse = {}; - type ReposUpdateBranchProtectionResponseRestrictionsTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type ReposUpdateBranchProtectionResponseRestrictionsUsersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateBranchProtectionResponseRestrictions = { - url: string; - users_url: string; - teams_url: string; - users: Array; - teams: Array; - }; - type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { - url: string; - users_url: string; - teams_url: string; - users: Array< - ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem - >; - teams: Array< - ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem - >; - }; - type ReposUpdateBranchProtectionResponseRequiredPullRequestReviews = { - url: string; - dismissal_restrictions: ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; - dismiss_stale_reviews: boolean; - require_code_owner_reviews: boolean; - required_approving_review_count: number; - }; - type ReposUpdateBranchProtectionResponseEnforceAdmins = { - url: string; - enabled: boolean; - }; - type ReposUpdateBranchProtectionResponseRequiredStatusChecks = { - url: string; - strict: boolean; - contexts: Array; - contexts_url: string; - }; - type ReposUpdateBranchProtectionResponse = { - url: string; - required_status_checks: ReposUpdateBranchProtectionResponseRequiredStatusChecks; - enforce_admins: ReposUpdateBranchProtectionResponseEnforceAdmins; - required_pull_request_reviews: ReposUpdateBranchProtectionResponseRequiredPullRequestReviews; - restrictions: ReposUpdateBranchProtectionResponseRestrictions; - }; - type ReposGetBranchProtectionResponseRestrictionsTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type ReposGetBranchProtectionResponseRestrictionsUsersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetBranchProtectionResponseRestrictions = { - url: string; - users_url: string; - teams_url: string; - users: Array; - teams: Array; - }; - type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { - url: string; - users_url: string; - teams_url: string; - users: Array< - ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem - >; - teams: Array< - ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem - >; - }; - type ReposGetBranchProtectionResponseRequiredPullRequestReviews = { - url: string; - dismissal_restrictions: ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; - dismiss_stale_reviews: boolean; - require_code_owner_reviews: boolean; - required_approving_review_count: number; - }; - type ReposGetBranchProtectionResponseEnforceAdmins = { - url: string; - enabled: boolean; - }; - type ReposGetBranchProtectionResponseRequiredStatusChecks = { - url: string; - strict: boolean; - contexts: Array; - contexts_url: string; - }; - type ReposGetBranchProtectionResponse = { - url: string; - required_status_checks: ReposGetBranchProtectionResponseRequiredStatusChecks; - enforce_admins: ReposGetBranchProtectionResponseEnforceAdmins; - required_pull_request_reviews: ReposGetBranchProtectionResponseRequiredPullRequestReviews; - restrictions: ReposGetBranchProtectionResponseRestrictions; - }; - type ReposGetBranchResponseProtectionRequiredStatusChecks = { - enforcement_level: string; - contexts: Array; - }; - type ReposGetBranchResponseProtection = { - enabled: boolean; - required_status_checks: ReposGetBranchResponseProtectionRequiredStatusChecks; - }; - type ReposGetBranchResponseLinks = { html: string; self: string }; - type ReposGetBranchResponseCommitCommitter = { - gravatar_id: string; - avatar_url: string; - url: string; - id: number; - login: string; - }; - type ReposGetBranchResponseCommitParentsItem = { sha: string; url: string }; - type ReposGetBranchResponseCommitAuthor = { - gravatar_id: string; - avatar_url: string; - url: string; - id: number; - login: string; - }; - type ReposGetBranchResponseCommitCommitVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type ReposGetBranchResponseCommitCommitCommitter = { - name: string; - date: string; - email: string; - }; - type ReposGetBranchResponseCommitCommitTree = { sha: string; url: string }; - type ReposGetBranchResponseCommitCommitAuthor = { - name: string; - date: string; - email: string; - }; - type ReposGetBranchResponseCommitCommit = { - author: ReposGetBranchResponseCommitCommitAuthor; - url: string; - message: string; - tree: ReposGetBranchResponseCommitCommitTree; - committer: ReposGetBranchResponseCommitCommitCommitter; - verification: ReposGetBranchResponseCommitCommitVerification; - }; - type ReposGetBranchResponseCommit = { - sha: string; - node_id: string; - commit: ReposGetBranchResponseCommitCommit; - author: ReposGetBranchResponseCommitAuthor; - parents: Array; - url: string; - committer: ReposGetBranchResponseCommitCommitter; - }; - type ReposGetBranchResponse = { - name: string; - commit: ReposGetBranchResponseCommit; - _links: ReposGetBranchResponseLinks; - protected: boolean; - protection: ReposGetBranchResponseProtection; - protection_url: string; - }; - type ReposListBranchesResponseItemProtectionRequiredStatusChecks = { - enforcement_level: string; - contexts: Array; - }; - type ReposListBranchesResponseItemProtection = { - enabled: boolean; - required_status_checks: ReposListBranchesResponseItemProtectionRequiredStatusChecks; - }; - type ReposListBranchesResponseItemCommit = { sha: string; url: string }; - type ReposListBranchesResponseItem = { - name: string; - commit: ReposListBranchesResponseItemCommit; - protected: boolean; - protection: ReposListBranchesResponseItemProtection; - protection_url: string; - }; - type ReposTransferResponsePermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposTransferResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposTransferResponse = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposTransferResponseOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposTransferResponsePermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposDeleteResponse = { message?: string; documentation_url?: string }; - type ReposListTagsResponseItemCommit = { sha: string; url: string }; - type ReposListTagsResponseItem = { - name: string; - commit: ReposListTagsResponseItemCommit; - zipball_url: string; - tarball_url: string; - }; - type ReposListTeamsResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type ReposListLanguagesResponse = { C: number; Python: number }; - type ReposDisableAutomatedSecurityFixesResponse = {}; - type ReposEnableAutomatedSecurityFixesResponse = {}; - type ReposDisableVulnerabilityAlertsResponse = {}; - type ReposEnableVulnerabilityAlertsResponse = {}; - type ReposReplaceTopicsResponse = { names: Array }; - type ReposListTopicsResponse = { names: Array }; - type ReposUpdateResponseSourcePermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposUpdateResponseSourceOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateResponseSource = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposUpdateResponseSourceOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposUpdateResponseSourcePermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposUpdateResponseParentPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposUpdateResponseParentOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateResponseParent = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposUpdateResponseParentOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposUpdateResponseParentPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposUpdateResponseOrganization = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateResponsePermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposUpdateResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposUpdateResponse = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposUpdateResponseOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposUpdateResponsePermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - organization: ReposUpdateResponseOrganization; - parent: ReposUpdateResponseParent; - source: ReposUpdateResponseSource; - }; - type ReposGetResponseSourcePermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposGetResponseSourceOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetResponseSource = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposGetResponseSourceOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposGetResponseSourcePermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposGetResponseParentPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposGetResponseParentOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetResponseParent = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposGetResponseParentOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposGetResponseParentPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposGetResponseOrganization = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetResponseLicense = { - key: string; - name: string; - spdx_id: string; - url: string; - node_id: string; - }; - type ReposGetResponsePermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposGetResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposGetResponse = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposGetResponseOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposGetResponsePermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - license: ReposGetResponseLicense; - organization: ReposGetResponseOrganization; - parent: ReposGetResponseParent; - source: ReposGetResponseSource; - }; - type ReposCreateUsingTemplateResponseTemplateRepositoryPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposCreateUsingTemplateResponseTemplateRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposCreateUsingTemplateResponseTemplateRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposCreateUsingTemplateResponseTemplateRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposCreateUsingTemplateResponseTemplateRepositoryPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposCreateUsingTemplateResponsePermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposCreateUsingTemplateResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposCreateUsingTemplateResponse = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposCreateUsingTemplateResponseOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposCreateUsingTemplateResponsePermissions; - allow_rebase_merge: boolean; - template_repository: ReposCreateUsingTemplateResponseTemplateRepository; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposCreateInOrgResponsePermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposCreateInOrgResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposCreateInOrgResponse = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposCreateInOrgResponseOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposCreateInOrgResponsePermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposCreateForAuthenticatedUserResponsePermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposCreateForAuthenticatedUserResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposCreateForAuthenticatedUserResponse = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposCreateForAuthenticatedUserResponseOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposCreateForAuthenticatedUserResponsePermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ReposListPublicResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListPublicResponseItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposListPublicResponseItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - }; - type ReposListForOrgResponseItemLicense = { - key: string; - name: string; - spdx_id: string; - url: string; - node_id: string; - }; - type ReposListForOrgResponseItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ReposListForOrgResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReposListForOrgResponseItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ReposListForOrgResponseItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ReposListForOrgResponseItemPermissions; - template_repository: null; - subscribers_count: number; - network_count: number; - license: ReposListForOrgResponseItemLicense; - }; - type ReactionsDeleteResponse = {}; - type ReactionsCreateForTeamDiscussionCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsCreateForTeamDiscussionCommentResponse = { - id: number; - node_id: string; - user: ReactionsCreateForTeamDiscussionCommentResponseUser; - content: string; - created_at: string; - }; - type ReactionsListForTeamDiscussionCommentResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsListForTeamDiscussionCommentResponseItem = { - id: number; - node_id: string; - user: ReactionsListForTeamDiscussionCommentResponseItemUser; - content: string; - created_at: string; - }; - type ReactionsCreateForTeamDiscussionResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsCreateForTeamDiscussionResponse = { - id: number; - node_id: string; - user: ReactionsCreateForTeamDiscussionResponseUser; - content: string; - created_at: string; - }; - type ReactionsListForTeamDiscussionResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsListForTeamDiscussionResponseItem = { - id: number; - node_id: string; - user: ReactionsListForTeamDiscussionResponseItemUser; - content: string; - created_at: string; - }; - type ReactionsCreateForPullRequestReviewCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsCreateForPullRequestReviewCommentResponse = { - id: number; - node_id: string; - user: ReactionsCreateForPullRequestReviewCommentResponseUser; - content: string; - created_at: string; - }; - type ReactionsListForPullRequestReviewCommentResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsListForPullRequestReviewCommentResponseItem = { - id: number; - node_id: string; - user: ReactionsListForPullRequestReviewCommentResponseItemUser; - content: string; - created_at: string; - }; - type ReactionsCreateForIssueCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsCreateForIssueCommentResponse = { - id: number; - node_id: string; - user: ReactionsCreateForIssueCommentResponseUser; - content: string; - created_at: string; - }; - type ReactionsListForIssueCommentResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsListForIssueCommentResponseItem = { - id: number; - node_id: string; - user: ReactionsListForIssueCommentResponseItemUser; - content: string; - created_at: string; - }; - type ReactionsCreateForIssueResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsCreateForIssueResponse = { - id: number; - node_id: string; - user: ReactionsCreateForIssueResponseUser; - content: string; - created_at: string; - }; - type ReactionsListForIssueResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsListForIssueResponseItem = { - id: number; - node_id: string; - user: ReactionsListForIssueResponseItemUser; - content: string; - created_at: string; - }; - type ReactionsCreateForCommitCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsCreateForCommitCommentResponse = { - id: number; - node_id: string; - user: ReactionsCreateForCommitCommentResponseUser; - content: string; - created_at: string; - }; - type ReactionsListForCommitCommentResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ReactionsListForCommitCommentResponseItem = { - id: number; - node_id: string; - user: ReactionsListForCommitCommentResponseItemUser; - content: string; - created_at: string; - }; - type RateLimitGetResponseRate = { - limit: number; - remaining: number; - reset: number; - }; - type RateLimitGetResponseResourcesIntegrationManifest = { - limit: number; - remaining: number; - reset: number; - }; - type RateLimitGetResponseResourcesGraphql = { - limit: number; - remaining: number; - reset: number; - }; - type RateLimitGetResponseResourcesSearch = { - limit: number; - remaining: number; - reset: number; - }; - type RateLimitGetResponseResourcesCore = { - limit: number; - remaining: number; - reset: number; - }; - type RateLimitGetResponseResources = { - core: RateLimitGetResponseResourcesCore; - search: RateLimitGetResponseResourcesSearch; - graphql: RateLimitGetResponseResourcesGraphql; - integration_manifest: RateLimitGetResponseResourcesIntegrationManifest; - }; - type RateLimitGetResponse = { - resources: RateLimitGetResponseResources; - rate: RateLimitGetResponseRate; - }; - type PullsDismissReviewResponseLinksPullRequest = { href: string }; - type PullsDismissReviewResponseLinksHtml = { href: string }; - type PullsDismissReviewResponseLinks = { - html: PullsDismissReviewResponseLinksHtml; - pull_request: PullsDismissReviewResponseLinksPullRequest; - }; - type PullsDismissReviewResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsDismissReviewResponse = { - id: number; - node_id: string; - user: PullsDismissReviewResponseUser; - body: string; - commit_id: string; - state: string; - html_url: string; - pull_request_url: string; - _links: PullsDismissReviewResponseLinks; - }; - type PullsSubmitReviewResponseLinksPullRequest = { href: string }; - type PullsSubmitReviewResponseLinksHtml = { href: string }; - type PullsSubmitReviewResponseLinks = { - html: PullsSubmitReviewResponseLinksHtml; - pull_request: PullsSubmitReviewResponseLinksPullRequest; - }; - type PullsSubmitReviewResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsSubmitReviewResponse = { - id: number; - node_id: string; - user: PullsSubmitReviewResponseUser; - body: string; - commit_id: string; - state: string; - html_url: string; - pull_request_url: string; - _links: PullsSubmitReviewResponseLinks; - }; - type PullsUpdateReviewResponseLinksPullRequest = { href: string }; - type PullsUpdateReviewResponseLinksHtml = { href: string }; - type PullsUpdateReviewResponseLinks = { - html: PullsUpdateReviewResponseLinksHtml; - pull_request: PullsUpdateReviewResponseLinksPullRequest; - }; - type PullsUpdateReviewResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateReviewResponse = { - id: number; - node_id: string; - user: PullsUpdateReviewResponseUser; - body: string; - commit_id: string; - state: string; - html_url: string; - pull_request_url: string; - _links: PullsUpdateReviewResponseLinks; - }; - type PullsCreateReviewResponseLinksPullRequest = { href: string }; - type PullsCreateReviewResponseLinksHtml = { href: string }; - type PullsCreateReviewResponseLinks = { - html: PullsCreateReviewResponseLinksHtml; - pull_request: PullsCreateReviewResponseLinksPullRequest; - }; - type PullsCreateReviewResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateReviewResponse = { - id: number; - node_id: string; - user: PullsCreateReviewResponseUser; - body: string; - commit_id: string; - state: string; - html_url: string; - pull_request_url: string; - _links: PullsCreateReviewResponseLinks; - }; - type PullsGetCommentsForReviewResponseItemLinksPullRequest = { href: string }; - type PullsGetCommentsForReviewResponseItemLinksHtml = { href: string }; - type PullsGetCommentsForReviewResponseItemLinksSelf = { href: string }; - type PullsGetCommentsForReviewResponseItemLinks = { - self: PullsGetCommentsForReviewResponseItemLinksSelf; - html: PullsGetCommentsForReviewResponseItemLinksHtml; - pull_request: PullsGetCommentsForReviewResponseItemLinksPullRequest; - }; - type PullsGetCommentsForReviewResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetCommentsForReviewResponseItem = { - url: string; - id: number; - node_id: string; - pull_request_review_id: number; - diff_hunk: string; - path: string; - position: number; - original_position: number; - commit_id: string; - original_commit_id: string; - in_reply_to_id: number; - user: PullsGetCommentsForReviewResponseItemUser; - body: string; - created_at: string; - updated_at: string; - html_url: string; - pull_request_url: string; - _links: PullsGetCommentsForReviewResponseItemLinks; - }; - type PullsDeletePendingReviewResponseLinksPullRequest = { href: string }; - type PullsDeletePendingReviewResponseLinksHtml = { href: string }; - type PullsDeletePendingReviewResponseLinks = { - html: PullsDeletePendingReviewResponseLinksHtml; - pull_request: PullsDeletePendingReviewResponseLinksPullRequest; - }; - type PullsDeletePendingReviewResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsDeletePendingReviewResponse = { - id: number; - node_id: string; - user: PullsDeletePendingReviewResponseUser; - body: string; - commit_id: string; - state: string; - html_url: string; - pull_request_url: string; - _links: PullsDeletePendingReviewResponseLinks; - }; - type PullsGetReviewResponseLinksPullRequest = { href: string }; - type PullsGetReviewResponseLinksHtml = { href: string }; - type PullsGetReviewResponseLinks = { - html: PullsGetReviewResponseLinksHtml; - pull_request: PullsGetReviewResponseLinksPullRequest; - }; - type PullsGetReviewResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetReviewResponse = { - id: number; - node_id: string; - user: PullsGetReviewResponseUser; - body: string; - commit_id: string; - state: string; - html_url: string; - pull_request_url: string; - _links: PullsGetReviewResponseLinks; - }; - type PullsListReviewsResponseItemLinksPullRequest = { href: string }; - type PullsListReviewsResponseItemLinksHtml = { href: string }; - type PullsListReviewsResponseItemLinks = { - html: PullsListReviewsResponseItemLinksHtml; - pull_request: PullsListReviewsResponseItemLinksPullRequest; - }; - type PullsListReviewsResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListReviewsResponseItem = { - id: number; - node_id: string; - user: PullsListReviewsResponseItemUser; - body: string; - commit_id: string; - state: string; - html_url: string; - pull_request_url: string; - _links: PullsListReviewsResponseItemLinks; - }; - type PullsDeleteReviewRequestResponse = {}; - type PullsCreateReviewRequestResponseLinksStatuses = { href: string }; - type PullsCreateReviewRequestResponseLinksCommits = { href: string }; - type PullsCreateReviewRequestResponseLinksReviewComment = { href: string }; - type PullsCreateReviewRequestResponseLinksReviewComments = { href: string }; - type PullsCreateReviewRequestResponseLinksComments = { href: string }; - type PullsCreateReviewRequestResponseLinksIssue = { href: string }; - type PullsCreateReviewRequestResponseLinksHtml = { href: string }; - type PullsCreateReviewRequestResponseLinksSelf = { href: string }; - type PullsCreateReviewRequestResponseLinks = { - self: PullsCreateReviewRequestResponseLinksSelf; - html: PullsCreateReviewRequestResponseLinksHtml; - issue: PullsCreateReviewRequestResponseLinksIssue; - comments: PullsCreateReviewRequestResponseLinksComments; - review_comments: PullsCreateReviewRequestResponseLinksReviewComments; - review_comment: PullsCreateReviewRequestResponseLinksReviewComment; - commits: PullsCreateReviewRequestResponseLinksCommits; - statuses: PullsCreateReviewRequestResponseLinksStatuses; - }; - type PullsCreateReviewRequestResponseBaseRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsCreateReviewRequestResponseBaseRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateReviewRequestResponseBaseRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsCreateReviewRequestResponseBaseRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsCreateReviewRequestResponseBaseRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsCreateReviewRequestResponseBaseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateReviewRequestResponseBase = { - label: string; - ref: string; - sha: string; - user: PullsCreateReviewRequestResponseBaseUser; - repo: PullsCreateReviewRequestResponseBaseRepo; - }; - type PullsCreateReviewRequestResponseHeadRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsCreateReviewRequestResponseHeadRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateReviewRequestResponseHeadRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsCreateReviewRequestResponseHeadRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsCreateReviewRequestResponseHeadRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsCreateReviewRequestResponseHeadUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateReviewRequestResponseHead = { - label: string; - ref: string; - sha: string; - user: PullsCreateReviewRequestResponseHeadUser; - repo: PullsCreateReviewRequestResponseHeadRepo; - }; - type PullsCreateReviewRequestResponseRequestedTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type PullsCreateReviewRequestResponseRequestedReviewersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateReviewRequestResponseAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateReviewRequestResponseAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateReviewRequestResponseMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateReviewRequestResponseMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: PullsCreateReviewRequestResponseMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type PullsCreateReviewRequestResponseLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type PullsCreateReviewRequestResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateReviewRequestResponse = { - url: string; - id: number; - node_id: string; - html_url: string; - diff_url: string; - patch_url: string; - issue_url: string; - commits_url: string; - review_comments_url: string; - review_comment_url: string; - comments_url: string; - statuses_url: string; - number: number; - state: string; - locked: boolean; - title: string; - user: PullsCreateReviewRequestResponseUser; - body: string; - labels: Array; - milestone: PullsCreateReviewRequestResponseMilestone; - active_lock_reason: string; - created_at: string; - updated_at: string; - closed_at: string; - merged_at: string; - merge_commit_sha: string; - assignee: PullsCreateReviewRequestResponseAssignee; - assignees: Array; - requested_reviewers: Array< - PullsCreateReviewRequestResponseRequestedReviewersItem - >; - requested_teams: Array; - head: PullsCreateReviewRequestResponseHead; - base: PullsCreateReviewRequestResponseBase; - _links: PullsCreateReviewRequestResponseLinks; - author_association: string; - draft: boolean; - }; - type PullsListReviewRequestsResponseTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type PullsListReviewRequestsResponseUsersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListReviewRequestsResponse = { - users: Array; - teams: Array; - }; - type PullsDeleteCommentResponse = {}; - type PullsUpdateCommentResponseLinksPullRequest = { href: string }; - type PullsUpdateCommentResponseLinksHtml = { href: string }; - type PullsUpdateCommentResponseLinksSelf = { href: string }; - type PullsUpdateCommentResponseLinks = { - self: PullsUpdateCommentResponseLinksSelf; - html: PullsUpdateCommentResponseLinksHtml; - pull_request: PullsUpdateCommentResponseLinksPullRequest; - }; - type PullsUpdateCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateCommentResponse = { - url: string; - id: number; - node_id: string; - pull_request_review_id: number; - diff_hunk: string; - path: string; - position: number; - original_position: number; - commit_id: string; - original_commit_id: string; - in_reply_to_id: number; - user: PullsUpdateCommentResponseUser; - body: string; - created_at: string; - updated_at: string; - html_url: string; - pull_request_url: string; - _links: PullsUpdateCommentResponseLinks; - }; - type PullsCreateCommentReplyResponseLinksPullRequest = { href: string }; - type PullsCreateCommentReplyResponseLinksHtml = { href: string }; - type PullsCreateCommentReplyResponseLinksSelf = { href: string }; - type PullsCreateCommentReplyResponseLinks = { - self: PullsCreateCommentReplyResponseLinksSelf; - html: PullsCreateCommentReplyResponseLinksHtml; - pull_request: PullsCreateCommentReplyResponseLinksPullRequest; - }; - type PullsCreateCommentReplyResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateCommentReplyResponse = { - url: string; - id: number; - node_id: string; - pull_request_review_id: number; - diff_hunk: string; - path: string; - position: number; - original_position: number; - commit_id: string; - original_commit_id: string; - in_reply_to_id: number; - user: PullsCreateCommentReplyResponseUser; - body: string; - created_at: string; - updated_at: string; - html_url: string; - pull_request_url: string; - _links: PullsCreateCommentReplyResponseLinks; - }; - type PullsCreateCommentResponseLinksPullRequest = { href: string }; - type PullsCreateCommentResponseLinksHtml = { href: string }; - type PullsCreateCommentResponseLinksSelf = { href: string }; - type PullsCreateCommentResponseLinks = { - self: PullsCreateCommentResponseLinksSelf; - html: PullsCreateCommentResponseLinksHtml; - pull_request: PullsCreateCommentResponseLinksPullRequest; - }; - type PullsCreateCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateCommentResponse = { - url: string; - id: number; - node_id: string; - pull_request_review_id: number; - diff_hunk: string; - path: string; - position: number; - original_position: number; - commit_id: string; - original_commit_id: string; - in_reply_to_id: number; - user: PullsCreateCommentResponseUser; - body: string; - created_at: string; - updated_at: string; - html_url: string; - pull_request_url: string; - _links: PullsCreateCommentResponseLinks; - }; - type PullsGetCommentResponseLinksPullRequest = { href: string }; - type PullsGetCommentResponseLinksHtml = { href: string }; - type PullsGetCommentResponseLinksSelf = { href: string }; - type PullsGetCommentResponseLinks = { - self: PullsGetCommentResponseLinksSelf; - html: PullsGetCommentResponseLinksHtml; - pull_request: PullsGetCommentResponseLinksPullRequest; - }; - type PullsGetCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetCommentResponse = { - url: string; - id: number; - node_id: string; - pull_request_review_id: number; - diff_hunk: string; - path: string; - position: number; - original_position: number; - commit_id: string; - original_commit_id: string; - in_reply_to_id: number; - user: PullsGetCommentResponseUser; - body: string; - created_at: string; - updated_at: string; - html_url: string; - pull_request_url: string; - _links: PullsGetCommentResponseLinks; - }; - type PullsListCommentsForRepoResponseItemLinksPullRequest = { href: string }; - type PullsListCommentsForRepoResponseItemLinksHtml = { href: string }; - type PullsListCommentsForRepoResponseItemLinksSelf = { href: string }; - type PullsListCommentsForRepoResponseItemLinks = { - self: PullsListCommentsForRepoResponseItemLinksSelf; - html: PullsListCommentsForRepoResponseItemLinksHtml; - pull_request: PullsListCommentsForRepoResponseItemLinksPullRequest; - }; - type PullsListCommentsForRepoResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListCommentsForRepoResponseItem = { - url: string; - id: number; - node_id: string; - pull_request_review_id: number; - diff_hunk: string; - path: string; - position: number; - original_position: number; - commit_id: string; - original_commit_id: string; - in_reply_to_id: number; - user: PullsListCommentsForRepoResponseItemUser; - body: string; - created_at: string; - updated_at: string; - html_url: string; - pull_request_url: string; - _links: PullsListCommentsForRepoResponseItemLinks; - }; - type PullsListCommentsResponseItemLinksPullRequest = { href: string }; - type PullsListCommentsResponseItemLinksHtml = { href: string }; - type PullsListCommentsResponseItemLinksSelf = { href: string }; - type PullsListCommentsResponseItemLinks = { - self: PullsListCommentsResponseItemLinksSelf; - html: PullsListCommentsResponseItemLinksHtml; - pull_request: PullsListCommentsResponseItemLinksPullRequest; - }; - type PullsListCommentsResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListCommentsResponseItem = { - url: string; - id: number; - node_id: string; - pull_request_review_id: number; - diff_hunk: string; - path: string; - position: number; - original_position: number; - commit_id: string; - original_commit_id: string; - in_reply_to_id: number; - user: PullsListCommentsResponseItemUser; - body: string; - created_at: string; - updated_at: string; - html_url: string; - pull_request_url: string; - _links: PullsListCommentsResponseItemLinks; - }; - type PullsListFilesResponseItem = { - sha: string; - filename: string; - status: string; - additions: number; - deletions: number; - changes: number; - blob_url: string; - raw_url: string; - contents_url: string; - patch: string; - }; - type PullsListCommitsResponseItemParentsItem = { url: string; sha: string }; - type PullsListCommitsResponseItemCommitter = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListCommitsResponseItemAuthor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListCommitsResponseItemCommitVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type PullsListCommitsResponseItemCommitTree = { url: string; sha: string }; - type PullsListCommitsResponseItemCommitCommitter = { - name: string; - email: string; - date: string; - }; - type PullsListCommitsResponseItemCommitAuthor = { - name: string; - email: string; - date: string; - }; - type PullsListCommitsResponseItemCommit = { - url: string; - author: PullsListCommitsResponseItemCommitAuthor; - committer: PullsListCommitsResponseItemCommitCommitter; - message: string; - tree: PullsListCommitsResponseItemCommitTree; - comment_count: number; - verification: PullsListCommitsResponseItemCommitVerification; - }; - type PullsListCommitsResponseItem = { - url: string; - sha: string; - node_id: string; - html_url: string; - comments_url: string; - commit: PullsListCommitsResponseItemCommit; - author: PullsListCommitsResponseItemAuthor; - committer: PullsListCommitsResponseItemCommitter; - parents: Array; - }; - type PullsUpdateResponseMergedBy = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateResponseLinksStatuses = { href: string }; - type PullsUpdateResponseLinksCommits = { href: string }; - type PullsUpdateResponseLinksReviewComment = { href: string }; - type PullsUpdateResponseLinksReviewComments = { href: string }; - type PullsUpdateResponseLinksComments = { href: string }; - type PullsUpdateResponseLinksIssue = { href: string }; - type PullsUpdateResponseLinksHtml = { href: string }; - type PullsUpdateResponseLinksSelf = { href: string }; - type PullsUpdateResponseLinks = { - self: PullsUpdateResponseLinksSelf; - html: PullsUpdateResponseLinksHtml; - issue: PullsUpdateResponseLinksIssue; - comments: PullsUpdateResponseLinksComments; - review_comments: PullsUpdateResponseLinksReviewComments; - review_comment: PullsUpdateResponseLinksReviewComment; - commits: PullsUpdateResponseLinksCommits; - statuses: PullsUpdateResponseLinksStatuses; - }; - type PullsUpdateResponseBaseRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsUpdateResponseBaseRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateResponseBaseRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsUpdateResponseBaseRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsUpdateResponseBaseRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsUpdateResponseBaseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateResponseBase = { - label: string; - ref: string; - sha: string; - user: PullsUpdateResponseBaseUser; - repo: PullsUpdateResponseBaseRepo; - }; - type PullsUpdateResponseHeadRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsUpdateResponseHeadRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateResponseHeadRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsUpdateResponseHeadRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsUpdateResponseHeadRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsUpdateResponseHeadUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateResponseHead = { - label: string; - ref: string; - sha: string; - user: PullsUpdateResponseHeadUser; - repo: PullsUpdateResponseHeadRepo; - }; - type PullsUpdateResponseRequestedTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type PullsUpdateResponseRequestedReviewersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateResponseAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateResponseAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateResponseMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateResponseMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: PullsUpdateResponseMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type PullsUpdateResponseLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type PullsUpdateResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsUpdateResponse = { - url: string; - id: number; - node_id: string; - html_url: string; - diff_url: string; - patch_url: string; - issue_url: string; - commits_url: string; - review_comments_url: string; - review_comment_url: string; - comments_url: string; - statuses_url: string; - number: number; - state: string; - locked: boolean; - title: string; - user: PullsUpdateResponseUser; - body: string; - labels: Array; - milestone: PullsUpdateResponseMilestone; - active_lock_reason: string; - created_at: string; - updated_at: string; - closed_at: string; - merged_at: string; - merge_commit_sha: string; - assignee: PullsUpdateResponseAssignee; - assignees: Array; - requested_reviewers: Array; - requested_teams: Array; - head: PullsUpdateResponseHead; - base: PullsUpdateResponseBase; - _links: PullsUpdateResponseLinks; - author_association: string; - draft: boolean; - merged: boolean; - mergeable: boolean; - rebaseable: boolean; - mergeable_state: string; - merged_by: PullsUpdateResponseMergedBy; - comments: number; - review_comments: number; - maintainer_can_modify: boolean; - commits: number; - additions: number; - deletions: number; - changed_files: number; - }; - type PullsUpdateBranchResponse = { message: string; url: string }; - type PullsCreateFromIssueResponseMergedBy = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateFromIssueResponseLinksStatuses = { href: string }; - type PullsCreateFromIssueResponseLinksCommits = { href: string }; - type PullsCreateFromIssueResponseLinksReviewComment = { href: string }; - type PullsCreateFromIssueResponseLinksReviewComments = { href: string }; - type PullsCreateFromIssueResponseLinksComments = { href: string }; - type PullsCreateFromIssueResponseLinksIssue = { href: string }; - type PullsCreateFromIssueResponseLinksHtml = { href: string }; - type PullsCreateFromIssueResponseLinksSelf = { href: string }; - type PullsCreateFromIssueResponseLinks = { - self: PullsCreateFromIssueResponseLinksSelf; - html: PullsCreateFromIssueResponseLinksHtml; - issue: PullsCreateFromIssueResponseLinksIssue; - comments: PullsCreateFromIssueResponseLinksComments; - review_comments: PullsCreateFromIssueResponseLinksReviewComments; - review_comment: PullsCreateFromIssueResponseLinksReviewComment; - commits: PullsCreateFromIssueResponseLinksCommits; - statuses: PullsCreateFromIssueResponseLinksStatuses; - }; - type PullsCreateFromIssueResponseBaseRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsCreateFromIssueResponseBaseRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateFromIssueResponseBaseRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsCreateFromIssueResponseBaseRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsCreateFromIssueResponseBaseRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsCreateFromIssueResponseBaseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateFromIssueResponseBase = { - label: string; - ref: string; - sha: string; - user: PullsCreateFromIssueResponseBaseUser; - repo: PullsCreateFromIssueResponseBaseRepo; - }; - type PullsCreateFromIssueResponseHeadRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsCreateFromIssueResponseHeadRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateFromIssueResponseHeadRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsCreateFromIssueResponseHeadRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsCreateFromIssueResponseHeadRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsCreateFromIssueResponseHeadUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateFromIssueResponseHead = { - label: string; - ref: string; - sha: string; - user: PullsCreateFromIssueResponseHeadUser; - repo: PullsCreateFromIssueResponseHeadRepo; - }; - type PullsCreateFromIssueResponseRequestedTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type PullsCreateFromIssueResponseRequestedReviewersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateFromIssueResponseAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateFromIssueResponseAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateFromIssueResponseMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateFromIssueResponseMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: PullsCreateFromIssueResponseMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type PullsCreateFromIssueResponseLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type PullsCreateFromIssueResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateFromIssueResponse = { - url: string; - id: number; - node_id: string; - html_url: string; - diff_url: string; - patch_url: string; - issue_url: string; - commits_url: string; - review_comments_url: string; - review_comment_url: string; - comments_url: string; - statuses_url: string; - number: number; - state: string; - locked: boolean; - title: string; - user: PullsCreateFromIssueResponseUser; - body: string; - labels: Array; - milestone: PullsCreateFromIssueResponseMilestone; - active_lock_reason: string; - created_at: string; - updated_at: string; - closed_at: string; - merged_at: string; - merge_commit_sha: string; - assignee: PullsCreateFromIssueResponseAssignee; - assignees: Array; - requested_reviewers: Array< - PullsCreateFromIssueResponseRequestedReviewersItem - >; - requested_teams: Array; - head: PullsCreateFromIssueResponseHead; - base: PullsCreateFromIssueResponseBase; - _links: PullsCreateFromIssueResponseLinks; - author_association: string; - draft: boolean; - merged: boolean; - mergeable: boolean; - rebaseable: boolean; - mergeable_state: string; - merged_by: PullsCreateFromIssueResponseMergedBy; - comments: number; - review_comments: number; - maintainer_can_modify: boolean; - commits: number; - additions: number; - deletions: number; - changed_files: number; - }; - type PullsCreateResponseMergedBy = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateResponseLinksStatuses = { href: string }; - type PullsCreateResponseLinksCommits = { href: string }; - type PullsCreateResponseLinksReviewComment = { href: string }; - type PullsCreateResponseLinksReviewComments = { href: string }; - type PullsCreateResponseLinksComments = { href: string }; - type PullsCreateResponseLinksIssue = { href: string }; - type PullsCreateResponseLinksHtml = { href: string }; - type PullsCreateResponseLinksSelf = { href: string }; - type PullsCreateResponseLinks = { - self: PullsCreateResponseLinksSelf; - html: PullsCreateResponseLinksHtml; - issue: PullsCreateResponseLinksIssue; - comments: PullsCreateResponseLinksComments; - review_comments: PullsCreateResponseLinksReviewComments; - review_comment: PullsCreateResponseLinksReviewComment; - commits: PullsCreateResponseLinksCommits; - statuses: PullsCreateResponseLinksStatuses; - }; - type PullsCreateResponseBaseRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsCreateResponseBaseRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateResponseBaseRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsCreateResponseBaseRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsCreateResponseBaseRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsCreateResponseBaseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateResponseBase = { - label: string; - ref: string; - sha: string; - user: PullsCreateResponseBaseUser; - repo: PullsCreateResponseBaseRepo; - }; - type PullsCreateResponseHeadRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsCreateResponseHeadRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateResponseHeadRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsCreateResponseHeadRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsCreateResponseHeadRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsCreateResponseHeadUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateResponseHead = { - label: string; - ref: string; - sha: string; - user: PullsCreateResponseHeadUser; - repo: PullsCreateResponseHeadRepo; - }; - type PullsCreateResponseRequestedTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type PullsCreateResponseRequestedReviewersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateResponseAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateResponseAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateResponseMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateResponseMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: PullsCreateResponseMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type PullsCreateResponseLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type PullsCreateResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsCreateResponse = { - url: string; - id: number; - node_id: string; - html_url: string; - diff_url: string; - patch_url: string; - issue_url: string; - commits_url: string; - review_comments_url: string; - review_comment_url: string; - comments_url: string; - statuses_url: string; - number: number; - state: string; - locked: boolean; - title: string; - user: PullsCreateResponseUser; - body: string; - labels: Array; - milestone: PullsCreateResponseMilestone; - active_lock_reason: string; - created_at: string; - updated_at: string; - closed_at: string; - merged_at: string; - merge_commit_sha: string; - assignee: PullsCreateResponseAssignee; - assignees: Array; - requested_reviewers: Array; - requested_teams: Array; - head: PullsCreateResponseHead; - base: PullsCreateResponseBase; - _links: PullsCreateResponseLinks; - author_association: string; - draft: boolean; - merged: boolean; - mergeable: boolean; - rebaseable: boolean; - mergeable_state: string; - merged_by: PullsCreateResponseMergedBy; - comments: number; - review_comments: number; - maintainer_can_modify: boolean; - commits: number; - additions: number; - deletions: number; - changed_files: number; - }; - type PullsGetResponseMergedBy = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetResponseLinksStatuses = { href: string }; - type PullsGetResponseLinksCommits = { href: string }; - type PullsGetResponseLinksReviewComment = { href: string }; - type PullsGetResponseLinksReviewComments = { href: string }; - type PullsGetResponseLinksComments = { href: string }; - type PullsGetResponseLinksIssue = { href: string }; - type PullsGetResponseLinksHtml = { href: string }; - type PullsGetResponseLinksSelf = { href: string }; - type PullsGetResponseLinks = { - self: PullsGetResponseLinksSelf; - html: PullsGetResponseLinksHtml; - issue: PullsGetResponseLinksIssue; - comments: PullsGetResponseLinksComments; - review_comments: PullsGetResponseLinksReviewComments; - review_comment: PullsGetResponseLinksReviewComment; - commits: PullsGetResponseLinksCommits; - statuses: PullsGetResponseLinksStatuses; - }; - type PullsGetResponseBaseRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsGetResponseBaseRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetResponseBaseRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsGetResponseBaseRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsGetResponseBaseRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsGetResponseBaseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetResponseBase = { - label: string; - ref: string; - sha: string; - user: PullsGetResponseBaseUser; - repo: PullsGetResponseBaseRepo; - }; - type PullsGetResponseHeadRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsGetResponseHeadRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetResponseHeadRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsGetResponseHeadRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsGetResponseHeadRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsGetResponseHeadUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetResponseHead = { - label: string; - ref: string; - sha: string; - user: PullsGetResponseHeadUser; - repo: PullsGetResponseHeadRepo; - }; - type PullsGetResponseRequestedTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type PullsGetResponseRequestedReviewersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetResponseAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetResponseAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetResponseMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetResponseMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: PullsGetResponseMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type PullsGetResponseLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type PullsGetResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsGetResponse = { - url: string; - id: number; - node_id: string; - html_url: string; - diff_url: string; - patch_url: string; - issue_url: string; - commits_url: string; - review_comments_url: string; - review_comment_url: string; - comments_url: string; - statuses_url: string; - number: number; - state: string; - locked: boolean; - title: string; - user: PullsGetResponseUser; - body: string; - labels: Array; - milestone: PullsGetResponseMilestone; - active_lock_reason: string; - created_at: string; - updated_at: string; - closed_at: string; - merged_at: string; - merge_commit_sha: string; - assignee: PullsGetResponseAssignee; - assignees: Array; - requested_reviewers: Array; - requested_teams: Array; - head: PullsGetResponseHead; - base: PullsGetResponseBase; - _links: PullsGetResponseLinks; - author_association: string; - draft: boolean; - merged: boolean; - mergeable: boolean; - rebaseable: boolean; - mergeable_state: string; - merged_by: PullsGetResponseMergedBy; - comments: number; - review_comments: number; - maintainer_can_modify: boolean; - commits: number; - additions: number; - deletions: number; - changed_files: number; - }; - type PullsListResponseItemLinksStatuses = { href: string }; - type PullsListResponseItemLinksCommits = { href: string }; - type PullsListResponseItemLinksReviewComment = { href: string }; - type PullsListResponseItemLinksReviewComments = { href: string }; - type PullsListResponseItemLinksComments = { href: string }; - type PullsListResponseItemLinksIssue = { href: string }; - type PullsListResponseItemLinksHtml = { href: string }; - type PullsListResponseItemLinksSelf = { href: string }; - type PullsListResponseItemLinks = { - self: PullsListResponseItemLinksSelf; - html: PullsListResponseItemLinksHtml; - issue: PullsListResponseItemLinksIssue; - comments: PullsListResponseItemLinksComments; - review_comments: PullsListResponseItemLinksReviewComments; - review_comment: PullsListResponseItemLinksReviewComment; - commits: PullsListResponseItemLinksCommits; - statuses: PullsListResponseItemLinksStatuses; - }; - type PullsListResponseItemBaseRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsListResponseItemBaseRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListResponseItemBaseRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsListResponseItemBaseRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsListResponseItemBaseRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsListResponseItemBaseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListResponseItemBase = { - label: string; - ref: string; - sha: string; - user: PullsListResponseItemBaseUser; - repo: PullsListResponseItemBaseRepo; - }; - type PullsListResponseItemHeadRepoPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type PullsListResponseItemHeadRepoOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListResponseItemHeadRepo = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: PullsListResponseItemHeadRepoOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: PullsListResponseItemHeadRepoPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type PullsListResponseItemHeadUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListResponseItemHead = { - label: string; - ref: string; - sha: string; - user: PullsListResponseItemHeadUser; - repo: PullsListResponseItemHeadRepo; - }; - type PullsListResponseItemRequestedTeamsItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type PullsListResponseItemRequestedReviewersItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListResponseItemAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListResponseItemAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListResponseItemMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListResponseItemMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: PullsListResponseItemMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type PullsListResponseItemLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type PullsListResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type PullsListResponseItem = { - url: string; - id: number; - node_id: string; - html_url: string; - diff_url: string; - patch_url: string; - issue_url: string; - commits_url: string; - review_comments_url: string; - review_comment_url: string; - comments_url: string; - statuses_url: string; - number: number; - state: string; - locked: boolean; - title: string; - user: PullsListResponseItemUser; - body: string; - labels: Array; - milestone: PullsListResponseItemMilestone; - active_lock_reason: string; - created_at: string; - updated_at: string; - closed_at: string; - merged_at: string; - merge_commit_sha: string; - assignee: PullsListResponseItemAssignee; - assignees: Array; - requested_reviewers: Array; - requested_teams: Array; - head: PullsListResponseItemHead; - base: PullsListResponseItemBase; - _links: PullsListResponseItemLinks; - author_association: string; - draft: boolean; - }; - type ProjectsMoveColumnResponse = {}; - type ProjectsDeleteColumnResponse = {}; - type ProjectsListColumnsResponseItem = { - url: string; - project_url: string; - cards_url: string; - id: number; - node_id: string; - name: string; - created_at: string; - updated_at: string; - }; - type ProjectsRemoveCollaboratorResponse = {}; - type ProjectsAddCollaboratorResponse = {}; - type ProjectsReviewUserPermissionLevelResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsReviewUserPermissionLevelResponse = { - permission: string; - user: ProjectsReviewUserPermissionLevelResponseUser; - }; - type ProjectsListCollaboratorsResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsMoveCardResponse = {}; - type ProjectsDeleteCardResponse = {}; - type ProjectsCreateCardResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsCreateCardResponse = { - url: string; - id: number; - node_id: string; - note: string; - creator: ProjectsCreateCardResponseCreator; - created_at: string; - updated_at: string; - archived: boolean; - column_url: string; - content_url: string; - project_url: string; - }; - type ProjectsListCardsResponseItemCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsListCardsResponseItem = { - url: string; - id: number; - node_id: string; - note: string; - creator: ProjectsListCardsResponseItemCreator; - created_at: string; - updated_at: string; - archived: boolean; - column_url: string; - content_url: string; - project_url: string; - }; - type ProjectsUpdateResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsUpdateResponse = { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - name: string; - body: string; - number: number; - state: string; - creator: ProjectsUpdateResponseCreator; - created_at: string; - updated_at: string; - }; - type ProjectsCreateForAuthenticatedUserResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsCreateForAuthenticatedUserResponse = { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - name: string; - body: string; - number: number; - state: string; - creator: ProjectsCreateForAuthenticatedUserResponseCreator; - created_at: string; - updated_at: string; - }; - type ProjectsCreateForOrgResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsCreateForOrgResponse = { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - name: string; - body: string; - number: number; - state: string; - creator: ProjectsCreateForOrgResponseCreator; - created_at: string; - updated_at: string; - }; - type ProjectsCreateForRepoResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsCreateForRepoResponse = { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - name: string; - body: string; - number: number; - state: string; - creator: ProjectsCreateForRepoResponseCreator; - created_at: string; - updated_at: string; - }; - type ProjectsGetResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsGetResponse = { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - name: string; - body: string; - number: number; - state: string; - creator: ProjectsGetResponseCreator; - created_at: string; - updated_at: string; - }; - type ProjectsListForUserResponseItemCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsListForUserResponseItem = { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - name: string; - body: string; - number: number; - state: string; - creator: ProjectsListForUserResponseItemCreator; - created_at: string; - updated_at: string; - }; - type ProjectsListForOrgResponseItemCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsListForOrgResponseItem = { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - name: string; - body: string; - number: number; - state: string; - creator: ProjectsListForOrgResponseItemCreator; - created_at: string; - updated_at: string; - }; - type ProjectsListForRepoResponseItemCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ProjectsListForRepoResponseItem = { - owner_url: string; - url: string; - html_url: string; - columns_url: string; - id: number; - node_id: string; - name: string; - body: string; - number: number; - state: string; - creator: ProjectsListForRepoResponseItemCreator; - created_at: string; - updated_at: string; - }; - type OrgsConvertMemberToOutsideCollaboratorResponse = {}; - type OrgsRemoveOutsideCollaboratorResponse = {}; - type OrgsListOutsideCollaboratorsResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type OrgsUpdateMembershipResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type OrgsUpdateMembershipResponseOrganization = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type OrgsUpdateMembershipResponse = { - url: string; - state: string; - role: string; - organization_url: string; - organization: OrgsUpdateMembershipResponseOrganization; - user: OrgsUpdateMembershipResponseUser; - }; - type OrgsGetMembershipForAuthenticatedUserResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type OrgsGetMembershipForAuthenticatedUserResponseOrganization = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type OrgsGetMembershipForAuthenticatedUserResponse = { - url: string; - state: string; - role: string; - organization_url: string; - organization: OrgsGetMembershipForAuthenticatedUserResponseOrganization; - user: OrgsGetMembershipForAuthenticatedUserResponseUser; - }; - type OrgsListMembershipsResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type OrgsListMembershipsResponseItemOrganization = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type OrgsListMembershipsResponseItem = { - url: string; - state: string; - role: string; - organization_url: string; - organization: OrgsListMembershipsResponseItemOrganization; - user: OrgsListMembershipsResponseItemUser; - }; - type OrgsCreateInvitationResponseInviter = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type OrgsCreateInvitationResponse = { - id: number; - login: string; - email: string; - role: string; - created_at: string; - inviter: OrgsCreateInvitationResponseInviter; - team_count: number; - invitation_team_url: string; - }; - type OrgsListPendingInvitationsResponseItemInviter = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type OrgsListPendingInvitationsResponseItem = { - id: number; - login: string; - email: string; - role: string; - created_at: string; - inviter: OrgsListPendingInvitationsResponseItemInviter; - team_count: number; - invitation_team_url: string; - }; - type OrgsListInvitationTeamsResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - slug: string; - description: string; - privacy: string; - permission: string; - members_url: string; - repositories_url: string; - parent: null; - }; - type OrgsRemoveMembershipResponse = {}; - type OrgsConcealMembershipResponse = {}; - type OrgsPublicizeMembershipResponse = {}; - type OrgsListPublicMembersResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type OrgsRemoveMemberResponse = {}; - type OrgsListMembersResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type OrgsDeleteHookResponse = {}; - type OrgsPingHookResponse = {}; - type OrgsUpdateHookResponseConfig = { url: string; content_type: string }; - type OrgsUpdateHookResponse = { - id: number; - url: string; - ping_url: string; - name: string; - events: Array; - active: boolean; - config: OrgsUpdateHookResponseConfig; - updated_at: string; - created_at: string; - }; - type OrgsCreateHookResponseConfig = { url: string; content_type: string }; - type OrgsCreateHookResponse = { - id: number; - url: string; - ping_url: string; - name: string; - events: Array; - active: boolean; - config: OrgsCreateHookResponseConfig; - updated_at: string; - created_at: string; - }; - type OrgsGetHookResponseConfig = { url: string; content_type: string }; - type OrgsGetHookResponse = { - id: number; - url: string; - ping_url: string; - name: string; - events: Array; - active: boolean; - config: OrgsGetHookResponseConfig; - updated_at: string; - created_at: string; - }; - type OrgsListHooksResponseItemConfig = { url: string; content_type: string }; - type OrgsListHooksResponseItem = { - id: number; - url: string; - ping_url: string; - name: string; - events: Array; - active: boolean; - config: OrgsListHooksResponseItemConfig; - updated_at: string; - created_at: string; - }; - type OrgsUnblockUserResponse = {}; - type OrgsBlockUserResponse = {}; - type OrgsCheckBlockedUserResponse = {}; - type OrgsListBlockedUsersResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type OrgsUpdateResponsePlan = { - name: string; - space: number; - private_repos: number; - }; - type OrgsUpdateResponse = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - name: string; - company: string; - blog: string; - location: string; - email: string; - is_verified: boolean; - has_organization_projects: boolean; - has_repository_projects: boolean; - public_repos: number; - public_gists: number; - followers: number; - following: number; - html_url: string; - created_at: string; - type: string; - total_private_repos: number; - owned_private_repos: number; - private_gists: number; - disk_usage: number; - collaborators: number; - billing_email: string; - plan: OrgsUpdateResponsePlan; - default_repository_settings: string; - members_can_create_repositories: boolean; - two_factor_requirement_enabled: boolean; - members_allowed_repository_creation_type: string; - }; - type OrgsGetResponsePlan = { - name: string; - space: number; - private_repos: number; - }; - type OrgsGetResponse = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - name: string; - company: string; - blog: string; - location: string; - email: string; - is_verified: boolean; - has_organization_projects: boolean; - has_repository_projects: boolean; - public_repos: number; - public_gists: number; - followers: number; - following: number; - html_url: string; - created_at: string; - type: string; - total_private_repos: number; - owned_private_repos: number; - private_gists: number; - disk_usage: number; - collaborators: number; - billing_email: string; - plan: OrgsGetResponsePlan; - default_repository_settings: string; - members_can_create_repositories: boolean; - two_factor_requirement_enabled: boolean; - members_allowed_repository_creation_type: string; - }; - type OrgsListForUserResponseItem = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type OrgsListResponseItem = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type OrgsListForAuthenticatedUserResponseItem = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type OauthAuthorizationsRevokeGrantForApplicationResponse = {}; - type OauthAuthorizationsRevokeAuthorizationForApplicationResponse = {}; - type OauthAuthorizationsResetAuthorizationResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type OauthAuthorizationsResetAuthorizationResponseApp = { - url: string; - name: string; - client_id: string; - }; - type OauthAuthorizationsResetAuthorizationResponse = { - id: number; - url: string; - scopes: Array; - token: string; - token_last_eight: string; - hashed_token: string; - app: OauthAuthorizationsResetAuthorizationResponseApp; - note: string; - note_url: string; - updated_at: string; - created_at: string; - fingerprint: string; - user: OauthAuthorizationsResetAuthorizationResponseUser; - }; - type OauthAuthorizationsCheckAuthorizationResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type OauthAuthorizationsCheckAuthorizationResponseApp = { - url: string; - name: string; - client_id: string; - }; - type OauthAuthorizationsCheckAuthorizationResponse = { - id: number; - url: string; - scopes: Array; - token: string; - token_last_eight: string; - hashed_token: string; - app: OauthAuthorizationsCheckAuthorizationResponseApp; - note: string; - note_url: string; - updated_at: string; - created_at: string; - fingerprint: string; - user: OauthAuthorizationsCheckAuthorizationResponseUser; - }; - type OauthAuthorizationsDeleteAuthorizationResponse = {}; - type OauthAuthorizationsUpdateAuthorizationResponseApp = { - url: string; - name: string; - client_id: string; - }; - type OauthAuthorizationsUpdateAuthorizationResponse = { - id: number; - url: string; - scopes: Array; - token: string; - token_last_eight: string; - hashed_token: string; - app: OauthAuthorizationsUpdateAuthorizationResponseApp; - note: string; - note_url: string; - updated_at: string; - created_at: string; - fingerprint: string; - }; - type OauthAuthorizationsCreateAuthorizationResponseApp = { - url: string; - name: string; - client_id: string; - }; - type OauthAuthorizationsCreateAuthorizationResponse = { - id: number; - url: string; - scopes: Array; - token: string; - token_last_eight: string; - hashed_token: string; - app: OauthAuthorizationsCreateAuthorizationResponseApp; - note: string; - note_url: string; - updated_at: string; - created_at: string; - fingerprint: string; - }; - type OauthAuthorizationsGetAuthorizationResponseApp = { - url: string; - name: string; - client_id: string; - }; - type OauthAuthorizationsGetAuthorizationResponse = { - id: number; - url: string; - scopes: Array; - token: string; - token_last_eight: string; - hashed_token: string; - app: OauthAuthorizationsGetAuthorizationResponseApp; - note: string; - note_url: string; - updated_at: string; - created_at: string; - fingerprint: string; - }; - type OauthAuthorizationsListAuthorizationsResponseItemApp = { - url: string; - name: string; - client_id: string; - }; - type OauthAuthorizationsListAuthorizationsResponseItem = { - id: number; - url: string; - scopes: Array; - token: string; - token_last_eight: string; - hashed_token: string; - app: OauthAuthorizationsListAuthorizationsResponseItemApp; - note: string; - note_url: string; - updated_at: string; - created_at: string; - fingerprint: string; - }; - type OauthAuthorizationsDeleteGrantResponse = {}; - type OauthAuthorizationsGetGrantResponseApp = { - url: string; - name: string; - client_id: string; - }; - type OauthAuthorizationsGetGrantResponse = { - id: number; - url: string; - app: OauthAuthorizationsGetGrantResponseApp; - created_at: string; - updated_at: string; - scopes: Array; - }; - type OauthAuthorizationsListGrantsResponseItemApp = { - url: string; - name: string; - client_id: string; - }; - type OauthAuthorizationsListGrantsResponseItem = { - id: number; - url: string; - app: OauthAuthorizationsListGrantsResponseItemApp; - created_at: string; - updated_at: string; - scopes: Array; - }; - type MigrationsUnlockRepoForAuthenticatedUserResponse = {}; - type MigrationsDeleteArchiveForAuthenticatedUserResponse = {}; - type MigrationsGetArchiveForAuthenticatedUserResponse = {}; - type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItemPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type MigrationsGetStatusForAuthenticatedUserResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type MigrationsGetStatusForAuthenticatedUserResponse = { - id: number; - owner: MigrationsGetStatusForAuthenticatedUserResponseOwner; - guid: string; - state: string; - lock_repositories: boolean; - exclude_attachments: boolean; - repositories: Array< - MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItem - >; - url: string; - created_at: string; - updated_at: string; - }; - type MigrationsListForAuthenticatedUserResponseItemRepositoriesItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type MigrationsListForAuthenticatedUserResponseItemRepositoriesItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type MigrationsListForAuthenticatedUserResponseItemRepositoriesItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: MigrationsListForAuthenticatedUserResponseItemRepositoriesItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: MigrationsListForAuthenticatedUserResponseItemRepositoriesItemPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type MigrationsListForAuthenticatedUserResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type MigrationsListForAuthenticatedUserResponseItem = { - id: number; - owner: MigrationsListForAuthenticatedUserResponseItemOwner; - guid: string; - state: string; - lock_repositories: boolean; - exclude_attachments: boolean; - repositories: Array< - MigrationsListForAuthenticatedUserResponseItemRepositoriesItem - >; - url: string; - created_at: string; - updated_at: string; - }; - type MigrationsStartForAuthenticatedUserResponseRepositoriesItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type MigrationsStartForAuthenticatedUserResponseRepositoriesItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type MigrationsStartForAuthenticatedUserResponseRepositoriesItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: MigrationsStartForAuthenticatedUserResponseRepositoriesItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: MigrationsStartForAuthenticatedUserResponseRepositoriesItemPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type MigrationsStartForAuthenticatedUserResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type MigrationsStartForAuthenticatedUserResponse = { - id: number; - owner: MigrationsStartForAuthenticatedUserResponseOwner; - guid: string; - state: string; - lock_repositories: boolean; - exclude_attachments: boolean; - repositories: Array< - MigrationsStartForAuthenticatedUserResponseRepositoriesItem - >; - url: string; - created_at: string; - updated_at: string; - }; - type MigrationsCancelImportResponse = {}; - type MigrationsGetLargeFilesResponseItem = { - ref_name: string; - path: string; - oid: string; - size: number; - }; - type MigrationsSetLfsPreferenceResponse = { - vcs: string; - use_lfs: string; - vcs_url: string; - status: string; - status_text: string; - has_large_files: boolean; - large_files_size: number; - large_files_count: number; - authors_count: number; - url: string; - html_url: string; - authors_url: string; - repository_url: string; - }; - type MigrationsMapCommitAuthorResponse = { - id: number; - remote_id: string; - remote_name: string; - email: string; - name: string; - url: string; - import_url: string; - }; - type MigrationsGetCommitAuthorsResponseItem = { - id: number; - remote_id: string; - remote_name: string; - email: string; - name: string; - url: string; - import_url: string; - }; - type MigrationsUpdateImportResponse = { - vcs: string; - use_lfs: string; - vcs_url: string; - status: string; - url: string; - html_url: string; - authors_url: string; - repository_url: string; - }; - type MigrationsGetImportProgressResponse = { - vcs: string; - use_lfs: string; - vcs_url: string; - status: string; - status_text: string; - has_large_files: boolean; - large_files_size: number; - large_files_count: number; - authors_count: number; - url: string; - html_url: string; - authors_url: string; - repository_url: string; - }; - type MigrationsStartImportResponse = { - vcs: string; - use_lfs: string; - vcs_url: string; - status: string; - status_text: string; - has_large_files: boolean; - large_files_size: number; - large_files_count: number; - authors_count: number; - percent: number; - commit_count: number; - url: string; - html_url: string; - authors_url: string; - repository_url: string; - }; - type MigrationsUnlockRepoForOrgResponse = {}; - type MigrationsDeleteArchiveForOrgResponse = {}; - type MigrationsGetArchiveForOrgResponse = {}; - type MigrationsGetStatusForOrgResponseRepositoriesItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type MigrationsGetStatusForOrgResponseRepositoriesItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type MigrationsGetStatusForOrgResponseRepositoriesItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: MigrationsGetStatusForOrgResponseRepositoriesItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: MigrationsGetStatusForOrgResponseRepositoriesItemPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type MigrationsGetStatusForOrgResponseOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type MigrationsGetStatusForOrgResponse = { - id: number; - owner: MigrationsGetStatusForOrgResponseOwner; - guid: string; - state: string; - lock_repositories: boolean; - exclude_attachments: boolean; - repositories: Array; - url: string; - created_at: string; - updated_at: string; - }; - type MigrationsListForOrgResponseItemRepositoriesItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type MigrationsListForOrgResponseItemRepositoriesItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type MigrationsListForOrgResponseItemRepositoriesItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: MigrationsListForOrgResponseItemRepositoriesItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: MigrationsListForOrgResponseItemRepositoriesItemPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type MigrationsListForOrgResponseItemOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type MigrationsListForOrgResponseItem = { - id: number; - owner: MigrationsListForOrgResponseItemOwner; - guid: string; - state: string; - lock_repositories: boolean; - exclude_attachments: boolean; - repositories: Array; - url: string; - created_at: string; - updated_at: string; - }; - type MigrationsStartForOrgResponseRepositoriesItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type MigrationsStartForOrgResponseRepositoriesItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type MigrationsStartForOrgResponseRepositoriesItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: MigrationsStartForOrgResponseRepositoriesItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: MigrationsStartForOrgResponseRepositoriesItemPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type MigrationsStartForOrgResponseOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type MigrationsStartForOrgResponse = { - id: number; - owner: MigrationsStartForOrgResponseOwner; - guid: string; - state: string; - lock_repositories: boolean; - exclude_attachments: boolean; - repositories: Array; - url: string; - created_at: string; - updated_at: string; - }; - type MetaGetResponse = { - verifiable_password_authentication: boolean; - hooks: Array; - git: Array; - pages: Array; - importer: Array; - }; - type MarkdownRenderRawResponse = {}; - type MarkdownRenderResponse = {}; - type LicensesGetForRepoResponseLicense = { - key: string; - name: string; - spdx_id: string; - url: string; - node_id: string; - }; - type LicensesGetForRepoResponseLinks = { - self: string; - git: string; - html: string; - }; - type LicensesGetForRepoResponse = { - name: string; - path: string; - sha: string; - size: number; - url: string; - html_url: string; - git_url: string; - download_url: string; - type: string; - content: string; - encoding: string; - _links: LicensesGetForRepoResponseLinks; - license: LicensesGetForRepoResponseLicense; - }; - type LicensesGetResponse = { - key: string; - name: string; - spdx_id: string; - url: string; - node_id: string; - html_url: string; - description: string; - implementation: string; - permissions: Array; - conditions: Array; - limitations: Array; - body: string; - featured: boolean; - }; - type LicensesListResponseItem = { - key: string; - name: string; - spdx_id: string; - url: string; - node_id?: string; - }; - type LicensesListCommonlyUsedResponseItem = { - key: string; - name: string; - spdx_id: string; - url: string; - node_id?: string; - }; - type IssuesListEventsForTimelineResponseItemActor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListEventsForTimelineResponseItem = { - id: number; - node_id: string; - url: string; - actor: IssuesListEventsForTimelineResponseItemActor; - event: string; - commit_id: string; - commit_url: string; - created_at: string; - }; - type IssuesDeleteMilestoneResponse = {}; - type IssuesUpdateMilestoneResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesUpdateMilestoneResponse = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesUpdateMilestoneResponseCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesCreateMilestoneResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesCreateMilestoneResponse = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesCreateMilestoneResponseCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesGetMilestoneResponseCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetMilestoneResponse = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesGetMilestoneResponseCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesListMilestonesForRepoResponseItemCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListMilestonesForRepoResponseItem = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesListMilestonesForRepoResponseItemCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesListLabelsForMilestoneResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesRemoveLabelsResponse = {}; - type IssuesReplaceLabelsResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesRemoveLabelResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesAddLabelsResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesListLabelsOnIssueResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesDeleteLabelResponse = {}; - type IssuesUpdateLabelResponse = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesCreateLabelResponse = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesGetLabelResponse = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesListLabelsForRepoResponseItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesGetEventResponseIssuePullRequest = { - url: string; - html_url: string; - diff_url: string; - patch_url: string; - }; - type IssuesGetEventResponseIssueMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetEventResponseIssueMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesGetEventResponseIssueMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesGetEventResponseIssueAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetEventResponseIssueAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetEventResponseIssueLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesGetEventResponseIssueUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetEventResponseIssue = { - id: number; - node_id: string; - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - number: number; - state: string; - title: string; - body: string; - user: IssuesGetEventResponseIssueUser; - labels: Array; - assignee: IssuesGetEventResponseIssueAssignee; - assignees: Array; - milestone: IssuesGetEventResponseIssueMilestone; - locked: boolean; - active_lock_reason: string; - comments: number; - pull_request: IssuesGetEventResponseIssuePullRequest; - closed_at: null; - created_at: string; - updated_at: string; - }; - type IssuesGetEventResponseActor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetEventResponse = { - id: number; - node_id: string; - url: string; - actor: IssuesGetEventResponseActor; - event: string; - commit_id: string; - commit_url: string; - created_at: string; - issue: IssuesGetEventResponseIssue; - }; - type IssuesListEventsForRepoResponseItemIssuePullRequest = { - url: string; - html_url: string; - diff_url: string; - patch_url: string; - }; - type IssuesListEventsForRepoResponseItemIssueMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListEventsForRepoResponseItemIssueMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesListEventsForRepoResponseItemIssueMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesListEventsForRepoResponseItemIssueAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListEventsForRepoResponseItemIssueAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListEventsForRepoResponseItemIssueLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesListEventsForRepoResponseItemIssueUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListEventsForRepoResponseItemIssue = { - id: number; - node_id: string; - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - number: number; - state: string; - title: string; - body: string; - user: IssuesListEventsForRepoResponseItemIssueUser; - labels: Array; - assignee: IssuesListEventsForRepoResponseItemIssueAssignee; - assignees: Array; - milestone: IssuesListEventsForRepoResponseItemIssueMilestone; - locked: boolean; - active_lock_reason: string; - comments: number; - pull_request: IssuesListEventsForRepoResponseItemIssuePullRequest; - closed_at: null; - created_at: string; - updated_at: string; - }; - type IssuesListEventsForRepoResponseItemActor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListEventsForRepoResponseItem = { - id: number; - node_id: string; - url: string; - actor: IssuesListEventsForRepoResponseItemActor; - event: string; - commit_id: string; - commit_url: string; - created_at: string; - issue: IssuesListEventsForRepoResponseItemIssue; - }; - type IssuesListEventsResponseItemActor = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListEventsResponseItem = { - id: number; - node_id: string; - url: string; - actor: IssuesListEventsResponseItemActor; - event: string; - commit_id: string; - commit_url: string; - created_at: string; - }; - type IssuesDeleteCommentResponse = {}; - type IssuesUpdateCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesUpdateCommentResponse = { - id: number; - node_id: string; - url: string; - html_url: string; - body: string; - user: IssuesUpdateCommentResponseUser; - created_at: string; - updated_at: string; - }; - type IssuesCreateCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesCreateCommentResponse = { - id: number; - node_id: string; - url: string; - html_url: string; - body: string; - user: IssuesCreateCommentResponseUser; - created_at: string; - updated_at: string; - }; - type IssuesGetCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetCommentResponse = { - id: number; - node_id: string; - url: string; - html_url: string; - body: string; - user: IssuesGetCommentResponseUser; - created_at: string; - updated_at: string; - }; - type IssuesListCommentsForRepoResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListCommentsForRepoResponseItem = { - id: number; - node_id: string; - url: string; - html_url: string; - body: string; - user: IssuesListCommentsForRepoResponseItemUser; - created_at: string; - updated_at: string; - }; - type IssuesListCommentsResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListCommentsResponseItem = { - id: number; - node_id: string; - url: string; - html_url: string; - body: string; - user: IssuesListCommentsResponseItemUser; - created_at: string; - updated_at: string; - }; - type IssuesRemoveAssigneesResponsePullRequest = { - url: string; - html_url: string; - diff_url: string; - patch_url: string; - }; - type IssuesRemoveAssigneesResponseMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesRemoveAssigneesResponseMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesRemoveAssigneesResponseMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesRemoveAssigneesResponseAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesRemoveAssigneesResponseAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesRemoveAssigneesResponseLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesRemoveAssigneesResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesRemoveAssigneesResponse = { - id: number; - node_id: string; - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - number: number; - state: string; - title: string; - body: string; - user: IssuesRemoveAssigneesResponseUser; - labels: Array; - assignee: IssuesRemoveAssigneesResponseAssignee; - assignees: Array; - milestone: IssuesRemoveAssigneesResponseMilestone; - locked: boolean; - active_lock_reason: string; - comments: number; - pull_request: IssuesRemoveAssigneesResponsePullRequest; - closed_at: null; - created_at: string; - updated_at: string; - }; - type IssuesAddAssigneesResponsePullRequest = { - url: string; - html_url: string; - diff_url: string; - patch_url: string; - }; - type IssuesAddAssigneesResponseMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesAddAssigneesResponseMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesAddAssigneesResponseMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesAddAssigneesResponseAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesAddAssigneesResponseAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesAddAssigneesResponseLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesAddAssigneesResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesAddAssigneesResponse = { - id: number; - node_id: string; - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - number: number; - state: string; - title: string; - body: string; - user: IssuesAddAssigneesResponseUser; - labels: Array; - assignee: IssuesAddAssigneesResponseAssignee; - assignees: Array; - milestone: IssuesAddAssigneesResponseMilestone; - locked: boolean; - active_lock_reason: string; - comments: number; - pull_request: IssuesAddAssigneesResponsePullRequest; - closed_at: null; - created_at: string; - updated_at: string; - }; - type IssuesCheckAssigneeResponse = {}; - type IssuesListAssigneesResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesUnlockResponse = {}; - type IssuesLockResponse = {}; - type IssuesUpdateResponseClosedBy = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesUpdateResponsePullRequest = { - url: string; - html_url: string; - diff_url: string; - patch_url: string; - }; - type IssuesUpdateResponseMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesUpdateResponseMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesUpdateResponseMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesUpdateResponseAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesUpdateResponseAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesUpdateResponseLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesUpdateResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesUpdateResponse = { - id: number; - node_id: string; - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - number: number; - state: string; - title: string; - body: string; - user: IssuesUpdateResponseUser; - labels: Array; - assignee: IssuesUpdateResponseAssignee; - assignees: Array; - milestone: IssuesUpdateResponseMilestone; - locked: boolean; - active_lock_reason: string; - comments: number; - pull_request: IssuesUpdateResponsePullRequest; - closed_at: null; - created_at: string; - updated_at: string; - closed_by: IssuesUpdateResponseClosedBy; - }; - type IssuesCreateResponseClosedBy = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesCreateResponsePullRequest = { - url: string; - html_url: string; - diff_url: string; - patch_url: string; - }; - type IssuesCreateResponseMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesCreateResponseMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesCreateResponseMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesCreateResponseAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesCreateResponseAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesCreateResponseLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesCreateResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesCreateResponse = { - id: number; - node_id: string; - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - number: number; - state: string; - title: string; - body: string; - user: IssuesCreateResponseUser; - labels: Array; - assignee: IssuesCreateResponseAssignee; - assignees: Array; - milestone: IssuesCreateResponseMilestone; - locked: boolean; - active_lock_reason: string; - comments: number; - pull_request: IssuesCreateResponsePullRequest; - closed_at: null; - created_at: string; - updated_at: string; - closed_by: IssuesCreateResponseClosedBy; - }; - type IssuesGetResponseClosedBy = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetResponsePullRequest = { - url: string; - html_url: string; - diff_url: string; - patch_url: string; - }; - type IssuesGetResponseMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetResponseMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesGetResponseMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesGetResponseAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetResponseAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetResponseLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesGetResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesGetResponse = { - id: number; - node_id: string; - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - number: number; - state: string; - title: string; - body: string; - user: IssuesGetResponseUser; - labels: Array; - assignee: IssuesGetResponseAssignee; - assignees: Array; - milestone: IssuesGetResponseMilestone; - locked: boolean; - active_lock_reason: string; - comments: number; - pull_request: IssuesGetResponsePullRequest; - closed_at: null; - created_at: string; - updated_at: string; - closed_by: IssuesGetResponseClosedBy; - }; - type IssuesListForRepoResponseItemPullRequest = { - url: string; - html_url: string; - diff_url: string; - patch_url: string; - }; - type IssuesListForRepoResponseItemMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForRepoResponseItemMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesListForRepoResponseItemMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesListForRepoResponseItemAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForRepoResponseItemAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForRepoResponseItemLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesListForRepoResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForRepoResponseItem = { - id: number; - node_id: string; - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - number: number; - state: string; - title: string; - body: string; - user: IssuesListForRepoResponseItemUser; - labels: Array; - assignee: IssuesListForRepoResponseItemAssignee; - assignees: Array; - milestone: IssuesListForRepoResponseItemMilestone; - locked: boolean; - active_lock_reason: string; - comments: number; - pull_request: IssuesListForRepoResponseItemPullRequest; - closed_at: null; - created_at: string; - updated_at: string; - }; - type IssuesListForOrgResponseItemRepositoryPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type IssuesListForOrgResponseItemRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForOrgResponseItemRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: IssuesListForOrgResponseItemRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: IssuesListForOrgResponseItemRepositoryPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type IssuesListForOrgResponseItemPullRequest = { - url: string; - html_url: string; - diff_url: string; - patch_url: string; - }; - type IssuesListForOrgResponseItemMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForOrgResponseItemMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesListForOrgResponseItemMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesListForOrgResponseItemAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForOrgResponseItemAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForOrgResponseItemLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesListForOrgResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForOrgResponseItem = { - id: number; - node_id: string; - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - number: number; - state: string; - title: string; - body: string; - user: IssuesListForOrgResponseItemUser; - labels: Array; - assignee: IssuesListForOrgResponseItemAssignee; - assignees: Array; - milestone: IssuesListForOrgResponseItemMilestone; - locked: boolean; - active_lock_reason: string; - comments: number; - pull_request: IssuesListForOrgResponseItemPullRequest; - closed_at: null; - created_at: string; - updated_at: string; - repository: IssuesListForOrgResponseItemRepository; - }; - type IssuesListForAuthenticatedUserResponseItemRepositoryPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type IssuesListForAuthenticatedUserResponseItemRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForAuthenticatedUserResponseItemRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: IssuesListForAuthenticatedUserResponseItemRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: IssuesListForAuthenticatedUserResponseItemRepositoryPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type IssuesListForAuthenticatedUserResponseItemPullRequest = { - url: string; - html_url: string; - diff_url: string; - patch_url: string; - }; - type IssuesListForAuthenticatedUserResponseItemMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForAuthenticatedUserResponseItemMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesListForAuthenticatedUserResponseItemMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesListForAuthenticatedUserResponseItemAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForAuthenticatedUserResponseItemAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForAuthenticatedUserResponseItemLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesListForAuthenticatedUserResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListForAuthenticatedUserResponseItem = { - id: number; - node_id: string; - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - number: number; - state: string; - title: string; - body: string; - user: IssuesListForAuthenticatedUserResponseItemUser; - labels: Array; - assignee: IssuesListForAuthenticatedUserResponseItemAssignee; - assignees: Array; - milestone: IssuesListForAuthenticatedUserResponseItemMilestone; - locked: boolean; - active_lock_reason: string; - comments: number; - pull_request: IssuesListForAuthenticatedUserResponseItemPullRequest; - closed_at: null; - created_at: string; - updated_at: string; - repository: IssuesListForAuthenticatedUserResponseItemRepository; - }; - type IssuesListResponseItemRepositoryPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type IssuesListResponseItemRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListResponseItemRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: IssuesListResponseItemRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: IssuesListResponseItemRepositoryPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type IssuesListResponseItemPullRequest = { - url: string; - html_url: string; - diff_url: string; - patch_url: string; - }; - type IssuesListResponseItemMilestoneCreator = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListResponseItemMilestone = { - url: string; - html_url: string; - labels_url: string; - id: number; - node_id: string; - number: number; - state: string; - title: string; - description: string; - creator: IssuesListResponseItemMilestoneCreator; - open_issues: number; - closed_issues: number; - created_at: string; - updated_at: string; - closed_at: string; - due_on: string; - }; - type IssuesListResponseItemAssigneesItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListResponseItemAssignee = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListResponseItemLabelsItem = { - id: number; - node_id: string; - url: string; - name: string; - description: string; - color: string; - default: boolean; - }; - type IssuesListResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type IssuesListResponseItem = { - id: number; - node_id: string; - url: string; - repository_url: string; - labels_url: string; - comments_url: string; - events_url: string; - html_url: string; - number: number; - state: string; - title: string; - body: string; - user: IssuesListResponseItemUser; - labels: Array; - assignee: IssuesListResponseItemAssignee; - assignees: Array; - milestone: IssuesListResponseItemMilestone; - locked: boolean; - active_lock_reason: string; - comments: number; - pull_request: IssuesListResponseItemPullRequest; - closed_at: null; - created_at: string; - updated_at: string; - repository: IssuesListResponseItemRepository; - }; - type InteractionsRemoveRestrictionsForRepoResponse = {}; - type InteractionsAddOrUpdateRestrictionsForRepoResponse = { - limit: string; - origin: string; - expires_at: string; - }; - type InteractionsGetRestrictionsForRepoResponse = { - limit: string; - origin: string; - expires_at: string; - }; - type InteractionsRemoveRestrictionsForOrgResponse = {}; - type InteractionsAddOrUpdateRestrictionsForOrgResponse = { - limit: string; - origin: string; - expires_at: string; - }; - type InteractionsGetRestrictionsForOrgResponse = { - limit: string; - origin: string; - expires_at: string; - }; - type GitignoreGetTemplateResponse = { name?: string; source?: string }; - type GitCreateTreeResponseTreeItem = { - path: string; - mode: string; - type: string; - size: number; - sha: string; - url: string; - }; - type GitCreateTreeResponse = { - sha: string; - url: string; - tree: Array; - }; - type GitCreateTagResponseVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type GitCreateTagResponseObject = { type: string; sha: string; url: string }; - type GitCreateTagResponseTagger = { - name: string; - email: string; - date: string; - }; - type GitCreateTagResponse = { - node_id: string; - tag: string; - sha: string; - url: string; - message: string; - tagger: GitCreateTagResponseTagger; - object: GitCreateTagResponseObject; - verification: GitCreateTagResponseVerification; - }; - type GitGetTagResponseVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type GitGetTagResponseObject = { type: string; sha: string; url: string }; - type GitGetTagResponseTagger = { name: string; email: string; date: string }; - type GitGetTagResponse = { - node_id: string; - tag: string; - sha: string; - url: string; - message: string; - tagger: GitGetTagResponseTagger; - object: GitGetTagResponseObject; - verification: GitGetTagResponseVerification; - }; - type GitDeleteRefResponse = {}; - type GitUpdateRefResponseObject = { type: string; sha: string; url: string }; - type GitUpdateRefResponse = { - ref: string; - node_id: string; - url: string; - object: GitUpdateRefResponseObject; - }; - type GitCreateRefResponseObject = { type: string; sha: string; url: string }; - type GitCreateRefResponse = { - ref: string; - node_id: string; - url: string; - object: GitCreateRefResponseObject; - }; - type GitCreateCommitResponseVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type GitCreateCommitResponseParentsItem = { url: string; sha: string }; - type GitCreateCommitResponseTree = { url: string; sha: string }; - type GitCreateCommitResponseCommitter = { - date: string; - name: string; - email: string; - }; - type GitCreateCommitResponseAuthor = { - date: string; - name: string; - email: string; - }; - type GitCreateCommitResponse = { - sha: string; - node_id: string; - url: string; - author: GitCreateCommitResponseAuthor; - committer: GitCreateCommitResponseCommitter; - message: string; - tree: GitCreateCommitResponseTree; - parents: Array; - verification: GitCreateCommitResponseVerification; - }; - type GitGetCommitResponseVerification = { - verified: boolean; - reason: string; - signature: null; - payload: null; - }; - type GitGetCommitResponseParentsItem = { url: string; sha: string }; - type GitGetCommitResponseTree = { url: string; sha: string }; - type GitGetCommitResponseCommitter = { - date: string; - name: string; - email: string; - }; - type GitGetCommitResponseAuthor = { - date: string; - name: string; - email: string; - }; - type GitGetCommitResponse = { - sha: string; - url: string; - author: GitGetCommitResponseAuthor; - committer: GitGetCommitResponseCommitter; - message: string; - tree: GitGetCommitResponseTree; - parents: Array; - verification: GitGetCommitResponseVerification; - }; - type GitCreateBlobResponse = { url: string; sha: string }; - type GitGetBlobResponse = { - content: string; - encoding: string; - url: string; - sha: string; - size: number; - }; - type GistsDeleteCommentResponse = {}; - type GistsUpdateCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsUpdateCommentResponse = { - id: number; - node_id: string; - url: string; - body: string; - user: GistsUpdateCommentResponseUser; - created_at: string; - updated_at: string; - }; - type GistsCreateCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsCreateCommentResponse = { - id: number; - node_id: string; - url: string; - body: string; - user: GistsCreateCommentResponseUser; - created_at: string; - updated_at: string; - }; - type GistsGetCommentResponseUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsGetCommentResponse = { - id: number; - node_id: string; - url: string; - body: string; - user: GistsGetCommentResponseUser; - created_at: string; - updated_at: string; - }; - type GistsListCommentsResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsListCommentsResponseItem = { - id: number; - node_id: string; - url: string; - body: string; - user: GistsListCommentsResponseItemUser; - created_at: string; - updated_at: string; - }; - type GistsDeleteResponse = {}; - type GistsListForksResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsListForksResponseItem = { - user: GistsListForksResponseItemUser; - url: string; - id: string; - created_at: string; - updated_at: string; - }; - type GistsForkResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsForkResponseFilesHelloWorldRb = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - }; - type GistsForkResponseFiles = { - "hello_world.rb": GistsForkResponseFilesHelloWorldRb; - }; - type GistsForkResponse = { - url: string; - forks_url: string; - commits_url: string; - id: string; - node_id: string; - git_pull_url: string; - git_push_url: string; - html_url: string; - files: GistsForkResponseFiles; - public: boolean; - created_at: string; - updated_at: string; - description: string; - comments: number; - user: null; - comments_url: string; - owner: GistsForkResponseOwner; - truncated: boolean; - }; - type GistsUnstarResponse = {}; - type GistsStarResponse = {}; - type GistsListCommitsResponseItemChangeStatus = { - deletions: number; - additions: number; - total: number; - }; - type GistsListCommitsResponseItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsListCommitsResponseItem = { - url: string; - version: string; - user: GistsListCommitsResponseItemUser; - change_status: GistsListCommitsResponseItemChangeStatus; - committed_at: string; - }; - type GistsUpdateResponseHistoryItemChangeStatus = { - deletions: number; - additions: number; - total: number; - }; - type GistsUpdateResponseHistoryItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsUpdateResponseHistoryItem = { - url: string; - version: string; - user: GistsUpdateResponseHistoryItemUser; - change_status: GistsUpdateResponseHistoryItemChangeStatus; - committed_at: string; - }; - type GistsUpdateResponseForksItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsUpdateResponseForksItem = { - user: GistsUpdateResponseForksItemUser; - url: string; - id: string; - created_at: string; - updated_at: string; - }; - type GistsUpdateResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsUpdateResponseFilesNewFileTxt = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsUpdateResponseFilesHelloWorldMd = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsUpdateResponseFilesHelloWorldPy = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsUpdateResponseFilesHelloWorldRb = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsUpdateResponseFiles = { - "hello_world.rb": GistsUpdateResponseFilesHelloWorldRb; - "hello_world.py": GistsUpdateResponseFilesHelloWorldPy; - "hello_world.md": GistsUpdateResponseFilesHelloWorldMd; - "new_file.txt": GistsUpdateResponseFilesNewFileTxt; - }; - type GistsUpdateResponse = { - url: string; - forks_url: string; - commits_url: string; - id: string; - node_id: string; - git_pull_url: string; - git_push_url: string; - html_url: string; - files: GistsUpdateResponseFiles; - public: boolean; - created_at: string; - updated_at: string; - description: string; - comments: number; - user: null; - comments_url: string; - owner: GistsUpdateResponseOwner; - truncated: boolean; - forks: Array; - history: Array; - }; - type GistsCreateResponseHistoryItemChangeStatus = { - deletions: number; - additions: number; - total: number; - }; - type GistsCreateResponseHistoryItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsCreateResponseHistoryItem = { - url: string; - version: string; - user: GistsCreateResponseHistoryItemUser; - change_status: GistsCreateResponseHistoryItemChangeStatus; - committed_at: string; - }; - type GistsCreateResponseForksItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsCreateResponseForksItem = { - user: GistsCreateResponseForksItemUser; - url: string; - id: string; - created_at: string; - updated_at: string; - }; - type GistsCreateResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsCreateResponseFilesHelloWorldPythonTxt = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsCreateResponseFilesHelloWorldRubyTxt = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsCreateResponseFilesHelloWorldPy = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsCreateResponseFilesHelloWorldRb = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsCreateResponseFiles = { - "hello_world.rb": GistsCreateResponseFilesHelloWorldRb; - "hello_world.py": GistsCreateResponseFilesHelloWorldPy; - "hello_world_ruby.txt": GistsCreateResponseFilesHelloWorldRubyTxt; - "hello_world_python.txt": GistsCreateResponseFilesHelloWorldPythonTxt; - }; - type GistsCreateResponse = { - url: string; - forks_url: string; - commits_url: string; - id: string; - node_id: string; - git_pull_url: string; - git_push_url: string; - html_url: string; - files: GistsCreateResponseFiles; - public: boolean; - created_at: string; - updated_at: string; - description: string; - comments: number; - user: null; - comments_url: string; - owner: GistsCreateResponseOwner; - truncated: boolean; - forks: Array; - history: Array; - }; - type GistsGetRevisionResponseHistoryItemChangeStatus = { - deletions: number; - additions: number; - total: number; - }; - type GistsGetRevisionResponseHistoryItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsGetRevisionResponseHistoryItem = { - url: string; - version: string; - user: GistsGetRevisionResponseHistoryItemUser; - change_status: GistsGetRevisionResponseHistoryItemChangeStatus; - committed_at: string; - }; - type GistsGetRevisionResponseForksItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsGetRevisionResponseForksItem = { - user: GistsGetRevisionResponseForksItemUser; - url: string; - id: string; - created_at: string; - updated_at: string; - }; - type GistsGetRevisionResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsGetRevisionResponseFilesHelloWorldPythonTxt = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsGetRevisionResponseFilesHelloWorldRubyTxt = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsGetRevisionResponseFilesHelloWorldPy = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsGetRevisionResponseFilesHelloWorldRb = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsGetRevisionResponseFiles = { - "hello_world.rb": GistsGetRevisionResponseFilesHelloWorldRb; - "hello_world.py": GistsGetRevisionResponseFilesHelloWorldPy; - "hello_world_ruby.txt": GistsGetRevisionResponseFilesHelloWorldRubyTxt; - "hello_world_python.txt": GistsGetRevisionResponseFilesHelloWorldPythonTxt; - }; - type GistsGetRevisionResponse = { - url: string; - forks_url: string; - commits_url: string; - id: string; - node_id: string; - git_pull_url: string; - git_push_url: string; - html_url: string; - files: GistsGetRevisionResponseFiles; - public: boolean; - created_at: string; - updated_at: string; - description: string; - comments: number; - user: null; - comments_url: string; - owner: GistsGetRevisionResponseOwner; - truncated: boolean; - forks: Array; - history: Array; - }; - type GistsGetResponseHistoryItemChangeStatus = { - deletions: number; - additions: number; - total: number; - }; - type GistsGetResponseHistoryItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsGetResponseHistoryItem = { - url: string; - version: string; - user: GistsGetResponseHistoryItemUser; - change_status: GistsGetResponseHistoryItemChangeStatus; - committed_at: string; - }; - type GistsGetResponseForksItemUser = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsGetResponseForksItem = { - user: GistsGetResponseForksItemUser; - url: string; - id: string; - created_at: string; - updated_at: string; - }; - type GistsGetResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsGetResponseFilesHelloWorldPythonTxt = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsGetResponseFilesHelloWorldRubyTxt = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsGetResponseFilesHelloWorldPy = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsGetResponseFilesHelloWorldRb = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - truncated: boolean; - content: string; - }; - type GistsGetResponseFiles = { - "hello_world.rb": GistsGetResponseFilesHelloWorldRb; - "hello_world.py": GistsGetResponseFilesHelloWorldPy; - "hello_world_ruby.txt": GistsGetResponseFilesHelloWorldRubyTxt; - "hello_world_python.txt": GistsGetResponseFilesHelloWorldPythonTxt; - }; - type GistsGetResponse = { - url: string; - forks_url: string; - commits_url: string; - id: string; - node_id: string; - git_pull_url: string; - git_push_url: string; - html_url: string; - files: GistsGetResponseFiles; - public: boolean; - created_at: string; - updated_at: string; - description: string; - comments: number; - user: null; - comments_url: string; - owner: GistsGetResponseOwner; - truncated: boolean; - forks: Array; - history: Array; - }; - type GistsListStarredResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsListStarredResponseItemFilesHelloWorldRb = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - }; - type GistsListStarredResponseItemFiles = { - "hello_world.rb": GistsListStarredResponseItemFilesHelloWorldRb; - }; - type GistsListStarredResponseItem = { - url: string; - forks_url: string; - commits_url: string; - id: string; - node_id: string; - git_pull_url: string; - git_push_url: string; - html_url: string; - files: GistsListStarredResponseItemFiles; - public: boolean; - created_at: string; - updated_at: string; - description: string; - comments: number; - user: null; - comments_url: string; - owner: GistsListStarredResponseItemOwner; - truncated: boolean; - }; - type GistsListPublicResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsListPublicResponseItemFilesHelloWorldRb = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - }; - type GistsListPublicResponseItemFiles = { - "hello_world.rb": GistsListPublicResponseItemFilesHelloWorldRb; - }; - type GistsListPublicResponseItem = { - url: string; - forks_url: string; - commits_url: string; - id: string; - node_id: string; - git_pull_url: string; - git_push_url: string; - html_url: string; - files: GistsListPublicResponseItemFiles; - public: boolean; - created_at: string; - updated_at: string; - description: string; - comments: number; - user: null; - comments_url: string; - owner: GistsListPublicResponseItemOwner; - truncated: boolean; - }; - type GistsListResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsListResponseItemFilesHelloWorldRb = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - }; - type GistsListResponseItemFiles = { - "hello_world.rb": GistsListResponseItemFilesHelloWorldRb; - }; - type GistsListResponseItem = { - url: string; - forks_url: string; - commits_url: string; - id: string; - node_id: string; - git_pull_url: string; - git_push_url: string; - html_url: string; - files: GistsListResponseItemFiles; - public: boolean; - created_at: string; - updated_at: string; - description: string; - comments: number; - user: null; - comments_url: string; - owner: GistsListResponseItemOwner; - truncated: boolean; - }; - type GistsListPublicForUserResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type GistsListPublicForUserResponseItemFilesHelloWorldRb = { - filename: string; - type: string; - language: string; - raw_url: string; - size: number; - }; - type GistsListPublicForUserResponseItemFiles = { - "hello_world.rb": GistsListPublicForUserResponseItemFilesHelloWorldRb; - }; - type GistsListPublicForUserResponseItem = { - url: string; - forks_url: string; - commits_url: string; - id: string; - node_id: string; - git_pull_url: string; - git_push_url: string; - html_url: string; - files: GistsListPublicForUserResponseItemFiles; - public: boolean; - created_at: string; - updated_at: string; - description: string; - comments: number; - user: null; - comments_url: string; - owner: GistsListPublicForUserResponseItemOwner; - truncated: boolean; - }; - type EmojisGetResponse = {}; - type CodesOfConductGetForRepoResponse = { - key: string; - name: string; - url: string; - body: string; - }; - type CodesOfConductGetConductCodeResponse = { - key: string; - name: string; - url: string; - body: string; - }; - type CodesOfConductListConductCodesResponseItem = { - key: string; - name: string; - url: string; - }; - type ChecksRerequestSuiteResponse = {}; - type ChecksCreateSuiteResponseRepositoryPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ChecksCreateSuiteResponseRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ChecksCreateSuiteResponseRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ChecksCreateSuiteResponseRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ChecksCreateSuiteResponseRepositoryPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ChecksCreateSuiteResponseAppOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type ChecksCreateSuiteResponseApp = { - id: number; - node_id: string; - owner: ChecksCreateSuiteResponseAppOwner; - name: string; - description: string; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - }; - type ChecksCreateSuiteResponse = { - id: number; - node_id: string; - head_branch: string; - head_sha: string; - status: string; - conclusion: string; - url: string; - before: string; - after: string; - pull_requests: Array; - app: ChecksCreateSuiteResponseApp; - repository: ChecksCreateSuiteResponseRepository; - }; - type ChecksSetSuitesPreferencesResponseRepositoryPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ChecksSetSuitesPreferencesResponseRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ChecksSetSuitesPreferencesResponseRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ChecksSetSuitesPreferencesResponseRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ChecksSetSuitesPreferencesResponseRepositoryPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ChecksSetSuitesPreferencesResponsePreferencesAutoTriggerChecksItem = { - app_id: number; - setting: boolean; - }; - type ChecksSetSuitesPreferencesResponsePreferences = { - auto_trigger_checks: Array< - ChecksSetSuitesPreferencesResponsePreferencesAutoTriggerChecksItem - >; - }; - type ChecksSetSuitesPreferencesResponse = { - preferences: ChecksSetSuitesPreferencesResponsePreferences; - repository: ChecksSetSuitesPreferencesResponseRepository; - }; - type ChecksListSuitesForRefResponseCheckSuitesItemRepositoryPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ChecksListSuitesForRefResponseCheckSuitesItemRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ChecksListSuitesForRefResponseCheckSuitesItemRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ChecksListSuitesForRefResponseCheckSuitesItemRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ChecksListSuitesForRefResponseCheckSuitesItemRepositoryPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ChecksListSuitesForRefResponseCheckSuitesItemAppOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type ChecksListSuitesForRefResponseCheckSuitesItemApp = { - id: number; - node_id: string; - owner: ChecksListSuitesForRefResponseCheckSuitesItemAppOwner; - name: string; - description: string; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - }; - type ChecksListSuitesForRefResponseCheckSuitesItem = { - id: number; - node_id: string; - head_branch: string; - head_sha: string; - status: string; - conclusion: string; - url: string; - before: string; - after: string; - pull_requests: Array; - app: ChecksListSuitesForRefResponseCheckSuitesItemApp; - repository: ChecksListSuitesForRefResponseCheckSuitesItemRepository; - }; - type ChecksListSuitesForRefResponse = { - total_count: number; - check_suites: Array; - }; - type ChecksGetSuiteResponseRepositoryPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ChecksGetSuiteResponseRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ChecksGetSuiteResponseRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ChecksGetSuiteResponseRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ChecksGetSuiteResponseRepositoryPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ChecksGetSuiteResponseAppOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type ChecksGetSuiteResponseApp = { - id: number; - node_id: string; - owner: ChecksGetSuiteResponseAppOwner; - name: string; - description: string; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - }; - type ChecksGetSuiteResponse = { - id: number; - node_id: string; - head_branch: string; - head_sha: string; - status: string; - conclusion: string; - url: string; - before: string; - after: string; - pull_requests: Array; - app: ChecksGetSuiteResponseApp; - repository: ChecksGetSuiteResponseRepository; - }; - type ChecksListAnnotationsResponseItem = { - path: string; - start_line: number; - end_line: number; - start_column: number; - end_column: number; - annotation_level: string; - title: string; - message: string; - raw_details: string; - }; - type ChecksGetResponsePullRequestsItemBaseRepo = { - id: number; - url: string; - name: string; - }; - type ChecksGetResponsePullRequestsItemBase = { - ref: string; - sha: string; - repo: ChecksGetResponsePullRequestsItemBaseRepo; - }; - type ChecksGetResponsePullRequestsItemHeadRepo = { - id: number; - url: string; - name: string; - }; - type ChecksGetResponsePullRequestsItemHead = { - ref: string; - sha: string; - repo: ChecksGetResponsePullRequestsItemHeadRepo; - }; - type ChecksGetResponsePullRequestsItem = { - url: string; - id: number; - number: number; - head: ChecksGetResponsePullRequestsItemHead; - base: ChecksGetResponsePullRequestsItemBase; - }; - type ChecksGetResponseAppOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type ChecksGetResponseApp = { - id: number; - node_id: string; - owner: ChecksGetResponseAppOwner; - name: string; - description: string; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - }; - type ChecksGetResponseCheckSuite = { id: number }; - type ChecksGetResponseOutput = { - title: string; - summary: string; - text: string; - annotations_count: number; - annotations_url: string; - }; - type ChecksGetResponse = { - id: number; - head_sha: string; - node_id: string; - external_id: string; - url: string; - html_url: string; - details_url: string; - status: string; - conclusion: string; - started_at: string; - completed_at: string; - output: ChecksGetResponseOutput; - name: string; - check_suite: ChecksGetResponseCheckSuite; - app: ChecksGetResponseApp; - pull_requests: Array; - }; - type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBaseRepo = { - id: number; - url: string; - name: string; - }; - type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBase = { - ref: string; - sha: string; - repo: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBaseRepo; - }; - type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHeadRepo = { - id: number; - url: string; - name: string; - }; - type ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHead = { - ref: string; - sha: string; - repo: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHeadRepo; - }; - type ChecksListForSuiteResponseCheckRunsItemPullRequestsItem = { - url: string; - id: number; - number: number; - head: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemHead; - base: ChecksListForSuiteResponseCheckRunsItemPullRequestsItemBase; - }; - type ChecksListForSuiteResponseCheckRunsItemAppOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type ChecksListForSuiteResponseCheckRunsItemApp = { - id: number; - node_id: string; - owner: ChecksListForSuiteResponseCheckRunsItemAppOwner; - name: string; - description: string; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - }; - type ChecksListForSuiteResponseCheckRunsItemCheckSuite = { id: number }; - type ChecksListForSuiteResponseCheckRunsItemOutput = { - title: string; - summary: string; - text: string; - annotations_count: number; - annotations_url: string; - }; - type ChecksListForSuiteResponseCheckRunsItem = { - id: number; - head_sha: string; - node_id: string; - external_id: string; - url: string; - html_url: string; - details_url: string; - status: string; - conclusion: string; - started_at: string; - completed_at: string; - output: ChecksListForSuiteResponseCheckRunsItemOutput; - name: string; - check_suite: ChecksListForSuiteResponseCheckRunsItemCheckSuite; - app: ChecksListForSuiteResponseCheckRunsItemApp; - pull_requests: Array< - ChecksListForSuiteResponseCheckRunsItemPullRequestsItem - >; - }; - type ChecksListForSuiteResponse = { - total_count: number; - check_runs: Array; - }; - type ChecksListForRefResponseCheckRunsItemPullRequestsItemBaseRepo = { - id: number; - url: string; - name: string; - }; - type ChecksListForRefResponseCheckRunsItemPullRequestsItemBase = { - ref: string; - sha: string; - repo: ChecksListForRefResponseCheckRunsItemPullRequestsItemBaseRepo; - }; - type ChecksListForRefResponseCheckRunsItemPullRequestsItemHeadRepo = { - id: number; - url: string; - name: string; - }; - type ChecksListForRefResponseCheckRunsItemPullRequestsItemHead = { - ref: string; - sha: string; - repo: ChecksListForRefResponseCheckRunsItemPullRequestsItemHeadRepo; - }; - type ChecksListForRefResponseCheckRunsItemPullRequestsItem = { - url: string; - id: number; - number: number; - head: ChecksListForRefResponseCheckRunsItemPullRequestsItemHead; - base: ChecksListForRefResponseCheckRunsItemPullRequestsItemBase; - }; - type ChecksListForRefResponseCheckRunsItemAppOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type ChecksListForRefResponseCheckRunsItemApp = { - id: number; - node_id: string; - owner: ChecksListForRefResponseCheckRunsItemAppOwner; - name: string; - description: string; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - }; - type ChecksListForRefResponseCheckRunsItemCheckSuite = { id: number }; - type ChecksListForRefResponseCheckRunsItemOutput = { - title: string; - summary: string; - text: string; - annotations_count: number; - annotations_url: string; - }; - type ChecksListForRefResponseCheckRunsItem = { - id: number; - head_sha: string; - node_id: string; - external_id: string; - url: string; - html_url: string; - details_url: string; - status: string; - conclusion: string; - started_at: string; - completed_at: string; - output: ChecksListForRefResponseCheckRunsItemOutput; - name: string; - check_suite: ChecksListForRefResponseCheckRunsItemCheckSuite; - app: ChecksListForRefResponseCheckRunsItemApp; - pull_requests: Array; - }; - type ChecksListForRefResponse = { - total_count: number; - check_runs: Array; - }; - type ChecksUpdateResponsePullRequestsItemBaseRepo = { - id: number; - url: string; - name: string; - }; - type ChecksUpdateResponsePullRequestsItemBase = { - ref: string; - sha: string; - repo: ChecksUpdateResponsePullRequestsItemBaseRepo; - }; - type ChecksUpdateResponsePullRequestsItemHeadRepo = { - id: number; - url: string; - name: string; - }; - type ChecksUpdateResponsePullRequestsItemHead = { - ref: string; - sha: string; - repo: ChecksUpdateResponsePullRequestsItemHeadRepo; - }; - type ChecksUpdateResponsePullRequestsItem = { - url: string; - id: number; - number: number; - head: ChecksUpdateResponsePullRequestsItemHead; - base: ChecksUpdateResponsePullRequestsItemBase; - }; - type ChecksUpdateResponseAppOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type ChecksUpdateResponseApp = { - id: number; - node_id: string; - owner: ChecksUpdateResponseAppOwner; - name: string; - description: string; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - }; - type ChecksUpdateResponseCheckSuite = { id: number }; - type ChecksUpdateResponseOutput = { - title: string; - summary: string; - text: string; - annotations_count: number; - annotations_url: string; - }; - type ChecksUpdateResponse = { - id: number; - head_sha: string; - node_id: string; - external_id: string; - url: string; - html_url: string; - details_url: string; - status: string; - conclusion: string; - started_at: string; - completed_at: string; - output: ChecksUpdateResponseOutput; - name: string; - check_suite: ChecksUpdateResponseCheckSuite; - app: ChecksUpdateResponseApp; - pull_requests: Array; - }; - type ChecksCreateResponsePullRequestsItemBaseRepo = { - id: number; - url: string; - name: string; - }; - type ChecksCreateResponsePullRequestsItemBase = { - ref: string; - sha: string; - repo: ChecksCreateResponsePullRequestsItemBaseRepo; - }; - type ChecksCreateResponsePullRequestsItemHeadRepo = { - id: number; - url: string; - name: string; - }; - type ChecksCreateResponsePullRequestsItemHead = { - ref: string; - sha: string; - repo: ChecksCreateResponsePullRequestsItemHeadRepo; - }; - type ChecksCreateResponsePullRequestsItem = { - url: string; - id: number; - number: number; - head: ChecksCreateResponsePullRequestsItemHead; - base: ChecksCreateResponsePullRequestsItemBase; - }; - type ChecksCreateResponseAppOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type ChecksCreateResponseApp = { - id: number; - node_id: string; - owner: ChecksCreateResponseAppOwner; - name: string; - description: string; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - }; - type ChecksCreateResponseCheckSuite = { id: number }; - type ChecksCreateResponseOutput = { - title: string; - summary: string; - text: string; - }; - type ChecksCreateResponse = { - id: number; - head_sha: string; - node_id: string; - external_id: string; - url: string; - html_url: string; - details_url: string; - status: string; - conclusion: null; - started_at: string; - completed_at: null; - output: ChecksCreateResponseOutput; - name: string; - check_suite: ChecksCreateResponseCheckSuite; - app: ChecksCreateResponseApp; - pull_requests: Array; - }; - type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemPlan = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - unit_name: null; - state: string; - bullets: Array; - }; - type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemAccount = { - login: string; - id: number; - url: string; - email: null; - organization_billing_email: string; - type: string; - }; - type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItem = { - billing_cycle: string; - next_billing_date: string; - unit_count: null; - on_free_trial: boolean; - free_trial_ends_on: string; - updated_at: string; - account: AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemAccount; - plan: AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItemPlan; - }; - type AppsListMarketplacePurchasesForAuthenticatedUserResponseItemPlan = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - unit_name: null; - state: string; - bullets: Array; - }; - type AppsListMarketplacePurchasesForAuthenticatedUserResponseItemAccount = { - login: string; - id: number; - url: string; - email: null; - organization_billing_email: string; - type: string; - }; - type AppsListMarketplacePurchasesForAuthenticatedUserResponseItem = { - billing_cycle: string; - next_billing_date: string; - unit_count: null; - on_free_trial: boolean; - free_trial_ends_on: string; - updated_at: string; - account: AppsListMarketplacePurchasesForAuthenticatedUserResponseItemAccount; - plan: AppsListMarketplacePurchasesForAuthenticatedUserResponseItemPlan; - }; - type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchasePlan = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - unit_name: null; - state: string; - bullets: Array; - }; - type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchase = { - billing_cycle: string; - next_billing_date: string; - unit_count: null; - on_free_trial: boolean; - free_trial_ends_on: string; - updated_at: string; - plan: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchasePlan; - }; - type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChangePlan = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - state: string; - unit_name: null; - bullets: Array; - }; - type AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChange = { - effective_date: string; - unit_count: null; - id: number; - plan: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChangePlan; - }; - type AppsCheckAccountIsAssociatedWithAnyStubbedResponse = { - url: string; - type: string; - id: number; - login: string; - email: null; - organization_billing_email: string; - marketplace_pending_change: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePendingChange; - marketplace_purchase: AppsCheckAccountIsAssociatedWithAnyStubbedResponseMarketplacePurchase; - }; - type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchasePlan = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - unit_name: null; - state: string; - bullets: Array; - }; - type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchase = { - billing_cycle: string; - next_billing_date: string; - unit_count: null; - on_free_trial: boolean; - free_trial_ends_on: string; - updated_at: string; - plan: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchasePlan; - }; - type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChangePlan = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - state: string; - unit_name: null; - bullets: Array; - }; - type AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChange = { - effective_date: string; - unit_count: null; - id: number; - plan: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChangePlan; - }; - type AppsCheckAccountIsAssociatedWithAnyResponse = { - url: string; - type: string; - id: number; - login: string; - email: null; - organization_billing_email: string; - marketplace_pending_change: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePendingChange; - marketplace_purchase: AppsCheckAccountIsAssociatedWithAnyResponseMarketplacePurchase; - }; - type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchasePlan = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - unit_name: null; - state: string; - bullets: Array; - }; - type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchase = { - billing_cycle: string; - next_billing_date: string; - unit_count: null; - on_free_trial: boolean; - free_trial_ends_on: string; - updated_at: string; - plan: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchasePlan; - }; - type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChangePlan = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - state: string; - unit_name: null; - bullets: Array; - }; - type AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChange = { - effective_date: string; - unit_count: null; - id: number; - plan: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChangePlan; - }; - type AppsListAccountsUserOrOrgOnPlanStubbedResponseItem = { - url: string; - type: string; - id: number; - login: string; - email: null; - organization_billing_email: string; - marketplace_pending_change: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePendingChange; - marketplace_purchase: AppsListAccountsUserOrOrgOnPlanStubbedResponseItemMarketplacePurchase; - }; - type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchasePlan = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - unit_name: null; - state: string; - bullets: Array; - }; - type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchase = { - billing_cycle: string; - next_billing_date: string; - unit_count: null; - on_free_trial: boolean; - free_trial_ends_on: string; - updated_at: string; - plan: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchasePlan; - }; - type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChangePlan = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - state: string; - unit_name: null; - bullets: Array; - }; - type AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChange = { - effective_date: string; - unit_count: null; - id: number; - plan: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChangePlan; - }; - type AppsListAccountsUserOrOrgOnPlanResponseItem = { - url: string; - type: string; - id: number; - login: string; - email: null; - organization_billing_email: string; - marketplace_pending_change: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePendingChange; - marketplace_purchase: AppsListAccountsUserOrOrgOnPlanResponseItemMarketplacePurchase; - }; - type AppsListPlansStubbedResponseItem = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - unit_name: null; - state: string; - bullets: Array; - }; - type AppsListPlansResponseItem = { - url: string; - accounts_url: string; - id: number; - number: number; - name: string; - description: string; - monthly_price_in_cents: number; - yearly_price_in_cents: number; - price_model: string; - has_free_trial: boolean; - unit_name: null; - state: string; - bullets: Array; - }; - type AppsCreateContentAttachmentResponse = { - id: number; - title: string; - body: string; - }; - type AppsRemoveRepoFromInstallationResponse = {}; - type AppsAddRepoToInstallationResponse = {}; - type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItemPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type AppsListInstallationReposForAuthenticatedUserResponse = { - total_count: number; - repositories: Array< - AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItem - >; - }; - type AppsListInstallationsForAuthenticatedUserResponseInstallationsItemPermissions = { - metadata: string; - contents: string; - issues: string; - single_file: string; - }; - type AppsListInstallationsForAuthenticatedUserResponseInstallationsItemAccount = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url?: string; - issues_url?: string; - members_url?: string; - public_members_url?: string; - avatar_url: string; - description?: string; - gravatar_id?: string; - html_url?: string; - followers_url?: string; - following_url?: string; - gists_url?: string; - starred_url?: string; - subscriptions_url?: string; - organizations_url?: string; - received_events_url?: string; - type?: string; - site_admin?: boolean; - }; - type AppsListInstallationsForAuthenticatedUserResponseInstallationsItem = { - id: number; - account: AppsListInstallationsForAuthenticatedUserResponseInstallationsItemAccount; - access_tokens_url: string; - repositories_url: string; - html_url: string; - app_id: number; - target_id: number; - target_type: string; - permissions: AppsListInstallationsForAuthenticatedUserResponseInstallationsItemPermissions; - events: Array; - single_file_name: string; - }; - type AppsListInstallationsForAuthenticatedUserResponse = { - total_count: number; - installations: Array< - AppsListInstallationsForAuthenticatedUserResponseInstallationsItem - >; - }; - type AppsListReposResponseRepositoriesItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type AppsListReposResponseRepositoriesItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: AppsListReposResponseRepositoriesItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type AppsListReposResponse = { - total_count: number; - repositories: Array; - }; - type AppsCreateFromManifestResponseOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type AppsCreateFromManifestResponse = { - id: number; - node_id: string; - owner: AppsCreateFromManifestResponseOwner; - name: string; - description: null; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - client_id: string; - client_secret: string; - webhook_secret: string; - pem: string; - }; - type AppsFindUserInstallationResponsePermissions = { - checks: string; - metadata: string; - contents: string; - }; - type AppsFindUserInstallationResponseAccount = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type AppsFindUserInstallationResponse = { - id: number; - account: AppsFindUserInstallationResponseAccount; - repository_selection: string; - access_tokens_url: string; - repositories_url: string; - html_url: string; - app_id: number; - target_id: number; - target_type: string; - permissions: AppsFindUserInstallationResponsePermissions; - events: Array; - created_at: string; - updated_at: string; - single_file_name: null; - }; - type AppsGetUserInstallationResponsePermissions = { - checks: string; - metadata: string; - contents: string; - }; - type AppsGetUserInstallationResponseAccount = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type AppsGetUserInstallationResponse = { - id: number; - account: AppsGetUserInstallationResponseAccount; - repository_selection: string; - access_tokens_url: string; - repositories_url: string; - html_url: string; - app_id: number; - target_id: number; - target_type: string; - permissions: AppsGetUserInstallationResponsePermissions; - events: Array; - created_at: string; - updated_at: string; - single_file_name: null; - }; - type AppsFindRepoInstallationResponsePermissions = { - checks: string; - metadata: string; - contents: string; - }; - type AppsFindRepoInstallationResponseAccount = { - login: string; - id: number; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type AppsFindRepoInstallationResponse = { - id: number; - account: AppsFindRepoInstallationResponseAccount; - repository_selection: string; - access_tokens_url: string; - repositories_url: string; - html_url: string; - app_id: number; - target_id: number; - target_type: string; - permissions: AppsFindRepoInstallationResponsePermissions; - events: Array; - created_at: string; - updated_at: string; - single_file_name: null; - }; - type AppsGetRepoInstallationResponsePermissions = { - checks: string; - metadata: string; - contents: string; - }; - type AppsGetRepoInstallationResponseAccount = { - login: string; - id: number; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type AppsGetRepoInstallationResponse = { - id: number; - account: AppsGetRepoInstallationResponseAccount; - repository_selection: string; - access_tokens_url: string; - repositories_url: string; - html_url: string; - app_id: number; - target_id: number; - target_type: string; - permissions: AppsGetRepoInstallationResponsePermissions; - events: Array; - created_at: string; - updated_at: string; - single_file_name: null; - }; - type AppsFindOrgInstallationResponsePermissions = { - checks: string; - metadata: string; - contents: string; - }; - type AppsFindOrgInstallationResponseAccount = { - login: string; - id: number; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type AppsFindOrgInstallationResponse = { - id: number; - account: AppsFindOrgInstallationResponseAccount; - repository_selection: string; - access_tokens_url: string; - repositories_url: string; - html_url: string; - app_id: number; - target_id: number; - target_type: string; - permissions: AppsFindOrgInstallationResponsePermissions; - events: Array; - created_at: string; - updated_at: string; - single_file_name: null; - }; - type AppsGetOrgInstallationResponsePermissions = { - checks: string; - metadata: string; - contents: string; - }; - type AppsGetOrgInstallationResponseAccount = { - login: string; - id: number; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type AppsGetOrgInstallationResponse = { - id: number; - account: AppsGetOrgInstallationResponseAccount; - repository_selection: string; - access_tokens_url: string; - repositories_url: string; - html_url: string; - app_id: number; - target_id: number; - target_type: string; - permissions: AppsGetOrgInstallationResponsePermissions; - events: Array; - created_at: string; - updated_at: string; - single_file_name: null; - }; - type AppsCreateInstallationTokenResponseRepositoriesItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type AppsCreateInstallationTokenResponseRepositoriesItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type AppsCreateInstallationTokenResponseRepositoriesItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: AppsCreateInstallationTokenResponseRepositoriesItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: AppsCreateInstallationTokenResponseRepositoriesItemPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type AppsCreateInstallationTokenResponsePermissions = { - issues: string; - contents: string; - }; - type AppsCreateInstallationTokenResponse = { - token: string; - expires_at: string; - permissions: AppsCreateInstallationTokenResponsePermissions; - repositories: Array; - }; - type AppsDeleteInstallationResponse = {}; - type AppsGetInstallationResponsePermissions = { - metadata: string; - contents: string; - issues: string; - single_file: string; - }; - type AppsGetInstallationResponseAccount = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type AppsGetInstallationResponse = { - id: number; - account: AppsGetInstallationResponseAccount; - access_tokens_url: string; - repositories_url: string; - html_url: string; - app_id: number; - target_id: number; - target_type: string; - permissions: AppsGetInstallationResponsePermissions; - events: Array; - single_file_name: string; - repository_selection: string; - }; - type AppsListInstallationsResponseItemPermissions = { - metadata: string; - contents: string; - issues: string; - single_file: string; - }; - type AppsListInstallationsResponseItemAccount = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type AppsListInstallationsResponseItem = { - id: number; - account: AppsListInstallationsResponseItemAccount; - access_tokens_url: string; - repositories_url: string; - html_url: string; - app_id: number; - target_id: number; - target_type: string; - permissions: AppsListInstallationsResponseItemPermissions; - events: Array; - single_file_name: string; - repository_selection: string; - }; - type AppsGetAuthenticatedResponseOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type AppsGetAuthenticatedResponse = { - id: number; - node_id: string; - owner: AppsGetAuthenticatedResponseOwner; - name: string; - description: string; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - installations_count: number; - }; - type AppsGetBySlugResponseOwner = { - login: string; - id: number; - node_id: string; - url: string; - repos_url: string; - events_url: string; - hooks_url: string; - issues_url: string; - members_url: string; - public_members_url: string; - avatar_url: string; - description: string; - }; - type AppsGetBySlugResponse = { - id: number; - node_id: string; - owner: AppsGetBySlugResponseOwner; - name: string; - description: string; - external_url: string; - html_url: string; - created_at: string; - updated_at: string; - }; - type ActivityDeleteRepoSubscriptionResponse = {}; - type ActivitySetRepoSubscriptionResponse = { - subscribed: boolean; - ignored: boolean; - reason: null; - created_at: string; - url: string; - repository_url: string; - }; - type ActivityListWatchedReposForAuthenticatedUserResponseItemLicense = { - key: string; - name: string; - spdx_id: string; - url: string; - node_id: string; - }; - type ActivityListWatchedReposForAuthenticatedUserResponseItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ActivityListWatchedReposForAuthenticatedUserResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ActivityListWatchedReposForAuthenticatedUserResponseItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ActivityListWatchedReposForAuthenticatedUserResponseItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ActivityListWatchedReposForAuthenticatedUserResponseItemPermissions; - template_repository: null; - subscribers_count: number; - network_count: number; - license: ActivityListWatchedReposForAuthenticatedUserResponseItemLicense; - }; - type ActivityListReposWatchedByUserResponseItemLicense = { - key: string; - name: string; - spdx_id: string; - url: string; - node_id: string; - }; - type ActivityListReposWatchedByUserResponseItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ActivityListReposWatchedByUserResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ActivityListReposWatchedByUserResponseItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ActivityListReposWatchedByUserResponseItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ActivityListReposWatchedByUserResponseItemPermissions; - template_repository: null; - subscribers_count: number; - network_count: number; - license: ActivityListReposWatchedByUserResponseItemLicense; - }; - type ActivityListWatchersForRepoResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ActivityUnstarRepoResponse = {}; - type ActivityStarRepoResponse = {}; - type ActivityListReposStarredByAuthenticatedUserResponseItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ActivityListReposStarredByAuthenticatedUserResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ActivityListReposStarredByAuthenticatedUserResponseItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ActivityListReposStarredByAuthenticatedUserResponseItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ActivityListReposStarredByAuthenticatedUserResponseItemPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ActivityListReposStarredByUserResponseItemPermissions = { - admin: boolean; - push: boolean; - pull: boolean; - }; - type ActivityListReposStarredByUserResponseItemOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ActivityListReposStarredByUserResponseItem = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ActivityListReposStarredByUserResponseItemOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - clone_url: string; - mirror_url: string; - hooks_url: string; - svn_url: string; - homepage: string; - language: null; - forks_count: number; - stargazers_count: number; - watchers_count: number; - size: number; - default_branch: string; - open_issues_count: number; - is_template: boolean; - topics: Array; - has_issues: boolean; - has_projects: boolean; - has_wiki: boolean; - has_pages: boolean; - has_downloads: boolean; - archived: boolean; - disabled: boolean; - pushed_at: string; - created_at: string; - updated_at: string; - permissions: ActivityListReposStarredByUserResponseItemPermissions; - allow_rebase_merge: boolean; - template_repository: null; - allow_squash_merge: boolean; - allow_merge_commit: boolean; - subscribers_count: number; - network_count: number; - }; - type ActivityListStargazersForRepoResponseItem = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ActivityDeleteThreadSubscriptionResponse = {}; - type ActivitySetThreadSubscriptionResponse = { - subscribed: boolean; - ignored: boolean; - reason: null; - created_at: string; - url: string; - thread_url: string; - }; - type ActivityGetThreadSubscriptionResponse = { - subscribed: boolean; - ignored: boolean; - reason: null; - created_at: string; - url: string; - thread_url: string; - }; - type ActivityMarkThreadAsReadResponse = {}; - type ActivityGetThreadResponseSubject = { - title: string; - url: string; - latest_comment_url: string; - type: string; - }; - type ActivityGetThreadResponseRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ActivityGetThreadResponseRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ActivityGetThreadResponseRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - }; - type ActivityGetThreadResponse = { - id: string; - repository: ActivityGetThreadResponseRepository; - subject: ActivityGetThreadResponseSubject; - reason: string; - unread: boolean; - updated_at: string; - last_read_at: string; - url: string; - }; - type ActivityMarkNotificationsAsReadForRepoResponse = {}; - type ActivityMarkAsReadResponse = {}; - type ActivityListNotificationsForRepoResponseItemSubject = { - title: string; - url: string; - latest_comment_url: string; - type: string; - }; - type ActivityListNotificationsForRepoResponseItemRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ActivityListNotificationsForRepoResponseItemRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ActivityListNotificationsForRepoResponseItemRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - }; - type ActivityListNotificationsForRepoResponseItem = { - id: string; - repository: ActivityListNotificationsForRepoResponseItemRepository; - subject: ActivityListNotificationsForRepoResponseItemSubject; - reason: string; - unread: boolean; - updated_at: string; - last_read_at: string; - url: string; - }; - type ActivityListNotificationsResponseItemSubject = { - title: string; - url: string; - latest_comment_url: string; - type: string; - }; - type ActivityListNotificationsResponseItemRepositoryOwner = { - login: string; - id: number; - node_id: string; - avatar_url: string; - gravatar_id: string; - url: string; - html_url: string; - followers_url: string; - following_url: string; - gists_url: string; - starred_url: string; - subscriptions_url: string; - organizations_url: string; - repos_url: string; - events_url: string; - received_events_url: string; - type: string; - site_admin: boolean; - }; - type ActivityListNotificationsResponseItemRepository = { - id: number; - node_id: string; - name: string; - full_name: string; - owner: ActivityListNotificationsResponseItemRepositoryOwner; - private: boolean; - html_url: string; - description: string; - fork: boolean; - url: string; - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - downloads_url: string; - events_url: string; - forks_url: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - notifications_url: string; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - }; - type ActivityListNotificationsResponseItem = { - id: string; - repository: ActivityListNotificationsResponseItemRepository; - subject: ActivityListNotificationsResponseItemSubject; - reason: string; - unread: boolean; - updated_at: string; - last_read_at: string; - url: string; - }; - type ActivityListFeedsResponseLinksSecurityAdvisories = { - href: string; - type: string; - }; - type ActivityListFeedsResponseLinksCurrentUserOrganizationsItem = { - href: string; - type: string; - }; - type ActivityListFeedsResponseLinksCurrentUserOrganization = { - href: string; - type: string; - }; - type ActivityListFeedsResponseLinksCurrentUserActor = { - href: string; - type: string; - }; - type ActivityListFeedsResponseLinksCurrentUser = { - href: string; - type: string; - }; - type ActivityListFeedsResponseLinksCurrentUserPublic = { - href: string; - type: string; - }; - type ActivityListFeedsResponseLinksUser = { href: string; type: string }; - type ActivityListFeedsResponseLinksTimeline = { href: string; type: string }; - type ActivityListFeedsResponseLinks = { - timeline: ActivityListFeedsResponseLinksTimeline; - user: ActivityListFeedsResponseLinksUser; - current_user_public: ActivityListFeedsResponseLinksCurrentUserPublic; - current_user: ActivityListFeedsResponseLinksCurrentUser; - current_user_actor: ActivityListFeedsResponseLinksCurrentUserActor; - current_user_organization: ActivityListFeedsResponseLinksCurrentUserOrganization; - current_user_organizations: Array< - ActivityListFeedsResponseLinksCurrentUserOrganizationsItem - >; - security_advisories: ActivityListFeedsResponseLinksSecurityAdvisories; - }; - type ActivityListFeedsResponse = { - timeline_url: string; - user_url: string; - current_user_public_url: string; - current_user_url: string; - current_user_actor_url: string; - current_user_organization_url: string; - current_user_organization_urls: Array; - security_advisories_url: string; - _links: ActivityListFeedsResponseLinks; - }; - type ActivityListNotificationsResponse = Array< - ActivityListNotificationsResponseItem - >; - type ActivityListNotificationsForRepoResponse = Array< - ActivityListNotificationsForRepoResponseItem - >; - type ActivityListStargazersForRepoResponse = Array< - ActivityListStargazersForRepoResponseItem - >; - type ActivityListReposStarredByUserResponse = Array< - ActivityListReposStarredByUserResponseItem - >; - type ActivityListReposStarredByAuthenticatedUserResponse = Array< - ActivityListReposStarredByAuthenticatedUserResponseItem - >; - type ActivityListWatchersForRepoResponse = Array< - ActivityListWatchersForRepoResponseItem - >; - type ActivityListReposWatchedByUserResponse = Array< - ActivityListReposWatchedByUserResponseItem - >; - type ActivityListWatchedReposForAuthenticatedUserResponse = Array< - ActivityListWatchedReposForAuthenticatedUserResponseItem - >; - type AppsListInstallationsResponse = Array; - type AppsListPlansResponse = Array; - type AppsListPlansStubbedResponse = Array; - type AppsListAccountsUserOrOrgOnPlanResponse = Array< - AppsListAccountsUserOrOrgOnPlanResponseItem - >; - type AppsListAccountsUserOrOrgOnPlanStubbedResponse = Array< - AppsListAccountsUserOrOrgOnPlanStubbedResponseItem - >; - type AppsListMarketplacePurchasesForAuthenticatedUserResponse = Array< - AppsListMarketplacePurchasesForAuthenticatedUserResponseItem - >; - type AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponse = Array< - AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponseItem - >; - type ChecksListAnnotationsResponse = Array; - type CodesOfConductListConductCodesResponse = Array< - CodesOfConductListConductCodesResponseItem - >; - type GistsListPublicForUserResponse = Array< - GistsListPublicForUserResponseItem - >; - type GistsListResponse = Array; - type GistsListPublicResponse = Array; - type GistsListStarredResponse = Array; - type GistsListCommitsResponse = Array; - type GistsListForksResponse = Array; - type GistsListCommentsResponse = Array; - type GitignoreListTemplatesResponse = Array; - type IssuesListResponse = Array; - type IssuesListForAuthenticatedUserResponse = Array< - IssuesListForAuthenticatedUserResponseItem - >; - type IssuesListForOrgResponse = Array; - type IssuesListForRepoResponse = Array; - type IssuesListAssigneesResponse = Array; - type IssuesListCommentsResponse = Array; - type IssuesListCommentsForRepoResponse = Array< - IssuesListCommentsForRepoResponseItem - >; - type IssuesListEventsResponse = Array; - type IssuesListEventsForRepoResponse = Array< - IssuesListEventsForRepoResponseItem - >; - type IssuesListLabelsForRepoResponse = Array< - IssuesListLabelsForRepoResponseItem - >; - type IssuesListLabelsOnIssueResponse = Array< - IssuesListLabelsOnIssueResponseItem - >; - type IssuesAddLabelsResponse = Array; - type IssuesRemoveLabelResponse = Array; - type IssuesReplaceLabelsResponse = Array; - type IssuesListLabelsForMilestoneResponse = Array< - IssuesListLabelsForMilestoneResponseItem - >; - type IssuesListMilestonesForRepoResponse = Array< - IssuesListMilestonesForRepoResponseItem - >; - type IssuesListEventsForTimelineResponse = Array< - IssuesListEventsForTimelineResponseItem - >; - type LicensesListCommonlyUsedResponse = Array< - LicensesListCommonlyUsedResponseItem - >; - type LicensesListResponse = Array; - type MigrationsListForOrgResponse = Array; - type MigrationsGetCommitAuthorsResponse = Array< - MigrationsGetCommitAuthorsResponseItem - >; - type MigrationsGetLargeFilesResponse = Array< - MigrationsGetLargeFilesResponseItem - >; - type MigrationsListForAuthenticatedUserResponse = Array< - MigrationsListForAuthenticatedUserResponseItem - >; - type OauthAuthorizationsListGrantsResponse = Array< - OauthAuthorizationsListGrantsResponseItem - >; - type OauthAuthorizationsListAuthorizationsResponse = Array< - OauthAuthorizationsListAuthorizationsResponseItem - >; - type OrgsListForAuthenticatedUserResponse = Array< - OrgsListForAuthenticatedUserResponseItem - >; - type OrgsListResponse = Array; - type OrgsListForUserResponse = Array; - type OrgsListBlockedUsersResponse = Array; - type OrgsListHooksResponse = Array; - type OrgsListMembersResponse = Array; - type OrgsListPublicMembersResponse = Array; - type OrgsListInvitationTeamsResponse = Array< - OrgsListInvitationTeamsResponseItem - >; - type OrgsListPendingInvitationsResponse = Array< - OrgsListPendingInvitationsResponseItem - >; - type OrgsListMembershipsResponse = Array; - type OrgsListOutsideCollaboratorsResponse = Array< - OrgsListOutsideCollaboratorsResponseItem - >; - type ProjectsListForRepoResponse = Array; - type ProjectsListForOrgResponse = Array; - type ProjectsListForUserResponse = Array; - type ProjectsListCardsResponse = Array; - type ProjectsListCollaboratorsResponse = Array< - ProjectsListCollaboratorsResponseItem - >; - type ProjectsListColumnsResponse = Array; - type PullsListResponse = Array; - type PullsListCommitsResponse = Array; - type PullsListFilesResponse = Array; - type PullsListCommentsResponse = Array; - type PullsListCommentsForRepoResponse = Array< - PullsListCommentsForRepoResponseItem - >; - type PullsListReviewsResponse = Array; - type PullsGetCommentsForReviewResponse = Array< - PullsGetCommentsForReviewResponseItem - >; - type ReactionsListForCommitCommentResponse = Array< - ReactionsListForCommitCommentResponseItem - >; - type ReactionsListForIssueResponse = Array; - type ReactionsListForIssueCommentResponse = Array< - ReactionsListForIssueCommentResponseItem - >; - type ReactionsListForPullRequestReviewCommentResponse = Array< - ReactionsListForPullRequestReviewCommentResponseItem - >; - type ReactionsListForTeamDiscussionResponse = Array< - ReactionsListForTeamDiscussionResponseItem - >; - type ReactionsListForTeamDiscussionCommentResponse = Array< - ReactionsListForTeamDiscussionCommentResponseItem - >; - type ReposListForOrgResponse = Array; - type ReposListPublicResponse = Array; - type ReposListTeamsResponse = Array; - type ReposListTagsResponse = Array; - type ReposListBranchesResponse = Array; - type ReposReplaceProtectedBranchRequiredStatusChecksContextsResponse = Array< - string - >; - type ReposAddProtectedBranchRequiredStatusChecksContextsResponse = Array< - string - >; - type ReposRemoveProtectedBranchRequiredStatusChecksContextsResponse = Array< - string - >; - type ReposListProtectedBranchTeamRestrictionsResponse = any; - type ReposReplaceProtectedBranchTeamRestrictionsResponse = Array< - ReposReplaceProtectedBranchTeamRestrictionsResponseItem - >; - type ReposAddProtectedBranchTeamRestrictionsResponse = Array< - ReposAddProtectedBranchTeamRestrictionsResponseItem - >; - type ReposRemoveProtectedBranchTeamRestrictionsResponse = Array< - ReposRemoveProtectedBranchTeamRestrictionsResponseItem - >; - type ReposReplaceProtectedBranchUserRestrictionsResponse = Array< - ReposReplaceProtectedBranchUserRestrictionsResponseItem - >; - type ReposAddProtectedBranchUserRestrictionsResponse = Array< - ReposAddProtectedBranchUserRestrictionsResponseItem - >; - type ReposRemoveProtectedBranchUserRestrictionsResponse = Array< - ReposRemoveProtectedBranchUserRestrictionsResponseItem - >; - type ReposListCollaboratorsResponse = Array< - ReposListCollaboratorsResponseItem - >; - type ReposListCommitCommentsResponse = Array< - ReposListCommitCommentsResponseItem - >; - type ReposListCommentsForCommitResponse = Array< - ReposListCommentsForCommitResponseItem - >; - type ReposListCommitsResponse = Array; - type ReposCompareCommitsResponse = any; - type ReposListBranchesForHeadCommitResponse = Array< - ReposListBranchesForHeadCommitResponseItem - >; - type ReposListPullRequestsAssociatedWithCommitResponse = Array< - ReposListPullRequestsAssociatedWithCommitResponseItem - >; - type ReposListDeploymentsResponse = Array; - type ReposListDeploymentStatusesResponse = Array< - ReposListDeploymentStatusesResponseItem - >; - type ReposListDownloadsResponse = Array; - type ReposListForksResponse = Array; - type ReposListHooksResponse = Array; - type ReposListInvitationsResponse = Array; - type ReposListInvitationsForAuthenticatedUserResponse = Array< - ReposListInvitationsForAuthenticatedUserResponseItem - >; - type ReposListDeployKeysResponse = Array; - type ReposListPagesBuildsResponse = Array; - type ReposListReleasesResponse = Array; - type ReposListAssetsForReleaseResponse = Array< - ReposListAssetsForReleaseResponseItem - >; - type ReposGetContributorsStatsResponse = Array< - ReposGetContributorsStatsResponseItem - >; - type ReposGetCommitActivityStatsResponse = Array< - ReposGetCommitActivityStatsResponseItem - >; - type ReposGetCodeFrequencyStatsResponse = Array>; - type ReposGetPunchCardStatsResponse = Array>; - type ReposListStatusesForRefResponse = Array< - ReposListStatusesForRefResponseItem - >; - type ReposGetTopReferrersResponse = Array; - type ReposGetTopPathsResponse = Array; - type TeamsListResponse = Array; - type TeamsListReposResponse = Array; - type TeamsListForAuthenticatedUserResponse = Array< - TeamsListForAuthenticatedUserResponseItem - >; - type TeamsListProjectsResponse = Array; - type TeamsListDiscussionCommentsResponse = Array< - TeamsListDiscussionCommentsResponseItem - >; - type TeamsListDiscussionsResponse = Array; - type TeamsListMembersResponse = Array; - type TeamsListPendingInvitationsResponse = Array< - TeamsListPendingInvitationsResponseItem - >; - type UsersGetContextForUserResponse = any; - type UsersListResponse = Array; - type UsersListBlockedResponse = Array; - type UsersListEmailsResponse = Array; - type UsersListPublicEmailsResponse = Array; - type UsersAddEmailsResponse = Array; - type UsersTogglePrimaryEmailVisibilityResponse = Array< - UsersTogglePrimaryEmailVisibilityResponseItem - >; - type UsersListFollowersForUserResponse = Array< - UsersListFollowersForUserResponseItem - >; - type UsersListFollowersForAuthenticatedUserResponse = Array< - UsersListFollowersForAuthenticatedUserResponseItem - >; - type UsersListFollowingForUserResponse = Array< - UsersListFollowingForUserResponseItem - >; - type UsersListFollowingForAuthenticatedUserResponse = Array< - UsersListFollowingForAuthenticatedUserResponseItem - >; - type UsersListGpgKeysForUserResponse = Array< - UsersListGpgKeysForUserResponseItem - >; - type UsersListGpgKeysResponse = Array; - type UsersListPublicKeysForUserResponse = Array< - UsersListPublicKeysForUserResponseItem - >; - type UsersListPublicKeysResponse = Array; - - export type ActivityListPublicEventsParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListRepoEventsParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListPublicEventsForRepoNetworkParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListPublicEventsForOrgParams = { - org: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListReceivedEventsForUserParams = { - username: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListReceivedPublicEventsForUserParams = { - username: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListEventsForUserParams = { - username: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListPublicEventsForUserParams = { - username: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListEventsForOrgParams = { - username: string; - - org: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListNotificationsParams = { - /** - * If `true`, show notifications marked as read. - */ - all?: boolean; - /** - * If `true`, only shows notifications in which the user is directly participating or mentioned. - */ - participating?: boolean; - /** - * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - since?: string; - /** - * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - before?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListNotificationsForRepoParams = { - owner: string; - - repo: string; - /** - * If `true`, show notifications marked as read. - */ - all?: boolean; - /** - * If `true`, only shows notifications in which the user is directly participating or mentioned. - */ - participating?: boolean; - /** - * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - since?: string; - /** - * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - before?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityMarkAsReadParams = { - /** - * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - last_read_at?: string; - }; - export type ActivityMarkNotificationsAsReadForRepoParams = { - owner: string; - - repo: string; - /** - * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - last_read_at?: string; - }; - export type ActivityGetThreadParams = { - thread_id: number; - }; - export type ActivityMarkThreadAsReadParams = { - thread_id: number; - }; - export type ActivityGetThreadSubscriptionParams = { - thread_id: number; - }; - export type ActivitySetThreadSubscriptionParams = { - thread_id: number; - /** - * Unsubscribes and subscribes you to a conversation. Set `ignored` to `true` to block all notifications from this thread. - */ - ignored?: boolean; - }; - export type ActivityDeleteThreadSubscriptionParams = { - thread_id: number; - }; - export type ActivityListStargazersForRepoParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListReposStarredByUserParams = { - username: string; - /** - * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). - */ - sort?: "created" | "updated"; - /** - * One of `asc` (ascending) or `desc` (descending). - */ - direction?: "asc" | "desc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListReposStarredByAuthenticatedUserParams = { - /** - * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). - */ - sort?: "created" | "updated"; - /** - * One of `asc` (ascending) or `desc` (descending). - */ - direction?: "asc" | "desc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityCheckStarringRepoParams = { - owner: string; - - repo: string; - }; - export type ActivityStarRepoParams = { - owner: string; - - repo: string; - }; - export type ActivityUnstarRepoParams = { - owner: string; - - repo: string; - }; - export type ActivityListWatchersForRepoParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListReposWatchedByUserParams = { - username: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityListWatchedReposForAuthenticatedUserParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ActivityGetRepoSubscriptionParams = { - owner: string; - - repo: string; - }; - export type ActivitySetRepoSubscriptionParams = { - owner: string; - - repo: string; - /** - * Determines if notifications should be received from this repository. - */ - subscribed?: boolean; - /** - * Determines if all notifications should be blocked from this repository. - */ - ignored?: boolean; - }; - export type ActivityDeleteRepoSubscriptionParams = { - owner: string; - - repo: string; - }; - export type AppsGetBySlugParams = { - app_slug: string; - }; - export type AppsListInstallationsParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type AppsGetInstallationParams = { - installation_id: number; - }; - export type AppsDeleteInstallationParams = { - installation_id: number; - }; - export type AppsCreateInstallationTokenParams = { - installation_id: number; - /** - * The `id`s of the repositories that the installation token can access. Providing repository `id`s restricts the access of an installation token to specific repositories. You can use the "[List repositories](https://developer.github.com/v3/apps/installations/#list-repositories)" endpoint to get the `id` of all repositories that an installation can access. For example, you can select specific repositories when creating an installation token to restrict the number of repositories that can be cloned using the token. - */ - repository_ids?: number[]; - /** - * The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see "[GitHub App permissions](https://developer.github.com/apps/building-github-apps/creating-github-apps-using-url-parameters/#github-app-permissions)." - */ - permissions?: AppsCreateInstallationTokenParamsPermissions; - }; - export type AppsGetOrgInstallationParams = { - org: string; - }; - export type AppsFindOrgInstallationParams = { - org: string; - }; - export type AppsGetRepoInstallationParams = { - owner: string; - - repo: string; - }; - export type AppsFindRepoInstallationParams = { - owner: string; - - repo: string; - }; - export type AppsGetUserInstallationParams = { - username: string; - }; - export type AppsFindUserInstallationParams = { - username: string; - }; - export type AppsCreateFromManifestParams = { - code: string; - }; - export type AppsListReposParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type AppsListInstallationsForAuthenticatedUserParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type AppsListInstallationReposForAuthenticatedUserParams = { - installation_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type AppsAddRepoToInstallationParams = { - installation_id: number; - - repository_id: number; - }; - export type AppsRemoveRepoFromInstallationParams = { - installation_id: number; - - repository_id: number; - }; - export type AppsCreateContentAttachmentParams = { - content_reference_id: number; - /** - * The title of the content attachment displayed in the body or comment of an issue or pull request. - */ - title: string; - /** - * The body text of the content attachment displayed in the body or comment of an issue or pull request. This parameter supports markdown. - */ - body: string; - }; - export type AppsListPlansParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type AppsListPlansStubbedParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type AppsListAccountsUserOrOrgOnPlanParams = { - plan_id: number; - /** - * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. - */ - sort?: "created" | "updated"; - /** - * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. - */ - direction?: "asc" | "desc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type AppsListAccountsUserOrOrgOnPlanStubbedParams = { - plan_id: number; - /** - * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. - */ - sort?: "created" | "updated"; - /** - * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. - */ - direction?: "asc" | "desc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type AppsCheckAccountIsAssociatedWithAnyParams = { - account_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type AppsCheckAccountIsAssociatedWithAnyStubbedParams = { - account_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type AppsListMarketplacePurchasesForAuthenticatedUserParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ChecksCreateParams = { - owner: string; - - repo: string; - /** - * The name of the check. For example, "code-coverage". - */ - name: string; - /** - * The SHA of the commit. - */ - head_sha: string; - /** - * The URL of the integrator's site that has the full details of the check. - */ - details_url?: string; - /** - * A reference for the run on the integrator's system. - */ - external_id?: string; - /** - * The current status. Can be one of `queued`, `in_progress`, or `completed`. - */ - status?: "queued" | "in_progress" | "completed"; - /** - * The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string; - /** - * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. - * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. - */ - conclusion?: - | "success" - | "failure" - | "neutral" - | "cancelled" - | "timed_out" - | "action_required"; - /** - * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - completed_at?: string; - /** - * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object) description. - */ - output?: ChecksCreateParamsOutput; - /** - * Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://developer.github.com/v3/activity/events/types/#checkrunevent) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." - */ - actions?: ChecksCreateParamsActions[]; - }; - export type ChecksUpdateParams = { - owner: string; - - repo: string; - - check_run_id: number; - /** - * The name of the check. For example, "code-coverage". - */ - name?: string; - /** - * The URL of the integrator's site that has the full details of the check. - */ - details_url?: string; - /** - * A reference for the run on the integrator's system. - */ - external_id?: string; - /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string; - /** - * The current status. Can be one of `queued`, `in_progress`, or `completed`. - */ - status?: "queued" | "in_progress" | "completed"; - /** - * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. - * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. - */ - conclusion?: - | "success" - | "failure" - | "neutral" - | "cancelled" - | "timed_out" - | "action_required"; - /** - * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - completed_at?: string; - /** - * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object-1) description. - */ - output?: ChecksUpdateParamsOutput; - /** - * Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. - */ - actions?: ChecksUpdateParamsActions[]; - }; - export type ChecksListForRefParams = { - owner: string; - - repo: string; - - ref: string; - /** - * Returns check runs with the specified `name`. - */ - check_name?: string; - /** - * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. - */ - status?: "queued" | "in_progress" | "completed"; - /** - * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. - */ - filter?: "latest" | "all"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ChecksListForSuiteParams = { - owner: string; - - repo: string; - - check_suite_id: number; - /** - * Returns check runs with the specified `name`. - */ - check_name?: string; - /** - * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. - */ - status?: "queued" | "in_progress" | "completed"; - /** - * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. - */ - filter?: "latest" | "all"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ChecksGetParams = { - owner: string; - - repo: string; - - check_run_id: number; - }; - export type ChecksListAnnotationsParams = { - owner: string; - - repo: string; - - check_run_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ChecksGetSuiteParams = { - owner: string; - - repo: string; - - check_suite_id: number; - }; - export type ChecksListSuitesForRefParams = { - owner: string; - - repo: string; - - ref: string; - /** - * Filters check suites by GitHub App `id`. - */ - app_id?: number; - /** - * Filters checks suites by the name of the [check run](https://developer.github.com/v3/checks/runs/). - */ - check_name?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ChecksSetSuitesPreferencesParams = { - owner: string; - - repo: string; - /** - * Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://developer.github.com/v3/checks/suites/#auto_trigger_checks-object) description for details. - */ - auto_trigger_checks?: ChecksSetSuitesPreferencesParamsAutoTriggerChecks[]; - }; - export type ChecksCreateSuiteParams = { - owner: string; - - repo: string; - /** - * The sha of the head commit. - */ - head_sha: string; - }; - export type ChecksRerequestSuiteParams = { - owner: string; - - repo: string; - - check_suite_id: number; - }; - export type CodesOfConductGetConductCodeParams = { - key: string; - }; - export type CodesOfConductGetForRepoParams = { - owner: string; - - repo: string; - }; - export type GistsListPublicForUserParams = { - username: string; - /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type GistsListParams = { - /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type GistsListPublicParams = { - /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type GistsListStarredParams = { - /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type GistsGetParams = { - gist_id: string; - }; - export type GistsGetRevisionParams = { - gist_id: string; - - sha: string; - }; - export type GistsCreateParams = { - /** - * The filenames and content of each file in the gist. The keys in the `files` object represent the filename and have the type `string`. - */ - files: GistsCreateParamsFiles; - /** - * A descriptive name for this gist. - */ - description?: string; - /** - * When `true`, the gist will be public and available for anyone to see. - */ - public?: boolean; - }; - export type GistsUpdateParams = { - gist_id: string; - /** - * A descriptive name for this gist. - */ - description?: string; - /** - * The filenames and content that make up this gist. - */ - files?: GistsUpdateParamsFiles; - }; - export type GistsListCommitsParams = { - gist_id: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type GistsStarParams = { - gist_id: string; - }; - export type GistsUnstarParams = { - gist_id: string; - }; - export type GistsCheckIsStarredParams = { - gist_id: string; - }; - export type GistsForkParams = { - gist_id: string; - }; - export type GistsListForksParams = { - gist_id: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type GistsDeleteParams = { - gist_id: string; - }; - export type GistsListCommentsParams = { - gist_id: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type GistsGetCommentParams = { - gist_id: string; - - comment_id: number; - }; - export type GistsCreateCommentParams = { - gist_id: string; - /** - * The comment text. - */ - body: string; - }; - export type GistsUpdateCommentParams = { - gist_id: string; - - comment_id: number; - /** - * The comment text. - */ - body: string; - }; - export type GistsDeleteCommentParams = { - gist_id: string; - - comment_id: number; - }; - export type GitGetBlobParams = { - owner: string; - - repo: string; - - file_sha: string; - }; - export type GitCreateBlobParams = { - owner: string; - - repo: string; - /** - * The new blob's content. - */ - content: string; - /** - * The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. - */ - encoding?: string; - }; - export type GitGetCommitParams = { - owner: string; - - repo: string; - - commit_sha: string; - }; - export type GitCreateCommitParams = { - owner: string; - - repo: string; - /** - * The commit message - */ - message: string; - /** - * The SHA of the tree object this commit points to - */ - tree: string; - /** - * The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. - */ - parents: string[]; - /** - * Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. - */ - author?: GitCreateCommitParamsAuthor; - /** - * Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. - */ - committer?: GitCreateCommitParamsCommitter; - /** - * The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. - */ - signature?: string; - }; - export type GitGetRefParams = { - owner: string; - - repo: string; - /** - * Must be formatted as `heads/branch`, not just `branch` - */ - ref: string; - }; - export type GitListRefsParams = { - owner: string; - - repo: string; - /** - * Filter by sub-namespace (reference prefix). Most commen examples would be `'heads/'` and `'tags/'` to retrieve branches or tags - */ - namespace?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type GitCreateRefParams = { - owner: string; - - repo: string; - /** - * The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. - */ - ref: string; - /** - * The SHA1 value for this reference. - */ - sha: string; - }; - export type GitUpdateRefParams = { - owner: string; - - repo: string; - - ref: string; - /** - * The SHA1 value to set this reference to - */ - sha: string; - /** - * Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. - */ - force?: boolean; - }; - export type GitDeleteRefParams = { - owner: string; - - repo: string; - - ref: string; - }; - export type GitGetTagParams = { - owner: string; - - repo: string; - - tag_sha: string; - }; - export type GitCreateTagParams = { - owner: string; - - repo: string; - /** - * The tag's name. This is typically a version (e.g., "v0.0.1"). - */ - tag: string; - /** - * The tag message. - */ - message: string; - /** - * The SHA of the git object this is tagging. - */ - object: string; - /** - * The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. - */ - type: "commit" | "tree" | "blob"; - /** - * An object with information about the individual creating the tag. - */ - tagger?: GitCreateTagParamsTagger; - }; - export type GitGetTreeParams = { - owner: string; - - repo: string; - - tree_sha: string; - - recursive?: 1; - }; - export type GitCreateTreeParams = { - owner: string; - - repo: string; - /** - * Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. - */ - tree: GitCreateTreeParamsTree[]; - /** - * The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. - */ - base_tree?: string; - }; - export type GitignoreGetTemplateParams = { - name: string; - }; - export type InteractionsGetRestrictionsForOrgParams = { - org: string; - }; - export type InteractionsAddOrUpdateRestrictionsForOrgParams = { - org: string; - /** - * Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. - */ - limit: "existing_users" | "contributors_only" | "collaborators_only"; - }; - export type InteractionsRemoveRestrictionsForOrgParams = { - org: string; - }; - export type InteractionsGetRestrictionsForRepoParams = { - owner: string; - - repo: string; - }; - export type InteractionsAddOrUpdateRestrictionsForRepoParams = { - owner: string; - - repo: string; - /** - * Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. - */ - limit: "existing_users" | "contributors_only" | "collaborators_only"; - }; - export type InteractionsRemoveRestrictionsForRepoParams = { - owner: string; - - repo: string; - }; - export type IssuesListParams = { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; - /** - * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. - */ - state?: "open" | "closed" | "all"; - /** - * A list of comma separated label names. Example: `bug,ui,@high` - */ - labels?: string; - /** - * What to sort results by. Can be either `created`, `updated`, `comments`. - */ - sort?: "created" | "updated" | "comments"; - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesListForAuthenticatedUserParams = { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; - /** - * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. - */ - state?: "open" | "closed" | "all"; - /** - * A list of comma separated label names. Example: `bug,ui,@high` - */ - labels?: string; - /** - * What to sort results by. Can be either `created`, `updated`, `comments`. - */ - sort?: "created" | "updated" | "comments"; - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesListForOrgParams = { - org: string; - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; - /** - * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. - */ - state?: "open" | "closed" | "all"; - /** - * A list of comma separated label names. Example: `bug,ui,@high` - */ - labels?: string; - /** - * What to sort results by. Can be either `created`, `updated`, `comments`. - */ - sort?: "created" | "updated" | "comments"; - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesListForRepoParams = { - owner: string; - - repo: string; - /** - * If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. - */ - milestone?: string; - /** - * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. - */ - state?: "open" | "closed" | "all"; - /** - * Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. - */ - assignee?: string; - /** - * The user that created the issue. - */ - creator?: string; - /** - * A user that's mentioned in the issue. - */ - mentioned?: string; - /** - * A list of comma separated label names. Example: `bug,ui,@high` - */ - labels?: string; - /** - * What to sort results by. Can be either `created`, `updated`, `comments`. - */ - sort?: "created" | "updated" | "comments"; - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesGetParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesGetParams = { - owner: string; - - repo: string; - - issue_number: number; - }; - export type IssuesCreateParams = { - owner: string; - - repo: string; - /** - * The title of the issue. - */ - title: string; - /** - * The contents of the issue. - */ - body?: string; - /** - * Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ - */ - assignee?: string; - /** - * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ - */ - milestone?: number; - /** - * Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ - */ - labels?: string[]; - /** - * Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ - */ - assignees?: string[]; - }; - export type IssuesUpdateParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * The title of the issue. - */ - title?: string; - /** - * The contents of the issue. - */ - body?: string; - /** - * Login for the user that this issue should be assigned to. **This field is deprecated.** - */ - assignee?: string; - /** - * State of the issue. Either `open` or `closed`. - */ - state?: "open" | "closed"; - /** - * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ - */ - milestone?: number | null; - /** - * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ - */ - labels?: string[]; - /** - * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ - */ - assignees?: string[]; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesUpdateParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * The title of the issue. - */ - title?: string; - /** - * The contents of the issue. - */ - body?: string; - /** - * Login for the user that this issue should be assigned to. **This field is deprecated.** - */ - assignee?: string; - /** - * State of the issue. Either `open` or `closed`. - */ - state?: "open" | "closed"; - /** - * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ - */ - milestone?: number | null; - /** - * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ - */ - labels?: string[]; - /** - * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ - */ - assignees?: string[]; - }; - export type IssuesLockParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: - * \* `off-topic` - * \* `too heated` - * \* `resolved` - * \* `spam` - */ - lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesLockParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: - * \* `off-topic` - * \* `too heated` - * \* `resolved` - * \* `spam` - */ - lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; - }; - export type IssuesUnlockParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesUnlockParams = { - owner: string; - - repo: string; - - issue_number: number; - }; - export type IssuesListAssigneesParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesCheckAssigneeParams = { - owner: string; - - repo: string; - - assignee: string; - }; - export type IssuesAddAssigneesParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ - */ - assignees?: string[]; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesAddAssigneesParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ - */ - assignees?: string[]; - }; - export type IssuesRemoveAssigneesParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ - */ - assignees?: string[]; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesRemoveAssigneesParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ - */ - assignees?: string[]; - }; - export type IssuesListCommentsParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesListCommentsParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesListCommentsForRepoParams = { - owner: string; - - repo: string; - /** - * Either `created` or `updated`. - */ - sort?: "created" | "updated"; - /** - * Either `asc` or `desc`. Ignored without the `sort` parameter. - */ - direction?: "asc" | "desc"; - /** - * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - since?: string; - }; - export type IssuesGetCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesCreateCommentParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * The contents of the comment. - */ - body: string; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesCreateCommentParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * The contents of the comment. - */ - body: string; - }; - export type IssuesUpdateCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - /** - * The contents of the comment. - */ - body: string; - }; - export type IssuesDeleteCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - }; - export type IssuesListEventsParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesListEventsParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesListEventsForRepoParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesGetEventParams = { - owner: string; - - repo: string; - - event_id: number; - }; - export type IssuesListLabelsForRepoParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesGetLabelParams = { - owner: string; - - repo: string; - - name: string; - }; - export type IssuesCreateLabelParams = { - owner: string; - - repo: string; - /** - * The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). - */ - name: string; - /** - * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. - */ - color: string; - /** - * A short description of the label. - */ - description?: string; - }; - export type IssuesUpdateLabelParams = { - owner: string; - - repo: string; - - current_name: string; - /** - * The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). - */ - name?: string; - /** - * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. - */ - color?: string; - /** - * A short description of the label. - */ - description?: string; - }; - export type IssuesDeleteLabelParams = { - owner: string; - - repo: string; - - name: string; - }; - export type IssuesListLabelsOnIssueParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesListLabelsOnIssueParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesAddLabelsParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. - */ - labels: string[]; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesAddLabelsParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. - */ - labels: string[]; - }; - export type IssuesRemoveLabelParamsDeprecatedNumber = { - owner: string; - - repo: string; - - name: string; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesRemoveLabelParams = { - owner: string; - - repo: string; - - issue_number: number; - - name: string; - }; - export type IssuesReplaceLabelsParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. - */ - labels?: string[]; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesReplaceLabelsParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. - */ - labels?: string[]; - }; - export type IssuesRemoveLabelsParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesRemoveLabelsParams = { - owner: string; - - repo: string; - - issue_number: number; - }; - export type IssuesListLabelsForMilestoneParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "milestone_number" - */ - number: number; - }; - export type IssuesListLabelsForMilestoneParams = { - owner: string; - - repo: string; - - milestone_number: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesListMilestonesForRepoParams = { - owner: string; - - repo: string; - /** - * The state of the milestone. Either `open`, `closed`, or `all`. - */ - state?: "open" | "closed" | "all"; - /** - * What to sort results by. Either `due_on` or `completeness`. - */ - sort?: "due_on" | "completeness"; - /** - * The direction of the sort. Either `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type IssuesGetMilestoneParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * @deprecated "number" parameter renamed to "milestone_number" - */ - number: number; - }; - export type IssuesGetMilestoneParams = { - owner: string; - - repo: string; - - milestone_number: number; - }; - export type IssuesCreateMilestoneParams = { - owner: string; - - repo: string; - /** - * The title of the milestone. - */ - title: string; - /** - * The state of the milestone. Either `open` or `closed`. - */ - state?: "open" | "closed"; - /** - * A description of the milestone. - */ - description?: string; - /** - * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string; - }; - export type IssuesUpdateMilestoneParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * The title of the milestone. - */ - title?: string; - /** - * The state of the milestone. Either `open` or `closed`. - */ - state?: "open" | "closed"; - /** - * A description of the milestone. - */ - description?: string; - /** - * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string; - /** - * @deprecated "number" parameter renamed to "milestone_number" - */ - number: number; - }; - export type IssuesUpdateMilestoneParams = { - owner: string; - - repo: string; - - milestone_number: number; - /** - * The title of the milestone. - */ - title?: string; - /** - * The state of the milestone. Either `open` or `closed`. - */ - state?: "open" | "closed"; - /** - * A description of the milestone. - */ - description?: string; - /** - * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string; - }; - export type IssuesDeleteMilestoneParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * @deprecated "number" parameter renamed to "milestone_number" - */ - number: number; - }; - export type IssuesDeleteMilestoneParams = { - owner: string; - - repo: string; - - milestone_number: number; - }; - export type IssuesListEventsForTimelineParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type IssuesListEventsForTimelineParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type LicensesGetParams = { - license: string; - }; - export type LicensesGetForRepoParams = { - owner: string; - - repo: string; - }; - export type MarkdownRenderParams = { - /** - * The Markdown text to render in HTML. Markdown content must be 400 KB or less. - */ - text: string; - /** - * The rendering mode. Can be either: - * \* `markdown` to render a document in plain Markdown, just like README.md files are rendered. - * \* `gfm` to render a document in [GitHub Flavored Markdown](https://github.github.com/gfm/), which creates links for user mentions as well as references to SHA-1 hashes, issues, and pull requests. - */ - mode?: "markdown" | "gfm"; - /** - * The repository context to use when creating references in `gfm` mode. Omit this parameter when using `markdown` mode. - */ - context?: string; - }; - export type MarkdownRenderRawParams = { - data: string; - }; - export type MigrationsStartForOrgParams = { - org: string; - /** - * A list of arrays indicating which repositories should be migrated. - */ - repositories: string[]; - /** - * Indicates whether repositories should be locked (to prevent manipulation) while migrating data. - */ - lock_repositories?: boolean; - /** - * Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). - */ - exclude_attachments?: boolean; - }; - export type MigrationsListForOrgParams = { - org: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type MigrationsGetStatusForOrgParams = { - org: string; - - migration_id: number; - }; - export type MigrationsGetArchiveForOrgParams = { - org: string; - - migration_id: number; - }; - export type MigrationsDeleteArchiveForOrgParams = { - org: string; - - migration_id: number; - }; - export type MigrationsUnlockRepoForOrgParams = { - org: string; - - migration_id: number; - - repo_name: string; - }; - export type MigrationsStartImportParams = { - owner: string; - - repo: string; - /** - * The URL of the originating repository. - */ - vcs_url: string; - /** - * The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. - */ - vcs?: "subversion" | "git" | "mercurial" | "tfvc"; - /** - * If authentication is required, the username to provide to `vcs_url`. - */ - vcs_username?: string; - /** - * If authentication is required, the password to provide to `vcs_url`. - */ - vcs_password?: string; - /** - * For a tfvc import, the name of the project that is being imported. - */ - tfvc_project?: string; - }; - export type MigrationsGetImportProgressParams = { - owner: string; - - repo: string; - }; - export type MigrationsUpdateImportParams = { - owner: string; - - repo: string; - /** - * The username to provide to the originating repository. - */ - vcs_username?: string; - /** - * The password to provide to the originating repository. - */ - vcs_password?: string; - }; - export type MigrationsGetCommitAuthorsParams = { - owner: string; - - repo: string; - /** - * Only authors found after this id are returned. Provide the highest author ID you've seen so far. New authors may be added to the list at any point while the importer is performing the `raw` step. - */ - since?: string; - }; - export type MigrationsMapCommitAuthorParams = { - owner: string; - - repo: string; - - author_id: number; - /** - * The new Git author email. - */ - email?: string; - /** - * The new Git author name. - */ - name?: string; - }; - export type MigrationsSetLfsPreferenceParams = { - owner: string; - - repo: string; - /** - * Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). - */ - use_lfs: "opt_in" | "opt_out"; - }; - export type MigrationsGetLargeFilesParams = { - owner: string; - - repo: string; - }; - export type MigrationsCancelImportParams = { - owner: string; - - repo: string; - }; - export type MigrationsStartForAuthenticatedUserParams = { - /** - * An array of repositories to include in the migration. - */ - repositories: string[]; - /** - * Locks the `repositories` to prevent changes during the migration when set to `true`. - */ - lock_repositories?: boolean; - /** - * Does not include attachments uploaded to GitHub.com in the migration data when set to `true`. Excluding attachments will reduce the migration archive file size. - */ - exclude_attachments?: boolean; - }; - export type MigrationsListForAuthenticatedUserParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type MigrationsGetStatusForAuthenticatedUserParams = { - migration_id: number; - }; - export type MigrationsGetArchiveForAuthenticatedUserParams = { - migration_id: number; - }; - export type MigrationsDeleteArchiveForAuthenticatedUserParams = { - migration_id: number; - }; - export type MigrationsUnlockRepoForAuthenticatedUserParams = { - migration_id: number; - - repo_name: string; - }; - export type OauthAuthorizationsListGrantsParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OauthAuthorizationsGetGrantParams = { - grant_id: number; - }; - export type OauthAuthorizationsDeleteGrantParams = { - grant_id: number; - }; - export type OauthAuthorizationsListAuthorizationsParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OauthAuthorizationsGetAuthorizationParams = { - authorization_id: number; - }; - export type OauthAuthorizationsCreateAuthorizationParams = { - /** - * A list of scopes that this authorization is in. - */ - scopes?: string[]; - /** - * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. - */ - note: string; - /** - * A URL to remind you what app the OAuth token is for. - */ - note_url?: string; - /** - * The 20 character OAuth app client key for which to create the token. - */ - client_id?: string; - /** - * The 40 character OAuth app client secret for which to create the token. - */ - client_secret?: string; - /** - * A unique string to distinguish an authorization from others created for the same client ID and user. - */ - fingerprint?: string; - }; - export type OauthAuthorizationsGetOrCreateAuthorizationForAppParams = { - client_id: string; - /** - * The 40 character OAuth app client secret associated with the client ID specified in the URL. - */ - client_secret: string; - /** - * A list of scopes that this authorization is in. - */ - scopes?: string[]; - /** - * A note to remind you what the OAuth token is for. - */ - note?: string; - /** - * A URL to remind you what app the OAuth token is for. - */ - note_url?: string; - /** - * A unique string to distinguish an authorization from others created for the same client and user. If provided, this API is functionally equivalent to [Get-or-create an authorization for a specific app and fingerprint](https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint). - */ - fingerprint?: string; - }; - export type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams = { - client_id: string; - - fingerprint: string; - /** - * The 40 character OAuth app client secret associated with the client ID specified in the URL. - */ - client_secret: string; - /** - * A list of scopes that this authorization is in. - */ - scopes?: string[]; - /** - * A note to remind you what the OAuth token is for. - */ - note?: string; - /** - * A URL to remind you what app the OAuth token is for. - */ - note_url?: string; - }; - export type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams = { - client_id: string; - - fingerprint: string; - /** - * The 40 character OAuth app client secret associated with the client ID specified in the URL. - */ - client_secret: string; - /** - * A list of scopes that this authorization is in. - */ - scopes?: string[]; - /** - * A note to remind you what the OAuth token is for. - */ - note?: string; - /** - * A URL to remind you what app the OAuth token is for. - */ - note_url?: string; - }; - export type OauthAuthorizationsUpdateAuthorizationParams = { - authorization_id: number; - /** - * Replaces the authorization scopes with these. - */ - scopes?: string[]; - /** - * A list of scopes to add to this authorization. - */ - add_scopes?: string[]; - /** - * A list of scopes to remove from this authorization. - */ - remove_scopes?: string[]; - /** - * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. - */ - note?: string; - /** - * A URL to remind you what app the OAuth token is for. - */ - note_url?: string; - /** - * A unique string to distinguish an authorization from others created for the same client ID and user. - */ - fingerprint?: string; - }; - export type OauthAuthorizationsDeleteAuthorizationParams = { - authorization_id: number; - }; - export type OauthAuthorizationsCheckAuthorizationParams = { - client_id: string; - - access_token: string; - }; - export type OauthAuthorizationsResetAuthorizationParams = { - client_id: string; - - access_token: string; - }; - export type OauthAuthorizationsRevokeAuthorizationForApplicationParams = { - client_id: string; - - access_token: string; - }; - export type OauthAuthorizationsRevokeGrantForApplicationParams = { - client_id: string; - - access_token: string; - }; - export type OrgsListForAuthenticatedUserParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OrgsListParams = { - /** - * The integer ID of the last Organization that you've seen. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OrgsListForUserParams = { - username: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OrgsGetParams = { - org: string; - }; - export type OrgsUpdateParams = { - org: string; - /** - * Billing email address. This address is not publicized. - */ - billing_email?: string; - /** - * The company name. - */ - company?: string; - /** - * The publicly visible email address. - */ - email?: string; - /** - * The location. - */ - location?: string; - /** - * The shorthand name of the company. - */ - name?: string; - /** - * The description of the company. - */ - description?: string; - /** - * Toggles whether organization projects are enabled for the organization. - */ - has_organization_projects?: boolean; - /** - * Toggles whether repository projects are enabled for repositories that belong to the organization. - */ - has_repository_projects?: boolean; - /** - * Default permission level members have for organization repositories: - * \* `read` - can pull, but not push to or administer this repository. - * \* `write` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push, and administer this repository. - * \* `none` - no permissions granted by default. - */ - default_repository_permission?: "read" | "write" | "admin" | "none"; - /** - * Toggles the ability of non-admin organization members to create repositories. Can be one of: - * \* `true` - all organization members can create repositories. - * \* `false` - only admin members can create repositories. - * Default: `true` - * **Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. **Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. - */ - members_can_create_repositories?: boolean; - /** - * Specifies which types of repositories non-admin organization members can create. Can be one of: - * \* `all` - all organization members can create public and private repositories. - * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on [GitHub Business Cloud](https://github.com/pricing/business-cloud). - * \* `none` - only admin members can create repositories. - * **Note:** Using this parameter will override values set in `members_can_create_repositories`. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. - */ - members_allowed_repository_creation_type?: "all" | "private" | "none"; - }; - export type OrgsListBlockedUsersParams = { - org: string; - }; - export type OrgsCheckBlockedUserParams = { - org: string; - - username: string; - }; - export type OrgsBlockUserParams = { - org: string; - - username: string; - }; - export type OrgsUnblockUserParams = { - org: string; - - username: string; - }; - export type OrgsListHooksParams = { - org: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OrgsGetHookParams = { - org: string; - - hook_id: number; - }; - export type OrgsCreateHookParams = { - org: string; - /** - * Must be passed as "web". - */ - name: string; - /** - * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#create-hook-config-params). - */ - config: OrgsCreateHookParamsConfig; - /** - * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. - */ - events?: string[]; - /** - * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - */ - active?: boolean; - }; - export type OrgsUpdateHookParams = { - org: string; - - hook_id: number; - /** - * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#update-hook-config-params). - */ - config?: OrgsUpdateHookParamsConfig; - /** - * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. - */ - events?: string[]; - /** - * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - */ - active?: boolean; - }; - export type OrgsPingHookParams = { - org: string; - - hook_id: number; - }; - export type OrgsDeleteHookParams = { - org: string; - - hook_id: number; - }; - export type OrgsListMembersParams = { - org: string; - /** - * Filter members returned in the list. Can be one of: - * \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. - * \* `all` - All members the authenticated user can see. - */ - filter?: "2fa_disabled" | "all"; - /** - * Filter members returned by their role. Can be one of: - * \* `all` - All members of the organization, regardless of role. - * \* `admin` - Organization owners. - * \* `member` - Non-owner organization members. - */ - role?: "all" | "admin" | "member"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OrgsCheckMembershipParams = { - org: string; - - username: string; - }; - export type OrgsRemoveMemberParams = { - org: string; - - username: string; - }; - export type OrgsListPublicMembersParams = { - org: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OrgsCheckPublicMembershipParams = { - org: string; - - username: string; - }; - export type OrgsPublicizeMembershipParams = { - org: string; - - username: string; - }; - export type OrgsConcealMembershipParams = { - org: string; - - username: string; - }; - export type OrgsGetMembershipParams = { - org: string; - - username: string; - }; - export type OrgsAddOrUpdateMembershipParams = { - org: string; - - username: string; - /** - * The role to give the user in the organization. Can be one of: - * \* `admin` - The user will become an owner of the organization. - * \* `member` - The user will become a non-owner member of the organization. - */ - role?: "admin" | "member"; - }; - export type OrgsRemoveMembershipParams = { - org: string; - - username: string; - }; - export type OrgsListInvitationTeamsParams = { - org: string; - - invitation_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OrgsListPendingInvitationsParams = { - org: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OrgsCreateInvitationParams = { - org: string; - /** - * **Required unless you provide `email`**. GitHub user ID for the person you are inviting. - */ - invitee_id?: number; - /** - * **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. - */ - email?: string; - /** - * Specify role for new member. Can be one of: - * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. - * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. - * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. - */ - role?: "admin" | "direct_member" | "billing_manager"; - /** - * Specify IDs for the teams you want to invite new members to. - */ - team_ids?: number[]; - }; - export type OrgsListMembershipsParams = { - /** - * Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships. - */ - state?: "active" | "pending"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OrgsGetMembershipForAuthenticatedUserParams = { - org: string; - }; - export type OrgsUpdateMembershipParams = { - org: string; - /** - * The state that the membership should be in. Only `"active"` will be accepted. - */ - state: "active"; - }; - export type OrgsListOutsideCollaboratorsParams = { - org: string; - /** - * Filter the list of outside collaborators. Can be one of: - * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. - * \* `all`: All outside collaborators. - */ - filter?: "2fa_disabled" | "all"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type OrgsRemoveOutsideCollaboratorParams = { - org: string; - - username: string; - }; - export type OrgsConvertMemberToOutsideCollaboratorParams = { - org: string; - - username: string; - }; - export type ProjectsListForRepoParams = { - owner: string; - - repo: string; - /** - * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. - */ - state?: "open" | "closed" | "all"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ProjectsListForOrgParams = { - org: string; - /** - * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. - */ - state?: "open" | "closed" | "all"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ProjectsListForUserParams = { - username: string; - /** - * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. - */ - state?: "open" | "closed" | "all"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ProjectsGetParams = { - project_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ProjectsCreateForRepoParams = { - owner: string; - - repo: string; - /** - * The name of the project. - */ - name: string; - /** - * The description of the project. - */ - body?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ProjectsCreateForOrgParams = { - org: string; - /** - * The name of the project. - */ - name: string; - /** - * The description of the project. - */ - body?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ProjectsCreateForAuthenticatedUserParams = { - /** - * The name of the project. - */ - name: string; - /** - * The description of the project. - */ - body?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ProjectsUpdateParams = { - project_id: number; - /** - * The name of the project. - */ - name?: string; - /** - * The description of the project. - */ - body?: string; - /** - * State of the project. Either `open` or `closed`. - */ - state?: "open" | "closed"; - /** - * The permission level that determines whether all members of the project's organization can see and/or make changes to the project. Setting `organization_permission` is only available for organization projects. If an organization member belongs to a team with a higher level of access or is a collaborator with a higher level of access, their permission level is not lowered by `organization_permission`. For information on changing access for a team or collaborator, see [Add or update team project](https://developer.github.com/v3/teams/#add-or-update-team-project) or [Add user as a collaborator](https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator). - * - * **Note:** Updating a project's `organization_permission` requires `admin` access to the project. - * - * Can be one of: - * \* `read` - Organization members can read, but not write to or administer this project. - * \* `write` - Organization members can read and write, but not administer this project. - * \* `admin` - Organization members can read, write and administer this project. - * \* `none` - Organization members can only see this project if it is public. - */ - organization_permission?: string; - /** - * Sets the visibility of a project board. Setting `private` is only available for organization and user projects. **Note:** Updating a project's visibility requires `admin` access to the project. - * - * Can be one of: - * \* `false` - Anyone can see the project. - * \* `true` - Only the user can view a project board created on a user account. Organization members with the appropriate `organization_permission` can see project boards in an organization account. - */ - private?: boolean; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ProjectsDeleteParams = { - project_id: number; - }; - export type ProjectsListCardsParams = { - column_id: number; - /** - * Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. - */ - archived_state?: "all" | "archived" | "not_archived"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ProjectsGetCardParams = { - card_id: number; - }; - export type ProjectsCreateCardParams = { - column_id: number; - /** - * The card's note content. Only valid for cards without another type of content, so you must omit when specifying `content_id` and `content_type`. - */ - note?: string; - /** - * The issue or pull request id you want to associate with this card. You can use the [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) and [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoints to find this id. - * **Note:** Depending on whether you use the issue id or pull request id, you will need to specify `Issue` or `PullRequest` as the `content_type`. - */ - content_id?: number; - /** - * **Required if you provide `content_id`**. The type of content you want to associate with this card. Use `Issue` when `content_id` is an issue id and use `PullRequest` when `content_id` is a pull request id. - */ - content_type?: string; - }; - export type ProjectsUpdateCardParams = { - card_id: number; - /** - * The card's note content. Only valid for cards without another type of content, so this cannot be specified if the card already has a `content_id` and `content_type`. - */ - note?: string; - /** - * Use `true` to archive a project card. Specify `false` if you need to restore a previously archived project card. - */ - archived?: boolean; - }; - export type ProjectsDeleteCardParams = { - card_id: number; - }; - export type ProjectsMoveCardParams = { - card_id: number; - /** - * Can be one of `top`, `bottom`, or `after:`, where `` is the `id` value of a card in the same column, or in the new column specified by `column_id`. - */ - position: string; - /** - * The `id` value of a column in the same project. - */ - column_id?: number; - }; - export type ProjectsListCollaboratorsParams = { - project_id: number; - /** - * Filters the collaborators by their affiliation. Can be one of: - * \* `outside`: Outside collaborators of a project that are not a member of the project's organization. - * \* `direct`: Collaborators with permissions to a project, regardless of organization membership status. - * \* `all`: All collaborators the authenticated user can see. - */ - affiliation?: "outside" | "direct" | "all"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ProjectsReviewUserPermissionLevelParams = { - project_id: number; - - username: string; - }; - export type ProjectsAddCollaboratorParams = { - project_id: number; - - username: string; - /** - * The permission to grant the collaborator. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." Can be one of: - * \* `read` - can read, but not write to or administer this project. - * \* `write` - can read and write, but not administer this project. - * \* `admin` - can read, write and administer this project. - */ - permission?: "read" | "write" | "admin"; - }; - export type ProjectsRemoveCollaboratorParams = { - project_id: number; - - username: string; - }; - export type ProjectsListColumnsParams = { - project_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ProjectsGetColumnParams = { - column_id: number; - }; - export type ProjectsCreateColumnParams = { - project_id: number; - /** - * The name of the column. - */ - name: string; - }; - export type ProjectsUpdateColumnParams = { - column_id: number; - /** - * The new name of the column. - */ - name: string; - }; - export type ProjectsDeleteColumnParams = { - column_id: number; - }; - export type ProjectsMoveColumnParams = { - column_id: number; - /** - * Can be one of `first`, `last`, or `after:`, where `` is the `id` value of a column in the same project. - */ - position: string; - }; - export type PullsListParams = { - owner: string; - - repo: string; - /** - * Either `open`, `closed`, or `all` to filter by state. - */ - state?: "open" | "closed" | "all"; - /** - * Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. - */ - head?: string; - /** - * Filter pulls by base branch name. Example: `gh-pages`. - */ - base?: string; - /** - * What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). - */ - sort?: "created" | "updated" | "popularity" | "long-running"; - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type PullsGetParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsGetParams = { - owner: string; - - repo: string; - - pull_number: number; - }; - export type PullsCreateParams = { - owner: string; - - repo: string; - /** - * The title of the pull request. - */ - title: string; - /** - * The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. - */ - head: string; - /** - * The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. - */ - base: string; - /** - * The contents of the pull request. - */ - body?: string; - /** - * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. - */ - maintainer_can_modify?: boolean; - /** - * Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. - */ - draft?: boolean; - }; - export type PullsCreateFromIssueParams = { - owner: string; - - repo: string; - /** - * The issue number in this repository to turn into a Pull Request. - */ - issue: number; - /** - * The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. - */ - head: string; - /** - * The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. - */ - base: string; - /** - * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. - */ - maintainer_can_modify?: boolean; - /** - * Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. - */ - draft?: boolean; - }; - export type PullsUpdateBranchParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits on a repository](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository)" endpoint to find the most recent commit SHA. - */ - expected_head_sha?: string; - }; - export type PullsUpdateParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * The title of the pull request. - */ - title?: string; - /** - * The contents of the pull request. - */ - body?: string; - /** - * State of this Pull Request. Either `open` or `closed`. - */ - state?: "open" | "closed"; - /** - * The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. - */ - base?: string; - /** - * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. - */ - maintainer_can_modify?: boolean; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsUpdateParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * The title of the pull request. - */ - title?: string; - /** - * The contents of the pull request. - */ - body?: string; - /** - * State of this Pull Request. Either `open` or `closed`. - */ - state?: "open" | "closed"; - /** - * The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. - */ - base?: string; - /** - * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. - */ - maintainer_can_modify?: boolean; - }; - export type PullsListCommitsParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsListCommitsParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type PullsListFilesParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsListFilesParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type PullsCheckIfMergedParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsCheckIfMergedParams = { - owner: string; - - repo: string; - - pull_number: number; - }; - export type PullsMergeParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Title for the automatic commit message. - */ - commit_title?: string; - /** - * Extra detail to append to automatic commit message. - */ - commit_message?: string; - /** - * SHA that pull request head must match to allow merge. - */ - sha?: string; - /** - * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. - */ - merge_method?: "merge" | "squash" | "rebase"; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsMergeParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * Title for the automatic commit message. - */ - commit_title?: string; - /** - * Extra detail to append to automatic commit message. - */ - commit_message?: string; - /** - * SHA that pull request head must match to allow merge. - */ - sha?: string; - /** - * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. - */ - merge_method?: "merge" | "squash" | "rebase"; - }; - export type PullsListCommentsParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Can be either `created` or `updated` comments. - */ - sort?: "created" | "updated"; - /** - * Can be either `asc` or `desc`. Ignored without `sort` parameter. - */ - direction?: "asc" | "desc"; - /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsListCommentsParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * Can be either `created` or `updated` comments. - */ - sort?: "created" | "updated"; - /** - * Can be either `asc` or `desc`. Ignored without `sort` parameter. - */ - direction?: "asc" | "desc"; - /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type PullsListCommentsForRepoParams = { - owner: string; - - repo: string; - /** - * Can be either `created` or `updated` comments. - */ - sort?: "created" | "updated"; - /** - * Can be either `asc` or `desc`. Ignored without `sort` parameter. - */ - direction?: "asc" | "desc"; - /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type PullsGetCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - }; - export type PullsCreateCommentParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * The text of the comment. - */ - body: string; - /** - * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. - */ - commit_id: string; - /** - * The relative path to the file that necessitates a comment. - */ - path: string; - /** - * The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. - */ - position: number; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsCreateCommentParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * The text of the comment. - */ - body: string; - /** - * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. - */ - commit_id: string; - /** - * The relative path to the file that necessitates a comment. - */ - path: string; - /** - * The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. - */ - position: number; - }; - export type PullsCreateCommentReplyParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * The text of the comment. - */ - body: string; - /** - * The comment ID to reply to. **Note**: This must be the ID of a _top-level comment_, not a reply to that comment. Replies to replies are not supported. - */ - in_reply_to: number; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsCreateCommentReplyParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * The text of the comment. - */ - body: string; - /** - * The comment ID to reply to. **Note**: This must be the ID of a _top-level comment_, not a reply to that comment. Replies to replies are not supported. - */ - in_reply_to: number; - }; - export type PullsUpdateCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - /** - * The text of the comment. - */ - body: string; - }; - export type PullsDeleteCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - }; - export type PullsListReviewRequestsParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsListReviewRequestsParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type PullsCreateReviewRequestParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * An array of user `login`s that will be requested. - */ - reviewers?: string[]; - /** - * An array of team `slug`s that will be requested. - */ - team_reviewers?: string[]; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsCreateReviewRequestParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * An array of user `login`s that will be requested. - */ - reviewers?: string[]; - /** - * An array of team `slug`s that will be requested. - */ - team_reviewers?: string[]; - }; - export type PullsDeleteReviewRequestParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * An array of user `login`s that will be removed. - */ - reviewers?: string[]; - /** - * An array of team `slug`s that will be removed. - */ - team_reviewers?: string[]; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsDeleteReviewRequestParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * An array of user `login`s that will be removed. - */ - reviewers?: string[]; - /** - * An array of team `slug`s that will be removed. - */ - team_reviewers?: string[]; - }; - export type PullsListReviewsParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsListReviewsParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type PullsGetReviewParamsDeprecatedNumber = { - owner: string; - - repo: string; - - review_id: number; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsGetReviewParams = { - owner: string; - - repo: string; - - pull_number: number; - - review_id: number; - }; - export type PullsDeletePendingReviewParamsDeprecatedNumber = { - owner: string; - - repo: string; - - review_id: number; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsDeletePendingReviewParams = { - owner: string; - - repo: string; - - pull_number: number; - - review_id: number; - }; - export type PullsGetCommentsForReviewParamsDeprecatedNumber = { - owner: string; - - repo: string; - - review_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsGetCommentsForReviewParams = { - owner: string; - - repo: string; - - pull_number: number; - - review_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type PullsCreateReviewParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. - */ - commit_id?: string; - /** - * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. - */ - body?: string; - /** - * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. - */ - event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; - /** - * Use the following table to specify the location, destination, and contents of the draft review comment. - */ - comments?: PullsCreateReviewParamsComments[]; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsCreateReviewParams = { - owner: string; - - repo: string; - - pull_number: number; - /** - * The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. - */ - commit_id?: string; - /** - * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. - */ - body?: string; - /** - * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. - */ - event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; - /** - * Use the following table to specify the location, destination, and contents of the draft review comment. - */ - comments?: PullsCreateReviewParamsComments[]; - }; - export type PullsUpdateReviewParamsDeprecatedNumber = { - owner: string; - - repo: string; - - review_id: number; - /** - * The body text of the pull request review. - */ - body: string; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsUpdateReviewParams = { - owner: string; - - repo: string; - - pull_number: number; - - review_id: number; - /** - * The body text of the pull request review. - */ - body: string; - }; - export type PullsSubmitReviewParamsDeprecatedNumber = { - owner: string; - - repo: string; - - review_id: number; - /** - * The body text of the pull request review - */ - body?: string; - /** - * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. - */ - event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsSubmitReviewParams = { - owner: string; - - repo: string; - - pull_number: number; - - review_id: number; - /** - * The body text of the pull request review - */ - body?: string; - /** - * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. - */ - event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; - }; - export type PullsDismissReviewParamsDeprecatedNumber = { - owner: string; - - repo: string; - - review_id: number; - /** - * The message for the pull request review dismissal - */ - message: string; - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - }; - export type PullsDismissReviewParams = { - owner: string; - - repo: string; - - pull_number: number; - - review_id: number; - /** - * The message for the pull request review dismissal - */ - message: string; - }; - export type ReactionsListForCommitCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a commit comment. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReactionsCreateForCommitCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the commit comment. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - }; - export type ReactionsListForIssueParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type ReactionsListForIssueParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReactionsCreateForIssueParamsDeprecatedNumber = { - owner: string; - - repo: string; - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - }; - export type ReactionsCreateForIssueParams = { - owner: string; - - repo: string; - - issue_number: number; - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - }; - export type ReactionsListForIssueCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue comment. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReactionsCreateForIssueCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue comment. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - }; - export type ReactionsListForPullRequestReviewCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a pull request review comment. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReactionsCreateForPullRequestReviewCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the pull request review comment. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - }; - export type ReactionsListForTeamDiscussionParams = { - team_id: number; - - discussion_number: number; - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReactionsCreateForTeamDiscussionParams = { - team_id: number; - - discussion_number: number; - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - }; - export type ReactionsListForTeamDiscussionCommentParams = { - team_id: number; - - discussion_number: number; - - comment_number: number; - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReactionsCreateForTeamDiscussionCommentParams = { - team_id: number; - - discussion_number: number; - - comment_number: number; - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - }; - export type ReactionsDeleteParams = { - reaction_id: number; - }; - export type ReposListParams = { - /** - * Can be one of `all`, `public`, or `private`. - */ - visibility?: "all" | "public" | "private"; - /** - * Comma-separated list of values. Can include: - * \* `owner`: Repositories that are owned by the authenticated user. - * \* `collaborator`: Repositories that the user has been added to as a collaborator. - * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. - */ - affiliation?: string; - /** - * Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` - * - * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. - */ - type?: "all" | "owner" | "public" | "private" | "member"; - /** - * Can be one of `created`, `updated`, `pushed`, `full_name`. - */ - sort?: "created" | "updated" | "pushed" | "full_name"; - /** - * Can be one of `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposListForUserParams = { - username: string; - /** - * Can be one of `all`, `owner`, `member`. - */ - type?: "all" | "owner" | "member"; - /** - * Can be one of `created`, `updated`, `pushed`, `full_name`. - */ - sort?: "created" | "updated" | "pushed" | "full_name"; - /** - * Can be one of `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposListForOrgParams = { - org: string; - /** - * Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`. - */ - type?: "all" | "public" | "private" | "forks" | "sources" | "member"; - /** - * Can be one of `created`, `updated`, `pushed`, `full_name`. - */ - sort?: "created" | "updated" | "pushed" | "full_name"; - /** - * Can be one of `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposListPublicParams = { - /** - * The integer ID of the last Repository that you've seen. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposCreateForAuthenticatedUserParams = { - /** - * The name of the repository. - */ - name: string; - /** - * A short description of the repository. - */ - description?: string; - /** - * A URL with more information about the repository. - */ - homepage?: string; - /** - * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. - */ - private?: boolean; - /** - * Either `true` to enable issues for this repository or `false` to disable them. - */ - has_issues?: boolean; - /** - * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. - */ - has_projects?: boolean; - /** - * Either `true` to enable the wiki for this repository or `false` to disable it. - */ - has_wiki?: boolean; - /** - * Either `true` to make this repo available as a template repository or `false` to prevent it. - */ - is_template?: boolean; - /** - * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. - */ - team_id?: number; - /** - * Pass `true` to create an initial commit with empty README. - */ - auto_init?: boolean; - /** - * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". - */ - gitignore_template?: string; - /** - * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". - */ - license_template?: string; - /** - * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. - */ - allow_squash_merge?: boolean; - /** - * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. - */ - allow_merge_commit?: boolean; - /** - * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. - */ - allow_rebase_merge?: boolean; - }; - export type ReposCreateInOrgParams = { - org: string; - /** - * The name of the repository. - */ - name: string; - /** - * A short description of the repository. - */ - description?: string; - /** - * A URL with more information about the repository. - */ - homepage?: string; - /** - * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. - */ - private?: boolean; - /** - * Either `true` to enable issues for this repository or `false` to disable them. - */ - has_issues?: boolean; - /** - * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. - */ - has_projects?: boolean; - /** - * Either `true` to enable the wiki for this repository or `false` to disable it. - */ - has_wiki?: boolean; - /** - * Either `true` to make this repo available as a template repository or `false` to prevent it. - */ - is_template?: boolean; - /** - * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. - */ - team_id?: number; - /** - * Pass `true` to create an initial commit with empty README. - */ - auto_init?: boolean; - /** - * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". - */ - gitignore_template?: string; - /** - * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". - */ - license_template?: string; - /** - * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. - */ - allow_squash_merge?: boolean; - /** - * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. - */ - allow_merge_commit?: boolean; - /** - * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. - */ - allow_rebase_merge?: boolean; - }; - export type ReposCreateUsingTemplateParams = { - template_owner: string; - - template_repo: string; - /** - * The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. - */ - owner?: string; - /** - * The name of the new repository. - */ - name: string; - /** - * A short description of the new repository. - */ - description?: string; - /** - * Either `true` to create a new private repository or `false` to create a new public one. - */ - private?: boolean; - }; - export type ReposGetParams = { - owner: string; - - repo: string; - }; - export type ReposUpdateParams = { - owner: string; - - repo: string; - /** - * The name of the repository. - */ - name?: string; - /** - * A short description of the repository. - */ - description?: string; - /** - * A URL with more information about the repository. - */ - homepage?: string; - /** - * Either `true` to make the repository private or `false` to make it public. Creating private repositories requires a paid GitHub account. Default: `false`. - * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. - */ - private?: boolean; - /** - * Either `true` to enable issues for this repository or `false` to disable them. - */ - has_issues?: boolean; - /** - * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. - */ - has_projects?: boolean; - /** - * Either `true` to enable the wiki for this repository or `false` to disable it. - */ - has_wiki?: boolean; - /** - * Either `true` to make this repo available as a template repository or `false` to prevent it. - */ - is_template?: boolean; - /** - * Updates the default branch for this repository. - */ - default_branch?: string; - /** - * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. - */ - allow_squash_merge?: boolean; - /** - * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. - */ - allow_merge_commit?: boolean; - /** - * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. - */ - allow_rebase_merge?: boolean; - /** - * `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. - */ - archived?: boolean; - }; - export type ReposListTopicsParams = { - owner: string; - - repo: string; - }; - export type ReposReplaceTopicsParams = { - owner: string; - - repo: string; - /** - * An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. - */ - names: string[]; - }; - export type ReposCheckVulnerabilityAlertsParams = { - owner: string; - - repo: string; - }; - export type ReposEnableVulnerabilityAlertsParams = { - owner: string; - - repo: string; - }; - export type ReposDisableVulnerabilityAlertsParams = { - owner: string; - - repo: string; - }; - export type ReposEnableAutomatedSecurityFixesParams = { - owner: string; - - repo: string; - }; - export type ReposDisableAutomatedSecurityFixesParams = { - owner: string; - - repo: string; - }; - export type ReposListContributorsParams = { - owner: string; - - repo: string; - /** - * Set to `1` or `true` to include anonymous contributors in results. - */ - anon?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposListLanguagesParams = { - owner: string; - - repo: string; - }; - export type ReposListTeamsParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposListTagsParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposDeleteParams = { - owner: string; - - repo: string; - }; - export type ReposTransferParams = { - owner: string; - - repo: string; - /** - * **Required:** The username or organization name the repository will be transferred to. - */ - new_owner?: string; - /** - * ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. - */ - team_ids?: number[]; - }; - export type ReposListBranchesParams = { - owner: string; - - repo: string; - /** - * Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. - */ - protected?: boolean; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposGetBranchParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposGetBranchProtectionParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposUpdateBranchProtectionParams = { - owner: string; - - repo: string; - - branch: string; - /** - * Require status checks to pass before merging. Set to `null` to disable. - */ - required_status_checks: ReposUpdateBranchProtectionParamsRequiredStatusChecks | null; - /** - * Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. - */ - enforce_admins: boolean | null; - /** - * Require at least one approving review on a pull request, before merging. Set to `null` to disable. - */ - required_pull_request_reviews: ReposUpdateBranchProtectionParamsRequiredPullRequestReviews | null; - /** - * Restrict who can push to this branch. Team and user `restrictions` are only available for organization-owned repositories. Set to `null` to disable. - */ - restrictions: ReposUpdateBranchProtectionParamsRestrictions | null; - }; - export type ReposRemoveBranchProtectionParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposGetProtectedBranchRequiredStatusChecksParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposUpdateProtectedBranchRequiredStatusChecksParams = { - owner: string; - - repo: string; - - branch: string; - /** - * Require branches to be up to date before merging. - */ - strict?: boolean; - /** - * The list of status checks to require in order to merge into this branch - */ - contexts?: string[]; - }; - export type ReposRemoveProtectedBranchRequiredStatusChecksParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposListProtectedBranchRequiredStatusChecksContextsParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposReplaceProtectedBranchRequiredStatusChecksContextsParams = { - owner: string; - - repo: string; - - branch: string; - - contexts: string[]; - }; - export type ReposAddProtectedBranchRequiredStatusChecksContextsParams = { - owner: string; - - repo: string; - - branch: string; - - contexts: string[]; - }; - export type ReposRemoveProtectedBranchRequiredStatusChecksContextsParams = { - owner: string; - - repo: string; - - branch: string; - - contexts: string[]; - }; - export type ReposGetProtectedBranchPullRequestReviewEnforcementParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParams = { - owner: string; - - repo: string; - - branch: string; - /** - * Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. - */ - dismissal_restrictions?: ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions; - /** - * Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. - */ - dismiss_stale_reviews?: boolean; - /** - * Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. - */ - require_code_owner_reviews?: boolean; - /** - * Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. - */ - required_approving_review_count?: number; - }; - export type ReposRemoveProtectedBranchPullRequestReviewEnforcementParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposGetProtectedBranchRequiredSignaturesParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposAddProtectedBranchRequiredSignaturesParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposRemoveProtectedBranchRequiredSignaturesParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposGetProtectedBranchAdminEnforcementParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposAddProtectedBranchAdminEnforcementParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposRemoveProtectedBranchAdminEnforcementParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposGetProtectedBranchRestrictionsParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposRemoveProtectedBranchRestrictionsParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposListProtectedBranchTeamRestrictionsParams = { - owner: string; - - repo: string; - - branch: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposReplaceProtectedBranchTeamRestrictionsParams = { - owner: string; - - repo: string; - - branch: string; - - teams: string[]; - }; - export type ReposAddProtectedBranchTeamRestrictionsParams = { - owner: string; - - repo: string; - - branch: string; - - teams: string[]; - }; - export type ReposRemoveProtectedBranchTeamRestrictionsParams = { - owner: string; - - repo: string; - - branch: string; - - teams: string[]; - }; - export type ReposListProtectedBranchUserRestrictionsParams = { - owner: string; - - repo: string; - - branch: string; - }; - export type ReposReplaceProtectedBranchUserRestrictionsParams = { - owner: string; - - repo: string; - - branch: string; - - users: string[]; - }; - export type ReposAddProtectedBranchUserRestrictionsParams = { - owner: string; - - repo: string; - - branch: string; - - users: string[]; - }; - export type ReposRemoveProtectedBranchUserRestrictionsParams = { - owner: string; - - repo: string; - - branch: string; - - users: string[]; - }; - export type ReposListCollaboratorsParams = { - owner: string; - - repo: string; - /** - * Filter collaborators returned by their affiliation. Can be one of: - * \* `outside`: All outside collaborators of an organization-owned repository. - * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. - * \* `all`: All collaborators the authenticated user can see. - */ - affiliation?: "outside" | "direct" | "all"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposCheckCollaboratorParams = { - owner: string; - - repo: string; - - username: string; - }; - export type ReposGetCollaboratorPermissionLevelParams = { - owner: string; - - repo: string; - - username: string; - }; - export type ReposAddCollaboratorParams = { - owner: string; - - repo: string; - - username: string; - /** - * The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: - * \* `pull` - can pull, but not push to or administer this repository. - * \* `push` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push and administer this repository. - */ - permission?: "pull" | "push" | "admin"; - }; - export type ReposRemoveCollaboratorParams = { - owner: string; - - repo: string; - - username: string; - }; - export type ReposListCommitCommentsParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposListCommentsForCommitParamsDeprecatedRef = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * @deprecated "ref" parameter renamed to "commit_sha" - */ - ref: string; - }; - export type ReposListCommentsForCommitParams = { - owner: string; - - repo: string; - - commit_sha: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposCreateCommitCommentParamsDeprecatedSha = { - owner: string; - - repo: string; - /** - * The contents of the comment. - */ - body: string; - /** - * Relative path of the file to comment on. - */ - path?: string; - /** - * Line index in the diff to comment on. - */ - position?: number; - /** - * **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. - */ - line?: number; - /** - * @deprecated "sha" parameter renamed to "commit_sha" - */ - sha: string; - }; - export type ReposCreateCommitCommentParams = { - owner: string; - - repo: string; - - commit_sha: string; - /** - * The contents of the comment. - */ - body: string; - /** - * Relative path of the file to comment on. - */ - path?: string; - /** - * Line index in the diff to comment on. - */ - position?: number; - /** - * **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. - */ - line?: number; - }; - export type ReposGetCommitCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - }; - export type ReposUpdateCommitCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - /** - * The contents of the comment - */ - body: string; - }; - export type ReposDeleteCommitCommentParams = { - owner: string; - - repo: string; - - comment_id: number; - }; - export type ReposListCommitsParams = { - owner: string; - - repo: string; - /** - * SHA or branch to start listing commits from. - */ - sha?: string; - /** - * Only commits containing this file path will be returned. - */ - path?: string; - /** - * GitHub login or email address by which to filter by commit author. - */ - author?: string; - /** - * Only commits after this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - since?: string; - /** - * Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - until?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposGetCommitParamsDeprecatedCommitSha = { - owner: string; - - repo: string; - /** - * @deprecated "commit_sha" parameter renamed to "ref" - */ - commit_sha: string; - }; - export type ReposGetCommitParamsDeprecatedSha = { - owner: string; - - repo: string; - - ref: string; - /** - * @deprecated "sha" parameter renamed to "ref" - */ - sha?: ReposGetCommitParamsDeprecatedSha; - }; - export type ReposGetCommitParams = { - owner: string; - - repo: string; - - ref: string; - }; - export type ReposGetCommitRefShaParams = { - owner: string; - - repo: string; - - ref: string; - }; - export type ReposCompareCommitsParams = { - owner: string; - - repo: string; - - base: string; - - head: string; - }; - export type ReposListBranchesForHeadCommitParams = { - owner: string; - - repo: string; - - commit_sha: string; - }; - export type ReposListPullRequestsAssociatedWithCommitParams = { - owner: string; - - repo: string; - - commit_sha: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposRetrieveCommunityProfileMetricsParams = { - owner: string; - - repo: string; - }; - export type ReposGetReadmeParams = { - owner: string; - - repo: string; - /** - * The name of the commit/branch/tag. - */ - ref?: string; - }; - export type ReposGetContentsParams = { - owner: string; - - repo: string; - - path: string; - /** - * The name of the commit/branch/tag. - */ - ref?: string; - }; - export type ReposCreateOrUpdateFileParams = { - owner: string; - - repo: string; - - path: string; - /** - * The commit message. - */ - message: string; - /** - * The new file content, using Base64 encoding. - */ - content: string; - /** - * **Required if you are updating a file**. The blob SHA of the file being replaced. - */ - sha?: string; - /** - * The branch name. - */ - branch?: string; - /** - * The person that committed the file. - */ - committer?: ReposCreateOrUpdateFileParamsCommitter; - /** - * The author of the file. - */ - author?: ReposCreateOrUpdateFileParamsAuthor; - }; - export type ReposCreateFileParams = { - owner: string; - - repo: string; - - path: string; - /** - * The commit message. - */ - message: string; - /** - * The new file content, using Base64 encoding. - */ - content: string; - /** - * **Required if you are updating a file**. The blob SHA of the file being replaced. - */ - sha?: string; - /** - * The branch name. - */ - branch?: string; - /** - * The person that committed the file. - */ - committer?: ReposCreateFileParamsCommitter; - /** - * The author of the file. - */ - author?: ReposCreateFileParamsAuthor; - }; - export type ReposUpdateFileParams = { - owner: string; - - repo: string; - - path: string; - /** - * The commit message. - */ - message: string; - /** - * The new file content, using Base64 encoding. - */ - content: string; - /** - * **Required if you are updating a file**. The blob SHA of the file being replaced. - */ - sha?: string; - /** - * The branch name. - */ - branch?: string; - /** - * The person that committed the file. - */ - committer?: ReposUpdateFileParamsCommitter; - /** - * The author of the file. - */ - author?: ReposUpdateFileParamsAuthor; - }; - export type ReposDeleteFileParams = { - owner: string; - - repo: string; - - path: string; - /** - * The commit message. - */ - message: string; - /** - * The blob SHA of the file being replaced. - */ - sha: string; - /** - * The branch name. - */ - branch?: string; - /** - * object containing information about the committer. - */ - committer?: ReposDeleteFileParamsCommitter; - /** - * object containing information about the author. - */ - author?: ReposDeleteFileParamsAuthor; - }; - export type ReposGetArchiveLinkParams = { - owner: string; - - repo: string; - - archive_format: string; - - ref: string; - }; - export type ReposListDeploymentsParams = { - owner: string; - - repo: string; - /** - * The SHA recorded at creation time. - */ - sha?: string; - /** - * The name of the ref. This can be a branch, tag, or SHA. - */ - ref?: string; - /** - * The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). - */ - task?: string; - /** - * The name of the environment that was deployed to (e.g., `staging` or `production`). - */ - environment?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposGetDeploymentParams = { - owner: string; - - repo: string; - - deployment_id: number; - }; - export type ReposCreateDeploymentParams = { - owner: string; - - repo: string; - /** - * The ref to deploy. This can be a branch, tag, or SHA. - */ - ref: string; - /** - * Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). - */ - task?: string; - /** - * Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. - */ - auto_merge?: boolean; - /** - * The [status](https://developer.github.com/v3/repos/statuses/) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. - */ - required_contexts?: string[]; - /** - * JSON payload with extra information about the deployment. - */ - payload?: string; - /** - * Name for the target deployment environment (e.g., `production`, `staging`, `qa`). - */ - environment?: string; - /** - * Short description of the deployment. - */ - description?: string; - /** - * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` - * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. - */ - transient_environment?: boolean; - /** - * Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. - * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. - */ - production_environment?: boolean; - }; - export type ReposListDeploymentStatusesParams = { - owner: string; - - repo: string; - - deployment_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposGetDeploymentStatusParams = { - owner: string; - - repo: string; - - deployment_id: number; - - status_id: number; - }; - export type ReposCreateDeploymentStatusParams = { - owner: string; - - repo: string; - - deployment_id: number; - /** - * The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. - */ - state: - | "error" - | "failure" - | "inactive" - | "in_progress" - | "queued" - | "pending" - | "success"; - /** - * The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. - */ - target_url?: string; - /** - * The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` - * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. - */ - log_url?: string; - /** - * A short description of the status. The maximum description length is 140 characters. - */ - description?: string; - /** - * Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. - */ - environment?: "production" | "staging" | "qa"; - /** - * Sets the URL for accessing your environment. Default: `""` - * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. - */ - environment_url?: string; - /** - * Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` - * **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. - * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. - */ - auto_inactive?: boolean; - }; - export type ReposListDownloadsParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposGetDownloadParams = { - owner: string; - - repo: string; - - download_id: number; - }; - export type ReposDeleteDownloadParams = { - owner: string; - - repo: string; - - download_id: number; - }; - export type ReposListForksParams = { - owner: string; - - repo: string; - /** - * The sort order. Can be either `newest`, `oldest`, or `stargazers`. - */ - sort?: "newest" | "oldest" | "stargazers"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposCreateForkParams = { - owner: string; - - repo: string; - /** - * Optional parameter to specify the organization name if forking into an organization. - */ - organization?: string; - }; - export type ReposListHooksParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposGetHookParams = { - owner: string; - - repo: string; - - hook_id: number; - }; - export type ReposCreateHookParams = { - owner: string; - - repo: string; - /** - * Use `web` to create a webhook. This parameter only accepts the value `web`. - */ - name?: string; - /** - * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). - */ - config: ReposCreateHookParamsConfig; - /** - * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. - */ - events?: string[]; - /** - * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - */ - active?: boolean; - }; - export type ReposUpdateHookParams = { - owner: string; - - repo: string; - - hook_id: number; - /** - * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). - */ - config?: ReposUpdateHookParamsConfig; - /** - * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. This replaces the entire array of events. - */ - events?: string[]; - /** - * Determines a list of events to be added to the list of events that the Hook triggers for. - */ - add_events?: string[]; - /** - * Determines a list of events to be removed from the list of events that the Hook triggers for. - */ - remove_events?: string[]; - /** - * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - */ - active?: boolean; - }; - export type ReposTestPushHookParams = { - owner: string; - - repo: string; - - hook_id: number; - }; - export type ReposPingHookParams = { - owner: string; - - repo: string; - - hook_id: number; - }; - export type ReposDeleteHookParams = { - owner: string; - - repo: string; - - hook_id: number; - }; - export type ReposListInvitationsParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposDeleteInvitationParams = { - owner: string; - - repo: string; - - invitation_id: number; - }; - export type ReposUpdateInvitationParams = { - owner: string; - - repo: string; - - invitation_id: number; - /** - * The permissions that the associated user will have on the repository. Valid values are `read`, `write`, and `admin`. - */ - permissions?: "read" | "write" | "admin"; - }; - export type ReposListInvitationsForAuthenticatedUserParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposAcceptInvitationParams = { - invitation_id: number; - }; - export type ReposDeclineInvitationParams = { - invitation_id: number; - }; - export type ReposListDeployKeysParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposGetDeployKeyParams = { - owner: string; - - repo: string; - - key_id: number; - }; - export type ReposAddDeployKeyParams = { - owner: string; - - repo: string; - /** - * A name for the key. - */ - title?: string; - /** - * The contents of the key. - */ - key: string; - /** - * If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. - * - * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)." - */ - read_only?: boolean; - }; - export type ReposRemoveDeployKeyParams = { - owner: string; - - repo: string; - - key_id: number; - }; - export type ReposMergeParams = { - owner: string; - - repo: string; - /** - * The name of the base branch that the head will be merged into. - */ - base: string; - /** - * The head to merge. This can be a branch name or a commit SHA1. - */ - head: string; - /** - * Commit message to use for the merge commit. If omitted, a default message will be used. - */ - commit_message?: string; - }; - export type ReposGetPagesParams = { - owner: string; - - repo: string; - }; - export type ReposEnablePagesSiteParams = { - owner: string; - - repo: string; - - source?: ReposEnablePagesSiteParamsSource; - }; - export type ReposDisablePagesSiteParams = { - owner: string; - - repo: string; - }; - export type ReposUpdateInformationAboutPagesSiteParams = { - owner: string; - - repo: string; - /** - * Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://help.github.com/articles/using-a-custom-domain-with-github-pages/)." - */ - cname?: string; - /** - * Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master /docs"`. - */ - source?: '"gh-pages"' | '"master"' | '"master /docs"'; - }; - export type ReposRequestPageBuildParams = { - owner: string; - - repo: string; - }; - export type ReposListPagesBuildsParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposGetLatestPagesBuildParams = { - owner: string; - - repo: string; - }; - export type ReposGetPagesBuildParams = { - owner: string; - - repo: string; - - build_id: number; - }; - export type ReposListReleasesParams = { - owner: string; - - repo: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposGetReleaseParams = { - owner: string; - - repo: string; - - release_id: number; - }; - export type ReposGetLatestReleaseParams = { - owner: string; - - repo: string; - }; - export type ReposGetReleaseByTagParams = { - owner: string; - - repo: string; - - tag: string; - }; - export type ReposCreateReleaseParams = { - owner: string; - - repo: string; - /** - * The name of the tag. - */ - tag_name: string; - /** - * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. - */ - target_commitish?: string; - /** - * The name of the release. - */ - name?: string; - /** - * Text describing the contents of the tag. - */ - body?: string; - /** - * `true` to create a draft (unpublished) release, `false` to create a published one. - */ - draft?: boolean; - /** - * `true` to identify the release as a prerelease. `false` to identify the release as a full release. - */ - prerelease?: boolean; - }; - export type ReposUpdateReleaseParams = { - owner: string; - - repo: string; - - release_id: number; - /** - * The name of the tag. - */ - tag_name?: string; - /** - * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. - */ - target_commitish?: string; - /** - * The name of the release. - */ - name?: string; - /** - * Text describing the contents of the tag. - */ - body?: string; - /** - * `true` makes the release a draft, and `false` publishes the release. - */ - draft?: boolean; - /** - * `true` to identify the release as a prerelease, `false` to identify the release as a full release. - */ - prerelease?: boolean; - }; - export type ReposDeleteReleaseParams = { - owner: string; - - repo: string; - - release_id: number; - }; - export type ReposListAssetsForReleaseParams = { - owner: string; - - repo: string; - - release_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposUploadReleaseAssetParams = { - url: string; - /** - * Request headers containing `content-type` and `content-length` - */ - headers: ReposUploadReleaseAssetParamsHeaders; - /** - * The file name of the asset. This should be set in a URI query parameter. - */ - name: string; - /** - * An alternate short description of the asset. Used in place of the filename. This should be set in a URI query parameter. - */ - label?: string; - - file: string | object; - }; - export type ReposGetReleaseAssetParams = { - owner: string; - - repo: string; - - asset_id: number; - }; - export type ReposUpdateReleaseAssetParams = { - owner: string; - - repo: string; - - asset_id: number; - /** - * The file name of the asset. - */ - name?: string; - /** - * An alternate short description of the asset. Used in place of the filename. - */ - label?: string; - }; - export type ReposDeleteReleaseAssetParams = { - owner: string; - - repo: string; - - asset_id: number; - }; - export type ReposGetContributorsStatsParams = { - owner: string; - - repo: string; - }; - export type ReposGetCommitActivityStatsParams = { - owner: string; - - repo: string; - }; - export type ReposGetCodeFrequencyStatsParams = { - owner: string; - - repo: string; - }; - export type ReposGetParticipationStatsParams = { - owner: string; - - repo: string; - }; - export type ReposGetPunchCardStatsParams = { - owner: string; - - repo: string; - }; - export type ReposCreateStatusParams = { - owner: string; - - repo: string; - - sha: string; - /** - * The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. - */ - state: "error" | "failure" | "pending" | "success"; - /** - * The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. - * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: - * `http://ci.example.com/user/repo/build/sha` - */ - target_url?: string; - /** - * A short description of the status. - */ - description?: string; - /** - * A string label to differentiate this status from the status of other systems. - */ - context?: string; - }; - export type ReposListStatusesForRefParams = { - owner: string; - - repo: string; - - ref: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type ReposGetCombinedStatusForRefParams = { - owner: string; - - repo: string; - - ref: string; - }; - export type ReposGetTopReferrersParams = { - owner: string; - - repo: string; - }; - export type ReposGetTopPathsParams = { - owner: string; - - repo: string; - }; - export type ReposGetViewsParams = { - owner: string; - - repo: string; - /** - * Must be one of: `day`, `week`. - */ - per?: "day" | "week"; - }; - export type ReposGetClonesParams = { - owner: string; - - repo: string; - /** - * Must be one of: `day`, `week`. - */ - per?: "day" | "week"; - }; - export type SearchReposParams = { - /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching for repositories](https://help.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. - */ - q: string; - /** - * Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. - */ - sort?: "stars" | "forks" | "help-wanted-issues" | "updated"; - /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. - */ - order?: "desc" | "asc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type SearchCommitsParams = { - /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching commits](https://help.github.com/articles/searching-commits/)" for a detailed list of qualifiers. - */ - q: string; - /** - * Sorts the results of your query by `author-date` or `committer-date`. - */ - sort?: "author-date" | "committer-date"; - /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. - */ - order?: "desc" | "asc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type SearchCodeParams = { - /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching code](https://help.github.com/articles/searching-code/)" for a detailed list of qualifiers. - */ - q: string; - /** - * Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. - */ - sort?: "indexed"; - /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. - */ - order?: "desc" | "asc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type SearchIssuesAndPullRequestsParams = { - /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. - */ - q: string; - /** - * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, - */ - sort?: - | "comments" - | "reactions" - | "reactions-+1" - | "reactions--1" - | "reactions-smile" - | "reactions-thinking_face" - | "reactions-heart" - | "reactions-tada" - | "interactions" - | "created" - | "updated"; - /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. - */ - order?: "desc" | "asc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type SearchIssuesParams = { - /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. - */ - q: string; - /** - * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, - */ - sort?: - | "comments" - | "reactions" - | "reactions-+1" - | "reactions--1" - | "reactions-smile" - | "reactions-thinking_face" - | "reactions-heart" - | "reactions-tada" - | "interactions" - | "created" - | "updated"; - /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. - */ - order?: "desc" | "asc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type SearchUsersParams = { - /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching users](https://help.github.com/articles/searching-users/)" for a detailed list of qualifiers. - */ - q: string; - /** - * Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. - */ - sort?: "followers" | "repositories" | "joined"; - /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. - */ - order?: "desc" | "asc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type SearchTopicsParams = { - /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). - */ - q: string; - }; - export type SearchLabelsParams = { - /** - * The id of the repository. - */ - repository_id: number; - /** - * The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). - */ - q: string; - /** - * Sorts the results of your query by when the label was `created` or `updated`. - */ - sort?: "created" | "updated"; - /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. - */ - order?: "desc" | "asc"; - }; - export type TeamsListParams = { - org: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type TeamsGetParams = { - team_id: number; - }; - export type TeamsGetByNameParams = { - org: string; - - team_slug: string; - }; - export type TeamsCreateParams = { - org: string; - /** - * The name of the team. - */ - name: string; - /** - * The description of the team. - */ - description?: string; - /** - * The logins of organization members to add as maintainers of the team. - */ - maintainers?: string[]; - /** - * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. - */ - repo_names?: string[]; - /** - * The level of privacy this team should have. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * Default: `secret` - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * Default for child team: `closed` - * **Note**: You must pass the `hellcat-preview` media type to set privacy default to `closed` for child teams. **For a parent or child team:** - */ - privacy?: "secret" | "closed"; - /** - * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. - */ - permission?: "pull" | "push" | "admin"; - /** - * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. - */ - parent_team_id?: number; - }; - export type TeamsUpdateParams = { - team_id: number; - /** - * The name of the team. - */ - name: string; - /** - * The description of the team. - */ - description?: string; - /** - * The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - */ - privacy?: string; - /** - * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. - */ - permission?: "pull" | "push" | "admin"; - /** - * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. - */ - parent_team_id?: number; - }; - export type TeamsDeleteParams = { - team_id: number; - }; - export type TeamsListChildParams = { - team_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type TeamsListReposParams = { - team_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type TeamsCheckManagesRepoParams = { - team_id: number; - - owner: string; - - repo: string; - }; - export type TeamsAddOrUpdateRepoParams = { - team_id: number; - - owner: string; - - repo: string; - /** - * The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. - * **Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited through a parent team. - */ - permission?: "pull" | "push" | "admin"; - }; - export type TeamsRemoveRepoParams = { - team_id: number; - - owner: string; - - repo: string; - }; - export type TeamsListForAuthenticatedUserParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type TeamsListProjectsParams = { - team_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type TeamsReviewProjectParams = { - team_id: number; - - project_id: number; - }; - export type TeamsAddOrUpdateProjectParams = { - team_id: number; - - project_id: number; - /** - * The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - * **Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited from a parent team. - */ - permission?: "read" | "write" | "admin"; - }; - export type TeamsRemoveProjectParams = { - team_id: number; - - project_id: number; - }; - export type TeamsListDiscussionCommentsParams = { - team_id: number; - - discussion_number: number; - /** - * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type TeamsGetDiscussionCommentParams = { - team_id: number; - - discussion_number: number; - - comment_number: number; - }; - export type TeamsCreateDiscussionCommentParams = { - team_id: number; - - discussion_number: number; - /** - * The discussion comment's body text. - */ - body: string; - }; - export type TeamsUpdateDiscussionCommentParams = { - team_id: number; - - discussion_number: number; - - comment_number: number; - /** - * The discussion comment's body text. - */ - body: string; - }; - export type TeamsDeleteDiscussionCommentParams = { - team_id: number; - - discussion_number: number; - - comment_number: number; - }; - export type TeamsListDiscussionsParams = { - team_id: number; - /** - * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type TeamsGetDiscussionParams = { - team_id: number; - - discussion_number: number; - }; - export type TeamsCreateDiscussionParams = { - team_id: number; - /** - * The discussion post's title. - */ - title: string; - /** - * The discussion post's body text. - */ - body: string; - /** - * Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. - */ - private?: boolean; - }; - export type TeamsUpdateDiscussionParams = { - team_id: number; - - discussion_number: number; - /** - * The discussion post's title. - */ - title?: string; - /** - * The discussion post's body text. - */ - body?: string; - }; - export type TeamsDeleteDiscussionParams = { - team_id: number; - - discussion_number: number; - }; - export type TeamsListMembersParams = { - team_id: number; - /** - * Filters members returned by their role in the team. Can be one of: - * \* `member` - normal members of the team. - * \* `maintainer` - team maintainers. - * \* `all` - all members of the team. - */ - role?: "member" | "maintainer" | "all"; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type TeamsGetMemberParams = { - team_id: number; - - username: string; - }; - export type TeamsAddMemberParams = { - team_id: number; - - username: string; - }; - export type TeamsRemoveMemberParams = { - team_id: number; - - username: string; - }; - export type TeamsGetMembershipParams = { - team_id: number; - - username: string; - }; - export type TeamsAddOrUpdateMembershipParams = { - team_id: number; - - username: string; - /** - * The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. - */ - role?: "member" | "maintainer"; - }; - export type TeamsRemoveMembershipParams = { - team_id: number; - - username: string; - }; - export type TeamsListPendingInvitationsParams = { - team_id: number; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersGetByUsernameParams = { - username: string; - }; - export type UsersUpdateAuthenticatedParams = { - /** - * The new name of the user. - */ - name?: string; - /** - * The publicly visible email address of the user. - */ - email?: string; - /** - * The new blog URL of the user. - */ - blog?: string; - /** - * The new company of the user. - */ - company?: string; - /** - * The new location of the user. - */ - location?: string; - /** - * The new hiring availability of the user. - */ - hireable?: boolean; - /** - * The new short biography of the user. - */ - bio?: string; - }; - export type UsersGetContextForUserParams = { - username: string; - /** - * Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`. - */ - subject_type?: "organization" | "repository" | "issue" | "pull_request"; - /** - * Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. - */ - subject_id?: string; - }; - export type UsersListParams = { - /** - * The integer ID of the last User that you've seen. - */ - since?: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersCheckBlockedParams = { - username: string; - }; - export type UsersBlockParams = { - username: string; - }; - export type UsersUnblockParams = { - username: string; - }; - export type UsersListEmailsParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersListPublicEmailsParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersAddEmailsParams = { - /** - * Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. - */ - emails: string[]; - }; - export type UsersDeleteEmailsParams = { - /** - * Deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. - */ - emails: string[]; - }; - export type UsersTogglePrimaryEmailVisibilityParams = { - /** - * Specify the _primary_ email address that needs a visibility change. - */ - email: string; - /** - * Use `public` to enable an authenticated user to view the specified email address, or use `private` so this primary email address cannot be seen publicly. - */ - visibility: string; - }; - export type UsersListFollowersForUserParams = { - username: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersListFollowersForAuthenticatedUserParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersListFollowingForUserParams = { - username: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersListFollowingForAuthenticatedUserParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersCheckFollowingParams = { - username: string; - }; - export type UsersCheckFollowingForUserParams = { - username: string; - - target_user: string; - }; - export type UsersFollowParams = { - username: string; - }; - export type UsersUnfollowParams = { - username: string; - }; - export type UsersListGpgKeysForUserParams = { - username: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersListGpgKeysParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersGetGpgKeyParams = { - gpg_key_id: number; - }; - export type UsersCreateGpgKeyParams = { - /** - * Your GPG key, generated in ASCII-armored format. See "[Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/)" for help creating a GPG key. - */ - armored_public_key?: string; - }; - export type UsersDeleteGpgKeyParams = { - gpg_key_id: number; - }; - export type UsersListPublicKeysForUserParams = { - username: string; - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersListPublicKeysParams = { - /** - * Results per page (max 100) - */ - per_page?: number; - /** - * Page number of the results to fetch. - */ - page?: number; - }; - export type UsersGetPublicKeyParams = { - key_id: number; - }; - export type UsersCreatePublicKeyParams = { - /** - * A descriptive name for the new key. Use a name that will help you recognize this key in your GitHub account. For example, if you're using a personal Mac, you might call this key "Personal MacBook Air". - */ - title?: string; - /** - * The public SSH key to add to your GitHub account. See "[Generating a new SSH key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)" for guidance on how to create a public SSH key. - */ - key?: string; - }; - export type UsersDeletePublicKeyParams = { - key_id: number; - }; - export type AppsCreateInstallationTokenParamsPermissions = {}; - export type ChecksCreateParamsOutput = { - title: string; - summary: string; - text?: string; - annotations?: ChecksCreateParamsOutputAnnotations[]; - images?: ChecksCreateParamsOutputImages[]; - }; - export type ChecksCreateParamsOutputAnnotations = { - path: string; - start_line: number; - end_line: number; - start_column?: number; - end_column?: number; - annotation_level: "notice" | "warning" | "failure"; - message: string; - title?: string; - raw_details?: string; - }; - export type ChecksCreateParamsOutputImages = { - alt: string; - image_url: string; - caption?: string; - }; - export type ChecksCreateParamsActions = { - label: string; - description: string; - identifier: string; - }; - export type ChecksUpdateParamsOutput = { - title?: string; - summary: string; - text?: string; - annotations?: ChecksUpdateParamsOutputAnnotations[]; - images?: ChecksUpdateParamsOutputImages[]; - }; - export type ChecksUpdateParamsOutputAnnotations = { - path: string; - start_line: number; - end_line: number; - start_column?: number; - end_column?: number; - annotation_level: "notice" | "warning" | "failure"; - message: string; - title?: string; - raw_details?: string; - }; - export type ChecksUpdateParamsOutputImages = { - alt: string; - image_url: string; - caption?: string; - }; - export type ChecksUpdateParamsActions = { - label: string; - description: string; - identifier: string; - }; - export type ChecksSetSuitesPreferencesParamsAutoTriggerChecks = { - app_id: number; - setting: boolean; - }; - export type GistsCreateParamsFiles = { - content?: string; - }; - export type GistsUpdateParamsFiles = { - content?: string; - filename?: string; - }; - export type GitCreateCommitParamsAuthor = { - name?: string; - email?: string; - date?: string; - }; - export type GitCreateCommitParamsCommitter = { - name?: string; - email?: string; - date?: string; - }; - export type GitCreateTagParamsTagger = { - name?: string; - email?: string; - date?: string; - }; - export type GitCreateTreeParamsTree = { - path?: string; - mode?: "100644" | "100755" | "040000" | "160000" | "120000"; - type?: "blob" | "tree" | "commit"; - sha?: string; - content?: string; - }; - export type OrgsCreateHookParamsConfig = { - url: string; - content_type?: string; - secret?: string; - insecure_ssl?: string; - }; - export type OrgsUpdateHookParamsConfig = { - url: string; - content_type?: string; - secret?: string; - insecure_ssl?: string; - }; - export type PullsCreateReviewParamsComments = { - path: string; - position: number; - body: string; - }; - export type ReposUpdateBranchProtectionParamsRequiredStatusChecks = { - strict: boolean; - contexts: string[]; - }; - export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviews = { - dismissal_restrictions?: ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions; - dismiss_stale_reviews?: boolean; - require_code_owner_reviews?: boolean; - required_approving_review_count?: number; - }; - export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions = { - users?: string[]; - teams?: string[]; - }; - export type ReposUpdateBranchProtectionParamsRestrictions = { - users?: string[]; - teams?: string[]; - }; - export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions = { - users?: string[]; - teams?: string[]; - }; - export type ReposCreateOrUpdateFileParamsCommitter = { - name: string; - email: string; - }; - export type ReposCreateOrUpdateFileParamsAuthor = { - name: string; - email: string; - }; - export type ReposCreateFileParamsCommitter = { - name: string; - email: string; - }; - export type ReposCreateFileParamsAuthor = { - name: string; - email: string; - }; - export type ReposUpdateFileParamsCommitter = { - name: string; - email: string; - }; - export type ReposUpdateFileParamsAuthor = { - name: string; - email: string; - }; - export type ReposDeleteFileParamsCommitter = { - name?: string; - email?: string; - }; - export type ReposDeleteFileParamsAuthor = { - name?: string; - email?: string; - }; - export type ReposCreateHookParamsConfig = { - url: string; - content_type?: string; - secret?: string; - insecure_ssl?: string; - }; - export type ReposUpdateHookParamsConfig = { - url: string; - content_type?: string; - secret?: string; - insecure_ssl?: string; - }; - export type ReposEnablePagesSiteParamsSource = { - branch?: "master" | "gh-pages"; - path?: string; - }; - export type ReposUploadReleaseAssetParamsHeaders = { - "content-length": number; - "content-type": string; - }; -} - -declare class Octokit { - constructor(options?: Octokit.Options); - authenticate(auth: Octokit.AuthBasic): void; - authenticate(auth: Octokit.AuthOAuthToken): void; - authenticate(auth: Octokit.AuthOAuthSecret): void; - authenticate(auth: Octokit.AuthUserToken): void; - authenticate(auth: Octokit.AuthJWT): void; - - hook: { - before( - name: string, - callback: (options: Octokit.HookOptions) => void - ): void; - after( - name: string, - callback: ( - response: Octokit.Response, - options: Octokit.HookOptions - ) => void - ): void; - error( - name: string, - callback: (error: Octokit.HookError, options: Octokit.HookOptions) => void - ): void; - wrap( - name: string, - callback: ( - request: ( - options: Octokit.HookOptions - ) => Promise>, - options: Octokit.HookOptions - ) => void - ): void; - }; - - static plugin(plugin: Octokit.Plugin | Octokit.Plugin[]): Octokit.Static; - - registerEndpoints(endpoints: { - [scope: string]: Octokit.EndpointOptions; - }): void; - - request: Octokit.Request; - - paginate: Octokit.Paginate; - - log: Octokit.Log; - - activity: { - /** - * We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. - */ - listPublicEvents: { - (params?: Octokit.ActivityListPublicEventsParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - - listRepoEvents: { - (params?: Octokit.ActivityListRepoEventsParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - - listPublicEventsForRepoNetwork: { - (params?: Octokit.ActivityListPublicEventsForRepoNetworkParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - - listPublicEventsForOrg: { - (params?: Octokit.ActivityListPublicEventsForOrgParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. - */ - listReceivedEventsForUser: { - (params?: Octokit.ActivityListReceivedEventsForUserParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - - listReceivedPublicEventsForUser: { - (params?: Octokit.ActivityListReceivedPublicEventsForUserParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. - */ - listEventsForUser: { - (params?: Octokit.ActivityListEventsForUserParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - - listPublicEventsForUser: { - (params?: Octokit.ActivityListPublicEventsForUserParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This is the user's organization dashboard. You must be authenticated as the user to view this. - */ - listEventsForOrg: { - (params?: Octokit.ActivityListEventsForOrgParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: - * - * * **Timeline**: The GitHub global public timeline - * * **User**: The public timeline for any user, using [URI template](https://developer.github.com/v3/#hypermedia) - * * **Current user public**: The public timeline for the authenticated user - * * **Current user**: The private timeline for the authenticated user - * * **Current user actor**: The private timeline for activity created by the authenticated user - * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. - * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. - * - * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://developer.github.com/v3/#basic-authentication) since current feed URIs use the older, non revocable auth tokens. - */ - listFeeds: { - (params?: Octokit.EmptyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List all notifications for the current user, sorted by most recently updated. - * - * The following example uses the `since` parameter to list notifications that have been updated after the specified time. - */ - listNotifications: { - (params?: Octokit.ActivityListNotificationsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List all notifications for the current user. - */ - listNotificationsForRepo: { - (params?: Octokit.ActivityListNotificationsForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Marking a notification as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List your notifications](https://developer.github.com/v3/activity/notifications/#list-your-notifications) endpoint and pass the query parameter `all=false`. - */ - markAsRead: { - (params?: Octokit.ActivityMarkAsReadParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Marking all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List your notifications in a repository](https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository) endpoint and pass the query parameter `all=false`. - */ - markNotificationsAsReadForRepo: { - (params?: Octokit.ActivityMarkNotificationsAsReadForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getThread: { - (params?: Octokit.ActivityGetThreadParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - markThreadAsRead: { - (params?: Octokit.ActivityMarkThreadAsReadParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://developer.github.com/v3/activity/watching/#get-a-repository-subscription). - * - * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. - */ - getThreadSubscription: { - (params?: Octokit.ActivityGetThreadSubscriptionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This lets you subscribe or unsubscribe from a conversation. - */ - setThreadSubscription: { - (params?: Octokit.ActivitySetThreadSubscriptionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Mutes all future notifications for a conversation until you comment on the thread or get **@mention**ed. - */ - deleteThreadSubscription: { - (params?: Octokit.ActivityDeleteThreadSubscriptionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: - */ - listStargazersForRepo: { - (params?: Octokit.ActivityListStargazersForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: - */ - listReposStarredByUser: { - (params?: Octokit.ActivityListReposStarredByUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: - */ - listReposStarredByAuthenticatedUser: { - ( - params?: Octokit.ActivityListReposStarredByAuthenticatedUserParams - ): Promise< - Octokit.Response< - Octokit.ActivityListReposStarredByAuthenticatedUserResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Requires for the user to be authenticated. - */ - checkStarringRepo: { - (params?: Octokit.ActivityCheckStarringRepoParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Requires for the user to be authenticated. - * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - */ - starRepo: { - (params?: Octokit.ActivityStarRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Requires for the user to be authenticated. - */ - unstarRepo: { - (params?: Octokit.ActivityUnstarRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listWatchersForRepo: { - (params?: Octokit.ActivityListWatchersForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listReposWatchedByUser: { - (params?: Octokit.ActivityListReposWatchedByUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listWatchedReposForAuthenticatedUser: { - ( - params?: Octokit.ActivityListWatchedReposForAuthenticatedUserParams - ): Promise< - Octokit.Response< - Octokit.ActivityListWatchedReposForAuthenticatedUserResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - - getRepoSubscription: { - (params?: Octokit.ActivityGetRepoSubscriptionParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription) completely. - */ - setRepoSubscription: { - (params?: Octokit.ActivitySetRepoSubscriptionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://developer.github.com/v3/activity/watching/#set-a-repository-subscription). - */ - deleteRepoSubscription: { - (params?: Octokit.ActivityDeleteRepoSubscriptionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - apps: { - /** - * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). - * - * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - getBySlug: { - (params?: Octokit.AppsGetBySlugParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations](https://developer.github.com/v3/apps/#list-installations)" endpoint. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - getAuthenticated: { - (params?: Octokit.EmptyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - * - * The permissions the installation has are included under the `permissions` key. - */ - listInstallations: { - (params?: Octokit.AppsListInstallationsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - getInstallation: { - (params?: Octokit.AppsGetInstallationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Uninstalls a GitHub App on a user, organization, or business account. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - deleteInstallation: { - (params?: Octokit.AppsDeleteInstallationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. - * - * By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - * - * This example grants the token "Read and write" permission to `issues` and "Read" permission to `contents`, and restricts the token's access to the repository with an `id` of 1296269. - */ - createInstallationToken: { - (params?: Octokit.AppsCreateInstallationTokenParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Enables an authenticated GitHub App to find the organization's installation information. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - getOrgInstallation: { - (params?: Octokit.AppsGetOrgInstallationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Enables an authenticated GitHub App to find the organization's installation information. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - findOrgInstallation: { - (params?: Octokit.AppsFindOrgInstallationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - getRepoInstallation: { - (params?: Octokit.AppsGetRepoInstallationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - findRepoInstallation: { - (params?: Octokit.AppsFindRepoInstallationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Enables an authenticated GitHub App to find the user’s installation information. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - getUserInstallation: { - (params?: Octokit.AppsGetUserInstallationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Enables an authenticated GitHub App to find the user’s installation information. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - findUserInstallation: { - (params?: Octokit.AppsFindUserInstallationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. - */ - createFromManifest: { - (params?: Octokit.AppsCreateFromManifestParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List repositories that an installation can access. - * - * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - listRepos: { - (params?: Octokit.AppsListReposParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. - * - * You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. - * - * You can find the permissions for the installation under the `permissions` key. - */ - listInstallationsForAuthenticatedUser: { - ( - params?: Octokit.AppsListInstallationsForAuthenticatedUserParams - ): Promise< - Octokit.Response< - Octokit.AppsListInstallationsForAuthenticatedUserResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. - * - * You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. - * - * The access the user has to each repository is included in the hash under the `permissions` key. - */ - listInstallationReposForAuthenticatedUser: { - ( - params?: Octokit.AppsListInstallationReposForAuthenticatedUserParams - ): Promise< - Octokit.Response< - Octokit.AppsListInstallationReposForAuthenticatedUserResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Add a single repository to an installation. The authenticated user must have admin access to the repository. - * - * You must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. - */ - addRepoToInstallation: { - (params?: Octokit.AppsAddRepoToInstallationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Remove a single repository from an installation. The authenticated user must have admin access to the repository. - * - * You must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. - */ - removeRepoFromInstallation: { - (params?: Octokit.AppsRemoveRepoFromInstallationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` of the content reference from the [`content_reference` event](https://developer.github.com/v3/activity/events/types/#contentreferenceevent) to create an attachment. - * - * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://developer.github.com/apps/using-content-attachments/)" for details about content attachments. - * - * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - * - * This example creates a content attachment for the domain `https://errors.ai/`. - */ - createContentAttachment: { - (params?: Octokit.AppsCreateContentAttachmentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. - */ - listPlans: { - (params?: Octokit.AppsListPlansParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. - */ - listPlansStubbed: { - (params?: Octokit.AppsListPlansStubbedParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. - */ - listAccountsUserOrOrgOnPlan: { - (params?: Octokit.AppsListAccountsUserOrOrgOnPlanParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. - */ - listAccountsUserOrOrgOnPlanStubbed: { - (params?: Octokit.AppsListAccountsUserOrOrgOnPlanStubbedParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. - */ - checkAccountIsAssociatedWithAny: { - (params?: Octokit.AppsCheckAccountIsAssociatedWithAnyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. - */ - checkAccountIsAssociatedWithAnyStubbed: { - ( - params?: Octokit.AppsCheckAccountIsAssociatedWithAnyStubbedParams - ): Promise< - Octokit.Response< - Octokit.AppsCheckAccountIsAssociatedWithAnyStubbedResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). - */ - listMarketplacePurchasesForAuthenticatedUser: { - ( - params?: Octokit.AppsListMarketplacePurchasesForAuthenticatedUserParams - ): Promise< - Octokit.Response< - Octokit.AppsListMarketplacePurchasesForAuthenticatedUserResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). - */ - listMarketplacePurchasesForAuthenticatedUserStubbed: { - ( - params?: Octokit.AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams - ): Promise< - Octokit.Response< - Octokit.AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - }; - checks: { - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. - * - * #### [](https://developer.github.com/v3/checks/runs/#actions-object)`actions` object - */ - create: { - (params?: Octokit.ChecksCreateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. - * - * #### [](https://developer.github.com/v3/checks/runs/#actions-object-1)`actions` object - */ - update: { - (params?: Octokit.ChecksUpdateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - listForRef: { - (params?: Octokit.ChecksListForRefParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - listForSuite: { - (params?: Octokit.ChecksListForSuiteParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - get: { - (params?: Octokit.ChecksGetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. - */ - listAnnotations: { - (params?: Octokit.ChecksListAnnotationsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. - */ - getSuite: { - (params?: Octokit.ChecksGetSuiteParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. - */ - listSuitesForRef: { - (params?: Octokit.ChecksListSuitesForRefParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Changes the default automatic flow when creating check suites. By default, the CheckSuiteEvent is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://developer.github.com/v3/checks/suites/#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. - */ - setSuitesPreferences: { - (params?: Octokit.ChecksSetSuitesPreferencesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * By default, check suites are automatically created when you create a [check run](https://developer.github.com/v3/checks/runs/). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Set preferences for check suites on a repository](https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository)". Your GitHub App must have the `checks:write` permission to create check suites. - */ - createSuite: { - (params?: Octokit.ChecksCreateSuiteParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://developer.github.com/v3/activity/events/types/#checksuiteevent) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. - */ - rerequestSuite: { - (params?: Octokit.ChecksRerequestSuiteParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - codesOfConduct: { - listConductCodes: { - (params?: Octokit.EmptyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getConductCode: { - (params?: Octokit.CodesOfConductGetConductCodeParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This method returns the contents of the repository's code of conduct file, if one is detected. - */ - getForRepo: { - (params?: Octokit.CodesOfConductGetForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - emojis: { - /** - * Lists all the emojis available to use on GitHub. - */ - get: { - (params?: Octokit.EmptyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - gists: { - listPublicForUser: { - (params?: Octokit.GistsListPublicForUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - list: { - (params?: Octokit.GistsListParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List all public gists sorted by most recently updated to least recently updated. - * - * Note: With [pagination](https://developer.github.com/v3/#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. - */ - listPublic: { - (params?: Octokit.GistsListPublicParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List the authenticated user's starred gists: - */ - listStarred: { - (params?: Octokit.GistsListStarredParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - get: { - (params?: Octokit.GistsGetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getRevision: { - (params?: Octokit.GistsGetRevisionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Allows you to add a new gist with one or more files. - * - * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. - */ - create: { - (params?: Octokit.GistsCreateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. - */ - update: { - (params?: Octokit.GistsUpdateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listCommits: { - (params?: Octokit.GistsListCommitsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - */ - star: { - (params?: Octokit.GistsStarParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - unstar: { - (params?: Octokit.GistsUnstarParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - checkIsStarred: { - (params?: Octokit.GistsCheckIsStarredParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note**: This was previously `/gists/:gist_id/fork`. - */ - fork: { - (params?: Octokit.GistsForkParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listForks: { - (params?: Octokit.GistsListForksParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - delete: { - (params?: Octokit.GistsDeleteParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listComments: { - (params?: Octokit.GistsListCommentsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getComment: { - (params?: Octokit.GistsGetCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - createComment: { - (params?: Octokit.GistsCreateCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateComment: { - (params?: Octokit.GistsUpdateCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteComment: { - (params?: Octokit.GistsDeleteCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - git: { - /** - * The `content` in the response will always be Base64 encoded. - * - * _Note_: This API supports blobs up to 100 megabytes in size. - */ - getBlob: { - (params?: Octokit.GitGetBlobParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - createBlob: { - (params?: Octokit.GitCreateBlobParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - getCommit: { - (params?: Octokit.GitGetCommitParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - * - * In this example, the payload of the signature would be: - * - * - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - createCommit: { - (params?: Octokit.GitCreateCommitParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Returns a branch or tag reference. Other than the [REST API](https://developer.github.com/v3/git/refs/#get-a-reference) it always returns a single reference. If the REST API returns with an array then the method responds with an error. - */ - getRef: { - (params?: Octokit.GitGetRefParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * This will return an array of all the references on the system, including things like notes and stashes if they exist on the server - */ - listRefs: { - (params?: Octokit.GitListRefsParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. - */ - createRef: { - (params?: Octokit.GitCreateRefParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateRef: { - (params?: Octokit.GitUpdateRefParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * ``` - * DELETE /repos/octocat/Hello-World/git/refs/heads/feature-a - * ``` - * - * ``` - * DELETE /repos/octocat/Hello-World/git/refs/tags/v1.0 - * ``` - */ - deleteRef: { - (params?: Octokit.GitDeleteRefParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - getTag: { - (params?: Octokit.GitGetTagParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://developer.github.com/v3/git/refs/#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://developer.github.com/v3/git/refs/#create-a-reference) the tag reference - this call would be unnecessary. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - createTag: { - (params?: Octokit.GitCreateTagParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * If `truncated` in the response is `true`, the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, omit the `recursive` parameter, and fetch one sub-tree at a time. If you need to fetch even more items, you can clone the repository and iterate over the Git data locally. - */ - getTree: { - (params?: Octokit.GitGetTreeParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * The tree creation API will take nested entries as well. If both a tree and a nested path modifying that tree are specified, it will overwrite the contents of that tree with the new path contents and write a new tree out. - */ - createTree: { - (params?: Octokit.GitCreateTreeParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - gitignore: { - /** - * List all templates available to pass as an option when [creating a repository](https://developer.github.com/v3/repos/#create). - */ - listTemplates: { - (params?: Octokit.EmptyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * The API also allows fetching the source of a single template. - * - * Use the raw [media type](https://developer.github.com/v3/media/) to get the raw contents. - */ - getTemplate: { - (params?: Octokit.GitignoreGetTemplateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - interactions: { - /** - * Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response. - */ - getRestrictionsForOrg: { - (params?: Octokit.InteractionsGetRestrictionsForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions. - */ - addOrUpdateRestrictionsForOrg: { - ( - params?: Octokit.InteractionsAddOrUpdateRestrictionsForOrgParams - ): Promise< - Octokit.Response< - Octokit.InteractionsAddOrUpdateRestrictionsForOrgResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. - */ - removeRestrictionsForOrg: { - (params?: Octokit.InteractionsRemoveRestrictionsForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. - */ - getRestrictionsForRepo: { - (params?: Octokit.InteractionsGetRestrictionsForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions. - */ - addOrUpdateRestrictionsForRepo: { - ( - params?: Octokit.InteractionsAddOrUpdateRestrictionsForRepoParams - ): Promise< - Octokit.Response< - Octokit.InteractionsAddOrUpdateRestrictionsForRepoResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. - */ - removeRestrictionsForRepo: { - (params?: Octokit.InteractionsRemoveRestrictionsForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - issues: { - /** - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. - * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. - */ - list: { - (params?: Octokit.IssuesListParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. - * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. - */ - listForAuthenticatedUser: { - (params?: Octokit.IssuesListForAuthenticatedUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. - * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. - */ - listForOrg: { - (params?: Octokit.IssuesListForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. - * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. - */ - listForRepo: { - (params?: Octokit.IssuesListForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * The API returns a [`301 Moved Permanently` status](https://developer.github.com/v3/#http-redirects) if the issue was [transferred](https://help.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe to the [`issues`](https://developer.github.com/v3/activity/events/types/#issuesevent) webhook. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. - * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. - */ - get: { - (params?: Octokit.IssuesGetParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesGetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. - * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - create: { - (params?: Octokit.IssuesCreateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Issue owners and users with push access can edit an issue. - */ - update: { - (params?: Octokit.IssuesUpdateParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesUpdateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with push access can lock an issue or pull request's conversation. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - */ - lock: { - (params?: Octokit.IssuesLockParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesLockParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with push access can unlock an issue's conversation. - */ - unlock: { - (params?: Octokit.IssuesUnlockParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesUnlockParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. - */ - listAssignees: { - (params?: Octokit.IssuesListAssigneesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Checks if a user has permission to be assigned to an issue in this repository. - * - * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. - * - * Otherwise a `404` status code is returned. - */ - checkAssignee: { - (params?: Octokit.IssuesCheckAssigneeParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. - * - * This example adds two assignees to the existing `octocat` assignee. - */ - addAssignees: { - (params?: Octokit.IssuesAddAssigneesParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesAddAssigneesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Removes one or more assignees from an issue. - * - * This example removes two of three assignees, leaving the `octocat` assignee. - */ - removeAssignees: { - (params?: Octokit.IssuesRemoveAssigneesParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesRemoveAssigneesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Issue Comments are ordered by ascending ID. - */ - listComments: { - (params?: Octokit.IssuesListCommentsParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesListCommentsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * By default, Issue Comments are ordered by ascending ID. - */ - listCommentsForRepo: { - (params?: Octokit.IssuesListCommentsForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getComment: { - (params?: Octokit.IssuesGetCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - createComment: { - (params?: Octokit.IssuesCreateCommentParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesCreateCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateComment: { - (params?: Octokit.IssuesUpdateCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteComment: { - (params?: Octokit.IssuesDeleteCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listEvents: { - (params?: Octokit.IssuesListEventsParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesListEventsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listEventsForRepo: { - (params?: Octokit.IssuesListEventsForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getEvent: { - (params?: Octokit.IssuesGetEventParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listLabelsForRepo: { - (params?: Octokit.IssuesListLabelsForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getLabel: { - (params?: Octokit.IssuesGetLabelParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - createLabel: { - (params?: Octokit.IssuesCreateLabelParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateLabel: { - (params?: Octokit.IssuesUpdateLabelParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteLabel: { - (params?: Octokit.IssuesDeleteLabelParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listLabelsOnIssue: { - (params?: Octokit.IssuesListLabelsOnIssueParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesListLabelsOnIssueParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - addLabels: { - (params?: Octokit.IssuesAddLabelsParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesAddLabelsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. - */ - removeLabel: { - (params?: Octokit.IssuesRemoveLabelParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesRemoveLabelParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - replaceLabels: { - (params?: Octokit.IssuesReplaceLabelsParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesReplaceLabelsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - removeLabels: { - (params?: Octokit.IssuesRemoveLabelsParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesRemoveLabelsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listLabelsForMilestone: { - ( - params?: Octokit.IssuesListLabelsForMilestoneParamsDeprecatedNumber - ): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesListLabelsForMilestoneParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listMilestonesForRepo: { - (params?: Octokit.IssuesListMilestonesForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getMilestone: { - (params?: Octokit.IssuesGetMilestoneParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesGetMilestoneParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - createMilestone: { - (params?: Octokit.IssuesCreateMilestoneParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateMilestone: { - (params?: Octokit.IssuesUpdateMilestoneParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesUpdateMilestoneParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteMilestone: { - (params?: Octokit.IssuesDeleteMilestoneParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.IssuesDeleteMilestoneParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listEventsForTimeline: { - ( - params?: Octokit.IssuesListEventsForTimelineParamsDeprecatedNumber - ): Promise>; - (params?: Octokit.IssuesListEventsForTimelineParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - licenses: { - listCommonlyUsed: { - (params?: Octokit.EmptyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - list: { - (params?: Octokit.EmptyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - get: { - (params?: Octokit.LicensesGetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This method returns the contents of the repository's license file, if one is detected. - * - * Similar to [the repository contents API](https://developer.github.com/v3/repos/contents/#get-contents), this method also supports [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw license content or rendered license HTML. - */ - getForRepo: { - (params?: Octokit.LicensesGetForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - markdown: { - render: { - (params?: Octokit.MarkdownRenderParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. - */ - renderRaw: { - (params?: Octokit.MarkdownRenderRawParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - meta: { - /** - * This endpoint provides a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://help.github.com/articles/about-github-s-ip-addresses/)." - */ - get: { - (params?: Octokit.EmptyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - migrations: { - /** - * Initiates the generation of a migration archive. - */ - startForOrg: { - (params?: Octokit.MigrationsStartForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists the most recent migrations. - */ - listForOrg: { - (params?: Octokit.MigrationsListForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Fetches the status of a migration. - * - * The `state` of a migration can be one of the following values: - * - * * `pending`, which means the migration hasn't started yet. - * * `exporting`, which means the migration is in progress. - * * `exported`, which means the migration finished successfully. - * * `failed`, which means the migration failed. - */ - getStatusForOrg: { - (params?: Octokit.MigrationsGetStatusForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Fetches the URL to a migration archive. - */ - getArchiveForOrg: { - (params?: Octokit.MigrationsGetArchiveForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Deletes a previous migration archive. Migration archives are automatically deleted after seven days. - */ - deleteArchiveForOrg: { - (params?: Octokit.MigrationsDeleteArchiveForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://developer.github.com/v3/repos/#delete-a-repository) when the migration is complete and you no longer need the source data. - */ - unlockRepoForOrg: { - (params?: Octokit.MigrationsUnlockRepoForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Start a source import to a GitHub repository using GitHub Importer. - */ - startImport: { - (params?: Octokit.MigrationsStartImportParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * View the progress of an import. - * - * **Import status** - * - * This section includes details about the possible values of the `status` field of the Import Progress response. - * - * An import that does not have errors will progress through these steps: - * - * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. - * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). - * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. - * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". - * * `complete` - the import is complete, and the repository is ready on GitHub. - * - * If there are problems, you will see one of these in the `status` field: - * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://github.com/contact) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://developer.github.com/v3/migrations/source_imports/#cancel-an-import) and [retry](https://developer.github.com/v3/migrations/source_imports/#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. - * - * **The project_choices field** - * - * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - * - * **Git LFS related fields** - * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. - * - * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. - * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. - * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. - * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. - */ - getImportProgress: { - (params?: Octokit.MigrationsGetImportProgressParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API request. If no parameters are provided, the import will be restarted. - * - * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. You can select the project to import by providing one of the objects in the `project_choices` array in the update request. - * - * The following example demonstrates the workflow for updating an import with "project1" as the project choice. Given a `project_choices` array like such: - * - * To restart an import, no parameters are provided in the update request. - */ - updateImport: { - (params?: Octokit.MigrationsUpdateImportParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. - * - * This API method and the "Map a commit author" method allow you to provide correct Git author information. - */ - getCommitAuthors: { - (params?: Octokit.MigrationsGetCommitAuthorsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. - */ - mapCommitAuthor: { - (params?: Octokit.MigrationsMapCommitAuthorParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://help.github.com/articles/versioning-large-files/). - */ - setLfsPreference: { - (params?: Octokit.MigrationsSetLfsPreferenceParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List files larger than 100MB found during the import - */ - getLargeFiles: { - (params?: Octokit.MigrationsGetLargeFilesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Stop an import for a repository. - */ - cancelImport: { - (params?: Octokit.MigrationsCancelImportParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Initiates the generation of a user migration archive. - */ - startForAuthenticatedUser: { - (params?: Octokit.MigrationsStartForAuthenticatedUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists all migrations a user has started. - */ - listForAuthenticatedUser: { - (params?: Octokit.MigrationsListForAuthenticatedUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: - * - * * `pending` - the migration hasn't started yet. - * * `exporting` - the migration is in progress. - * * `exported` - the migration finished successfully. - * * `failed` - the migration failed. - * - * Once the migration has been `exported` you can [download the migration archive](https://developer.github.com/v3/migrations/users/#download-a-user-migration-archive). - */ - getStatusForAuthenticatedUser: { - (params?: Octokit.MigrationsGetStatusForAuthenticatedUserParams): Promise< - Octokit.Response< - Octokit.MigrationsGetStatusForAuthenticatedUserResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: - * - * * attachments - * * bases - * * commit\_comments - * * issue\_comments - * * issue\_events - * * issues - * * milestones - * * organizations - * * projects - * * protected\_branches - * * pull\_request\_reviews - * * pull\_requests - * * releases - * * repositories - * * review\_comments - * * schema - * * users - * - * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. - */ - getArchiveForAuthenticatedUser: { - ( - params?: Octokit.MigrationsGetArchiveForAuthenticatedUserParams - ): Promise< - Octokit.Response< - Octokit.MigrationsGetArchiveForAuthenticatedUserResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [Get a list of user migrations](https://developer.github.com/v3/migrations/users/#get-a-list-of-user-migrations) and [Get the status of a user migration](https://developer.github.com/v3/migrations/users/#get-the-status-of-a-user-migration) endpoints, will continue to be available even after an archive is deleted. - */ - deleteArchiveForAuthenticatedUser: { - ( - params?: Octokit.MigrationsDeleteArchiveForAuthenticatedUserParams - ): Promise< - Octokit.Response< - Octokit.MigrationsDeleteArchiveForAuthenticatedUserResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Unlocks a repository. You can lock repositories when you [start a user migration](https://developer.github.com/v3/migrations/users/#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://developer.github.com/v3/repos/#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. - */ - unlockRepoForAuthenticatedUser: { - ( - params?: Octokit.MigrationsUnlockRepoForAuthenticatedUserParams - ): Promise< - Octokit.Response< - Octokit.MigrationsUnlockRepoForAuthenticatedUserResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - }; - oauthAuthorizations: { - /** - * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. - */ - listGrants: { - (params?: Octokit.OauthAuthorizationsListGrantsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getGrant: { - (params?: Octokit.OauthAuthorizationsGetGrantParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). - */ - deleteGrant: { - (params?: Octokit.OauthAuthorizationsDeleteGrantParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listAuthorizations: { - (params?: Octokit.OauthAuthorizationsListAuthorizationsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getAuthorization: { - (params?: Octokit.OauthAuthorizationsGetAuthorizationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates OAuth tokens using [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Woking with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." - * - * You can use this endpoint to create multiple OAuth tokens instead of implementing the [web flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/). - * - * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. - * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://help.github.com/articles/creating-an-access-token-for-command-line-use). - * - * Organizations that enforce SAML SSO require personal access tokens to be whitelisted. Read more about whitelisting tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). - */ - createAuthorization: { - (params?: Octokit.OauthAuthorizationsCreateAuthorizationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. - * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Woking with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." - */ - getOrCreateAuthorizationForApp: { - ( - params?: Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppParams - ): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. - * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Woking with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." - */ - getOrCreateAuthorizationForAppAndFingerprint: { - ( - params?: Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams - ): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. - * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Woking with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." - */ - getOrCreateAuthorizationForAppFingerprint: { - ( - params?: Octokit.OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams - ): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Woking with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." - * - * You can only send one of these scope keys at a time. - */ - updateAuthorization: { - (params?: Octokit.OauthAuthorizationsUpdateAuthorizationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteAuthorization: { - (params?: Octokit.OauthAuthorizationsDeleteAuthorizationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * OAuth applications can use a special API method for checking OAuth token validity without running afoul of normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing it, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. - */ - checkAuthorization: { - (params?: Octokit.OauthAuthorizationsCheckAuthorizationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * OAuth applications can use this API method to reset a valid OAuth token without end user involvement. Applications must save the "token" property in the response, because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing it, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. - */ - resetAuthorization: { - (params?: Octokit.OauthAuthorizationsResetAuthorizationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) for this method, where the username is the OAuth application `client_id` and the password is its `client_secret`. - */ - revokeAuthorizationForApplication: { - ( - params?: Octokit.OauthAuthorizationsRevokeAuthorizationForApplicationParams - ): Promise< - Octokit.Response< - Octokit.OauthAuthorizationsRevokeAuthorizationForApplicationResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) for this method, where the username is the OAuth application `client_id` and the password is its `client_secret`. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted. - * - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). - */ - revokeGrantForApplication: { - ( - params?: Octokit.OauthAuthorizationsRevokeGrantForApplicationParams - ): Promise< - Octokit.Response< - Octokit.OauthAuthorizationsRevokeGrantForApplicationResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - }; - orgs: { - /** - * List organizations for the authenticated user. - * - * **OAuth scope requirements** - * - * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. - */ - listForAuthenticatedUser: { - (params?: Octokit.OrgsListForAuthenticatedUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists all organizations, in the order that they were created on GitHub. - * - * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of organizations. - */ - list: { - (params?: Octokit.OrgsListParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List [public organization memberships](https://help.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. - * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List your organizations](https://developer.github.com/v3/orgs/#list-your-organizations) API instead. - */ - listForUser: { - (params?: Octokit.OrgsListForUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). - * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see "[Response with GitHub plan information](https://developer.github.com/v3/orgs/#response-with-github-plan-information)." - */ - get: { - (params?: Octokit.OrgsGetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** The new `members_allowed_repository_creation_type` replaces the functionality of `members_can_create_repositories`. - * - * Setting `members_allowed_repository_creation_type` will override the value of `members_can_create_repositories` in the following ways: - * - * * Setting `members_allowed_repository_creation_type` to `all` or `private` sets `members_can_create_repositories` to `true`. - * * Setting `members_allowed_repository_creation_type` to `none` sets `members_can_create_repositories` to `false`. - * * If you omit `members_allowed_repository_creation_type`, `members_can_create_repositories` is not modified. - */ - update: { - (params?: Octokit.OrgsUpdateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List the users blocked by an organization. - */ - listBlockedUsers: { - (params?: Octokit.OrgsListBlockedUsersParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * If the user is blocked: - * - * If the user is not blocked: - */ - checkBlockedUser: { - (params?: Octokit.OrgsCheckBlockedUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - blockUser: { - (params?: Octokit.OrgsBlockUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - unblockUser: { - (params?: Octokit.OrgsUnblockUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listHooks: { - (params?: Octokit.OrgsListHooksParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getHook: { - (params?: Octokit.OrgsGetHookParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Here's how you can create a hook that posts payloads in JSON format: - */ - createHook: { - (params?: Octokit.OrgsCreateHookParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateHook: { - (params?: Octokit.OrgsUpdateHookParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. - */ - pingHook: { - (params?: Octokit.OrgsPingHookParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteHook: { - (params?: Octokit.OrgsDeleteHookParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. - */ - listMembers: { - (params?: Octokit.OrgsListMembersParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Check if a user is, publicly or privately, a member of the organization. - */ - checkMembership: { - (params?: Octokit.OrgsCheckMembershipParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. - */ - removeMember: { - (params?: Octokit.OrgsRemoveMemberParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Members of an organization can choose to have their membership publicized or not. - */ - listPublicMembers: { - (params?: Octokit.OrgsListPublicMembersParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - checkPublicMembership: { - (params?: Octokit.OrgsCheckPublicMembershipParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * The user can publicize their own membership. (A user cannot publicize the membership for another user.) - * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - */ - publicizeMembership: { - (params?: Octokit.OrgsPublicizeMembershipParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - concealMembership: { - (params?: Octokit.OrgsConcealMembershipParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * In order to get a user's membership with an organization, the authenticated user must be an organization member. - */ - getMembership: { - (params?: Octokit.OrgsGetMembershipParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Only authenticated organization owners can add a member to the organization or update the member's role. - * - * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://developer.github.com/v3/orgs/members/#get-organization-membership) will be `pending` until they accept the invitation. - * - * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. - * - * **Rate limits** - * - * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. - */ - addOrUpdateMembership: { - (params?: Octokit.OrgsAddOrUpdateMembershipParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. - * - * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. - */ - removeMembership: { - (params?: Octokit.OrgsRemoveMembershipParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. - */ - listInvitationTeams: { - (params?: Octokit.OrgsListInvitationTeamsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - */ - listPendingInvitations: { - (params?: Octokit.OrgsListPendingInvitationsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - createInvitation: { - (params?: Octokit.OrgsCreateInvitationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listMemberships: { - (params?: Octokit.OrgsListMembershipsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getMembershipForAuthenticatedUser: { - (params?: Octokit.OrgsGetMembershipForAuthenticatedUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateMembership: { - (params?: Octokit.OrgsUpdateMembershipParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List all users who are outside collaborators of an organization. - */ - listOutsideCollaborators: { - (params?: Octokit.OrgsListOutsideCollaboratorsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Removing a user from this list will remove them from all the organization's repositories. - */ - removeOutsideCollaborator: { - (params?: Octokit.OrgsRemoveOutsideCollaboratorParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". - */ - convertMemberToOutsideCollaborator: { - (params?: Octokit.OrgsConvertMemberToOutsideCollaboratorParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - projects: { - /** - * Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - */ - listForRepo: { - (params?: Octokit.ProjectsListForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - * - * s - */ - listForOrg: { - (params?: Octokit.ProjectsListForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listForUser: { - (params?: Octokit.ProjectsListForUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - */ - get: { - (params?: Octokit.ProjectsGetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - */ - createForRepo: { - (params?: Octokit.ProjectsCreateForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - */ - createForOrg: { - (params?: Octokit.ProjectsCreateForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - createForAuthenticatedUser: { - (params?: Octokit.ProjectsCreateForAuthenticatedUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. - */ - update: { - (params?: Octokit.ProjectsUpdateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Deletes a project board. Returns a `404 Not Found` status if projects are disabled. - */ - delete: { - (params?: Octokit.ProjectsDeleteParams): Promise; - - endpoint: Octokit.Endpoint; - }; - - listCards: { - (params?: Octokit.ProjectsListCardsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getCard: { - (params?: Octokit.ProjectsGetCardParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. - * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. - */ - createCard: { - (params?: Octokit.ProjectsCreateCardParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateCard: { - (params?: Octokit.ProjectsUpdateCardParams): Promise; - - endpoint: Octokit.Endpoint; - }; - - deleteCard: { - (params?: Octokit.ProjectsDeleteCardParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - moveCard: { - (params?: Octokit.ProjectsMoveCardParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. - */ - listCollaborators: { - (params?: Octokit.ProjectsListCollaboratorsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. - */ - reviewUserPermissionLevel: { - (params?: Octokit.ProjectsReviewUserPermissionLevelParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Adds a collaborator to a an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. - */ - addCollaborator: { - (params?: Octokit.ProjectsAddCollaboratorParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. - */ - removeCollaborator: { - (params?: Octokit.ProjectsRemoveCollaboratorParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listColumns: { - (params?: Octokit.ProjectsListColumnsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getColumn: { - (params?: Octokit.ProjectsGetColumnParams): Promise; - - endpoint: Octokit.Endpoint; - }; - - createColumn: { - (params?: Octokit.ProjectsCreateColumnParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - - updateColumn: { - (params?: Octokit.ProjectsUpdateColumnParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - - deleteColumn: { - (params?: Octokit.ProjectsDeleteColumnParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - moveColumn: { - (params?: Octokit.ProjectsMoveColumnParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - pulls: { - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - list: { - (params?: Octokit.PullsListParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Lists details of a pull request by providing its number. - * - * When you get, [create](https://developer.github.com/v3/pulls/#create-a-pull-request), or [edit](https://developer.github.com/v3/pulls/#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". - * - * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. - * - * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: - * - * * If merged as a [merge commit](https://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. - * * If merged via a [squash](https://help.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. - * * If [rebased](https://help.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. - * - * Pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - */ - get: { - (params?: Octokit.PullsGetParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsGetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - create: { - (params?: Octokit.PullsCreateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - createFromIssue: { - (params?: Octokit.PullsCreateFromIssueParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. - */ - updateBranch: { - (params?: Octokit.PullsUpdateBranchParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - */ - update: { - (params?: Octokit.PullsUpdateParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsUpdateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository). - */ - listCommits: { - (params?: Octokit.PullsListCommitsParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsListCommitsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** The response includes a maximum of 300 files. - */ - listFiles: { - (params?: Octokit.PullsListFilesParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsListFilesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - checkIfMerged: { - (params?: Octokit.PullsCheckIfMergedParamsDeprecatedNumber): Promise< - Octokit.AnyResponse - >; - (params?: Octokit.PullsCheckIfMergedParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - merge: { - (params?: Octokit.PullsMergeParamsDeprecatedNumber): Promise< - Octokit.AnyResponse - >; - (params?: Octokit.PullsMergeParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * By default, review comments are ordered by ascending ID. - */ - listComments: { - (params?: Octokit.PullsListCommentsParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsListCommentsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * By default, review comments are ordered by ascending ID. - */ - listCommentsForRepo: { - (params?: Octokit.PullsListCommentsForRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getComment: { - (params?: Octokit.PullsGetCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) endpoint. - * - * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - */ - createComment: { - (params?: Octokit.PullsCreateCommentParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsCreateCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) endpoint. - * - * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - */ - createCommentReply: { - (params?: Octokit.PullsCreateCommentReplyParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsCreateCommentReplyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateComment: { - (params?: Octokit.PullsUpdateCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteComment: { - (params?: Octokit.PullsDeleteCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listReviewRequests: { - (params?: Octokit.PullsListReviewRequestsParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsListReviewRequestsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - createReviewRequest: { - ( - params?: Octokit.PullsCreateReviewRequestParamsDeprecatedNumber - ): Promise>; - (params?: Octokit.PullsCreateReviewRequestParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteReviewRequest: { - ( - params?: Octokit.PullsDeleteReviewRequestParamsDeprecatedNumber - ): Promise>; - (params?: Octokit.PullsDeleteReviewRequestParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * The list of reviews returns in chronological order. - */ - listReviews: { - (params?: Octokit.PullsListReviewsParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsListReviewsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getReview: { - (params?: Octokit.PullsGetReviewParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsGetReviewParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deletePendingReview: { - ( - params?: Octokit.PullsDeletePendingReviewParamsDeprecatedNumber - ): Promise>; - (params?: Octokit.PullsDeletePendingReviewParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getCommentsForReview: { - ( - params?: Octokit.PullsGetCommentsForReviewParamsDeprecatedNumber - ): Promise>; - (params?: Octokit.PullsGetCommentsForReviewParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) endpoint. - * - * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - */ - createReview: { - (params?: Octokit.PullsCreateReviewParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsCreateReviewParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Update the review summary comment with new text. - */ - updateReview: { - (params?: Octokit.PullsUpdateReviewParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsUpdateReviewParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - submitReview: { - (params?: Octokit.PullsSubmitReviewParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsSubmitReviewParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** To dismiss a pull request review on a [protected branch](https://developer.github.com/v3/repos/branches/), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. - */ - dismissReview: { - (params?: Octokit.PullsDismissReviewParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.PullsDismissReviewParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - rateLimit: { - /** - * **Note:** Accessing this endpoint does not count against your REST API rate limit. - * - * **Understanding your rate limit status** - * - * The Search API has a [custom rate limit](https://developer.github.com/v3/search/#rate-limit), separate from the rate limit governing the rest of the REST API. The GraphQL API also has a [custom rate limit](https://developer.github.com/v4/guides/resource-limitations/#rate-limit) that is separate from and calculated differently than rate limits in the REST API. - * - * For these reasons, the Rate Limit API response categorizes your rate limit. Under `resources`, you'll see four objects: - * - * * The `core` object provides your rate limit status for all non-search-related resources in the REST API. - * * The `search` object provides your rate limit status for the [Search API](https://developer.github.com/v3/search/). - * * The `graphql` object provides your rate limit status for the [GraphQL API](https://developer.github.com/v4/). - * * The `integration_manifest` object provides your rate limit status for the [GitHub App Manifest code conversion](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration) endpoint. - * - * For more information on the headers and values in the rate limit response, see "[Rate limiting](https://developer.github.com/v3/#rate-limiting)." - * - * The `rate` object (shown at the bottom of the response above) is deprecated. - * - * If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. - */ - get: { - (params?: Octokit.EmptyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - reactions: { - /** - * List the reactions to a [commit comment](https://developer.github.com/v3/repos/comments/). - */ - listForCommitComment: { - (params?: Octokit.ReactionsListForCommitCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Create a reaction to a [commit comment](https://developer.github.com/v3/repos/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this commit comment. - */ - createForCommitComment: { - (params?: Octokit.ReactionsCreateForCommitCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List the reactions to an [issue](https://developer.github.com/v3/issues/). - */ - listForIssue: { - (params?: Octokit.ReactionsListForIssueParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.ReactionsListForIssueParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Create a reaction to an [issue](https://developer.github.com/v3/issues/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue. - */ - createForIssue: { - (params?: Octokit.ReactionsCreateForIssueParamsDeprecatedNumber): Promise< - Octokit.Response - >; - (params?: Octokit.ReactionsCreateForIssueParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List the reactions to an [issue comment](https://developer.github.com/v3/issues/comments/). - */ - listForIssueComment: { - (params?: Octokit.ReactionsListForIssueCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Create a reaction to an [issue comment](https://developer.github.com/v3/issues/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue comment. - */ - createForIssueComment: { - (params?: Octokit.ReactionsCreateForIssueCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List the reactions to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). - */ - listForPullRequestReviewComment: { - ( - params?: Octokit.ReactionsListForPullRequestReviewCommentParams - ): Promise< - Octokit.Response< - Octokit.ReactionsListForPullRequestReviewCommentResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Create a reaction to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this pull request review comment. - */ - createForPullRequestReviewComment: { - ( - params?: Octokit.ReactionsCreateForPullRequestReviewCommentParams - ): Promise< - Octokit.Response< - Octokit.ReactionsCreateForPullRequestReviewCommentResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - listForTeamDiscussion: { - (params?: Octokit.ReactionsListForTeamDiscussionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Create a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion. - */ - createForTeamDiscussion: { - (params?: Octokit.ReactionsCreateForTeamDiscussionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List the reactions to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - listForTeamDiscussionComment: { - (params?: Octokit.ReactionsListForTeamDiscussionCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Create a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion comment. - */ - createForTeamDiscussionComment: { - (params?: Octokit.ReactionsCreateForTeamDiscussionCommentParams): Promise< - Octokit.Response< - Octokit.ReactionsCreateForTeamDiscussionCommentResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://developer.github.com/v3/teams/discussions/) or [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). - */ - delete: { - (params?: Octokit.ReactionsDeleteParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - repos: { - /** - * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. - */ - list: { - (params?: Octokit.ReposListParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists public repositories for the specified user. - */ - listForUser: { - (params?: Octokit.ReposListForUserParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists repositories for the specified organization. - */ - listForOrg: { - (params?: Octokit.ReposListForOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists all public repositories in the order that they were created. - * - * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of repositories. - */ - listPublic: { - (params?: Octokit.ReposListPublicParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a new repository for the authenticated user. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository - * * `repo` scope to create a private repository - */ - createForAuthenticatedUser: { - (params?: Octokit.ReposCreateForAuthenticatedUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a new repository for the authenticated user. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository - * * `repo` scope to create a private repository - */ - createInOrg: { - (params?: Octokit.ReposCreateInOrgParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a new repository using a repository template. Use the `repo` route parameter to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [`GET /repos/:owner/:repo`](https://developer.github.com/v3/repos/#get) endpoint and check that the `is_template` key is `true`. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository - * * `repo` scope to create a private repository - * - * \` - */ - createUsingTemplate: { - (params?: Octokit.ReposCreateUsingTemplateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. - */ - get: { - (params?: Octokit.ReposGetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note**: To edit a repository's topics, use the [`topics` endpoint](https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository). - */ - update: { - (params?: Octokit.ReposUpdateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listTopics: { - (params?: Octokit.ReposListTopicsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - replaceTopics: { - (params?: Octokit.ReposReplaceTopicsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Shows whether vulnerability alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. - */ - checkVulnerabilityAlerts: { - (params?: Octokit.ReposCheckVulnerabilityAlertsParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Enables vulnerability alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. - */ - enableVulnerabilityAlerts: { - (params?: Octokit.ReposEnableVulnerabilityAlertsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Disables vulnerability alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. - */ - disableVulnerabilityAlerts: { - (params?: Octokit.ReposDisableVulnerabilityAlertsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. - */ - enableAutomatedSecurityFixes: { - (params?: Octokit.ReposEnableAutomatedSecurityFixesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. - */ - disableAutomatedSecurityFixes: { - (params?: Octokit.ReposDisableAutomatedSecurityFixesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. - * - * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. - */ - listContributors: { - (params?: Octokit.ReposListContributorsParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. - */ - listLanguages: { - (params?: Octokit.ReposListLanguagesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listTeams: { - (params?: Octokit.ReposListTeamsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listTags: { - (params?: Octokit.ReposListTagsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. - * - * If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: - */ - delete: { - (params?: Octokit.ReposDeleteParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://help.github.com/articles/about-repository-transfers/). - */ - transfer: { - (params?: Octokit.ReposTransferParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listBranches: { - (params?: Octokit.ReposListBranchesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getBranch: { - (params?: Octokit.ReposGetBranchParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - getBranchProtection: { - (params?: Octokit.ReposGetBranchProtectionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Protecting a branch requires admin or owner permissions to the repository. - * - * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. - * - * **Note**: The list of users and teams in total is limited to 100 items. - */ - updateBranchProtection: { - (params?: Octokit.ReposUpdateBranchProtectionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - removeBranchProtection: { - (params?: Octokit.ReposRemoveBranchProtectionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - getProtectedBranchRequiredStatusChecks: { - ( - params?: Octokit.ReposGetProtectedBranchRequiredStatusChecksParams - ): Promise< - Octokit.Response< - Octokit.ReposGetProtectedBranchRequiredStatusChecksResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. - */ - updateProtectedBranchRequiredStatusChecks: { - ( - params?: Octokit.ReposUpdateProtectedBranchRequiredStatusChecksParams - ): Promise< - Octokit.Response< - Octokit.ReposUpdateProtectedBranchRequiredStatusChecksResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - removeProtectedBranchRequiredStatusChecks: { - ( - params?: Octokit.ReposRemoveProtectedBranchRequiredStatusChecksParams - ): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - listProtectedBranchRequiredStatusChecksContexts: { - ( - params?: Octokit.ReposListProtectedBranchRequiredStatusChecksContextsParams - ): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - replaceProtectedBranchRequiredStatusChecksContexts: { - ( - params?: Octokit.ReposReplaceProtectedBranchRequiredStatusChecksContextsParams - ): Promise< - Octokit.Response< - Octokit.ReposReplaceProtectedBranchRequiredStatusChecksContextsResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - addProtectedBranchRequiredStatusChecksContexts: { - ( - params?: Octokit.ReposAddProtectedBranchRequiredStatusChecksContextsParams - ): Promise< - Octokit.Response< - Octokit.ReposAddProtectedBranchRequiredStatusChecksContextsResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - removeProtectedBranchRequiredStatusChecksContexts: { - ( - params?: Octokit.ReposRemoveProtectedBranchRequiredStatusChecksContextsParams - ): Promise< - Octokit.Response< - Octokit.ReposRemoveProtectedBranchRequiredStatusChecksContextsResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - getProtectedBranchPullRequestReviewEnforcement: { - ( - params?: Octokit.ReposGetProtectedBranchPullRequestReviewEnforcementParams - ): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - * - * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. - */ - updateProtectedBranchPullRequestReviewEnforcement: { - ( - params?: Octokit.ReposUpdateProtectedBranchPullRequestReviewEnforcementParams - ): Promise< - Octokit.Response< - Octokit.ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - removeProtectedBranchPullRequestReviewEnforcement: { - ( - params?: Octokit.ReposRemoveProtectedBranchPullRequestReviewEnforcementParams - ): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://help.github.com/articles/signing-commits-with-gpg) in GitHub Help. - * - * **Note**: You must enable branch protection to require signed commits. - */ - getProtectedBranchRequiredSignatures: { - ( - params?: Octokit.ReposGetProtectedBranchRequiredSignaturesParams - ): Promise< - Octokit.Response< - Octokit.ReposGetProtectedBranchRequiredSignaturesResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. - */ - addProtectedBranchRequiredSignatures: { - ( - params?: Octokit.ReposAddProtectedBranchRequiredSignaturesParams - ): Promise< - Octokit.Response< - Octokit.ReposAddProtectedBranchRequiredSignaturesResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. - */ - removeProtectedBranchRequiredSignatures: { - ( - params?: Octokit.ReposRemoveProtectedBranchRequiredSignaturesParams - ): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - getProtectedBranchAdminEnforcement: { - (params?: Octokit.ReposGetProtectedBranchAdminEnforcementParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - */ - addProtectedBranchAdminEnforcement: { - (params?: Octokit.ReposAddProtectedBranchAdminEnforcementParams): Promise< - Octokit.Response< - Octokit.ReposAddProtectedBranchAdminEnforcementResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - */ - removeProtectedBranchAdminEnforcement: { - ( - params?: Octokit.ReposRemoveProtectedBranchAdminEnforcementParams - ): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * **Note**: Teams and users `restrictions` are only available for organization-owned repositories. - */ - getProtectedBranchRestrictions: { - (params?: Octokit.ReposGetProtectedBranchRestrictionsParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Disables the ability to restrict who can push to this branch. - */ - removeProtectedBranchRestrictions: { - (params?: Octokit.ReposRemoveProtectedBranchRestrictionsParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Lists the teams who have push access to this branch. If you pass the `hellcat-preview` media type, the list includes child teams. - */ - listProtectedBranchTeamRestrictions: { - ( - params?: Octokit.ReposListProtectedBranchTeamRestrictionsParams - ): Promise< - Octokit.Response< - Octokit.ReposListProtectedBranchTeamRestrictionsResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. If you pass the `hellcat-preview` media type, you can include child teams. - * - * | Type | Description | - * | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users and teams in total is limited to 100 items. | - */ - replaceProtectedBranchTeamRestrictions: { - ( - params?: Octokit.ReposReplaceProtectedBranchTeamRestrictionsParams - ): Promise< - Octokit.Response< - Octokit.ReposReplaceProtectedBranchTeamRestrictionsResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Grants the specified teams push access for this branch. If you pass the `hellcat-preview` media type, you can also give push access to child teams. - * - * | Type | Description | - * | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users and teams in total is limited to 100 items. | - */ - addProtectedBranchTeamRestrictions: { - (params?: Octokit.ReposAddProtectedBranchTeamRestrictionsParams): Promise< - Octokit.Response< - Octokit.ReposAddProtectedBranchTeamRestrictionsResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Removes the ability of a team to push to this branch. If you pass the `hellcat-preview` media type, you can include child teams. - * - * | Type | Description | - * | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users and teams in total is limited to 100 items. | - */ - removeProtectedBranchTeamRestrictions: { - ( - params?: Octokit.ReposRemoveProtectedBranchTeamRestrictionsParams - ): Promise< - Octokit.Response< - Octokit.ReposRemoveProtectedBranchTeamRestrictionsResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Lists the people who have push access to this branch. - */ - listProtectedBranchUserRestrictions: { - ( - params?: Octokit.ReposListProtectedBranchUserRestrictionsParams - ): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames for people who can have push access. **Note**: The list of users and teams in total is limited to 100 items. | - */ - replaceProtectedBranchUserRestrictions: { - ( - params?: Octokit.ReposReplaceProtectedBranchUserRestrictionsParams - ): Promise< - Octokit.Response< - Octokit.ReposReplaceProtectedBranchUserRestrictionsResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Grants the specified people push access for this branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames for people who can have push access. **Note**: The list of users and teams in total is limited to 100 items. | - */ - addProtectedBranchUserRestrictions: { - (params?: Octokit.ReposAddProtectedBranchUserRestrictionsParams): Promise< - Octokit.Response< - Octokit.ReposAddProtectedBranchUserRestrictionsResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Removes the ability of a team to push to this branch. - * - * | Type | Description | - * | ------- | -------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users and teams in total is limited to 100 items. | - */ - removeProtectedBranchUserRestrictions: { - ( - params?: Octokit.ReposRemoveProtectedBranchUserRestrictionsParams - ): Promise< - Octokit.Response< - Octokit.ReposRemoveProtectedBranchUserRestrictionsResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * If you pass the `hellcat-preview` media type, team members will include the members of child teams. - */ - listCollaborators: { - (params?: Octokit.ReposListCollaboratorsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * If you pass the `hellcat-preview` media type, team members will include the members of child teams. - */ - checkCollaborator: { - (params?: Octokit.ReposCheckCollaboratorParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Possible values for the `permission` key: `admin`, `write`, `read`, `none`. - */ - getCollaboratorPermissionLevel: { - (params?: Octokit.ReposGetCollaboratorPermissionLevelParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - * - * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://developer.github.com/v3/repos/invitations/). - * - * **Rate limits** - * - * To prevent abuse, you are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. - */ - addCollaborator: { - (params?: Octokit.ReposAddCollaboratorParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - - removeCollaborator: { - (params?: Octokit.ReposRemoveCollaboratorParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Commit Comments use [these custom media types](https://developer.github.com/v3/repos/comments/#custom-media-types). You can read more about the use of media types in the API [here](https://developer.github.com/v3/media/). - * - * Comments are ordered by ascending ID. - */ - listCommitComments: { - (params?: Octokit.ReposListCommitCommentsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Use the `:commit_sha` to specify the commit that will have its comments listed. - */ - listCommentsForCommit: { - (params?: Octokit.ReposListCommentsForCommitParamsDeprecatedRef): Promise< - Octokit.Response - >; - (params?: Octokit.ReposListCommentsForCommitParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Create a comment for a commit using its `:commit_sha`. - * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - createCommitComment: { - (params?: Octokit.ReposCreateCommitCommentParamsDeprecatedSha): Promise< - Octokit.Response - >; - (params?: Octokit.ReposCreateCommitCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getCommitComment: { - (params?: Octokit.ReposGetCommitCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateCommitComment: { - (params?: Octokit.ReposUpdateCommitCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteCommitComment: { - (params?: Octokit.ReposDeleteCommitCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - listCommits: { - (params?: Octokit.ReposListCommitsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. - * - * You can pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. - * - * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - getCommit: { - (params?: Octokit.ReposGetCommitParamsDeprecatedCommitSha): Promise< - Octokit.Response - >; - (params?: Octokit.ReposGetCommitParamsDeprecatedSha): Promise< - Octokit.Response - >; - (params?: Octokit.ReposGetCommitParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** To access this endpoint, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header: - * - * ``` - * application/vnd.github.VERSION.sha - * - * ``` - * - * Returns the SHA-1 of the commit reference. You must have `read` access for the repository to get the SHA-1 of a commit reference. You can use this endpoint to check if a remote reference's SHA-1 is the same as your local reference's SHA-1 by providing the local SHA-1 reference as the ETag. - */ - getCommitRefSha: { - (params?: Octokit.ReposGetCommitRefShaParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`. - * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - * - * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. - * - * **Working with large comparisons** - * - * The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository) to enumerate all commits in the range. - * - * For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long to generate. You can typically resolve this error by using a smaller commit range. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - compareCommits: { - (params?: Octokit.ReposCompareCommitsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. - */ - listBranchesForHeadCommit: { - (params?: Octokit.ReposListBranchesForHeadCommitParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists all pull requests containing the provided commit SHA, which can be from any point in the commit history. The results will include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoint. - */ - listPullRequestsAssociatedWithCommit: { - ( - params?: Octokit.ReposListPullRequestsAssociatedWithCommitParams - ): Promise< - Octokit.Response< - Octokit.ReposListPullRequestsAssociatedWithCommitResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint will return all community profile metrics, including an overall health score, repository description, the presence of documentation, detected code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, README, and CONTRIBUTING files. - */ - retrieveCommunityProfileMetrics: { - (params?: Octokit.ReposRetrieveCommunityProfileMetricsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Gets the preferred README for a repository. - * - * READMEs support [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML. - */ - getReadme: { - (params?: Octokit.ReposGetReadmeParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit `:path`, you will receive the contents of all files in the repository. - * - * Files and symlinks support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML (when supported). All content types support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) to ensure the content is returned in a consistent object format. - * - * **Note**: - * - * * To get a repository's contents recursively, you can [recursively get the tree](https://developer.github.com/v3/git/trees/). - * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees API](https://developer.github.com/v3/git/trees/#get-a-tree). - * * This API supports files up to 1 megabyte in size. - * - * The response will be an array of objects, one object for each item in the directory. - * - * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). In the next major version of the API, the type will be returned as "submodule". - * - * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the API responds with the content of the file (in the [format shown above](https://developer.github.com/v3/repos/contents/#response-if-content-is-a-file)). - * - * Otherwise, the API responds with an object describing the symlink itself: - * - * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. - * - * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the github.com URLs (`html_url` and `_links["html"]`) will have null values. - */ - getContents: { - (params?: Octokit.ReposGetContentsParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a new file or updates an existing file in a repository. - */ - createOrUpdateFile: { - (params?: Octokit.ReposCreateOrUpdateFileParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a new file or updates an existing file in a repository. - */ - createFile: { - (params?: Octokit.ReposCreateFileParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a new file or updates an existing file in a repository. - */ - updateFile: { - (params?: Octokit.ReposUpdateFileParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Deletes a file in a repository. - * - * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. - * - * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. - * - * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. - */ - deleteFile: { - (params?: Octokit.ReposDeleteFileParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Gets a redirect URL to download an archive for a repository. The `:archive_format` can be either `tarball` or `zipball`. The `:ref` must be a valid Git reference. If you omit `:ref`, the repository’s default branch (usually `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use the `Location` header to make a second `GET` request. - * - * _Note_: For private repositories, these links are temporary and expire after five minutes. - * - * To follow redirects with curl, use the `-L` switch: - */ - getArchiveLink: { - (params?: Octokit.ReposGetArchiveLinkParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Simple filtering of deployments is available via query parameters: - */ - listDeployments: { - (params?: Octokit.ReposListDeploymentsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getDeployment: { - (params?: Octokit.ReposGetDeploymentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Deployments offer a few configurable parameters with sane defaults. - * - * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them before we merge a pull request. - * - * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter makes it easier to track which environments have requested deployments. The default environment is `production`. - * - * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will return a failure response. - * - * By default, [commit statuses](https://developer.github.com/v3/repos/statuses) for every submitted context must be in a `success` state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do not require any contexts or create any commit statuses, the deployment will always succeed. - * - * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text field that will be passed on when a deployment event is dispatched. - * - * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an application with debugging enabled. - * - * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref: - * - * A simple example putting the user and room into the payload to notify back to chat networks. - * - * A more advanced example specifying required commit statuses and bypassing auto-merging. - * - * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating a deployment. This auto-merge happens when: - * - * * Auto-merge option is enabled in the repository - * * Topic branch does not include the latest changes on the base branch, which is `master`in the response example - * * There are no merge conflicts - * - * If there are no new commits in the base branch, a new request to create a deployment should give a successful response. - * - * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. - * - * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. - */ - createDeployment: { - (params?: Octokit.ReposCreateDeploymentParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with pull access can view deployment statuses for a deployment: - */ - listDeploymentStatuses: { - (params?: Octokit.ReposListDeploymentStatusesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with pull access can view a deployment status for a deployment: - */ - getDeploymentStatus: { - (params?: Octokit.ReposGetDeploymentStatusParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with `push` access can create deployment statuses for a given deployment. - * - * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. - */ - createDeploymentStatus: { - (params?: Octokit.ReposCreateDeploymentStatusParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listDownloads: { - (params?: Octokit.ReposListDownloadsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getDownload: { - (params?: Octokit.ReposGetDownloadParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteDownload: { - (params?: Octokit.ReposDeleteDownloadParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listForks: { - (params?: Octokit.ReposListForksParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Create a fork for the authenticated user. - * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://github.com/contact). - */ - createFork: { - (params?: Octokit.ReposCreateForkParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listHooks: { - (params?: Octokit.ReposListHooksParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getHook: { - (params?: Octokit.ReposGetHookParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can share the same `config` as long as those webhooks do not have any `events` that overlap. - * - * Here's how you can create a hook that posts payloads in JSON format: - */ - createHook: { - (params?: Octokit.ReposCreateHookParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateHook: { - (params?: Octokit.ReposUpdateHookParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. - * - * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` - */ - testPushHook: { - (params?: Octokit.ReposTestPushHookParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. - */ - pingHook: { - (params?: Octokit.ReposPingHookParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteHook: { - (params?: Octokit.ReposDeleteHookParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. - */ - listInvitations: { - (params?: Octokit.ReposListInvitationsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteInvitation: { - (params?: Octokit.ReposDeleteInvitationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateInvitation: { - (params?: Octokit.ReposUpdateInvitationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * When authenticating as a user, this endpoint will list all currently open repository invitations for that user. - */ - listInvitationsForAuthenticatedUser: { - ( - params?: Octokit.ReposListInvitationsForAuthenticatedUserParams - ): Promise< - Octokit.Response< - Octokit.ReposListInvitationsForAuthenticatedUserResponse - > - >; - - endpoint: Octokit.Endpoint; - }; - - acceptInvitation: { - (params?: Octokit.ReposAcceptInvitationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - declineInvitation: { - (params?: Octokit.ReposDeclineInvitationParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listDeployKeys: { - (params?: Octokit.ReposListDeployKeysParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getDeployKey: { - (params?: Octokit.ReposGetDeployKeyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Here's how you can create a read-only deploy key: - */ - addDeployKey: { - (params?: Octokit.ReposAddDeployKeyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - removeDeployKey: { - (params?: Octokit.ReposRemoveDeployKeyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - merge: { - (params?: Octokit.ReposMergeParams): Promise; - - endpoint: Octokit.Endpoint; - }; - - getPages: { - (params?: Octokit.ReposGetPagesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - enablePagesSite: { - (params?: Octokit.ReposEnablePagesSiteParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - disablePagesSite: { - (params?: Octokit.ReposDisablePagesSiteParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - updateInformationAboutPagesSite: { - (params?: Octokit.ReposUpdateInformationAboutPagesSiteParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. - * - * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. - */ - requestPageBuild: { - (params?: Octokit.ReposRequestPageBuildParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listPagesBuilds: { - (params?: Octokit.ReposListPagesBuildsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getLatestPagesBuild: { - (params?: Octokit.ReposGetLatestPagesBuildParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - getPagesBuild: { - (params?: Octokit.ReposGetPagesBuildParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://developer.github.com/v3/repos/#list-tags). - * - * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. - */ - listReleases: { - (params?: Octokit.ReposListReleasesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://developer.github.com/v3/#hypermedia). - */ - getRelease: { - (params?: Octokit.ReposGetReleaseParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * View the latest published full release for the repository. - * - * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. - */ - getLatestRelease: { - (params?: Octokit.ReposGetLatestReleaseParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Get a published release with the specified tag. - */ - getReleaseByTag: { - (params?: Octokit.ReposGetReleaseByTagParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with push access to the repository can create a release. - * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - createRelease: { - (params?: Octokit.ReposCreateReleaseParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with push access to the repository can edit a release. - */ - updateRelease: { - (params?: Octokit.ReposUpdateReleaseParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with push access to the repository can delete a release. - */ - deleteRelease: { - (params?: Octokit.ReposDeleteReleaseParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listAssetsForRelease: { - (params?: Octokit.ReposListAssetsForReleaseParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint makes use of [a Hypermedia relation](https://developer.github.com/v3/#hypermedia) to determine which URL to access. This endpoint is provided by a URI template in [the release's API response](https://developer.github.com/v3/repos/releases/#get-a-single-release). You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. - * - * The asset data is expected in its raw binary form, rather than JSON. Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset. - * - * Send the raw binary content of the asset as the request body. - * - * This may leave an empty asset with a state of `"new"`. It can be safely deleted. - */ - uploadReleaseAsset: { - (params?: Octokit.ReposUploadReleaseAssetParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://developer.github.com/v3/media/#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. - */ - getReleaseAsset: { - (params?: Octokit.ReposGetReleaseAssetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with push access to the repository can edit a release asset. - */ - updateReleaseAsset: { - (params?: Octokit.ReposUpdateReleaseAssetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - deleteReleaseAsset: { - (params?: Octokit.ReposDeleteReleaseAssetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * * `total` - The Total number of commits authored by the contributor. - * - * Weekly Hash (`weeks` array): - * - * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). - * * `a` - Number of additions - * * `d` - Number of deletions - * * `c` - Number of commits - */ - getContributorsStats: { - (params?: Octokit.ReposGetContributorsStatsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. - */ - getCommitActivityStats: { - (params?: Octokit.ReposGetCommitActivityStatsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Returns a weekly aggregate of the number of additions and deletions pushed to a repository. - */ - getCodeFrequencyStats: { - (params?: Octokit.ReposGetCodeFrequencyStatsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. - * - * The array order is oldest week (index 0) to most recent week. - */ - getParticipationStats: { - (params?: Octokit.ReposGetParticipationStatsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Each array contains the day number, hour number, and number of commits: - * - * * `0-6`: Sunday - Saturday - * * `0-23`: Hour of day - * * Number of commits - * - * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. - */ - getPunchCardStats: { - (params?: Octokit.ReposGetPunchCardStatsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with push access in a repository can create commit statuses for a given SHA. - * - * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. - */ - createStatus: { - (params?: Octokit.ReposCreateStatusParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. - * - * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. - */ - listStatusesForRef: { - (params?: Octokit.ReposListStatusesForRefParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. - * - * The most recent status for each context is returned, up to 100. This field [paginates](https://developer.github.com/v3/#pagination) if there are over 100 contexts. - * - * Additionally, a combined `state` is returned. The `state` is one of: - * - * * **failure** if any of the contexts report as `error` or `failure` - * * **pending** if there are no statuses or a context is `pending` - * * **success** if the latest status for all contexts is `success` - */ - getCombinedStatusForRef: { - (params?: Octokit.ReposGetCombinedStatusForRefParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Get the top 10 referrers over the last 14 days. - */ - getTopReferrers: { - (params?: Octokit.ReposGetTopReferrersParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Get the top 10 popular contents over the last 14 days. - */ - getTopPaths: { - (params?: Octokit.ReposGetTopPathsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. - */ - getViews: { - (params?: Octokit.ReposGetViewsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. - */ - getClones: { - (params?: Octokit.ReposGetClonesParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - scim: {}; - search: { - /** - * Find repositories via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * Suppose you want to search for popular Tetris repositories written in Assembly. Your query might look like this. - * - * You can search for multiple topics by adding more `topic:` instances, and including the `mercy-preview` header. For example: - * - * In this request, we're searching for repositories with the word `tetris` in the name, the description, or the README. We're limiting the results to only find repositories where the primary language is Assembly. We're sorting by stars in descending order, so that the most popular repositories appear first in the search results. - */ - repos: { - (params?: Octokit.SearchReposParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Find commits via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * **Considerations for commit search** - * - * Only the _default branch_ is considered. In most cases, this will be the `master` branch. - * - * Suppose you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: - */ - commits: { - (params?: Octokit.SearchCommitsParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Find file contents via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * **Note:** You must [authenticate](https://developer.github.com/v3/#authentication) to search for code across all public repositories. - * - * **Considerations for code search** - * - * Due to the complexity of searching code, there are a few restrictions on how searches are performed: - * - * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. - * * Only files smaller than 384 KB are searchable. - * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. - * - * Suppose you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery). Your query would look something like this: - * - * Here, we're searching for the keyword `addClass` within a file's contents. We're making sure that we're only looking in files where the language is JavaScript. And we're scoping the search to the `repo:jquery/jquery` repository. - */ - code: { - (params?: Octokit.SearchCodeParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. - * - * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. - */ - issuesAndPullRequests: { - (params?: Octokit.SearchIssuesAndPullRequestsParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. - * - * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. - */ - issues: { - (params?: Octokit.SearchIssuesParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Find users via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * Imagine you're looking for a list of popular users. You might try out this query: - * - * Here, we're looking at users with the name Tom. We're only interested in those with more than 42 repositories, and only if they have over 1,000 followers. - */ - users: { - (params?: Octokit.SearchUsersParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - * - * Suppose you want to search for topics related to Ruby that are featured on [https://github.com/topics](https://github.com/topics). Your query might look like this: - * - * In this request, we're searching for topics with the keyword `ruby`, and we're limiting the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. - * - * **Note:** A search for featured Ruby topics only has 6 total results, so a [Link header](https://developer.github.com/v3/#link-header) indicating pagination is not included in the response. - */ - topics: { - (params?: Octokit.SearchTopicsParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * Suppose you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: - * - * The labels that best match for the query appear first in the search results. - */ - labels: { - (params?: Octokit.SearchLabelsParams): Promise; - - endpoint: Octokit.Endpoint; - }; - }; - teams: { - list: { - (params?: Octokit.TeamsListParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - get: { - (params?: Octokit.TeamsGetParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. - */ - getByName: { - (params?: Octokit.TeamsGetByNameParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * To create a team, the authenticated user must be a member or owner of `:org`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://help.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." - */ - create: { - (params?: Octokit.TeamsCreateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * To edit a team, the authenticated user must either be an owner of the org that the team is associated with, or a maintainer of the team. - * - * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. - */ - update: { - (params?: Octokit.TeamsUpdateParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * To delete a team, the authenticated user must be a team maintainer or an owner of the org associated with the team. - * - * If you are an organization owner and you pass the `hellcat-preview` media type, deleting a parent team will delete all of its child teams as well. - */ - delete: { - (params?: Octokit.TeamsDeleteParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * At this time, the `hellcat-preview` media type is required to use this endpoint. - */ - listChild: { - (params?: Octokit.TeamsListChildParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note**: If you pass the `hellcat-preview` media type, the response will include any repositories inherited through a parent team. - */ - listRepos: { - (params?: Octokit.TeamsListReposParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note**: If you pass the `hellcat-preview` media type, repositories inherited through a parent team will be checked. - * - * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: - */ - checkManagesRepo: { - (params?: Octokit.TeamsCheckManagesRepoParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. - * - * If you pass the `hellcat-preview` media type, you can modify repository permissions of child teams. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - */ - addOrUpdateRepo: { - (params?: Octokit.TeamsAddOrUpdateRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. - */ - removeRepo: { - (params?: Octokit.TeamsRemoveRepoParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://developer.github.com/apps/building-oauth-apps/). - */ - listForAuthenticatedUser: { - (params?: Octokit.TeamsListForAuthenticatedUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists the organization projects for a team. If you pass the `hellcat-preview` media type, the response will include projects inherited from a parent team. - */ - listProjects: { - (params?: Octokit.TeamsListProjectsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. If you pass the `hellcat-preview` media type, the response will include projects inherited from a parent team. - */ - reviewProject: { - (params?: Octokit.TeamsReviewProjectParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. - */ - addOrUpdateProject: { - (params?: Octokit.TeamsAddOrUpdateProjectParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. - */ - removeProject: { - (params?: Octokit.TeamsRemoveProjectParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - listDiscussionComments: { - (params?: Octokit.TeamsListDiscussionCommentsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - getDiscussionComment: { - (params?: Octokit.TeamsGetDiscussionCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - createDiscussionComment: { - (params?: Octokit.TeamsCreateDiscussionCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - updateDiscussionComment: { - (params?: Octokit.TeamsUpdateDiscussionCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - deleteDiscussionComment: { - (params?: Octokit.TeamsDeleteDiscussionCommentParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - listDiscussions: { - (params?: Octokit.TeamsListDiscussionsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - getDiscussion: { - (params?: Octokit.TeamsGetDiscussionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - createDiscussion: { - (params?: Octokit.TeamsCreateDiscussionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - updateDiscussion: { - (params?: Octokit.TeamsUpdateDiscussionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - deleteDiscussion: { - (params?: Octokit.TeamsDeleteDiscussionParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * If you pass the `hellcat-preview` media type, team members will include the members of child teams. - */ - listMembers: { - (params?: Octokit.TeamsListMembersParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * The "Get team member" API (described below) is deprecated. - * - * We recommend using the [Get team membership API](https://developer.github.com/v3/teams/members/#get-team-membership) instead. It allows you to get both active and pending memberships. - * - * To list members in a team, the team must be visible to the authenticated user. - */ - getMember: { - (params?: Octokit.TeamsGetMemberParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * The "Add team member" API (described below) is deprecated. - * - * We recommend using the [Add team membership API](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) instead. It allows you to invite new organization members to your teams. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. - * - * To add someone to a team, the authenticated user must be a team maintainer in the team they're changing or be an owner of the organization that the team is associated with. The person being added to the team must be a member of the team's organization. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - */ - addMember: { - (params?: Octokit.TeamsAddMemberParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * The "Remove team member" API (described below) is deprecated. - * - * We recommend using the [Remove team membership endpoint](https://developer.github.com/v3/teams/members/#remove-team-membership) instead. It allows you to remove both active and pending memberships. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. - * - * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - */ - removeMember: { - (params?: Octokit.TeamsRemoveMemberParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * If you pass the `hellcat-preview` media type, team members will include the members of child teams. - * - * To get a user's membership with a team, the team must be visible to the authenticated user. - * - * **Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team). - */ - getMembership: { - (params?: Octokit.TeamsGetMembershipParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. - * - * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a maintainer of the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. - * - * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a maintainer of the team. - */ - addOrUpdateMembership: { - (params?: Octokit.TeamsAddOrUpdateMembershipParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. - * - * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - */ - removeMembership: { - (params?: Octokit.TeamsRemoveMembershipParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - */ - listPendingInvitations: { - (params?: Octokit.TeamsListPendingInvitationsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; - users: { - /** - * Provides publicly available information about someone with a GitHub account. - * - * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see "[Response with GitHub plan information](https://developer.github.com/v3/users/#response-with-github-plan-information)." - * - * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://developer.github.com/v3/#authentication). - * - * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://developer.github.com/v3/users/emails/)". - */ - getByUsername: { - (params?: Octokit.UsersGetByUsernameParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists public and private profile information when authenticated through basic auth or OAuth with the `user` scope. - * - * Lists public profile information when authenticated through OAuth without the `user` scope. - */ - getAuthenticated: { - (params?: Octokit.EmptyParams): Promise; - - endpoint: Octokit.Endpoint; - }; - /** - * **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. - */ - updateAuthenticated: { - (params?: Octokit.UsersUpdateAuthenticatedParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. - * - * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: - */ - getContextForUser: { - (params?: Octokit.UsersGetContextForUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. - * - * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of users. - */ - list: { - (params?: Octokit.UsersListParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * List the users you've blocked on your personal account. - */ - listBlocked: { - (params?: Octokit.EmptyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * If the user is blocked: - * - * If the user is not blocked: - */ - checkBlocked: { - (params?: Octokit.UsersCheckBlockedParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - block: { - (params?: Octokit.UsersBlockParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - unblock: { - (params?: Octokit.UsersUnblockParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. - */ - listEmails: { - (params?: Octokit.UsersListEmailsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists your publicly visible email address, which you can set with the [Toggle primary email visibility](https://developer.github.com/v3/users/emails/#toggle-primary-email-visibility) endpoint. This endpoint is accessible with the `user:email` scope. - */ - listPublicEmails: { - (params?: Octokit.UsersListPublicEmailsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint is accessible with the `user` scope. - */ - addEmails: { - (params?: Octokit.UsersAddEmailsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * This endpoint is accessible with the `user` scope. - */ - deleteEmails: { - (params?: Octokit.UsersDeleteEmailsParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Sets the visibility for your primary email addresses. - */ - togglePrimaryEmailVisibility: { - (params?: Octokit.UsersTogglePrimaryEmailVisibilityParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listFollowersForUser: { - (params?: Octokit.UsersListFollowersForUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listFollowersForAuthenticatedUser: { - (params?: Octokit.UsersListFollowersForAuthenticatedUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listFollowingForUser: { - (params?: Octokit.UsersListFollowingForUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - listFollowingForAuthenticatedUser: { - (params?: Octokit.UsersListFollowingForAuthenticatedUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - - checkFollowing: { - (params?: Octokit.UsersCheckFollowingParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - - checkFollowingForUser: { - (params?: Octokit.UsersCheckFollowingForUserParams): Promise< - Octokit.AnyResponse - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - * - * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. - */ - follow: { - (params?: Octokit.UsersFollowParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. - */ - unfollow: { - (params?: Octokit.UsersUnfollowParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists the GPG keys for a user. This information is accessible by anyone. - */ - listGpgKeysForUser: { - (params?: Octokit.UsersListGpgKeysForUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - listGpgKeys: { - (params?: Octokit.UsersListGpgKeysParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - getGpgKey: { - (params?: Octokit.UsersGetGpgKeyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - createGpgKey: { - (params?: Octokit.UsersCreateGpgKeyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - deleteGpgKey: { - (params?: Octokit.UsersDeleteGpgKeyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists the _verified_ public SSH keys for a user. This is accessible by anyone. - */ - listPublicKeysForUser: { - (params?: Octokit.UsersListPublicKeysForUserParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - listPublicKeys: { - (params?: Octokit.UsersListPublicKeysParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - getPublicKey: { - (params?: Octokit.UsersGetPublicKeyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - createPublicKey: { - (params?: Octokit.UsersCreatePublicKeyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - /** - * Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - deletePublicKey: { - (params?: Octokit.UsersDeletePublicKeyParams): Promise< - Octokit.Response - >; - - endpoint: Octokit.Endpoint; - }; - }; -} - -export = Octokit; diff --git a/node_modules/@octokit/rest/index.js b/node_modules/@octokit/rest/index.js deleted file mode 100644 index 51359a1ad..000000000 --- a/node_modules/@octokit/rest/index.js +++ /dev/null @@ -1,16 +0,0 @@ -const Octokit = require('./lib/core') - -const CORE_PLUGINS = [ - require('./plugins/log'), - require('./plugins/authentication-deprecated'), // deprecated: remove in v17 - require('./plugins/authentication'), - require('./plugins/pagination'), - require('./plugins/normalize-git-reference-responses'), - require('./plugins/register-endpoints'), - require('./plugins/rest-api-endpoints'), - require('./plugins/validate'), - - require('octokit-pagination-methods') // deprecated: remove in v17 -] - -module.exports = Octokit.plugin(CORE_PLUGINS) diff --git a/node_modules/@octokit/rest/lib/constructor.js b/node_modules/@octokit/rest/lib/constructor.js deleted file mode 100644 index a62cea19e..000000000 --- a/node_modules/@octokit/rest/lib/constructor.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = Octokit - -const { request } = require('@octokit/request') -const Hook = require('before-after-hook') - -const parseClientOptions = require('./parse-client-options') - -function Octokit (plugins, options) { - options = options || {} - const hook = new Hook.Collection() - const log = Object.assign({ - debug: () => {}, - info: () => {}, - warn: console.warn, - error: console.error - }, options && options.log) - const api = { - hook, - log, - request: request.defaults(parseClientOptions(options, log, hook)) - } - - plugins.forEach(pluginFunction => pluginFunction(api, options)) - - return api -} diff --git a/node_modules/@octokit/rest/lib/core.js b/node_modules/@octokit/rest/lib/core.js deleted file mode 100644 index 23df1a620..000000000 --- a/node_modules/@octokit/rest/lib/core.js +++ /dev/null @@ -1,3 +0,0 @@ -const factory = require('./factory') - -module.exports = factory() diff --git a/node_modules/@octokit/rest/lib/factory.js b/node_modules/@octokit/rest/lib/factory.js deleted file mode 100644 index c56b3e7e4..000000000 --- a/node_modules/@octokit/rest/lib/factory.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = factory - -const Octokit = require('./constructor') -const registerPlugin = require('./register-plugin') - -function factory (plugins) { - const Api = Octokit.bind(null, plugins || []) - Api.plugin = registerPlugin.bind(null, plugins || []) - return Api -} diff --git a/node_modules/@octokit/rest/lib/parse-client-options.js b/node_modules/@octokit/rest/lib/parse-client-options.js deleted file mode 100644 index 42e4ab80d..000000000 --- a/node_modules/@octokit/rest/lib/parse-client-options.js +++ /dev/null @@ -1,64 +0,0 @@ -module.exports = parseOptions - -const { Deprecation } = require('deprecation') -const { getUserAgent } = require('universal-user-agent') -const once = require('once') - -const pkg = require('../package.json') - -const deprecateOptionsTimeout = once((log, deprecation) => log.warn(deprecation)) -const deprecateOptionsAgent = once((log, deprecation) => log.warn(deprecation)) -const deprecateOptionsHeaders = once((log, deprecation) => log.warn(deprecation)) - -function parseOptions (options, log, hook) { - if (options.headers) { - options.headers = Object.keys(options.headers).reduce((newObj, key) => { - newObj[key.toLowerCase()] = options.headers[key] - return newObj - }, {}) - } - - const clientDefaults = { - headers: options.headers || {}, - request: options.request || {}, - mediaType: { - previews: [], - format: '' - } - } - - if (options.baseUrl) { - clientDefaults.baseUrl = options.baseUrl - } - - if (options.userAgent) { - clientDefaults.headers['user-agent'] = options.userAgent - } - - if (options.previews) { - clientDefaults.mediaType.previews = options.previews - } - - if (options.timeout) { - deprecateOptionsTimeout(log, new Deprecation('[@octokit/rest] new Octokit({timeout}) is deprecated. Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request')) - clientDefaults.request.timeout = options.timeout - } - - if (options.agent) { - deprecateOptionsAgent(log, new Deprecation('[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/request.js#request')) - clientDefaults.request.agent = options.agent - } - - if (options.headers) { - deprecateOptionsHeaders(log, new Deprecation('[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request')) - } - - const userAgentOption = clientDefaults.headers['user-agent'] - const defaultUserAgent = `octokit.js/${pkg.version} ${getUserAgent()}` - - clientDefaults.headers['user-agent'] = [userAgentOption, defaultUserAgent].filter(Boolean).join(' ') - - clientDefaults.request.hook = hook.bind(null, 'request') - - return clientDefaults -} diff --git a/node_modules/@octokit/rest/lib/register-plugin.js b/node_modules/@octokit/rest/lib/register-plugin.js deleted file mode 100644 index c644c2962..000000000 --- a/node_modules/@octokit/rest/lib/register-plugin.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = registerPlugin - -const factory = require('./factory') - -function registerPlugin (plugins, pluginFunction) { - return factory(plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction)) -} diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/LICENSE.md b/node_modules/@octokit/rest/node_modules/universal-user-agent/LICENSE.md deleted file mode 100644 index f105ab0c0..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -# [ISC License](https://spdx.org/licenses/ISC) - -Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/README.md b/node_modules/@octokit/rest/node_modules/universal-user-agent/README.md deleted file mode 100644 index d00d14c1f..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# universal-user-agent - -> Get a user agent string in both browser and node - -[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) -[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) -[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) - -```js -const { getUserAgent } = require("universal-user-agent"); -// or import { getUserAgent } from "universal-user-agent"; - -const userAgent = getUserAgent(); -// userAgent will look like this -// in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" -// in node: Node.js/v8.9.4 (macOS High Sierra; x64) -``` - -## Credits - -The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). - -## License - -[ISC](LICENSE.md) diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js deleted file mode 100644 index 80a07105f..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var osName = _interopDefault(require('os-name')); - -function getUserAgent() { - try { - return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; - } catch (error) { - if (/wmic os get Caption/.test(error.message)) { - return "Windows "; - } - - throw error; - } -} - -exports.getUserAgent = getUserAgent; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js.map b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js.map deleted file mode 100644 index aff09ec41..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/node.js"],"sourcesContent":["import osName from \"os-name\";\nexport function getUserAgent() {\n try {\n return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;\n }\n catch (error) {\n if (/wmic os get Caption/.test(error.message)) {\n return \"Windows \";\n }\n throw error;\n }\n}\n"],"names":["getUserAgent","process","version","substr","osName","arch","error","test","message"],"mappings":";;;;;;;;AACO,SAASA,YAAT,GAAwB;MACvB;WACQ,WAAUC,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIC,MAAM,EAAG,KAAIH,OAAO,CAACI,IAAK,GAA1E;GADJ,CAGA,OAAOC,KAAP,EAAc;QACN,sBAAsBC,IAAtB,CAA2BD,KAAK,CAACE,OAAjC,CAAJ,EAA+C;aACpC,gCAAP;;;UAEEF,KAAN;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/browser.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/browser.js deleted file mode 100644 index 6f52232cb..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/browser.js +++ /dev/null @@ -1,3 +0,0 @@ -export function getUserAgent() { - return navigator.userAgent; -} diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/index.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/index.js deleted file mode 100644 index c6253f5ad..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/index.js +++ /dev/null @@ -1 +0,0 @@ -export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/node.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/node.js deleted file mode 100644 index 8b70a038c..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/node.js +++ /dev/null @@ -1,12 +0,0 @@ -import osName from "os-name"; -export function getUserAgent() { - try { - return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; - } - catch (error) { - if (/wmic os get Caption/.test(error.message)) { - return "Windows "; - } - throw error; - } -} diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/browser.d.ts b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/browser.d.ts deleted file mode 100644 index a7bb1c440..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/browser.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/index.d.ts b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/index.d.ts deleted file mode 100644 index c6253f5ad..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { getUserAgent } from "./node"; diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/node.d.ts b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/node.d.ts deleted file mode 100644 index a7bb1c440..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/node.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getUserAgent(): string; diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js deleted file mode 100644 index 11ec79b32..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js +++ /dev/null @@ -1,6 +0,0 @@ -function getUserAgent() { - return navigator.userAgent; -} - -export { getUserAgent }; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js.map b/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js.map deleted file mode 100644 index 549407ecb..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../dist-src/browser.js"],"sourcesContent":["export function getUserAgent() {\n return navigator.userAgent;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;IAC3B,OAAO,SAAS,CAAC,SAAS,CAAC;CAC9B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/rest/node_modules/universal-user-agent/package.json b/node_modules/@octokit/rest/node_modules/universal-user-agent/package.json deleted file mode 100644 index e72714e05..000000000 --- a/node_modules/@octokit/rest/node_modules/universal-user-agent/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_args": [ - [ - "universal-user-agent@4.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "universal-user-agent@4.0.0", - "_id": "universal-user-agent@4.0.0", - "_inBundle": false, - "_integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==", - "_location": "/@octokit/rest/universal-user-agent", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "universal-user-agent@4.0.0", - "name": "universal-user-agent", - "escapedName": "universal-user-agent", - "rawSpec": "4.0.0", - "saveSpec": null, - "fetchSpec": "4.0.0" - }, - "_requiredBy": [ - "/@octokit/rest" - ], - "_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz", - "_spec": "4.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "bugs": { - "url": "https://github.com/gr2m/universal-user-agent/issues" - }, - "dependencies": { - "os-name": "^3.1.0" - }, - "description": "Get a user agent string in both browser and node", - "devDependencies": { - "@gr2m/pika-plugin-build-web": "^0.6.0-issue-84.1", - "@pika/pack": "^0.5.0", - "@pika/plugin-build-node": "^0.6.0", - "@pika/plugin-ts-standard-pkg": "^0.6.0", - "@types/jest": "^24.0.18", - "jest": "^24.9.0", - "prettier": "^1.18.2", - "semantic-release": "^15.9.15", - "ts-jest": "^24.0.2", - "typescript": "^3.6.2" - }, - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/gr2m/universal-user-agent#readme", - "keywords": [], - "license": "ISC", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "universal-user-agent", - "pika": true, - "repository": { - "type": "git", - "url": "git+https://github.com/gr2m/universal-user-agent.git" - }, - "sideEffects": false, - "source": "dist-src/index.js", - "types": "dist-types/index.d.ts", - "version": "4.0.0" -} diff --git a/node_modules/@octokit/rest/package.json b/node_modules/@octokit/rest/package.json deleted file mode 100644 index 61916cc63..000000000 --- a/node_modules/@octokit/rest/package.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "_args": [ - [ - "@octokit/rest@16.28.9", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "@octokit/rest@16.28.9", - "_id": "@octokit/rest@16.28.9", - "_inBundle": false, - "_integrity": "sha512-IKGnX+Tvzt7XHhs8f4ajqxyJvYAMNX5nWfoJm4CQj8LZToMiaJgutf5KxxpxoC3y5w7JTJpW5rnWnF4TsIvCLA==", - "_location": "/@octokit/rest", - "_phantomChildren": { - "os-name": "3.1.0" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "@octokit/rest@16.28.9", - "name": "@octokit/rest", - "escapedName": "@octokit%2frest", - "scope": "@octokit", - "rawSpec": "16.28.9", - "saveSpec": null, - "fetchSpec": "16.28.9" - }, - "_requiredBy": [ - "/@actions/github" - ], - "_resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.28.9.tgz", - "_spec": "16.28.9", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Gregor Martynus", - "url": "https://github.com/gr2m" - }, - "bugs": { - "url": "https://github.com/octokit/rest.js/issues" - }, - "bundlesize": [ - { - "path": "./dist/octokit-rest.min.js.gz", - "maxSize": "33 kB" - } - ], - "contributors": [ - { - "name": "Mike de Boer", - "email": "info@mikedeboer.nl" - }, - { - "name": "Fabian Jakobs", - "email": "fabian@c9.io" - }, - { - "name": "Joe Gallo", - "email": "joe@brassafrax.com" - }, - { - "name": "Gregor Martynus", - "url": "https://github.com/gr2m" - } - ], - "dependencies": { - "@octokit/request": "^5.0.0", - "@octokit/request-error": "^1.0.2", - "atob-lite": "^2.0.0", - "before-after-hook": "^2.0.0", - "btoa-lite": "^1.0.0", - "deprecation": "^2.0.0", - "lodash.get": "^4.4.2", - "lodash.set": "^4.3.2", - "lodash.uniq": "^4.5.0", - "octokit-pagination-methods": "^1.1.0", - "once": "^1.4.0", - "universal-user-agent": "^4.0.0" - }, - "description": "GitHub REST API client for Node.js", - "devDependencies": { - "@gimenete/type-writer": "^0.1.3", - "@octokit/fixtures-server": "^5.0.1", - "@octokit/routes": "20.9.2", - "@types/node": "^12.0.0", - "bundlesize": "^0.18.0", - "chai": "^4.1.2", - "compression-webpack-plugin": "^3.0.0", - "coveralls": "^3.0.0", - "glob": "^7.1.2", - "http-proxy-agent": "^2.1.0", - "lodash.camelcase": "^4.3.0", - "lodash.merge": "^4.6.1", - "lodash.upperfirst": "^4.3.1", - "mkdirp": "^0.5.1", - "mocha": "^6.0.0", - "mustache": "^3.0.0", - "nock": "^10.0.0", - "npm-run-all": "^4.1.2", - "nyc": "^14.0.0", - "prettier": "^1.14.2", - "proxy": "^0.2.4", - "semantic-release": "^15.0.0", - "sinon": "^7.2.4", - "sinon-chai": "^3.0.0", - "sort-keys": "^4.0.0", - "standard": "^14.0.2", - "string-to-arraybuffer": "^1.0.0", - "string-to-jsdoc-comment": "^1.0.0", - "typescript": "^3.3.1", - "webpack": "^4.0.0", - "webpack-bundle-analyzer": "^3.0.0", - "webpack-cli": "^3.0.0" - }, - "files": [ - "index.js", - "index.d.ts", - "lib", - "plugins" - ], - "homepage": "https://github.com/octokit/rest.js#readme", - "keywords": [ - "octokit", - "github", - "rest", - "api-client" - ], - "license": "MIT", - "name": "@octokit/rest", - "nyc": { - "ignore": [ - "test" - ] - }, - "publishConfig": { - "access": "public" - }, - "release": { - "publish": [ - "@semantic-release/npm", - { - "path": "@semantic-release/github", - "assets": [ - "dist/*", - "!dist/*.map.gz" - ] - } - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/octokit/rest.js.git" - }, - "scripts": { - "build": "npm-run-all build:*", - "build:browser": "npm-run-all build:browser:*", - "build:browser:development": "webpack --mode development --entry . --output-library=Octokit --output=./dist/octokit-rest.js --profile --json > dist/bundle-stats.json", - "build:browser:production": "webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=Octokit --output-path=./dist --output-filename=octokit-rest.min.js --devtool source-map", - "build:ts": "node scripts/generate-types", - "coverage": "nyc report --reporter=html && open coverage/index.html", - "generate-bundle-report": "webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html", - "generate-routes": "node scripts/generate-routes", - "postvalidate:ts": "tsc --noEmit --target es6 test/typescript-validate.ts", - "prebuild:browser": "mkdirp dist/", - "pretest": "standard", - "prevalidate:ts": "npm run -s build:ts", - "start-fixtures-server": "octokit-fixtures-server", - "test": "nyc mocha test/mocha-node-setup.js \"test/*/**/*-test.js\"", - "test:browser": "cypress run --browser chrome", - "test:memory": "mocha test/memory-test", - "validate:ts": "tsc --target es6 --noImplicitAny index.d.ts" - }, - "standard": { - "globals": [ - "describe", - "before", - "beforeEach", - "afterEach", - "after", - "it", - "expect", - "cy" - ], - "ignore": [ - "/docs" - ] - }, - "types": "index.d.ts", - "version": "16.28.9" -} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js deleted file mode 100644 index 07b75f8d4..000000000 --- a/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = authenticate - -const { Deprecation } = require('deprecation') -const once = require('once') - -const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)) - -function authenticate (state, options) { - deprecateAuthenticate(state.octokit.log, new Deprecation('[@octokit/rest] octokit.authenticate() is deprecated. Use "auth" constructor option instead.')) - - if (!options) { - state.auth = false - return - } - - switch (options.type) { - case 'basic': - if (!options.username || !options.password) { - throw new Error('Basic authentication requires both a username and password to be set') - } - break - - case 'oauth': - if (!options.token && !(options.key && options.secret)) { - throw new Error('OAuth2 authentication requires a token or key & secret to be set') - } - break - - case 'token': - case 'app': - if (!options.token) { - throw new Error('Token authentication requires a token to be set') - } - break - - default: - throw new Error("Invalid authentication type, must be 'basic', 'oauth', 'token' or 'app'") - } - - state.auth = options -} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js deleted file mode 100644 index 357fbbb8d..000000000 --- a/node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = authenticationBeforeRequest - -const btoa = require('btoa-lite') -const uniq = require('lodash.uniq') - -function authenticationBeforeRequest (state, options) { - if (!state.auth.type) { - return - } - - if (state.auth.type === 'basic') { - const hash = btoa(`${state.auth.username}:${state.auth.password}`) - options.headers.authorization = `Basic ${hash}` - return - } - - if (state.auth.type === 'token') { - options.headers.authorization = `token ${state.auth.token}` - return - } - - if (state.auth.type === 'app') { - options.headers.authorization = `Bearer ${state.auth.token}` - const acceptHeaders = options.headers.accept.split(',') - .concat('application/vnd.github.machine-man-preview+json') - options.headers.accept = uniq(acceptHeaders).filter(Boolean).join(',') - return - } - - options.url += options.url.indexOf('?') === -1 ? '?' : '&' - - if (state.auth.token) { - options.url += `access_token=${encodeURIComponent(state.auth.token)}` - return - } - - const key = encodeURIComponent(state.auth.key) - const secret = encodeURIComponent(state.auth.secret) - options.url += `client_id=${key}&client_secret=${secret}` -} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js deleted file mode 100644 index 6793b30fb..000000000 --- a/node_modules/@octokit/rest/plugins/authentication-deprecated/index.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = authenticationPlugin - -const { Deprecation } = require('deprecation') -const once = require('once') - -const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)) - -const authenticate = require('./authenticate') -const beforeRequest = require('./before-request') -const requestError = require('./request-error') - -function authenticationPlugin (octokit, options) { - if (options.auth) { - octokit.authenticate = () => { - deprecateAuthenticate(octokit.log, new Deprecation('[@octokit/rest] octokit.authenticate() is deprecated and has no effect when "auth" option is set on Octokit constructor')) - } - return - } - const state = { - octokit, - auth: false - } - octokit.authenticate = authenticate.bind(null, state) - octokit.hook.before('request', beforeRequest.bind(null, state)) - octokit.hook.error('request', requestError.bind(null, state)) -} diff --git a/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js b/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js deleted file mode 100644 index 013259257..000000000 --- a/node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = authenticationRequestError - -const { RequestError } = require('@octokit/request-error') - -function authenticationRequestError (state, error, options) { - /* istanbul ignore next */ - if (!error.headers) throw error - - const otpRequired = /required/.test(error.headers['x-github-otp'] || '') - // handle "2FA required" error only - if (error.status !== 401 || !otpRequired) { - throw error - } - - if (error.status === 401 && otpRequired && error.request && error.request.headers['x-github-otp']) { - throw new RequestError('Invalid one-time password for two-factor authentication', 401, { - headers: error.headers, - request: options - }) - } - - if (typeof state.auth.on2fa !== 'function') { - throw new RequestError('2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication', 401, { - headers: error.headers, - request: options - }) - } - - return Promise.resolve() - .then(() => { - return state.auth.on2fa() - }) - .then((oneTimePassword) => { - const newOptions = Object.assign(options, { - headers: Object.assign({ 'x-github-otp': oneTimePassword }, options.headers) - }) - return state.octokit.request(newOptions) - }) -} diff --git a/node_modules/@octokit/rest/plugins/authentication/before-request.js b/node_modules/@octokit/rest/plugins/authentication/before-request.js deleted file mode 100644 index 7d2969472..000000000 --- a/node_modules/@octokit/rest/plugins/authentication/before-request.js +++ /dev/null @@ -1,61 +0,0 @@ -module.exports = authenticationBeforeRequest - -const btoa = require('btoa-lite') - -const withAuthorizationPrefix = require('./with-authorization-prefix') - -function authenticationBeforeRequest (state, options) { - if (typeof state.auth === 'string') { - options.headers.authorization = withAuthorizationPrefix(state.auth) - - // https://developer.github.com/v3/previews/#integrations - if (/^bearer /i.test(state.auth) && !/machine-man/.test(options.headers.accept)) { - const acceptHeaders = options.headers.accept.split(',') - .concat('application/vnd.github.machine-man-preview+json') - options.headers.accept = acceptHeaders.filter(Boolean).join(',') - } - - return - } - - if (state.auth.username) { - const hash = btoa(`${state.auth.username}:${state.auth.password}`) - options.headers.authorization = `Basic ${hash}` - if (state.otp) { - options.headers['x-github-otp'] = state.otp - } - return - } - - if (state.auth.clientId) { - // There is a special case for OAuth applications, when `clientId` and `clientSecret` is passed as - // Basic Authorization instead of query parameters. The only routes where that applies share the same - // URL though: `/applications/:client_id/tokens/:access_token`. - // - // 1. [Check an authorization](https://developer.github.com/v3/oauth_authorizations/#check-an-authorization) - // 2. [Reset an authorization](https://developer.github.com/v3/oauth_authorizations/#reset-an-authorization) - // 3. [Revoke an authorization for an application](https://developer.github.com/v3/oauth_authorizations/#revoke-an-authorization-for-an-application) - // - // We identify by checking the URL. It must merge both "/applications/:client_id/tokens/:access_token" - // as well as "/applications/123/tokens/token456" - if (/\/applications\/:?[\w_]+\/tokens\/:?[\w_]+($|\?)/.test(options.url)) { - const hash = btoa(`${state.auth.clientId}:${state.auth.clientSecret}`) - options.headers.authorization = `Basic ${hash}` - return - } - - options.url += options.url.indexOf('?') === -1 ? '?' : '&' - options.url += `client_id=${state.auth.clientId}&client_secret=${state.auth.clientSecret}` - return - } - - return Promise.resolve() - - .then(() => { - return state.auth() - }) - - .then((authorization) => { - options.headers.authorization = withAuthorizationPrefix(authorization) - }) -} diff --git a/node_modules/@octokit/rest/plugins/authentication/index.js b/node_modules/@octokit/rest/plugins/authentication/index.js deleted file mode 100644 index ea9056afd..000000000 --- a/node_modules/@octokit/rest/plugins/authentication/index.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = authenticationPlugin - -const beforeRequest = require('./before-request') -const requestError = require('./request-error') -const validate = require('./validate') - -function authenticationPlugin (octokit, options) { - if (!options.auth) { - return - } - - validate(options.auth) - - const state = { - octokit, - auth: options.auth - } - - octokit.hook.before('request', beforeRequest.bind(null, state)) - octokit.hook.error('request', requestError.bind(null, state)) -} diff --git a/node_modules/@octokit/rest/plugins/authentication/request-error.js b/node_modules/@octokit/rest/plugins/authentication/request-error.js deleted file mode 100644 index 6b1a0cf79..000000000 --- a/node_modules/@octokit/rest/plugins/authentication/request-error.js +++ /dev/null @@ -1,47 +0,0 @@ -module.exports = authenticationRequestError - -const { RequestError } = require('@octokit/request-error') - -function authenticationRequestError (state, error, options) { - if (!error.headers) throw error - - const otpRequired = /required/.test(error.headers['x-github-otp'] || '') - // handle "2FA required" error only - if (error.status !== 401 || !otpRequired) { - throw error - } - - if (error.status === 401 && otpRequired && error.request && error.request.headers['x-github-otp']) { - if (state.otp) { - delete state.otp // no longer valid, request again - } else { - throw new RequestError('Invalid one-time password for two-factor authentication', 401, { - headers: error.headers, - request: options - }) - } - } - - if (typeof state.auth.on2fa !== 'function') { - throw new RequestError('2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication', 401, { - headers: error.headers, - request: options - }) - } - - return Promise.resolve() - .then(() => { - return state.auth.on2fa() - }) - .then((oneTimePassword) => { - const newOptions = Object.assign(options, { - headers: Object.assign(options.headers, { 'x-github-otp': oneTimePassword }) - }) - return state.octokit.request(newOptions) - .then(response => { - // If OTP still valid, then persist it for following requests - state.otp = oneTimePassword - return response - }) - }) -} diff --git a/node_modules/@octokit/rest/plugins/authentication/validate.js b/node_modules/@octokit/rest/plugins/authentication/validate.js deleted file mode 100644 index 1f0c00085..000000000 --- a/node_modules/@octokit/rest/plugins/authentication/validate.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = validateAuth - -function validateAuth (auth) { - if (typeof auth === 'string') { - return - } - - if (typeof auth === 'function') { - return - } - - if (auth.username && auth.password) { - return - } - - if (auth.clientId && auth.clientSecret) { - return - } - - throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`) -} diff --git a/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js b/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js deleted file mode 100644 index 7750de940..000000000 --- a/node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = withAuthorizationPrefix - -const atob = require('atob-lite') - -const REGEX_IS_BASIC_AUTH = /^[\w-]+:/ - -function withAuthorizationPrefix (authorization) { - if (/^(basic|bearer|token) /i.test(authorization)) { - return authorization - } - - try { - if (REGEX_IS_BASIC_AUTH.test(atob(authorization))) { - return `basic ${authorization}` - } - } catch (error) { } - - if (authorization.split(/\./).length === 3) { - return `bearer ${authorization}` - } - - return `token ${authorization}` -} diff --git a/node_modules/@octokit/rest/plugins/log/index.js b/node_modules/@octokit/rest/plugins/log/index.js deleted file mode 100644 index 6e56f382f..000000000 --- a/node_modules/@octokit/rest/plugins/log/index.js +++ /dev/null @@ -1,22 +0,0 @@ -module.exports = octokitDebug - -function octokitDebug (octokit) { - octokit.hook.wrap('request', (request, options) => { - octokit.log.debug('request', options) - const start = Date.now() - const requestOptions = octokit.request.endpoint.parse(options) - const path = requestOptions.url.replace(options.baseUrl, '') - - return request(options) - - .then(response => { - octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`) - return response - }) - - .catch(error => { - octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() - start}ms`) - throw error - }) - }) -} diff --git a/node_modules/@octokit/rest/plugins/normalize-git-reference-responses/index.js b/node_modules/@octokit/rest/plugins/normalize-git-reference-responses/index.js deleted file mode 100644 index 11105197f..000000000 --- a/node_modules/@octokit/rest/plugins/normalize-git-reference-responses/index.js +++ /dev/null @@ -1,53 +0,0 @@ -module.exports = octokitRestNormalizeGitReferenceResponses - -const { RequestError } = require('@octokit/request-error') - -function octokitRestNormalizeGitReferenceResponses (octokit) { - octokit.hook.wrap('request', (request, options) => { - const isGetOrListRefRequest = /\/repos\/:?\w+\/:?\w+\/git\/refs\/:?\w+/.test(options.url) - - if (!isGetOrListRefRequest) { - return request(options) - } - - const isGetRefRequest = 'ref' in options - - return request(options) - .then(response => { - // request single reference - if (isGetRefRequest) { - if (Array.isArray(response.data)) { - throw new RequestError(`More than one reference found for "${options.ref}"`, 404, { - request: options - }) - } - - // ✅ received single reference - return response - } - - // request list of references - if (!Array.isArray(response.data)) { - response.data = [response.data] - } - - return response - }) - - .catch(error => { - if (isGetRefRequest) { - throw error - } - - if (error.status === 404) { - return { - status: 200, - headers: error.headers, - data: [] - } - } - - throw error - }) - }) -} diff --git a/node_modules/@octokit/rest/plugins/pagination/index.js b/node_modules/@octokit/rest/plugins/pagination/index.js deleted file mode 100644 index 4aa4d0b6d..000000000 --- a/node_modules/@octokit/rest/plugins/pagination/index.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = paginatePlugin - -const iterator = require('./iterator') -const paginate = require('./paginate') - -function paginatePlugin (octokit) { - octokit.paginate = paginate.bind(null, octokit) - octokit.paginate.iterator = iterator.bind(null, octokit) -} diff --git a/node_modules/@octokit/rest/plugins/pagination/iterator.js b/node_modules/@octokit/rest/plugins/pagination/iterator.js deleted file mode 100644 index 9c0d56f3e..000000000 --- a/node_modules/@octokit/rest/plugins/pagination/iterator.js +++ /dev/null @@ -1,31 +0,0 @@ -module.exports = iterator - -const normalizePaginatedListResponse = require('./normalize-paginated-list-response') - -function iterator (octokit, options) { - const headers = options.headers - let url = octokit.request.endpoint(options).url - - return { - [Symbol.asyncIterator]: () => ({ - next () { - if (!url) { - return Promise.resolve({ done: true }) - } - - return octokit.request({ url, headers }) - - .then((response) => { - normalizePaginatedListResponse(octokit, url, response) - - // `response.headers.link` format: - // '; rel="next", ; rel="last"' - // sets `url` to undefined if "next" URL is not present or `link` header is not set - url = ((response.headers.link || '').match(/<([^>]+)>;\s*rel="next"/) || [])[1] - - return { value: response } - }) - } - }) - } -} diff --git a/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js b/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js deleted file mode 100644 index 36f61b76f..000000000 --- a/node_modules/@octokit/rest/plugins/pagination/normalize-paginated-list-response.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Some “list” response that can be paginated have a different response structure - * - * They have a `total_count` key in the response (search also has `incomplete_results`, - * /installation/repositories also has `repository_selection`), as well as a key with - * the list of the items which name varies from endpoint to endpoint: - * - * - https://developer.github.com/v3/search/#example (key `items`) - * - https://developer.github.com/v3/checks/runs/#response-3 (key: `check_runs`) - * - https://developer.github.com/v3/checks/suites/#response-1 (key: `check_suites`) - * - https://developer.github.com/v3/apps/installations/#list-repositories (key: `repositories`) - * - https://developer.github.com/v3/apps/installations/#list-installations-for-a-user (key `installations`) - * - * Octokit normalizes these responses so that paginated results are always returned following - * the same structure. One challenge is that if the list response has only one page, no Link - * header is provided, so this header alone is not sufficient to check wether a response is - * paginated or not. For the exceptions with the namespace, a fallback check for the route - * paths has to be added in order to normalize the response. We cannot check for the total_count - * property because it also exists in the response of Get the combined status for a specific ref. - */ - -module.exports = normalizePaginatedListResponse - -const { Deprecation } = require('deprecation') -const once = require('once') - -const deprecateIncompleteResults = once((log, deprecation) => log.warn(deprecation)) -const deprecateTotalCount = once((log, deprecation) => log.warn(deprecation)) -const deprecateNamespace = once((log, deprecation) => log.warn(deprecation)) - -const REGEX_IS_SEARCH_PATH = /^\/search\// -const REGEX_IS_CHECKS_PATH = /^\/repos\/[^/]+\/[^/]+\/commits\/[^/]+\/(check-runs|check-suites)/ -const REGEX_IS_INSTALLATION_REPOSITORIES_PATH = /^\/installation\/repositories/ -const REGEX_IS_USER_INSTALLATIONS_PATH = /^\/user\/installations/ - -function normalizePaginatedListResponse (octokit, url, response) { - const path = url.replace(octokit.request.endpoint.DEFAULTS.baseUrl, '') - if ( - !REGEX_IS_SEARCH_PATH.test(path) && - !REGEX_IS_CHECKS_PATH.test(path) && - !REGEX_IS_INSTALLATION_REPOSITORIES_PATH.test(path) && - !REGEX_IS_USER_INSTALLATIONS_PATH.test(path) - ) { - return - } - - // keep the additional properties intact to avoid a breaking change, - // but log a deprecation warning when accessed - const incompleteResults = response.data.incomplete_results - const repositorySelection = response.data.repository_selection - const totalCount = response.data.total_count - delete response.data.incomplete_results - delete response.data.repository_selection - delete response.data.total_count - - const namespaceKey = Object.keys(response.data)[0] - - response.data = response.data[namespaceKey] - - Object.defineProperty(response.data, namespaceKey, { - get () { - deprecateNamespace(octokit.log, new Deprecation(`[@octokit/rest] "result.data.${namespaceKey}" is deprecated. Use "result.data" instead`)) - return response.data - } - }) - - if (typeof incompleteResults !== 'undefined') { - Object.defineProperty(response.data, 'incomplete_results', { - get () { - deprecateIncompleteResults(octokit.log, new Deprecation('[@octokit/rest] "result.data.incomplete_results" is deprecated.')) - return incompleteResults - } - }) - } - - if (typeof repositorySelection !== 'undefined') { - Object.defineProperty(response.data, 'repository_selection', { - get () { - deprecateTotalCount(octokit.log, new Deprecation('[@octokit/rest] "result.data.repository_selection" is deprecated.')) - return repositorySelection - } - }) - } - - Object.defineProperty(response.data, 'total_count', { - get () { - deprecateTotalCount(octokit.log, new Deprecation('[@octokit/rest] "result.data.total_count" is deprecated.')) - return totalCount - } - }) -} diff --git a/node_modules/@octokit/rest/plugins/pagination/paginate.js b/node_modules/@octokit/rest/plugins/pagination/paginate.js deleted file mode 100644 index 044cb4a0d..000000000 --- a/node_modules/@octokit/rest/plugins/pagination/paginate.js +++ /dev/null @@ -1,34 +0,0 @@ -module.exports = paginate - -const iterator = require('./iterator') - -function paginate (octokit, route, options, mapFn) { - if (typeof options === 'function') { - mapFn = options - options = undefined - } - options = octokit.request.endpoint.merge(route, options) - return gather(octokit, [], iterator(octokit, options)[Symbol.asyncIterator](), mapFn) -} - -function gather (octokit, results, iterator, mapFn) { - return iterator.next() - .then(result => { - if (result.done) { - return results - } - - let earlyExit = false - function done () { - earlyExit = true - } - - results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data) - - if (earlyExit) { - return results - } - - return gather(octokit, results, iterator, mapFn) - }) -} diff --git a/node_modules/@octokit/rest/plugins/register-endpoints/index.js b/node_modules/@octokit/rest/plugins/register-endpoints/index.js deleted file mode 100644 index 728fb46e4..000000000 --- a/node_modules/@octokit/rest/plugins/register-endpoints/index.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = octokitRegisterEndpoints - -const registerEndpoints = require('./register-endpoints') - -function octokitRegisterEndpoints (octokit) { - octokit.registerEndpoints = registerEndpoints.bind(null, octokit) -} diff --git a/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js b/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js deleted file mode 100644 index 9af74b52e..000000000 --- a/node_modules/@octokit/rest/plugins/register-endpoints/register-endpoints.js +++ /dev/null @@ -1,87 +0,0 @@ -module.exports = registerEndpoints - -const { Deprecation } = require('deprecation') - -function registerEndpoints (octokit, routes) { - Object.keys(routes).forEach(namespaceName => { - if (!octokit[namespaceName]) { - octokit[namespaceName] = {} - } - - Object.keys(routes[namespaceName]).forEach(apiName => { - const apiOptions = routes[namespaceName][apiName] - - const endpointDefaults = ['method', 'url', 'headers'].reduce((map, key) => { - if (typeof apiOptions[key] !== 'undefined') { - map[key] = apiOptions[key] - } - - return map - }, {}) - - endpointDefaults.request = { - validate: apiOptions.params - } - - let request = octokit.request.defaults(endpointDefaults) - - // patch request & endpoint methods to support deprecated parameters. - // Not the most elegant solution, but we don’t want to move deprecation - // logic into octokit/endpoint.js as it’s out of scope - const hasDeprecatedParam = Object.keys(apiOptions.params || {}).find(key => apiOptions.params[key].deprecated) - if (hasDeprecatedParam) { - const patch = patchForDeprecation.bind(null, octokit, apiOptions) - request = patch( - octokit.request.defaults(endpointDefaults), - `.${namespaceName}.${apiName}()` - ) - request.endpoint = patch( - request.endpoint, - `.${namespaceName}.${apiName}.endpoint()` - ) - request.endpoint.merge = patch( - request.endpoint.merge, - `.${namespaceName}.${apiName}.endpoint.merge()` - ) - } - - if (apiOptions.deprecated) { - octokit[namespaceName][apiName] = function deprecatedEndpointMethod () { - octokit.log.warn(new Deprecation(`[@octokit/rest] ${apiOptions.deprecated}`)) - octokit[namespaceName][apiName] = request - return request.apply(null, arguments) - } - - return - } - - octokit[namespaceName][apiName] = request - }) - }) -} - -function patchForDeprecation (octokit, apiOptions, method, methodName) { - const patchedMethod = (options) => { - options = Object.assign({}, options) - - Object.keys(options).forEach(key => { - if (apiOptions.params[key] && apiOptions.params[key].deprecated) { - const aliasKey = apiOptions.params[key].alias - - octokit.log.warn(new Deprecation(`[@octokit/rest] "${key}" parameter is deprecated for "${methodName}". Use "${aliasKey}" instead`)) - - if (!(aliasKey in options)) { - options[aliasKey] = options[key] - } - delete options[key] - } - }) - - return method(options) - } - Object.keys(method).forEach(key => { - patchedMethod[key] = method[key] - }) - - return patchedMethod -} diff --git a/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js b/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js deleted file mode 100644 index 529ae19b2..000000000 --- a/node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = octokitRestApiEndpoints - -const ROUTES = require('./routes.json') - -function octokitRestApiEndpoints (octokit) { - // Aliasing scopes for backward compatibility - // See https://github.com/octokit/rest.js/pull/1134 - ROUTES.gitdata = ROUTES.git - ROUTES.authorization = ROUTES.oauthAuthorizations - ROUTES.pullRequests = ROUTES.pulls - - octokit.registerEndpoints(ROUTES) -} diff --git a/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json b/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json deleted file mode 100644 index 377a7b30a..000000000 --- a/node_modules/@octokit/rest/plugins/rest-api-endpoints/routes.json +++ /dev/null @@ -1,11284 +0,0 @@ -{ - "activity": { - "checkStarringRepo": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/user/starred/:owner/:repo" - }, - "deleteRepoSubscription": { - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/subscription" - }, - "deleteThreadSubscription": { - "method": "DELETE", - "params": { - "thread_id": { - "required": true, - "type": "integer" - } - }, - "url": "/notifications/threads/:thread_id/subscription" - }, - "getRepoSubscription": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/subscription" - }, - "getThread": { - "method": "GET", - "params": { - "thread_id": { - "required": true, - "type": "integer" - } - }, - "url": "/notifications/threads/:thread_id" - }, - "getThreadSubscription": { - "method": "GET", - "params": { - "thread_id": { - "required": true, - "type": "integer" - } - }, - "url": "/notifications/threads/:thread_id/subscription" - }, - "listEventsForOrg": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/events/orgs/:org" - }, - "listEventsForUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/events" - }, - "listFeeds": { - "method": "GET", - "params": {}, - "url": "/feeds" - }, - "listNotifications": { - "method": "GET", - "params": { - "all": { - "type": "boolean" - }, - "before": { - "type": "string" - }, - "page": { - "type": "integer" - }, - "participating": { - "type": "boolean" - }, - "per_page": { - "type": "integer" - }, - "since": { - "type": "string" - } - }, - "url": "/notifications" - }, - "listNotificationsForRepo": { - "method": "GET", - "params": { - "all": { - "type": "boolean" - }, - "before": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "participating": { - "type": "boolean" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "since": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/notifications" - }, - "listPublicEvents": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/events" - }, - "listPublicEventsForOrg": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/orgs/:org/events" - }, - "listPublicEventsForRepoNetwork": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/networks/:owner/:repo/events" - }, - "listPublicEventsForUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/events/public" - }, - "listReceivedEventsForUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/received_events" - }, - "listReceivedPublicEventsForUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/received_events/public" - }, - "listRepoEvents": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/events" - }, - "listReposStarredByAuthenticatedUser": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "sort": { - "enum": [ - "created", - "updated" - ], - "type": "string" - } - }, - "url": "/user/starred" - }, - "listReposStarredByUser": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "sort": { - "enum": [ - "created", - "updated" - ], - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/starred" - }, - "listReposWatchedByUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/subscriptions" - }, - "listStargazersForRepo": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/stargazers" - }, - "listWatchedReposForAuthenticatedUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/subscriptions" - }, - "listWatchersForRepo": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/subscribers" - }, - "markAsRead": { - "method": "PUT", - "params": { - "last_read_at": { - "type": "string" - } - }, - "url": "/notifications" - }, - "markNotificationsAsReadForRepo": { - "method": "PUT", - "params": { - "last_read_at": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/notifications" - }, - "markThreadAsRead": { - "method": "PATCH", - "params": { - "thread_id": { - "required": true, - "type": "integer" - } - }, - "url": "/notifications/threads/:thread_id" - }, - "setRepoSubscription": { - "method": "PUT", - "params": { - "ignored": { - "type": "boolean" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "subscribed": { - "type": "boolean" - } - }, - "url": "/repos/:owner/:repo/subscription" - }, - "setThreadSubscription": { - "method": "PUT", - "params": { - "ignored": { - "type": "boolean" - }, - "thread_id": { - "required": true, - "type": "integer" - } - }, - "url": "/notifications/threads/:thread_id/subscription" - }, - "starRepo": { - "method": "PUT", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/user/starred/:owner/:repo" - }, - "unstarRepo": { - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/user/starred/:owner/:repo" - } - }, - "apps": { - "addRepoToInstallation": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "PUT", - "params": { - "installation_id": { - "required": true, - "type": "integer" - }, - "repository_id": { - "required": true, - "type": "integer" - } - }, - "url": "/user/installations/:installation_id/repositories/:repository_id" - }, - "checkAccountIsAssociatedWithAny": { - "method": "GET", - "params": { - "account_id": { - "required": true, - "type": "integer" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/marketplace_listing/accounts/:account_id" - }, - "checkAccountIsAssociatedWithAnyStubbed": { - "method": "GET", - "params": { - "account_id": { - "required": true, - "type": "integer" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/marketplace_listing/stubbed/accounts/:account_id" - }, - "createContentAttachment": { - "headers": { - "accept": "application/vnd.github.corsair-preview+json" - }, - "method": "POST", - "params": { - "body": { - "required": true, - "type": "string" - }, - "content_reference_id": { - "required": true, - "type": "integer" - }, - "title": { - "required": true, - "type": "string" - } - }, - "url": "/content_references/:content_reference_id/attachments" - }, - "createFromManifest": { - "headers": { - "accept": "application/vnd.github.fury-preview+json" - }, - "method": "POST", - "params": { - "code": { - "required": true, - "type": "string" - } - }, - "url": "/app-manifests/:code/conversions" - }, - "createInstallationToken": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "POST", - "params": { - "installation_id": { - "required": true, - "type": "integer" - }, - "permissions": { - "type": "object" - }, - "repository_ids": { - "type": "integer[]" - } - }, - "url": "/app/installations/:installation_id/access_tokens" - }, - "deleteInstallation": { - "headers": { - "accept": "application/vnd.github.gambit-preview+json,application/vnd.github.machine-man-preview+json" - }, - "method": "DELETE", - "params": { - "installation_id": { - "required": true, - "type": "integer" - } - }, - "url": "/app/installations/:installation_id" - }, - "findOrgInstallation": { - "deprecated": "octokit.apps.findOrgInstallation() has been renamed to octokit.apps.getOrgInstallation() (2019-04-10)", - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/installation" - }, - "findRepoInstallation": { - "deprecated": "octokit.apps.findRepoInstallation() has been renamed to octokit.apps.getRepoInstallation() (2019-04-10)", - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/installation" - }, - "findUserInstallation": { - "deprecated": "octokit.apps.findUserInstallation() has been renamed to octokit.apps.getUserInstallation() (2019-04-10)", - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/installation" - }, - "getAuthenticated": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": {}, - "url": "/app" - }, - "getBySlug": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "app_slug": { - "required": true, - "type": "string" - } - }, - "url": "/apps/:app_slug" - }, - "getInstallation": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "installation_id": { - "required": true, - "type": "integer" - } - }, - "url": "/app/installations/:installation_id" - }, - "getOrgInstallation": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/installation" - }, - "getRepoInstallation": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/installation" - }, - "getUserInstallation": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/installation" - }, - "listAccountsUserOrOrgOnPlan": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "plan_id": { - "required": true, - "type": "integer" - }, - "sort": { - "enum": [ - "created", - "updated" - ], - "type": "string" - } - }, - "url": "/marketplace_listing/plans/:plan_id/accounts" - }, - "listAccountsUserOrOrgOnPlanStubbed": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "plan_id": { - "required": true, - "type": "integer" - }, - "sort": { - "enum": [ - "created", - "updated" - ], - "type": "string" - } - }, - "url": "/marketplace_listing/stubbed/plans/:plan_id/accounts" - }, - "listInstallationReposForAuthenticatedUser": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "installation_id": { - "required": true, - "type": "integer" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/installations/:installation_id/repositories" - }, - "listInstallations": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/app/installations" - }, - "listInstallationsForAuthenticatedUser": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/installations" - }, - "listMarketplacePurchasesForAuthenticatedUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/marketplace_purchases" - }, - "listMarketplacePurchasesForAuthenticatedUserStubbed": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/marketplace_purchases/stubbed" - }, - "listPlans": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/marketplace_listing/plans" - }, - "listPlansStubbed": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/marketplace_listing/stubbed/plans" - }, - "listRepos": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/installation/repositories" - }, - "removeRepoFromInstallation": { - "headers": { - "accept": "application/vnd.github.machine-man-preview+json" - }, - "method": "DELETE", - "params": { - "installation_id": { - "required": true, - "type": "integer" - }, - "repository_id": { - "required": true, - "type": "integer" - } - }, - "url": "/user/installations/:installation_id/repositories/:repository_id" - } - }, - "checks": { - "create": { - "headers": { - "accept": "application/vnd.github.antiope-preview+json" - }, - "method": "POST", - "params": { - "actions": { - "type": "object[]" - }, - "actions[].description": { - "required": true, - "type": "string" - }, - "actions[].identifier": { - "required": true, - "type": "string" - }, - "actions[].label": { - "required": true, - "type": "string" - }, - "completed_at": { - "type": "string" - }, - "conclusion": { - "enum": [ - "success", - "failure", - "neutral", - "cancelled", - "timed_out", - "action_required" - ], - "type": "string" - }, - "details_url": { - "type": "string" - }, - "external_id": { - "type": "string" - }, - "head_sha": { - "required": true, - "type": "string" - }, - "name": { - "required": true, - "type": "string" - }, - "output": { - "type": "object" - }, - "output.annotations": { - "type": "object[]" - }, - "output.annotations[].annotation_level": { - "enum": [ - "notice", - "warning", - "failure" - ], - "required": true, - "type": "string" - }, - "output.annotations[].end_column": { - "type": "integer" - }, - "output.annotations[].end_line": { - "required": true, - "type": "integer" - }, - "output.annotations[].message": { - "required": true, - "type": "string" - }, - "output.annotations[].path": { - "required": true, - "type": "string" - }, - "output.annotations[].raw_details": { - "type": "string" - }, - "output.annotations[].start_column": { - "type": "integer" - }, - "output.annotations[].start_line": { - "required": true, - "type": "integer" - }, - "output.annotations[].title": { - "type": "string" - }, - "output.images": { - "type": "object[]" - }, - "output.images[].alt": { - "required": true, - "type": "string" - }, - "output.images[].caption": { - "type": "string" - }, - "output.images[].image_url": { - "required": true, - "type": "string" - }, - "output.summary": { - "required": true, - "type": "string" - }, - "output.text": { - "type": "string" - }, - "output.title": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "started_at": { - "type": "string" - }, - "status": { - "enum": [ - "queued", - "in_progress", - "completed" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/check-runs" - }, - "createSuite": { - "headers": { - "accept": "application/vnd.github.antiope-preview+json" - }, - "method": "POST", - "params": { - "head_sha": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/check-suites" - }, - "get": { - "headers": { - "accept": "application/vnd.github.antiope-preview+json" - }, - "method": "GET", - "params": { - "check_run_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/check-runs/:check_run_id" - }, - "getSuite": { - "headers": { - "accept": "application/vnd.github.antiope-preview+json" - }, - "method": "GET", - "params": { - "check_suite_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/check-suites/:check_suite_id" - }, - "listAnnotations": { - "headers": { - "accept": "application/vnd.github.antiope-preview+json" - }, - "method": "GET", - "params": { - "check_run_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/check-runs/:check_run_id/annotations" - }, - "listForRef": { - "headers": { - "accept": "application/vnd.github.antiope-preview+json" - }, - "method": "GET", - "params": { - "check_name": { - "type": "string" - }, - "filter": { - "enum": [ - "latest", - "all" - ], - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "status": { - "enum": [ - "queued", - "in_progress", - "completed" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/commits/:ref/check-runs" - }, - "listForSuite": { - "headers": { - "accept": "application/vnd.github.antiope-preview+json" - }, - "method": "GET", - "params": { - "check_name": { - "type": "string" - }, - "check_suite_id": { - "required": true, - "type": "integer" - }, - "filter": { - "enum": [ - "latest", - "all" - ], - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "status": { - "enum": [ - "queued", - "in_progress", - "completed" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/check-suites/:check_suite_id/check-runs" - }, - "listSuitesForRef": { - "headers": { - "accept": "application/vnd.github.antiope-preview+json" - }, - "method": "GET", - "params": { - "app_id": { - "type": "integer" - }, - "check_name": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/commits/:ref/check-suites" - }, - "rerequestSuite": { - "headers": { - "accept": "application/vnd.github.antiope-preview+json" - }, - "method": "POST", - "params": { - "check_suite_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/check-suites/:check_suite_id/rerequest" - }, - "setSuitesPreferences": { - "headers": { - "accept": "application/vnd.github.antiope-preview+json" - }, - "method": "PATCH", - "params": { - "auto_trigger_checks": { - "type": "object[]" - }, - "auto_trigger_checks[].app_id": { - "required": true, - "type": "integer" - }, - "auto_trigger_checks[].setting": { - "required": true, - "type": "boolean" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/check-suites/preferences" - }, - "update": { - "headers": { - "accept": "application/vnd.github.antiope-preview+json" - }, - "method": "PATCH", - "params": { - "actions": { - "type": "object[]" - }, - "actions[].description": { - "required": true, - "type": "string" - }, - "actions[].identifier": { - "required": true, - "type": "string" - }, - "actions[].label": { - "required": true, - "type": "string" - }, - "check_run_id": { - "required": true, - "type": "integer" - }, - "completed_at": { - "type": "string" - }, - "conclusion": { - "enum": [ - "success", - "failure", - "neutral", - "cancelled", - "timed_out", - "action_required" - ], - "type": "string" - }, - "details_url": { - "type": "string" - }, - "external_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "output": { - "type": "object" - }, - "output.annotations": { - "type": "object[]" - }, - "output.annotations[].annotation_level": { - "enum": [ - "notice", - "warning", - "failure" - ], - "required": true, - "type": "string" - }, - "output.annotations[].end_column": { - "type": "integer" - }, - "output.annotations[].end_line": { - "required": true, - "type": "integer" - }, - "output.annotations[].message": { - "required": true, - "type": "string" - }, - "output.annotations[].path": { - "required": true, - "type": "string" - }, - "output.annotations[].raw_details": { - "type": "string" - }, - "output.annotations[].start_column": { - "type": "integer" - }, - "output.annotations[].start_line": { - "required": true, - "type": "integer" - }, - "output.annotations[].title": { - "type": "string" - }, - "output.images": { - "type": "object[]" - }, - "output.images[].alt": { - "required": true, - "type": "string" - }, - "output.images[].caption": { - "type": "string" - }, - "output.images[].image_url": { - "required": true, - "type": "string" - }, - "output.summary": { - "required": true, - "type": "string" - }, - "output.text": { - "type": "string" - }, - "output.title": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "started_at": { - "type": "string" - }, - "status": { - "enum": [ - "queued", - "in_progress", - "completed" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/check-runs/:check_run_id" - } - }, - "codesOfConduct": { - "getConductCode": { - "headers": { - "accept": "application/vnd.github.scarlet-witch-preview+json" - }, - "method": "GET", - "params": { - "key": { - "required": true, - "type": "string" - } - }, - "url": "/codes_of_conduct/:key" - }, - "getForRepo": { - "headers": { - "accept": "application/vnd.github.scarlet-witch-preview+json" - }, - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/community/code_of_conduct" - }, - "listConductCodes": { - "headers": { - "accept": "application/vnd.github.scarlet-witch-preview+json" - }, - "method": "GET", - "params": {}, - "url": "/codes_of_conduct" - } - }, - "emojis": { - "get": { - "method": "GET", - "params": {}, - "url": "/emojis" - } - }, - "gists": { - "checkIsStarred": { - "method": "GET", - "params": { - "gist_id": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id/star" - }, - "create": { - "method": "POST", - "params": { - "description": { - "type": "string" - }, - "files": { - "required": true, - "type": "object" - }, - "files.content": { - "type": "string" - }, - "public": { - "type": "boolean" - } - }, - "url": "/gists" - }, - "createComment": { - "method": "POST", - "params": { - "body": { - "required": true, - "type": "string" - }, - "gist_id": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id/comments" - }, - "delete": { - "method": "DELETE", - "params": { - "gist_id": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id" - }, - "deleteComment": { - "method": "DELETE", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "gist_id": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id/comments/:comment_id" - }, - "fork": { - "method": "POST", - "params": { - "gist_id": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id/forks" - }, - "get": { - "method": "GET", - "params": { - "gist_id": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id" - }, - "getComment": { - "method": "GET", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "gist_id": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id/comments/:comment_id" - }, - "getRevision": { - "method": "GET", - "params": { - "gist_id": { - "required": true, - "type": "string" - }, - "sha": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id/:sha" - }, - "list": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "since": { - "type": "string" - } - }, - "url": "/gists" - }, - "listComments": { - "method": "GET", - "params": { - "gist_id": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/gists/:gist_id/comments" - }, - "listCommits": { - "method": "GET", - "params": { - "gist_id": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/gists/:gist_id/commits" - }, - "listForks": { - "method": "GET", - "params": { - "gist_id": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/gists/:gist_id/forks" - }, - "listPublic": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "since": { - "type": "string" - } - }, - "url": "/gists/public" - }, - "listPublicForUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "since": { - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/gists" - }, - "listStarred": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "since": { - "type": "string" - } - }, - "url": "/gists/starred" - }, - "star": { - "method": "PUT", - "params": { - "gist_id": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id/star" - }, - "unstar": { - "method": "DELETE", - "params": { - "gist_id": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id/star" - }, - "update": { - "method": "PATCH", - "params": { - "description": { - "type": "string" - }, - "files": { - "type": "object" - }, - "files.content": { - "type": "string" - }, - "files.filename": { - "type": "string" - }, - "gist_id": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id" - }, - "updateComment": { - "method": "PATCH", - "params": { - "body": { - "required": true, - "type": "string" - }, - "comment_id": { - "required": true, - "type": "integer" - }, - "gist_id": { - "required": true, - "type": "string" - } - }, - "url": "/gists/:gist_id/comments/:comment_id" - } - }, - "git": { - "createBlob": { - "method": "POST", - "params": { - "content": { - "required": true, - "type": "string" - }, - "encoding": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/blobs" - }, - "createCommit": { - "method": "POST", - "params": { - "author": { - "type": "object" - }, - "author.date": { - "type": "string" - }, - "author.email": { - "type": "string" - }, - "author.name": { - "type": "string" - }, - "committer": { - "type": "object" - }, - "committer.date": { - "type": "string" - }, - "committer.email": { - "type": "string" - }, - "committer.name": { - "type": "string" - }, - "message": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "parents": { - "required": true, - "type": "string[]" - }, - "repo": { - "required": true, - "type": "string" - }, - "signature": { - "type": "string" - }, - "tree": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/commits" - }, - "createRef": { - "method": "POST", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/refs" - }, - "createTag": { - "method": "POST", - "params": { - "message": { - "required": true, - "type": "string" - }, - "object": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "tag": { - "required": true, - "type": "string" - }, - "tagger": { - "type": "object" - }, - "tagger.date": { - "type": "string" - }, - "tagger.email": { - "type": "string" - }, - "tagger.name": { - "type": "string" - }, - "type": { - "enum": [ - "commit", - "tree", - "blob" - ], - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/tags" - }, - "createTree": { - "method": "POST", - "params": { - "base_tree": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "tree": { - "required": true, - "type": "object[]" - }, - "tree[].content": { - "type": "string" - }, - "tree[].mode": { - "enum": [ - "100644", - "100755", - "040000", - "160000", - "120000" - ], - "type": "string" - }, - "tree[].path": { - "type": "string" - }, - "tree[].sha": { - "type": "string" - }, - "tree[].type": { - "enum": [ - "blob", - "tree", - "commit" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/trees" - }, - "deleteRef": { - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/refs/:ref" - }, - "getBlob": { - "method": "GET", - "params": { - "file_sha": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/blobs/:file_sha" - }, - "getCommit": { - "method": "GET", - "params": { - "commit_sha": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/commits/:commit_sha" - }, - "getRef": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/refs/:ref" - }, - "getTag": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "tag_sha": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/tags/:tag_sha" - }, - "getTree": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "recursive": { - "enum": [ - 1 - ], - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "tree_sha": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/trees/:tree_sha" - }, - "listRefs": { - "method": "GET", - "params": { - "namespace": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/refs/:namespace" - }, - "updateRef": { - "method": "PATCH", - "params": { - "force": { - "type": "boolean" - }, - "owner": { - "required": true, - "type": "string" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/git/refs/:ref" - } - }, - "gitignore": { - "getTemplate": { - "method": "GET", - "params": { - "name": { - "required": true, - "type": "string" - } - }, - "url": "/gitignore/templates/:name" - }, - "listTemplates": { - "method": "GET", - "params": {}, - "url": "/gitignore/templates" - } - }, - "interactions": { - "addOrUpdateRestrictionsForOrg": { - "headers": { - "accept": "application/vnd.github.sombra-preview+json" - }, - "method": "PUT", - "params": { - "limit": { - "enum": [ - "existing_users", - "contributors_only", - "collaborators_only" - ], - "required": true, - "type": "string" - }, - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/interaction-limits" - }, - "addOrUpdateRestrictionsForRepo": { - "headers": { - "accept": "application/vnd.github.sombra-preview+json" - }, - "method": "PUT", - "params": { - "limit": { - "enum": [ - "existing_users", - "contributors_only", - "collaborators_only" - ], - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/interaction-limits" - }, - "getRestrictionsForOrg": { - "headers": { - "accept": "application/vnd.github.sombra-preview+json" - }, - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/interaction-limits" - }, - "getRestrictionsForRepo": { - "headers": { - "accept": "application/vnd.github.sombra-preview+json" - }, - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/interaction-limits" - }, - "removeRestrictionsForOrg": { - "headers": { - "accept": "application/vnd.github.sombra-preview+json" - }, - "method": "DELETE", - "params": { - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/interaction-limits" - }, - "removeRestrictionsForRepo": { - "headers": { - "accept": "application/vnd.github.sombra-preview+json" - }, - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/interaction-limits" - } - }, - "issues": { - "addAssignees": { - "method": "POST", - "params": { - "assignees": { - "type": "string[]" - }, - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/assignees" - }, - "addLabels": { - "method": "POST", - "params": { - "issue_number": { - "required": true, - "type": "integer" - }, - "labels": { - "required": true, - "type": "string[]" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/labels" - }, - "checkAssignee": { - "method": "GET", - "params": { - "assignee": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/assignees/:assignee" - }, - "create": { - "method": "POST", - "params": { - "assignee": { - "type": "string" - }, - "assignees": { - "type": "string[]" - }, - "body": { - "type": "string" - }, - "labels": { - "type": "string[]" - }, - "milestone": { - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "title": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues" - }, - "createComment": { - "method": "POST", - "params": { - "body": { - "required": true, - "type": "string" - }, - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/comments" - }, - "createLabel": { - "method": "POST", - "params": { - "color": { - "required": true, - "type": "string" - }, - "description": { - "type": "string" - }, - "name": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/labels" - }, - "createMilestone": { - "method": "POST", - "params": { - "description": { - "type": "string" - }, - "due_on": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed" - ], - "type": "string" - }, - "title": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/milestones" - }, - "deleteComment": { - "method": "DELETE", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/comments/:comment_id" - }, - "deleteLabel": { - "method": "DELETE", - "params": { - "name": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/labels/:name" - }, - "deleteMilestone": { - "method": "DELETE", - "params": { - "milestone_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "milestone_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/milestones/:milestone_number" - }, - "get": { - "method": "GET", - "params": { - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number" - }, - "getComment": { - "method": "GET", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/comments/:comment_id" - }, - "getEvent": { - "method": "GET", - "params": { - "event_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/events/:event_id" - }, - "getLabel": { - "method": "GET", - "params": { - "name": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/labels/:name" - }, - "getMilestone": { - "method": "GET", - "params": { - "milestone_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "milestone_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/milestones/:milestone_number" - }, - "list": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "filter": { - "enum": [ - "assigned", - "created", - "mentioned", - "subscribed", - "all" - ], - "type": "string" - }, - "labels": { - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "since": { - "type": "string" - }, - "sort": { - "enum": [ - "created", - "updated", - "comments" - ], - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed", - "all" - ], - "type": "string" - } - }, - "url": "/issues" - }, - "listAssignees": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/assignees" - }, - "listComments": { - "method": "GET", - "params": { - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "since": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/comments" - }, - "listCommentsForRepo": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "since": { - "type": "string" - }, - "sort": { - "enum": [ - "created", - "updated" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/comments" - }, - "listEvents": { - "method": "GET", - "params": { - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/events" - }, - "listEventsForRepo": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/events" - }, - "listEventsForTimeline": { - "headers": { - "accept": "application/vnd.github.mockingbird-preview+json" - }, - "method": "GET", - "params": { - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/timeline" - }, - "listForAuthenticatedUser": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "filter": { - "enum": [ - "assigned", - "created", - "mentioned", - "subscribed", - "all" - ], - "type": "string" - }, - "labels": { - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "since": { - "type": "string" - }, - "sort": { - "enum": [ - "created", - "updated", - "comments" - ], - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed", - "all" - ], - "type": "string" - } - }, - "url": "/user/issues" - }, - "listForOrg": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "filter": { - "enum": [ - "assigned", - "created", - "mentioned", - "subscribed", - "all" - ], - "type": "string" - }, - "labels": { - "type": "string" - }, - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "since": { - "type": "string" - }, - "sort": { - "enum": [ - "created", - "updated", - "comments" - ], - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed", - "all" - ], - "type": "string" - } - }, - "url": "/orgs/:org/issues" - }, - "listForRepo": { - "method": "GET", - "params": { - "assignee": { - "type": "string" - }, - "creator": { - "type": "string" - }, - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "labels": { - "type": "string" - }, - "mentioned": { - "type": "string" - }, - "milestone": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "since": { - "type": "string" - }, - "sort": { - "enum": [ - "created", - "updated", - "comments" - ], - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed", - "all" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues" - }, - "listLabelsForMilestone": { - "method": "GET", - "params": { - "milestone_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "milestone_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/milestones/:milestone_number/labels" - }, - "listLabelsForRepo": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/labels" - }, - "listLabelsOnIssue": { - "method": "GET", - "params": { - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/labels" - }, - "listMilestonesForRepo": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "sort": { - "enum": [ - "due_on", - "completeness" - ], - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed", - "all" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/milestones" - }, - "lock": { - "method": "PUT", - "params": { - "issue_number": { - "required": true, - "type": "integer" - }, - "lock_reason": { - "enum": [ - "off-topic", - "too heated", - "resolved", - "spam" - ], - "type": "string" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/lock" - }, - "removeAssignees": { - "method": "DELETE", - "params": { - "assignees": { - "type": "string[]" - }, - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/assignees" - }, - "removeLabel": { - "method": "DELETE", - "params": { - "issue_number": { - "required": true, - "type": "integer" - }, - "name": { - "required": true, - "type": "string" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/labels/:name" - }, - "removeLabels": { - "method": "DELETE", - "params": { - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/labels" - }, - "replaceLabels": { - "method": "PUT", - "params": { - "issue_number": { - "required": true, - "type": "integer" - }, - "labels": { - "type": "string[]" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/labels" - }, - "unlock": { - "method": "DELETE", - "params": { - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/lock" - }, - "update": { - "method": "PATCH", - "params": { - "assignee": { - "type": "string" - }, - "assignees": { - "type": "string[]" - }, - "body": { - "type": "string" - }, - "issue_number": { - "required": true, - "type": "integer" - }, - "labels": { - "type": "string[]" - }, - "milestone": { - "allowNull": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed" - ], - "type": "string" - }, - "title": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number" - }, - "updateComment": { - "method": "PATCH", - "params": { - "body": { - "required": true, - "type": "string" - }, - "comment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/comments/:comment_id" - }, - "updateLabel": { - "method": "PATCH", - "params": { - "color": { - "type": "string" - }, - "current_name": { - "required": true, - "type": "string" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/labels/:current_name" - }, - "updateMilestone": { - "method": "PATCH", - "params": { - "description": { - "type": "string" - }, - "due_on": { - "type": "string" - }, - "milestone_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "milestone_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed" - ], - "type": "string" - }, - "title": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/milestones/:milestone_number" - } - }, - "licenses": { - "get": { - "method": "GET", - "params": { - "license": { - "required": true, - "type": "string" - } - }, - "url": "/licenses/:license" - }, - "getForRepo": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/license" - }, - "list": { - "deprecated": "octokit.licenses.list() has been renamed to octokit.licenses.listCommonlyUsed() (2019-03-05)", - "method": "GET", - "params": {}, - "url": "/licenses" - }, - "listCommonlyUsed": { - "method": "GET", - "params": {}, - "url": "/licenses" - } - }, - "markdown": { - "render": { - "method": "POST", - "params": { - "context": { - "type": "string" - }, - "mode": { - "enum": [ - "markdown", - "gfm" - ], - "type": "string" - }, - "text": { - "required": true, - "type": "string" - } - }, - "url": "/markdown" - }, - "renderRaw": { - "headers": { - "content-type": "text/plain; charset=utf-8" - }, - "method": "POST", - "params": { - "data": { - "mapTo": "data", - "required": true, - "type": "string" - } - }, - "url": "/markdown/raw" - } - }, - "meta": { - "get": { - "method": "GET", - "params": {}, - "url": "/meta" - } - }, - "migrations": { - "cancelImport": { - "headers": { - "accept": "application/vnd.github.barred-rock-preview+json" - }, - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/import" - }, - "deleteArchiveForAuthenticatedUser": { - "headers": { - "accept": "application/vnd.github.wyandotte-preview+json" - }, - "method": "DELETE", - "params": { - "migration_id": { - "required": true, - "type": "integer" - } - }, - "url": "/user/migrations/:migration_id/archive" - }, - "deleteArchiveForOrg": { - "headers": { - "accept": "application/vnd.github.wyandotte-preview+json" - }, - "method": "DELETE", - "params": { - "migration_id": { - "required": true, - "type": "integer" - }, - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/migrations/:migration_id/archive" - }, - "getArchiveForAuthenticatedUser": { - "headers": { - "accept": "application/vnd.github.wyandotte-preview+json" - }, - "method": "GET", - "params": { - "migration_id": { - "required": true, - "type": "integer" - } - }, - "url": "/user/migrations/:migration_id/archive" - }, - "getArchiveForOrg": { - "headers": { - "accept": "application/vnd.github.wyandotte-preview+json" - }, - "method": "GET", - "params": { - "migration_id": { - "required": true, - "type": "integer" - }, - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/migrations/:migration_id/archive" - }, - "getCommitAuthors": { - "headers": { - "accept": "application/vnd.github.barred-rock-preview+json" - }, - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "since": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/import/authors" - }, - "getImportProgress": { - "headers": { - "accept": "application/vnd.github.barred-rock-preview+json" - }, - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/import" - }, - "getLargeFiles": { - "headers": { - "accept": "application/vnd.github.barred-rock-preview+json" - }, - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/import/large_files" - }, - "getStatusForAuthenticatedUser": { - "headers": { - "accept": "application/vnd.github.wyandotte-preview+json" - }, - "method": "GET", - "params": { - "migration_id": { - "required": true, - "type": "integer" - } - }, - "url": "/user/migrations/:migration_id" - }, - "getStatusForOrg": { - "headers": { - "accept": "application/vnd.github.wyandotte-preview+json" - }, - "method": "GET", - "params": { - "migration_id": { - "required": true, - "type": "integer" - }, - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/migrations/:migration_id" - }, - "listForAuthenticatedUser": { - "headers": { - "accept": "application/vnd.github.wyandotte-preview+json" - }, - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/migrations" - }, - "listForOrg": { - "headers": { - "accept": "application/vnd.github.wyandotte-preview+json" - }, - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/orgs/:org/migrations" - }, - "mapCommitAuthor": { - "headers": { - "accept": "application/vnd.github.barred-rock-preview+json" - }, - "method": "PATCH", - "params": { - "author_id": { - "required": true, - "type": "integer" - }, - "email": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/import/authors/:author_id" - }, - "setLfsPreference": { - "headers": { - "accept": "application/vnd.github.barred-rock-preview+json" - }, - "method": "PATCH", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "use_lfs": { - "enum": [ - "opt_in", - "opt_out" - ], - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/import/lfs" - }, - "startForAuthenticatedUser": { - "method": "POST", - "params": { - "exclude_attachments": { - "type": "boolean" - }, - "lock_repositories": { - "type": "boolean" - }, - "repositories": { - "required": true, - "type": "string[]" - } - }, - "url": "/user/migrations" - }, - "startForOrg": { - "method": "POST", - "params": { - "exclude_attachments": { - "type": "boolean" - }, - "lock_repositories": { - "type": "boolean" - }, - "org": { - "required": true, - "type": "string" - }, - "repositories": { - "required": true, - "type": "string[]" - } - }, - "url": "/orgs/:org/migrations" - }, - "startImport": { - "headers": { - "accept": "application/vnd.github.barred-rock-preview+json" - }, - "method": "PUT", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "tfvc_project": { - "type": "string" - }, - "vcs": { - "enum": [ - "subversion", - "git", - "mercurial", - "tfvc" - ], - "type": "string" - }, - "vcs_password": { - "type": "string" - }, - "vcs_url": { - "required": true, - "type": "string" - }, - "vcs_username": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/import" - }, - "unlockRepoForAuthenticatedUser": { - "headers": { - "accept": "application/vnd.github.wyandotte-preview+json" - }, - "method": "DELETE", - "params": { - "migration_id": { - "required": true, - "type": "integer" - }, - "repo_name": { - "required": true, - "type": "string" - } - }, - "url": "/user/migrations/:migration_id/repos/:repo_name/lock" - }, - "unlockRepoForOrg": { - "headers": { - "accept": "application/vnd.github.wyandotte-preview+json" - }, - "method": "DELETE", - "params": { - "migration_id": { - "required": true, - "type": "integer" - }, - "org": { - "required": true, - "type": "string" - }, - "repo_name": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/migrations/:migration_id/repos/:repo_name/lock" - }, - "updateImport": { - "headers": { - "accept": "application/vnd.github.barred-rock-preview+json" - }, - "method": "PATCH", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "vcs_password": { - "type": "string" - }, - "vcs_username": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/import" - } - }, - "oauthAuthorizations": { - "checkAuthorization": { - "method": "GET", - "params": { - "access_token": { - "required": true, - "type": "string" - }, - "client_id": { - "required": true, - "type": "string" - } - }, - "url": "/applications/:client_id/tokens/:access_token" - }, - "createAuthorization": { - "method": "POST", - "params": { - "client_id": { - "type": "string" - }, - "client_secret": { - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "note": { - "required": true, - "type": "string" - }, - "note_url": { - "type": "string" - }, - "scopes": { - "type": "string[]" - } - }, - "url": "/authorizations" - }, - "deleteAuthorization": { - "method": "DELETE", - "params": { - "authorization_id": { - "required": true, - "type": "integer" - } - }, - "url": "/authorizations/:authorization_id" - }, - "deleteGrant": { - "method": "DELETE", - "params": { - "grant_id": { - "required": true, - "type": "integer" - } - }, - "url": "/applications/grants/:grant_id" - }, - "getAuthorization": { - "method": "GET", - "params": { - "authorization_id": { - "required": true, - "type": "integer" - } - }, - "url": "/authorizations/:authorization_id" - }, - "getGrant": { - "method": "GET", - "params": { - "grant_id": { - "required": true, - "type": "integer" - } - }, - "url": "/applications/grants/:grant_id" - }, - "getOrCreateAuthorizationForApp": { - "method": "PUT", - "params": { - "client_id": { - "required": true, - "type": "string" - }, - "client_secret": { - "required": true, - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "note": { - "type": "string" - }, - "note_url": { - "type": "string" - }, - "scopes": { - "type": "string[]" - } - }, - "url": "/authorizations/clients/:client_id" - }, - "getOrCreateAuthorizationForAppAndFingerprint": { - "method": "PUT", - "params": { - "client_id": { - "required": true, - "type": "string" - }, - "client_secret": { - "required": true, - "type": "string" - }, - "fingerprint": { - "required": true, - "type": "string" - }, - "note": { - "type": "string" - }, - "note_url": { - "type": "string" - }, - "scopes": { - "type": "string[]" - } - }, - "url": "/authorizations/clients/:client_id/:fingerprint" - }, - "getOrCreateAuthorizationForAppFingerprint": { - "deprecated": "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() has been renamed to octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() (2018-12-27)", - "method": "PUT", - "params": { - "client_id": { - "required": true, - "type": "string" - }, - "client_secret": { - "required": true, - "type": "string" - }, - "fingerprint": { - "required": true, - "type": "string" - }, - "note": { - "type": "string" - }, - "note_url": { - "type": "string" - }, - "scopes": { - "type": "string[]" - } - }, - "url": "/authorizations/clients/:client_id/:fingerprint" - }, - "listAuthorizations": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/authorizations" - }, - "listGrants": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/applications/grants" - }, - "resetAuthorization": { - "method": "POST", - "params": { - "access_token": { - "required": true, - "type": "string" - }, - "client_id": { - "required": true, - "type": "string" - } - }, - "url": "/applications/:client_id/tokens/:access_token" - }, - "revokeAuthorizationForApplication": { - "method": "DELETE", - "params": { - "access_token": { - "required": true, - "type": "string" - }, - "client_id": { - "required": true, - "type": "string" - } - }, - "url": "/applications/:client_id/tokens/:access_token" - }, - "revokeGrantForApplication": { - "method": "DELETE", - "params": { - "access_token": { - "required": true, - "type": "string" - }, - "client_id": { - "required": true, - "type": "string" - } - }, - "url": "/applications/:client_id/grants/:access_token" - }, - "updateAuthorization": { - "method": "PATCH", - "params": { - "add_scopes": { - "type": "string[]" - }, - "authorization_id": { - "required": true, - "type": "integer" - }, - "fingerprint": { - "type": "string" - }, - "note": { - "type": "string" - }, - "note_url": { - "type": "string" - }, - "remove_scopes": { - "type": "string[]" - }, - "scopes": { - "type": "string[]" - } - }, - "url": "/authorizations/:authorization_id" - } - }, - "orgs": { - "addOrUpdateMembership": { - "method": "PUT", - "params": { - "org": { - "required": true, - "type": "string" - }, - "role": { - "enum": [ - "admin", - "member" - ], - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/memberships/:username" - }, - "blockUser": { - "method": "PUT", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/blocks/:username" - }, - "checkBlockedUser": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/blocks/:username" - }, - "checkMembership": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/members/:username" - }, - "checkPublicMembership": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/public_members/:username" - }, - "concealMembership": { - "method": "DELETE", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/public_members/:username" - }, - "convertMemberToOutsideCollaborator": { - "method": "PUT", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/outside_collaborators/:username" - }, - "createHook": { - "method": "POST", - "params": { - "active": { - "type": "boolean" - }, - "config": { - "required": true, - "type": "object" - }, - "config.content_type": { - "type": "string" - }, - "config.insecure_ssl": { - "type": "string" - }, - "config.secret": { - "type": "string" - }, - "config.url": { - "required": true, - "type": "string" - }, - "events": { - "type": "string[]" - }, - "name": { - "required": true, - "type": "string" - }, - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/hooks" - }, - "createInvitation": { - "method": "POST", - "params": { - "email": { - "type": "string" - }, - "invitee_id": { - "type": "integer" - }, - "org": { - "required": true, - "type": "string" - }, - "role": { - "enum": [ - "admin", - "direct_member", - "billing_manager" - ], - "type": "string" - }, - "team_ids": { - "type": "integer[]" - } - }, - "url": "/orgs/:org/invitations" - }, - "deleteHook": { - "method": "DELETE", - "params": { - "hook_id": { - "required": true, - "type": "integer" - }, - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/hooks/:hook_id" - }, - "get": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org" - }, - "getHook": { - "method": "GET", - "params": { - "hook_id": { - "required": true, - "type": "integer" - }, - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/hooks/:hook_id" - }, - "getMembership": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/memberships/:username" - }, - "getMembershipForAuthenticatedUser": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - } - }, - "url": "/user/memberships/orgs/:org" - }, - "list": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "since": { - "type": "string" - } - }, - "url": "/organizations" - }, - "listBlockedUsers": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/blocks" - }, - "listForAuthenticatedUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/orgs" - }, - "listForUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/orgs" - }, - "listHooks": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/orgs/:org/hooks" - }, - "listInvitationTeams": { - "method": "GET", - "params": { - "invitation_id": { - "required": true, - "type": "integer" - }, - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/orgs/:org/invitations/:invitation_id/teams" - }, - "listMembers": { - "method": "GET", - "params": { - "filter": { - "enum": [ - "2fa_disabled", - "all" - ], - "type": "string" - }, - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "role": { - "enum": [ - "all", - "admin", - "member" - ], - "type": "string" - } - }, - "url": "/orgs/:org/members" - }, - "listMemberships": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "state": { - "enum": [ - "active", - "pending" - ], - "type": "string" - } - }, - "url": "/user/memberships/orgs" - }, - "listOutsideCollaborators": { - "method": "GET", - "params": { - "filter": { - "enum": [ - "2fa_disabled", - "all" - ], - "type": "string" - }, - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/orgs/:org/outside_collaborators" - }, - "listPendingInvitations": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/orgs/:org/invitations" - }, - "listPublicMembers": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/orgs/:org/public_members" - }, - "pingHook": { - "method": "POST", - "params": { - "hook_id": { - "required": true, - "type": "integer" - }, - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/hooks/:hook_id/pings" - }, - "publicizeMembership": { - "method": "PUT", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/public_members/:username" - }, - "removeMember": { - "method": "DELETE", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/members/:username" - }, - "removeMembership": { - "method": "DELETE", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/memberships/:username" - }, - "removeOutsideCollaborator": { - "method": "DELETE", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/outside_collaborators/:username" - }, - "unblockUser": { - "method": "DELETE", - "params": { - "org": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/blocks/:username" - }, - "update": { - "method": "PATCH", - "params": { - "billing_email": { - "type": "string" - }, - "company": { - "type": "string" - }, - "default_repository_permission": { - "enum": [ - "read", - "write", - "admin", - "none" - ], - "type": "string" - }, - "description": { - "type": "string" - }, - "email": { - "type": "string" - }, - "has_organization_projects": { - "type": "boolean" - }, - "has_repository_projects": { - "type": "boolean" - }, - "location": { - "type": "string" - }, - "members_allowed_repository_creation_type": { - "enum": [ - "all", - "private", - "none" - ], - "type": "string" - }, - "members_can_create_repositories": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org" - }, - "updateHook": { - "method": "PATCH", - "params": { - "active": { - "type": "boolean" - }, - "config": { - "type": "object" - }, - "config.content_type": { - "type": "string" - }, - "config.insecure_ssl": { - "type": "string" - }, - "config.secret": { - "type": "string" - }, - "config.url": { - "required": true, - "type": "string" - }, - "events": { - "type": "string[]" - }, - "hook_id": { - "required": true, - "type": "integer" - }, - "org": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/hooks/:hook_id" - }, - "updateMembership": { - "method": "PATCH", - "params": { - "org": { - "required": true, - "type": "string" - }, - "state": { - "enum": [ - "active" - ], - "required": true, - "type": "string" - } - }, - "url": "/user/memberships/orgs/:org" - } - }, - "projects": { - "addCollaborator": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "PUT", - "params": { - "permission": { - "enum": [ - "read", - "write", - "admin" - ], - "type": "string" - }, - "project_id": { - "required": true, - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/projects/:project_id/collaborators/:username" - }, - "createCard": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "POST", - "params": { - "column_id": { - "required": true, - "type": "integer" - }, - "content_id": { - "type": "integer" - }, - "content_type": { - "type": "string" - }, - "note": { - "type": "string" - } - }, - "url": "/projects/columns/:column_id/cards" - }, - "createColumn": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "POST", - "params": { - "name": { - "required": true, - "type": "string" - }, - "project_id": { - "required": true, - "type": "integer" - } - }, - "url": "/projects/:project_id/columns" - }, - "createForAuthenticatedUser": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "POST", - "params": { - "body": { - "type": "string" - }, - "name": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/projects" - }, - "createForOrg": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "POST", - "params": { - "body": { - "type": "string" - }, - "name": { - "required": true, - "type": "string" - }, - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/orgs/:org/projects" - }, - "createForRepo": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "POST", - "params": { - "body": { - "type": "string" - }, - "name": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/projects" - }, - "delete": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "DELETE", - "params": { - "project_id": { - "required": true, - "type": "integer" - } - }, - "url": "/projects/:project_id" - }, - "deleteCard": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "DELETE", - "params": { - "card_id": { - "required": true, - "type": "integer" - } - }, - "url": "/projects/columns/cards/:card_id" - }, - "deleteColumn": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "DELETE", - "params": { - "column_id": { - "required": true, - "type": "integer" - } - }, - "url": "/projects/columns/:column_id" - }, - "get": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "project_id": { - "required": true, - "type": "integer" - } - }, - "url": "/projects/:project_id" - }, - "getCard": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "card_id": { - "required": true, - "type": "integer" - } - }, - "url": "/projects/columns/cards/:card_id" - }, - "getColumn": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "column_id": { - "required": true, - "type": "integer" - } - }, - "url": "/projects/columns/:column_id" - }, - "listCards": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "archived_state": { - "enum": [ - "all", - "archived", - "not_archived" - ], - "type": "string" - }, - "column_id": { - "required": true, - "type": "integer" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/projects/columns/:column_id/cards" - }, - "listCollaborators": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "affiliation": { - "enum": [ - "outside", - "direct", - "all" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "project_id": { - "required": true, - "type": "integer" - } - }, - "url": "/projects/:project_id/collaborators" - }, - "listColumns": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "project_id": { - "required": true, - "type": "integer" - } - }, - "url": "/projects/:project_id/columns" - }, - "listForOrg": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed", - "all" - ], - "type": "string" - } - }, - "url": "/orgs/:org/projects" - }, - "listForRepo": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed", - "all" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/projects" - }, - "listForUser": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed", - "all" - ], - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/projects" - }, - "moveCard": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "POST", - "params": { - "card_id": { - "required": true, - "type": "integer" - }, - "column_id": { - "type": "integer" - }, - "position": { - "required": true, - "type": "string", - "validation": "^(top|bottom|after:\\d+)$" - } - }, - "url": "/projects/columns/cards/:card_id/moves" - }, - "moveColumn": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "POST", - "params": { - "column_id": { - "required": true, - "type": "integer" - }, - "position": { - "required": true, - "type": "string", - "validation": "^(first|last|after:\\d+)$" - } - }, - "url": "/projects/columns/:column_id/moves" - }, - "removeCollaborator": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "DELETE", - "params": { - "project_id": { - "required": true, - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/projects/:project_id/collaborators/:username" - }, - "reviewUserPermissionLevel": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "project_id": { - "required": true, - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/projects/:project_id/collaborators/:username/permission" - }, - "update": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "PATCH", - "params": { - "body": { - "type": "string" - }, - "name": { - "type": "string" - }, - "organization_permission": { - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "private": { - "type": "boolean" - }, - "project_id": { - "required": true, - "type": "integer" - }, - "state": { - "enum": [ - "open", - "closed" - ], - "type": "string" - } - }, - "url": "/projects/:project_id" - }, - "updateCard": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "PATCH", - "params": { - "archived": { - "type": "boolean" - }, - "card_id": { - "required": true, - "type": "integer" - }, - "note": { - "type": "string" - } - }, - "url": "/projects/columns/cards/:card_id" - }, - "updateColumn": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "PATCH", - "params": { - "column_id": { - "required": true, - "type": "integer" - }, - "name": { - "required": true, - "type": "string" - } - }, - "url": "/projects/columns/:column_id" - } - }, - "pulls": { - "checkIfMerged": { - "method": "GET", - "params": { - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/merge" - }, - "create": { - "method": "POST", - "params": { - "base": { - "required": true, - "type": "string" - }, - "body": { - "type": "string" - }, - "draft": { - "type": "boolean" - }, - "head": { - "required": true, - "type": "string" - }, - "maintainer_can_modify": { - "type": "boolean" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "title": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls" - }, - "createComment": { - "method": "POST", - "params": { - "body": { - "required": true, - "type": "string" - }, - "commit_id": { - "required": true, - "type": "string" - }, - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "path": { - "required": true, - "type": "string" - }, - "position": { - "required": true, - "type": "integer" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/comments" - }, - "createCommentReply": { - "method": "POST", - "params": { - "body": { - "required": true, - "type": "string" - }, - "in_reply_to": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/comments" - }, - "createFromIssue": { - "method": "POST", - "params": { - "base": { - "required": true, - "type": "string" - }, - "draft": { - "type": "boolean" - }, - "head": { - "required": true, - "type": "string" - }, - "issue": { - "required": true, - "type": "integer" - }, - "maintainer_can_modify": { - "type": "boolean" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls" - }, - "createReview": { - "method": "POST", - "params": { - "body": { - "type": "string" - }, - "comments": { - "type": "object[]" - }, - "comments[].body": { - "required": true, - "type": "string" - }, - "comments[].path": { - "required": true, - "type": "string" - }, - "comments[].position": { - "required": true, - "type": "integer" - }, - "commit_id": { - "type": "string" - }, - "event": { - "enum": [ - "APPROVE", - "REQUEST_CHANGES", - "COMMENT" - ], - "type": "string" - }, - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/reviews" - }, - "createReviewRequest": { - "method": "POST", - "params": { - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "reviewers": { - "type": "string[]" - }, - "team_reviewers": { - "type": "string[]" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" - }, - "deleteComment": { - "method": "DELETE", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/comments/:comment_id" - }, - "deletePendingReview": { - "method": "DELETE", - "params": { - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "review_id": { - "required": true, - "type": "integer" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" - }, - "deleteReviewRequest": { - "method": "DELETE", - "params": { - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "reviewers": { - "type": "string[]" - }, - "team_reviewers": { - "type": "string[]" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" - }, - "dismissReview": { - "method": "PUT", - "params": { - "message": { - "required": true, - "type": "string" - }, - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "review_id": { - "required": true, - "type": "integer" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals" - }, - "get": { - "method": "GET", - "params": { - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number" - }, - "getComment": { - "method": "GET", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/comments/:comment_id" - }, - "getCommentsForReview": { - "method": "GET", - "params": { - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "review_id": { - "required": true, - "type": "integer" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments" - }, - "getReview": { - "method": "GET", - "params": { - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "review_id": { - "required": true, - "type": "integer" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" - }, - "list": { - "method": "GET", - "params": { - "base": { - "type": "string" - }, - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "head": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "sort": { - "enum": [ - "created", - "updated", - "popularity", - "long-running" - ], - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed", - "all" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls" - }, - "listComments": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "since": { - "type": "string" - }, - "sort": { - "enum": [ - "created", - "updated" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/comments" - }, - "listCommentsForRepo": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "since": { - "type": "string" - }, - "sort": { - "enum": [ - "created", - "updated" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/comments" - }, - "listCommits": { - "method": "GET", - "params": { - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/commits" - }, - "listFiles": { - "method": "GET", - "params": { - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/files" - }, - "listReviewRequests": { - "method": "GET", - "params": { - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers" - }, - "listReviews": { - "method": "GET", - "params": { - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/reviews" - }, - "merge": { - "method": "PUT", - "params": { - "commit_message": { - "type": "string" - }, - "commit_title": { - "type": "string" - }, - "merge_method": { - "enum": [ - "merge", - "squash", - "rebase" - ], - "type": "string" - }, - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/merge" - }, - "submitReview": { - "method": "POST", - "params": { - "body": { - "type": "string" - }, - "event": { - "enum": [ - "APPROVE", - "REQUEST_CHANGES", - "COMMENT" - ], - "required": true, - "type": "string" - }, - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "review_id": { - "required": true, - "type": "integer" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events" - }, - "update": { - "method": "PATCH", - "params": { - "base": { - "type": "string" - }, - "body": { - "type": "string" - }, - "maintainer_can_modify": { - "type": "boolean" - }, - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "state": { - "enum": [ - "open", - "closed" - ], - "type": "string" - }, - "title": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number" - }, - "updateBranch": { - "headers": { - "accept": "application/vnd.github.lydian-preview+json" - }, - "method": "PUT", - "params": { - "expected_head_sha": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/update-branch" - }, - "updateComment": { - "method": "PATCH", - "params": { - "body": { - "required": true, - "type": "string" - }, - "comment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/comments/:comment_id" - }, - "updateReview": { - "method": "PUT", - "params": { - "body": { - "required": true, - "type": "string" - }, - "number": { - "alias": "pull_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "pull_number": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "review_id": { - "required": true, - "type": "integer" - } - }, - "url": "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id" - } - }, - "rateLimit": { - "get": { - "method": "GET", - "params": {}, - "url": "/rate_limit" - } - }, - "reactions": { - "createForCommitComment": { - "headers": { - "accept": "application/vnd.github.squirrel-girl-preview+json" - }, - "method": "POST", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/comments/:comment_id/reactions" - }, - "createForIssue": { - "headers": { - "accept": "application/vnd.github.squirrel-girl-preview+json" - }, - "method": "POST", - "params": { - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "required": true, - "type": "string" - }, - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/reactions" - }, - "createForIssueComment": { - "headers": { - "accept": "application/vnd.github.squirrel-girl-preview+json" - }, - "method": "POST", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/comments/:comment_id/reactions" - }, - "createForPullRequestReviewComment": { - "headers": { - "accept": "application/vnd.github.squirrel-girl-preview+json" - }, - "method": "POST", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/comments/:comment_id/reactions" - }, - "createForTeamDiscussion": { - "headers": { - "accept": "application/vnd.github.echo-preview+json,application/vnd.github.squirrel-girl-preview+json" - }, - "method": "POST", - "params": { - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "required": true, - "type": "string" - }, - "discussion_number": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number/reactions" - }, - "createForTeamDiscussionComment": { - "headers": { - "accept": "application/vnd.github.echo-preview+json,application/vnd.github.squirrel-girl-preview+json" - }, - "method": "POST", - "params": { - "comment_number": { - "required": true, - "type": "integer" - }, - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "required": true, - "type": "string" - }, - "discussion_number": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" - }, - "delete": { - "headers": { - "accept": "application/vnd.github.echo-preview+json,application/vnd.github.squirrel-girl-preview+json" - }, - "method": "DELETE", - "params": { - "reaction_id": { - "required": true, - "type": "integer" - } - }, - "url": "/reactions/:reaction_id" - }, - "listForCommitComment": { - "headers": { - "accept": "application/vnd.github.squirrel-girl-preview+json" - }, - "method": "GET", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/comments/:comment_id/reactions" - }, - "listForIssue": { - "headers": { - "accept": "application/vnd.github.squirrel-girl-preview+json" - }, - "method": "GET", - "params": { - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "type": "string" - }, - "issue_number": { - "required": true, - "type": "integer" - }, - "number": { - "alias": "issue_number", - "deprecated": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/:issue_number/reactions" - }, - "listForIssueComment": { - "headers": { - "accept": "application/vnd.github.squirrel-girl-preview+json" - }, - "method": "GET", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/issues/comments/:comment_id/reactions" - }, - "listForPullRequestReviewComment": { - "headers": { - "accept": "application/vnd.github.squirrel-girl-preview+json" - }, - "method": "GET", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pulls/comments/:comment_id/reactions" - }, - "listForTeamDiscussion": { - "headers": { - "accept": "application/vnd.github.echo-preview+json,application/vnd.github.squirrel-girl-preview+json" - }, - "method": "GET", - "params": { - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "type": "string" - }, - "discussion_number": { - "required": true, - "type": "integer" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number/reactions" - }, - "listForTeamDiscussionComment": { - "headers": { - "accept": "application/vnd.github.echo-preview+json,application/vnd.github.squirrel-girl-preview+json" - }, - "method": "GET", - "params": { - "comment_number": { - "required": true, - "type": "integer" - }, - "content": { - "enum": [ - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "rocket", - "eyes" - ], - "type": "string" - }, - "discussion_number": { - "required": true, - "type": "integer" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions" - } - }, - "repos": { - "acceptInvitation": { - "method": "PATCH", - "params": { - "invitation_id": { - "required": true, - "type": "integer" - } - }, - "url": "/user/repository_invitations/:invitation_id" - }, - "addCollaborator": { - "method": "PUT", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "permission": { - "enum": [ - "pull", - "push", - "admin" - ], - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/collaborators/:username" - }, - "addDeployKey": { - "method": "POST", - "params": { - "key": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "read_only": { - "type": "boolean" - }, - "repo": { - "required": true, - "type": "string" - }, - "title": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/keys" - }, - "addProtectedBranchAdminEnforcement": { - "method": "POST", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" - }, - "addProtectedBranchRequiredSignatures": { - "headers": { - "accept": "application/vnd.github.zzzax-preview+json" - }, - "method": "POST", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_signatures" - }, - "addProtectedBranchRequiredStatusChecksContexts": { - "method": "POST", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "contexts": { - "mapTo": "data", - "required": true, - "type": "string[]" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" - }, - "addProtectedBranchTeamRestrictions": { - "method": "POST", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "teams": { - "mapTo": "data", - "required": true, - "type": "string[]" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" - }, - "addProtectedBranchUserRestrictions": { - "method": "POST", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "users": { - "mapTo": "data", - "required": true, - "type": "string[]" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" - }, - "checkCollaborator": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/collaborators/:username" - }, - "checkVulnerabilityAlerts": { - "headers": { - "accept": "application/vnd.github.dorian-preview+json" - }, - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/vulnerability-alerts" - }, - "compareCommits": { - "method": "GET", - "params": { - "base": { - "required": true, - "type": "string" - }, - "head": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/compare/:base...:head" - }, - "createCommitComment": { - "method": "POST", - "params": { - "body": { - "required": true, - "type": "string" - }, - "commit_sha": { - "required": true, - "type": "string" - }, - "line": { - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "path": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "alias": "commit_sha", - "deprecated": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/commits/:commit_sha/comments" - }, - "createDeployment": { - "method": "POST", - "params": { - "auto_merge": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "environment": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "payload": { - "type": "string" - }, - "production_environment": { - "type": "boolean" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "required_contexts": { - "type": "string[]" - }, - "task": { - "type": "string" - }, - "transient_environment": { - "type": "boolean" - } - }, - "url": "/repos/:owner/:repo/deployments" - }, - "createDeploymentStatus": { - "method": "POST", - "params": { - "auto_inactive": { - "type": "boolean" - }, - "deployment_id": { - "required": true, - "type": "integer" - }, - "description": { - "type": "string" - }, - "environment": { - "enum": [ - "production", - "staging", - "qa" - ], - "type": "string" - }, - "environment_url": { - "type": "string" - }, - "log_url": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "state": { - "enum": [ - "error", - "failure", - "inactive", - "in_progress", - "queued", - "pending", - "success" - ], - "required": true, - "type": "string" - }, - "target_url": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/deployments/:deployment_id/statuses" - }, - "createFile": { - "deprecated": "octokit.repos.createFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", - "method": "PUT", - "params": { - "author": { - "type": "object" - }, - "author.email": { - "required": true, - "type": "string" - }, - "author.name": { - "required": true, - "type": "string" - }, - "branch": { - "type": "string" - }, - "committer": { - "type": "object" - }, - "committer.email": { - "required": true, - "type": "string" - }, - "committer.name": { - "required": true, - "type": "string" - }, - "content": { - "required": true, - "type": "string" - }, - "message": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "path": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/contents/:path" - }, - "createForAuthenticatedUser": { - "method": "POST", - "params": { - "allow_merge_commit": { - "type": "boolean" - }, - "allow_rebase_merge": { - "type": "boolean" - }, - "allow_squash_merge": { - "type": "boolean" - }, - "auto_init": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "gitignore_template": { - "type": "string" - }, - "has_issues": { - "type": "boolean" - }, - "has_projects": { - "type": "boolean" - }, - "has_wiki": { - "type": "boolean" - }, - "homepage": { - "type": "string" - }, - "is_template": { - "type": "boolean" - }, - "license_template": { - "type": "string" - }, - "name": { - "required": true, - "type": "string" - }, - "private": { - "type": "boolean" - }, - "team_id": { - "type": "integer" - } - }, - "url": "/user/repos" - }, - "createFork": { - "method": "POST", - "params": { - "organization": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/forks" - }, - "createHook": { - "method": "POST", - "params": { - "active": { - "type": "boolean" - }, - "config": { - "required": true, - "type": "object" - }, - "config.content_type": { - "type": "string" - }, - "config.insecure_ssl": { - "type": "string" - }, - "config.secret": { - "type": "string" - }, - "config.url": { - "required": true, - "type": "string" - }, - "events": { - "type": "string[]" - }, - "name": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/hooks" - }, - "createInOrg": { - "method": "POST", - "params": { - "allow_merge_commit": { - "type": "boolean" - }, - "allow_rebase_merge": { - "type": "boolean" - }, - "allow_squash_merge": { - "type": "boolean" - }, - "auto_init": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "gitignore_template": { - "type": "string" - }, - "has_issues": { - "type": "boolean" - }, - "has_projects": { - "type": "boolean" - }, - "has_wiki": { - "type": "boolean" - }, - "homepage": { - "type": "string" - }, - "is_template": { - "type": "boolean" - }, - "license_template": { - "type": "string" - }, - "name": { - "required": true, - "type": "string" - }, - "org": { - "required": true, - "type": "string" - }, - "private": { - "type": "boolean" - }, - "team_id": { - "type": "integer" - } - }, - "url": "/orgs/:org/repos" - }, - "createOrUpdateFile": { - "method": "PUT", - "params": { - "author": { - "type": "object" - }, - "author.email": { - "required": true, - "type": "string" - }, - "author.name": { - "required": true, - "type": "string" - }, - "branch": { - "type": "string" - }, - "committer": { - "type": "object" - }, - "committer.email": { - "required": true, - "type": "string" - }, - "committer.name": { - "required": true, - "type": "string" - }, - "content": { - "required": true, - "type": "string" - }, - "message": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "path": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/contents/:path" - }, - "createRelease": { - "method": "POST", - "params": { - "body": { - "type": "string" - }, - "draft": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "prerelease": { - "type": "boolean" - }, - "repo": { - "required": true, - "type": "string" - }, - "tag_name": { - "required": true, - "type": "string" - }, - "target_commitish": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/releases" - }, - "createStatus": { - "method": "POST", - "params": { - "context": { - "type": "string" - }, - "description": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "required": true, - "type": "string" - }, - "state": { - "enum": [ - "error", - "failure", - "pending", - "success" - ], - "required": true, - "type": "string" - }, - "target_url": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/statuses/:sha" - }, - "createUsingTemplate": { - "headers": { - "accept": "application/vnd.github.baptiste-preview+json" - }, - "method": "POST", - "params": { - "description": { - "type": "string" - }, - "name": { - "required": true, - "type": "string" - }, - "owner": { - "type": "string" - }, - "private": { - "type": "boolean" - }, - "template_owner": { - "required": true, - "type": "string" - }, - "template_repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:template_owner/:template_repo/generate" - }, - "declineInvitation": { - "method": "DELETE", - "params": { - "invitation_id": { - "required": true, - "type": "integer" - } - }, - "url": "/user/repository_invitations/:invitation_id" - }, - "delete": { - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo" - }, - "deleteCommitComment": { - "method": "DELETE", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/comments/:comment_id" - }, - "deleteDownload": { - "method": "DELETE", - "params": { - "download_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/downloads/:download_id" - }, - "deleteFile": { - "method": "DELETE", - "params": { - "author": { - "type": "object" - }, - "author.email": { - "type": "string" - }, - "author.name": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "committer": { - "type": "object" - }, - "committer.email": { - "type": "string" - }, - "committer.name": { - "type": "string" - }, - "message": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "path": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/contents/:path" - }, - "deleteHook": { - "method": "DELETE", - "params": { - "hook_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/hooks/:hook_id" - }, - "deleteInvitation": { - "method": "DELETE", - "params": { - "invitation_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/invitations/:invitation_id" - }, - "deleteRelease": { - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "release_id": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/releases/:release_id" - }, - "deleteReleaseAsset": { - "method": "DELETE", - "params": { - "asset_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/releases/assets/:asset_id" - }, - "disableAutomatedSecurityFixes": { - "headers": { - "accept": "application/vnd.github.london-preview+json" - }, - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/automated-security-fixes" - }, - "disablePagesSite": { - "headers": { - "accept": "application/vnd.github.switcheroo-preview+json" - }, - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pages" - }, - "disableVulnerabilityAlerts": { - "headers": { - "accept": "application/vnd.github.dorian-preview+json" - }, - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/vulnerability-alerts" - }, - "enableAutomatedSecurityFixes": { - "headers": { - "accept": "application/vnd.github.london-preview+json" - }, - "method": "PUT", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/automated-security-fixes" - }, - "enablePagesSite": { - "headers": { - "accept": "application/vnd.github.switcheroo-preview+json" - }, - "method": "POST", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "source": { - "type": "object" - }, - "source.branch": { - "enum": [ - "master", - "gh-pages" - ], - "type": "string" - }, - "source.path": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pages" - }, - "enableVulnerabilityAlerts": { - "headers": { - "accept": "application/vnd.github.dorian-preview+json" - }, - "method": "PUT", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/vulnerability-alerts" - }, - "get": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo" - }, - "getArchiveLink": { - "method": "GET", - "params": { - "archive_format": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/:archive_format/:ref" - }, - "getBranch": { - "method": "GET", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch" - }, - "getBranchProtection": { - "method": "GET", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection" - }, - "getClones": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "per": { - "enum": [ - "day", - "week" - ], - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/traffic/clones" - }, - "getCodeFrequencyStats": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/stats/code_frequency" - }, - "getCollaboratorPermissionLevel": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/collaborators/:username/permission" - }, - "getCombinedStatusForRef": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/commits/:ref/status" - }, - "getCommit": { - "method": "GET", - "params": { - "commit_sha": { - "alias": "ref", - "deprecated": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "alias": "commit_sha", - "deprecated": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/commits/:ref" - }, - "getCommitActivityStats": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/stats/commit_activity" - }, - "getCommitComment": { - "method": "GET", - "params": { - "comment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/comments/:comment_id" - }, - "getCommitRefSha": { - "deprecated": "\"Get the SHA-1 of a commit reference\" will be removed. Use \"Get a single commit\" instead with media type format set to \"sha\" instead.", - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/commits/:ref" - }, - "getContents": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "path": { - "required": true, - "type": "string" - }, - "ref": { - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/contents/:path" - }, - "getContributorsStats": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/stats/contributors" - }, - "getDeployKey": { - "method": "GET", - "params": { - "key_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/keys/:key_id" - }, - "getDeployment": { - "method": "GET", - "params": { - "deployment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/deployments/:deployment_id" - }, - "getDeploymentStatus": { - "method": "GET", - "params": { - "deployment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "status_id": { - "required": true, - "type": "integer" - } - }, - "url": "/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id" - }, - "getDownload": { - "method": "GET", - "params": { - "download_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/downloads/:download_id" - }, - "getHook": { - "method": "GET", - "params": { - "hook_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/hooks/:hook_id" - }, - "getLatestPagesBuild": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pages/builds/latest" - }, - "getLatestRelease": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/releases/latest" - }, - "getPages": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pages" - }, - "getPagesBuild": { - "method": "GET", - "params": { - "build_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pages/builds/:build_id" - }, - "getParticipationStats": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/stats/participation" - }, - "getProtectedBranchAdminEnforcement": { - "method": "GET", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" - }, - "getProtectedBranchPullRequestReviewEnforcement": { - "method": "GET", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" - }, - "getProtectedBranchRequiredSignatures": { - "headers": { - "accept": "application/vnd.github.zzzax-preview+json" - }, - "method": "GET", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_signatures" - }, - "getProtectedBranchRequiredStatusChecks": { - "method": "GET", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" - }, - "getProtectedBranchRestrictions": { - "method": "GET", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions" - }, - "getPunchCardStats": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/stats/punch_card" - }, - "getReadme": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "ref": { - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/readme" - }, - "getRelease": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "release_id": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/releases/:release_id" - }, - "getReleaseAsset": { - "method": "GET", - "params": { - "asset_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/releases/assets/:asset_id" - }, - "getReleaseByTag": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "tag": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/releases/tags/:tag" - }, - "getTopPaths": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/traffic/popular/paths" - }, - "getTopReferrers": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/traffic/popular/referrers" - }, - "getViews": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "per": { - "enum": [ - "day", - "week" - ], - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/traffic/views" - }, - "list": { - "method": "GET", - "params": { - "affiliation": { - "type": "string" - }, - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "sort": { - "enum": [ - "created", - "updated", - "pushed", - "full_name" - ], - "type": "string" - }, - "type": { - "enum": [ - "all", - "owner", - "public", - "private", - "member" - ], - "type": "string" - }, - "visibility": { - "enum": [ - "all", - "public", - "private" - ], - "type": "string" - } - }, - "url": "/user/repos" - }, - "listAssetsForRelease": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "release_id": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/releases/:release_id/assets" - }, - "listBranches": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "protected": { - "type": "boolean" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches" - }, - "listBranchesForHeadCommit": { - "headers": { - "accept": "application/vnd.github.groot-preview+json" - }, - "method": "GET", - "params": { - "commit_sha": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/commits/:commit_sha/branches-where-head" - }, - "listCollaborators": { - "method": "GET", - "params": { - "affiliation": { - "enum": [ - "outside", - "direct", - "all" - ], - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/collaborators" - }, - "listCommentsForCommit": { - "method": "GET", - "params": { - "commit_sha": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "ref": { - "alias": "commit_sha", - "deprecated": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/commits/:commit_sha/comments" - }, - "listCommitComments": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/comments" - }, - "listCommits": { - "method": "GET", - "params": { - "author": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "path": { - "type": "string" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "type": "string" - }, - "since": { - "type": "string" - }, - "until": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/commits" - }, - "listContributors": { - "method": "GET", - "params": { - "anon": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/contributors" - }, - "listDeployKeys": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/keys" - }, - "listDeploymentStatuses": { - "method": "GET", - "params": { - "deployment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/deployments/:deployment_id/statuses" - }, - "listDeployments": { - "method": "GET", - "params": { - "environment": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "ref": { - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "type": "string" - }, - "task": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/deployments" - }, - "listDownloads": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/downloads" - }, - "listForOrg": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "sort": { - "enum": [ - "created", - "updated", - "pushed", - "full_name" - ], - "type": "string" - }, - "type": { - "enum": [ - "all", - "public", - "private", - "forks", - "sources", - "member" - ], - "type": "string" - } - }, - "url": "/orgs/:org/repos" - }, - "listForUser": { - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "sort": { - "enum": [ - "created", - "updated", - "pushed", - "full_name" - ], - "type": "string" - }, - "type": { - "enum": [ - "all", - "owner", - "member" - ], - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/repos" - }, - "listForks": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "sort": { - "enum": [ - "newest", - "oldest", - "stargazers" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/forks" - }, - "listHooks": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/hooks" - }, - "listInvitations": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/invitations" - }, - "listInvitationsForAuthenticatedUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/repository_invitations" - }, - "listLanguages": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/languages" - }, - "listPagesBuilds": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pages/builds" - }, - "listProtectedBranchRequiredStatusChecksContexts": { - "method": "GET", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" - }, - "listProtectedBranchTeamRestrictions": { - "method": "GET", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" - }, - "listProtectedBranchUserRestrictions": { - "method": "GET", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" - }, - "listPublic": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "since": { - "type": "string" - } - }, - "url": "/repositories" - }, - "listPullRequestsAssociatedWithCommit": { - "headers": { - "accept": "application/vnd.github.groot-preview+json" - }, - "method": "GET", - "params": { - "commit_sha": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/commits/:commit_sha/pulls" - }, - "listReleases": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/releases" - }, - "listStatusesForRef": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "ref": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/commits/:ref/statuses" - }, - "listTags": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/tags" - }, - "listTeams": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/teams" - }, - "listTopics": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/topics" - }, - "merge": { - "method": "POST", - "params": { - "base": { - "required": true, - "type": "string" - }, - "commit_message": { - "type": "string" - }, - "head": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/merges" - }, - "pingHook": { - "method": "POST", - "params": { - "hook_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/hooks/:hook_id/pings" - }, - "removeBranchProtection": { - "method": "DELETE", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection" - }, - "removeCollaborator": { - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/collaborators/:username" - }, - "removeDeployKey": { - "method": "DELETE", - "params": { - "key_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/keys/:key_id" - }, - "removeProtectedBranchAdminEnforcement": { - "method": "DELETE", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/enforce_admins" - }, - "removeProtectedBranchPullRequestReviewEnforcement": { - "method": "DELETE", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" - }, - "removeProtectedBranchRequiredSignatures": { - "headers": { - "accept": "application/vnd.github.zzzax-preview+json" - }, - "method": "DELETE", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_signatures" - }, - "removeProtectedBranchRequiredStatusChecks": { - "method": "DELETE", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" - }, - "removeProtectedBranchRequiredStatusChecksContexts": { - "method": "DELETE", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "contexts": { - "mapTo": "data", - "required": true, - "type": "string[]" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" - }, - "removeProtectedBranchRestrictions": { - "method": "DELETE", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions" - }, - "removeProtectedBranchTeamRestrictions": { - "method": "DELETE", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "teams": { - "mapTo": "data", - "required": true, - "type": "string[]" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" - }, - "removeProtectedBranchUserRestrictions": { - "method": "DELETE", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "users": { - "mapTo": "data", - "required": true, - "type": "string[]" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" - }, - "replaceProtectedBranchRequiredStatusChecksContexts": { - "method": "PUT", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "contexts": { - "mapTo": "data", - "required": true, - "type": "string[]" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts" - }, - "replaceProtectedBranchTeamRestrictions": { - "method": "PUT", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "teams": { - "mapTo": "data", - "required": true, - "type": "string[]" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams" - }, - "replaceProtectedBranchUserRestrictions": { - "method": "PUT", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "users": { - "mapTo": "data", - "required": true, - "type": "string[]" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/restrictions/users" - }, - "replaceTopics": { - "method": "PUT", - "params": { - "names": { - "required": true, - "type": "string[]" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/topics" - }, - "requestPageBuild": { - "headers": { - "accept": "application/vnd.github.mister-fantastic-preview+json" - }, - "method": "POST", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pages/builds" - }, - "retrieveCommunityProfileMetrics": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/community/profile" - }, - "testPushHook": { - "method": "POST", - "params": { - "hook_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/hooks/:hook_id/tests" - }, - "transfer": { - "headers": { - "accept": "application/vnd.github.nightshade-preview+json" - }, - "method": "POST", - "params": { - "new_owner": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "team_ids": { - "type": "integer[]" - } - }, - "url": "/repos/:owner/:repo/transfer" - }, - "update": { - "method": "PATCH", - "params": { - "allow_merge_commit": { - "type": "boolean" - }, - "allow_rebase_merge": { - "type": "boolean" - }, - "allow_squash_merge": { - "type": "boolean" - }, - "archived": { - "type": "boolean" - }, - "default_branch": { - "type": "string" - }, - "description": { - "type": "string" - }, - "has_issues": { - "type": "boolean" - }, - "has_projects": { - "type": "boolean" - }, - "has_wiki": { - "type": "boolean" - }, - "homepage": { - "type": "string" - }, - "is_template": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "private": { - "type": "boolean" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo" - }, - "updateBranchProtection": { - "method": "PUT", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "enforce_admins": { - "allowNull": true, - "required": true, - "type": "boolean" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "required_pull_request_reviews": { - "allowNull": true, - "required": true, - "type": "object" - }, - "required_pull_request_reviews.dismiss_stale_reviews": { - "type": "boolean" - }, - "required_pull_request_reviews.dismissal_restrictions": { - "type": "object" - }, - "required_pull_request_reviews.dismissal_restrictions.teams": { - "type": "string[]" - }, - "required_pull_request_reviews.dismissal_restrictions.users": { - "type": "string[]" - }, - "required_pull_request_reviews.require_code_owner_reviews": { - "type": "boolean" - }, - "required_pull_request_reviews.required_approving_review_count": { - "type": "integer" - }, - "required_status_checks": { - "allowNull": true, - "required": true, - "type": "object" - }, - "required_status_checks.contexts": { - "required": true, - "type": "string[]" - }, - "required_status_checks.strict": { - "required": true, - "type": "boolean" - }, - "restrictions": { - "allowNull": true, - "required": true, - "type": "object" - }, - "restrictions.teams": { - "type": "string[]" - }, - "restrictions.users": { - "type": "string[]" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection" - }, - "updateCommitComment": { - "method": "PATCH", - "params": { - "body": { - "required": true, - "type": "string" - }, - "comment_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/comments/:comment_id" - }, - "updateFile": { - "deprecated": "octokit.repos.updateFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)", - "method": "PUT", - "params": { - "author": { - "type": "object" - }, - "author.email": { - "required": true, - "type": "string" - }, - "author.name": { - "required": true, - "type": "string" - }, - "branch": { - "type": "string" - }, - "committer": { - "type": "object" - }, - "committer.email": { - "required": true, - "type": "string" - }, - "committer.name": { - "required": true, - "type": "string" - }, - "content": { - "required": true, - "type": "string" - }, - "message": { - "required": true, - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "path": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "sha": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/contents/:path" - }, - "updateHook": { - "method": "PATCH", - "params": { - "active": { - "type": "boolean" - }, - "add_events": { - "type": "string[]" - }, - "config": { - "type": "object" - }, - "config.content_type": { - "type": "string" - }, - "config.insecure_ssl": { - "type": "string" - }, - "config.secret": { - "type": "string" - }, - "config.url": { - "required": true, - "type": "string" - }, - "events": { - "type": "string[]" - }, - "hook_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "remove_events": { - "type": "string[]" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/hooks/:hook_id" - }, - "updateInformationAboutPagesSite": { - "method": "PUT", - "params": { - "cname": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "source": { - "enum": [ - "\"gh-pages\"", - "\"master\"", - "\"master /docs\"" - ], - "type": "string" - } - }, - "url": "/repos/:owner/:repo/pages" - }, - "updateInvitation": { - "method": "PATCH", - "params": { - "invitation_id": { - "required": true, - "type": "integer" - }, - "owner": { - "required": true, - "type": "string" - }, - "permissions": { - "enum": [ - "read", - "write", - "admin" - ], - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/invitations/:invitation_id" - }, - "updateProtectedBranchPullRequestReviewEnforcement": { - "method": "PATCH", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "dismiss_stale_reviews": { - "type": "boolean" - }, - "dismissal_restrictions": { - "type": "object" - }, - "dismissal_restrictions.teams": { - "type": "string[]" - }, - "dismissal_restrictions.users": { - "type": "string[]" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "require_code_owner_reviews": { - "type": "boolean" - }, - "required_approving_review_count": { - "type": "integer" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews" - }, - "updateProtectedBranchRequiredStatusChecks": { - "method": "PATCH", - "params": { - "branch": { - "required": true, - "type": "string" - }, - "contexts": { - "type": "string[]" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "strict": { - "type": "boolean" - } - }, - "url": "/repos/:owner/:repo/branches/:branch/protection/required_status_checks" - }, - "updateRelease": { - "method": "PATCH", - "params": { - "body": { - "type": "string" - }, - "draft": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "prerelease": { - "type": "boolean" - }, - "release_id": { - "required": true, - "type": "integer" - }, - "repo": { - "required": true, - "type": "string" - }, - "tag_name": { - "type": "string" - }, - "target_commitish": { - "type": "string" - } - }, - "url": "/repos/:owner/:repo/releases/:release_id" - }, - "updateReleaseAsset": { - "method": "PATCH", - "params": { - "asset_id": { - "required": true, - "type": "integer" - }, - "label": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - } - }, - "url": "/repos/:owner/:repo/releases/assets/:asset_id" - }, - "uploadReleaseAsset": { - "method": "POST", - "params": { - "file": { - "mapTo": "data", - "required": true, - "type": "string | object" - }, - "headers": { - "required": true, - "type": "object" - }, - "headers.content-length": { - "required": true, - "type": "integer" - }, - "headers.content-type": { - "required": true, - "type": "string" - }, - "label": { - "type": "string" - }, - "name": { - "required": true, - "type": "string" - }, - "url": { - "required": true, - "type": "string" - } - }, - "url": ":url" - } - }, - "search": { - "code": { - "method": "GET", - "params": { - "order": { - "enum": [ - "desc", - "asc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "q": { - "required": true, - "type": "string" - }, - "sort": { - "enum": [ - "indexed" - ], - "type": "string" - } - }, - "url": "/search/code" - }, - "commits": { - "headers": { - "accept": "application/vnd.github.cloak-preview+json" - }, - "method": "GET", - "params": { - "order": { - "enum": [ - "desc", - "asc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "q": { - "required": true, - "type": "string" - }, - "sort": { - "enum": [ - "author-date", - "committer-date" - ], - "type": "string" - } - }, - "url": "/search/commits" - }, - "issues": { - "deprecated": "octokit.search.issues() has been renamed to octokit.search.issuesAndPullRequests() (2018-12-27)", - "method": "GET", - "params": { - "order": { - "enum": [ - "desc", - "asc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "q": { - "required": true, - "type": "string" - }, - "sort": { - "enum": [ - "comments", - "reactions", - "reactions-+1", - "reactions--1", - "reactions-smile", - "reactions-thinking_face", - "reactions-heart", - "reactions-tada", - "interactions", - "created", - "updated" - ], - "type": "string" - } - }, - "url": "/search/issues" - }, - "issuesAndPullRequests": { - "method": "GET", - "params": { - "order": { - "enum": [ - "desc", - "asc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "q": { - "required": true, - "type": "string" - }, - "sort": { - "enum": [ - "comments", - "reactions", - "reactions-+1", - "reactions--1", - "reactions-smile", - "reactions-thinking_face", - "reactions-heart", - "reactions-tada", - "interactions", - "created", - "updated" - ], - "type": "string" - } - }, - "url": "/search/issues" - }, - "labels": { - "method": "GET", - "params": { - "order": { - "enum": [ - "desc", - "asc" - ], - "type": "string" - }, - "q": { - "required": true, - "type": "string" - }, - "repository_id": { - "required": true, - "type": "integer" - }, - "sort": { - "enum": [ - "created", - "updated" - ], - "type": "string" - } - }, - "url": "/search/labels" - }, - "repos": { - "method": "GET", - "params": { - "order": { - "enum": [ - "desc", - "asc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "q": { - "required": true, - "type": "string" - }, - "sort": { - "enum": [ - "stars", - "forks", - "help-wanted-issues", - "updated" - ], - "type": "string" - } - }, - "url": "/search/repositories" - }, - "topics": { - "method": "GET", - "params": { - "q": { - "required": true, - "type": "string" - } - }, - "url": "/search/topics" - }, - "users": { - "method": "GET", - "params": { - "order": { - "enum": [ - "desc", - "asc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "q": { - "required": true, - "type": "string" - }, - "sort": { - "enum": [ - "followers", - "repositories", - "joined" - ], - "type": "string" - } - }, - "url": "/search/users" - } - }, - "teams": { - "addMember": { - "method": "PUT", - "params": { - "team_id": { - "required": true, - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/teams/:team_id/members/:username" - }, - "addOrUpdateMembership": { - "method": "PUT", - "params": { - "role": { - "enum": [ - "member", - "maintainer" - ], - "type": "string" - }, - "team_id": { - "required": true, - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/teams/:team_id/memberships/:username" - }, - "addOrUpdateProject": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "PUT", - "params": { - "permission": { - "enum": [ - "read", - "write", - "admin" - ], - "type": "string" - }, - "project_id": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/projects/:project_id" - }, - "addOrUpdateRepo": { - "method": "PUT", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "permission": { - "enum": [ - "pull", - "push", - "admin" - ], - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/repos/:owner/:repo" - }, - "checkManagesRepo": { - "method": "GET", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/repos/:owner/:repo" - }, - "create": { - "method": "POST", - "params": { - "description": { - "type": "string" - }, - "maintainers": { - "type": "string[]" - }, - "name": { - "required": true, - "type": "string" - }, - "org": { - "required": true, - "type": "string" - }, - "parent_team_id": { - "type": "integer" - }, - "permission": { - "enum": [ - "pull", - "push", - "admin" - ], - "type": "string" - }, - "privacy": { - "enum": [ - "secret", - "closed" - ], - "type": "string" - }, - "repo_names": { - "type": "string[]" - } - }, - "url": "/orgs/:org/teams" - }, - "createDiscussion": { - "headers": { - "accept": "application/vnd.github.echo-preview+json" - }, - "method": "POST", - "params": { - "body": { - "required": true, - "type": "string" - }, - "private": { - "type": "boolean" - }, - "team_id": { - "required": true, - "type": "integer" - }, - "title": { - "required": true, - "type": "string" - } - }, - "url": "/teams/:team_id/discussions" - }, - "createDiscussionComment": { - "headers": { - "accept": "application/vnd.github.echo-preview+json" - }, - "method": "POST", - "params": { - "body": { - "required": true, - "type": "string" - }, - "discussion_number": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number/comments" - }, - "delete": { - "method": "DELETE", - "params": { - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id" - }, - "deleteDiscussion": { - "headers": { - "accept": "application/vnd.github.echo-preview+json" - }, - "method": "DELETE", - "params": { - "discussion_number": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number" - }, - "deleteDiscussionComment": { - "headers": { - "accept": "application/vnd.github.echo-preview+json" - }, - "method": "DELETE", - "params": { - "comment_number": { - "required": true, - "type": "integer" - }, - "discussion_number": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" - }, - "get": { - "method": "GET", - "params": { - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id" - }, - "getByName": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "team_slug": { - "required": true, - "type": "string" - } - }, - "url": "/orgs/:org/teams/:team_slug" - }, - "getDiscussion": { - "headers": { - "accept": "application/vnd.github.echo-preview+json" - }, - "method": "GET", - "params": { - "discussion_number": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number" - }, - "getDiscussionComment": { - "headers": { - "accept": "application/vnd.github.echo-preview+json" - }, - "method": "GET", - "params": { - "comment_number": { - "required": true, - "type": "integer" - }, - "discussion_number": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" - }, - "getMember": { - "method": "GET", - "params": { - "team_id": { - "required": true, - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/teams/:team_id/members/:username" - }, - "getMembership": { - "method": "GET", - "params": { - "team_id": { - "required": true, - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/teams/:team_id/memberships/:username" - }, - "list": { - "method": "GET", - "params": { - "org": { - "required": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/orgs/:org/teams" - }, - "listChild": { - "headers": { - "accept": "application/vnd.github.hellcat-preview+json" - }, - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/teams" - }, - "listDiscussionComments": { - "headers": { - "accept": "application/vnd.github.echo-preview+json" - }, - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "discussion_number": { - "required": true, - "type": "integer" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number/comments" - }, - "listDiscussions": { - "headers": { - "accept": "application/vnd.github.echo-preview+json" - }, - "method": "GET", - "params": { - "direction": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions" - }, - "listForAuthenticatedUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/teams" - }, - "listMembers": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "role": { - "enum": [ - "member", - "maintainer", - "all" - ], - "type": "string" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/members" - }, - "listPendingInvitations": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/invitations" - }, - "listProjects": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/projects" - }, - "listRepos": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/repos" - }, - "removeMember": { - "method": "DELETE", - "params": { - "team_id": { - "required": true, - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/teams/:team_id/members/:username" - }, - "removeMembership": { - "method": "DELETE", - "params": { - "team_id": { - "required": true, - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/teams/:team_id/memberships/:username" - }, - "removeProject": { - "method": "DELETE", - "params": { - "project_id": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/projects/:project_id" - }, - "removeRepo": { - "method": "DELETE", - "params": { - "owner": { - "required": true, - "type": "string" - }, - "repo": { - "required": true, - "type": "string" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/repos/:owner/:repo" - }, - "reviewProject": { - "headers": { - "accept": "application/vnd.github.inertia-preview+json" - }, - "method": "GET", - "params": { - "project_id": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/projects/:project_id" - }, - "update": { - "method": "PATCH", - "params": { - "description": { - "type": "string" - }, - "name": { - "required": true, - "type": "string" - }, - "parent_team_id": { - "type": "integer" - }, - "permission": { - "enum": [ - "pull", - "push", - "admin" - ], - "type": "string" - }, - "privacy": { - "type": "string" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id" - }, - "updateDiscussion": { - "headers": { - "accept": "application/vnd.github.echo-preview+json" - }, - "method": "PATCH", - "params": { - "body": { - "type": "string" - }, - "discussion_number": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - }, - "title": { - "type": "string" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number" - }, - "updateDiscussionComment": { - "headers": { - "accept": "application/vnd.github.echo-preview+json" - }, - "method": "PATCH", - "params": { - "body": { - "required": true, - "type": "string" - }, - "comment_number": { - "required": true, - "type": "integer" - }, - "discussion_number": { - "required": true, - "type": "integer" - }, - "team_id": { - "required": true, - "type": "integer" - } - }, - "url": "/teams/:team_id/discussions/:discussion_number/comments/:comment_number" - } - }, - "users": { - "addEmails": { - "method": "POST", - "params": { - "emails": { - "required": true, - "type": "string[]" - } - }, - "url": "/user/emails" - }, - "block": { - "method": "PUT", - "params": { - "username": { - "required": true, - "type": "string" - } - }, - "url": "/user/blocks/:username" - }, - "checkBlocked": { - "method": "GET", - "params": { - "username": { - "required": true, - "type": "string" - } - }, - "url": "/user/blocks/:username" - }, - "checkFollowing": { - "method": "GET", - "params": { - "username": { - "required": true, - "type": "string" - } - }, - "url": "/user/following/:username" - }, - "checkFollowingForUser": { - "method": "GET", - "params": { - "target_user": { - "required": true, - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/following/:target_user" - }, - "createGpgKey": { - "method": "POST", - "params": { - "armored_public_key": { - "type": "string" - } - }, - "url": "/user/gpg_keys" - }, - "createPublicKey": { - "method": "POST", - "params": { - "key": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "url": "/user/keys" - }, - "deleteEmails": { - "method": "DELETE", - "params": { - "emails": { - "required": true, - "type": "string[]" - } - }, - "url": "/user/emails" - }, - "deleteGpgKey": { - "method": "DELETE", - "params": { - "gpg_key_id": { - "required": true, - "type": "integer" - } - }, - "url": "/user/gpg_keys/:gpg_key_id" - }, - "deletePublicKey": { - "method": "DELETE", - "params": { - "key_id": { - "required": true, - "type": "integer" - } - }, - "url": "/user/keys/:key_id" - }, - "follow": { - "method": "PUT", - "params": { - "username": { - "required": true, - "type": "string" - } - }, - "url": "/user/following/:username" - }, - "getAuthenticated": { - "method": "GET", - "params": {}, - "url": "/user" - }, - "getByUsername": { - "method": "GET", - "params": { - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username" - }, - "getContextForUser": { - "headers": { - "accept": "application/vnd.github.hagar-preview+json" - }, - "method": "GET", - "params": { - "subject_id": { - "type": "string" - }, - "subject_type": { - "enum": [ - "organization", - "repository", - "issue", - "pull_request" - ], - "type": "string" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/hovercard" - }, - "getGpgKey": { - "method": "GET", - "params": { - "gpg_key_id": { - "required": true, - "type": "integer" - } - }, - "url": "/user/gpg_keys/:gpg_key_id" - }, - "getPublicKey": { - "method": "GET", - "params": { - "key_id": { - "required": true, - "type": "integer" - } - }, - "url": "/user/keys/:key_id" - }, - "list": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "since": { - "type": "string" - } - }, - "url": "/users" - }, - "listBlocked": { - "method": "GET", - "params": {}, - "url": "/user/blocks" - }, - "listEmails": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/emails" - }, - "listFollowersForAuthenticatedUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/followers" - }, - "listFollowersForUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/followers" - }, - "listFollowingForAuthenticatedUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/following" - }, - "listFollowingForUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/following" - }, - "listGpgKeys": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/gpg_keys" - }, - "listGpgKeysForUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/gpg_keys" - }, - "listPublicEmails": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/public_emails" - }, - "listPublicKeys": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - } - }, - "url": "/user/keys" - }, - "listPublicKeysForUser": { - "method": "GET", - "params": { - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "username": { - "required": true, - "type": "string" - } - }, - "url": "/users/:username/keys" - }, - "togglePrimaryEmailVisibility": { - "method": "PATCH", - "params": { - "email": { - "required": true, - "type": "string" - }, - "visibility": { - "required": true, - "type": "string" - } - }, - "url": "/user/email/visibility" - }, - "unblock": { - "method": "DELETE", - "params": { - "username": { - "required": true, - "type": "string" - } - }, - "url": "/user/blocks/:username" - }, - "unfollow": { - "method": "DELETE", - "params": { - "username": { - "required": true, - "type": "string" - } - }, - "url": "/user/following/:username" - }, - "updateAuthenticated": { - "method": "PATCH", - "params": { - "bio": { - "type": "string" - }, - "blog": { - "type": "string" - }, - "company": { - "type": "string" - }, - "email": { - "type": "string" - }, - "hireable": { - "type": "boolean" - }, - "location": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "url": "/user" - } - } -} diff --git a/node_modules/@octokit/rest/plugins/validate/index.js b/node_modules/@octokit/rest/plugins/validate/index.js deleted file mode 100644 index 71caab39a..000000000 --- a/node_modules/@octokit/rest/plugins/validate/index.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = octokitValidate - -const validate = require('./validate') - -function octokitValidate (octokit) { - octokit.hook.before('request', validate.bind(null, octokit)) -} diff --git a/node_modules/@octokit/rest/plugins/validate/validate.js b/node_modules/@octokit/rest/plugins/validate/validate.js deleted file mode 100644 index fac99084d..000000000 --- a/node_modules/@octokit/rest/plugins/validate/validate.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict' - -module.exports = validate - -const { RequestError } = require('@octokit/request-error') -const get = require('lodash.get') -const set = require('lodash.set') - -function validate (octokit, options) { - if (!options.request.validate) { - return - } - const { validate: params } = options.request - - Object.keys(params).forEach(parameterName => { - const parameter = get(params, parameterName) - - const expectedType = parameter.type - let parentParameterName - let parentValue - let parentParamIsPresent = true - let parentParameterIsArray = false - - if (/\./.test(parameterName)) { - parentParameterName = parameterName.replace(/\.[^.]+$/, '') - parentParameterIsArray = parentParameterName.slice(-2) === '[]' - if (parentParameterIsArray) { - parentParameterName = parentParameterName.slice(0, -2) - } - parentValue = get(options, parentParameterName) - parentParamIsPresent = parentParameterName === 'headers' || (typeof parentValue === 'object' && parentValue !== null) - } - - const values = parentParameterIsArray - ? (get(options, parentParameterName) || []).map(value => value[parameterName.split(/\./).pop()]) - : [get(options, parameterName)] - - values.forEach((value, i) => { - const valueIsPresent = typeof value !== 'undefined' - const valueIsNull = value === null - const currentParameterName = parentParameterIsArray - ? parameterName.replace(/\[\]/, `[${i}]`) - : parameterName - - if (!parameter.required && !valueIsPresent) { - return - } - - // if the parent parameter is of type object but allows null - // then the child parameters can be ignored - if (!parentParamIsPresent) { - return - } - - if (parameter.allowNull && valueIsNull) { - return - } - - if (!parameter.allowNull && valueIsNull) { - throw new RequestError(`'${currentParameterName}' cannot be null`, 400, { - request: options - }) - } - - if (parameter.required && !valueIsPresent) { - throw new RequestError(`Empty value for parameter '${currentParameterName}': ${JSON.stringify(value)}`, 400, { - request: options - }) - } - - // parse to integer before checking for enum - // so that string "1" will match enum with number 1 - if (expectedType === 'integer') { - const unparsedValue = value - value = parseInt(value, 10) - if (isNaN(value)) { - throw new RequestError(`Invalid value for parameter '${currentParameterName}': ${JSON.stringify(unparsedValue)} is NaN`, 400, { - request: options - }) - } - } - - if (parameter.enum && parameter.enum.indexOf(value) === -1) { - throw new RequestError(`Invalid value for parameter '${currentParameterName}': ${JSON.stringify(value)}`, 400, { - request: options - }) - } - - if (parameter.validation) { - const regex = new RegExp(parameter.validation) - if (!regex.test(value)) { - throw new RequestError(`Invalid value for parameter '${currentParameterName}': ${JSON.stringify(value)}`, 400, { - request: options - }) - } - } - - if (expectedType === 'object' && typeof value === 'string') { - try { - value = JSON.parse(value) - } catch (exception) { - throw new RequestError(`JSON parse error of value for parameter '${currentParameterName}': ${JSON.stringify(value)}`, 400, { - request: options - }) - } - } - - set(options, parameter.mapTo || currentParameterName, value) - }) - }) - - return options -} diff --git a/node_modules/atob-lite/.npmignore b/node_modules/atob-lite/.npmignore deleted file mode 100644 index 50c74582d..000000000 --- a/node_modules/atob-lite/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -node_modules -*.log -.DS_Store -bundle.js -test -test.js diff --git a/node_modules/atob-lite/LICENSE.md b/node_modules/atob-lite/LICENSE.md deleted file mode 100644 index ee27ba4b4..000000000 --- a/node_modules/atob-lite/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/atob-lite/README.md b/node_modules/atob-lite/README.md deleted file mode 100644 index 99ea05d57..000000000 --- a/node_modules/atob-lite/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# atob-lite -![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat) -![](http://img.shields.io/npm/v/atob-lite.svg?style=flat) -![](http://img.shields.io/npm/dm/atob-lite.svg?style=flat) -![](http://img.shields.io/npm/l/atob-lite.svg?style=flat) - -Smallest/simplest possible means of using atob with both Node and browserify. - -In the browser, decoding base64 strings is done using: - -``` javascript -var decoded = atob(encoded) -``` - -However in Node, it's done like so: - -``` javascript -var decoded = new Buffer(encoded, 'base64').toString('utf8') -``` - -You can easily check if `Buffer` exists and switch between the approaches -accordingly, but using `Buffer` anywhere in your browser source will pull -in browserify's `Buffer` shim which is pretty hefty. This package uses -the `main` and `browser` fields in its `package.json` to perform this -check at build time and avoid pulling `Buffer` in unnecessarily. - -## Usage - -[![NPM](https://nodei.co/npm/atob-lite.png)](https://nodei.co/npm/atob-lite/) - -### `decoded = atob(encoded)` - -Returns the decoded value of a base64-encoded string. - -## License - -MIT. See [LICENSE.md](http://github.com/hughsk/atob-lite/blob/master/LICENSE.md) for details. diff --git a/node_modules/atob-lite/atob-browser.js b/node_modules/atob-lite/atob-browser.js deleted file mode 100644 index cee1a38cb..000000000 --- a/node_modules/atob-lite/atob-browser.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function _atob(str) { - return atob(str) -} diff --git a/node_modules/atob-lite/atob-node.js b/node_modules/atob-lite/atob-node.js deleted file mode 100644 index 707207569..000000000 --- a/node_modules/atob-lite/atob-node.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function atob(str) { - return Buffer.from(str, 'base64').toString('binary') -} diff --git a/node_modules/atob-lite/package.json b/node_modules/atob-lite/package.json deleted file mode 100644 index 3643fadbf..000000000 --- a/node_modules/atob-lite/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "atob-lite@2.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "atob-lite@2.0.0", - "_id": "atob-lite@2.0.0", - "_inBundle": false, - "_integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=", - "_location": "/atob-lite", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "atob-lite@2.0.0", - "name": "atob-lite", - "escapedName": "atob-lite", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/@octokit/rest" - ], - "_resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com", - "url": "http://hughsk.io/" - }, - "browser": "atob-browser.js", - "bugs": { - "url": "https://github.com/hughsk/atob-lite/issues" - }, - "dependencies": {}, - "description": "Smallest/simplest possible means of using atob with both Node and browserify", - "devDependencies": { - "browserify": "^10.2.4", - "smokestack": "^3.3.0", - "tap-closer": "^1.0.0", - "tap-spec": "^4.0.0", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/hughsk/atob-lite", - "keywords": [ - "atob", - "base64", - "isomorphic", - "browser", - "node", - "shared" - ], - "license": "MIT", - "main": "atob-node.js", - "name": "atob-lite", - "repository": { - "type": "git", - "url": "git://github.com/hughsk/atob-lite.git" - }, - "scripts": { - "test": "npm run test-node && npm run test-browser", - "test-browser": "browserify test | smokestack | tap-spec", - "test-node": "node test | tap-spec" - }, - "version": "2.0.0" -} diff --git a/node_modules/balanced-match/.npmignore b/node_modules/balanced-match/.npmignore deleted file mode 100644 index ae5d8c36a..000000000 --- a/node_modules/balanced-match/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -test -.gitignore -.travis.yml -Makefile -example.js diff --git a/node_modules/balanced-match/LICENSE.md b/node_modules/balanced-match/LICENSE.md deleted file mode 100644 index 2cdc8e414..000000000 --- a/node_modules/balanced-match/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/balanced-match/README.md b/node_modules/balanced-match/README.md deleted file mode 100644 index 08e918c0d..000000000 --- a/node_modules/balanced-match/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# balanced-match - -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### var r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ , ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js deleted file mode 100644 index 1685a7629..000000000 --- a/node_modules/balanced-match/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json deleted file mode 100644 index 5a0e2f4b7..000000000 --- a/node_modules/balanced-match/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_args": [ - [ - "balanced-match@1.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "balanced-match@1.0.0", - "_id": "balanced-match@1.0.0", - "_inBundle": false, - "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "_location": "/balanced-match", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "balanced-match@1.0.0", - "name": "balanced-match", - "escapedName": "balanced-match", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/brace-expansion" - ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/balanced-match/issues" - }, - "dependencies": {}, - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "license": "MIT", - "main": "index.js", - "name": "balanced-match", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "scripts": { - "bench": "make bench", - "test": "make test" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/node_modules/before-after-hook/LICENSE b/node_modules/before-after-hook/LICENSE deleted file mode 100644 index 225063c34..000000000 --- a/node_modules/before-after-hook/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018 Gregor Martynus and other contributors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/before-after-hook/README.md b/node_modules/before-after-hook/README.md deleted file mode 100644 index 68c927d9c..000000000 --- a/node_modules/before-after-hook/README.md +++ /dev/null @@ -1,574 +0,0 @@ -# before-after-hook - -> asynchronous hooks for internal functionality - -[![npm downloads](https://img.shields.io/npm/dw/before-after-hook.svg)](https://www.npmjs.com/package/before-after-hook) -[![Build Status](https://travis-ci.org/gr2m/before-after-hook.svg?branch=master)](https://travis-ci.org/gr2m/before-after-hook) -[![Coverage Status](https://coveralls.io/repos/gr2m/before-after-hook/badge.svg?branch=master)](https://coveralls.io/r/gr2m/before-after-hook?branch=master) -[![Greenkeeper badge](https://badges.greenkeeper.io/gr2m/before-after-hook.svg)](https://greenkeeper.io/) - -## Usage - -### Singular hook - -Recommended for [TypeScript](#typescript) - -```js -// instantiate singular hook API -const hook = new Hook.Singular() - -// Create a hook -function getData (options) { - return hook(fetchFromDatabase, options) - .then(handleData) - .catch(handleGetError) -} - -// register before/error/after hooks. -// The methods can be async or return a promise -hook.before(beforeHook) -hook.error(errorHook) -hook.after(afterHook) - -getData({id: 123}) -``` - -### Hook collection -```js -// instantiate hook collection API -const hookCollection = new Hook.Collection() - -// Create a hook -function getData (options) { - return hookCollection('get', fetchFromDatabase, options) - .then(handleData) - .catch(handleGetError) -} - -// register before/error/after hooks. -// The methods can be async or return a promise -hookCollection.before('get', beforeHook) -hookCollection.error('get', errorHook) -hookCollection.after('get', afterHook) - -getData({id: 123}) -``` - -### Hook.Singular vs Hook.Collection - -There's no fundamental difference between the `Hook.Singular` and `Hook.Collection` hooks except for the fact that a hook from a collection requires you to pass along the name. Therefore the following explanation applies to both code snippets as described above. - -The methods are executed in the following order - -1. `beforeHook` -2. `fetchFromDatabase` -3. `afterHook` -4. `getData` - -`beforeHook` can mutate `options` before it’s passed to `fetchFromDatabase`. - -If an error is thrown in `beforeHook` or `fetchFromDatabase` then `errorHook` is -called next. - -If `afterHook` throws an error then `handleGetError` is called instead -of `getData`. - -If `errorHook` throws an error then `handleGetError` is called next, otherwise -`afterHook` and `getData`. - -You can also use `hook.wrap` to achieve the same thing as shown above (collection example): - -```js -hookCollection.wrap('get', async (getData, options) => { - await beforeHook(options) - - try { - const result = getData(options) - } catch (error) { - await errorHook(error, options) - } - - await afterHook(result, options) -}) -``` - -## Install - -``` -npm install before-after-hook -``` - -Or download [the latest `before-after-hook.min.js`](https://github.com/gr2m/before-after-hook/releases/latest). - -## API - -- [Singular Hook Constructor](#singular-hook-api) -- [Hook Collection Constructor](#hook-collection-api) - -## Singular hook API - -- [Singular constructor](#singular-constructor) -- [hook.api](#singular-api) -- [hook()](#singular-api) -- [hook.before()](#singular-api) -- [hook.error()](#singular-api) -- [hook.after()](#singular-api) -- [hook.wrap()](#singular-api) -- [hook.remove()](#singular-api) - -### Singular constructor - -The `Hook.Singular` constructor has no options and returns a `hook` instance with the -methods below: - -```js -const hook = new Hook.Singular() -``` -Using the singular hook is recommended for [TypeScript](#typescript) - -### Singular API - -The singular hook is a reference to a single hook. This means that there's no need to pass along any identifier (such as a `name` as can be seen in the [Hook.Collection API](#hookcollectionapi)). - -The API of a singular hook is exactly the same as a collection hook and we therefore suggest you read the [Hook.Collection API](#hookcollectionapi) and leave out any use of the `name` argument. Just skip it like described in this example: -```js -const hook = new Hook.Singular() - -// good -hook.before(beforeHook) -hook.after(afterHook) -hook(fetchFromDatabase, options) - -// bad -hook.before('get', beforeHook) -hook.after('get', afterHook) -hook('get', fetchFromDatabase, options) -``` - -## Hook collection API - -- [Collection constructor](#collection-constructor) -- [collection.api](#collectionapi) -- [collection()](#collection) -- [collection.before()](#collectionbefore) -- [collection.error()](#collectionerror) -- [collection.after()](#collectionafter) -- [collection.wrap()](#collectionwrap) -- [collection.remove()](#collectionremove) - -### Collection constructor - -The `Hook.Collection` constructor has no options and returns a `hookCollection` instance with the -methods below - -```js -const hookCollection = new Hook.Collection() -``` - -### hookCollection.api - -Use the `api` property to return the public API: - -- [hookCollection.before()](#hookcollectionbefore) -- [hookCollection.after()](#hookcollectionafter) -- [hookCollection.error()](#hookcollectionerror) -- [hookCollection.wrap()](#hookcollectionwrap) -- [hookCollection.remove()](#hookcollectionremove) - -That way you don’t need to expose the [hookCollection()](#hookcollection) method to consumers of your library - -### hookCollection() - -Invoke before and after hooks. Returns a promise. - -```js -hookCollection(nameOrNames, method /*, options */) -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentTypeDescriptionRequired
nameString or Array of StringsHook name, for example 'save'. Or an array of names, see example below.Yes
methodFunctionCallback to be executed after all before hooks finished execution successfully. options is passed as first argumentYes
optionsObjectWill be passed to all before hooks as reference, so they can mutate itNo, defaults to empty object ({})
- -Resolves with whatever `method` returns or resolves with. -Rejects with error that is thrown or rejected with by - -1. Any of the before hooks, whichever rejects / throws first -2. `method` -3. Any of the after hooks, whichever rejects / throws first - -Simple Example - -```js -hookCollection('save', function (record) { - return store.save(record) -}, record) -// shorter: hookCollection('save', store.save, record) - -hookCollection.before('save', function addTimestamps (record) { - const now = new Date().toISOString() - if (record.createdAt) { - record.updatedAt = now - } else { - record.createdAt = now - } -}) -``` - -Example defining multiple hooks at once. - -```js -hookCollection(['add', 'save'], function (record) { - return store.save(record) -}, record) - -hookCollection.before('add', function addTimestamps (record) { - if (!record.type) { - throw new Error('type property is required') - } -}) - -hookCollection.before('save', function addTimestamps (record) { - if (!record.type) { - throw new Error('type property is required') - } -}) -``` - -Defining multiple hooks is helpful if you have similar methods for which you want to define separate hooks, but also an additional hook that gets called for all at once. The example above is equal to this: - -```js -hookCollection('add', function (record) { - return hookCollection('save', function (record) { - return store.save(record) - }, record) -}, record) -``` - -### hookCollection.before() - -Add before hook for given name. - -```js -hookCollection.before(name, method) -``` - - - - - - - - - - - - - - - - - - - - - - -
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction - Executed before the wrapped method. Called with the hook’s - options argument. Before hooks can mutate the passed options - before they are passed to the wrapped method. - Yes
- -Example - -```js -hookCollection.before('save', function validate (record) { - if (!record.name) { - throw new Error('name property is required') - } -}) -``` - -### hookCollection.error() - -Add error hook for given name. - -```js -hookCollection.error(name, method) -``` - - - - - - - - - - - - - - - - - - - - - - -
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction - Executed when an error occurred in either the wrapped method or a - before hook. Called with the thrown error - and the hook’s options argument. The first method - which does not throw an error will set the result that the after hook - methods will receive. - Yes
- -Example - -```js -hookCollection.error('save', function (error, options) { - if (error.ignore) return - throw error -}) -``` - -### hookCollection.after() - -Add after hook for given name. - -```js -hookCollection.after(name, method) -``` - - - - - - - - - - - - - - - - - - - - - - -
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction - Executed after wrapped method. Called with what the wrapped method - resolves with the hook’s options argument. - Yes
- -Example - -```js -hookCollection.after('save', function (result, options) { - if (result.updatedAt) { - app.emit('update', result) - } else { - app.emit('create', result) - } -}) -``` - -### hookCollection.wrap() - -Add wrap hook for given name. - -```js -hookCollection.wrap(name, method) -``` - - - - - - - - - - - - - - - - - - - - - - -
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction - Receives both the wrapped method and the passed options as arguments so it can add logic before and after the wrapped method, it can handle errors and even replace the wrapped method altogether - Yes
- -Example - -```js -hookCollection.wrap('save', async function (saveInDatabase, options) { - if (!record.name) { - throw new Error('name property is required') - } - - try { - const result = await saveInDatabase(options) - - if (result.updatedAt) { - app.emit('update', result) - } else { - app.emit('create', result) - } - - return result - } catch (error) { - if (error.ignore) return - throw error - } -}) -``` - -See also: [Test mock example](examples/test-mock-example.md) - -### hookCollection.remove() - -Removes hook for given name. - -```js -hookCollection.remove(name, hookMethod) -``` - - - - - - - - - - - - - - - - - - - - - - -
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
beforeHookMethodFunction - Same function that was previously passed to hookCollection.before(), hookCollection.error(), hookCollection.after() or hookCollection.wrap() - Yes
- -Example - -```js -hookCollection.remove('save', validateRecord) -``` - -## TypeScript - -This library contains type definitions for TypeScript. When you use TypeScript we highly recommend using the `Hook.Singular` constructor for your hooks as this allows you to pass along type information for the options object. For example: - -```ts - -import {Hook} from 'before-after-hook' - -interface Foo { - bar: string - num: number; -} - -const hook = new Hook.Singular(); - -hook.before(function (foo) { - - // typescript will complain about the following mutation attempts - foo.hello = 'world' - foo.bar = 123 - - // yet this is valid - foo.bar = 'other-string' - foo.num = 123 -}) - -const foo = hook(function(foo) { - // handle `foo` - foo.bar = 'another-string' -}, {bar: 'random-string'}) - -// foo outputs -{ - bar: 'another-string', - num: 123 -} -``` - -An alternative import: - -```ts -import {Singular, Collection} from 'before-after-hook' - -const hook = new Singular<{foo: string}>(); -const hookCollection = new Collection(); -``` - -## Upgrading to 1.4 - -Since version 1.4 the `Hook` constructor has been deprecated in favor of returning `Hook.Singular` in an upcoming breaking release. - -Version 1.4 is still 100% backwards-compatible, but if you want to continue using hook collections, we recommend using the `Hook.Collection` constructor instead before the next release. - -For even more details, check out [the PR](https://github.com/gr2m/before-after-hook/pull/52). - -## See also - -If `before-after-hook` is not for you, have a look at one of these alternatives: - -- https://github.com/keystonejs/grappling-hook -- https://github.com/sebelga/promised-hooks -- https://github.com/bnoguchi/hooks-js -- https://github.com/cb1kenobi/hook-emitter - -## License - -[Apache 2.0](LICENSE) diff --git a/node_modules/before-after-hook/index.d.ts b/node_modules/before-after-hook/index.d.ts deleted file mode 100644 index 3c19a5c9a..000000000 --- a/node_modules/before-after-hook/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -type HookMethod = (options: O) => R | Promise - -type BeforeHook = (options: O) => void -type ErrorHook = (error: E, options: O) => void -type AfterHook = (result: R, options: O) => void -type WrapHook = ( - hookMethod: HookMethod, - options: O -) => R | Promise - -type AnyHook = - | BeforeHook - | ErrorHook - | AfterHook - | WrapHook - -export interface HookCollection { - /** - * Invoke before and after hooks - */ - ( - name: string | string[], - hookMethod: HookMethod, - options?: any - ): Promise - /** - * Add `before` hook for given `name` - */ - before(name: string, beforeHook: BeforeHook): void - /** - * Add `error` hook for given `name` - */ - error(name: string, errorHook: ErrorHook): void - /** - * Add `after` hook for given `name` - */ - after(name: string, afterHook: AfterHook): void - /** - * Add `wrap` hook for given `name` - */ - wrap(name: string, wrapHook: WrapHook): void - /** - * Remove added hook for given `name` - */ - remove(name: string, hook: AnyHook): void -} - -export interface HookSingular { - /** - * Invoke before and after hooks - */ - (hookMethod: HookMethod, options?: O): Promise - /** - * Add `before` hook - */ - before(beforeHook: BeforeHook): void - /** - * Add `error` hook - */ - error(errorHook: ErrorHook): void - /** - * Add `after` hook - */ - after(afterHook: AfterHook): void - /** - * Add `wrap` hook - */ - wrap(wrapHook: WrapHook): void - /** - * Remove added hook - */ - remove(hook: AnyHook): void -} - -type Collection = new () => HookCollection -type Singular = new () => HookSingular - -interface Hook { - new (): HookCollection - - /** - * Creates a collection of hooks - */ - Collection: Collection - - /** - * Creates a nameless hook that supports strict typings - */ - Singular: Singular -} - -export const Hook: Hook -export const Collection: Collection -export const Singular: Singular - -export default Hook diff --git a/node_modules/before-after-hook/index.js b/node_modules/before-after-hook/index.js deleted file mode 100644 index a97d89b77..000000000 --- a/node_modules/before-after-hook/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var register = require('./lib/register') -var addHook = require('./lib/add') -var removeHook = require('./lib/remove') - -// bind with array of arguments: https://stackoverflow.com/a/21792913 -var bind = Function.bind -var bindable = bind.bind(bind) - -function bindApi (hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]) - hook.api = { remove: removeHookRef } - hook.remove = removeHookRef - - ;['before', 'error', 'after', 'wrap'].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind] - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args) - }) -} - -function HookSingular () { - var singularHookName = 'h' - var singularHookState = { - registry: {} - } - var singularHook = register.bind(null, singularHookState, singularHookName) - bindApi(singularHook, singularHookState, singularHookName) - return singularHook -} - -function HookCollection () { - var state = { - registry: {} - } - - var hook = register.bind(null, state) - bindApi(hook, state) - - return hook -} - -var collectionHookDeprecationMessageDisplayed = false -function Hook () { - if (!collectionHookDeprecationMessageDisplayed) { - console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4') - collectionHookDeprecationMessageDisplayed = true - } - return HookCollection() -} - -Hook.Singular = HookSingular.bind() -Hook.Collection = HookCollection.bind() - -module.exports = Hook -// expose constructors as a named property for TypeScript -module.exports.Hook = Hook -module.exports.Singular = Hook.Singular -module.exports.Collection = Hook.Collection diff --git a/node_modules/before-after-hook/lib/add.js b/node_modules/before-after-hook/lib/add.js deleted file mode 100644 index a34e3f469..000000000 --- a/node_modules/before-after-hook/lib/add.js +++ /dev/null @@ -1,46 +0,0 @@ -module.exports = addHook - -function addHook (state, kind, name, hook) { - var orig = hook - if (!state.registry[name]) { - state.registry[name] = [] - } - - if (kind === 'before') { - hook = function (method, options) { - return Promise.resolve() - .then(orig.bind(null, options)) - .then(method.bind(null, options)) - } - } - - if (kind === 'after') { - hook = function (method, options) { - var result - return Promise.resolve() - .then(method.bind(null, options)) - .then(function (result_) { - result = result_ - return orig(result, options) - }) - .then(function () { - return result - }) - } - } - - if (kind === 'error') { - hook = function (method, options) { - return Promise.resolve() - .then(method.bind(null, options)) - .catch(function (error) { - return orig(error, options) - }) - } - } - - state.registry[name].push({ - hook: hook, - orig: orig - }) -} diff --git a/node_modules/before-after-hook/lib/register.js b/node_modules/before-after-hook/lib/register.js deleted file mode 100644 index b3d01fdc9..000000000 --- a/node_modules/before-after-hook/lib/register.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = register - -function register (state, name, method, options) { - if (typeof method !== 'function') { - throw new Error('method for before hook must be a function') - } - - if (!options) { - options = {} - } - - if (Array.isArray(name)) { - return name.reverse().reduce(function (callback, name) { - return register.bind(null, state, name, callback, options) - }, method)() - } - - return Promise.resolve() - .then(function () { - if (!state.registry[name]) { - return method(options) - } - - return (state.registry[name]).reduce(function (method, registered) { - return registered.hook.bind(null, method, options) - }, method)() - }) -} diff --git a/node_modules/before-after-hook/lib/remove.js b/node_modules/before-after-hook/lib/remove.js deleted file mode 100644 index e357c514b..000000000 --- a/node_modules/before-after-hook/lib/remove.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = removeHook - -function removeHook (state, name, method) { - if (!state.registry[name]) { - return - } - - var index = state.registry[name] - .map(function (registered) { return registered.orig }) - .indexOf(method) - - if (index === -1) { - return - } - - state.registry[name].splice(index, 1) -} diff --git a/node_modules/before-after-hook/package.json b/node_modules/before-after-hook/package.json deleted file mode 100644 index bc4ebd389..000000000 --- a/node_modules/before-after-hook/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_args": [ - [ - "before-after-hook@2.1.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "before-after-hook@2.1.0", - "_id": "before-after-hook@2.1.0", - "_inBundle": false, - "_integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", - "_location": "/before-after-hook", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "before-after-hook@2.1.0", - "name": "before-after-hook", - "escapedName": "before-after-hook", - "rawSpec": "2.1.0", - "saveSpec": null, - "fetchSpec": "2.1.0" - }, - "_requiredBy": [ - "/@octokit/rest" - ], - "_resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", - "_spec": "2.1.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Gregor Martynus" - }, - "bugs": { - "url": "https://github.com/gr2m/before-after-hook/issues" - }, - "dependencies": {}, - "description": "asynchronous before/error/after hooks for internal functionality", - "devDependencies": { - "browserify": "^16.0.0", - "gaze-cli": "^0.2.0", - "istanbul": "^0.4.0", - "istanbul-coveralls": "^1.0.3", - "mkdirp": "^0.5.1", - "rimraf": "^2.4.4", - "semantic-release": "^15.0.0", - "simple-mock": "^0.8.0", - "standard": "^13.0.1", - "tap-min": "^2.0.0", - "tap-spec": "^5.0.0", - "tape": "^4.2.2", - "typescript": "^3.5.3", - "uglify-js": "^3.0.0" - }, - "files": [ - "index.js", - "index.d.ts", - "lib" - ], - "homepage": "https://github.com/gr2m/before-after-hook#readme", - "keywords": [ - "hook", - "hooks", - "api" - ], - "license": "Apache-2.0", - "name": "before-after-hook", - "release": { - "publish": [ - "@semantic-release/npm", - { - "path": "@semantic-release/github", - "assets": [ - "dist/*.js" - ] - } - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/gr2m/before-after-hook.git" - }, - "scripts": { - "build": "browserify index.js --standalone=Hook > dist/before-after-hook.js", - "postbuild": "uglifyjs dist/before-after-hook.js -mc > dist/before-after-hook.min.js", - "posttest": "npm run validate:ts", - "postvalidate:ts": "tsc --noEmit --strict --target es6 test/typescript-validate.ts", - "prebuild": "rimraf dist && mkdirp dist", - "presemantic-release": "npm run build", - "pretest": "standard", - "semantic-release": "semantic-release", - "test": "npm run -s test:node | tap-spec", - "test:coverage": "istanbul cover test", - "test:coverage:upload": "istanbul-coveralls", - "test:node": "node test", - "test:watch": "gaze 'clear && node test | tap-min' 'test/**/*.js' 'index.js' 'lib/**/*.js'", - "validate:ts": "tsc --strict --target es6 index.d.ts" - }, - "types": "./index.d.ts", - "version": "2.1.0" -} diff --git a/node_modules/bottleneck/.babelrc.es5 b/node_modules/bottleneck/.babelrc.es5 deleted file mode 100644 index e7120e3d0..000000000 --- a/node_modules/bottleneck/.babelrc.es5 +++ /dev/null @@ -1,5 +0,0 @@ -{ - "presets": [ - ["@babel/preset-env", {}] - ] -} \ No newline at end of file diff --git a/node_modules/bottleneck/.babelrc.lib b/node_modules/bottleneck/.babelrc.lib deleted file mode 100644 index de9dbbad9..000000000 --- a/node_modules/bottleneck/.babelrc.lib +++ /dev/null @@ -1,9 +0,0 @@ -{ - "presets": [ - ["@babel/preset-env", { - "targets": { - "node": "6.0" - } - }] - ] -} \ No newline at end of file diff --git a/node_modules/bottleneck/.env b/node_modules/bottleneck/.env deleted file mode 100644 index 7afc96eec..000000000 --- a/node_modules/bottleneck/.env +++ /dev/null @@ -1,2 +0,0 @@ -REDIS_HOST=127.0.0.1 -REDIS_PORT=6379 diff --git a/node_modules/bottleneck/.travis.yml b/node_modules/bottleneck/.travis.yml deleted file mode 100644 index 8204ece5c..000000000 --- a/node_modules/bottleneck/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: node_js -node_js: - - 8 -branches: - only: - - master - - next -services: - - redis-server -env: - global: - - "REDIS_HOST=127.0.0.1" - - "REDIS_PORT=6379" -cache: - directories: - - $HOME/.npm -install: -- npm i -sudo: required -after_success: npx codecov --file=./coverage/lcov.info -script: npm run test-all - -before_install: - - npm i -g npm@5.10 - - npm --version \ No newline at end of file diff --git a/node_modules/bottleneck/LICENSE b/node_modules/bottleneck/LICENSE deleted file mode 100644 index 835fc3145..000000000 --- a/node_modules/bottleneck/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Grondin - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/bottleneck/README.md b/node_modules/bottleneck/README.md deleted file mode 100644 index bb8d52f84..000000000 --- a/node_modules/bottleneck/README.md +++ /dev/null @@ -1,1027 +0,0 @@ -# bottleneck - -[![Downloads][npm-downloads]][npm-url] -[![version][npm-version]][npm-url] -[![License][npm-license]][license-url] - - -Bottleneck is a lightweight and zero-dependency Task Scheduler and Rate Limiter for Node.js and the browser. - -Bottleneck is an easy solution as it adds very little complexity to your code. It is battle-hardened, reliable and production-ready and used on a large scale in private companies and open source software. - -It supports **Clustering**: it can rate limit jobs across multiple Node.js instances. It uses Redis and strictly atomic operations to stay reliable in the presence of unreliable clients and networks. It also supports *Redis Cluster* and *Redis Sentinel*. - -**[Upgrading from version 1?](#upgrading-to-v2)** - - - -- [Install](#install) -- [Quick Start](#quick-start) - * [Gotchas & Common Mistakes](#gotchas--common-mistakes) -- [Constructor](#constructor) -- [Reservoir Intervals](#reservoir-intervals) -- [`submit()`](#submit) -- [`schedule()`](#schedule) -- [`wrap()`](#wrap) -- [Job Options](#job-options) -- [Jobs Lifecycle](#jobs-lifecycle) -- [Events](#events) -- [Retries](#retries) -- [`updateSettings()`](#updatesettings) -- [`incrementReservoir()`](#incrementreservoir) -- [`currentReservoir()`](#currentreservoir) -- [`stop()`](#stop) -- [`chain()`](#chain) -- [Group](#group) -- [Batching](#batching) -- [Clustering](#clustering) -- [Debugging Your Application](#debugging-your-application) -- [Upgrading To v2](#upgrading-to-v2) -- [Contributing](#contributing) - - - -## Install - -``` -npm install --save bottleneck -``` - -```js -import Bottleneck from "bottleneck"; - -// Note: To support older browsers and Node <6.0, you must import the ES5 bundle instead. -var Bottleneck = require("bottleneck/es5"); -``` - -## Quick Start - -### Step 1 of 3 - -Most APIs have a rate limit. For example, to execute 3 requests per second: -```js -const limiter = new Bottleneck({ - minTime: 333 -}); -``` - -If there's a chance some requests might take longer than 333ms and you want to prevent more than 1 request from running at a time, add `maxConcurrent: 1`: -```js -const limiter = new Bottleneck({ - maxConcurrent: 1, - minTime: 333 -}); -``` - -`minTime` and `maxConcurrent` are enough for the majority of use cases. They work well together to ensure a smooth rate of requests. If your use case requires executing requests in **bursts** or every time a quota resets, look into [Reservoir Intervals](#reservoir-intervals). - -### Step 2 of 3 - -#### ➤ Using promises? - -Instead of this: -```js -myFunction(arg1, arg2) -.then((result) => { - /* handle result */ -}); -``` -Do this: -```js -limiter.schedule(() => myFunction(arg1, arg2)) -.then((result) => { - /* handle result */ -}); -``` -Or this: -```js -const wrapped = limiter.wrap(myFunction); - -wrapped(arg1, arg2) -.then((result) => { - /* handle result */ -}); -``` - -#### ➤ Using async/await? - -Instead of this: -```js -const result = await myFunction(arg1, arg2); -``` -Do this: -```js -const result = await limiter.schedule(() => myFunction(arg1, arg2)); -``` -Or this: -```js -const wrapped = limiter.wrap(myFunction); - -const result = await wrapped(arg1, arg2); -``` - -#### ➤ Using callbacks? - -Instead of this: -```js -someAsyncCall(arg1, arg2, callback); -``` -Do this: -```js -limiter.submit(someAsyncCall, arg1, arg2, callback); -``` - -### Step 3 of 3 - -Remember... - -Bottleneck builds a queue of jobs and executes them as soon as possible. By default, the jobs will be executed in the order they were received. - -**Read the 'Gotchas' and you're good to go**. Or keep reading to learn about all the fine tuning and advanced options available. If your rate limits need to be enforced across a cluster of computers, read the [Clustering](#clustering) docs. - -[Need help debugging your application?](#debugging-your-application) - -Instead of throttling maybe [you want to batch up requests](#batching) into fewer calls? - -### Gotchas & Common Mistakes - -* Make sure the function you pass to `schedule()` or `wrap()` only returns once **all the work it does** has completed. - -Instead of this: -```js -limiter.schedule(() => { - tasksArray.forEach(x => processTask(x)); - // BAD, we return before our processTask() functions are finished processing! -}); -``` -Do this: -```js -limiter.schedule(() => { - const allTasks = tasksArray.map(x => processTask(x)); - // GOOD, we wait until all tasks are done. - return Promise.all(allTasks); -}); -``` - -* If you're passing an object's method as a job, you'll probably need to `bind()` the object: -```js -// instead of this: -limiter.schedule(object.doSomething); -// do this: -limiter.schedule(object.doSomething.bind(object)); -// or, wrap it in an arrow function instead: -limiter.schedule(() => object.doSomething()); -``` - -* Bottleneck requires Node 6+ to function. However, an ES5 build is included: `var Bottleneck = require("bottleneck/es5");`. - -* Make sure you're catching `"error"` events emitted by your limiters! - -* Consider setting a `maxConcurrent` value instead of leaving it `null`. This can help your application's performance, especially if you think the limiter's queue might become very long. - -* If you plan on using `priorities`, make sure to set a `maxConcurrent` value. - -* **When using `submit()`**, if a callback isn't necessary, you must pass `null` or an empty function instead. It will not work otherwise. - -* **When using `submit()`**, make sure all the jobs will eventually complete by calling their callback, or set an [`expiration`](#job-options). Even if you submitted your job with a `null` callback , it still needs to call its callback. This is particularly important if you are using a `maxConcurrent` value that isn't `null` (unlimited), otherwise those not completed jobs will be clogging up the limiter and no new jobs will be allowed to run. It's safe to call the callback more than once, subsequent calls are ignored. - -## Docs - -### Constructor - -```js -const limiter = new Bottleneck({/* options */}); -``` - -Basic options: - -| Option | Default | Description | -|--------|---------|-------------| -| `maxConcurrent` | `null` (unlimited) | How many jobs can be executing at the same time. Consider setting a value instead of leaving it `null`, it can help your application's performance, especially if you think the limiter's queue might get very long. | -| `minTime` | `0` ms | How long to wait after launching a job before launching another one. | -| `highWater` | `null` (unlimited) | How long can the queue be? When the queue length exceeds that value, the selected `strategy` is executed to shed the load. | -| `strategy` | `Bottleneck.strategy.LEAK` | Which strategy to use when the queue gets longer than the high water mark. [Read about strategies](#strategies). Strategies are never executed if `highWater` is `null`. | -| `penalty` | `15 * minTime`, or `5000` when `minTime` is `0` | The `penalty` value used by the `BLOCK` strategy. | -| `reservoir` | `null` (unlimited) | How many jobs can be executed before the limiter stops executing jobs. If `reservoir` reaches `0`, no jobs will be executed until it is no longer `0`. New jobs will still be queued up. | -| `reservoirRefreshInterval` | `null` (disabled) | Every `reservoirRefreshInterval` milliseconds, the `reservoir` value will be automatically updated to the value of `reservoirRefreshAmount`. The `reservoirRefreshInterval` value should be a [multiple of 250 (5000 for Clustering)](https://github.com/SGrondin/bottleneck/issues/88). | -| `reservoirRefreshAmount` | `null` (disabled) | The value to set `reservoir` to when `reservoirRefreshInterval` is in use. | -| `reservoirIncreaseInterval` | `null` (disabled) | Every `reservoirIncreaseInterval` milliseconds, the `reservoir` value will be automatically incremented by `reservoirIncreaseAmount`. The `reservoirIncreaseInterval` value should be a [multiple of 250 (5000 for Clustering)](https://github.com/SGrondin/bottleneck/issues/88). | -| `reservoirIncreaseAmount` | `null` (disabled) | The increment applied to `reservoir` when `reservoirIncreaseInterval` is in use. | -| `reservoirIncreaseMaximum` | `null` (disabled) | The maximum value that `reservoir` can reach when `reservoirIncreaseInterval` is in use. | -| `Promise` | `Promise` (built-in) | This lets you override the Promise library used by Bottleneck. | - - -### Reservoir Intervals - -Reservoir Intervals let you execute requests in bursts, by automatically controlling the limiter's `reservoir` value. The `reservoir` is simply the number of jobs the limiter is allowed to execute. Once the value reaches 0, it stops starting new jobs. - -There are 2 types of Reservoir Intervals: Refresh Intervals and Increase Intervals. - -#### Refresh Interval - -In this example, we throttle to 100 requests every 60 seconds: - -```js -const limiter = new Bottleneck({ - reservoir: 100, // initial value - reservoirRefreshAmount: 100, - reservoirRefreshInterval: 60 * 1000, // must be divisible by 250 - - // also use maxConcurrent and/or minTime for safety - maxConcurrent: 1, - minTime: 333 // pick a value that makes sense for your use case -}); -``` -`reservoir` is a counter decremented every time a job is launched, we set its initial value to 100. Then, every `reservoirRefreshInterval` (60000 ms), `reservoir` is automatically updated to be equal to the `reservoirRefreshAmount` (100). - -#### Increase Interval - -In this example, we throttle jobs to meet the Shopify API Rate Limits. Users are allowed to send 40 requests initially, then every second grants 2 more requests up to a maximum of 40. - -```js -const limiter = new Bottleneck({ - reservoir: 40, // initial value - reservoirIncreaseAmount: 2, - reservoirIncreaseInterval: 1000, // must be divisible by 250 - reservoirIncreaseMaximum: 40, - - // also use maxConcurrent and/or minTime for safety - maxConcurrent: 5, - minTime: 250 // pick a value that makes sense for your use case -}); -``` - -#### Warnings - -Reservoir Intervals are an advanced feature, please take the time to read and understand the following warnings. - -- **Reservoir Intervals are not a replacement for `minTime` and `maxConcurrent`.** It's strongly recommended to also use `minTime` and/or `maxConcurrent` to spread out the load. For example, suppose a lot of jobs are queued up because the `reservoir` is 0. Every time the Refresh Interval is triggered, a number of jobs equal to `reservoirRefreshAmount` will automatically be launched, all at the same time! To prevent this flooding effect and keep your application running smoothly, use `minTime` and `maxConcurrent` to **stagger** the jobs. - -- **The Reservoir Interval starts from the moment the limiter is created**. Let's suppose we're using `reservoirRefreshAmount: 5`. If you happen to add 10 jobs just 1ms before the refresh is triggered, the first 5 will run immediately, then 1ms later it will refresh the reservoir value and that will make the last 5 also run right away. It will have run 10 jobs in just over 1ms no matter what your reservoir interval was! - -- **Reservoir Intervals prevent a limiter from being garbage collected.** Call `limiter.disconnect()` to clear the interval and allow the memory to be freed. However, it's not necessary to call `.disconnect()` to allow the Node.js process to exit. - -### submit() - -Adds a job to the queue. This is the callback version of `schedule()`. -```js -limiter.submit(someAsyncCall, arg1, arg2, callback); -``` -You can pass `null` instead of an empty function if there is no callback, but `someAsyncCall` still needs to call **its** callback to let the limiter know it has completed its work. - -`submit()` can also accept [advanced options](#job-options). - -### schedule() - -Adds a job to the queue. This is the Promise and async/await version of `submit()`. -```js -const fn = function(arg1, arg2) { - return httpGet(arg1, arg2); // Here httpGet() returns a promise -}; - -limiter.schedule(fn, arg1, arg2) -.then((result) => { - /* ... */ -}); -``` -In other words, `schedule()` takes a function **fn** and a list of arguments. `schedule()` returns a promise that will be executed according to the rate limits. - -`schedule()` can also accept [advanced options](#job-options). - -Here's another example: -```js -// suppose that `client.get(url)` returns a promise - -const url = "https://wikipedia.org"; - -limiter.schedule(() => client.get(url)) -.then(response => console.log(response.body)); -``` - -### wrap() - -Takes a function that returns a promise. Returns a function identical to the original, but rate limited. -```js -const wrapped = limiter.wrap(fn); - -wrapped() -.then(function (result) { - /* ... */ -}) -.catch(function (error) { - // Bottleneck might need to fail the job even if the original function can never fail. - // For example, your job is taking longer than the `expiration` time you've set. -}); -``` - -### Job Options - -`submit()`, `schedule()`, and `wrap()` all accept advanced options. -```js -// Submit -limiter.submit({/* options */}, someAsyncCall, arg1, arg2, callback); - -// Schedule -limiter.schedule({/* options */}, fn, arg1, arg2); - -// Wrap -const wrapped = limiter.wrap(fn); -wrapped.withOptions({/* options */}, arg1, arg2); -``` - -| Option | Default | Description | -|--------|---------|-------------| -| `priority` | `5` | A priority between `0` and `9`. A job with a priority of `4` will be queued ahead of a job with a priority of `5`. **Important:** You must set a low `maxConcurrent` value for priorities to work, otherwise there is nothing to queue because jobs will be be scheduled immediately! | -| `weight` | `1` | Must be an integer equal to or higher than `0`. The `weight` is what increases the number of running jobs (up to `maxConcurrent`) and decreases the `reservoir` value. | -| `expiration` | `null` (unlimited) | The number of milliseconds a job is given to complete. Jobs that execute for longer than `expiration` ms will be failed with a `BottleneckError`. | -| `id` | `` | You should give an ID to your jobs, it helps with [debugging](#debugging-your-application). | - -### Strategies - -A strategy is a simple algorithm that is executed every time adding a job would cause the number of queued jobs to exceed `highWater`. Strategies are never executed if `highWater` is `null`. - -#### Bottleneck.strategy.LEAK -When adding a new job to a limiter, if the queue length reaches `highWater`, drop the oldest job with the lowest priority. This is useful when jobs that have been waiting for too long are not important anymore. If all the queued jobs are more important (based on their `priority` value) than the one being added, it will not be added. - -#### Bottleneck.strategy.OVERFLOW_PRIORITY -Same as `LEAK`, except it will only drop jobs that are *less important* than the one being added. If all the queued jobs are as or more important than the new one, it will not be added. - -#### Bottleneck.strategy.OVERFLOW -When adding a new job to a limiter, if the queue length reaches `highWater`, do not add the new job. This strategy totally ignores priority levels. - -#### Bottleneck.strategy.BLOCK -When adding a new job to a limiter, if the queue length reaches `highWater`, the limiter falls into "blocked mode". All queued jobs are dropped and no new jobs will be accepted until the limiter unblocks. It will unblock after `penalty` milliseconds have passed without receiving a new job. `penalty` is equal to `15 * minTime` (or `5000` if `minTime` is `0`) by default. This strategy is ideal when bruteforce attacks are to be expected. This strategy totally ignores priority levels. - - -### Jobs lifecycle - -1. **Received**. Your new job has been added to the limiter. Bottleneck needs to check whether it can be accepted into the queue. -2. **Queued**. Bottleneck has accepted your job, but it can not tell at what exact timestamp it will run yet, because it is dependent on previous jobs. -3. **Running**. Your job is not in the queue anymore, it will be executed after a delay that was computed according to your `minTime` setting. -4. **Executing**. Your job is executing its code. -5. **Done**. Your job has completed. - -**Note:** By default, Bottleneck does not keep track of DONE jobs, to save memory. You can enable this feature by passing `trackDoneStatus: true` as an option when creating a limiter. - -#### counts() - -```js -const counts = limiter.counts(); - -console.log(counts); -/* -{ - RECEIVED: 0, - QUEUED: 0, - RUNNING: 0, - EXECUTING: 0, - DONE: 0 -} -*/ -``` - -Returns an object with the current number of jobs per status in the limiter. - -#### jobStatus() - -```js -console.log(limiter.jobStatus("some-job-id")); -// Example: QUEUED -``` - -Returns the status of the job with the provided job id **in the limiter**. Returns `null` if no job with that id exist. - -#### jobs() - -```js -console.log(limiter.jobs("RUNNING")); -// Example: ['id1', 'id2'] -``` - -Returns an array of all the job ids with the specified status **in the limiter**. Not passing a status string returns all the known ids. - -#### queued() - -```js -const count = limiter.queued(priority); - -console.log(count); -``` - -`priority` is optional. Returns the number of `QUEUED` jobs with the given `priority` level. Omitting the `priority` argument returns the total number of queued jobs **in the limiter**. - -#### clusterQueued() - -```js -const count = await limiter.clusterQueued(); - -console.log(count); -``` - -Returns the number of `QUEUED` jobs **in the Cluster**. - -#### empty() - -```js -if (limiter.empty()) { - // do something... -} -``` - -Returns a boolean which indicates whether there are any `RECEIVED` or `QUEUED` jobs **in the limiter**. - -#### running() - -```js -limiter.running() -.then((count) => console.log(count)); -``` - -Returns a promise that returns the **total weight** of the `RUNNING` and `EXECUTING` jobs **in the Cluster**. - -#### done() - -```js -limiter.done() -.then((count) => console.log(count)); -``` - -Returns a promise that returns the **total weight** of `DONE` jobs **in the Cluster**. Does not require passing the `trackDoneStatus: true` option. - -#### check() - -```js -limiter.check() -.then((wouldRunNow) => console.log(wouldRunNow)); -``` -Checks if a new job would be executed immediately if it was submitted now. Returns a promise that returns a boolean. - - -### Events - -__'error'__ -```js -limiter.on("error", function (error) { - /* handle errors here */ -}); -``` - -The two main causes of error events are: uncaught exceptions in your event handlers, and network errors when Clustering is enabled. - -__'failed'__ -```js -limiter.on("failed", function (error, jobInfo) { - // This will be called every time a job fails. -}); -``` - -__'retry'__ - -See [Retries](#retries) to learn how to automatically retry jobs. -```js -limiter.on("retry", function (message, jobInfo) { - // This will be called every time a job is retried. -}); -``` - -__'empty'__ -```js -limiter.on("empty", function () { - // This will be called when `limiter.empty()` becomes true. -}); -``` - -__'idle'__ -```js -limiter.on("idle", function () { - // This will be called when `limiter.empty()` is `true` and `limiter.running()` is `0`. -}); -``` - -__'dropped'__ -```js -limiter.on("dropped", function (dropped) { - // This will be called when a strategy was triggered. - // The dropped request is passed to this event listener. -}); -``` - -__'depleted'__ -```js -limiter.on("depleted", function (empty) { - // This will be called every time the reservoir drops to 0. - // The `empty` (boolean) argument indicates whether `limiter.empty()` is currently true. -}); -``` - -__'debug'__ -```js -limiter.on("debug", function (message, data) { - // Useful to figure out what the limiter is doing in real time - // and to help debug your application -}); -``` - -__'received'__ -__'queued'__ -__'scheduled'__ -__'executing'__ -__'done'__ -```js -limiter.on("queued", function (info) { - // This event is triggered when a job transitions from one Lifecycle stage to another -}); -``` - -See [Jobs Lifecycle](#jobs-lifecycle) for more information. - -These Lifecycle events are not triggered for jobs located on another limiter in a Cluster, for performance reasons. - -#### Other event methods - -Use `removeAllListeners()` with an optional event name as first argument to remove listeners. - -Use `.once()` instead of `.on()` to only receive a single event. - - -### Retries - -The following example: -```js -const limiter = new Bottleneck(); - -// Listen to the "failed" event -limiter.on("failed", async (error, jobInfo) => { - const id = jobInfo.options.id; - console.warn(`Job ${id} failed: ${error}`); - - if (jobInfo.retryCount === 0) { // Here we only retry once - console.log(`Retrying job ${id} in 25ms!`); - return 25; - } -}); - -// Listen to the "retry" event -limiter.on("retry", (error, jobInfo) => console.log(`Now retrying ${jobInfo.options.id}`)); - -const main = async function () { - let executions = 0; - - // Schedule one job - const result = await limiter.schedule({ id: 'ABC123' }, async () => { - executions++; - if (executions === 1) { - throw new Error("Boom!"); - } else { - return "Success!"; - } - }); - - console.log(`Result: ${result}`); -} - -main(); -``` -will output -``` -Job ABC123 failed: Error: Boom! -Retrying job ABC123 in 25ms! -Now retrying ABC123 -Result: Success! -``` -To re-run your job, simply return an integer from the `'failed'` event handler. The number returned is how many milliseconds to wait before retrying it. Return `0` to retry it immediately. - -**IMPORTANT:** When you ask the limiter to retry a job it will not send it back into the queue. It will stay in the `EXECUTING` [state](#jobs-lifecycle) until it succeeds or until you stop retrying it. **This means that it counts as a concurrent job for `maxConcurrent` even while it's just waiting to be retried.** The number of milliseconds to wait ignores your `minTime` settings. - - -### updateSettings() - -```js -limiter.updateSettings(options); -``` -The options are the same as the [limiter constructor](#constructor). - -**Note:** Changes don't affect `SCHEDULED` jobs. - -### incrementReservoir() - -```js -limiter.incrementReservoir(incrementBy); -``` -Returns a promise that returns the new reservoir value. - -### currentReservoir() - -```js -limiter.currentReservoir() -.then((reservoir) => console.log(reservoir)); -``` -Returns a promise that returns the current reservoir value. - -### stop() - -The `stop()` method is used to safely shutdown a limiter. It prevents any new jobs from being added to the limiter and waits for all `EXECUTING` jobs to complete. - -```js -limiter.stop(options) -.then(() => { - console.log("Shutdown completed!") -}); -``` - -`stop()` returns a promise that resolves once all the `EXECUTING` jobs have completed and, if desired, once all non-`EXECUTING` jobs have been dropped. - -| Option | Default | Description | -|--------|---------|-------------| -| `dropWaitingJobs` | `true` | When `true`, drop all the `RECEIVED`, `QUEUED` and `RUNNING` jobs. When `false`, allow those jobs to complete before resolving the Promise returned by this method. | -| `dropErrorMessage` | `This limiter has been stopped.` | The error message used to drop jobs when `dropWaitingJobs` is `true`. | -| `enqueueErrorMessage` | `This limiter has been stopped and cannot accept new jobs.` | The error message used to reject a job added to the limiter after `stop()` has been called. | - -### chain() - -Tasks that are ready to be executed will be added to that other limiter. Suppose you have 2 types of tasks, A and B. They both have their own limiter with their own settings, but both must also follow a global limiter G: -```js -const limiterA = new Bottleneck( /* some settings */ ); -const limiterB = new Bottleneck( /* some different settings */ ); -const limiterG = new Bottleneck( /* some global settings */ ); - -limiterA.chain(limiterG); -limiterB.chain(limiterG); - -// Requests added to limiterA must follow the A and G rate limits. -// Requests added to limiterB must follow the B and G rate limits. -// Requests added to limiterG must follow the G rate limits. -``` - -To unchain, call `limiter.chain(null);`. - -## Group - -The `Group` feature of Bottleneck manages many limiters automatically for you. It creates limiters dynamically and transparently. - -Let's take a DNS server as an example of how Bottleneck can be used. It's a service that sees a lot of abuse and where incoming DNS requests need to be rate limited. Bottleneck is so tiny, it's acceptable to create one limiter for each origin IP, even if it means creating thousands of limiters. The `Group` feature is perfect for this use case. Create one Group and use the origin IP to rate limit each IP independently. Each call with the same key (IP) will be routed to the same underlying limiter. A Group is created like a limiter: - - -```js -const group = new Bottleneck.Group(options); -``` - -The `options` object will be used for every limiter created by the Group. - -The Group is then used with the `.key(str)` method: - -```js -// In this example, the key is an IP -group.key("77.66.54.32").schedule(() => { - /* process the request */ -}); -``` - -#### key() - -* `str` : The key to use. All jobs added with the same key will use the same underlying limiter. *Default: `""`* - -The return value of `.key(str)` is a limiter. If it doesn't already exist, it is generated for you. Calling `key()` is how limiters are created inside a Group. - -Limiters that have been idle for longer than 5 minutes are deleted to avoid memory leaks, this value can be changed by passing a different `timeout` option, in milliseconds. - -#### on("created") - -```js -group.on("created", (limiter, key) => { - console.log("A new limiter was created for key: " + key) - - // Prepare the limiter, for example we'll want to listen to its "error" events! - limiter.on("error", (err) => { - // Handle errors here - }) -}); -``` - -Listening for the `"created"` event is the recommended way to set up a new limiter. Your event handler is executed before `key()` returns the newly created limiter. - -#### updateSettings() - -```js -const group = new Bottleneck.Group({ maxConcurrent: 2, minTime: 250 }); -group.updateSettings({ minTime: 500 }); -``` -After executing the above commands, **new limiters** will be created with `{ maxConcurrent: 2, minTime: 500 }`. - - -#### deleteKey() - -* `str`: The key for the limiter to delete. - -Manually deletes the limiter at the specified key. When using Clustering, the Redis data is immediately deleted and the other Groups in the Cluster will eventually delete their local key automatically, unless it is still being used. - -#### keys() - -Returns an array containing all the keys in the Group. - -#### clusterKeys() - -Same as `group.keys()`, but returns all keys in this Group ID across the Cluster. - -#### limiters() - -```js -const limiters = group.limiters(); - -console.log(limiters); -// [ { key: "some key", limiter: }, { key: "some other key", limiter: } ] -``` - -## Batching - -Some APIs can accept multiple operations in a single call. Bottleneck's Batching feature helps you take advantage of those APIs: -```js -const batcher = new Bottleneck.Batcher({ - maxTime: 1000, - maxSize: 10 -}); - -batcher.on("batch", (batch) => { - console.log(batch); // ["some-data", "some-other-data"] - - // Handle batch here -}); - -batcher.add("some-data"); -batcher.add("some-other-data"); -``` - -`batcher.add()` returns a Promise that resolves once the request has been flushed to a `"batch"` event. - -| Option | Default | Description | -|--------|---------|-------------| -| `maxTime` | `null` (unlimited) | Maximum acceptable time (in milliseconds) a request can have to wait before being flushed to the `"batch"` event. | -| `maxSize` | `null` (unlimited) | Maximum number of requests in a batch. | - -Batching doesn't throttle requests, it only groups them up optimally according to your `maxTime` and `maxSize` settings. - -## Clustering - -Clustering lets many limiters access the same shared state, stored in Redis. Changes to the state are Atomic, Consistent and Isolated (and fully [ACID](https://en.wikipedia.org/wiki/ACID) with the right [Durability](https://redis.io/topics/persistence) configuration), to eliminate any chances of race conditions or state corruption. Your settings, such as `maxConcurrent`, `minTime`, etc., are shared across the whole cluster, which means —for example— that `{ maxConcurrent: 5 }` guarantees no more than 5 jobs can ever run at a time in the entire cluster of limiters. 100% of Bottleneck's features are supported in Clustering mode. Enabling Clustering is as simple as changing a few settings. It's also a convenient way to store or export state for later use. - -Bottleneck will attempt to spread load evenly across limiters. - -### Enabling Clustering - -First, add `redis` or `ioredis` to your application's dependencies: -```bash -# NodeRedis (https://github.com/NodeRedis/node_redis) -npm install --save redis - -# or ioredis (https://github.com/luin/ioredis) -npm install --save ioredis -``` -Then create a limiter or a Group: -```js -const limiter = new Bottleneck({ - /* Some basic options */ - maxConcurrent: 5, - minTime: 500 - id: "my-super-app" // All limiters with the same id will be clustered together - - /* Clustering options */ - datastore: "redis", // or "ioredis" - clearDatastore: false, - clientOptions: { - host: "127.0.0.1", - port: 6379 - - // Redis client options - // Using NodeRedis? See https://github.com/NodeRedis/node_redis#options-object-properties - // Using ioredis? See https://github.com/luin/ioredis/blob/master/API.md#new-redisport-host-options - } -}); -``` - -| Option | Default | Description | -|--------|---------|-------------| -| `datastore` | `"local"` | Where the limiter stores its internal state. The default (`"local"`) keeps the state in the limiter itself. Set it to `"redis"` or `"ioredis"` to enable Clustering. | -| `clearDatastore` | `false` | When set to `true`, on initial startup, the limiter will wipe any existing Bottleneck state data on the Redis db. | -| `clientOptions` | `{}` | This object is passed directly to the redis client library you've selected. | -| `clusterNodes` | `null` | **ioredis only.** When `clusterNodes` is not null, the client will be instantiated by calling `new Redis.Cluster(clusterNodes, clientOptions)` instead of `new Redis(clientOptions)`. | -| `timeout` | `null` (no TTL) | The Redis TTL in milliseconds ([TTL](https://redis.io/commands/ttl)) for the keys created by the limiter. When `timeout` is set, the limiter's state will be automatically removed from Redis after `timeout` milliseconds of inactivity. | -| `Redis` | `null` | Overrides the import/require of the redis/ioredis library. You shouldn't need to set this option unless your application is failing to start due to a failure to require/import the client library. | - -**Note: When using Groups**, the `timeout` option has a default of `300000` milliseconds and the generated limiters automatically receive an `id` with the pattern `${group.id}-${KEY}`. - -**Note:** If you are seeing a runtime error due to the `require()` function not being able to load `redis`/`ioredis`, then directly pass the module as the `Redis` option. Example: -```js -import Redis from "ioredis" - -const limiter = new Bottleneck({ - id: "my-super-app", - datastore: "ioredis", - clientOptions: { host: '12.34.56.78', port: 6379 }, - Redis -}); -``` -Unfortunately, this is a side effect of having to disable inlining, which is necessary to make Bottleneck easy to use in the browser. - -### Important considerations when Clustering - -The first limiter connecting to Redis will store its [constructor options](#constructor) on Redis and all subsequent limiters will be using those settings. You can alter the constructor options used by all the connected limiters by calling `updateSettings()`. The `clearDatastore` option instructs a new limiter to wipe any previous Bottleneck data (for that `id`), including previously stored settings. - -Queued jobs are **NOT** stored on Redis. They are local to each limiter. Exiting the Node.js process will lose those jobs. This is because Bottleneck has no way to propagate the JS code to run a job across a different Node.js process than the one it originated on. Bottleneck doesn't keep track of the queue contents of the limiters on a cluster for performance and reliability reasons. You can use something like [`BeeQueue`](https://github.com/bee-queue/bee-queue) in addition to Bottleneck to get around this limitation. - -Due to the above, functionality relying on the queue length happens purely locally: -- Priorities are local. A higher priority job will run before a lower priority job **on the same limiter**. Another limiter on the cluster might run a lower priority job before our higher priority one. -- Assuming constant priority levels, Bottleneck guarantees that jobs will be run in the order they were received **on the same limiter**. Another limiter on the cluster might run a job received later before ours runs. -- `highWater` and load shedding ([strategies](#strategies)) are per limiter. However, one limiter entering Blocked mode will put the entire cluster in Blocked mode until `penalty` milliseconds have passed. See [Strategies](#strategies). -- The `"empty"` event is triggered when the (local) queue is empty. -- The `"idle"` event is triggered when the (local) queue is empty *and* no jobs are currently running anywhere in the cluster. - -You must work around these limitations in your application code if they are an issue to you. The `publish()` method could be useful here. - -The current design guarantees reliability, is highly performant and lets limiters come and go. Your application can scale up or down, and clients can be disconnected at any time without issues. - -It is **strongly recommended** that you give an `id` to every limiter and Group since it is used to build the name of your limiter's Redis keys! Limiters with the same `id` inside the same Redis db will be sharing the same datastore. - -It is **strongly recommended** that you set an `expiration` (See [Job Options](#job-options)) *on every job*, since that lets the cluster recover from crashed or disconnected clients. Otherwise, a client crashing while executing a job would not be able to tell the cluster to decrease its number of "running" jobs. By using expirations, those lost jobs are automatically cleared after the specified time has passed. Using expirations is essential to keeping a cluster reliable in the face of unpredictable application bugs, network hiccups, and so on. - -Network latency between Node.js and Redis is not taken into account when calculating timings (such as `minTime`). To minimize the impact of latency, Bottleneck only performs a single Redis call per [lifecycle transition](#jobs-lifecycle). Keeping the Redis server close to your limiters will help you get a more consistent experience. Keeping the system time consistent across all clients will also help. - -It is **strongly recommended** to [set up an `"error"` listener](#events) on all your limiters and on your Groups. - -### Clustering Methods - -The `ready()`, `publish()` and `clients()` methods also exist when using the `local` datastore, for code compatibility reasons: code written for `redis`/`ioredis` won't break with `local`. - -#### ready() - -This method returns a promise that resolves once the limiter is connected to Redis. - -As of v2.9.0, it's no longer necessary to wait for `.ready()` to resolve before issuing commands to a limiter. The commands will be queued until the limiter successfully connects. Make sure to listen to the `"error"` event to handle connection errors. - -```js -const limiter = new Bottleneck({/* options */}); - -limiter.on("error", (err) => { - // handle network errors -}); - -limiter.ready() -.then(() => { - // The limiter is ready -}); -``` - -#### publish(message) - -This method broadcasts the `message` string to every limiter in the Cluster. It returns a promise. -```js -const limiter = new Bottleneck({/* options */}); - -limiter.on("message", (msg) => { - console.log(msg); // prints "this is a string" -}); - -limiter.publish("this is a string"); -``` - -To send objects, stringify them first: -```js -limiter.on("message", (msg) => { - console.log(JSON.parse(msg).hello) // prints "world" -}); - -limiter.publish(JSON.stringify({ hello: "world" })); -``` - -#### clients() - -If you need direct access to the redis clients, use `.clients()`: -```js -console.log(limiter.clients()); -// { client: , subscriber: } -``` - -### Additional Clustering information - -- Bottleneck is compatible with [Redis Clusters](https://redis.io/topics/cluster-tutorial), but you must use the `ioredis` datastore and the `clusterNodes` option. -- Bottleneck is compatible with Redis Sentinel, but you must use the `ioredis` datastore. -- Bottleneck's data is stored in Redis keys starting with `b_`. It also uses pubsub channels starting with `b_` It will not interfere with any other data stored on the server. -- Bottleneck loads a few Lua scripts on the Redis server using the `SCRIPT LOAD` command. These scripts only take up a few Kb of memory. Running the `SCRIPT FLUSH` command will cause any connected limiters to experience critical errors until a new limiter connects to Redis and loads the scripts again. -- The Lua scripts are highly optimized and designed to use as few resources as possible. - -### Managing Redis Connections - -Bottleneck needs to create 2 Redis Clients to function, one for normal operations and one for pubsub subscriptions. These 2 clients are kept in a `Bottleneck.RedisConnection` (NodeRedis) or a `Bottleneck.IORedisConnection` (ioredis) object, referred to as the Connection object. - -By default, every Group and every standalone limiter (a limiter not created by a Group) will create their own Connection object, but it is possible to manually control this behavior. In this example, every Group and limiter is sharing the same Connection object and therefore the same 2 clients: -```js -const connection = new Bottleneck.RedisConnection({ - clientOptions: {/* NodeRedis/ioredis options */} - // ioredis also accepts `clusterNodes` here -}); - - -const limiter = new Bottleneck({ connection: connection }); -const group = new Bottleneck.Group({ connection: connection }); -``` -You can access and reuse the Connection object of any Group or limiter: -```js -const group = new Bottleneck.Group({ connection: limiter.connection }); -``` -When a Connection object is created manually, the connectivity `"error"` events are emitted on the Connection itself. -```js -connection.on("error", (err) => { /* handle connectivity errors here */ }); -``` -If you already have a NodeRedis/ioredis client, you can ask Bottleneck to reuse it, although currently the Connection object will still create a second client for pubsub operations: -```js -import Redis from "redis"; -const client = new Redis.createClient({/* options */}); - -const connection = new Bottleneck.RedisConnection({ - // `clientOptions` and `clusterNodes` will be ignored since we're passing a raw client - client: client -}); - -const limiter = new Bottleneck({ connection: connection }); -const group = new Bottleneck.Group({ connection: connection }); -``` -Depending on your application, using more clients can improve performance. - -Use the `disconnect(flush)` method to close the Redis clients. -```js -limiter.disconnect(); -group.disconnect(); -``` -If you created the Connection object manually, you need to call `connection.disconnect()` instead, for safety reasons. - -## Debugging your application - -Debugging complex scheduling logic can be difficult, especially when priorities, weights, and network latency all interact with one another. - -If your application is not behaving as expected, start by making sure you're catching `"error"` [events emitted](#events) by your limiters and your Groups. Those errors are most likely uncaught exceptions from your application code. - -Make sure you've read the ['Gotchas'](#gotchas) section. - -To see exactly what a limiter is doing in real time, listen to the `"debug"` event. It contains detailed information about how the limiter is executing your code. Adding [job IDs](#job-options) to all your jobs makes the debug output more readable. - -When Bottleneck has to fail one of your jobs, it does so by using `BottleneckError` objects. This lets you tell those errors apart from your own code's errors: -```js -limiter.schedule(fn) -.then((result) => { /* ... */ } ) -.catch((error) => { - if (error instanceof Bottleneck.BottleneckError) { - /* ... */ - } -}); -``` - -## Upgrading to v2 - -The internal algorithms essentially haven't changed from v1, but many small changes to the interface were made to introduce new features. - -All the breaking changes: -- Bottleneck v2 requires Node 6+ or a modern browser. Use `require("bottleneck/es5")` if you need ES5 support in v2. Bottleneck v1 will continue to use ES5 only. -- The Bottleneck constructor now takes an options object. See [Constructor](#constructor). -- The `Cluster` feature is now called `Group`. This is to distinguish it from the new v2 [Clustering](#clustering) feature. -- The `Group` constructor takes an options object to match the limiter constructor. -- Jobs take an optional options object. See [Job options](#job-options). -- Removed `submitPriority()`, use `submit()` with an options object instead. -- Removed `schedulePriority()`, use `schedule()` with an options object instead. -- The `rejectOnDrop` option is now `true` by default. It can be set to `false` if you wish to retain v1 behavior. However this option is left undocumented as enabling it is considered to be a poor practice. -- Use `null` instead of `0` to indicate an unlimited `maxConcurrent` value. -- Use `null` instead of `-1` to indicate an unlimited `highWater` value. -- Renamed `changeSettings()` to `updateSettings()`, it now returns a promise to indicate completion. It takes the same options object as the constructor. -- Renamed `nbQueued()` to `queued()`. -- Renamed `nbRunning` to `running()`, it now returns its result using a promise. -- Removed `isBlocked()`. -- Changing the Promise library is now done through the options object like any other limiter setting. -- Removed `changePenalty()`, it is now done through the options object like any other limiter setting. -- Removed `changeReservoir()`, it is now done through the options object like any other limiter setting. -- Removed `stopAll()`. Use the new `stop()` method. -- `check()` now accepts an optional `weight` argument, and returns its result using a promise. -- Removed the `Group` `changeTimeout()` method. Instead, pass a `timeout` option when creating a Group. - -Version 2 is more user-friendly and powerful. - -After upgrading your code, please take a minute to read the [Debugging your application](#debugging-your-application) chapter. - - -## Contributing - -This README is always in need of improvements. If wording can be clearer and simpler, please consider forking this repo and submitting a Pull Request, or simply opening an issue. - -Suggestions and bug reports are also welcome. - -To work on the Bottleneck code, simply clone the repo, makes your changes to the files located in `src/` only, then run `./scripts/build.sh && npm test` to ensure that everything is set up correctly. - -To speed up compilation time during development, run `./scripts/build.sh dev` instead. Make sure to build and test without `dev` before submitting a PR. - -The tests must also pass in Clustering mode and using the ES5 bundle. You'll need a Redis server running locally (latency needs to be minimal to run the tests). If the server isn't using the default hostname and port, you can set those in the `.env` file. Then run `./scripts/build.sh && npm run test-all`. - -All contributions are appreciated and will be considered. - -[license-url]: https://github.com/SGrondin/bottleneck/blob/master/LICENSE - -[npm-url]: https://www.npmjs.com/package/bottleneck -[npm-license]: https://img.shields.io/npm/l/bottleneck.svg?style=flat -[npm-version]: https://img.shields.io/npm/v/bottleneck.svg?style=flat -[npm-downloads]: https://img.shields.io/npm/dm/bottleneck.svg?style=flat diff --git a/node_modules/bottleneck/bottleneck.d.ts b/node_modules/bottleneck/bottleneck.d.ts deleted file mode 100644 index 3ad20c128..000000000 --- a/node_modules/bottleneck/bottleneck.d.ts +++ /dev/null @@ -1,629 +0,0 @@ -declare module "bottleneck" { - namespace Bottleneck { - type ConstructorOptions = { - /** - * How many jobs can be running at the same time. - */ - readonly maxConcurrent?: number | null; - /** - * How long to wait after launching a job before launching another one. - */ - readonly minTime?: number | null; - /** - * How long can the queue get? When the queue length exceeds that value, the selected `strategy` is executed to shed the load. - */ - readonly highWater?: number | null; - /** - * Which strategy to use if the queue gets longer than the high water mark. - */ - readonly strategy?: Bottleneck.Strategy | null; - /** - * The `penalty` value used by the `Bottleneck.strategy.BLOCK` strategy. - */ - readonly penalty?: number | null; - /** - * How many jobs can be executed before the limiter stops executing jobs. If `reservoir` reaches `0`, no jobs will be executed until it is no longer `0`. - */ - readonly reservoir?: number | null; - /** - * Every `reservoirRefreshInterval` milliseconds, the `reservoir` value will be automatically reset to `reservoirRefreshAmount`. - */ - readonly reservoirRefreshInterval?: number | null; - /** - * The value to reset `reservoir` to when `reservoirRefreshInterval` is in use. - */ - readonly reservoirRefreshAmount?: number | null; - /** - * The increment applied to `reservoir` when `reservoirIncreaseInterval` is in use. - */ - readonly reservoirIncreaseAmount?: number | null; - /** - * Every `reservoirIncreaseInterval` milliseconds, the `reservoir` value will be automatically incremented by `reservoirIncreaseAmount`. - */ - readonly reservoirIncreaseInterval?: number | null; - /** - * The maximum value that `reservoir` can reach when `reservoirIncreaseInterval` is in use. - */ - readonly reservoirIncreaseMaximum?: number | null; - /** - * Optional identifier - */ - readonly id?: string | null; - /** - * Set to true to leave your failed jobs hanging instead of failing them. - */ - readonly rejectOnDrop?: boolean | null; - /** - * Set to true to keep track of done jobs with counts() and jobStatus(). Uses more memory. - */ - readonly trackDoneStatus?: boolean | null; - /** - * Where the limiter stores its internal state. The default (`local`) keeps the state in the limiter itself. Set it to `redis` to enable Clustering. - */ - readonly datastore?: string | null; - /** - * Override the Promise library used by Bottleneck. - */ - readonly Promise?: any; - /** - * This object is passed directly to the redis client library you've selected. - */ - readonly clientOptions?: any; - /** - * **ioredis only.** When `clusterNodes` is not null, the client will be instantiated by calling `new Redis.Cluster(clusterNodes, clientOptions)`. - */ - readonly clusterNodes?: any; - /** - * An existing Bottleneck.RedisConnection or Bottleneck.IORedisConnection object to use. - * If using, `datastore`, `clientOptions` and `clusterNodes` will be ignored. - */ - /** - * Optional Redis/IORedis library from `require('ioredis')` or equivalent. If not, Bottleneck will attempt to require Redis/IORedis at runtime. - */ - readonly Redis?: any; - /** - * Bottleneck connection object created from `new Bottleneck.RedisConnection` or `new Bottleneck.IORedisConnection`. - */ - readonly connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection | null; - /** - * When set to `true`, on initial startup, the limiter will wipe any existing Bottleneck state data on the Redis db. - */ - readonly clearDatastore?: boolean | null; - /** - * The Redis TTL in milliseconds for the keys created by the limiter. When `timeout` is set, the limiter's state will be automatically removed from Redis after timeout milliseconds of inactivity. Note: timeout is 300000 (5 minutes) by default when using a Group. - */ - readonly timeout?: number | null; - - [propName: string]: any; - }; - type JobOptions = { - /** - * A priority between `0` and `9`. A job with a priority of `4` will _always_ be executed before a job with a priority of `5`. - */ - readonly priority?: number | null; - /** - * Must be an integer equal to or higher than `0`. The `weight` is what increases the number of running jobs (up to `maxConcurrent`, if using) and decreases the `reservoir` value (if using). - */ - readonly weight?: number | null; - /** - * The number milliseconds a job has to finish. Jobs that take longer than their `expiration` will be failed with a `BottleneckError`. - */ - readonly expiration?: number | null; - /** - * Optional identifier, helps with debug output. - */ - readonly id?: string | null; - }; - type StopOptions = { - /** - * When `true`, drop all the RECEIVED, QUEUED and RUNNING jobs. When `false`, allow those jobs to complete before resolving the Promise returned by this method. - */ - readonly dropWaitingJobs?: boolean | null; - /** - * The error message used to drop jobs when `dropWaitingJobs` is `true`. - */ - readonly dropErrorMessage?: string | null; - /** - * The error message used to reject a job added to the limiter after `stop()` has been called. - */ - readonly enqueueErrorMessage?: string | null; - }; - type Callback = (err: any, result: T) => void; - type ClientsList = { client?: any; subscriber?: any }; - type GroupLimiterPair = { key: string; limiter: Bottleneck }; - interface Strategy {} - - type EventInfo = { - readonly args: any[]; - readonly options: { - readonly id: string; - readonly priority: number; - readonly weight: number; - readonly expiration?: number; - }; - }; - type EventInfoDropped = EventInfo & { - readonly task: Function; - readonly promise: Promise; - }; - type EventInfoQueued = EventInfo & { - readonly reachedHWM: boolean; - readonly blocked: boolean; - }; - type EventInfoRetryable = EventInfo & { readonly retryCount: number; }; - - enum Status { - RECEIVED = "RECEIVED", - QUEUED = "QUEUED", - RUNNING = "RUNNING", - EXECUTING = "EXECUTING", - DONE = "DONE" - } - type Counts = { - RECEIVED: number, - QUEUED: number, - RUNNING: number, - EXECUTING: number, - DONE?: number - }; - - type RedisConnectionOptions = { - /** - * This object is passed directly to NodeRedis' createClient() method. - */ - readonly clientOptions?: any; - /** - * An existing NodeRedis client to use. If using, `clientOptions` will be ignored. - */ - readonly client?: any; - /** - * Optional Redis library from `require('redis')` or equivalent. If not, Bottleneck will attempt to require Redis at runtime. - */ - readonly Redis?: any; - }; - - type IORedisConnectionOptions = { - /** - * This object is passed directly to ioredis' constructor method. - */ - readonly clientOptions?: any; - /** - * When `clusterNodes` is not null, the client will be instantiated by calling `new Redis.Cluster(clusterNodes, clientOptions)`. - */ - readonly clusterNodes?: any; - /** - * An existing ioredis client to use. If using, `clientOptions` and `clusterNodes` will be ignored. - */ - readonly client?: any; - /** - * Optional IORedis library from `require('ioredis')` or equivalent. If not, Bottleneck will attempt to require IORedis at runtime. - */ - readonly Redis?: any; - }; - - type BatcherOptions = { - /** - * Maximum acceptable time (in milliseconds) a request can have to wait before being flushed to the `"batch"` event. - */ - readonly maxTime?: number | null; - /** - * Maximum number of requests in a batch. - */ - readonly maxSize?: number | null; - }; - - class BottleneckError extends Error { - } - - class RedisConnection { - constructor(options?: Bottleneck.RedisConnectionOptions); - - /** - * Register an event listener. - * @param name - The event name. - * @param fn - The callback function. - */ - on(name: "error", fn: (error: any) => void): void; - - /** - * Register an event listener for one event only. - * @param name - The event name. - * @param fn - The callback function. - */ - once(name: "error", fn: (error: any) => void): void; - - /** - * Waits until the connection is ready and returns the raw Node_Redis clients. - */ - ready(): Promise; - - /** - * Close the redis clients. - * @param flush - Write transient data before closing. - */ - disconnect(flush?: boolean): Promise; - } - - class IORedisConnection { - constructor(options?: Bottleneck.IORedisConnectionOptions); - - /** - * Register an event listener. - * @param name - The event name. - * @param fn - The callback function. - */ - on(name: "error", fn: (error: any) => void): void; - - /** - * Register an event listener for one event only. - * @param name - The event name. - * @param fn - The callback function. - */ - once(name: "error", fn: (error: any) => void): void; - - /** - * Waits until the connection is ready and returns the raw ioredis clients. - */ - ready(): Promise; - - /** - * Close the redis clients. - * @param flush - Write transient data before closing. - */ - disconnect(flush?: boolean): Promise; - } - - class Batcher { - constructor(options?: Bottleneck.BatcherOptions); - - /** - * Register an event listener. - * @param name - The event name. - * @param fn - The callback function. - */ - on(name: string, fn: Function): void; - on(name: "error", fn: (error: any) => void): void; - on(name: "batch", fn: (batch: any[]) => void): void; - - /** - * Register an event listener for one event only. - * @param name - The event name. - * @param fn - The callback function. - */ - once(name: string, fn: Function): void; - once(name: "error", fn: (error: any) => void): void; - once(name: "batch", fn: (batch: any[]) => void): void; - - /** - * Add a request to the Batcher. Batches are flushed to the "batch" event. - */ - add(data: any): Promise; - } - - class Group { - constructor(options?: Bottleneck.ConstructorOptions); - - id: string; - datastore: string; - connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection; - - /** - * Returns the limiter for the specified key. - * @param str - The limiter key. - */ - key(str: string): Bottleneck; - - /** - * Register an event listener. - * @param name - The event name. - * @param fn - The callback function. - */ - on(name: string, fn: Function): void; - on(name: "error", fn: (error: any) => void): void; - on(name: "created", fn: (limiter: Bottleneck, key: string) => void): void; - - /** - * Register an event listener for one event only. - * @param name - The event name. - * @param fn - The callback function. - */ - once(name: string, fn: Function): void; - once(name: "error", fn: (error: any) => void): void; - once(name: "created", fn: (limiter: Bottleneck, key: string) => void): void; - - /** - * Removes all registered event listeners. - * @param name - The optional event name to remove listeners from. - */ - removeAllListeners(name?: string): void; - - /** - * Updates the group settings. - * @param options - The new settings. - */ - updateSettings(options: Bottleneck.ConstructorOptions): void; - - /** - * Deletes the limiter for the given key. - * Returns true if a key was deleted. - * @param str - The key - */ - deleteKey(str: string): Promise; - - /** - * Disconnects the underlying redis clients, unless the Group was created with the `connection` option. - * @param flush - Write transient data before closing. - */ - disconnect(flush?: boolean): Promise; - - /** - * Returns all the key-limiter pairs. - */ - limiters(): Bottleneck.GroupLimiterPair[]; - - /** - * Returns all Group keys in the local instance - */ - keys(): string[]; - - /** - * Returns all Group keys in the Cluster - */ - clusterKeys(): Promise; - } - - class Events { - constructor(object: Object); - - /** - * Returns the number of limiters for the event name - * @param name - The event name. - */ - listenerCount(name: string): number; - - /** - * Returns a promise with the first non-null/non-undefined result from a listener - * @param name - The event name. - * @param args - The arguments to pass to the event listeners. - */ - trigger(name: string, ...args: any[]): Promise; - } - } - - class Bottleneck { - public static readonly strategy: { - /** - * When adding a new job to a limiter, if the queue length reaches `highWater`, drop the oldest job with the lowest priority. This is useful when jobs that have been waiting for too long are not important anymore. If all the queued jobs are more important (based on their `priority` value) than the one being added, it will not be added. - */ - readonly LEAK: Bottleneck.Strategy; - /** - * Same as `LEAK`, except it will only drop jobs that are less important than the one being added. If all the queued jobs are as or more important than the new one, it will not be added. - */ - readonly OVERFLOW_PRIORITY: Bottleneck.Strategy; - /** - * When adding a new job to a limiter, if the queue length reaches `highWater`, do not add the new job. This strategy totally ignores priority levels. - */ - readonly OVERFLOW: Bottleneck.Strategy; - /** - * When adding a new job to a limiter, if the queue length reaches `highWater`, the limiter falls into "blocked mode". All queued jobs are dropped and no new jobs will be accepted until the limiter unblocks. It will unblock after `penalty` milliseconds have passed without receiving a new job. `penalty` is equal to `15 * minTime` (or `5000` if `minTime` is `0`) by default and can be changed by calling `changePenalty()`. This strategy is ideal when bruteforce attacks are to be expected. This strategy totally ignores priority levels. - */ - readonly BLOCK: Bottleneck.Strategy; - }; - - constructor(options?: Bottleneck.ConstructorOptions); - - id: string; - datastore: string; - connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection; - - /** - * Returns a promise which will be resolved once the limiter is ready to accept jobs - * or rejected if it fails to start up. - */ - ready(): Promise; - - /** - * Returns a datastore-specific object of redis clients. - */ - clients(): Bottleneck.ClientsList; - - /** - * Returns the name of the Redis pubsub channel used for this limiter - */ - channel(): string; - - /** - * Disconnects the underlying redis clients, unless the limiter was created with the `connection` option. - * @param flush - Write transient data before closing. - */ - disconnect(flush?: boolean): Promise; - - /** - * Broadcast a string to every limiter in the Cluster. - */ - publish(message: string): Promise; - - /** - * Returns an object with the current number of jobs per status. - */ - counts(): Bottleneck.Counts; - - /** - * Returns the status of the job with the provided job id. - */ - jobStatus(id: string): Bottleneck.Status; - - /** - * Returns the status of the job with the provided job id. - */ - jobs(status?: Bottleneck.Status): string[]; - - /** - * Returns the number of requests queued. - * @param priority - Returns the number of requests queued with the specified priority. - */ - queued(priority?: number): number; - - /** - * Returns the number of requests queued across the Cluster. - */ - clusterQueued(): Promise; - - /** - * Returns whether there are any jobs currently in the queue or in the process of being added to the queue. - */ - empty(): boolean; - - /** - * Returns the total weight of jobs in a RUNNING or EXECUTING state in the Cluster. - */ - running(): Promise; - - /** - * Returns the total weight of jobs in a DONE state in the Cluster. - */ - done(): Promise; - - /** - * If a request was added right now, would it be run immediately? - * @param weight - The weight of the request - */ - check(weight?: number): Promise; - - /** - * Register an event listener. - * @param name - The event name. - * @param fn - The callback function. - */ - on(name: "error", fn: (error: any) => void): void; - on(name: "empty", fn: () => void): void; - on(name: "idle", fn: () => void): void; - on(name: "depleted", fn: (empty: boolean) => void): void; - on(name: "message", fn: (message: string) => void): void; - on(name: "debug", fn: (message: string, info: any) => void): void; - on(name: "dropped", fn: (dropped: Bottleneck.EventInfoDropped) => void): void; - on(name: "received", fn: (info: Bottleneck.EventInfo) => void): void; - on(name: "queued", fn: (info: Bottleneck.EventInfoQueued) => void): void; - on(name: "scheduled", fn: (info: Bottleneck.EventInfo) => void): void; - on(name: "executing", fn: (info: Bottleneck.EventInfoRetryable) => void): void; - on(name: "failed", fn: (error: any, info: Bottleneck.EventInfoRetryable) => Promise | number | void | null): void; - on(name: "retry", fn: (message: string, info: Bottleneck.EventInfoRetryable) => void): void; - on(name: "done", fn: (info: Bottleneck.EventInfoRetryable) => void): void; - - /** - * Register an event listener for one event only. - * @param name - The event name. - * @param fn - The callback function. - */ - once(name: "error", fn: (error: any) => void): void; - once(name: "empty", fn: () => void): void; - once(name: "idle", fn: () => void): void; - once(name: "depleted", fn: (empty: boolean) => void): void; - once(name: "message", fn: (message: string) => void): void; - once(name: "debug", fn: (message: string, info: any) => void): void; - once(name: "dropped", fn: (dropped: Bottleneck.EventInfoDropped) => void): void; - once(name: "received", fn: (info: Bottleneck.EventInfo) => void): void; - once(name: "queued", fn: (info: Bottleneck.EventInfoQueued) => void): void; - once(name: "scheduled", fn: (info: Bottleneck.EventInfo) => void): void; - once(name: "executing", fn: (info: Bottleneck.EventInfoRetryable) => void): void; - once(name: "failed", fn: (error: any, info: Bottleneck.EventInfoRetryable) => Promise | number | void | null): void; - once(name: "retry", fn: (message: string, info: Bottleneck.EventInfoRetryable) => void): void; - once(name: "done", fn: (info: Bottleneck.EventInfoRetryable) => void): void; - - /** - * Removes all registered event listeners. - * @param name - The optional event name to remove listeners from. - */ - removeAllListeners(name?: string): void; - - /** - * Changes the settings for future requests. - * @param options - The new settings. - */ - updateSettings(options?: Bottleneck.ConstructorOptions): Bottleneck; - - /** - * Adds to the reservoir count and returns the new value. - */ - incrementReservoir(incrementBy: number): Promise; - - /** - * The `stop()` method is used to safely shutdown a limiter. It prevents any new jobs from being added to the limiter and waits for all Executing jobs to complete. - */ - stop(options?: Bottleneck.StopOptions): Promise; - - /** - * Returns the current reservoir count, if any. - */ - currentReservoir(): Promise; - - /** - * Chain this limiter to another. - * @param limiter - The limiter that requests to this limiter must also follow. - */ - chain(limiter?: Bottleneck): Bottleneck; - - wrap(fn: () => PromiseLike): (() => Promise) & { withOptions: (options: Bottleneck.JobOptions) => Promise; }; - wrap(fn: (arg1: A1) => PromiseLike): ((arg1: A1) => Promise) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1) => Promise; }; - wrap(fn: (arg1: A1, arg2: A2) => PromiseLike): ((arg1: A1, arg2: A2) => Promise) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2) => Promise; }; - wrap(fn: (arg1: A1, arg2: A2, arg3: A3) => PromiseLike): ((arg1: A1, arg2: A2, arg3: A3) => Promise) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3) => Promise; }; - wrap(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => PromiseLike): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Promise) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Promise; }; - wrap(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => PromiseLike): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Promise) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Promise; }; - wrap(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => PromiseLike): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => Promise) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => Promise; }; - wrap(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7) => PromiseLike): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7) => Promise) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7) => Promise; }; - wrap(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8) => PromiseLike): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8) => Promise) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8) => Promise; }; - wrap(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9) => PromiseLike): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9) => Promise) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9) => Promise; }; - wrap(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10) => PromiseLike): ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10) => Promise) & { withOptions: (options: Bottleneck.JobOptions, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10) => Promise; }; - - submit(fn: (callback: Bottleneck.Callback) => void, callback: Bottleneck.Callback): void; - submit(fn: (arg1: A1, callback: Bottleneck.Callback) => void, arg1: A1, callback: Bottleneck.Callback): void; - submit(fn: (arg1: A1, arg2: A2, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, callback: Bottleneck.Callback): void; - submit(fn: (arg1: A1, arg2: A2, arg3: A3, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, callback: Bottleneck.Callback): void; - submit(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: Bottleneck.Callback): void; - submit(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: Bottleneck.Callback): void; - submit(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, callback: Bottleneck.Callback): void; - submit(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, callback: Bottleneck.Callback): void; - submit(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, callback: Bottleneck.Callback): void; - submit(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, callback: Bottleneck.Callback): void; - submit(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10, callback: Bottleneck.Callback): void; - - submit(options: Bottleneck.JobOptions, fn: (callback: Bottleneck.Callback) => void, callback: Bottleneck.Callback): void; - submit(options: Bottleneck.JobOptions, fn: (arg1: A1, callback: Bottleneck.Callback) => void, arg1: A1, callback: Bottleneck.Callback): void; - submit(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, callback: Bottleneck.Callback): void; - submit(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, callback: Bottleneck.Callback): void; - submit(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: Bottleneck.Callback): void; - submit(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: Bottleneck.Callback): void; - submit(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, callback: Bottleneck.Callback): void; - submit(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, callback: Bottleneck.Callback): void; - submit(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, callback: Bottleneck.Callback): void; - submit(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, callback: Bottleneck.Callback): void; - submit(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10, callback: Bottleneck.Callback) => void, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10, callback: Bottleneck.Callback): void; - - schedule(fn: () => PromiseLike): Promise; - schedule(fn: (arg1: A1) => PromiseLike, arg1: A1): Promise; - schedule(fn: (arg1: A1, arg2: A2) => PromiseLike, arg1: A1, arg2: A2): Promise; - schedule(fn: (arg1: A1, arg2: A2, arg3: A3) => PromiseLike, arg1: A1, arg2: A2, arg3: A3): Promise; - schedule(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4): Promise; - schedule(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5): Promise; - schedule(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6): Promise; - schedule(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7): Promise; - schedule(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8): Promise; - schedule(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9): Promise; - schedule(fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10): Promise; - - schedule(options: Bottleneck.JobOptions, fn: () => PromiseLike): Promise; - schedule(options: Bottleneck.JobOptions, fn: (arg1: A1) => PromiseLike, arg1: A1): Promise; - schedule(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2) => PromiseLike, arg1: A1, arg2: A2): Promise; - schedule(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3) => PromiseLike, arg1: A1, arg2: A2, arg3: A3): Promise; - schedule(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4): Promise; - schedule(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5): Promise; - schedule(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6): Promise; - schedule(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7): Promise; - schedule(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8): Promise; - schedule(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9): Promise; - schedule(options: Bottleneck.JobOptions, fn: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10) => PromiseLike, arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6, arg7: A7, arg8: A8, arg9: A9, arg10: A10): Promise; - } - - export default Bottleneck; -} - diff --git a/node_modules/bottleneck/bottleneck.d.ts.ejs b/node_modules/bottleneck/bottleneck.d.ts.ejs deleted file mode 100644 index 18f19ad8a..000000000 --- a/node_modules/bottleneck/bottleneck.d.ts.ejs +++ /dev/null @@ -1,588 +0,0 @@ -declare module "bottleneck" { - namespace Bottleneck { - type ConstructorOptions = { - /** - * How many jobs can be running at the same time. - */ - readonly maxConcurrent?: number | null; - /** - * How long to wait after launching a job before launching another one. - */ - readonly minTime?: number | null; - /** - * How long can the queue get? When the queue length exceeds that value, the selected `strategy` is executed to shed the load. - */ - readonly highWater?: number | null; - /** - * Which strategy to use if the queue gets longer than the high water mark. - */ - readonly strategy?: Bottleneck.Strategy | null; - /** - * The `penalty` value used by the `Bottleneck.strategy.BLOCK` strategy. - */ - readonly penalty?: number | null; - /** - * How many jobs can be executed before the limiter stops executing jobs. If `reservoir` reaches `0`, no jobs will be executed until it is no longer `0`. - */ - readonly reservoir?: number | null; - /** - * Every `reservoirRefreshInterval` milliseconds, the `reservoir` value will be automatically reset to `reservoirRefreshAmount`. - */ - readonly reservoirRefreshInterval?: number | null; - /** - * The value to reset `reservoir` to when `reservoirRefreshInterval` is in use. - */ - readonly reservoirRefreshAmount?: number | null; - /** - * The increment applied to `reservoir` when `reservoirIncreaseInterval` is in use. - */ - readonly reservoirIncreaseAmount?: number | null; - /** - * Every `reservoirIncreaseInterval` milliseconds, the `reservoir` value will be automatically incremented by `reservoirIncreaseAmount`. - */ - readonly reservoirIncreaseInterval?: number | null; - /** - * The maximum value that `reservoir` can reach when `reservoirIncreaseInterval` is in use. - */ - readonly reservoirIncreaseMaximum?: number | null; - /** - * Optional identifier - */ - readonly id?: string | null; - /** - * Set to true to leave your failed jobs hanging instead of failing them. - */ - readonly rejectOnDrop?: boolean | null; - /** - * Set to true to keep track of done jobs with counts() and jobStatus(). Uses more memory. - */ - readonly trackDoneStatus?: boolean | null; - /** - * Where the limiter stores its internal state. The default (`local`) keeps the state in the limiter itself. Set it to `redis` to enable Clustering. - */ - readonly datastore?: string | null; - /** - * Override the Promise library used by Bottleneck. - */ - readonly Promise?: any; - /** - * This object is passed directly to the redis client library you've selected. - */ - readonly clientOptions?: any; - /** - * **ioredis only.** When `clusterNodes` is not null, the client will be instantiated by calling `new Redis.Cluster(clusterNodes, clientOptions)`. - */ - readonly clusterNodes?: any; - /** - * An existing Bottleneck.RedisConnection or Bottleneck.IORedisConnection object to use. - * If using, `datastore`, `clientOptions` and `clusterNodes` will be ignored. - */ - /** - * Optional Redis/IORedis library from `require('ioredis')` or equivalent. If not, Bottleneck will attempt to require Redis/IORedis at runtime. - */ - readonly Redis?: any; - /** - * Bottleneck connection object created from `new Bottleneck.RedisConnection` or `new Bottleneck.IORedisConnection`. - */ - readonly connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection | null; - /** - * When set to `true`, on initial startup, the limiter will wipe any existing Bottleneck state data on the Redis db. - */ - readonly clearDatastore?: boolean | null; - /** - * The Redis TTL in milliseconds for the keys created by the limiter. When `timeout` is set, the limiter's state will be automatically removed from Redis after timeout milliseconds of inactivity. Note: timeout is 300000 (5 minutes) by default when using a Group. - */ - readonly timeout?: number | null; - - [propName: string]: any; - }; - type JobOptions = { - /** - * A priority between `0` and `9`. A job with a priority of `4` will _always_ be executed before a job with a priority of `5`. - */ - readonly priority?: number | null; - /** - * Must be an integer equal to or higher than `0`. The `weight` is what increases the number of running jobs (up to `maxConcurrent`, if using) and decreases the `reservoir` value (if using). - */ - readonly weight?: number | null; - /** - * The number milliseconds a job has to finish. Jobs that take longer than their `expiration` will be failed with a `BottleneckError`. - */ - readonly expiration?: number | null; - /** - * Optional identifier, helps with debug output. - */ - readonly id?: string | null; - }; - type StopOptions = { - /** - * When `true`, drop all the RECEIVED, QUEUED and RUNNING jobs. When `false`, allow those jobs to complete before resolving the Promise returned by this method. - */ - readonly dropWaitingJobs?: boolean | null; - /** - * The error message used to drop jobs when `dropWaitingJobs` is `true`. - */ - readonly dropErrorMessage?: string | null; - /** - * The error message used to reject a job added to the limiter after `stop()` has been called. - */ - readonly enqueueErrorMessage?: string | null; - }; - type Callback = (err: any, result: T) => void; - type ClientsList = { client?: any; subscriber?: any }; - type GroupLimiterPair = { key: string; limiter: Bottleneck }; - interface Strategy {} - - type EventInfo = { - readonly args: any[]; - readonly options: { - readonly id: string; - readonly priority: number; - readonly weight: number; - readonly expiration?: number; - }; - }; - type EventInfoDropped = EventInfo & { - readonly task: Function; - readonly promise: Promise; - }; - type EventInfoQueued = EventInfo & { - readonly reachedHWM: boolean; - readonly blocked: boolean; - }; - type EventInfoRetryable = EventInfo & { readonly retryCount: number; }; - - enum Status { - RECEIVED = "RECEIVED", - QUEUED = "QUEUED", - RUNNING = "RUNNING", - EXECUTING = "EXECUTING", - DONE = "DONE" - } - type Counts = { - RECEIVED: number, - QUEUED: number, - RUNNING: number, - EXECUTING: number, - DONE?: number - }; - - type RedisConnectionOptions = { - /** - * This object is passed directly to NodeRedis' createClient() method. - */ - readonly clientOptions?: any; - /** - * An existing NodeRedis client to use. If using, `clientOptions` will be ignored. - */ - readonly client?: any; - /** - * Optional Redis library from `require('redis')` or equivalent. If not, Bottleneck will attempt to require Redis at runtime. - */ - readonly Redis?: any; - }; - - type IORedisConnectionOptions = { - /** - * This object is passed directly to ioredis' constructor method. - */ - readonly clientOptions?: any; - /** - * When `clusterNodes` is not null, the client will be instantiated by calling `new Redis.Cluster(clusterNodes, clientOptions)`. - */ - readonly clusterNodes?: any; - /** - * An existing ioredis client to use. If using, `clientOptions` and `clusterNodes` will be ignored. - */ - readonly client?: any; - /** - * Optional IORedis library from `require('ioredis')` or equivalent. If not, Bottleneck will attempt to require IORedis at runtime. - */ - readonly Redis?: any; - }; - - type BatcherOptions = { - /** - * Maximum acceptable time (in milliseconds) a request can have to wait before being flushed to the `"batch"` event. - */ - readonly maxTime?: number | null; - /** - * Maximum number of requests in a batch. - */ - readonly maxSize?: number | null; - }; - - class BottleneckError extends Error { - } - - class RedisConnection { - constructor(options?: Bottleneck.RedisConnectionOptions); - - /** - * Register an event listener. - * @param name - The event name. - * @param fn - The callback function. - */ - on(name: "error", fn: (error: any) => void): void; - - /** - * Register an event listener for one event only. - * @param name - The event name. - * @param fn - The callback function. - */ - once(name: "error", fn: (error: any) => void): void; - - /** - * Waits until the connection is ready and returns the raw Node_Redis clients. - */ - ready(): Promise; - - /** - * Close the redis clients. - * @param flush - Write transient data before closing. - */ - disconnect(flush?: boolean): Promise; - } - - class IORedisConnection { - constructor(options?: Bottleneck.IORedisConnectionOptions); - - /** - * Register an event listener. - * @param name - The event name. - * @param fn - The callback function. - */ - on(name: "error", fn: (error: any) => void): void; - - /** - * Register an event listener for one event only. - * @param name - The event name. - * @param fn - The callback function. - */ - once(name: "error", fn: (error: any) => void): void; - - /** - * Waits until the connection is ready and returns the raw ioredis clients. - */ - ready(): Promise; - - /** - * Close the redis clients. - * @param flush - Write transient data before closing. - */ - disconnect(flush?: boolean): Promise; - } - - class Batcher { - constructor(options?: Bottleneck.BatcherOptions); - - /** - * Register an event listener. - * @param name - The event name. - * @param fn - The callback function. - */ - on(name: string, fn: Function): void; - on(name: "error", fn: (error: any) => void): void; - on(name: "batch", fn: (batch: any[]) => void): void; - - /** - * Register an event listener for one event only. - * @param name - The event name. - * @param fn - The callback function. - */ - once(name: string, fn: Function): void; - once(name: "error", fn: (error: any) => void): void; - once(name: "batch", fn: (batch: any[]) => void): void; - - /** - * Add a request to the Batcher. Batches are flushed to the "batch" event. - */ - add(data: any): Promise; - } - - class Group { - constructor(options?: Bottleneck.ConstructorOptions); - - id: string; - datastore: string; - connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection; - - /** - * Returns the limiter for the specified key. - * @param str - The limiter key. - */ - key(str: string): Bottleneck; - - /** - * Register an event listener. - * @param name - The event name. - * @param fn - The callback function. - */ - on(name: string, fn: Function): void; - on(name: "error", fn: (error: any) => void): void; - on(name: "created", fn: (limiter: Bottleneck, key: string) => void): void; - - /** - * Register an event listener for one event only. - * @param name - The event name. - * @param fn - The callback function. - */ - once(name: string, fn: Function): void; - once(name: "error", fn: (error: any) => void): void; - once(name: "created", fn: (limiter: Bottleneck, key: string) => void): void; - - /** - * Removes all registered event listeners. - * @param name - The optional event name to remove listeners from. - */ - removeAllListeners(name?: string): void; - - /** - * Updates the group settings. - * @param options - The new settings. - */ - updateSettings(options: Bottleneck.ConstructorOptions): void; - - /** - * Deletes the limiter for the given key. - * Returns true if a key was deleted. - * @param str - The key - */ - deleteKey(str: string): Promise; - - /** - * Disconnects the underlying redis clients, unless the Group was created with the `connection` option. - * @param flush - Write transient data before closing. - */ - disconnect(flush?: boolean): Promise; - - /** - * Returns all the key-limiter pairs. - */ - limiters(): Bottleneck.GroupLimiterPair[]; - - /** - * Returns all Group keys in the local instance - */ - keys(): string[]; - - /** - * Returns all Group keys in the Cluster - */ - clusterKeys(): Promise; - } - - class Events { - constructor(object: Object); - - /** - * Returns the number of limiters for the event name - * @param name - The event name. - */ - listenerCount(name: string): number; - - /** - * Returns a promise with the first non-null/non-undefined result from a listener - * @param name - The event name. - * @param args - The arguments to pass to the event listeners. - */ - trigger(name: string, ...args: any[]): Promise; - } - } - - class Bottleneck { - public static readonly strategy: { - /** - * When adding a new job to a limiter, if the queue length reaches `highWater`, drop the oldest job with the lowest priority. This is useful when jobs that have been waiting for too long are not important anymore. If all the queued jobs are more important (based on their `priority` value) than the one being added, it will not be added. - */ - readonly LEAK: Bottleneck.Strategy; - /** - * Same as `LEAK`, except it will only drop jobs that are less important than the one being added. If all the queued jobs are as or more important than the new one, it will not be added. - */ - readonly OVERFLOW_PRIORITY: Bottleneck.Strategy; - /** - * When adding a new job to a limiter, if the queue length reaches `highWater`, do not add the new job. This strategy totally ignores priority levels. - */ - readonly OVERFLOW: Bottleneck.Strategy; - /** - * When adding a new job to a limiter, if the queue length reaches `highWater`, the limiter falls into "blocked mode". All queued jobs are dropped and no new jobs will be accepted until the limiter unblocks. It will unblock after `penalty` milliseconds have passed without receiving a new job. `penalty` is equal to `15 * minTime` (or `5000` if `minTime` is `0`) by default and can be changed by calling `changePenalty()`. This strategy is ideal when bruteforce attacks are to be expected. This strategy totally ignores priority levels. - */ - readonly BLOCK: Bottleneck.Strategy; - }; - - constructor(options?: Bottleneck.ConstructorOptions); - - id: string; - datastore: string; - connection?: Bottleneck.RedisConnection | Bottleneck.IORedisConnection; - - /** - * Returns a promise which will be resolved once the limiter is ready to accept jobs - * or rejected if it fails to start up. - */ - ready(): Promise; - - /** - * Returns a datastore-specific object of redis clients. - */ - clients(): Bottleneck.ClientsList; - - /** - * Returns the name of the Redis pubsub channel used for this limiter - */ - channel(): string; - - /** - * Disconnects the underlying redis clients, unless the limiter was created with the `connection` option. - * @param flush - Write transient data before closing. - */ - disconnect(flush?: boolean): Promise; - - /** - * Broadcast a string to every limiter in the Cluster. - */ - publish(message: string): Promise; - - /** - * Returns an object with the current number of jobs per status. - */ - counts(): Bottleneck.Counts; - - /** - * Returns the status of the job with the provided job id. - */ - jobStatus(id: string): Bottleneck.Status; - - /** - * Returns the status of the job with the provided job id. - */ - jobs(status?: Bottleneck.Status): string[]; - - /** - * Returns the number of requests queued. - * @param priority - Returns the number of requests queued with the specified priority. - */ - queued(priority?: number): number; - - /** - * Returns the number of requests queued across the Cluster. - */ - clusterQueued(): Promise; - - /** - * Returns whether there are any jobs currently in the queue or in the process of being added to the queue. - */ - empty(): boolean; - - /** - * Returns the total weight of jobs in a RUNNING or EXECUTING state in the Cluster. - */ - running(): Promise; - - /** - * Returns the total weight of jobs in a DONE state in the Cluster. - */ - done(): Promise; - - /** - * If a request was added right now, would it be run immediately? - * @param weight - The weight of the request - */ - check(weight?: number): Promise; - - /** - * Register an event listener. - * @param name - The event name. - * @param fn - The callback function. - */ - on(name: "error", fn: (error: any) => void): void; - on(name: "empty", fn: () => void): void; - on(name: "idle", fn: () => void): void; - on(name: "depleted", fn: (empty: boolean) => void): void; - on(name: "message", fn: (message: string) => void): void; - on(name: "debug", fn: (message: string, info: any) => void): void; - on(name: "dropped", fn: (dropped: Bottleneck.EventInfoDropped) => void): void; - on(name: "received", fn: (info: Bottleneck.EventInfo) => void): void; - on(name: "queued", fn: (info: Bottleneck.EventInfoQueued) => void): void; - on(name: "scheduled", fn: (info: Bottleneck.EventInfo) => void): void; - on(name: "executing", fn: (info: Bottleneck.EventInfoRetryable) => void): void; - on(name: "failed", fn: (error: any, info: Bottleneck.EventInfoRetryable) => Promise | number | void | null): void; - on(name: "retry", fn: (message: string, info: Bottleneck.EventInfoRetryable) => void): void; - on(name: "done", fn: (info: Bottleneck.EventInfoRetryable) => void): void; - - /** - * Register an event listener for one event only. - * @param name - The event name. - * @param fn - The callback function. - */ - once(name: "error", fn: (error: any) => void): void; - once(name: "empty", fn: () => void): void; - once(name: "idle", fn: () => void): void; - once(name: "depleted", fn: (empty: boolean) => void): void; - once(name: "message", fn: (message: string) => void): void; - once(name: "debug", fn: (message: string, info: any) => void): void; - once(name: "dropped", fn: (dropped: Bottleneck.EventInfoDropped) => void): void; - once(name: "received", fn: (info: Bottleneck.EventInfo) => void): void; - once(name: "queued", fn: (info: Bottleneck.EventInfoQueued) => void): void; - once(name: "scheduled", fn: (info: Bottleneck.EventInfo) => void): void; - once(name: "executing", fn: (info: Bottleneck.EventInfoRetryable) => void): void; - once(name: "failed", fn: (error: any, info: Bottleneck.EventInfoRetryable) => Promise | number | void | null): void; - once(name: "retry", fn: (message: string, info: Bottleneck.EventInfoRetryable) => void): void; - once(name: "done", fn: (info: Bottleneck.EventInfoRetryable) => void): void; - - /** - * Removes all registered event listeners. - * @param name - The optional event name to remove listeners from. - */ - removeAllListeners(name?: string): void; - - /** - * Changes the settings for future requests. - * @param options - The new settings. - */ - updateSettings(options?: Bottleneck.ConstructorOptions): Bottleneck; - - /** - * Adds to the reservoir count and returns the new value. - */ - incrementReservoir(incrementBy: number): Promise; - - /** - * The `stop()` method is used to safely shutdown a limiter. It prevents any new jobs from being added to the limiter and waits for all Executing jobs to complete. - */ - stop(options?: Bottleneck.StopOptions): Promise; - - /** - * Returns the current reservoir count, if any. - */ - currentReservoir(): Promise; - - /** - * Chain this limiter to another. - * @param limiter - The limiter that requests to this limiter must also follow. - */ - chain(limiter?: Bottleneck): Bottleneck; - - <%_ for (var count of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) { _%> - wrap, A<%= idx %><%_ } _%>>(fn: (<%= Array.apply(null, Array(count)).map((e, i) => i+1).map(i => `arg${i}: A${i}`).join(", ") %>) => PromiseLike): ((<%_ for (var idx = 1; idx <= count; idx++) { _%><%_ if (idx > 1) { %>, <% } %>arg<%= idx %>: A<%= idx %><%_ } _%>) => Promise) & { withOptions: (options: Bottleneck.JobOptions<%_ for (var idx = 1; idx <= count; idx++) { _%>, arg<%= idx %>: A<%= idx %><%_ } _%>) => Promise; }; - <%_ } _%> - - <%_ for (var count of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) { _%> - submit, A<%= idx %><%_ } _%>>(fn: (<%_ for (var idx = 1; idx <= count; idx++) { _%>arg<%= idx %>: A<%= idx %>, <% } _%>callback: Bottleneck.Callback) => void<%_ for (var idx = 1; idx <= count; idx++) { _%>, arg<%= idx %>: A<%= idx %><%_ } _%>, callback: Bottleneck.Callback): void; - <%_ } _%> - - <%_ for (var count of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) { _%> - submit, A<%= idx %><%_ } _%>>(options: Bottleneck.JobOptions, fn: (<%_ for (var idx = 1; idx <= count; idx++) { _%>arg<%= idx %>: A<%= idx %>, <% } _%>callback: Bottleneck.Callback) => void<%_ for (var idx = 1; idx <= count; idx++) { _%>, arg<%= idx %>: A<%= idx %><%_ } _%>, callback: Bottleneck.Callback): void; - <%_ } _%> - - <%_ for (var count of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) { _%> - schedule, A<%= idx %><%_ } _%>>(fn: (<%= Array.apply(null, Array(count)).map((e, i) => i+1).map(i => `arg${i}: A${i}`).join(", ") %>) => PromiseLike<%_ for (var idx = 1; idx <= count; idx++) { _%>, arg<%= idx %>: A<%= idx %><%_ } _%>): Promise; - <%_ } _%> - - <%_ for (var count of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) { _%> - schedule, A<%= idx %><%_ } _%>>(options: Bottleneck.JobOptions, fn: (<%= Array.apply(null, Array(count)).map((e, i) => i+1).map(i => `arg${i}: A${i}`).join(", ") %>) => PromiseLike<%_ for (var idx = 1; idx <= count; idx++) { _%>, arg<%= idx %>: A<%= idx %><%_ } _%>): Promise; - <%_ } _%> - } - - export default Bottleneck; -} diff --git a/node_modules/bottleneck/bower.json b/node_modules/bottleneck/bower.json deleted file mode 100644 index b72e87ee3..000000000 --- a/node_modules/bottleneck/bower.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "bottleneck", - "main": "bottleneck.js", - "version": "2.19.5", - "homepage": "https://github.com/SGrondin/bottleneck", - "authors": [ - "SGrondin " - ], - "description": "Distributed task scheduler and rate limiter", - "moduleType": [ - "globals", - "node" - ], - "keywords": [ - "async", - "rate", - "limiter", - "limiting", - "throttle", - "throttling", - "load", - "ddos" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components" - ] -} diff --git a/node_modules/bottleneck/es5.js b/node_modules/bottleneck/es5.js deleted file mode 100644 index a177b6540..000000000 --- a/node_modules/bottleneck/es5.js +++ /dev/null @@ -1,5064 +0,0 @@ -/** - * This file contains the full Bottleneck library (MIT) compiled to ES5. - * https://github.com/SGrondin/bottleneck - * It also contains the regenerator-runtime (MIT), necessary for Babel-generated ES5 code to execute promise and async/await code. - * See the following link for Copyright and License information: - * https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/runtime.js - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.Bottleneck = factory()); -}(this, (function () { 'use strict'; - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - function getCjsExportFromNamespace (n) { - return n && n['default'] || n; - } - - var runtime = createCommonjsModule(function (module) { - /** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - !(function(global) { - - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; // More compressible than void 0. - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - var runtime = global.regeneratorRuntime; - if (runtime) { - { - // If regeneratorRuntime is defined globally and we're in a module, - // make the exports object identical to regeneratorRuntime. - module.exports = runtime; - } - // Don't bother evaluating the rest of this file if the runtime was - // already defined globally. - return; - } - - // Define the runtime globally (as expected by generated code) as either - // module.exports (if we're in a module) or a new, empty object. - runtime = global.regeneratorRuntime = module.exports; - - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); - - // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); - - return generator; - } - runtime.wrap = wrap; - - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } - - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; - - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; - - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - - // This is a polyfill for %IteratorPrototype% for environments that - // don't natively support it. - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; - - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && - NativeIteratorPrototype !== Op && - hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - // This environment has a native %IteratorPrototype%; use it instead - // of the polyfill. - IteratorPrototype = NativeIteratorPrototype; - } - - var Gp = GeneratorFunctionPrototype.prototype = - Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = - GeneratorFunction.displayName = "GeneratorFunction"; - - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - }); - } - - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; - - runtime.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = "GeneratorFunction"; - } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `hasOwn.call(value, "__await")` to determine if the yielded value is - // meant to be awaited. - runtime.awrap = function(arg) { - return { __await: arg }; - }; - - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && - typeof value === "object" && - hasOwn.call(value, "__await")) { - return Promise.resolve(value.__await).then(function(value) { - invoke("next", value, resolve, reject); - }, function(err) { - invoke("throw", err, resolve, reject); - }); - } - - return Promise.resolve(value).then(function(unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. - result.value = unwrapped; - resolve(result); - }, function(error) { - // If a rejected Promise was yielded, throw the rejection back - // into the async generator function so it can be handled there. - return invoke("throw", error, resolve, reject); - }); - } - } - - var previousPromise; - - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise(function(resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } - - return previousPromise = - // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then( - callInvokeWithMethodAndArg, - // Avoid propagating failures to Promises returned by later - // invocations of the iterator. - callInvokeWithMethodAndArg - ) : callInvokeWithMethodAndArg(); - } - - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } - - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - runtime.AsyncIterator = AsyncIterator; - - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator( - wrap(innerFn, outerFn, self, tryLocsList) - ); - - return runtime.isGeneratorFunction(outerFn) - ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function(result) { - return result.done ? result.value : iter.next(); - }); - }; - - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } - - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } - - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); - } - - context.method = method; - context.arg = arg; - - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - - if (context.method === "next") { - // Setting context._sent for legacy support of Babel's - // function.sent implementation. - context.sent = context._sent = context.arg; - - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - - context.dispatchException(context.arg); - - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } - - state = GenStateExecuting; - - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; - - if (record.arg === ContinueSentinel) { - continue; - } - - return { - value: record.arg, - done: context.done - }; - - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - context.method = "throw"; - context.arg = record.arg; - } - } - }; - } - - // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; - - if (context.method === "throw") { - if (delegate.iterator.return) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } - } - - context.method = "throw"; - context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); - } - - return ContinueSentinel; - } - - var record = tryCatch(method, delegate.iterator, context.arg); - - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - - var info = record.arg; - - if (! info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } - - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; - - // Resume execution at the desired location (see delegateYield). - context.next = delegate.nextLoc; - - // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined; - } - - } else { - // Re-yield the result returned by the delegate method. - return info; - } - - // The delegate iterator is finished, so forget it and continue with - // the outer generator. - context.delegate = null; - return ContinueSentinel; - } - - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); - - Gp[toStringTagSymbol] = "Generator"; - - // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - Gp[iteratorSymbol] = function() { - return this; - }; - - Gp.toString = function() { - return "[object Generator]"; - }; - - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; - - if (1 in locs) { - entry.catchLoc = locs[1]; - } - - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - - this.tryEntries.push(entry); - } - - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; - - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - - if (typeof iterable.next === "function") { - return iterable; - } - - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - - next.value = undefined; - next.done = true; - - return next; - }; - - return next.next = next; - } - } - - // Return an iterator with no values. - return { next: doneResult }; - } - runtime.values = values; - - function doneResult() { - return { value: undefined, done: true }; - } - - Context.prototype = { - constructor: Context, - - reset: function(skipTempReset) { - this.prev = 0; - this.next = 0; - // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; - - this.method = "next"; - this.arg = undefined; - - this.tryEntries.forEach(resetTryEntry); - - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && - hasOwn.call(this, name) && - !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - - stop: function() { - this.done = true; - - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - - return this.rval; - }, - - dispatchException: function(exception) { - if (this.done) { - throw exception; - } - - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined; - } - - return !! caught; - } - - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } - - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, - - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } - - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - - return this.complete(record); - }, - - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - - return ContinueSentinel; - }, - - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, - - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined; - } - - return ContinueSentinel; - } - }; - })( - // In sloppy mode, unbound `this` refers to the global object, fallback to - // Function constructor if we're in global strict mode. That is sadly a form - // of indirect eval which violates Content Security Policy. - (function() { - return this || (typeof self === "object" && self); - })() || Function("return this")() - ); - }); - - function _typeof(obj) { - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); - } - - function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } - } - - function _asyncToGenerator(fn) { - return function () { - var self = this, - args = arguments; - return new Promise(function (resolve, reject) { - var gen = fn.apply(self, args); - - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); - } - - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); - } - - _next(undefined); - }); - }; - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } - - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); - return true; - } catch (e) { - return false; - } - } - - function _construct(Parent, args, Class) { - if (isNativeReflectConstruct()) { - _construct = Reflect.construct; - } else { - _construct = function _construct(Parent, args, Class) { - var a = [null]; - a.push.apply(a, args); - var Constructor = Function.bind.apply(Parent, a); - var instance = new Constructor(); - if (Class) _setPrototypeOf(instance, Class.prototype); - return instance; - }; - } - - return _construct.apply(null, arguments); - } - - function _isNativeFunction(fn) { - return Function.toString.call(fn).indexOf("[native code]") !== -1; - } - - function _wrapNativeSuper(Class) { - var _cache = typeof Map === "function" ? new Map() : undefined; - - _wrapNativeSuper = function _wrapNativeSuper(Class) { - if (Class === null || !_isNativeFunction(Class)) return Class; - - if (typeof Class !== "function") { - throw new TypeError("Super expression must either be null or a function"); - } - - if (typeof _cache !== "undefined") { - if (_cache.has(Class)) return _cache.get(Class); - - _cache.set(Class, Wrapper); - } - - function Wrapper() { - return _construct(Class, arguments, _getPrototypeOf(this).constructor); - } - - Wrapper.prototype = Object.create(Class.prototype, { - constructor: { - value: Wrapper, - enumerable: false, - writable: true, - configurable: true - } - }); - return _setPrototypeOf(Wrapper, Class); - }; - - return _wrapNativeSuper(Class); - } - - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; - } - - function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } - - return _assertThisInitialized(self); - } - - function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); - } - - function _toArray(arr) { - return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); - } - - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); - } - - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } - } - - function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - } - - function _iterableToArray(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); - } - - function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); - } - - function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - - var load = function load(received, defaults) { - var onto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var k, ref, v; - - for (k in defaults) { - v = defaults[k]; - onto[k] = (ref = received[k]) != null ? ref : v; - } - - return onto; - }; - - var overwrite = function overwrite(received, defaults) { - var onto = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var k, v; - - for (k in received) { - v = received[k]; - - if (defaults[k] !== void 0) { - onto[k] = v; - } - } - - return onto; - }; - - var parser = { - load: load, - overwrite: overwrite - }; - - var DLList; - - DLList = - /*#__PURE__*/ - function () { - function DLList(incr, decr) { - _classCallCheck(this, DLList); - - this.incr = incr; - this.decr = decr; - this._first = null; - this._last = null; - this.length = 0; - } - - _createClass(DLList, [{ - key: "push", - value: function push(value) { - var node; - this.length++; - - if (typeof this.incr === "function") { - this.incr(); - } - - node = { - value: value, - prev: this._last, - next: null - }; - - if (this._last != null) { - this._last.next = node; - this._last = node; - } else { - this._first = this._last = node; - } - - return void 0; - } - }, { - key: "shift", - value: function shift() { - var value; - - if (this._first == null) { - return; - } else { - this.length--; - - if (typeof this.decr === "function") { - this.decr(); - } - } - - value = this._first.value; - - if ((this._first = this._first.next) != null) { - this._first.prev = null; - } else { - this._last = null; - } - - return value; - } - }, { - key: "first", - value: function first() { - if (this._first != null) { - return this._first.value; - } - } - }, { - key: "getArray", - value: function getArray() { - var node, ref, results; - node = this._first; - results = []; - - while (node != null) { - results.push((ref = node, node = node.next, ref.value)); - } - - return results; - } - }, { - key: "forEachShift", - value: function forEachShift(cb) { - var node; - node = this.shift(); - - while (node != null) { - cb(node), node = this.shift(); - } - - return void 0; - } - }, { - key: "debug", - value: function debug() { - var node, ref, ref1, ref2, results; - node = this._first; - results = []; - - while (node != null) { - results.push((ref = node, node = node.next, { - value: ref.value, - prev: (ref1 = ref.prev) != null ? ref1.value : void 0, - next: (ref2 = ref.next) != null ? ref2.value : void 0 - })); - } - - return results; - } - }]); - - return DLList; - }(); - - var DLList_1 = DLList; - - var Events; - - Events = - /*#__PURE__*/ - function () { - function Events(instance) { - var _this = this; - - _classCallCheck(this, Events); - - this.instance = instance; - this._events = {}; - - if (this.instance.on != null || this.instance.once != null || this.instance.removeAllListeners != null) { - throw new Error("An Emitter already exists for this object"); - } - - this.instance.on = function (name, cb) { - return _this._addListener(name, "many", cb); - }; - - this.instance.once = function (name, cb) { - return _this._addListener(name, "once", cb); - }; - - this.instance.removeAllListeners = function () { - var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - - if (name != null) { - return delete _this._events[name]; - } else { - return _this._events = {}; - } - }; - } - - _createClass(Events, [{ - key: "_addListener", - value: function _addListener(name, status, cb) { - var base; - - if ((base = this._events)[name] == null) { - base[name] = []; - } - - this._events[name].push({ - cb: cb, - status: status - }); - - return this.instance; - } - }, { - key: "listenerCount", - value: function listenerCount(name) { - if (this._events[name] != null) { - return this._events[name].length; - } else { - return 0; - } - } - }, { - key: "trigger", - value: function () { - var _trigger = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(name) { - var _this2 = this; - - var _len, - args, - _key, - e, - promises, - _args2 = arguments; - - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - for (_len = _args2.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = _args2[_key]; - } - - _context2.prev = 1; - - if (name !== "debug") { - this.trigger("debug", "Event triggered: ".concat(name), args); - } - - if (!(this._events[name] == null)) { - _context2.next = 5; - break; - } - - return _context2.abrupt("return"); - - case 5: - this._events[name] = this._events[name].filter(function (listener) { - return listener.status !== "none"; - }); - promises = this._events[name].map( - /*#__PURE__*/ - function () { - var _ref = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(listener) { - var e, returned; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - if (!(listener.status === "none")) { - _context.next = 2; - break; - } - - return _context.abrupt("return"); - - case 2: - if (listener.status === "once") { - listener.status = "none"; - } - - _context.prev = 3; - returned = typeof listener.cb === "function" ? listener.cb.apply(listener, args) : void 0; - - if (!(typeof (returned != null ? returned.then : void 0) === "function")) { - _context.next = 11; - break; - } - - _context.next = 8; - return returned; - - case 8: - return _context.abrupt("return", _context.sent); - - case 11: - return _context.abrupt("return", returned); - - case 12: - _context.next = 19; - break; - - case 14: - _context.prev = 14; - _context.t0 = _context["catch"](3); - e = _context.t0; - - { - _this2.trigger("error", e); - } - - return _context.abrupt("return", null); - - case 19: - case "end": - return _context.stop(); - } - } - }, _callee, null, [[3, 14]]); - })); - - return function (_x2) { - return _ref.apply(this, arguments); - }; - }()); - _context2.next = 9; - return Promise.all(promises); - - case 9: - _context2.t0 = function (x) { - return x != null; - }; - - return _context2.abrupt("return", _context2.sent.find(_context2.t0)); - - case 13: - _context2.prev = 13; - _context2.t1 = _context2["catch"](1); - e = _context2.t1; - - { - this.trigger("error", e); - } - - return _context2.abrupt("return", null); - - case 18: - case "end": - return _context2.stop(); - } - } - }, _callee2, this, [[1, 13]]); - })); - - function trigger(_x) { - return _trigger.apply(this, arguments); - } - - return trigger; - }() - }]); - - return Events; - }(); - - var Events_1 = Events; - - var DLList$1, Events$1, Queues; - DLList$1 = DLList_1; - Events$1 = Events_1; - - Queues = - /*#__PURE__*/ - function () { - function Queues(num_priorities) { - _classCallCheck(this, Queues); - - var i; - this.Events = new Events$1(this); - this._length = 0; - - this._lists = function () { - var _this = this; - - var j, ref, results; - results = []; - - for (i = j = 1, ref = num_priorities; 1 <= ref ? j <= ref : j >= ref; i = 1 <= ref ? ++j : --j) { - results.push(new DLList$1(function () { - return _this.incr(); - }, function () { - return _this.decr(); - })); - } - - return results; - }.call(this); - } - - _createClass(Queues, [{ - key: "incr", - value: function incr() { - if (this._length++ === 0) { - return this.Events.trigger("leftzero"); - } - } - }, { - key: "decr", - value: function decr() { - if (--this._length === 0) { - return this.Events.trigger("zero"); - } - } - }, { - key: "push", - value: function push(job) { - return this._lists[job.options.priority].push(job); - } - }, { - key: "queued", - value: function queued(priority) { - if (priority != null) { - return this._lists[priority].length; - } else { - return this._length; - } - } - }, { - key: "shiftAll", - value: function shiftAll(fn) { - return this._lists.forEach(function (list) { - return list.forEachShift(fn); - }); - } - }, { - key: "getFirst", - value: function getFirst() { - var arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._lists; - var j, len, list; - - for (j = 0, len = arr.length; j < len; j++) { - list = arr[j]; - - if (list.length > 0) { - return list; - } - } - - return []; - } - }, { - key: "shiftLastFrom", - value: function shiftLastFrom(priority) { - return this.getFirst(this._lists.slice(priority).reverse()).shift(); - } - }]); - - return Queues; - }(); - - var Queues_1 = Queues; - - var BottleneckError; - - BottleneckError = - /*#__PURE__*/ - function (_Error) { - _inherits(BottleneckError, _Error); - - function BottleneckError() { - _classCallCheck(this, BottleneckError); - - return _possibleConstructorReturn(this, _getPrototypeOf(BottleneckError).apply(this, arguments)); - } - - return BottleneckError; - }(_wrapNativeSuper(Error)); - - var BottleneckError_1 = BottleneckError; - - var BottleneckError$1, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser$1; - NUM_PRIORITIES = 10; - DEFAULT_PRIORITY = 5; - parser$1 = parser; - BottleneckError$1 = BottleneckError_1; - - Job = - /*#__PURE__*/ - function () { - function Job(task, args, options, jobDefaults, rejectOnDrop, Events, _states, Promise) { - var _this = this; - - _classCallCheck(this, Job); - - this.task = task; - this.args = args; - this.rejectOnDrop = rejectOnDrop; - this.Events = Events; - this._states = _states; - this.Promise = Promise; - this.options = parser$1.load(options, jobDefaults); - this.options.priority = this._sanitizePriority(this.options.priority); - - if (this.options.id === jobDefaults.id) { - this.options.id = "".concat(this.options.id, "-").concat(this._randomIndex()); - } - - this.promise = new this.Promise(function (_resolve, _reject) { - _this._resolve = _resolve; - _this._reject = _reject; - }); - this.retryCount = 0; - } - - _createClass(Job, [{ - key: "_sanitizePriority", - value: function _sanitizePriority(priority) { - var sProperty; - sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority; - - if (sProperty < 0) { - return 0; - } else if (sProperty > NUM_PRIORITIES - 1) { - return NUM_PRIORITIES - 1; - } else { - return sProperty; - } - } - }, { - key: "_randomIndex", - value: function _randomIndex() { - return Math.random().toString(36).slice(2); - } - }, { - key: "doDrop", - value: function doDrop() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - error = _ref.error, - _ref$message = _ref.message, - message = _ref$message === void 0 ? "This job has been dropped by Bottleneck" : _ref$message; - - if (this._states.remove(this.options.id)) { - if (this.rejectOnDrop) { - this._reject(error != null ? error : new BottleneckError$1(message)); - } - - this.Events.trigger("dropped", { - args: this.args, - options: this.options, - task: this.task, - promise: this.promise - }); - return true; - } else { - return false; - } - } - }, { - key: "_assertStatus", - value: function _assertStatus(expected) { - var status; - status = this._states.jobStatus(this.options.id); - - if (!(status === expected || expected === "DONE" && status === null)) { - throw new BottleneckError$1("Invalid job status ".concat(status, ", expected ").concat(expected, ". Please open an issue at https://github.com/SGrondin/bottleneck/issues")); - } - } - }, { - key: "doReceive", - value: function doReceive() { - this._states.start(this.options.id); - - return this.Events.trigger("received", { - args: this.args, - options: this.options - }); - } - }, { - key: "doQueue", - value: function doQueue(reachedHWM, blocked) { - this._assertStatus("RECEIVED"); - - this._states.next(this.options.id); - - return this.Events.trigger("queued", { - args: this.args, - options: this.options, - reachedHWM: reachedHWM, - blocked: blocked - }); - } - }, { - key: "doRun", - value: function doRun() { - if (this.retryCount === 0) { - this._assertStatus("QUEUED"); - - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - - return this.Events.trigger("scheduled", { - args: this.args, - options: this.options - }); - } - }, { - key: "doExecute", - value: function () { - var _doExecute = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(chained, clearGlobalState, run, free) { - var error, eventInfo, passed; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - if (this.retryCount === 0) { - this._assertStatus("RUNNING"); - - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - - eventInfo = { - args: this.args, - options: this.options, - retryCount: this.retryCount - }; - this.Events.trigger("executing", eventInfo); - _context.prev = 3; - _context.next = 6; - return chained != null ? chained.schedule.apply(chained, [this.options, this.task].concat(_toConsumableArray(this.args))) : this.task.apply(this, _toConsumableArray(this.args)); - - case 6: - passed = _context.sent; - - if (!clearGlobalState()) { - _context.next = 13; - break; - } - - this.doDone(eventInfo); - _context.next = 11; - return free(this.options, eventInfo); - - case 11: - this._assertStatus("DONE"); - - return _context.abrupt("return", this._resolve(passed)); - - case 13: - _context.next = 19; - break; - - case 15: - _context.prev = 15; - _context.t0 = _context["catch"](3); - error = _context.t0; - return _context.abrupt("return", this._onFailure(error, eventInfo, clearGlobalState, run, free)); - - case 19: - case "end": - return _context.stop(); - } - } - }, _callee, this, [[3, 15]]); - })); - - function doExecute(_x, _x2, _x3, _x4) { - return _doExecute.apply(this, arguments); - } - - return doExecute; - }() - }, { - key: "doExpire", - value: function doExpire(clearGlobalState, run, free) { - var error, eventInfo; - - if (this._states.jobStatus(this.options.id === "RUNNING")) { - this._states.next(this.options.id); - } - - this._assertStatus("EXECUTING"); - - eventInfo = { - args: this.args, - options: this.options, - retryCount: this.retryCount - }; - error = new BottleneckError$1("This job timed out after ".concat(this.options.expiration, " ms.")); - return this._onFailure(error, eventInfo, clearGlobalState, run, free); - } - }, { - key: "_onFailure", - value: function () { - var _onFailure2 = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(error, eventInfo, clearGlobalState, run, free) { - var retry, retryAfter; - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - if (!clearGlobalState()) { - _context2.next = 16; - break; - } - - _context2.next = 3; - return this.Events.trigger("failed", error, eventInfo); - - case 3: - retry = _context2.sent; - - if (!(retry != null)) { - _context2.next = 11; - break; - } - - retryAfter = ~~retry; - this.Events.trigger("retry", "Retrying ".concat(this.options.id, " after ").concat(retryAfter, " ms"), eventInfo); - this.retryCount++; - return _context2.abrupt("return", run(retryAfter)); - - case 11: - this.doDone(eventInfo); - _context2.next = 14; - return free(this.options, eventInfo); - - case 14: - this._assertStatus("DONE"); - - return _context2.abrupt("return", this._reject(error)); - - case 16: - case "end": - return _context2.stop(); - } - } - }, _callee2, this); - })); - - function _onFailure(_x5, _x6, _x7, _x8, _x9) { - return _onFailure2.apply(this, arguments); - } - - return _onFailure; - }() - }, { - key: "doDone", - value: function doDone(eventInfo) { - this._assertStatus("EXECUTING"); - - this._states.next(this.options.id); - - return this.Events.trigger("done", eventInfo); - } - }]); - - return Job; - }(); - - var Job_1 = Job; - - var BottleneckError$2, LocalDatastore, parser$2; - parser$2 = parser; - BottleneckError$2 = BottleneckError_1; - - LocalDatastore = - /*#__PURE__*/ - function () { - function LocalDatastore(instance, storeOptions, storeInstanceOptions) { - _classCallCheck(this, LocalDatastore); - - this.instance = instance; - this.storeOptions = storeOptions; - this.clientId = this.instance._randomIndex(); - parser$2.load(storeInstanceOptions, storeInstanceOptions, this); - this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now(); - this._running = 0; - this._done = 0; - this._unblockTime = 0; - this.ready = this.Promise.resolve(); - this.clients = {}; - - this._startHeartbeat(); - } - - _createClass(LocalDatastore, [{ - key: "_startHeartbeat", - value: function _startHeartbeat() { - var _this = this; - - var base; - - if (this.heartbeat == null && (this.storeOptions.reservoirRefreshInterval != null && this.storeOptions.reservoirRefreshAmount != null || this.storeOptions.reservoirIncreaseInterval != null && this.storeOptions.reservoirIncreaseAmount != null)) { - return typeof (base = this.heartbeat = setInterval(function () { - var amount, incr, maximum, now, reservoir; - now = Date.now(); - - if (_this.storeOptions.reservoirRefreshInterval != null && now >= _this._lastReservoirRefresh + _this.storeOptions.reservoirRefreshInterval) { - _this._lastReservoirRefresh = now; - _this.storeOptions.reservoir = _this.storeOptions.reservoirRefreshAmount; - - _this.instance._drainAll(_this.computeCapacity()); - } - - if (_this.storeOptions.reservoirIncreaseInterval != null && now >= _this._lastReservoirIncrease + _this.storeOptions.reservoirIncreaseInterval) { - var _this$storeOptions = _this.storeOptions; - amount = _this$storeOptions.reservoirIncreaseAmount; - maximum = _this$storeOptions.reservoirIncreaseMaximum; - reservoir = _this$storeOptions.reservoir; - _this._lastReservoirIncrease = now; - incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount; - - if (incr > 0) { - _this.storeOptions.reservoir += incr; - return _this.instance._drainAll(_this.computeCapacity()); - } - } - }, this.heartbeatInterval)).unref === "function" ? base.unref() : void 0; - } else { - return clearInterval(this.heartbeat); - } - } - }, { - key: "__publish__", - value: function () { - var _publish__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(message) { - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return this.yieldLoop(); - - case 2: - return _context.abrupt("return", this.instance.Events.trigger("message", message.toString())); - - case 3: - case "end": - return _context.stop(); - } - } - }, _callee, this); - })); - - function __publish__(_x) { - return _publish__.apply(this, arguments); - } - - return __publish__; - }() - }, { - key: "__disconnect__", - value: function () { - var _disconnect__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(flush) { - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.next = 2; - return this.yieldLoop(); - - case 2: - clearInterval(this.heartbeat); - return _context2.abrupt("return", this.Promise.resolve()); - - case 4: - case "end": - return _context2.stop(); - } - } - }, _callee2, this); - })); - - function __disconnect__(_x2) { - return _disconnect__.apply(this, arguments); - } - - return __disconnect__; - }() - }, { - key: "yieldLoop", - value: function yieldLoop() { - var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - return new this.Promise(function (resolve, reject) { - return setTimeout(resolve, t); - }); - } - }, { - key: "computePenalty", - value: function computePenalty() { - var ref; - return (ref = this.storeOptions.penalty) != null ? ref : 15 * this.storeOptions.minTime || 5000; - } - }, { - key: "__updateSettings__", - value: function () { - var _updateSettings__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee3(options) { - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - _context3.next = 2; - return this.yieldLoop(); - - case 2: - parser$2.overwrite(options, options, this.storeOptions); - - this._startHeartbeat(); - - this.instance._drainAll(this.computeCapacity()); - - return _context3.abrupt("return", true); - - case 6: - case "end": - return _context3.stop(); - } - } - }, _callee3, this); - })); - - function __updateSettings__(_x3) { - return _updateSettings__.apply(this, arguments); - } - - return __updateSettings__; - }() - }, { - key: "__running__", - value: function () { - var _running__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee4() { - return regeneratorRuntime.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - _context4.next = 2; - return this.yieldLoop(); - - case 2: - return _context4.abrupt("return", this._running); - - case 3: - case "end": - return _context4.stop(); - } - } - }, _callee4, this); - })); - - function __running__() { - return _running__.apply(this, arguments); - } - - return __running__; - }() - }, { - key: "__queued__", - value: function () { - var _queued__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee5() { - return regeneratorRuntime.wrap(function _callee5$(_context5) { - while (1) { - switch (_context5.prev = _context5.next) { - case 0: - _context5.next = 2; - return this.yieldLoop(); - - case 2: - return _context5.abrupt("return", this.instance.queued()); - - case 3: - case "end": - return _context5.stop(); - } - } - }, _callee5, this); - })); - - function __queued__() { - return _queued__.apply(this, arguments); - } - - return __queued__; - }() - }, { - key: "__done__", - value: function () { - var _done__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee6() { - return regeneratorRuntime.wrap(function _callee6$(_context6) { - while (1) { - switch (_context6.prev = _context6.next) { - case 0: - _context6.next = 2; - return this.yieldLoop(); - - case 2: - return _context6.abrupt("return", this._done); - - case 3: - case "end": - return _context6.stop(); - } - } - }, _callee6, this); - })); - - function __done__() { - return _done__.apply(this, arguments); - } - - return __done__; - }() - }, { - key: "__groupCheck__", - value: function () { - var _groupCheck__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee7(time) { - return regeneratorRuntime.wrap(function _callee7$(_context7) { - while (1) { - switch (_context7.prev = _context7.next) { - case 0: - _context7.next = 2; - return this.yieldLoop(); - - case 2: - return _context7.abrupt("return", this._nextRequest + this.timeout < time); - - case 3: - case "end": - return _context7.stop(); - } - } - }, _callee7, this); - })); - - function __groupCheck__(_x4) { - return _groupCheck__.apply(this, arguments); - } - - return __groupCheck__; - }() - }, { - key: "computeCapacity", - value: function computeCapacity() { - var maxConcurrent, reservoir; - var _this$storeOptions2 = this.storeOptions; - maxConcurrent = _this$storeOptions2.maxConcurrent; - reservoir = _this$storeOptions2.reservoir; - - if (maxConcurrent != null && reservoir != null) { - return Math.min(maxConcurrent - this._running, reservoir); - } else if (maxConcurrent != null) { - return maxConcurrent - this._running; - } else if (reservoir != null) { - return reservoir; - } else { - return null; - } - } - }, { - key: "conditionsCheck", - value: function conditionsCheck(weight) { - var capacity; - capacity = this.computeCapacity(); - return capacity == null || weight <= capacity; - } - }, { - key: "__incrementReservoir__", - value: function () { - var _incrementReservoir__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee8(incr) { - var reservoir; - return regeneratorRuntime.wrap(function _callee8$(_context8) { - while (1) { - switch (_context8.prev = _context8.next) { - case 0: - _context8.next = 2; - return this.yieldLoop(); - - case 2: - reservoir = this.storeOptions.reservoir += incr; - - this.instance._drainAll(this.computeCapacity()); - - return _context8.abrupt("return", reservoir); - - case 5: - case "end": - return _context8.stop(); - } - } - }, _callee8, this); - })); - - function __incrementReservoir__(_x5) { - return _incrementReservoir__.apply(this, arguments); - } - - return __incrementReservoir__; - }() - }, { - key: "__currentReservoir__", - value: function () { - var _currentReservoir__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee9() { - return regeneratorRuntime.wrap(function _callee9$(_context9) { - while (1) { - switch (_context9.prev = _context9.next) { - case 0: - _context9.next = 2; - return this.yieldLoop(); - - case 2: - return _context9.abrupt("return", this.storeOptions.reservoir); - - case 3: - case "end": - return _context9.stop(); - } - } - }, _callee9, this); - })); - - function __currentReservoir__() { - return _currentReservoir__.apply(this, arguments); - } - - return __currentReservoir__; - }() - }, { - key: "isBlocked", - value: function isBlocked(now) { - return this._unblockTime >= now; - } - }, { - key: "check", - value: function check(weight, now) { - return this.conditionsCheck(weight) && this._nextRequest - now <= 0; - } - }, { - key: "__check__", - value: function () { - var _check__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee10(weight) { - var now; - return regeneratorRuntime.wrap(function _callee10$(_context10) { - while (1) { - switch (_context10.prev = _context10.next) { - case 0: - _context10.next = 2; - return this.yieldLoop(); - - case 2: - now = Date.now(); - return _context10.abrupt("return", this.check(weight, now)); - - case 4: - case "end": - return _context10.stop(); - } - } - }, _callee10, this); - })); - - function __check__(_x6) { - return _check__.apply(this, arguments); - } - - return __check__; - }() - }, { - key: "__register__", - value: function () { - var _register__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee11(index, weight, expiration) { - var now, wait; - return regeneratorRuntime.wrap(function _callee11$(_context11) { - while (1) { - switch (_context11.prev = _context11.next) { - case 0: - _context11.next = 2; - return this.yieldLoop(); - - case 2: - now = Date.now(); - - if (!this.conditionsCheck(weight)) { - _context11.next = 11; - break; - } - - this._running += weight; - - if (this.storeOptions.reservoir != null) { - this.storeOptions.reservoir -= weight; - } - - wait = Math.max(this._nextRequest - now, 0); - this._nextRequest = now + wait + this.storeOptions.minTime; - return _context11.abrupt("return", { - success: true, - wait: wait, - reservoir: this.storeOptions.reservoir - }); - - case 11: - return _context11.abrupt("return", { - success: false - }); - - case 12: - case "end": - return _context11.stop(); - } - } - }, _callee11, this); - })); - - function __register__(_x7, _x8, _x9) { - return _register__.apply(this, arguments); - } - - return __register__; - }() - }, { - key: "strategyIsBlock", - value: function strategyIsBlock() { - return this.storeOptions.strategy === 3; - } - }, { - key: "__submit__", - value: function () { - var _submit__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee12(queueLength, weight) { - var blocked, now, reachedHWM; - return regeneratorRuntime.wrap(function _callee12$(_context12) { - while (1) { - switch (_context12.prev = _context12.next) { - case 0: - _context12.next = 2; - return this.yieldLoop(); - - case 2: - if (!(this.storeOptions.maxConcurrent != null && weight > this.storeOptions.maxConcurrent)) { - _context12.next = 4; - break; - } - - throw new BottleneckError$2("Impossible to add a job having a weight of ".concat(weight, " to a limiter having a maxConcurrent setting of ").concat(this.storeOptions.maxConcurrent)); - - case 4: - now = Date.now(); - reachedHWM = this.storeOptions.highWater != null && queueLength === this.storeOptions.highWater && !this.check(weight, now); - blocked = this.strategyIsBlock() && (reachedHWM || this.isBlocked(now)); - - if (blocked) { - this._unblockTime = now + this.computePenalty(); - this._nextRequest = this._unblockTime + this.storeOptions.minTime; - - this.instance._dropAllQueued(); - } - - return _context12.abrupt("return", { - reachedHWM: reachedHWM, - blocked: blocked, - strategy: this.storeOptions.strategy - }); - - case 9: - case "end": - return _context12.stop(); - } - } - }, _callee12, this); - })); - - function __submit__(_x10, _x11) { - return _submit__.apply(this, arguments); - } - - return __submit__; - }() - }, { - key: "__free__", - value: function () { - var _free__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee13(index, weight) { - return regeneratorRuntime.wrap(function _callee13$(_context13) { - while (1) { - switch (_context13.prev = _context13.next) { - case 0: - _context13.next = 2; - return this.yieldLoop(); - - case 2: - this._running -= weight; - this._done += weight; - - this.instance._drainAll(this.computeCapacity()); - - return _context13.abrupt("return", { - running: this._running - }); - - case 6: - case "end": - return _context13.stop(); - } - } - }, _callee13, this); - })); - - function __free__(_x12, _x13) { - return _free__.apply(this, arguments); - } - - return __free__; - }() - }]); - - return LocalDatastore; - }(); - - var LocalDatastore_1 = LocalDatastore; - - var lua = { - "blacklist_client.lua": "local blacklist = ARGV[num_static_argv + 1]\n\nif redis.call('zscore', client_last_seen_key, blacklist) then\n redis.call('zadd', client_last_seen_key, 0, blacklist)\nend\n\n\nreturn {}\n", - "check.lua": "local weight = tonumber(ARGV[num_static_argv + 1])\n\nlocal capacity = process_tick(now, false)['capacity']\nlocal nextRequest = tonumber(redis.call('hget', settings_key, 'nextRequest'))\n\nreturn conditions_check(capacity, weight) and nextRequest - now <= 0\n", - "conditions_check.lua": "local conditions_check = function (capacity, weight)\n return capacity == nil or weight <= capacity\nend\n", - "current_reservoir.lua": "return process_tick(now, false)['reservoir']\n", - "done.lua": "process_tick(now, false)\n\nreturn tonumber(redis.call('hget', settings_key, 'done'))\n", - "free.lua": "local index = ARGV[num_static_argv + 1]\n\nredis.call('zadd', job_expirations_key, 0, index)\n\nreturn process_tick(now, false)['running']\n", - "get_time.lua": "redis.replicate_commands()\n\nlocal get_time = function ()\n local time = redis.call('time')\n\n return tonumber(time[1]..string.sub(time[2], 1, 3))\nend\n", - "group_check.lua": "return not (redis.call('exists', settings_key) == 1)\n", - "heartbeat.lua": "process_tick(now, true)\n", - "increment_reservoir.lua": "local incr = tonumber(ARGV[num_static_argv + 1])\n\nredis.call('hincrby', settings_key, 'reservoir', incr)\n\nlocal reservoir = process_tick(now, true)['reservoir']\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn reservoir\n", - "init.lua": "local clear = tonumber(ARGV[num_static_argv + 1])\nlocal limiter_version = ARGV[num_static_argv + 2]\nlocal num_local_argv = num_static_argv + 2\n\nif clear == 1 then\n redis.call('del', unpack(KEYS))\nend\n\nif redis.call('exists', settings_key) == 0 then\n -- Create\n local args = {'hmset', settings_key}\n\n for i = num_local_argv + 1, #ARGV do\n table.insert(args, ARGV[i])\n end\n\n redis.call(unpack(args))\n redis.call('hmset', settings_key,\n 'nextRequest', now,\n 'lastReservoirRefresh', now,\n 'lastReservoirIncrease', now,\n 'running', 0,\n 'done', 0,\n 'unblockTime', 0,\n 'capacityPriorityCounter', 0\n )\n\nelse\n -- Apply migrations\n local settings = redis.call('hmget', settings_key,\n 'id',\n 'version'\n )\n local id = settings[1]\n local current_version = settings[2]\n\n if current_version ~= limiter_version then\n local version_digits = {}\n for k, v in string.gmatch(current_version, \"([^.]+)\") do\n table.insert(version_digits, tonumber(k))\n end\n\n -- 2.10.0\n if version_digits[2] < 10 then\n redis.call('hsetnx', settings_key, 'reservoirRefreshInterval', '')\n redis.call('hsetnx', settings_key, 'reservoirRefreshAmount', '')\n redis.call('hsetnx', settings_key, 'lastReservoirRefresh', '')\n redis.call('hsetnx', settings_key, 'done', 0)\n redis.call('hset', settings_key, 'version', '2.10.0')\n end\n\n -- 2.11.1\n if version_digits[2] < 11 or (version_digits[2] == 11 and version_digits[3] < 1) then\n if redis.call('hstrlen', settings_key, 'lastReservoirRefresh') == 0 then\n redis.call('hmset', settings_key,\n 'lastReservoirRefresh', now,\n 'version', '2.11.1'\n )\n end\n end\n\n -- 2.14.0\n if version_digits[2] < 14 then\n local old_running_key = 'b_'..id..'_running'\n local old_executing_key = 'b_'..id..'_executing'\n\n if redis.call('exists', old_running_key) == 1 then\n redis.call('rename', old_running_key, job_weights_key)\n end\n if redis.call('exists', old_executing_key) == 1 then\n redis.call('rename', old_executing_key, job_expirations_key)\n end\n redis.call('hset', settings_key, 'version', '2.14.0')\n end\n\n -- 2.15.2\n if version_digits[2] < 15 or (version_digits[2] == 15 and version_digits[3] < 2) then\n redis.call('hsetnx', settings_key, 'capacityPriorityCounter', 0)\n redis.call('hset', settings_key, 'version', '2.15.2')\n end\n\n -- 2.17.0\n if version_digits[2] < 17 then\n redis.call('hsetnx', settings_key, 'clientTimeout', 10000)\n redis.call('hset', settings_key, 'version', '2.17.0')\n end\n\n -- 2.18.0\n if version_digits[2] < 18 then\n redis.call('hsetnx', settings_key, 'reservoirIncreaseInterval', '')\n redis.call('hsetnx', settings_key, 'reservoirIncreaseAmount', '')\n redis.call('hsetnx', settings_key, 'reservoirIncreaseMaximum', '')\n redis.call('hsetnx', settings_key, 'lastReservoirIncrease', now)\n redis.call('hset', settings_key, 'version', '2.18.0')\n end\n\n end\n\n process_tick(now, false)\nend\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn {}\n", - "process_tick.lua": "local process_tick = function (now, always_publish)\n\n local compute_capacity = function (maxConcurrent, running, reservoir)\n if maxConcurrent ~= nil and reservoir ~= nil then\n return math.min((maxConcurrent - running), reservoir)\n elseif maxConcurrent ~= nil then\n return maxConcurrent - running\n elseif reservoir ~= nil then\n return reservoir\n else\n return nil\n end\n end\n\n local settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'running',\n 'reservoir',\n 'reservoirRefreshInterval',\n 'reservoirRefreshAmount',\n 'lastReservoirRefresh',\n 'reservoirIncreaseInterval',\n 'reservoirIncreaseAmount',\n 'reservoirIncreaseMaximum',\n 'lastReservoirIncrease',\n 'capacityPriorityCounter',\n 'clientTimeout'\n )\n local id = settings[1]\n local maxConcurrent = tonumber(settings[2])\n local running = tonumber(settings[3])\n local reservoir = tonumber(settings[4])\n local reservoirRefreshInterval = tonumber(settings[5])\n local reservoirRefreshAmount = tonumber(settings[6])\n local lastReservoirRefresh = tonumber(settings[7])\n local reservoirIncreaseInterval = tonumber(settings[8])\n local reservoirIncreaseAmount = tonumber(settings[9])\n local reservoirIncreaseMaximum = tonumber(settings[10])\n local lastReservoirIncrease = tonumber(settings[11])\n local capacityPriorityCounter = tonumber(settings[12])\n local clientTimeout = tonumber(settings[13])\n\n local initial_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n --\n -- Process 'running' changes\n --\n local expired = redis.call('zrangebyscore', job_expirations_key, '-inf', '('..now)\n\n if #expired > 0 then\n redis.call('zremrangebyscore', job_expirations_key, '-inf', '('..now)\n\n local flush_batch = function (batch, acc)\n local weights = redis.call('hmget', job_weights_key, unpack(batch))\n redis.call('hdel', job_weights_key, unpack(batch))\n local clients = redis.call('hmget', job_clients_key, unpack(batch))\n redis.call('hdel', job_clients_key, unpack(batch))\n\n -- Calculate sum of removed weights\n for i = 1, #weights do\n acc['total'] = acc['total'] + (tonumber(weights[i]) or 0)\n end\n\n -- Calculate sum of removed weights by client\n local client_weights = {}\n for i = 1, #clients do\n local removed = tonumber(weights[i]) or 0\n if removed > 0 then\n acc['client_weights'][clients[i]] = (acc['client_weights'][clients[i]] or 0) + removed\n end\n end\n end\n\n local acc = {\n ['total'] = 0,\n ['client_weights'] = {}\n }\n local batch_size = 1000\n\n -- Compute changes to Zsets and apply changes to Hashes\n for i = 1, #expired, batch_size do\n local batch = {}\n for j = i, math.min(i + batch_size - 1, #expired) do\n table.insert(batch, expired[j])\n end\n\n flush_batch(batch, acc)\n end\n\n -- Apply changes to Zsets\n if acc['total'] > 0 then\n redis.call('hincrby', settings_key, 'done', acc['total'])\n running = tonumber(redis.call('hincrby', settings_key, 'running', -acc['total']))\n end\n\n for client, weight in pairs(acc['client_weights']) do\n redis.call('zincrby', client_running_key, -weight, client)\n end\n end\n\n --\n -- Process 'reservoir' changes\n --\n local reservoirRefreshActive = reservoirRefreshInterval ~= nil and reservoirRefreshAmount ~= nil\n if reservoirRefreshActive and now >= lastReservoirRefresh + reservoirRefreshInterval then\n reservoir = reservoirRefreshAmount\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirRefresh', now\n )\n end\n\n local reservoirIncreaseActive = reservoirIncreaseInterval ~= nil and reservoirIncreaseAmount ~= nil\n if reservoirIncreaseActive and now >= lastReservoirIncrease + reservoirIncreaseInterval then\n local num_intervals = math.floor((now - lastReservoirIncrease) / reservoirIncreaseInterval)\n local incr = reservoirIncreaseAmount * num_intervals\n if reservoirIncreaseMaximum ~= nil then\n incr = math.min(incr, reservoirIncreaseMaximum - (reservoir or 0))\n end\n if incr > 0 then\n reservoir = (reservoir or 0) + incr\n end\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirIncrease', lastReservoirIncrease + (num_intervals * reservoirIncreaseInterval)\n )\n end\n\n --\n -- Clear unresponsive clients\n --\n local unresponsive = redis.call('zrangebyscore', client_last_seen_key, '-inf', (now - clientTimeout))\n local unresponsive_lookup = {}\n local terminated_clients = {}\n for i = 1, #unresponsive do\n unresponsive_lookup[unresponsive[i]] = true\n if tonumber(redis.call('zscore', client_running_key, unresponsive[i])) == 0 then\n table.insert(terminated_clients, unresponsive[i])\n end\n end\n if #terminated_clients > 0 then\n redis.call('zrem', client_running_key, unpack(terminated_clients))\n redis.call('hdel', client_num_queued_key, unpack(terminated_clients))\n redis.call('zrem', client_last_registered_key, unpack(terminated_clients))\n redis.call('zrem', client_last_seen_key, unpack(terminated_clients))\n end\n\n --\n -- Broadcast capacity changes\n --\n local final_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n if always_publish or (initial_capacity ~= nil and final_capacity == nil) then\n -- always_publish or was not unlimited, now unlimited\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n\n elseif initial_capacity ~= nil and final_capacity ~= nil and final_capacity > initial_capacity then\n -- capacity was increased\n -- send the capacity message to the limiter having the lowest number of running jobs\n -- the tiebreaker is the limiter having not registered a job in the longest time\n\n local lowest_concurrency_value = nil\n local lowest_concurrency_clients = {}\n local lowest_concurrency_last_registered = {}\n local client_concurrencies = redis.call('zrange', client_running_key, 0, -1, 'withscores')\n\n for i = 1, #client_concurrencies, 2 do\n local client = client_concurrencies[i]\n local concurrency = tonumber(client_concurrencies[i+1])\n\n if (\n lowest_concurrency_value == nil or lowest_concurrency_value == concurrency\n ) and (\n not unresponsive_lookup[client]\n ) and (\n tonumber(redis.call('hget', client_num_queued_key, client)) > 0\n ) then\n lowest_concurrency_value = concurrency\n table.insert(lowest_concurrency_clients, client)\n local last_registered = tonumber(redis.call('zscore', client_last_registered_key, client))\n table.insert(lowest_concurrency_last_registered, last_registered)\n end\n end\n\n if #lowest_concurrency_clients > 0 then\n local position = 1\n local earliest = lowest_concurrency_last_registered[1]\n\n for i,v in ipairs(lowest_concurrency_last_registered) do\n if v < earliest then\n position = i\n earliest = v\n end\n end\n\n local next_client = lowest_concurrency_clients[position]\n redis.call('publish', 'b_'..id,\n 'capacity-priority:'..(final_capacity or '')..\n ':'..next_client..\n ':'..capacityPriorityCounter\n )\n redis.call('hincrby', settings_key, 'capacityPriorityCounter', '1')\n else\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n end\n end\n\n return {\n ['capacity'] = final_capacity,\n ['running'] = running,\n ['reservoir'] = reservoir\n }\nend\n", - "queued.lua": "local clientTimeout = tonumber(redis.call('hget', settings_key, 'clientTimeout'))\nlocal valid_clients = redis.call('zrangebyscore', client_last_seen_key, (now - clientTimeout), 'inf')\nlocal client_queued = redis.call('hmget', client_num_queued_key, unpack(valid_clients))\n\nlocal sum = 0\nfor i = 1, #client_queued do\n sum = sum + tonumber(client_queued[i])\nend\n\nreturn sum\n", - "refresh_expiration.lua": "local refresh_expiration = function (now, nextRequest, groupTimeout)\n\n if groupTimeout ~= nil then\n local ttl = (nextRequest + groupTimeout) - now\n\n for i = 1, #KEYS do\n redis.call('pexpire', KEYS[i], ttl)\n end\n end\n\nend\n", - "refs.lua": "local settings_key = KEYS[1]\nlocal job_weights_key = KEYS[2]\nlocal job_expirations_key = KEYS[3]\nlocal job_clients_key = KEYS[4]\nlocal client_running_key = KEYS[5]\nlocal client_num_queued_key = KEYS[6]\nlocal client_last_registered_key = KEYS[7]\nlocal client_last_seen_key = KEYS[8]\n\nlocal now = tonumber(ARGV[1])\nlocal client = ARGV[2]\n\nlocal num_static_argv = 2\n", - "register.lua": "local index = ARGV[num_static_argv + 1]\nlocal weight = tonumber(ARGV[num_static_argv + 2])\nlocal expiration = tonumber(ARGV[num_static_argv + 3])\n\nlocal state = process_tick(now, false)\nlocal capacity = state['capacity']\nlocal reservoir = state['reservoir']\n\nlocal settings = redis.call('hmget', settings_key,\n 'nextRequest',\n 'minTime',\n 'groupTimeout'\n)\nlocal nextRequest = tonumber(settings[1])\nlocal minTime = tonumber(settings[2])\nlocal groupTimeout = tonumber(settings[3])\n\nif conditions_check(capacity, weight) then\n\n redis.call('hincrby', settings_key, 'running', weight)\n redis.call('hset', job_weights_key, index, weight)\n if expiration ~= nil then\n redis.call('zadd', job_expirations_key, now + expiration, index)\n end\n redis.call('hset', job_clients_key, index, client)\n redis.call('zincrby', client_running_key, weight, client)\n redis.call('hincrby', client_num_queued_key, client, -1)\n redis.call('zadd', client_last_registered_key, now, client)\n\n local wait = math.max(nextRequest - now, 0)\n local newNextRequest = now + wait + minTime\n\n if reservoir == nil then\n redis.call('hset', settings_key,\n 'nextRequest', newNextRequest\n )\n else\n reservoir = reservoir - weight\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'nextRequest', newNextRequest\n )\n end\n\n refresh_expiration(now, newNextRequest, groupTimeout)\n\n return {true, wait, reservoir}\n\nelse\n return {false}\nend\n", - "register_client.lua": "local queued = tonumber(ARGV[num_static_argv + 1])\n\n-- Could have been re-registered concurrently\nif not redis.call('zscore', client_last_seen_key, client) then\n redis.call('zadd', client_running_key, 0, client)\n redis.call('hset', client_num_queued_key, client, queued)\n redis.call('zadd', client_last_registered_key, 0, client)\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n\nreturn {}\n", - "running.lua": "return process_tick(now, false)['running']\n", - "submit.lua": "local queueLength = tonumber(ARGV[num_static_argv + 1])\nlocal weight = tonumber(ARGV[num_static_argv + 2])\n\nlocal capacity = process_tick(now, false)['capacity']\n\nlocal settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'highWater',\n 'nextRequest',\n 'strategy',\n 'unblockTime',\n 'penalty',\n 'minTime',\n 'groupTimeout'\n)\nlocal id = settings[1]\nlocal maxConcurrent = tonumber(settings[2])\nlocal highWater = tonumber(settings[3])\nlocal nextRequest = tonumber(settings[4])\nlocal strategy = tonumber(settings[5])\nlocal unblockTime = tonumber(settings[6])\nlocal penalty = tonumber(settings[7])\nlocal minTime = tonumber(settings[8])\nlocal groupTimeout = tonumber(settings[9])\n\nif maxConcurrent ~= nil and weight > maxConcurrent then\n return redis.error_reply('OVERWEIGHT:'..weight..':'..maxConcurrent)\nend\n\nlocal reachedHWM = (highWater ~= nil and queueLength == highWater\n and not (\n conditions_check(capacity, weight)\n and nextRequest - now <= 0\n )\n)\n\nlocal blocked = strategy == 3 and (reachedHWM or unblockTime >= now)\n\nif blocked then\n local computedPenalty = penalty\n if computedPenalty == nil then\n if minTime == 0 then\n computedPenalty = 5000\n else\n computedPenalty = 15 * minTime\n end\n end\n\n local newNextRequest = now + computedPenalty + minTime\n\n redis.call('hmset', settings_key,\n 'unblockTime', now + computedPenalty,\n 'nextRequest', newNextRequest\n )\n\n local clients_queued_reset = redis.call('hkeys', client_num_queued_key)\n local queued_reset = {}\n for i = 1, #clients_queued_reset do\n table.insert(queued_reset, clients_queued_reset[i])\n table.insert(queued_reset, 0)\n end\n redis.call('hmset', client_num_queued_key, unpack(queued_reset))\n\n redis.call('publish', 'b_'..id, 'blocked:')\n\n refresh_expiration(now, newNextRequest, groupTimeout)\nend\n\nif not blocked and not reachedHWM then\n redis.call('hincrby', client_num_queued_key, client, 1)\nend\n\nreturn {reachedHWM, blocked, strategy}\n", - "update_settings.lua": "local args = {'hmset', settings_key}\n\nfor i = num_static_argv + 1, #ARGV do\n table.insert(args, ARGV[i])\nend\n\nredis.call(unpack(args))\n\nprocess_tick(now, true)\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn {}\n", - "validate_client.lua": "if not redis.call('zscore', client_last_seen_key, client) then\n return redis.error_reply('UNKNOWN_CLIENT')\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n", - "validate_keys.lua": "if not (redis.call('exists', settings_key) == 1) then\n return redis.error_reply('SETTINGS_KEY_NOT_FOUND')\nend\n" - }; - - var lua$1 = /*#__PURE__*/Object.freeze({ - default: lua - }); - - var require$$0 = getCjsExportFromNamespace(lua$1); - - var Scripts = createCommonjsModule(function (module, exports) { - var headers, lua, templates; - lua = require$$0; - headers = { - refs: lua["refs.lua"], - validate_keys: lua["validate_keys.lua"], - validate_client: lua["validate_client.lua"], - refresh_expiration: lua["refresh_expiration.lua"], - process_tick: lua["process_tick.lua"], - conditions_check: lua["conditions_check.lua"], - get_time: lua["get_time.lua"] - }; - - exports.allKeys = function (id) { - return [ - /* - HASH - */ - "b_".concat(id, "_settings"), - /* - HASH - job index -> weight - */ - "b_".concat(id, "_job_weights"), - /* - ZSET - job index -> expiration - */ - "b_".concat(id, "_job_expirations"), - /* - HASH - job index -> client - */ - "b_".concat(id, "_job_clients"), - /* - ZSET - client -> sum running - */ - "b_".concat(id, "_client_running"), - /* - HASH - client -> num queued - */ - "b_".concat(id, "_client_num_queued"), - /* - ZSET - client -> last job registered - */ - "b_".concat(id, "_client_last_registered"), - /* - ZSET - client -> last seen - */ - "b_".concat(id, "_client_last_seen")]; - }; - - templates = { - init: { - keys: exports.allKeys, - headers: ["process_tick"], - refresh_expiration: true, - code: lua["init.lua"] - }, - group_check: { - keys: exports.allKeys, - headers: [], - refresh_expiration: false, - code: lua["group_check.lua"] - }, - register_client: { - keys: exports.allKeys, - headers: ["validate_keys"], - refresh_expiration: false, - code: lua["register_client.lua"] - }, - blacklist_client: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client"], - refresh_expiration: false, - code: lua["blacklist_client.lua"] - }, - heartbeat: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["heartbeat.lua"] - }, - update_settings: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: true, - code: lua["update_settings.lua"] - }, - running: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["running.lua"] - }, - queued: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client"], - refresh_expiration: false, - code: lua["queued.lua"] - }, - done: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["done.lua"] - }, - check: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], - refresh_expiration: false, - code: lua["check.lua"] - }, - submit: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], - refresh_expiration: true, - code: lua["submit.lua"] - }, - register: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], - refresh_expiration: true, - code: lua["register.lua"] - }, - free: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: true, - code: lua["free.lua"] - }, - current_reservoir: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["current_reservoir.lua"] - }, - increment_reservoir: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: true, - code: lua["increment_reservoir.lua"] - } - }; - exports.names = Object.keys(templates); - - exports.keys = function (name, id) { - return templates[name].keys(id); - }; - - exports.payload = function (name) { - var template; - template = templates[name]; - return Array.prototype.concat(headers.refs, template.headers.map(function (h) { - return headers[h]; - }), template.refresh_expiration ? headers.refresh_expiration : "", template.code).join("\n"); - }; - }); - var Scripts_1 = Scripts.allKeys; - var Scripts_2 = Scripts.names; - var Scripts_3 = Scripts.keys; - var Scripts_4 = Scripts.payload; - - var Events$2, RedisConnection, Scripts$1, parser$3; - parser$3 = parser; - Events$2 = Events_1; - Scripts$1 = Scripts; - - RedisConnection = function () { - var RedisConnection = - /*#__PURE__*/ - function () { - function RedisConnection() { - var _this = this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, RedisConnection); - - parser$3.load(options, this.defaults, this); - - if (this.Redis == null) { - this.Redis = eval("require")("redis"); // Obfuscated or else Webpack/Angular will try to inline the optional redis module. To override this behavior: pass the redis module to Bottleneck as the 'Redis' option. - } - - if (this.Events == null) { - this.Events = new Events$2(this); - } - - this.terminated = false; - - if (this.client == null) { - this.client = this.Redis.createClient(this.clientOptions); - } - - this.subscriber = this.client.duplicate(); - this.limiters = {}; - this.shas = {}; - this.ready = this.Promise.all([this._setup(this.client, false), this._setup(this.subscriber, true)]).then(function () { - return _this._loadScripts(); - }).then(function () { - return { - client: _this.client, - subscriber: _this.subscriber - }; - }); - } - - _createClass(RedisConnection, [{ - key: "_setup", - value: function _setup(client, sub) { - var _this2 = this; - - client.setMaxListeners(0); - return new this.Promise(function (resolve, reject) { - client.on("error", function (e) { - return _this2.Events.trigger("error", e); - }); - - if (sub) { - client.on("message", function (channel, message) { - var ref; - return (ref = _this2.limiters[channel]) != null ? ref._store.onMessage(channel, message) : void 0; - }); - } - - if (client.ready) { - return resolve(); - } else { - return client.once("ready", resolve); - } - }); - } - }, { - key: "_loadScript", - value: function _loadScript(name) { - var _this3 = this; - - return new this.Promise(function (resolve, reject) { - var payload; - payload = Scripts$1.payload(name); - return _this3.client.multi([["script", "load", payload]]).exec(function (err, replies) { - if (err != null) { - return reject(err); - } - - _this3.shas[name] = replies[0]; - return resolve(replies[0]); - }); - }); - } - }, { - key: "_loadScripts", - value: function _loadScripts() { - var _this4 = this; - - return this.Promise.all(Scripts$1.names.map(function (k) { - return _this4._loadScript(k); - })); - } - }, { - key: "__runCommand__", - value: function () { - var _runCommand__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(cmd) { - var _this5 = this; - - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return this.ready; - - case 2: - return _context.abrupt("return", new this.Promise(function (resolve, reject) { - return _this5.client.multi([cmd]).exec_atomic(function (err, replies) { - if (err != null) { - return reject(err); - } else { - return resolve(replies[0]); - } - }); - })); - - case 3: - case "end": - return _context.stop(); - } - } - }, _callee, this); - })); - - function __runCommand__(_x) { - return _runCommand__.apply(this, arguments); - } - - return __runCommand__; - }() - }, { - key: "__addLimiter__", - value: function __addLimiter__(instance) { - var _this6 = this; - - return this.Promise.all([instance.channel(), instance.channel_client()].map(function (channel) { - return new _this6.Promise(function (resolve, reject) { - var _handler; - - _handler = function handler(chan) { - if (chan === channel) { - _this6.subscriber.removeListener("subscribe", _handler); - - _this6.limiters[channel] = instance; - return resolve(); - } - }; - - _this6.subscriber.on("subscribe", _handler); - - return _this6.subscriber.subscribe(channel); - }); - })); - } - }, { - key: "__removeLimiter__", - value: function __removeLimiter__(instance) { - var _this7 = this; - - return this.Promise.all([instance.channel(), instance.channel_client()].map( - /*#__PURE__*/ - function () { - var _ref = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(channel) { - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - if (_this7.terminated) { - _context2.next = 3; - break; - } - - _context2.next = 3; - return new _this7.Promise(function (resolve, reject) { - return _this7.subscriber.unsubscribe(channel, function (err, chan) { - if (err != null) { - return reject(err); - } - - if (chan === channel) { - return resolve(); - } - }); - }); - - case 3: - return _context2.abrupt("return", delete _this7.limiters[channel]); - - case 4: - case "end": - return _context2.stop(); - } - } - }, _callee2); - })); - - return function (_x2) { - return _ref.apply(this, arguments); - }; - }())); - } - }, { - key: "__scriptArgs__", - value: function __scriptArgs__(name, id, args, cb) { - var keys; - keys = Scripts$1.keys(name, id); - return [this.shas[name], keys.length].concat(keys, args, cb); - } - }, { - key: "__scriptFn__", - value: function __scriptFn__(name) { - return this.client.evalsha.bind(this.client); - } - }, { - key: "disconnect", - value: function disconnect() { - var flush = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - var i, k, len, ref; - ref = Object.keys(this.limiters); - - for (i = 0, len = ref.length; i < len; i++) { - k = ref[i]; - clearInterval(this.limiters[k]._store.heartbeat); - } - - this.limiters = {}; - this.terminated = true; - this.client.end(flush); - this.subscriber.end(flush); - return this.Promise.resolve(); - } - }]); - - return RedisConnection; - }(); - RedisConnection.prototype.datastore = "redis"; - RedisConnection.prototype.defaults = { - Redis: null, - clientOptions: {}, - client: null, - Promise: Promise, - Events: null - }; - return RedisConnection; - }.call(commonjsGlobal); - - var RedisConnection_1 = RedisConnection; - - var Events$3, IORedisConnection, Scripts$2, parser$4; - parser$4 = parser; - Events$3 = Events_1; - Scripts$2 = Scripts; - - IORedisConnection = function () { - var IORedisConnection = - /*#__PURE__*/ - function () { - function IORedisConnection() { - var _this = this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, IORedisConnection); - - parser$4.load(options, this.defaults, this); - - if (this.Redis == null) { - this.Redis = eval("require")("ioredis"); // Obfuscated or else Webpack/Angular will try to inline the optional ioredis module. To override this behavior: pass the ioredis module to Bottleneck as the 'Redis' option. - } - - if (this.Events == null) { - this.Events = new Events$3(this); - } - - this.terminated = false; - - if (this.clusterNodes != null) { - this.client = new this.Redis.Cluster(this.clusterNodes, this.clientOptions); - this.subscriber = new this.Redis.Cluster(this.clusterNodes, this.clientOptions); - } else if (this.client != null && this.client.duplicate == null) { - this.subscriber = new this.Redis.Cluster(this.client.startupNodes, this.client.options); - } else { - if (this.client == null) { - this.client = new this.Redis(this.clientOptions); - } - - this.subscriber = this.client.duplicate(); - } - - this.limiters = {}; - this.ready = this.Promise.all([this._setup(this.client, false), this._setup(this.subscriber, true)]).then(function () { - _this._loadScripts(); - - return { - client: _this.client, - subscriber: _this.subscriber - }; - }); - } - - _createClass(IORedisConnection, [{ - key: "_setup", - value: function _setup(client, sub) { - var _this2 = this; - - client.setMaxListeners(0); - return new this.Promise(function (resolve, reject) { - client.on("error", function (e) { - return _this2.Events.trigger("error", e); - }); - - if (sub) { - client.on("message", function (channel, message) { - var ref; - return (ref = _this2.limiters[channel]) != null ? ref._store.onMessage(channel, message) : void 0; - }); - } - - if (client.status === "ready") { - return resolve(); - } else { - return client.once("ready", resolve); - } - }); - } - }, { - key: "_loadScripts", - value: function _loadScripts() { - var _this3 = this; - - return Scripts$2.names.forEach(function (name) { - return _this3.client.defineCommand(name, { - lua: Scripts$2.payload(name) - }); - }); - } - }, { - key: "__runCommand__", - value: function () { - var _runCommand__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(cmd) { - var _, deleted, _ref, _ref2, _ref2$; - - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return this.ready; - - case 2: - _context.next = 4; - return this.client.pipeline([cmd]).exec(); - - case 4: - _ref = _context.sent; - _ref2 = _slicedToArray(_ref, 1); - _ref2$ = _slicedToArray(_ref2[0], 2); - _ = _ref2$[0]; - deleted = _ref2$[1]; - return _context.abrupt("return", deleted); - - case 10: - case "end": - return _context.stop(); - } - } - }, _callee, this); - })); - - function __runCommand__(_x) { - return _runCommand__.apply(this, arguments); - } - - return __runCommand__; - }() - }, { - key: "__addLimiter__", - value: function __addLimiter__(instance) { - var _this4 = this; - - return this.Promise.all([instance.channel(), instance.channel_client()].map(function (channel) { - return new _this4.Promise(function (resolve, reject) { - return _this4.subscriber.subscribe(channel, function () { - _this4.limiters[channel] = instance; - return resolve(); - }); - }); - })); - } - }, { - key: "__removeLimiter__", - value: function __removeLimiter__(instance) { - var _this5 = this; - - return [instance.channel(), instance.channel_client()].forEach( - /*#__PURE__*/ - function () { - var _ref3 = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(channel) { - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - if (_this5.terminated) { - _context2.next = 3; - break; - } - - _context2.next = 3; - return _this5.subscriber.unsubscribe(channel); - - case 3: - return _context2.abrupt("return", delete _this5.limiters[channel]); - - case 4: - case "end": - return _context2.stop(); - } - } - }, _callee2); - })); - - return function (_x2) { - return _ref3.apply(this, arguments); - }; - }()); - } - }, { - key: "__scriptArgs__", - value: function __scriptArgs__(name, id, args, cb) { - var keys; - keys = Scripts$2.keys(name, id); - return [keys.length].concat(keys, args, cb); - } - }, { - key: "__scriptFn__", - value: function __scriptFn__(name) { - return this.client[name].bind(this.client); - } - }, { - key: "disconnect", - value: function disconnect() { - var flush = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - var i, k, len, ref; - ref = Object.keys(this.limiters); - - for (i = 0, len = ref.length; i < len; i++) { - k = ref[i]; - clearInterval(this.limiters[k]._store.heartbeat); - } - - this.limiters = {}; - this.terminated = true; - - if (flush) { - return this.Promise.all([this.client.quit(), this.subscriber.quit()]); - } else { - this.client.disconnect(); - this.subscriber.disconnect(); - return this.Promise.resolve(); - } - } - }]); - - return IORedisConnection; - }(); - IORedisConnection.prototype.datastore = "ioredis"; - IORedisConnection.prototype.defaults = { - Redis: null, - clientOptions: {}, - clusterNodes: null, - client: null, - Promise: Promise, - Events: null - }; - return IORedisConnection; - }.call(commonjsGlobal); - - var IORedisConnection_1 = IORedisConnection; - - var BottleneckError$3, IORedisConnection$1, RedisConnection$1, RedisDatastore, parser$5; - parser$5 = parser; - BottleneckError$3 = BottleneckError_1; - RedisConnection$1 = RedisConnection_1; - IORedisConnection$1 = IORedisConnection_1; - - RedisDatastore = - /*#__PURE__*/ - function () { - function RedisDatastore(instance, storeOptions, storeInstanceOptions) { - var _this = this; - - _classCallCheck(this, RedisDatastore); - - this.instance = instance; - this.storeOptions = storeOptions; - this.originalId = this.instance.id; - this.clientId = this.instance._randomIndex(); - parser$5.load(storeInstanceOptions, storeInstanceOptions, this); - this.clients = {}; - this.capacityPriorityCounters = {}; - this.sharedConnection = this.connection != null; - - if (this.connection == null) { - this.connection = this.instance.datastore === "redis" ? new RedisConnection$1({ - Redis: this.Redis, - clientOptions: this.clientOptions, - Promise: this.Promise, - Events: this.instance.Events - }) : this.instance.datastore === "ioredis" ? new IORedisConnection$1({ - Redis: this.Redis, - clientOptions: this.clientOptions, - clusterNodes: this.clusterNodes, - Promise: this.Promise, - Events: this.instance.Events - }) : void 0; - } - - this.instance.connection = this.connection; - this.instance.datastore = this.connection.datastore; - this.ready = this.connection.ready.then(function (clients) { - _this.clients = clients; - return _this.runScript("init", _this.prepareInitSettings(_this.clearDatastore)); - }).then(function () { - return _this.connection.__addLimiter__(_this.instance); - }).then(function () { - return _this.runScript("register_client", [_this.instance.queued()]); - }).then(function () { - var base; - - if (typeof (base = _this.heartbeat = setInterval(function () { - return _this.runScript("heartbeat", [])["catch"](function (e) { - return _this.instance.Events.trigger("error", e); - }); - }, _this.heartbeatInterval)).unref === "function") { - base.unref(); - } - - return _this.clients; - }); - } - - _createClass(RedisDatastore, [{ - key: "__publish__", - value: function () { - var _publish__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(message) { - var client, _ref; - - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return this.ready; - - case 2: - _ref = _context.sent; - client = _ref.client; - return _context.abrupt("return", client.publish(this.instance.channel(), "message:".concat(message.toString()))); - - case 5: - case "end": - return _context.stop(); - } - } - }, _callee, this); - })); - - function __publish__(_x) { - return _publish__.apply(this, arguments); - } - - return __publish__; - }() - }, { - key: "onMessage", - value: function () { - var _onMessage = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee3(channel, message) { - var _this2 = this; - - var capacity, counter, data, drained, e, newCapacity, pos, priorityClient, rawCapacity, type, _ref2, _data$split, _data$split2; - - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - _context3.prev = 0; - pos = message.indexOf(":"); - _ref2 = [message.slice(0, pos), message.slice(pos + 1)]; - type = _ref2[0]; - data = _ref2[1]; - - if (!(type === "capacity")) { - _context3.next = 11; - break; - } - - _context3.next = 8; - return this.instance._drainAll(data.length > 0 ? ~~data : void 0); - - case 8: - return _context3.abrupt("return", _context3.sent); - - case 11: - if (!(type === "capacity-priority")) { - _context3.next = 37; - break; - } - - _data$split = data.split(":"); - _data$split2 = _slicedToArray(_data$split, 3); - rawCapacity = _data$split2[0]; - priorityClient = _data$split2[1]; - counter = _data$split2[2]; - capacity = rawCapacity.length > 0 ? ~~rawCapacity : void 0; - - if (!(priorityClient === this.clientId)) { - _context3.next = 28; - break; - } - - _context3.next = 21; - return this.instance._drainAll(capacity); - - case 21: - drained = _context3.sent; - newCapacity = capacity != null ? capacity - (drained || 0) : ""; - _context3.next = 25; - return this.clients.client.publish(this.instance.channel(), "capacity-priority:".concat(newCapacity, "::").concat(counter)); - - case 25: - return _context3.abrupt("return", _context3.sent); - - case 28: - if (!(priorityClient === "")) { - _context3.next = 34; - break; - } - - clearTimeout(this.capacityPriorityCounters[counter]); - delete this.capacityPriorityCounters[counter]; - return _context3.abrupt("return", this.instance._drainAll(capacity)); - - case 34: - return _context3.abrupt("return", this.capacityPriorityCounters[counter] = setTimeout( - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2() { - var e; - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.prev = 0; - delete _this2.capacityPriorityCounters[counter]; - _context2.next = 4; - return _this2.runScript("blacklist_client", [priorityClient]); - - case 4: - _context2.next = 6; - return _this2.instance._drainAll(capacity); - - case 6: - return _context2.abrupt("return", _context2.sent); - - case 9: - _context2.prev = 9; - _context2.t0 = _context2["catch"](0); - e = _context2.t0; - return _context2.abrupt("return", _this2.instance.Events.trigger("error", e)); - - case 13: - case "end": - return _context2.stop(); - } - } - }, _callee2, null, [[0, 9]]); - })), 1000)); - - case 35: - _context3.next = 45; - break; - - case 37: - if (!(type === "message")) { - _context3.next = 41; - break; - } - - return _context3.abrupt("return", this.instance.Events.trigger("message", data)); - - case 41: - if (!(type === "blocked")) { - _context3.next = 45; - break; - } - - _context3.next = 44; - return this.instance._dropAllQueued(); - - case 44: - return _context3.abrupt("return", _context3.sent); - - case 45: - _context3.next = 51; - break; - - case 47: - _context3.prev = 47; - _context3.t0 = _context3["catch"](0); - e = _context3.t0; - return _context3.abrupt("return", this.instance.Events.trigger("error", e)); - - case 51: - case "end": - return _context3.stop(); - } - } - }, _callee3, this, [[0, 47]]); - })); - - function onMessage(_x2, _x3) { - return _onMessage.apply(this, arguments); - } - - return onMessage; - }() - }, { - key: "__disconnect__", - value: function __disconnect__(flush) { - clearInterval(this.heartbeat); - - if (this.sharedConnection) { - return this.connection.__removeLimiter__(this.instance); - } else { - return this.connection.disconnect(flush); - } - } - }, { - key: "runScript", - value: function () { - var _runScript = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee4(name, args) { - var _this3 = this; - - return regeneratorRuntime.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - if (name === "init" || name === "register_client") { - _context4.next = 3; - break; - } - - _context4.next = 3; - return this.ready; - - case 3: - return _context4.abrupt("return", new this.Promise(function (resolve, reject) { - var all_args, arr; - all_args = [Date.now(), _this3.clientId].concat(args); - - _this3.instance.Events.trigger("debug", "Calling Redis script: ".concat(name, ".lua"), all_args); - - arr = _this3.connection.__scriptArgs__(name, _this3.originalId, all_args, function (err, replies) { - if (err != null) { - return reject(err); - } - - return resolve(replies); - }); - return _this3.connection.__scriptFn__(name).apply(void 0, _toConsumableArray(arr)); - })["catch"](function (e) { - if (e.message === "SETTINGS_KEY_NOT_FOUND") { - if (name === "heartbeat") { - return _this3.Promise.resolve(); - } else { - return _this3.runScript("init", _this3.prepareInitSettings(false)).then(function () { - return _this3.runScript(name, args); - }); - } - } else if (e.message === "UNKNOWN_CLIENT") { - return _this3.runScript("register_client", [_this3.instance.queued()]).then(function () { - return _this3.runScript(name, args); - }); - } else { - return _this3.Promise.reject(e); - } - })); - - case 4: - case "end": - return _context4.stop(); - } - } - }, _callee4, this); - })); - - function runScript(_x4, _x5) { - return _runScript.apply(this, arguments); - } - - return runScript; - }() - }, { - key: "prepareArray", - value: function prepareArray(arr) { - var i, len, results, x; - results = []; - - for (i = 0, len = arr.length; i < len; i++) { - x = arr[i]; - results.push(x != null ? x.toString() : ""); - } - - return results; - } - }, { - key: "prepareObject", - value: function prepareObject(obj) { - var arr, k, v; - arr = []; - - for (k in obj) { - v = obj[k]; - arr.push(k, v != null ? v.toString() : ""); - } - - return arr; - } - }, { - key: "prepareInitSettings", - value: function prepareInitSettings(clear) { - var args; - args = this.prepareObject(Object.assign({}, this.storeOptions, { - id: this.originalId, - version: this.instance.version, - groupTimeout: this.timeout, - clientTimeout: this.clientTimeout - })); - args.unshift(clear ? 1 : 0, this.instance.version); - return args; - } - }, { - key: "convertBool", - value: function convertBool(b) { - return !!b; - } - }, { - key: "__updateSettings__", - value: function () { - var _updateSettings__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee5(options) { - return regeneratorRuntime.wrap(function _callee5$(_context5) { - while (1) { - switch (_context5.prev = _context5.next) { - case 0: - _context5.next = 2; - return this.runScript("update_settings", this.prepareObject(options)); - - case 2: - return _context5.abrupt("return", parser$5.overwrite(options, options, this.storeOptions)); - - case 3: - case "end": - return _context5.stop(); - } - } - }, _callee5, this); - })); - - function __updateSettings__(_x6) { - return _updateSettings__.apply(this, arguments); - } - - return __updateSettings__; - }() - }, { - key: "__running__", - value: function __running__() { - return this.runScript("running", []); - } - }, { - key: "__queued__", - value: function __queued__() { - return this.runScript("queued", []); - } - }, { - key: "__done__", - value: function __done__() { - return this.runScript("done", []); - } - }, { - key: "__groupCheck__", - value: function () { - var _groupCheck__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee6() { - return regeneratorRuntime.wrap(function _callee6$(_context6) { - while (1) { - switch (_context6.prev = _context6.next) { - case 0: - _context6.t0 = this; - _context6.next = 3; - return this.runScript("group_check", []); - - case 3: - _context6.t1 = _context6.sent; - return _context6.abrupt("return", _context6.t0.convertBool.call(_context6.t0, _context6.t1)); - - case 5: - case "end": - return _context6.stop(); - } - } - }, _callee6, this); - })); - - function __groupCheck__() { - return _groupCheck__.apply(this, arguments); - } - - return __groupCheck__; - }() - }, { - key: "__incrementReservoir__", - value: function __incrementReservoir__(incr) { - return this.runScript("increment_reservoir", [incr]); - } - }, { - key: "__currentReservoir__", - value: function __currentReservoir__() { - return this.runScript("current_reservoir", []); - } - }, { - key: "__check__", - value: function () { - var _check__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee7(weight) { - return regeneratorRuntime.wrap(function _callee7$(_context7) { - while (1) { - switch (_context7.prev = _context7.next) { - case 0: - _context7.t0 = this; - _context7.next = 3; - return this.runScript("check", this.prepareArray([weight])); - - case 3: - _context7.t1 = _context7.sent; - return _context7.abrupt("return", _context7.t0.convertBool.call(_context7.t0, _context7.t1)); - - case 5: - case "end": - return _context7.stop(); - } - } - }, _callee7, this); - })); - - function __check__(_x7) { - return _check__.apply(this, arguments); - } - - return __check__; - }() - }, { - key: "__register__", - value: function () { - var _register__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee8(index, weight, expiration) { - var reservoir, success, wait, _ref4, _ref5; - - return regeneratorRuntime.wrap(function _callee8$(_context8) { - while (1) { - switch (_context8.prev = _context8.next) { - case 0: - _context8.next = 2; - return this.runScript("register", this.prepareArray([index, weight, expiration])); - - case 2: - _ref4 = _context8.sent; - _ref5 = _slicedToArray(_ref4, 3); - success = _ref5[0]; - wait = _ref5[1]; - reservoir = _ref5[2]; - return _context8.abrupt("return", { - success: this.convertBool(success), - wait: wait, - reservoir: reservoir - }); - - case 8: - case "end": - return _context8.stop(); - } - } - }, _callee8, this); - })); - - function __register__(_x8, _x9, _x10) { - return _register__.apply(this, arguments); - } - - return __register__; - }() - }, { - key: "__submit__", - value: function () { - var _submit__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee9(queueLength, weight) { - var blocked, e, maxConcurrent, overweight, reachedHWM, strategy, _ref6, _ref7, _e$message$split, _e$message$split2; - - return regeneratorRuntime.wrap(function _callee9$(_context9) { - while (1) { - switch (_context9.prev = _context9.next) { - case 0: - _context9.prev = 0; - _context9.next = 3; - return this.runScript("submit", this.prepareArray([queueLength, weight])); - - case 3: - _ref6 = _context9.sent; - _ref7 = _slicedToArray(_ref6, 3); - reachedHWM = _ref7[0]; - blocked = _ref7[1]; - strategy = _ref7[2]; - return _context9.abrupt("return", { - reachedHWM: this.convertBool(reachedHWM), - blocked: this.convertBool(blocked), - strategy: strategy - }); - - case 11: - _context9.prev = 11; - _context9.t0 = _context9["catch"](0); - e = _context9.t0; - - if (!(e.message.indexOf("OVERWEIGHT") === 0)) { - _context9.next = 23; - break; - } - - _e$message$split = e.message.split(":"); - _e$message$split2 = _slicedToArray(_e$message$split, 3); - overweight = _e$message$split2[0]; - weight = _e$message$split2[1]; - maxConcurrent = _e$message$split2[2]; - throw new BottleneckError$3("Impossible to add a job having a weight of ".concat(weight, " to a limiter having a maxConcurrent setting of ").concat(maxConcurrent)); - - case 23: - throw e; - - case 24: - case "end": - return _context9.stop(); - } - } - }, _callee9, this, [[0, 11]]); - })); - - function __submit__(_x11, _x12) { - return _submit__.apply(this, arguments); - } - - return __submit__; - }() - }, { - key: "__free__", - value: function () { - var _free__ = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee10(index, weight) { - var running; - return regeneratorRuntime.wrap(function _callee10$(_context10) { - while (1) { - switch (_context10.prev = _context10.next) { - case 0: - _context10.next = 2; - return this.runScript("free", this.prepareArray([index])); - - case 2: - running = _context10.sent; - return _context10.abrupt("return", { - running: running - }); - - case 4: - case "end": - return _context10.stop(); - } - } - }, _callee10, this); - })); - - function __free__(_x13, _x14) { - return _free__.apply(this, arguments); - } - - return __free__; - }() - }]); - - return RedisDatastore; - }(); - - var RedisDatastore_1 = RedisDatastore; - - var BottleneckError$4, States; - BottleneckError$4 = BottleneckError_1; - - States = - /*#__PURE__*/ - function () { - function States(status1) { - _classCallCheck(this, States); - - this.status = status1; - this._jobs = {}; - this.counts = this.status.map(function () { - return 0; - }); - } - - _createClass(States, [{ - key: "next", - value: function next(id) { - var current, next; - current = this._jobs[id]; - next = current + 1; - - if (current != null && next < this.status.length) { - this.counts[current]--; - this.counts[next]++; - return this._jobs[id]++; - } else if (current != null) { - this.counts[current]--; - return delete this._jobs[id]; - } - } - }, { - key: "start", - value: function start(id) { - var initial; - initial = 0; - this._jobs[id] = initial; - return this.counts[initial]++; - } - }, { - key: "remove", - value: function remove(id) { - var current; - current = this._jobs[id]; - - if (current != null) { - this.counts[current]--; - delete this._jobs[id]; - } - - return current != null; - } - }, { - key: "jobStatus", - value: function jobStatus(id) { - var ref; - return (ref = this.status[this._jobs[id]]) != null ? ref : null; - } - }, { - key: "statusJobs", - value: function statusJobs(status) { - var k, pos, ref, results, v; - - if (status != null) { - pos = this.status.indexOf(status); - - if (pos < 0) { - throw new BottleneckError$4("status must be one of ".concat(this.status.join(', '))); - } - - ref = this._jobs; - results = []; - - for (k in ref) { - v = ref[k]; - - if (v === pos) { - results.push(k); - } - } - - return results; - } else { - return Object.keys(this._jobs); - } - } - }, { - key: "statusCounts", - value: function statusCounts() { - var _this = this; - - return this.counts.reduce(function (acc, v, i) { - acc[_this.status[i]] = v; - return acc; - }, {}); - } - }]); - - return States; - }(); - - var States_1 = States; - - var DLList$2, Sync; - DLList$2 = DLList_1; - - Sync = - /*#__PURE__*/ - function () { - function Sync(name, Promise) { - _classCallCheck(this, Sync); - - this.schedule = this.schedule.bind(this); - this.name = name; - this.Promise = Promise; - this._running = 0; - this._queue = new DLList$2(); - } - - _createClass(Sync, [{ - key: "isEmpty", - value: function isEmpty() { - return this._queue.length === 0; - } - }, { - key: "_tryToRun", - value: function () { - var _tryToRun2 = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2() { - var args, cb, error, reject, resolve, returned, task, _this$_queue$shift; - - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - if (!(this._running < 1 && this._queue.length > 0)) { - _context2.next = 13; - break; - } - - this._running++; - _this$_queue$shift = this._queue.shift(); - task = _this$_queue$shift.task; - args = _this$_queue$shift.args; - resolve = _this$_queue$shift.resolve; - reject = _this$_queue$shift.reject; - _context2.next = 9; - return _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee() { - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.prev = 0; - _context.next = 3; - return task.apply(void 0, _toConsumableArray(args)); - - case 3: - returned = _context.sent; - return _context.abrupt("return", function () { - return resolve(returned); - }); - - case 7: - _context.prev = 7; - _context.t0 = _context["catch"](0); - error = _context.t0; - return _context.abrupt("return", function () { - return reject(error); - }); - - case 11: - case "end": - return _context.stop(); - } - } - }, _callee, null, [[0, 7]]); - }))(); - - case 9: - cb = _context2.sent; - this._running--; - - this._tryToRun(); - - return _context2.abrupt("return", cb()); - - case 13: - case "end": - return _context2.stop(); - } - } - }, _callee2, this); - })); - - function _tryToRun() { - return _tryToRun2.apply(this, arguments); - } - - return _tryToRun; - }() - }, { - key: "schedule", - value: function schedule(task) { - var promise, reject, resolve; - resolve = reject = null; - promise = new this.Promise(function (_resolve, _reject) { - resolve = _resolve; - return reject = _reject; - }); - - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - this._queue.push({ - task: task, - args: args, - resolve: resolve, - reject: reject - }); - - this._tryToRun(); - - return promise; - } - }]); - - return Sync; - }(); - - var Sync_1 = Sync; - - var version = "2.19.5"; - var version$1 = { - version: version - }; - - var version$2 = /*#__PURE__*/Object.freeze({ - version: version, - default: version$1 - }); - - var Events$4, Group, IORedisConnection$2, RedisConnection$2, Scripts$3, parser$6; - parser$6 = parser; - Events$4 = Events_1; - RedisConnection$2 = RedisConnection_1; - IORedisConnection$2 = IORedisConnection_1; - Scripts$3 = Scripts; - - Group = function () { - var Group = - /*#__PURE__*/ - function () { - function Group() { - var limiterOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, Group); - - this.deleteKey = this.deleteKey.bind(this); - this.limiterOptions = limiterOptions; - parser$6.load(this.limiterOptions, this.defaults, this); - this.Events = new Events$4(this); - this.instances = {}; - this.Bottleneck = Bottleneck_1; - - this._startAutoCleanup(); - - this.sharedConnection = this.connection != null; - - if (this.connection == null) { - if (this.limiterOptions.datastore === "redis") { - this.connection = new RedisConnection$2(Object.assign({}, this.limiterOptions, { - Events: this.Events - })); - } else if (this.limiterOptions.datastore === "ioredis") { - this.connection = new IORedisConnection$2(Object.assign({}, this.limiterOptions, { - Events: this.Events - })); - } - } - } - - _createClass(Group, [{ - key: "key", - value: function key() { - var _this = this; - - var _key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; - - var ref; - return (ref = this.instances[_key]) != null ? ref : function () { - var limiter; - limiter = _this.instances[_key] = new _this.Bottleneck(Object.assign(_this.limiterOptions, { - id: "".concat(_this.id, "-").concat(_key), - timeout: _this.timeout, - connection: _this.connection - })); - - _this.Events.trigger("created", limiter, _key); - - return limiter; - }(); - } - }, { - key: "deleteKey", - value: function () { - var _deleteKey = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee() { - var key, - deleted, - instance, - _args = arguments; - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - key = _args.length > 0 && _args[0] !== undefined ? _args[0] : ""; - instance = this.instances[key]; - - if (!this.connection) { - _context.next = 6; - break; - } - - _context.next = 5; - return this.connection.__runCommand__(['del'].concat(_toConsumableArray(Scripts$3.allKeys("".concat(this.id, "-").concat(key))))); - - case 5: - deleted = _context.sent; - - case 6: - if (!(instance != null)) { - _context.next = 10; - break; - } - - delete this.instances[key]; - _context.next = 10; - return instance.disconnect(); - - case 10: - return _context.abrupt("return", instance != null || deleted > 0); - - case 11: - case "end": - return _context.stop(); - } - } - }, _callee, this); - })); - - function deleteKey() { - return _deleteKey.apply(this, arguments); - } - - return deleteKey; - }() - }, { - key: "limiters", - value: function limiters() { - var k, ref, results, v; - ref = this.instances; - results = []; - - for (k in ref) { - v = ref[k]; - results.push({ - key: k, - limiter: v - }); - } - - return results; - } - }, { - key: "keys", - value: function keys() { - return Object.keys(this.instances); - } - }, { - key: "clusterKeys", - value: function () { - var _clusterKeys = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2() { - var cursor, end, found, i, k, keys, len, next, start, _ref, _ref2; - - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - if (!(this.connection == null)) { - _context2.next = 2; - break; - } - - return _context2.abrupt("return", this.Promise.resolve(this.keys())); - - case 2: - keys = []; - cursor = null; - start = "b_".concat(this.id, "-").length; - end = "_settings".length; - - case 6: - if (!(cursor !== 0)) { - _context2.next = 17; - break; - } - - _context2.next = 9; - return this.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", "b_".concat(this.id, "-*_settings"), "count", 10000]); - - case 9: - _ref = _context2.sent; - _ref2 = _slicedToArray(_ref, 2); - next = _ref2[0]; - found = _ref2[1]; - cursor = ~~next; - - for (i = 0, len = found.length; i < len; i++) { - k = found[i]; - keys.push(k.slice(start, -end)); - } - - _context2.next = 6; - break; - - case 17: - return _context2.abrupt("return", keys); - - case 18: - case "end": - return _context2.stop(); - } - } - }, _callee2, this); - })); - - function clusterKeys() { - return _clusterKeys.apply(this, arguments); - } - - return clusterKeys; - }() - }, { - key: "_startAutoCleanup", - value: function _startAutoCleanup() { - var _this2 = this; - - var base; - clearInterval(this.interval); - return typeof (base = this.interval = setInterval( - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee3() { - var e, k, ref, results, time, v; - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - time = Date.now(); - ref = _this2.instances; - results = []; - _context3.t0 = regeneratorRuntime.keys(ref); - - case 4: - if ((_context3.t1 = _context3.t0()).done) { - _context3.next = 23; - break; - } - - k = _context3.t1.value; - v = ref[k]; - _context3.prev = 7; - _context3.next = 10; - return v._store.__groupCheck__(time); - - case 10: - if (!_context3.sent) { - _context3.next = 14; - break; - } - - results.push(_this2.deleteKey(k)); - _context3.next = 15; - break; - - case 14: - results.push(void 0); - - case 15: - _context3.next = 21; - break; - - case 17: - _context3.prev = 17; - _context3.t2 = _context3["catch"](7); - e = _context3.t2; - results.push(v.Events.trigger("error", e)); - - case 21: - _context3.next = 4; - break; - - case 23: - return _context3.abrupt("return", results); - - case 24: - case "end": - return _context3.stop(); - } - } - }, _callee3, null, [[7, 17]]); - })), this.timeout / 2)).unref === "function" ? base.unref() : void 0; - } - }, { - key: "updateSettings", - value: function updateSettings() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - parser$6.overwrite(options, this.defaults, this); - parser$6.overwrite(options, options, this.limiterOptions); - - if (options.timeout != null) { - return this._startAutoCleanup(); - } - } - }, { - key: "disconnect", - value: function disconnect() { - var flush = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - var ref; - - if (!this.sharedConnection) { - return (ref = this.connection) != null ? ref.disconnect(flush) : void 0; - } - } - }]); - - return Group; - }(); - Group.prototype.defaults = { - timeout: 1000 * 60 * 5, - connection: null, - Promise: Promise, - id: "group-key" - }; - return Group; - }.call(commonjsGlobal); - - var Group_1 = Group; - - var Batcher, Events$5, parser$7; - parser$7 = parser; - Events$5 = Events_1; - - Batcher = function () { - var Batcher = - /*#__PURE__*/ - function () { - function Batcher() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, Batcher); - - this.options = options; - parser$7.load(this.options, this.defaults, this); - this.Events = new Events$5(this); - this._arr = []; - - this._resetPromise(); - - this._lastFlush = Date.now(); - } - - _createClass(Batcher, [{ - key: "_resetPromise", - value: function _resetPromise() { - var _this = this; - - return this._promise = new this.Promise(function (res, rej) { - return _this._resolve = res; - }); - } - }, { - key: "_flush", - value: function _flush() { - clearTimeout(this._timeout); - this._lastFlush = Date.now(); - - this._resolve(); - - this.Events.trigger("batch", this._arr); - this._arr = []; - return this._resetPromise(); - } - }, { - key: "add", - value: function add(data) { - var _this2 = this; - - var ret; - - this._arr.push(data); - - ret = this._promise; - - if (this._arr.length === this.maxSize) { - this._flush(); - } else if (this.maxTime != null && this._arr.length === 1) { - this._timeout = setTimeout(function () { - return _this2._flush(); - }, this.maxTime); - } - - return ret; - } - }]); - - return Batcher; - }(); - Batcher.prototype.defaults = { - maxTime: null, - maxSize: null, - Promise: Promise - }; - return Batcher; - }.call(commonjsGlobal); - - var Batcher_1 = Batcher; - - var require$$8 = getCjsExportFromNamespace(version$2); - - var Bottleneck, - DEFAULT_PRIORITY$1, - Events$6, - Job$1, - LocalDatastore$1, - NUM_PRIORITIES$1, - Queues$1, - RedisDatastore$1, - States$1, - Sync$1, - parser$8, - splice = [].splice; - NUM_PRIORITIES$1 = 10; - DEFAULT_PRIORITY$1 = 5; - parser$8 = parser; - Queues$1 = Queues_1; - Job$1 = Job_1; - LocalDatastore$1 = LocalDatastore_1; - RedisDatastore$1 = RedisDatastore_1; - Events$6 = Events_1; - States$1 = States_1; - Sync$1 = Sync_1; - - Bottleneck = function () { - var Bottleneck = - /*#__PURE__*/ - function () { - function Bottleneck() { - var _this = this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, Bottleneck); - - var storeInstanceOptions, storeOptions; - this._addToQueue = this._addToQueue.bind(this); - - for (var _len = arguments.length, invalid = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - invalid[_key - 1] = arguments[_key]; - } - - this._validateOptions(options, invalid); - - parser$8.load(options, this.instanceDefaults, this); - this._queues = new Queues$1(NUM_PRIORITIES$1); - this._scheduled = {}; - this._states = new States$1(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : [])); - this._limiter = null; - this.Events = new Events$6(this); - this._submitLock = new Sync$1("submit", this.Promise); - this._registerLock = new Sync$1("register", this.Promise); - storeOptions = parser$8.load(options, this.storeDefaults, {}); - - this._store = function () { - if (this.datastore === "redis" || this.datastore === "ioredis" || this.connection != null) { - storeInstanceOptions = parser$8.load(options, this.redisStoreDefaults, {}); - return new RedisDatastore$1(this, storeOptions, storeInstanceOptions); - } else if (this.datastore === "local") { - storeInstanceOptions = parser$8.load(options, this.localStoreDefaults, {}); - return new LocalDatastore$1(this, storeOptions, storeInstanceOptions); - } else { - throw new Bottleneck.prototype.BottleneckError("Invalid datastore type: ".concat(this.datastore)); - } - }.call(this); - - this._queues.on("leftzero", function () { - var ref; - return (ref = _this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0; - }); - - this._queues.on("zero", function () { - var ref; - return (ref = _this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0; - }); - } - - _createClass(Bottleneck, [{ - key: "_validateOptions", - value: function _validateOptions(options, invalid) { - if (!(options != null && _typeof(options) === "object" && invalid.length === 0)) { - throw new Bottleneck.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1."); - } - } - }, { - key: "ready", - value: function ready() { - return this._store.ready; - } - }, { - key: "clients", - value: function clients() { - return this._store.clients; - } - }, { - key: "channel", - value: function channel() { - return "b_".concat(this.id); - } - }, { - key: "channel_client", - value: function channel_client() { - return "b_".concat(this.id, "_").concat(this._store.clientId); - } - }, { - key: "publish", - value: function publish(message) { - return this._store.__publish__(message); - } - }, { - key: "disconnect", - value: function disconnect() { - var flush = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - return this._store.__disconnect__(flush); - } - }, { - key: "chain", - value: function chain(_limiter) { - this._limiter = _limiter; - return this; - } - }, { - key: "queued", - value: function queued(priority) { - return this._queues.queued(priority); - } - }, { - key: "clusterQueued", - value: function clusterQueued() { - return this._store.__queued__(); - } - }, { - key: "empty", - value: function empty() { - return this.queued() === 0 && this._submitLock.isEmpty(); - } - }, { - key: "running", - value: function running() { - return this._store.__running__(); - } - }, { - key: "done", - value: function done() { - return this._store.__done__(); - } - }, { - key: "jobStatus", - value: function jobStatus(id) { - return this._states.jobStatus(id); - } - }, { - key: "jobs", - value: function jobs(status) { - return this._states.statusJobs(status); - } - }, { - key: "counts", - value: function counts() { - return this._states.statusCounts(); - } - }, { - key: "_randomIndex", - value: function _randomIndex() { - return Math.random().toString(36).slice(2); - } - }, { - key: "check", - value: function check() { - var weight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; - return this._store.__check__(weight); - } - }, { - key: "_clearGlobalState", - value: function _clearGlobalState(index) { - if (this._scheduled[index] != null) { - clearTimeout(this._scheduled[index].expiration); - delete this._scheduled[index]; - return true; - } else { - return false; - } - } - }, { - key: "_free", - value: function () { - var _free2 = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee(index, job, options, eventInfo) { - var e, running, _ref; - - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.prev = 0; - _context.next = 3; - return this._store.__free__(index, options.weight); - - case 3: - _ref = _context.sent; - running = _ref.running; - this.Events.trigger("debug", "Freed ".concat(options.id), eventInfo); - - if (!(running === 0 && this.empty())) { - _context.next = 8; - break; - } - - return _context.abrupt("return", this.Events.trigger("idle")); - - case 8: - _context.next = 14; - break; - - case 10: - _context.prev = 10; - _context.t0 = _context["catch"](0); - e = _context.t0; - return _context.abrupt("return", this.Events.trigger("error", e)); - - case 14: - case "end": - return _context.stop(); - } - } - }, _callee, this, [[0, 10]]); - })); - - function _free(_x, _x2, _x3, _x4) { - return _free2.apply(this, arguments); - } - - return _free; - }() - }, { - key: "_run", - value: function _run(index, job, wait) { - var _this2 = this; - - var clearGlobalState, free, run; - job.doRun(); - clearGlobalState = this._clearGlobalState.bind(this, index); - run = this._run.bind(this, index, job); - free = this._free.bind(this, index, job); - return this._scheduled[index] = { - timeout: setTimeout(function () { - return job.doExecute(_this2._limiter, clearGlobalState, run, free); - }, wait), - expiration: job.options.expiration != null ? setTimeout(function () { - return job.doExpire(clearGlobalState, run, free); - }, wait + job.options.expiration) : void 0, - job: job - }; - } - }, { - key: "_drainOne", - value: function _drainOne(capacity) { - var _this3 = this; - - return this._registerLock.schedule(function () { - var args, index, next, options, queue; - - if (_this3.queued() === 0) { - return _this3.Promise.resolve(null); - } - - queue = _this3._queues.getFirst(); - - var _next = next = queue.first(); - - options = _next.options; - args = _next.args; - - if (capacity != null && options.weight > capacity) { - return _this3.Promise.resolve(null); - } - - _this3.Events.trigger("debug", "Draining ".concat(options.id), { - args: args, - options: options - }); - - index = _this3._randomIndex(); - return _this3._store.__register__(index, options.weight, options.expiration).then(function (_ref2) { - var success = _ref2.success, - wait = _ref2.wait, - reservoir = _ref2.reservoir; - var empty; - - _this3.Events.trigger("debug", "Drained ".concat(options.id), { - success: success, - args: args, - options: options - }); - - if (success) { - queue.shift(); - empty = _this3.empty(); - - if (empty) { - _this3.Events.trigger("empty"); - } - - if (reservoir === 0) { - _this3.Events.trigger("depleted", empty); - } - - _this3._run(index, next, wait); - - return _this3.Promise.resolve(options.weight); - } else { - return _this3.Promise.resolve(null); - } - }); - }); - } - }, { - key: "_drainAll", - value: function _drainAll(capacity) { - var _this4 = this; - - var total = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - return this._drainOne(capacity).then(function (drained) { - var newCapacity; - - if (drained != null) { - newCapacity = capacity != null ? capacity - drained : capacity; - return _this4._drainAll(newCapacity, total + drained); - } else { - return _this4.Promise.resolve(total); - } - })["catch"](function (e) { - return _this4.Events.trigger("error", e); - }); - } - }, { - key: "_dropAllQueued", - value: function _dropAllQueued(message) { - return this._queues.shiftAll(function (job) { - return job.doDrop({ - message: message - }); - }); - } - }, { - key: "stop", - value: function stop() { - var _this5 = this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var done, waitForExecuting; - options = parser$8.load(options, this.stopDefaults); - - waitForExecuting = function waitForExecuting(at) { - var finished; - - finished = function finished() { - var counts; - counts = _this5._states.counts; - return counts[0] + counts[1] + counts[2] + counts[3] === at; - }; - - return new _this5.Promise(function (resolve, reject) { - if (finished()) { - return resolve(); - } else { - return _this5.on("done", function () { - if (finished()) { - _this5.removeAllListeners("done"); - - return resolve(); - } - }); - } - }); - }; - - done = options.dropWaitingJobs ? (this._run = function (index, next) { - return next.doDrop({ - message: options.dropErrorMessage - }); - }, this._drainOne = function () { - return _this5.Promise.resolve(null); - }, this._registerLock.schedule(function () { - return _this5._submitLock.schedule(function () { - var k, ref, v; - ref = _this5._scheduled; - - for (k in ref) { - v = ref[k]; - - if (_this5.jobStatus(v.job.options.id) === "RUNNING") { - clearTimeout(v.timeout); - clearTimeout(v.expiration); - v.job.doDrop({ - message: options.dropErrorMessage - }); - } - } - - _this5._dropAllQueued(options.dropErrorMessage); - - return waitForExecuting(0); - }); - })) : this.schedule({ - priority: NUM_PRIORITIES$1 - 1, - weight: 0 - }, function () { - return waitForExecuting(1); - }); - - this._receive = function (job) { - return job._reject(new Bottleneck.prototype.BottleneckError(options.enqueueErrorMessage)); - }; - - this.stop = function () { - return _this5.Promise.reject(new Bottleneck.prototype.BottleneckError("stop() has already been called")); - }; - - return done; - } - }, { - key: "_addToQueue", - value: function () { - var _addToQueue2 = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee2(job) { - var args, blocked, error, options, reachedHWM, shifted, strategy, _ref3; - - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - args = job.args; - options = job.options; - _context2.prev = 2; - _context2.next = 5; - return this._store.__submit__(this.queued(), options.weight); - - case 5: - _ref3 = _context2.sent; - reachedHWM = _ref3.reachedHWM; - blocked = _ref3.blocked; - strategy = _ref3.strategy; - _context2.next = 17; - break; - - case 11: - _context2.prev = 11; - _context2.t0 = _context2["catch"](2); - error = _context2.t0; - this.Events.trigger("debug", "Could not queue ".concat(options.id), { - args: args, - options: options, - error: error - }); - job.doDrop({ - error: error - }); - return _context2.abrupt("return", false); - - case 17: - if (!blocked) { - _context2.next = 22; - break; - } - - job.doDrop(); - return _context2.abrupt("return", true); - - case 22: - if (!reachedHWM) { - _context2.next = 28; - break; - } - - shifted = strategy === Bottleneck.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options.priority) : strategy === Bottleneck.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck.prototype.strategy.OVERFLOW ? job : void 0; - - if (shifted != null) { - shifted.doDrop(); - } - - if (!(shifted == null || strategy === Bottleneck.prototype.strategy.OVERFLOW)) { - _context2.next = 28; - break; - } - - if (shifted == null) { - job.doDrop(); - } - - return _context2.abrupt("return", reachedHWM); - - case 28: - job.doQueue(reachedHWM, blocked); - - this._queues.push(job); - - _context2.next = 32; - return this._drainAll(); - - case 32: - return _context2.abrupt("return", reachedHWM); - - case 33: - case "end": - return _context2.stop(); - } - } - }, _callee2, this, [[2, 11]]); - })); - - function _addToQueue(_x5) { - return _addToQueue2.apply(this, arguments); - } - - return _addToQueue; - }() - }, { - key: "_receive", - value: function _receive(job) { - if (this._states.jobStatus(job.options.id) != null) { - job._reject(new Bottleneck.prototype.BottleneckError("A job with the same id already exists (id=".concat(job.options.id, ")"))); - - return false; - } else { - job.doReceive(); - return this._submitLock.schedule(this._addToQueue, job); - } - } - }, { - key: "submit", - value: function submit() { - var _this6 = this; - - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - var cb, fn, job, options, ref, ref1, task; - - if (typeof args[0] === "function") { - var _ref4, _ref5, _splice$call, _splice$call2; - - ref = args, (_ref4 = ref, _ref5 = _toArray(_ref4), fn = _ref5[0], args = _ref5.slice(1), _ref4), (_splice$call = splice.call(args, -1), _splice$call2 = _slicedToArray(_splice$call, 1), cb = _splice$call2[0], _splice$call); - options = parser$8.load({}, this.jobDefaults); - } else { - var _ref6, _ref7, _splice$call3, _splice$call4; - - ref1 = args, (_ref6 = ref1, _ref7 = _toArray(_ref6), options = _ref7[0], fn = _ref7[1], args = _ref7.slice(2), _ref6), (_splice$call3 = splice.call(args, -1), _splice$call4 = _slicedToArray(_splice$call3, 1), cb = _splice$call4[0], _splice$call3); - options = parser$8.load(options, this.jobDefaults); - } - - task = function task() { - for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - args[_key3] = arguments[_key3]; - } - - return new _this6.Promise(function (resolve, reject) { - return fn.apply(void 0, args.concat([function () { - for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - args[_key4] = arguments[_key4]; - } - - return (args[0] != null ? reject : resolve)(args); - }])); - }); - }; - - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - job.promise.then(function (args) { - return typeof cb === "function" ? cb.apply(void 0, _toConsumableArray(args)) : void 0; - })["catch"](function (args) { - if (Array.isArray(args)) { - return typeof cb === "function" ? cb.apply(void 0, _toConsumableArray(args)) : void 0; - } else { - return typeof cb === "function" ? cb(args) : void 0; - } - }); - return this._receive(job); - } - }, { - key: "schedule", - value: function schedule() { - for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { - args[_key5] = arguments[_key5]; - } - - var job, options, task; - - if (typeof args[0] === "function") { - var _args3 = args; - - var _args4 = _toArray(_args3); - - task = _args4[0]; - args = _args4.slice(1); - options = {}; - } else { - var _args5 = args; - - var _args6 = _toArray(_args5); - - options = _args6[0]; - task = _args6[1]; - args = _args6.slice(2); - } - - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - - this._receive(job); - - return job.promise; - } - }, { - key: "wrap", - value: function wrap(fn) { - var schedule, wrapped; - schedule = this.schedule.bind(this); - - wrapped = function wrapped() { - for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { - args[_key6] = arguments[_key6]; - } - - return schedule.apply(void 0, [fn.bind(this)].concat(args)); - }; - - wrapped.withOptions = function (options) { - for (var _len7 = arguments.length, args = new Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) { - args[_key7 - 1] = arguments[_key7]; - } - - return schedule.apply(void 0, [options, fn].concat(args)); - }; - - return wrapped; - } - }, { - key: "updateSettings", - value: function () { - var _updateSettings = _asyncToGenerator( - /*#__PURE__*/ - regeneratorRuntime.mark(function _callee3() { - var options, - _args7 = arguments; - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - options = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}; - _context3.next = 3; - return this._store.__updateSettings__(parser$8.overwrite(options, this.storeDefaults)); - - case 3: - parser$8.overwrite(options, this.instanceDefaults, this); - return _context3.abrupt("return", this); - - case 5: - case "end": - return _context3.stop(); - } - } - }, _callee3, this); - })); - - function updateSettings() { - return _updateSettings.apply(this, arguments); - } - - return updateSettings; - }() - }, { - key: "currentReservoir", - value: function currentReservoir() { - return this._store.__currentReservoir__(); - } - }, { - key: "incrementReservoir", - value: function incrementReservoir() { - var incr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - return this._store.__incrementReservoir__(incr); - } - }]); - - return Bottleneck; - }(); - Bottleneck["default"] = Bottleneck; - Bottleneck.Events = Events$6; - Bottleneck.version = Bottleneck.prototype.version = require$$8.version; - Bottleneck.strategy = Bottleneck.prototype.strategy = { - LEAK: 1, - OVERFLOW: 2, - OVERFLOW_PRIORITY: 4, - BLOCK: 3 - }; - Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = BottleneckError_1; - Bottleneck.Group = Bottleneck.prototype.Group = Group_1; - Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = RedisConnection_1; - Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = IORedisConnection_1; - Bottleneck.Batcher = Bottleneck.prototype.Batcher = Batcher_1; - Bottleneck.prototype.jobDefaults = { - priority: DEFAULT_PRIORITY$1, - weight: 1, - expiration: null, - id: "" - }; - Bottleneck.prototype.storeDefaults = { - maxConcurrent: null, - minTime: 0, - highWater: null, - strategy: Bottleneck.prototype.strategy.LEAK, - penalty: null, - reservoir: null, - reservoirRefreshInterval: null, - reservoirRefreshAmount: null, - reservoirIncreaseInterval: null, - reservoirIncreaseAmount: null, - reservoirIncreaseMaximum: null - }; - Bottleneck.prototype.localStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 250 - }; - Bottleneck.prototype.redisStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 5000, - clientTimeout: 10000, - Redis: null, - clientOptions: {}, - clusterNodes: null, - clearDatastore: false, - connection: null - }; - Bottleneck.prototype.instanceDefaults = { - datastore: "local", - connection: null, - id: "", - rejectOnDrop: true, - trackDoneStatus: false, - Promise: Promise - }; - Bottleneck.prototype.stopDefaults = { - enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", - dropWaitingJobs: true, - dropErrorMessage: "This limiter has been stopped." - }; - return Bottleneck; - }.call(commonjsGlobal); - - var Bottleneck_1 = Bottleneck; - - var es5 = Bottleneck_1; - - return es5; - -}))); diff --git a/node_modules/bottleneck/lib/Batcher.js b/node_modules/bottleneck/lib/Batcher.js deleted file mode 100644 index f52892afc..000000000 --- a/node_modules/bottleneck/lib/Batcher.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; - -var Batcher, Events, parser; -parser = require("./parser"); -Events = require("./Events"); - -Batcher = function () { - class Batcher { - constructor(options = {}) { - this.options = options; - parser.load(this.options, this.defaults, this); - this.Events = new Events(this); - this._arr = []; - - this._resetPromise(); - - this._lastFlush = Date.now(); - } - - _resetPromise() { - return this._promise = new this.Promise((res, rej) => { - return this._resolve = res; - }); - } - - _flush() { - clearTimeout(this._timeout); - this._lastFlush = Date.now(); - - this._resolve(); - - this.Events.trigger("batch", this._arr); - this._arr = []; - return this._resetPromise(); - } - - add(data) { - var ret; - - this._arr.push(data); - - ret = this._promise; - - if (this._arr.length === this.maxSize) { - this._flush(); - } else if (this.maxTime != null && this._arr.length === 1) { - this._timeout = setTimeout(() => { - return this._flush(); - }, this.maxTime); - } - - return ret; - } - - } - - ; - Batcher.prototype.defaults = { - maxTime: null, - maxSize: null, - Promise: Promise - }; - return Batcher; -}.call(void 0); - -module.exports = Batcher; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/Bottleneck.js b/node_modules/bottleneck/lib/Bottleneck.js deleted file mode 100644 index ff640a15a..000000000 --- a/node_modules/bottleneck/lib/Bottleneck.js +++ /dev/null @@ -1,594 +0,0 @@ -"use strict"; - -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } - -function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); } - -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var Bottleneck, - DEFAULT_PRIORITY, - Events, - Job, - LocalDatastore, - NUM_PRIORITIES, - Queues, - RedisDatastore, - States, - Sync, - parser, - splice = [].splice; -NUM_PRIORITIES = 10; -DEFAULT_PRIORITY = 5; -parser = require("./parser"); -Queues = require("./Queues"); -Job = require("./Job"); -LocalDatastore = require("./LocalDatastore"); -RedisDatastore = require("./RedisDatastore"); -Events = require("./Events"); -States = require("./States"); -Sync = require("./Sync"); - -Bottleneck = function () { - class Bottleneck { - constructor(options = {}, ...invalid) { - var storeInstanceOptions, storeOptions; - this._addToQueue = this._addToQueue.bind(this); - - this._validateOptions(options, invalid); - - parser.load(options, this.instanceDefaults, this); - this._queues = new Queues(NUM_PRIORITIES); - this._scheduled = {}; - this._states = new States(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : [])); - this._limiter = null; - this.Events = new Events(this); - this._submitLock = new Sync("submit", this.Promise); - this._registerLock = new Sync("register", this.Promise); - storeOptions = parser.load(options, this.storeDefaults, {}); - - this._store = function () { - if (this.datastore === "redis" || this.datastore === "ioredis" || this.connection != null) { - storeInstanceOptions = parser.load(options, this.redisStoreDefaults, {}); - return new RedisDatastore(this, storeOptions, storeInstanceOptions); - } else if (this.datastore === "local") { - storeInstanceOptions = parser.load(options, this.localStoreDefaults, {}); - return new LocalDatastore(this, storeOptions, storeInstanceOptions); - } else { - throw new Bottleneck.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`); - } - }.call(this); - - this._queues.on("leftzero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0; - }); - - this._queues.on("zero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0; - }); - } - - _validateOptions(options, invalid) { - if (!(options != null && typeof options === "object" && invalid.length === 0)) { - throw new Bottleneck.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1."); - } - } - - ready() { - return this._store.ready; - } - - clients() { - return this._store.clients; - } - - channel() { - return `b_${this.id}`; - } - - channel_client() { - return `b_${this.id}_${this._store.clientId}`; - } - - publish(message) { - return this._store.__publish__(message); - } - - disconnect(flush = true) { - return this._store.__disconnect__(flush); - } - - chain(_limiter) { - this._limiter = _limiter; - return this; - } - - queued(priority) { - return this._queues.queued(priority); - } - - clusterQueued() { - return this._store.__queued__(); - } - - empty() { - return this.queued() === 0 && this._submitLock.isEmpty(); - } - - running() { - return this._store.__running__(); - } - - done() { - return this._store.__done__(); - } - - jobStatus(id) { - return this._states.jobStatus(id); - } - - jobs(status) { - return this._states.statusJobs(status); - } - - counts() { - return this._states.statusCounts(); - } - - _randomIndex() { - return Math.random().toString(36).slice(2); - } - - check(weight = 1) { - return this._store.__check__(weight); - } - - _clearGlobalState(index) { - if (this._scheduled[index] != null) { - clearTimeout(this._scheduled[index].expiration); - delete this._scheduled[index]; - return true; - } else { - return false; - } - } - - _free(index, job, options, eventInfo) { - var _this = this; - - return _asyncToGenerator(function* () { - var e, running; - - try { - var _ref = yield _this._store.__free__(index, options.weight); - - running = _ref.running; - - _this.Events.trigger("debug", `Freed ${options.id}`, eventInfo); - - if (running === 0 && _this.empty()) { - return _this.Events.trigger("idle"); - } - } catch (error1) { - e = error1; - return _this.Events.trigger("error", e); - } - })(); - } - - _run(index, job, wait) { - var clearGlobalState, free, run; - job.doRun(); - clearGlobalState = this._clearGlobalState.bind(this, index); - run = this._run.bind(this, index, job); - free = this._free.bind(this, index, job); - return this._scheduled[index] = { - timeout: setTimeout(() => { - return job.doExecute(this._limiter, clearGlobalState, run, free); - }, wait), - expiration: job.options.expiration != null ? setTimeout(function () { - return job.doExpire(clearGlobalState, run, free); - }, wait + job.options.expiration) : void 0, - job: job - }; - } - - _drainOne(capacity) { - return this._registerLock.schedule(() => { - var args, index, next, options, queue; - - if (this.queued() === 0) { - return this.Promise.resolve(null); - } - - queue = this._queues.getFirst(); - - var _next2 = next = queue.first(); - - options = _next2.options; - args = _next2.args; - - if (capacity != null && options.weight > capacity) { - return this.Promise.resolve(null); - } - - this.Events.trigger("debug", `Draining ${options.id}`, { - args, - options - }); - index = this._randomIndex(); - return this._store.__register__(index, options.weight, options.expiration).then(({ - success, - wait, - reservoir - }) => { - var empty; - this.Events.trigger("debug", `Drained ${options.id}`, { - success, - args, - options - }); - - if (success) { - queue.shift(); - empty = this.empty(); - - if (empty) { - this.Events.trigger("empty"); - } - - if (reservoir === 0) { - this.Events.trigger("depleted", empty); - } - - this._run(index, next, wait); - - return this.Promise.resolve(options.weight); - } else { - return this.Promise.resolve(null); - } - }); - }); - } - - _drainAll(capacity, total = 0) { - return this._drainOne(capacity).then(drained => { - var newCapacity; - - if (drained != null) { - newCapacity = capacity != null ? capacity - drained : capacity; - return this._drainAll(newCapacity, total + drained); - } else { - return this.Promise.resolve(total); - } - }).catch(e => { - return this.Events.trigger("error", e); - }); - } - - _dropAllQueued(message) { - return this._queues.shiftAll(function (job) { - return job.doDrop({ - message - }); - }); - } - - stop(options = {}) { - var done, waitForExecuting; - options = parser.load(options, this.stopDefaults); - - waitForExecuting = at => { - var finished; - - finished = () => { - var counts; - counts = this._states.counts; - return counts[0] + counts[1] + counts[2] + counts[3] === at; - }; - - return new this.Promise((resolve, reject) => { - if (finished()) { - return resolve(); - } else { - return this.on("done", () => { - if (finished()) { - this.removeAllListeners("done"); - return resolve(); - } - }); - } - }); - }; - - done = options.dropWaitingJobs ? (this._run = function (index, next) { - return next.doDrop({ - message: options.dropErrorMessage - }); - }, this._drainOne = () => { - return this.Promise.resolve(null); - }, this._registerLock.schedule(() => { - return this._submitLock.schedule(() => { - var k, ref, v; - ref = this._scheduled; - - for (k in ref) { - v = ref[k]; - - if (this.jobStatus(v.job.options.id) === "RUNNING") { - clearTimeout(v.timeout); - clearTimeout(v.expiration); - v.job.doDrop({ - message: options.dropErrorMessage - }); - } - } - - this._dropAllQueued(options.dropErrorMessage); - - return waitForExecuting(0); - }); - })) : this.schedule({ - priority: NUM_PRIORITIES - 1, - weight: 0 - }, () => { - return waitForExecuting(1); - }); - - this._receive = function (job) { - return job._reject(new Bottleneck.prototype.BottleneckError(options.enqueueErrorMessage)); - }; - - this.stop = () => { - return this.Promise.reject(new Bottleneck.prototype.BottleneckError("stop() has already been called")); - }; - - return done; - } - - _addToQueue(job) { - var _this2 = this; - - return _asyncToGenerator(function* () { - var args, blocked, error, options, reachedHWM, shifted, strategy; - args = job.args; - options = job.options; - - try { - var _ref2 = yield _this2._store.__submit__(_this2.queued(), options.weight); - - reachedHWM = _ref2.reachedHWM; - blocked = _ref2.blocked; - strategy = _ref2.strategy; - } catch (error1) { - error = error1; - - _this2.Events.trigger("debug", `Could not queue ${options.id}`, { - args, - options, - error - }); - - job.doDrop({ - error - }); - return false; - } - - if (blocked) { - job.doDrop(); - return true; - } else if (reachedHWM) { - shifted = strategy === Bottleneck.prototype.strategy.LEAK ? _this2._queues.shiftLastFrom(options.priority) : strategy === Bottleneck.prototype.strategy.OVERFLOW_PRIORITY ? _this2._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck.prototype.strategy.OVERFLOW ? job : void 0; - - if (shifted != null) { - shifted.doDrop(); - } - - if (shifted == null || strategy === Bottleneck.prototype.strategy.OVERFLOW) { - if (shifted == null) { - job.doDrop(); - } - - return reachedHWM; - } - } - - job.doQueue(reachedHWM, blocked); - - _this2._queues.push(job); - - yield _this2._drainAll(); - return reachedHWM; - })(); - } - - _receive(job) { - if (this._states.jobStatus(job.options.id) != null) { - job._reject(new Bottleneck.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); - - return false; - } else { - job.doReceive(); - return this._submitLock.schedule(this._addToQueue, job); - } - } - - submit(...args) { - var cb, fn, job, options, ref, ref1, task; - - if (typeof args[0] === "function") { - var _ref3, _ref4, _splice$call, _splice$call2; - - ref = args, (_ref3 = ref, _ref4 = _toArray(_ref3), fn = _ref4[0], args = _ref4.slice(1), _ref3), (_splice$call = splice.call(args, -1), _splice$call2 = _slicedToArray(_splice$call, 1), cb = _splice$call2[0], _splice$call); - options = parser.load({}, this.jobDefaults); - } else { - var _ref5, _ref6, _splice$call3, _splice$call4; - - ref1 = args, (_ref5 = ref1, _ref6 = _toArray(_ref5), options = _ref6[0], fn = _ref6[1], args = _ref6.slice(2), _ref5), (_splice$call3 = splice.call(args, -1), _splice$call4 = _slicedToArray(_splice$call3, 1), cb = _splice$call4[0], _splice$call3); - options = parser.load(options, this.jobDefaults); - } - - task = (...args) => { - return new this.Promise(function (resolve, reject) { - return fn(...args, function (...args) { - return (args[0] != null ? reject : resolve)(args); - }); - }); - }; - - job = new Job(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - job.promise.then(function (args) { - return typeof cb === "function" ? cb(...args) : void 0; - }).catch(function (args) { - if (Array.isArray(args)) { - return typeof cb === "function" ? cb(...args) : void 0; - } else { - return typeof cb === "function" ? cb(args) : void 0; - } - }); - return this._receive(job); - } - - schedule(...args) { - var job, options, task; - - if (typeof args[0] === "function") { - var _args = args; - - var _args2 = _toArray(_args); - - task = _args2[0]; - args = _args2.slice(1); - options = {}; - } else { - var _args3 = args; - - var _args4 = _toArray(_args3); - - options = _args4[0]; - task = _args4[1]; - args = _args4.slice(2); - } - - job = new Job(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - - this._receive(job); - - return job.promise; - } - - wrap(fn) { - var schedule, wrapped; - schedule = this.schedule.bind(this); - - wrapped = function wrapped(...args) { - return schedule(fn.bind(this), ...args); - }; - - wrapped.withOptions = function (options, ...args) { - return schedule(options, fn, ...args); - }; - - return wrapped; - } - - updateSettings(options = {}) { - var _this3 = this; - - return _asyncToGenerator(function* () { - yield _this3._store.__updateSettings__(parser.overwrite(options, _this3.storeDefaults)); - parser.overwrite(options, _this3.instanceDefaults, _this3); - return _this3; - })(); - } - - currentReservoir() { - return this._store.__currentReservoir__(); - } - - incrementReservoir(incr = 0) { - return this._store.__incrementReservoir__(incr); - } - - } - - ; - Bottleneck.default = Bottleneck; - Bottleneck.Events = Events; - Bottleneck.version = Bottleneck.prototype.version = require("./version.json").version; - Bottleneck.strategy = Bottleneck.prototype.strategy = { - LEAK: 1, - OVERFLOW: 2, - OVERFLOW_PRIORITY: 4, - BLOCK: 3 - }; - Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = require("./BottleneckError"); - Bottleneck.Group = Bottleneck.prototype.Group = require("./Group"); - Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = require("./RedisConnection"); - Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = require("./IORedisConnection"); - Bottleneck.Batcher = Bottleneck.prototype.Batcher = require("./Batcher"); - Bottleneck.prototype.jobDefaults = { - priority: DEFAULT_PRIORITY, - weight: 1, - expiration: null, - id: "" - }; - Bottleneck.prototype.storeDefaults = { - maxConcurrent: null, - minTime: 0, - highWater: null, - strategy: Bottleneck.prototype.strategy.LEAK, - penalty: null, - reservoir: null, - reservoirRefreshInterval: null, - reservoirRefreshAmount: null, - reservoirIncreaseInterval: null, - reservoirIncreaseAmount: null, - reservoirIncreaseMaximum: null - }; - Bottleneck.prototype.localStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 250 - }; - Bottleneck.prototype.redisStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 5000, - clientTimeout: 10000, - Redis: null, - clientOptions: {}, - clusterNodes: null, - clearDatastore: false, - connection: null - }; - Bottleneck.prototype.instanceDefaults = { - datastore: "local", - connection: null, - id: "", - rejectOnDrop: true, - trackDoneStatus: false, - Promise: Promise - }; - Bottleneck.prototype.stopDefaults = { - enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", - dropWaitingJobs: true, - dropErrorMessage: "This limiter has been stopped." - }; - return Bottleneck; -}.call(void 0); - -module.exports = Bottleneck; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/BottleneckError.js b/node_modules/bottleneck/lib/BottleneckError.js deleted file mode 100644 index f8eeaff6e..000000000 --- a/node_modules/bottleneck/lib/BottleneckError.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -var BottleneckError; -BottleneckError = class BottleneckError extends Error {}; -module.exports = BottleneckError; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/DLList.js b/node_modules/bottleneck/lib/DLList.js deleted file mode 100644 index b469a6549..000000000 --- a/node_modules/bottleneck/lib/DLList.js +++ /dev/null @@ -1,107 +0,0 @@ -"use strict"; - -var DLList; -DLList = class DLList { - constructor(incr, decr) { - this.incr = incr; - this.decr = decr; - this._first = null; - this._last = null; - this.length = 0; - } - - push(value) { - var node; - this.length++; - - if (typeof this.incr === "function") { - this.incr(); - } - - node = { - value, - prev: this._last, - next: null - }; - - if (this._last != null) { - this._last.next = node; - this._last = node; - } else { - this._first = this._last = node; - } - - return void 0; - } - - shift() { - var value; - - if (this._first == null) { - return; - } else { - this.length--; - - if (typeof this.decr === "function") { - this.decr(); - } - } - - value = this._first.value; - - if ((this._first = this._first.next) != null) { - this._first.prev = null; - } else { - this._last = null; - } - - return value; - } - - first() { - if (this._first != null) { - return this._first.value; - } - } - - getArray() { - var node, ref, results; - node = this._first; - results = []; - - while (node != null) { - results.push((ref = node, node = node.next, ref.value)); - } - - return results; - } - - forEachShift(cb) { - var node; - node = this.shift(); - - while (node != null) { - cb(node), node = this.shift(); - } - - return void 0; - } - - debug() { - var node, ref, ref1, ref2, results; - node = this._first; - results = []; - - while (node != null) { - results.push((ref = node, node = node.next, { - value: ref.value, - prev: (ref1 = ref.prev) != null ? ref1.value : void 0, - next: (ref2 = ref.next) != null ? ref2.value : void 0 - })); - } - - return results; - } - -}; -module.exports = DLList; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/Events.js b/node_modules/bottleneck/lib/Events.js deleted file mode 100644 index e843257e9..000000000 --- a/node_modules/bottleneck/lib/Events.js +++ /dev/null @@ -1,128 +0,0 @@ -"use strict"; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var Events; -Events = class Events { - constructor(instance) { - this.instance = instance; - this._events = {}; - - if (this.instance.on != null || this.instance.once != null || this.instance.removeAllListeners != null) { - throw new Error("An Emitter already exists for this object"); - } - - this.instance.on = (name, cb) => { - return this._addListener(name, "many", cb); - }; - - this.instance.once = (name, cb) => { - return this._addListener(name, "once", cb); - }; - - this.instance.removeAllListeners = (name = null) => { - if (name != null) { - return delete this._events[name]; - } else { - return this._events = {}; - } - }; - } - - _addListener(name, status, cb) { - var base; - - if ((base = this._events)[name] == null) { - base[name] = []; - } - - this._events[name].push({ - cb, - status - }); - - return this.instance; - } - - listenerCount(name) { - if (this._events[name] != null) { - return this._events[name].length; - } else { - return 0; - } - } - - trigger(name, ...args) { - var _this = this; - - return _asyncToGenerator(function* () { - var e, promises; - - try { - if (name !== "debug") { - _this.trigger("debug", `Event triggered: ${name}`, args); - } - - if (_this._events[name] == null) { - return; - } - - _this._events[name] = _this._events[name].filter(function (listener) { - return listener.status !== "none"; - }); - promises = _this._events[name].map( - /*#__PURE__*/ - function () { - var _ref = _asyncToGenerator(function* (listener) { - var e, returned; - - if (listener.status === "none") { - return; - } - - if (listener.status === "once") { - listener.status = "none"; - } - - try { - returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0; - - if (typeof (returned != null ? returned.then : void 0) === "function") { - return yield returned; - } else { - return returned; - } - } catch (error) { - e = error; - - if ("name" !== "error") { - _this.trigger("error", e); - } - - return null; - } - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - }()); - return (yield Promise.all(promises)).find(function (x) { - return x != null; - }); - } catch (error) { - e = error; - - if ("name" !== "error") { - _this.trigger("error", e); - } - - return null; - } - })(); - } - -}; -module.exports = Events; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/Group.js b/node_modules/bottleneck/lib/Group.js deleted file mode 100644 index 39676a583..000000000 --- a/node_modules/bottleneck/lib/Group.js +++ /dev/null @@ -1,198 +0,0 @@ -"use strict"; - -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } - -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } - -function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var Events, Group, IORedisConnection, RedisConnection, Scripts, parser; -parser = require("./parser"); -Events = require("./Events"); -RedisConnection = require("./RedisConnection"); -IORedisConnection = require("./IORedisConnection"); -Scripts = require("./Scripts"); - -Group = function () { - class Group { - constructor(limiterOptions = {}) { - this.deleteKey = this.deleteKey.bind(this); - this.limiterOptions = limiterOptions; - parser.load(this.limiterOptions, this.defaults, this); - this.Events = new Events(this); - this.instances = {}; - this.Bottleneck = require("./Bottleneck"); - - this._startAutoCleanup(); - - this.sharedConnection = this.connection != null; - - if (this.connection == null) { - if (this.limiterOptions.datastore === "redis") { - this.connection = new RedisConnection(Object.assign({}, this.limiterOptions, { - Events: this.Events - })); - } else if (this.limiterOptions.datastore === "ioredis") { - this.connection = new IORedisConnection(Object.assign({}, this.limiterOptions, { - Events: this.Events - })); - } - } - } - - key(key = "") { - var ref; - return (ref = this.instances[key]) != null ? ref : (() => { - var limiter; - limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, { - id: `${this.id}-${key}`, - timeout: this.timeout, - connection: this.connection - })); - this.Events.trigger("created", limiter, key); - return limiter; - })(); - } - - deleteKey(key = "") { - var _this = this; - - return _asyncToGenerator(function* () { - var deleted, instance; - instance = _this.instances[key]; - - if (_this.connection) { - deleted = yield _this.connection.__runCommand__(['del', ...Scripts.allKeys(`${_this.id}-${key}`)]); - } - - if (instance != null) { - delete _this.instances[key]; - yield instance.disconnect(); - } - - return instance != null || deleted > 0; - })(); - } - - limiters() { - var k, ref, results, v; - ref = this.instances; - results = []; - - for (k in ref) { - v = ref[k]; - results.push({ - key: k, - limiter: v - }); - } - - return results; - } - - keys() { - return Object.keys(this.instances); - } - - clusterKeys() { - var _this2 = this; - - return _asyncToGenerator(function* () { - var cursor, end, found, i, k, keys, len, next, start; - - if (_this2.connection == null) { - return _this2.Promise.resolve(_this2.keys()); - } - - keys = []; - cursor = null; - start = `b_${_this2.id}-`.length; - end = "_settings".length; - - while (cursor !== 0) { - var _ref = yield _this2.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", `b_${_this2.id}-*_settings`, "count", 10000]); - - var _ref2 = _slicedToArray(_ref, 2); - - next = _ref2[0]; - found = _ref2[1]; - cursor = ~~next; - - for (i = 0, len = found.length; i < len; i++) { - k = found[i]; - keys.push(k.slice(start, -end)); - } - } - - return keys; - })(); - } - - _startAutoCleanup() { - var _this3 = this; - - var base; - clearInterval(this.interval); - return typeof (base = this.interval = setInterval( - /*#__PURE__*/ - _asyncToGenerator(function* () { - var e, k, ref, results, time, v; - time = Date.now(); - ref = _this3.instances; - results = []; - - for (k in ref) { - v = ref[k]; - - try { - if (yield v._store.__groupCheck__(time)) { - results.push(_this3.deleteKey(k)); - } else { - results.push(void 0); - } - } catch (error) { - e = error; - results.push(v.Events.trigger("error", e)); - } - } - - return results; - }), this.timeout / 2)).unref === "function" ? base.unref() : void 0; - } - - updateSettings(options = {}) { - parser.overwrite(options, this.defaults, this); - parser.overwrite(options, options, this.limiterOptions); - - if (options.timeout != null) { - return this._startAutoCleanup(); - } - } - - disconnect(flush = true) { - var ref; - - if (!this.sharedConnection) { - return (ref = this.connection) != null ? ref.disconnect(flush) : void 0; - } - } - - } - - ; - Group.prototype.defaults = { - timeout: 1000 * 60 * 5, - connection: null, - Promise: Promise, - id: "group-key" - }; - return Group; -}.call(void 0); - -module.exports = Group; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/IORedisConnection.js b/node_modules/bottleneck/lib/IORedisConnection.js deleted file mode 100644 index 52b28da43..000000000 --- a/node_modules/bottleneck/lib/IORedisConnection.js +++ /dev/null @@ -1,186 +0,0 @@ -"use strict"; - -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } - -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } - -function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var Events, IORedisConnection, Scripts, parser; -parser = require("./parser"); -Events = require("./Events"); -Scripts = require("./Scripts"); - -IORedisConnection = function () { - class IORedisConnection { - constructor(options = {}) { - parser.load(options, this.defaults, this); - - if (this.Redis == null) { - this.Redis = eval("require")("ioredis"); // Obfuscated or else Webpack/Angular will try to inline the optional ioredis module. To override this behavior: pass the ioredis module to Bottleneck as the 'Redis' option. - } - - if (this.Events == null) { - this.Events = new Events(this); - } - - this.terminated = false; - - if (this.clusterNodes != null) { - this.client = new this.Redis.Cluster(this.clusterNodes, this.clientOptions); - this.subscriber = new this.Redis.Cluster(this.clusterNodes, this.clientOptions); - } else if (this.client != null && this.client.duplicate == null) { - this.subscriber = new this.Redis.Cluster(this.client.startupNodes, this.client.options); - } else { - if (this.client == null) { - this.client = new this.Redis(this.clientOptions); - } - - this.subscriber = this.client.duplicate(); - } - - this.limiters = {}; - this.ready = this.Promise.all([this._setup(this.client, false), this._setup(this.subscriber, true)]).then(() => { - this._loadScripts(); - - return { - client: this.client, - subscriber: this.subscriber - }; - }); - } - - _setup(client, sub) { - client.setMaxListeners(0); - return new this.Promise((resolve, reject) => { - client.on("error", e => { - return this.Events.trigger("error", e); - }); - - if (sub) { - client.on("message", (channel, message) => { - var ref; - return (ref = this.limiters[channel]) != null ? ref._store.onMessage(channel, message) : void 0; - }); - } - - if (client.status === "ready") { - return resolve(); - } else { - return client.once("ready", resolve); - } - }); - } - - _loadScripts() { - return Scripts.names.forEach(name => { - return this.client.defineCommand(name, { - lua: Scripts.payload(name) - }); - }); - } - - __runCommand__(cmd) { - var _this = this; - - return _asyncToGenerator(function* () { - var _, deleted; - - yield _this.ready; - - var _ref = yield _this.client.pipeline([cmd]).exec(); - - var _ref2 = _slicedToArray(_ref, 1); - - var _ref2$ = _slicedToArray(_ref2[0], 2); - - _ = _ref2$[0]; - deleted = _ref2$[1]; - return deleted; - })(); - } - - __addLimiter__(instance) { - return this.Promise.all([instance.channel(), instance.channel_client()].map(channel => { - return new this.Promise((resolve, reject) => { - return this.subscriber.subscribe(channel, () => { - this.limiters[channel] = instance; - return resolve(); - }); - }); - })); - } - - __removeLimiter__(instance) { - var _this2 = this; - - return [instance.channel(), instance.channel_client()].forEach( - /*#__PURE__*/ - function () { - var _ref3 = _asyncToGenerator(function* (channel) { - if (!_this2.terminated) { - yield _this2.subscriber.unsubscribe(channel); - } - - return delete _this2.limiters[channel]; - }); - - return function (_x) { - return _ref3.apply(this, arguments); - }; - }()); - } - - __scriptArgs__(name, id, args, cb) { - var keys; - keys = Scripts.keys(name, id); - return [keys.length].concat(keys, args, cb); - } - - __scriptFn__(name) { - return this.client[name].bind(this.client); - } - - disconnect(flush = true) { - var i, k, len, ref; - ref = Object.keys(this.limiters); - - for (i = 0, len = ref.length; i < len; i++) { - k = ref[i]; - clearInterval(this.limiters[k]._store.heartbeat); - } - - this.limiters = {}; - this.terminated = true; - - if (flush) { - return this.Promise.all([this.client.quit(), this.subscriber.quit()]); - } else { - this.client.disconnect(); - this.subscriber.disconnect(); - return this.Promise.resolve(); - } - } - - } - - ; - IORedisConnection.prototype.datastore = "ioredis"; - IORedisConnection.prototype.defaults = { - Redis: null, - clientOptions: {}, - clusterNodes: null, - client: null, - Promise: Promise, - Events: null - }; - return IORedisConnection; -}.call(void 0); - -module.exports = IORedisConnection; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/Job.js b/node_modules/bottleneck/lib/Job.js deleted file mode 100644 index 09ff6ca80..000000000 --- a/node_modules/bottleneck/lib/Job.js +++ /dev/null @@ -1,215 +0,0 @@ -"use strict"; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var BottleneckError, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser; -NUM_PRIORITIES = 10; -DEFAULT_PRIORITY = 5; -parser = require("./parser"); -BottleneckError = require("./BottleneckError"); -Job = class Job { - constructor(task, args, options, jobDefaults, rejectOnDrop, Events, _states, Promise) { - this.task = task; - this.args = args; - this.rejectOnDrop = rejectOnDrop; - this.Events = Events; - this._states = _states; - this.Promise = Promise; - this.options = parser.load(options, jobDefaults); - this.options.priority = this._sanitizePriority(this.options.priority); - - if (this.options.id === jobDefaults.id) { - this.options.id = `${this.options.id}-${this._randomIndex()}`; - } - - this.promise = new this.Promise((_resolve, _reject) => { - this._resolve = _resolve; - this._reject = _reject; - }); - this.retryCount = 0; - } - - _sanitizePriority(priority) { - var sProperty; - sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority; - - if (sProperty < 0) { - return 0; - } else if (sProperty > NUM_PRIORITIES - 1) { - return NUM_PRIORITIES - 1; - } else { - return sProperty; - } - } - - _randomIndex() { - return Math.random().toString(36).slice(2); - } - - doDrop({ - error, - message = "This job has been dropped by Bottleneck" - } = {}) { - if (this._states.remove(this.options.id)) { - if (this.rejectOnDrop) { - this._reject(error != null ? error : new BottleneckError(message)); - } - - this.Events.trigger("dropped", { - args: this.args, - options: this.options, - task: this.task, - promise: this.promise - }); - return true; - } else { - return false; - } - } - - _assertStatus(expected) { - var status; - status = this._states.jobStatus(this.options.id); - - if (!(status === expected || expected === "DONE" && status === null)) { - throw new BottleneckError(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`); - } - } - - doReceive() { - this._states.start(this.options.id); - - return this.Events.trigger("received", { - args: this.args, - options: this.options - }); - } - - doQueue(reachedHWM, blocked) { - this._assertStatus("RECEIVED"); - - this._states.next(this.options.id); - - return this.Events.trigger("queued", { - args: this.args, - options: this.options, - reachedHWM, - blocked - }); - } - - doRun() { - if (this.retryCount === 0) { - this._assertStatus("QUEUED"); - - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - - return this.Events.trigger("scheduled", { - args: this.args, - options: this.options - }); - } - - doExecute(chained, clearGlobalState, run, free) { - var _this = this; - - return _asyncToGenerator(function* () { - var error, eventInfo, passed; - - if (_this.retryCount === 0) { - _this._assertStatus("RUNNING"); - - _this._states.next(_this.options.id); - } else { - _this._assertStatus("EXECUTING"); - } - - eventInfo = { - args: _this.args, - options: _this.options, - retryCount: _this.retryCount - }; - - _this.Events.trigger("executing", eventInfo); - - try { - passed = yield chained != null ? chained.schedule(_this.options, _this.task, ..._this.args) : _this.task(..._this.args); - - if (clearGlobalState()) { - _this.doDone(eventInfo); - - yield free(_this.options, eventInfo); - - _this._assertStatus("DONE"); - - return _this._resolve(passed); - } - } catch (error1) { - error = error1; - return _this._onFailure(error, eventInfo, clearGlobalState, run, free); - } - })(); - } - - doExpire(clearGlobalState, run, free) { - var error, eventInfo; - - if (this._states.jobStatus(this.options.id === "RUNNING")) { - this._states.next(this.options.id); - } - - this._assertStatus("EXECUTING"); - - eventInfo = { - args: this.args, - options: this.options, - retryCount: this.retryCount - }; - error = new BottleneckError(`This job timed out after ${this.options.expiration} ms.`); - return this._onFailure(error, eventInfo, clearGlobalState, run, free); - } - - _onFailure(error, eventInfo, clearGlobalState, run, free) { - var _this2 = this; - - return _asyncToGenerator(function* () { - var retry, retryAfter; - - if (clearGlobalState()) { - retry = yield _this2.Events.trigger("failed", error, eventInfo); - - if (retry != null) { - retryAfter = ~~retry; - - _this2.Events.trigger("retry", `Retrying ${_this2.options.id} after ${retryAfter} ms`, eventInfo); - - _this2.retryCount++; - return run(retryAfter); - } else { - _this2.doDone(eventInfo); - - yield free(_this2.options, eventInfo); - - _this2._assertStatus("DONE"); - - return _this2._reject(error); - } - } - })(); - } - - doDone(eventInfo) { - this._assertStatus("EXECUTING"); - - this._states.next(this.options.id); - - return this.Events.trigger("done", eventInfo); - } - -}; -module.exports = Job; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/LocalDatastore.js b/node_modules/bottleneck/lib/LocalDatastore.js deleted file mode 100644 index 119849eda..000000000 --- a/node_modules/bottleneck/lib/LocalDatastore.js +++ /dev/null @@ -1,287 +0,0 @@ -"use strict"; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var BottleneckError, LocalDatastore, parser; -parser = require("./parser"); -BottleneckError = require("./BottleneckError"); -LocalDatastore = class LocalDatastore { - constructor(instance, storeOptions, storeInstanceOptions) { - this.instance = instance; - this.storeOptions = storeOptions; - this.clientId = this.instance._randomIndex(); - parser.load(storeInstanceOptions, storeInstanceOptions, this); - this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now(); - this._running = 0; - this._done = 0; - this._unblockTime = 0; - this.ready = this.Promise.resolve(); - this.clients = {}; - - this._startHeartbeat(); - } - - _startHeartbeat() { - var base; - - if (this.heartbeat == null && (this.storeOptions.reservoirRefreshInterval != null && this.storeOptions.reservoirRefreshAmount != null || this.storeOptions.reservoirIncreaseInterval != null && this.storeOptions.reservoirIncreaseAmount != null)) { - return typeof (base = this.heartbeat = setInterval(() => { - var amount, incr, maximum, now, reservoir; - now = Date.now(); - - if (this.storeOptions.reservoirRefreshInterval != null && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) { - this._lastReservoirRefresh = now; - this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount; - - this.instance._drainAll(this.computeCapacity()); - } - - if (this.storeOptions.reservoirIncreaseInterval != null && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) { - var _this$storeOptions = this.storeOptions; - amount = _this$storeOptions.reservoirIncreaseAmount; - maximum = _this$storeOptions.reservoirIncreaseMaximum; - reservoir = _this$storeOptions.reservoir; - this._lastReservoirIncrease = now; - incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount; - - if (incr > 0) { - this.storeOptions.reservoir += incr; - return this.instance._drainAll(this.computeCapacity()); - } - } - }, this.heartbeatInterval)).unref === "function" ? base.unref() : void 0; - } else { - return clearInterval(this.heartbeat); - } - } - - __publish__(message) { - var _this = this; - - return _asyncToGenerator(function* () { - yield _this.yieldLoop(); - return _this.instance.Events.trigger("message", message.toString()); - })(); - } - - __disconnect__(flush) { - var _this2 = this; - - return _asyncToGenerator(function* () { - yield _this2.yieldLoop(); - clearInterval(_this2.heartbeat); - return _this2.Promise.resolve(); - })(); - } - - yieldLoop(t = 0) { - return new this.Promise(function (resolve, reject) { - return setTimeout(resolve, t); - }); - } - - computePenalty() { - var ref; - return (ref = this.storeOptions.penalty) != null ? ref : 15 * this.storeOptions.minTime || 5000; - } - - __updateSettings__(options) { - var _this3 = this; - - return _asyncToGenerator(function* () { - yield _this3.yieldLoop(); - parser.overwrite(options, options, _this3.storeOptions); - - _this3._startHeartbeat(); - - _this3.instance._drainAll(_this3.computeCapacity()); - - return true; - })(); - } - - __running__() { - var _this4 = this; - - return _asyncToGenerator(function* () { - yield _this4.yieldLoop(); - return _this4._running; - })(); - } - - __queued__() { - var _this5 = this; - - return _asyncToGenerator(function* () { - yield _this5.yieldLoop(); - return _this5.instance.queued(); - })(); - } - - __done__() { - var _this6 = this; - - return _asyncToGenerator(function* () { - yield _this6.yieldLoop(); - return _this6._done; - })(); - } - - __groupCheck__(time) { - var _this7 = this; - - return _asyncToGenerator(function* () { - yield _this7.yieldLoop(); - return _this7._nextRequest + _this7.timeout < time; - })(); - } - - computeCapacity() { - var maxConcurrent, reservoir; - var _this$storeOptions2 = this.storeOptions; - maxConcurrent = _this$storeOptions2.maxConcurrent; - reservoir = _this$storeOptions2.reservoir; - - if (maxConcurrent != null && reservoir != null) { - return Math.min(maxConcurrent - this._running, reservoir); - } else if (maxConcurrent != null) { - return maxConcurrent - this._running; - } else if (reservoir != null) { - return reservoir; - } else { - return null; - } - } - - conditionsCheck(weight) { - var capacity; - capacity = this.computeCapacity(); - return capacity == null || weight <= capacity; - } - - __incrementReservoir__(incr) { - var _this8 = this; - - return _asyncToGenerator(function* () { - var reservoir; - yield _this8.yieldLoop(); - reservoir = _this8.storeOptions.reservoir += incr; - - _this8.instance._drainAll(_this8.computeCapacity()); - - return reservoir; - })(); - } - - __currentReservoir__() { - var _this9 = this; - - return _asyncToGenerator(function* () { - yield _this9.yieldLoop(); - return _this9.storeOptions.reservoir; - })(); - } - - isBlocked(now) { - return this._unblockTime >= now; - } - - check(weight, now) { - return this.conditionsCheck(weight) && this._nextRequest - now <= 0; - } - - __check__(weight) { - var _this10 = this; - - return _asyncToGenerator(function* () { - var now; - yield _this10.yieldLoop(); - now = Date.now(); - return _this10.check(weight, now); - })(); - } - - __register__(index, weight, expiration) { - var _this11 = this; - - return _asyncToGenerator(function* () { - var now, wait; - yield _this11.yieldLoop(); - now = Date.now(); - - if (_this11.conditionsCheck(weight)) { - _this11._running += weight; - - if (_this11.storeOptions.reservoir != null) { - _this11.storeOptions.reservoir -= weight; - } - - wait = Math.max(_this11._nextRequest - now, 0); - _this11._nextRequest = now + wait + _this11.storeOptions.minTime; - return { - success: true, - wait, - reservoir: _this11.storeOptions.reservoir - }; - } else { - return { - success: false - }; - } - })(); - } - - strategyIsBlock() { - return this.storeOptions.strategy === 3; - } - - __submit__(queueLength, weight) { - var _this12 = this; - - return _asyncToGenerator(function* () { - var blocked, now, reachedHWM; - yield _this12.yieldLoop(); - - if (_this12.storeOptions.maxConcurrent != null && weight > _this12.storeOptions.maxConcurrent) { - throw new BottleneckError(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${_this12.storeOptions.maxConcurrent}`); - } - - now = Date.now(); - reachedHWM = _this12.storeOptions.highWater != null && queueLength === _this12.storeOptions.highWater && !_this12.check(weight, now); - blocked = _this12.strategyIsBlock() && (reachedHWM || _this12.isBlocked(now)); - - if (blocked) { - _this12._unblockTime = now + _this12.computePenalty(); - _this12._nextRequest = _this12._unblockTime + _this12.storeOptions.minTime; - - _this12.instance._dropAllQueued(); - } - - return { - reachedHWM, - blocked, - strategy: _this12.storeOptions.strategy - }; - })(); - } - - __free__(index, weight) { - var _this13 = this; - - return _asyncToGenerator(function* () { - yield _this13.yieldLoop(); - _this13._running -= weight; - _this13._done += weight; - - _this13.instance._drainAll(_this13.computeCapacity()); - - return { - running: _this13._running - }; - })(); - } - -}; -module.exports = LocalDatastore; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/Queues.js b/node_modules/bottleneck/lib/Queues.js deleted file mode 100644 index 1e4129ac0..000000000 --- a/node_modules/bottleneck/lib/Queues.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; - -var DLList, Events, Queues; -DLList = require("./DLList"); -Events = require("./Events"); -Queues = class Queues { - constructor(num_priorities) { - var i; - this.Events = new Events(this); - this._length = 0; - - this._lists = function () { - var j, ref, results; - results = []; - - for (i = j = 1, ref = num_priorities; 1 <= ref ? j <= ref : j >= ref; i = 1 <= ref ? ++j : --j) { - results.push(new DLList(() => { - return this.incr(); - }, () => { - return this.decr(); - })); - } - - return results; - }.call(this); - } - - incr() { - if (this._length++ === 0) { - return this.Events.trigger("leftzero"); - } - } - - decr() { - if (--this._length === 0) { - return this.Events.trigger("zero"); - } - } - - push(job) { - return this._lists[job.options.priority].push(job); - } - - queued(priority) { - if (priority != null) { - return this._lists[priority].length; - } else { - return this._length; - } - } - - shiftAll(fn) { - return this._lists.forEach(function (list) { - return list.forEachShift(fn); - }); - } - - getFirst(arr = this._lists) { - var j, len, list; - - for (j = 0, len = arr.length; j < len; j++) { - list = arr[j]; - - if (list.length > 0) { - return list; - } - } - - return []; - } - - shiftLastFrom(priority) { - return this.getFirst(this._lists.slice(priority).reverse()).shift(); - } - -}; -module.exports = Queues; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/RedisConnection.js b/node_modules/bottleneck/lib/RedisConnection.js deleted file mode 100644 index b110704ea..000000000 --- a/node_modules/bottleneck/lib/RedisConnection.js +++ /dev/null @@ -1,193 +0,0 @@ -"use strict"; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var Events, RedisConnection, Scripts, parser; -parser = require("./parser"); -Events = require("./Events"); -Scripts = require("./Scripts"); - -RedisConnection = function () { - class RedisConnection { - constructor(options = {}) { - parser.load(options, this.defaults, this); - - if (this.Redis == null) { - this.Redis = eval("require")("redis"); // Obfuscated or else Webpack/Angular will try to inline the optional redis module. To override this behavior: pass the redis module to Bottleneck as the 'Redis' option. - } - - if (this.Events == null) { - this.Events = new Events(this); - } - - this.terminated = false; - - if (this.client == null) { - this.client = this.Redis.createClient(this.clientOptions); - } - - this.subscriber = this.client.duplicate(); - this.limiters = {}; - this.shas = {}; - this.ready = this.Promise.all([this._setup(this.client, false), this._setup(this.subscriber, true)]).then(() => { - return this._loadScripts(); - }).then(() => { - return { - client: this.client, - subscriber: this.subscriber - }; - }); - } - - _setup(client, sub) { - client.setMaxListeners(0); - return new this.Promise((resolve, reject) => { - client.on("error", e => { - return this.Events.trigger("error", e); - }); - - if (sub) { - client.on("message", (channel, message) => { - var ref; - return (ref = this.limiters[channel]) != null ? ref._store.onMessage(channel, message) : void 0; - }); - } - - if (client.ready) { - return resolve(); - } else { - return client.once("ready", resolve); - } - }); - } - - _loadScript(name) { - return new this.Promise((resolve, reject) => { - var payload; - payload = Scripts.payload(name); - return this.client.multi([["script", "load", payload]]).exec((err, replies) => { - if (err != null) { - return reject(err); - } - - this.shas[name] = replies[0]; - return resolve(replies[0]); - }); - }); - } - - _loadScripts() { - return this.Promise.all(Scripts.names.map(k => { - return this._loadScript(k); - })); - } - - __runCommand__(cmd) { - var _this = this; - - return _asyncToGenerator(function* () { - yield _this.ready; - return new _this.Promise((resolve, reject) => { - return _this.client.multi([cmd]).exec_atomic(function (err, replies) { - if (err != null) { - return reject(err); - } else { - return resolve(replies[0]); - } - }); - }); - })(); - } - - __addLimiter__(instance) { - return this.Promise.all([instance.channel(), instance.channel_client()].map(channel => { - return new this.Promise((resolve, reject) => { - var handler; - - handler = chan => { - if (chan === channel) { - this.subscriber.removeListener("subscribe", handler); - this.limiters[channel] = instance; - return resolve(); - } - }; - - this.subscriber.on("subscribe", handler); - return this.subscriber.subscribe(channel); - }); - })); - } - - __removeLimiter__(instance) { - var _this2 = this; - - return this.Promise.all([instance.channel(), instance.channel_client()].map( - /*#__PURE__*/ - function () { - var _ref = _asyncToGenerator(function* (channel) { - if (!_this2.terminated) { - yield new _this2.Promise((resolve, reject) => { - return _this2.subscriber.unsubscribe(channel, function (err, chan) { - if (err != null) { - return reject(err); - } - - if (chan === channel) { - return resolve(); - } - }); - }); - } - - return delete _this2.limiters[channel]; - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - }())); - } - - __scriptArgs__(name, id, args, cb) { - var keys; - keys = Scripts.keys(name, id); - return [this.shas[name], keys.length].concat(keys, args, cb); - } - - __scriptFn__(name) { - return this.client.evalsha.bind(this.client); - } - - disconnect(flush = true) { - var i, k, len, ref; - ref = Object.keys(this.limiters); - - for (i = 0, len = ref.length; i < len; i++) { - k = ref[i]; - clearInterval(this.limiters[k]._store.heartbeat); - } - - this.limiters = {}; - this.terminated = true; - this.client.end(flush); - this.subscriber.end(flush); - return this.Promise.resolve(); - } - - } - - ; - RedisConnection.prototype.datastore = "redis"; - RedisConnection.prototype.defaults = { - Redis: null, - clientOptions: {}, - client: null, - Promise: Promise, - Events: null - }; - return RedisConnection; -}.call(void 0); - -module.exports = RedisConnection; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/RedisDatastore.js b/node_modules/bottleneck/lib/RedisDatastore.js deleted file mode 100644 index dc5943e8a..000000000 --- a/node_modules/bottleneck/lib/RedisDatastore.js +++ /dev/null @@ -1,352 +0,0 @@ -"use strict"; - -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } - -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } - -function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var BottleneckError, IORedisConnection, RedisConnection, RedisDatastore, parser; -parser = require("./parser"); -BottleneckError = require("./BottleneckError"); -RedisConnection = require("./RedisConnection"); -IORedisConnection = require("./IORedisConnection"); -RedisDatastore = class RedisDatastore { - constructor(instance, storeOptions, storeInstanceOptions) { - this.instance = instance; - this.storeOptions = storeOptions; - this.originalId = this.instance.id; - this.clientId = this.instance._randomIndex(); - parser.load(storeInstanceOptions, storeInstanceOptions, this); - this.clients = {}; - this.capacityPriorityCounters = {}; - this.sharedConnection = this.connection != null; - - if (this.connection == null) { - this.connection = this.instance.datastore === "redis" ? new RedisConnection({ - Redis: this.Redis, - clientOptions: this.clientOptions, - Promise: this.Promise, - Events: this.instance.Events - }) : this.instance.datastore === "ioredis" ? new IORedisConnection({ - Redis: this.Redis, - clientOptions: this.clientOptions, - clusterNodes: this.clusterNodes, - Promise: this.Promise, - Events: this.instance.Events - }) : void 0; - } - - this.instance.connection = this.connection; - this.instance.datastore = this.connection.datastore; - this.ready = this.connection.ready.then(clients => { - this.clients = clients; - return this.runScript("init", this.prepareInitSettings(this.clearDatastore)); - }).then(() => { - return this.connection.__addLimiter__(this.instance); - }).then(() => { - return this.runScript("register_client", [this.instance.queued()]); - }).then(() => { - var base; - - if (typeof (base = this.heartbeat = setInterval(() => { - return this.runScript("heartbeat", []).catch(e => { - return this.instance.Events.trigger("error", e); - }); - }, this.heartbeatInterval)).unref === "function") { - base.unref(); - } - - return this.clients; - }); - } - - __publish__(message) { - var _this = this; - - return _asyncToGenerator(function* () { - var client; - - var _ref = yield _this.ready; - - client = _ref.client; - return client.publish(_this.instance.channel(), `message:${message.toString()}`); - })(); - } - - onMessage(channel, message) { - var _this2 = this; - - return _asyncToGenerator(function* () { - var capacity, counter, data, drained, e, newCapacity, pos, priorityClient, rawCapacity, type; - - try { - pos = message.indexOf(":"); - var _ref2 = [message.slice(0, pos), message.slice(pos + 1)]; - type = _ref2[0]; - data = _ref2[1]; - - if (type === "capacity") { - return yield _this2.instance._drainAll(data.length > 0 ? ~~data : void 0); - } else if (type === "capacity-priority") { - var _data$split = data.split(":"); - - var _data$split2 = _slicedToArray(_data$split, 3); - - rawCapacity = _data$split2[0]; - priorityClient = _data$split2[1]; - counter = _data$split2[2]; - capacity = rawCapacity.length > 0 ? ~~rawCapacity : void 0; - - if (priorityClient === _this2.clientId) { - drained = yield _this2.instance._drainAll(capacity); - newCapacity = capacity != null ? capacity - (drained || 0) : ""; - return yield _this2.clients.client.publish(_this2.instance.channel(), `capacity-priority:${newCapacity}::${counter}`); - } else if (priorityClient === "") { - clearTimeout(_this2.capacityPriorityCounters[counter]); - delete _this2.capacityPriorityCounters[counter]; - return _this2.instance._drainAll(capacity); - } else { - return _this2.capacityPriorityCounters[counter] = setTimeout( - /*#__PURE__*/ - _asyncToGenerator(function* () { - var e; - - try { - delete _this2.capacityPriorityCounters[counter]; - yield _this2.runScript("blacklist_client", [priorityClient]); - return yield _this2.instance._drainAll(capacity); - } catch (error) { - e = error; - return _this2.instance.Events.trigger("error", e); - } - }), 1000); - } - } else if (type === "message") { - return _this2.instance.Events.trigger("message", data); - } else if (type === "blocked") { - return yield _this2.instance._dropAllQueued(); - } - } catch (error) { - e = error; - return _this2.instance.Events.trigger("error", e); - } - })(); - } - - __disconnect__(flush) { - clearInterval(this.heartbeat); - - if (this.sharedConnection) { - return this.connection.__removeLimiter__(this.instance); - } else { - return this.connection.disconnect(flush); - } - } - - runScript(name, args) { - var _this3 = this; - - return _asyncToGenerator(function* () { - if (!(name === "init" || name === "register_client")) { - yield _this3.ready; - } - - return new _this3.Promise((resolve, reject) => { - var all_args, arr; - all_args = [Date.now(), _this3.clientId].concat(args); - - _this3.instance.Events.trigger("debug", `Calling Redis script: ${name}.lua`, all_args); - - arr = _this3.connection.__scriptArgs__(name, _this3.originalId, all_args, function (err, replies) { - if (err != null) { - return reject(err); - } - - return resolve(replies); - }); - return _this3.connection.__scriptFn__(name)(...arr); - }).catch(e => { - if (e.message === "SETTINGS_KEY_NOT_FOUND") { - if (name === "heartbeat") { - return _this3.Promise.resolve(); - } else { - return _this3.runScript("init", _this3.prepareInitSettings(false)).then(() => { - return _this3.runScript(name, args); - }); - } - } else if (e.message === "UNKNOWN_CLIENT") { - return _this3.runScript("register_client", [_this3.instance.queued()]).then(() => { - return _this3.runScript(name, args); - }); - } else { - return _this3.Promise.reject(e); - } - }); - })(); - } - - prepareArray(arr) { - var i, len, results, x; - results = []; - - for (i = 0, len = arr.length; i < len; i++) { - x = arr[i]; - results.push(x != null ? x.toString() : ""); - } - - return results; - } - - prepareObject(obj) { - var arr, k, v; - arr = []; - - for (k in obj) { - v = obj[k]; - arr.push(k, v != null ? v.toString() : ""); - } - - return arr; - } - - prepareInitSettings(clear) { - var args; - args = this.prepareObject(Object.assign({}, this.storeOptions, { - id: this.originalId, - version: this.instance.version, - groupTimeout: this.timeout, - clientTimeout: this.clientTimeout - })); - args.unshift(clear ? 1 : 0, this.instance.version); - return args; - } - - convertBool(b) { - return !!b; - } - - __updateSettings__(options) { - var _this4 = this; - - return _asyncToGenerator(function* () { - yield _this4.runScript("update_settings", _this4.prepareObject(options)); - return parser.overwrite(options, options, _this4.storeOptions); - })(); - } - - __running__() { - return this.runScript("running", []); - } - - __queued__() { - return this.runScript("queued", []); - } - - __done__() { - return this.runScript("done", []); - } - - __groupCheck__() { - var _this5 = this; - - return _asyncToGenerator(function* () { - return _this5.convertBool((yield _this5.runScript("group_check", []))); - })(); - } - - __incrementReservoir__(incr) { - return this.runScript("increment_reservoir", [incr]); - } - - __currentReservoir__() { - return this.runScript("current_reservoir", []); - } - - __check__(weight) { - var _this6 = this; - - return _asyncToGenerator(function* () { - return _this6.convertBool((yield _this6.runScript("check", _this6.prepareArray([weight])))); - })(); - } - - __register__(index, weight, expiration) { - var _this7 = this; - - return _asyncToGenerator(function* () { - var reservoir, success, wait; - - var _ref4 = yield _this7.runScript("register", _this7.prepareArray([index, weight, expiration])); - - var _ref5 = _slicedToArray(_ref4, 3); - - success = _ref5[0]; - wait = _ref5[1]; - reservoir = _ref5[2]; - return { - success: _this7.convertBool(success), - wait, - reservoir - }; - })(); - } - - __submit__(queueLength, weight) { - var _this8 = this; - - return _asyncToGenerator(function* () { - var blocked, e, maxConcurrent, overweight, reachedHWM, strategy; - - try { - var _ref6 = yield _this8.runScript("submit", _this8.prepareArray([queueLength, weight])); - - var _ref7 = _slicedToArray(_ref6, 3); - - reachedHWM = _ref7[0]; - blocked = _ref7[1]; - strategy = _ref7[2]; - return { - reachedHWM: _this8.convertBool(reachedHWM), - blocked: _this8.convertBool(blocked), - strategy - }; - } catch (error) { - e = error; - - if (e.message.indexOf("OVERWEIGHT") === 0) { - var _e$message$split = e.message.split(":"); - - var _e$message$split2 = _slicedToArray(_e$message$split, 3); - - overweight = _e$message$split2[0]; - weight = _e$message$split2[1]; - maxConcurrent = _e$message$split2[2]; - throw new BottleneckError(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${maxConcurrent}`); - } else { - throw e; - } - } - })(); - } - - __free__(index, weight) { - var _this9 = this; - - return _asyncToGenerator(function* () { - var running; - running = yield _this9.runScript("free", _this9.prepareArray([index])); - return { - running - }; - })(); - } - -}; -module.exports = RedisDatastore; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/Scripts.js b/node_modules/bottleneck/lib/Scripts.js deleted file mode 100644 index 96467eb1e..000000000 --- a/node_modules/bottleneck/lib/Scripts.js +++ /dev/null @@ -1,162 +0,0 @@ -"use strict"; - -var headers, lua, templates; -lua = require("./lua.json"); -headers = { - refs: lua["refs.lua"], - validate_keys: lua["validate_keys.lua"], - validate_client: lua["validate_client.lua"], - refresh_expiration: lua["refresh_expiration.lua"], - process_tick: lua["process_tick.lua"], - conditions_check: lua["conditions_check.lua"], - get_time: lua["get_time.lua"] -}; - -exports.allKeys = function (id) { - return [ - /* - HASH - */ - `b_${id}_settings`, - /* - HASH - job index -> weight - */ - `b_${id}_job_weights`, - /* - ZSET - job index -> expiration - */ - `b_${id}_job_expirations`, - /* - HASH - job index -> client - */ - `b_${id}_job_clients`, - /* - ZSET - client -> sum running - */ - `b_${id}_client_running`, - /* - HASH - client -> num queued - */ - `b_${id}_client_num_queued`, - /* - ZSET - client -> last job registered - */ - `b_${id}_client_last_registered`, - /* - ZSET - client -> last seen - */ - `b_${id}_client_last_seen`]; -}; - -templates = { - init: { - keys: exports.allKeys, - headers: ["process_tick"], - refresh_expiration: true, - code: lua["init.lua"] - }, - group_check: { - keys: exports.allKeys, - headers: [], - refresh_expiration: false, - code: lua["group_check.lua"] - }, - register_client: { - keys: exports.allKeys, - headers: ["validate_keys"], - refresh_expiration: false, - code: lua["register_client.lua"] - }, - blacklist_client: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client"], - refresh_expiration: false, - code: lua["blacklist_client.lua"] - }, - heartbeat: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["heartbeat.lua"] - }, - update_settings: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: true, - code: lua["update_settings.lua"] - }, - running: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["running.lua"] - }, - queued: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client"], - refresh_expiration: false, - code: lua["queued.lua"] - }, - done: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["done.lua"] - }, - check: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], - refresh_expiration: false, - code: lua["check.lua"] - }, - submit: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], - refresh_expiration: true, - code: lua["submit.lua"] - }, - register: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], - refresh_expiration: true, - code: lua["register.lua"] - }, - free: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: true, - code: lua["free.lua"] - }, - current_reservoir: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["current_reservoir.lua"] - }, - increment_reservoir: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: true, - code: lua["increment_reservoir.lua"] - } -}; -exports.names = Object.keys(templates); - -exports.keys = function (name, id) { - return templates[name].keys(id); -}; - -exports.payload = function (name) { - var template; - template = templates[name]; - return Array.prototype.concat(headers.refs, template.headers.map(function (h) { - return headers[h]; - }), template.refresh_expiration ? headers.refresh_expiration : "", template.code).join("\n"); -}; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/States.js b/node_modules/bottleneck/lib/States.js deleted file mode 100644 index 9b8ac1422..000000000 --- a/node_modules/bottleneck/lib/States.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; - -var BottleneckError, States; -BottleneckError = require("./BottleneckError"); -States = class States { - constructor(status1) { - this.status = status1; - this._jobs = {}; - this.counts = this.status.map(function () { - return 0; - }); - } - - next(id) { - var current, next; - current = this._jobs[id]; - next = current + 1; - - if (current != null && next < this.status.length) { - this.counts[current]--; - this.counts[next]++; - return this._jobs[id]++; - } else if (current != null) { - this.counts[current]--; - return delete this._jobs[id]; - } - } - - start(id) { - var initial; - initial = 0; - this._jobs[id] = initial; - return this.counts[initial]++; - } - - remove(id) { - var current; - current = this._jobs[id]; - - if (current != null) { - this.counts[current]--; - delete this._jobs[id]; - } - - return current != null; - } - - jobStatus(id) { - var ref; - return (ref = this.status[this._jobs[id]]) != null ? ref : null; - } - - statusJobs(status) { - var k, pos, ref, results, v; - - if (status != null) { - pos = this.status.indexOf(status); - - if (pos < 0) { - throw new BottleneckError(`status must be one of ${this.status.join(', ')}`); - } - - ref = this._jobs; - results = []; - - for (k in ref) { - v = ref[k]; - - if (v === pos) { - results.push(k); - } - } - - return results; - } else { - return Object.keys(this._jobs); - } - } - - statusCounts() { - return this.counts.reduce((acc, v, i) => { - acc[this.status[i]] = v; - return acc; - }, {}); - } - -}; -module.exports = States; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/Sync.js b/node_modules/bottleneck/lib/Sync.js deleted file mode 100644 index f51eee4a0..000000000 --- a/node_modules/bottleneck/lib/Sync.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var DLList, Sync; -DLList = require("./DLList"); -Sync = class Sync { - constructor(name, Promise) { - this.schedule = this.schedule.bind(this); - this.name = name; - this.Promise = Promise; - this._running = 0; - this._queue = new DLList(); - } - - isEmpty() { - return this._queue.length === 0; - } - - _tryToRun() { - var _this = this; - - return _asyncToGenerator(function* () { - var args, cb, error, reject, resolve, returned, task; - - if (_this._running < 1 && _this._queue.length > 0) { - _this._running++; - - var _this$_queue$shift = _this._queue.shift(); - - task = _this$_queue$shift.task; - args = _this$_queue$shift.args; - resolve = _this$_queue$shift.resolve; - reject = _this$_queue$shift.reject; - cb = yield _asyncToGenerator(function* () { - try { - returned = yield task(...args); - return function () { - return resolve(returned); - }; - } catch (error1) { - error = error1; - return function () { - return reject(error); - }; - } - })(); - _this._running--; - - _this._tryToRun(); - - return cb(); - } - })(); - } - - schedule(task, ...args) { - var promise, reject, resolve; - resolve = reject = null; - promise = new this.Promise(function (_resolve, _reject) { - resolve = _resolve; - return reject = _reject; - }); - - this._queue.push({ - task, - args, - resolve, - reject - }); - - this._tryToRun(); - - return promise; - } - -}; -module.exports = Sync; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/es5.js b/node_modules/bottleneck/lib/es5.js deleted file mode 100644 index 822a26d8c..000000000 --- a/node_modules/bottleneck/lib/es5.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -require("regenerator-runtime/runtime"); - -module.exports = require("./Bottleneck"); \ No newline at end of file diff --git a/node_modules/bottleneck/lib/index.js b/node_modules/bottleneck/lib/index.js deleted file mode 100644 index 3d447c13b..000000000 --- a/node_modules/bottleneck/lib/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./Bottleneck"); \ No newline at end of file diff --git a/node_modules/bottleneck/lib/lua.json b/node_modules/bottleneck/lib/lua.json deleted file mode 100644 index c17cc4990..000000000 --- a/node_modules/bottleneck/lib/lua.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "blacklist_client.lua": "local blacklist = ARGV[num_static_argv + 1]\n\nif redis.call('zscore', client_last_seen_key, blacklist) then\n redis.call('zadd', client_last_seen_key, 0, blacklist)\nend\n\n\nreturn {}\n", - "check.lua": "local weight = tonumber(ARGV[num_static_argv + 1])\n\nlocal capacity = process_tick(now, false)['capacity']\nlocal nextRequest = tonumber(redis.call('hget', settings_key, 'nextRequest'))\n\nreturn conditions_check(capacity, weight) and nextRequest - now <= 0\n", - "conditions_check.lua": "local conditions_check = function (capacity, weight)\n return capacity == nil or weight <= capacity\nend\n", - "current_reservoir.lua": "return process_tick(now, false)['reservoir']\n", - "done.lua": "process_tick(now, false)\n\nreturn tonumber(redis.call('hget', settings_key, 'done'))\n", - "free.lua": "local index = ARGV[num_static_argv + 1]\n\nredis.call('zadd', job_expirations_key, 0, index)\n\nreturn process_tick(now, false)['running']\n", - "get_time.lua": "redis.replicate_commands()\n\nlocal get_time = function ()\n local time = redis.call('time')\n\n return tonumber(time[1]..string.sub(time[2], 1, 3))\nend\n", - "group_check.lua": "return not (redis.call('exists', settings_key) == 1)\n", - "heartbeat.lua": "process_tick(now, true)\n", - "increment_reservoir.lua": "local incr = tonumber(ARGV[num_static_argv + 1])\n\nredis.call('hincrby', settings_key, 'reservoir', incr)\n\nlocal reservoir = process_tick(now, true)['reservoir']\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn reservoir\n", - "init.lua": "local clear = tonumber(ARGV[num_static_argv + 1])\nlocal limiter_version = ARGV[num_static_argv + 2]\nlocal num_local_argv = num_static_argv + 2\n\nif clear == 1 then\n redis.call('del', unpack(KEYS))\nend\n\nif redis.call('exists', settings_key) == 0 then\n -- Create\n local args = {'hmset', settings_key}\n\n for i = num_local_argv + 1, #ARGV do\n table.insert(args, ARGV[i])\n end\n\n redis.call(unpack(args))\n redis.call('hmset', settings_key,\n 'nextRequest', now,\n 'lastReservoirRefresh', now,\n 'lastReservoirIncrease', now,\n 'running', 0,\n 'done', 0,\n 'unblockTime', 0,\n 'capacityPriorityCounter', 0\n )\n\nelse\n -- Apply migrations\n local settings = redis.call('hmget', settings_key,\n 'id',\n 'version'\n )\n local id = settings[1]\n local current_version = settings[2]\n\n if current_version ~= limiter_version then\n local version_digits = {}\n for k, v in string.gmatch(current_version, \"([^.]+)\") do\n table.insert(version_digits, tonumber(k))\n end\n\n -- 2.10.0\n if version_digits[2] < 10 then\n redis.call('hsetnx', settings_key, 'reservoirRefreshInterval', '')\n redis.call('hsetnx', settings_key, 'reservoirRefreshAmount', '')\n redis.call('hsetnx', settings_key, 'lastReservoirRefresh', '')\n redis.call('hsetnx', settings_key, 'done', 0)\n redis.call('hset', settings_key, 'version', '2.10.0')\n end\n\n -- 2.11.1\n if version_digits[2] < 11 or (version_digits[2] == 11 and version_digits[3] < 1) then\n if redis.call('hstrlen', settings_key, 'lastReservoirRefresh') == 0 then\n redis.call('hmset', settings_key,\n 'lastReservoirRefresh', now,\n 'version', '2.11.1'\n )\n end\n end\n\n -- 2.14.0\n if version_digits[2] < 14 then\n local old_running_key = 'b_'..id..'_running'\n local old_executing_key = 'b_'..id..'_executing'\n\n if redis.call('exists', old_running_key) == 1 then\n redis.call('rename', old_running_key, job_weights_key)\n end\n if redis.call('exists', old_executing_key) == 1 then\n redis.call('rename', old_executing_key, job_expirations_key)\n end\n redis.call('hset', settings_key, 'version', '2.14.0')\n end\n\n -- 2.15.2\n if version_digits[2] < 15 or (version_digits[2] == 15 and version_digits[3] < 2) then\n redis.call('hsetnx', settings_key, 'capacityPriorityCounter', 0)\n redis.call('hset', settings_key, 'version', '2.15.2')\n end\n\n -- 2.17.0\n if version_digits[2] < 17 then\n redis.call('hsetnx', settings_key, 'clientTimeout', 10000)\n redis.call('hset', settings_key, 'version', '2.17.0')\n end\n\n -- 2.18.0\n if version_digits[2] < 18 then\n redis.call('hsetnx', settings_key, 'reservoirIncreaseInterval', '')\n redis.call('hsetnx', settings_key, 'reservoirIncreaseAmount', '')\n redis.call('hsetnx', settings_key, 'reservoirIncreaseMaximum', '')\n redis.call('hsetnx', settings_key, 'lastReservoirIncrease', now)\n redis.call('hset', settings_key, 'version', '2.18.0')\n end\n\n end\n\n process_tick(now, false)\nend\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn {}\n", - "process_tick.lua": "local process_tick = function (now, always_publish)\n\n local compute_capacity = function (maxConcurrent, running, reservoir)\n if maxConcurrent ~= nil and reservoir ~= nil then\n return math.min((maxConcurrent - running), reservoir)\n elseif maxConcurrent ~= nil then\n return maxConcurrent - running\n elseif reservoir ~= nil then\n return reservoir\n else\n return nil\n end\n end\n\n local settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'running',\n 'reservoir',\n 'reservoirRefreshInterval',\n 'reservoirRefreshAmount',\n 'lastReservoirRefresh',\n 'reservoirIncreaseInterval',\n 'reservoirIncreaseAmount',\n 'reservoirIncreaseMaximum',\n 'lastReservoirIncrease',\n 'capacityPriorityCounter',\n 'clientTimeout'\n )\n local id = settings[1]\n local maxConcurrent = tonumber(settings[2])\n local running = tonumber(settings[3])\n local reservoir = tonumber(settings[4])\n local reservoirRefreshInterval = tonumber(settings[5])\n local reservoirRefreshAmount = tonumber(settings[6])\n local lastReservoirRefresh = tonumber(settings[7])\n local reservoirIncreaseInterval = tonumber(settings[8])\n local reservoirIncreaseAmount = tonumber(settings[9])\n local reservoirIncreaseMaximum = tonumber(settings[10])\n local lastReservoirIncrease = tonumber(settings[11])\n local capacityPriorityCounter = tonumber(settings[12])\n local clientTimeout = tonumber(settings[13])\n\n local initial_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n --\n -- Process 'running' changes\n --\n local expired = redis.call('zrangebyscore', job_expirations_key, '-inf', '('..now)\n\n if #expired > 0 then\n redis.call('zremrangebyscore', job_expirations_key, '-inf', '('..now)\n\n local flush_batch = function (batch, acc)\n local weights = redis.call('hmget', job_weights_key, unpack(batch))\n redis.call('hdel', job_weights_key, unpack(batch))\n local clients = redis.call('hmget', job_clients_key, unpack(batch))\n redis.call('hdel', job_clients_key, unpack(batch))\n\n -- Calculate sum of removed weights\n for i = 1, #weights do\n acc['total'] = acc['total'] + (tonumber(weights[i]) or 0)\n end\n\n -- Calculate sum of removed weights by client\n local client_weights = {}\n for i = 1, #clients do\n local removed = tonumber(weights[i]) or 0\n if removed > 0 then\n acc['client_weights'][clients[i]] = (acc['client_weights'][clients[i]] or 0) + removed\n end\n end\n end\n\n local acc = {\n ['total'] = 0,\n ['client_weights'] = {}\n }\n local batch_size = 1000\n\n -- Compute changes to Zsets and apply changes to Hashes\n for i = 1, #expired, batch_size do\n local batch = {}\n for j = i, math.min(i + batch_size - 1, #expired) do\n table.insert(batch, expired[j])\n end\n\n flush_batch(batch, acc)\n end\n\n -- Apply changes to Zsets\n if acc['total'] > 0 then\n redis.call('hincrby', settings_key, 'done', acc['total'])\n running = tonumber(redis.call('hincrby', settings_key, 'running', -acc['total']))\n end\n\n for client, weight in pairs(acc['client_weights']) do\n redis.call('zincrby', client_running_key, -weight, client)\n end\n end\n\n --\n -- Process 'reservoir' changes\n --\n local reservoirRefreshActive = reservoirRefreshInterval ~= nil and reservoirRefreshAmount ~= nil\n if reservoirRefreshActive and now >= lastReservoirRefresh + reservoirRefreshInterval then\n reservoir = reservoirRefreshAmount\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirRefresh', now\n )\n end\n\n local reservoirIncreaseActive = reservoirIncreaseInterval ~= nil and reservoirIncreaseAmount ~= nil\n if reservoirIncreaseActive and now >= lastReservoirIncrease + reservoirIncreaseInterval then\n local num_intervals = math.floor((now - lastReservoirIncrease) / reservoirIncreaseInterval)\n local incr = reservoirIncreaseAmount * num_intervals\n if reservoirIncreaseMaximum ~= nil then\n incr = math.min(incr, reservoirIncreaseMaximum - (reservoir or 0))\n end\n if incr > 0 then\n reservoir = (reservoir or 0) + incr\n end\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirIncrease', lastReservoirIncrease + (num_intervals * reservoirIncreaseInterval)\n )\n end\n\n --\n -- Clear unresponsive clients\n --\n local unresponsive = redis.call('zrangebyscore', client_last_seen_key, '-inf', (now - clientTimeout))\n local unresponsive_lookup = {}\n local terminated_clients = {}\n for i = 1, #unresponsive do\n unresponsive_lookup[unresponsive[i]] = true\n if tonumber(redis.call('zscore', client_running_key, unresponsive[i])) == 0 then\n table.insert(terminated_clients, unresponsive[i])\n end\n end\n if #terminated_clients > 0 then\n redis.call('zrem', client_running_key, unpack(terminated_clients))\n redis.call('hdel', client_num_queued_key, unpack(terminated_clients))\n redis.call('zrem', client_last_registered_key, unpack(terminated_clients))\n redis.call('zrem', client_last_seen_key, unpack(terminated_clients))\n end\n\n --\n -- Broadcast capacity changes\n --\n local final_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n if always_publish or (initial_capacity ~= nil and final_capacity == nil) then\n -- always_publish or was not unlimited, now unlimited\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n\n elseif initial_capacity ~= nil and final_capacity ~= nil and final_capacity > initial_capacity then\n -- capacity was increased\n -- send the capacity message to the limiter having the lowest number of running jobs\n -- the tiebreaker is the limiter having not registered a job in the longest time\n\n local lowest_concurrency_value = nil\n local lowest_concurrency_clients = {}\n local lowest_concurrency_last_registered = {}\n local client_concurrencies = redis.call('zrange', client_running_key, 0, -1, 'withscores')\n\n for i = 1, #client_concurrencies, 2 do\n local client = client_concurrencies[i]\n local concurrency = tonumber(client_concurrencies[i+1])\n\n if (\n lowest_concurrency_value == nil or lowest_concurrency_value == concurrency\n ) and (\n not unresponsive_lookup[client]\n ) and (\n tonumber(redis.call('hget', client_num_queued_key, client)) > 0\n ) then\n lowest_concurrency_value = concurrency\n table.insert(lowest_concurrency_clients, client)\n local last_registered = tonumber(redis.call('zscore', client_last_registered_key, client))\n table.insert(lowest_concurrency_last_registered, last_registered)\n end\n end\n\n if #lowest_concurrency_clients > 0 then\n local position = 1\n local earliest = lowest_concurrency_last_registered[1]\n\n for i,v in ipairs(lowest_concurrency_last_registered) do\n if v < earliest then\n position = i\n earliest = v\n end\n end\n\n local next_client = lowest_concurrency_clients[position]\n redis.call('publish', 'b_'..id,\n 'capacity-priority:'..(final_capacity or '')..\n ':'..next_client..\n ':'..capacityPriorityCounter\n )\n redis.call('hincrby', settings_key, 'capacityPriorityCounter', '1')\n else\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n end\n end\n\n return {\n ['capacity'] = final_capacity,\n ['running'] = running,\n ['reservoir'] = reservoir\n }\nend\n", - "queued.lua": "local clientTimeout = tonumber(redis.call('hget', settings_key, 'clientTimeout'))\nlocal valid_clients = redis.call('zrangebyscore', client_last_seen_key, (now - clientTimeout), 'inf')\nlocal client_queued = redis.call('hmget', client_num_queued_key, unpack(valid_clients))\n\nlocal sum = 0\nfor i = 1, #client_queued do\n sum = sum + tonumber(client_queued[i])\nend\n\nreturn sum\n", - "refresh_expiration.lua": "local refresh_expiration = function (now, nextRequest, groupTimeout)\n\n if groupTimeout ~= nil then\n local ttl = (nextRequest + groupTimeout) - now\n\n for i = 1, #KEYS do\n redis.call('pexpire', KEYS[i], ttl)\n end\n end\n\nend\n", - "refs.lua": "local settings_key = KEYS[1]\nlocal job_weights_key = KEYS[2]\nlocal job_expirations_key = KEYS[3]\nlocal job_clients_key = KEYS[4]\nlocal client_running_key = KEYS[5]\nlocal client_num_queued_key = KEYS[6]\nlocal client_last_registered_key = KEYS[7]\nlocal client_last_seen_key = KEYS[8]\n\nlocal now = tonumber(ARGV[1])\nlocal client = ARGV[2]\n\nlocal num_static_argv = 2\n", - "register.lua": "local index = ARGV[num_static_argv + 1]\nlocal weight = tonumber(ARGV[num_static_argv + 2])\nlocal expiration = tonumber(ARGV[num_static_argv + 3])\n\nlocal state = process_tick(now, false)\nlocal capacity = state['capacity']\nlocal reservoir = state['reservoir']\n\nlocal settings = redis.call('hmget', settings_key,\n 'nextRequest',\n 'minTime',\n 'groupTimeout'\n)\nlocal nextRequest = tonumber(settings[1])\nlocal minTime = tonumber(settings[2])\nlocal groupTimeout = tonumber(settings[3])\n\nif conditions_check(capacity, weight) then\n\n redis.call('hincrby', settings_key, 'running', weight)\n redis.call('hset', job_weights_key, index, weight)\n if expiration ~= nil then\n redis.call('zadd', job_expirations_key, now + expiration, index)\n end\n redis.call('hset', job_clients_key, index, client)\n redis.call('zincrby', client_running_key, weight, client)\n redis.call('hincrby', client_num_queued_key, client, -1)\n redis.call('zadd', client_last_registered_key, now, client)\n\n local wait = math.max(nextRequest - now, 0)\n local newNextRequest = now + wait + minTime\n\n if reservoir == nil then\n redis.call('hset', settings_key,\n 'nextRequest', newNextRequest\n )\n else\n reservoir = reservoir - weight\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'nextRequest', newNextRequest\n )\n end\n\n refresh_expiration(now, newNextRequest, groupTimeout)\n\n return {true, wait, reservoir}\n\nelse\n return {false}\nend\n", - "register_client.lua": "local queued = tonumber(ARGV[num_static_argv + 1])\n\n-- Could have been re-registered concurrently\nif not redis.call('zscore', client_last_seen_key, client) then\n redis.call('zadd', client_running_key, 0, client)\n redis.call('hset', client_num_queued_key, client, queued)\n redis.call('zadd', client_last_registered_key, 0, client)\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n\nreturn {}\n", - "running.lua": "return process_tick(now, false)['running']\n", - "submit.lua": "local queueLength = tonumber(ARGV[num_static_argv + 1])\nlocal weight = tonumber(ARGV[num_static_argv + 2])\n\nlocal capacity = process_tick(now, false)['capacity']\n\nlocal settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'highWater',\n 'nextRequest',\n 'strategy',\n 'unblockTime',\n 'penalty',\n 'minTime',\n 'groupTimeout'\n)\nlocal id = settings[1]\nlocal maxConcurrent = tonumber(settings[2])\nlocal highWater = tonumber(settings[3])\nlocal nextRequest = tonumber(settings[4])\nlocal strategy = tonumber(settings[5])\nlocal unblockTime = tonumber(settings[6])\nlocal penalty = tonumber(settings[7])\nlocal minTime = tonumber(settings[8])\nlocal groupTimeout = tonumber(settings[9])\n\nif maxConcurrent ~= nil and weight > maxConcurrent then\n return redis.error_reply('OVERWEIGHT:'..weight..':'..maxConcurrent)\nend\n\nlocal reachedHWM = (highWater ~= nil and queueLength == highWater\n and not (\n conditions_check(capacity, weight)\n and nextRequest - now <= 0\n )\n)\n\nlocal blocked = strategy == 3 and (reachedHWM or unblockTime >= now)\n\nif blocked then\n local computedPenalty = penalty\n if computedPenalty == nil then\n if minTime == 0 then\n computedPenalty = 5000\n else\n computedPenalty = 15 * minTime\n end\n end\n\n local newNextRequest = now + computedPenalty + minTime\n\n redis.call('hmset', settings_key,\n 'unblockTime', now + computedPenalty,\n 'nextRequest', newNextRequest\n )\n\n local clients_queued_reset = redis.call('hkeys', client_num_queued_key)\n local queued_reset = {}\n for i = 1, #clients_queued_reset do\n table.insert(queued_reset, clients_queued_reset[i])\n table.insert(queued_reset, 0)\n end\n redis.call('hmset', client_num_queued_key, unpack(queued_reset))\n\n redis.call('publish', 'b_'..id, 'blocked:')\n\n refresh_expiration(now, newNextRequest, groupTimeout)\nend\n\nif not blocked and not reachedHWM then\n redis.call('hincrby', client_num_queued_key, client, 1)\nend\n\nreturn {reachedHWM, blocked, strategy}\n", - "update_settings.lua": "local args = {'hmset', settings_key}\n\nfor i = num_static_argv + 1, #ARGV do\n table.insert(args, ARGV[i])\nend\n\nredis.call(unpack(args))\n\nprocess_tick(now, true)\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn {}\n", - "validate_client.lua": "if not redis.call('zscore', client_last_seen_key, client) then\n return redis.error_reply('UNKNOWN_CLIENT')\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n", - "validate_keys.lua": "if not (redis.call('exists', settings_key) == 1) then\n return redis.error_reply('SETTINGS_KEY_NOT_FOUND')\nend\n" -} diff --git a/node_modules/bottleneck/lib/parser.js b/node_modules/bottleneck/lib/parser.js deleted file mode 100644 index 8686191f0..000000000 --- a/node_modules/bottleneck/lib/parser.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -exports.load = function (received, defaults, onto = {}) { - var k, ref, v; - - for (k in defaults) { - v = defaults[k]; - onto[k] = (ref = received[k]) != null ? ref : v; - } - - return onto; -}; - -exports.overwrite = function (received, defaults, onto = {}) { - var k, v; - - for (k in received) { - v = received[k]; - - if (defaults[k] !== void 0) { - onto[k] = v; - } - } - - return onto; -}; \ No newline at end of file diff --git a/node_modules/bottleneck/lib/version.json b/node_modules/bottleneck/lib/version.json deleted file mode 100644 index 578a219cf..000000000 --- a/node_modules/bottleneck/lib/version.json +++ /dev/null @@ -1 +0,0 @@ -{"version":"2.19.5"} diff --git a/node_modules/bottleneck/light.js b/node_modules/bottleneck/light.js deleted file mode 100644 index c4aa26537..000000000 --- a/node_modules/bottleneck/light.js +++ /dev/null @@ -1,1524 +0,0 @@ -/** - * This file contains the Bottleneck library (MIT), compiled to ES2017, and without Clustering support. - * https://github.com/SGrondin/bottleneck - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.Bottleneck = factory()); -}(this, (function () { 'use strict'; - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function getCjsExportFromNamespace (n) { - return n && n['default'] || n; - } - - var load = function(received, defaults, onto = {}) { - var k, ref, v; - for (k in defaults) { - v = defaults[k]; - onto[k] = (ref = received[k]) != null ? ref : v; - } - return onto; - }; - - var overwrite = function(received, defaults, onto = {}) { - var k, v; - for (k in received) { - v = received[k]; - if (defaults[k] !== void 0) { - onto[k] = v; - } - } - return onto; - }; - - var parser = { - load: load, - overwrite: overwrite - }; - - var DLList; - - DLList = class DLList { - constructor(incr, decr) { - this.incr = incr; - this.decr = decr; - this._first = null; - this._last = null; - this.length = 0; - } - - push(value) { - var node; - this.length++; - if (typeof this.incr === "function") { - this.incr(); - } - node = { - value, - prev: this._last, - next: null - }; - if (this._last != null) { - this._last.next = node; - this._last = node; - } else { - this._first = this._last = node; - } - return void 0; - } - - shift() { - var value; - if (this._first == null) { - return; - } else { - this.length--; - if (typeof this.decr === "function") { - this.decr(); - } - } - value = this._first.value; - if ((this._first = this._first.next) != null) { - this._first.prev = null; - } else { - this._last = null; - } - return value; - } - - first() { - if (this._first != null) { - return this._first.value; - } - } - - getArray() { - var node, ref, results; - node = this._first; - results = []; - while (node != null) { - results.push((ref = node, node = node.next, ref.value)); - } - return results; - } - - forEachShift(cb) { - var node; - node = this.shift(); - while (node != null) { - (cb(node), node = this.shift()); - } - return void 0; - } - - debug() { - var node, ref, ref1, ref2, results; - node = this._first; - results = []; - while (node != null) { - results.push((ref = node, node = node.next, { - value: ref.value, - prev: (ref1 = ref.prev) != null ? ref1.value : void 0, - next: (ref2 = ref.next) != null ? ref2.value : void 0 - })); - } - return results; - } - - }; - - var DLList_1 = DLList; - - var Events; - - Events = class Events { - constructor(instance) { - this.instance = instance; - this._events = {}; - if ((this.instance.on != null) || (this.instance.once != null) || (this.instance.removeAllListeners != null)) { - throw new Error("An Emitter already exists for this object"); - } - this.instance.on = (name, cb) => { - return this._addListener(name, "many", cb); - }; - this.instance.once = (name, cb) => { - return this._addListener(name, "once", cb); - }; - this.instance.removeAllListeners = (name = null) => { - if (name != null) { - return delete this._events[name]; - } else { - return this._events = {}; - } - }; - } - - _addListener(name, status, cb) { - var base; - if ((base = this._events)[name] == null) { - base[name] = []; - } - this._events[name].push({cb, status}); - return this.instance; - } - - listenerCount(name) { - if (this._events[name] != null) { - return this._events[name].length; - } else { - return 0; - } - } - - async trigger(name, ...args) { - var e, promises; - try { - if (name !== "debug") { - this.trigger("debug", `Event triggered: ${name}`, args); - } - if (this._events[name] == null) { - return; - } - this._events[name] = this._events[name].filter(function(listener) { - return listener.status !== "none"; - }); - promises = this._events[name].map(async(listener) => { - var e, returned; - if (listener.status === "none") { - return; - } - if (listener.status === "once") { - listener.status = "none"; - } - try { - returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0; - if (typeof (returned != null ? returned.then : void 0) === "function") { - return (await returned); - } else { - return returned; - } - } catch (error) { - e = error; - { - this.trigger("error", e); - } - return null; - } - }); - return ((await Promise.all(promises))).find(function(x) { - return x != null; - }); - } catch (error) { - e = error; - { - this.trigger("error", e); - } - return null; - } - } - - }; - - var Events_1 = Events; - - var DLList$1, Events$1, Queues; - - DLList$1 = DLList_1; - - Events$1 = Events_1; - - Queues = class Queues { - constructor(num_priorities) { - var i; - this.Events = new Events$1(this); - this._length = 0; - this._lists = (function() { - var j, ref, results; - results = []; - for (i = j = 1, ref = num_priorities; (1 <= ref ? j <= ref : j >= ref); i = 1 <= ref ? ++j : --j) { - results.push(new DLList$1((() => { - return this.incr(); - }), (() => { - return this.decr(); - }))); - } - return results; - }).call(this); - } - - incr() { - if (this._length++ === 0) { - return this.Events.trigger("leftzero"); - } - } - - decr() { - if (--this._length === 0) { - return this.Events.trigger("zero"); - } - } - - push(job) { - return this._lists[job.options.priority].push(job); - } - - queued(priority) { - if (priority != null) { - return this._lists[priority].length; - } else { - return this._length; - } - } - - shiftAll(fn) { - return this._lists.forEach(function(list) { - return list.forEachShift(fn); - }); - } - - getFirst(arr = this._lists) { - var j, len, list; - for (j = 0, len = arr.length; j < len; j++) { - list = arr[j]; - if (list.length > 0) { - return list; - } - } - return []; - } - - shiftLastFrom(priority) { - return this.getFirst(this._lists.slice(priority).reverse()).shift(); - } - - }; - - var Queues_1 = Queues; - - var BottleneckError; - - BottleneckError = class BottleneckError extends Error {}; - - var BottleneckError_1 = BottleneckError; - - var BottleneckError$1, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser$1; - - NUM_PRIORITIES = 10; - - DEFAULT_PRIORITY = 5; - - parser$1 = parser; - - BottleneckError$1 = BottleneckError_1; - - Job = class Job { - constructor(task, args, options, jobDefaults, rejectOnDrop, Events, _states, Promise) { - this.task = task; - this.args = args; - this.rejectOnDrop = rejectOnDrop; - this.Events = Events; - this._states = _states; - this.Promise = Promise; - this.options = parser$1.load(options, jobDefaults); - this.options.priority = this._sanitizePriority(this.options.priority); - if (this.options.id === jobDefaults.id) { - this.options.id = `${this.options.id}-${this._randomIndex()}`; - } - this.promise = new this.Promise((_resolve, _reject) => { - this._resolve = _resolve; - this._reject = _reject; - }); - this.retryCount = 0; - } - - _sanitizePriority(priority) { - var sProperty; - sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority; - if (sProperty < 0) { - return 0; - } else if (sProperty > NUM_PRIORITIES - 1) { - return NUM_PRIORITIES - 1; - } else { - return sProperty; - } - } - - _randomIndex() { - return Math.random().toString(36).slice(2); - } - - doDrop({error, message = "This job has been dropped by Bottleneck"} = {}) { - if (this._states.remove(this.options.id)) { - if (this.rejectOnDrop) { - this._reject(error != null ? error : new BottleneckError$1(message)); - } - this.Events.trigger("dropped", {args: this.args, options: this.options, task: this.task, promise: this.promise}); - return true; - } else { - return false; - } - } - - _assertStatus(expected) { - var status; - status = this._states.jobStatus(this.options.id); - if (!(status === expected || (expected === "DONE" && status === null))) { - throw new BottleneckError$1(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`); - } - } - - doReceive() { - this._states.start(this.options.id); - return this.Events.trigger("received", {args: this.args, options: this.options}); - } - - doQueue(reachedHWM, blocked) { - this._assertStatus("RECEIVED"); - this._states.next(this.options.id); - return this.Events.trigger("queued", {args: this.args, options: this.options, reachedHWM, blocked}); - } - - doRun() { - if (this.retryCount === 0) { - this._assertStatus("QUEUED"); - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - return this.Events.trigger("scheduled", {args: this.args, options: this.options}); - } - - async doExecute(chained, clearGlobalState, run, free) { - var error, eventInfo, passed; - if (this.retryCount === 0) { - this._assertStatus("RUNNING"); - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount}; - this.Events.trigger("executing", eventInfo); - try { - passed = (await (chained != null ? chained.schedule(this.options, this.task, ...this.args) : this.task(...this.args))); - if (clearGlobalState()) { - this.doDone(eventInfo); - await free(this.options, eventInfo); - this._assertStatus("DONE"); - return this._resolve(passed); - } - } catch (error1) { - error = error1; - return this._onFailure(error, eventInfo, clearGlobalState, run, free); - } - } - - doExpire(clearGlobalState, run, free) { - var error, eventInfo; - if (this._states.jobStatus(this.options.id === "RUNNING")) { - this._states.next(this.options.id); - } - this._assertStatus("EXECUTING"); - eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount}; - error = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); - return this._onFailure(error, eventInfo, clearGlobalState, run, free); - } - - async _onFailure(error, eventInfo, clearGlobalState, run, free) { - var retry, retryAfter; - if (clearGlobalState()) { - retry = (await this.Events.trigger("failed", error, eventInfo)); - if (retry != null) { - retryAfter = ~~retry; - this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo); - this.retryCount++; - return run(retryAfter); - } else { - this.doDone(eventInfo); - await free(this.options, eventInfo); - this._assertStatus("DONE"); - return this._reject(error); - } - } - } - - doDone(eventInfo) { - this._assertStatus("EXECUTING"); - this._states.next(this.options.id); - return this.Events.trigger("done", eventInfo); - } - - }; - - var Job_1 = Job; - - var BottleneckError$2, LocalDatastore, parser$2; - - parser$2 = parser; - - BottleneckError$2 = BottleneckError_1; - - LocalDatastore = class LocalDatastore { - constructor(instance, storeOptions, storeInstanceOptions) { - this.instance = instance; - this.storeOptions = storeOptions; - this.clientId = this.instance._randomIndex(); - parser$2.load(storeInstanceOptions, storeInstanceOptions, this); - this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now(); - this._running = 0; - this._done = 0; - this._unblockTime = 0; - this.ready = this.Promise.resolve(); - this.clients = {}; - this._startHeartbeat(); - } - - _startHeartbeat() { - var base; - if ((this.heartbeat == null) && (((this.storeOptions.reservoirRefreshInterval != null) && (this.storeOptions.reservoirRefreshAmount != null)) || ((this.storeOptions.reservoirIncreaseInterval != null) && (this.storeOptions.reservoirIncreaseAmount != null)))) { - return typeof (base = (this.heartbeat = setInterval(() => { - var amount, incr, maximum, now, reservoir; - now = Date.now(); - if ((this.storeOptions.reservoirRefreshInterval != null) && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) { - this._lastReservoirRefresh = now; - this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount; - this.instance._drainAll(this.computeCapacity()); - } - if ((this.storeOptions.reservoirIncreaseInterval != null) && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) { - ({ - reservoirIncreaseAmount: amount, - reservoirIncreaseMaximum: maximum, - reservoir - } = this.storeOptions); - this._lastReservoirIncrease = now; - incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount; - if (incr > 0) { - this.storeOptions.reservoir += incr; - return this.instance._drainAll(this.computeCapacity()); - } - } - }, this.heartbeatInterval))).unref === "function" ? base.unref() : void 0; - } else { - return clearInterval(this.heartbeat); - } - } - - async __publish__(message) { - await this.yieldLoop(); - return this.instance.Events.trigger("message", message.toString()); - } - - async __disconnect__(flush) { - await this.yieldLoop(); - clearInterval(this.heartbeat); - return this.Promise.resolve(); - } - - yieldLoop(t = 0) { - return new this.Promise(function(resolve, reject) { - return setTimeout(resolve, t); - }); - } - - computePenalty() { - var ref; - return (ref = this.storeOptions.penalty) != null ? ref : (15 * this.storeOptions.minTime) || 5000; - } - - async __updateSettings__(options) { - await this.yieldLoop(); - parser$2.overwrite(options, options, this.storeOptions); - this._startHeartbeat(); - this.instance._drainAll(this.computeCapacity()); - return true; - } - - async __running__() { - await this.yieldLoop(); - return this._running; - } - - async __queued__() { - await this.yieldLoop(); - return this.instance.queued(); - } - - async __done__() { - await this.yieldLoop(); - return this._done; - } - - async __groupCheck__(time) { - await this.yieldLoop(); - return (this._nextRequest + this.timeout) < time; - } - - computeCapacity() { - var maxConcurrent, reservoir; - ({maxConcurrent, reservoir} = this.storeOptions); - if ((maxConcurrent != null) && (reservoir != null)) { - return Math.min(maxConcurrent - this._running, reservoir); - } else if (maxConcurrent != null) { - return maxConcurrent - this._running; - } else if (reservoir != null) { - return reservoir; - } else { - return null; - } - } - - conditionsCheck(weight) { - var capacity; - capacity = this.computeCapacity(); - return (capacity == null) || weight <= capacity; - } - - async __incrementReservoir__(incr) { - var reservoir; - await this.yieldLoop(); - reservoir = this.storeOptions.reservoir += incr; - this.instance._drainAll(this.computeCapacity()); - return reservoir; - } - - async __currentReservoir__() { - await this.yieldLoop(); - return this.storeOptions.reservoir; - } - - isBlocked(now) { - return this._unblockTime >= now; - } - - check(weight, now) { - return this.conditionsCheck(weight) && (this._nextRequest - now) <= 0; - } - - async __check__(weight) { - var now; - await this.yieldLoop(); - now = Date.now(); - return this.check(weight, now); - } - - async __register__(index, weight, expiration) { - var now, wait; - await this.yieldLoop(); - now = Date.now(); - if (this.conditionsCheck(weight)) { - this._running += weight; - if (this.storeOptions.reservoir != null) { - this.storeOptions.reservoir -= weight; - } - wait = Math.max(this._nextRequest - now, 0); - this._nextRequest = now + wait + this.storeOptions.minTime; - return { - success: true, - wait, - reservoir: this.storeOptions.reservoir - }; - } else { - return { - success: false - }; - } - } - - strategyIsBlock() { - return this.storeOptions.strategy === 3; - } - - async __submit__(queueLength, weight) { - var blocked, now, reachedHWM; - await this.yieldLoop(); - if ((this.storeOptions.maxConcurrent != null) && weight > this.storeOptions.maxConcurrent) { - throw new BottleneckError$2(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${this.storeOptions.maxConcurrent}`); - } - now = Date.now(); - reachedHWM = (this.storeOptions.highWater != null) && queueLength === this.storeOptions.highWater && !this.check(weight, now); - blocked = this.strategyIsBlock() && (reachedHWM || this.isBlocked(now)); - if (blocked) { - this._unblockTime = now + this.computePenalty(); - this._nextRequest = this._unblockTime + this.storeOptions.minTime; - this.instance._dropAllQueued(); - } - return { - reachedHWM, - blocked, - strategy: this.storeOptions.strategy - }; - } - - async __free__(index, weight) { - await this.yieldLoop(); - this._running -= weight; - this._done += weight; - this.instance._drainAll(this.computeCapacity()); - return { - running: this._running - }; - } - - }; - - var LocalDatastore_1 = LocalDatastore; - - var BottleneckError$3, States; - - BottleneckError$3 = BottleneckError_1; - - States = class States { - constructor(status1) { - this.status = status1; - this._jobs = {}; - this.counts = this.status.map(function() { - return 0; - }); - } - - next(id) { - var current, next; - current = this._jobs[id]; - next = current + 1; - if ((current != null) && next < this.status.length) { - this.counts[current]--; - this.counts[next]++; - return this._jobs[id]++; - } else if (current != null) { - this.counts[current]--; - return delete this._jobs[id]; - } - } - - start(id) { - var initial; - initial = 0; - this._jobs[id] = initial; - return this.counts[initial]++; - } - - remove(id) { - var current; - current = this._jobs[id]; - if (current != null) { - this.counts[current]--; - delete this._jobs[id]; - } - return current != null; - } - - jobStatus(id) { - var ref; - return (ref = this.status[this._jobs[id]]) != null ? ref : null; - } - - statusJobs(status) { - var k, pos, ref, results, v; - if (status != null) { - pos = this.status.indexOf(status); - if (pos < 0) { - throw new BottleneckError$3(`status must be one of ${this.status.join(', ')}`); - } - ref = this._jobs; - results = []; - for (k in ref) { - v = ref[k]; - if (v === pos) { - results.push(k); - } - } - return results; - } else { - return Object.keys(this._jobs); - } - } - - statusCounts() { - return this.counts.reduce(((acc, v, i) => { - acc[this.status[i]] = v; - return acc; - }), {}); - } - - }; - - var States_1 = States; - - var DLList$2, Sync; - - DLList$2 = DLList_1; - - Sync = class Sync { - constructor(name, Promise) { - this.schedule = this.schedule.bind(this); - this.name = name; - this.Promise = Promise; - this._running = 0; - this._queue = new DLList$2(); - } - - isEmpty() { - return this._queue.length === 0; - } - - async _tryToRun() { - var args, cb, error, reject, resolve, returned, task; - if ((this._running < 1) && this._queue.length > 0) { - this._running++; - ({task, args, resolve, reject} = this._queue.shift()); - cb = (await (async function() { - try { - returned = (await task(...args)); - return function() { - return resolve(returned); - }; - } catch (error1) { - error = error1; - return function() { - return reject(error); - }; - } - })()); - this._running--; - this._tryToRun(); - return cb(); - } - } - - schedule(task, ...args) { - var promise, reject, resolve; - resolve = reject = null; - promise = new this.Promise(function(_resolve, _reject) { - resolve = _resolve; - return reject = _reject; - }); - this._queue.push({task, args, resolve, reject}); - this._tryToRun(); - return promise; - } - - }; - - var Sync_1 = Sync; - - var version = "2.19.5"; - var version$1 = { - version: version - }; - - var version$2 = /*#__PURE__*/Object.freeze({ - version: version, - default: version$1 - }); - - var require$$2 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var require$$3 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var require$$4 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var Events$2, Group, IORedisConnection$1, RedisConnection$1, Scripts$1, parser$3; - - parser$3 = parser; - - Events$2 = Events_1; - - RedisConnection$1 = require$$2; - - IORedisConnection$1 = require$$3; - - Scripts$1 = require$$4; - - Group = (function() { - class Group { - constructor(limiterOptions = {}) { - this.deleteKey = this.deleteKey.bind(this); - this.limiterOptions = limiterOptions; - parser$3.load(this.limiterOptions, this.defaults, this); - this.Events = new Events$2(this); - this.instances = {}; - this.Bottleneck = Bottleneck_1; - this._startAutoCleanup(); - this.sharedConnection = this.connection != null; - if (this.connection == null) { - if (this.limiterOptions.datastore === "redis") { - this.connection = new RedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events})); - } else if (this.limiterOptions.datastore === "ioredis") { - this.connection = new IORedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events})); - } - } - } - - key(key = "") { - var ref; - return (ref = this.instances[key]) != null ? ref : (() => { - var limiter; - limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, { - id: `${this.id}-${key}`, - timeout: this.timeout, - connection: this.connection - })); - this.Events.trigger("created", limiter, key); - return limiter; - })(); - } - - async deleteKey(key = "") { - var deleted, instance; - instance = this.instances[key]; - if (this.connection) { - deleted = (await this.connection.__runCommand__(['del', ...Scripts$1.allKeys(`${this.id}-${key}`)])); - } - if (instance != null) { - delete this.instances[key]; - await instance.disconnect(); - } - return (instance != null) || deleted > 0; - } - - limiters() { - var k, ref, results, v; - ref = this.instances; - results = []; - for (k in ref) { - v = ref[k]; - results.push({ - key: k, - limiter: v - }); - } - return results; - } - - keys() { - return Object.keys(this.instances); - } - - async clusterKeys() { - var cursor, end, found, i, k, keys, len, next, start; - if (this.connection == null) { - return this.Promise.resolve(this.keys()); - } - keys = []; - cursor = null; - start = `b_${this.id}-`.length; - end = "_settings".length; - while (cursor !== 0) { - [next, found] = (await this.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", `b_${this.id}-*_settings`, "count", 10000])); - cursor = ~~next; - for (i = 0, len = found.length; i < len; i++) { - k = found[i]; - keys.push(k.slice(start, -end)); - } - } - return keys; - } - - _startAutoCleanup() { - var base; - clearInterval(this.interval); - return typeof (base = (this.interval = setInterval(async() => { - var e, k, ref, results, time, v; - time = Date.now(); - ref = this.instances; - results = []; - for (k in ref) { - v = ref[k]; - try { - if ((await v._store.__groupCheck__(time))) { - results.push(this.deleteKey(k)); - } else { - results.push(void 0); - } - } catch (error) { - e = error; - results.push(v.Events.trigger("error", e)); - } - } - return results; - }, this.timeout / 2))).unref === "function" ? base.unref() : void 0; - } - - updateSettings(options = {}) { - parser$3.overwrite(options, this.defaults, this); - parser$3.overwrite(options, options, this.limiterOptions); - if (options.timeout != null) { - return this._startAutoCleanup(); - } - } - - disconnect(flush = true) { - var ref; - if (!this.sharedConnection) { - return (ref = this.connection) != null ? ref.disconnect(flush) : void 0; - } - } - - } - Group.prototype.defaults = { - timeout: 1000 * 60 * 5, - connection: null, - Promise: Promise, - id: "group-key" - }; - - return Group; - - }).call(commonjsGlobal); - - var Group_1 = Group; - - var Batcher, Events$3, parser$4; - - parser$4 = parser; - - Events$3 = Events_1; - - Batcher = (function() { - class Batcher { - constructor(options = {}) { - this.options = options; - parser$4.load(this.options, this.defaults, this); - this.Events = new Events$3(this); - this._arr = []; - this._resetPromise(); - this._lastFlush = Date.now(); - } - - _resetPromise() { - return this._promise = new this.Promise((res, rej) => { - return this._resolve = res; - }); - } - - _flush() { - clearTimeout(this._timeout); - this._lastFlush = Date.now(); - this._resolve(); - this.Events.trigger("batch", this._arr); - this._arr = []; - return this._resetPromise(); - } - - add(data) { - var ret; - this._arr.push(data); - ret = this._promise; - if (this._arr.length === this.maxSize) { - this._flush(); - } else if ((this.maxTime != null) && this._arr.length === 1) { - this._timeout = setTimeout(() => { - return this._flush(); - }, this.maxTime); - } - return ret; - } - - } - Batcher.prototype.defaults = { - maxTime: null, - maxSize: null, - Promise: Promise - }; - - return Batcher; - - }).call(commonjsGlobal); - - var Batcher_1 = Batcher; - - var require$$4$1 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var require$$8 = getCjsExportFromNamespace(version$2); - - var Bottleneck, DEFAULT_PRIORITY$1, Events$4, Job$1, LocalDatastore$1, NUM_PRIORITIES$1, Queues$1, RedisDatastore$1, States$1, Sync$1, parser$5, - splice = [].splice; - - NUM_PRIORITIES$1 = 10; - - DEFAULT_PRIORITY$1 = 5; - - parser$5 = parser; - - Queues$1 = Queues_1; - - Job$1 = Job_1; - - LocalDatastore$1 = LocalDatastore_1; - - RedisDatastore$1 = require$$4$1; - - Events$4 = Events_1; - - States$1 = States_1; - - Sync$1 = Sync_1; - - Bottleneck = (function() { - class Bottleneck { - constructor(options = {}, ...invalid) { - var storeInstanceOptions, storeOptions; - this._addToQueue = this._addToQueue.bind(this); - this._validateOptions(options, invalid); - parser$5.load(options, this.instanceDefaults, this); - this._queues = new Queues$1(NUM_PRIORITIES$1); - this._scheduled = {}; - this._states = new States$1(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : [])); - this._limiter = null; - this.Events = new Events$4(this); - this._submitLock = new Sync$1("submit", this.Promise); - this._registerLock = new Sync$1("register", this.Promise); - storeOptions = parser$5.load(options, this.storeDefaults, {}); - this._store = (function() { - if (this.datastore === "redis" || this.datastore === "ioredis" || (this.connection != null)) { - storeInstanceOptions = parser$5.load(options, this.redisStoreDefaults, {}); - return new RedisDatastore$1(this, storeOptions, storeInstanceOptions); - } else if (this.datastore === "local") { - storeInstanceOptions = parser$5.load(options, this.localStoreDefaults, {}); - return new LocalDatastore$1(this, storeOptions, storeInstanceOptions); - } else { - throw new Bottleneck.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`); - } - }).call(this); - this._queues.on("leftzero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0; - }); - this._queues.on("zero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0; - }); - } - - _validateOptions(options, invalid) { - if (!((options != null) && typeof options === "object" && invalid.length === 0)) { - throw new Bottleneck.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1."); - } - } - - ready() { - return this._store.ready; - } - - clients() { - return this._store.clients; - } - - channel() { - return `b_${this.id}`; - } - - channel_client() { - return `b_${this.id}_${this._store.clientId}`; - } - - publish(message) { - return this._store.__publish__(message); - } - - disconnect(flush = true) { - return this._store.__disconnect__(flush); - } - - chain(_limiter) { - this._limiter = _limiter; - return this; - } - - queued(priority) { - return this._queues.queued(priority); - } - - clusterQueued() { - return this._store.__queued__(); - } - - empty() { - return this.queued() === 0 && this._submitLock.isEmpty(); - } - - running() { - return this._store.__running__(); - } - - done() { - return this._store.__done__(); - } - - jobStatus(id) { - return this._states.jobStatus(id); - } - - jobs(status) { - return this._states.statusJobs(status); - } - - counts() { - return this._states.statusCounts(); - } - - _randomIndex() { - return Math.random().toString(36).slice(2); - } - - check(weight = 1) { - return this._store.__check__(weight); - } - - _clearGlobalState(index) { - if (this._scheduled[index] != null) { - clearTimeout(this._scheduled[index].expiration); - delete this._scheduled[index]; - return true; - } else { - return false; - } - } - - async _free(index, job, options, eventInfo) { - var e, running; - try { - ({running} = (await this._store.__free__(index, options.weight))); - this.Events.trigger("debug", `Freed ${options.id}`, eventInfo); - if (running === 0 && this.empty()) { - return this.Events.trigger("idle"); - } - } catch (error1) { - e = error1; - return this.Events.trigger("error", e); - } - } - - _run(index, job, wait) { - var clearGlobalState, free, run; - job.doRun(); - clearGlobalState = this._clearGlobalState.bind(this, index); - run = this._run.bind(this, index, job); - free = this._free.bind(this, index, job); - return this._scheduled[index] = { - timeout: setTimeout(() => { - return job.doExecute(this._limiter, clearGlobalState, run, free); - }, wait), - expiration: job.options.expiration != null ? setTimeout(function() { - return job.doExpire(clearGlobalState, run, free); - }, wait + job.options.expiration) : void 0, - job: job - }; - } - - _drainOne(capacity) { - return this._registerLock.schedule(() => { - var args, index, next, options, queue; - if (this.queued() === 0) { - return this.Promise.resolve(null); - } - queue = this._queues.getFirst(); - ({options, args} = next = queue.first()); - if ((capacity != null) && options.weight > capacity) { - return this.Promise.resolve(null); - } - this.Events.trigger("debug", `Draining ${options.id}`, {args, options}); - index = this._randomIndex(); - return this._store.__register__(index, options.weight, options.expiration).then(({success, wait, reservoir}) => { - var empty; - this.Events.trigger("debug", `Drained ${options.id}`, {success, args, options}); - if (success) { - queue.shift(); - empty = this.empty(); - if (empty) { - this.Events.trigger("empty"); - } - if (reservoir === 0) { - this.Events.trigger("depleted", empty); - } - this._run(index, next, wait); - return this.Promise.resolve(options.weight); - } else { - return this.Promise.resolve(null); - } - }); - }); - } - - _drainAll(capacity, total = 0) { - return this._drainOne(capacity).then((drained) => { - var newCapacity; - if (drained != null) { - newCapacity = capacity != null ? capacity - drained : capacity; - return this._drainAll(newCapacity, total + drained); - } else { - return this.Promise.resolve(total); - } - }).catch((e) => { - return this.Events.trigger("error", e); - }); - } - - _dropAllQueued(message) { - return this._queues.shiftAll(function(job) { - return job.doDrop({message}); - }); - } - - stop(options = {}) { - var done, waitForExecuting; - options = parser$5.load(options, this.stopDefaults); - waitForExecuting = (at) => { - var finished; - finished = () => { - var counts; - counts = this._states.counts; - return (counts[0] + counts[1] + counts[2] + counts[3]) === at; - }; - return new this.Promise((resolve, reject) => { - if (finished()) { - return resolve(); - } else { - return this.on("done", () => { - if (finished()) { - this.removeAllListeners("done"); - return resolve(); - } - }); - } - }); - }; - done = options.dropWaitingJobs ? (this._run = function(index, next) { - return next.doDrop({ - message: options.dropErrorMessage - }); - }, this._drainOne = () => { - return this.Promise.resolve(null); - }, this._registerLock.schedule(() => { - return this._submitLock.schedule(() => { - var k, ref, v; - ref = this._scheduled; - for (k in ref) { - v = ref[k]; - if (this.jobStatus(v.job.options.id) === "RUNNING") { - clearTimeout(v.timeout); - clearTimeout(v.expiration); - v.job.doDrop({ - message: options.dropErrorMessage - }); - } - } - this._dropAllQueued(options.dropErrorMessage); - return waitForExecuting(0); - }); - })) : this.schedule({ - priority: NUM_PRIORITIES$1 - 1, - weight: 0 - }, () => { - return waitForExecuting(1); - }); - this._receive = function(job) { - return job._reject(new Bottleneck.prototype.BottleneckError(options.enqueueErrorMessage)); - }; - this.stop = () => { - return this.Promise.reject(new Bottleneck.prototype.BottleneckError("stop() has already been called")); - }; - return done; - } - - async _addToQueue(job) { - var args, blocked, error, options, reachedHWM, shifted, strategy; - ({args, options} = job); - try { - ({reachedHWM, blocked, strategy} = (await this._store.__submit__(this.queued(), options.weight))); - } catch (error1) { - error = error1; - this.Events.trigger("debug", `Could not queue ${options.id}`, {args, options, error}); - job.doDrop({error}); - return false; - } - if (blocked) { - job.doDrop(); - return true; - } else if (reachedHWM) { - shifted = strategy === Bottleneck.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options.priority) : strategy === Bottleneck.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck.prototype.strategy.OVERFLOW ? job : void 0; - if (shifted != null) { - shifted.doDrop(); - } - if ((shifted == null) || strategy === Bottleneck.prototype.strategy.OVERFLOW) { - if (shifted == null) { - job.doDrop(); - } - return reachedHWM; - } - } - job.doQueue(reachedHWM, blocked); - this._queues.push(job); - await this._drainAll(); - return reachedHWM; - } - - _receive(job) { - if (this._states.jobStatus(job.options.id) != null) { - job._reject(new Bottleneck.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); - return false; - } else { - job.doReceive(); - return this._submitLock.schedule(this._addToQueue, job); - } - } - - submit(...args) { - var cb, fn, job, options, ref, ref1, task; - if (typeof args[0] === "function") { - ref = args, [fn, ...args] = ref, [cb] = splice.call(args, -1); - options = parser$5.load({}, this.jobDefaults); - } else { - ref1 = args, [options, fn, ...args] = ref1, [cb] = splice.call(args, -1); - options = parser$5.load(options, this.jobDefaults); - } - task = (...args) => { - return new this.Promise(function(resolve, reject) { - return fn(...args, function(...args) { - return (args[0] != null ? reject : resolve)(args); - }); - }); - }; - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - job.promise.then(function(args) { - return typeof cb === "function" ? cb(...args) : void 0; - }).catch(function(args) { - if (Array.isArray(args)) { - return typeof cb === "function" ? cb(...args) : void 0; - } else { - return typeof cb === "function" ? cb(args) : void 0; - } - }); - return this._receive(job); - } - - schedule(...args) { - var job, options, task; - if (typeof args[0] === "function") { - [task, ...args] = args; - options = {}; - } else { - [options, task, ...args] = args; - } - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - this._receive(job); - return job.promise; - } - - wrap(fn) { - var schedule, wrapped; - schedule = this.schedule.bind(this); - wrapped = function(...args) { - return schedule(fn.bind(this), ...args); - }; - wrapped.withOptions = function(options, ...args) { - return schedule(options, fn, ...args); - }; - return wrapped; - } - - async updateSettings(options = {}) { - await this._store.__updateSettings__(parser$5.overwrite(options, this.storeDefaults)); - parser$5.overwrite(options, this.instanceDefaults, this); - return this; - } - - currentReservoir() { - return this._store.__currentReservoir__(); - } - - incrementReservoir(incr = 0) { - return this._store.__incrementReservoir__(incr); - } - - } - Bottleneck.default = Bottleneck; - - Bottleneck.Events = Events$4; - - Bottleneck.version = Bottleneck.prototype.version = require$$8.version; - - Bottleneck.strategy = Bottleneck.prototype.strategy = { - LEAK: 1, - OVERFLOW: 2, - OVERFLOW_PRIORITY: 4, - BLOCK: 3 - }; - - Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = BottleneckError_1; - - Bottleneck.Group = Bottleneck.prototype.Group = Group_1; - - Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = require$$2; - - Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = require$$3; - - Bottleneck.Batcher = Bottleneck.prototype.Batcher = Batcher_1; - - Bottleneck.prototype.jobDefaults = { - priority: DEFAULT_PRIORITY$1, - weight: 1, - expiration: null, - id: "" - }; - - Bottleneck.prototype.storeDefaults = { - maxConcurrent: null, - minTime: 0, - highWater: null, - strategy: Bottleneck.prototype.strategy.LEAK, - penalty: null, - reservoir: null, - reservoirRefreshInterval: null, - reservoirRefreshAmount: null, - reservoirIncreaseInterval: null, - reservoirIncreaseAmount: null, - reservoirIncreaseMaximum: null - }; - - Bottleneck.prototype.localStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 250 - }; - - Bottleneck.prototype.redisStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 5000, - clientTimeout: 10000, - Redis: null, - clientOptions: {}, - clusterNodes: null, - clearDatastore: false, - connection: null - }; - - Bottleneck.prototype.instanceDefaults = { - datastore: "local", - connection: null, - id: "", - rejectOnDrop: true, - trackDoneStatus: false, - Promise: Promise - }; - - Bottleneck.prototype.stopDefaults = { - enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", - dropWaitingJobs: true, - dropErrorMessage: "This limiter has been stopped." - }; - - return Bottleneck; - - }).call(commonjsGlobal); - - var Bottleneck_1 = Bottleneck; - - var lib = Bottleneck_1; - - return lib; - -}))); diff --git a/node_modules/bottleneck/package.json b/node_modules/bottleneck/package.json deleted file mode 100644 index c8d74f2b6..000000000 --- a/node_modules/bottleneck/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_args": [ - [ - "bottleneck@2.19.5", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "bottleneck@2.19.5", - "_id": "bottleneck@2.19.5", - "_inBundle": false, - "_integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", - "_location": "/bottleneck", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "bottleneck@2.19.5", - "name": "bottleneck", - "escapedName": "bottleneck", - "rawSpec": "2.19.5", - "saveSpec": null, - "fetchSpec": "2.19.5" - }, - "_requiredBy": [ - "/@octokit/plugin-throttling" - ], - "_resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", - "_spec": "2.19.5", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Simon Grondin" - }, - "bugs": { - "url": "https://github.com/SGrondin/bottleneck/issues" - }, - "dependencies": {}, - "description": "Distributed task scheduler and rate limiter", - "devDependencies": { - "@babel/core": "^7.5.0", - "@babel/preset-env": "^7.5.0", - "@types/es6-promise": "0.0.33", - "assert": "^1.5.0", - "coffeescript": "2.4.x", - "ejs-cli": "github:SGrondin/ejs-cli#master", - "ioredis": "^4.11.1", - "leakage": "^0.4.0", - "mocha": "^6.1.4", - "redis": "^2.8.0", - "regenerator-runtime": "^0.12.1", - "rollup": "^0.66.6", - "rollup-plugin-babel": "^4.3.3", - "rollup-plugin-commonjs": "^9.3.4", - "rollup-plugin-json": "^3.1.0", - "rollup-plugin-node-resolve": "^3.4.0", - "typescript": "^2.6.2" - }, - "homepage": "https://github.com/SGrondin/bottleneck#readme", - "keywords": [ - "async rate limiter", - "rate limiter", - "rate limiting", - "async", - "rate", - "limiting", - "limiter", - "throttle", - "throttling", - "throttler", - "load", - "clustering" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "bottleneck", - "repository": { - "type": "git", - "url": "git+https://github.com/SGrondin/bottleneck.git" - }, - "scripts": { - "test": "mocha test", - "test-all": "./scripts/test_all.sh" - }, - "typings": "bottleneck.d.ts", - "version": "2.19.5" -} diff --git a/node_modules/bottleneck/rollup.config.es5.js b/node_modules/bottleneck/rollup.config.es5.js deleted file mode 100644 index 8b0483e27..000000000 --- a/node_modules/bottleneck/rollup.config.es5.js +++ /dev/null @@ -1,34 +0,0 @@ -import json from 'rollup-plugin-json'; -import resolve from 'rollup-plugin-node-resolve'; -import commonjs from 'rollup-plugin-commonjs'; -import babel from 'rollup-plugin-babel'; - -const bannerLines = [ - 'This file contains the full Bottleneck library (MIT) compiled to ES5.', - 'https://github.com/SGrondin/bottleneck', - 'It also contains the regenerator-runtime (MIT), necessary for Babel-generated ES5 code to execute promise and async/await code.', - 'See the following link for Copyright and License information:', - 'https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/runtime.js', -].map(x => ` * ${x}`).join('\n'); -const banner = `/**\n${bannerLines}\n */`; - -export default { - input: 'lib/es5.js', - output: { - name: 'Bottleneck', - file: 'es5.js', - sourcemap: false, - globals: {}, - format: 'umd', - banner - }, - external: [], - plugins: [ - json(), - resolve(), - commonjs(), - babel({ - exclude: 'node_modules/**' - }) - ] -}; diff --git a/node_modules/bottleneck/rollup.config.light.js b/node_modules/bottleneck/rollup.config.light.js deleted file mode 100644 index 6a72c709e..000000000 --- a/node_modules/bottleneck/rollup.config.light.js +++ /dev/null @@ -1,44 +0,0 @@ -import commonjs from 'rollup-plugin-commonjs'; -import json from 'rollup-plugin-json'; -import resolve from 'rollup-plugin-node-resolve'; - -const bannerLines = [ - 'This file contains the Bottleneck library (MIT), compiled to ES2017, and without Clustering support.', - 'https://github.com/SGrondin/bottleneck', -].map(x => ` * ${x}`).join('\n'); -const banner = `/**\n${bannerLines}\n */`; - -const missing = `export default () => console.log('You must import the full version of Bottleneck in order to use this feature.');`; -const exclude = [ - 'RedisDatastore.js', - 'RedisConnection.js', - 'IORedisConnection.js', - 'Scripts.js' -]; - -export default { - input: 'lib/index.js', - output: { - name: 'Bottleneck', - file: 'light.js', - sourcemap: false, - globals: {}, - format: 'umd', - banner - }, - external: [], - plugins: [ - json(), - { - load: id => { - const chunks = id.split('/'); - const file = chunks[chunks.length - 1]; - if (exclude.indexOf(file) >= 0) { - return missing - } - } - }, - resolve(), - commonjs() - ] -}; diff --git a/node_modules/bottleneck/scripts/assemble_lua.js b/node_modules/bottleneck/scripts/assemble_lua.js deleted file mode 100644 index eb7a93b79..000000000 --- a/node_modules/bottleneck/scripts/assemble_lua.js +++ /dev/null @@ -1,25 +0,0 @@ -var fs = require('fs') - -var input = __dirname + '/../src/redis' -var loaded = {} - -var promises = fs.readdirSync(input).map(function (file) { - return new Promise(function (resolve, reject) { - fs.readFile(input + '/' + file, function (err, data) { - if (err != null) { - return reject(err) - } - loaded[file] = data.toString('utf8') - return resolve() - }) - }) -}) - -Promise.all(promises) -.then(function () { - console.log(JSON.stringify(loaded, Object.keys(loaded).sort(), 2)) -}) -.catch(function (err) { - console.error(err) - process.exit(1) -}) diff --git a/node_modules/bottleneck/scripts/build.sh b/node_modules/bottleneck/scripts/build.sh deleted file mode 100755 index 4aadfc659..000000000 --- a/node_modules/bottleneck/scripts/build.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [ ! -d node_modules ]; then - echo "[B] Run 'npm install' first" - exit 1 -fi - - -clean() { - rm -f .babelrc - rm -rf lib/* - node scripts/version.js > lib/version.json - node scripts/assemble_lua.js > lib/lua.json -} - -makeLib10() { - echo '[B] Compiling Bottleneck to Node 10+...' - npx coffee --compile --bare --no-header src/*.coffee - mv src/*.js lib/ -} - -makeLib6() { - echo '[B] Compiling Bottleneck to Node 6+...' - ln -s .babelrc.lib .babelrc - npx coffee --compile --bare --no-header --transpile src/*.coffee - mv src/*.js lib/ -} - -makeES5() { - echo '[B] Compiling Bottleneck to ES5...' - ln -s .babelrc.es5 .babelrc - npx coffee --compile --bare --no-header src/*.coffee - mv src/*.js lib/ - - echo '[B] Assembling ES5 bundle...' - npx rollup -c rollup.config.es5.js -} - -makeLight() { - makeLib10 - - echo '[B] Assembling light bundle...' - npx rollup -c rollup.config.light.js -} - -makeTypings() { - echo '[B] Compiling and testing TS typings...' - npx ejs-cli bottleneck.d.ts.ejs > bottleneck.d.ts - npx tsc --noEmit --strict test.ts -} - -if [ "$1" = 'dev' ]; then - clean - makeLib10 -elif [ "$1" = 'bench' ]; then - clean - makeLib6 -elif [ "$1" = 'es5' ]; then - clean - makeES5 -elif [ "$1" = 'light' ]; then - clean - makeLight -elif [ "$1" = 'typings' ]; then - makeTypings -else - clean - makeES5 - - clean - makeLight - - clean - makeLib6 - makeTypings -fi - -rm -f .babelrc - -echo '[B] Done!' diff --git a/node_modules/bottleneck/scripts/test_all.sh b/node_modules/bottleneck/scripts/test_all.sh deleted file mode 100755 index afc689292..000000000 --- a/node_modules/bottleneck/scripts/test_all.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -set -e - -source .env - -echo 'ioredis tests' -DATASTORE=ioredis npm test - -echo 'NodeRedis tests' -DATASTORE=redis npm test - -echo 'ES5 bundle tests' -BUILD=es5 npm test - -echo 'Light bundle tests' -BUILD=light npm test - -echo 'Local tests' -npm test diff --git a/node_modules/bottleneck/scripts/version.js b/node_modules/bottleneck/scripts/version.js deleted file mode 100644 index 75671dab0..000000000 --- a/node_modules/bottleneck/scripts/version.js +++ /dev/null @@ -1,3 +0,0 @@ -const packagejson = require('../package.json') - -console.log(JSON.stringify({version: packagejson.version})) diff --git a/node_modules/bottleneck/src/Batcher.coffee b/node_modules/bottleneck/src/Batcher.coffee deleted file mode 100644 index 5ddd66dcd..000000000 --- a/node_modules/bottleneck/src/Batcher.coffee +++ /dev/null @@ -1,39 +0,0 @@ -parser = require "./parser" -Events = require "./Events" - -class Batcher - defaults: - maxTime: null - maxSize: null - Promise: Promise - - constructor: (@options={}) -> - parser.load @options, @defaults, @ - @Events = new Events @ - @_arr = [] - @_resetPromise() - @_lastFlush = Date.now() - - _resetPromise: -> - @_promise = new @Promise (res, rej) => @_resolve = res - - _flush: -> - clearTimeout @_timeout - @_lastFlush = Date.now() - @_resolve() - @Events.trigger "batch", @_arr - @_arr = [] - @_resetPromise() - - add: (data) -> - @_arr.push data - ret = @_promise - if @_arr.length == @maxSize - @_flush() - else if @maxTime? and @_arr.length == 1 - @_timeout = setTimeout => - @_flush() - , @maxTime - ret - -module.exports = Batcher diff --git a/node_modules/bottleneck/src/Bottleneck.coffee b/node_modules/bottleneck/src/Bottleneck.coffee deleted file mode 100644 index 37db2befc..000000000 --- a/node_modules/bottleneck/src/Bottleneck.coffee +++ /dev/null @@ -1,298 +0,0 @@ -NUM_PRIORITIES = 10 -DEFAULT_PRIORITY = 5 - -parser = require "./parser" -Queues = require "./Queues" -Job = require "./Job" -LocalDatastore = require "./LocalDatastore" -RedisDatastore = require "./RedisDatastore" -Events = require "./Events" -States = require "./States" -Sync = require "./Sync" - -class Bottleneck - Bottleneck.default = Bottleneck - Bottleneck.Events = Events - Bottleneck.version = Bottleneck::version = require("./version.json").version - Bottleneck.strategy = Bottleneck::strategy = { LEAK:1, OVERFLOW:2, OVERFLOW_PRIORITY:4, BLOCK:3 } - Bottleneck.BottleneckError = Bottleneck::BottleneckError = require "./BottleneckError" - Bottleneck.Group = Bottleneck::Group = require "./Group" - Bottleneck.RedisConnection = Bottleneck::RedisConnection = require "./RedisConnection" - Bottleneck.IORedisConnection = Bottleneck::IORedisConnection = require "./IORedisConnection" - Bottleneck.Batcher = Bottleneck::Batcher = require "./Batcher" - jobDefaults: - priority: DEFAULT_PRIORITY - weight: 1 - expiration: null - id: "" - storeDefaults: - maxConcurrent: null - minTime: 0 - highWater: null - strategy: Bottleneck::strategy.LEAK - penalty: null - reservoir: null - reservoirRefreshInterval: null - reservoirRefreshAmount: null - reservoirIncreaseInterval: null - reservoirIncreaseAmount: null - reservoirIncreaseMaximum: null - localStoreDefaults: - Promise: Promise - timeout: null - heartbeatInterval: 250 - redisStoreDefaults: - Promise: Promise - timeout: null - heartbeatInterval: 5000 - clientTimeout: 10000 - Redis: null - clientOptions: {} - clusterNodes: null - clearDatastore: false - connection: null - instanceDefaults: - datastore: "local" - connection: null - id: "" - rejectOnDrop: true - trackDoneStatus: false - Promise: Promise - stopDefaults: - enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs." - dropWaitingJobs: true - dropErrorMessage: "This limiter has been stopped." - - constructor: (options={}, invalid...) -> - @_validateOptions options, invalid - parser.load options, @instanceDefaults, @ - @_queues = new Queues NUM_PRIORITIES - @_scheduled = {} - @_states = new States ["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(if @trackDoneStatus then ["DONE"] else []) - @_limiter = null - @Events = new Events @ - @_submitLock = new Sync "submit", @Promise - @_registerLock = new Sync "register", @Promise - storeOptions = parser.load options, @storeDefaults, {} - - @_store = if @datastore == "redis" or @datastore == "ioredis" or @connection? - storeInstanceOptions = parser.load options, @redisStoreDefaults, {} - new RedisDatastore @, storeOptions, storeInstanceOptions - else if @datastore == "local" - storeInstanceOptions = parser.load options, @localStoreDefaults, {} - new LocalDatastore @, storeOptions, storeInstanceOptions - else - throw new Bottleneck::BottleneckError "Invalid datastore type: #{@datastore}" - - @_queues.on "leftzero", => @_store.heartbeat?.ref?() - @_queues.on "zero", => @_store.heartbeat?.unref?() - - _validateOptions: (options, invalid) -> - unless options? and typeof options == "object" and invalid.length == 0 - throw new Bottleneck::BottleneckError "Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1." - - ready: -> @_store.ready - - clients: -> @_store.clients - - channel: -> "b_#{@id}" - - channel_client: -> "b_#{@id}_#{@_store.clientId}" - - publish: (message) -> @_store.__publish__ message - - disconnect: (flush=true) -> @_store.__disconnect__ flush - - chain: (@_limiter) -> @ - - queued: (priority) -> @_queues.queued priority - - clusterQueued: -> @_store.__queued__() - - empty: -> @queued() == 0 and @_submitLock.isEmpty() - - running: -> @_store.__running__() - - done: -> @_store.__done__() - - jobStatus: (id) -> @_states.jobStatus id - - jobs: (status) -> @_states.statusJobs status - - counts: -> @_states.statusCounts() - - _randomIndex: -> Math.random().toString(36).slice(2) - - check: (weight=1) -> @_store.__check__ weight - - _clearGlobalState: (index) -> - if @_scheduled[index]? - clearTimeout @_scheduled[index].expiration - delete @_scheduled[index] - true - else false - - _free: (index, job, options, eventInfo) -> - try - { running } = await @_store.__free__ index, options.weight - @Events.trigger "debug", "Freed #{options.id}", eventInfo - if running == 0 and @empty() then @Events.trigger "idle" - catch e - @Events.trigger "error", e - - _run: (index, job, wait) -> - job.doRun() - clearGlobalState = @_clearGlobalState.bind @, index - run = @_run.bind @, index, job - free = @_free.bind @, index, job - - @_scheduled[index] = - timeout: setTimeout => - job.doExecute @_limiter, clearGlobalState, run, free - , wait - expiration: if job.options.expiration? then setTimeout -> - job.doExpire clearGlobalState, run, free - , wait + job.options.expiration - job: job - - _drainOne: (capacity) -> - @_registerLock.schedule => - if @queued() == 0 then return @Promise.resolve null - queue = @_queues.getFirst() - { options, args } = next = queue.first() - if capacity? and options.weight > capacity then return @Promise.resolve null - @Events.trigger "debug", "Draining #{options.id}", { args, options } - index = @_randomIndex() - @_store.__register__ index, options.weight, options.expiration - .then ({ success, wait, reservoir }) => - @Events.trigger "debug", "Drained #{options.id}", { success, args, options } - if success - queue.shift() - empty = @empty() - if empty then @Events.trigger "empty" - if reservoir == 0 then @Events.trigger "depleted", empty - @_run index, next, wait - @Promise.resolve options.weight - else - @Promise.resolve null - - _drainAll: (capacity, total=0) -> - @_drainOne(capacity) - .then (drained) => - if drained? - newCapacity = if capacity? then capacity - drained else capacity - @_drainAll(newCapacity, total + drained) - else @Promise.resolve total - .catch (e) => @Events.trigger "error", e - - _dropAllQueued: (message) -> @_queues.shiftAll (job) -> job.doDrop { message } - - stop: (options={}) -> - options = parser.load options, @stopDefaults - waitForExecuting = (at) => - finished = => - counts = @_states.counts - (counts[0] + counts[1] + counts[2] + counts[3]) == at - new @Promise (resolve, reject) => - if finished() then resolve() - else - @on "done", => - if finished() - @removeAllListeners "done" - resolve() - done = if options.dropWaitingJobs - @_run = (index, next) -> next.doDrop { message: options.dropErrorMessage } - @_drainOne = => @Promise.resolve null - @_registerLock.schedule => @_submitLock.schedule => - for k, v of @_scheduled - if @jobStatus(v.job.options.id) == "RUNNING" - clearTimeout v.timeout - clearTimeout v.expiration - v.job.doDrop { message: options.dropErrorMessage } - @_dropAllQueued options.dropErrorMessage - waitForExecuting(0) - else - @schedule { priority: NUM_PRIORITIES - 1, weight: 0 }, => waitForExecuting(1) - @_receive = (job) -> job._reject new Bottleneck::BottleneckError options.enqueueErrorMessage - @stop = => @Promise.reject new Bottleneck::BottleneckError "stop() has already been called" - done - - _addToQueue: (job) => - { args, options } = job - try - { reachedHWM, blocked, strategy } = await @_store.__submit__ @queued(), options.weight - catch error - @Events.trigger "debug", "Could not queue #{options.id}", { args, options, error } - job.doDrop { error } - return false - - if blocked - job.doDrop() - return true - else if reachedHWM - shifted = if strategy == Bottleneck::strategy.LEAK then @_queues.shiftLastFrom(options.priority) - else if strategy == Bottleneck::strategy.OVERFLOW_PRIORITY then @_queues.shiftLastFrom(options.priority + 1) - else if strategy == Bottleneck::strategy.OVERFLOW then job - if shifted? then shifted.doDrop() - if not shifted? or strategy == Bottleneck::strategy.OVERFLOW - if not shifted? then job.doDrop() - return reachedHWM - - job.doQueue reachedHWM, blocked - @_queues.push job - await @_drainAll() - reachedHWM - - _receive: (job) -> - if @_states.jobStatus(job.options.id)? - job._reject new Bottleneck::BottleneckError "A job with the same id already exists (id=#{job.options.id})" - false - else - job.doReceive() - @_submitLock.schedule @_addToQueue, job - - submit: (args...) -> - if typeof args[0] == "function" - [fn, args..., cb] = args - options = parser.load {}, @jobDefaults - else - [options, fn, args..., cb] = args - options = parser.load options, @jobDefaults - - task = (args...) => - new @Promise (resolve, reject) -> - fn args..., (args...) -> - (if args[0]? then reject else resolve) args - - job = new Job task, args, options, @jobDefaults, @rejectOnDrop, @Events, @_states, @Promise - job.promise - .then (args) -> cb? args... - .catch (args) -> if Array.isArray args then cb? args... else cb? args - @_receive job - - schedule: (args...) -> - if typeof args[0] == "function" - [task, args...] = args - options = {} - else - [options, task, args...] = args - job = new Job task, args, options, @jobDefaults, @rejectOnDrop, @Events, @_states, @Promise - @_receive job - job.promise - - wrap: (fn) -> - schedule = @schedule.bind @ - wrapped = (args...) -> schedule fn.bind(@), args... - wrapped.withOptions = (options, args...) -> schedule options, fn, args... - wrapped - - updateSettings: (options={}) -> - await @_store.__updateSettings__ parser.overwrite options, @storeDefaults - parser.overwrite options, @instanceDefaults, @ - @ - - currentReservoir: -> @_store.__currentReservoir__() - - incrementReservoir: (incr=0) -> @_store.__incrementReservoir__ incr - -module.exports = Bottleneck diff --git a/node_modules/bottleneck/src/BottleneckError.coffee b/node_modules/bottleneck/src/BottleneckError.coffee deleted file mode 100644 index 157b8ac6a..000000000 --- a/node_modules/bottleneck/src/BottleneckError.coffee +++ /dev/null @@ -1,3 +0,0 @@ -class BottleneckError extends Error - -module.exports = BottleneckError diff --git a/node_modules/bottleneck/src/DLList.coffee b/node_modules/bottleneck/src/DLList.coffee deleted file mode 100644 index 9dded30cc..000000000 --- a/node_modules/bottleneck/src/DLList.coffee +++ /dev/null @@ -1,38 +0,0 @@ -class DLList - constructor: (@incr, @decr) -> - @_first = null - @_last = null - @length = 0 - push: (value) -> - @length++ - @incr?() - node = { value, prev: @_last, next: null } - if @_last? - @_last.next = node - @_last = node - else @_first = @_last = node - undefined - shift: () -> - if not @_first? then return - else - @length-- - @decr?() - value = @_first.value - if (@_first = @_first.next)? - @_first.prev = null - else - @_last = null - value - first: () -> if @_first? then @_first.value - getArray: () -> - node = @_first - while node? then (ref = node; node = node.next; ref.value) - forEachShift: (cb) -> - node = @shift() - while node? then (cb node; node = @shift()) - undefined - debug: () -> - node = @_first - while node? then (ref = node; node = node.next; { value: ref.value, prev: ref.prev?.value, next: ref.next?.value }) - -module.exports = DLList diff --git a/node_modules/bottleneck/src/Events.coffee b/node_modules/bottleneck/src/Events.coffee deleted file mode 100644 index c96b31a43..000000000 --- a/node_modules/bottleneck/src/Events.coffee +++ /dev/null @@ -1,38 +0,0 @@ -class Events - constructor: (@instance) -> - @_events = {} - if @instance.on? or @instance.once? or @instance.removeAllListeners? - throw new Error "An Emitter already exists for this object" - @instance.on = (name, cb) => @_addListener name, "many", cb - @instance.once = (name, cb) => @_addListener name, "once", cb - @instance.removeAllListeners = (name=null) => - if name? then delete @_events[name] else @_events = {} - _addListener: (name, status, cb) -> - @_events[name] ?= [] - @_events[name].push {cb, status} - @instance - listenerCount: (name) -> - if @_events[name]? then @_events[name].length else 0 - trigger: (name, args...) -> - try - if name != "debug" then @trigger "debug", "Event triggered: #{name}", args - return unless @_events[name]? - @_events[name] = @_events[name].filter (listener) -> listener.status != "none" - promises = @_events[name].map (listener) => - return if listener.status == "none" - if listener.status == "once" then listener.status = "none" - try - returned = listener.cb?(args...) - if typeof returned?.then == "function" - await returned - else - returned - catch e - if "name" != "error" then @trigger "error", e - null - (await Promise.all promises).find (x) -> x? - catch e - if "name" != "error" then @trigger "error", e - null - -module.exports = Events diff --git a/node_modules/bottleneck/src/Group.coffee b/node_modules/bottleneck/src/Group.coffee deleted file mode 100644 index 210b5024d..000000000 --- a/node_modules/bottleneck/src/Group.coffee +++ /dev/null @@ -1,80 +0,0 @@ -parser = require "./parser" -Events = require "./Events" -RedisConnection = require "./RedisConnection" -IORedisConnection = require "./IORedisConnection" -Scripts = require "./Scripts" - -class Group - defaults: - timeout: 1000 * 60 * 5 - connection: null - Promise: Promise - id: "group-key" - - constructor: (@limiterOptions={}) -> - parser.load @limiterOptions, @defaults, @ - @Events = new Events @ - @instances = {} - @Bottleneck = require "./Bottleneck" - @_startAutoCleanup() - @sharedConnection = @connection? - - if !@connection? - if @limiterOptions.datastore == "redis" - @connection = new RedisConnection Object.assign {}, @limiterOptions, { @Events } - else if @limiterOptions.datastore == "ioredis" - @connection = new IORedisConnection Object.assign {}, @limiterOptions, { @Events } - - key: (key="") -> @instances[key] ? do => - limiter = @instances[key] = new @Bottleneck Object.assign @limiterOptions, { - id: "#{@id}-#{key}", - @timeout, - @connection - } - @Events.trigger "created", limiter, key - limiter - - deleteKey: (key="") => - instance = @instances[key] - if @connection - deleted = await @connection.__runCommand__ ['del', Scripts.allKeys("#{@id}-#{key}")...] - if instance? - delete @instances[key] - await instance.disconnect() - instance? or deleted > 0 - - limiters: -> { key: k, limiter: v } for k, v of @instances - - keys: -> Object.keys @instances - - clusterKeys: -> - if !@connection? then return @Promise.resolve @keys() - keys = [] - cursor = null - start = "b_#{@id}-".length - end = "_settings".length - until cursor == 0 - [next, found] = await @connection.__runCommand__ ["scan", (cursor ? 0), "match", "b_#{@id}-*_settings", "count", 10000] - cursor = ~~next - keys.push(k.slice(start, -end)) for k in found - keys - - _startAutoCleanup: -> - clearInterval @interval - (@interval = setInterval => - time = Date.now() - for k, v of @instances - try if await v._store.__groupCheck__(time) then @deleteKey k - catch e then v.Events.trigger "error", e - , (@timeout / 2)).unref?() - - updateSettings: (options={}) -> - parser.overwrite options, @defaults, @ - parser.overwrite options, options, @limiterOptions - @_startAutoCleanup() if options.timeout? - - disconnect: (flush=true) -> - if !@sharedConnection - @connection?.disconnect flush - -module.exports = Group diff --git a/node_modules/bottleneck/src/IORedisConnection.coffee b/node_modules/bottleneck/src/IORedisConnection.coffee deleted file mode 100644 index 211b12456..000000000 --- a/node_modules/bottleneck/src/IORedisConnection.coffee +++ /dev/null @@ -1,84 +0,0 @@ -parser = require "./parser" -Events = require "./Events" -Scripts = require "./Scripts" - -class IORedisConnection - datastore: "ioredis" - defaults: - Redis: null - clientOptions: {} - clusterNodes: null - client: null - Promise: Promise - Events: null - - constructor: (options={}) -> - parser.load options, @defaults, @ - @Redis ?= eval("require")("ioredis") # Obfuscated or else Webpack/Angular will try to inline the optional ioredis module. To override this behavior: pass the ioredis module to Bottleneck as the 'Redis' option. - @Events ?= new Events @ - @terminated = false - - if @clusterNodes? - @client = new @Redis.Cluster @clusterNodes, @clientOptions - @subscriber = new @Redis.Cluster @clusterNodes, @clientOptions - else if @client? and !@client.duplicate? - @subscriber = new @Redis.Cluster @client.startupNodes, @client.options - else - @client ?= new @Redis @clientOptions - @subscriber = @client.duplicate() - @limiters = {} - - @ready = @Promise.all [@_setup(@client, false), @_setup(@subscriber, true)] - .then => - @_loadScripts() - { @client, @subscriber } - - _setup: (client, sub) -> - client.setMaxListeners 0 - new @Promise (resolve, reject) => - client.on "error", (e) => @Events.trigger "error", e - if sub - client.on "message", (channel, message) => - @limiters[channel]?._store.onMessage channel, message - if client.status == "ready" then resolve() - else client.once "ready", resolve - - _loadScripts: -> Scripts.names.forEach (name) => @client.defineCommand name, { lua: Scripts.payload(name) } - - __runCommand__: (cmd) -> - await @ready - [[_, deleted]] = await @client.pipeline([cmd]).exec() - deleted - - __addLimiter__: (instance) -> - @Promise.all [instance.channel(), instance.channel_client()].map (channel) => - new @Promise (resolve, reject) => - @subscriber.subscribe channel, => - @limiters[channel] = instance - resolve() - - __removeLimiter__: (instance) -> - [instance.channel(), instance.channel_client()].forEach (channel) => - await @subscriber.unsubscribe channel unless @terminated - delete @limiters[channel] - - __scriptArgs__: (name, id, args, cb) -> - keys = Scripts.keys name, id - [keys.length].concat keys, args, cb - - __scriptFn__: (name) -> - @client[name].bind(@client) - - disconnect: (flush=true) -> - clearInterval(@limiters[k]._store.heartbeat) for k in Object.keys @limiters - @limiters = {} - @terminated = true - - if flush - @Promise.all [@client.quit(), @subscriber.quit()] - else - @client.disconnect() - @subscriber.disconnect() - @Promise.resolve() - -module.exports = IORedisConnection diff --git a/node_modules/bottleneck/src/Job.coffee b/node_modules/bottleneck/src/Job.coffee deleted file mode 100644 index 32cf1bccb..000000000 --- a/node_modules/bottleneck/src/Job.coffee +++ /dev/null @@ -1,98 +0,0 @@ -NUM_PRIORITIES = 10 -DEFAULT_PRIORITY = 5 - -parser = require "./parser" -BottleneckError = require "./BottleneckError" - -class Job - constructor: (@task, @args, options, jobDefaults, @rejectOnDrop, @Events, @_states, @Promise) -> - @options = parser.load options, jobDefaults - @options.priority = @_sanitizePriority @options.priority - if @options.id == jobDefaults.id then @options.id = "#{@options.id}-#{@_randomIndex()}" - @promise = new @Promise (@_resolve, @_reject) => - @retryCount = 0 - - _sanitizePriority: (priority) -> - sProperty = if ~~priority != priority then DEFAULT_PRIORITY else priority - if sProperty < 0 then 0 else if sProperty > NUM_PRIORITIES-1 then NUM_PRIORITIES-1 else sProperty - - _randomIndex: -> Math.random().toString(36).slice(2) - - doDrop: ({ error, message="This job has been dropped by Bottleneck" } = {}) -> - if @_states.remove @options.id - if @rejectOnDrop then @_reject (error ? new BottleneckError message) - @Events.trigger "dropped", { @args, @options, @task, @promise } - true - else - false - - _assertStatus: (expected) -> - status = @_states.jobStatus @options.id - if not (status == expected or (expected == "DONE" and status == null)) - throw new BottleneckError "Invalid job status #{status}, expected #{expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues" - - doReceive: () -> - @_states.start @options.id - @Events.trigger "received", { @args, @options } - - doQueue: (reachedHWM, blocked) -> - @_assertStatus "RECEIVED" - @_states.next @options.id - @Events.trigger "queued", { @args, @options, reachedHWM, blocked } - - doRun: () -> - if @retryCount == 0 - @_assertStatus "QUEUED" - @_states.next @options.id - else @_assertStatus "EXECUTING" - @Events.trigger "scheduled", { @args, @options } - - doExecute: (chained, clearGlobalState, run, free) -> - if @retryCount == 0 - @_assertStatus "RUNNING" - @_states.next @options.id - else @_assertStatus "EXECUTING" - eventInfo = { @args, @options, @retryCount } - @Events.trigger "executing", eventInfo - - try - passed = await if chained? - chained.schedule @options, @task, @args... - else @task @args... - - if clearGlobalState() - @doDone eventInfo - await free @options, eventInfo - @_assertStatus "DONE" - @_resolve passed - catch error - @_onFailure error, eventInfo, clearGlobalState, run, free - - doExpire: (clearGlobalState, run, free) -> - if @_states.jobStatus @options.id == "RUNNING" - @_states.next @options.id - @_assertStatus "EXECUTING" - eventInfo = { @args, @options, @retryCount } - error = new BottleneckError "This job timed out after #{@options.expiration} ms." - @_onFailure error, eventInfo, clearGlobalState, run, free - - _onFailure: (error, eventInfo, clearGlobalState, run, free) -> - if clearGlobalState() - retry = await @Events.trigger "failed", error, eventInfo - if retry? - retryAfter = ~~retry - @Events.trigger "retry", "Retrying #{@options.id} after #{retryAfter} ms", eventInfo - @retryCount++ - run retryAfter - else - @doDone eventInfo - await free @options, eventInfo - @_assertStatus "DONE" - @_reject error - - doDone: (eventInfo) -> - @_assertStatus "EXECUTING" - @_states.next @options.id - @Events.trigger "done", eventInfo - -module.exports = Job diff --git a/node_modules/bottleneck/src/LocalDatastore.coffee b/node_modules/bottleneck/src/LocalDatastore.coffee deleted file mode 100644 index 690aa34fc..000000000 --- a/node_modules/bottleneck/src/LocalDatastore.coffee +++ /dev/null @@ -1,140 +0,0 @@ -parser = require "./parser" -BottleneckError = require "./BottleneckError" - -class LocalDatastore - constructor: (@instance, @storeOptions, storeInstanceOptions) -> - @clientId = @instance._randomIndex() - parser.load storeInstanceOptions, storeInstanceOptions, @ - @_nextRequest = @_lastReservoirRefresh = @_lastReservoirIncrease = Date.now() - @_running = 0 - @_done = 0 - @_unblockTime = 0 - @ready = @Promise.resolve() - @clients = {} - @_startHeartbeat() - - _startHeartbeat: -> - if !@heartbeat? and (( - @storeOptions.reservoirRefreshInterval? and @storeOptions.reservoirRefreshAmount? - ) or ( - @storeOptions.reservoirIncreaseInterval? and @storeOptions.reservoirIncreaseAmount? - )) - (@heartbeat = setInterval => - now = Date.now() - - if @storeOptions.reservoirRefreshInterval? and now >= @_lastReservoirRefresh + @storeOptions.reservoirRefreshInterval - @_lastReservoirRefresh = now - @storeOptions.reservoir = @storeOptions.reservoirRefreshAmount - @instance._drainAll @computeCapacity() - - if @storeOptions.reservoirIncreaseInterval? and now >= @_lastReservoirIncrease + @storeOptions.reservoirIncreaseInterval - { reservoirIncreaseAmount: amount, reservoirIncreaseMaximum: maximum, reservoir } = @storeOptions - @_lastReservoirIncrease = now - incr = if maximum? then Math.min amount, maximum - reservoir else amount - if incr > 0 - @storeOptions.reservoir += incr - @instance._drainAll @computeCapacity() - - , @heartbeatInterval).unref?() - else clearInterval @heartbeat - - __publish__: (message) -> - await @yieldLoop() - @instance.Events.trigger "message", message.toString() - - __disconnect__: (flush) -> - await @yieldLoop() - clearInterval @heartbeat - @Promise.resolve() - - yieldLoop: (t=0) -> new @Promise (resolve, reject) -> setTimeout resolve, t - - computePenalty: -> @storeOptions.penalty ? ((15 * @storeOptions.minTime) or 5000) - - __updateSettings__: (options) -> - await @yieldLoop() - parser.overwrite options, options, @storeOptions - @_startHeartbeat() - @instance._drainAll @computeCapacity() - true - - __running__: -> - await @yieldLoop() - @_running - - __queued__: -> - await @yieldLoop() - @instance.queued() - - __done__: -> - await @yieldLoop() - @_done - - __groupCheck__: (time) -> - await @yieldLoop() - (@_nextRequest + @timeout) < time - - computeCapacity: -> - { maxConcurrent, reservoir } = @storeOptions - if maxConcurrent? and reservoir? then Math.min((maxConcurrent - @_running), reservoir) - else if maxConcurrent? then maxConcurrent - @_running - else if reservoir? then reservoir - else null - - conditionsCheck: (weight) -> - capacity = @computeCapacity() - not capacity? or weight <= capacity - - __incrementReservoir__: (incr) -> - await @yieldLoop() - reservoir = @storeOptions.reservoir += incr - @instance._drainAll @computeCapacity() - reservoir - - __currentReservoir__: -> - await @yieldLoop() - @storeOptions.reservoir - - isBlocked: (now) -> @_unblockTime >= now - - check: (weight, now) -> @conditionsCheck(weight) and (@_nextRequest - now) <= 0 - - __check__: (weight) -> - await @yieldLoop() - now = Date.now() - @check weight, now - - __register__: (index, weight, expiration) -> - await @yieldLoop() - now = Date.now() - if @conditionsCheck weight - @_running += weight - if @storeOptions.reservoir? then @storeOptions.reservoir -= weight - wait = Math.max @_nextRequest - now, 0 - @_nextRequest = now + wait + @storeOptions.minTime - { success: true, wait, reservoir: @storeOptions.reservoir } - else { success: false } - - strategyIsBlock: -> @storeOptions.strategy == 3 - - __submit__: (queueLength, weight) -> - await @yieldLoop() - if @storeOptions.maxConcurrent? and weight > @storeOptions.maxConcurrent - throw new BottleneckError("Impossible to add a job having a weight of #{weight} to a limiter having a maxConcurrent setting of #{@storeOptions.maxConcurrent}") - now = Date.now() - reachedHWM = @storeOptions.highWater? and queueLength == @storeOptions.highWater and not @check(weight, now) - blocked = @strategyIsBlock() and (reachedHWM or @isBlocked now) - if blocked - @_unblockTime = now + @computePenalty() - @_nextRequest = @_unblockTime + @storeOptions.minTime - @instance._dropAllQueued() - { reachedHWM, blocked, strategy: @storeOptions.strategy } - - __free__: (index, weight) -> - await @yieldLoop() - @_running -= weight - @_done += weight - @instance._drainAll @computeCapacity() - { running: @_running } - -module.exports = LocalDatastore diff --git a/node_modules/bottleneck/src/Queues.coffee b/node_modules/bottleneck/src/Queues.coffee deleted file mode 100644 index b563ae361..000000000 --- a/node_modules/bottleneck/src/Queues.coffee +++ /dev/null @@ -1,28 +0,0 @@ -DLList = require "./DLList" -Events = require "./Events" - -class Queues - - constructor: (num_priorities) -> - @Events = new Events @ - @_length = 0 - @_lists = for i in [1..num_priorities] then new DLList (=> @incr()), (=> @decr()) - - incr: -> if @_length++ == 0 then @Events.trigger "leftzero" - - decr: -> if --@_length == 0 then @Events.trigger "zero" - - push: (job) -> @_lists[job.options.priority].push job - - queued: (priority) -> if priority? then @_lists[priority].length else @_length - - shiftAll: (fn) -> @_lists.forEach (list) -> list.forEachShift fn - - getFirst: (arr=@_lists) -> - for list in arr - return list if list.length > 0 - [] - - shiftLastFrom: (priority) -> @getFirst(@_lists[priority..].reverse()).shift() - -module.exports = Queues diff --git a/node_modules/bottleneck/src/RedisConnection.coffee b/node_modules/bottleneck/src/RedisConnection.coffee deleted file mode 100644 index 15379ef68..000000000 --- a/node_modules/bottleneck/src/RedisConnection.coffee +++ /dev/null @@ -1,91 +0,0 @@ -parser = require "./parser" -Events = require "./Events" -Scripts = require "./Scripts" - -class RedisConnection - datastore: "redis" - defaults: - Redis: null - clientOptions: {} - client: null - Promise: Promise - Events: null - - constructor: (options={}) -> - parser.load options, @defaults, @ - @Redis ?= eval("require")("redis") # Obfuscated or else Webpack/Angular will try to inline the optional redis module. To override this behavior: pass the redis module to Bottleneck as the 'Redis' option. - @Events ?= new Events @ - @terminated = false - - @client ?= @Redis.createClient @clientOptions - @subscriber = @client.duplicate() - @limiters = {} - @shas = {} - - @ready = @Promise.all [@_setup(@client, false), @_setup(@subscriber, true)] - .then => @_loadScripts() - .then => { @client, @subscriber } - - _setup: (client, sub) -> - client.setMaxListeners 0 - new @Promise (resolve, reject) => - client.on "error", (e) => @Events.trigger "error", e - if sub - client.on "message", (channel, message) => - @limiters[channel]?._store.onMessage channel, message - if client.ready then resolve() - else client.once "ready", resolve - - _loadScript: (name) -> - new @Promise (resolve, reject) => - payload = Scripts.payload name - @client.multi([["script", "load", payload]]).exec (err, replies) => - if err? then return reject err - @shas[name] = replies[0] - resolve replies[0] - - _loadScripts: -> @Promise.all(Scripts.names.map (k) => @_loadScript k) - - __runCommand__: (cmd) -> - await @ready - new @Promise (resolve, reject) => - @client.multi([cmd]).exec_atomic (err, replies) -> - if err? then reject(err) else resolve(replies[0]) - - __addLimiter__: (instance) -> - @Promise.all [instance.channel(), instance.channel_client()].map (channel) => - new @Promise (resolve, reject) => - handler = (chan) => - if chan == channel - @subscriber.removeListener "subscribe", handler - @limiters[channel] = instance - resolve() - @subscriber.on "subscribe", handler - @subscriber.subscribe channel - - __removeLimiter__: (instance) -> - @Promise.all [instance.channel(), instance.channel_client()].map (channel) => - unless @terminated - await new @Promise (resolve, reject) => - @subscriber.unsubscribe channel, (err, chan) -> - if err? then return reject err - if chan == channel then return resolve() - delete @limiters[channel] - - __scriptArgs__: (name, id, args, cb) -> - keys = Scripts.keys name, id - [@shas[name], keys.length].concat keys, args, cb - - __scriptFn__: (name) -> - @client.evalsha.bind(@client) - - disconnect: (flush=true) -> - clearInterval(@limiters[k]._store.heartbeat) for k in Object.keys @limiters - @limiters = {} - @terminated = true - - @client.end flush - @subscriber.end flush - @Promise.resolve() - -module.exports = RedisConnection diff --git a/node_modules/bottleneck/src/RedisDatastore.coffee b/node_modules/bottleneck/src/RedisDatastore.coffee deleted file mode 100644 index 4a2154f21..000000000 --- a/node_modules/bottleneck/src/RedisDatastore.coffee +++ /dev/null @@ -1,158 +0,0 @@ -parser = require "./parser" -BottleneckError = require "./BottleneckError" -RedisConnection = require "./RedisConnection" -IORedisConnection = require "./IORedisConnection" - -class RedisDatastore - constructor: (@instance, @storeOptions, storeInstanceOptions) -> - @originalId = @instance.id - @clientId = @instance._randomIndex() - parser.load storeInstanceOptions, storeInstanceOptions, @ - @clients = {} - @capacityPriorityCounters = {} - @sharedConnection = @connection? - - @connection ?= if @instance.datastore == "redis" then new RedisConnection { @Redis, @clientOptions, @Promise, Events: @instance.Events } - else if @instance.datastore == "ioredis" then new IORedisConnection { @Redis, @clientOptions, @clusterNodes, @Promise, Events: @instance.Events } - - @instance.connection = @connection - @instance.datastore = @connection.datastore - - @ready = @connection.ready - .then (@clients) => @runScript "init", @prepareInitSettings @clearDatastore - .then => @connection.__addLimiter__ @instance - .then => @runScript "register_client", [@instance.queued()] - .then => - (@heartbeat = setInterval => - @runScript "heartbeat", [] - .catch (e) => @instance.Events.trigger "error", e - , @heartbeatInterval).unref?() - @clients - - __publish__: (message) -> - { client } = await @ready - client.publish(@instance.channel(), "message:#{message.toString()}") - - onMessage: (channel, message) -> - try - pos = message.indexOf(":") - [type, data] = [message.slice(0, pos), message.slice(pos+1)] - if type == "capacity" - await @instance._drainAll(if data.length > 0 then ~~data) - else if type == "capacity-priority" - [rawCapacity, priorityClient, counter] = data.split(":") - capacity = if rawCapacity.length > 0 then ~~rawCapacity - if priorityClient == @clientId - drained = await @instance._drainAll(capacity) - newCapacity = if capacity? then capacity - (drained or 0) else "" - await @clients.client.publish(@instance.channel(), "capacity-priority:#{newCapacity}::#{counter}") - else if priorityClient == "" - clearTimeout @capacityPriorityCounters[counter] - delete @capacityPriorityCounters[counter] - @instance._drainAll(capacity) - else - @capacityPriorityCounters[counter] = setTimeout => - try - delete @capacityPriorityCounters[counter] - await @runScript "blacklist_client", [priorityClient] - await @instance._drainAll(capacity) - catch e then @instance.Events.trigger "error", e - , 1000 - else if type == "message" - @instance.Events.trigger "message", data - else if type == "blocked" - await @instance._dropAllQueued() - catch e then @instance.Events.trigger "error", e - - __disconnect__: (flush) -> - clearInterval @heartbeat - if @sharedConnection - @connection.__removeLimiter__ @instance - else - @connection.disconnect flush - - runScript: (name, args) -> - await @ready unless name == "init" or name == "register_client" - new @Promise (resolve, reject) => - all_args = [Date.now(), @clientId].concat args - @instance.Events.trigger "debug", "Calling Redis script: #{name}.lua", all_args - arr = @connection.__scriptArgs__ name, @originalId, all_args, (err, replies) -> - if err? then return reject err - return resolve replies - @connection.__scriptFn__(name) arr... - .catch (e) => - if e.message == "SETTINGS_KEY_NOT_FOUND" - if name == "heartbeat" then @Promise.resolve() - else - @runScript("init", @prepareInitSettings(false)) - .then => @runScript(name, args) - else if e.message == "UNKNOWN_CLIENT" - @runScript("register_client", [@instance.queued()]) - .then => @runScript(name, args) - else @Promise.reject e - - prepareArray: (arr) -> (if x? then x.toString() else "") for x in arr - - prepareObject: (obj) -> - arr = [] - for k, v of obj then arr.push k, (if v? then v.toString() else "") - arr - - prepareInitSettings: (clear) -> - args = @prepareObject Object.assign({}, @storeOptions, { - id: @originalId - version: @instance.version - groupTimeout: @timeout - @clientTimeout - }) - args.unshift (if clear then 1 else 0), @instance.version - args - - convertBool: (b) -> !!b - - __updateSettings__: (options) -> - await @runScript "update_settings", @prepareObject options - parser.overwrite options, options, @storeOptions - - __running__: -> @runScript "running", [] - - __queued__: -> @runScript "queued", [] - - __done__: -> @runScript "done", [] - - __groupCheck__: -> @convertBool await @runScript "group_check", [] - - __incrementReservoir__: (incr) -> @runScript "increment_reservoir", [incr] - - __currentReservoir__: -> @runScript "current_reservoir", [] - - __check__: (weight) -> @convertBool await @runScript "check", @prepareArray [weight] - - __register__: (index, weight, expiration) -> - [success, wait, reservoir] = await @runScript "register", @prepareArray [index, weight, expiration] - return { - success: @convertBool(success), - wait, - reservoir - } - - __submit__: (queueLength, weight) -> - try - [reachedHWM, blocked, strategy] = await @runScript "submit", @prepareArray [queueLength, weight] - return { - reachedHWM: @convertBool(reachedHWM), - blocked: @convertBool(blocked), - strategy - } - catch e - if e.message.indexOf("OVERWEIGHT") == 0 - [overweight, weight, maxConcurrent] = e.message.split ":" - throw new BottleneckError("Impossible to add a job having a weight of #{weight} to a limiter having a maxConcurrent setting of #{maxConcurrent}") - else - throw e - - __free__: (index, weight) -> - running = await @runScript "free", @prepareArray [index] - return { running } - -module.exports = RedisDatastore diff --git a/node_modules/bottleneck/src/Scripts.coffee b/node_modules/bottleneck/src/Scripts.coffee deleted file mode 100644 index d614abf05..000000000 --- a/node_modules/bottleneck/src/Scripts.coffee +++ /dev/null @@ -1,151 +0,0 @@ -lua = require "./lua.json" - -headers = - refs: lua["refs.lua"] - validate_keys: lua["validate_keys.lua"] - validate_client: lua["validate_client.lua"] - refresh_expiration: lua["refresh_expiration.lua"] - process_tick: lua["process_tick.lua"] - conditions_check: lua["conditions_check.lua"] - get_time: lua["get_time.lua"] - -exports.allKeys = (id) -> [ - ### - HASH - ### - "b_#{id}_settings" - - ### - HASH - job index -> weight - ### - "b_#{id}_job_weights" - - ### - ZSET - job index -> expiration - ### - "b_#{id}_job_expirations" - - ### - HASH - job index -> client - ### - "b_#{id}_job_clients" - - ### - ZSET - client -> sum running - ### - "b_#{id}_client_running" - - ### - HASH - client -> num queued - ### - "b_#{id}_client_num_queued" - - ### - ZSET - client -> last job registered - ### - "b_#{id}_client_last_registered" - - ### - ZSET - client -> last seen - ### - "b_#{id}_client_last_seen" -] - -templates = - init: - keys: exports.allKeys - headers: ["process_tick"] - refresh_expiration: true - code: lua["init.lua"] - group_check: - keys: exports.allKeys - headers: [] - refresh_expiration: false - code: lua["group_check.lua"] - register_client: - keys: exports.allKeys - headers: ["validate_keys"] - refresh_expiration: false - code: lua["register_client.lua"] - blacklist_client: - keys: exports.allKeys - headers: ["validate_keys", "validate_client"] - refresh_expiration: false - code: lua["blacklist_client.lua"] - heartbeat: - keys: exports.allKeys - headers: ["validate_keys", "validate_client", "process_tick"] - refresh_expiration: false - code: lua["heartbeat.lua"] - update_settings: - keys: exports.allKeys - headers: ["validate_keys", "validate_client", "process_tick"] - refresh_expiration: true - code: lua["update_settings.lua"] - running: - keys: exports.allKeys - headers: ["validate_keys", "validate_client", "process_tick"] - refresh_expiration: false - code: lua["running.lua"] - queued: - keys: exports.allKeys - headers: ["validate_keys", "validate_client"] - refresh_expiration: false - code: lua["queued.lua"] - done: - keys: exports.allKeys - headers: ["validate_keys", "validate_client", "process_tick"] - refresh_expiration: false - code: lua["done.lua"] - check: - keys: exports.allKeys - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"] - refresh_expiration: false - code: lua["check.lua"] - submit: - keys: exports.allKeys - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"] - refresh_expiration: true - code: lua["submit.lua"] - register: - keys: exports.allKeys - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"] - refresh_expiration: true - code: lua["register.lua"] - free: - keys: exports.allKeys - headers: ["validate_keys", "validate_client", "process_tick"] - refresh_expiration: true - code: lua["free.lua"] - current_reservoir: - keys: exports.allKeys - headers: ["validate_keys", "validate_client", "process_tick"] - refresh_expiration: false - code: lua["current_reservoir.lua"] - increment_reservoir: - keys: exports.allKeys - headers: ["validate_keys", "validate_client", "process_tick"] - refresh_expiration: true - code: lua["increment_reservoir.lua"] - -exports.names = Object.keys templates - -exports.keys = (name, id) -> - templates[name].keys id - -exports.payload = (name) -> - template = templates[name] - Array::concat( - headers.refs, - template.headers.map((h) -> headers[h]), - (if template.refresh_expiration then headers.refresh_expiration else ""), - template.code - ) - .join("\n") diff --git a/node_modules/bottleneck/src/States.coffee b/node_modules/bottleneck/src/States.coffee deleted file mode 100644 index c382c3dd8..000000000 --- a/node_modules/bottleneck/src/States.coffee +++ /dev/null @@ -1,43 +0,0 @@ -BottleneckError = require "./BottleneckError" -class States - constructor: (@status) -> - @_jobs = {} - @counts = @status.map(-> 0) - - next: (id) -> - current = @_jobs[id] - next = current + 1 - if current? and next < @status.length - @counts[current]-- - @counts[next]++ - @_jobs[id]++ - else if current? - @counts[current]-- - delete @_jobs[id] - - start: (id) -> - initial = 0 - @_jobs[id] = initial - @counts[initial]++ - - remove: (id) -> - current = @_jobs[id] - if current? - @counts[current]-- - delete @_jobs[id] - current? - - jobStatus: (id) -> @status[@_jobs[id]] ? null - - statusJobs: (status) -> - if status? - pos = @status.indexOf status - if pos < 0 - throw new BottleneckError "status must be one of #{@status.join ', '}" - k for k,v of @_jobs when v == pos - else - Object.keys @_jobs - - statusCounts: -> @counts.reduce(((acc, v, i) => acc[@status[i]] = v; acc), {}) - -module.exports = States diff --git a/node_modules/bottleneck/src/Sync.coffee b/node_modules/bottleneck/src/Sync.coffee deleted file mode 100644 index 9df45135f..000000000 --- a/node_modules/bottleneck/src/Sync.coffee +++ /dev/null @@ -1,28 +0,0 @@ -DLList = require "./DLList" -class Sync - constructor: (@name, @Promise) -> - @_running = 0 - @_queue = new DLList() - isEmpty: -> @_queue.length == 0 - _tryToRun: -> - if (@_running < 1) and @_queue.length > 0 - @_running++ - { task, args, resolve, reject } = @_queue.shift() - cb = try - returned = await task args... - () -> resolve returned - catch error - () -> reject error - @_running-- - @_tryToRun() - cb() - schedule: (task, args...) => - resolve = reject = null - promise = new @Promise (_resolve, _reject) -> - resolve = _resolve - reject = _reject - @_queue.push { task, args, resolve, reject } - @_tryToRun() - promise - -module.exports = Sync diff --git a/node_modules/bottleneck/src/es5.coffee b/node_modules/bottleneck/src/es5.coffee deleted file mode 100644 index 12761a733..000000000 --- a/node_modules/bottleneck/src/es5.coffee +++ /dev/null @@ -1,3 +0,0 @@ -require("regenerator-runtime/runtime") - -module.exports = require "./Bottleneck" diff --git a/node_modules/bottleneck/src/index.coffee b/node_modules/bottleneck/src/index.coffee deleted file mode 100644 index 7a7fcb207..000000000 --- a/node_modules/bottleneck/src/index.coffee +++ /dev/null @@ -1 +0,0 @@ -module.exports = require "./Bottleneck" diff --git a/node_modules/bottleneck/src/parser.coffee b/node_modules/bottleneck/src/parser.coffee deleted file mode 100644 index b662fb1e2..000000000 --- a/node_modules/bottleneck/src/parser.coffee +++ /dev/null @@ -1,10 +0,0 @@ -exports.load = (received, defaults, onto={}) -> - for k, v of defaults - onto[k] = received[k] ? v - onto - -exports.overwrite = (received, defaults, onto={}) -> - for k, v of received - if defaults[k] != undefined - onto[k] = v - onto diff --git a/node_modules/bottleneck/src/redis/blacklist_client.lua b/node_modules/bottleneck/src/redis/blacklist_client.lua deleted file mode 100644 index 953ae54ba..000000000 --- a/node_modules/bottleneck/src/redis/blacklist_client.lua +++ /dev/null @@ -1,8 +0,0 @@ -local blacklist = ARGV[num_static_argv + 1] - -if redis.call('zscore', client_last_seen_key, blacklist) then - redis.call('zadd', client_last_seen_key, 0, blacklist) -end - - -return {} diff --git a/node_modules/bottleneck/src/redis/check.lua b/node_modules/bottleneck/src/redis/check.lua deleted file mode 100644 index 556e36548..000000000 --- a/node_modules/bottleneck/src/redis/check.lua +++ /dev/null @@ -1,6 +0,0 @@ -local weight = tonumber(ARGV[num_static_argv + 1]) - -local capacity = process_tick(now, false)['capacity'] -local nextRequest = tonumber(redis.call('hget', settings_key, 'nextRequest')) - -return conditions_check(capacity, weight) and nextRequest - now <= 0 diff --git a/node_modules/bottleneck/src/redis/conditions_check.lua b/node_modules/bottleneck/src/redis/conditions_check.lua deleted file mode 100644 index c46fff56e..000000000 --- a/node_modules/bottleneck/src/redis/conditions_check.lua +++ /dev/null @@ -1,3 +0,0 @@ -local conditions_check = function (capacity, weight) - return capacity == nil or weight <= capacity -end diff --git a/node_modules/bottleneck/src/redis/current_reservoir.lua b/node_modules/bottleneck/src/redis/current_reservoir.lua deleted file mode 100644 index cdfca4452..000000000 --- a/node_modules/bottleneck/src/redis/current_reservoir.lua +++ /dev/null @@ -1 +0,0 @@ -return process_tick(now, false)['reservoir'] diff --git a/node_modules/bottleneck/src/redis/done.lua b/node_modules/bottleneck/src/redis/done.lua deleted file mode 100644 index 99b725023..000000000 --- a/node_modules/bottleneck/src/redis/done.lua +++ /dev/null @@ -1,3 +0,0 @@ -process_tick(now, false) - -return tonumber(redis.call('hget', settings_key, 'done')) diff --git a/node_modules/bottleneck/src/redis/free.lua b/node_modules/bottleneck/src/redis/free.lua deleted file mode 100644 index 33df5588d..000000000 --- a/node_modules/bottleneck/src/redis/free.lua +++ /dev/null @@ -1,5 +0,0 @@ -local index = ARGV[num_static_argv + 1] - -redis.call('zadd', job_expirations_key, 0, index) - -return process_tick(now, false)['running'] diff --git a/node_modules/bottleneck/src/redis/get_time.lua b/node_modules/bottleneck/src/redis/get_time.lua deleted file mode 100644 index 26ba3560c..000000000 --- a/node_modules/bottleneck/src/redis/get_time.lua +++ /dev/null @@ -1,7 +0,0 @@ -redis.replicate_commands() - -local get_time = function () - local time = redis.call('time') - - return tonumber(time[1]..string.sub(time[2], 1, 3)) -end diff --git a/node_modules/bottleneck/src/redis/group_check.lua b/node_modules/bottleneck/src/redis/group_check.lua deleted file mode 100644 index 0fd4f9027..000000000 --- a/node_modules/bottleneck/src/redis/group_check.lua +++ /dev/null @@ -1 +0,0 @@ -return not (redis.call('exists', settings_key) == 1) diff --git a/node_modules/bottleneck/src/redis/heartbeat.lua b/node_modules/bottleneck/src/redis/heartbeat.lua deleted file mode 100644 index 38aa599ba..000000000 --- a/node_modules/bottleneck/src/redis/heartbeat.lua +++ /dev/null @@ -1 +0,0 @@ -process_tick(now, true) diff --git a/node_modules/bottleneck/src/redis/increment_reservoir.lua b/node_modules/bottleneck/src/redis/increment_reservoir.lua deleted file mode 100644 index 495ddc746..000000000 --- a/node_modules/bottleneck/src/redis/increment_reservoir.lua +++ /dev/null @@ -1,10 +0,0 @@ -local incr = tonumber(ARGV[num_static_argv + 1]) - -redis.call('hincrby', settings_key, 'reservoir', incr) - -local reservoir = process_tick(now, true)['reservoir'] - -local groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout')) -refresh_expiration(0, 0, groupTimeout) - -return reservoir diff --git a/node_modules/bottleneck/src/redis/init.lua b/node_modules/bottleneck/src/redis/init.lua deleted file mode 100644 index c8546706c..000000000 --- a/node_modules/bottleneck/src/redis/init.lua +++ /dev/null @@ -1,105 +0,0 @@ -local clear = tonumber(ARGV[num_static_argv + 1]) -local limiter_version = ARGV[num_static_argv + 2] -local num_local_argv = num_static_argv + 2 - -if clear == 1 then - redis.call('del', unpack(KEYS)) -end - -if redis.call('exists', settings_key) == 0 then - -- Create - local args = {'hmset', settings_key} - - for i = num_local_argv + 1, #ARGV do - table.insert(args, ARGV[i]) - end - - redis.call(unpack(args)) - redis.call('hmset', settings_key, - 'nextRequest', now, - 'lastReservoirRefresh', now, - 'lastReservoirIncrease', now, - 'running', 0, - 'done', 0, - 'unblockTime', 0, - 'capacityPriorityCounter', 0 - ) - -else - -- Apply migrations - local settings = redis.call('hmget', settings_key, - 'id', - 'version' - ) - local id = settings[1] - local current_version = settings[2] - - if current_version ~= limiter_version then - local version_digits = {} - for k, v in string.gmatch(current_version, "([^.]+)") do - table.insert(version_digits, tonumber(k)) - end - - -- 2.10.0 - if version_digits[2] < 10 then - redis.call('hsetnx', settings_key, 'reservoirRefreshInterval', '') - redis.call('hsetnx', settings_key, 'reservoirRefreshAmount', '') - redis.call('hsetnx', settings_key, 'lastReservoirRefresh', '') - redis.call('hsetnx', settings_key, 'done', 0) - redis.call('hset', settings_key, 'version', '2.10.0') - end - - -- 2.11.1 - if version_digits[2] < 11 or (version_digits[2] == 11 and version_digits[3] < 1) then - if redis.call('hstrlen', settings_key, 'lastReservoirRefresh') == 0 then - redis.call('hmset', settings_key, - 'lastReservoirRefresh', now, - 'version', '2.11.1' - ) - end - end - - -- 2.14.0 - if version_digits[2] < 14 then - local old_running_key = 'b_'..id..'_running' - local old_executing_key = 'b_'..id..'_executing' - - if redis.call('exists', old_running_key) == 1 then - redis.call('rename', old_running_key, job_weights_key) - end - if redis.call('exists', old_executing_key) == 1 then - redis.call('rename', old_executing_key, job_expirations_key) - end - redis.call('hset', settings_key, 'version', '2.14.0') - end - - -- 2.15.2 - if version_digits[2] < 15 or (version_digits[2] == 15 and version_digits[3] < 2) then - redis.call('hsetnx', settings_key, 'capacityPriorityCounter', 0) - redis.call('hset', settings_key, 'version', '2.15.2') - end - - -- 2.17.0 - if version_digits[2] < 17 then - redis.call('hsetnx', settings_key, 'clientTimeout', 10000) - redis.call('hset', settings_key, 'version', '2.17.0') - end - - -- 2.18.0 - if version_digits[2] < 18 then - redis.call('hsetnx', settings_key, 'reservoirIncreaseInterval', '') - redis.call('hsetnx', settings_key, 'reservoirIncreaseAmount', '') - redis.call('hsetnx', settings_key, 'reservoirIncreaseMaximum', '') - redis.call('hsetnx', settings_key, 'lastReservoirIncrease', now) - redis.call('hset', settings_key, 'version', '2.18.0') - end - - end - - process_tick(now, false) -end - -local groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout')) -refresh_expiration(0, 0, groupTimeout) - -return {} diff --git a/node_modules/bottleneck/src/redis/process_tick.lua b/node_modules/bottleneck/src/redis/process_tick.lua deleted file mode 100644 index ba7b6da6e..000000000 --- a/node_modules/bottleneck/src/redis/process_tick.lua +++ /dev/null @@ -1,214 +0,0 @@ -local process_tick = function (now, always_publish) - - local compute_capacity = function (maxConcurrent, running, reservoir) - if maxConcurrent ~= nil and reservoir ~= nil then - return math.min((maxConcurrent - running), reservoir) - elseif maxConcurrent ~= nil then - return maxConcurrent - running - elseif reservoir ~= nil then - return reservoir - else - return nil - end - end - - local settings = redis.call('hmget', settings_key, - 'id', - 'maxConcurrent', - 'running', - 'reservoir', - 'reservoirRefreshInterval', - 'reservoirRefreshAmount', - 'lastReservoirRefresh', - 'reservoirIncreaseInterval', - 'reservoirIncreaseAmount', - 'reservoirIncreaseMaximum', - 'lastReservoirIncrease', - 'capacityPriorityCounter', - 'clientTimeout' - ) - local id = settings[1] - local maxConcurrent = tonumber(settings[2]) - local running = tonumber(settings[3]) - local reservoir = tonumber(settings[4]) - local reservoirRefreshInterval = tonumber(settings[5]) - local reservoirRefreshAmount = tonumber(settings[6]) - local lastReservoirRefresh = tonumber(settings[7]) - local reservoirIncreaseInterval = tonumber(settings[8]) - local reservoirIncreaseAmount = tonumber(settings[9]) - local reservoirIncreaseMaximum = tonumber(settings[10]) - local lastReservoirIncrease = tonumber(settings[11]) - local capacityPriorityCounter = tonumber(settings[12]) - local clientTimeout = tonumber(settings[13]) - - local initial_capacity = compute_capacity(maxConcurrent, running, reservoir) - - -- - -- Process 'running' changes - -- - local expired = redis.call('zrangebyscore', job_expirations_key, '-inf', '('..now) - - if #expired > 0 then - redis.call('zremrangebyscore', job_expirations_key, '-inf', '('..now) - - local flush_batch = function (batch, acc) - local weights = redis.call('hmget', job_weights_key, unpack(batch)) - redis.call('hdel', job_weights_key, unpack(batch)) - local clients = redis.call('hmget', job_clients_key, unpack(batch)) - redis.call('hdel', job_clients_key, unpack(batch)) - - -- Calculate sum of removed weights - for i = 1, #weights do - acc['total'] = acc['total'] + (tonumber(weights[i]) or 0) - end - - -- Calculate sum of removed weights by client - local client_weights = {} - for i = 1, #clients do - local removed = tonumber(weights[i]) or 0 - if removed > 0 then - acc['client_weights'][clients[i]] = (acc['client_weights'][clients[i]] or 0) + removed - end - end - end - - local acc = { - ['total'] = 0, - ['client_weights'] = {} - } - local batch_size = 1000 - - -- Compute changes to Zsets and apply changes to Hashes - for i = 1, #expired, batch_size do - local batch = {} - for j = i, math.min(i + batch_size - 1, #expired) do - table.insert(batch, expired[j]) - end - - flush_batch(batch, acc) - end - - -- Apply changes to Zsets - if acc['total'] > 0 then - redis.call('hincrby', settings_key, 'done', acc['total']) - running = tonumber(redis.call('hincrby', settings_key, 'running', -acc['total'])) - end - - for client, weight in pairs(acc['client_weights']) do - redis.call('zincrby', client_running_key, -weight, client) - end - end - - -- - -- Process 'reservoir' changes - -- - local reservoirRefreshActive = reservoirRefreshInterval ~= nil and reservoirRefreshAmount ~= nil - if reservoirRefreshActive and now >= lastReservoirRefresh + reservoirRefreshInterval then - reservoir = reservoirRefreshAmount - redis.call('hmset', settings_key, - 'reservoir', reservoir, - 'lastReservoirRefresh', now - ) - end - - local reservoirIncreaseActive = reservoirIncreaseInterval ~= nil and reservoirIncreaseAmount ~= nil - if reservoirIncreaseActive and now >= lastReservoirIncrease + reservoirIncreaseInterval then - local num_intervals = math.floor((now - lastReservoirIncrease) / reservoirIncreaseInterval) - local incr = reservoirIncreaseAmount * num_intervals - if reservoirIncreaseMaximum ~= nil then - incr = math.min(incr, reservoirIncreaseMaximum - (reservoir or 0)) - end - if incr > 0 then - reservoir = (reservoir or 0) + incr - end - redis.call('hmset', settings_key, - 'reservoir', reservoir, - 'lastReservoirIncrease', lastReservoirIncrease + (num_intervals * reservoirIncreaseInterval) - ) - end - - -- - -- Clear unresponsive clients - -- - local unresponsive = redis.call('zrangebyscore', client_last_seen_key, '-inf', (now - clientTimeout)) - local unresponsive_lookup = {} - local terminated_clients = {} - for i = 1, #unresponsive do - unresponsive_lookup[unresponsive[i]] = true - if tonumber(redis.call('zscore', client_running_key, unresponsive[i])) == 0 then - table.insert(terminated_clients, unresponsive[i]) - end - end - if #terminated_clients > 0 then - redis.call('zrem', client_running_key, unpack(terminated_clients)) - redis.call('hdel', client_num_queued_key, unpack(terminated_clients)) - redis.call('zrem', client_last_registered_key, unpack(terminated_clients)) - redis.call('zrem', client_last_seen_key, unpack(terminated_clients)) - end - - -- - -- Broadcast capacity changes - -- - local final_capacity = compute_capacity(maxConcurrent, running, reservoir) - - if always_publish or (initial_capacity ~= nil and final_capacity == nil) then - -- always_publish or was not unlimited, now unlimited - redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or '')) - - elseif initial_capacity ~= nil and final_capacity ~= nil and final_capacity > initial_capacity then - -- capacity was increased - -- send the capacity message to the limiter having the lowest number of running jobs - -- the tiebreaker is the limiter having not registered a job in the longest time - - local lowest_concurrency_value = nil - local lowest_concurrency_clients = {} - local lowest_concurrency_last_registered = {} - local client_concurrencies = redis.call('zrange', client_running_key, 0, -1, 'withscores') - - for i = 1, #client_concurrencies, 2 do - local client = client_concurrencies[i] - local concurrency = tonumber(client_concurrencies[i+1]) - - if ( - lowest_concurrency_value == nil or lowest_concurrency_value == concurrency - ) and ( - not unresponsive_lookup[client] - ) and ( - tonumber(redis.call('hget', client_num_queued_key, client)) > 0 - ) then - lowest_concurrency_value = concurrency - table.insert(lowest_concurrency_clients, client) - local last_registered = tonumber(redis.call('zscore', client_last_registered_key, client)) - table.insert(lowest_concurrency_last_registered, last_registered) - end - end - - if #lowest_concurrency_clients > 0 then - local position = 1 - local earliest = lowest_concurrency_last_registered[1] - - for i,v in ipairs(lowest_concurrency_last_registered) do - if v < earliest then - position = i - earliest = v - end - end - - local next_client = lowest_concurrency_clients[position] - redis.call('publish', 'b_'..id, - 'capacity-priority:'..(final_capacity or '').. - ':'..next_client.. - ':'..capacityPriorityCounter - ) - redis.call('hincrby', settings_key, 'capacityPriorityCounter', '1') - else - redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or '')) - end - end - - return { - ['capacity'] = final_capacity, - ['running'] = running, - ['reservoir'] = reservoir - } -end diff --git a/node_modules/bottleneck/src/redis/queued.lua b/node_modules/bottleneck/src/redis/queued.lua deleted file mode 100644 index 45ae5245a..000000000 --- a/node_modules/bottleneck/src/redis/queued.lua +++ /dev/null @@ -1,10 +0,0 @@ -local clientTimeout = tonumber(redis.call('hget', settings_key, 'clientTimeout')) -local valid_clients = redis.call('zrangebyscore', client_last_seen_key, (now - clientTimeout), 'inf') -local client_queued = redis.call('hmget', client_num_queued_key, unpack(valid_clients)) - -local sum = 0 -for i = 1, #client_queued do - sum = sum + tonumber(client_queued[i]) -end - -return sum diff --git a/node_modules/bottleneck/src/redis/refresh_expiration.lua b/node_modules/bottleneck/src/redis/refresh_expiration.lua deleted file mode 100644 index 79b88945c..000000000 --- a/node_modules/bottleneck/src/redis/refresh_expiration.lua +++ /dev/null @@ -1,11 +0,0 @@ -local refresh_expiration = function (now, nextRequest, groupTimeout) - - if groupTimeout ~= nil then - local ttl = (nextRequest + groupTimeout) - now - - for i = 1, #KEYS do - redis.call('pexpire', KEYS[i], ttl) - end - end - -end diff --git a/node_modules/bottleneck/src/redis/refs.lua b/node_modules/bottleneck/src/redis/refs.lua deleted file mode 100644 index daf89fe4c..000000000 --- a/node_modules/bottleneck/src/redis/refs.lua +++ /dev/null @@ -1,13 +0,0 @@ -local settings_key = KEYS[1] -local job_weights_key = KEYS[2] -local job_expirations_key = KEYS[3] -local job_clients_key = KEYS[4] -local client_running_key = KEYS[5] -local client_num_queued_key = KEYS[6] -local client_last_registered_key = KEYS[7] -local client_last_seen_key = KEYS[8] - -local now = tonumber(ARGV[1]) -local client = ARGV[2] - -local num_static_argv = 2 diff --git a/node_modules/bottleneck/src/redis/register.lua b/node_modules/bottleneck/src/redis/register.lua deleted file mode 100644 index 37b225414..000000000 --- a/node_modules/bottleneck/src/redis/register.lua +++ /dev/null @@ -1,51 +0,0 @@ -local index = ARGV[num_static_argv + 1] -local weight = tonumber(ARGV[num_static_argv + 2]) -local expiration = tonumber(ARGV[num_static_argv + 3]) - -local state = process_tick(now, false) -local capacity = state['capacity'] -local reservoir = state['reservoir'] - -local settings = redis.call('hmget', settings_key, - 'nextRequest', - 'minTime', - 'groupTimeout' -) -local nextRequest = tonumber(settings[1]) -local minTime = tonumber(settings[2]) -local groupTimeout = tonumber(settings[3]) - -if conditions_check(capacity, weight) then - - redis.call('hincrby', settings_key, 'running', weight) - redis.call('hset', job_weights_key, index, weight) - if expiration ~= nil then - redis.call('zadd', job_expirations_key, now + expiration, index) - end - redis.call('hset', job_clients_key, index, client) - redis.call('zincrby', client_running_key, weight, client) - redis.call('hincrby', client_num_queued_key, client, -1) - redis.call('zadd', client_last_registered_key, now, client) - - local wait = math.max(nextRequest - now, 0) - local newNextRequest = now + wait + minTime - - if reservoir == nil then - redis.call('hset', settings_key, - 'nextRequest', newNextRequest - ) - else - reservoir = reservoir - weight - redis.call('hmset', settings_key, - 'reservoir', reservoir, - 'nextRequest', newNextRequest - ) - end - - refresh_expiration(now, newNextRequest, groupTimeout) - - return {true, wait, reservoir} - -else - return {false} -end diff --git a/node_modules/bottleneck/src/redis/register_client.lua b/node_modules/bottleneck/src/redis/register_client.lua deleted file mode 100644 index 20bae4253..000000000 --- a/node_modules/bottleneck/src/redis/register_client.lua +++ /dev/null @@ -1,12 +0,0 @@ -local queued = tonumber(ARGV[num_static_argv + 1]) - --- Could have been re-registered concurrently -if not redis.call('zscore', client_last_seen_key, client) then - redis.call('zadd', client_running_key, 0, client) - redis.call('hset', client_num_queued_key, client, queued) - redis.call('zadd', client_last_registered_key, 0, client) -end - -redis.call('zadd', client_last_seen_key, now, client) - -return {} diff --git a/node_modules/bottleneck/src/redis/running.lua b/node_modules/bottleneck/src/redis/running.lua deleted file mode 100644 index 4d4794ab5..000000000 --- a/node_modules/bottleneck/src/redis/running.lua +++ /dev/null @@ -1 +0,0 @@ -return process_tick(now, false)['running'] diff --git a/node_modules/bottleneck/src/redis/submit.lua b/node_modules/bottleneck/src/redis/submit.lua deleted file mode 100644 index 9efeebe7c..000000000 --- a/node_modules/bottleneck/src/redis/submit.lua +++ /dev/null @@ -1,74 +0,0 @@ -local queueLength = tonumber(ARGV[num_static_argv + 1]) -local weight = tonumber(ARGV[num_static_argv + 2]) - -local capacity = process_tick(now, false)['capacity'] - -local settings = redis.call('hmget', settings_key, - 'id', - 'maxConcurrent', - 'highWater', - 'nextRequest', - 'strategy', - 'unblockTime', - 'penalty', - 'minTime', - 'groupTimeout' -) -local id = settings[1] -local maxConcurrent = tonumber(settings[2]) -local highWater = tonumber(settings[3]) -local nextRequest = tonumber(settings[4]) -local strategy = tonumber(settings[5]) -local unblockTime = tonumber(settings[6]) -local penalty = tonumber(settings[7]) -local minTime = tonumber(settings[8]) -local groupTimeout = tonumber(settings[9]) - -if maxConcurrent ~= nil and weight > maxConcurrent then - return redis.error_reply('OVERWEIGHT:'..weight..':'..maxConcurrent) -end - -local reachedHWM = (highWater ~= nil and queueLength == highWater - and not ( - conditions_check(capacity, weight) - and nextRequest - now <= 0 - ) -) - -local blocked = strategy == 3 and (reachedHWM or unblockTime >= now) - -if blocked then - local computedPenalty = penalty - if computedPenalty == nil then - if minTime == 0 then - computedPenalty = 5000 - else - computedPenalty = 15 * minTime - end - end - - local newNextRequest = now + computedPenalty + minTime - - redis.call('hmset', settings_key, - 'unblockTime', now + computedPenalty, - 'nextRequest', newNextRequest - ) - - local clients_queued_reset = redis.call('hkeys', client_num_queued_key) - local queued_reset = {} - for i = 1, #clients_queued_reset do - table.insert(queued_reset, clients_queued_reset[i]) - table.insert(queued_reset, 0) - end - redis.call('hmset', client_num_queued_key, unpack(queued_reset)) - - redis.call('publish', 'b_'..id, 'blocked:') - - refresh_expiration(now, newNextRequest, groupTimeout) -end - -if not blocked and not reachedHWM then - redis.call('hincrby', client_num_queued_key, client, 1) -end - -return {reachedHWM, blocked, strategy} diff --git a/node_modules/bottleneck/src/redis/update_settings.lua b/node_modules/bottleneck/src/redis/update_settings.lua deleted file mode 100644 index f0e8fcd51..000000000 --- a/node_modules/bottleneck/src/redis/update_settings.lua +++ /dev/null @@ -1,14 +0,0 @@ -local args = {'hmset', settings_key} - -for i = num_static_argv + 1, #ARGV do - table.insert(args, ARGV[i]) -end - -redis.call(unpack(args)) - -process_tick(now, true) - -local groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout')) -refresh_expiration(0, 0, groupTimeout) - -return {} diff --git a/node_modules/bottleneck/src/redis/validate_client.lua b/node_modules/bottleneck/src/redis/validate_client.lua deleted file mode 100644 index 4f025e9ee..000000000 --- a/node_modules/bottleneck/src/redis/validate_client.lua +++ /dev/null @@ -1,5 +0,0 @@ -if not redis.call('zscore', client_last_seen_key, client) then - return redis.error_reply('UNKNOWN_CLIENT') -end - -redis.call('zadd', client_last_seen_key, now, client) diff --git a/node_modules/bottleneck/src/redis/validate_keys.lua b/node_modules/bottleneck/src/redis/validate_keys.lua deleted file mode 100644 index f53401715..000000000 --- a/node_modules/bottleneck/src/redis/validate_keys.lua +++ /dev/null @@ -1,3 +0,0 @@ -if not (redis.call('exists', settings_key) == 1) then - return redis.error_reply('SETTINGS_KEY_NOT_FOUND') -end diff --git a/node_modules/bottleneck/test.ts b/node_modules/bottleneck/test.ts deleted file mode 100644 index bf064a714..000000000 --- a/node_modules/bottleneck/test.ts +++ /dev/null @@ -1,335 +0,0 @@ -/// - -import Bottleneck from "bottleneck"; -// import * as assert from "assert"; -function assert(b: boolean): void { } - -/* -This file is run by scripts/build.sh. -It is used to validate the typings in bottleneck.d.ts. -The command is: tsc --noEmit --strictNullChecks test.ts -This file cannot be run directly. -In order to do that, you must comment out the first line, -and change "bottleneck" to "." on the third line. -*/ - -function withCb(foo: number, bar: () => void, cb: (err: any, result: string) => void) { - let s: string = `cb ${foo}`; - cb(null, s); -} - -console.log(Bottleneck); - -let limiter = new Bottleneck({ - maxConcurrent: 5, - minTime: 1000, - highWater: 20, - strategy: Bottleneck.strategy.LEAK, - reservoirRefreshInterval: 1000 * 60, - reservoirRefreshAmount: 10, - reservoirIncreaseInterval: 1000 * 60, - reservoirIncreaseAmount: 2, - reservoirIncreaseMaximum: 15 -}); - -limiter.ready().then(() => { console.log('Ready') }); -limiter.clients().client; -limiter.disconnect(); - -limiter.currentReservoir().then(function (x) { - if (x != null) { - let i: number = x; - } -}); - -limiter.incrementReservoir(5).then(function (x) { - if (x != null) { - let i: number = x; - } -}); - -limiter.running().then(function (x) { - let i: number = x; -}); - -limiter.clusterQueued().then(function (x) { - let i: number = x; -}); - -limiter.done().then(function (x) { - let i: number = x; -}); - -limiter.submit(withCb, 1, () => {}, (err, result) => { - let s: string = result; - console.log(s); - assert(s == "cb 1"); -}); - -function withPromise(foo: number, bar: () => void): PromiseLike { - let s: string = `promise ${foo}`; - return Promise.resolve(s); -} - -let foo: Promise = limiter.schedule(withPromise, 1, () => {}); -foo.then(function (result: string) { - let s: string = result; - console.log(s); - assert(s == "promise 1"); -}); - -limiter.on("message", (msg) => console.log(msg)); - -limiter.publish(JSON.stringify({ a: "abc", b: { c: 123 }})); - -function checkEventInfo(info: Bottleneck.EventInfo) { - const numArgs: number = info.args.length; - const id: string = info.options.id; -} - -limiter.on('dropped', (info) => { - checkEventInfo(info) - const task: Function = info.task; - const promise: Promise = info.promise; -}) - -limiter.on('received', (info) => { - checkEventInfo(info) -}) - -limiter.on('queued', (info) => { - checkEventInfo(info) - const blocked: boolean = info.blocked; - const reachedHWM: boolean = info.reachedHWM; -}) - -limiter.on('scheduled', (info) => { - checkEventInfo(info) -}) - -limiter.on('executing', (info) => { - checkEventInfo(info) - const count: number = info.retryCount; -}) - -limiter.on('failed', (error, info) => { - checkEventInfo(info) - const message: string = error.message; - const count: number = info.retryCount; - return Promise.resolve(10) -}) - -limiter.on('failed', (error, info) => { - checkEventInfo(info) - const message: string = error.message; - const count: number = info.retryCount; - return Promise.resolve(null) -}) - -limiter.on('failed', (error, info) => { - checkEventInfo(info) - const message: string = error.message; - const count: number = info.retryCount; - return Promise.resolve() -}) - -limiter.on('failed', (error, info) => { - checkEventInfo(info) - const message: string = error.message; - const count: number = info.retryCount; - return 10 -}) - -limiter.on('failed', (error, info) => { - checkEventInfo(info) - const message: string = error.message; - const count: number = info.retryCount; - return null -}) - -limiter.on('failed', (error, info) => { - checkEventInfo(info) - const message: string = error.message; - const count: number = info.retryCount; -}) - -limiter.on('retry', (message: string, info) => { - checkEventInfo(info) - const count: number = info.retryCount; -}) - -limiter.on('done', (info) => { - checkEventInfo(info) - const count: number = info.retryCount; -}) - -let group = new Bottleneck.Group({ - maxConcurrent: 5, - minTime: 1000, - highWater: 10, - strategy: Bottleneck.strategy.LEAK, - datastore: "ioredis", - clearDatastore: true, - clientOptions: {}, - clusterNodes: [] -}); - -group.on('created', (limiter, key) => { - assert(limiter.empty()) - assert(key.length > 0) -}) - -group.key("foo").submit(withCb, 2, () => {}, (err, result) => { - let s: string = `${result} foo`; - console.log(s); - assert(s == "cb 2 foo"); -}); - -group.key("bar").submit({ priority: 4 }, withCb, 3, () => {}, (err, result) => { - let s: string = `${result} bar`; - console.log(s); - assert(s == "cb 3 foo"); -}); - -let f1: Promise = group.key("pizza").schedule(withPromise, 2, () => {}); -f1.then(function (result: string) { - let s: string = result; - console.log(s); - assert(s == "promise 2"); -}); - -let f2: Promise = group.key("pie").schedule({ priority: 4 }, withPromise, 3, () => {}); -f2.then(function (result: string) { - let s: string = result; - console.log(s); - assert(s == "promise 3"); -}); - -let wrapped = limiter.wrap((a: number, b: number) => { - let s: string = `Total: ${a + b}`; - return Promise.resolve(s); -}); - -wrapped(1, 2).then((x) => { - let s: string = x; - console.log(s); - assert(s == "Total: 3"); -}); - -wrapped.withOptions({ priority: 1, id: 'some-id' }, 9, 9).then((x) => { - let s: string = x; - console.log(s); - assert(s == "Total: 18"); -}) - -let counts = limiter.counts(); -console.log(`${counts.EXECUTING + 2}`); -console.log(limiter.jobStatus('some-id')) -console.log(limiter.jobs()); -console.log(limiter.jobs(Bottleneck.Status.RUNNING)); - - -group.deleteKey("pizza") -.then(function (deleted: boolean) { - console.log(deleted) -}); -group.updateSettings({ timeout: 5, maxConcurrent: null, reservoir: null }); - -let keys: string[] = group.keys(); -assert(keys.length == 3); - -group.clusterKeys() -.then(function (allKeys: string[]) { - let count = allKeys.length; -}) - -let queued: number = limiter.chain(group.key("pizza")).queued(); - -limiter.stop({ - dropWaitingJobs: true, - dropErrorMessage: "Begone!", - enqueueErrorMessage: "Denied!" -}).then(() => { - console.log('All stopped.') -}) - -wrapped(4, 5).catch((e) => { - assert(e.message === "Denied!") -}) - -const id: string = limiter.id; -const datastore: string = limiter.datastore; -const channel: string = limiter.channel(); - -const redisConnection = new Bottleneck.RedisConnection({ - client: "NodeRedis client object", - clientOptions: {} -}) - -redisConnection.ready() -.then(function (redisConnectionClients) { - const client = redisConnectionClients.client; - const subscriber = redisConnectionClients.subscriber; -}) - -redisConnection.on("error", (err) => { - console.log(err.message) -}) - -const limiterWithConn = new Bottleneck({ - connection: redisConnection -}) - -const ioredisConnection = new Bottleneck.IORedisConnection({ - client: "ioredis client object", - clientOptions: {}, - clusterNodes: [] -}) - -ioredisConnection.ready() -.then(function (ioredisConnectionClients) { - const client = ioredisConnectionClients.client; - const subscriber = ioredisConnectionClients.subscriber; -}) - -ioredisConnection.on("error", (err: Bottleneck.BottleneckError) => { - console.log(err.message) -}) - -const groupWithConn = new Bottleneck.Group({ - connection: ioredisConnection -}) - -const limiterWithConnFromGroup = new Bottleneck({ - connection: groupWithConn.connection -}) - -const groupWithConnFromLimiter = new Bottleneck.Group({ - connection: limiterWithConn.connection -}) - - -const batcher = new Bottleneck.Batcher({ - maxTime: 1000, - maxSize: 10 -}) - -batcher.on("batch", (batch) => { - const len: number = batch.length - console.log("Number of elements:", len) -}) - -batcher.on("error", (err: Bottleneck.BottleneckError) => { - console.log(err.message) -}) - -batcher.add("abc") -batcher.add({ xyz: 5 }) -.then(() => console.log("Flushed!")) - -const object = {} -const emitter = new Bottleneck.Events(object) -const listenerCount: number = emitter.listenerCount('info') -emitter.trigger('info', 'hello', 'world', 123).then(function (result) { - console.log(result) -}) diff --git a/node_modules/bottleneck/test/DLList.js b/node_modules/bottleneck/test/DLList.js deleted file mode 100644 index 505bdcd9f..000000000 --- a/node_modules/bottleneck/test/DLList.js +++ /dev/null @@ -1,148 +0,0 @@ -var DLList = require('../lib/DLList') -var assert = require('assert') -var c = require('./context')({datastore: 'local'}) - -var fakeQueues = function () { - this._length = 0 - this.incr = () => this._length++ - this.decr = () => this._length-- - this.fns = [this.incr, this.decr] -} - -describe('DLList', function () { - - it('Should be created and be empty', function () { - var queues = new fakeQueues() - var list = new DLList() - c.mustEqual(list.getArray().length, 0) - }) - - it('Should be possible to append once', function () { - var queues = new fakeQueues() - var list = new DLList(...queues.fns) - list.push(5) - var arr = list.getArray() - c.mustEqual(arr.length, 1) - c.mustEqual(list.length, 1) - c.mustEqual(queues._length, 1) - c.mustEqual(arr[0], 5) - }) - - it('Should be possible to append multiple times', function () { - var queues = new fakeQueues() - var list = new DLList(...queues.fns) - list.push(5) - list.push(6) - var arr = list.getArray() - c.mustEqual(arr.length, 2) - c.mustEqual(list.length, 2) - c.mustEqual(queues._length, 2) - c.mustEqual(arr[0], 5) - c.mustEqual(arr[1], 6) - - list.push(10) - - arr = list.getArray() - c.mustEqual(arr.length, 3) - c.mustEqual(list.length, 3) - c.mustEqual(arr[0], 5) - c.mustEqual(arr[1], 6) - c.mustEqual(arr[2], 10) - }) - - it('Should be possible to shift an empty list', function () { - var queues = new fakeQueues() - var list = new DLList(...queues.fns) - c.mustEqual(list.length, 0) - assert(list.shift() === undefined) - var arr = list.getArray() - c.mustEqual(arr.length, 0) - c.mustEqual(list.length, 0) - assert(list.shift() === undefined) - arr = list.getArray() - c.mustEqual(arr.length, 0) - c.mustEqual(list.length, 0) - c.mustEqual(queues._length, 0) - }) - - it('Should be possible to append then shift once', function () { - var queues = new fakeQueues() - var list = new DLList(...queues.fns) - list.push(5) - c.mustEqual(list.length, 1) - c.mustEqual(list.shift(), 5) - var arr = list.getArray() - c.mustEqual(arr.length, 0) - c.mustEqual(list.length, 0) - c.mustEqual(queues._length, 0) - }) - - it('Should be possible to append then shift multiple times', function () { - var queues = new fakeQueues() - var list = new DLList(...queues.fns) - list.push(5) - c.mustEqual(list.length, 1) - c.mustEqual(list.shift(), 5) - c.mustEqual(list.length, 0) - - list.push(6) - c.mustEqual(list.length, 1) - c.mustEqual(list.shift(), 6) - c.mustEqual(list.length, 0) - c.mustEqual(queues._length, 0) - }) - - it('Should pass a full test', function () { - var queues = new fakeQueues() - var list = new DLList(...queues.fns) - list.push(10) - c.mustEqual(list.length, 1) - list.push("11") - c.mustEqual(list.length, 2) - list.push(12) - c.mustEqual(list.length, 3) - c.mustEqual(queues._length, 3) - - c.mustEqual(list.shift(), 10) - c.mustEqual(list.length, 2) - c.mustEqual(list.shift(),"11") - c.mustEqual(list.length, 1) - - list.push(true) - c.mustEqual(list.length, 2) - - var arr = list.getArray() - c.mustEqual(arr[0], 12) - c.mustEqual(arr[1], true) - c.mustEqual(arr.length, 2) - c.mustEqual(queues._length, 2) - }) - - it('Should return the first value without shifting', function () { - var queues = new fakeQueues() - var list = new DLList(...queues.fns) - assert(list.first() === undefined) - assert(list.first() === undefined) - - list.push(1) - c.mustEqual(list.first(), 1) - c.mustEqual(list.first(), 1) - - list.push(2) - c.mustEqual(list.first(), 1) - c.mustEqual(list.first(), 1) - - c.mustEqual(list.shift(), 1) - c.mustEqual(list.first(), 2) - c.mustEqual(list.first(), 2) - - c.mustEqual(list.shift(), 2) - assert(list.first() === undefined) - assert(list.first() === undefined) - - assert(list.first() === undefined) - assert(list.shift() === undefined) - assert(list.first() === undefined) - }) - -}) diff --git a/node_modules/bottleneck/test/batcher.js b/node_modules/bottleneck/test/batcher.js deleted file mode 100644 index c195367f4..000000000 --- a/node_modules/bottleneck/test/batcher.js +++ /dev/null @@ -1,209 +0,0 @@ -var makeTest = require('./context') -var Bottleneck = require('./bottleneck') -var assert = require('assert') - -describe('Batcher', function () { - var c - - afterEach(function () { - return c.limiter.disconnect(false) - }) - - it('Should batch by time and size', function () { - c = makeTest() - var batcher = new Bottleneck.Batcher({ - maxTime: 50, - maxSize: 3 - }) - var t0 = Date.now() - var batches = [] - - batcher.on('batch', function (batcher) { - batches.push(batcher) - }) - - return Promise.all([ - batcher.add(1).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 1)), - batcher.add(2).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 2)), - batcher.add(3).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 3)), - batcher.add(4).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 4)), - batcher.add(5).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 5)) - ]) - .then(function (data) { - c.mustEqual( - data.map((([t, x]) => [Math.floor(t / 50), x])), - [[0, 1], [0, 2], [0, 3], [1, 4], [1, 5]] - ) - - return c.last() - }) - .then(function (results) { - c.checkDuration(50, 20) - c.mustEqual(batches, [[1, 2, 3], [4, 5]]) - }) - }) - - it('Should batch by time', function () { - c = makeTest() - var batcher = new Bottleneck.Batcher({ - maxTime: 50 - }) - var t0 = Date.now() - var batches = [] - - batcher.on('batch', function (batcher) { - batches.push(batcher) - }) - - return Promise.all([ - batcher.add(1).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 1)), - batcher.add(2).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 2)) - ]) - .then(function (data) { - c.mustEqual( - data.map((([t, x]) => [Math.floor(t / 50), x])), - [[1, 1], [1, 2]] - ) - - return Promise.all([ - batcher.add(3).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 3)), - batcher.add(4).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 4)) - ]) - }) - .then(function (data) { - c.mustEqual( - data.map((([t, x]) => [Math.floor(t / 50), x])), - [[2, 3], [2, 4]] - ) - - return c.last() - }) - .then(function (results) { - c.checkDuration(100) - c.mustEqual(batches, [[1, 2], [3, 4]]) - }) - }) - - it('Should batch by size', function () { - c = makeTest() - var batcher = new Bottleneck.Batcher({ - maxSize: 2 - }) - var batches = [] - - batcher.on('batch', function (batcher) { - batches.push(batcher) - }) - - return Promise.all([ - batcher.add(1).then((x) => c.limiter.schedule(c.promise, null, 1)), - batcher.add(2).then((x) => c.limiter.schedule(c.promise, null, 2)) - ]) - .then(function () { - return Promise.all([ - batcher.add(3).then((x) => c.limiter.schedule(c.promise, null, 3)), - batcher.add(4).then((x) => c.limiter.schedule(c.promise, null, 4)) - ]) - }) - .then(c.last) - .then(function (results) { - c.checkDuration(0) - c.mustEqual(batches, [[1, 2], [3, 4]]) - }) - }) - - it('Should stagger flushes', function () { - c = makeTest() - var batcher = new Bottleneck.Batcher({ - maxTime: 50, - maxSize: 3 - }) - var t0 = Date.now() - var batches = [] - - batcher.on('batch', function (batcher) { - batches.push(batcher) - }) - - return Promise.all([ - batcher.add(1).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 1)), - batcher.add(2).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 2)) - ]) - .then(function (data) { - c.mustEqual( - data.map((([t, x]) => [Math.floor(t / 50), x])), - [[1, 1], [1, 2]] - ) - - var promises = [] - promises.push(batcher.add(3).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 3))) - - return c.wait(10) - .then(function () { - promises.push(batcher.add(4).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 4))) - - return Promise.all(promises) - }) - }) - .then(function (data) { - c.mustEqual( - data.map((([t, x]) => [Math.floor(t / 50), x])), - [[2, 3], [2, 4]] - ) - - return c.last() - }) - .then(function (results) { - c.checkDuration(120, 20) - c.mustEqual(batches, [[1, 2], [3, 4]]) - }) - }) - - it('Should force then stagger flushes', function () { - c = makeTest() - var batcher = new Bottleneck.Batcher({ - maxTime: 50, - maxSize: 3 - }) - var t0 = Date.now() - var batches = [] - - batcher.on('batch', function (batcher) { - batches.push(batcher) - }) - - var promises = [] - promises.push(batcher.add(1).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 1))) - promises.push(batcher.add(2).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 2))) - - return c.wait(10) - .then(function () { - promises.push(batcher.add(3).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 3))) - - return Promise.all(promises) - }) - .then(function (data) { - c.mustEqual( - data.map((([t, x]) => [Math.floor(t / 50), x])), - [[0, 1], [0, 2], [0, 3]] - ) - - return Promise.all([ - batcher.add(4).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 4)), - batcher.add(5).then((x) => c.limiter.schedule(c.promise, null, Date.now() - t0, 5)), - ]) - }) - .then(function (data) { - c.mustEqual( - data.map((([t, x]) => [Math.floor(t / 50), x])), - [[1, 4], [1, 5]] - ) - - return c.last() - }) - .then(function (results) { - c.checkDuration(85, 25) - c.mustEqual(batches, [[1, 2, 3], [4, 5]]) - }) - }) -}) diff --git a/node_modules/bottleneck/test/bottleneck.js b/node_modules/bottleneck/test/bottleneck.js deleted file mode 100644 index a3bc0c88e..000000000 --- a/node_modules/bottleneck/test/bottleneck.js +++ /dev/null @@ -1,7 +0,0 @@ -if (process.env.BUILD === 'es5') { - module.exports = require('../es5.js') -} else if (process.env.BUILD === 'light') { - module.exports = require('../light.js') -} else { - module.exports = require('../lib/index.js') -} diff --git a/node_modules/bottleneck/test/cluster.js b/node_modules/bottleneck/test/cluster.js deleted file mode 100644 index 5b28404f7..000000000 --- a/node_modules/bottleneck/test/cluster.js +++ /dev/null @@ -1,1549 +0,0 @@ -var makeTest = require('./context') -var Bottleneck = require('./bottleneck') -var Scripts = require('../lib/Scripts.js') -var assert = require('assert') -var packagejson = require('../package.json') - -if (process.env.DATASTORE === 'redis' || process.env.DATASTORE === 'ioredis') { - - var limiterKeys = function (limiter) { - return Scripts.allKeys(limiter._store.originalId) - } - var countKeys = function (limiter) { - return runCommand(limiter, 'exists', limiterKeys(limiter)) - } - var deleteKeys = function (limiter) { - return runCommand(limiter, 'del', limiterKeys(limiter)) - } - var runCommand = function (limiter, command, args) { - return new Promise(function (resolve, reject) { - limiter._store.clients.client[command](...args, function (err, data) { - if (err != null) return reject(err) - return resolve(data) - }) - }) - } - - describe('Cluster-only', function () { - var c - - afterEach(function () { - return c.limiter.disconnect(false) - }) - - it('Should return a promise for ready()', function () { - c = makeTest({ maxConcurrent: 2 }) - - return c.limiter.ready() - }) - - it('Should return clients', function () { - c = makeTest({ maxConcurrent: 2 }) - - return c.limiter.ready() - .then(function (clients) { - c.mustEqual(Object.keys(clients), ['client', 'subscriber']) - c.mustEqual(Object.keys(c.limiter.clients()), ['client', 'subscriber']) - }) - }) - - it('Should return a promise when disconnecting', function () { - c = makeTest({ maxConcurrent: 2 }) - - return c.limiter.disconnect() - .then(function () { - // do nothing - }) - }) - - it('Should allow passing a limiter\'s connection to a new limiter', function () { - c = makeTest() - c.limiter.connection.id = 'some-id' - var limiter = new Bottleneck({ - minTime: 50, - connection: c.limiter.connection - }) - - return Promise.all([c.limiter.ready(), limiter.ready()]) - .then(function () { - c.mustEqual(limiter.connection.id, 'some-id') - c.mustEqual(limiter.datastore, process.env.DATASTORE) - - return Promise.all([ - c.pNoErrVal(c.limiter.schedule(c.promise, null, 1), 1), - c.pNoErrVal(limiter.schedule(c.promise, null, 2), 2) - ]) - }) - .then(c.last) - .then(function (results) { - c.checkResultsOrder([[1], [2]]) - c.checkDuration(0) - }) - }) - - it('Should allow passing a limiter\'s connection to a new Group', function () { - c = makeTest() - c.limiter.connection.id = 'some-id' - var group = new Bottleneck.Group({ - minTime: 50, - connection: c.limiter.connection - }) - var limiter1 = group.key('A') - var limiter2 = group.key('B') - - return Promise.all([c.limiter.ready(), limiter1.ready(), limiter2.ready()]) - .then(function () { - c.mustEqual(limiter1.connection.id, 'some-id') - c.mustEqual(limiter2.connection.id, 'some-id') - c.mustEqual(limiter1.datastore, process.env.DATASTORE) - c.mustEqual(limiter2.datastore, process.env.DATASTORE) - - return Promise.all([ - c.pNoErrVal(c.limiter.schedule(c.promise, null, 1), 1), - c.pNoErrVal(limiter1.schedule(c.promise, null, 2), 2), - c.pNoErrVal(limiter2.schedule(c.promise, null, 3), 3) - ]) - }) - .then(c.last) - .then(function (results) { - c.checkResultsOrder([[1], [2], [3]]) - c.checkDuration(0) - }) - }) - - it('Should allow passing a Group\'s connection to a new limiter', function () { - c = makeTest() - var group = new Bottleneck.Group({ - minTime: 50, - datastore: process.env.DATASTORE, - clearDatastore: true - }) - group.connection.id = 'some-id' - - var limiter1 = group.key('A') - var limiter2 = new Bottleneck({ - minTime: 50, - connection: group.connection - }) - - return Promise.all([limiter1.ready(), limiter2.ready()]) - .then(function () { - c.mustEqual(limiter1.connection.id, 'some-id') - c.mustEqual(limiter2.connection.id, 'some-id') - c.mustEqual(limiter1.datastore, process.env.DATASTORE) - c.mustEqual(limiter2.datastore, process.env.DATASTORE) - - return Promise.all([ - c.pNoErrVal(limiter1.schedule(c.promise, null, 1), 1), - c.pNoErrVal(limiter2.schedule(c.promise, null, 2), 2) - ]) - }) - .then(c.last) - .then(function (results) { - c.checkResultsOrder([[1], [2]]) - c.checkDuration(0) - return group.disconnect() - }) - }) - - it('Should allow passing a Group\'s connection to a new Group', function () { - c = makeTest() - var group1 = new Bottleneck.Group({ - minTime: 50, - datastore: process.env.DATASTORE, - clearDatastore: true - }) - group1.connection.id = 'some-id' - - var group2 = new Bottleneck.Group({ - minTime: 50, - connection: group1.connection, - clearDatastore: true - }) - - var limiter1 = group1.key('AAA') - var limiter2 = group1.key('BBB') - var limiter3 = group1.key('CCC') - var limiter4 = group1.key('DDD') - - return Promise.all([ - limiter1.ready(), - limiter2.ready(), - limiter3.ready(), - limiter4.ready() - ]) - .then(function () { - c.mustEqual(group1.connection.id, 'some-id') - c.mustEqual(group2.connection.id, 'some-id') - c.mustEqual(limiter1.connection.id, 'some-id') - c.mustEqual(limiter2.connection.id, 'some-id') - c.mustEqual(limiter3.connection.id, 'some-id') - c.mustEqual(limiter4.connection.id, 'some-id') - c.mustEqual(limiter1.datastore, process.env.DATASTORE) - c.mustEqual(limiter2.datastore, process.env.DATASTORE) - c.mustEqual(limiter3.datastore, process.env.DATASTORE) - c.mustEqual(limiter4.datastore, process.env.DATASTORE) - - return Promise.all([ - c.pNoErrVal(limiter1.schedule(c.promise, null, 1), 1), - c.pNoErrVal(limiter2.schedule(c.promise, null, 2), 2), - c.pNoErrVal(limiter3.schedule(c.promise, null, 3), 3), - c.pNoErrVal(limiter4.schedule(c.promise, null, 4), 4) - ]) - }) - .then(c.last) - .then(function (results) { - c.checkResultsOrder([[1], [2], [3], [4]]) - c.checkDuration(0) - return group1.disconnect() - }) - }) - - it('Should not have a key TTL by default for standalone limiters', function () { - c = makeTest() - - return c.limiter.ready() - .then(function () { - var settings_key = limiterKeys(c.limiter)[0] - return runCommand(c.limiter, 'ttl', [settings_key]) - }) - .then(function (ttl) { - assert(ttl < 0) - }) - }) - - it('Should allow timeout setting for standalone limiters', function () { - c = makeTest({ timeout: 5 * 60 * 1000 }) - - return c.limiter.ready() - .then(function () { - var settings_key = limiterKeys(c.limiter)[0] - return runCommand(c.limiter, 'ttl', [settings_key]) - }) - .then(function (ttl) { - assert(ttl >= 290 && ttl <= 305) - }) - }) - - it('Should compute reservoir increased based on number of missed intervals', async function () { - const settings = { - id: 'missed-intervals', - clearDatastore: false, - reservoir: 2, - reservoirIncreaseInterval: 100, - reservoirIncreaseAmount: 2, - timeout: 2000 - } - c = makeTest({ ...settings }) - await c.limiter.ready() - - c.mustEqual(await c.limiter.currentReservoir(), 2) - - const settings_key = limiterKeys(c.limiter)[0] - await runCommand(c.limiter, 'hincrby', [settings_key, 'lastReservoirIncrease', -3000]) - - const limiter2 = new Bottleneck({ ...settings, datastore: process.env.DATASTORE }) - await limiter2.ready() - - c.mustEqual(await c.limiter.currentReservoir(), 62) // 2 + ((3000 / 100) * 2) === 62 - - await limiter2.disconnect() - }) - - it('Should migrate from 2.8.0', function () { - c = makeTest({ id: 'migrate' }) - var settings_key = limiterKeys(c.limiter)[0] - var limiter2 - - return c.limiter.ready() - .then(function () { - var settings_key = limiterKeys(c.limiter)[0] - return Promise.all([ - runCommand(c.limiter, 'hset', [settings_key, 'version', '2.8.0']), - runCommand(c.limiter, 'hdel', [settings_key, 'done', 'capacityPriorityCounter', 'clientTimeout']), - runCommand(c.limiter, 'hset', [settings_key, 'lastReservoirRefresh', '']) - ]) - }) - .then(function () { - limiter2 = new Bottleneck({ - id: 'migrate', - datastore: process.env.DATASTORE - }) - return limiter2.ready() - }) - .then(function () { - return runCommand(c.limiter, 'hmget', [ - settings_key, - 'version', - 'done', - 'reservoirRefreshInterval', - 'reservoirRefreshAmount', - 'capacityPriorityCounter', - 'clientTimeout', - 'reservoirIncreaseAmount', - 'reservoirIncreaseMaximum', - // Add new values here, before these 2 timestamps - 'lastReservoirRefresh', - 'lastReservoirIncrease' - ]) - }) - .then(function (values) { - var timestamps = values.slice(-2) - timestamps.forEach((t) => assert(parseInt(t) > Date.now() - 500)) - c.mustEqual(values.slice(0, -timestamps.length), [ - '2.18.0', - '0', - '', - '', - '0', - '10000', - '', - '' - ]) - }) - .then(function () { - return limiter2.disconnect(false) - }) - }) - - it('Should keep track of each client\'s queue length', async function () { - c = makeTest({ - id: 'queues', - maxConcurrent: 1, - trackDoneStatus: true - }) - var limiter2 = new Bottleneck({ - datastore: process.env.DATASTORE, - id: 'queues', - maxConcurrent: 1, - trackDoneStatus: true - }) - var client_num_queued_key = limiterKeys(c.limiter)[5] - var clientId1 = c.limiter._store.clientId - var clientId2 = limiter2._store.clientId - - await c.limiter.ready() - await limiter2.ready() - - var p0 = c.limiter.schedule({id: 0}, c.slowPromise, 100, null, 0) - await c.limiter._submitLock.schedule(() => Promise.resolve()) - - var p1 = c.limiter.schedule({id: 1}, c.promise, null, 1) - var p2 = c.limiter.schedule({id: 2}, c.promise, null, 2) - var p3 = limiter2.schedule({id: 3}, c.promise, null, 3) - - await Promise.all([ - c.limiter._submitLock.schedule(() => Promise.resolve()), - limiter2._submitLock.schedule(() => Promise.resolve()) - ]) - - var queuedA = await runCommand(c.limiter, 'hgetall', [client_num_queued_key]) - c.mustEqual(c.limiter.counts().QUEUED, 2) - c.mustEqual(limiter2.counts().QUEUED, 1) - c.mustEqual(~~queuedA[clientId1], 2) - c.mustEqual(~~queuedA[clientId2], 1) - - c.mustEqual(await c.limiter.clusterQueued(), 3) - - await Promise.all([p0, p1, p2, p3]) - var queuedB = await runCommand(c.limiter, 'hgetall', [client_num_queued_key]) - c.mustEqual(c.limiter.counts().QUEUED, 0) - c.mustEqual(limiter2.counts().QUEUED, 0) - c.mustEqual(~~queuedB[clientId1], 0) - c.mustEqual(~~queuedB[clientId2], 0) - c.mustEqual(c.limiter.counts().DONE, 3) - c.mustEqual(limiter2.counts().DONE, 1) - - c.mustEqual(await c.limiter.clusterQueued(), 0) - - return limiter2.disconnect(false) - }) - - it('Should publish capacity increases', function () { - c = makeTest({ maxConcurrent: 2 }) - var limiter2 - var p3, p4 - - return c.limiter.ready() - .then(function () { - limiter2 = new Bottleneck({ datastore: process.env.DATASTORE }) - return limiter2.ready() - }) - .then(function () { - var p1 = c.limiter.schedule({id: 1}, c.slowPromise, 100, null, 1) - var p2 = c.limiter.schedule({id: 2}, c.slowPromise, 100, null, 2) - - return c.limiter.schedule({id: 0, weight: 0}, c.promise, null, 0) - }) - .then(function () { - return limiter2.schedule({id: 3}, c.slowPromise, 100, null, 3) - }) - .then(c.last) - .then(function (results) { - c.checkResultsOrder([[0], [1], [2], [3]]) - c.checkDuration(200) - - return limiter2.disconnect(false) - }) - }) - - it('Should publish capacity changes on reservoir changes', function () { - c = makeTest({ - maxConcurrent: 2, - reservoir: 2 - }) - var limiter2 - var p3, p4 - - return c.limiter.ready() - .then(function () { - limiter2 = new Bottleneck({ - datastore: process.env.DATASTORE, - }) - return limiter2.ready() - }) - .then(function () { - var p1 = c.limiter.schedule({id: 1}, c.slowPromise, 100, null, 1) - var p2 = c.limiter.schedule({id: 2}, c.slowPromise, 100, null, 2) - - return c.limiter.schedule({id: 0, weight: 0}, c.promise, null, 0) - }) - .then(function () { - p3 = limiter2.schedule({id: 3, weight: 2}, c.slowPromise, 100, null, 3) - return c.limiter.currentReservoir() - }) - .then(function (reservoir) { - c.mustEqual(reservoir, 0) - return c.limiter.updateSettings({ reservoir: 1 }) - }) - .then(function () { - return c.limiter.incrementReservoir(1) - }) - .then(function (reservoir) { - c.mustEqual(reservoir, 2) - return p3 - }) - .then(function (result) { - c.mustEqual(result, [3]) - return c.limiter.currentReservoir() - }) - .then(function (reservoir) { - c.mustEqual(reservoir, 0) - return c.last({ weight: 0 }) - }) - .then(function (results) { - c.checkResultsOrder([[0], [1], [2], [3]]) - c.checkDuration(210) - }) - .then(function (data) { - return limiter2.disconnect(false) - }) - }) - - it('Should remove track job data and remove lost jobs', function () { - c = makeTest({ - id: 'lost', - errorEventsExpected: true - }) - var clientId = c.limiter._store.clientId - var limiter1 = new Bottleneck({ datastore: process.env.DATASTORE }) - var limiter2 = new Bottleneck({ - id: 'lost', - datastore: process.env.DATASTORE, - heartbeatInterval: 150 - }) - var getData = function (limiter) { - c.mustEqual(limiterKeys(limiter).length, 8) // Asserting, to remember to edit this test when keys change - var [ - settings_key, - job_weights_key, - job_expirations_key, - job_clients_key, - client_running_key, - client_num_queued_key, - client_last_registered_key, - client_last_seen_key - ] = limiterKeys(limiter) - - return Promise.all([ - runCommand(limiter1, 'hmget', [settings_key, 'running', 'done']), - runCommand(limiter1, 'hgetall', [job_weights_key]), - runCommand(limiter1, 'zcard', [job_expirations_key]), - runCommand(limiter1, 'hvals', [job_clients_key]), - runCommand(limiter1, 'zrange', [client_running_key, '0', '-1', 'withscores']), - runCommand(limiter1, 'hvals', [client_num_queued_key]), - runCommand(limiter1, 'zrange', [client_last_registered_key, '0', '-1', 'withscores']), - runCommand(limiter1, 'zrange', [client_last_seen_key, '0', '-1', 'withscores']) - ]) - } - var sumWeights = function (weights) { - return Object.keys(weights).reduce((acc, x) => { - return acc + ~~weights[x] - }, 0) - } - var numExpirations = 0 - var errorHandler = function (err) { - if (err.message.indexOf('This job timed out') === 0) { - numExpirations++ - } - } - - return Promise.all([c.limiter.ready(), limiter1.ready(), limiter2.ready()]) - .then(function () { - // No expiration, it should not be removed - c.pNoErrVal(c.limiter.schedule({ weight: 1 }, c.slowPromise, 150, null, 1), 1), - - // Expiration present, these jobs should be removed automatically - c.limiter.schedule({ expiration: 50, weight: 2 }, c.slowPromise, 75, null, 2).catch(errorHandler) - c.limiter.schedule({ expiration: 50, weight: 3 }, c.slowPromise, 75, null, 3).catch(errorHandler) - c.limiter.schedule({ expiration: 50, weight: 4 }, c.slowPromise, 75, null, 4).catch(errorHandler) - c.limiter.schedule({ expiration: 50, weight: 5 }, c.slowPromise, 75, null, 5).catch(errorHandler) - - return c.limiter._submitLock.schedule(() => Promise.resolve(true)) - }) - .then(function () { - return c.limiter._drainAll() - }) - .then(function () { - return c.limiter.disconnect(false) - }) - .then(function () { - }) - .then(function () { - return getData(c.limiter) - }) - .then(function ([ - settings, - job_weights, - job_expirations, - job_clients, - client_running, - client_num_queued, - client_last_registered, - client_last_seen - ]) { - c.mustEqual(settings, ['15', '0']) - c.mustEqual(sumWeights(job_weights), 15) - c.mustEqual(job_expirations, 4) - c.mustEqual(job_clients.length, 5) - job_clients.forEach((id) => c.mustEqual(id, clientId)) - c.mustEqual(sumWeights(client_running), 15) - c.mustEqual(client_num_queued, ['0', '0']) - c.mustEqual(client_last_registered[1], '0') - assert(client_last_seen[1] > Date.now() - 1000) - var passed = Date.now() - parseFloat(client_last_registered[3]) - assert(passed > 0 && passed < 20) - - return c.wait(170) - }) - .then(function () { - return getData(c.limiter) - }) - .then(function ([ - settings, - job_weights, - job_expirations, - job_clients, - client_running, - client_num_queued, - client_last_registered, - client_last_seen - ]) { - c.mustEqual(settings, ['1', '14']) - c.mustEqual(sumWeights(job_weights), 1) - c.mustEqual(job_expirations, 0) - c.mustEqual(job_clients.length, 1) - job_clients.forEach((id) => c.mustEqual(id, clientId)) - c.mustEqual(sumWeights(client_running), 1) - c.mustEqual(client_num_queued, ['0', '0']) - c.mustEqual(client_last_registered[1], '0') - assert(client_last_seen[1] > Date.now() - 1000) - var passed = Date.now() - parseFloat(client_last_registered[3]) - assert(passed > 170 && passed < 200) - - c.mustEqual(numExpirations, 4) - }) - .then(function () { - return Promise.all([ - limiter1.disconnect(false), - limiter2.disconnect(false) - ]) - }) - }) - - it('Should clear unresponsive clients', async function () { - c = makeTest({ - id: 'unresponsive', - maxConcurrent: 1, - timeout: 1000, - clientTimeout: 100, - heartbeat: 50 - }) - const limiter2 = new Bottleneck({ - id: 'unresponsive', - datastore: process.env.DATASTORE - }) - - await Promise.all([c.limiter.running(), limiter2.running()]) - - const client_running_key = limiterKeys(limiter2)[4] - const client_num_queued_key = limiterKeys(limiter2)[5] - const client_last_registered_key = limiterKeys(limiter2)[6] - const client_last_seen_key = limiterKeys(limiter2)[7] - const numClients = () => Promise.all([ - runCommand(c.limiter, 'zcard', [client_running_key]), - runCommand(c.limiter, 'hlen', [client_num_queued_key]), - runCommand(c.limiter, 'zcard', [client_last_registered_key]), - runCommand(c.limiter, 'zcard', [client_last_seen_key]) - ]) - - c.mustEqual(await numClients(), [2, 2, 2, 2]) - - await limiter2.disconnect(false) - await c.wait(150) - - await c.limiter.running() - - c.mustEqual(await numClients(), [1, 1, 1, 1]) - - }) - - - it('Should not clear unresponsive clients with unexpired running jobs', async function () { - c = makeTest({ - id: 'unresponsive-unexpired', - maxConcurrent: 1, - timeout: 1000, - clientTimeout: 200, - heartbeat: 2000 - }) - const limiter2 = new Bottleneck({ - id: 'unresponsive-unexpired', - datastore: process.env.DATASTORE - }) - - await c.limiter.ready() - await limiter2.ready() - - const client_running_key = limiterKeys(limiter2)[4] - const client_num_queued_key = limiterKeys(limiter2)[5] - const client_last_registered_key = limiterKeys(limiter2)[6] - const client_last_seen_key = limiterKeys(limiter2)[7] - const numClients = () => Promise.all([ - runCommand(limiter2, 'zcard', [client_running_key]), - runCommand(limiter2, 'hlen', [client_num_queued_key]), - runCommand(limiter2, 'zcard', [client_last_registered_key]), - runCommand(limiter2, 'zcard', [client_last_seen_key]) - ]) - - const job = c.limiter.schedule(c.slowPromise, 500, null, 1) - - await c.wait(300) - - // running() triggers process_tick and that will attempt to remove client 1 - // but it shouldn't do it because it has a running job - c.mustEqual(await limiter2.running(), 1) - - c.mustEqual(await numClients(), [2, 2, 2, 2]) - - await job - - c.mustEqual(await limiter2.running(), 0) - - await limiter2.disconnect(false) - }) - - it('Should clear unresponsive clients after last jobs are expired', async function () { - c = makeTest({ - id: 'unresponsive-expired', - maxConcurrent: 1, - timeout: 1000, - clientTimeout: 200, - heartbeat: 2000 - }) - const limiter2 = new Bottleneck({ - id: 'unresponsive-expired', - datastore: process.env.DATASTORE - }) - - await c.limiter.ready() - await limiter2.ready() - - const client_running_key = limiterKeys(limiter2)[4] - const client_num_queued_key = limiterKeys(limiter2)[5] - const client_last_registered_key = limiterKeys(limiter2)[6] - const client_last_seen_key = limiterKeys(limiter2)[7] - const numClients = () => Promise.all([ - runCommand(limiter2, 'zcard', [client_running_key]), - runCommand(limiter2, 'hlen', [client_num_queued_key]), - runCommand(limiter2, 'zcard', [client_last_registered_key]), - runCommand(limiter2, 'zcard', [client_last_seen_key]) - ]) - - const job = c.limiter.schedule({ expiration: 250 }, c.slowPromise, 300, null, 1) - await c.wait(100) // wait for it to register - - c.mustEqual(await c.limiter.running(), 1) - c.mustEqual(await numClients(), [2,2,2,2]) - - let dropped = false - try { - await job - } catch (e) { - if (e.message === 'This job timed out after 250 ms.') { - dropped = true - } else { - throw e - } - } - assert(dropped) - - await c.wait(200) - - c.mustEqual(await limiter2.running(), 0) - c.mustEqual(await numClients(), [1,1,1,1]) - - await limiter2.disconnect(false) - }) - - it('Should use shared settings', function () { - c = makeTest({ maxConcurrent: 2 }) - var limiter2 = new Bottleneck({ maxConcurrent: 1, datastore: process.env.DATASTORE }) - - return Promise.all([ - limiter2.schedule(c.slowPromise, 100, null, 1), - limiter2.schedule(c.slowPromise, 100, null, 2) - ]) - .then(function () { - return limiter2.disconnect(false) - }) - .then(function () { - return c.last() - }) - .then(function (results) { - c.checkResultsOrder([[1], [2]]) - c.checkDuration(100) - }) - }) - - it('Should clear previous settings', function () { - c = makeTest({ maxConcurrent: 2 }) - var limiter2 - - return c.limiter.ready() - .then(function () { - limiter2 = new Bottleneck({ maxConcurrent: 1, datastore: process.env.DATASTORE, clearDatastore: true }) - return limiter2.ready() - }) - .then(function () { - return Promise.all([ - c.limiter.schedule(c.slowPromise, 100, null, 1), - c.limiter.schedule(c.slowPromise, 100, null, 2) - ]) - }) - .then(function () { - return limiter2.disconnect(false) - }) - .then(function () { - return c.last() - }) - .then(function (results) { - c.checkResultsOrder([[1], [2]]) - c.checkDuration(200) - }) - }) - - it('Should safely handle connection failures', function () { - c = makeTest({ - clientOptions: { port: 1 }, - errorEventsExpected: true - }) - - return new Promise(function (resolve, reject) { - c.limiter.on('error', function (err) { - assert(err != null) - resolve() - }) - - c.limiter.ready() - .then(function () { - reject(new Error('Should not have connected')) - }) - .catch(function (err) { - reject(err) - }) - }) - }) - - it('Should chain local and distributed limiters (total concurrency)', function () { - c = makeTest({ id: 'limiter1', maxConcurrent: 3 }) - var limiter2 = new Bottleneck({ id: 'limiter2', maxConcurrent: 1 }) - var limiter3 = new Bottleneck({ id: 'limiter3', maxConcurrent: 2 }) - - limiter2.on('error', (err) => console.log(err)) - - limiter2.chain(c.limiter) - limiter3.chain(c.limiter) - - return Promise.all([ - limiter2.schedule(c.slowPromise, 100, null, 1), - limiter2.schedule(c.slowPromise, 100, null, 2), - limiter2.schedule(c.slowPromise, 100, null, 3), - limiter3.schedule(c.slowPromise, 100, null, 4), - limiter3.schedule(c.slowPromise, 100, null, 5), - limiter3.schedule(c.slowPromise, 100, null, 6) - ]) - .then(c.last) - .then(function (results) { - c.checkDuration(300) - c.checkResultsOrder([[1], [4], [5], [2], [6], [3]]) - - assert(results.calls[0].time >= 100 && results.calls[0].time < 200) - assert(results.calls[1].time >= 100 && results.calls[1].time < 200) - assert(results.calls[2].time >= 100 && results.calls[2].time < 200) - - assert(results.calls[3].time >= 200 && results.calls[3].time < 300) - assert(results.calls[4].time >= 200 && results.calls[4].time < 300) - - assert(results.calls[5].time >= 300 && results.calls[2].time < 400) - }) - }) - - it('Should chain local and distributed limiters (partial concurrency)', function () { - c = makeTest({ maxConcurrent: 2 }) - var limiter2 = new Bottleneck({ maxConcurrent: 1 }) - var limiter3 = new Bottleneck({ maxConcurrent: 2 }) - - limiter2.chain(c.limiter) - limiter3.chain(c.limiter) - - return Promise.all([ - limiter2.schedule(c.slowPromise, 100, null, 1), - limiter2.schedule(c.slowPromise, 100, null, 2), - limiter2.schedule(c.slowPromise, 100, null, 3), - limiter3.schedule(c.slowPromise, 100, null, 4), - limiter3.schedule(c.slowPromise, 100, null, 5), - limiter3.schedule(c.slowPromise, 100, null, 6) - ]) - .then(c.last) - .then(function (results) { - c.checkDuration(300) - c.checkResultsOrder([[1], [4], [5], [2], [6], [3]]) - - assert(results.calls[0].time >= 100 && results.calls[0].time < 200) - assert(results.calls[1].time >= 100 && results.calls[1].time < 200) - - assert(results.calls[2].time >= 200 && results.calls[2].time < 300) - assert(results.calls[3].time >= 200 && results.calls[3].time < 300) - - assert(results.calls[4].time >= 300 && results.calls[4].time < 400) - assert(results.calls[5].time >= 300 && results.calls[2].time < 400) - }) - }) - - it('Should use the limiter ID to build Redis keys', function () { - c = makeTest() - var randomId = c.limiter._randomIndex() - var limiter = new Bottleneck({ id: randomId, datastore: process.env.DATASTORE, clearDatastore: true }) - - return limiter.ready() - .then(function () { - var keys = limiterKeys(limiter) - keys.forEach((key) => assert(key.indexOf(randomId) > 0)) - return deleteKeys(limiter) - }) - .then(function (deleted) { - c.mustEqual(deleted, 5) - return limiter.disconnect(false) - }) - }) - - it('Should not fail when Redis data is missing', function () { - c = makeTest() - var limiter = new Bottleneck({ datastore: process.env.DATASTORE, clearDatastore: true }) - - return limiter.running() - .then(function (running) { - c.mustEqual(running, 0) - return deleteKeys(limiter) - }) - .then(function (deleted) { - c.mustEqual(deleted, 5) - return countKeys(limiter) - }) - .then(function (count) { - c.mustEqual(count, 0) - return limiter.running() - }) - .then(function (running) { - c.mustEqual(running, 0) - return countKeys(limiter) - }) - .then(function (count) { - assert(count > 0) - return limiter.disconnect(false) - }) - }) - - it('Should drop all jobs in the Cluster when entering blocked mode', function () { - c = makeTest() - var limiter1 = new Bottleneck({ - id: 'blocked', - trackDoneStatus: true, - datastore: process.env.DATASTORE, - clearDatastore: true, - - maxConcurrent: 1, - minTime: 50, - highWater: 2, - strategy: Bottleneck.strategy.BLOCK - }) - var limiter2 - var client_num_queued_key = limiterKeys(limiter1)[5] - - return limiter1.ready() - .then(function () { - limiter2 = new Bottleneck({ - id: 'blocked', - trackDoneStatus: true, - datastore: process.env.DATASTORE, - clearDatastore: false, - }) - return limiter2.ready() - }) - .then(function () { - return Promise.all([ - limiter1.submit(c.slowJob, 100, null, 1, c.noErrVal(1)), - limiter1.submit(c.slowJob, 100, null, 2, (err) => c.mustExist(err)) - ]) - }) - .then(function () { - return Promise.all([ - limiter2.submit(c.slowJob, 100, null, 3, (err) => c.mustExist(err)), - limiter2.submit(c.slowJob, 100, null, 4, (err) => c.mustExist(err)), - limiter2.submit(c.slowJob, 100, null, 5, (err) => c.mustExist(err)) - ]) - }) - .then(function () { - return runCommand(limiter1, 'hvals', [client_num_queued_key]) - }) - .then(function (queues) { - c.mustEqual(queues, ['0', '0']) - - return Promise.all([ - c.limiter.clusterQueued(), - limiter2.clusterQueued() - ]) - }) - .then(function (queues) { - c.mustEqual(queues, [0, 0]) - - return c.wait(100) - }) - .then(function () { - var counts1 = limiter1.counts() - c.mustEqual(counts1.RECEIVED, 0) - c.mustEqual(counts1.QUEUED, 0) - c.mustEqual(counts1.RUNNING, 0) - c.mustEqual(counts1.EXECUTING, 0) - c.mustEqual(counts1.DONE, 1) - - var counts2 = limiter2.counts() - c.mustEqual(counts2.RECEIVED, 0) - c.mustEqual(counts2.QUEUED, 0) - c.mustEqual(counts2.RUNNING, 0) - c.mustEqual(counts2.EXECUTING, 0) - c.mustEqual(counts2.DONE, 0) - - return c.last() - }) - .then(function (results) { - c.checkResultsOrder([[1]]) - c.checkDuration(100) - - return Promise.all([ - limiter1.disconnect(false), - limiter2.disconnect(false) - ]) - }) - }) - - it('Should pass messages to all limiters in Cluster', function (done) { - c = makeTest({ - maxConcurrent: 1, - minTime: 100, - id: 'super-duper' - }) - var limiter1 = new Bottleneck({ - maxConcurrent: 1, - minTime: 100, - id: 'super-duper', - datastore: process.env.DATASTORE - }) - var limiter2 = new Bottleneck({ - maxConcurrent: 1, - minTime: 100, - id: 'nope', - datastore: process.env.DATASTORE - }) - var received = [] - - c.limiter.on('message', (msg) => { - received.push(1, msg) - }) - limiter1.on('message', (msg) => { - received.push(2, msg) - }) - limiter2.on('message', (msg) => { - received.push(3, msg) - }) - - Promise.all([c.limiter.ready(), limiter2.ready()]) - .then(function () { - limiter1.publish(555) - }) - - setTimeout(function () { - limiter1.disconnect() - limiter2.disconnect() - c.mustEqual(received.sort(), [1, 2, '555', '555']) - done() - }, 150) - }) - - it('Should pass messages to correct limiter after Group re-instantiations', function () { - c = makeTest() - var group = new Bottleneck.Group({ - maxConcurrent: 1, - minTime: 100, - datastore: process.env.DATASTORE - }) - var received = [] - - return new Promise(function (resolve, reject) { - var limiter = group.key('A') - - limiter.on('message', function (msg) { - received.push('1', msg) - return resolve() - }) - limiter.publish('Bonjour!') - }) - .then(function () { - return new Promise(function (resolve, reject) { - var limiter = group.key('B') - - limiter.on('message', function (msg) { - received.push('2', msg) - return resolve() - }) - limiter.publish('Comment allez-vous?') - }) - }) - .then(function () { - return group.deleteKey('A') - }) - .then(function () { - return new Promise(function (resolve, reject) { - var limiter = group.key('A') - - limiter.on('message', function (msg) { - received.push('3', msg) - return resolve() - }) - limiter.publish('Au revoir!') - }) - }) - .then(function () { - c.mustEqual(received, ['1', 'Bonjour!', '2', 'Comment allez-vous?', '3', 'Au revoir!']) - group.disconnect() - }) - }) - - it('Should have a default key TTL when using Groups', function () { - c = makeTest() - var group = new Bottleneck.Group({ - datastore: process.env.DATASTORE - }) - - return group.key('one').ready() - .then(function () { - var limiter = group.key('one') - var settings_key = limiterKeys(limiter)[0] - return runCommand(limiter, 'ttl', [settings_key]) - }) - .then(function (ttl) { - assert(ttl >= 290 && ttl <= 305) - }) - .then(function () { - return group.disconnect(false) - }) - }) - - it('Should support Groups and expire Redis keys', function () { - c = makeTest() - var group = new Bottleneck.Group({ - datastore: process.env.DATASTORE, - clearDatastore: true, - minTime: 50, - timeout: 200 - }) - var limiter1 - var limiter2 - var limiter3 - - var t0 = Date.now() - var results = {} - var job = function (x) { - results[x] = Date.now() - t0 - return Promise.resolve() - } - - return c.limiter.ready() - .then(function () { - limiter1 = group.key('one') - limiter2 = group.key('two') - limiter3 = group.key('three') - - return Promise.all([limiter1.ready(), limiter2.ready(), limiter3.ready()]) - }) - .then(function () { - return Promise.all([countKeys(limiter1), countKeys(limiter2), countKeys(limiter3)]) - }) - .then(function (counts) { - c.mustEqual(counts, [5, 5, 5]) - return Promise.all([ - limiter1.schedule(job, 'a'), - limiter1.schedule(job, 'b'), - limiter1.schedule(job, 'c'), - limiter2.schedule(job, 'd'), - limiter2.schedule(job, 'e'), - limiter3.schedule(job, 'f') - ]) - }) - .then(function () { - c.mustEqual(Object.keys(results).length, 6) - assert(results.a < results.b) - assert(results.b < results.c) - assert(results.b - results.a >= 40) - assert(results.c - results.b >= 40) - - assert(results.d < results.e) - assert(results.e - results.d >= 40) - - assert(Math.abs(results.a - results.d) <= 10) - assert(Math.abs(results.d - results.f) <= 10) - assert(Math.abs(results.b - results.e) <= 10) - - return c.wait(400) - }) - .then(function () { - return Promise.all([countKeys(limiter1), countKeys(limiter2), countKeys(limiter3)]) - }) - .then(function (counts) { - c.mustEqual(counts, [0, 0, 0]) - c.mustEqual(group.keys().length, 0) - c.mustEqual(Object.keys(group.connection.limiters).length, 0) - return group.disconnect(false) - }) - - }) - - it('Should not recreate a key when running heartbeat', function () { - c = makeTest() - var group = new Bottleneck.Group({ - datastore: process.env.DATASTORE, - clearDatastore: true, - maxConcurrent: 50, - minTime: 50, - timeout: 300, - heartbeatInterval: 5 - }) - var key = 'heartbeat' - - var limiter = group.key(key) - return c.pNoErrVal(limiter.schedule(c.promise, null, 1), 1) - .then(function () { - return limiter.done() - }) - .then(function (done) { - c.mustEqual(done, 1) - return c.wait(400) - }) - .then(function () { - return countKeys(limiter) - }) - .then(function (count) { - c.mustEqual(count, 0) - return group.disconnect(false) - }) - }) - - it('Should delete Redis key when manually deleting a group key', function () { - c = makeTest() - var group1 = new Bottleneck.Group({ - datastore: process.env.DATASTORE, - clearDatastore: true, - maxConcurrent: 50, - minTime: 50, - timeout: 300 - }) - var group2 = new Bottleneck.Group({ - datastore: process.env.DATASTORE, - clearDatastore: true, - maxConcurrent: 50, - minTime: 50, - timeout: 300 - }) - var key = 'deleted' - var limiter = group1.key(key) // only for countKeys() use - - return c.pNoErrVal(group1.key(key).schedule(c.promise, null, 1), 1) - .then(function () { - return c.pNoErrVal(group2.key(key).schedule(c.promise, null, 2), 2) - }) - .then(function () { - c.mustEqual(group1.keys().length, 1) - c.mustEqual(group2.keys().length, 1) - return group1.deleteKey(key) - }) - .then(function (deleted) { - c.mustEqual(deleted, true) - return countKeys(limiter) - }) - .then(function (count) { - c.mustEqual(count, 0) - c.mustEqual(group1.keys().length, 0) - c.mustEqual(group2.keys().length, 1) - return c.wait(200) - }) - .then(function () { - c.mustEqual(group1.keys().length, 0) - c.mustEqual(group2.keys().length, 0) - return Promise.all([ - group1.disconnect(false), - group2.disconnect(false) - ]) - }) - }) - - it('Should delete Redis keys from a group even when the local limiter is not present', function () { - c = makeTest() - var group1 = new Bottleneck.Group({ - datastore: process.env.DATASTORE, - clearDatastore: true, - maxConcurrent: 50, - minTime: 50, - timeout: 300 - }) - var group2 = new Bottleneck.Group({ - datastore: process.env.DATASTORE, - clearDatastore: true, - maxConcurrent: 50, - minTime: 50, - timeout: 300 - }) - var key = 'deleted-cluster-wide' - var limiter = group1.key(key) // only for countKeys() use - - return c.pNoErrVal(group1.key(key).schedule(c.promise, null, 1), 1) - .then(function () { - c.mustEqual(group1.keys().length, 1) - c.mustEqual(group2.keys().length, 0) - return group2.deleteKey(key) - }) - .then(function (deleted) { - c.mustEqual(deleted, true) - return countKeys(limiter) - }) - .then(function (count) { - c.mustEqual(count, 0) - c.mustEqual(group1.keys().length, 1) - c.mustEqual(group2.keys().length, 0) - return c.wait(200) - }) - .then(function () { - c.mustEqual(group1.keys().length, 0) - c.mustEqual(group2.keys().length, 0) - return Promise.all([ - group1.disconnect(false), - group2.disconnect(false) - ]) - }) - }) - - it('Should returns all Group keys in the cluster', async function () { - c = makeTest() - var group1 = new Bottleneck.Group({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'same', - timeout: 3000 - }) - var group2 = new Bottleneck.Group({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'same', - timeout: 3000 - }) - var keys1 = ['lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur'] - var keys2 = ['adipiscing', 'elit'] - var both = keys1.concat(keys2) - - await Promise.all(keys1.map((k) => group1.key(k).ready())) - await Promise.all(keys2.map((k) => group2.key(k).ready())) - - c.mustEqual(group1.keys().sort(), keys1.sort()) - c.mustEqual(group2.keys().sort(), keys2.sort()) - c.mustEqual( - (await group1.clusterKeys()).sort(), - both.sort() - ) - c.mustEqual( - (await group1.clusterKeys()).sort(), - both.sort() - ) - - var group3 = new Bottleneck.Group({ datastore: 'local' }) - c.mustEqual(await group3.clusterKeys(), []) - - await group1.disconnect(false) - await group2.disconnect(false) - }) - - it('Should queue up the least busy limiter', async function () { - c = makeTest() - var limiter1 = new Bottleneck({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'busy', - timeout: 3000, - maxConcurrent: 3, - trackDoneStatus: true - }) - var limiter2 = new Bottleneck({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'busy', - timeout: 3000, - maxConcurrent: 3, - trackDoneStatus: true - }) - var limiter3 = new Bottleneck({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'busy', - timeout: 3000, - maxConcurrent: 3, - trackDoneStatus: true - }) - var limiter4 = new Bottleneck({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'busy', - timeout: 3000, - maxConcurrent: 3, - trackDoneStatus: true - }) - var runningOrExecuting = function (limiter) { - var counts = limiter.counts() - return counts.RUNNING + counts.EXECUTING - } - - var resolve1, resolve2, resolve3, resolve4, resolve5, resolve6, resolve7 - var p1 = new Promise(function (resolve, reject) { - resolve1 = function (err, n) { resolve(n) } - }) - var p2 = new Promise(function (resolve, reject) { - resolve2 = function (err, n) { resolve(n) } - }) - var p3 = new Promise(function (resolve, reject) { - resolve3 = function (err, n) { resolve(n) } - }) - var p4 = new Promise(function (resolve, reject) { - resolve4 = function (err, n) { resolve(n) } - }) - var p5 = new Promise(function (resolve, reject) { - resolve5 = function (err, n) { resolve(n) } - }) - var p6 = new Promise(function (resolve, reject) { - resolve6 = function (err, n) { resolve(n) } - }) - var p7 = new Promise(function (resolve, reject) { - resolve7 = function (err, n) { resolve(n) } - }) - - await limiter1.schedule({id: '1'}, c.promise, null, 'A') - await limiter2.schedule({id: '2'}, c.promise, null, 'B') - await limiter3.schedule({id: '3'}, c.promise, null, 'C') - await limiter4.schedule({id: '4'}, c.promise, null, 'D') - - await limiter1.submit({id: 'A'}, c.slowJob, 50, null, 1, resolve1) - await limiter1.submit({id: 'B'}, c.slowJob, 500, null, 2, resolve2) - await limiter2.submit({id: 'C'}, c.slowJob, 550, null, 3, resolve3) - - c.mustEqual(runningOrExecuting(limiter1), 2) - c.mustEqual(runningOrExecuting(limiter2), 1) - - await limiter3.submit({id: 'D'}, c.slowJob, 50, null, 4, resolve4) - await limiter4.submit({id: 'E'}, c.slowJob, 50, null, 5, resolve5) - await limiter3.submit({id: 'F'}, c.slowJob, 50, null, 6, resolve6) - await limiter4.submit({id: 'G'}, c.slowJob, 50, null, 7, resolve7) - - c.mustEqual(limiter3.counts().QUEUED, 2) - c.mustEqual(limiter4.counts().QUEUED, 2) - - await Promise.all([p1, p2, p3, p4, p5, p6, p7]) - - c.checkResultsOrder([['A'],['B'],['C'],['D'],[1],[4],[5],[6],[7],[2],[3]]) - - await limiter1.disconnect(false) - await limiter2.disconnect(false) - await limiter3.disconnect(false) - await limiter4.disconnect(false) - }) - - it('Should pass the remaining capacity to other limiters', async function () { - c = makeTest() - var limiter1 = new Bottleneck({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'busy', - timeout: 3000, - maxConcurrent: 3, - trackDoneStatus: true - }) - var limiter2 = new Bottleneck({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'busy', - timeout: 3000, - maxConcurrent: 3, - trackDoneStatus: true - }) - var limiter3 = new Bottleneck({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'busy', - timeout: 3000, - maxConcurrent: 3, - trackDoneStatus: true - }) - var limiter4 = new Bottleneck({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'busy', - timeout: 3000, - maxConcurrent: 3, - trackDoneStatus: true - }) - var runningOrExecuting = function (limiter) { - var counts = limiter.counts() - return counts.RUNNING + counts.EXECUTING - } - var t3, t4 - - var resolve1, resolve2, resolve3, resolve4, resolve5 - var p1 = new Promise(function (resolve, reject) { - resolve1 = function (err, n) { resolve(n) } - }) - var p2 = new Promise(function (resolve, reject) { - resolve2 = function (err, n) { resolve(n) } - }) - var p3 = new Promise(function (resolve, reject) { - resolve3 = function (err, n) { t3 = Date.now(); resolve(n) } - }) - var p4 = new Promise(function (resolve, reject) { - resolve4 = function (err, n) { t4 = Date.now(); resolve(n) } - }) - var p5 = new Promise(function (resolve, reject) { - resolve5 = function (err, n) { resolve(n) } - }) - - await limiter1.schedule({id: '1'}, c.promise, null, 'A') - await limiter2.schedule({id: '2'}, c.promise, null, 'B') - await limiter3.schedule({id: '3'}, c.promise, null, 'C') - await limiter4.schedule({id: '4'}, c.promise, null, 'D') - - await limiter1.submit({id: 'A', weight: 2}, c.slowJob, 50, null, 1, resolve1) - await limiter2.submit({id: 'C'}, c.slowJob, 550, null, 2, resolve2) - - c.mustEqual(runningOrExecuting(limiter1), 1) - c.mustEqual(runningOrExecuting(limiter2), 1) - - await limiter3.submit({id: 'D'}, c.slowJob, 50, null, 3, resolve3) - await limiter4.submit({id: 'E'}, c.slowJob, 50, null, 4, resolve4) - await limiter4.submit({id: 'G'}, c.slowJob, 50, null, 5, resolve5) - - c.mustEqual(limiter3.counts().QUEUED, 1) - c.mustEqual(limiter4.counts().QUEUED, 2) - - await Promise.all([p1, p2, p3, p4, p5]) - - c.checkResultsOrder([['A'],['B'],['C'],['D'],[1],[3],[4],[5],[2]]) - - assert(Math.abs(t3 - t4) < 15) - - await limiter1.disconnect(false) - await limiter2.disconnect(false) - await limiter3.disconnect(false) - await limiter4.disconnect(false) - }) - - it('Should take the capacity and blacklist if the priority limiter is not responding', async function () { - c = makeTest() - var limiter1 = new Bottleneck({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'crash', - timeout: 3000, - maxConcurrent: 1, - trackDoneStatus: true - }) - var limiter2 = new Bottleneck({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'crash', - timeout: 3000, - maxConcurrent: 1, - trackDoneStatus: true - }) - var limiter3 = new Bottleneck({ - datastore: process.env.DATASTORE, - clearDatastore: true, - id: 'crash', - timeout: 3000, - maxConcurrent: 1, - trackDoneStatus: true - }) - - await limiter1.schedule({id: '1'}, c.promise, null, 'A') - await limiter2.schedule({id: '2'}, c.promise, null, 'B') - await limiter3.schedule({id: '3'}, c.promise, null, 'C') - - var resolve1, resolve2, resolve3 - var p1 = new Promise(function (resolve, reject) { - resolve1 = function (err, n) { resolve(n) } - }) - var p2 = new Promise(function (resolve, reject) { - resolve2 = function (err, n) { resolve(n) } - }) - var p3 = new Promise(function (resolve, reject) { - resolve3 = function (err, n) { resolve(n) } - }) - - await limiter1.submit({id: '4'}, c.slowJob, 100, null, 4, resolve1) - await limiter2.submit({id: '5'}, c.slowJob, 100, null, 5, resolve2) - await limiter3.submit({id: '6'}, c.slowJob, 100, null, 6, resolve3) - await limiter2.disconnect(false) - - await Promise.all([p1, p3]) - c.checkResultsOrder([['A'], ['B'], ['C'], [4], [6]]) - - await limiter1.disconnect(false) - await limiter2.disconnect(false) - await limiter3.disconnect(false) - }) - - }) -} diff --git a/node_modules/bottleneck/test/context.js b/node_modules/bottleneck/test/context.js deleted file mode 100644 index 8d498f3a2..000000000 --- a/node_modules/bottleneck/test/context.js +++ /dev/null @@ -1,142 +0,0 @@ -global.TEST = true -var Bottleneck = require('./bottleneck') -var assert = require('assert') - -module.exports = function (options={}) { - var mustEqual = function (a, b) { - var strA = JSON.stringify(a) - var strB = JSON.stringify(b) - if (strA !== strB) { - console.log(strA + ' !== ' + strB, (new Error('').stack)) - assert(strA === strB) - } - } - - var start - var calls = [] - - // set options.datastore - var setRedisClientOptions = function (options) { - options.clearDatastore = true - if (options.clientOptions == null) { - options.clientOptions = { - host: process.env.REDIS_HOST, - port: process.env.REDIS_PORT, - } - } - } - - if (options.datastore == null && process.env.DATASTORE === 'redis') { - options.datastore = 'redis' - setRedisClientOptions(options) - } else if (options.datastore == null && process.env.DATASTORE === 'ioredis') { - options.datastore = 'ioredis' - setRedisClientOptions(options) - } else { - options.datastore = 'local' - } - - var limiter = new Bottleneck(options) - // limiter.on("debug", function (str, args) { console.log(`${Date.now()-start} ${str} ${JSON.stringify(args)}`) }) - if (!options.errorEventsExpected) { - limiter.on("error", function (err) { - console.log('(CONTEXT) ERROR EVENT', err) - }) - } - limiter.ready().then(function (client) { - start = Date.now() - }) - var getResults = function () { - return { - elapsed: Date.now() - start, - callsDuration: calls.length > 0 ? calls[calls.length - 1].time : null, - calls: calls - } - } - - var context = { - job: function (err, ...result) { - var cb = result.pop() - calls.push({err: err, result: result, time: Date.now()-start}) - if (process.env.DEBUG) console.log(result, calls) - cb.apply({}, [err].concat(result)) - }, - slowJob: function (duration, err, ...result) { - setTimeout(function () { - var cb = result.pop() - calls.push({err: err, result: result, time: Date.now()-start}) - if (process.env.DEBUG) console.log(result, calls) - cb.apply({}, [err].concat(result)) - }, duration) - }, - promise: function (err, ...result) { - return new Promise(function (resolve, reject) { - if (process.env.DEBUG) console.log('In c.promise. Result: ', result) - calls.push({err: err, result: result, time: Date.now()-start}) - if (process.env.DEBUG) console.log(result, calls) - if (err === null) { - return resolve(result) - } else { - return reject(err) - } - }) - }, - slowPromise: function (duration, err, ...result) { - return new Promise(function (resolve, reject) { - setTimeout(function () { - if (process.env.DEBUG) console.log('In c.slowPromise. Result: ', result) - calls.push({err: err, result: result, time: Date.now()-start}) - if (process.env.DEBUG) console.log(result, calls) - if (err === null) { - return resolve(result) - } else { - return reject(err) - } - }, duration) - }) - }, - pNoErrVal: function (promise, ...expected) { - if (process.env.DEBUG) console.log('In c.pNoErrVal. Expected:', expected) - return promise.then(function (actual) { - mustEqual(actual, expected) - }) - }, - noErrVal: function (...expected) { - return function (err, ...actual) { - mustEqual(err, null) - mustEqual(actual, expected) - } - }, - last: function (options) { - var opt = options != null ? options : {} - return limiter.schedule(opt, function () { return Promise.resolve(getResults()) }) - .catch(function (err) { console.error("Error in context.last:", err)}) - }, - wait: function (wait) { - return new Promise(function (resolve, reject) { - setTimeout(resolve, wait) - }) - }, - limiter: limiter, - mustEqual: mustEqual, - mustExist: function (a) { assert(a != null) }, - results: getResults, - checkResultsOrder: function (order) { - mustEqual(order.length, calls.length) - for (var i = 0; i < Math.max(calls.length, order.length); i++) { - mustEqual(order[i], calls[i].result) - } - }, - checkDuration: function (shouldBe, minBound = 10) { - var results = getResults() - var min = shouldBe - minBound - var max = shouldBe + 50 - if (!(results.callsDuration > min && results.callsDuration < max)) { - console.error('Duration not around ' + shouldBe + '. Was ' + results.callsDuration) - } - assert(results.callsDuration > min && results.callsDuration < max) - } - } - - return context -} diff --git a/node_modules/bottleneck/test/general.js b/node_modules/bottleneck/test/general.js deleted file mode 100644 index 14aa63a51..000000000 --- a/node_modules/bottleneck/test/general.js +++ /dev/null @@ -1,867 +0,0 @@ -var makeTest = require('./context') -var Bottleneck = require('./bottleneck') -var assert = require('assert') -var child_process = require('child_process') - -describe('General', function () { - var c - - afterEach(function () { - return c.limiter.disconnect(false) - }) - - if ( - process.env.DATASTORE !== 'redis' && process.env.DATASTORE !== 'ioredis' && - process.env.BUILD !== 'es5' && process.env.BUILD !== 'light' - ) { - it('Should not leak memory on instantiation', async function () { - c = makeTest() - this.timeout(8000) - const { iterate } = require('leakage') - - const result = await iterate.async(async () => { - const limiter = new Bottleneck({ datastore: 'local' }) - await limiter.ready() - return limiter.disconnect(false) - }, { iterations: 25 }) - - }) - - it('Should not leak memory running jobs', async function () { - c = makeTest() - this.timeout(12000) - const { iterate } = require('leakage') - const limiter = new Bottleneck({ datastore: 'local', maxConcurrent: 1, minTime: 10 }) - await limiter.ready() - var ctr = 0 - var i = 0 - - const result = await iterate.async(async () => { - await limiter.schedule(function (zero, one) { - i = i + zero + one - }, 0, 1) - await limiter.schedule(function (zero, one) { - i = i + zero + one - }, 0, 1) - }, { iterations: 25 }) - c.mustEqual(i, 302) - }) - } - - it('Should prompt to upgrade', function () { - c = makeTest() - try { - var limiter = new Bottleneck(1, 250) - } catch (err) { - c.mustEqual(err.message, 'Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you\'re upgrading from Bottleneck v1.') - } - }) - - it('Should allow null capacity', function () { - c = makeTest({ id: 'null', minTime: 0 }) - return c.limiter.updateSettings({ minTime: 10 }) - }) - - it('Should keep scope', async function () { - c = makeTest({ maxConcurrent: 1 }) - - class Job { - constructor() { - this.value = 5 - } - action(x) { - return this.value + x - } - } - var job = new Job() - - c.mustEqual(6, await c.limiter.schedule(() => job.action.bind(job)(1))) - c.mustEqual(7, await c.limiter.wrap(job.action.bind(job))(2)) - }) - - it('Should pass multiple arguments back even on errors when using submit()', function (done) { - c = makeTest({ maxConcurrent: 1 }) - - c.limiter.submit(c.job, new Error('welp'), 1, 2, function (err, x, y) { - c.mustEqual(err.message, 'welp') - c.mustEqual(x, 1) - c.mustEqual(y, 2) - done() - }) - }) - - it('Should expose the Events library', function (cb) { - c = makeTest() - - class Hello { - constructor() { - this.emitter = new Bottleneck.Events(this) - } - - doSomething() { - this.emitter.trigger('info', 'hello', 'world', 123) - return 5 - } - } - - const myObject = new Hello(); - myObject.on('info', (...args) => { - c.mustEqual(args, ['hello', 'world', 123]) - cb() - }) - myObject.doSomething() - c.mustEqual(myObject.emitter.listenerCount('info'), 1) - c.mustEqual(myObject.emitter.listenerCount('nothing'), 0) - - myObject.on('blah', '') - myObject.on('blah', null) - myObject.on('blah') - return myObject.emitter.trigger('blah') - }) - - describe('Counts and statuses', function () { - it('Should check() and return the queued count with and without a priority value', async function () { - c = makeTest({maxConcurrent: 1, minTime: 100}) - - c.mustEqual(await c.limiter.check(), true) - - c.mustEqual(c.limiter.queued(), 0) - c.mustEqual(await c.limiter.clusterQueued(), 0) - - await c.limiter.submit({id: 1}, c.slowJob, 50, null, 1, c.noErrVal(1)) - c.mustEqual(c.limiter.queued(), 0) // It's already running - - c.mustEqual(await c.limiter.check(), false) - - await c.limiter.submit({id: 2}, c.slowJob, 50, null, 2, c.noErrVal(2)) - c.mustEqual(c.limiter.queued(), 1) - c.mustEqual(await c.limiter.clusterQueued(), 1) - c.mustEqual(c.limiter.queued(1), 0) - c.mustEqual(c.limiter.queued(5), 1) - - await c.limiter.submit({id: 3}, c.slowJob, 50, null, 3, c.noErrVal(3)) - c.mustEqual(c.limiter.queued(), 2) - c.mustEqual(await c.limiter.clusterQueued(), 2) - c.mustEqual(c.limiter.queued(1), 0) - c.mustEqual(c.limiter.queued(5), 2) - - await c.limiter.submit({id: 4}, c.slowJob, 50, null, 4, c.noErrVal(4)) - c.mustEqual(c.limiter.queued(), 3) - c.mustEqual(await c.limiter.clusterQueued(), 3) - c.mustEqual(c.limiter.queued(1), 0) - c.mustEqual(c.limiter.queued(5), 3) - - await c.limiter.submit({priority: 1, id: 5}, c.job, null, 5, c.noErrVal(5)) - c.mustEqual(c.limiter.queued(), 4) - c.mustEqual(await c.limiter.clusterQueued(), 4) - c.mustEqual(c.limiter.queued(1), 1) - c.mustEqual(c.limiter.queued(5), 3) - - var results = await c.last() - c.mustEqual(c.limiter.queued(), 0) - c.mustEqual(await c.limiter.clusterQueued(), 0) - c.checkResultsOrder([[1], [5], [2], [3], [4]]) - c.checkDuration(450) - }) - - it('Should return the running and done counts', function () { - c = makeTest({maxConcurrent: 5, minTime: 0}) - - return Promise.all([c.limiter.running(), c.limiter.done()]) - .then(function ([running, done]) { - c.mustEqual(running, 0) - c.mustEqual(done, 0) - c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 1 }, c.slowPromise, 100, null, 1), 1) - c.pNoErrVal(c.limiter.schedule({ weight: 3, id: 2 }, c.slowPromise, 200, null, 2), 2) - c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 3 }, c.slowPromise, 100, null, 3), 3) - - return c.limiter.schedule({ weight: 0, id: 4 }, c.promise, null) - }) - .then(function () { - return Promise.all([c.limiter.running(), c.limiter.done()]) - }) - .then(function ([running, done]) { - c.mustEqual(running, 5) - c.mustEqual(done, 0) - return c.wait(125) - }) - .then(function () { - return Promise.all([c.limiter.running(), c.limiter.done()]) - }) - .then(function ([running, done]) { - c.mustEqual(running, 3) - c.mustEqual(done, 2) - return c.wait(100) - }) - .then(function () { - return Promise.all([c.limiter.running(), c.limiter.done()]) - }) - .then(function ([running, done]) { - c.mustEqual(running, 0) - c.mustEqual(done, 5) - return c.last() - }) - .then(function (results) { - c.checkDuration(200) - c.checkResultsOrder([[], [1], [3], [2]]) - }) - }) - - it('Should refuse duplicate Job IDs', async function () { - c = makeTest({maxConcurrent: 2, minTime: 100, trackDoneStatus: true}) - - try { - await c.limiter.schedule({ id: 'a' }, c.promise, null, 1) - await c.limiter.schedule({ id: 'b' }, c.promise, null, 2) - await c.limiter.schedule({ id: 'a' }, c.promise, null, 3) - } catch (e) { - c.mustEqual(e.message, 'A job with the same id already exists (id=a)') - } - }) - - it('Should return job statuses', function () { - c = makeTest({maxConcurrent: 2, minTime: 100}) - - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 0, RUNNING: 0, EXECUTING: 0 }) - - c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 1 }, c.slowPromise, 100, null, 1), 1) - c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 2 }, c.slowPromise, 200, null, 2), 2) - c.pNoErrVal(c.limiter.schedule({ weight: 2, id: 3 }, c.slowPromise, 100, null, 3), 3) - c.mustEqual(c.limiter.counts(), { RECEIVED: 3, QUEUED: 0, RUNNING: 0, EXECUTING: 0 }) - - return c.wait(50) - .then(function () { - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 1, RUNNING: 1, EXECUTING: 1 }) - c.mustEqual(c.limiter.jobStatus(1), 'EXECUTING') - c.mustEqual(c.limiter.jobStatus(2), 'RUNNING') - c.mustEqual(c.limiter.jobStatus(3), 'QUEUED') - - return c.last() - }) - .then(function (results) { - c.checkDuration(400) - c.checkResultsOrder([[1], [2], [3]]) - }) - }) - - it('Should return job statuses, including DONE', function () { - c = makeTest({maxConcurrent: 2, minTime: 100, trackDoneStatus: true}) - - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 0, RUNNING: 0, EXECUTING: 0, DONE: 0 }) - - c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 1 }, c.slowPromise, 100, null, 1), 1) - c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 2 }, c.slowPromise, 200, null, 2), 2) - c.pNoErrVal(c.limiter.schedule({ weight: 2, id: 3 }, c.slowPromise, 100, null, 3), 3) - c.mustEqual(c.limiter.counts(), { RECEIVED: 3, QUEUED: 0, RUNNING: 0, EXECUTING: 0, DONE: 0 }) - - return c.wait(50) - .then(function () { - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 1, RUNNING: 1, EXECUTING: 1, DONE: 0 }) - c.mustEqual(c.limiter.jobStatus(1), 'EXECUTING') - c.mustEqual(c.limiter.jobStatus(2), 'RUNNING') - c.mustEqual(c.limiter.jobStatus(3), 'QUEUED') - - return c.wait(100) - }) - .then(function () { - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 1, RUNNING: 0, EXECUTING: 1, DONE: 1 }) - c.mustEqual(c.limiter.jobStatus(1), 'DONE') - c.mustEqual(c.limiter.jobStatus(2), 'EXECUTING') - c.mustEqual(c.limiter.jobStatus(3), 'QUEUED') - - return c.last() - }) - .then(function (results) { - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 0, RUNNING: 0, EXECUTING: 0, DONE: 4 }) - c.checkDuration(400) - c.checkResultsOrder([[1], [2], [3]]) - }) - }) - - it('Should return jobs for a status', function () { - c = makeTest({maxConcurrent: 2, minTime: 100, trackDoneStatus: true}) - - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 0, RUNNING: 0, EXECUTING: 0, DONE: 0 }) - - c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 1 }, c.slowPromise, 100, null, 1), 1) - c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 2 }, c.slowPromise, 200, null, 2), 2) - c.pNoErrVal(c.limiter.schedule({ weight: 2, id: 3 }, c.slowPromise, 100, null, 3), 3) - c.mustEqual(c.limiter.counts(), { RECEIVED: 3, QUEUED: 0, RUNNING: 0, EXECUTING: 0, DONE: 0 }) - - c.mustEqual(c.limiter.jobs(), ['1', '2', '3']) - c.mustEqual(c.limiter.jobs('RECEIVED'), ['1', '2', '3']) - - return c.wait(50) - .then(function () { - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 1, RUNNING: 1, EXECUTING: 1, DONE: 0 }) - c.mustEqual(c.limiter.jobs('EXECUTING'), ['1']) - c.mustEqual(c.limiter.jobs('RUNNING'), ['2']) - c.mustEqual(c.limiter.jobs('QUEUED'), ['3']) - - return c.wait(100) - }) - .then(function () { - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 1, RUNNING: 0, EXECUTING: 1, DONE: 1 }) - c.mustEqual(c.limiter.jobs('DONE'), ['1']) - c.mustEqual(c.limiter.jobs('EXECUTING'), ['2']) - c.mustEqual(c.limiter.jobs('QUEUED'), ['3']) - - return c.last() - }) - .then(function (results) { - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 0, RUNNING: 0, EXECUTING: 0, DONE: 4 }) - c.checkDuration(400) - c.checkResultsOrder([[1], [2], [3]]) - }) - }) - - it('Should trigger events on status changes', function () { - c = makeTest({maxConcurrent: 2, minTime: 100, trackDoneStatus: true}) - var onReceived = 0 - var onQueued = 0 - var onScheduled = 0 - var onExecuting = 0 - var onDone = 0 - c.limiter.on('received', (info) => { - c.mustEqual(Object.keys(info).sort(), ['args', 'options']) - onReceived++ - }) - c.limiter.on('queued', (info) => { - c.mustEqual(Object.keys(info).sort(), ['args', 'blocked', 'options', 'reachedHWM']) - onQueued++ - }) - c.limiter.on('scheduled', (info) => { - c.mustEqual(Object.keys(info).sort(), ['args', 'options']) - onScheduled++ - }) - c.limiter.on('executing', (info) => { - c.mustEqual(Object.keys(info).sort(), ['args', 'options', 'retryCount']) - onExecuting++ - }) - c.limiter.on('done', (info) => { - c.mustEqual(Object.keys(info).sort(), ['args', 'options', 'retryCount']) - onDone++ - }) - - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 0, RUNNING: 0, EXECUTING: 0, DONE: 0 }) - - c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 1 }, c.slowPromise, 100, null, 1), 1) - c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 2 }, c.slowPromise, 200, null, 2), 2) - c.pNoErrVal(c.limiter.schedule({ weight: 2, id: 3 }, c.slowPromise, 100, null, 3), 3) - c.mustEqual(c.limiter.counts(), { RECEIVED: 3, QUEUED: 0, RUNNING: 0, EXECUTING: 0, DONE: 0 }) - - c.mustEqual([onReceived, onQueued, onScheduled, onExecuting, onDone], [3, 0, 0, 0, 0]) - - return c.wait(50) - .then(function () { - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 1, RUNNING: 1, EXECUTING: 1, DONE: 0 }) - c.mustEqual([onReceived, onQueued, onScheduled, onExecuting, onDone], [3, 3, 2, 1, 0]) - - return c.wait(100) - }) - .then(function () { - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 1, RUNNING: 0, EXECUTING: 1, DONE: 1 }) - c.mustEqual(c.limiter.jobs('DONE'), ['1']) - c.mustEqual(c.limiter.jobs('EXECUTING'), ['2']) - c.mustEqual(c.limiter.jobs('QUEUED'), ['3']) - c.mustEqual([onReceived, onQueued, onScheduled, onExecuting, onDone], [3, 3, 2, 2, 1]) - - return c.last() - }) - .then(function (results) { - c.mustEqual(c.limiter.counts(), { RECEIVED: 0, QUEUED: 0, RUNNING: 0, EXECUTING: 0, DONE: 4 }) - c.mustEqual([onReceived, onQueued, onScheduled, onExecuting, onDone], [4, 4, 4, 4, 4]) - c.checkDuration(400) - c.checkResultsOrder([[1], [2], [3]]) - }) - }) - }) - - describe('Events', function () { - it('Should return itself', function () { - c = makeTest({ id: 'test-limiter' }) - - var returned = c.limiter.on('ready', function () { }) - c.mustEqual(returned.id, 'test-limiter') - }) - - it('Should fire events on empty queue', function () { - c = makeTest({maxConcurrent: 1, minTime: 100}) - var calledEmpty = 0 - var calledIdle = 0 - var calledDepleted = 0 - - c.limiter.on('empty', function () { calledEmpty++ }) - c.limiter.on('idle', function () { calledIdle++ }) - c.limiter.on('depleted', function () { calledDepleted++ }) - - return c.pNoErrVal(c.limiter.schedule({id: 1}, c.slowPromise, 50, null, 1), 1) - .then(function () { - c.mustEqual(calledEmpty, 1) - c.mustEqual(calledIdle, 1) - return Promise.all([ - c.pNoErrVal(c.limiter.schedule({id: 2}, c.slowPromise, 50, null, 2), 2), - c.pNoErrVal(c.limiter.schedule({id: 3}, c.slowPromise, 50, null, 3), 3) - ]) - }) - .then(function () { - return c.limiter.submit({id: 4}, c.slowJob, 50, null, 4, null) - }) - .then(function () { - c.checkDuration(250) - c.checkResultsOrder([[1], [2], [3]]) - c.mustEqual(calledEmpty, 3) - c.mustEqual(calledIdle, 2) - c.mustEqual(calledDepleted, 0) - return c.last() - }) - }) - - it('Should fire events once', function () { - c = makeTest({maxConcurrent: 1, minTime: 100}) - var calledEmptyOnce = 0 - var calledIdleOnce = 0 - var calledEmpty = 0 - var calledIdle = 0 - var calledDepleted = 0 - - c.limiter.once('empty', function () { calledEmptyOnce++ }) - c.limiter.once('idle', function () { calledIdleOnce++ }) - c.limiter.on('empty', function () { calledEmpty++ }) - c.limiter.on('idle', function () { calledIdle++ }) - c.limiter.on('depleted', function () { calledDepleted++ }) - - c.pNoErrVal(c.limiter.schedule(c.slowPromise, 50, null, 1), 1) - - return c.pNoErrVal(c.limiter.schedule(c.promise, null, 2), 2) - .then(function () { - c.mustEqual(calledEmptyOnce, 1) - c.mustEqual(calledIdleOnce, 1) - c.mustEqual(calledEmpty, 1) - c.mustEqual(calledIdle, 1) - return c.pNoErrVal(c.limiter.schedule(c.promise, null, 3), 3) - }) - .then(function () { - c.checkDuration(200) - c.checkResultsOrder([[1], [2], [3]]) - c.mustEqual(calledEmptyOnce, 1) - c.mustEqual(calledIdleOnce, 1) - c.mustEqual(calledEmpty, 2) - c.mustEqual(calledIdle, 2) - c.mustEqual(calledDepleted, 0) - }) - }) - - it('Should support faulty event listeners', function (done) { - c = makeTest({maxConcurrent: 1, minTime: 100, errorEventsExpected: true}) - var calledError = 0 - - c.limiter.on('error', function (err) { - calledError++ - if (err.message === 'Oh noes!' && calledError === 1) { - done() - } - }) - c.limiter.on('empty', function () { - throw new Error('Oh noes!') - }) - - c.pNoErrVal(c.limiter.schedule(c.promise, null, 1), 1) - }) - - it('Should wait for async event listeners', function (done) { - c = makeTest({maxConcurrent: 1, minTime: 100, errorEventsExpected: true}) - var calledError = 0 - - c.limiter.on('error', function (err) { - calledError++ - if (err.message === 'It broke!' && calledError === 1) { - done() - } - }) - c.limiter.on('empty', function () { - return c.slowPromise(100, null, 1, 2) - .then(function (x) { - c.mustEqual(x, [1, 2]) - return Promise.reject(new Error('It broke!')) - }) - }) - - c.pNoErrVal(c.limiter.schedule(c.promise, null, 1), 1) - }) - }) - - describe('High water limit', function () { - it('Should support highWater set to 0', function () { - c = makeTest({maxConcurrent: 1, minTime: 0, highWater: 0, rejectOnDrop: false}) - - var first = c.pNoErrVal(c.limiter.schedule(c.slowPromise, 50, null, 1), 1) - c.pNoErrVal(c.limiter.schedule(c.slowPromise, 50, null, 2), 2) - c.pNoErrVal(c.limiter.schedule(c.slowPromise, 50, null, 3), 3) - c.pNoErrVal(c.limiter.schedule(c.slowPromise, 50, null, 4), 4) - - return first - .then(function () { - return c.last({ weight: 0 }) - }) - .then(function (results) { - c.checkDuration(50) - c.checkResultsOrder([[1]]) - }) - }) - - it('Should support highWater set to 1', function () { - c = makeTest({maxConcurrent: 1, minTime: 0, highWater: 1, rejectOnDrop: false}) - - var first = c.pNoErrVal(c.limiter.schedule(c.slowPromise, 50, null, 1), 1) - c.pNoErrVal(c.limiter.schedule(c.slowPromise, 50, null, 2), 2) - c.pNoErrVal(c.limiter.schedule(c.slowPromise, 50, null, 3), 3) - var last = c.pNoErrVal(c.limiter.schedule(c.slowPromise, 50, null, 4), 4) - - return Promise.all([first, last]) - .then(function () { - return c.last({ weight: 0 }) - }) - .then(function (results) { - c.checkDuration(100) - c.checkResultsOrder([[1], [4]]) - }) - }) - }) - - describe('Weight', function () { - it('Should not add jobs with a weight above the maxConcurrent', function () { - c = makeTest({maxConcurrent: 2}) - - c.pNoErrVal(c.limiter.schedule({ weight: 1 }, c.promise, null, 1), 1) - c.pNoErrVal(c.limiter.schedule({ weight: 2 }, c.promise, null, 2), 2) - - return c.limiter.schedule({ weight: 3 }, c.promise, null, 3) - .catch(function (err) { - c.mustEqual(err.message, 'Impossible to add a job having a weight of 3 to a limiter having a maxConcurrent setting of 2') - return c.last() - }) - .then(function (results) { - c.checkDuration(0) - c.checkResultsOrder([[1], [2]]) - }) - }) - - - it('Should support custom job weights', function () { - c = makeTest({maxConcurrent: 2}) - - c.pNoErrVal(c.limiter.schedule({ weight: 1 }, c.slowPromise, 100, null, 1), 1) - c.pNoErrVal(c.limiter.schedule({ weight: 2 }, c.slowPromise, 200, null, 2), 2) - c.pNoErrVal(c.limiter.schedule({ weight: 1 }, c.slowPromise, 100, null, 3), 3) - c.pNoErrVal(c.limiter.schedule({ weight: 1 }, c.slowPromise, 100, null, 4), 4) - c.pNoErrVal(c.limiter.schedule({ weight: 0 }, c.slowPromise, 100, null, 5), 5) - - return c.last() - .then(function (results) { - c.checkDuration(400) - c.checkResultsOrder([[1], [2], [3], [4], [5]]) - }) - }) - - it('Should overflow at the correct rate', function () { - c = makeTest({ - maxConcurrent: 2, - reservoir: 3 - }) - - var calledDepleted = 0 - var emptyArguments = [] - c.limiter.on('depleted', function (empty) { - emptyArguments.push(empty) - calledDepleted++ - }) - - var p1 = c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 1 }, c.slowPromise, 100, null, 1), 1) - var p2 = c.pNoErrVal(c.limiter.schedule({ weight: 2, id: 2 }, c.slowPromise, 150, null, 2), 2) - var p3 = c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 3 }, c.slowPromise, 100, null, 3), 3) - var p4 = c.pNoErrVal(c.limiter.schedule({ weight: 1, id: 4 }, c.slowPromise, 100, null, 4), 4) - - return Promise.all([p1, p2]) - .then(function () { - c.mustEqual(c.limiter.queued(), 2) - return c.limiter.currentReservoir() - }) - .then(function (reservoir) { - c.mustEqual(reservoir, 0) - c.mustEqual(calledDepleted, 1) - return c.limiter.incrementReservoir(1) - }) - .then(function (reservoir) { - c.mustEqual(reservoir, 1) - return c.last({ priority: 1, weight: 0 }) - }) - .then(function (results) { - c.mustEqual(calledDepleted, 3) - c.mustEqual(c.limiter.queued(), 1) - c.checkDuration(250) - c.checkResultsOrder([[1], [2]]) - return c.limiter.currentReservoir() - }) - .then(function (reservoir) { - c.mustEqual(reservoir, 0) - return c.limiter.updateSettings({ reservoir: 1 }) - }) - .then(function () { - return Promise.all([p3, p4]) - }) - .then(function () { - return c.limiter.currentReservoir() - }) - .then(function (reservoir) { - c.mustEqual(reservoir, 0) - c.mustEqual(calledDepleted, 4) - c.mustEqual(emptyArguments, [false, false, false, true]) - }) - }) - }) - - describe('Expiration', function () { - it('Should cancel jobs', function () { - c = makeTest({ maxConcurrent: 2 }) - var t0 = Date.now() - - return Promise.all([ - c.pNoErrVal(c.limiter.schedule({ id: 'very-slow-no-expiration' }, c.slowPromise, 150, null, 1), 1), - - c.limiter.schedule({ expiration: 50, id: 'slow-with-expiration' }, c.slowPromise, 75, null, 2) - .then(function () { - return Promise.reject(new Error("Should have timed out.")) - }) - .catch(function (err) { - c.mustEqual(err.message, 'This job timed out after 50 ms.') - var duration = Date.now() - t0 - assert(duration > 45 && duration < 80) - - return Promise.all([c.limiter.running(), c.limiter.done()]) - }) - .then(function ([running, done]) { - c.mustEqual(running, 1) - c.mustEqual(done, 1) - }) - - ]) - .then(function () { - var duration = Date.now() - t0 - assert(duration > 145 && duration < 180) - return Promise.all([c.limiter.running(), c.limiter.done()]) - }) - .then(function ([running, done]) { - c.mustEqual(running, 0) - c.mustEqual(done, 2) - }) - }) - }) - - describe('Pubsub', function () { - it('Should pass strings', function (done) { - c = makeTest({ maxConcurrent: 2 }) - - c.limiter.on('message', function (msg) { - c.mustEqual(msg, 'hello') - done() - }) - - c.limiter.publish('hello') - }) - - it('Should pass objects', function (done) { - c = makeTest({ maxConcurrent: 2 }) - var obj = { - array: ['abc', true], - num: 235.59 - } - - c.limiter.on('message', function (msg) { - c.mustEqual(JSON.parse(msg), obj) - done() - }) - - c.limiter.publish(JSON.stringify(obj)) - }) - }) - - describe('Reservoir Refresh', function () { - it('Should auto-refresh the reservoir', function () { - c = makeTest({ - reservoir: 8, - reservoirRefreshInterval: 150, - reservoirRefreshAmount: 5, - heartbeatInterval: 75 // not for production use - }) - var calledDepleted = 0 - - c.limiter.on('depleted', function () { - calledDepleted++ - }) - - return Promise.all([ - c.pNoErrVal(c.limiter.schedule({ weight: 1 }, c.promise, null, 1), 1), - c.pNoErrVal(c.limiter.schedule({ weight: 2 }, c.promise, null, 2), 2), - c.pNoErrVal(c.limiter.schedule({ weight: 3 }, c.promise, null, 3), 3), - c.pNoErrVal(c.limiter.schedule({ weight: 4 }, c.promise, null, 4), 4), - c.pNoErrVal(c.limiter.schedule({ weight: 5 }, c.promise, null, 5), 5) - ]) - .then(function () { - return c.limiter.currentReservoir() - }) - .then(function (reservoir) { - c.mustEqual(reservoir, 0) - return c.last({ weight: 0, priority: 9 }) - }) - .then(function (results) { - c.checkResultsOrder([[1], [2], [3], [4], [5]]) - c.mustEqual(calledDepleted, 2) - c.checkDuration(300) - }) - }) - - it('Should allow staggered X by Y type usage', function () { - c = makeTest({ - reservoir: 2, - reservoirRefreshInterval: 150, - reservoirRefreshAmount: 2, - heartbeatInterval: 75 // not for production use - }) - - return Promise.all([ - c.pNoErrVal(c.limiter.schedule(c.promise, null, 1), 1), - c.pNoErrVal(c.limiter.schedule(c.promise, null, 2), 2), - c.pNoErrVal(c.limiter.schedule(c.promise, null, 3), 3), - c.pNoErrVal(c.limiter.schedule(c.promise, null, 4), 4) - ]) - .then(function () { - return c.limiter.currentReservoir() - }) - .then(function (reservoir) { - c.mustEqual(reservoir, 0) - return c.last({ weight: 0, priority: 9 }) - }) - .then(function (results) { - c.checkResultsOrder([[1], [2], [3], [4]]) - c.checkDuration(150) - }) - }) - - it('Should keep process alive until queue is empty', function (done) { - c = makeTest() - var options = { - cwd: process.cwd() + '/test/spawn', - timeout: 1000 - } - child_process.exec('node refreshKeepAlive.js', options, function (err, stdout, stderr) { - c.mustEqual(stdout, '[0][0][2][2]') - c.mustEqual(stderr, '') - done(err) - }) - }) - - }) - - describe('Reservoir Increase', function () { - it('Should auto-increase the reservoir', async function () { - c = makeTest({ - reservoir: 3, - reservoirIncreaseInterval: 150, - reservoirIncreaseAmount: 5, - heartbeatInterval: 75 // not for production use - }) - var calledDepleted = 0 - - c.limiter.on('depleted', function () { - calledDepleted++ - }) - - await Promise.all([ - c.pNoErrVal(c.limiter.schedule({ weight: 1 }, c.promise, null, 1), 1), - c.pNoErrVal(c.limiter.schedule({ weight: 2 }, c.promise, null, 2), 2), - c.pNoErrVal(c.limiter.schedule({ weight: 3 }, c.promise, null, 3), 3), - c.pNoErrVal(c.limiter.schedule({ weight: 4 }, c.promise, null, 4), 4), - c.pNoErrVal(c.limiter.schedule({ weight: 5 }, c.promise, null, 5), 5) - ]) - const reservoir = await c.limiter.currentReservoir() - c.mustEqual(reservoir, 3) - - const results = await c.last({ weight: 0, priority: 9 }) - c.checkResultsOrder([[1], [2], [3], [4], [5]]) - c.mustEqual(calledDepleted, 1) - c.checkDuration(450) - }) - - it('Should auto-increase the reservoir up to a maximum', async function () { - c = makeTest({ - reservoir: 3, - reservoirIncreaseInterval: 150, - reservoirIncreaseAmount: 5, - reservoirIncreaseMaximum: 6, - heartbeatInterval: 75 // not for production use - }) - var calledDepleted = 0 - - c.limiter.on('depleted', function () { - calledDepleted++ - }) - - await Promise.all([ - c.pNoErrVal(c.limiter.schedule({ weight: 1 }, c.promise, null, 1), 1), - c.pNoErrVal(c.limiter.schedule({ weight: 2 }, c.promise, null, 2), 2), - c.pNoErrVal(c.limiter.schedule({ weight: 3 }, c.promise, null, 3), 3), - c.pNoErrVal(c.limiter.schedule({ weight: 4 }, c.promise, null, 4), 4), - c.pNoErrVal(c.limiter.schedule({ weight: 5 }, c.promise, null, 5), 5) - ]) - const reservoir = await c.limiter.currentReservoir() - c.mustEqual(reservoir, 1) - - const results = await c.last({ weight: 0, priority: 9 }) - c.checkResultsOrder([[1], [2], [3], [4], [5]]) - c.mustEqual(calledDepleted, 1) - c.checkDuration(450) - }) - - it('Should allow staggered X by Y type usage', function () { - c = makeTest({ - reservoir: 2, - reservoirIncreaseInterval: 150, - reservoirIncreaseAmount: 2, - heartbeatInterval: 75 // not for production use - }) - - return Promise.all([ - c.pNoErrVal(c.limiter.schedule(c.promise, null, 1), 1), - c.pNoErrVal(c.limiter.schedule(c.promise, null, 2), 2), - c.pNoErrVal(c.limiter.schedule(c.promise, null, 3), 3), - c.pNoErrVal(c.limiter.schedule(c.promise, null, 4), 4) - ]) - .then(function () { - return c.limiter.currentReservoir() - }) - .then(function (reservoir) { - c.mustEqual(reservoir, 0) - return c.last({ weight: 0, priority: 9 }) - }) - .then(function (results) { - c.checkResultsOrder([[1], [2], [3], [4]]) - c.checkDuration(150) - }) - }) - - it('Should keep process alive until queue is empty', function (done) { - c = makeTest() - var options = { - cwd: process.cwd() + '/test/spawn', - timeout: 1000 - } - child_process.exec('node increaseKeepAlive.js', options, function (err, stdout, stderr) { - c.mustEqual(stdout, '[0][0][2][2]') - c.mustEqual(stderr, '') - done(err) - }) - }) - }) - -}) diff --git a/node_modules/bottleneck/test/group.js b/node_modules/bottleneck/test/group.js deleted file mode 100644 index 5c21ab6ff..000000000 --- a/node_modules/bottleneck/test/group.js +++ /dev/null @@ -1,255 +0,0 @@ -var makeTest = require('./context') -var Bottleneck = require('./bottleneck') -var assert = require('assert') - -describe('Group', function () { - var c - - afterEach(function () { - return c.limiter.disconnect(false) - }) - - it('Should create limiters', function (done) { - c = makeTest() - var group = new Bottleneck.Group({ - maxConcurrent: 1, minTime: 100 - }) - - var results = [] - - var job = function (...result) { - results.push(result) - return new Promise(function (resolve, reject) { - setTimeout(function () { - return resolve() - }, 50) - }) - } - - group.key('A').schedule(job, 1, 2) - group.key('A').schedule(job, 3) - group.key('A').schedule(job, 4) - setTimeout(function () { - group.key('B').schedule(job, 5) - }, 20) - setTimeout(function () { - group.key('C').schedule(job, 6) - group.key('C').schedule(job, 7) - }, 40) - - group.key('A').submit(function (cb) { - c.mustEqual(results, [[1,2], [5], [6], [3], [7], [4]]) - cb() - done() - }, null) - }) - - it('Should set up the limiter IDs (default)', function () { - c = makeTest() - var group = new Bottleneck.Group({ - maxConcurrent: 1, minTime: 100 - }) - - c.mustEqual(group.key('A').id, 'group-key-A') - c.mustEqual(group.key('B').id, 'group-key-B') - c.mustEqual(group.key('XYZ').id, 'group-key-XYZ') - - var ids = group.keys().map(function (key) { - var limiter = group.key(key) - c.mustEqual(limiter._store.timeout, group.timeout) - return limiter.id - }) - c.mustEqual(ids.sort(), ['group-key-A', 'group-key-B', 'group-key-XYZ']) - }) - - it('Should set up the limiter IDs (custom)', function () { - c = makeTest() - var group = new Bottleneck.Group({ - maxConcurrent: 1, minTime: 100, - id: 'custom-id' - }) - - c.mustEqual(group.key('A').id, 'custom-id-A') - c.mustEqual(group.key('B').id, 'custom-id-B') - c.mustEqual(group.key('XYZ').id, 'custom-id-XYZ') - - var ids = group.keys().map(function (key) { - var limiter = group.key(key) - c.mustEqual(limiter._store.timeout, group.timeout) - return limiter.id - }) - c.mustEqual(ids.sort(), ['custom-id-A', 'custom-id-B', 'custom-id-XYZ']) - }) - - it('Should pass new limiter to \'created\' event', function () { - c = makeTest() - var group = new Bottleneck.Group({ - maxConcurrent: 1, minTime: 100 - }) - - var keys = [] - var ids = [] - var promises = [] - group.on('created', function (created, key) { - keys.push(key) - promises.push( - created.updateSettings({ id: key }) - .then(function (limiter) { - ids.push(limiter.id) - }) - ) - }) - - group.key('A') - group.key('B') - group.key('A') - group.key('B') - group.key('B') - group.key('BB') - group.key('C') - group.key('A') - - return Promise.all(promises) - .then(function () { - c.mustEqual(keys, ids) - return c.limiter.ready() - }) - - }) - - it('Should pass error on failure', function (done) { - var failureMessage = 'SOMETHING BLEW UP!!' - c = makeTest() - var group = new Bottleneck.Group({ - maxConcurrent: 1, minTime: 100 - }) - c.mustEqual(Object.keys(group.limiters), []) - - var results = [] - - var job = function (...result) { - results.push(result) - return new Promise(function (resolve, reject) { - setTimeout(function () { - return resolve() - }, 50) - }) - } - - group.key('A').schedule(job, 1, 2) - group.key('A').schedule(job, 3) - group.key('A').schedule(job, 4) - group.key('B').schedule(() => Promise.reject(new Error(failureMessage))) - .catch(function (err) { - results.push(['CAUGHT', err.message]) - }) - setTimeout(function () { - group.key('C').schedule(job, 6) - group.key('C').schedule(job, 7) - }, 40) - - - group.key('A').submit(function (cb) { - c.mustEqual(results, [[1,2], ['CAUGHT', failureMessage], [6], [3], [7], [4]]) - cb() - done() - }, null) - }) - - it('Should update its timeout', function () { - c = makeTest() - var group1 = new Bottleneck.Group({ - maxConcurrent: 1, minTime: 100 - }) - var group2 = new Bottleneck.Group({ - maxConcurrent: 1, minTime: 100, timeout: 5000 - }) - - c.mustEqual(group1.timeout, 300000) - c.mustEqual(group2.timeout, 5000) - - var p1 = group1.updateSettings({ timeout: 123 }) - var p2 = group2.updateSettings({ timeout: 456 }) - return Promise.all([p1, p2]) - .then(function () { - c.mustEqual(group1.timeout, 123) - c.mustEqual(group2.timeout, 456) - }) - }) - - it('Should update its limiter options', function () { - c = makeTest() - var group = new Bottleneck.Group({ - maxConcurrent: 1, minTime: 100 - }) - - var limiter1 = group.key('AAA') - c.mustEqual(limiter1._store.storeOptions.minTime, 100) - - group.updateSettings({ minTime: 200 }) - c.mustEqual(limiter1._store.storeOptions.minTime, 100) - - var limiter2 = group.key('BBB') - c.mustEqual(limiter2._store.storeOptions.minTime, 200) - }) - - it('Should support keys(), limiters(), deleteKey()', function () { - c = makeTest() - var group1 = new Bottleneck.Group({ - maxConcurrent: 1 - }) - var KEY_A = "AAA" - var KEY_B = "BBB" - - return Promise.all([ - c.pNoErrVal(group1.key(KEY_A).schedule(c.promise, null, 1), 1), - c.pNoErrVal(group1.key(KEY_B).schedule(c.promise, null, 2), 2) - ]) - .then(function () { - var keys = group1.keys() - var limiters = group1.limiters() - c.mustEqual(keys, [KEY_A, KEY_B]) - c.mustEqual(limiters.length, 2) - - limiters.forEach(function (limiter, i) { - c.mustEqual(limiter.key, keys[i]) - assert(limiter.limiter instanceof Bottleneck) - }) - - return group1.deleteKey(KEY_A) - }) - .then(function (deleted) { - c.mustEqual(deleted, true) - c.mustEqual(group1.keys().length, 1) - return group1.deleteKey(KEY_A) - }) - .then(function (deleted) { - c.mustEqual(deleted, false) - c.mustEqual(group1.keys().length, 1) - }) - }) - - it('Should call autocleanup', function () { - var KEY = 'test-key' - var group = new Bottleneck.Group({ - maxConcurrent: 1 - }) - group.updateSettings({ timeout: 50 }) - c = makeTest({ id: 'something', timeout: group.timeout }) - - group.instances[KEY] = c.limiter - return group.key(KEY).schedule(function () { - return Promise.resolve() - }) - .then(function () { - assert(group.instances[KEY] != null) - return new Promise(function (resolve, reject) { - setTimeout(resolve, 100) - }) - }) - .then(function () { - assert(group.instances[KEY] == null) - }) - }) - -}) diff --git a/node_modules/bottleneck/test/ioredis.js b/node_modules/bottleneck/test/ioredis.js deleted file mode 100644 index 3a68d84fe..000000000 --- a/node_modules/bottleneck/test/ioredis.js +++ /dev/null @@ -1,135 +0,0 @@ -var makeTest = require('./context') -var Bottleneck = require('./bottleneck') -var assert = require('assert') -var Redis = require('ioredis') - -if (process.env.DATASTORE === 'ioredis') { - describe('ioredis-only', function () { - var c - - afterEach(function () { - return c.limiter.disconnect(false) - }) - - it('Should accept ioredis lib override', function () { - c = makeTest({ - maxConcurrent: 2, - Redis, - clientOptions: {}, - clusterNodes: [{ - host: process.env.REDIS_HOST, - port: process.env.REDIS_PORT - }] - }) - - c.mustEqual(c.limiter.datastore, 'ioredis') - }) - - it('Should connect in Redis Cluster mode', function () { - c = makeTest({ - maxConcurrent: 2, - clientOptions: {}, - clusterNodes: [{ - host: process.env.REDIS_HOST, - port: process.env.REDIS_PORT - }] - }) - - c.mustEqual(c.limiter.datastore, 'ioredis') - assert(c.limiter._store.connection.client.nodes().length >= 0) - }) - - it('Should connect in Redis Cluster mode with premade client', function () { - var client = new Redis.Cluster('') - var connection = new Bottleneck.IORedisConnection({ client }) - c = makeTest({ - maxConcurrent: 2, - clientOptions: {}, - clusterNodes: [{ - host: process.env.REDIS_HOST, - port: process.env.REDIS_PORT - }] - }) - - c.mustEqual(c.limiter.datastore, 'ioredis') - assert(c.limiter._store.connection.client.nodes().length >= 0) - connection.disconnect(false) - }) - - it('Should accept existing connections', function () { - var connection = new Bottleneck.IORedisConnection() - connection.id = 'super-connection' - c = makeTest({ - minTime: 50, - connection - }) - - c.pNoErrVal(c.limiter.schedule(c.promise, null, 1), 1) - c.pNoErrVal(c.limiter.schedule(c.promise, null, 2), 2) - - return c.last() - .then(function (results) { - c.checkResultsOrder([[1], [2]]) - c.checkDuration(50) - c.mustEqual(c.limiter.connection.id, 'super-connection') - c.mustEqual(c.limiter.datastore, 'ioredis') - - return c.limiter.disconnect() - }) - .then(function () { - // Shared connections should not be disconnected by the limiter - c.mustEqual(c.limiter.clients().client.status, 'ready') - return connection.disconnect() - }) - }) - - it('Should accept existing redis clients', function () { - var client = new Redis() - client.id = 'super-client' - - var connection = new Bottleneck.IORedisConnection({ client }) - connection.id = 'super-connection' - c = makeTest({ - minTime: 50, - connection - }) - - c.pNoErrVal(c.limiter.schedule(c.promise, null, 1), 1) - c.pNoErrVal(c.limiter.schedule(c.promise, null, 2), 2) - - return c.last() - .then(function (results) { - c.checkResultsOrder([[1], [2]]) - c.checkDuration(50) - c.mustEqual(c.limiter.clients().client.id, 'super-client') - c.mustEqual(c.limiter.connection.id, 'super-connection') - c.mustEqual(c.limiter.datastore, 'ioredis') - - return c.limiter.disconnect() - }) - .then(function () { - // Shared connections should not be disconnected by the limiter - c.mustEqual(c.limiter.clients().client.status, 'ready') - return connection.disconnect() - }) - }) - - it('Should trigger error events on the shared connection', function (done) { - var connection = new Bottleneck.IORedisConnection({ - clientOptions: { - port: 1 - } - }) - connection.on('error', function (err) { - c.mustEqual(c.limiter.datastore, 'ioredis') - connection.disconnect() - done() - }) - - c = makeTest({ connection }) - c.limiter.on('error', function (err) { - done(err) - }) - }) - }) -} diff --git a/node_modules/bottleneck/test/node_redis.js b/node_modules/bottleneck/test/node_redis.js deleted file mode 100644 index cd204d3e7..000000000 --- a/node_modules/bottleneck/test/node_redis.js +++ /dev/null @@ -1,100 +0,0 @@ -var makeTest = require('./context') -var Bottleneck = require('./bottleneck') -var assert = require('assert') -var Redis = require('redis') - -if (process.env.DATASTORE === 'redis') { - describe('node_redis-only', function () { - var c - - afterEach(function () { - return c.limiter.disconnect(false) - }) - - it('Should accept node_redis lib override', function () { - c = makeTest({ - maxConcurrent: 2, - Redis, - clientOptions: {} - }) - - c.mustEqual(c.limiter.datastore, 'redis') - }) - - it('Should accept existing connections', function () { - var connection = new Bottleneck.RedisConnection() - connection.id = 'super-connection' - c = makeTest({ - minTime: 50, - connection - }) - - c.pNoErrVal(c.limiter.schedule(c.promise, null, 1), 1) - c.pNoErrVal(c.limiter.schedule(c.promise, null, 2), 2) - - return c.last() - .then(function (results) { - c.checkResultsOrder([[1], [2]]) - c.checkDuration(50) - c.mustEqual(c.limiter.connection.id, 'super-connection') - c.mustEqual(c.limiter.datastore, 'redis') - - return c.limiter.disconnect() - }) - .then(function () { - // Shared connections should not be disconnected by the limiter - c.mustEqual(c.limiter.clients().client.ready, true) - return connection.disconnect() - }) - }) - - it('Should accept existing redis clients', function () { - var client = Redis.createClient() - client.id = 'super-client' - - var connection = new Bottleneck.RedisConnection({ client }) - connection.id = 'super-connection' - c = makeTest({ - minTime: 50, - connection - }) - - c.pNoErrVal(c.limiter.schedule(c.promise, null, 1), 1) - c.pNoErrVal(c.limiter.schedule(c.promise, null, 2), 2) - - return c.last() - .then(function (results) { - c.checkResultsOrder([[1], [2]]) - c.checkDuration(50) - c.mustEqual(c.limiter.clients().client.id, 'super-client') - c.mustEqual(c.limiter.connection.id, 'super-connection') - c.mustEqual(c.limiter.datastore, 'redis') - - return c.limiter.disconnect() - }) - .then(function () { - // Shared connections should not be disconnected by the limiter - c.mustEqual(c.limiter.clients().client.ready, true) - return connection.disconnect() - }) - }) - - it('Should trigger error events on the shared connection', function (done) { - var connection = new Bottleneck.RedisConnection({ - clientOptions: { - port: 1 - } - }) - connection.on('error', function (err) { - c.mustEqual(c.limiter.datastore, 'redis') - connection.disconnect() - done() - }) - - c = makeTest({ connection }) - c.limiter.on('error', function (err) { - done(err) - }) - }) - }) -} diff --git a/node_modules/bottleneck/test/priority.js b/node_modules/bottleneck/test/priority.js deleted file mode 100644 index f89b85f41..000000000 --- a/node_modules/bottleneck/test/priority.js +++ /dev/null @@ -1,184 +0,0 @@ -var makeTest = require('./context') -var Bottleneck = require('./bottleneck') -var assert = require('assert') - -describe('Priority', function () { - var c - - afterEach(function () { - return c.limiter.disconnect(false) - }) - - it('Should do basic ordering', function () { - c = makeTest({maxConcurrent: 1, minTime: 100, rejectOnDrop: false}) - - return Promise.all([ - c.pNoErrVal(c.limiter.schedule(c.slowPromise, 50, null, 1), 1), - c.pNoErrVal(c.limiter.schedule(c.promise, null, 2), 2), - c.pNoErrVal(c.limiter.schedule({priority: 1}, c.promise, null, 5, 6), 5, 6), - c.pNoErrVal(c.limiter.schedule(c.promise, null, 3), 3), - c.pNoErrVal(c.limiter.schedule(c.promise, null, 4), 4) - ]) - .then(function () { - return c.last() - }) - .then(function (results) { - c.checkResultsOrder([[1], [5,6], [2] ,[3], [4]]) - c.checkDuration(400) - }) - }) - - it('Should support LEAK', function () { - c = makeTest({ - maxConcurrent: 1, - minTime: 100, - highWater: 3, - strategy: Bottleneck.strategy.LEAK, - rejectOnDrop: false - }) - - var called = false - c.limiter.on('dropped', function (dropped) { - c.mustExist(dropped.task) - c.mustExist(dropped.args) - c.mustExist(dropped.promise) - called = true - }) - - c.limiter.submit(c.slowJob, 50, null, 1, c.noErrVal(1)) - c.limiter.submit(c.job, null, 2, c.noErrVal(2)) - c.limiter.submit(c.job, null, 3, c.noErrVal(3)) - c.limiter.submit(c.job, null, 4, c.noErrVal(4)) - c.limiter.submit({priority: 2}, c.job, null, 5, c.noErrVal(5)) - c.limiter.submit({priority: 1}, c.job, null, 6, c.noErrVal(6)) - c.limiter.submit({priority: 9}, c.job, null, 7, c.noErrVal(7)) - - return c.last({ weight: 0 }) - .then(function (results) { - c.checkDuration(200) - c.checkResultsOrder([[1], [6], [5]]) - c.mustEqual(called, true) - }) - }) - - it('Should support OVERFLOW', function () { - c = makeTest({ - maxConcurrent: 1, - minTime: 100, - highWater: 2, - strategy: Bottleneck.strategy.OVERFLOW, - rejectOnDrop: false - }) - var called = false - c.limiter.on('dropped', function (dropped) { - c.mustExist(dropped.task) - c.mustExist(dropped.args) - c.mustExist(dropped.promise) - called = true - }) - - c.limiter.submit(c.slowJob, 50, null, 1, c.noErrVal(1)) - c.limiter.submit(c.job, null, 2, c.noErrVal(2)) - c.limiter.submit(c.job, null, 3, c.noErrVal(3)) - c.limiter.submit(c.job, null, 4, c.noErrVal(4)) - c.limiter.submit({priority: 2}, c.job, null, 5, c.noErrVal(5)) - c.limiter.submit({priority: 1}, c.job, null, 6, c.noErrVal(6)) - - return c.limiter.submit({priority: 9}, c.job, null, 7, c.noErrVal(7)) - .then(function () { - return c.limiter.updateSettings({ highWater: null }) - }) - .then(c.last) - .then(function (results) { - c.checkDuration(200) - c.checkResultsOrder([[1], [2], [3]]) - c.mustEqual(called, true) - }) - }) - - it('Should support OVERFLOW_PRIORITY', function () { - c = makeTest({ - maxConcurrent: 1, - minTime: 100, - highWater: 2, - strategy: Bottleneck.strategy.OVERFLOW_PRIORITY, - rejectOnDrop: false - }) - var called = false - c.limiter.on('dropped', function (dropped) { - c.mustExist(dropped.task) - c.mustExist(dropped.args) - c.mustExist(dropped.promise) - called = true - }) - - c.limiter.submit(c.slowJob, 50, null, 1, c.noErrVal(1)) - c.limiter.submit(c.job, null, 2, c.noErrVal(2)) - c.limiter.submit(c.job, null, 3, c.noErrVal(3)) - c.limiter.submit(c.job, null, 4, c.noErrVal(4)) - c.limiter.submit({priority: 2}, c.job, null, 5, c.noErrVal(5)) - c.limiter.submit({priority: 2}, c.job, null, 6, c.noErrVal(6)) - - return c.limiter.submit({priority: 2}, c.job, null, 7, c.noErrVal(7)) - .then(function () { - return c.limiter.updateSettings({highWater: null}) - }) - .then(c.last) - .then(function (results) { - c.checkDuration(200) - c.checkResultsOrder([[1], [5], [6]]) - c.mustEqual(called, true) - }) - }) - - it('Should support BLOCK', function (done) { - c = makeTest({ - maxConcurrent: 1, - minTime: 100, - highWater: 2, - trackDoneStatus: true, - strategy: Bottleneck.strategy.BLOCK - }) - var called = 0 - - c.limiter.on('dropped', function (dropped) { - c.mustExist(dropped.task) - c.mustExist(dropped.args) - c.mustExist(dropped.promise) - called++ - if (called === 3) { - c.limiter.updateSettings({ highWater: null }) - .then(function () { - return c.limiter.schedule(c.job, null, 8) - }) - .catch(function (err) { - assert(err instanceof Bottleneck.BottleneckError) - c.mustEqual(err.message, 'This job has been dropped by Bottleneck') - c.limiter.removeAllListeners('error') - done() - }) - } - }) - - c.limiter.submit(c.slowJob, 20, null, 1, c.noErrVal(1)) - c.limiter.submit(c.slowJob, 20, null, 2, (err) => c.mustExist(err)) - c.limiter.submit(c.slowJob, 20, null, 3, (err) => c.mustExist(err)) - c.limiter.submit(c.slowJob, 20, null, 4, (err) => c.mustExist(err)) - }) - - it('Should have the right priority', function () { - c = makeTest({maxConcurrent: 1, minTime: 100}) - - c.pNoErrVal(c.limiter.schedule({priority: 6}, c.slowPromise, 50, null, 1), 1) - c.pNoErrVal(c.limiter.schedule({priority: 5}, c.promise, null, 2), 2) - c.pNoErrVal(c.limiter.schedule({priority: 4}, c.promise, null, 3), 3) - c.pNoErrVal(c.limiter.schedule({priority: 3}, c.promise, null, 4), 4) - - return c.last() - .then(function (results) { - c.checkDuration(300) - c.checkResultsOrder([[1], [4], [3], [2]]) - }) - }) - -}) diff --git a/node_modules/bottleneck/test/promises.js b/node_modules/bottleneck/test/promises.js deleted file mode 100644 index b20022f0e..000000000 --- a/node_modules/bottleneck/test/promises.js +++ /dev/null @@ -1,202 +0,0 @@ -var makeTest = require('./context') -var Bottleneck = require('./bottleneck') -var assert = require('assert') - -describe('Promises', function () { - var c - - afterEach(function () { - return c.limiter.disconnect(false) - }) - - it('Should support promises', function () { - c = makeTest({maxConcurrent: 1, minTime: 100}) - - c.limiter.submit(c.job, null, 1, 9, c.noErrVal(1, 9)) - c.limiter.submit(c.job, null, 2, c.noErrVal(2)) - c.limiter.submit(c.job, null, 3, c.noErrVal(3)) - c.pNoErrVal(c.limiter.schedule(c.promise, null, 4, 5), 4, 5) - - return c.last() - .then(function (results) { - c.checkResultsOrder([[1,9], [2], [3], [4,5]]) - c.checkDuration(300) - }) - }) - - it('Should pass error on failure', function () { - var failureMessage = 'failed' - c = makeTest({maxConcurrent: 1, minTime: 100}) - - return c.limiter.schedule(c.promise, new Error(failureMessage)) - .catch(function (err) { - c.mustEqual(err.message, failureMessage) - }) - }) - - it('Should allow non-Promise returns', function () { - c = makeTest() - var str = 'This is a string' - - return c.limiter.schedule(() => str) - .then(function (x) { - c.mustEqual(x, str) - }) - }) - - it('Should get rejected when rejectOnDrop is true', function () { - c = makeTest({ - maxConcurrent: 1, - minTime: 0, - highWater: 1, - strategy: Bottleneck.strategy.OVERFLOW, - rejectOnDrop: true - }) - var dropped = 0 - var caught = 0 - var p1 - var p2 - - c.limiter.on('dropped', function () { - dropped++ - }) - - p1 = c.pNoErrVal(c.limiter.schedule({id: 1}, c.slowPromise, 50, null, 1), 1) - p2 = c.pNoErrVal(c.limiter.schedule({id: 2}, c.slowPromise, 50, null, 2), 2) - - return c.limiter.schedule({id: 3}, c.slowPromise, 50, null, 3) - .catch(function (err) { - c.mustEqual(err.message, 'This job has been dropped by Bottleneck') - assert(err instanceof Bottleneck.BottleneckError) - caught++ - return Promise.all([p1, p2]) - }) - .then(c.last) - .then(function (results) { - c.checkResultsOrder([[1], [2]]) - c.checkDuration(100) - c.mustEqual(dropped, 1) - c.mustEqual(caught, 1) - }) - }) - - it('Should automatically wrap an exception in a rejected promise - schedule()', function () { - c = makeTest({maxConcurrent: 1, minTime: 100}) - - return c.limiter.schedule(() => { - throw new Error('I will reject') - }) - .then(() => assert(false)) - .catch(err => { - assert(err.message === 'I will reject'); - }) - }) - - describe('Wrap', function () { - it('Should wrap', function () { - c = makeTest({maxConcurrent: 1, minTime: 100}) - - c.limiter.submit(c.job, null, 1, c.noErrVal(1)) - c.limiter.submit(c.job, null, 2, c.noErrVal(2)) - c.limiter.submit(c.job, null, 3, c.noErrVal(3)) - - var wrapped = c.limiter.wrap(c.promise) - c.pNoErrVal(wrapped(null, 4), 4) - - return c.last() - .then(function (results) { - c.checkResultsOrder([[1], [2], [3], [4]]) - c.checkDuration(300) - }) - }) - - it('Should automatically wrap a returned value in a resolved promise', function () { - c = makeTest({maxConcurrent: 1, minTime: 100}) - - fn = c.limiter.wrap(() => { return 7 }); - - return fn().then(result => { - assert(result === 7); - }) - }) - - it('Should automatically wrap an exception in a rejected promise', function () { - c = makeTest({maxConcurrent: 1, minTime: 100}) - - fn = c.limiter.wrap(() => { throw new Error('I will reject') }); - - return fn().then(() => assert(false)).catch(error => { - assert(error.message === 'I will reject'); - }) - }) - - it('Should inherit the original target for wrapped methods', function () { - c = makeTest({maxConcurrent: 1, minTime: 100}) - - var object = { - fn: c.limiter.wrap(function () { return this }) - } - - return object.fn().then(result => { - assert(result === object) - }) - }) - - it('Should inherit the original target on prototype methods', function () { - c = makeTest({maxConcurrent: 1, minTime: 100}) - - class Animal { - constructor(name) { this.name = name } - getName() { return this.name } - } - - Animal.prototype.getName = c.limiter.wrap(Animal.prototype.getName) - let elephant = new Animal('Dumbo') - - return elephant.getName().then(result => { - assert(result === 'Dumbo') - }) - }) - - it('Should pass errors back', function () { - var failureMessage = 'BLEW UP!!!' - c = makeTest({maxConcurrent: 1, minTime: 100}) - - var wrapped = c.limiter.wrap(c.promise) - c.pNoErrVal(wrapped(null, 1), 1) - c.pNoErrVal(wrapped(null, 2), 2) - - return wrapped(new Error(failureMessage), 3) - .catch(function (err) { - c.mustEqual(err.message, failureMessage) - return c.last() - }) - .then(function (results) { - c.checkResultsOrder([[1], [2], [3]]) - c.checkDuration(200) - }) - }) - - it('Should allow passing options', function () { - var failureMessage = 'BLEW UP!!!' - c = makeTest({maxConcurrent: 1, minTime: 50}) - - var wrapped = c.limiter.wrap(c.promise) - c.pNoErrVal(wrapped(null, 1), 1) - c.pNoErrVal(wrapped(null, 2), 2) - c.pNoErrVal(wrapped(null, 3), 3) - c.pNoErrVal(wrapped(null, 4), 4) - c.pNoErrVal(wrapped.withOptions({ priority: 1 }, null, 5), 5) - - return wrapped.withOptions({ priority: 1 }, new Error(failureMessage), 6) - .catch(function (err) { - c.mustEqual(err.message, failureMessage) - return c.last() - }) - .then(function (results) { - c.checkResultsOrder([[1], [2], [5], [6], [3], [4]]) - c.checkDuration(250) - }) - }) - }) -}) diff --git a/node_modules/bottleneck/test/retries.js b/node_modules/bottleneck/test/retries.js deleted file mode 100644 index 7570516fd..000000000 --- a/node_modules/bottleneck/test/retries.js +++ /dev/null @@ -1,237 +0,0 @@ -var makeTest = require('./context') -var Bottleneck = require('./bottleneck') -var assert = require('assert') -var child_process = require('child_process') - -describe('Retries', function () { - var c - - afterEach(function () { - return c.limiter.disconnect(false) - }) - - it('Should retry when requested by the user (sync)', async function () { - c = makeTest({ trackDoneStatus: true }) - var failedEvents = 0 - var retryEvents = 0 - - c.limiter.on('failed', function (error, info) { - c.mustEqual(c.limiter.counts().EXECUTING, 1) - c.mustEqual(info.retryCount, failedEvents) - failedEvents++ - return 50 - }) - - c.limiter.on('retry', function (error, info) { - c.mustEqual(c.limiter.counts().EXECUTING, 1) - retryEvents++ - }) - - var times = 0 - const job = function () { - times++ - if (times <= 2) { - return Promise.reject(new Error('boom')) - } - return Promise.resolve('Success!') - } - - c.mustEqual(await c.limiter.schedule(job), 'Success!') - const results = await c.results() - assert(results.elapsed > 90 && results.elapsed < 130) - c.mustEqual(failedEvents, 2) - c.mustEqual(retryEvents, 2) - c.mustEqual(c.limiter.counts().EXECUTING, 0) - c.mustEqual(c.limiter.counts().DONE, 1) - }) - - it('Should retry when requested by the user (async)', async function () { - c = makeTest({ trackDoneStatus: true }) - var failedEvents = 0 - var retryEvents = 0 - - c.limiter.on('failed', function (error, info) { - c.mustEqual(c.limiter.counts().EXECUTING, 1) - c.mustEqual(info.retryCount, failedEvents) - failedEvents++ - return Promise.resolve(50) - }) - - c.limiter.on('retry', function (error, info) { - c.mustEqual(c.limiter.counts().EXECUTING, 1) - retryEvents++ - }) - - var times = 0 - const job = function () { - times++ - if (times <= 2) { - return Promise.reject(new Error('boom')) - } - return Promise.resolve('Success!') - } - - c.mustEqual(await c.limiter.schedule(job), 'Success!') - const results = await c.results() - assert(results.elapsed > 90 && results.elapsed < 130) - c.mustEqual(failedEvents, 2) - c.mustEqual(retryEvents, 2) - c.mustEqual(c.limiter.counts().EXECUTING, 0) - c.mustEqual(c.limiter.counts().DONE, 1) - }) - - it('Should not retry when user returns an error (sync)', async function () { - c = makeTest({ errorEventsExpected: true, trackDoneStatus: true }) - var failedEvents = 0 - var retryEvents = 0 - var errorEvents = 0 - var caught = false - - c.limiter.on('failed', function (error, info) { - c.mustEqual(c.limiter.counts().EXECUTING, 1) - c.mustEqual(info.retryCount, failedEvents) - failedEvents++ - throw new Error('Nope') - }) - - c.limiter.on('retry', function (error, info) { - retryEvents++ - }) - - c.limiter.on('error', function (error, info) { - c.mustEqual(error.message, 'Nope') - errorEvents++ - }) - - const job = function () { - return Promise.reject(new Error('boom')) - } - - try { - await c.limiter.schedule(job) - throw new Error('Should not reach') - } catch (error) { - c.mustEqual(error.message, 'boom') - caught = true - } - c.mustEqual(failedEvents, 1) - c.mustEqual(retryEvents, 0) - c.mustEqual(errorEvents, 1) - c.mustEqual(caught, true) - c.mustEqual(c.limiter.counts().EXECUTING, 0) - c.mustEqual(c.limiter.counts().DONE, 1) - }) - - it('Should not retry when user returns an error (async)', async function () { - c = makeTest({ errorEventsExpected: true, trackDoneStatus: true }) - var failedEvents = 0 - var retryEvents = 0 - var errorEvents = 0 - var caught = false - - c.limiter.on('failed', function (error, info) { - c.mustEqual(c.limiter.counts().EXECUTING, 1) - c.mustEqual(info.retryCount, failedEvents) - failedEvents++ - return Promise.reject(new Error('Nope')) - }) - - c.limiter.on('retry', function (error, info) { - retryEvents++ - }) - - c.limiter.on('error', function (error, info) { - c.mustEqual(error.message, 'Nope') - errorEvents++ - }) - - const job = function () { - return Promise.reject(new Error('boom')) - } - - try { - await c.limiter.schedule(job) - throw new Error('Should not reach') - } catch (error) { - c.mustEqual(error.message, 'boom') - caught = true - } - c.mustEqual(failedEvents, 1) - c.mustEqual(retryEvents, 0) - c.mustEqual(errorEvents, 1) - c.mustEqual(caught, true) - c.mustEqual(c.limiter.counts().EXECUTING, 0) - c.mustEqual(c.limiter.counts().DONE, 1) - }) - - it('Should not retry when user returns null (sync)', async function () { - c = makeTest({ trackDoneStatus: true }) - var failedEvents = 0 - var retryEvents = 0 - var caught = false - - c.limiter.on('failed', function (error, info) { - c.mustEqual(c.limiter.counts().EXECUTING, 1) - c.mustEqual(info.retryCount, failedEvents) - failedEvents++ - return null - }) - - c.limiter.on('retry', function (error, info) { - retryEvents++ - }) - - const job = function () { - return Promise.reject(new Error('boom')) - } - - try { - await c.limiter.schedule(job) - throw new Error('Should not reach') - } catch (error) { - c.mustEqual(error.message, 'boom') - caught = true - } - c.mustEqual(failedEvents, 1) - c.mustEqual(retryEvents, 0) - c.mustEqual(caught, true) - c.mustEqual(c.limiter.counts().EXECUTING, 0) - c.mustEqual(c.limiter.counts().DONE, 1) - }) - - it('Should not retry when user returns null (async)', async function () { - c = makeTest({ trackDoneStatus: true }) - var failedEvents = 0 - var retryEvents = 0 - var caught = false - - c.limiter.on('failed', function (error, info) { - c.mustEqual(c.limiter.counts().EXECUTING, 1) - c.mustEqual(info.retryCount, failedEvents) - failedEvents++ - return Promise.resolve(null) - }) - - c.limiter.on('retry', function (error, info) { - retryEvents++ - }) - - const job = function () { - return Promise.reject(new Error('boom')) - } - - try { - await c.limiter.schedule(job) - throw new Error('Should not reach') - } catch (error) { - c.mustEqual(error.message, 'boom') - caught = true - } - c.mustEqual(failedEvents, 1) - c.mustEqual(retryEvents, 0) - c.mustEqual(caught, true) - c.mustEqual(c.limiter.counts().EXECUTING, 0) - c.mustEqual(c.limiter.counts().DONE, 1) - }) - -}) diff --git a/node_modules/bottleneck/test/spawn/increaseKeepAlive.js b/node_modules/bottleneck/test/spawn/increaseKeepAlive.js deleted file mode 100644 index 4bea612cd..000000000 --- a/node_modules/bottleneck/test/spawn/increaseKeepAlive.js +++ /dev/null @@ -1,17 +0,0 @@ -var Bottleneck = require('../bottleneck.js') -var now = Date.now() - -var limiter = new Bottleneck({ - reservoir: 2, - reservoirIncreaseAmount: 2, - reservoirIncreaseInterval: 200 -}) -var f1 = () => { - var secDiff = Math.floor((Date.now() - now) / 100) - return Promise.resolve(`[${secDiff}]`) -} - -limiter.schedule(f1).then((x) => process.stdout.write(x)) -limiter.schedule(f1).then((x) => process.stdout.write(x)) -limiter.schedule(f1).then((x) => process.stdout.write(x)) -limiter.schedule(f1).then((x) => process.stdout.write(x)) diff --git a/node_modules/bottleneck/test/spawn/refreshKeepAlive.js b/node_modules/bottleneck/test/spawn/refreshKeepAlive.js deleted file mode 100644 index deb09926d..000000000 --- a/node_modules/bottleneck/test/spawn/refreshKeepAlive.js +++ /dev/null @@ -1,17 +0,0 @@ -var Bottleneck = require('../bottleneck.js') -var now = Date.now() - -var limiter = new Bottleneck({ - reservoir: 2, - reservoirRefreshAmount: 2, - reservoirRefreshInterval: 200 -}) -var f1 = () => { - var secDiff = Math.floor((Date.now() - now) / 100) - return Promise.resolve(`[${secDiff}]`) -} - -limiter.schedule(f1).then((x) => process.stdout.write(x)) -limiter.schedule(f1).then((x) => process.stdout.write(x)) -limiter.schedule(f1).then((x) => process.stdout.write(x)) -limiter.schedule(f1).then((x) => process.stdout.write(x)) diff --git a/node_modules/bottleneck/test/states.js b/node_modules/bottleneck/test/states.js deleted file mode 100644 index c65ed77ff..000000000 --- a/node_modules/bottleneck/test/states.js +++ /dev/null @@ -1,103 +0,0 @@ -var States = require('../lib/States') -var assert = require('assert') -var c = require('./context')({datastore: 'local'}) -var Bottleneck = require('./bottleneck') - -describe('States', function () { - - it('Should be created and be empty', function () { - var states = new States(["A", "B", "C"]) - c.mustEqual(states.statusCounts(), { A: 0, B: 0, C: 0 }) - }) - - it('Should start new series', function () { - var states = new States(["A", "B", "C"]) - - states.start('x') - states.start('y') - - c.mustEqual(states.statusCounts(), { A: 2, B: 0, C: 0 }) - }) - - it('Should increment', function () { - var states = new States(["A", "B", "C"]) - - states.start('x') - states.start('y') - states.next('x') - states.next('y') - states.next('x') - c.mustEqual(states.statusCounts(), { A: 0, B: 1, C: 1 }) - - states.next('z') - c.mustEqual(states.statusCounts(), { A: 0, B: 1, C: 1 }) - - states.next('x') - c.mustEqual(states.statusCounts(), { A: 0, B: 1, C: 0 }) - - states.next('x') - c.mustEqual(states.statusCounts(), { A: 0, B: 1, C: 0 }) - - states.next('y') - states.next('y') - c.mustEqual(states.statusCounts(), { A: 0, B: 0, C: 0 }) - }) - - it('Should remove', function () { - var states = new States(["A", "B", "C"]) - - states.start('x') - states.start('y') - states.next('x') - states.next('y') - states.next('x') - c.mustEqual(states.statusCounts(), { A: 0, B: 1, C: 1 }) - - states.remove('x') - c.mustEqual(states.statusCounts(), { A: 0, B: 1, C: 0 }) - - states.remove('y') - c.mustEqual(states.statusCounts(), { A: 0, B: 0, C: 0 }) - }) - - it('Should return current status', function () { - var states = new States(["A", "B", "C"]) - - states.start('x') - states.start('y') - states.next('x') - states.next('y') - states.next('x') - c.mustEqual(states.statusCounts(), { A: 0, B: 1, C: 1 }) - - c.mustEqual(states.jobStatus('x'), 'C') - c.mustEqual(states.jobStatus('y'), 'B') - c.mustEqual(states.jobStatus('z'), null) - }) - - it('Should return job ids for a status', function (done) { - var states = new States(["A", "B", "C"]) - - states.start('x') - states.start('y') - states.start('z') - states.next('x') - states.next('y') - states.next('x') - states.next('z') - c.mustEqual(states.statusCounts(), { A: 0, B: 2, C: 1 }) - - c.mustEqual(states.statusJobs().sort(), ['x', 'y', 'z']) - c.mustEqual(states.statusJobs('A'), []) - c.mustEqual(states.statusJobs('B').sort(), ['y', 'z']) - c.mustEqual(states.statusJobs('C'), ['x']) - try { - states.statusJobs('Z') - } catch (err) { - if (process.env.BUILD !== 'es5' && process.env.BUILD !== 'light') { - assert(err instanceof Bottleneck.BottleneckError) - } - done() - } - }) -}) diff --git a/node_modules/bottleneck/test/stop.js b/node_modules/bottleneck/test/stop.js deleted file mode 100644 index 2300e4f47..000000000 --- a/node_modules/bottleneck/test/stop.js +++ /dev/null @@ -1,208 +0,0 @@ -var makeTest = require('./context') -var Bottleneck = require('./bottleneck') -var assert = require('assert') - -describe('Stop', function () { - var c - - afterEach(function () { - return c.limiter.disconnect(false) - }) - - it('Should stop and drop the queue', function (done) { - c = makeTest({ - maxConcurrent: 2, - minTime: 100, - trackDoneStatus: true - }) - var submitFailed = false - var queuedDropped = false - var scheduledDropped = false - var dropped = 0 - - c.limiter.on('dropped', function () { - dropped++ - }) - - c.pNoErrVal(c.limiter.schedule({id: '0'}, c.promise, null, 0), 0) - - c.pNoErrVal(c.limiter.schedule({id: '1'}, c.slowPromise, 100, null, 1), 1) - - c.limiter.schedule({id: '2'}, c.promise, null, 2) - .catch(function (err) { - c.mustEqual(err.message, 'Dropped!') - scheduledDropped = true - }) - - c.limiter.schedule({id: '3'}, c.promise, null, 3) - .catch(function (err) { - c.mustEqual(err.message, 'Dropped!') - queuedDropped = true - }) - - setTimeout(function () { - var counts = c.limiter.counts() - c.mustEqual(counts.RECEIVED, 0) - c.mustEqual(counts.QUEUED, 1) - c.mustEqual(counts.RUNNING, 1) - c.mustEqual(counts.EXECUTING, 1) - c.mustEqual(counts.DONE, 1) - - c.limiter.stop({ - enqueueErrorMessage: 'Stopped!', - dropErrorMessage: 'Dropped!' - }) - .then(function () { - counts = c.limiter.counts() - c.mustEqual(submitFailed, true) - c.mustEqual(scheduledDropped, true) - c.mustEqual(queuedDropped, true) - c.mustEqual(dropped, 2) - c.mustEqual(counts.RECEIVED, 0) - c.mustEqual(counts.QUEUED, 0) - c.mustEqual(counts.RUNNING, 0) - c.mustEqual(counts.EXECUTING, 0) - c.mustEqual(counts.DONE, 2) - - c.checkResultsOrder([[0], [1]]) - done() - }) - - c.limiter.schedule(() => Promise.resolve(true)) - .catch(function (err) { - c.mustEqual(err.message, 'Stopped!') - submitFailed = true - }) - - }, 125) - }) - - it('Should stop and let the queue finish', function (done) { - c = makeTest({ - maxConcurrent: 1, - minTime: 100, - trackDoneStatus: true - }) - var submitFailed = false - var dropped = 0 - - c.limiter.on('dropped', function () { - dropped++ - }) - - c.pNoErrVal(c.limiter.schedule({id: '1'}, c.promise, null, 1), 1) - c.pNoErrVal(c.limiter.schedule({id: '2'}, c.promise, null, 2), 2) - c.pNoErrVal(c.limiter.schedule({id: '3'}, c.slowPromise, 100, null, 3), 3) - - setTimeout(function () { - var counts = c.limiter.counts() - c.mustEqual(counts.RECEIVED, 0) - c.mustEqual(counts.QUEUED, 1) - c.mustEqual(counts.RUNNING, 1) - c.mustEqual(counts.EXECUTING, 0) - c.mustEqual(counts.DONE, 1) - - c.limiter.stop({ - enqueueErrorMessage: 'Stopped!', - dropWaitingJobs: false - }) - .then(function () { - counts = c.limiter.counts() - c.mustEqual(submitFailed, true) - c.mustEqual(dropped, 0) - c.mustEqual(counts.RECEIVED, 0) - c.mustEqual(counts.QUEUED, 0) - c.mustEqual(counts.RUNNING, 0) - c.mustEqual(counts.EXECUTING, 0) - c.mustEqual(counts.DONE, 4) - - c.checkResultsOrder([[1], [2], [3]]) - done() - }) - - c.limiter.schedule(() => Promise.resolve(true)) - .catch(function (err) { - c.mustEqual(err.message, 'Stopped!') - submitFailed = true - }) - - }, 75) - }) - - it('Should still resolve when rejectOnDrop is false', function (done) { - c = makeTest({ - maxConcurrent: 1, - minTime: 100, - rejectOnDrop: false - }) - - c.pNoErrVal(c.limiter.schedule({id: '1'}, c.promise, null, 1), 1) - c.pNoErrVal(c.limiter.schedule({id: '2'}, c.promise, null, 2), 2) - c.pNoErrVal(c.limiter.schedule({id: '3'}, c.slowPromise, 100, null, 3), 3) - - c.limiter.stop() - .then(function () { - return c.limiter.stop() - }) - .then(function () { - done(new Error("Should not be here")) - }) - .catch(function (err) { - c.mustEqual(err.message, "stop() has already been called") - done() - }) - }) - - it('Should not allow calling stop() twice when dropWaitingJobs=true', function (done) { - c = makeTest({ - maxConcurrent: 1, - minTime: 100 - }) - var failed = 0 - var handler = function (err) { - c.mustEqual(err.message, "This limiter has been stopped.") - failed++ - } - - c.pNoErrVal(c.limiter.schedule({id: '1'}, c.promise, null, 1), 1).catch(handler) - c.pNoErrVal(c.limiter.schedule({id: '2'}, c.promise, null, 2), 2).catch(handler) - c.pNoErrVal(c.limiter.schedule({id: '3'}, c.slowPromise, 100, null, 3), 3).catch(handler) - - c.limiter.stop({ dropWaitingJobs: true }) - .then(function () { - return c.limiter.stop({ dropWaitingJobs: true }) - }) - .then(function () { - done(new Error("Should not be here")) - }) - .catch(function (err) { - c.mustEqual(err.message, "stop() has already been called") - c.mustEqual(failed, 3) - done() - }) - }) - - it('Should not allow calling stop() twice when dropWaitingJobs=false', function (done) { - c = makeTest({ - maxConcurrent: 1, - minTime: 100 - }) - - c.pNoErrVal(c.limiter.schedule({id: '1'}, c.promise, null, 1), 1) - c.pNoErrVal(c.limiter.schedule({id: '2'}, c.promise, null, 2), 2) - c.pNoErrVal(c.limiter.schedule({id: '3'}, c.slowPromise, 100, null, 3), 3) - - c.limiter.stop({ dropWaitingJobs: false }) - .then(function () { - return c.limiter.stop({ dropWaitingJobs: false }) - }) - .then(function () { - done(new Error("Should not be here")) - }) - .catch(function (err) { - c.mustEqual(err.message, "stop() has already been called") - done() - }) - }) - -}) diff --git a/node_modules/brace-expansion/LICENSE b/node_modules/brace-expansion/LICENSE deleted file mode 100644 index de3226673..000000000 --- a/node_modules/brace-expansion/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013 Julian Gruber - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md deleted file mode 100644 index 6b4e0e164..000000000 --- a/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) -[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## Sponsors - -This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! - -Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js deleted file mode 100644 index 0478be81e..000000000 --- a/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,201 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json deleted file mode 100644 index f6049e281..000000000 --- a/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_args": [ - [ - "brace-expansion@1.1.11", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "brace-expansion@1.1.11", - "_id": "brace-expansion@1.1.11", - "_inBundle": false, - "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "_location": "/brace-expansion", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "brace-expansion@1.1.11", - "name": "brace-expansion", - "escapedName": "brace-expansion", - "rawSpec": "1.1.11", - "saveSpec": null, - "fetchSpec": "1.1.11" - }, - "_requiredBy": [ - "/minimatch" - ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "_spec": "1.1.11", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/brace-expansion/issues" - }, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - }, - "description": "Brace expansion as known from sh/bash", - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "keywords": [], - "license": "MIT", - "main": "index.js", - "name": "brace-expansion", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "scripts": { - "bench": "matcha test/perf/bench.js", - "gentest": "bash test/generate.sh", - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.1.11" -} diff --git a/node_modules/btoa-lite/.npmignore b/node_modules/btoa-lite/.npmignore deleted file mode 100644 index 50c74582d..000000000 --- a/node_modules/btoa-lite/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -node_modules -*.log -.DS_Store -bundle.js -test -test.js diff --git a/node_modules/btoa-lite/LICENSE.md b/node_modules/btoa-lite/LICENSE.md deleted file mode 100644 index ee27ba4b4..000000000 --- a/node_modules/btoa-lite/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/btoa-lite/README.md b/node_modules/btoa-lite/README.md deleted file mode 100644 index e36492e9b..000000000 --- a/node_modules/btoa-lite/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# btoa-lite -![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat) -![](http://img.shields.io/npm/v/btoa-lite.svg?style=flat) -![](http://img.shields.io/npm/dm/btoa-lite.svg?style=flat) -![](http://img.shields.io/npm/l/btoa-lite.svg?style=flat) - -Smallest/simplest possible means of using btoa with both Node and browserify. - -In the browser, encoding base64 strings is done using: - -``` javascript -var encoded = btoa(decoded) -``` - -However in Node, it's done like so: - -``` javascript -var encoded = new Buffer(decoded).toString('base64') -``` - -You can easily check if `Buffer` exists and switch between the approaches -accordingly, but using `Buffer` anywhere in your browser source will pull -in browserify's `Buffer` shim which is pretty hefty. This package uses -the `main` and `browser` fields in its `package.json` to perform this -check at build time and avoid pulling `Buffer` in unnecessarily. - -## Usage - -[![NPM](https://nodei.co/npm/btoa-lite.png)](https://nodei.co/npm/btoa-lite/) - -### `encoded = btoa(decoded)` - -Returns the base64-encoded value of a string. - -## License - -MIT. See [LICENSE.md](http://github.com/hughsk/btoa-lite/blob/master/LICENSE.md) for details. diff --git a/node_modules/btoa-lite/btoa-browser.js b/node_modules/btoa-lite/btoa-browser.js deleted file mode 100644 index 1b3acdbe2..000000000 --- a/node_modules/btoa-lite/btoa-browser.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function _btoa(str) { - return btoa(str) -} diff --git a/node_modules/btoa-lite/btoa-node.js b/node_modules/btoa-lite/btoa-node.js deleted file mode 100644 index 0278470bb..000000000 --- a/node_modules/btoa-lite/btoa-node.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function btoa(str) { - return new Buffer(str).toString('base64') -} diff --git a/node_modules/btoa-lite/package.json b/node_modules/btoa-lite/package.json deleted file mode 100644 index 24f5628cf..000000000 --- a/node_modules/btoa-lite/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_args": [ - [ - "btoa-lite@1.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "btoa-lite@1.0.0", - "_id": "btoa-lite@1.0.0", - "_inBundle": false, - "_integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=", - "_location": "/btoa-lite", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "btoa-lite@1.0.0", - "name": "btoa-lite", - "escapedName": "btoa-lite", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/@octokit/rest" - ], - "_resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com", - "url": "http://hughsk.io/" - }, - "browser": "btoa-browser.js", - "bugs": { - "url": "https://github.com/hughsk/btoa-lite/issues" - }, - "dependencies": {}, - "description": "Smallest/simplest possible means of using btoa with both Node and browserify", - "devDependencies": { - "browserify": "^10.2.4", - "smokestack": "^3.3.0", - "tap-spec": "^4.0.0", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/hughsk/btoa-lite", - "keywords": [ - "btoa", - "base64", - "isomorphic", - "browser", - "node", - "shared" - ], - "license": "MIT", - "main": "btoa-node.js", - "name": "btoa-lite", - "repository": { - "type": "git", - "url": "git://github.com/hughsk/btoa-lite.git" - }, - "scripts": { - "test": "npm run test-node && npm run test-browser", - "test-browser": "browserify test | smokestack | tap-spec", - "test-node": "node test | tap-spec" - }, - "version": "1.0.0" -} diff --git a/node_modules/concat-map/.travis.yml b/node_modules/concat-map/.travis.yml deleted file mode 100644 index f1d0f13c8..000000000 --- a/node_modules/concat-map/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/node_modules/concat-map/LICENSE b/node_modules/concat-map/LICENSE deleted file mode 100644 index ee27ba4b4..000000000 --- a/node_modules/concat-map/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/concat-map/README.markdown b/node_modules/concat-map/README.markdown deleted file mode 100644 index 408f70a1b..000000000 --- a/node_modules/concat-map/README.markdown +++ /dev/null @@ -1,62 +0,0 @@ -concat-map -========== - -Concatenative mapdashery. - -[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) - -[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) - -example -======= - -``` js -var concatMap = require('concat-map'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); -``` - -*** - -``` -[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] -``` - -methods -======= - -``` js -var concatMap = require('concat-map') -``` - -concatMap(xs, fn) ------------------ - -Return an array of concatenated elements by calling `fn(x, i)` for each element -`x` and each index `i` in the array `xs`. - -When `fn(x, i)` returns an array, its result will be concatenated with the -result array. If `fn(x, i)` returns anything else, that value will be pushed -onto the end of the result array. - -install -======= - -With [npm](http://npmjs.org) do: - -``` -npm install concat-map -``` - -license -======= - -MIT - -notes -===== - -This module was written while sitting high above the ground in a tree. diff --git a/node_modules/concat-map/example/map.js b/node_modules/concat-map/example/map.js deleted file mode 100644 index 33656217b..000000000 --- a/node_modules/concat-map/example/map.js +++ /dev/null @@ -1,6 +0,0 @@ -var concatMap = require('../'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); diff --git a/node_modules/concat-map/index.js b/node_modules/concat-map/index.js deleted file mode 100644 index b29a7812e..000000000 --- a/node_modules/concat-map/index.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; diff --git a/node_modules/concat-map/package.json b/node_modules/concat-map/package.json deleted file mode 100644 index bd836733d..000000000 --- a/node_modules/concat-map/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "_args": [ - [ - "concat-map@0.0.1", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "concat-map@0.0.1", - "_id": "concat-map@0.0.1", - "_inBundle": false, - "_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "_location": "/concat-map", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "concat-map@0.0.1", - "name": "concat-map", - "escapedName": "concat-map", - "rawSpec": "0.0.1", - "saveSpec": null, - "fetchSpec": "0.0.1" - }, - "_requiredBy": [ - "/brace-expansion" - ], - "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "_spec": "0.0.1", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-concat-map/issues" - }, - "description": "concatenative mapdashery", - "devDependencies": { - "tape": "~2.4.0" - }, - "directories": { - "example": "example", - "test": "test" - }, - "homepage": "https://github.com/substack/node-concat-map#readme", - "keywords": [ - "concat", - "concatMap", - "map", - "functional", - "higher-order" - ], - "license": "MIT", - "main": "index.js", - "name": "concat-map", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-concat-map.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": { - "ie": [ - 6, - 7, - 8, - 9 - ], - "ff": [ - 3.5, - 10, - 15 - ], - "chrome": [ - 10, - 22 - ], - "safari": [ - 5.1 - ], - "opera": [ - 12 - ] - } - }, - "version": "0.0.1" -} diff --git a/node_modules/concat-map/test/map.js b/node_modules/concat-map/test/map.js deleted file mode 100644 index fdbd7022f..000000000 --- a/node_modules/concat-map/test/map.js +++ /dev/null @@ -1,39 +0,0 @@ -var concatMap = require('../'); -var test = require('tape'); - -test('empty or not', function (t) { - var xs = [ 1, 2, 3, 4, 5, 6 ]; - var ixes = []; - var ys = concatMap(xs, function (x, ix) { - ixes.push(ix); - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; - }); - t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); - t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); - t.end(); -}); - -test('always something', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('scalars', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : x; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('undefs', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function () {}); - t.same(ys, [ undefined, undefined, undefined, undefined ]); - t.end(); -}); diff --git a/node_modules/cross-spawn/CHANGELOG.md b/node_modules/cross-spawn/CHANGELOG.md deleted file mode 100644 index ded9620b1..000000000 --- a/node_modules/cross-spawn/CHANGELOG.md +++ /dev/null @@ -1,100 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -
-## [6.0.5](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.4...v6.0.5) (2018-03-02) - - -### Bug Fixes - -* avoid using deprecated Buffer constructor ([#94](https://github.com/moxystudio/node-cross-spawn/issues/94)) ([d5770df](https://github.com/moxystudio/node-cross-spawn/commit/d5770df)), closes [/nodejs.org/api/deprecations.html#deprecations_dep0005](https://github.com//nodejs.org/api/deprecations.html/issues/deprecations_dep0005) - - - - -## [6.0.4](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.3...v6.0.4) (2018-01-31) - - -### Bug Fixes - -* fix paths being incorrectly normalized on unix ([06ee3c6](https://github.com/moxystudio/node-cross-spawn/commit/06ee3c6)), closes [#90](https://github.com/moxystudio/node-cross-spawn/issues/90) - - - - -## [6.0.3](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.2...v6.0.3) (2018-01-23) - - - - -## [6.0.2](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.1...v6.0.2) (2018-01-23) - - - - -## [6.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.0...v6.0.1) (2018-01-23) - - - - -# [6.0.0](https://github.com/moxystudio/node-cross-spawn/compare/5.1.0...6.0.0) (2018-01-23) - - -### Bug Fixes - -* fix certain arguments not being correctly escaped or causing batch syntax error ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)), closes [#82](https://github.com/moxystudio/node-cross-spawn/issues/82) [#51](https://github.com/moxystudio/node-cross-spawn/issues/51) -* fix commands as posix relatixe paths not working correctly, e.g.: `./my-command` ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) -* fix `options` argument being mutated ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) -* fix commands resolution when PATH was actually Path ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) - - -### Features - -* improve compliance with node's ENOENT errors ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) -* improve detection of node's shell option support ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) - - -### Chores - -* upgrade tooling -* upgrate project to es6 (node v4) - - -### BREAKING CHANGES - -* remove support for older nodejs versions, only `node >= 4` is supported - - - -## [5.1.0](https://github.com/moxystudio/node-cross-spawn/compare/5.0.1...5.1.0) (2017-02-26) - - -### Bug Fixes - -* fix `options.shell` support for NodeJS [v4.8](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V4.md#4.8.0) - - - -## [5.0.1](https://github.com/moxystudio/node-cross-spawn/compare/5.0.0...5.0.1) (2016-11-04) - - -### Bug Fixes - -* fix `options.shell` support for NodeJS v7 - - - -# [5.0.0](https://github.com/moxystudio/node-cross-spawn/compare/4.0.2...5.0.0) (2016-10-30) - - -## Features - -* add support for `options.shell` -* improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module - - -## Chores - -* refactor some code to make it more clear -* update README caveats diff --git a/node_modules/cross-spawn/LICENSE b/node_modules/cross-spawn/LICENSE deleted file mode 100644 index 8407b9a30..000000000 --- a/node_modules/cross-spawn/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Made With MOXY Lda - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/cross-spawn/README.md b/node_modules/cross-spawn/README.md deleted file mode 100644 index e895cd7a7..000000000 --- a/node_modules/cross-spawn/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# cross-spawn - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url] - -[npm-url]:https://npmjs.org/package/cross-spawn -[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg -[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg -[travis-url]:https://travis-ci.org/moxystudio/node-cross-spawn -[travis-image]:http://img.shields.io/travis/moxystudio/node-cross-spawn/master.svg -[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn -[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg -[codecov-url]:https://codecov.io/gh/moxystudio/node-cross-spawn -[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/node-cross-spawn/master.svg -[david-dm-url]:https://david-dm.org/moxystudio/node-cross-spawn -[david-dm-image]:https://img.shields.io/david/moxystudio/node-cross-spawn.svg -[david-dm-dev-url]:https://david-dm.org/moxystudio/node-cross-spawn?type=dev -[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/node-cross-spawn.svg -[greenkeeper-image]:https://badges.greenkeeper.io/moxystudio/node-cross-spawn.svg -[greenkeeper-url]:https://greenkeeper.io/ - -A cross platform solution to node's spawn and spawnSync. - - -## Installation - -`$ npm install cross-spawn` - - -## Why - -Node has issues when using spawn on Windows: - -- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) -- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix)) -- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367) -- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`) -- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149) -- No `options.shell` support on node `` where `` must not contain any arguments. -If you would like to have the shebang support improved, feel free to contribute via a pull-request. - -Remember to always test your code on Windows! - - -## Tests - -`$ npm test` -`$ npm test -- --watch` during development - -## License - -Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/node_modules/cross-spawn/index.js b/node_modules/cross-spawn/index.js deleted file mode 100644 index 5509742ca..000000000 --- a/node_modules/cross-spawn/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const cp = require('child_process'); -const parse = require('./lib/parse'); -const enoent = require('./lib/enoent'); - -function spawn(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const spawned = cp.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 - enoent.hookChildProcess(spawned, parsed); - - return spawned; -} - -function spawnSync(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const result = cp.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); - - return result; -} - -module.exports = spawn; -module.exports.spawn = spawn; -module.exports.sync = spawnSync; - -module.exports._parse = parse; -module.exports._enoent = enoent; diff --git a/node_modules/cross-spawn/lib/enoent.js b/node_modules/cross-spawn/lib/enoent.js deleted file mode 100644 index 14df9b623..000000000 --- a/node_modules/cross-spawn/lib/enoent.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -const isWin = process.platform === 'win32'; - -function notFoundError(original, syscall) { - return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { - code: 'ENOENT', - errno: 'ENOENT', - syscall: `${syscall} ${original.command}`, - path: original.command, - spawnargs: original.args, - }); -} - -function hookChildProcess(cp, parsed) { - if (!isWin) { - return; - } - - const originalEmit = cp.emit; - - cp.emit = function (name, arg1) { - // If emitting "exit" event and exit code is 1, we need to check if - // the command exists and emit an "error" instead - // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 - if (name === 'exit') { - const err = verifyENOENT(arg1, parsed, 'spawn'); - - if (err) { - return originalEmit.call(cp, 'error', err); - } - } - - return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params - }; -} - -function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawn'); - } - - return null; -} - -function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawnSync'); - } - - return null; -} - -module.exports = { - hookChildProcess, - verifyENOENT, - verifyENOENTSync, - notFoundError, -}; diff --git a/node_modules/cross-spawn/lib/parse.js b/node_modules/cross-spawn/lib/parse.js deleted file mode 100644 index 962827a94..000000000 --- a/node_modules/cross-spawn/lib/parse.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict'; - -const path = require('path'); -const niceTry = require('nice-try'); -const resolveCommand = require('./util/resolveCommand'); -const escape = require('./util/escape'); -const readShebang = require('./util/readShebang'); -const semver = require('semver'); - -const isWin = process.platform === 'win32'; -const isExecutableRegExp = /\.(?:com|exe)$/i; -const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - -// `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0 -const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false; - -function detectShebang(parsed) { - parsed.file = resolveCommand(parsed); - - const shebang = parsed.file && readShebang(parsed.file); - - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; - - return resolveCommand(parsed); - } - - return parsed.file; -} - -function parseNonShell(parsed) { - if (!isWin) { - return parsed; - } - - // Detect & add support for shebangs - const commandFile = detectShebang(parsed); - - // We don't need a shell if the command filename is an executable - const needsShell = !isExecutableRegExp.test(commandFile); - - // If a shell is required, use cmd.exe and take care of escaping everything correctly - // Note that `forceShell` is an hidden option used only in tests - if (parsed.options.forceShell || needsShell) { - // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` - // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument - // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, - // we need to double escape them - const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - - // 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); - - // Escape command & arguments - parsed.command = escape.command(parsed.command); - parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); - - const shellCommand = [parsed.command].concat(parsed.args).join(' '); - - parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; - parsed.command = process.env.comspec || 'cmd.exe'; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped - } - - return parsed; -} - -function parseShell(parsed) { - // If node supports the shell option, there's no need to mimic its behavior - if (supportsShellOption) { - return parsed; - } - - // Mimic node shell option - // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 - const shellCommand = [parsed.command].concat(parsed.args).join(' '); - - if (isWin) { - parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; - parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped - } else { - if (typeof parsed.options.shell === 'string') { - parsed.command = parsed.options.shell; - } else if (process.platform === 'android') { - parsed.command = '/system/bin/sh'; - } else { - parsed.command = '/bin/sh'; - } - - parsed.args = ['-c', shellCommand]; - } - - return parsed; -} - -function parse(command, args, options) { - // Normalize arguments, similar to nodejs - if (args && !Array.isArray(args)) { - options = args; - args = null; - } - - args = args ? args.slice(0) : []; // Clone array to avoid changing the original - options = Object.assign({}, options); // Clone object to avoid changing the original - - // Build our parsed object - const parsed = { - command, - args, - options, - file: undefined, - original: { - command, - args, - }, - }; - - // Delegate further parsing to shell or non-shell - return options.shell ? parseShell(parsed) : parseNonShell(parsed); -} - -module.exports = parse; diff --git a/node_modules/cross-spawn/lib/util/escape.js b/node_modules/cross-spawn/lib/util/escape.js deleted file mode 100644 index b0bb84c3a..000000000 --- a/node_modules/cross-spawn/lib/util/escape.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -// See http://www.robvanderwoude.com/escapechars.php -const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - -function escapeCommand(arg) { - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - return arg; -} - -function escapeArgument(arg, doubleEscapeMetaChars) { - // Convert to string - arg = `${arg}`; - - // Algorithm below is based on https://qntm.org/cmd - - // Sequence of backslashes followed by a double quote: - // double up all the backslashes and escape the double quote - arg = arg.replace(/(\\*)"/g, '$1$1\\"'); - - // Sequence of backslashes followed by the end of the string - // (which will become a double quote later): - // double up all the backslashes - arg = arg.replace(/(\\*)$/, '$1$1'); - - // All other backslashes occur literally - - // Quote the whole thing: - arg = `"${arg}"`; - - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - // Double escape meta chars if necessary - if (doubleEscapeMetaChars) { - arg = arg.replace(metaCharsRegExp, '^$1'); - } - - return arg; -} - -module.exports.command = escapeCommand; -module.exports.argument = escapeArgument; diff --git a/node_modules/cross-spawn/lib/util/readShebang.js b/node_modules/cross-spawn/lib/util/readShebang.js deleted file mode 100644 index bd4f1280c..000000000 --- a/node_modules/cross-spawn/lib/util/readShebang.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const shebangCommand = require('shebang-command'); - -function readShebang(command) { - // Read the first 150 bytes from the file - const size = 150; - let buffer; - - if (Buffer.alloc) { - // Node.js v4.5+ / v5.10+ - buffer = Buffer.alloc(size); - } else { - // Old Node.js API - buffer = new Buffer(size); - buffer.fill(0); // zero-fill - } - - let fd; - - try { - fd = fs.openSync(command, 'r'); - fs.readSync(fd, buffer, 0, size, 0); - fs.closeSync(fd); - } catch (e) { /* Empty */ } - - // Attempt to extract shebang (null is returned if not a shebang) - return shebangCommand(buffer.toString()); -} - -module.exports = readShebang; diff --git a/node_modules/cross-spawn/lib/util/resolveCommand.js b/node_modules/cross-spawn/lib/util/resolveCommand.js deleted file mode 100644 index 2fd5ad270..000000000 --- a/node_modules/cross-spawn/lib/util/resolveCommand.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -const path = require('path'); -const which = require('which'); -const pathKey = require('path-key')(); - -function resolveCommandAttempt(parsed, withoutPathExt) { - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; - - // If a custom `cwd` was specified, we need to change the process cwd - // because `which` will do stat calls but does not support a custom cwd - if (hasCustomCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - /* Empty */ - } - } - - let resolved; - - try { - resolved = which.sync(parsed.command, { - path: (parsed.options.env || process.env)[pathKey], - pathExt: withoutPathExt ? path.delimiter : undefined, - }); - } catch (e) { - /* Empty */ - } finally { - process.chdir(cwd); - } - - // 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); - } - - return resolved; -} - -function resolveCommand(parsed) { - return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); -} - -module.exports = resolveCommand; diff --git a/node_modules/cross-spawn/package.json b/node_modules/cross-spawn/package.json deleted file mode 100644 index d6080305d..000000000 --- a/node_modules/cross-spawn/package.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "_args": [ - [ - "cross-spawn@6.0.5", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "cross-spawn@6.0.5", - "_id": "cross-spawn@6.0.5", - "_inBundle": false, - "_integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "_location": "/cross-spawn", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "cross-spawn@6.0.5", - "name": "cross-spawn", - "escapedName": "cross-spawn", - "rawSpec": "6.0.5", - "saveSpec": null, - "fetchSpec": "6.0.5" - }, - "_requiredBy": [ - "/execa" - ], - "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "_spec": "6.0.5", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "André Cruz", - "email": "andre@moxy.studio" - }, - "bugs": { - "url": "https://github.com/moxystudio/node-cross-spawn/issues" - }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "description": "Cross platform child_process#spawn and child_process#spawnSync", - "devDependencies": { - "@commitlint/cli": "^6.0.0", - "@commitlint/config-conventional": "^6.0.2", - "babel-core": "^6.26.0", - "babel-jest": "^22.1.0", - "babel-preset-moxy": "^2.2.1", - "eslint": "^4.3.0", - "eslint-config-moxy": "^5.0.0", - "husky": "^0.14.3", - "jest": "^22.0.0", - "lint-staged": "^7.0.0", - "mkdirp": "^0.5.1", - "regenerator-runtime": "^0.11.1", - "rimraf": "^2.6.2", - "standard-version": "^4.2.0" - }, - "engines": { - "node": ">=4.8" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/moxystudio/node-cross-spawn", - "keywords": [ - "spawn", - "spawnSync", - "windows", - "cross-platform", - "path-ext", - "shebang", - "cmd", - "execute" - ], - "license": "MIT", - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ] - }, - "main": "index.js", - "name": "cross-spawn", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/moxystudio/node-cross-spawn.git" - }, - "scripts": { - "commitmsg": "commitlint -e $GIT_PARAMS", - "lint": "eslint .", - "precommit": "lint-staged", - "prerelease": "npm t && npm run lint", - "release": "standard-version", - "test": "jest --env node --coverage" - }, - "standard-version": { - "scripts": { - "posttag": "git push --follow-tags origin master && npm publish" - } - }, - "version": "6.0.5" -} diff --git a/node_modules/deprecation/LICENSE b/node_modules/deprecation/LICENSE deleted file mode 100644 index 1683b5838..000000000 --- a/node_modules/deprecation/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Gregor Martynus and contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/deprecation/README.md b/node_modules/deprecation/README.md deleted file mode 100644 index 648809d5d..000000000 --- a/node_modules/deprecation/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# deprecation - -> Log a deprecation message with stack - -![build](https://action-badges.now.sh/gr2m/deprecation) - -## Usage - - - - - - -
-Browsers - - -Load `deprecation` directly from [cdn.pika.dev](https://cdn.pika.dev) - -```html - -``` - -
-Node - - -Install with `npm install deprecation` - -```js -const { Deprecation } = require("deprecation"); -// or: import { Deprecation } from "deprecation"; -``` - -
- -```js -function foo() { - bar(); -} - -function bar() { - baz(); -} - -function baz() { - console.warn(new Deprecation("[my-lib] foo() is deprecated, use bar()")); -} - -foo(); -// { Deprecation: [my-lib] foo() is deprecated, use bar() -// at baz (/path/to/file.js:12:15) -// at bar (/path/to/file.js:8:3) -// at foo (/path/to/file.js:4:3) -``` - -To log a deprecation message only once, you can use the [once](https://www.npmjs.com/package/once) module. - -```js -const Deprecation = require("deprecation"); -const once = require("once"); - -const deprecateFoo = once(console.warn); - -function foo() { - deprecateFoo(new Deprecation("[my-lib] foo() is deprecated, use bar()")); -} - -foo(); -foo(); // logs nothing -``` - -## License - -[ISC](LICENSE) diff --git a/node_modules/deprecation/dist-node/index.js b/node_modules/deprecation/dist-node/index.js deleted file mode 100644 index 9da177570..000000000 --- a/node_modules/deprecation/dist-node/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = 'Deprecation'; - } - -} - -exports.Deprecation = Deprecation; diff --git a/node_modules/deprecation/dist-src/index.js b/node_modules/deprecation/dist-src/index.js deleted file mode 100644 index 7950fdc06..000000000 --- a/node_modules/deprecation/dist-src/index.js +++ /dev/null @@ -1,14 +0,0 @@ -export class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = 'Deprecation'; - } - -} \ No newline at end of file diff --git a/node_modules/deprecation/dist-types/index.d.ts b/node_modules/deprecation/dist-types/index.d.ts deleted file mode 100644 index e3ae7ad42..000000000 --- a/node_modules/deprecation/dist-types/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class Deprecation extends Error { - name: "Deprecation"; -} diff --git a/node_modules/deprecation/dist-web/index.js b/node_modules/deprecation/dist-web/index.js deleted file mode 100644 index c6bbda759..000000000 --- a/node_modules/deprecation/dist-web/index.js +++ /dev/null @@ -1,16 +0,0 @@ -class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = 'Deprecation'; - } - -} - -export { Deprecation }; diff --git a/node_modules/deprecation/package.json b/node_modules/deprecation/package.json deleted file mode 100644 index 3de170be8..000000000 --- a/node_modules/deprecation/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_args": [ - [ - "deprecation@2.3.1", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "deprecation@2.3.1", - "_id": "deprecation@2.3.1", - "_inBundle": false, - "_integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", - "_location": "/deprecation", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "deprecation@2.3.1", - "name": "deprecation", - "escapedName": "deprecation", - "rawSpec": "2.3.1", - "saveSpec": null, - "fetchSpec": "2.3.1" - }, - "_requiredBy": [ - "/@octokit/request", - "/@octokit/request-error", - "/@octokit/rest" - ], - "_resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "_spec": "2.3.1", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "bugs": { - "url": "https://github.com/gr2m/deprecation/issues" - }, - "dependencies": {}, - "description": "Log a deprecation message with stack", - "devDependencies": { - "@pika/pack": "^0.3.7", - "@pika/plugin-build-node": "^0.4.0", - "@pika/plugin-build-types": "^0.4.0", - "@pika/plugin-build-web": "^0.4.0", - "@pika/plugin-standard-pkg": "^0.4.0", - "semantic-release": "^15.13.3" - }, - "esnext": "dist-src/index.js", - "files": [ - "dist-*/", - "bin/" - ], - "homepage": "https://github.com/gr2m/deprecation#readme", - "keywords": [ - "deprecate", - "deprecated", - "deprecation" - ], - "license": "ISC", - "main": "dist-node/index.js", - "module": "dist-web/index.js", - "name": "deprecation", - "pika": true, - "repository": { - "type": "git", - "url": "git+https://github.com/gr2m/deprecation.git" - }, - "sideEffects": false, - "types": "dist-types/index.d.ts", - "version": "2.3.1" -} diff --git a/node_modules/end-of-stream/LICENSE b/node_modules/end-of-stream/LICENSE deleted file mode 100644 index 757562ec5..000000000 --- a/node_modules/end-of-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mathias Buus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/end-of-stream/README.md b/node_modules/end-of-stream/README.md deleted file mode 100644 index f2560c939..000000000 --- a/node_modules/end-of-stream/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# end-of-stream - -A node module that calls a callback when a readable/writable/duplex stream has completed or failed. - - npm install end-of-stream - -## Usage - -Simply pass a stream and a callback to the `eos`. -Both legacy streams, streams2 and stream3 are supported. - -``` js -var eos = require('end-of-stream'); - -eos(readableStream, function(err) { - // this will be set to the stream instance - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended', this === readableStream); -}); - -eos(writableStream, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has finished', this === writableStream); -}); - -eos(duplexStream, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended and finished', this === duplexStream); -}); - -eos(duplexStream, {readable:false}, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has finished but might still be readable'); -}); - -eos(duplexStream, {writable:false}, function(err) { - if (err) return console.log('stream had an error or closed early'); - console.log('stream has ended but might still be writable'); -}); - -eos(readableStream, {error:false}, function(err) { - // do not treat emit('error', err) as a end-of-stream -}); -``` - -## License - -MIT - -## Related - -`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/node_modules/end-of-stream/index.js b/node_modules/end-of-stream/index.js deleted file mode 100644 index be426c227..000000000 --- a/node_modules/end-of-stream/index.js +++ /dev/null @@ -1,87 +0,0 @@ -var once = require('once'); - -var noop = function() {}; - -var isRequest = function(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -}; - -var isChildProcess = function(stream) { - return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 -}; - -var eos = function(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - - callback = once(callback || noop); - - var ws = stream._writableState; - var rs = stream._readableState; - var readable = opts.readable || (opts.readable !== false && stream.readable); - var writable = opts.writable || (opts.writable !== false && stream.writable); - - var onlegacyfinish = function() { - if (!stream.writable) onfinish(); - }; - - var onfinish = function() { - writable = false; - if (!readable) callback.call(stream); - }; - - var onend = function() { - readable = false; - if (!writable) callback.call(stream); - }; - - var onexit = function(exitCode) { - callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); - }; - - var onerror = function(err) { - callback.call(stream, err); - }; - - var onclose = function() { - if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close')); - }; - - var onrequest = function() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest(); - else stream.on('request', onrequest); - } else if (writable && !ws) { // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - - if (isChildProcess(stream)) stream.on('exit', onexit); - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - - return function() { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -}; - -module.exports = eos; diff --git a/node_modules/end-of-stream/package.json b/node_modules/end-of-stream/package.json deleted file mode 100644 index d894b56b9..000000000 --- a/node_modules/end-of-stream/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_args": [ - [ - "end-of-stream@1.4.1", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "end-of-stream@1.4.1", - "_id": "end-of-stream@1.4.1", - "_inBundle": false, - "_integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "_location": "/end-of-stream", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "end-of-stream@1.4.1", - "name": "end-of-stream", - "escapedName": "end-of-stream", - "rawSpec": "1.4.1", - "saveSpec": null, - "fetchSpec": "1.4.1" - }, - "_requiredBy": [ - "/pump" - ], - "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "_spec": "1.4.1", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Mathias Buus", - "email": "mathiasbuus@gmail.com" - }, - "bugs": { - "url": "https://github.com/mafintosh/end-of-stream/issues" - }, - "dependencies": { - "once": "^1.4.0" - }, - "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", - "files": [ - "index.js" - ], - "homepage": "https://github.com/mafintosh/end-of-stream", - "keywords": [ - "stream", - "streams", - "callback", - "finish", - "close", - "end", - "wait" - ], - "license": "MIT", - "main": "index.js", - "name": "end-of-stream", - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/end-of-stream.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.4.1" -} diff --git a/node_modules/execa/index.js b/node_modules/execa/index.js deleted file mode 100644 index aad9ac887..000000000 --- a/node_modules/execa/index.js +++ /dev/null @@ -1,361 +0,0 @@ -'use strict'; -const path = require('path'); -const childProcess = require('child_process'); -const crossSpawn = require('cross-spawn'); -const stripEof = require('strip-eof'); -const npmRunPath = require('npm-run-path'); -const isStream = require('is-stream'); -const _getStream = require('get-stream'); -const pFinally = require('p-finally'); -const onExit = require('signal-exit'); -const errname = require('./lib/errname'); -const stdio = require('./lib/stdio'); - -const TEN_MEGABYTES = 1000 * 1000 * 10; - -function handleArgs(cmd, args, opts) { - let parsed; - - opts = Object.assign({ - extendEnv: true, - env: {} - }, opts); - - if (opts.extendEnv) { - opts.env = Object.assign({}, process.env, opts.env); - } - - if (opts.__winShell === true) { - delete opts.__winShell; - parsed = { - command: cmd, - args, - options: opts, - file: cmd, - original: { - cmd, - args - } - }; - } else { - parsed = crossSpawn._parse(cmd, args, opts); - } - - opts = Object.assign({ - maxBuffer: TEN_MEGABYTES, - buffer: true, - stripEof: true, - preferLocal: true, - localDir: parsed.options.cwd || process.cwd(), - encoding: 'utf8', - reject: true, - cleanup: true - }, parsed.options); - - opts.stdio = stdio(opts); - - if (opts.preferLocal) { - opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); - } - - if (opts.detached) { - // #115 - opts.cleanup = false; - } - - if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { - // #116 - parsed.args.unshift('/q'); - } - - return { - cmd: parsed.command, - args: parsed.args, - opts, - parsed - }; -} - -function handleInput(spawned, input) { - if (input === null || input === undefined) { - return; - } - - if (isStream(input)) { - input.pipe(spawned.stdin); - } else { - spawned.stdin.end(input); - } -} - -function handleOutput(opts, val) { - if (val && opts.stripEof) { - val = stripEof(val); - } - - return val; -} - -function handleShell(fn, cmd, opts) { - let file = '/bin/sh'; - let args = ['-c', cmd]; - - opts = Object.assign({}, opts); - - if (process.platform === 'win32') { - opts.__winShell = true; - file = process.env.comspec || 'cmd.exe'; - args = ['/s', '/c', `"${cmd}"`]; - opts.windowsVerbatimArguments = true; - } - - if (opts.shell) { - file = opts.shell; - delete opts.shell; - } - - return fn(file, args, opts); -} - -function getStream(process, stream, {encoding, buffer, maxBuffer}) { - if (!process[stream]) { - return null; - } - - let ret; - - if (!buffer) { - // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10 - ret = new Promise((resolve, reject) => { - process[stream] - .once('end', resolve) - .once('error', reject); - }); - } else if (encoding) { - ret = _getStream(process[stream], { - encoding, - maxBuffer - }); - } else { - ret = _getStream.buffer(process[stream], {maxBuffer}); - } - - return ret.catch(err => { - err.stream = stream; - err.message = `${stream} ${err.message}`; - throw err; - }); -} - -function makeError(result, options) { - const {stdout, stderr} = result; - - let err = result.error; - const {code, signal} = result; - - const {parsed, joinedCmd} = options; - const timedOut = options.timedOut || false; - - if (!err) { - let output = ''; - - if (Array.isArray(parsed.opts.stdio)) { - if (parsed.opts.stdio[2] !== 'inherit') { - output += output.length > 0 ? stderr : `\n${stderr}`; - } - - if (parsed.opts.stdio[1] !== 'inherit') { - output += `\n${stdout}`; - } - } else if (parsed.opts.stdio !== 'inherit') { - output = `\n${stderr}${stdout}`; - } - - err = new Error(`Command failed: ${joinedCmd}${output}`); - err.code = code < 0 ? errname(code) : code; - } - - err.stdout = stdout; - err.stderr = stderr; - err.failed = true; - err.signal = signal || null; - err.cmd = joinedCmd; - err.timedOut = timedOut; - - return err; -} - -function joinCmd(cmd, args) { - let joinedCmd = cmd; - - if (Array.isArray(args) && args.length > 0) { - joinedCmd += ' ' + args.join(' '); - } - - return joinedCmd; -} - -module.exports = (cmd, args, opts) => { - const parsed = handleArgs(cmd, args, opts); - const {encoding, buffer, maxBuffer} = parsed.opts; - const joinedCmd = joinCmd(cmd, args); - - let spawned; - try { - spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); - } catch (err) { - return Promise.reject(err); - } - - let removeExitHandler; - if (parsed.opts.cleanup) { - removeExitHandler = onExit(() => { - spawned.kill(); - }); - } - - let timeoutId = null; - let timedOut = false; - - const cleanup = () => { - if (timeoutId) { - clearTimeout(timeoutId); - timeoutId = null; - } - - if (removeExitHandler) { - removeExitHandler(); - } - }; - - if (parsed.opts.timeout > 0) { - timeoutId = setTimeout(() => { - timeoutId = null; - timedOut = true; - spawned.kill(parsed.opts.killSignal); - }, parsed.opts.timeout); - } - - const processDone = new Promise(resolve => { - spawned.on('exit', (code, signal) => { - cleanup(); - resolve({code, signal}); - }); - - spawned.on('error', err => { - cleanup(); - resolve({error: err}); - }); - - if (spawned.stdin) { - spawned.stdin.on('error', err => { - cleanup(); - resolve({error: err}); - }); - } - }); - - function destroy() { - if (spawned.stdout) { - spawned.stdout.destroy(); - } - - if (spawned.stderr) { - spawned.stderr.destroy(); - } - } - - const handlePromise = () => pFinally(Promise.all([ - processDone, - getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}), - getStream(spawned, 'stderr', {encoding, buffer, maxBuffer}) - ]).then(arr => { - const result = arr[0]; - result.stdout = arr[1]; - result.stderr = arr[2]; - - if (result.error || result.code !== 0 || result.signal !== null) { - const err = makeError(result, { - joinedCmd, - parsed, - timedOut - }); - - // TODO: missing some timeout logic for killed - // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 - // err.killed = spawned.killed || killed; - err.killed = err.killed || spawned.killed; - - if (!parsed.opts.reject) { - return err; - } - - throw err; - } - - return { - stdout: handleOutput(parsed.opts, result.stdout), - stderr: handleOutput(parsed.opts, result.stderr), - code: 0, - failed: false, - killed: false, - signal: null, - cmd: joinedCmd, - timedOut: false - }; - }), destroy); - - crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); - - handleInput(spawned, parsed.opts.input); - - spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected); - spawned.catch = onrejected => handlePromise().catch(onrejected); - - return spawned; -}; - -// TODO: set `stderr: 'ignore'` when that option is implemented -module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout); - -// TODO: set `stdout: 'ignore'` when that option is implemented -module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr); - -module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); - -module.exports.sync = (cmd, args, opts) => { - const parsed = handleArgs(cmd, args, opts); - const joinedCmd = joinCmd(cmd, args); - - if (isStream(parsed.opts.input)) { - throw new TypeError('The `input` option cannot be a stream in sync mode'); - } - - const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); - result.code = result.status; - - if (result.error || result.status !== 0 || result.signal !== null) { - const err = makeError(result, { - joinedCmd, - parsed - }); - - if (!parsed.opts.reject) { - return err; - } - - throw err; - } - - return { - stdout: handleOutput(parsed.opts, result.stdout), - stderr: handleOutput(parsed.opts, result.stderr), - code: 0, - failed: false, - signal: null, - cmd: joinedCmd, - timedOut: false - }; -}; - -module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); diff --git a/node_modules/execa/lib/errname.js b/node_modules/execa/lib/errname.js deleted file mode 100644 index e367837b2..000000000 --- a/node_modules/execa/lib/errname.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; -// Older verions of Node.js might not have `util.getSystemErrorName()`. -// In that case, fall back to a deprecated internal. -const util = require('util'); - -let uv; - -if (typeof util.getSystemErrorName === 'function') { - module.exports = util.getSystemErrorName; -} else { - try { - uv = process.binding('uv'); - - if (typeof uv.errname !== 'function') { - throw new TypeError('uv.errname is not a function'); - } - } catch (err) { - console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); - uv = null; - } - - module.exports = code => errname(uv, code); -} - -// Used for testing the fallback behavior -module.exports.__test__ = errname; - -function errname(uv, code) { - if (uv) { - return uv.errname(code); - } - - if (!(code < 0)) { - throw new Error('err >= 0'); - } - - return `Unknown system error ${code}`; -} - diff --git a/node_modules/execa/lib/stdio.js b/node_modules/execa/lib/stdio.js deleted file mode 100644 index a82d46838..000000000 --- a/node_modules/execa/lib/stdio.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; -const alias = ['stdin', 'stdout', 'stderr']; - -const hasAlias = opts => alias.some(x => Boolean(opts[x])); - -module.exports = opts => { - if (!opts) { - return null; - } - - if (opts.stdio && hasAlias(opts)) { - throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); - } - - if (typeof opts.stdio === 'string') { - return opts.stdio; - } - - const stdio = opts.stdio || []; - - if (!Array.isArray(stdio)) { - throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); - } - - const result = []; - const len = Math.max(stdio.length, alias.length); - - for (let i = 0; i < len; i++) { - let value = null; - - if (stdio[i] !== undefined) { - value = stdio[i]; - } else if (opts[alias[i]] !== undefined) { - value = opts[alias[i]]; - } - - result[i] = value; - } - - return result; -}; diff --git a/node_modules/execa/license b/node_modules/execa/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/execa/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/execa/package.json b/node_modules/execa/package.json deleted file mode 100644 index 23b17112a..000000000 --- a/node_modules/execa/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - "execa@1.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "execa@1.0.0", - "_id": "execa@1.0.0", - "_inBundle": false, - "_integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "_location": "/execa", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "execa@1.0.0", - "name": "execa", - "escapedName": "execa", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/jest-changed-files", - "/sane", - "/windows-release" - ], - "_resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/execa/issues" - }, - "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "description": "A better `child_process`", - "devDependencies": { - "ava": "*", - "cat-names": "^1.0.2", - "coveralls": "^3.0.1", - "delay": "^3.0.0", - "is-running": "^2.0.0", - "nyc": "^13.0.1", - "tempfile": "^2.0.0", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "lib" - ], - "homepage": "https://github.com/sindresorhus/execa#readme", - "keywords": [ - "exec", - "child", - "process", - "execute", - "fork", - "execfile", - "spawn", - "file", - "shell", - "bin", - "binary", - "binaries", - "npm", - "path", - "local" - ], - "license": "MIT", - "name": "execa", - "nyc": { - "reporter": [ - "text", - "lcov" - ], - "exclude": [ - "**/fixtures/**", - "**/test.js", - "**/test/**" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/execa.git" - }, - "scripts": { - "test": "xo && nyc ava" - }, - "version": "1.0.0" -} diff --git a/node_modules/execa/readme.md b/node_modules/execa/readme.md deleted file mode 100644 index f3f533d92..000000000 --- a/node_modules/execa/readme.md +++ /dev/null @@ -1,327 +0,0 @@ -# execa [![Build Status: Linux](https://travis-ci.org/sindresorhus/execa.svg?branch=master)](https://travis-ci.org/sindresorhus/execa) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/x5ajamxtjtt93cqv/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/execa/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/execa?branch=master) - -> A better [`child_process`](https://nodejs.org/api/child_process.html) - - -## Why - -- Promise interface. -- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`. -- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform. -- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why) -- Higher max buffer. 10 MB instead of 200 KB. -- [Executes locally installed binaries by name.](#preferlocal) -- [Cleans up spawned processes when the parent process dies.](#cleanup) - - -## Install - -``` -$ npm install execa -``` - - - - - - -## Usage - -```js -const execa = require('execa'); - -(async () => { - const {stdout} = await execa('echo', ['unicorns']); - console.log(stdout); - //=> 'unicorns' -})(); -``` - -Additional examples: - -```js -const execa = require('execa'); - -(async () => { - // Pipe the child process stdout to the current stdout - execa('echo', ['unicorns']).stdout.pipe(process.stdout); - - - // Run a shell command - const {stdout} = await execa.shell('echo unicorns'); - //=> 'unicorns' - - - // Catching an error - try { - await execa.shell('exit 3'); - } catch (error) { - console.log(error); - /* - { - message: 'Command failed: /bin/sh -c exit 3' - killed: false, - code: 3, - signal: null, - cmd: '/bin/sh -c exit 3', - stdout: '', - stderr: '', - timedOut: false - } - */ - } -})(); - -// Catching an error with a sync method -try { - execa.shellSync('exit 3'); -} catch (error) { - console.log(error); - /* - { - message: 'Command failed: /bin/sh -c exit 3' - code: 3, - signal: null, - cmd: '/bin/sh -c exit 3', - stdout: '', - stderr: '', - timedOut: false - } - */ -} -``` - - -## API - -### execa(file, [arguments], [options]) - -Execute a file. - -Think of this as a mix of `child_process.execFile` and `child_process.spawn`. - -Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties. - -### execa.stdout(file, [arguments], [options]) - -Same as `execa()`, but returns only `stdout`. - -### execa.stderr(file, [arguments], [options]) - -Same as `execa()`, but returns only `stderr`. - -### execa.shell(command, [options]) - -Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer. - -Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess). - -The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties. - -### execa.sync(file, [arguments], [options]) - -Execute a file synchronously. - -Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). - -This method throws an `Error` if the command fails. - -### execa.shellSync(file, [options]) - -Execute a command synchronously through the system shell. - -Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). - -### options - -Type: `Object` - -#### cwd - -Type: `string`
-Default: `process.cwd()` - -Current working directory of the child process. - -#### env - -Type: `Object`
-Default: `process.env` - -Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this. - -#### extendEnv - -Type: `boolean`
-Default: `true` - -Set to `false` if you don't want to extend the environment variables when providing the `env` property. - -#### argv0 - -Type: `string` - -Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified. - -#### stdio - -Type: `string[]` `string`
-Default: `pipe` - -Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration. - -#### detached - -Type: `boolean` - -Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached). - -#### uid - -Type: `number` - -Sets the user identity of the process. - -#### gid - -Type: `number` - -Sets the group identity of the process. - -#### shell - -Type: `boolean` `string`
-Default: `false` - -If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows. - -#### stripEof - -Type: `boolean`
-Default: `true` - -[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output. - -#### preferLocal - -Type: `boolean`
-Default: `true` - -Prefer locally installed binaries when looking for a binary to execute.
-If you `$ npm install foo`, you can then `execa('foo')`. - -#### localDir - -Type: `string`
-Default: `process.cwd()` - -Preferred path to find locally installed binaries in (use with `preferLocal`). - -#### input - -Type: `string` `Buffer` `stream.Readable` - -Write some input to the `stdin` of your binary.
-Streams are not allowed when using the synchronous methods. - -#### reject - -Type: `boolean`
-Default: `true` - -Setting this to `false` resolves the promise with the error instead of rejecting it. - -#### cleanup - -Type: `boolean`
-Default: `true` - -Keep track of the spawned process and `kill` it when the parent process exits. - -#### encoding - -Type: `string`
-Default: `utf8` - -Specify the character encoding used to decode the `stdout` and `stderr` output. - -#### timeout - -Type: `number`
-Default: `0` - -If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds. - -#### buffer - -Type: `boolean`
-Default: `true` - -Buffer the output from the spawned process. When buffering is disabled you must consume the output of the `stdout` and `stderr` streams because the promise will not be resolved/rejected until they have completed. - -#### maxBuffer - -Type: `number`
-Default: `10000000` (10MB) - -Largest amount of data in bytes allowed on `stdout` or `stderr`. - -#### killSignal - -Type: `string` `number`
-Default: `SIGTERM` - -Signal value to be used when the spawned process will be killed. - -#### stdin - -Type: `string` `number` `Stream` `undefined` `null`
-Default: `pipe` - -Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). - -#### stdout - -Type: `string` `number` `Stream` `undefined` `null`
-Default: `pipe` - -Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). - -#### stderr - -Type: `string` `number` `Stream` `undefined` `null`
-Default: `pipe` - -Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). - -#### windowsVerbatimArguments - -Type: `boolean`
-Default: `false` - -If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`. - - -## Tips - -### Save and pipe output from a child process - -Let's say you want to show the output of a child process in real-time while also saving it to a variable. - -```js -const execa = require('execa'); -const getStream = require('get-stream'); - -const stream = execa('echo', ['foo']).stdout; - -stream.pipe(process.stdout); - -getStream(stream).then(value => { - console.log('child output:', value); -}); -``` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/fs.realpath/LICENSE b/node_modules/fs.realpath/LICENSE deleted file mode 100644 index 5bd884c25..000000000 --- a/node_modules/fs.realpath/LICENSE +++ /dev/null @@ -1,43 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ----- - -This library bundles a version of the `fs.realpath` and `fs.realpathSync` -methods from Node.js v0.10 under the terms of the Node.js MIT license. - -Node's license follows, also included at the header of `old.js` which contains -the licensed code: - - Copyright Joyent, Inc. and other Node contributors. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. diff --git a/node_modules/fs.realpath/README.md b/node_modules/fs.realpath/README.md deleted file mode 100644 index a42ceac62..000000000 --- a/node_modules/fs.realpath/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# fs.realpath - -A backwards-compatible fs.realpath for Node v6 and above - -In Node v6, the JavaScript implementation of fs.realpath was replaced -with a faster (but less resilient) native implementation. That raises -new and platform-specific errors and cannot handle long or excessively -symlink-looping paths. - -This module handles those cases by detecting the new errors and -falling back to the JavaScript implementation. On versions of Node -prior to v6, it has no effect. - -## USAGE - -```js -var rp = require('fs.realpath') - -// async version -rp.realpath(someLongAndLoopingPath, function (er, real) { - // the ELOOP was handled, but it was a bit slower -}) - -// sync version -var real = rp.realpathSync(someLongAndLoopingPath) - -// monkeypatch at your own risk! -// This replaces the fs.realpath/fs.realpathSync builtins -rp.monkeypatch() - -// un-do the monkeypatching -rp.unmonkeypatch() -``` diff --git a/node_modules/fs.realpath/index.js b/node_modules/fs.realpath/index.js deleted file mode 100644 index b09c7c7e6..000000000 --- a/node_modules/fs.realpath/index.js +++ /dev/null @@ -1,66 +0,0 @@ -module.exports = realpath -realpath.realpath = realpath -realpath.sync = realpathSync -realpath.realpathSync = realpathSync -realpath.monkeypatch = monkeypatch -realpath.unmonkeypatch = unmonkeypatch - -var fs = require('fs') -var origRealpath = fs.realpath -var origRealpathSync = fs.realpathSync - -var version = process.version -var ok = /^v[0-5]\./.test(version) -var old = require('./old.js') - -function newError (er) { - return er && er.syscall === 'realpath' && ( - er.code === 'ELOOP' || - er.code === 'ENOMEM' || - er.code === 'ENAMETOOLONG' - ) -} - -function realpath (p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb) - } - - if (typeof cache === 'function') { - cb = cache - cache = null - } - origRealpath(p, cache, function (er, result) { - if (newError(er)) { - old.realpath(p, cache, cb) - } else { - cb(er, result) - } - }) -} - -function realpathSync (p, cache) { - if (ok) { - return origRealpathSync(p, cache) - } - - try { - return origRealpathSync(p, cache) - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache) - } else { - throw er - } - } -} - -function monkeypatch () { - fs.realpath = realpath - fs.realpathSync = realpathSync -} - -function unmonkeypatch () { - fs.realpath = origRealpath - fs.realpathSync = origRealpathSync -} diff --git a/node_modules/fs.realpath/old.js b/node_modules/fs.realpath/old.js deleted file mode 100644 index b40305e73..000000000 --- a/node_modules/fs.realpath/old.js +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var pathModule = require('path'); -var isWindows = process.platform === 'win32'; -var fs = require('fs'); - -// JavaScript implementation of realpath, ported from node pre-v6 - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; - - return callback; - - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; diff --git a/node_modules/fs.realpath/package.json b/node_modules/fs.realpath/package.json deleted file mode 100644 index aa4581b2f..000000000 --- a/node_modules/fs.realpath/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_args": [ - [ - "fs.realpath@1.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "fs.realpath@1.0.0", - "_id": "fs.realpath@1.0.0", - "_inBundle": false, - "_integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "_location": "/fs.realpath", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "fs.realpath@1.0.0", - "name": "fs.realpath", - "escapedName": "fs.realpath", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/glob" - ], - "_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/fs.realpath/issues" - }, - "dependencies": {}, - "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", - "devDependencies": {}, - "files": [ - "old.js", - "index.js" - ], - "homepage": "https://github.com/isaacs/fs.realpath#readme", - "keywords": [ - "realpath", - "fs", - "polyfill" - ], - "license": "ISC", - "main": "index.js", - "name": "fs.realpath", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/fs.realpath.git" - }, - "scripts": { - "test": "tap test/*.js --cov" - }, - "version": "1.0.0" -} diff --git a/node_modules/get-stream/buffer-stream.js b/node_modules/get-stream/buffer-stream.js deleted file mode 100644 index 4121c8e56..000000000 --- a/node_modules/get-stream/buffer-stream.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; -const {PassThrough} = require('stream'); - -module.exports = options => { - options = Object.assign({}, options); - - const {array} = options; - let {encoding} = options; - const buffer = encoding === 'buffer'; - let objectMode = false; - - if (array) { - objectMode = !(encoding || buffer); - } else { - encoding = encoding || 'utf8'; - } - - if (buffer) { - encoding = null; - } - - let len = 0; - const ret = []; - const stream = new PassThrough({objectMode}); - - if (encoding) { - stream.setEncoding(encoding); - } - - stream.on('data', chunk => { - ret.push(chunk); - - if (objectMode) { - len = ret.length; - } else { - len += chunk.length; - } - }); - - stream.getBufferedValue = () => { - if (array) { - return ret; - } - - return buffer ? Buffer.concat(ret, len) : ret.join(''); - }; - - stream.getBufferedLength = () => len; - - return stream; -}; diff --git a/node_modules/get-stream/index.js b/node_modules/get-stream/index.js deleted file mode 100644 index 7e5584a63..000000000 --- a/node_modules/get-stream/index.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; -const pump = require('pump'); -const bufferStream = require('./buffer-stream'); - -class MaxBufferError extends Error { - constructor() { - super('maxBuffer exceeded'); - this.name = 'MaxBufferError'; - } -} - -function getStream(inputStream, options) { - if (!inputStream) { - return Promise.reject(new Error('Expected a stream')); - } - - options = Object.assign({maxBuffer: Infinity}, options); - - const {maxBuffer} = options; - - let stream; - return new Promise((resolve, reject) => { - const rejectPromise = error => { - if (error) { // A null check - error.bufferedData = stream.getBufferedValue(); - } - reject(error); - }; - - stream = pump(inputStream, bufferStream(options), error => { - if (error) { - rejectPromise(error); - return; - } - - resolve(); - }); - - stream.on('data', () => { - if (stream.getBufferedLength() > maxBuffer) { - rejectPromise(new MaxBufferError()); - } - }); - }).then(() => stream.getBufferedValue()); -} - -module.exports = getStream; -module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'})); -module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true})); -module.exports.MaxBufferError = MaxBufferError; diff --git a/node_modules/get-stream/license b/node_modules/get-stream/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/get-stream/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/get-stream/package.json b/node_modules/get-stream/package.json deleted file mode 100644 index 87aa63b10..000000000 --- a/node_modules/get-stream/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_args": [ - [ - "get-stream@4.1.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "get-stream@4.1.0", - "_id": "get-stream@4.1.0", - "_inBundle": false, - "_integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "_location": "/get-stream", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "get-stream@4.1.0", - "name": "get-stream", - "escapedName": "get-stream", - "rawSpec": "4.1.0", - "saveSpec": null, - "fetchSpec": "4.1.0" - }, - "_requiredBy": [ - "/execa" - ], - "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "_spec": "4.1.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/get-stream/issues" - }, - "dependencies": { - "pump": "^3.0.0" - }, - "description": "Get a stream as a string, buffer, or array", - "devDependencies": { - "ava": "*", - "into-stream": "^3.0.0", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "buffer-stream.js" - ], - "homepage": "https://github.com/sindresorhus/get-stream#readme", - "keywords": [ - "get", - "stream", - "promise", - "concat", - "string", - "text", - "buffer", - "read", - "data", - "consume", - "readable", - "readablestream", - "array", - "object" - ], - "license": "MIT", - "name": "get-stream", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/get-stream.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "4.1.0" -} diff --git a/node_modules/get-stream/readme.md b/node_modules/get-stream/readme.md deleted file mode 100644 index b87a4d37c..000000000 --- a/node_modules/get-stream/readme.md +++ /dev/null @@ -1,123 +0,0 @@ -# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream) - -> Get a stream as a string, buffer, or array - - -## Install - -``` -$ npm install get-stream -``` - - -## Usage - -```js -const fs = require('fs'); -const getStream = require('get-stream'); - -(async () => { - const stream = fs.createReadStream('unicorn.txt'); - - console.log(await getStream(stream)); - /* - ,,))))))));, - __)))))))))))))), - \|/ -\(((((''''((((((((. - -*-==//////(('' . `)))))), - /|\ ))| o ;-. '((((( ,(, - ( `| / ) ;))))' ,_))^;(~ - | | | ,))((((_ _____------~~~-. %,;(;(>';'~ - o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~ - ; ''''```` `: `:::|\,__,%% );`'; ~ - | _ ) / `:|`----' `-' - ______/\/~ | / / - /~;;.____/;;' / ___--,-( `;;;/ - / // _;______;'------~~~~~ /;;/\ / - // | | / ; \;;,\ - (<_ | ; /',/-----' _> - \_| ||_ //~;~~~~~~~~~ - `\_| (,~~ - \~\ - ~~ - */ -})(); -``` - - -## API - -The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode. - -### getStream(stream, [options]) - -Get the `stream` as a string. - -#### options - -Type: `Object` - -##### encoding - -Type: `string`
-Default: `utf8` - -[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream. - -##### maxBuffer - -Type: `number`
-Default: `Infinity` - -Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `getStream.MaxBufferError` error. - -### getStream.buffer(stream, [options]) - -Get the `stream` as a buffer. - -It honors the `maxBuffer` option as above, but it refers to byte length rather than string length. - -### getStream.array(stream, [options]) - -Get the `stream` as an array of values. - -It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen: - -- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes). - -- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array. - -- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array. - - -## Errors - -If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error. - -```js -(async () => { - try { - await getStream(streamThatErrorsAtTheEnd('unicorn')); - } catch (error) { - console.log(error.bufferedData); - //=> 'unicorn' - } -})() -``` - - -## FAQ - -### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)? - -This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package. - - -## Related - -- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/glob/LICENSE b/node_modules/glob/LICENSE deleted file mode 100644 index 42ca266df..000000000 --- a/node_modules/glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -## Glob Logo - -Glob's logo created by Tanya Brassie , licensed -under a Creative Commons Attribution-ShareAlike 4.0 International License -https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/node_modules/glob/README.md b/node_modules/glob/README.md deleted file mode 100644 index e71b967ea..000000000 --- a/node_modules/glob/README.md +++ /dev/null @@ -1,373 +0,0 @@ -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![](logo/glob.png) - -## Usage - -Install with npm - -``` -npm i glob -``` - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* `cb` `{Function}` - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` `{String}` Pattern to be matched -* `options` `{Object}` -* return: `{Array}` filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` `{String}` pattern to search for -* `options` `{Object}` -* `cb` `{Function}` Called when an error occurs, or matches are found - * `err` `{Error | null}` - * `matches` `{Array}` filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'FILE'` - Path exists, and is not a directory - * `'DIR'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the specific - thing that matched. It is not deduplicated or resolved to a realpath. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of glob patterns to exclude matches. - Note: `ignore` patterns are *always* in `dot:true` mode, regardless - of any other settings. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) -* `absolute` Set to true to always receive absolute paths for matched - files. Unlike `realpath`, this also affects the values returned in - the `match` event. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if it -started with a `#` character, or a "negated" pattern if it started -with a `!` character. - -These options were deprecated in version 5, and removed in version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Glob Logo -Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo). - -The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/). - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` diff --git a/node_modules/glob/changelog.md b/node_modules/glob/changelog.md deleted file mode 100644 index 41636771e..000000000 --- a/node_modules/glob/changelog.md +++ /dev/null @@ -1,67 +0,0 @@ -## 7.0 - -- Raise error if `options.cwd` is specified, and not a directory - -## 6.0 - -- Remove comment and negation pattern support -- Ignore patterns are always in `dot:true` mode - -## 5.0 - -- Deprecate comment and negation patterns -- Fix regression in `mark` and `nodir` options from making all cache - keys absolute path. -- Abort if `fs.readdir` returns an error that's unexpected -- Don't emit `match` events for ignored items -- Treat ENOTSUP like ENOTDIR in readdir - -## 4.5 - -- Add `options.follow` to always follow directory symlinks in globstar -- Add `options.realpath` to call `fs.realpath` on all results -- Always cache based on absolute path - -## 4.4 - -- Add `options.ignore` -- Fix handling of broken symlinks - -## 4.3 - -- Bump minimatch to 2.x -- Pass all tests on Windows - -## 4.2 - -- Add `glob.hasMagic` function -- Add `options.nodir` flag - -## 4.1 - -- Refactor sync and async implementations for performance -- Throw if callback provided to sync glob function -- Treat symbolic links in globstar results the same as Bash 4.3 - -## 4.0 - -- Use `^` for dependency versions (bumped major because this breaks - older npm versions) -- Ensure callbacks are only ever called once -- switch to ISC license - -## 3.x - -- Rewrite in JavaScript -- Add support for setting root, cwd, and windows support -- Cache many fs calls -- Add globstar support -- emit match events - -## 2.x - -- Use `glob.h` and `fnmatch.h` from NetBSD - -## 1.x - -- `glob.h` static binding. diff --git a/node_modules/glob/common.js b/node_modules/glob/common.js deleted file mode 100644 index 66651bb3a..000000000 --- a/node_modules/glob/common.js +++ /dev/null @@ -1,240 +0,0 @@ -exports.alphasort = alphasort -exports.alphasorti = alphasorti -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var path = require("path") -var minimatch = require("minimatch") -var isAbsolute = require("path-is-absolute") -var Minimatch = minimatch.Minimatch - -function alphasorti (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()) -} - -function alphasort (a, b) { - return a.localeCompare(b) -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(self.nocase ? alphasorti : alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js deleted file mode 100644 index 58dec0f6c..000000000 --- a/node_modules/glob/glob.js +++ /dev/null @@ -1,790 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var fs = require('fs') -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var globSync = require('./sync.js') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - - if (!pattern) - return false - - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - this._processing = 0 - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - var sync = true - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - sync = false - - function done () { - --self._processing - if (self._processing <= 0) { - if (sync) { - process.nextTick(function () { - self._finish() - }) - } else { - self._finish() - } - } - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - rp.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json deleted file mode 100644 index dee3ba066..000000000 --- a/node_modules/glob/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_args": [ - [ - "glob@7.1.4", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "glob@7.1.4", - "_id": "glob@7.1.4", - "_inBundle": false, - "_integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", - "_location": "/glob", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "glob@7.1.4", - "name": "glob", - "escapedName": "glob", - "rawSpec": "7.1.4", - "saveSpec": null, - "fetchSpec": "7.1.4" - }, - "_requiredBy": [ - "/", - "/@jest/reporters", - "/jest-config", - "/jest-runtime", - "/rimraf", - "/test-exclude" - ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "_spec": "7.1.4", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "description": "a little globber", - "devDependencies": { - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^12.0.1", - "tick": "0.0.6" - }, - "engines": { - "node": "*" - }, - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "homepage": "https://github.com/isaacs/node-glob#readme", - "license": "ISC", - "main": "glob.js", - "name": "glob", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "scripts": { - "bench": "bash benchmark.sh", - "benchclean": "node benchclean.js", - "prepublish": "npm run benchclean", - "prof": "bash prof.sh && cat profile.txt", - "profclean": "rm -f v8.log profile.txt", - "test": "tap test/*.js --cov", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" - }, - "version": "7.1.4" -} diff --git a/node_modules/glob/sync.js b/node_modules/glob/sync.js deleted file mode 100644 index c952134ba..000000000 --- a/node_modules/glob/sync.js +++ /dev/null @@ -1,486 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var fs = require('fs') -var rp = require('fs.realpath') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/node_modules/inflight/LICENSE b/node_modules/inflight/LICENSE deleted file mode 100644 index 05eeeb88c..000000000 --- a/node_modules/inflight/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/inflight/README.md b/node_modules/inflight/README.md deleted file mode 100644 index 6dc892917..000000000 --- a/node_modules/inflight/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# inflight - -Add callbacks to requests in flight to avoid async duplication - -## USAGE - -```javascript -var inflight = require('inflight') - -// some request that does some stuff -function req(key, callback) { - // key is any random string. like a url or filename or whatever. - // - // will return either a falsey value, indicating that the - // request for this key is already in flight, or a new callback - // which when called will call all callbacks passed to inflightk - // with the same key - callback = inflight(key, callback) - - // If we got a falsey value back, then there's already a req going - if (!callback) return - - // this is where you'd fetch the url or whatever - // callback is also once()-ified, so it can safely be assigned - // to multiple events etc. First call wins. - setTimeout(function() { - callback(null, key) - }, 100) -} - -// only assigns a single setTimeout -// when it dings, all cbs get called -req('foo', cb1) -req('foo', cb2) -req('foo', cb3) -req('foo', cb4) -``` diff --git a/node_modules/inflight/inflight.js b/node_modules/inflight/inflight.js deleted file mode 100644 index 48202b3ca..000000000 --- a/node_modules/inflight/inflight.js +++ /dev/null @@ -1,54 +0,0 @@ -var wrappy = require('wrappy') -var reqs = Object.create(null) -var once = require('once') - -module.exports = wrappy(inflight) - -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) - } -} - -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) - - // XXX It's somewhat ambiguous whether a new callback added in this - // pass should be queued for later execution if something in the - // list of callbacks throws, or if it should just be discarded. - // However, it's such an edge case that it hardly matters, and either - // choice is likely as surprising as the other. - // As it happens, we do go ahead and schedule it for later execution. - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - } finally { - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] - } - } - }) -} - -function slice (args) { - var length = args.length - var array = [] - - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} diff --git a/node_modules/inflight/package.json b/node_modules/inflight/package.json deleted file mode 100644 index 9f652d204..000000000 --- a/node_modules/inflight/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_args": [ - [ - "inflight@1.0.6", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "inflight@1.0.6", - "_id": "inflight@1.0.6", - "_inBundle": false, - "_integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "_location": "/inflight", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "inflight@1.0.6", - "name": "inflight", - "escapedName": "inflight", - "rawSpec": "1.0.6", - "saveSpec": null, - "fetchSpec": "1.0.6" - }, - "_requiredBy": [ - "/glob" - ], - "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "_spec": "1.0.6", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/inflight/issues" - }, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - }, - "description": "Add callbacks to requests in flight to avoid async duplication", - "devDependencies": { - "tap": "^7.1.2" - }, - "files": [ - "inflight.js" - ], - "homepage": "https://github.com/isaacs/inflight", - "license": "ISC", - "main": "inflight.js", - "name": "inflight", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/inflight.git" - }, - "scripts": { - "test": "tap test.js --100" - }, - "version": "1.0.6" -} diff --git a/node_modules/inherits/LICENSE b/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013d6..000000000 --- a/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/inherits/README.md b/node_modules/inherits/README.md deleted file mode 100644 index b1c566585..000000000 --- a/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/inherits/inherits.js b/node_modules/inherits/inherits.js deleted file mode 100644 index f71f2d932..000000000 --- a/node_modules/inherits/inherits.js +++ /dev/null @@ -1,9 +0,0 @@ -try { - var util = require('util'); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = require('./inherits_browser.js'); -} diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js deleted file mode 100644 index 86bbb3dc2..000000000 --- a/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,27 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } -} diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json deleted file mode 100644 index ba0257fdf..000000000 --- a/node_modules/inherits/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_args": [ - [ - "inherits@2.0.4", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "inherits@2.0.4", - "_id": "inherits@2.0.4", - "_inBundle": false, - "_integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "_location": "/inherits", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "inherits@2.0.4", - "name": "inherits", - "escapedName": "inherits", - "rawSpec": "2.0.4", - "saveSpec": null, - "fetchSpec": "2.0.4" - }, - "_requiredBy": [ - "/glob" - ], - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "_spec": "2.0.4", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "browser": "./inherits_browser.js", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "devDependencies": { - "tap": "^14.2.4" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ], - "homepage": "https://github.com/isaacs/inherits#readme", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "license": "ISC", - "main": "./inherits.js", - "name": "inherits", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "scripts": { - "test": "tap" - }, - "version": "2.0.4" -} diff --git a/node_modules/is-stream/index.js b/node_modules/is-stream/index.js deleted file mode 100644 index 6f7ec91a4..000000000 --- a/node_modules/is-stream/index.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -var isStream = module.exports = function (stream) { - return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; -}; - -isStream.writable = function (stream) { - return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; -}; - -isStream.readable = function (stream) { - return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; -}; - -isStream.duplex = function (stream) { - return isStream.writable(stream) && isStream.readable(stream); -}; - -isStream.transform = function (stream) { - return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; -}; diff --git a/node_modules/is-stream/license b/node_modules/is-stream/license deleted file mode 100644 index 654d0bfe9..000000000 --- a/node_modules/is-stream/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-stream/package.json b/node_modules/is-stream/package.json deleted file mode 100644 index 3f5868156..000000000 --- a/node_modules/is-stream/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_args": [ - [ - "is-stream@1.1.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "is-stream@1.1.0", - "_id": "is-stream@1.1.0", - "_inBundle": false, - "_integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "_location": "/is-stream", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-stream@1.1.0", - "name": "is-stream", - "escapedName": "is-stream", - "rawSpec": "1.1.0", - "saveSpec": null, - "fetchSpec": "1.1.0" - }, - "_requiredBy": [ - "/execa" - ], - "_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "_spec": "1.1.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/is-stream/issues" - }, - "description": "Check if something is a Node.js stream", - "devDependencies": { - "ava": "*", - "tempfile": "^1.1.0", - "xo": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/is-stream#readme", - "keywords": [ - "stream", - "type", - "streams", - "writable", - "readable", - "duplex", - "transform", - "check", - "detect", - "is" - ], - "license": "MIT", - "name": "is-stream", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/is-stream.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "1.1.0" -} diff --git a/node_modules/is-stream/readme.md b/node_modules/is-stream/readme.md deleted file mode 100644 index d8afce81d..000000000 --- a/node_modules/is-stream/readme.md +++ /dev/null @@ -1,42 +0,0 @@ -# is-stream [![Build Status](https://travis-ci.org/sindresorhus/is-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/is-stream) - -> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html) - - -## Install - -``` -$ npm install --save is-stream -``` - - -## Usage - -```js -const fs = require('fs'); -const isStream = require('is-stream'); - -isStream(fs.createReadStream('unicorn.png')); -//=> true - -isStream({}); -//=> false -``` - - -## API - -### isStream(stream) - -#### isStream.writable(stream) - -#### isStream.readable(stream) - -#### isStream.duplex(stream) - -#### isStream.transform(stream) - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/isexe/.npmignore b/node_modules/isexe/.npmignore deleted file mode 100644 index c1cb757ac..000000000 --- a/node_modules/isexe/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.nyc_output/ -coverage/ diff --git a/node_modules/isexe/LICENSE b/node_modules/isexe/LICENSE deleted file mode 100644 index 19129e315..000000000 --- a/node_modules/isexe/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/isexe/README.md b/node_modules/isexe/README.md deleted file mode 100644 index 35769e844..000000000 --- a/node_modules/isexe/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# isexe - -Minimal module to check if a file is executable, and a normal file. - -Uses `fs.stat` and tests against the `PATHEXT` environment variable on -Windows. - -## USAGE - -```javascript -var isexe = require('isexe') -isexe('some-file-name', function (err, isExe) { - if (err) { - console.error('probably file does not exist or something', err) - } else if (isExe) { - console.error('this thing can be run') - } else { - console.error('cannot be run') - } -}) - -// same thing but synchronous, throws errors -var isExe = isexe.sync('some-file-name') - -// treat errors as just "not executable" -isexe('maybe-missing-file', { ignoreErrors: true }, callback) -var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) -``` - -## API - -### `isexe(path, [options], [callback])` - -Check if the path is executable. If no callback provided, and a -global `Promise` object is available, then a Promise will be returned. - -Will raise whatever errors may be raised by `fs.stat`, unless -`options.ignoreErrors` is set to true. - -### `isexe.sync(path, [options])` - -Same as `isexe` but returns the value and throws any errors raised. - -### Options - -* `ignoreErrors` Treat all errors as "no, this is not executable", but - don't raise them. -* `uid` Number to use as the user id -* `gid` Number to use as the group id -* `pathExt` List of path extensions to use instead of `PATHEXT` - environment variable on Windows. diff --git a/node_modules/isexe/index.js b/node_modules/isexe/index.js deleted file mode 100644 index 553fb32b1..000000000 --- a/node_modules/isexe/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var fs = require('fs') -var core -if (process.platform === 'win32' || global.TESTING_WINDOWS) { - core = require('./windows.js') -} else { - core = require('./mode.js') -} - -module.exports = isexe -isexe.sync = sync - -function isexe (path, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - if (!cb) { - if (typeof Promise !== 'function') { - throw new TypeError('callback not provided') - } - - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er) - } else { - resolve(is) - } - }) - }) - } - - core(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) { - er = null - is = false - } - } - cb(er, is) - }) -} - -function sync (path, options) { - // my kingdom for a filtered catch - try { - return core.sync(path, options || {}) - } catch (er) { - if (options && options.ignoreErrors || er.code === 'EACCES') { - return false - } else { - throw er - } - } -} diff --git a/node_modules/isexe/mode.js b/node_modules/isexe/mode.js deleted file mode 100644 index 1995ea4a0..000000000 --- a/node_modules/isexe/mode.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = isexe -isexe.sync = sync - -var fs = require('fs') - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), options) -} - -function checkStat (stat, options) { - return stat.isFile() && checkMode(stat, options) -} - -function checkMode (stat, options) { - var mod = stat.mode - var uid = stat.uid - var gid = stat.gid - - var myUid = options.uid !== undefined ? - options.uid : process.getuid && process.getuid() - var myGid = options.gid !== undefined ? - options.gid : process.getgid && process.getgid() - - var u = parseInt('100', 8) - var g = parseInt('010', 8) - var o = parseInt('001', 8) - var ug = u | g - - var ret = (mod & o) || - (mod & g) && gid === myGid || - (mod & u) && uid === myUid || - (mod & ug) && myUid === 0 - - return ret -} diff --git a/node_modules/isexe/package.json b/node_modules/isexe/package.json deleted file mode 100644 index b128ac9ee..000000000 --- a/node_modules/isexe/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_args": [ - [ - "isexe@2.0.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "isexe@2.0.0", - "_id": "isexe@2.0.0", - "_inBundle": false, - "_integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "_location": "/isexe", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "isexe@2.0.0", - "name": "isexe", - "escapedName": "isexe", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/which" - ], - "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/isexe/issues" - }, - "description": "Minimal module to check if a file is executable.", - "devDependencies": { - "mkdirp": "^0.5.1", - "rimraf": "^2.5.0", - "tap": "^10.3.0" - }, - "directories": { - "test": "test" - }, - "homepage": "https://github.com/isaacs/isexe#readme", - "keywords": [], - "license": "ISC", - "main": "index.js", - "name": "isexe", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/isexe.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap test/*.js --100" - }, - "version": "2.0.0" -} diff --git a/node_modules/isexe/test/basic.js b/node_modules/isexe/test/basic.js deleted file mode 100644 index d926df64b..000000000 --- a/node_modules/isexe/test/basic.js +++ /dev/null @@ -1,221 +0,0 @@ -var t = require('tap') -var fs = require('fs') -var path = require('path') -var fixture = path.resolve(__dirname, 'fixtures') -var meow = fixture + '/meow.cat' -var mine = fixture + '/mine.cat' -var ours = fixture + '/ours.cat' -var fail = fixture + '/fail.false' -var noent = fixture + '/enoent.exe' -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') - -var isWindows = process.platform === 'win32' -var hasAccess = typeof fs.access === 'function' -var winSkip = isWindows && 'windows' -var accessSkip = !hasAccess && 'no fs.access function' -var hasPromise = typeof Promise === 'function' -var promiseSkip = !hasPromise && 'no global Promise' - -function reset () { - delete require.cache[require.resolve('../')] - return require('../') -} - -t.test('setup fixtures', function (t) { - rimraf.sync(fixture) - mkdirp.sync(fixture) - fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') - fs.chmodSync(meow, parseInt('0755', 8)) - fs.writeFileSync(fail, '#!/usr/bin/env false\n') - fs.chmodSync(fail, parseInt('0644', 8)) - fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') - fs.chmodSync(mine, parseInt('0744', 8)) - fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') - fs.chmodSync(ours, parseInt('0754', 8)) - t.end() -}) - -t.test('promise', { skip: promiseSkip }, function (t) { - var isexe = reset() - t.test('meow async', function (t) { - isexe(meow).then(function (is) { - t.ok(is) - t.end() - }) - }) - t.test('fail async', function (t) { - isexe(fail).then(function (is) { - t.notOk(is) - t.end() - }) - }) - t.test('noent async', function (t) { - isexe(noent).catch(function (er) { - t.ok(er) - t.end() - }) - }) - t.test('noent ignore async', function (t) { - isexe(noent, { ignoreErrors: true }).then(function (is) { - t.notOk(is) - t.end() - }) - }) - t.end() -}) - -t.test('no promise', function (t) { - global.Promise = null - var isexe = reset() - t.throws('try to meow a promise', function () { - isexe(meow) - }) - t.end() -}) - -t.test('access', { skip: accessSkip || winSkip }, function (t) { - runTest(t) -}) - -t.test('mode', { skip: winSkip }, function (t) { - delete fs.access - delete fs.accessSync - var isexe = reset() - t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) - t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) - runTest(t) -}) - -t.test('windows', function (t) { - global.TESTING_WINDOWS = true - var pathExt = '.EXE;.CAT;.CMD;.COM' - t.test('pathExt option', function (t) { - runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) - }) - t.test('pathExt env', function (t) { - process.env.PATHEXT = pathExt - runTest(t) - }) - t.test('no pathExt', function (t) { - // with a pathExt of '', any filename is fine. - // so the "fail" one would still pass. - runTest(t, { pathExt: '', skipFail: true }) - }) - t.test('pathext with empty entry', function (t) { - // with a pathExt of '', any filename is fine. - // so the "fail" one would still pass. - runTest(t, { pathExt: ';' + pathExt, skipFail: true }) - }) - t.end() -}) - -t.test('cleanup', function (t) { - rimraf.sync(fixture) - t.end() -}) - -function runTest (t, options) { - var isexe = reset() - - var optionsIgnore = Object.create(options || {}) - optionsIgnore.ignoreErrors = true - - if (!options || !options.skipFail) { - t.notOk(isexe.sync(fail, options)) - } - t.notOk(isexe.sync(noent, optionsIgnore)) - if (!options) { - t.ok(isexe.sync(meow)) - } else { - t.ok(isexe.sync(meow, options)) - } - - t.ok(isexe.sync(mine, options)) - t.ok(isexe.sync(ours, options)) - t.throws(function () { - isexe.sync(noent, options) - }) - - t.test('meow async', function (t) { - if (!options) { - isexe(meow, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - } else { - isexe(meow, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - } - }) - - t.test('mine async', function (t) { - isexe(mine, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - }) - - t.test('ours async', function (t) { - isexe(ours, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - }) - - if (!options || !options.skipFail) { - t.test('fail async', function (t) { - isexe(fail, options, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - } - - t.test('noent async', function (t) { - isexe(noent, options, function (er, is) { - t.ok(er) - t.notOk(is) - t.end() - }) - }) - - t.test('noent ignore async', function (t) { - isexe(noent, optionsIgnore, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - - t.test('directory is not executable', function (t) { - isexe(__dirname, options, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - - t.end() -} diff --git a/node_modules/isexe/windows.js b/node_modules/isexe/windows.js deleted file mode 100644 index 34996734d..000000000 --- a/node_modules/isexe/windows.js +++ /dev/null @@ -1,42 +0,0 @@ -module.exports = isexe -isexe.sync = sync - -var fs = require('fs') - -function checkPathExt (path, options) { - var pathext = options.pathExt !== undefined ? - options.pathExt : process.env.PATHEXT - - if (!pathext) { - return true - } - - pathext = pathext.split(';') - if (pathext.indexOf('') !== -1) { - return true - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase() - if (p && path.substr(-p.length).toLowerCase() === p) { - return true - } - } - return false -} - -function checkStat (stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false - } - return checkPathExt(path, options) -} - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), path, options) -} diff --git a/node_modules/lodash.get/LICENSE b/node_modules/lodash.get/LICENSE deleted file mode 100644 index e0c69d560..000000000 --- a/node_modules/lodash.get/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.get/README.md b/node_modules/lodash.get/README.md deleted file mode 100644 index 90796144c..000000000 --- a/node_modules/lodash.get/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.get v4.4.2 - -The [lodash](https://lodash.com/) method `_.get` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.get -``` - -In Node.js: -```js -var get = require('lodash.get'); -``` - -See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.4.2-npm-packages/lodash.get) for more details. diff --git a/node_modules/lodash.get/index.js b/node_modules/lodash.get/index.js deleted file mode 100644 index 0eaadec50..000000000 --- a/node_modules/lodash.get/index.js +++ /dev/null @@ -1,931 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - symbolTag = '[object Symbol]'; - -/** Used to match property names within property paths. */ -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 = /[\\^$.*+?()[\]{}|]/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} - -/** Used for built-in method references. */ -var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -/** Used to detect methods masquerading as native. */ -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 = funcProto.toString; - -/** Used to check objects for own properties. */ -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 = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** Built-in value references. */ -var Symbol = root.Symbol, - splice = arrayProto.splice; - -/* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'), - nativeCreate = getNative(Object, 'create'); - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; -} - -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; -} - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @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) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); -} - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : 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; - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; -} - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; -} - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @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; -} - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -// Add methods to `ListCache`. -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. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @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); -} - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @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); -} - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - getMapData(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; - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = isKey(path, object) ? [path] : castPath(path); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(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) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value) { - return isArray(value) ? value : stringToPath(value); -} - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @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; -} - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @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)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -/** - * Checks if `func` has its source masked. - * - * @private - * @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); -} - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = memoize(function(string) { - string = toString(string); - - var result = []; - if (reLeadingDot.test(string)) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result); - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; -} - -// Assign cache to `_.memoize`. -memoize.Cache = MapCache; - -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -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(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : baseToString(value); -} - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; -} - -module.exports = get; diff --git a/node_modules/lodash.get/package.json b/node_modules/lodash.get/package.json deleted file mode 100644 index 848c3b278..000000000 --- a/node_modules/lodash.get/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_args": [ - [ - "lodash.get@4.4.2", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "lodash.get@4.4.2", - "_id": "lodash.get@4.4.2", - "_inBundle": false, - "_integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "_location": "/lodash.get", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "lodash.get@4.4.2", - "name": "lodash.get", - "escapedName": "lodash.get", - "rawSpec": "4.4.2", - "saveSpec": null, - "fetchSpec": "4.4.2" - }, - "_requiredBy": [ - "/@octokit/rest" - ], - "_resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "_spec": "4.4.2", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "description": "The lodash method `_.get` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "get" - ], - "license": "MIT", - "name": "lodash.get", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.4.2" -} diff --git a/node_modules/lodash.set/LICENSE b/node_modules/lodash.set/LICENSE deleted file mode 100644 index e0c69d560..000000000 --- a/node_modules/lodash.set/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.set/README.md b/node_modules/lodash.set/README.md deleted file mode 100644 index 1f530bc42..000000000 --- a/node_modules/lodash.set/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.set v4.3.2 - -The [lodash](https://lodash.com/) method `_.set` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.set -``` - -In Node.js: -```js -var set = require('lodash.set'); -``` - -See the [documentation](https://lodash.com/docs#set) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.set) for more details. diff --git a/node_modules/lodash.set/index.js b/node_modules/lodash.set/index.js deleted file mode 100644 index 9f3ed6b18..000000000 --- a/node_modules/lodash.set/index.js +++ /dev/null @@ -1,990 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - symbolTag = '[object Symbol]'; - -/** Used to match property names within property paths. */ -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 = /[\\^$.*+?()[\]{}|]/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** Used to detect host constructors (Safari). */ -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 = typeof global == 'object' && global && global.Object === Object && global; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} - -/** Used for built-in method references. */ -var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -/** Used to detect methods masquerading as native. */ -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 = funcProto.toString; - -/** Used to check objects for own properties. */ -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 = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** Built-in value references. */ -var Symbol = root.Symbol, - splice = arrayProto.splice; - -/* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'), - nativeCreate = getNative(Object, 'create'); - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; -} - -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; -} - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @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) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); -} - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : 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; - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; -} - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; -} - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @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; -} - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -// Add methods to `ListCache`. -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. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @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); -} - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @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); -} - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - getMapData(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; - -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - object[key] = value; - } -} - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = isKey(path, object) ? [path] : castPath(path); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - 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(objValue) - ? objValue - : (isIndex(path[index + 1]) ? [] : {}); - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(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) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value) { - return isArray(value) ? value : stringToPath(value); -} - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @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; -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @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)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -/** - * Checks if `func` has its source masked. - * - * @private - * @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); -} - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = memoize(function(string) { - string = toString(string); - - var result = []; - if (reLeadingDot.test(string)) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result); - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; -} - -// Assign cache to `_.memoize`. -memoize.Cache = MapCache; - -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -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(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : baseToString(value); -} - -/** - * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, - * it's created. Arrays are created for missing index properties while objects - * are created for all other missing properties. Use `_.setWith` to customize - * `path` creation. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @returns {Object} Returns `object`. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.set(object, 'a[0].b.c', 4); - * console.log(object.a[0].b.c); - * // => 4 - * - * _.set(object, ['x', '0', 'y', 'z'], 5); - * console.log(object.x[0].y.z); - * // => 5 - */ -function set(object, path, value) { - return object == null ? object : baseSet(object, path, value); -} - -module.exports = set; diff --git a/node_modules/lodash.set/package.json b/node_modules/lodash.set/package.json deleted file mode 100644 index fe47d67f4..000000000 --- a/node_modules/lodash.set/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_args": [ - [ - "lodash.set@4.3.2", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "lodash.set@4.3.2", - "_id": "lodash.set@4.3.2", - "_inBundle": false, - "_integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=", - "_location": "/lodash.set", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "lodash.set@4.3.2", - "name": "lodash.set", - "escapedName": "lodash.set", - "rawSpec": "4.3.2", - "saveSpec": null, - "fetchSpec": "4.3.2" - }, - "_requiredBy": [ - "/@octokit/rest" - ], - "_resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", - "_spec": "4.3.2", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "description": "The lodash method `_.set` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "set" - ], - "license": "MIT", - "name": "lodash.set", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.3.2" -} diff --git a/node_modules/lodash.uniq/LICENSE b/node_modules/lodash.uniq/LICENSE deleted file mode 100644 index e0c69d560..000000000 --- a/node_modules/lodash.uniq/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.uniq/README.md b/node_modules/lodash.uniq/README.md deleted file mode 100644 index a662a5e38..000000000 --- a/node_modules/lodash.uniq/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.uniq v4.5.0 - -The [lodash](https://lodash.com/) method `_.uniq` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.uniq -``` - -In Node.js: -```js -var uniq = require('lodash.uniq'); -``` - -See the [documentation](https://lodash.com/docs#uniq) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.uniq) for more details. diff --git a/node_modules/lodash.uniq/index.js b/node_modules/lodash.uniq/index.js deleted file mode 100644 index 83fce2bc4..000000000 --- a/node_modules/lodash.uniq/index.js +++ /dev/null @@ -1,896 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array ? array.length : 0; - return !!length && baseIndexOf(array, value, 0) > -1; -} - -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array ? array.length : 0; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return baseFindIndex(array, baseIsNaN, fromIndex); - } - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/** - * Checks if a cache value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} - -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -/** Used for built-in method references. */ -var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -/** Used to detect methods masquerading as native. */ -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 = funcProto.toString; - -/** Used to check objects for own properties. */ -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 = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'), - Set = getNative(root, 'Set'), - nativeCreate = getNative(Object, 'create'); - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; -} - -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; -} - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @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) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); -} - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : 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; - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; -} - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; -} - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @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; -} - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -// Add methods to `ListCache`. -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. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @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); -} - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @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); -} - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - getMapData(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; - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values ? values.length : 0; - - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } -} - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; -SetCache.prototype.has = setCacheHas; - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -/** - * Creates a set object of `values`. - * - * @private - * @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 : function(values) { - return new Set(values); -}; - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @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; -} - -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -/** - * Checks if `func` has its source masked. - * - * @private - * @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); -} - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -/** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each - * element is kept. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - */ -function uniq(array) { - return (array && array.length) - ? baseUniq(array) - : []; -} - -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -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(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -module.exports = uniq; diff --git a/node_modules/lodash.uniq/package.json b/node_modules/lodash.uniq/package.json deleted file mode 100644 index a97744d40..000000000 --- a/node_modules/lodash.uniq/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_args": [ - [ - "lodash.uniq@4.5.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "lodash.uniq@4.5.0", - "_id": "lodash.uniq@4.5.0", - "_inBundle": false, - "_integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "_location": "/lodash.uniq", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "lodash.uniq@4.5.0", - "name": "lodash.uniq", - "escapedName": "lodash.uniq", - "rawSpec": "4.5.0", - "saveSpec": null, - "fetchSpec": "4.5.0" - }, - "_requiredBy": [ - "/@octokit/rest" - ], - "_resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "_spec": "4.5.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "description": "The lodash method `_.uniq` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "uniq" - ], - "license": "MIT", - "name": "lodash.uniq", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.5.0" -} diff --git a/node_modules/macos-release/index.d.ts b/node_modules/macos-release/index.d.ts deleted file mode 100644 index c4efcf451..000000000 --- a/node_modules/macos-release/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -declare const macosRelease: { - /** - Get the name and version of a macOS release from the Darwin version. - - @param release - By default, the current operating system is used, but you can supply a custom [Darwin kernel version](http://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). - - @example - ``` - import * as os from 'os'; - import macosRelease = require('macos-release'); - - // On a macOS Sierra system - - macosRelease(); - //=> {name: 'Sierra', version: '10.12'} - - os.release(); - //=> 13.2.0 - // This is the Darwin kernel version - - macosRelease(os.release()); - //=> {name: 'Sierra', version: '10.12'} - - macosRelease('14.0.0'); - //=> {name: 'Yosemite', version: '10.10'} - ``` - */ - (release?: string): string; - - // TODO: remove this in the next major version, refactor the whole definition to: - // declare function macosRelease(release?: string): string; - // export = macosRelease; - default: typeof macosRelease; -}; - -export = macosRelease; diff --git a/node_modules/macos-release/index.js b/node_modules/macos-release/index.js deleted file mode 100644 index b6eba6b02..000000000 --- a/node_modules/macos-release/index.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; -const os = require('os'); - -const nameMap = new Map([ - [19, 'Catalina'], - [18, 'Mojave'], - [17, 'High Sierra'], - [16, 'Sierra'], - [15, 'El Capitan'], - [14, 'Yosemite'], - [13, 'Mavericks'], - [12, 'Mountain Lion'], - [11, 'Lion'], - [10, 'Snow Leopard'], - [9, 'Leopard'], - [8, 'Tiger'], - [7, 'Panther'], - [6, 'Jaguar'], - [5, 'Puma'] -]); - -const macosRelease = release => { - release = Number((release || os.release()).split('.')[0]); - return { - name: nameMap.get(release), - version: '10.' + (release - 4) - }; -}; - -module.exports = macosRelease; -// TODO: remove this in the next major version -module.exports.default = macosRelease; diff --git a/node_modules/macos-release/license b/node_modules/macos-release/license deleted file mode 100644 index e7af2f771..000000000 --- a/node_modules/macos-release/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/macos-release/package.json b/node_modules/macos-release/package.json deleted file mode 100644 index 9a86cc097..000000000 --- a/node_modules/macos-release/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_args": [ - [ - "macos-release@2.3.0", - "/Users/dougtangren/code/rust/action-gh-release" - ] - ], - "_from": "macos-release@2.3.0", - "_id": "macos-release@2.3.0", - "_inBundle": false, - "_integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==", - "_location": "/macos-release", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "macos-release@2.3.0", - "name": "macos-release", - "escapedName": "macos-release", - "rawSpec": "2.3.0", - "saveSpec": null, - "fetchSpec": "2.3.0" - }, - "_requiredBy": [ - "/os-name" - ], - "_resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz", - "_spec": "2.3.0", - "_where": "/Users/dougtangren/code/rust/action-gh-release", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/macos-release/issues" - }, - "description": "Get the name and version of a macOS release from the Darwin version", - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/macos-release#readme", - "keywords": [ - "macos", - "os", - "darwin", - "operating", - "system", - "platform", - "name", - "title", - "release", - "version" - ], - "license": "MIT", - "name": "macos-release", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/macos-release.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "2.3.0" -} diff --git a/node_modules/macos-release/readme.md b/node_modules/macos-release/readme.md deleted file mode 100644 index 2e7b9076b..000000000 --- a/node_modules/macos-release/readme.md +++ /dev/null @@ -1,57 +0,0 @@ -# macos-release [![Build Status](https://travis-ci.org/sindresorhus/macos-release.svg?branch=master)](https://travis-ci.org/sindresorhus/macos-release) - -> Get the name and version of a macOS release from the Darwin version
-> Example: `13.2.0` → `{name: 'Mavericks', version: '10.9'}` - - -## Install - -``` -$ npm install macos-release -``` - - -## Usage - -```js -const os = require('os'); -const macosRelease = require('macos-release'); - -// On a macOS Sierra system - -macosRelease(); -//=> {name: 'Sierra', version: '10.12'} - -os.release(); -//=> 13.2.0 -// This is the Darwin kernel version - -macosRelease(os.release()); -//=> {name: 'Sierra', version: '10.12'} - -macosRelease('14.0.0'); -//=> {name: 'Yosemite', version: '10.10'} -``` - - -## API - -### macosRelease([release]) - -#### release - -Type: `string` - -By default, the current operating system is used, but you can supply a custom [Darwin kernel version](http://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](http://nodejs.org/api/os.html#os_os_release). - - -## Related - -- [os-name](https://github.com/sindresorhus/os-name) - Get the name of the current operating system. Example: `macOS Sierra` -- [macos-version](https://github.com/sindresorhus/macos-version) - Get the macOS version of the current system. Example: `10.9.3` -- [win-release](https://github.com/sindresorhus/win-release) - Get the name of a Windows version from the release number: `5.1.2600` → `XP` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/mime/.eslintrc.json b/node_modules/mime/.eslintrc.json deleted file mode 100644 index 845527f84..000000000 --- a/node_modules/mime/.eslintrc.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "root": true, - "parserOptions": { - "ecmaVersion": 6 - }, - "env": { - "browser": true, - "commonjs": true, - "node": true, - "mocha": true - }, - "extends": ["eslint:recommended"], - "rules": { - "array-bracket-spacing": ["warn", "never"], - "arrow-body-style": ["warn", "as-needed"], - "arrow-parens": ["warn", "as-needed"], - "arrow-spacing": "warn", - "brace-style": ["warn", "1tbs"], - "camelcase": "warn", - "comma-spacing": ["warn", {"after": true}], - "dot-notation": "warn", - "eqeqeq": ["warn", "smart"], - "indent": ["warn", 2, { - "SwitchCase": 1, - "FunctionDeclaration": {"parameters": 1}, - "MemberExpression": 1, - "CallExpression": {"arguments": 1} - }], - "key-spacing": ["warn", {"beforeColon": false, "afterColon": true, "mode": "minimum"}], - "keyword-spacing": "warn", - "no-console": "off", - "no-empty": "off", - "no-multi-spaces": "warn", - "no-redeclare": "off", - "no-restricted-globals": ["warn", "Promise"], - "no-trailing-spaces": "warn", - "no-undef": "error", - "no-unused-vars": ["warn", {"args": "none"}], - "one-var": ["warn", "never"], - "padded-blocks": ["warn", "never"], - "object-curly-spacing": ["warn", "never"], - "quotes": ["warn", "single"], - "react/prop-types": "off", - "react/jsx-no-bind": "off", - "semi": ["warn", "always"], - "space-before-blocks": ["warn", "always"], - "space-before-function-paren": ["warn", "never"], - "space-in-parens": ["warn", "never"], - "strict": ["warn", "global"] - } -} diff --git a/node_modules/mime/.github/ISSUE_TEMPLATE.md b/node_modules/mime/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 53bf23e31..000000000 --- a/node_modules/mime/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,6 +0,0 @@ -### If you have an issue with a specific extension or type - -Locate the definition for your extension/type in the [db.json file](https://github.com/jshttp/mime-db/blob/master/db.json) in the `mime-db` project. Does it look right? - -- [ ] No. [File a `mime-db` issue](https://github.com/jshttp/mime-db/issues/new). -- [ ] Yes: Go ahead and submit your issue/PR here and I'll look into it. diff --git a/node_modules/mime/.github/PULL_REQUEST_TEMPLATE.md b/node_modules/mime/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 53bf23e31..000000000 --- a/node_modules/mime/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,6 +0,0 @@ -### If you have an issue with a specific extension or type - -Locate the definition for your extension/type in the [db.json file](https://github.com/jshttp/mime-db/blob/master/db.json) in the `mime-db` project. Does it look right? - -- [ ] No. [File a `mime-db` issue](https://github.com/jshttp/mime-db/issues/new). -- [ ] Yes: Go ahead and submit your issue/PR here and I'll look into it. diff --git a/node_modules/mime/.travis.yml b/node_modules/mime/.travis.yml deleted file mode 100644 index 045b41b1e..000000000 --- a/node_modules/mime/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "6" - - "8" - - "10" diff --git a/node_modules/mime/CHANGELOG.md b/node_modules/mime/CHANGELOG.md deleted file mode 100644 index ba9cd97c8..000000000 --- a/node_modules/mime/CHANGELOG.md +++ /dev/null @@ -1,262 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [2.4.4](https://github.com/broofa/node-mime/compare/v2.4.3...v2.4.4) (2019-06-07) - - - -## [2.4.3](https://github.com/broofa/node-mime/compare/v2.4.2...v2.4.3) (2019-05-15) - - - -## [2.4.2](https://github.com/broofa/node-mime/compare/v2.4.1...v2.4.2) (2019-04-07) - - -### Bug Fixes - -* don't use arrow function introduced in 2.4.1 ([2e00b5c](https://github.com/broofa/node-mime/commit/2e00b5c)) - - - -## [2.4.1](https://github.com/broofa/node-mime/compare/v2.4.0...v2.4.1) (2019-04-03) - - -### Bug Fixes - -* update MDN and mime-db types ([3e567a9](https://github.com/broofa/node-mime/commit/3e567a9)) - - - - -# [2.4.0](https://github.com/broofa/node-mime/compare/v2.3.1...v2.4.0) (2018-11-26) - - -### Features - -* Bind exported methods ([9d2a7b8](https://github.com/broofa/node-mime/commit/9d2a7b8)) -* update to mime-db@1.37.0 ([49e6e41](https://github.com/broofa/node-mime/commit/49e6e41)) - - - - -## [2.3.1](https://github.com/broofa/node-mime/compare/v2.3.0...v2.3.1) (2018-04-11) - - -### Bug Fixes - -* fix [#198](https://github.com/broofa/node-mime/issues/198) ([25ca180](https://github.com/broofa/node-mime/commit/25ca180)) - - - - -# [2.3.0](https://github.com/broofa/node-mime/compare/v2.2.2...v2.3.0) (2018-04-11) - - -### Bug Fixes - -* fix [#192](https://github.com/broofa/node-mime/issues/192) ([5c35df6](https://github.com/broofa/node-mime/commit/5c35df6)) - - -### Features - -* add travis-ci testing ([d64160f](https://github.com/broofa/node-mime/commit/d64160f)) - - - - -## [2.2.2](https://github.com/broofa/node-mime/compare/v2.2.1...v2.2.2) (2018-03-30) - - -### Bug Fixes - -* update types files to mime-db@1.32.0 ([85aac16](https://github.com/broofa/node-mime/commit/85aac16)) - - - - -## [2.2.1](https://github.com/broofa/node-mime/compare/v2.2.0...v2.2.1) (2018-03-30) - - -### Bug Fixes - -* Retain type->extension mappings for non-default types. Fixes [#180](https://github.com/broofa/node-mime/issues/180) ([b5c83fb](https://github.com/broofa/node-mime/commit/b5c83fb)) - - - - -# [2.2.0](https://github.com/broofa/node-mime/compare/v2.1.0...v2.2.0) (2018-01-04) - - -### Features - -* Retain type->extension mappings for non-default types. Fixes [#180](https://github.com/broofa/node-mime/issues/180) ([10f82ac](https://github.com/broofa/node-mime/commit/10f82ac)) - - - - -# [2.1.0](https://github.com/broofa/node-mime/compare/v2.0.5...v2.1.0) (2017-12-22) - - -### Features - -* Upgrade to mime-db@1.32.0. Fixes [#185](https://github.com/broofa/node-mime/issues/185) ([3f775ba](https://github.com/broofa/node-mime/commit/3f775ba)) - - - - -## [2.0.5](https://github.com/broofa/node-mime/compare/v2.0.1...v2.0.5) (2017-12-22) - - -### Bug Fixes - -* ES5 support (back to node v0.4) ([f14ccb6](https://github.com/broofa/node-mime/commit/f14ccb6)) - - - -# Changelog - -## v2.0.4 (24/11/2017) -- [**closed**] Switch to mime-score module for resolving extension contention issues. [#182](https://github.com/broofa/node-mime/issues/182) -- [**closed**] Update mime-db to 1.31.0 in v1.x branch [#181](https://github.com/broofa/node-mime/issues/181) - ---- - -## v1.5.0 (22/11/2017) -- [**closed**] need ES5 version ready in npm package [#179](https://github.com/broofa/node-mime/issues/179) -- [**closed**] mime-db no trace of iWork - pages / numbers / etc. [#178](https://github.com/broofa/node-mime/issues/178) -- [**closed**] How it works in brownser ? [#176](https://github.com/broofa/node-mime/issues/176) -- [**closed**] Missing `./Mime` [#175](https://github.com/broofa/node-mime/issues/175) -- [**closed**] Vulnerable Regular Expression [#167](https://github.com/broofa/node-mime/issues/167) - ---- - -## v2.0.3 (25/09/2017) -*No changelog for this release.* - ---- - -## v1.4.1 (25/09/2017) -- [**closed**] Issue when bundling with webpack [#172](https://github.com/broofa/node-mime/issues/172) - ---- - -## v2.0.2 (15/09/2017) -- [**V2**] fs.readFileSync is not a function [#165](https://github.com/broofa/node-mime/issues/165) -- [**closed**] The extension for video/quicktime should map to .mov, not .qt [#164](https://github.com/broofa/node-mime/issues/164) -- [**V2**] [v2 Feedback request] Mime class API [#163](https://github.com/broofa/node-mime/issues/163) -- [**V2**] [v2 Feedback request] Resolving conflicts over extensions [#162](https://github.com/broofa/node-mime/issues/162) -- [**V2**] Allow callers to load module with official, full, or no defined types. [#161](https://github.com/broofa/node-mime/issues/161) -- [**V2**] Use "facets" to resolve extension conflicts [#160](https://github.com/broofa/node-mime/issues/160) -- [**V2**] Remove fs and path dependencies [#152](https://github.com/broofa/node-mime/issues/152) -- [**V2**] Default content-type should not be application/octet-stream [#139](https://github.com/broofa/node-mime/issues/139) -- [**V2**] reset mime-types [#124](https://github.com/broofa/node-mime/issues/124) -- [**V2**] Extensionless paths should return null or false [#113](https://github.com/broofa/node-mime/issues/113) - ---- - -## v2.0.1 (14/09/2017) -- [**closed**] Changelog for v2.0 does not mention breaking changes [#171](https://github.com/broofa/node-mime/issues/171) -- [**closed**] MIME breaking with 'class' declaration as it is without 'use strict mode' [#170](https://github.com/broofa/node-mime/issues/170) - ---- - -## v2.0.0 (12/09/2017) -- [**closed**] woff and woff2 [#168](https://github.com/broofa/node-mime/issues/168) - ---- - -## v1.4.0 (28/08/2017) -- [**closed**] support for ac3 voc files [#159](https://github.com/broofa/node-mime/issues/159) -- [**closed**] Help understanding change from application/xml to text/xml [#158](https://github.com/broofa/node-mime/issues/158) -- [**closed**] no longer able to override mimetype [#157](https://github.com/broofa/node-mime/issues/157) -- [**closed**] application/vnd.adobe.photoshop [#147](https://github.com/broofa/node-mime/issues/147) -- [**closed**] Directories should appear as something other than application/octet-stream [#135](https://github.com/broofa/node-mime/issues/135) -- [**closed**] requested features [#131](https://github.com/broofa/node-mime/issues/131) -- [**closed**] Make types.json loading optional? [#129](https://github.com/broofa/node-mime/issues/129) -- [**closed**] Cannot find module './types.json' [#120](https://github.com/broofa/node-mime/issues/120) -- [**V2**] .wav files show up as "audio/x-wav" instead of "audio/x-wave" [#118](https://github.com/broofa/node-mime/issues/118) -- [**closed**] Don't be a pain in the ass for node community [#108](https://github.com/broofa/node-mime/issues/108) -- [**closed**] don't make default_type global [#78](https://github.com/broofa/node-mime/issues/78) -- [**closed**] mime.extension() fails if the content-type is parameterized [#74](https://github.com/broofa/node-mime/issues/74) - ---- - -## v1.3.6 (11/05/2017) -- [**closed**] .md should be text/markdown as of March 2016 [#154](https://github.com/broofa/node-mime/issues/154) -- [**closed**] Error while installing mime [#153](https://github.com/broofa/node-mime/issues/153) -- [**closed**] application/manifest+json [#149](https://github.com/broofa/node-mime/issues/149) -- [**closed**] Dynamic adaptive streaming over HTTP (DASH) file extension typo [#141](https://github.com/broofa/node-mime/issues/141) -- [**closed**] charsets image/png undefined [#140](https://github.com/broofa/node-mime/issues/140) -- [**closed**] Mime-db dependency out of date [#130](https://github.com/broofa/node-mime/issues/130) -- [**closed**] how to support plist? [#126](https://github.com/broofa/node-mime/issues/126) -- [**closed**] how does .types file format look like? [#123](https://github.com/broofa/node-mime/issues/123) -- [**closed**] Feature: support for expanding MIME patterns [#121](https://github.com/broofa/node-mime/issues/121) -- [**closed**] DEBUG_MIME doesn't work [#117](https://github.com/broofa/node-mime/issues/117) - ---- - -## v1.3.4 (06/02/2015) -*No changelog for this release.* - ---- - -## v1.3.3 (06/02/2015) -*No changelog for this release.* - ---- - -## v1.3.1 (05/02/2015) -- [**closed**] Consider adding support for Handlebars .hbs file ending [#111](https://github.com/broofa/node-mime/issues/111) -- [**closed**] Consider adding support for hjson. [#110](https://github.com/broofa/node-mime/issues/110) -- [**closed**] Add mime type for Opus audio files [#94](https://github.com/broofa/node-mime/issues/94) -- [**closed**] Consider making the `Requesting New Types` information more visible [#77](https://github.com/broofa/node-mime/issues/77) - ---- - -## v1.3.0 (05/02/2015) -- [**closed**] Add common name? [#114](https://github.com/broofa/node-mime/issues/114) -- [**closed**] application/x-yaml [#104](https://github.com/broofa/node-mime/issues/104) -- [**closed**] Add mime type for WOFF file format 2.0 [#102](https://github.com/broofa/node-mime/issues/102) -- [**closed**] application/x-msi for .msi [#99](https://github.com/broofa/node-mime/issues/99) -- [**closed**] Add mimetype for gettext translation files [#98](https://github.com/broofa/node-mime/issues/98) -- [**closed**] collaborators [#88](https://github.com/broofa/node-mime/issues/88) -- [**closed**] getting errot in installation of mime module...any1 can help? [#87](https://github.com/broofa/node-mime/issues/87) -- [**closed**] should application/json's charset be utf8? [#86](https://github.com/broofa/node-mime/issues/86) -- [**closed**] Add "license" and "licenses" to package.json [#81](https://github.com/broofa/node-mime/issues/81) -- [**closed**] lookup with extension-less file on Windows returns wrong type [#68](https://github.com/broofa/node-mime/issues/68) - ---- - -## v1.2.11 (15/08/2013) -- [**closed**] Update mime.types [#65](https://github.com/broofa/node-mime/issues/65) -- [**closed**] Publish a new version [#63](https://github.com/broofa/node-mime/issues/63) -- [**closed**] README should state upfront that "application/octet-stream" is default for unknown extension [#55](https://github.com/broofa/node-mime/issues/55) -- [**closed**] Suggested improvement to the charset API [#52](https://github.com/broofa/node-mime/issues/52) - ---- - -## v1.2.10 (25/07/2013) -- [**closed**] Mime type for woff files should be application/font-woff and not application/x-font-woff [#62](https://github.com/broofa/node-mime/issues/62) -- [**closed**] node.types in conflict with mime.types [#51](https://github.com/broofa/node-mime/issues/51) - ---- - -## v1.2.9 (17/01/2013) -- [**closed**] Please update "mime" NPM [#49](https://github.com/broofa/node-mime/issues/49) -- [**closed**] Please add semicolon [#46](https://github.com/broofa/node-mime/issues/46) -- [**closed**] parse full mime types [#43](https://github.com/broofa/node-mime/issues/43) - ---- - -## v1.2.8 (10/01/2013) -- [**closed**] /js directory mime is application/javascript. Is it correct? [#47](https://github.com/broofa/node-mime/issues/47) -- [**closed**] Add mime types for lua code. [#45](https://github.com/broofa/node-mime/issues/45) - ---- - -## v1.2.7 (19/10/2012) -- [**closed**] cannot install 1.2.7 via npm [#41](https://github.com/broofa/node-mime/issues/41) -- [**closed**] Transfer ownership to @broofa [#36](https://github.com/broofa/node-mime/issues/36) -- [**closed**] it's wrong to set charset to UTF-8 for text [#30](https://github.com/broofa/node-mime/issues/30) -- [**closed**] Allow multiple instances of MIME types container [#27](https://github.com/broofa/node-mime/issues/27) diff --git a/node_modules/mime/CONTRIBUTING.md b/node_modules/mime/CONTRIBUTING.md deleted file mode 100644 index dd5c86a41..000000000 --- a/node_modules/mime/CONTRIBUTING.md +++ /dev/null @@ -1,5 +0,0 @@ -1. Commit messages should have a [Conventional Commit](https://conventionalcommits.org/) prefix. -2. If you're editing the `types/*` files, just stop. These are auto-generated from [mime-db](https://github.com/jshttp/mime-db). Go talk to those folks. -3. README edits should be made to [src/README_md.js](src/README_md.js). - -Thanks for helping out with this project. You rock! diff --git a/node_modules/mime/LICENSE b/node_modules/mime/LICENSE deleted file mode 100644 index d3f46f7e1..000000000 --- a/node_modules/mime/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/mime/Mime.js b/node_modules/mime/Mime.js deleted file mode 100644 index 7fe39211f..000000000 --- a/node_modules/mime/Mime.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict'; - -/** - * @param typeMap [Object] Map of MIME type -> Array[extensions] - * @param ... - */ -function Mime() { - this._types = Object.create(null); - this._extensions = Object.create(null); - - for (var i = 0; i < arguments.length; i++) { - this.define(arguments[i]); - } - - this.define = this.define.bind(this); - this.getType = this.getType.bind(this); - this.getExtension = this.getExtension.bind(this); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * If a type declares an extension that has already been defined, an error will - * be thrown. To suppress this error and force the extension to be associated - * with the new type, pass `force`=true. Alternatively, you may prefix the - * extension with "*" to map the type to extension, without mapping the - * extension to the type. - * - * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']}); - * - * - * @param map (Object) type definitions - * @param force (Boolean) if true, force overriding of existing definitions - */ -Mime.prototype.define = function(typeMap, force) { - for (var type in typeMap) { - var extensions = typeMap[type].map(function(t) {return t.toLowerCase()}); - type = type.toLowerCase(); - - for (var i = 0; i < extensions.length; i++) { - var ext = extensions[i]; - - // '*' prefix = not the preferred type for this extension. So fixup the - // extension, and skip it. - if (ext[0] == '*') { - continue; - } - - if (!force && (ext in this._types)) { - throw new Error( - 'Attempt to change mapping for "' + ext + - '" extension from "' + this._types[ext] + '" to "' + type + - '". Pass `force=true` to allow this, otherwise remove "' + ext + - '" from the list of extensions for "' + type + '".' - ); - } - - this._types[ext] = type; - } - - // Use first extension as default - if (force || !this._extensions[type]) { - var ext = extensions[0]; - this._extensions[type] = (ext[0] != '*') ? ext : ext.substr(1) - } - } -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.getType = function(path) { - path = String(path); - var last = path.replace(/^.*[/\\]/, '').toLowerCase(); - var ext = last.replace(/^.*\./, '').toLowerCase(); - - var hasPath = last.length < path.length; - var hasDot = ext.length < last.length - 1; - - return (hasDot || !hasPath) && this._types[ext] || null; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.getExtension = function(type) { - type = /^\s*([^;\s]*)/.test(type) && RegExp.$1; - return type && this._extensions[type.toLowerCase()] || null; -}; - -module.exports = Mime; diff --git a/node_modules/mime/README.md b/node_modules/mime/README.md deleted file mode 100644 index 37bd2b8e5..000000000 --- a/node_modules/mime/README.md +++ /dev/null @@ -1,193 +0,0 @@ - -# Mime - -A comprehensive, compact MIME type module. - -[![Build Status](https://travis-ci.org/broofa/node-mime.svg?branch=master)](https://travis-ci.org/broofa/node-mime) - -## Version 2 Notes - -Version 2 is a breaking change from 1.x as the semver implies. Specifically: - -* `lookup()` renamed to `getType()` -* `extension()` renamed to `getExtension()` -* `charset()` and `load()` methods have been removed - -If you prefer the legacy version of this module please `npm install mime@^1`. Version 1 docs may be found [here](https://github.com/broofa/node-mime/tree/v1.4.0). - -## Install - -### NPM -``` -npm install mime -``` - -### Browser - -It is recommended that you use a bundler such as -[webpack](https://webpack.github.io/) or [browserify](http://browserify.org/) to -package your code. However, browser-ready versions are available via wzrd.in. -E.g. For the full version: - - - - - -