diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..8e894c75 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,47 @@ +codecov: + require_ci_to_pass: yes + +coverage: + status: + src: + target: auto + threshold: 7% + base: auto + if_ci_failed: success + paths: + - src/ + - '!src/tests/' + flags: + - src + test: + target: 60% + threshold: 10% + if_ci_failed: error + base: auto + paths: + - src/tests/ + flags: + - test + precision: 2 + round: down + range: "70...100" +flags: + src: + paths: + - src + - '!src/tests/' + test: + paths: + - src/tests/ +parsers: + gcov: + branch_detection: + conditional: yes + loop: yes + method: no + macro: no + +comment: + layout: "reach,diff,flags,tree" + behavior: default + require_changes: no \ No newline at end of file diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 21869472..00000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -dist/ -lib/ -node_modules/ \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 032ac6c0..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "plugins": [ - "jest", - "@typescript-eslint" - ], - "extends": [ - "plugin:github/es6" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 9, - "sourceType": "module", - "project": "./tsconfig.json" - }, - "rules": { - "eslint-comments/no-use": "off", - "import/no-namespace": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/explicit-member-accessibility": [ - "error", - { - "accessibility": "no-public" - } - ], - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/array-type": "error", - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-ignore": "error", - "camelcase": "off", - "no-console": "off", - "@typescript-eslint/camelcase": "off", - "@typescript-eslint/class-name-casing": "error", - "@typescript-eslint/explicit-function-return-type": [ - "error", - { - "allowExpressions": true - } - ], - "@typescript-eslint/func-call-spacing": [ - "error", - "never" - ], - "@typescript-eslint/generic-type-naming": [ - "error", - "^[A-Z][A-Za-z]*$" - ], - "@typescript-eslint/no-array-constructor": "error", - "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-extraneous-class": "error", - "@typescript-eslint/no-for-in-array": "error", - "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-non-null-assertion": "warn", - "@typescript-eslint/no-object-literal-type-assertion": "error", - "@typescript-eslint/no-unnecessary-qualifier": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-useless-constructor": "error", - "@typescript-eslint/no-var-requires": "error", - "@typescript-eslint/prefer-for-of": "warn", - "@typescript-eslint/prefer-function-type": "warn", - "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-interface": "error", - "@typescript-eslint/prefer-string-starts-ends-with": "error", - "@typescript-eslint/promise-function-async": "error", - "@typescript-eslint/require-array-sort-compare": "error", - "@typescript-eslint/restrict-plus-operands": "error", - "semi": "off", - "@typescript-eslint/semi": [ - "error", - "never" - ], - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/unbound-method": "error" - }, - "env": { - "node": true, - "es6": true, - "jest/globals": true - } -} \ No newline at end of file diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 00000000..b679e249 --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,71 @@ +plugins: + - '@typescript-eslint' + - eslint-comments + - promise + - unicorn +extends: + - airbnb-typescript + - plugin:@typescript-eslint/recommended + - plugin:eslint-comments/recommended + - plugin:promise/recommended + - plugin:unicorn/recommended + - prettier + - prettier/@typescript-eslint +settings: + import/parsers: + '@typescript-eslint/parser': + - .ts + - .tsx + - .js + import/resolver: + typescript: {} +rules: + unicorn/filename-case: off + react/static-property-placement: 0 + no-prototype-builtins: 0 + import/prefer-default-export: 0 + '@typescript-eslint/no-explicit-any': 0 + import/no-default-export: error + no-use-before-define: + - error + - + functions: false + classes: true + variables: true + '@typescript-eslint/explicit-function-return-type': + - error + - + allowExpressions: true + allowTypedFunctionExpressions: true + '@typescript-eslint/no-use-before-define': + - error + - + functions: false + classes: true + variables: true + typedefs: true + '@typescript-eslint/indent': + - 2 + - 2 + unicorn/prevent-abbreviations: 0 + import/no-extraneous-dependencies: [error, {devDependencies: ['**/*.ts']}] +parser: "@typescript-eslint/parser" +parserOptions: + project: ./tsconfig.json + ecmaVersion: 2019 + sourceType: module +env: + node: true + browser: true +overrides: + - files: ['src/tests/**/*'] + plugins: + - jest + extends: + - plugin:jest/recommended + rules: + global-require: 0 + '@typescript-eslint/no-var-requires': 0 + no-console: 0 + '@typescript-eslint/no-unused-vars': 0 + '@typescript-eslint/no-throw-literal': 0 \ No newline at end of file diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 5d11d8e8..f0ca9659 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -21,8 +21,8 @@ jobs: matrix: event_type: ['push', 'pull_request'] build: ['true', 'false'] - output: ['json', ',', ' ', '_
  _'] - fileOutput: ['json', ',', ' ', '_
  _'] + output: ['json', ',', ''' ''', '_
  _'] + fileOutput: ['json', ',', ''' ''', '_
  _'] # event_type: ['pull_request'] # build: ['true'] # output: ['json'] @@ -34,7 +34,7 @@ jobs: echo '${{toJSON(steps)}}' - uses: actions/checkout@v2 if: matrix.build - - run: make run + - run: yarn build if: matrix.build - uses: ./ id: file_changes_build_pr diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e2e26261..0c2bf84c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: make run + - run: yarn build - uses: actions/github-script@0.6.0 if: failure() && contains(env.isFork, 'false') with: @@ -41,8 +41,10 @@ jobs: needs: build steps: - uses: actions/checkout@v2 - - run: make run - - run: make run COMMAND=test + - run: yarn build + - run: yarn test-coverage + - run: bash <(curl -s https://codecov.io/bash) + if: contains(env.isFork, 'false') - uses: actions/github-script@0.6.0 if: failure() && contains(env.isFork, 'false') with: @@ -69,12 +71,13 @@ jobs: if: github.event.pull_request.head.repo.full_name != github.repository steps: - uses: actions/checkout@v2 + - run: yarn build - name: Lint and report uses: reviewdog/action-eslint@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} reporter: github-check - eslint_flags: 'src/**/*.ts' + eslint_flags: '--ext .ts ./' # lint code and comment back if possible lintdog: name: eslintdog (reviewdog) @@ -83,12 +86,13 @@ jobs: if: github.event.pull_request.head.repo.full_name == github.repository steps: - uses: actions/checkout@v2 + - run: yarn build - name: Lint and report uses: reviewdog/action-eslint@v1 with: github_token: ${{ secrets.TRILOM_BOT_TOKEN }} reporter: github-pr-review - eslint_flags: 'src/**/*.ts' + eslint_flags: '--ext .ts ./' - uses: actions/github-script@0.6.0 if: failure() with: @@ -125,15 +129,15 @@ jobs: token: ${{ secrets.TRILOM_BOT_TOKEN }} repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} - - run: make run - - run: make run COMMAND=format-check - - name: make run COMMAND=format and push code if check failed + - run: yarn build + - run: yarn format-check + - name: yarn format and push code if check failed if: failure() && github.actor != 'trilom-bot' && contains(env.isFork, 'false') env: GITHUB_TOKEN: ${{ secrets.TRILOM_BOT_TOKEN }} run: | - make run COMMAND=format - sudo make clean + yarn format + sudo yarn clean git config --local user.email "trilom-bot@trailmix.me" git config --local user.name "trilom-bot" git add -A diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f9443f31..56d8f88e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -122,14 +122,19 @@ jobs: run: | git config --local user.email "trilom-bot@trailmix.me" git config --local user.name "trilom-bot" - make run - make run COMMAND=release-pack - git add -A - git diff-index --quiet HEAD || git commit -m "Adding release changes ⚙️" -a - make run COMMAND=format + yarn build + yarn format git add -A git diff-index --quiet HEAD || git commit -m "Adding format changes 🤖" -a + yarn build-release + git add -A + git diff-index --quiet HEAD || git commit -m "Adding release changes ⚙️" -a git log --format='%aN <%aE>%n%cN <%cE>' | sort -u > AUTHORS + sed -i '/trilom-bot/d' AUTHORS + sed -i '/semantic-release-bot/d' AUTHORS + sed -i '/carnoco@gmail.com/d' AUTHORS + sed -i '/GitHub /d' AUTHORS + sed -i '/dependabot[bot]/d' AUTHORS echo -e "\r\n$(date)" >> AUTHORS git add -A git diff-index --quiet HEAD || git commit -m "Updating AUTHORS 📓" -a @@ -263,15 +268,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: make run + - run: yarn build # test with jest test: name: jest runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: make run - - run: make run COMMAND=test + - run: yarn build + - run: yarn test-coverage + - run: bash <(curl -s https://codecov.io/bash) # lint code and comment back if possible lintdog: name: eslintdog (reviewdog) diff --git a/.github/workflows/readme.md b/.github/workflows/readme.md index a2ff928a..6a81a8ca 100644 --- a/.github/workflows/readme.md +++ b/.github/workflows/readme.md @@ -43,29 +43,29 @@ - When any `opened`, `reopened`, or `synchronize` **Pull Request** type runs(**pr.yml**): - Assign it to trilom (**add-reviews**) - - Build code with `make run` which runs `yarn` and `tsc` (**build**) + - Build code with `yarn build` which runs `yarn` and `tsc` (**build**) - Label with builds if passing and on inner workspace - - Test code with `make run COMMAND=test` which runs `jest` (**test**) + - Test code with `yarn test-coverage` which runs `jest` (**test**) - Label with tested if passing and on inner workspace - Test code with eslint reviewdog and report back if inner workspace (**lintdog**) - Label with pretty if passing and on inner workspace - - Check format of code with `make run COMMAND=format-check` which runs `prettier --check` (**format_check_push**) + - Check format of code with `yarn format-check` which runs `prettier --check` (**format_check_push**) - If: - Fork then pull **Pull Request** github.ref with GITHUB_TOKEN - Inner **Pull Request** then pull HEAD repo ref - - Build code with `make run` which runs `yarn` and `tsc` + - Build code with `yarn build` which runs `yarn` and `tsc` - If format-check succeeds and on inner workspace - Label with pretty - If format-check fails and on inner workspace and actor is not trilom-bot - - Run `make run COMMAND=format` which runs `prettier --write` - - Clean build files with `make clean` + - Run `yarn format` which runs `prettier --write` + - Clean build files with `yarn clean` - Commit the format changes as trilom-bot to **Pull Request** head ## Push - When any **Push** type runs to _master_, _next_, _alpha_, or _beta_(**push.yml**): - - Build code with `make run` which runs `yarn` and `tsc` (**build**) - - Test code with `make run COMMAND=test` which runs `jest` (**test**) + - Build code with `yarn build` which runs `yarn` and `tsc` (**build**) + - Test code with `yarn test-coverage` which runs `jest` (**test**) - Test code with eslint reviewdog and report back with github checks(**lintdog**) - When any **Push** type runs to _master_, _next_, _alpha_, or _beta_ with a head_commit message **NOT** containing 'trilom/v1.' or 'trilom/v2.': - Build **dist/\*\*.js** files, update **AUTHORS**, format **src/\*\*.ts** files and commit. diff --git a/.gitignore b/.gitignore index 43cc42c8..ca18ad1c 100644 --- a/.gitignore +++ b/.gitignore @@ -46,8 +46,8 @@ build/Release # Dependency directories jspm_packages/ -# TypeScript v1 declaration files -typings/ +# # TypeScript v1 declaration files +# typings/ # TypeScript cache *.tsbuildinfo diff --git a/.prettierignore b/.prettierignore index 21869472..246d599d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,2 @@ -dist/ -lib/ -node_modules/ \ No newline at end of file +/dist +/node_modules \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index bbf43114..00000000 --- a/.prettierrc.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "semi": false, - "singleQuote": true, - "trailingComma": "none", - "bracketSpacing": false, - "arrowParens": "avoid", - "parser": "typescript" - } \ No newline at end of file diff --git a/.prettierrc.yml b/.prettierrc.yml new file mode 100644 index 00000000..259237d1 --- /dev/null +++ b/.prettierrc.yml @@ -0,0 +1,9 @@ +printWidth: 80 +tabWidth: 2 +useTabs: false +semi: false +singleQuote: true +trailingComma: none +bracketSpacing: false +arrowParens: avoid +parser: typescript diff --git a/.releaserc.yml b/.releaserc.yml new file mode 100644 index 00000000..e91c961f --- /dev/null +++ b/.releaserc.yml @@ -0,0 +1,49 @@ +branches: + - "+([1-9])?(.{+([1-9]),x}).x" + - master + - next + - name: alpha + prerelease: true + - name: beta + prerelease: true +dryRun: false +plugins: + - "@semantic-release/commit-analyzer" + - "@semantic-release/release-notes-generator" + - + - semantic-release-slack-bot + - notifyOnSuccess: true + notifyOnFail: true + markdownReleaseNotes: true + onSuccessTemplate: + text: "$package_name version v$npm_package_version!\n\n$release_notes" + - + - "@semantic-release/changelog" + - changelogFile: CHANGELOG.md + - "@semantic-release/npm" + - + - "@semantic-release/github" + - assets: + - path: "dist/**/*.js" + label: Packaged JS Code + successComment: | + 🎉🦍🎉 This + <%= issue.pull_request ? 'pull request' : 'issue' %> + has been resolved in version <%= nextRelease.version %> at + `trilom/file-changes-action@<%= nextRelease.gitTag %>`\n\n + `- name: File Changes Action\n\tuses: trilom/file-changes-action@<%= nextRelease.gitTag %> + `\n\n ## Release<%= _.size(releases) > 1 ? 's' : '' %> + <% _.forEach(releases, function(release) { %> + \n\t\t**Release Name:** [<%= release.name %>](<%= release.url %>)<% }); %> + \n\n ## Commits<% _.forEach(commits, function(commit) { %> + \n\t\t@<%= commit.author %> - [_<%= commit.message %>_](https://github.com/trilom/file-changes-action/commit/<%= commit.hash %>)<% }); %>" + labels: [failure] + releasedLabels: ["releases/${nextRelease.gitTag}"] + assignees: trilom + - + - "@semantic-release/git" + - assets: [CHANGELOG.md, package.json, yarn.lock] + message: | + chore(release): 🎉🦍🎉 Release <%= nextRelease.version %> - + <%= new Date().toLocaleDateString('en-US', {year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' }) %> + [skip ci]\n\n`- name: File Changes Action\n\tuses: trilom/file-changes-action@<%= nextRelease.gitTag %>`\n\n<%= nextRelease.notes %>" \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index 886c2f23..00000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -SHELL:=/bin/bash -MKFILEPATH:=$(shell pwd) -DOCKER:=node:12@sha256:454651174f54836571258a329788574cf6552bddfd1a7113e769bd9fc3776fe6 -ifdef COMMAND -CMD:=$(COMMAND) -endif -ifndef COMMAND -CMD:=build -endif - -clean: - rm -rf lib node_modules - -run: - docker run \ - --mount type=bind,source="$(MKFILEPATH)",target=/code \ - $(DOCKER) \ - /bin/sh -c 'cd /code && make .yarn COMMAND=$(CMD)' - -.yarn: - yarn $(CMD) diff --git a/README.md b/README.md index 6e5ecd1d..c6591a2a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # file-changes-action +[![codecov](https://codecov.io/gh/trilom/file-changes-action/branch/master/graph/badge.svg)](https://codecov.io/gh/trilom/file-changes-action) +[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) +![Integration Tests](https://github.com/trilom/file-changes-action/workflows/Integration%20Tests/badge.svg) + This action will take the information from the Push/Pull Request and output some variables and write files that will let you know what was changed, removed, or added. ## Inputs @@ -191,24 +195,4 @@ jobs: - name: test run: | cat $HOME/files.txt -``` - -```bash -# install project dependencies (including devDependencies) -yarn -# build the project (dist files) -yarn build -# build and lint - -# run prettier (this will make your ugly code pretty) -yarn format -# dry-run prettier (this will tell you if your ugly code needs to be made pretty) -yarn format-check -# lint project -yarn lint -# test -yarn jest - -# clean duh -yarn clean ``` \ No newline at end of file diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts deleted file mode 100644 index efcf95e4..00000000 --- a/__tests__/main.test.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {wait} from '../src/wait' -import * as process from 'process' -import * as cp from 'child_process' -import * as path from 'path' - -test('throws invalid number', async () => { - const input = parseInt('foo', 10) - await expect(wait(input)).rejects.toThrow('milliseconds not a number') -}) - -test('wait 500 ms', async () => { - const start = new Date() - await wait(500) - const end = new Date() - var delta = Math.abs(end.getTime() - start.getTime()) - expect(delta).toBeGreaterThan(450) -}) - -// shows how the runner will run a javascript action with env / stdout protocol -test('test runs', () => { - process.env['INPUT_MILLISECONDS'] = '500' - const ip = path.join(__dirname, '..', 'lib', 'main.js') - const options: cp.ExecSyncOptions = { - env: process.env - } - console.log(cp.execSync(`node ${ip}`, options).toString()) -}) diff --git a/action.yml b/action.yml index 13a2d50f..f041e4e8 100644 --- a/action.yml +++ b/action.yml @@ -4,32 +4,26 @@ author: 'Bryan Killian ' inputs: githubRepo: description: 'The github repository you want to compare changes from, defaults to the github.repository.' - default: ${{ format('{0}{1}', github.repository, '') }} - required: true + required: false githubToken: description: 'The github action token will be used by default, if you want to use something different than you can pass it in here.' default: ${{ github.token }} required: true pushBefore: description: 'Pass in a specific sha to compare to as a before, required if using pushAfter. (push BASE payload after github.payload.before)' - default: ${{ format('{0}{1}', github.payload.before, '') }} required: false pushAfter: description: 'Pass in a specific sha to compare to as an after, required if using pushBefore. (push HEAD payload after github.payload.after)' - default: ${{ format('{0}{1}', github.payload.after, '') }} required: false prNumber: description: 'Pass in a specific PR number to get file changes from.' - default: ${{ format('{0}{1}', github.event.pull_request.number, '') }} required: false output: description: 'Choose between json (default), or custom delimiter by passing a string, for example '','' for csv variable output' - required: true - default: json + required: false fileOutput: description: 'Choose between json (default), or custom delimiter by passing a string, for example '','' for csv file output. If you set as json the file output will be suffixed with .json, if you select '','' then the output will be .csv, else .txt will be the output.' - required: true - default: json + required: false outputs: files: description: 'The names all new, updated, and deleted files' diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 22653cf9..00000000 --- a/dist/index.js +++ /dev/null @@ -1,11354 +0,0 @@ -module.exports = -/******/ (function(modules, runtime) { // webpackBootstrap -/******/ "use strict"; -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ __webpack_require__.ab = __dirname + "/"; -/******/ -/******/ // the startup function -/******/ function startup() { -/******/ // Load entry module and return exports -/******/ return __webpack_require__(198); -/******/ }; -/******/ -/******/ // run startup -/******/ return startup(); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, __unusedexports, __webpack_require__) { - -const Octokit = __webpack_require__(529); - -const CORE_PLUGINS = [ - __webpack_require__(372), - __webpack_require__(19), // deprecated: remove in v17 - __webpack_require__(190), - __webpack_require__(148), - __webpack_require__(248), - __webpack_require__(586), - __webpack_require__(430), - - __webpack_require__(850) // deprecated: remove in v17 -]; - -module.exports = Octokit.plugin(CORE_PLUGINS); - - -/***/ }), - -/***/ 2: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -const os = __webpack_require__(87); -const macosRelease = __webpack_require__(118); -const winRelease = __webpack_require__(49); - -const osName = (platform, release) => { - if (!platform && release) { - throw new Error('You can\'t specify a `release` without specifying `platform`'); - } - - platform = platform || os.platform(); - - let id; - - if (platform === 'darwin') { - if (!release && os.platform() === 'darwin') { - release = os.release(); - } - - const prefix = release ? (Number(release.split('.')[0]) > 15 ? 'macOS' : 'OS X') : 'macOS'; - id = release ? macosRelease(release).name : ''; - return prefix + (id ? ' ' + id : ''); - } - - if (platform === 'linux') { - if (!release && os.platform() === 'linux') { - release = os.release(); - } - - id = release ? release.replace(/^(\d+\.\d+).*/, '$1') : ''; - return 'Linux' + (id ? ' ' + id : ''); - } - - if (platform === 'win32') { - if (!release && os.platform() === 'win32') { - release = os.release(); - } - - id = release ? winRelease(release) : ''; - return 'Windows' + (id ? ' ' + id : ''); - } - - return platform; -}; - -module.exports = osName; - - -/***/ }), - -/***/ 8: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = iterator; - -const normalizePaginatedListResponse = __webpack_require__(301); - -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 }; - }); - } - }) - }; -} - - -/***/ }), - -/***/ 9: -/***/ (function(module, __unusedexports, __webpack_require__) { - -var once = __webpack_require__(969); - -var noop = function() {}; - -var isRequest = function(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -}; - -var isChildProcess = function(stream) { - return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 -}; - -var eos = function(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - - callback = once(callback || noop); - - var ws = stream._writableState; - var rs = stream._readableState; - var readable = opts.readable || (opts.readable !== false && stream.readable); - var writable = opts.writable || (opts.writable !== false && stream.writable); - var cancelled = false; - - var onlegacyfinish = function() { - if (!stream.writable) onfinish(); - }; - - var onfinish = function() { - writable = false; - if (!readable) callback.call(stream); - }; - - var onend = function() { - readable = false; - if (!writable) callback.call(stream); - }; - - var onexit = function(exitCode) { - callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); - }; - - var onerror = function(err) { - callback.call(stream, err); - }; - - var onclose = function() { - process.nextTick(onclosenexttick); - }; - - var onclosenexttick = function() { - if (cancelled) return; - if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); - }; - - var onrequest = function() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest(); - else stream.on('request', onrequest); - } else if (writable && !ws) { // 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() { - cancelled = true; - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -}; - -module.exports = eos; - - -/***/ }), - -/***/ 11: -/***/ (function(module) { - -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} - - -/***/ }), - -/***/ 18: -/***/ (function() { - -eval("require")("encoding"); - - -/***/ }), - -/***/ 19: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = authenticationPlugin; - -const { Deprecation } = __webpack_require__(692); -const once = __webpack_require__(969); - -const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)); - -const authenticate = __webpack_require__(674); -const beforeRequest = __webpack_require__(471); -const requestError = __webpack_require__(349); - -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)); -} - - -/***/ }), - -/***/ 20: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - - -const cp = __webpack_require__(129); -const parse = __webpack_require__(568); -const enoent = __webpack_require__(881); - -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; - - -/***/ }), - -/***/ 39: -/***/ (function(module) { - -"use strict"; - -module.exports = opts => { - opts = opts || {}; - - const env = opts.env || process.env; - const platform = opts.platform || process.platform; - - if (platform !== 'win32') { - return 'PATH'; - } - - return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; -}; - - -/***/ }), - -/***/ 47: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = factory; - -const Octokit = __webpack_require__(402); -const registerPlugin = __webpack_require__(855); - -function factory(plugins) { - const Api = Octokit.bind(null, plugins || []); - Api.plugin = registerPlugin.bind(null, plugins || []); - return Api; -} - - -/***/ }), - -/***/ 49: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -const os = __webpack_require__(87); -const execa = __webpack_require__(955); - -// Reference: https://www.gaijin.at/en/lstwinver.php -const names = new Map([ - ['10.0', '10'], - ['6.3', '8.1'], - ['6.2', '8'], - ['6.1', '7'], - ['6.0', 'Vista'], - ['5.2', 'Server 2003'], - ['5.1', 'XP'], - ['5.0', '2000'], - ['4.9', 'ME'], - ['4.1', '98'], - ['4.0', '95'] -]); - -const windowsRelease = release => { - const version = /\d+\.\d/.exec(release || os.release()); - - if (release && !version) { - throw new Error('`release` argument doesn\'t match `n.n`'); - } - - const ver = (version || [])[0]; - - // Server 2008, 2012 and 2016 versions are ambiguous with desktop versions and must be detected at runtime. - // If `release` is omitted or we're on a Windows system, and the version number is an ambiguous version - // then use `wmic` to get the OS caption: https://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx - // If the resulting caption contains the year 2008, 2012 or 2016, it is a server version, so return a server OS name. - if ((!release || release === os.release()) && ['6.1', '6.2', '6.3', '10.0'].includes(ver)) { - const stdout = execa.sync('wmic', ['os', 'get', 'Caption']).stdout || ''; - const year = (stdout.match(/2008|2012|2016/) || [])[0]; - if (year) { - return `Server ${year}`; - } - } - - return names.get(ver); -}; - -module.exports = windowsRelease; - - -/***/ }), - -/***/ 87: -/***/ (function(module) { - -module.exports = require("os"); - -/***/ }), - -/***/ 118: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -const os = __webpack_require__(87); - -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; - - -/***/ }), - -/***/ 126: -/***/ (function(module) { - -/** - * 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; - - -/***/ }), - -/***/ 129: -/***/ (function(module) { - -module.exports = require("child_process"); - -/***/ }), - -/***/ 143: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = withAuthorizationPrefix; - -const atob = __webpack_require__(368); - -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}`; -} - - -/***/ }), - -/***/ 145: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -const pump = __webpack_require__(453); -const bufferStream = __webpack_require__(966); - -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; - - -/***/ }), - -/***/ 148: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = paginatePlugin; - -const iterator = __webpack_require__(8); -const paginate = __webpack_require__(807); - -function paginatePlugin(octokit) { - octokit.paginate = paginate.bind(null, octokit); - octokit.paginate.iterator = iterator.bind(null, octokit); -} - - -/***/ }), - -/***/ 168: -/***/ (function(module) { - -"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; -}; - - -/***/ }), - -/***/ 190: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = authenticationPlugin; - -const beforeRequest = __webpack_require__(863); -const requestError = __webpack_require__(293); -const validate = __webpack_require__(954); - -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)); -} - - -/***/ }), - -/***/ 197: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = isexe -isexe.sync = sync - -var fs = __webpack_require__(747) - -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 -} - - -/***/ }), - -/***/ 198: -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"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()); - }); -}; -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 }); -// External Dependencies -const core = __importStar(__webpack_require__(470)); -const fs = __importStar(__webpack_require__(747)); -const gh = __importStar(__webpack_require__(469)); -const ChangedFiles_1 = __webpack_require__(906); -function getChangedPRFiles(repo, client, prNumber) { - return __awaiter(this, void 0, void 0, function* () { - const options = client.pulls.listFiles.endpoint.merge({ - owner: repo.split('/')[0], - repo: repo.split('/')[1], - pull_number: prNumber - }); - return ChangedFiles_1.sortChangedFiles(yield client.paginate(options).then(files => { - return files; - })); - }); -} -function getChangedPushFiles(repo, client, base, head) { - return __awaiter(this, void 0, void 0, function* () { - const response = yield client.repos.compareCommits({ - owner: repo.split('/')[0], - repo: repo.split('/')[1], - base, - head - }); - return ChangedFiles_1.sortChangedFiles(response.data.files); - }); -} -function writeFiles(format, changedFiles) { - switch (format.trim()) { - case 'json': - format = '.json'; - break; - case ',': - format = '.csv'; - break; - default: - format = '.txt'; - break; - } - //write files to preserve original functionality - fs.writeFileSync(`${process.env.HOME}/files${format}`, changedFiles.fileOutput(format), 'utf-8'); - fs.writeFileSync(`${process.env.HOME}/files_modified${format}`, changedFiles.updatedOutput(format), 'utf-8'); - fs.writeFileSync(`${process.env.HOME}/files_added${format}`, changedFiles.createdOutput(format), 'utf-8'); - fs.writeFileSync(`${process.env.HOME}/files_deleted${format}`, changedFiles.deletedOutput(format), 'utf-8'); -} -function writeOutput(format, changedFiles) { - //also export some outputs - core.setOutput('files', changedFiles.fileOutput(format)); - core.setOutput('files_added', changedFiles.createdOutput(format)); - core.setOutput('files_modified', changedFiles.updatedOutput(format)); - core.setOutput('files_deleted', changedFiles.deletedOutput(format)); -} -// figure out if it is a PR or Push -function run() { - return __awaiter(this, void 0, void 0, function* () { - try { - const github = gh.context; - const repo = core.getInput('githubRepo'); - const token = core.getInput('githubToken'); - const output = core.getInput('output'); - const fileOutput = core.getInput('fileOutput'); - const pushBefore = core.getInput('pushBefore'); - const pushAfter = core.getInput('pushAfter'); - const prNumber = core.getInput('prNumber'); - const isPush = pushBefore !== '' && pushAfter !== ''; - const isPR = prNumber !== ''; - const client = new gh.GitHub(token); - let changedFiles = new ChangedFiles_1.ChangedFiles(); - if (isPush && isPR) { - core.setFailed(`You can't pick PR and Push, I don't know which one to do.`); - } - else if (isPR) { - // do PR actions - if (prNumber != null) { - try { - core.error(`${prNumber}`); - core.error(`${repo}`); - changedFiles = yield getChangedPRFiles(repo, client, parseInt(prNumber)); - } - catch (error) { - core.error(`There was an error getting Pull Request change files:${error}`); - throw error; - } - } - else { - core.setFailed('Could not get pull request number from context, exiting'); - return; - } - } - else if (isPush) { - // do push actions - try { - changedFiles = yield getChangedPushFiles(repo, client, pushBefore, pushAfter); - } - catch (error) { - core.error(`There was an error getting Push change files:${error}`); - throw error; - } - } - else { - core.setFailed(`Change not initiated by a PR or Push, it was ${github.eventName} instead. Github:${JSON.stringify(github)}`); - return; - } - // write file output - writeFiles(fileOutput, changedFiles); - // write output vars - writeOutput(output, changedFiles); - process.exit(0); - } - catch (error) { - core.error(error); - core.setFailed(error.message); - } - }); -} -run(); - - -/***/ }), - -/***/ 211: -/***/ (function(module) { - -module.exports = require("https"); - -/***/ }), - -/***/ 215: -/***/ (function(module) { - -module.exports = {"name":"@octokit/rest","version":"16.36.0","publishConfig":{"access":"public"},"description":"GitHub REST API client for Node.js","keywords":["octokit","github","rest","api-client"],"author":"Gregor Martynus (https://github.com/gr2m)","contributors":[{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Fabian Jakobs","email":"fabian@c9.io"},{"name":"Joe Gallo","email":"joe@brassafrax.com"},{"name":"Gregor Martynus","url":"https://github.com/gr2m"}],"repository":"https://github.com/octokit/rest.js","dependencies":{"@octokit/request":"^5.2.0","@octokit/request-error":"^1.0.2","atob-lite":"^2.0.0","before-after-hook":"^2.0.0","btoa-lite":"^1.0.0","deprecation":"^2.0.0","lodash.get":"^4.4.2","lodash.set":"^4.3.2","lodash.uniq":"^4.5.0","octokit-pagination-methods":"^1.1.0","once":"^1.4.0","universal-user-agent":"^4.0.0"},"devDependencies":{"@gimenete/type-writer":"^0.1.3","@octokit/fixtures-server":"^5.0.6","@octokit/graphql":"^4.2.0","@types/node":"^13.1.0","bundlesize":"^0.18.0","chai":"^4.1.2","compression-webpack-plugin":"^3.0.0","cypress":"^3.0.0","glob":"^7.1.2","http-proxy-agent":"^3.0.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":"^11.3.3","npm-run-all":"^4.1.2","nyc":"^15.0.0","prettier":"^1.14.2","proxy":"^1.0.0","semantic-release":"^15.0.0","sinon":"^8.0.0","sinon-chai":"^3.0.0","sort-keys":"^4.0.0","string-to-arraybuffer":"^1.0.0","string-to-jsdoc-comment":"^1.0.0","typescript":"^3.3.1","webpack":"^4.0.0","webpack-bundle-analyzer":"^3.0.0","webpack-cli":"^3.0.0"},"types":"index.d.ts","scripts":{"coverage":"nyc report --reporter=html && open coverage/index.html","lint":"prettier --check '{lib,plugins,scripts,test}/**/*.{js,json,ts}' 'docs/*.{js,json}' 'docs/src/**/*' index.js README.md package.json","lint:fix":"prettier --write '{lib,plugins,scripts,test}/**/*.{js,json,ts}' 'docs/*.{js,json}' 'docs/src/**/*' index.js README.md package.json","pretest":"npm run -s lint","test":"nyc mocha test/mocha-node-setup.js \"test/*/**/*-test.js\"","test:browser":"cypress run --browser chrome","build":"npm-run-all build:*","build:ts":"npm run -s update-endpoints:typescript","prebuild:browser":"mkdirp dist/","build:browser":"npm-run-all build:browser:*","build:browser:development":"webpack --mode development --entry . --output-library=Octokit --output=./dist/octokit-rest.js --profile --json > dist/bundle-stats.json","build:browser:production":"webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=Octokit --output-path=./dist --output-filename=octokit-rest.min.js --devtool source-map","generate-bundle-report":"webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html","update-endpoints":"npm-run-all update-endpoints:*","update-endpoints:fetch-json":"node scripts/update-endpoints/fetch-json","update-endpoints:code":"node scripts/update-endpoints/code","update-endpoints:typescript":"node scripts/update-endpoints/typescript","prevalidate:ts":"npm run -s build:ts","validate:ts":"tsc --target es6 --noImplicitAny index.d.ts","postvalidate:ts":"tsc --noEmit --target es6 test/typescript-validate.ts","start-fixtures-server":"octokit-fixtures-server"},"license":"MIT","files":["index.js","index.d.ts","lib","plugins"],"nyc":{"ignore":["test"]},"release":{"publish":["@semantic-release/npm",{"path":"@semantic-release/github","assets":["dist/*","!dist/*.map.gz"]}]},"bundlesize":[{"path":"./dist/octokit-rest.min.js.gz","maxSize":"33 kB"}]}; - -/***/ }), - -/***/ 248: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = octokitRegisterEndpoints; - -const registerEndpoints = __webpack_require__(899); - -function octokitRegisterEndpoints(octokit) { - octokit.registerEndpoints = registerEndpoints.bind(null, octokit); -} - - -/***/ }), - -/***/ 260: -/***/ (function(module, __unusedexports, __webpack_require__) { - -// Note: since nyc uses this module to output coverage, any lines -// that are in the direct sync flow of nyc's outputCoverage are -// ignored, since we can never get coverage for them. -var assert = __webpack_require__(357) -var signals = __webpack_require__(654) - -var EE = __webpack_require__(614) -/* istanbul ignore if */ -if (typeof EE !== 'function') { - EE = EE.EventEmitter -} - -var emitter -if (process.__signal_exit_emitter__) { - emitter = process.__signal_exit_emitter__ -} else { - emitter = process.__signal_exit_emitter__ = new EE() - emitter.count = 0 - emitter.emitted = {} -} - -// Because this emitter is a global, we have to check to see if a -// previous version of this library failed to enable infinite listeners. -// I know what you're about to say. But literally everything about -// signal-exit is a compromise with evil. Get used to it. -if (!emitter.infinite) { - emitter.setMaxListeners(Infinity) - emitter.infinite = true -} - -module.exports = function (cb, opts) { - assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') - - if (loaded === false) { - load() - } - - var ev = 'exit' - if (opts && opts.alwaysLast) { - ev = 'afterexit' - } - - var remove = function () { - emitter.removeListener(ev, cb) - if (emitter.listeners('exit').length === 0 && - emitter.listeners('afterexit').length === 0) { - unload() - } - } - emitter.on(ev, cb) - - return remove -} - -module.exports.unload = unload -function unload () { - if (!loaded) { - return - } - loaded = false - - signals.forEach(function (sig) { - try { - process.removeListener(sig, sigListeners[sig]) - } catch (er) {} - }) - process.emit = originalProcessEmit - process.reallyExit = originalProcessReallyExit - emitter.count -= 1 -} - -function emit (event, code, signal) { - if (emitter.emitted[event]) { - return - } - emitter.emitted[event] = true - emitter.emit(event, code, signal) -} - -// { : , ... } -var sigListeners = {} -signals.forEach(function (sig) { - sigListeners[sig] = function listener () { - // If there are no other listeners, an exit is coming! - // Simplest way: remove us and then re-send the signal. - // We know that this will kill the process, so we can - // safely emit now. - var listeners = process.listeners(sig) - if (listeners.length === emitter.count) { - unload() - emit('exit', null, sig) - /* istanbul ignore next */ - emit('afterexit', null, sig) - /* istanbul ignore next */ - process.kill(process.pid, sig) - } - } -}) - -module.exports.signals = function () { - return signals -} - -module.exports.load = load - -var loaded = false - -function load () { - if (loaded) { - return - } - loaded = true - - // This is the number of onSignalExit's that are in play. - // It's important so that we can count the correct number of - // listeners on signals, and don't wait for the other one to - // handle it instead of us. - emitter.count += 1 - - signals = signals.filter(function (sig) { - try { - process.on(sig, sigListeners[sig]) - return true - } catch (er) { - return false - } - }) - - process.emit = processEmit - process.reallyExit = processReallyExit -} - -var originalProcessReallyExit = process.reallyExit -function processReallyExit (code) { - process.exitCode = code || 0 - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - /* istanbul ignore next */ - originalProcessReallyExit.call(process, process.exitCode) -} - -var originalProcessEmit = process.emit -function processEmit (ev, arg) { - if (ev === 'exit') { - if (arg !== undefined) { - process.exitCode = arg - } - var ret = originalProcessEmit.apply(this, arguments) - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - return ret - } else { - return originalProcessEmit.apply(this, arguments) - } -} - - -/***/ }), - -/***/ 262: -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fs_1 = __webpack_require__(747); -const os_1 = __webpack_require__(87); -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 { - const path = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${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 - -/***/ }), - -/***/ 265: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = getPage - -const deprecate = __webpack_require__(370) -const getPageLinks = __webpack_require__(577) -const HttpError = __webpack_require__(297) - -function getPage (octokit, link, which, headers) { - deprecate(`octokit.get${which.charAt(0).toUpperCase() + which.slice(1)}Page() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) - const url = getPageLinks(link)[which] - - if (!url) { - const urlError = new HttpError(`No ${which} page found`, 404) - return Promise.reject(urlError) - } - - const requestOptions = { - url, - headers: applyAcceptHeader(link, headers) - } - - const promise = octokit.request(requestOptions) - - return promise -} - -function applyAcceptHeader (res, headers) { - const previous = res.headers && res.headers['x-github-media-type'] - - if (!previous || (headers && headers.accept)) { - return headers - } - headers = headers || {} - headers.accept = 'application/vnd.' + previous - .replace('; param=', '.') - .replace('; format=', '+') - - return headers -} - - -/***/ }), - -/***/ 280: -/***/ (function(module, exports) { - -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var R = 0 - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[LOOSE] : re[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(re[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} - - -/***/ }), - -/***/ 293: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = authenticationRequestError; - -const { RequestError } = __webpack_require__(463); - -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; - }); - }); -} - - -/***/ }), - -/***/ 294: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = parseOptions; - -const { Deprecation } = __webpack_require__(692); -const { getUserAgent } = __webpack_require__(796); -const once = __webpack_require__(969); - -const pkg = __webpack_require__(215); - -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.timeZone) { - clientDefaults.headers["time-zone"] = options.timeZone; - } - - if (options.timeout) { - deprecateOptionsTimeout( - log, - new Deprecation( - "[@octokit/rest] new Octokit({timeout}) is deprecated. Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request" - ) - ); - clientDefaults.request.timeout = options.timeout; - } - - if (options.agent) { - deprecateOptionsAgent( - log, - new Deprecation( - "[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/request.js#request" - ) - ); - clientDefaults.request.agent = options.agent; - } - - if (options.headers) { - deprecateOptionsHeaders( - log, - new Deprecation( - "[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request" - ) - ); - } - - const userAgentOption = clientDefaults.headers["user-agent"]; - const defaultUserAgent = `octokit.js/${pkg.version} ${getUserAgent()}`; - - clientDefaults.headers["user-agent"] = [userAgentOption, defaultUserAgent] - .filter(Boolean) - .join(" "); - - clientDefaults.request.hook = hook.bind(null, "request"); - - return clientDefaults; -} - - -/***/ }), - -/***/ 297: -/***/ (function(module) { - -module.exports = class HttpError extends Error { - constructor (message, code, headers) { - 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.code = code - this.headers = headers - } -} - - -/***/ }), - -/***/ 301: -/***/ (function(module, __unusedexports, __webpack_require__) { - -/** - * 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`) - * - https://developer.github.com/v3/orgs/#list-installations-for-an-organization (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 } = __webpack_require__(692); -const once = __webpack_require__(969); - -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/; -const REGEX_IS_ORG_INSTALLATIONS_PATH = /^\/orgs\/[^/]+\/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) && - !REGEX_IS_ORG_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; - } - }); -} - - -/***/ }), - -/***/ 323: -/***/ (function(module) { - -"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'; -}; - - -/***/ }), - -/***/ 336: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = hasLastPage - -const deprecate = __webpack_require__(370) -const getPageLinks = __webpack_require__(577) - -function hasLastPage (link) { - deprecate(`octokit.hasLastPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) - return getPageLinks(link).last -} - - -/***/ }), - -/***/ 348: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - - -module.exports = validate; - -const { RequestError } = __webpack_require__(463); -const get = __webpack_require__(854); -const set = __webpack_require__(883); - -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(String(value)) === -1) { - throw new RequestError( - `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( - value - )}`, - 400, - { - request: options - } - ); - } - - if (parameter.validation) { - const regex = new RegExp(parameter.validation); - if (!regex.test(value)) { - throw new RequestError( - `Invalid value for parameter '${currentParameterName}': ${JSON.stringify( - value - )}`, - 400, - { - request: options - } - ); - } - } - - if (expectedType === "object" && typeof value === "string") { - try { - value = JSON.parse(value); - } catch (exception) { - throw new RequestError( - `JSON parse error of value for parameter '${currentParameterName}': ${JSON.stringify( - value - )}`, - 400, - { - request: options - } - ); - } - } - - set(options, parameter.mapTo || currentParameterName, value); - }); - }); - - return options; -} - - -/***/ }), - -/***/ 349: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = authenticationRequestError; - -const { RequestError } = __webpack_require__(463); - -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); - }); -} - - -/***/ }), - -/***/ 357: -/***/ (function(module) { - -module.exports = require("assert"); - -/***/ }), - -/***/ 363: -/***/ (function(module) { - -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)() - }) -} - - -/***/ }), - -/***/ 368: -/***/ (function(module) { - -module.exports = function atob(str) { - return Buffer.from(str, 'base64').toString('binary') -} - - -/***/ }), - -/***/ 370: -/***/ (function(module) { - -module.exports = deprecate - -const loggedMessages = {} - -function deprecate (message) { - if (loggedMessages[message]) { - return - } - - console.warn(`DEPRECATED (@octokit/rest): ${message}`) - loggedMessages[message] = 1 -} - - -/***/ }), - -/***/ 372: -/***/ (function(module) { - -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; - }); - }); -} - - -/***/ }), - -/***/ 385: -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"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(__webpack_require__(626)); -var universalUserAgent = __webpack_require__(796); - -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 = Object.assign({}, 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 = "5.5.1"; - -const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. -// So we use RequestParameters and add method as additional required property. - -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 - - -/***/ }), - -/***/ 389: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - - -const fs = __webpack_require__(747); -const shebangCommand = __webpack_require__(866); - -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; - - -/***/ }), - -/***/ 402: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = Octokit; - -const { request } = __webpack_require__(753); -const Hook = __webpack_require__(523); - -const parseClientOptions = __webpack_require__(294); - -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; -} - - -/***/ }), - -/***/ 413: -/***/ (function(module) { - -module.exports = require("stream"); - -/***/ }), - -/***/ 427: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -// Older verions of Node.js might not have `util.getSystemErrorName()`. -// In that case, fall back to a deprecated internal. -const util = __webpack_require__(669); - -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}`; -} - - - -/***/ }), - -/***/ 430: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = octokitValidate; - -const validate = __webpack_require__(348); - -function octokitValidate(octokit) { - octokit.hook.before("request", validate.bind(null, octokit)); -} - - -/***/ }), - -/***/ 431: -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const os = __webpack_require__(87); -/** - * 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_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - 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 += CMD_STRING; - // 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 - -/***/ }), - -/***/ 453: -/***/ (function(module, __unusedexports, __webpack_require__) { - -var once = __webpack_require__(969) -var eos = __webpack_require__(9) -var fs = __webpack_require__(747) // we only need fs to get the ReadStream and WriteStream prototypes - -var noop = function () {} -var ancient = /^v?\.0/.test(process.version) - -var isFn = function (fn) { - return typeof fn === 'function' -} - -var isFS = function (stream) { - if (!ancient) return false // newer node version do not need to care about fs is a special way - if (!fs) return false // browser - return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) -} - -var isRequest = function (stream) { - return stream.setHeader && isFn(stream.abort) -} - -var destroyer = function (stream, reading, writing, callback) { - callback = once(callback) - - var closed = false - stream.on('close', function () { - closed = true - }) - - eos(stream, {readable: reading, writable: writing}, function (err) { - if (err) return callback(err) - closed = true - callback() - }) - - var destroyed = false - return function (err) { - if (closed) return - if (destroyed) return - destroyed = true - - if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks - if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want - - if (isFn(stream.destroy)) return stream.destroy() - - callback(err || new Error('stream was destroyed')) - } -} - -var call = function (fn) { - fn() -} - -var pipe = function (from, to) { - return from.pipe(to) -} - -var pump = function () { - var streams = Array.prototype.slice.call(arguments) - var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop - - if (Array.isArray(streams[0])) streams = streams[0] - if (streams.length < 2) throw new Error('pump requires two streams per minimum') - - var error - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1 - var writing = i > 0 - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err - if (err) destroys.forEach(call) - if (reading) return - destroys.forEach(call) - callback(error) - }) - }) - - return streams.reduce(pipe) -} - -module.exports = pump - - -/***/ }), - -/***/ 454: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var Stream = _interopDefault(__webpack_require__(413)); -var http = _interopDefault(__webpack_require__(605)); -var Url = _interopDefault(__webpack_require__(835)); -var https = _interopDefault(__webpack_require__(211)); -var zlib = _interopDefault(__webpack_require__(761)); - -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js - -// fix for "Readable" isn't a named export issue -const Readable = Stream.Readable; - -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); - -class Blob { - constructor() { - this[TYPE] = ''; - - const blobParts = arguments[0]; - const options = arguments[1]; - - const buffers = []; - let size = 0; - - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } - - this[BUFFER] = Buffer.concat(buffers); - - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; - - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); - - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } -} - -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); - -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ - -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); - - this.message = message; - this.type = type; - - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; - } - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; - -let convert; -try { - convert = __webpack_require__(18).convert; -} catch (e) {} - -const INTERNALS = Symbol('Body internals'); - -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = Stream.PassThrough; - -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; - - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; - - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; - - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; - - if (body instanceof Stream) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } -} - -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, - - get bodyUsed() { - return this[INTERNALS].disturbed; - }, - - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, - - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, - - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; - - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, - - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, - - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, - - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; - - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; - -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); - -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; - -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; - - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } - - this[INTERNALS].disturbed = true; - - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } - - let body = this.body; - - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is blob - if (isBlob(body)) { - body = body.stream(); - } - - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } - - // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; - - return new Body.Promise(function (resolve, reject) { - let resTimeout; - - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } - - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } - - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } - - accumBytes += chunk.length; - accum.push(chunk); - }); - - body.on('end', function () { - if (abort) { - return; - } - - clearTimeout(resTimeout); - - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); -} - -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } - - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; - - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } - - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); - - // html5 - if (!res && str) { - res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; - - this[MAP] = Object.create(null); - - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); - - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } - - return; - } - - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } - - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } - - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } - - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } - - return this[MAP][key].join(', '); - } - - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; - - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } - - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } - - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } - - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } - - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } - - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } - - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } - - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } - - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } -} -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; - -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); - -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; - - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} - -const INTERNAL = Symbol('internal'); - -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} - -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } - - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; - - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } - - this[INTERNAL].index = index + 1; - - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); - -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); - - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } - - return obj; -} - -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; -} - -const INTERNALS$1 = Symbol('Response internals'); - -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http.STATUS_CODES; - -/** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - Body.call(this, body, opts); - - const status = opts.status || 200; - const headers = new Headers(opts.headers); - - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } - - get url() { - return this[INTERNALS$1].url || ''; - } - - get status() { - return this[INTERNALS$1].status; - } - - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } - - get redirected() { - return this[INTERNALS$1].counter > 0; - } - - get statusText() { - return this[INTERNALS$1].statusText; - } - - get headers() { - return this[INTERNALS$1].headers; - } - - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} - -Body.mixIn(Response.prototype); - -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); - -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); - -const INTERNALS$2 = Symbol('Request internals'); - -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = Url.parse; -const format_url = Url.format; - -const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; - -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} - -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} - -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - let parsedURL; - - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parse_url(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parse_url(`${input}`); - } - input = {}; - } else { - parsedURL = parse_url(input.url); - } - - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); - - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } - - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; - - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); - - const headers = new Headers(init.headers || input.headers || {}); - - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; - - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } - - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; - - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } - - get method() { - return this[INTERNALS$2].method; - } - - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } - - get headers() { - return this[INTERNALS$2].headers; - } - - get redirect() { - return this[INTERNALS$2].redirect; - } - - get signal() { - return this[INTERNALS$2].signal; - } - - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } -} - -Body.mixIn(Request.prototype); - -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); - -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); - - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } - - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } - - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } - - if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } - - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } - - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } - - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } - - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } - - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } - - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js - - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); -} - -/** - * abort-error.js - * - * AbortError interface for cancelled requests - */ - -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); - - this.type = 'aborted'; - this.message = message; - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; - -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = Stream.PassThrough; -const resolve_url = Url.resolve; - -/** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ -function fetch(url, opts) { - - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } - - Body.Promise = fetch.Promise; - - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); - - const send = (options.protocol === 'https:' ? https : http).request; - const signal = request.signal; - - let response = null; - - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof Stream.Readable) { - request.body.destroy(error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; - - if (signal && signal.aborted) { - abort(); - return; - } - - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; - - // send request - const req = send(options); - let reqTimeout; - - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } - - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } - - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } - - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - finalize(); - }); - - req.on('response', function (res) { - clearTimeout(reqTimeout); - - const headers = createHeadersLenient(res.headers); - - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); - - // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); - - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } - - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout - }; - - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } - - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } - - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); - - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; - - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); - - // HTTP-network fetch step 12.1.1.4: handle content codings - - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } - - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH - }; - - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } - - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib.createInflate()); - } else { - body = body.pipe(zlib.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - return; - } - - // for br - if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { - body = body.pipe(zlib.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } - - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); - - writeToStream(req, request); - }); -} -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; - -// expose Promise -fetch.Promise = global.Promise; - -module.exports = exports = fetch; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = exports; -exports.Headers = Headers; -exports.Request = Request; -exports.Response = Response; -exports.FetchError = FetchError; - - -/***/ }), - -/***/ 462: -/***/ (function(module) { - -"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; - - -/***/ }), - -/***/ 463: -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var deprecation = __webpack_require__(692); -var once = _interopDefault(__webpack_require__(969)); - -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; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 469: -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"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 = __webpack_require__(898); -const rest_1 = __importDefault(__webpack_require__(0)); -const Context = __importStar(__webpack_require__(262)); -// 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.graphql.defaults({ - headers: { authorization: `token ${token}` } - }); - } -} -exports.GitHub = GitHub; -//# sourceMappingURL=github.js.map - -/***/ }), - -/***/ 470: -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"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 = __webpack_require__(431); -const os = __webpack_require__(87); -const path = __webpack_require__(622); -/** - * 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; -/** - * Registers a secret which will get masked from logs - * @param secret value of the secret - */ -function setSecret(secret) { - command_1.issueCommand('add-mask', {}, secret); -} -exports.setSecret = setSecret; -/** - * 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(/ /g, '_').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; -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + os.EOL); -} -exports.info = info; -/** - * 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; -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store - */ -function saveState(name, value) { - command_1.issueCommand('save-state', { name }, value); -} -exports.saveState = saveState; -/** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ -function getState(name) { - return process.env[`STATE_${name}`] || ''; -} -exports.getState = getState; -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ 471: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = authenticationBeforeRequest; - -const btoa = __webpack_require__(675); -const uniq = __webpack_require__(126); - -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}`; -} - - -/***/ }), - -/***/ 489: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__(622); -const which = __webpack_require__(814); -const pathKey = __webpack_require__(39)(); - -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; - - -/***/ }), - -/***/ 510: -/***/ (function(module) { - -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 - }) -} - - -/***/ }), - -/***/ 523: -/***/ (function(module, __unusedexports, __webpack_require__) { - -var register = __webpack_require__(363) -var addHook = __webpack_require__(510) -var removeHook = __webpack_require__(763) - -// 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 - - -/***/ }), - -/***/ 529: -/***/ (function(module, __unusedexports, __webpack_require__) { - -const factory = __webpack_require__(47); - -module.exports = factory(); - - -/***/ }), - -/***/ 536: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = hasFirstPage - -const deprecate = __webpack_require__(370) -const getPageLinks = __webpack_require__(577) - -function hasFirstPage (link) { - deprecate(`octokit.hasFirstPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) - return getPageLinks(link).first -} - - -/***/ }), - -/***/ 548: -/***/ (function(module) { - -"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; - - -/***/ }), - -/***/ 550: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = getNextPage - -const getPage = __webpack_require__(265) - -function getNextPage (octokit, link, headers) { - return getPage(octokit, link, 'next', headers) -} - - -/***/ }), - -/***/ 558: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = hasPreviousPage - -const deprecate = __webpack_require__(370) -const getPageLinks = __webpack_require__(577) - -function hasPreviousPage (link) { - deprecate(`octokit.hasPreviousPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) - return getPageLinks(link).prev -} - - -/***/ }), - -/***/ 563: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = getPreviousPage - -const getPage = __webpack_require__(265) - -function getPreviousPage (octokit, link, headers) { - return getPage(octokit, link, 'prev', headers) -} - - -/***/ }), - -/***/ 568: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__(622); -const niceTry = __webpack_require__(948); -const resolveCommand = __webpack_require__(489); -const escape = __webpack_require__(462); -const readShebang = __webpack_require__(389); -const semver = __webpack_require__(280); - -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; - - -/***/ }), - -/***/ 577: -/***/ (function(module) { - -module.exports = getPageLinks - -function getPageLinks (link) { - link = link.link || link.headers.link || '' - - const links = {} - - // link format: - // '; rel="next", ; rel="last"' - link.replace(/<([^>]*)>;\s*rel="([\w]*)"/g, (m, uri, type) => { - links[type] = uri - }) - - return links -} - - -/***/ }), - -/***/ 586: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = octokitRestApiEndpoints; - -const ROUTES = __webpack_require__(705); - -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); -} - - -/***/ }), - -/***/ 605: -/***/ (function(module) { - -module.exports = require("http"); - -/***/ }), - -/***/ 614: -/***/ (function(module) { - -module.exports = require("events"); - -/***/ }), - -/***/ 621: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__(622); -const pathKey = __webpack_require__(39); - -module.exports = opts => { - opts = Object.assign({ - cwd: process.cwd(), - path: process.env[pathKey()] - }, opts); - - let prev; - let pth = path.resolve(opts.cwd); - const ret = []; - - while (prev !== pth) { - ret.push(path.join(pth, 'node_modules/.bin')); - prev = pth; - pth = path.resolve(pth, '..'); - } - - // ensure the running `node` binary is used - ret.push(path.dirname(process.execPath)); - - return ret.concat(opts.path).join(path.delimiter); -}; - -module.exports.env = opts => { - opts = Object.assign({ - env: process.env - }, opts); - - const env = Object.assign({}, opts.env); - const path = pathKey({env}); - - opts.path = env[path]; - env[path] = module.exports(opts); - - return env; -}; - - -/***/ }), - -/***/ 622: -/***/ (function(module) { - -module.exports = require("path"); - -/***/ }), - -/***/ 626: -/***/ (function(module) { - -"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; - - -/***/ }), - -/***/ 649: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = getLastPage - -const getPage = __webpack_require__(265) - -function getLastPage (octokit, link, headers) { - return getPage(octokit, link, 'last', headers) -} - - -/***/ }), - -/***/ 654: -/***/ (function(module) { - -// This is not the set of all possible signals. -// -// It IS, however, the set of all signals that trigger -// an exit on either Linux or BSD systems. Linux is a -// superset of the signal names supported on BSD, and -// the unknown signals just fail to register, so we can -// catch that easily enough. -// -// Don't bother with SIGKILL. It's uncatchable, which -// means that we can't fire any callbacks anyway. -// -// If a user does happen to register a handler on a non- -// fatal signal like SIGWINCH or something, and then -// exit, it'll end up firing `process.emit('exit')`, so -// the handler will be fired anyway. -// -// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised -// artificially, inherently leave the process in a -// state from which it is not safe to try and enter JS -// listeners. -module.exports = [ - 'SIGABRT', - 'SIGALRM', - 'SIGHUP', - 'SIGINT', - 'SIGTERM' -] - -if (process.platform !== 'win32') { - module.exports.push( - 'SIGVTALRM', - 'SIGXCPU', - 'SIGXFSZ', - 'SIGUSR2', - 'SIGTRAP', - 'SIGSYS', - 'SIGQUIT', - 'SIGIOT' - // should detect profiler and enable/disable accordingly. - // see #21 - // 'SIGPROF' - ) -} - -if (process.platform === 'linux') { - module.exports.push( - 'SIGIO', - 'SIGPOLL', - 'SIGPWR', - 'SIGSTKFLT', - 'SIGUNUSED' - ) -} - - -/***/ }), - -/***/ 669: -/***/ (function(module) { - -module.exports = require("util"); - -/***/ }), - -/***/ 674: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = authenticate; - -const { Deprecation } = __webpack_require__(692); -const once = __webpack_require__(969); - -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; -} - - -/***/ }), - -/***/ 675: -/***/ (function(module) { - -module.exports = function btoa(str) { - return new Buffer(str).toString('base64') -} - - -/***/ }), - -/***/ 692: -/***/ (function(__unusedmodule, exports) { - -"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; - - -/***/ }), - -/***/ 697: -/***/ (function(module) { - -"use strict"; - -module.exports = (promise, onFinally) => { - onFinally = onFinally || (() => {}); - - return promise.then( - val => new Promise(resolve => { - resolve(onFinally()); - }).then(() => val), - err => new Promise(resolve => { - resolve(onFinally()); - }).then(() => { - throw err; - }) - ); -}; - - -/***/ }), - -/***/ 705: -/***/ (function(module) { - -module.exports = {"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"},"checkAuthorization":{"deprecated":"octokit.oauthAuthorizations.checkAuthorization() has been renamed to octokit.apps.checkAuthorization() (2019-11-05)","method":"GET","params":{"access_token":{"required":true,"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/tokens/:access_token"},"checkToken":{"headers":{"accept":"application/vnd.github.doctor-strange-preview+json"},"method":"POST","params":{"access_token":{"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/token"},"createContentAttachment":{"headers":{"accept":"application/vnd.github.corsair-preview+json"},"method":"POST","params":{"body":{"required":true,"type":"string"},"content_reference_id":{"required":true,"type":"integer"},"title":{"required":true,"type":"string"}},"url":"/content_references/:content_reference_id/attachments"},"createFromManifest":{"headers":{"accept":"application/vnd.github.fury-preview+json"},"method":"POST","params":{"code":{"required":true,"type":"string"}},"url":"/app-manifests/:code/conversions"},"createInstallationToken":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"POST","params":{"installation_id":{"required":true,"type":"integer"},"permissions":{"type":"object"},"repository_ids":{"type":"integer[]"}},"url":"/app/installations/:installation_id/access_tokens"},"deleteAuthorization":{"headers":{"accept":"application/vnd.github.doctor-strange-preview+json"},"method":"DELETE","params":{"access_token":{"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/grant"},"deleteInstallation":{"headers":{"accept":"application/vnd.github.gambit-preview+json,application/vnd.github.machine-man-preview+json"},"method":"DELETE","params":{"installation_id":{"required":true,"type":"integer"}},"url":"/app/installations/:installation_id"},"deleteToken":{"headers":{"accept":"application/vnd.github.doctor-strange-preview+json"},"method":"DELETE","params":{"access_token":{"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/token"},"findOrgInstallation":{"deprecated":"octokit.apps.findOrgInstallation() has been renamed to octokit.apps.getOrgInstallation() (2019-04-10)","headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"org":{"required":true,"type":"string"}},"url":"/orgs/:org/installation"},"findRepoInstallation":{"deprecated":"octokit.apps.findRepoInstallation() has been renamed to octokit.apps.getRepoInstallation() (2019-04-10)","headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/installation"},"findUserInstallation":{"deprecated":"octokit.apps.findUserInstallation() has been renamed to octokit.apps.getUserInstallation() (2019-04-10)","headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"username":{"required":true,"type":"string"}},"url":"/users/:username/installation"},"getAuthenticated":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{},"url":"/app"},"getBySlug":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"app_slug":{"required":true,"type":"string"}},"url":"/apps/:app_slug"},"getInstallation":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"installation_id":{"required":true,"type":"integer"}},"url":"/app/installations/:installation_id"},"getOrgInstallation":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"org":{"required":true,"type":"string"}},"url":"/orgs/:org/installation"},"getRepoInstallation":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/installation"},"getUserInstallation":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"username":{"required":true,"type":"string"}},"url":"/users/:username/installation"},"listAccountsUserOrOrgOnPlan":{"method":"GET","params":{"direction":{"enum":["asc","desc"],"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"plan_id":{"required":true,"type":"integer"},"sort":{"enum":["created","updated"],"type":"string"}},"url":"/marketplace_listing/plans/:plan_id/accounts"},"listAccountsUserOrOrgOnPlanStubbed":{"method":"GET","params":{"direction":{"enum":["asc","desc"],"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"plan_id":{"required":true,"type":"integer"},"sort":{"enum":["created","updated"],"type":"string"}},"url":"/marketplace_listing/stubbed/plans/:plan_id/accounts"},"listInstallationReposForAuthenticatedUser":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"installation_id":{"required":true,"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/user/installations/:installation_id/repositories"},"listInstallations":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/app/installations"},"listInstallationsForAuthenticatedUser":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/user/installations"},"listMarketplacePurchasesForAuthenticatedUser":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/user/marketplace_purchases"},"listMarketplacePurchasesForAuthenticatedUserStubbed":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/user/marketplace_purchases/stubbed"},"listPlans":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/marketplace_listing/plans"},"listPlansStubbed":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/marketplace_listing/stubbed/plans"},"listRepos":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/installation/repositories"},"removeRepoFromInstallation":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"DELETE","params":{"installation_id":{"required":true,"type":"integer"},"repository_id":{"required":true,"type":"integer"}},"url":"/user/installations/:installation_id/repositories/:repository_id"},"resetAuthorization":{"deprecated":"octokit.oauthAuthorizations.resetAuthorization() has been renamed to octokit.apps.resetAuthorization() (2019-11-05)","method":"POST","params":{"access_token":{"required":true,"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/tokens/:access_token"},"resetToken":{"headers":{"accept":"application/vnd.github.doctor-strange-preview+json"},"method":"PATCH","params":{"access_token":{"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/token"},"revokeAuthorizationForApplication":{"deprecated":"octokit.oauthAuthorizations.revokeAuthorizationForApplication() has been renamed to octokit.apps.revokeAuthorizationForApplication() (2019-11-05)","method":"DELETE","params":{"access_token":{"required":true,"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/tokens/:access_token"},"revokeGrantForApplication":{"deprecated":"octokit.oauthAuthorizations.revokeGrantForApplication() has been renamed to octokit.apps.revokeGrantForApplication() (2019-11-05)","method":"DELETE","params":{"access_token":{"required":true,"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/grants/:access_token"}},"checks":{"create":{"headers":{"accept":"application/vnd.github.antiope-preview+json"},"method":"POST","params":{"actions":{"type":"object[]"},"actions[].description":{"required":true,"type":"string"},"actions[].identifier":{"required":true,"type":"string"},"actions[].label":{"required":true,"type":"string"},"completed_at":{"type":"string"},"conclusion":{"enum":["success","failure","neutral","cancelled","timed_out","action_required"],"type":"string"},"details_url":{"type":"string"},"external_id":{"type":"string"},"head_sha":{"required":true,"type":"string"},"name":{"required":true,"type":"string"},"output":{"type":"object"},"output.annotations":{"type":"object[]"},"output.annotations[].annotation_level":{"enum":["notice","warning","failure"],"required":true,"type":"string"},"output.annotations[].end_column":{"type":"integer"},"output.annotations[].end_line":{"required":true,"type":"integer"},"output.annotations[].message":{"required":true,"type":"string"},"output.annotations[].path":{"required":true,"type":"string"},"output.annotations[].raw_details":{"type":"string"},"output.annotations[].start_column":{"type":"integer"},"output.annotations[].start_line":{"required":true,"type":"integer"},"output.annotations[].title":{"type":"string"},"output.images":{"type":"object[]"},"output.images[].alt":{"required":true,"type":"string"},"output.images[].caption":{"type":"string"},"output.images[].image_url":{"required":true,"type":"string"},"output.summary":{"required":true,"type":"string"},"output.text":{"type":"string"},"output.title":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"started_at":{"type":"string"},"status":{"enum":["queued","in_progress","completed"],"type":"string"}},"url":"/repos/:owner/:repo/check-runs"},"createSuite":{"headers":{"accept":"application/vnd.github.antiope-preview+json"},"method":"POST","params":{"head_sha":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/check-suites"},"get":{"headers":{"accept":"application/vnd.github.antiope-preview+json"},"method":"GET","params":{"check_run_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/check-runs/:check_run_id"},"getSuite":{"headers":{"accept":"application/vnd.github.antiope-preview+json"},"method":"GET","params":{"check_suite_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/check-suites/:check_suite_id"},"listAnnotations":{"headers":{"accept":"application/vnd.github.antiope-preview+json"},"method":"GET","params":{"check_run_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/check-runs/:check_run_id/annotations"},"listForRef":{"headers":{"accept":"application/vnd.github.antiope-preview+json"},"method":"GET","params":{"check_name":{"type":"string"},"filter":{"enum":["latest","all"],"type":"string"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"status":{"enum":["queued","in_progress","completed"],"type":"string"}},"url":"/repos/:owner/:repo/commits/:ref/check-runs"},"listForSuite":{"headers":{"accept":"application/vnd.github.antiope-preview+json"},"method":"GET","params":{"check_name":{"type":"string"},"check_suite_id":{"required":true,"type":"integer"},"filter":{"enum":["latest","all"],"type":"string"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"},"status":{"enum":["queued","in_progress","completed"],"type":"string"}},"url":"/repos/:owner/:repo/check-suites/:check_suite_id/check-runs"},"listSuitesForRef":{"headers":{"accept":"application/vnd.github.antiope-preview+json"},"method":"GET","params":{"app_id":{"type":"integer"},"check_name":{"type":"string"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/commits/:ref/check-suites"},"rerequestSuite":{"headers":{"accept":"application/vnd.github.antiope-preview+json"},"method":"POST","params":{"check_suite_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/check-suites/:check_suite_id/rerequest"},"setSuitesPreferences":{"headers":{"accept":"application/vnd.github.antiope-preview+json"},"method":"PATCH","params":{"auto_trigger_checks":{"type":"object[]"},"auto_trigger_checks[].app_id":{"required":true,"type":"integer"},"auto_trigger_checks[].setting":{"required":true,"type":"boolean"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/check-suites/preferences"},"update":{"headers":{"accept":"application/vnd.github.antiope-preview+json"},"method":"PATCH","params":{"actions":{"type":"object[]"},"actions[].description":{"required":true,"type":"string"},"actions[].identifier":{"required":true,"type":"string"},"actions[].label":{"required":true,"type":"string"},"check_run_id":{"required":true,"type":"integer"},"completed_at":{"type":"string"},"conclusion":{"enum":["success","failure","neutral","cancelled","timed_out","action_required"],"type":"string"},"details_url":{"type":"string"},"external_id":{"type":"string"},"name":{"type":"string"},"output":{"type":"object"},"output.annotations":{"type":"object[]"},"output.annotations[].annotation_level":{"enum":["notice","warning","failure"],"required":true,"type":"string"},"output.annotations[].end_column":{"type":"integer"},"output.annotations[].end_line":{"required":true,"type":"integer"},"output.annotations[].message":{"required":true,"type":"string"},"output.annotations[].path":{"required":true,"type":"string"},"output.annotations[].raw_details":{"type":"string"},"output.annotations[].start_column":{"type":"integer"},"output.annotations[].start_line":{"required":true,"type":"integer"},"output.annotations[].title":{"type":"string"},"output.images":{"type":"object[]"},"output.images[].alt":{"required":true,"type":"string"},"output.images[].caption":{"type":"string"},"output.images[].image_url":{"required":true,"type":"string"},"output.summary":{"required":true,"type":"string"},"output.text":{"type":"string"},"output.title":{"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"started_at":{"type":"string"},"status":{"enum":["queued","in_progress","completed"],"type":"string"}},"url":"/repos/:owner/:repo/check-runs/:check_run_id"}},"codesOfConduct":{"getConductCode":{"headers":{"accept":"application/vnd.github.scarlet-witch-preview+json"},"method":"GET","params":{"key":{"required":true,"type":"string"}},"url":"/codes_of_conduct/:key"},"getForRepo":{"headers":{"accept":"application/vnd.github.scarlet-witch-preview+json"},"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/community/code_of_conduct"},"listConductCodes":{"headers":{"accept":"application/vnd.github.scarlet-witch-preview+json"},"method":"GET","params":{},"url":"/codes_of_conduct"}},"emojis":{"get":{"method":"GET","params":{},"url":"/emojis"}},"gists":{"checkIsStarred":{"method":"GET","params":{"gist_id":{"required":true,"type":"string"}},"url":"/gists/:gist_id/star"},"create":{"method":"POST","params":{"description":{"type":"string"},"files":{"required":true,"type":"object"},"files.content":{"type":"string"},"public":{"type":"boolean"}},"url":"/gists"},"createComment":{"method":"POST","params":{"body":{"required":true,"type":"string"},"gist_id":{"required":true,"type":"string"}},"url":"/gists/:gist_id/comments"},"delete":{"method":"DELETE","params":{"gist_id":{"required":true,"type":"string"}},"url":"/gists/:gist_id"},"deleteComment":{"method":"DELETE","params":{"comment_id":{"required":true,"type":"integer"},"gist_id":{"required":true,"type":"string"}},"url":"/gists/:gist_id/comments/:comment_id"},"fork":{"method":"POST","params":{"gist_id":{"required":true,"type":"string"}},"url":"/gists/:gist_id/forks"},"get":{"method":"GET","params":{"gist_id":{"required":true,"type":"string"}},"url":"/gists/:gist_id"},"getComment":{"method":"GET","params":{"comment_id":{"required":true,"type":"integer"},"gist_id":{"required":true,"type":"string"}},"url":"/gists/:gist_id/comments/:comment_id"},"getRevision":{"method":"GET","params":{"gist_id":{"required":true,"type":"string"},"sha":{"required":true,"type":"string"}},"url":"/gists/:gist_id/:sha"},"list":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"},"since":{"type":"string"}},"url":"/gists"},"listComments":{"method":"GET","params":{"gist_id":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/gists/:gist_id/comments"},"listCommits":{"method":"GET","params":{"gist_id":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/gists/:gist_id/commits"},"listForks":{"method":"GET","params":{"gist_id":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/gists/:gist_id/forks"},"listPublic":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"},"since":{"type":"string"}},"url":"/gists/public"},"listPublicForUser":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"},"since":{"type":"string"},"username":{"required":true,"type":"string"}},"url":"/users/:username/gists"},"listStarred":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"},"since":{"type":"string"}},"url":"/gists/starred"},"star":{"method":"PUT","params":{"gist_id":{"required":true,"type":"string"}},"url":"/gists/:gist_id/star"},"unstar":{"method":"DELETE","params":{"gist_id":{"required":true,"type":"string"}},"url":"/gists/:gist_id/star"},"update":{"method":"PATCH","params":{"description":{"type":"string"},"files":{"type":"object"},"files.content":{"type":"string"},"files.filename":{"type":"string"},"gist_id":{"required":true,"type":"string"}},"url":"/gists/:gist_id"},"updateComment":{"method":"PATCH","params":{"body":{"required":true,"type":"string"},"comment_id":{"required":true,"type":"integer"},"gist_id":{"required":true,"type":"string"}},"url":"/gists/:gist_id/comments/:comment_id"}},"git":{"createBlob":{"method":"POST","params":{"content":{"required":true,"type":"string"},"encoding":{"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/blobs"},"createCommit":{"method":"POST","params":{"author":{"type":"object"},"author.date":{"type":"string"},"author.email":{"type":"string"},"author.name":{"type":"string"},"committer":{"type":"object"},"committer.date":{"type":"string"},"committer.email":{"type":"string"},"committer.name":{"type":"string"},"message":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"parents":{"required":true,"type":"string[]"},"repo":{"required":true,"type":"string"},"signature":{"type":"string"},"tree":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/commits"},"createRef":{"method":"POST","params":{"owner":{"required":true,"type":"string"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"sha":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/refs"},"createTag":{"method":"POST","params":{"message":{"required":true,"type":"string"},"object":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"tag":{"required":true,"type":"string"},"tagger":{"type":"object"},"tagger.date":{"type":"string"},"tagger.email":{"type":"string"},"tagger.name":{"type":"string"},"type":{"enum":["commit","tree","blob"],"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/tags"},"createTree":{"method":"POST","params":{"base_tree":{"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"tree":{"required":true,"type":"object[]"},"tree[].content":{"type":"string"},"tree[].mode":{"enum":["100644","100755","040000","160000","120000"],"type":"string"},"tree[].path":{"type":"string"},"tree[].sha":{"allowNull":true,"type":"string"},"tree[].type":{"enum":["blob","tree","commit"],"type":"string"}},"url":"/repos/:owner/:repo/git/trees"},"deleteRef":{"method":"DELETE","params":{"owner":{"required":true,"type":"string"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/refs/:ref"},"getBlob":{"method":"GET","params":{"file_sha":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/blobs/:file_sha"},"getCommit":{"method":"GET","params":{"commit_sha":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/commits/:commit_sha"},"getRef":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/ref/:ref"},"getTag":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"tag_sha":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/tags/:tag_sha"},"getTree":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"recursive":{"enum":["1"],"type":"integer"},"repo":{"required":true,"type":"string"},"tree_sha":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/trees/:tree_sha"},"listMatchingRefs":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/matching-refs/:ref"},"listRefs":{"method":"GET","params":{"namespace":{"type":"string"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/refs/:namespace"},"updateRef":{"method":"PATCH","params":{"force":{"type":"boolean"},"owner":{"required":true,"type":"string"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"sha":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/git/refs/:ref"}},"gitignore":{"getTemplate":{"method":"GET","params":{"name":{"required":true,"type":"string"}},"url":"/gitignore/templates/:name"},"listTemplates":{"method":"GET","params":{},"url":"/gitignore/templates"}},"interactions":{"addOrUpdateRestrictionsForOrg":{"headers":{"accept":"application/vnd.github.sombra-preview+json"},"method":"PUT","params":{"limit":{"enum":["existing_users","contributors_only","collaborators_only"],"required":true,"type":"string"},"org":{"required":true,"type":"string"}},"url":"/orgs/:org/interaction-limits"},"addOrUpdateRestrictionsForRepo":{"headers":{"accept":"application/vnd.github.sombra-preview+json"},"method":"PUT","params":{"limit":{"enum":["existing_users","contributors_only","collaborators_only"],"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/interaction-limits"},"getRestrictionsForOrg":{"headers":{"accept":"application/vnd.github.sombra-preview+json"},"method":"GET","params":{"org":{"required":true,"type":"string"}},"url":"/orgs/:org/interaction-limits"},"getRestrictionsForRepo":{"headers":{"accept":"application/vnd.github.sombra-preview+json"},"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/interaction-limits"},"removeRestrictionsForOrg":{"headers":{"accept":"application/vnd.github.sombra-preview+json"},"method":"DELETE","params":{"org":{"required":true,"type":"string"}},"url":"/orgs/:org/interaction-limits"},"removeRestrictionsForRepo":{"headers":{"accept":"application/vnd.github.sombra-preview+json"},"method":"DELETE","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/interaction-limits"}},"issues":{"addAssignees":{"method":"POST","params":{"assignees":{"type":"string[]"},"issue_number":{"required":true,"type":"integer"},"number":{"alias":"issue_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/issues/:issue_number/assignees"},"addLabels":{"method":"POST","params":{"issue_number":{"required":true,"type":"integer"},"labels":{"required":true,"type":"string[]"},"number":{"alias":"issue_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/issues/:issue_number/labels"},"checkAssignee":{"method":"GET","params":{"assignee":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/assignees/:assignee"},"create":{"method":"POST","params":{"assignee":{"type":"string"},"assignees":{"type":"string[]"},"body":{"type":"string"},"labels":{"type":"string[]"},"milestone":{"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"title":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/issues"},"createComment":{"method":"POST","params":{"body":{"required":true,"type":"string"},"issue_number":{"required":true,"type":"integer"},"number":{"alias":"issue_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/issues/:issue_number/comments"},"createLabel":{"method":"POST","params":{"color":{"required":true,"type":"string"},"description":{"type":"string"},"name":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/labels"},"createMilestone":{"method":"POST","params":{"description":{"type":"string"},"due_on":{"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"state":{"enum":["open","closed"],"type":"string"},"title":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/milestones"},"deleteComment":{"method":"DELETE","params":{"comment_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/issues/comments/:comment_id"},"deleteLabel":{"method":"DELETE","params":{"name":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/labels/:name"},"deleteMilestone":{"method":"DELETE","params":{"milestone_number":{"required":true,"type":"integer"},"number":{"alias":"milestone_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/milestones/:milestone_number"},"get":{"method":"GET","params":{"issue_number":{"required":true,"type":"integer"},"number":{"alias":"issue_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/issues/:issue_number"},"getComment":{"method":"GET","params":{"comment_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"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":{"deprecated":"octokit.oauthAuthorizations.checkAuthorization() has been renamed to octokit.apps.checkAuthorization() (2019-11-05)","method":"GET","params":{"access_token":{"required":true,"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/tokens/:access_token"},"createAuthorization":{"deprecated":"octokit.oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization","method":"POST","params":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"fingerprint":{"type":"string"},"note":{"required":true,"type":"string"},"note_url":{"type":"string"},"scopes":{"type":"string[]"}},"url":"/authorizations"},"deleteAuthorization":{"deprecated":"octokit.oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization","method":"DELETE","params":{"authorization_id":{"required":true,"type":"integer"}},"url":"/authorizations/:authorization_id"},"deleteGrant":{"deprecated":"octokit.oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant","method":"DELETE","params":{"grant_id":{"required":true,"type":"integer"}},"url":"/applications/grants/:grant_id"},"getAuthorization":{"deprecated":"octokit.oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization","method":"GET","params":{"authorization_id":{"required":true,"type":"integer"}},"url":"/authorizations/:authorization_id"},"getGrant":{"deprecated":"octokit.oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant","method":"GET","params":{"grant_id":{"required":true,"type":"integer"}},"url":"/applications/grants/:grant_id"},"getOrCreateAuthorizationForApp":{"deprecated":"octokit.oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app","method":"PUT","params":{"client_id":{"required":true,"type":"string"},"client_secret":{"required":true,"type":"string"},"fingerprint":{"type":"string"},"note":{"type":"string"},"note_url":{"type":"string"},"scopes":{"type":"string[]"}},"url":"/authorizations/clients/:client_id"},"getOrCreateAuthorizationForAppAndFingerprint":{"deprecated":"octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint","method":"PUT","params":{"client_id":{"required":true,"type":"string"},"client_secret":{"required":true,"type":"string"},"fingerprint":{"required":true,"type":"string"},"note":{"type":"string"},"note_url":{"type":"string"},"scopes":{"type":"string[]"}},"url":"/authorizations/clients/:client_id/:fingerprint"},"getOrCreateAuthorizationForAppFingerprint":{"deprecated":"octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() has been renamed to octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() (2018-12-27)","method":"PUT","params":{"client_id":{"required":true,"type":"string"},"client_secret":{"required":true,"type":"string"},"fingerprint":{"required":true,"type":"string"},"note":{"type":"string"},"note_url":{"type":"string"},"scopes":{"type":"string[]"}},"url":"/authorizations/clients/:client_id/:fingerprint"},"listAuthorizations":{"deprecated":"octokit.oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations","method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/authorizations"},"listGrants":{"deprecated":"octokit.oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants","method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/applications/grants"},"resetAuthorization":{"deprecated":"octokit.oauthAuthorizations.resetAuthorization() has been renamed to octokit.apps.resetAuthorization() (2019-11-05)","method":"POST","params":{"access_token":{"required":true,"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/tokens/:access_token"},"revokeAuthorizationForApplication":{"deprecated":"octokit.oauthAuthorizations.revokeAuthorizationForApplication() has been renamed to octokit.apps.revokeAuthorizationForApplication() (2019-11-05)","method":"DELETE","params":{"access_token":{"required":true,"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/tokens/:access_token"},"revokeGrantForApplication":{"deprecated":"octokit.oauthAuthorizations.revokeGrantForApplication() has been renamed to octokit.apps.revokeGrantForApplication() (2019-11-05)","method":"DELETE","params":{"access_token":{"required":true,"type":"string"},"client_id":{"required":true,"type":"string"}},"url":"/applications/:client_id/grants/:access_token"},"updateAuthorization":{"deprecated":"octokit.oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization","method":"PATCH","params":{"add_scopes":{"type":"string[]"},"authorization_id":{"required":true,"type":"integer"},"fingerprint":{"type":"string"},"note":{"type":"string"},"note_url":{"type":"string"},"remove_scopes":{"type":"string[]"},"scopes":{"type":"string[]"}},"url":"/authorizations/:authorization_id"}},"orgs":{"addOrUpdateMembership":{"method":"PUT","params":{"org":{"required":true,"type":"string"},"role":{"enum":["admin","member"],"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/memberships/:username"},"blockUser":{"method":"PUT","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/blocks/:username"},"checkBlockedUser":{"method":"GET","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/blocks/:username"},"checkMembership":{"method":"GET","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/members/:username"},"checkPublicMembership":{"method":"GET","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/public_members/:username"},"concealMembership":{"method":"DELETE","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/public_members/:username"},"convertMemberToOutsideCollaborator":{"method":"PUT","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/outside_collaborators/:username"},"createHook":{"method":"POST","params":{"active":{"type":"boolean"},"config":{"required":true,"type":"object"},"config.content_type":{"type":"string"},"config.insecure_ssl":{"type":"string"},"config.secret":{"type":"string"},"config.url":{"required":true,"type":"string"},"events":{"type":"string[]"},"name":{"required":true,"type":"string"},"org":{"required":true,"type":"string"}},"url":"/orgs/:org/hooks"},"createInvitation":{"method":"POST","params":{"email":{"type":"string"},"invitee_id":{"type":"integer"},"org":{"required":true,"type":"string"},"role":{"enum":["admin","direct_member","billing_manager"],"type":"string"},"team_ids":{"type":"integer[]"}},"url":"/orgs/:org/invitations"},"deleteHook":{"method":"DELETE","params":{"hook_id":{"required":true,"type":"integer"},"org":{"required":true,"type":"string"}},"url":"/orgs/:org/hooks/:hook_id"},"get":{"method":"GET","params":{"org":{"required":true,"type":"string"}},"url":"/orgs/:org"},"getHook":{"method":"GET","params":{"hook_id":{"required":true,"type":"integer"},"org":{"required":true,"type":"string"}},"url":"/orgs/:org/hooks/:hook_id"},"getMembership":{"method":"GET","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/memberships/:username"},"getMembershipForAuthenticatedUser":{"method":"GET","params":{"org":{"required":true,"type":"string"}},"url":"/user/memberships/orgs/:org"},"list":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"},"since":{"type":"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"},"listInstallations":{"headers":{"accept":"application/vnd.github.machine-man-preview+json"},"method":"GET","params":{"org":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/orgs/:org/installations"},"listInvitationTeams":{"method":"GET","params":{"invitation_id":{"required":true,"type":"integer"},"org":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/orgs/:org/invitations/:invitation_id/teams"},"listMembers":{"method":"GET","params":{"filter":{"enum":["2fa_disabled","all"],"type":"string"},"org":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"role":{"enum":["all","admin","member"],"type":"string"}},"url":"/orgs/:org/members"},"listMemberships":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"},"state":{"enum":["active","pending"],"type":"string"}},"url":"/user/memberships/orgs"},"listOutsideCollaborators":{"method":"GET","params":{"filter":{"enum":["2fa_disabled","all"],"type":"string"},"org":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/orgs/:org/outside_collaborators"},"listPendingInvitations":{"method":"GET","params":{"org":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/orgs/:org/invitations"},"listPublicMembers":{"method":"GET","params":{"org":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/orgs/:org/public_members"},"pingHook":{"method":"POST","params":{"hook_id":{"required":true,"type":"integer"},"org":{"required":true,"type":"string"}},"url":"/orgs/:org/hooks/:hook_id/pings"},"publicizeMembership":{"method":"PUT","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/public_members/:username"},"removeMember":{"method":"DELETE","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/members/:username"},"removeMembership":{"method":"DELETE","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/memberships/:username"},"removeOutsideCollaborator":{"method":"DELETE","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/outside_collaborators/:username"},"unblockUser":{"method":"DELETE","params":{"org":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/orgs/:org/blocks/:username"},"update":{"method":"PATCH","params":{"billing_email":{"type":"string"},"company":{"type":"string"},"default_repository_permission":{"enum":["read","write","admin","none"],"type":"string"},"description":{"type":"string"},"email":{"type":"string"},"has_organization_projects":{"type":"boolean"},"has_repository_projects":{"type":"boolean"},"location":{"type":"string"},"members_allowed_repository_creation_type":{"enum":["all","private","none"],"type":"string"},"members_can_create_repositories":{"type":"boolean"},"name":{"type":"string"},"org":{"required":true,"type":"string"}},"url":"/orgs/:org"},"updateHook":{"method":"PATCH","params":{"active":{"type":"boolean"},"config":{"type":"object"},"config.content_type":{"type":"string"},"config.insecure_ssl":{"type":"string"},"config.secret":{"type":"string"},"config.url":{"required":true,"type":"string"},"events":{"type":"string[]"},"hook_id":{"required":true,"type":"integer"},"org":{"required":true,"type":"string"}},"url":"/orgs/:org/hooks/:hook_id"},"updateMembership":{"method":"PATCH","params":{"org":{"required":true,"type":"string"},"state":{"enum":["active"],"required":true,"type":"string"}},"url":"/user/memberships/orgs/:org"}},"projects":{"addCollaborator":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"PUT","params":{"permission":{"enum":["read","write","admin"],"type":"string"},"project_id":{"required":true,"type":"integer"},"username":{"required":true,"type":"string"}},"url":"/projects/:project_id/collaborators/:username"},"createCard":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"POST","params":{"column_id":{"required":true,"type":"integer"},"content_id":{"type":"integer"},"content_type":{"type":"string"},"note":{"type":"string"}},"url":"/projects/columns/:column_id/cards"},"createColumn":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"POST","params":{"name":{"required":true,"type":"string"},"project_id":{"required":true,"type":"integer"}},"url":"/projects/:project_id/columns"},"createForAuthenticatedUser":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"POST","params":{"body":{"type":"string"},"name":{"required":true,"type":"string"}},"url":"/user/projects"},"createForOrg":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"POST","params":{"body":{"type":"string"},"name":{"required":true,"type":"string"},"org":{"required":true,"type":"string"}},"url":"/orgs/:org/projects"},"createForRepo":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"POST","params":{"body":{"type":"string"},"name":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/projects"},"delete":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"DELETE","params":{"project_id":{"required":true,"type":"integer"}},"url":"/projects/:project_id"},"deleteCard":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"DELETE","params":{"card_id":{"required":true,"type":"integer"}},"url":"/projects/columns/cards/:card_id"},"deleteColumn":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"DELETE","params":{"column_id":{"required":true,"type":"integer"}},"url":"/projects/columns/:column_id"},"get":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"GET","params":{"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"},"private":{"type":"boolean"},"project_id":{"required":true,"type":"integer"},"state":{"enum":["open","closed"],"type":"string"}},"url":"/projects/:project_id"},"updateCard":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"PATCH","params":{"archived":{"type":"boolean"},"card_id":{"required":true,"type":"integer"},"note":{"type":"string"}},"url":"/projects/columns/cards/:card_id"},"updateColumn":{"headers":{"accept":"application/vnd.github.inertia-preview+json"},"method":"PATCH","params":{"column_id":{"required":true,"type":"integer"},"name":{"required":true,"type":"string"}},"url":"/projects/columns/:column_id"}},"pulls":{"checkIfMerged":{"method":"GET","params":{"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/merge"},"create":{"method":"POST","params":{"base":{"required":true,"type":"string"},"body":{"type":"string"},"draft":{"type":"boolean"},"head":{"required":true,"type":"string"},"maintainer_can_modify":{"type":"boolean"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"title":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls"},"createComment":{"method":"POST","params":{"body":{"required":true,"type":"string"},"commit_id":{"required":true,"type":"string"},"in_reply_to":{"deprecated":true,"description":"The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.","type":"integer"},"line":{"type":"integer"},"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"path":{"required":true,"type":"string"},"position":{"type":"integer"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"side":{"enum":["LEFT","RIGHT"],"type":"string"},"start_line":{"type":"integer"},"start_side":{"enum":["LEFT","RIGHT","side"],"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/comments"},"createCommentReply":{"deprecated":"octokit.pulls.createCommentReply() has been renamed to octokit.pulls.createComment() (2019-09-09)","method":"POST","params":{"body":{"required":true,"type":"string"},"commit_id":{"required":true,"type":"string"},"in_reply_to":{"deprecated":true,"description":"The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.","type":"integer"},"line":{"type":"integer"},"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"path":{"required":true,"type":"string"},"position":{"type":"integer"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"side":{"enum":["LEFT","RIGHT"],"type":"string"},"start_line":{"type":"integer"},"start_side":{"enum":["LEFT","RIGHT","side"],"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/comments"},"createFromIssue":{"deprecated":"octokit.pulls.createFromIssue() is deprecated, see https://developer.github.com/v3/pulls/#create-a-pull-request","method":"POST","params":{"base":{"required":true,"type":"string"},"draft":{"type":"boolean"},"head":{"required":true,"type":"string"},"issue":{"required":true,"type":"integer"},"maintainer_can_modify":{"type":"boolean"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls"},"createReview":{"method":"POST","params":{"body":{"type":"string"},"comments":{"type":"object[]"},"comments[].body":{"required":true,"type":"string"},"comments[].path":{"required":true,"type":"string"},"comments[].position":{"required":true,"type":"integer"},"commit_id":{"type":"string"},"event":{"enum":["APPROVE","REQUEST_CHANGES","COMMENT"],"type":"string"},"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/reviews"},"createReviewCommentReply":{"method":"POST","params":{"body":{"required":true,"type":"string"},"comment_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/comments/:comment_id/replies"},"createReviewRequest":{"method":"POST","params":{"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"reviewers":{"type":"string[]"},"team_reviewers":{"type":"string[]"}},"url":"/repos/:owner/:repo/pulls/:pull_number/requested_reviewers"},"deleteComment":{"method":"DELETE","params":{"comment_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/comments/:comment_id"},"deletePendingReview":{"method":"DELETE","params":{"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"review_id":{"required":true,"type":"integer"}},"url":"/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id"},"deleteReviewRequest":{"method":"DELETE","params":{"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"reviewers":{"type":"string[]"},"team_reviewers":{"type":"string[]"}},"url":"/repos/:owner/:repo/pulls/:pull_number/requested_reviewers"},"dismissReview":{"method":"PUT","params":{"message":{"required":true,"type":"string"},"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"review_id":{"required":true,"type":"integer"}},"url":"/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals"},"get":{"method":"GET","params":{"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number"},"getComment":{"method":"GET","params":{"comment_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/comments/:comment_id"},"getCommentsForReview":{"method":"GET","params":{"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"review_id":{"required":true,"type":"integer"}},"url":"/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments"},"getReview":{"method":"GET","params":{"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"review_id":{"required":true,"type":"integer"}},"url":"/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id"},"list":{"method":"GET","params":{"base":{"type":"string"},"direction":{"enum":["asc","desc"],"type":"string"},"head":{"type":"string"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"},"sort":{"enum":["created","updated","popularity","long-running"],"type":"string"},"state":{"enum":["open","closed","all"],"type":"string"}},"url":"/repos/:owner/:repo/pulls"},"listComments":{"method":"GET","params":{"direction":{"enum":["asc","desc"],"type":"string"},"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"since":{"type":"string"},"sort":{"enum":["created","updated"],"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/comments"},"listCommentsForRepo":{"method":"GET","params":{"direction":{"enum":["asc","desc"],"type":"string"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"},"since":{"type":"string"},"sort":{"enum":["created","updated"],"type":"string"}},"url":"/repos/:owner/:repo/pulls/comments"},"listCommits":{"method":"GET","params":{"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/commits"},"listFiles":{"method":"GET","params":{"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/files"},"listReviewRequests":{"method":"GET","params":{"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/requested_reviewers"},"listReviews":{"method":"GET","params":{"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/reviews"},"merge":{"method":"PUT","params":{"commit_message":{"type":"string"},"commit_title":{"type":"string"},"merge_method":{"enum":["merge","squash","rebase"],"type":"string"},"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"sha":{"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/merge"},"submitReview":{"method":"POST","params":{"body":{"type":"string"},"event":{"enum":["APPROVE","REQUEST_CHANGES","COMMENT"],"required":true,"type":"string"},"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"review_id":{"required":true,"type":"integer"}},"url":"/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events"},"update":{"method":"PATCH","params":{"base":{"type":"string"},"body":{"type":"string"},"maintainer_can_modify":{"type":"boolean"},"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"state":{"enum":["open","closed"],"type":"string"},"title":{"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number"},"updateBranch":{"headers":{"accept":"application/vnd.github.lydian-preview+json"},"method":"PUT","params":{"expected_head_sha":{"type":"string"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/:pull_number/update-branch"},"updateComment":{"method":"PATCH","params":{"body":{"required":true,"type":"string"},"comment_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/comments/:comment_id"},"updateReview":{"method":"PUT","params":{"body":{"required":true,"type":"string"},"number":{"alias":"pull_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"pull_number":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"review_id":{"required":true,"type":"integer"}},"url":"/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id"}},"rateLimit":{"get":{"method":"GET","params":{},"url":"/rate_limit"}},"reactions":{"createForCommitComment":{"headers":{"accept":"application/vnd.github.squirrel-girl-preview+json"},"method":"POST","params":{"comment_id":{"required":true,"type":"integer"},"content":{"enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/comments/:comment_id/reactions"},"createForIssue":{"headers":{"accept":"application/vnd.github.squirrel-girl-preview+json"},"method":"POST","params":{"content":{"enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"required":true,"type":"string"},"issue_number":{"required":true,"type":"integer"},"number":{"alias":"issue_number","deprecated":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/issues/:issue_number/reactions"},"createForIssueComment":{"headers":{"accept":"application/vnd.github.squirrel-girl-preview+json"},"method":"POST","params":{"comment_id":{"required":true,"type":"integer"},"content":{"enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/issues/comments/:comment_id/reactions"},"createForPullRequestReviewComment":{"headers":{"accept":"application/vnd.github.squirrel-girl-preview+json"},"method":"POST","params":{"comment_id":{"required":true,"type":"integer"},"content":{"enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pulls/comments/:comment_id/reactions"},"createForTeamDiscussion":{"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"},"addProtectedBranchAppRestrictions":{"method":"POST","params":{"apps":{"mapTo":"data","required":true,"type":"string[]"},"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"},"addProtectedBranchRequiredSignatures":{"headers":{"accept":"application/vnd.github.zzzax-preview+json"},"method":"POST","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_signatures"},"addProtectedBranchRequiredStatusChecksContexts":{"method":"POST","params":{"branch":{"required":true,"type":"string"},"contexts":{"mapTo":"data","required":true,"type":"string[]"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"},"addProtectedBranchTeamRestrictions":{"method":"POST","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"teams":{"mapTo":"data","required":true,"type":"string[]"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"},"addProtectedBranchUserRestrictions":{"method":"POST","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"users":{"mapTo":"data","required":true,"type":"string[]"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/users"},"checkCollaborator":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/collaborators/:username"},"checkVulnerabilityAlerts":{"headers":{"accept":"application/vnd.github.dorian-preview+json"},"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/vulnerability-alerts"},"compareCommits":{"method":"GET","params":{"base":{"required":true,"type":"string"},"head":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/compare/:base...:head"},"createCommitComment":{"method":"POST","params":{"body":{"required":true,"type":"string"},"commit_sha":{"required":true,"type":"string"},"line":{"type":"integer"},"owner":{"required":true,"type":"string"},"path":{"type":"string"},"position":{"type":"integer"},"repo":{"required":true,"type":"string"},"sha":{"alias":"commit_sha","deprecated":true,"type":"string"}},"url":"/repos/:owner/:repo/commits/:commit_sha/comments"},"createDeployment":{"method":"POST","params":{"auto_merge":{"type":"boolean"},"description":{"type":"string"},"environment":{"type":"string"},"owner":{"required":true,"type":"string"},"payload":{"type":"string"},"production_environment":{"type":"boolean"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"required_contexts":{"type":"string[]"},"task":{"type":"string"},"transient_environment":{"type":"boolean"}},"url":"/repos/:owner/:repo/deployments"},"createDeploymentStatus":{"method":"POST","params":{"auto_inactive":{"type":"boolean"},"deployment_id":{"required":true,"type":"integer"},"description":{"type":"string"},"environment":{"enum":["production","staging","qa"],"type":"string"},"environment_url":{"type":"string"},"log_url":{"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"state":{"enum":["error","failure","inactive","in_progress","queued","pending","success"],"required":true,"type":"string"},"target_url":{"type":"string"}},"url":"/repos/:owner/:repo/deployments/:deployment_id/statuses"},"createDispatchEvent":{"headers":{"accept":"application/vnd.github.everest-preview+json"},"method":"POST","params":{"client_payload":{"type":"object"},"event_type":{"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/dispatches"},"createFile":{"deprecated":"octokit.repos.createFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)","method":"PUT","params":{"author":{"type":"object"},"author.email":{"required":true,"type":"string"},"author.name":{"required":true,"type":"string"},"branch":{"type":"string"},"committer":{"type":"object"},"committer.email":{"required":true,"type":"string"},"committer.name":{"required":true,"type":"string"},"content":{"required":true,"type":"string"},"message":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"path":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"sha":{"type":"string"}},"url":"/repos/:owner/:repo/contents/:path"},"createForAuthenticatedUser":{"method":"POST","params":{"allow_merge_commit":{"type":"boolean"},"allow_rebase_merge":{"type":"boolean"},"allow_squash_merge":{"type":"boolean"},"auto_init":{"type":"boolean"},"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"},"getAppsWithAccessToProtectedBranch":{"method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"},"getArchiveLink":{"method":"GET","params":{"archive_format":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/:archive_format/:ref"},"getBranch":{"method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch"},"getBranchProtection":{"method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection"},"getClones":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"per":{"enum":["day","week"],"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/traffic/clones"},"getCodeFrequencyStats":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/stats/code_frequency"},"getCollaboratorPermissionLevel":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/collaborators/:username/permission"},"getCombinedStatusForRef":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/commits/:ref/status"},"getCommit":{"method":"GET","params":{"commit_sha":{"alias":"ref","deprecated":true,"type":"string"},"owner":{"required":true,"type":"string"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"sha":{"alias":"ref","deprecated":true,"type":"string"}},"url":"/repos/:owner/:repo/commits/:ref"},"getCommitActivityStats":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/stats/commit_activity"},"getCommitComment":{"method":"GET","params":{"comment_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/comments/:comment_id"},"getCommitRefSha":{"deprecated":"octokit.repos.getCommitRefSha() is deprecated, see https://developer.github.com/v3/repos/commits/#get-a-single-commit","headers":{"accept":"application/vnd.github.v3.sha"},"method":"GET","params":{"owner":{"required":true,"type":"string"},"ref":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/commits/:ref"},"getContents":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"path":{"required":true,"type":"string"},"ref":{"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/contents/:path"},"getContributorsStats":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/stats/contributors"},"getDeployKey":{"method":"GET","params":{"key_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/keys/:key_id"},"getDeployment":{"method":"GET","params":{"deployment_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/deployments/:deployment_id"},"getDeploymentStatus":{"method":"GET","params":{"deployment_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"status_id":{"required":true,"type":"integer"}},"url":"/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id"},"getDownload":{"method":"GET","params":{"download_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/downloads/:download_id"},"getHook":{"method":"GET","params":{"hook_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/hooks/:hook_id"},"getLatestPagesBuild":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pages/builds/latest"},"getLatestRelease":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/releases/latest"},"getPages":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pages"},"getPagesBuild":{"method":"GET","params":{"build_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pages/builds/:build_id"},"getParticipationStats":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/stats/participation"},"getProtectedBranchAdminEnforcement":{"method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/enforce_admins"},"getProtectedBranchPullRequestReviewEnforcement":{"method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews"},"getProtectedBranchRequiredSignatures":{"headers":{"accept":"application/vnd.github.zzzax-preview+json"},"method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_signatures"},"getProtectedBranchRequiredStatusChecks":{"method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_status_checks"},"getProtectedBranchRestrictions":{"method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions"},"getPunchCardStats":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/stats/punch_card"},"getReadme":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"ref":{"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/readme"},"getRelease":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"release_id":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/releases/:release_id"},"getReleaseAsset":{"method":"GET","params":{"asset_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/releases/assets/:asset_id"},"getReleaseByTag":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"tag":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/releases/tags/:tag"},"getTeamsWithAccessToProtectedBranch":{"method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"},"getTopPaths":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/traffic/popular/paths"},"getTopReferrers":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/traffic/popular/referrers"},"getUsersWithAccessToProtectedBranch":{"method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/users"},"getViews":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"per":{"enum":["day","week"],"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/traffic/views"},"list":{"method":"GET","params":{"affiliation":{"type":"string"},"direction":{"enum":["asc","desc"],"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"sort":{"enum":["created","updated","pushed","full_name"],"type":"string"},"type":{"enum":["all","owner","public","private","member"],"type":"string"},"visibility":{"enum":["all","public","private"],"type":"string"}},"url":"/user/repos"},"listAppsWithAccessToProtectedBranch":{"deprecated":"octokit.repos.listAppsWithAccessToProtectedBranch() has been renamed to octokit.repos.getAppsWithAccessToProtectedBranch() (2019-09-13)","method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"},"listAssetsForRelease":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"release_id":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/releases/:release_id/assets"},"listBranches":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"protected":{"type":"boolean"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches"},"listBranchesForHeadCommit":{"headers":{"accept":"application/vnd.github.groot-preview+json"},"method":"GET","params":{"commit_sha":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/commits/:commit_sha/branches-where-head"},"listCollaborators":{"method":"GET","params":{"affiliation":{"enum":["outside","direct","all"],"type":"string"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/collaborators"},"listCommentsForCommit":{"method":"GET","params":{"commit_sha":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"ref":{"alias":"commit_sha","deprecated":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/commits/:commit_sha/comments"},"listCommitComments":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/comments"},"listCommits":{"method":"GET","params":{"author":{"type":"string"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"path":{"type":"string"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"},"sha":{"type":"string"},"since":{"type":"string"},"until":{"type":"string"}},"url":"/repos/:owner/:repo/commits"},"listContributors":{"method":"GET","params":{"anon":{"type":"string"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/contributors"},"listDeployKeys":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/keys"},"listDeploymentStatuses":{"method":"GET","params":{"deployment_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/deployments/:deployment_id/statuses"},"listDeployments":{"method":"GET","params":{"environment":{"type":"string"},"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"ref":{"type":"string"},"repo":{"required":true,"type":"string"},"sha":{"type":"string"},"task":{"type":"string"}},"url":"/repos/:owner/:repo/deployments"},"listDownloads":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/downloads"},"listForOrg":{"method":"GET","params":{"direction":{"enum":["asc","desc"],"type":"string"},"org":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"sort":{"enum":["created","updated","pushed","full_name"],"type":"string"},"type":{"enum":["all","public","private","forks","sources","member"],"type":"string"}},"url":"/orgs/:org/repos"},"listForUser":{"method":"GET","params":{"direction":{"enum":["asc","desc"],"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"sort":{"enum":["created","updated","pushed","full_name"],"type":"string"},"type":{"enum":["all","owner","member"],"type":"string"},"username":{"required":true,"type":"string"}},"url":"/users/:username/repos"},"listForks":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"},"sort":{"enum":["newest","oldest","stargazers"],"type":"string"}},"url":"/repos/:owner/:repo/forks"},"listHooks":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/hooks"},"listInvitations":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/invitations"},"listInvitationsForAuthenticatedUser":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"}},"url":"/user/repository_invitations"},"listLanguages":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/languages"},"listPagesBuilds":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pages/builds"},"listProtectedBranchRequiredStatusChecksContexts":{"method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"},"listProtectedBranchTeamRestrictions":{"deprecated":"octokit.repos.listProtectedBranchTeamRestrictions() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-09)","method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"},"listProtectedBranchUserRestrictions":{"deprecated":"octokit.repos.listProtectedBranchUserRestrictions() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-09)","method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/users"},"listPublic":{"method":"GET","params":{"page":{"type":"integer"},"per_page":{"type":"integer"},"since":{"type":"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"},"listTeamsWithAccessToProtectedBranch":{"deprecated":"octokit.repos.listTeamsWithAccessToProtectedBranch() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-13)","method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"},"listTopics":{"headers":{"accept":"application/vnd.github.mercy-preview+json"},"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/topics"},"listUsersWithAccessToProtectedBranch":{"deprecated":"octokit.repos.listUsersWithAccessToProtectedBranch() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-13)","method":"GET","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/users"},"merge":{"method":"POST","params":{"base":{"required":true,"type":"string"},"commit_message":{"type":"string"},"head":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/merges"},"pingHook":{"method":"POST","params":{"hook_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/hooks/:hook_id/pings"},"removeBranchProtection":{"method":"DELETE","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection"},"removeCollaborator":{"method":"DELETE","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"username":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/collaborators/:username"},"removeDeployKey":{"method":"DELETE","params":{"key_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/keys/:key_id"},"removeProtectedBranchAdminEnforcement":{"method":"DELETE","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/enforce_admins"},"removeProtectedBranchAppRestrictions":{"method":"DELETE","params":{"apps":{"mapTo":"data","required":true,"type":"string[]"},"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"},"removeProtectedBranchPullRequestReviewEnforcement":{"method":"DELETE","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews"},"removeProtectedBranchRequiredSignatures":{"headers":{"accept":"application/vnd.github.zzzax-preview+json"},"method":"DELETE","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_signatures"},"removeProtectedBranchRequiredStatusChecks":{"method":"DELETE","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_status_checks"},"removeProtectedBranchRequiredStatusChecksContexts":{"method":"DELETE","params":{"branch":{"required":true,"type":"string"},"contexts":{"mapTo":"data","required":true,"type":"string[]"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"},"removeProtectedBranchRestrictions":{"method":"DELETE","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions"},"removeProtectedBranchTeamRestrictions":{"method":"DELETE","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"teams":{"mapTo":"data","required":true,"type":"string[]"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"},"removeProtectedBranchUserRestrictions":{"method":"DELETE","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"users":{"mapTo":"data","required":true,"type":"string[]"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/users"},"replaceProtectedBranchAppRestrictions":{"method":"PUT","params":{"apps":{"mapTo":"data","required":true,"type":"string[]"},"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"},"replaceProtectedBranchRequiredStatusChecksContexts":{"method":"PUT","params":{"branch":{"required":true,"type":"string"},"contexts":{"mapTo":"data","required":true,"type":"string[]"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"},"replaceProtectedBranchTeamRestrictions":{"method":"PUT","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"teams":{"mapTo":"data","required":true,"type":"string[]"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"},"replaceProtectedBranchUserRestrictions":{"method":"PUT","params":{"branch":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"users":{"mapTo":"data","required":true,"type":"string[]"}},"url":"/repos/:owner/:repo/branches/:branch/protection/restrictions/users"},"replaceTopics":{"headers":{"accept":"application/vnd.github.mercy-preview+json"},"method":"PUT","params":{"names":{"required":true,"type":"string[]"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/topics"},"requestPageBuild":{"method":"POST","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/pages/builds"},"retrieveCommunityProfileMetrics":{"method":"GET","params":{"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/community/profile"},"testPushHook":{"method":"POST","params":{"hook_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/hooks/:hook_id/tests"},"transfer":{"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.apps":{"type":"string[]"},"restrictions.teams":{"required":true,"type":"string[]"},"restrictions.users":{"required":true,"type":"string[]"}},"url":"/repos/:owner/:repo/branches/:branch/protection"},"updateCommitComment":{"method":"PATCH","params":{"body":{"required":true,"type":"string"},"comment_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/comments/:comment_id"},"updateFile":{"deprecated":"octokit.repos.updateFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)","method":"PUT","params":{"author":{"type":"object"},"author.email":{"required":true,"type":"string"},"author.name":{"required":true,"type":"string"},"branch":{"type":"string"},"committer":{"type":"object"},"committer.email":{"required":true,"type":"string"},"committer.name":{"required":true,"type":"string"},"content":{"required":true,"type":"string"},"message":{"required":true,"type":"string"},"owner":{"required":true,"type":"string"},"path":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"sha":{"type":"string"}},"url":"/repos/:owner/:repo/contents/:path"},"updateHook":{"method":"PATCH","params":{"active":{"type":"boolean"},"add_events":{"type":"string[]"},"config":{"type":"object"},"config.content_type":{"type":"string"},"config.insecure_ssl":{"type":"string"},"config.secret":{"type":"string"},"config.url":{"required":true,"type":"string"},"events":{"type":"string[]"},"hook_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"remove_events":{"type":"string[]"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/hooks/:hook_id"},"updateInformationAboutPagesSite":{"method":"PUT","params":{"cname":{"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"source":{"enum":["\"gh-pages\"","\"master\"","\"master /docs\""],"type":"string"}},"url":"/repos/:owner/:repo/pages"},"updateInvitation":{"method":"PATCH","params":{"invitation_id":{"required":true,"type":"integer"},"owner":{"required":true,"type":"string"},"permissions":{"enum":["read","write","admin"],"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/invitations/:invitation_id"},"updateProtectedBranchPullRequestReviewEnforcement":{"method":"PATCH","params":{"branch":{"required":true,"type":"string"},"dismiss_stale_reviews":{"type":"boolean"},"dismissal_restrictions":{"type":"object"},"dismissal_restrictions.teams":{"type":"string[]"},"dismissal_restrictions.users":{"type":"string[]"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"require_code_owner_reviews":{"type":"boolean"},"required_approving_review_count":{"type":"integer"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews"},"updateProtectedBranchRequiredStatusChecks":{"method":"PATCH","params":{"branch":{"required":true,"type":"string"},"contexts":{"type":"string[]"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"},"strict":{"type":"boolean"}},"url":"/repos/:owner/:repo/branches/:branch/protection/required_status_checks"},"updateRelease":{"method":"PATCH","params":{"body":{"type":"string"},"draft":{"type":"boolean"},"name":{"type":"string"},"owner":{"required":true,"type":"string"},"prerelease":{"type":"boolean"},"release_id":{"required":true,"type":"integer"},"repo":{"required":true,"type":"string"},"tag_name":{"type":"string"},"target_commitish":{"type":"string"}},"url":"/repos/:owner/:repo/releases/:release_id"},"updateReleaseAsset":{"method":"PATCH","params":{"asset_id":{"required":true,"type":"integer"},"label":{"type":"string"},"name":{"type":"string"},"owner":{"required":true,"type":"string"},"repo":{"required":true,"type":"string"}},"url":"/repos/:owner/:repo/releases/assets/:asset_id"},"uploadReleaseAsset":{"method":"POST","params":{"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":{"deprecated":"octokit.teams.addMember() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member","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":{"deprecated":"octokit.teams.getMember() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member","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":{"deprecated":"octokit.teams.removeMember() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member","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":{"enum":["secret","closed"],"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"}}}; - -/***/ }), - -/***/ 742: -/***/ (function(module, __unusedexports, __webpack_require__) { - -var fs = __webpack_require__(747) -var core -if (process.platform === 'win32' || global.TESTING_WINDOWS) { - core = __webpack_require__(818) -} else { - core = __webpack_require__(197) -} - -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 - } - } -} - - -/***/ }), - -/***/ 747: -/***/ (function(module) { - -module.exports = require("fs"); - -/***/ }), - -/***/ 753: -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var endpoint = __webpack_require__(385); -var universalUserAgent = __webpack_require__(796); -var isPlainObject = _interopDefault(__webpack_require__(548)); -var nodeFetch = _interopDefault(__webpack_require__(454)); -var requestError = __webpack_require__(463); - -const VERSION = "5.3.1"; - -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 { - let responseBody = JSON.parse(error.message); - Object.assign(error, responseBody); - let errors = responseBody.errors; // Assumption `errors` would always be in Array Fotmat - - error.message = error.message + ": " + errors.map(JSON.stringify).join(", "); - } 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 - - -/***/ }), - -/***/ 761: -/***/ (function(module) { - -module.exports = require("zlib"); - -/***/ }), - -/***/ 763: -/***/ (function(module) { - -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) -} - - -/***/ }), - -/***/ 768: -/***/ (function(module) { - -"use strict"; - -module.exports = function (x) { - var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt(); - var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt(); - - if (x[x.length - 1] === lf) { - x = x.slice(0, x.length - 1); - } - - if (x[x.length - 1] === cr) { - x = x.slice(0, x.length - 1); - } - - return x; -}; - - -/***/ }), - -/***/ 777: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = getFirstPage - -const getPage = __webpack_require__(265) - -function getFirstPage (octokit, link, headers) { - return getPage(octokit, link, 'first', headers) -} - - -/***/ }), - -/***/ 796: -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"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(__webpack_require__(2)); - -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 - - -/***/ }), - -/***/ 807: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = paginate; - -const iterator = __webpack_require__(8); - -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); - }); -} - - -/***/ }), - -/***/ 814: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = which -which.sync = whichSync - -var isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' - -var path = __webpack_require__(622) -var COLON = isWindows ? ';' : ':' -var isexe = __webpack_require__(742) - -function getNotFoundError (cmd) { - var er = new Error('not found: ' + cmd) - er.code = 'ENOENT' - - return er -} - -function getPathInfo (cmd, opt) { - var colon = opt.colon || COLON - var pathEnv = opt.path || process.env.PATH || '' - var pathExt = [''] - - pathEnv = pathEnv.split(colon) - - var pathExtExe = '' - if (isWindows) { - pathEnv.unshift(process.cwd()) - pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') - pathExt = pathExtExe.split(colon) - - - // Always test the cmd itself first. isexe will check to make sure - // it's found in the pathExt set. - if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') - pathExt.unshift('') - } - - // If it has a slash, then we don't bother searching the pathenv. - // just check the file itself, and that's it. - if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) - pathEnv = [''] - - return { - env: pathEnv, - ext: pathExt, - extExe: pathExtExe - } -} - -function which (cmd, opt, cb) { - if (typeof opt === 'function') { - cb = opt - opt = {} - } - - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var pathExtExe = info.extExe - var found = [] - - ;(function F (i, l) { - if (i === l) { - if (opt.all && found.length) - return cb(null, found) - else - return cb(getNotFoundError(cmd)) - } - - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) - - var p = path.join(pathPart, cmd) - if (!pathPart && (/^\.[\\\/]/).test(cmd)) { - p = cmd.slice(0, 2) + p - } - ;(function E (ii, ll) { - if (ii === ll) return F(i + 1, l) - var ext = pathExt[ii] - isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { - if (!er && is) { - if (opt.all) - found.push(p + ext) - else - return cb(null, p + ext) - } - return E(ii + 1, ll) - }) - })(0, pathExt.length) - })(0, pathEnv.length) -} - -function whichSync (cmd, opt) { - opt = opt || {} - - var info = getPathInfo(cmd, opt) - var pathEnv = info.env - var pathExt = info.ext - var pathExtExe = info.extExe - var found = [] - - for (var i = 0, l = pathEnv.length; i < l; i ++) { - var pathPart = pathEnv[i] - if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') - pathPart = pathPart.slice(1, -1) - - var p = path.join(pathPart, cmd) - if (!pathPart && /^\.[\\\/]/.test(cmd)) { - p = cmd.slice(0, 2) + p - } - for (var j = 0, ll = pathExt.length; j < ll; j ++) { - var cur = p + pathExt[j] - var is - try { - is = isexe.sync(cur, { pathExt: pathExtExe }) - if (is) { - if (opt.all) - found.push(cur) - else - return cur - } - } catch (ex) {} - } - } - - if (opt.all && found.length) - return found - - if (opt.nothrow) - return null - - throw getNotFoundError(cmd) -} - - -/***/ }), - -/***/ 816: -/***/ (function(module) { - -"use strict"; - -module.exports = /^#!.*/; - - -/***/ }), - -/***/ 818: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = isexe -isexe.sync = sync - -var fs = __webpack_require__(747) - -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) -} - - -/***/ }), - -/***/ 835: -/***/ (function(module) { - -module.exports = require("url"); - -/***/ }), - -/***/ 850: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = paginationMethodsPlugin - -function paginationMethodsPlugin (octokit) { - octokit.getFirstPage = __webpack_require__(777).bind(null, octokit) - octokit.getLastPage = __webpack_require__(649).bind(null, octokit) - octokit.getNextPage = __webpack_require__(550).bind(null, octokit) - octokit.getPreviousPage = __webpack_require__(563).bind(null, octokit) - octokit.hasFirstPage = __webpack_require__(536) - octokit.hasLastPage = __webpack_require__(336) - octokit.hasNextPage = __webpack_require__(929) - octokit.hasPreviousPage = __webpack_require__(558) -} - - -/***/ }), - -/***/ 854: -/***/ (function(module) { - -/** - * 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; - - -/***/ }), - -/***/ 855: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = registerPlugin; - -const factory = __webpack_require__(47); - -function registerPlugin(plugins, pluginFunction) { - return factory( - plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction) - ); -} - - -/***/ }), - -/***/ 863: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = authenticationBeforeRequest; - -const btoa = __webpack_require__(675); - -const withAuthorizationPrefix = __webpack_require__(143); - -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); - }); -} - - -/***/ }), - -/***/ 866: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -var shebangRegex = __webpack_require__(816); - -module.exports = function (str) { - var match = str.match(shebangRegex); - - if (!match) { - return null; - } - - var arr = match[0].replace(/#! ?/, '').split(' '); - var bin = arr[0].split('/').pop(); - var arg = arr[1]; - - return (bin === 'env' ? - arg : - bin + (arg ? ' ' + arg : '') - ); -}; - - -/***/ }), - -/***/ 881: -/***/ (function(module) { - -"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, -}; - - -/***/ }), - -/***/ 883: -/***/ (function(module) { - -/** - * 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; - - -/***/ }), - -/***/ 898: -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, '__esModule', { value: true }); - -var request = __webpack_require__(753); -var universalUserAgent = __webpack_require__(796); - -const VERSION = "4.3.1"; - -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); - } - } - -} - -const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query"]; -function graphql(request, query, options) { - options = typeof query === "string" ? options = Object.assign({ - query - }, options) : 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, { - data: response.data - }); - } - - return response.data.data; - }); -} - -function withDefaults(request$1, newDefaults) { - const newRequest = request$1.defaults(newDefaults); - - const newApi = (query, options) => { - return graphql(newRequest, query, options); - }; - - return Object.assign(newApi, { - defaults: withDefaults.bind(null, newRequest), - endpoint: request.request.endpoint - }); -} - -const graphql$1 = withDefaults(request.request, { - headers: { - "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}` - }, - method: "POST", - url: "/graphql" -}); -function withCustomRequest(customRequest) { - return withDefaults(customRequest, { - method: "POST", - url: "/graphql" - }); -} - -exports.graphql = graphql$1; -exports.withCustomRequest = withCustomRequest; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 899: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = registerEndpoints; - -const { Deprecation } = __webpack_require__(692); - -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; -} - - -/***/ }), - -/***/ 906: -/***/ (function(__unusedmodule, exports) { - -"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 }); -class ChangedFiles { - constructor() { - this.updated = []; - this.created = []; - this.deleted = []; - this.files = []; - } - getOutput(files, format) { - if (format === 'json') { - return JSON.stringify(files); - } - else { - return files.join(format); - } - } - createdOutput(format) { - return this.getOutput(this.created, format); - } - fileOutput(format) { - return this.getOutput(this.files, format); - } - updatedOutput(format) { - return this.getOutput(this.updated, format); - } - deletedOutput(format) { - return this.getOutput(this.deleted, format); - } -} -exports.ChangedFiles = ChangedFiles; -function sortChangedFiles(files) { - return __awaiter(this, void 0, void 0, function* () { - return files.reduce((acc, f) => { - if (f.status === 'added' || f.added) { - acc.created.push(f.filename === undefined ? f.added : f.filename); - acc.files.push(f.filename === undefined ? f.added : f.filename); - } - if (f.status === 'removed' || f.removed) { - acc.deleted.push(f.filename === undefined ? f.removed : f.filename); - } - if (f.status === 'modified' || f.modified) { - acc.updated.push(f.filename === undefined ? f.modified : f.filename); - acc.files.push(f.filename === undefined ? f.modified : f.filename); - } - if (f.status === 'renamed') { - acc.created.push(f.filename); - acc.deleted.push(f.previous_filename); - } - return acc; - }, new ChangedFiles()); - }); -} -exports.sortChangedFiles = sortChangedFiles; - - -/***/ }), - -/***/ 929: -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = hasNextPage - -const deprecate = __webpack_require__(370) -const getPageLinks = __webpack_require__(577) - -function hasNextPage (link) { - deprecate(`octokit.hasNextPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) - return getPageLinks(link).next -} - - -/***/ }), - -/***/ 948: -/***/ (function(module) { - -"use strict"; - - -/** - * Tries to execute a function and discards any error that occurs. - * @param {Function} fn - Function that might or might not throw an error. - * @returns {?*} Return-value of the function when no error occurred. - */ -module.exports = function(fn) { - - try { return fn() } catch (e) {} - -} - -/***/ }), - -/***/ 954: -/***/ (function(module) { - -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)}`); -} - - -/***/ }), - -/***/ 955: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -const path = __webpack_require__(622); -const childProcess = __webpack_require__(129); -const crossSpawn = __webpack_require__(20); -const stripEof = __webpack_require__(768); -const npmRunPath = __webpack_require__(621); -const isStream = __webpack_require__(323); -const _getStream = __webpack_require__(145); -const pFinally = __webpack_require__(697); -const onExit = __webpack_require__(260); -const errname = __webpack_require__(427); -const stdio = __webpack_require__(168); - -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); - - -/***/ }), - -/***/ 966: -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -const {PassThrough} = __webpack_require__(413); - -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; -}; - - -/***/ }), - -/***/ 969: -/***/ (function(module, __unusedexports, __webpack_require__) { - -var wrappy = __webpack_require__(11) -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} - - -/***/ }) - -/******/ }); \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index 563d4ccb..ae0ab23c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,11 +1,28 @@ module.exports = { - clearMocks: true, - moduleFileExtensions: ['js', 'ts'], - testEnvironment: 'node', - testMatch: ['**/*.test.ts'], + preset: 'ts-jest', + testEnvironment: "node", testRunner: 'jest-circus/runner', - transform: { - '^.+\\.ts$': 'ts-jest' - }, - verbose: true -} \ No newline at end of file + testMatch: ['**/*.test.ts'], + clearMocks: true, + collectCoverage: false, + coverageThreshold: { + global: { + branches: 50, + functions: 70, + lines: 75, + statements: 75 + }, + './src/*.ts': { + branches: 70, + functions: 85, + lines: 85, + statements: 85 + }, + './src/tests/**/*.ts': { + branches: 50, + functions: 60, + lines: 65, + statements: 65 + } + } +} diff --git a/package.json b/package.json index a0be968f..83d0fa3c 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,21 @@ { "name": "@trilom/file-changes-action", "version": "1.2.0", + "engines": { + "node": "12.16.1" + }, "description": "Creates outputs variables of files modified, added, or deleted by a PR or Push.", "main": "lib/main.js", "scripts": { "build": "yarn && tsc", - "format": "prettier --write **/*.ts", - "format-check": "prettier --check **/*.ts", - "lint": "eslint src/**/*.ts", - "release-pack": "ncc build", - "test": "echo \"Error: no test specified\" && exit 0", - "clean": "rm -rf node_modules" + "build-package": "yarn build --build tsconfig.build.json && ncc build", + "build-release": "yarn build-package --minify", + "test": "jest", + "test-coverage": "jest --coverage", + "format": "prettier --write '**/*.ts'", + "format-check": "prettier --check '**/*.ts'", + "lint": "eslint --ext .ts ./", + "clean": "rm -rf node_modules lib dist" }, "repository": { "type": "git", @@ -29,92 +34,33 @@ "author": "Bryan Killian ", "homepage": "https://github.com/trilom/file-changes-action#README", "license": "MIT", - "release": { - "branches": [ - "+([1-9])?(.{+([1-9]),x}).x", - "master", - "next", - { - "name": "alpha", - "prerelease": true - }, - { - "name": "beta", - "prerelease": true - } - ], - "dryRun": false, - "plugins": [ - "@semantic-release/commit-analyzer", - "@semantic-release/release-notes-generator", - [ - "semantic-release-slack-bot", - { - "notifyOnSuccess": true, - "notifyOnFail": true, - "markdownReleaseNotes": true, - "onSuccessTemplate": { - "text": "$package_name version v$npm_package_version!\n\n$release_notes" - } - } - ], - [ - "@semantic-release/changelog", - { - "changelogFile": "CHANGELOG.md" - } - ], - "@semantic-release/npm", - [ - "@semantic-release/github", - { - "assets": [ - { - "path": "dist/**/*.js", - "label": "Packaged JS Code" - } - ], - "successComment": "🎉🦍🎉 This <%= issue.pull_request ? 'pull request' : 'issue' %> has been resolved in version <%= nextRelease.version %> at `trilom/file-changes-action@<%= nextRelease.gitTag %>`\n\n`- name: File Changes Action\n\tuses: trilom/file-changes-action@<%= nextRelease.gitTag %>`\n\n ## Release<%= _.size(releases) > 1 ? 's' : '' %><% _.forEach(releases, function(release) { %>\n\t\t**Release Name:** [<%= release.name %>](<%= release.url %>)<% }); %>\n\n ## Commits<% _.forEach(commits, function(commit) { %>\n\t\t@<%= commit.author %> - [_<%= commit.message %>_](https://github.com/trilom/file-changes-action/commit/<%= commit.hash %>)<% }); %>", - "labels": [ - "failure" - ], - "releasedLabels": [ - "releases/${nextRelease.gitTag}" - ], - "assigness": [ - "trilom" - ] - } - ], - [ - "@semantic-release/git", - { - "assets": [ - "CHANGELOG.md", - "package.json", - "yarn.lock" - ], - "message": "chore(release): 🎉🦍🎉 Release <%= nextRelease.version %> - <%= new Date().toLocaleDateString('en-US', {year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' }) %> [skip ci]\n\n`- name: File Changes Action\n\tuses: trilom/file-changes-action@<%= nextRelease.gitTag %>`\n\n<%= nextRelease.notes %>" - } - ] - ] - }, "dependencies": { - "@actions/core": "^1.2.0", - "@actions/github": "^2.0.0" + "@actions/core": "^1.2.3", + "@actions/github": "^2.1.1" }, "devDependencies": { - "@types/jest": "^24.0.23", - "@typescript-eslint/parser": "^2.8.0", + "@octokit/types": "^2.5.0", + "@types/jest": "^24.9.1", + "@typescript-eslint/eslint-plugin": "^2.24.0", + "@typescript-eslint/parser": "^2.24.0", "@zeit/ncc": "^0.20.5", - "eslint": "^5.16.0", - "eslint-plugin-github": "^2.0.0", - "eslint-plugin-jest": "^22.21.0", + "codecov": "^3.6.5", + "eslint": "^6.8.0", + "eslint-config-airbnb-typescript": "^7.0.0", + "eslint-config-prettier": "^6.10.0", + "eslint-import-resolver-typescript": "^2.0.0", + "eslint-plugin-eslint-comments": "^3.1.2", + "eslint-plugin-import": "^2.20.1", + "eslint-plugin-jest": "^23.8.2", + "eslint-plugin-jsx-a11y": "^6.2.3", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-react": "^7.19.0", + "eslint-plugin-react-hooks": "^2.5.0", + "eslint-plugin-unicorn": "^17.2.0", "jest": "^24.9.0", "jest-circus": "^24.9.0", - "js-yaml": "^3.13.1", "prettier": "^1.19.1", - "ts-jest": "^24.2.0", - "typescript": "^3.6.4" + "ts-jest": "^24.3.0", + "typescript": "^3.8.3" } } diff --git a/src/ChangedFiles.ts b/src/ChangedFiles.ts deleted file mode 100644 index 4fee6025..00000000 --- a/src/ChangedFiles.ts +++ /dev/null @@ -1,53 +0,0 @@ -import {File} from './File' - -export class ChangedFiles { - updated: string[] = [] - created: string[] = [] - deleted: string[] = [] - files: string[] = [] - - getOutput(files: string[], format: string): string { - if (format === 'json') { - return JSON.stringify(files) - } else { - return files.join(format) - } - } - - createdOutput(format: string): string { - return this.getOutput(this.created, format) - } - - fileOutput(format: string): string { - return this.getOutput(this.files, format) - } - - updatedOutput(format: string): string { - return this.getOutput(this.updated, format) - } - - deletedOutput(format: string): string { - return this.getOutput(this.deleted, format) - } -} - -export async function sortChangedFiles(files: any): Promise { - return files.reduce((acc: ChangedFiles, f: File) => { - if (f.status === 'added' || f.added) { - acc.created.push(f.filename === undefined ? f.added : f.filename) - acc.files.push(f.filename === undefined ? f.added : f.filename) - } - if (f.status === 'removed' || f.removed) { - acc.deleted.push(f.filename === undefined ? f.removed : f.filename) - } - if (f.status === 'modified' || f.modified) { - acc.updated.push(f.filename === undefined ? f.modified : f.filename) - acc.files.push(f.filename === undefined ? f.modified : f.filename) - } - if (f.status === 'renamed') { - acc.created.push(f.filename) - acc.deleted.push(f.previous_filename) - } - return acc - }, new ChangedFiles()) -} diff --git a/src/File.ts b/src/File.ts deleted file mode 100644 index 4748b92d..00000000 --- a/src/File.ts +++ /dev/null @@ -1,9 +0,0 @@ -export class File { - added: string = '' - modified: string = '' - removed: string = '' - filename: string = '' - status: string = '' - previous_filename: string = '' - distinct: boolean = true -} diff --git a/src/FilesHelper.ts b/src/FilesHelper.ts new file mode 100644 index 00000000..e3c1e9e9 --- /dev/null +++ b/src/FilesHelper.ts @@ -0,0 +1,151 @@ +import {setOutput as coreSetOutput, debug as coreDebug} from '@actions/core' +import {writeFileSync} from 'fs' +import {ChangedFiles} from 'typings/ChangedFiles' +import {GitHubFile} from 'typings/GitHubFile' +import {getErrorString} from './UtilsHelper' + +/** + * @function sortChangedFiles + * @param files pass in array of GithubFile's to be sorted + * @returns ChangedFiles object that has .files, .added, .modified, and .deleted + */ +export function sortChangedFiles(files: GitHubFile[]): ChangedFiles { + try { + coreDebug( + `Here are the files I am changing: ${JSON.stringify(files, null, 2)}` + ) + const changedFiles = { + files: [], + added: [], + removed: [], + modified: [] + } as ChangedFiles + files.forEach(f => { + changedFiles[f.status].push( + f.filename || f.added || f.removed || f.modified + ) + changedFiles.files.push(f.filename || f.added || f.removed || f.modified) + }) + return changedFiles + } catch (error) { + const eString = `There was an issue sorting files changed.` + throw new Error( + getErrorString( + error.name, + error.status, + sortChangedFiles.name, + eString, + JSON.stringify(error) + ) + ) + } +} + +/** + * @function getFormatExt + * @param format output format 'json' = '.json' ',' = '.csv' anything else is '.txt'. + * @returns file extension, '.json', '.csv', or '.txt' + */ +export function getFormatExt(format: string): string { + let ext + switch (format.trim()) { + case 'json': + ext = '.json' + break + case ',': + ext = '.csv' + break + default: + ext = '.txt' + break + } + return ext +} + +/** + * @function formatChangedFiles + * @param format output format 'json' will stringify anything else will files.join('string') + * @param files string list of files to format + * @returns string for output of changedFiles + */ +export function formatChangedFiles(format: string, files: string[]): string { + if (format === 'json') { + return JSON.stringify(files) + } + return files.join(format) +} + +/** + * @function writeFiles + * @param format output format 'json' will stringify anything else will files.join('string') + * @param key changedFiles type added, modified, deleted, or files + * @param files string list of files to format + * @returns string output to be stored in file + */ +export function writeFiles(format: string, key: string, files: string[]): void { + try { + const ext = getFormatExt(format) + const fileName = key === 'files' ? `${key}${ext}` : `files_${key}${ext}` + coreDebug( + `Writing output file ${ + process.env.HOME + }/${fileName}${ext} with ${format} and files ${JSON.stringify( + files, + null, + 2 + )}` + ) + writeFileSync( + `${process.env.HOME}/${fileName}`, + formatChangedFiles(format, files), + 'utf-8' + ) + } catch (error) { + const eString = `There was an issue writing output files.` + throw new Error( + getErrorString( + error.name, + error.status, + writeFiles.name, + eString, + JSON.stringify(error) + ) + ) + } +} + +/** + * @function writeOutput + * @param format output format 'json' will stringify anything else will files.join('string') + * @param key changedFiles type added, modified, deleted, or files + * @param files string list of files to format + * @returns string output to be stored to action output + */ +export function writeOutput( + format: string, + key: string, + files: string[] +): void { + try { + const fileName = key === 'files' ? key : `files_${key}` + coreDebug( + `Writing output ${fileName} with ${format} and files ${JSON.stringify( + files, + null, + 2 + )}` + ) + coreSetOutput(fileName, formatChangedFiles(format, files)) + } catch (error) { + const eString = `There was an issue setting action outputs.` + throw new Error( + getErrorString( + error.name, + error.status, + writeOutput.name, + eString, + JSON.stringify(error) + ) + ) + } +} diff --git a/src/GithubHelper.ts b/src/GithubHelper.ts new file mode 100644 index 00000000..95b143df --- /dev/null +++ b/src/GithubHelper.ts @@ -0,0 +1,176 @@ +import {GitHub} from '@actions/github' +import {GitHubFile} from 'typings/GitHubFile' +import {Inferred} from 'typings/Inferred' +import {getErrorString} from './UtilsHelper' +/** + * @function initClient + * @throws {Error} not sure what might trigger this, but it will throw an error. + * @param token github token to add to client + * @returns authenticated github client + */ +export function initClient(token: string): GitHub { + try { + return new GitHub(token) + } catch (error) { + const eString = `There was an error creating github client. Please check your token.` + throw new Error( + getErrorString(error.name, error.status, initClient.name, eString, error) + ) + } +} +/** + * @function getChangedPRFiles + * @throws {Error} when a 404 or other is received. 404 can be bad repo, owner, pr, or unauthenticated + * @param client authenticated github client (possibly un-authenticated if public) + * @param repo repo string. file-changes-action + * @param owner owner string. trilom + * @param pullNumber pr number to get changed files for + * @returns Promise of array of changed files + */ +export async function getChangedPRFiles( + client: GitHub, + repo: string, + owner: string, + pullNumber: number +): Promise { + try { + const options = client.pulls.listFiles.endpoint.merge({ + owner, + repo, + pull_number: pullNumber + }) + const files: GitHubFile[] = await client.paginate( + options, + response => response.data + ) + return files + } catch (error) { + const eString = `There was an error getting change files for repo:${repo} owner:${owner} pr:${pullNumber}` + let ePayload: string + if (error.name === 'HttpError' && +error.status === 404) + ePayload = getErrorString( + error.name, + error.status, + getChangedPRFiles.name, + eString, + error + ) + else + ePayload = getErrorString( + `Unknown Error:${error.name || ''}`, + error.status, + getChangedPRFiles.name, + eString, + error.message + ) + throw new Error(ePayload) + } +} +/** + * @function getChangedPushFiles + * @throws {Error} when a 404 or other is received. 404 can be bad repo, owner, sha, or unauthenticated + * @param client authenticated github client (possibly un-authenticated if public) + * @param repo repo string. file-changes-action + * @param owner owner string. trilom + * @param base BASE commit sha to compare + * @param head HEAD commit sha to compare + * @returns Promise of array of changed files + */ +export async function getChangedPushFiles( + client: GitHub, + repo: string, + owner: string, + base: string, + head: string +): Promise { + try { + const options = client.repos.compareCommits.endpoint.merge({ + owner, + repo, + base, + head + }) + const files: GitHubFile[] = await client.paginate( + options, + response => response.data.files + ) + return files + } catch (error) { + const eString = `There was an error getting change files for repo:${repo} owner:${owner} base:${base} head:${head}` + let ePayload: string + if (error.name === 'HttpError' && +error.status === 404) + ePayload = getErrorString( + error.name, + error.status, + getChangedPushFiles.name, + eString, + error + ) + else + ePayload = getErrorString( + `Unknown Error:${error.name || ''}`, + error.status, + getChangedPushFiles.name, + eString, + error.message + ) + throw new Error(ePayload) + } +} +/** + * @function getChangedFiles + * @param client client authenticated github client (possibly un-authenticated if public) + * @param repoFull repo owner/repo string. trilom/file-changes-action + * @type {Inferred} pass in iinferred type from inferInput + * @returns Promise of an array of changed PR or push files + */ +export async function getChangedFiles( + client: GitHub, + repoFull: string, + {before, after, pr = NaN}: Inferred +): Promise { + try { + if (repoFull.split('/').length > 2) { + throw new Error( + getErrorString( + `Bad-Repo`, + 500, + 'self', + `Repo input of ${repoFull} has more than 2 length after splitting.` + ) + ) + } + const owner = repoFull.split('/')[0] + const repo = repoFull.split('/')[1] + let files: GitHubFile[] = [] + if (Number.isNaN(pr)) + files = await getChangedPushFiles( + client, + repo, + owner, + before || '', + after || '' + ) + else files = await getChangedPRFiles(client, repo, owner, pr) + return files + } catch (error) { + const pError = JSON.parse(error.message) + if (pError.from.includes('getChanged')) + throw new Error( + JSON.stringify( + {...pError, ...{from: `${error.status}/${error.name}`}}, + null, + 2 + ) + ) + const eString = `There was an error getting change files outputs pr: ${pr} before: ${before} after: ${after}` + const ePayload: string = getErrorString( + `Unknown Error:${error.name}`, + error.status, + getChangedFiles.name, + eString, + error.message + ) + throw new Error(ePayload) + } +} diff --git a/src/InputHelper.ts b/src/InputHelper.ts new file mode 100644 index 00000000..774c94d3 --- /dev/null +++ b/src/InputHelper.ts @@ -0,0 +1,102 @@ +import {warning as coreWarning, getInput as coreGetInput} from '@actions/core' +import {context} from '@actions/github' +import {Inferred} from 'typings/Inferred' +import {Inputs} from 'typings/Inputs' +import {getErrorString} from './UtilsHelper' + +/** + * @function getInputs + * @description reads the inputs to the action with core.getInput and returns object + * @returns {Inputs} object of inputs for the github action + */ +export function getInputs(): Inputs { + try { + const token = + coreGetInput('githubToken') || process.env.GITHUB_TOKEN || false + if (!token) + throw new Error( + getErrorString( + 'getInputs Error', + 500, + getInputs.name, + 'Received no token, a token is a requirement.' + ) + ) + return { + githubRepo: + coreGetInput('githubRepo') || + `${context.repo.owner}/${context.repo.repo}`, + githubToken: token, + pushBefore: + coreGetInput('pushBefore') || + (context.payload.before === undefined ? false : context.payload.before), + pushAfter: + coreGetInput('pushAfter') || + (context.payload.after === undefined ? false : context.payload.after), + prNumber: + +coreGetInput('prNumber') || + (typeof context.issue.number === 'undefined' + ? NaN + : context.issue.number), + output: coreGetInput('output') || 'json', + fileOutput: coreGetInput('fileOutput') || 'json', + event: context.eventName + } as Inputs + } catch (error) { + const eString = `Received an issue getting action inputs.` + const retVars = Object.fromEntries( + Object.entries(process.env).filter( + key => key[0].includes('GITHUB') || key[0].includes('INPUT_') + ) + ) + throw new Error( + getErrorString('getInputs Error', 500, getInputs.name, eString, retVars) + ) + } +} +/** + * @function inferInput + * @param before BASE commit sha to compare + * @param after HEAD commit sha to compare + * @param pr pr number to get changed files for + * @returns {Inferred} object of inferred input for the action + */ +export function inferInput( + before: string, + after: string, + pr: number +): Inferred { + const event = context.eventName + const weirdInput = `Received event from ${event}, but also received a before(${before}) or after(${after}) value.\n I am assuming you want to use a Push event but forgot something, so I'm giving you a message.` + const allInput = `Received event from ${event}, but received a before(${before}), after(${after}), and PR(${pr}).\n I am assuming you want to use one or the other but I am giving you Pull Request.` + if (event === 'pull_request') { + if (before && after) return {before, after} // PR(push) - pull_request event with push inputs | PUSH + if (before || after) coreWarning(weirdInput) // PR(push) - pull_request event with single push input | PR* + return {pr} // PR - pull_request event with no push inputs | PR + } + if (event === 'push') { + if (pr) return {pr} // Push(PR) - push event with pr inputs | PR + return {before, after} // Push - push event with no pr inputs | PUSH + } + if (pr) { + if (before && after) { + coreWarning(allInput) // Not PR or Push - all inputs | PUSH* + return {before, after} // Not PR or Push - pr inputs | PR + } + if (before || after) coreWarning(weirdInput) // Not PR or Push - pull_request event with single push input | PR* + return {pr} // Not PR or Push - pr inputs | PR + } + if (before || after) { + if (!(before && after)) { + const eString = `Received event from ${event}, but only received a before(${before}) or after(${after}).\n I need both of these if you want to use a Push event.` + throw new Error( + getErrorString('inferInput Error', 500, inferInput.name, eString) + ) + } + return {before, after} // Not PR or Push - push inputs | PUSH + } + const eString = `Received event from ${event}, but received no inputs. {event_name:${event}, pr: ${+pr}, before:${before}, after:${after}}` + throw new Error( + getErrorString('inferInput Error', 500, inferInput.name, eString) + ) +} diff --git a/src/UtilsHelper.ts b/src/UtilsHelper.ts new file mode 100644 index 00000000..ad03da3d --- /dev/null +++ b/src/UtilsHelper.ts @@ -0,0 +1,59 @@ +import {setFailed} from '@actions/core' +import {ActionError} from 'typings/ActionError' +/** + * @function getErrorString + * @param name name of error + * @param status status code of error + * @param from name of function that error is thrown from + * @param message error message + * @param error error object to stringify and attach + */ +export function getErrorString( + name: string, + status = 500, + from: string, + message: string, + error: any = '' +): string { + try { + const test = JSON.stringify( + { + error: `${status}/${name}`, + from, + message, + payload: error + } as ActionError, + null, + 2 + ) + return test + } catch (error_) { + setFailed(`Error throwing error.\n ${JSON.stringify(error_.message)}`) + throw new Error( + JSON.stringify({name: '500/undefined', message: 'Error throwing error.'}) + ) + } +} +/** + * @function errorMessage + * @param f name of function + * @param e error object + * @returns error message for function + */ +export function errorMessage(f: string, e: Error): string { + const error = JSON.stringify(e, null, 2) + let ret + if (f.includes('getInputs')) ret = `There was an getting action inputs.` + if (f.includes('inferInput')) + ret = `There was an issue inferring inputs to the action.` + if (f.includes('initClient')) + ret = `There was an issue initilizing the github client.` + if (f.includes('getChangedFiles')) + ret = `There was an issue getting changed files from Github.` + if (f.includes('sortChangedFiles')) + ret = `There was an issue sorting changed files from Github.` + if (f.includes('writeFiles')) ret = `There was an issue writing output files.` + if (f.includes('writeOutput')) + ret = `There was an issue writing output variables.` + return `${ret}\nException: ${error}` +} diff --git a/src/main.ts b/src/main.ts index 1aacbc19..94376e95 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,157 +1,40 @@ -// External Dependencies -import * as core from '@actions/core' -import * as fs from 'fs' -import * as gh from '@actions/github' -import {ChangedFiles, sortChangedFiles} from './ChangedFiles' - -async function getChangedPRFiles( - repo: string, - client: gh.GitHub, - prNumber: number -): Promise { - const options = client.pulls.listFiles.endpoint.merge({ - owner: repo.split('/')[0], - repo: repo.split('/')[1], - pull_number: prNumber - }) - return sortChangedFiles( - await client.paginate(options).then(files => { - return files - }) - ) -} - -async function getChangedPushFiles( - repo: string, - client: gh.GitHub, - base: string, - head: string -): Promise { - const response = await client.repos.compareCommits({ - owner: repo.split('/')[0], - repo: repo.split('/')[1], - base, - head - }) - return sortChangedFiles(response.data.files) -} - -function writeFiles(format: string, changedFiles: ChangedFiles): void { - switch (format.trim()) { - case 'json': - format = '.json' - break - case ',': - format = '.csv' - break - default: - format = '.txt' - break - } - //write files to preserve original functionality - fs.writeFileSync( - `${process.env.HOME}/files${format}`, - changedFiles.fileOutput(format), - 'utf-8' - ) - fs.writeFileSync( - `${process.env.HOME}/files_modified${format}`, - changedFiles.updatedOutput(format), - 'utf-8' - ) - fs.writeFileSync( - `${process.env.HOME}/files_added${format}`, - changedFiles.createdOutput(format), - 'utf-8' - ) - fs.writeFileSync( - `${process.env.HOME}/files_deleted${format}`, - changedFiles.deletedOutput(format), - 'utf-8' - ) -} - -function writeOutput(format: string, changedFiles: ChangedFiles): void { - //also export some outputs - core.setOutput('files', changedFiles.fileOutput(format)) - core.setOutput('files_added', changedFiles.createdOutput(format)) - core.setOutput('files_modified', changedFiles.updatedOutput(format)) - core.setOutput('files_deleted', changedFiles.deletedOutput(format)) -} - +import {setFailed as coreSetFailed} from '@actions/core' +import {getInputs, inferInput} from './InputHelper' +import {writeOutput, writeFiles, sortChangedFiles} from './FilesHelper' +import {getChangedFiles, initClient} from './GithubHelper' +import {errorMessage} from './UtilsHelper' // figure out if it is a PR or Push -async function run(): Promise { +export async function run(): Promise { try { - const github: any = gh.context - const repo: string = core.getInput('githubRepo') - const token: string = core.getInput('githubToken') - const output: string = core.getInput('output') - const fileOutput: string = core.getInput('fileOutput') - const pushBefore: string = core.getInput('pushBefore') - const pushAfter: string = core.getInput('pushAfter') - const prNumber: string = core.getInput('prNumber') - const isPush = pushBefore !== '' && pushAfter !== '' - const isPR = prNumber !== '' - const client = new gh.GitHub(token) - let changedFiles = new ChangedFiles() - if (isPush && isPR) { - core.setFailed( - `You can't pick PR and Push, I don't know which one to do.` - ) - } else if (isPR) { - // do PR actions - if (prNumber != null) { - try { - core.error(`${prNumber}`) - core.error(`${repo}`) - changedFiles = await getChangedPRFiles( - repo, - client, - parseInt(prNumber) - ) - } catch (error) { - core.error( - `There was an error getting Pull Request change files:${error}` - ) - throw error - } - } else { - core.setFailed( - 'Could not get pull request number from context, exiting' - ) - return - } - } else if (isPush) { - // do push actions - try { - changedFiles = await getChangedPushFiles( - repo, - client, - pushBefore, - pushAfter - ) - } catch (error) { - core.error(`There was an error getting Push change files:${error}`) - throw error - } - } else { - core.setFailed( - `Change not initiated by a PR or Push, it was ${ - github.eventName - } instead. Github:${JSON.stringify(github)}` - ) - return - } - // write file output - writeFiles(fileOutput, changedFiles) - - // write output vars - writeOutput(output, changedFiles) - + // get inputs + const inputs = getInputs() + // parse input + const inferred = inferInput( + inputs.pushBefore, + inputs.pushAfter, + inputs.prNumber + ) + // prepare client + const client = initClient(inputs.githubToken) + // get changed files + const changedFilesArray = await getChangedFiles( + client, + inputs.githubRepo, + inferred + ) + // sort changed files + const changedFiles = sortChangedFiles(changedFilesArray) + Object.keys(changedFiles).forEach(key => { + // write file output + writeFiles(inputs.fileOutput, key, changedFiles[key]) + // write output vars + writeOutput(inputs.output, key, changedFiles[key]) + }) + // eslint-disable-next-line unicorn/no-process-exit process.exit(0) } catch (error) { - core.error(error) - core.setFailed(error.message) + const pError = JSON.parse(error.message) + coreSetFailed(errorMessage(pError.from, pError)) } } diff --git a/src/tests/FilesHelper.test.ts b/src/tests/FilesHelper.test.ts new file mode 100644 index 00000000..b4cf3915 --- /dev/null +++ b/src/tests/FilesHelper.test.ts @@ -0,0 +1,233 @@ +import {Env, p, getTestFiles, getTestEvents} from './mocks/env' + +let env: Env + +describe('Testing FilesHelper.ts...', () => { + describe('...with push event...', () => { + beforeAll(() => { + env = new Env({}, {githubToken: 'TestToken'}, 'push') + }) + afterEach(() => { + process.env = {...env.envStart} + jest.resetModules() + env = new Env({}, {}, 'push') + }) + /** + * @function sortChangedFiles + */ + describe('...with function sortChangedFiles...', () => { + it.each([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])( + '...correctly sorts GithubFile array into ChangedFiles object %i/10 times', + () => { + const {files, stats} = getTestFiles() + const changedFiles = require('../FilesHelper').sortChangedFiles(files) + const coreDebug = require('@actions/core').debug + expect(coreDebug).toHaveBeenCalledWith( + expect.stringContaining(JSON.stringify(files, null, 2)) + ) + const retStats = {files: 0, added: 0, removed: 0, modified: 0} as { + [key: string]: number + } + Object.keys(changedFiles).forEach(key => { + retStats[key] = changedFiles[key].length + }) + expect(retStats).toStrictEqual(stats) + } + ) + it.each([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])( + '...correctly sorts GithubFile array into ChangedFiles object without filenames %i/10 times', + () => { + const {files, stats} = getTestFiles() + const changedFiles = require('../FilesHelper').sortChangedFiles(files) + const coreDebug = require('@actions/core').debug + expect(coreDebug).toHaveBeenCalledWith( + expect.stringContaining(JSON.stringify(files, null, 2)) + ) + const retStats = {files: 0, added: 0, removed: 0, modified: 0} as { + [key: string]: number + } + Object.keys(changedFiles).forEach(key => { + retStats[key] = changedFiles[key].length + }) + expect(retStats).toStrictEqual(stats) + } + ) + it('...throws an error', () => { + expect(() => + require('../FilesHelper').sortChangedFiles({ + filename: '/test/file.txt', + status: 'noexist' + }) + ).toThrowError( + JSON.stringify( + { + error: '500/TypeError', + from: 'sortChangedFiles', + message: 'There was an issue sorting files changed.', + payload: JSON.stringify({}) + }, + null, + 2 + ) + ) + }) + }) + /** + * @function getFormatExt + */ + describe('...with function getFormatExt...', () => { + it.each(getTestEvents(p.getFormatExtInputs, 'push'))( + '...sets %s ext for input "%s" should be "%s"', + (inputName, input, expected) => { + const ext = require('../FilesHelper').getFormatExt(input) + expect(ext).toBe(expected) + } + ) + }) + /** + * @function formatChangedFiles + */ + describe('...with function formatChangedFiles...', () => { + it.each(getTestEvents(p.changedFilesInput('push'), 'push'))( + '...formats %o', + (inputName, input, expected) => { + const ext = require('../FilesHelper').formatChangedFiles( + inputName.format, + input + ) + expect(ext).toBe(expected) + } + ) + }) + /** + * @function writeFiles + */ + describe('...with function writeFiles...', () => { + it.each(getTestEvents(p.changedFilesInput('push'), 'push'))( + '...writesFiles %o', + (inputName, input, expected) => { + const coreDebug = require('@actions/core').debug + const fsWriteFilesSync = require('fs').writeFileSync + const format = require('../FilesHelper').getFormatExt( + inputName.format + ) + require('../FilesHelper').writeFiles( + inputName.format, + 'testKey', + input + ) + expect(coreDebug).toHaveBeenCalledWith( + expect.stringContaining(JSON.stringify(input, null, 2)) + ) + expect(fsWriteFilesSync).toHaveBeenCalledWith( + `${process.env.HOME}/files_testKey${format}`, + expected, + 'utf-8' + ) + } + ) + it.each(getTestEvents(p.changedFilesInput('push'), 'push'))( + '...writesFiles %o with files key', + (inputName, input, expected) => { + const coreDebug = require('@actions/core').debug + const fsWriteFilesSync = require('fs').writeFileSync + const format = require('../FilesHelper').getFormatExt( + inputName.format + ) + require('../FilesHelper').writeFiles(inputName.format, 'files', input) + expect(coreDebug).toHaveBeenCalledWith( + expect.stringContaining(JSON.stringify(input, null, 2)) + ) + expect(fsWriteFilesSync).toHaveBeenCalledWith( + `${process.env.HOME}/files${format}`, + expected, + 'utf-8' + ) + } + ) + it('...throws error', () => { + const coreDebug = require('@actions/core').debug + expect(() => + require('../FilesHelper').writeFiles('error', 'testKey', 'json') + ).toThrowError( + new Error( + JSON.stringify( + { + error: '500/TypeError', + from: 'writeFiles', + message: 'There was an issue writing output files.', + payload: JSON.stringify({}) + }, + null, + 2 + ) + ) + ) + expect(coreDebug).toHaveBeenCalledWith( + expect.stringContaining( + `Writing output file ${process.env.HOME}/files_testKey.txt.txt with error and files "json"` + ) + ) + }) + }) + /** + * @function writeOutput + */ + describe('...with function writeOutput...', () => { + it.each(getTestEvents(p.changedFilesInput('push'), 'push'))( + '...writeOutput %o', + (inputName, input, expected) => { + const coreDebug = require('@actions/core').debug + const coreSetOutput = require('@actions/core').setOutput + require('../FilesHelper').writeOutput( + inputName.format, + 'testKey', + input + ) + expect(coreDebug).toHaveBeenCalledWith( + expect.stringContaining(JSON.stringify(input, null, 2)) + ) + expect(coreSetOutput).toHaveBeenCalledWith(`files_testKey`, expected) + } + ) + it.each(getTestEvents(p.changedFilesInput('push'), 'push'))( + '...writeOutput %o with files key', + (inputName, input, expected) => { + const coreDebug = require('@actions/core').debug + const coreSetOutput = require('@actions/core').setOutput + require('../FilesHelper').writeOutput( + inputName.format, + 'files', + input + ) + expect(coreDebug).toHaveBeenCalledWith( + expect.stringContaining(JSON.stringify(input, null, 2)) + ) + expect(coreSetOutput).toHaveBeenCalledWith(`files`, expected) + } + ) + it('...throws error', () => { + const coreDebug = require('@actions/core').debug + expect(() => + require('../FilesHelper').writeOutput('error', 'testKey', 'json') + ).toThrowError( + new Error( + JSON.stringify( + { + error: '500/TypeError', + from: 'writeOutput', + message: 'There was an issue setting action outputs.', + payload: JSON.stringify({}) + }, + null, + 2 + ) + ) + ) + expect(coreDebug).toHaveBeenCalledWith( + 'Writing output files_testKey with error and files "json"' + ) + }) + }) + }) +}) diff --git a/src/tests/GithubHelper.test.ts b/src/tests/GithubHelper.test.ts new file mode 100644 index 00000000..bf9b7442 --- /dev/null +++ b/src/tests/GithubHelper.test.ts @@ -0,0 +1,241 @@ +import {Env, p, getTestEvents} from './mocks/env' + +let env: Env + +describe('Testing GithubHelper.ts...', () => { + describe.each(p.testEvents)('...with %s event...', event => { + beforeAll(() => { + env = new Env({}, {githubToken: 'TestToken'}, event) + }) + afterEach(() => { + process.env = {...env.envStart} + jest.resetModules() + env = new Env({}, {}, event) + }) + /** + * @function initClient + */ + describe('...with function initClientTests...', () => { + it.each(getTestEvents(p.initClientTestInputs, event))( + '...%s', + async (title, input, expected) => { + process.env = {...env.envStart} + env = new Env({}, {}, event) + let gh + if (title.includes('without a token')) + expect(() => + require('../GithubHelper').initClient(input) + ).toThrowError( + new Error( + JSON.stringify( + { + error: '500/Error', + from: 'initClient', + message: + 'There was an error creating github client. Please check your token.', + payload: {} + }, + null, + 2 + ) + ) + ) + else { + gh = require('../GithubHelper').initClient(input) + const {GitHub} = require('@actions/github') + expect(GitHub).toHaveBeenCalledTimes(1) + expect(GitHub).toHaveBeenCalledWith(expected) + expect(gh).toEqual(env.octokitMock) + } + } + ) + }) + /** + * @function getChangedPRFiles + */ + describe('...with function getChangedPRFiles...', () => { + it.each(getTestEvents(p.getChangedPRFilesTestInputs, event))( + '...%s', + async (title, input, expected) => { + if (title.includes('throws an error')) { + expect.assertions(1) + await expect( + require('../GithubHelper').getChangedPRFiles( + env.octokitMock, + input.repo, + input.owner, + input.pullNumber + ) + ).rejects.toThrowError(new Error(JSON.stringify(expected, null, 2))) + } else { + let files: any[] = [] + files = await require('../GithubHelper').getChangedPRFiles( + env.octokitMock, + input.repo, + input.owner, + input.pullNumber + ) + expect(files).toStrictEqual(expected) + expect(files.length).toBe(7) + } + } + ) + it('...throws errows', async () => { + await expect( + require('../GithubHelper').getChangedPRFiles( + env.octokitMock, + 'trilom/file-changes-action', + 'error', + 'error' + ) + ).rejects.toThrowError( + new Error( + JSON.stringify( + { + error: '500/Unknown Error:Error', + from: 'getChangedPRFiles', + message: + 'There was an error getting change files for repo:trilom/file-changes-action owner:error pr:error', + payload: JSON.stringify({name: 'HttpError', status: '500'}) + }, + null, + 2 + ) + ) + ) + await expect( + require('../GithubHelper').getChangedPRFiles( + env.octokitMock, + 'trilom/file-changes-action', + 'unknown', + 'unknown' + ) + ).rejects.toThrowError( + new Error( + JSON.stringify( + { + error: '500/Unknown Error:', + from: 'getChangedPRFiles', + message: + 'There was an error getting change files for repo:trilom/file-changes-action owner:unknown pr:unknown', + payload: '' + }, + null, + 2 + ) + ) + ) + }) + }) + /** + * @function getChangedPushFiles + */ + describe('...with function getChangedPushFiles...', () => { + it.each(getTestEvents(p.getChangedPushFilesTestInputs, event))( + '...%s', + async (title, input, expected) => { + if (title.includes('throws an error')) { + expect.assertions(1) + await expect( + require('../GithubHelper').getChangedPushFiles( + env.octokitMock, + input.repo, + input.owner, + input.before, + input.after + ) + ).rejects.toThrowError(new Error(JSON.stringify(expected, null, 2))) + } else { + let files: any[] = [] + files = await require('../GithubHelper').getChangedPushFiles( + env.octokitMock, + input.repo, + input.owner, + input.before, + input.after + ) + expect(files).toStrictEqual(expected) + expect(files.length).toBe(7) + } + } + ) + it('...throws errows', async () => { + await expect( + require('../GithubHelper').getChangedPushFiles( + env.octokitMock, + 'trilom/file-changes-action', + 'error', + 'error', + 'error' + ) + ).rejects.toThrowError( + new Error( + JSON.stringify( + { + error: '500/Unknown Error:Error', + from: 'getChangedPushFiles', + message: + 'There was an error getting change files for repo:trilom/file-changes-action owner:error base:error head:error', + payload: JSON.stringify({name: 'HttpError', status: '500'}) + }, + null, + 2 + ) + ) + ) + await expect( + require('../GithubHelper').getChangedPushFiles( + env.octokitMock, + 'trilom/file-changes-action', + 'unknown', + 'unknown', + 'unknown' + ) + ).rejects.toThrowError( + new Error( + JSON.stringify( + { + error: '500/Unknown Error:', + from: 'getChangedPushFiles', + message: + 'There was an error getting change files for repo:trilom/file-changes-action owner:unknown base:unknown head:unknown', + payload: '' + }, + null, + 2 + ) + ) + ) + }) + }) + /** + * @function getChangedFiles + */ + describe('...with function getChangedFiles...', () => { + it.each(getTestEvents(p.getChangedFilesTestInputs, event))( + '...%s', + async (title, input, expected) => { + if (title.includes('throws an error')) { + expect.assertions(1) + await expect( + require('../GithubHelper').getChangedFiles( + env.octokitMock, + input.repo, + {...input} + ) + ).rejects.toThrowError(new Error(JSON.stringify(expected, null, 2))) + } else { + let files: any[] = [] + files = await require('../GithubHelper').getChangedFiles( + env.octokitMock, + input.repo, + {...input} + ) + expect(files).toStrictEqual(expected) + expect(files.length).toBe(7) + } + } + ) + }) + }) +}) diff --git a/src/tests/InputHelper.test.ts b/src/tests/InputHelper.test.ts new file mode 100644 index 00000000..1c187c40 --- /dev/null +++ b/src/tests/InputHelper.test.ts @@ -0,0 +1,224 @@ +import {Env, p, eventName, getTestEvents} from './mocks/env' + +let env: Env + +describe('Testing InputHelper.ts...', () => { + describe.each(p.testEvents)('...with %s event...', event => { + beforeAll(() => { + env = new Env({}, {githubToken: 'TestToken'}, event) + }) + afterEach(() => { + process.env = {...env.envStart} + jest.resetModules() + env = new Env({}, {}, event) + }) + /** + * @function getInputs + */ + describe('...with function getInputs...', () => { + it('...sets correct default input parameters.', () => { + const {payload, issue, eventName: contextEventName} = env.context + const { + prNumber, + pushAfter, + pushBefore, + githubToken, + githubRepo, + output, + fileOutput, + event: inputEventName + } = require('../InputHelper').getInputs() + const {getInput} = require('@actions/core') + if (event.includes('push')) { + expect(prNumber).toBe(NaN) + expect(pushAfter).toBe(payload.after) + expect(pushBefore).toBe(payload.before) + } + if (event.includes('pull_request') || event.includes('issue_comment')) { + expect(prNumber).toBe(issue.number) + if (event === 'pull_request_synchronize') { + expect(pushAfter).toBe(payload.after) + expect(pushBefore).toBe(payload.before) + } else { + expect(pushAfter).toBeFalsy() + expect(pushBefore).toBeFalsy() + } + } + expect(githubToken).toBe(process.env.INPUT_GITHUBTOKEN) + expect(githubRepo).toBe(process.env.GITHUB_REPOSITORY) + expect(output).toBe('json') + expect(fileOutput).toBe('json') + expect(inputEventName).toBe(contextEventName) + expect(getInput).toHaveBeenCalledTimes(7) + }) + it('...throws error with no token (undefined) process.env["GITHUB_TOKEN"] or (undefined) input githubToken', () => { + delete process.env.GITHUB_TOKEN + delete process.env.INPUT_GITHUBTOKEN + const {getInput} = require('@actions/core') + expect(() => { + require('../InputHelper').getInputs() + }).toThrowError() + expect(getInput).toHaveBeenCalledTimes(1) + }) + it('...throws error with empty string ("") process.env["GITHUB_TOKEN"] or empty string ("") input githubToken', () => { + env.updateInput({githubToken: ''}) + process.env.GITHUB_TOKEN = '' + const {getInput} = require('@actions/core') + expect(() => { + require('../InputHelper').getInputs() + }).toThrowError() + expect(getInput).toHaveBeenCalledTimes(1) + }) + it.each(getTestEvents(p.inputTestInputs, event))( + '...sets %s input "%s" should be %p', + (inputName, input, expected) => { + env.updateInput({[inputName]: input}) + const {payload, issue, eventName: contextEventName} = env.context + const { + prNumber, + pushAfter, + pushBefore, + githubToken, + githubRepo, + output, + fileOutput, + event: inputEventName + } = require('../InputHelper').getInputs() + const {getInput} = require('@actions/core') + if (event.includes('push')) { + expect(prNumber).toBe(inputName === 'prNumber' ? expected : NaN) + expect(pushAfter).toBe( + inputName === 'pushAfter' ? expected : payload.after + ) + expect(pushBefore).toBe( + inputName === 'pushBefore' ? expected : payload.before + ) + } + if ( + event.includes('pull_request') || + event.includes('issue_comment') + ) { + expect(prNumber).toBe( + inputName === 'prNumber' ? expected : issue.number + ) + if (event === 'pull_request_synchronize') { + expect(pushAfter).toBe( + inputName === 'pushAfter' ? expected : payload.after + ) + expect(pushBefore).toBe( + inputName === 'pushBefore' ? expected : payload.before + ) + } else { + expect(pushAfter).toBe( + inputName === 'pushAfter' ? expected : false + ) + expect(pushBefore).toBe( + inputName === 'pushBefore' ? expected : false + ) + } + } + expect(githubToken).toBe( + inputName === 'githubToken' ? expected : 'EnvDefaultToken' + ) + expect(githubRepo).toBe( + inputName === 'githubRepo' + ? expected + : process.env.GITHUB_REPOSITORY + ) + expect(output).toBe(inputName === 'output' ? expected : 'json') + expect(fileOutput).toBe( + inputName === 'fileOutput' ? expected : 'json' + ) + expect(inputEventName).toBe(contextEventName) + expect(getInput).toHaveBeenCalledTimes(7) + } + ) + }) + /** + * @function inferInput + */ + describe('...with function inferInput...', () => { + it.each(getTestEvents(p.inferTestInputs, event))( + '...%s', + (title, input, expected) => { + const {error} = require('@actions/core') + const {warning} = require('@actions/core') + if (title.includes('ERROR with no')) { + expect(() => { + require('../InputHelper').inferInput( + input.before, + input.after, + input.pr + ) + }).toThrowError( + new Error( + JSON.stringify( + { + error: '500/inferInput Error', + from: 'inferInput', + message: `Received event from ${eventName( + event + )}, but received no inputs. {event_name:${eventName( + event + )}, pr: NaN, before:, after:}`, + payload: '' + }, + null, + 2 + ) + ) + ) + } else if (title.includes('ERROR with single')) { + expect(() => { + require('../InputHelper').inferInput( + input.before, + input.after, + input.pr + ) + }).toThrowError( + new Error( + JSON.stringify( + { + error: '500/inferInput Error', + from: 'inferInput', + message: `Received event from ${eventName( + event + )}, but only received a before(${input.before}) or after(${ + input.after + }).\n I need both of these if you want to use a Push event.`, + payload: '' + }, + null, + 2 + ) + ) + ) + } else { + const data = require('../InputHelper').inferInput( + input.before, + input.after, + input.pr + ) + Object.keys(data).forEach(key => + expect(data[key]).toBe(expected[key]) + ) + expect(error).not.toHaveBeenCalled() + } + if (title.includes('WARN weird')) + expect(warning).toHaveBeenCalledWith( + expect.stringContaining( + `received a before(${input.before}) or after(${input.after}) value.` + ) + ) + if (title.includes('WARN all')) + expect(warning).toHaveBeenCalledWith( + expect.stringContaining( + `but received a before(${input.before}), after(${input.after}), and PR(${input.pr}).` + ) + ) + else expect(error).not.toHaveBeenCalled() + } + ) + }) + }) +}) diff --git a/src/tests/UtilsHelper.test.ts b/src/tests/UtilsHelper.test.ts new file mode 100644 index 00000000..e638e4f2 --- /dev/null +++ b/src/tests/UtilsHelper.test.ts @@ -0,0 +1,67 @@ +import {Env, p, getTestEvents} from './mocks/env' + +let env: Env +describe('Testing UtilsHelper.ts...', () => { + describe('...with push event...', () => { + beforeAll(() => { + env = new Env({}, {githubToken: 'TestToken'}, 'push') + }) + afterEach(() => { + process.env = {...env.envStart} + jest.resetModules() + env = new Env({}, {}, 'push') + }) + /** + * @function getErrorString + */ + describe('...with function getErrorString...', () => { + it('...can throw an error', () => { + const error = require('../UtilsHelper').getErrorString() + expect(JSON.stringify(JSON.parse(error))).toBe( + JSON.stringify({error: '500/undefined', payload: ''}) + ) + }) + + it('...can throw an error for my error', () => { + const {setFailed, error: coreError} = require('@actions/core') + const obj = {a: {}} + obj.a = {b: obj} + expect(() => + require('../UtilsHelper').getErrorString( + 'test', + 200, + 'test', + 'test', + obj + ) + ).toThrowError( + JSON.stringify({ + name: '500/undefined', + message: 'Error throwing error.' + }) + ) + // expect(JSON.stringify(JSON.parse(error))).toBe(JSON.stringify({error:'500/undefined', payload:''})) + expect(setFailed).toBeCalledWith( + expect.stringContaining('Error throwing error.') + ) + expect(coreError).toBeCalledWith( + expect.stringContaining('Error throwing error.') + ) + }) + }) + /** + * @function errorMessage + */ + describe('...with function errorMessage...', () => { + it.each(getTestEvents(p.errorMessageInputs, 'push'))( + '...for function %s', + (f, e, expected) => { + const error = require('../UtilsHelper').errorMessage(f, e) + expect(error).toBe( + `${expected}\nException: ${JSON.stringify(e, null, 2)}` + ) + } + ) + }) + }) +}) diff --git a/src/tests/main.test.ts b/src/tests/main.test.ts new file mode 100644 index 00000000..e9b8a998 --- /dev/null +++ b/src/tests/main.test.ts @@ -0,0 +1,73 @@ +import {Env, p, getTestEvents, getTestFiles} from './mocks/env' + +let env: Env = new Env({}, {}) + +describe('Testing main.ts...', () => { + describe.each(p.testEvents)('...with %s event...', event => { + /** + * @function run + */ + describe('...with function run...', () => { + describe.each(getTestEvents(p.getFormatExtInputs, 'push'))( + '...with fileOutput %s...', + (fileOutputName, fileOutputInput, outputExpected) => { + describe.each(getTestEvents(p.changedFilesInput(event), event))( + '...with output %o...', + (outputInput, outputFiles, expectedOutput) => { + afterEach(() => { + process.env = {...env.envStart} + jest.resetAllMocks() + jest.resetModules() + env = new Env( + {}, + { + githubRepo: 'file-changes-action', + githubToken: 'TestToken', + output: outputInput.format, + fileOutput: fileOutputInput + } + ) + }) + it('...normal', async () => { + const githubHelper = require('../GithubHelper') + const filesHelper = require('../FilesHelper') + githubHelper.getChangedFiles = jest.fn( + () => getTestFiles(outputFiles).files + ) + filesHelper.writeOutput = jest.fn(() => {}) + filesHelper.writeFiles = jest.fn(() => {}) + const processExitMock = jest + .spyOn(process, 'exit') + .mockImplementation( + (code?: number | undefined) => code as never + ) + const {run} = require('../main') + await run + expect(githubHelper.getChangedFiles).toBeCalled() + expect(filesHelper.writeOutput).toBeCalled() + expect(filesHelper.writeFiles).toBeCalled() + expect(processExitMock).toBeCalled() + }) + it.each(getTestEvents(p.mainErrorInputs, 'push'))( + '...throws error for function %s...', + async (f, e, expected) => { + const inputHelper = require('../InputHelper') + const {setFailed} = require('@actions/core') + inputHelper.getInputs = jest.fn(() => { + throw new Error(e) + }) + const {run} = require('../main') + await expect(run).toBe(run) + expect(setFailed).toBeCalledWith( + `${expected}\nException: ${e}` + ) + expect(inputHelper.getInputs).toHaveBeenCalledTimes(1) + } + ) + } + ) + } + ) + }) + }) +}) diff --git a/src/tests/mocks/core/index.test.ts b/src/tests/mocks/core/index.test.ts new file mode 100644 index 00000000..2bffc6c7 --- /dev/null +++ b/src/tests/mocks/core/index.test.ts @@ -0,0 +1,55 @@ +import {mock} from '.' + +const core = mock() + +describe('Testing CoreMock object...', () => { + beforeAll(() => jest.restoreAllMocks()) + it('...CoreMock is a mock', () => { + expect(jest.isMockFunction(core.getInput)).toBe(true) + expect(jest.isMockFunction(core.setFailed)).toBe(true) + expect(jest.isMockFunction(core.setOutput)).toBe(true) + expect(jest.isMockFunction(core.debug)).toBe(true) + expect(jest.isMockFunction(core.warning)).toBe(true) + expect(jest.isMockFunction(core.info)).toBe(true) + expect(jest.isMockFunction(core.error)).toBe(true) + }) + it('...CoreMock mocks core', () => { + const realCore = require('@actions/core') + expect(core).toMatchObject(realCore) + }) + it('...CoreMock mocks setFailed', () => { + core.setFailed('Test Message') + expect(core.error).toBeCalledWith('Test Message') + expect(core.setFailed).toBeCalledWith('Test Message') + }) + it('...CoreMock mocks setOutput', () => { + core.setOutput('TestName', 'TestValue') + expect(core.setOutput).toBeCalledWith('TestName', 'TestValue') + }) + it('...CoreMock mocks setOutput error', () => { + expect(() => core.setOutput('ERROROUTPUT', 'TestValue')).toThrowError( + new Error(JSON.stringify({name: 'CoreError', status: '500'})) + ) + }) + it('...CoreMock mocks getInput', () => { + process.env.INPUT_TEST = 'TESTINPUT' + const input = core.getInput('TEST') + expect(input).toBe('TESTINPUT') + }) + it('...CoreMock mocks debug', () => { + core.debug('Test Message') + expect(core.debug).toBeCalledWith('Test Message') + }) + it('...CoreMock mocks warning', () => { + core.warning('Test Message') + expect(core.warning).toBeCalledWith('Test Message') + }) + it('...CoreMock mocks info', () => { + core.info('Test Message') + expect(core.info).toBeCalledWith('Test Message') + }) + it('...CoreMock mocks error', () => { + core.error('Test Message') + expect(core.error).toBeCalledWith('Test Message') + }) +}) diff --git a/src/tests/mocks/core/index.ts b/src/tests/mocks/core/index.ts new file mode 100644 index 00000000..640725b5 --- /dev/null +++ b/src/tests/mocks/core/index.ts @@ -0,0 +1,34 @@ +import {CoreMock} from 'typings/CoreMock' + +const coreMock: CoreMock = { + setFailed: jest.fn(message => { + coreMock.error(message) + // console.error(`setFailed triggered`) + }), + setOutput: jest.fn((name, value) => { + if (name === 'ERROROUTPUT') + throw new Error(JSON.stringify({name: 'CoreError', status: '500'})) + // console.log(`setOutputName: ${name} value: ${value}`) + }), + // eslint-disable-next-line @typescript-eslint/no-unused-vars + getInput: jest.fn((name, options) => { + return process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] + }), + debug: jest.fn(message => { + // console.debug(`core.debug triggered: ${message}`) + }), + warning: jest.fn(message => { + // console.warn(`core.warning triggered: ${message}`) + }), + info: jest.fn(message => { + // console.info(`core.info triggered: ${message}`) + }), + error: jest.fn(message => { + // console.error(`core.error triggered: ${message}`) + }) +} + +export function mock(): CoreMock { + jest.mock('@actions/core', () => coreMock) + return coreMock +} diff --git a/src/tests/mocks/env/events/issue_comment_created.json b/src/tests/mocks/env/events/issue_comment_created.json new file mode 100644 index 00000000..4f3d66a4 --- /dev/null +++ b/src/tests/mocks/env/events/issue_comment_created.json @@ -0,0 +1,204 @@ +{ + "action": "created", + "comment": { + "author_association": "OWNER", + "body": "comment", + "created_at": "2020-03-05T01:48:18Z", + "html_url": "https://github.com/trilom-test/file-changes-action/pull/5#issuecomment-594984510", + "id": 594984510, + "issue_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5", + "node_id": "MDEyOklzc3VlQ29tbWVudDU5NDk4NDUxMA==", + "updated_at": "2020-03-05T01:48:18Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments/594984510", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "issue": { + "assignee": null, + "assignees": [], + "author_association": "OWNER", + "body": "", + "closed_at": null, + "comments": 1, + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5/comments", + "created_at": "2020-03-05T01:48:12Z", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5/events", + "html_url": "https://github.com/trilom-test/file-changes-action/pull/5", + "id": 575936509, + "labels": [], + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5/labels{/name}", + "locked": false, + "milestone": null, + "node_id": "MDExOlB1bGxSZXF1ZXN0Mzg0MDIyMTM5", + "number": 5, + "pull_request": { + "diff_url": "https://github.com/trilom-test/file-changes-action/pull/5.diff", + "html_url": "https://github.com/trilom-test/file-changes-action/pull/5", + "patch_url": "https://github.com/trilom-test/file-changes-action/pull/5.patch", + "url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5" + }, + "repository_url": "https://api.github.com/repos/trilom-test/file-changes-action", + "state": "open", + "title": "test", + "updated_at": "2020-03-05T01:48:18Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "repository": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": "2020-02-25T04:29:40Z", + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": "2020-03-05T01:48:13Z", + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29568, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-05T01:45:22Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sender": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } +} \ No newline at end of file diff --git a/src/tests/mocks/env/events/issue_comment_edited.json b/src/tests/mocks/env/events/issue_comment_edited.json new file mode 100644 index 00000000..bce685bf --- /dev/null +++ b/src/tests/mocks/env/events/issue_comment_edited.json @@ -0,0 +1,209 @@ +{ + "action": "edited", + "changes": { + "body": { + "from": "comment" + } + }, + "comment": { + "author_association": "OWNER", + "body": "commentet", + "created_at": "2020-03-05T01:48:18Z", + "html_url": "https://github.com/trilom-test/file-changes-action/pull/5#issuecomment-594984510", + "id": 594984510, + "issue_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5", + "node_id": "MDEyOklzc3VlQ29tbWVudDU5NDk4NDUxMA==", + "updated_at": "2020-03-05T01:48:22Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments/594984510", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "issue": { + "assignee": null, + "assignees": [], + "author_association": "OWNER", + "body": "", + "closed_at": null, + "comments": 1, + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5/comments", + "created_at": "2020-03-05T01:48:12Z", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5/events", + "html_url": "https://github.com/trilom-test/file-changes-action/pull/5", + "id": 575936509, + "labels": [], + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5/labels{/name}", + "locked": false, + "milestone": null, + "node_id": "MDExOlB1bGxSZXF1ZXN0Mzg0MDIyMTM5", + "number": 5, + "pull_request": { + "diff_url": "https://github.com/trilom-test/file-changes-action/pull/5.diff", + "html_url": "https://github.com/trilom-test/file-changes-action/pull/5", + "patch_url": "https://github.com/trilom-test/file-changes-action/pull/5.patch", + "url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5" + }, + "repository_url": "https://api.github.com/repos/trilom-test/file-changes-action", + "state": "open", + "title": "test", + "updated_at": "2020-03-05T01:48:22Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "repository": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": "2020-02-25T04:29:40Z", + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": "2020-03-05T01:48:13Z", + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29568, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-05T01:45:22Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sender": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } +} \ No newline at end of file diff --git a/src/tests/mocks/env/events/pull_request_opened.json b/src/tests/mocks/env/events/pull_request_opened.json new file mode 100644 index 00000000..77311eb5 --- /dev/null +++ b/src/tests/mocks/env/events/pull_request_opened.json @@ -0,0 +1,464 @@ +{ + "action": "opened", + "number": 5, + "pull_request": { + "_links": { + "comments": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5/comments" + }, + "commits": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5/commits" + }, + "html": { + "href": "https://github.com/trilom-test/file-changes-action/pull/5" + }, + "issue": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5" + }, + "review_comment": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/comments{/number}" + }, + "review_comments": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5/comments" + }, + "self": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5" + }, + "statuses": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/513ca39ff3756e5b510ad752edaba6a0aeb2efac" + } + }, + "additions": 6, + "assignee": null, + "assignees": [], + "author_association": "OWNER", + "base": { + "label": "trilom-test:develop", + "ref": "develop", + "repo": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": "2020-02-25T04:29:40Z", + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": "2020-03-05T01:45:20Z", + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29568, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-05T01:45:22Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sha": "6fa4d89edfa019c534c43bf283c361b770d584fc", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "body": "", + "changed_files": 1, + "closed_at": null, + "comments": 0, + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5/comments", + "commits": 3, + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5/commits", + "created_at": "2020-03-05T01:48:12Z", + "deletions": 0, + "diff_url": "https://github.com/trilom-test/file-changes-action/pull/5.diff", + "draft": false, + "head": { + "label": "trilom-test:releases/v1", + "ref": "releases/v1", + "repo": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": "2020-02-25T04:29:40Z", + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": "2020-03-05T01:45:20Z", + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29568, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-05T01:45:22Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sha": "513ca39ff3756e5b510ad752edaba6a0aeb2efac", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "html_url": "https://github.com/trilom-test/file-changes-action/pull/5", + "id": 384022139, + "issue_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5", + "labels": [], + "locked": false, + "maintainer_can_modify": false, + "merge_commit_sha": null, + "mergeable": null, + "mergeable_state": "unknown", + "merged": false, + "merged_at": null, + "merged_by": null, + "milestone": null, + "node_id": "MDExOlB1bGxSZXF1ZXN0Mzg0MDIyMTM5", + "number": 5, + "patch_url": "https://github.com/trilom-test/file-changes-action/pull/5.patch", + "rebaseable": null, + "requested_reviewers": [], + "requested_teams": [], + "review_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/comments{/number}", + "review_comments": 0, + "review_comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5/comments", + "state": "open", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/513ca39ff3756e5b510ad752edaba6a0aeb2efac", + "title": "test", + "updated_at": "2020-03-05T01:48:12Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "repository": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": "2020-02-25T04:29:40Z", + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": "2020-03-05T01:45:20Z", + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29568, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-05T01:45:22Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sender": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } +} \ No newline at end of file diff --git a/src/tests/mocks/env/events/pull_request_reopened.json b/src/tests/mocks/env/events/pull_request_reopened.json new file mode 100644 index 00000000..d1e314c1 --- /dev/null +++ b/src/tests/mocks/env/events/pull_request_reopened.json @@ -0,0 +1,464 @@ +{ + "action": "reopened", + "number": 5, + "pull_request": { + "_links": { + "comments": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5/comments" + }, + "commits": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5/commits" + }, + "html": { + "href": "https://github.com/trilom-test/file-changes-action/pull/5" + }, + "issue": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5" + }, + "review_comment": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/comments{/number}" + }, + "review_comments": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5/comments" + }, + "self": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5" + }, + "statuses": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/513ca39ff3756e5b510ad752edaba6a0aeb2efac" + } + }, + "additions": 6, + "assignee": null, + "assignees": [], + "author_association": "OWNER", + "base": { + "label": "trilom-test:develop", + "ref": "develop", + "repo": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": "2020-02-25T04:29:40Z", + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": "2020-03-05T01:48:13Z", + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29568, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-05T01:45:22Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sha": "6fa4d89edfa019c534c43bf283c361b770d584fc", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "body": "", + "changed_files": 1, + "closed_at": null, + "comments": 1, + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5/comments", + "commits": 3, + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5/commits", + "created_at": "2020-03-05T01:48:12Z", + "deletions": 0, + "diff_url": "https://github.com/trilom-test/file-changes-action/pull/5.diff", + "draft": false, + "head": { + "label": "trilom-test:releases/v1", + "ref": "releases/v1", + "repo": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": "2020-02-25T04:29:40Z", + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": "2020-03-05T01:48:13Z", + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29568, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-05T01:45:22Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sha": "513ca39ff3756e5b510ad752edaba6a0aeb2efac", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "html_url": "https://github.com/trilom-test/file-changes-action/pull/5", + "id": 384022139, + "issue_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/5", + "labels": [], + "locked": false, + "maintainer_can_modify": false, + "merge_commit_sha": "5eb7f07e7e5577545e46e59a8805ece7ae6f6ca6", + "mergeable": null, + "mergeable_state": "unknown", + "merged": false, + "merged_at": null, + "merged_by": null, + "milestone": null, + "node_id": "MDExOlB1bGxSZXF1ZXN0Mzg0MDIyMTM5", + "number": 5, + "patch_url": "https://github.com/trilom-test/file-changes-action/pull/5.patch", + "rebaseable": null, + "requested_reviewers": [], + "requested_teams": [], + "review_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/comments{/number}", + "review_comments": 0, + "review_comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5/comments", + "state": "open", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/513ca39ff3756e5b510ad752edaba6a0aeb2efac", + "title": "test", + "updated_at": "2020-03-05T01:48:28Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/5", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "repository": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": "2020-02-25T04:29:40Z", + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": "2020-03-05T01:48:13Z", + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29568, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-05T01:45:22Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sender": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } +} \ No newline at end of file diff --git a/src/tests/mocks/env/events/pull_request_synchronize.json b/src/tests/mocks/env/events/pull_request_synchronize.json new file mode 100644 index 00000000..bd0adc4b --- /dev/null +++ b/src/tests/mocks/env/events/pull_request_synchronize.json @@ -0,0 +1,466 @@ +{ + "action": "synchronize", + "after": "0a8847551b2045730dc5c1681d59717288619f94", + "before": "787a72d40923de2f5308e7095ff9e6063fdbc219", + "number": 3, + "pull_request": { + "_links": { + "comments": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/issues/3/comments" + }, + "commits": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/3/commits" + }, + "html": { + "href": "https://github.com/trilom-test/file-changes-action/pull/3" + }, + "issue": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/issues/3" + }, + "review_comment": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/comments{/number}" + }, + "review_comments": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/3/comments" + }, + "self": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/3" + }, + "statuses": { + "href": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/0a8847551b2045730dc5c1681d59717288619f94" + } + }, + "additions": 39, + "assignee": null, + "assignees": [], + "author_association": "OWNER", + "base": { + "label": "trilom-test:develop", + "ref": "develop", + "repo": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": "2020-02-25T04:29:40Z", + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": "2020-03-02T09:50:55Z", + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29569, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-02T03:52:45Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sha": "06257961b2029c629a743a665e17e3430d741919", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "body": "", + "changed_files": 1, + "closed_at": null, + "comments": 0, + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/3/comments", + "commits": 2, + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/3/commits", + "created_at": "2020-03-02T03:53:01Z", + "deletions": 3, + "diff_url": "https://github.com/trilom-test/file-changes-action/pull/3.diff", + "draft": false, + "head": { + "label": "trilom-test:releases/v1", + "ref": "releases/v1", + "repo": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": "2020-02-25T04:29:40Z", + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": "2020-03-02T09:50:55Z", + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29569, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-02T03:52:45Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sha": "0a8847551b2045730dc5c1681d59717288619f94", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "html_url": "https://github.com/trilom-test/file-changes-action/pull/3", + "id": 382158986, + "issue_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/3", + "labels": [], + "locked": false, + "maintainer_can_modify": false, + "merge_commit_sha": "8cee61b88b5359f49111ee556d9f7b0cbbeb3d9d", + "mergeable": null, + "mergeable_state": "unknown", + "merged": false, + "merged_at": null, + "merged_by": null, + "milestone": null, + "node_id": "MDExOlB1bGxSZXF1ZXN0MzgyMTU4OTg2", + "number": 3, + "patch_url": "https://github.com/trilom-test/file-changes-action/pull/3.patch", + "rebaseable": null, + "requested_reviewers": [], + "requested_teams": [], + "review_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/comments{/number}", + "review_comments": 0, + "review_comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/3/comments", + "state": "open", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/0a8847551b2045730dc5c1681d59717288619f94", + "title": "Update main.yml", + "updated_at": "2020-03-02T09:50:56Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls/3", + "user": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } + }, + "repository": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": "2020-02-25T04:29:40Z", + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": "2020-03-02T09:50:55Z", + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29569, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-02T03:52:45Z", + "url": "https://api.github.com/repos/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sender": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } +} \ No newline at end of file diff --git a/src/tests/mocks/env/events/push.json b/src/tests/mocks/env/events/push.json new file mode 100644 index 00000000..7e3a3d56 --- /dev/null +++ b/src/tests/mocks/env/events/push.json @@ -0,0 +1,176 @@ +{ + "after": "513ca39ff3756e5b510ad752edaba6a0aeb2efac", + "base_ref": null, + "before": "01a956ad7dbd39773299d421b402535cef6ab1f3", + "commits": [ + { + "author": { + "email": "61441570+trilom-test@users.noreply.github.com", + "name": "trilom-test", + "username": "trilom-test" + }, + "committer": { + "email": "noreply@github.com", + "name": "GitHub", + "username": "web-flow" + }, + "distinct": true, + "id": "513ca39ff3756e5b510ad752edaba6a0aeb2efac", + "message": "Update main.yml", + "timestamp": "2020-03-04T20:45:19-05:00", + "tree_id": "738da2abd0c2da5bd034958754b72132d07e9bf6", + "url": "https://github.com/trilom-test/file-changes-action/commit/513ca39ff3756e5b510ad752edaba6a0aeb2efac" + } + ], + "compare": "https://github.com/trilom-test/file-changes-action/compare/01a956ad7dbd...513ca39ff375", + "created": false, + "deleted": false, + "forced": false, + "head_commit": { + "author": { + "email": "61441570+trilom-test@users.noreply.github.com", + "name": "trilom-test", + "username": "trilom-test" + }, + "committer": { + "email": "noreply@github.com", + "name": "GitHub", + "username": "web-flow" + }, + "distinct": true, + "id": "513ca39ff3756e5b510ad752edaba6a0aeb2efac", + "message": "Update main.yml", + "timestamp": "2020-03-04T20:45:19-05:00", + "tree_id": "738da2abd0c2da5bd034958754b72132d07e9bf6", + "url": "https://github.com/trilom-test/file-changes-action/commit/513ca39ff3756e5b510ad752edaba6a0aeb2efac" + }, + "pusher": { + "email": "61441570+trilom-test@users.noreply.github.com", + "name": "trilom-test" + }, + "ref": "refs/heads/releases/v1", + "repository": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": 1582604980, + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "master_branch": "releases/v1", + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 0, + "open_issues_count": 0, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "email": "61441570+trilom-test@users.noreply.github.com", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "name": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": 1583372720, + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29568, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers": 0, + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-05T01:43:52Z", + "url": "https://github.com/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sender": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } +} \ No newline at end of file diff --git a/src/tests/mocks/env/events/push_merge.json b/src/tests/mocks/env/events/push_merge.json new file mode 100644 index 00000000..5b4dc0cf --- /dev/null +++ b/src/tests/mocks/env/events/push_merge.json @@ -0,0 +1,230 @@ +{ + "after": "5e877b4c67fdec76cf88c96729e7f788e044c2fd", + "base_ref": null, + "before": "6fa4d89edfa019c534c43bf283c361b770d584fc", + "commits": [ + { + "author": { + "email": "61441570+trilom-test@users.noreply.github.com", + "name": "trilom-test", + "username": "trilom-test" + }, + "committer": { + "email": "noreply@github.com", + "name": "GitHub", + "username": "web-flow" + }, + "distinct": false, + "id": "58b8c6de8e727594c66ea84711826d6a6840917e", + "message": "Update main.yml", + "timestamp": "2020-03-04T20:42:59-05:00", + "tree_id": "62caf4ac23f96a389662af394ec47f8b9331778c", + "url": "https://github.com/trilom-test/file-changes-action/commit/58b8c6de8e727594c66ea84711826d6a6840917e" + }, + { + "author": { + "email": "61441570+trilom-test@users.noreply.github.com", + "name": "trilom-test", + "username": "trilom-test" + }, + "committer": { + "email": "noreply@github.com", + "name": "GitHub", + "username": "web-flow" + }, + "distinct": false, + "id": "01a956ad7dbd39773299d421b402535cef6ab1f3", + "message": "Update main.yml", + "timestamp": "2020-03-04T20:43:49-05:00", + "tree_id": "d15e03406f052d5bcd7850799fc3bbcbf593480d", + "url": "https://github.com/trilom-test/file-changes-action/commit/01a956ad7dbd39773299d421b402535cef6ab1f3" + }, + { + "author": { + "email": "61441570+trilom-test@users.noreply.github.com", + "name": "trilom-test", + "username": "trilom-test" + }, + "committer": { + "email": "noreply@github.com", + "name": "GitHub", + "username": "web-flow" + }, + "distinct": false, + "id": "513ca39ff3756e5b510ad752edaba6a0aeb2efac", + "message": "Update main.yml", + "timestamp": "2020-03-04T20:45:19-05:00", + "tree_id": "738da2abd0c2da5bd034958754b72132d07e9bf6", + "url": "https://github.com/trilom-test/file-changes-action/commit/513ca39ff3756e5b510ad752edaba6a0aeb2efac" + }, + { + "author": { + "email": "61441570+trilom-test@users.noreply.github.com", + "name": "trilom-test", + "username": "trilom-test" + }, + "committer": { + "email": "noreply@github.com", + "name": "GitHub", + "username": "web-flow" + }, + "distinct": true, + "id": "5e877b4c67fdec76cf88c96729e7f788e044c2fd", + "message": "Merge pull request #5 from trilom-test/releases/v1\n\ntest", + "timestamp": "2020-03-04T20:48:32-05:00", + "tree_id": "9b0c64c91d75ceedcba03c22e85b1837f4ba5035", + "url": "https://github.com/trilom-test/file-changes-action/commit/5e877b4c67fdec76cf88c96729e7f788e044c2fd" + } + ], + "compare": "https://github.com/trilom-test/file-changes-action/compare/6fa4d89edfa0...5e877b4c67fd", + "created": false, + "deleted": false, + "forced": false, + "head_commit": { + "author": { + "email": "61441570+trilom-test@users.noreply.github.com", + "name": "trilom-test", + "username": "trilom-test" + }, + "committer": { + "email": "noreply@github.com", + "name": "GitHub", + "username": "web-flow" + }, + "distinct": true, + "id": "5e877b4c67fdec76cf88c96729e7f788e044c2fd", + "message": "Merge pull request #5 from trilom-test/releases/v1\n\ntest", + "timestamp": "2020-03-04T20:48:32-05:00", + "tree_id": "9b0c64c91d75ceedcba03c22e85b1837f4ba5035", + "url": "https://github.com/trilom-test/file-changes-action/commit/5e877b4c67fdec76cf88c96729e7f788e044c2fd" + }, + "pusher": { + "email": "61441570+trilom-test@users.noreply.github.com", + "name": "trilom-test" + }, + "ref": "refs/heads/develop", + "repository": { + "archive_url": "https://api.github.com/repos/trilom-test/file-changes-action/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/trilom-test/file-changes-action/assignees{/user}", + "blobs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/trilom-test/file-changes-action/branches{/branch}", + "clone_url": "https://github.com/trilom-test/file-changes-action.git", + "collaborators_url": "https://api.github.com/repos/trilom-test/file-changes-action/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/trilom-test/file-changes-action/comments{/number}", + "commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/commits{/sha}", + "compare_url": "https://api.github.com/repos/trilom-test/file-changes-action/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/trilom-test/file-changes-action/contents/{+path}", + "contributors_url": "https://api.github.com/repos/trilom-test/file-changes-action/contributors", + "created_at": 1582604980, + "default_branch": "releases/v1", + "deployments_url": "https://api.github.com/repos/trilom-test/file-changes-action/deployments", + "description": "This action can be added, and you will get outputs of all of the files that have changed in your repository for you to use.", + "disabled": false, + "downloads_url": "https://api.github.com/repos/trilom-test/file-changes-action/downloads", + "events_url": "https://api.github.com/repos/trilom-test/file-changes-action/events", + "fork": true, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/trilom-test/file-changes-action/forks", + "full_name": "trilom-test/file-changes-action", + "git_commits_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/tags{/sha}", + "git_url": "git://github.com/trilom-test/file-changes-action.git", + "has_downloads": true, + "has_issues": false, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": null, + "hooks_url": "https://api.github.com/repos/trilom-test/file-changes-action/hooks", + "html_url": "https://github.com/trilom-test/file-changes-action", + "id": 242909684, + "issue_comment_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues/events{/number}", + "issues_url": "https://api.github.com/repos/trilom-test/file-changes-action/issues{/number}", + "keys_url": "https://api.github.com/repos/trilom-test/file-changes-action/keys{/key_id}", + "labels_url": "https://api.github.com/repos/trilom-test/file-changes-action/labels{/name}", + "language": "JavaScript", + "languages_url": "https://api.github.com/repos/trilom-test/file-changes-action/languages", + "license": { + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZTEz", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "master_branch": "releases/v1", + "merges_url": "https://api.github.com/repos/trilom-test/file-changes-action/merges", + "milestones_url": "https://api.github.com/repos/trilom-test/file-changes-action/milestones{/number}", + "mirror_url": null, + "name": "file-changes-action", + "node_id": "MDEwOlJlcG9zaXRvcnkyNDI5MDk2ODQ=", + "notifications_url": "https://api.github.com/repos/trilom-test/file-changes-action/notifications{?since,all,participating}", + "open_issues": 0, + "open_issues_count": 0, + "owner": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "email": "61441570+trilom-test@users.noreply.github.com", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "name": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + }, + "private": false, + "pulls_url": "https://api.github.com/repos/trilom-test/file-changes-action/pulls{/number}", + "pushed_at": 1583372913, + "releases_url": "https://api.github.com/repos/trilom-test/file-changes-action/releases{/id}", + "size": 29568, + "ssh_url": "git@github.com:trilom-test/file-changes-action.git", + "stargazers": 0, + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/trilom-test/file-changes-action/stargazers", + "statuses_url": "https://api.github.com/repos/trilom-test/file-changes-action/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscribers", + "subscription_url": "https://api.github.com/repos/trilom-test/file-changes-action/subscription", + "svn_url": "https://github.com/trilom-test/file-changes-action", + "tags_url": "https://api.github.com/repos/trilom-test/file-changes-action/tags", + "teams_url": "https://api.github.com/repos/trilom-test/file-changes-action/teams", + "trees_url": "https://api.github.com/repos/trilom-test/file-changes-action/git/trees{/sha}", + "updated_at": "2020-03-05T01:45:22Z", + "url": "https://github.com/trilom-test/file-changes-action", + "watchers": 0, + "watchers_count": 0 + }, + "sender": { + "avatar_url": "https://avatars3.githubusercontent.com/u/61441570?v=4", + "events_url": "https://api.github.com/users/trilom-test/events{/privacy}", + "followers_url": "https://api.github.com/users/trilom-test/followers", + "following_url": "https://api.github.com/users/trilom-test/following{/other_user}", + "gists_url": "https://api.github.com/users/trilom-test/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/trilom-test", + "id": 61441570, + "login": "trilom-test", + "node_id": "MDQ6VXNlcjYxNDQxNTcw", + "organizations_url": "https://api.github.com/users/trilom-test/orgs", + "received_events_url": "https://api.github.com/users/trilom-test/received_events", + "repos_url": "https://api.github.com/users/trilom-test/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/trilom-test/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/trilom-test/subscriptions", + "type": "User", + "url": "https://api.github.com/users/trilom-test" + } +} \ No newline at end of file diff --git a/src/tests/mocks/env/events/schedule.json b/src/tests/mocks/env/events/schedule.json new file mode 100644 index 00000000..c457f8b8 --- /dev/null +++ b/src/tests/mocks/env/events/schedule.json @@ -0,0 +1,3 @@ +{ + "schedule": "*/3 * * * *" +} diff --git a/src/tests/mocks/env/index.test.ts b/src/tests/mocks/env/index.test.ts new file mode 100644 index 00000000..79ba442f --- /dev/null +++ b/src/tests/mocks/env/index.test.ts @@ -0,0 +1,180 @@ +import {Env, p, eventName, formatInput, getTestEvents, getTestFiles} from '.' + +let env: Env + +describe('Testing Env object with push event...', () => { + it('...Env sets push as default event', () => { + env = new Env({}, {}) + expect(process.env.GITHUB_EVENT_NAME).toBe('push') + }) +}) + +describe.each(p.testEvents)('Testing Env object with %s event...', event => { + beforeAll(() => { + env = new Env({}, {}, event) + }) + it('...Env can get correct test file inputs', () => { + const {files, stats} = getTestFiles() + const filesCount = + Object.values(stats).reduce((prev, curr) => prev + curr) / 2 + expect(files.length).toBe(73) + expect(filesCount).toBe(73) + expect(stats.files).toStrictEqual(73) + expect(stats.files).toStrictEqual(filesCount) + }) + it('...Env can get custom files', () => { + const {files, stats} = getTestFiles([ + '/test/test', + '/test1/test1', + '/test2/test2', + '/test3/test3' + ]) + const filesCount = + Object.values(stats).reduce((prev, curr) => prev + curr) / 2 + expect(files.length).toBe(4) + expect(filesCount).toBe(4) + expect(stats.files).toStrictEqual(4) + expect(stats.files).toStrictEqual(filesCount) + }) + it('...Env can get custom file properties', () => { + const {files, stats} = getTestFiles( + ['/test/test', '/test1/test1', '/test2/test2', '/test3/test3'], + {files: 0, test: 0, test1: 0, test2: 0, test3: 0} + ) + const filesCount = + Object.values(stats).reduce((prev, curr) => prev + curr) / 2 + expect(files.length).toBe(4) + expect(filesCount).toBe(4) + expect(stats.files).toStrictEqual(4) + expect(stats.files).toStrictEqual(filesCount) + }) + it('...Env can get custom files limited', () => { + const {files, stats} = getTestFiles( + [ + '/test/test', + '/test1/test1', + '/test2/test2', + '/test3/test3', + '/test4/test4', + '/test5/test5', + '/test6/test6', + '/test7/test7' + ], + {files: 0, added: 0, removed: 0, modified: 0}, + 4 + ) + const filesCount = + Object.values(stats).reduce((prev, curr) => prev + curr) / 2 + expect(files.length).toBe(4) + expect(filesCount).toBe(8) // this is 8 because it doesnt update the stats object + expect(stats.files).toStrictEqual(8) // this is 8 because it doesnt update the stats object + expect(stats.files).toStrictEqual(filesCount) + }) + it('...Env can get correct test event inputs', () => { + const initClientTestInputs = [ + {inputs: ['test include all'], events: 'all'}, + {inputs: ['test exclude string'], events: 'tall'}, + {inputs: ['test include string'], events: event}, + {inputs: ['test include array'], events: [event, 'tall']}, + {inputs: ['test exclude array'], events: ['handsome', 'dark', 'tall']} + ] + const result = getTestEvents(initClientTestInputs, event) + expect(result.length).toBe(3) + }) + it('...Env can get correct process.env.GITHUB_EVENT_NAME', () => { + const result = eventName(event) + if (result.includes('push')) expect(result).toBe('push') + else if (result.includes('pull_request')) + expect(result).toBe('pull_request') + else if (result.includes('issue_comment')) + expect(result).toBe('issue_comment') + else expect(result).toBe(result.trim()) + }) + it('...Env can format strings for action process.env.INPUT_INPUTNAME', () => { + const input = {test: 'value', REALtest: 'realVALUE', [event]: event} + const result = formatInput(input) + expect(result).toStrictEqual({ + INPUT_TEST: 'value', + INPUT_REALTEST: 'realVALUE', + [`INPUT_${event.replace(/ /g, '_').toUpperCase()}`]: event + }) + }) + it('...Env can updateInput for action in process.env.INPUT_INPUTNAME without a new object', () => { + env = new Env({}, {test_input: 'test_value'}, event) + expect(process.env.INPUT_TEST_INPUT).toEqual('test_value') + env.updateInput({test_input: 'new_value'}) + expect(process.env.INPUT_TEST_INPUT).toEqual('new_value') + delete process.env.INPUT_TEST_INPUT + }) + if (event === 'push') { + it('...Env mocks Octokit.pulls.listFiles', () => { + // console.log(JSON.stringify(env)) + const request = p.OctokitPullsListFilesRequest + const response = p.OctokitPullsListFilesResponse + return env.octokitMock.pulls.listFiles(request).then(data => { + expect(data.data).toBe(response) + return expect(data.data.length).toBe(7) + }) + }) + it('...Env mocks Octokit.pulls.listFiles.endpoint.merge', () => { + const request = p.OctokitPullsListFilesEndpointMergeRequest + const response = p.OctokitPullsListFilesEndpointMergeResponse + const data = env.octokitMock.pulls.listFiles.endpoint.merge(request) + expect(data).toStrictEqual(response) + }) + it('...Env mocks Octokit.repos.paginate for pr', () => { + const request = p.OctokitPaginatePrRequest + const response = p.OctokitPaginatePrResponse + return env.octokitMock.paginate(request).then(data => { + expect(data).toStrictEqual(response) + return expect(data.length).toBe(7) + }) + }) + it('...Env mocks Octokit.repos.paginate for pr with custom callback', async () => { + const request = p.OctokitPaginatePrRequest + const response = p.OctokitPaginatePrResponse + return env.octokitMock + .paginate(request, res => { + return res.data + }) + .then(data => { + expect(data).toStrictEqual(response) + return expect(data.length).toBe(7) + }) + }) + } + if (event === 'pull_request_synchronize') { + it('...Env mocks Octokit.repos.compareCommits', () => { + const request = p.OctokitReposCompareCommitsRequest + const response = p.OctokitReposCompareCommitsResponse + return env.octokitMock.repos.compareCommits(request).then(data => { + expect(data.data.files).toBe(response) + return expect(data.data.files.length).toBe(7) + }) + }) + it('...Env mocks Octokit.repos.compareCommits.endpoint.merge', () => { + const request = p.OctokitReposCompareCommitsEndpointMergeRequest + const response = p.OctokitReposCompareCommitsEndpointMergeResponse + const data = env.octokitMock.repos.compareCommits.endpoint.merge(request) + expect(data).toStrictEqual(response) + }) + it('...Env mocks Octokit.repos.paginate for push', async () => { + const request = p.OctokitPaginatePushRequest + const response = p.OctokitPaginatePushResponse + expect.assertions(1) + const files = await env.octokitMock.paginate(request).then(data => { + return data.map(commit => commit.files) + }) + expect(files).toStrictEqual([response]) + }) + it('...Env mocks Octokit.repos.paginate for push with custom callback', async () => { + const request = p.OctokitPaginatePushRequest + const response = p.OctokitPaginatePushResponse + const files = await env.octokitMock.paginate(request, res => { + return res.data.files + }) + expect(files).toStrictEqual(response) + expect(files.length).toBe(7) + }) + } +}) diff --git a/src/tests/mocks/env/index.ts b/src/tests/mocks/env/index.ts new file mode 100644 index 00000000..206b5446 --- /dev/null +++ b/src/tests/mocks/env/index.ts @@ -0,0 +1,152 @@ +import {Context} from '@actions/github/lib/context' +import {CoreMock} from 'typings/CoreMock' +import {OctokitMock} from 'typings/OctokitMock' +import {GitHubMock} from 'typings/GitHubMock' +import {FsMock} from 'typings/FsMock' +import {GitHubFile} from 'typings/GitHubFile' +import {resolve as _resolve} from 'path' +import {mock as mockCore} from '../core' +import {mock as mockGitHub} from '../github' +import {mock as mockFs} from '../fs' +import * as octokitPayloads from '../octokit/payloads' +import * as envPayloads from '../../payloads' + +const payloads = {...octokitPayloads, ...envPayloads} +// export payloads and class +export {payloads, payloads as p} + +export function eventName(e: string): string { + if (e.includes('push')) return 'push' + if (e.includes('pull_request')) return 'pull_request' + if (e.includes('issue_comment')) return 'issue_comment' + return e.trim() +} + +export function getTestEvents(inputs: any, event: string): any[][] { + const ret: any[][] = [] + inputs.forEach((test: any) => { + if (typeof test.events === 'string' && test.events === 'all') + ret.push(test.inputs) + // add for all events + else if (typeof test.events === 'string' && test.events === event) + ret.push(test.inputs) + // add for named event + else if (Array.isArray(test.events) && test.events.includes(event)) + ret.push(test.inputs) // add for named event in list + }) + return ret +} + +export function getTestFiles( + files: string[] = octokitPayloads.normalFileArray, + stats: {files: number; [key: string]: number} = { + files: 0, + added: 0, + removed: 0, + modified: 0 + }, + limit: number = octokitPayloads.normalFileArray.length +): {files: GitHubFile[]; stats: {[key: string]: number}} { + const s = stats + const statuses = Object.keys(stats).filter(key => key !== 'files') + return { + files: (files + .map(file => { + const fStatus = statuses[ + Math.floor(Math.random() * statuses.length) + ] as string + s.files += 1 + s[fStatus] += 1 + return ({[fStatus]: file, status: fStatus} as unknown) as GitHubFile + }) + .filter((file, i) => limit > i) as unknown) as GitHubFile[], + stats: s + } +} + +export function formatInput(inputs: { + [key: string]: string +}): {[key: string]: string} { + return Object.fromEntries( + Object.entries(inputs).map(input => { + const t = [ + input[0].replace( + input[0], + `INPUT_${input[0].replace(/ /g, '_').toUpperCase()}` + ), + input[1] + ] + return t + }) + ) +} + +export class Env { + public envDefault: {[key: string]: string} = { + GITHUB_TOKEN: 'EnvDefaultToken', + GITHUB_WORKSPACE: _resolve(__dirname, '../../workspace/github'), + GITHUB_REPOSITORY: 'trilom-test/file-changes-action', + GITHUB_ACTION: 'file-changes-action' + } + + public envStart: {[key: string]: string | undefined} = {...process.env} // store shallow copy of process.env on init + + // set mocks + coreMock: CoreMock + + githubMock: GitHubMock + + octokitMock: OctokitMock + + fsMock: FsMock + + context: Context + + event = 'push' + + constructor( + envVars: {[key: string]: string}, // any additional env vars on top of process.env + inputs: {[key: string]: string}, + event?: string // any additional inputs + ) { + this.setEnv(event || this.event, envVars, inputs) // set env vars with event input + this.coreMock = mockCore() // mock core + ;({ + github: this.githubMock, + octokit: this.octokitMock, + context: this.context + } = mockGitHub()) // mock github + this.fsMock = mockFs() // mock fs + } + + setEnv( + event: string, + envVars: {[key: string]: string}, + inputs: {[key: string]: string} + ): void { + this.event = event + const eventPayload = _resolve(__dirname, `./events/${this.event}.json`) + this.setInput({ + ...this.envDefault, // add default vars + ...{ + GITHUB_EVENT_PATH: eventPayload, + GITHUB_EVENT_NAME: eventName(this.event) + }, // add event payload passed in + ...envVars, + ...formatInput(inputs) // add in passed in vars + }) + } + + setInput(inputs: {[key: string]: string}): void { + process.env = {...this.envStart, ...inputs} + } + + updateInput(inputs: {[key: string]: string}): void { + process.env = {...process.env, ...formatInput(inputs)} + ;({ + github: this.githubMock, + octokit: this.octokitMock, + context: this.context + } = mockGitHub()) + } +} diff --git a/src/tests/mocks/fs/index.test.ts b/src/tests/mocks/fs/index.test.ts new file mode 100644 index 00000000..2ff21687 --- /dev/null +++ b/src/tests/mocks/fs/index.test.ts @@ -0,0 +1,23 @@ +import {mock} from '.' + +const fs = mock() + +describe('Testing FsMock object...', () => { + beforeAll(() => jest.restoreAllMocks()) + it('...FsMock is a mock', () => { + expect(jest.isMockFunction(fs.writeFileSync)).toBe(true) + }) + it('...FsMock mocks fs', () => { + const realFs = require('fs') + expect(fs).toMatchObject(realFs) + }) + it('...FsMock mocks writeFileSync', () => { + fs.writeFileSync('a', 'b', 'c') + expect(fs.writeFileSync).toBeCalledWith('a', 'b', 'c') + }) + it('...FsMock mocks an error', async () => { + expect(() => fs.writeFileSync('error', 'b', 'c')).toThrowError( + new Error(JSON.stringify({name: 'PathError', status: '500'})) + ) + }) +}) diff --git a/src/tests/mocks/fs/index.ts b/src/tests/mocks/fs/index.ts new file mode 100644 index 00000000..c38bde2b --- /dev/null +++ b/src/tests/mocks/fs/index.ts @@ -0,0 +1,14 @@ +import {FsMock} from 'typings/FsMock' + +const fsMock = { + writeFileSync: jest.fn((path, data, options) => { + if (path === 'error') + throw new Error(JSON.stringify({name: 'PathError', status: '500'})) + // console.log(`fs.writeFileSync triggered with path: ${path} data: ${data} options: ${options}`) + }) +} + +export function mock(): FsMock { + jest.mock('fs', () => fsMock) + return fsMock +} diff --git a/src/tests/mocks/github/index.test.ts b/src/tests/mocks/github/index.test.ts new file mode 100644 index 00000000..566afa5d --- /dev/null +++ b/src/tests/mocks/github/index.test.ts @@ -0,0 +1,29 @@ +import {Context} from '@actions/github/lib/context' +import {mock} from '.' +import {octokitMock} from '../octokit' + +const github = mock() + +describe('Testing GitHubMock object ...', () => { + beforeAll(() => jest.restoreAllMocks()) + it('...GitHubMock is a mock', () => { + expect(jest.isMockFunction(github.github.GitHub)).toBe(true) + expect(github.context).toMatchObject(new Context()) + }) + it('...GitHubMock mocks GitHub', () => { + const {GitHub} = require('@actions/github') + const mockGitHub = GitHub('test') + expect(mockGitHub).toMatchObject(octokitMock) + }) + it('...GitHubMock mocks unauthorized GitHub', () => { + const GitHub = mock() + expect(jest.isMockFunction(GitHub.github.GitHub)).toBe(true) + }) + it('...GitHubMock mocks authorizing GitHub', () => { + const GitHub = mock() + const octokit = GitHub.github.GitHub('token') + expect(jest.isMockFunction(GitHub.github.GitHub)).toBe(true) + expect(GitHub.github.GitHub).toBeCalledWith('token') + expect(octokit).toMatchObject(octokitMock) + }) +}) diff --git a/src/tests/mocks/github/index.ts b/src/tests/mocks/github/index.ts new file mode 100644 index 00000000..41e190f1 --- /dev/null +++ b/src/tests/mocks/github/index.ts @@ -0,0 +1,29 @@ +import {Context} from '@actions/github/lib/context' +import {GitHubMock} from 'typings/GitHubMock' +import {OctokitMock} from 'typings/OctokitMock' +import {octokitMock} from '../octokit' + +function getGitHubMock(context: Context): GitHubMock { + return { + GitHub: jest.fn(token => { + // console.log(`I am authorizing GitHub with token: ${token}`) + if (!token) + throw new Error( + JSON.stringify({name: 'GithubInitError', status: '500'}) + ) + return octokitMock + }), + context + } +} + +export function mock(): { + github: GitHubMock + octokit: OctokitMock + context: Context +} { + const context = new Context() + const github = getGitHubMock(context) + jest.mock('@actions/github', () => github) + return {github, octokit: octokitMock, context} +} diff --git a/src/tests/mocks/octokit/endpoint/merge.test.ts b/src/tests/mocks/octokit/endpoint/merge.test.ts new file mode 100644 index 00000000..232e4656 --- /dev/null +++ b/src/tests/mocks/octokit/endpoint/merge.test.ts @@ -0,0 +1,48 @@ +import {EndpointOptions} from '@octokit/types' +import {fn as merge} from './merge' +import { + OctokitPullsListFilesEndpointMergeRequest, + OctokitPullsListFilesEndpointMergeResponse, + OctokitReposCompareCommitsEndpointMergeRequest, + OctokitReposCompareCommitsEndpointMergeResponse +} from '../payloads' + +describe('Testing Octokit object...', () => { + beforeAll(() => { + jest.restoreAllMocks() + }) + it('...endpoint.merge returns 500 error with pull_number "error"', () => { + expect(() => { + merge(({pull_number: 'error'} as unknown) as EndpointOptions) + }).toThrowError( + new Error(JSON.stringify({name: 'HttpError', status: '500'})) + ) + }) + it('...endpoint.merge returns 500 error with base "error"', () => { + expect(() => { + merge(({base: 'error'} as unknown) as EndpointOptions) + }).toThrowError( + new Error(JSON.stringify({name: 'HttpError', status: '500'})) + ) + }) + it('...endpoint.merge returns empty object', async () => { + const request = OctokitPullsListFilesEndpointMergeRequest + const data = merge({...request, pull_number: NaN}) + expect(data).toStrictEqual({ + ...OctokitPullsListFilesEndpointMergeResponse, + ...{pull_number: NaN, base: '', head: ''} + }) + }) + it('...endpoint.merge for pull request', () => { + const request = OctokitPullsListFilesEndpointMergeRequest + const response = OctokitPullsListFilesEndpointMergeResponse + const data = merge(request) + expect(data).toStrictEqual(response) + }) + it('...endpoint.merge for push', () => { + const request = OctokitReposCompareCommitsEndpointMergeRequest + const response = OctokitReposCompareCommitsEndpointMergeResponse + const data = merge(request) + expect(data).toStrictEqual(response) + }) +}) diff --git a/src/tests/mocks/octokit/endpoint/merge.ts b/src/tests/mocks/octokit/endpoint/merge.ts new file mode 100644 index 00000000..c4e10cd3 --- /dev/null +++ b/src/tests/mocks/octokit/endpoint/merge.ts @@ -0,0 +1,39 @@ +// Import Request and Response Objects +import {EndpointOptions, RequestOptions} from '@octokit/types' +import { + // OctokitReposCompareCommitsEndpointMergeRequest, + OctokitReposCompareCommitsEndpointMergeResponse, + // OctokitPullsListFilesEndpointMergeRequest, + OctokitPullsListFilesEndpointMergeResponse +} from '../payloads' +// Form and export Response Objects +export {OctokitReposCompareCommitsEndpointMergeResponse as pushResponse} +export {OctokitPullsListFilesEndpointMergeResponse as prResponse} +// Export mock function +export const fn = jest.fn((data: EndpointOptions, response?: number) => { + if (data.base === 'error' || data.pull_number === 'error') { + throw new Error(JSON.stringify({name: 'HttpError', status: '500'})) + } + if (data.base === 'unknown' || data.pull_number === 'unknown') { + throw JSON.stringify({idk: 'error', message: 'test'}) + } + if ( + (!data.base && !data.head && Number.isNaN(data.pull_number)) || + (!data.base && data.head) || + (data.base && !data.head) + ) + return { + ...OctokitPullsListFilesEndpointMergeResponse, + ...{pull_number: NaN, base: '', head: ''} + } as RequestOptions + if (data.pull_number) { + return { + ...OctokitPullsListFilesEndpointMergeResponse, + ...data + } as RequestOptions + } + return { + ...OctokitReposCompareCommitsEndpointMergeResponse, + ...data + } as RequestOptions +}) diff --git a/src/tests/mocks/octokit/index.test.ts b/src/tests/mocks/octokit/index.test.ts new file mode 100644 index 00000000..8f85e818 --- /dev/null +++ b/src/tests/mocks/octokit/index.test.ts @@ -0,0 +1,11 @@ +import {octokitMock} from '.' + +describe('Testing Octokit object ...', () => { + beforeAll(() => jest.restoreAllMocks()) + it('...Octokit is a mock', () => { + expect(octokitMock).toHaveProperty('paginate') + expect(octokitMock).toHaveProperty('pulls') + expect(octokitMock).toHaveProperty('repos') + expect(octokitMock).not.toHaveProperty('actions') + }) +}) diff --git a/src/tests/mocks/octokit/index.ts b/src/tests/mocks/octokit/index.ts new file mode 100644 index 00000000..de63e344 --- /dev/null +++ b/src/tests/mocks/octokit/index.ts @@ -0,0 +1,32 @@ +import {EndpointOptions, OctokitResponse} from '@octokit/types' +import {OctokitMock} from 'typings/OctokitMock' +// mock endpoints +import {fn as endpointMerge} from './endpoint/merge' +import {fn as paginate} from './paginate' +import {fn as listFiles} from './pulls/listFiles' +import {fn as compareCommits} from './repos/compareCommits' + +// new object +export const octokitMock: OctokitMock = { + paginate: ( + data: EndpointOptions, + cb?: (response: OctokitResponse) => Promise + ) => paginate(data, cb), + pulls: { + listFiles: Object.assign((data: EndpointOptions) => listFiles(data), { + endpoint: { + merge: (data: EndpointOptions) => endpointMerge(data) + } + }) + }, + repos: { + compareCommits: Object.assign( + (data: EndpointOptions) => compareCommits(data), + { + endpoint: { + merge: (data: EndpointOptions) => endpointMerge(data) + } + } + ) + } +} diff --git a/src/tests/mocks/octokit/paginate.test.ts b/src/tests/mocks/octokit/paginate.test.ts new file mode 100644 index 00000000..cd8691d3 --- /dev/null +++ b/src/tests/mocks/octokit/paginate.test.ts @@ -0,0 +1,55 @@ +import {fn as paginate} from './paginate' +import { + OctokitPaginatePrRequest, + OctokitPaginatePrResponse, + OctokitPaginatePushRequest, + OctokitPaginatePushResponse +} from './payloads' + +describe('Testing Octokit object...', () => { + beforeAll(() => { + jest.restoreAllMocks() + }) + it('...paginate(request) throws a 404', async () => { + const request = OctokitPaginatePrRequest + await expect( + paginate({...request, pull_number: NaN}) + ).rejects.toMatchObject({name: 'HttpError', status: '404'}) + }) + it('...paginate(request) for pull request', () => { + const request = OctokitPaginatePrRequest + const response = OctokitPaginatePrResponse + return paginate(request).then(data => { + expect(data).toStrictEqual(response) + return expect(data.length).toBe(7) + }) + }) + it('...paginate(request, callback) for pull request', () => { + const request = OctokitPaginatePrRequest + const response = OctokitPaginatePrResponse + return paginate(request, res => { + return res.data + }).then(data => { + expect(data).toStrictEqual(response) + return expect(data.length).toBe(7) + }) + }) + it('...paginate(request) for push', async () => { + const request = OctokitPaginatePushRequest + const response = OctokitPaginatePushResponse + expect.assertions(1) + const files = await paginate(request).then(data => { + return data.map(commit => commit.files) + }) + expect(files).toStrictEqual([response]) + }) + it('...paginate(request, callback) for push', async () => { + const request = OctokitPaginatePushRequest + const response = OctokitPaginatePushResponse + const files = await paginate(request, res => { + return res.data.files + }) + expect(files).toStrictEqual(response) + expect(files.length).toBe(7) + }) +}) diff --git a/src/tests/mocks/octokit/paginate.ts b/src/tests/mocks/octokit/paginate.ts new file mode 100644 index 00000000..736ea0d2 --- /dev/null +++ b/src/tests/mocks/octokit/paginate.ts @@ -0,0 +1,38 @@ +// Import Request and Response Objects +import {EndpointOptions, OctokitResponse} from '@octokit/types' +import { + // OctokitPaginatePrRequest, + OctokitPaginatePrResponse, + // OctokitPaginatePushRequest, + OctokitPaginatePushResponse +} from './payloads' + +// Form and export Response Objects +export const prResponse = OctokitPaginatePrResponse +export const pushResponse = {files: OctokitPaginatePushResponse} +// Export mock function +export const fn = jest.fn( + ( + data: EndpointOptions, + cb?: (response: OctokitResponse) => Promise + ) => { + if ( + data.owner !== 'trilom' || + data.repo !== 'file-changes-action' || + (data.base && !data.head) || + (!data.base && data.head) || + // the github api doesn't seem to return an error + // eslint-disable-next-line prefer-promise-reject-errors + (!data.base && !data.head && !data.pull_number) + ) + return Promise.reject({name: 'HttpError', status: '404'}) + if (data.pull_number) { + if (cb) + return Promise.resolve(cb({data: prResponse} as OctokitResponse)) + return Promise.resolve(prResponse) + } + if (cb) + return Promise.resolve(cb({data: pushResponse} as OctokitResponse)) + return Promise.resolve([pushResponse]) + } +) diff --git a/src/tests/mocks/octokit/payloads.ts b/src/tests/mocks/octokit/payloads.ts new file mode 100644 index 00000000..868a3e9d --- /dev/null +++ b/src/tests/mocks/octokit/payloads.ts @@ -0,0 +1,178 @@ +import {EndpointOptions} from '@octokit/types' +/** + * FILES + */ +const listFilesResponse: any[] = [ + { + filename: '.github/CONTRIBUTING.md', + status: 'added' + }, + { + filename: '.github/craneEventLambda.md', + status: 'added' + }, + { + filename: '.github/readme.md', + status: 'added' + }, + { + filename: 'functions/twitch-sadako/webhookSubscribeLambda/handler.py', + status: 'added' + }, + { + filename: 'functions/twitch-sadako/getCraneStatsLambda/handler.py', + status: 'removed' + }, + { + filename: '.github/ISSUE_TEMPLATE/bug_report.md', + status: 'modified' + }, + { + filename: + 'functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda.json', + status: 'renamed' + } +] +const pushRequest: any = { + owner: 'trilom', + repo: 'file-changes-action', + base: '01a956ad7dbd39773299d421b402535cef6ab1f3', + head: '513ca39ff3756e5b510ad752edaba6a0aeb2efac' +} +const prRequest: any = { + owner: 'trilom', + repo: 'file-changes-action', + pull_number: 79 +} +const pushEndpointOptions: EndpointOptions = { + method: 'GET', + baseUrl: 'https://api.github.com', + url: '/repos/:owner/:repo/compare/:base...:head', + owner: 'trilom', + repo: 'file-changes-action', + base: '01a956ad7dbd39773299d421b402535cef6ab1f3', + head: '513ca39ff3756e5b510ad752edaba6a0aeb2efac' +} +const prEndpointOptions: EndpointOptions = { + method: 'GET', + baseUrl: 'https://api.github.com', + url: '/repos/:owner/:repo/pulls/:pull_number/files', + owner: 'trilom', + repo: 'file-changes-action', + pull_number: 79 +} +export const normalFileArray: string[] = [ + '.github/actions/deploy_infrastructure/deploy', + '.github/actions/deploy_infrastructure/deploy_delete_commands.json', + '.github/actions/deploy_infrastructure/deploy_deploy_commands.json', + '.github/actions/deploy_infrastructure/deploy_validate_commands.json', + '.github/actions/deploy_infrastructure/prefix_deploy_commands.json', + '.github/actions/deploy_infrastructure/suffix_deploy_commands.json', + '.python-version', + 'cloudformation/.python-version', + 'cloudformation/mappings/mappings.twitch.yml', + 'cloudformation/order/twitch.yml', + 'cloudformation/templates/twitch-sadako.yml', + 'cloudformation/templates/twitch-secrets.yml', + 'functions/twitch-sadako/Makefile', + 'functions/twitch-sadako/craneEventLambda/handler.py', + 'functions/twitch-sadako/craneEventLambda/requirements.txt', + 'functions/twitch-sadako/craneEventLambda/test/craneEventLambda.json', + 'functions/twitch-sadako/followEventLambda/handler.py', + 'functions/twitch-sadako/followEventLambda/requirements.txt', + 'functions/twitch-sadako/followEventLambda/test/followEventLambda_get.json', + 'functions/twitch-sadako/followEventLambda/test/followEventLambda_post.json', + 'functions/twitch-sadako/getCraneStatsLambda/handler.py', + 'functions/twitch-sadako/getCraneStatsLambda/requirements.txt', + 'functions/twitch-sadako/getCraneStatsLambda/test/getCraneStatsLambda.json', + 'functions/twitch-sadako/getTokenLambda/handler.py', + 'functions/twitch-sadako/getTokenLambda/requirements.txt', + 'functions/twitch-sadako/getTokenLambda/test/getTokenLambda.json', + 'functions/twitch-sadako/slackNotifyLambda/handler.py', + 'functions/twitch-sadako/slackNotifyLambda/requirements.txt', + 'functions/twitch-sadako/slackNotifyLambda/test/slackNotifyLambda.json', + 'functions/twitch-sadako/webhookSubscribeCronLambda/handler.py', + 'functions/twitch-sadako/webhookSubscribeCronLambda/requirements.txt', + 'functions/twitch-sadako/webhookSubscribeCronLambda/test/webhookSubscribeCronLambda.json', + 'functions/twitch-sadako/webhookSubscribeLambda/handler.py', + 'functions/twitch-sadako/webhookSubscribeLambda/requirements.txt', + 'functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda.json', + 'functions/twitch-sadako/webhookSubscribeLambda/test/webhookSubscribeLambda_post.json', + '.github/ISSUE_TEMPLATE/bug_report.md', + '.github/ISSUE_TEMPLATE/feature_request.md', + '.github/workflows/nodejs.yml', + '.gitignore', + '.npmignore', + '.vscode/launch.json', + 'README-template.md', + 'README.md', + 'jest.config.js', + 'package-lock.json', + 'package.json', + 'src/boolean-serializer.ts', + 'src/date-serializer.ts', + 'src/deserialize.ts', + 'src/index.ts', + 'src/model.ts', + 'src/serialize-set.ts', + 'src/serialize.ts', + 'src/utilities.ts', + 'src/validation.ts', + 'test/unit/_ramda.sp.ts', + 'test/unit/benchmark.spec.ts', + 'test/unit/boolean-serializer.spec.ts', + 'test/unit/data/generators.ts', + 'test/unit/date-serializer.spec.ts', + 'test/unit/deserialize.spec.ts', + 'test/unit/sandbox.spec.ts', + 'test/unit/sap/input.ts', + 'test/unit/sap/json-object-mapper.ts', + 'test/unit/sap/output.ts', + 'test/unit/sap/serializers.ts', + 'test/unit/serialize.spec.ts', + 'test/unit/setup.ts', + 'test/unit/test-typings.ts', + 'test/unit/test-typings2.ts', + 'tsconfig.build.json', + 'tsconfig.json' +] +export const weirdFileArray: string[] = [ + '.cfnlintrc', + ".github/actions/deploy_infrastruc1234'ture/deploy.sh", + '.github/actions/make_commands/&&&index.js', + '.github/actions/make_comdf&*(@mands/test/files_added.json', + '.github/actions/make_c``ommands/test/files_deleted.json', + '.github/actions/make commands/test/files_modified.json', + '.pre-commit-config.yaml', + 'cloudformation/Makefile', + 'cloudformation/mappings/mappings.awsaccount.yml' +] +/** + * REQUESTS + */ +// Octokit.pulls.listFiles +export {prRequest as OctokitPullsListFilesRequest} +// Octokit.pulls.listFiles.endpoint.merge +export {prRequest as OctokitPullsListFilesEndpointMergeRequest} +// Octokit.repos.compareCommits +export {pushRequest as OctokitReposCompareCommitsRequest} +// Octokit.repos.compareCommits.endpoint.merge +export {pushRequest as OctokitReposCompareCommitsEndpointMergeRequest} +// Octokit.paginate +export {prEndpointOptions as OctokitPaginatePrRequest} // pr +export {pushEndpointOptions as OctokitPaginatePushRequest} // push + +/** + * RESPONSES + */ +// Octokit.pulls.listFiles +export {listFilesResponse as OctokitPullsListFilesResponse} +// Octokit.pulls.listFiles.endpoint.merge +export {prEndpointOptions as OctokitPullsListFilesEndpointMergeResponse} +// Octokit.repos.compareCommits +export {listFilesResponse as OctokitReposCompareCommitsResponse} +// Octokit.repos.compareCommits.endpoint.merge +export {pushEndpointOptions as OctokitReposCompareCommitsEndpointMergeResponse} +// Octokit.paginate +export {listFilesResponse as OctokitPaginatePrResponse} // pr +export {listFilesResponse as OctokitPaginatePushResponse} // push diff --git a/src/tests/mocks/octokit/pulls/listFiles.test.ts b/src/tests/mocks/octokit/pulls/listFiles.test.ts new file mode 100644 index 00000000..0c89c769 --- /dev/null +++ b/src/tests/mocks/octokit/pulls/listFiles.test.ts @@ -0,0 +1,19 @@ +import {fn as listFiles} from './listFiles' +import { + OctokitPullsListFilesRequest, + OctokitPullsListFilesResponse +} from '../payloads' + +describe('Testing Octokit object...', () => { + beforeAll(() => { + jest.restoreAllMocks() + }) + it('...pulls.listFiles(request) for pull request', () => { + const request = OctokitPullsListFilesRequest + const response = OctokitPullsListFilesResponse + return listFiles(request).then(data => { + expect(data.data).toBe(response) + return expect(data.data.length).toBe(7) + }) + }) +}) diff --git a/src/tests/mocks/octokit/pulls/listFiles.ts b/src/tests/mocks/octokit/pulls/listFiles.ts new file mode 100644 index 00000000..000fce30 --- /dev/null +++ b/src/tests/mocks/octokit/pulls/listFiles.ts @@ -0,0 +1,14 @@ +// Import Request and Response Objects +import {EndpointOptions, OctokitResponse} from '@octokit/types' +import { + // OctokitPullsListFilesRequest, + OctokitPullsListFilesResponse +} from '../payloads' +// Form and export Response Objects +export {OctokitPullsListFilesResponse as response} +// Export mock function +export const fn = jest.fn((data: EndpointOptions) => { + return Promise.resolve({ + data: OctokitPullsListFilesResponse + } as OctokitResponse) +}) diff --git a/src/tests/mocks/octokit/repos/compareCommits.test.ts b/src/tests/mocks/octokit/repos/compareCommits.test.ts new file mode 100644 index 00000000..9084665a --- /dev/null +++ b/src/tests/mocks/octokit/repos/compareCommits.test.ts @@ -0,0 +1,19 @@ +import {fn as compareCommits} from './compareCommits' +import { + OctokitReposCompareCommitsRequest, + OctokitReposCompareCommitsResponse +} from '../payloads' + +describe('Testing Octokit object...', () => { + beforeAll(() => { + jest.restoreAllMocks() + }) + it('...repos.compareCommits(request) for push', () => { + const request = OctokitReposCompareCommitsRequest + const response = OctokitReposCompareCommitsResponse + return compareCommits(request).then(data => { + expect(data.data.files).toBe(response) + return expect(data.data.files.length).toBe(7) + }) + }) +}) diff --git a/src/tests/mocks/octokit/repos/compareCommits.ts b/src/tests/mocks/octokit/repos/compareCommits.ts new file mode 100644 index 00000000..a29924f3 --- /dev/null +++ b/src/tests/mocks/octokit/repos/compareCommits.ts @@ -0,0 +1,16 @@ +// Import Request and Response Objects +import {EndpointOptions, OctokitResponse} from '@octokit/types' +import { + // OctokitReposCompareCommitsRequest, + OctokitReposCompareCommitsResponse +} from '../payloads' +// Form and export Response Objects +export {OctokitReposCompareCommitsResponse as response} +// Export mock function +export const fn = jest.fn((data: EndpointOptions) => { + return Promise.resolve({ + data: { + files: OctokitReposCompareCommitsResponse + } + } as OctokitResponse) +}) diff --git a/src/tests/payloads.ts b/src/tests/payloads.ts new file mode 100644 index 00000000..bc16397f --- /dev/null +++ b/src/tests/payloads.ts @@ -0,0 +1,645 @@ +// Imports +import {Inferred} from 'typings/Inferred' +import {TestInput} from 'typings/TestInput' +import * as p from './mocks/octokit/payloads' + +/** + * Events to Test + */ +export const testEvents: string[] = [ + 'issue_comment_created', + 'issue_comment_edited', + 'pull_request_opened', + 'pull_request_reopened', + 'pull_request_synchronize', + 'push_merge', + 'push', + 'schedule' +] + +export function changedFilesInput(event: string): TestInput[] { + return [ + { + inputs: [ + {type: 'normal', format: 'json'}, + p.normalFileArray, + JSON.stringify(p.normalFileArray) + ], + events: event + }, + { + inputs: [ + {type: 'normal', format: ','}, + p.normalFileArray, + p.normalFileArray.join(',') + ], + events: event + }, + { + inputs: [ + {type: 'normal', format: ' '}, + p.normalFileArray, + p.normalFileArray.join(' ') + ], + events: event + }, + { + inputs: [ + {type: 'normal', format: '_
  _'}, + p.normalFileArray, + p.normalFileArray.join('_
  _') + ], + events: event + }, + { + inputs: [ + {type: 'weird', format: 'json'}, + p.weirdFileArray, + JSON.stringify(p.weirdFileArray) + ], + events: event + }, + { + inputs: [ + {type: 'weird', format: ','}, + p.weirdFileArray, + p.weirdFileArray.join(',') + ], + events: event + }, + { + inputs: [ + {type: 'weird', format: ' '}, + p.weirdFileArray, + p.weirdFileArray.join(' ') + ], + events: event + }, + { + inputs: [ + {type: 'weird', format: '_
  _'}, + p.weirdFileArray, + p.weirdFileArray.join('_
  _') + ], + events: event + } + ] +} +/** + * FilesHelper Test inputs + */ +export const getFormatExtInputs: TestInput[] = [ + {inputs: ['json', 'json', '.json'], events: 'push'}, + {inputs: ['csv', ',', '.csv'], events: 'push'}, + {inputs: ['txt', ' ', '.txt'], events: 'push'}, + {inputs: ['txt', '_
  _', '.txt'], events: 'push'} +] +/** + * GithubHelper Test inputs + */ +export const initClientTestInputs: TestInput[] = [ + { + inputs: [ + 'calls the Github client constructor with a token', + '12345abcde', + '12345abcde' + ], + events: 'all' + }, + { + inputs: ['calls the Github client constructor without a token', '', ''], + events: 'all' + } +] +export const getChangedPRFilesTestInputs: TestInput[] = [ + { + inputs: [ + 'gets changed files for a pull request', + {owner: 'trilom', repo: 'file-changes-action', pullNumber: 80}, + p.OctokitPaginatePrResponse + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with no pull request', + {owner: 'trilom', repo: 'file-changes-action', pullNumber: NaN}, + { + error: '404/HttpError', + from: 'getChangedPRFiles', + message: + 'There was an error getting change files for repo:file-changes-action owner:trilom pr:NaN', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with invalid repo for pull request', + { + owner: 'trilom', + repo: 'file-chandkdk-action-thatdoesntreallyexist', + pullNumber: 80 + }, + { + error: '404/HttpError', + from: 'getChangedPRFiles', + message: + 'There was an error getting change files for repo:file-chandkdk-action-thatdoesntreallyexist owner:trilom pr:80', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with invalid owner for pull request', + { + owner: 'this-isntareal-githubowner', + repo: 'file-changes-action', + pullNumber: 80 + }, + { + error: '404/HttpError', + from: 'getChangedPRFiles', + message: + 'There was an error getting change files for repo:file-changes-action owner:this-isntareal-githubowner pr:80', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + } +] +export const getChangedPushFilesTestInputs: TestInput[] = [ + { + inputs: [ + 'gets changed files for a push', + { + owner: 'trilom', + repo: 'file-changes-action', + before: 'abcd1234', + after: '1234abcd' + }, + p.OctokitPaginatePushResponse + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with no before for a push', + { + owner: 'trilom', + repo: 'file-changes-action', + before: '', + after: '1234abcd' + }, + { + error: '404/HttpError', + from: 'getChangedPushFiles', + message: + 'There was an error getting change files for repo:file-changes-action owner:trilom base: head:1234abcd', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with no after for a push', + { + owner: 'trilom', + repo: 'file-changes-action', + before: '1234abcd', + after: '' + }, + { + error: '404/HttpError', + from: 'getChangedPushFiles', + message: + 'There was an error getting change files for repo:file-changes-action owner:trilom base:1234abcd head:', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with invalid repo for a push', + { + owner: 'trilom', + repo: 'file-chandkdk-action-thatdoesntreallyexist', + before: 'abcd1234', + after: '1234abcd' + }, + { + error: '404/HttpError', + from: 'getChangedPushFiles', + message: + 'There was an error getting change files for repo:file-chandkdk-action-thatdoesntreallyexist owner:trilom base:abcd1234 head:1234abcd', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with invalid owner for a push', + { + owner: 'this-isntareal-githubowner', + repo: 'file-changes-action', + before: 'abcd1234', + after: '1234abcd' + }, + { + error: '404/HttpError', + from: 'getChangedPushFiles', + message: + 'There was an error getting change files for repo:file-changes-action owner:this-isntareal-githubowner base:abcd1234 head:1234abcd', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + } +] +export const getChangedFilesTestInputs: TestInput[] = [ + { + inputs: [ + 'gets changed files for a push', + { + repo: 'trilom/file-changes-action', + ...({before: 'abcd1234', after: '1234abcd'} as Inferred) + }, + p.OctokitPaginatePushResponse + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with a malformed owner/repo for a push', + { + repo: 'trilom/testing/afew/backslash', + ...({before: 'abcd1234', after: '1234abcd'} as Inferred) + }, + { + error: '500/Unknown Error:Error', + from: 'getChangedFiles', + message: + 'There was an error getting change files outputs pr: NaN before: abcd1234 after: 1234abcd', + payload: JSON.stringify( + { + error: '500/Bad-Repo', + from: 'self', + message: + 'Repo input of trilom/testing/afew/backslash has more than 2 length after splitting.', + payload: '' + }, + null, + 2 + ) + } + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with invalid owner for a push', + { + repo: 'trilom-NOTREAL/backslash', + ...({before: 'abcd1234', after: '1234abcd'} as Inferred) + }, + { + error: '404/HttpError', + from: 'undefined/Error', + message: + 'There was an error getting change files for repo:backslash owner:trilom-NOTREAL base:abcd1234 head:1234abcd', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with no after for a push', + {repo: 'trilom/cloudformation', ...({before: 'abcd1234'} as Inferred)}, + { + error: '404/HttpError', + from: 'undefined/Error', + message: + 'There was an error getting change files for repo:cloudformation owner:trilom base:abcd1234 head:', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with no before for a push', + {repo: 'trilom/cloudformation', ...({after: 'abcd1234'} as Inferred)}, + { + error: '404/HttpError', + from: 'undefined/Error', + message: + 'There was an error getting change files for repo:cloudformation owner:trilom base: head:abcd1234', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + }, + { + inputs: [ + 'gets changed files for a pull request', + {repo: 'trilom/file-changes-action', ...({pr: 80} as Inferred)}, + p.OctokitPaginatePrResponse + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with a malformed owner/repo for a pr', + {repo: 'trilom/testing/afew/backslash', ...({pr: 80} as Inferred)}, + { + error: '500/Unknown Error:Error', + from: 'getChangedFiles', + message: + 'There was an error getting change files outputs pr: 80 before: undefined after: undefined', + payload: JSON.stringify( + { + error: '500/Bad-Repo', + from: 'self', + message: + 'Repo input of trilom/testing/afew/backslash has more than 2 length after splitting.', + payload: '' + }, + null, + 2 + ) + } + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with invalid owner for a pr', + {repo: 'trilom-NOTREAL/backslash', ...({pr: 80} as Inferred)}, + { + error: '404/HttpError', + from: 'undefined/Error', + message: + 'There was an error getting change files for repo:backslash owner:trilom-NOTREAL pr:80', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with no pull request', + {repo: 'trilom/cloudformation', ...({} as Inferred)}, + { + error: '404/HttpError', + from: 'undefined/Error', + message: + 'There was an error getting change files for repo:cloudformation owner:trilom base: head:', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + }, + { + inputs: [ + 'throws an error with no pull request', + {repo: 'trilom/cloudformation', ...({} as Inferred)}, + { + error: '404/HttpError', + from: 'undefined/Error', + message: + 'There was an error getting change files for repo:cloudformation owner:trilom base: head:', + payload: {name: 'HttpError', status: '404'} + } + ], + events: 'all' + } +] +/** + * InputHelper Test inputs + */ +export const inputTestInputs: TestInput[] = [ + { + inputs: [ + 'githubRepo', + 'trilom-test/file-changes-action', + 'trilom-test/file-changes-action' + ], + events: 'all' + }, + {inputs: ['githubToken', 'InputTestToken', 'InputTestToken'], events: 'all'}, + {inputs: ['pushBefore', 'abcd1234', 'abcd1234'], events: 'all'}, + {inputs: ['pushAfter', '1234abcd', '1234abcd'], events: 'all'}, + {inputs: ['prNumber', '1', 1], events: 'all'}, + {inputs: ['output', 'json', 'json'], events: 'all'}, + {inputs: ['fileOutput', 'json', 'json'], events: 'all'} +] +export const inferTestInputs: TestInput[] = [ + { + inputs: [ + 'sets PUSH inferred outputs with pr inputs and PUSH inputs and PULL_REQUEST event', + {event: 'pull_request', before: '1234abcd', after: 'abcd1234', pr: 3}, + {before: '1234abcd', after: 'abcd1234'} as Inferred + ], + events: [ + 'pull_request_opened', + 'pull_request_reopened', + 'pull_request_synchronize' + ] + }, + { + inputs: [ + 'sets PULL_REQUEST inferred outputs with single PUSH input and PULL_REQUEST event, ALSO WARN weird', + {event: 'pull_request', before: '1234abcd', after: '', pr: 2}, + {pr: 2} as Inferred + ], + events: [ + 'pull_request_opened', + 'pull_request_reopened', + 'pull_request_synchronize' + ] + }, + { + inputs: [ + 'sets PULL_REQUEST inferred outputs with no PUSH inputs and PULL_REQUEST event', + {event: 'pull_request', before: '', after: '', pr: 4}, + {pr: 4} as Inferred + ], + events: [ + 'pull_request_opened', + 'pull_request_reopened', + 'pull_request_synchronize' + ] + }, + { + inputs: [ + 'sets PULL_REQUEST inferred outputs with pr input and PUSH event', + {event: 'push', before: 'abcd12345', after: '12345abcd', pr: 1}, + {pr: 1} as Inferred + ], + events: ['push', 'push_merge'] + }, + { + inputs: [ + 'sets PUSH inferred outputs with no pr input and PUSH event', + {event: 'push', before: 'abcd1234', after: '1234abcd', pr: NaN}, + {before: 'abcd1234', after: '1234abcd'} as Inferred + ], + events: ['push', 'push_merge'] + }, + { + inputs: [ + 'sets PUSH inferred outputs with PUSH and PULL_REQUEST inputs NOT PUSH or PULL_REQUEST event, ALSO WARN all', + {event: 'schedule', before: 'abcd12345', after: '12345abcd', pr: 1}, + {before: 'abcd12345', after: '12345abcd'} as Inferred + ], + events: ['issue_comment_created', 'issue_comment_edited', 'schedule'] + }, + { + inputs: [ + 'sets PULL_REQUEST inferred outputs with single PUSH and PULL_REQUEST inputs NOT PUSH or PULL_REQUEST event, ALSO WARN weird', + {event: 'schedule', before: '', after: 'abcd12345', pr: 3}, + {pr: 3} as Inferred + ], + events: ['issue_comment_created', 'issue_comment_edited', 'schedule'] + }, + { + inputs: [ + 'sets PULL_REQUEST inferred outputs with PULL_REQUEST input NOT PUSH or PULL_REQUEST event', + {event: 'schedule', before: '', after: '', pr: 44}, + {pr: 44} as Inferred + ], + events: ['issue_comment_created', 'issue_comment_edited', 'schedule'] + }, + { + inputs: [ + 'sets PUSH inferred outputs with PUSH inputs NOT PUSH or PULL_REQUEST event', + {event: 'schedule', before: 'abcd12345', after: '12345abcd', pr: NaN}, + {before: 'abcd12345', after: '12345abcd', pr: 44} as Inferred + ], + events: ['issue_comment_created', 'issue_comment_edited', 'schedule'] + }, + { + inputs: [ + 'throws ERROR with no inputs NOT PUSH or PULL_REQUEST event', + {before: '', after: '', pr: NaN}, + {} as Inferred + ], + events: ['issue_comment_created', 'issue_comment_edited', 'schedule'] + }, + { + inputs: [ + 'throws ERROR with single only before NOT PUSH or PULL_REQUEST event', + {before: 'abcd1234', pr: NaN}, + {} as Inferred + ], + events: ['issue_comment_created', 'issue_comment_edited', 'schedule'] + }, + { + inputs: [ + 'throws ERROR with single only after NOT PUSH or PULL_REQUEST event', + {after: 'abcd1234', pr: NaN}, + {} as Inferred + ], + events: ['issue_comment_created', 'issue_comment_edited', 'schedule'] + } +] +/** + * UtilsHelper Test inputs + */ +export const errorMessageInputs: TestInput[] = [ + { + inputs: [ + 'getInputs', + JSON.stringify( + {name: 'Error', message: 'Error', from: 'getInputs'}, + null, + 2 + ), + 'There was an getting action inputs.' + ], + events: ['push', 'pull_request_synchronize'] + }, + { + inputs: [ + 'inferInput', + JSON.stringify( + {name: 'Error', message: 'Error', from: 'inferInput'}, + null, + 2 + ), + 'There was an issue inferring inputs to the action.' + ], + events: ['push', 'pull_request_synchronize'] + }, + { + inputs: [ + 'initClient', + JSON.stringify( + {name: 'Error', message: 'Error', from: 'initClient'}, + null, + 2 + ), + 'There was an issue initilizing the github client.' + ], + events: ['push', 'pull_request_synchronize'] + }, + { + inputs: [ + 'getChangedFiles', + JSON.stringify( + {name: 'Error', message: 'Error', from: 'getChangedFiles'}, + null, + 2 + ), + 'There was an issue getting changed files from Github.' + ], + events: ['push', 'pull_request_synchronize'] + }, + { + inputs: [ + 'sortChangedFiles', + JSON.stringify( + {name: 'Error', message: 'Error', from: 'sortChangedFiles'}, + null, + 2 + ), + 'There was an issue sorting changed files from Github.' + ], + events: ['push', 'pull_request_synchronize'] + }, + { + inputs: [ + 'writeFiles', + JSON.stringify( + {name: 'Error', message: 'Error', from: 'writeFiles'}, + null, + 2 + ), + 'There was an issue writing output files.' + ], + events: ['push', 'pull_request_synchronize'] + }, + { + inputs: [ + 'writeOutput', + JSON.stringify( + {name: 'Error', message: 'Error', from: 'writeOutput'}, + null, + 2 + ), + 'There was an issue writing output variables.' + ], + events: ['push', 'pull_request_synchronize'] + } +] +/** + * main Test inputs + */ +export {errorMessageInputs as mainErrorInputs} diff --git a/src/typings/ActionError/index.d.ts b/src/typings/ActionError/index.d.ts new file mode 100644 index 00000000..d010fdf0 --- /dev/null +++ b/src/typings/ActionError/index.d.ts @@ -0,0 +1,6 @@ +export interface ActionError { + error: string + from: string + message: string + payload: string +} diff --git a/src/typings/ChangedFiles/index.d.ts b/src/typings/ChangedFiles/index.d.ts new file mode 100644 index 00000000..0588b0da --- /dev/null +++ b/src/typings/ChangedFiles/index.d.ts @@ -0,0 +1,3 @@ +export interface ChangedFiles { + [key: string]: string[] +} diff --git a/src/typings/CoreMock/index.d.ts b/src/typings/CoreMock/index.d.ts new file mode 100644 index 00000000..252b2967 --- /dev/null +++ b/src/typings/CoreMock/index.d.ts @@ -0,0 +1,11 @@ +import {InputOptions} from '@actions/core' + +export interface CoreMock { + setFailed: (message: string) => void + setOutput: (name: string, value: string) => void + getInput: (message: string, options?: InputOptions) => string | undefined + debug: (message: string) => void + warning: (message: string) => void + info: (message: string) => void + error: (message: string) => void +} diff --git a/src/typings/FsMock/index.d.ts b/src/typings/FsMock/index.d.ts new file mode 100644 index 00000000..e4b20339 --- /dev/null +++ b/src/typings/FsMock/index.d.ts @@ -0,0 +1,15 @@ +export interface FsMock { + writeFileSync: ( + path: string | number | Buffer | URL, + data: any, + options?: + | string + | { + encoding?: string | null | undefined + mode?: string | number | undefined + flag?: string | undefined + } + | null + | undefined + ) => void +} diff --git a/src/typings/GitHubFile/index.d.ts b/src/typings/GitHubFile/index.d.ts new file mode 100644 index 00000000..6829ee25 --- /dev/null +++ b/src/typings/GitHubFile/index.d.ts @@ -0,0 +1,9 @@ +export interface GitHubFile { + added: string + modified: string + removed: string + filename: string + status: string + previous_filename: string + distinct: boolean +} diff --git a/src/typings/GitHubMock/index.d.ts b/src/typings/GitHubMock/index.d.ts new file mode 100644 index 00000000..9888fef4 --- /dev/null +++ b/src/typings/GitHubMock/index.d.ts @@ -0,0 +1,7 @@ +import {Context} from '@actions/github/lib/context' +import {OctokitMock} from 'typings/OctokitMock' + +export interface GitHubMock { + GitHub: (token: string) => OctokitMock | OctokitMock + context: Context +} diff --git a/src/typings/Inferred/index.d.ts b/src/typings/Inferred/index.d.ts new file mode 100644 index 00000000..46ae4b79 --- /dev/null +++ b/src/typings/Inferred/index.d.ts @@ -0,0 +1,6 @@ +export interface Inferred { + pr?: number + before?: string + after?: string + [key: string]: string | number | undefined +} diff --git a/src/typings/Inputs/index.d.ts b/src/typings/Inputs/index.d.ts new file mode 100644 index 00000000..84dc82b7 --- /dev/null +++ b/src/typings/Inputs/index.d.ts @@ -0,0 +1,11 @@ +export interface Inputs { + githubRepo: string + githubToken: string + pushBefore: string + pushAfter: string + prNumber: number + output: string + fileOutput: string + event: string + [key: string]: string | number +} diff --git a/src/typings/OctokitMock/index.d.ts b/src/typings/OctokitMock/index.d.ts new file mode 100644 index 00000000..a6fccc1f --- /dev/null +++ b/src/typings/OctokitMock/index.d.ts @@ -0,0 +1,24 @@ +import {EndpointOptions, RequestOptions, OctokitResponse} from '@octokit/types' + +export interface OctokitMock { + paginate: ( + data: EndpointOptions, + cb?: (response: OctokitResponse) => Promise + ) => Promise + pulls: { + listFiles: { + (data: EndpointOptions): Promise> + endpoint: { + merge: (data: EndpointOptions) => RequestOptions + } + } + } + repos: { + compareCommits: { + (data: EndpointOptions): Promise> + endpoint: { + merge: (data: EndpointOptions) => RequestOptions + } + } + } +} diff --git a/src/typings/TestInput/index.d.ts b/src/typings/TestInput/index.d.ts new file mode 100644 index 00000000..156b6d31 --- /dev/null +++ b/src/typings/TestInput/index.d.ts @@ -0,0 +1,10 @@ +import {Inferred} from 'typings/Inferred' +/** + * @interface TestInput + * @param inputs test input to parse. Can be a string array or an array of objects + * @param event event to parse input for. + */ +export interface TestInput { + inputs: string[] | object | Inferred[] + events: string | string[] +} diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 00000000..45e9eb0c --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + "src/tests/**/*" + ] +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 4cad2746..bd72ed9a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,19 +1,23 @@ { + "compileOnSave": true, "compilerOptions": { - "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "outDir": "./lib", /* Redirect output structure to the directory. */ - "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - "strict": true, /* Enable all strict type-checking options. */ - "noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - "resolveJsonModule": true, - "typeRoots": [ - "node_modules/@types" - ] + "baseUrl": ".", + "rootDirs": [ + "src", + "src/tests/mocks/*" + ], + "target": "ES2019", + "module": "commonjs", + "outDir": "./lib", + "strict": true, + "allowSyntheticDefaultImports": true, + "paths": { + "*": ["node_modules/"], + "typings/*": ["src/typings/*"] + } }, - "exclude": [ - "node_modules", - "**/*.test.ts" - ] + "include": [ + "src/**/*.ts", + "." + ], } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 794f5a99..6d5bc991 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,166 +2,175 @@ # yarn lockfile v1 -"@actions/core@^1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz#aa5f52b26c362c821d41557e599371a42f6c0b3d" - integrity sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw== +"@actions/core@^1.2.3": + version "1.2.3" + resolved "https://registry.npmjs.org/@actions/core/-/core-1.2.3.tgz#e844b4fa0820e206075445079130868f95bfca95" + integrity sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w== -"@actions/github@^2.0.0": - version "2.0.0" - resolved "https://registry.npmjs.org/@actions/github/-/github-2.0.0.tgz#5b066b1a8747bbf48d47a058d9c241a2e37d5ee7" - integrity sha512-sNpZ5dJyJyfJIO5lNYx8r/Gha4Tlm8R0MLO2cBkGdOnAAEn3t1M/MHVcoBhY/VPfjGVe5RNAUPz+6INrViiUPA== +"@actions/github@^2.1.1": + version "2.1.1" + resolved "https://registry.npmjs.org/@actions/github/-/github-2.1.1.tgz#bcabedff598196d953f58ba750d5e75549a75142" + integrity sha512-kAgTGUx7yf5KQCndVeHSwCNZuDBvPyxm5xKTswW2lofugeuC1AZX73nUUVDNaysnM9aKFMHv9YCdVJbg7syEyA== dependencies: + "@actions/http-client" "^1.0.3" "@octokit/graphql" "^4.3.1" - "@octokit/rest" "^16.15.0" + "@octokit/rest" "^16.43.1" + +"@actions/http-client@^1.0.3": + version "1.0.6" + resolved "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.6.tgz#6f9267ca50e1d74d8581f4a894a943cd4c97b49a" + integrity sha512-LGmio4w98UyGX33b/W6V6Nx/sQHRXZ859YlMkn36wPsXPB82u8xTVlA/Dq2DXrm6lEq9RVmisRJa1c+HETAIJA== + dependencies: + tunnel "0.0.6" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": - version "7.5.5" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" - integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== dependencies: - "@babel/highlight" "^7.0.0" + "@babel/highlight" "^7.8.3" "@babel/core@^7.1.0": - version "7.7.7" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.7.7.tgz#ee155d2e12300bcc0cff6a8ad46f2af5063803e9" - integrity sha512-jlSjuj/7z138NLZALxVgrx13AOtqip42ATZP7+kYl53GvDV6+4dCek1mVUo8z8c8Xnw/mx2q3d9HWh3griuesQ== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.7" - "@babel/helpers" "^7.7.4" - "@babel/parser" "^7.7.7" - "@babel/template" "^7.7.4" - "@babel/traverse" "^7.7.4" - "@babel/types" "^7.7.4" + version "7.8.7" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.8.7.tgz#b69017d221ccdeb203145ae9da269d72cf102f3b" + integrity sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.7" + "@babel/helpers" "^7.8.4" + "@babel/parser" "^7.8.7" + "@babel/template" "^7.8.6" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.7" convert-source-map "^1.7.0" debug "^4.1.0" + gensync "^1.0.0-beta.1" json5 "^2.1.0" lodash "^4.17.13" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.7.4", "@babel/generator@^7.7.7": - version "7.7.7" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz#859ac733c44c74148e1a72980a64ec84b85f4f45" - integrity sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ== +"@babel/generator@^7.4.0", "@babel/generator@^7.8.6", "@babel/generator@^7.8.7": + version "7.8.8" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.8.8.tgz#cdcd58caab730834cee9eeadb729e833b625da3e" + integrity sha512-HKyUVu69cZoclptr8t8U5b6sx6zoWjh8jiUhnuj3MpZuKT2dJ8zPTuiy31luq32swhI0SpwItCIlU8XW7BZeJg== dependencies: - "@babel/types" "^7.7.4" + "@babel/types" "^7.8.7" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" -"@babel/helper-function-name@^7.7.4": - version "7.7.4" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz#ab6e041e7135d436d8f0a3eca15de5b67a341a2e" - integrity sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ== +"@babel/helper-function-name@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" + integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== dependencies: - "@babel/helper-get-function-arity" "^7.7.4" - "@babel/template" "^7.7.4" - "@babel/types" "^7.7.4" + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" -"@babel/helper-get-function-arity@^7.7.4": - version "7.7.4" - resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz#cb46348d2f8808e632f0ab048172130e636005f0" - integrity sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA== +"@babel/helper-get-function-arity@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" + integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== dependencies: - "@babel/types" "^7.7.4" + "@babel/types" "^7.8.3" -"@babel/helper-plugin-utils@^7.0.0": - version "7.0.0" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" - integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.8.0": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" + integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== -"@babel/helper-split-export-declaration@^7.7.4": - version "7.7.4" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz#57292af60443c4a3622cf74040ddc28e68336fd8" - integrity sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug== +"@babel/helper-split-export-declaration@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" + integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== dependencies: - "@babel/types" "^7.7.4" + "@babel/types" "^7.8.3" -"@babel/helpers@^7.7.4": - version "7.7.4" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.4.tgz#62c215b9e6c712dadc15a9a0dcab76c92a940302" - integrity sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg== +"@babel/helpers@^7.8.4": + version "7.8.4" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73" + integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w== dependencies: - "@babel/template" "^7.7.4" - "@babel/traverse" "^7.7.4" - "@babel/types" "^7.7.4" + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.4" + "@babel/types" "^7.8.3" -"@babel/highlight@^7.0.0": - version "7.5.0" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" - integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== +"@babel/highlight@^7.8.3": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797" + integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg== dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.4", "@babel/parser@^7.7.7": - version "7.7.7" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz#1b886595419cf92d811316d5b715a53ff38b4937" - integrity sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw== +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.8.6", "@babel/parser@^7.8.7": + version "7.8.8" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.8.8.tgz#4c3b7ce36db37e0629be1f0d50a571d2f86f6cd4" + integrity sha512-mO5GWzBPsPf6865iIbzNE0AvkKF3NE+2S3eRUpE+FE07BOAkXh6G+GW/Pj01hhXjve1WScbaIO4UlY1JKeqCcA== "@babel/plugin-syntax-object-rest-spread@^7.0.0": - version "7.7.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.7.4.tgz#47cf220d19d6d0d7b154304701f468fc1cc6ff46" - integrity sha512-mObR+r+KZq0XhRVS2BrBKBpr5jqrqzlPvS9C9vuOf5ilSwzloAl7RPWLrgKdWS6IreaVrjHxTjtyqFiOisaCwg== + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== dependencies: - "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-plugin-utils" "^7.8.0" -"@babel/runtime-corejs3@^7.7.4": - version "7.7.7" - resolved "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.7.7.tgz#78fcbd472daec13abc42678bfc319e58a62235a3" - integrity sha512-kr3W3Fw8mB/CTru2M5zIRQZZgC/9zOxNSoJ/tVCzjPt3H1/p5uuGbz6WwmaQy/TLQcW31rUhUUWKY28sXFRelA== +"@babel/runtime-corejs3@^7.8.3": + version "7.8.7" + resolved "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.8.7.tgz#8209d9dff2f33aa2616cb319c83fe159ffb07b8c" + integrity sha512-sc7A+H4I8kTd7S61dgB9RomXu/C+F4IrRr4Ytze4dnfx7AXEpCrejSNpjx7vq6y/Bak9S6Kbk65a/WgMLtg43Q== dependencies: core-js-pure "^3.0.0" - regenerator-runtime "^0.13.2" - -"@babel/runtime@^7.4.5", "@babel/runtime@^7.7.4": - version "7.7.7" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.7.tgz#194769ca8d6d7790ec23605af9ee3e42a0aa79cf" - integrity sha512-uCnC2JEVAu8AKB5do1WRIsvrdJ0flYx/A/9f/6chdacnEZ7LmavjdsDXr5ksYBegxtuTPR5Va9/+13QF/kFkCA== - dependencies: - regenerator-runtime "^0.13.2" - -"@babel/template@^7.4.0", "@babel/template@^7.7.4": - version "7.7.4" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" - integrity sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.4" - "@babel/types" "^7.7.4" - -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4": - version "7.7.4" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558" - integrity sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.4" - "@babel/helper-function-name" "^7.7.4" - "@babel/helper-split-export-declaration" "^7.7.4" - "@babel/parser" "^7.7.4" - "@babel/types" "^7.7.4" + regenerator-runtime "^0.13.4" + +"@babel/runtime@^7.4.5": + version "7.8.7" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.7.tgz#8fefce9802db54881ba59f90bb28719b4996324d" + integrity sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.4.0", "@babel/template@^7.8.3", "@babel/template@^7.8.6": + version "7.8.6" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" + integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" + +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.8.4", "@babel/traverse@^7.8.6": + version "7.8.6" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" + integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.6" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.7.4": - version "7.7.4" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" - integrity sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA== +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7": + version "7.8.7" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d" + integrity sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw== dependencies: esutils "^2.0.2" lodash "^4.17.13" to-fast-properties "^2.0.0" "@cnakazawa/watch@^1.0.3": - version "1.0.3" - resolved "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" - integrity sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA== + version "1.0.4" + resolved "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" + integrity sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ== dependencies: exec-sh "^0.3.2" minimist "^1.2.0" @@ -314,14 +323,21 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" +"@octokit/auth-token@^2.4.0": + version "2.4.0" + resolved "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.0.tgz#b64178975218b99e4dfe948253f0673cbbb59d9f" + integrity sha512-eoOVMjILna7FVQf96iWc3+ZtE/ZT6y8ob8ZzcqKY1ibSQCnu4O/B7pJvzMx5cyZ/RjAff6DAdEb0O0Cjcxidkg== + dependencies: + "@octokit/types" "^2.0.0" + "@octokit/endpoint@^5.5.0": - version "5.5.1" - resolved "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.5.1.tgz#2eea81e110ca754ff2de11c79154ccab4ae16b3f" - integrity sha512-nBFhRUb5YzVTCX/iAK1MgQ4uWo89Gu0TH00qQHoYRCsE12dWcG1OiLd7v2EIo2+tpUKPMOQ62QFy9hy9Vg2ULg== + version "5.5.3" + resolved "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.5.3.tgz#0397d1baaca687a4c8454ba424a627699d97c978" + integrity sha512-EzKwkwcxeegYYah5ukEeAI/gYRLv2Y9U5PpIsseGSFDk+G3RbipQGBs8GuYS1TLCtQaqoO66+aQGtITPalxsNQ== dependencies: "@octokit/types" "^2.0.0" is-plain-object "^3.0.0" - universal-user-agent "^4.0.0" + universal-user-agent "^5.0.0" "@octokit/graphql@^4.3.1": version "4.3.1" @@ -332,19 +348,39 @@ "@octokit/types" "^2.0.0" universal-user-agent "^4.0.0" +"@octokit/plugin-paginate-rest@^1.1.1": + version "1.1.2" + resolved "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz#004170acf8c2be535aba26727867d692f7b488fc" + integrity sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q== + dependencies: + "@octokit/types" "^2.0.1" + +"@octokit/plugin-request-log@^1.0.0": + version "1.0.0" + resolved "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" + integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== + +"@octokit/plugin-rest-endpoint-methods@2.4.0": + version "2.4.0" + resolved "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz#3288ecf5481f68c494dd0602fc15407a59faf61e" + integrity sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ== + dependencies: + "@octokit/types" "^2.0.1" + deprecation "^2.3.1" + "@octokit/request-error@^1.0.1", "@octokit/request-error@^1.0.2": - version "1.2.0" - resolved "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.0.tgz#a64d2a9d7a13555570cd79722de4a4d76371baaa" - integrity sha512-DNBhROBYjjV/I9n7A8kVkmQNkqFAMem90dSxqvPq57e2hBr7mNTX98y3R2zDpqMQHVRpBDjsvsfIGgBzy+4PAg== + version "1.2.1" + resolved "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.1.tgz#ede0714c773f32347576c25649dc013ae6b31801" + integrity sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA== dependencies: "@octokit/types" "^2.0.0" deprecation "^2.0.0" once "^1.4.0" "@octokit/request@^5.2.0", "@octokit/request@^5.3.0": - version "5.3.1" - resolved "https://registry.npmjs.org/@octokit/request/-/request-5.3.1.tgz#3a1ace45e6f88b1be4749c5da963b3a3b4a2f120" - integrity sha512-5/X0AL1ZgoU32fAepTfEoggFinO3rxsMLtzhlUX+RctLrusn/CApJuGFCd0v7GMFhF+8UiCsTTfsu7Fh1HnEJg== + version "5.3.2" + resolved "https://registry.npmjs.org/@octokit/request/-/request-5.3.2.tgz#1ca8b90a407772a1ee1ab758e7e0aced213b9883" + integrity sha512-7NPJpg19wVQy1cs2xqXjjRq/RmtSomja/VSWnptfYwuBxLdbYh2UjhGi0Wx7B1v5Iw5GKhfFDQL7jM7SSp7K2g== dependencies: "@octokit/endpoint" "^5.5.0" "@octokit/request-error" "^1.0.1" @@ -353,13 +389,17 @@ is-plain-object "^3.0.0" node-fetch "^2.3.0" once "^1.4.0" - universal-user-agent "^4.0.0" + universal-user-agent "^5.0.0" -"@octokit/rest@^16.15.0": - version "16.36.0" - resolved "https://registry.npmjs.org/@octokit/rest/-/rest-16.36.0.tgz#99892c57ba632c2a7b21845584004387b56c2cb7" - integrity sha512-zoZj7Ya4vWBK4fjTwK2Cnmu7XBB1p9ygSvTk2TthN6DVJXM4hQZQoAiknWFLJWSTix4dnA3vuHtjPZbExYoCZA== +"@octokit/rest@^16.43.1": + version "16.43.1" + resolved "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.1.tgz#3b11e7d1b1ac2bbeeb23b08a17df0b20947eda6b" + integrity sha512-gfFKwRT/wFxq5qlNjnW2dh+qh74XgTQ2B179UX5K1HYCluioWj8Ndbgqw2PVqa1NnVJkGHp2ovMpVn/DImlmkw== dependencies: + "@octokit/auth-token" "^2.4.0" + "@octokit/plugin-paginate-rest" "^1.1.1" + "@octokit/plugin-request-log" "^1.0.0" + "@octokit/plugin-rest-endpoint-methods" "2.4.0" "@octokit/request" "^5.2.0" "@octokit/request-error" "^1.0.2" atob-lite "^2.0.0" @@ -373,17 +413,22 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/types@^2.0.0": - version "2.0.2" - resolved "https://registry.npmjs.org/@octokit/types/-/types-2.0.2.tgz#0888497f5a664e28b0449731d5e88e19b2a74f90" - integrity sha512-StASIL2lgT3TRjxv17z9pAqbnI7HGu9DrJlg3sEBFfCLaMEqp+O3IQPUF6EZtQ4xkAu2ml6kMBBCtGxjvmtmuQ== +"@octokit/types@^2.0.0", "@octokit/types@^2.0.1", "@octokit/types@^2.5.0": + version "2.5.0" + resolved "https://registry.npmjs.org/@octokit/types/-/types-2.5.0.tgz#f1bbd147e662ae2c79717d518aac686e58257773" + integrity sha512-KEnLwOfdXzxPNL34fj508bhi9Z9cStyN7qY1kOfVahmqtAfrWw6Oq3P4R+dtsg0lYtZdWBpUrS/Ixmd5YILSww== dependencies: "@types/node" ">= 8" +"@tootallnate/once@1": + version "1.0.0" + resolved "https://registry.npmjs.org/@tootallnate/once/-/once-1.0.0.tgz#9c13c2574c92d4503b005feca8f2e16cc1611506" + integrity sha512-KYyTT/T6ALPkIRd2Ge080X/BsXvy9O0hcWTtMWkPvwAwF99+vn6Dv4GzrFT/Nn1LePr+FFDbRXXlqmsy9lw2zA== + "@types/babel__core@^7.1.0": - version "7.1.3" - resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.3.tgz#e441ea7df63cd080dfcd02ab199e6d16a735fc30" - integrity sha512-8fBo0UR2CcwWxeX7WIIgJ7lXjasFxoYgRnFHUj+hRvKkpiBJbxhdAPTCY6/ZKM0uxANFVzt4yObSLuTiTnazDA== + version "7.1.6" + resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.6.tgz#16ff42a5ae203c9af1c6e190ed1f30f83207b610" + integrity sha512-tTnhWszAqvXnhW7m5jQU9PomXSiKXk2sFxpahXvI20SZKu9ylPi8WtIxueZ6ehDWikPT0jeFujMj3X4ZHuf3Tg== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -407,12 +452,17 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.0.8" - resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.8.tgz#479a4ee3e291a403a1096106013ec22cf9b64012" - integrity sha512-yGeB2dHEdvxjP0y4UbRtQaSkXJ9649fYCmIdRoul5kfAoGCwxuCbMhag0k3RPfnuh9kPGm8x89btcfDEXdVWGw== + version "7.0.9" + resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.9.tgz#be82fab304b141c3eee81a4ce3b034d0eba1590a" + integrity sha512-jEFQ8L1tuvPjOI8lnpaf73oCJe+aoxL6ygqSy6c8LcW98zaC+4mzWuQIRCEvKeCOu+lbqdXcg4Uqmm1S8AP1tw== dependencies: "@babel/types" "^7.3.0" +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" resolved "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" @@ -424,9 +474,9 @@ integrity sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg== "@types/istanbul-lib-report@*": - version "1.1.1" - resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#e5471e7fa33c61358dd38426189c037a58433b8c" - integrity sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg== + version "3.0.0" + resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" + integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== dependencies: "@types/istanbul-lib-coverage" "*" @@ -438,10 +488,10 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" -"@types/jest@^24.0.23": - version "24.0.25" - resolved "https://registry.npmjs.org/@types/jest/-/jest-24.0.25.tgz#2aba377824ce040114aa906ad2cac2c85351360f" - integrity sha512-hnP1WpjN4KbGEK4dLayul6lgtys6FPz0UfxMeMQCv0M+sTnzN3ConfiO72jHgLxl119guHgI8gLqDOrRLsyp2g== +"@types/jest@^24.9.1": + version "24.9.1" + resolved "https://registry.npmjs.org/@types/jest/-/jest-24.9.1.tgz#02baf9573c78f1b9974a5f36778b366aa77bd534" + integrity sha512-Fb38HkXSVA4L8fGKEZ6le5bB8r6MRWlOCZbVuWZcmOMSCd2wCYOwN1ibj8daIoV9naq7aaOZjrLCoCMptKU/4Q== dependencies: jest-diff "^24.3.0" @@ -450,10 +500,20 @@ resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + "@types/node@>= 8": - version "13.1.4" - resolved "https://registry.npmjs.org/@types/node/-/node-13.1.4.tgz#4cfd90175a200ee9b02bd6b1cd19bc349741607e" - integrity sha512-Lue/mlp2egZJoHXZr4LndxDAd7i/7SQYhV0EjWfb/a4/OZ6tuVwMCVPiwkU5nsEipxEf7hmkSU7Em5VQ8P5NGA== + version "13.9.1" + resolved "https://registry.npmjs.org/@types/node/-/node-13.9.1.tgz#96f606f8cd67fb018847d9b61e93997dabdefc72" + integrity sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ== + +"@types/normalize-package-data@^2.4.0": + version "2.4.0" + resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" + integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== "@types/stack-utils@^1.0.1": version "1.0.1" @@ -461,84 +521,57 @@ integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== "@types/yargs-parser@*": - version "13.1.0" - resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-13.1.0.tgz#c563aa192f39350a1d18da36c5a8da382bbd8228" - integrity sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg== + version "15.0.0" + resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" + integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== "@types/yargs@^13.0.0": - version "13.0.4" - resolved "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.4.tgz#53d231cebe1a540e7e13727fc1f0d13ad4a9ba3b" - integrity sha512-Ke1WmBbIkVM8bpvsNEcGgQM70XcEh/nbpxQhW7FhrsbCsXSY9BmLB1+LHtD7r9zrsOcFlLiF+a/UeJsdfw3C5A== + version "13.0.8" + resolved "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.8.tgz#a38c22def2f1c2068f8971acb3ea734eb3c64a99" + integrity sha512-XAvHLwG7UQ+8M4caKIH0ZozIOYay5fQkAgyIXegXT9jPtdIGdhga+sUEdAr1CiG46aB+c64xQEYyEzlwWVTNzA== dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^1.3.0": - version "1.13.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.13.0.tgz#22fed9b16ddfeb402fd7bcde56307820f6ebc49f" - integrity sha512-WQHCozMnuNADiqMtsNzp96FNox5sOVpU8Xt4meaT4em8lOG1SrOv92/mUbEHQVh90sldKSfcOc/I0FOb/14G1g== +"@typescript-eslint/eslint-plugin@^2.24.0": + version "2.24.0" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.24.0.tgz#a86cf618c965a462cddf3601f594544b134d6d68" + integrity sha512-wJRBeaMeT7RLQ27UQkDFOu25MqFOBus8PtOa9KaT5ZuxC1kAsd7JEHqWt4YXuY9eancX0GK9C68i5OROnlIzBA== dependencies: - "@typescript-eslint/experimental-utils" "1.13.0" - eslint-utils "^1.3.1" + "@typescript-eslint/experimental-utils" "2.24.0" + eslint-utils "^1.4.3" functional-red-black-tree "^1.0.1" - regexpp "^2.0.1" - tsutils "^3.7.0" - -"@typescript-eslint/experimental-utils@1.13.0", "@typescript-eslint/experimental-utils@^1.13.0": - version "1.13.0" - resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz#b08c60d780c0067de2fb44b04b432f540138301e" - integrity sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "1.13.0" - eslint-scope "^4.0.0" + regexpp "^3.0.0" + tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@2.15.0", "@typescript-eslint/experimental-utils@^2.5.0": - version "2.15.0" - resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.15.0.tgz#41e35313bfaef91650ddb5380846d1c78a780070" - integrity sha512-Qkxu5zndY5hqlcQkmA88gfLvqQulMpX/TN91XC7OuXsRf4XG5xLGie0sbpX97o/oeccjeZYRMipIsjKk/tjDHA== +"@typescript-eslint/experimental-utils@2.24.0", "@typescript-eslint/experimental-utils@^2.5.0": + version "2.24.0" + resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.24.0.tgz#a5cb2ed89fedf8b59638dc83484eb0c8c35e1143" + integrity sha512-DXrwuXTdVh3ycNCMYmWhUzn/gfqu9N0VzNnahjiDJvcyhfBy4gb59ncVZVxdp5XzBC77dCncu0daQgOkbvPwBw== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.15.0" + "@typescript-eslint/typescript-estree" "2.24.0" eslint-scope "^5.0.0" -"@typescript-eslint/parser@^1.3.0": - version "1.13.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.13.0.tgz#61ac7811ea52791c47dc9fd4dd4a184fae9ac355" - integrity sha512-ITMBs52PCPgLb2nGPoeT4iU3HdQZHcPaZVw+7CsFagRJHUhyeTgorEwHXhFf3e7Evzi8oujKNpHc8TONth8AdQ== +"@typescript-eslint/parser@^2.19.0", "@typescript-eslint/parser@^2.24.0": + version "2.24.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.24.0.tgz#2cf0eae6e6dd44d162486ad949c126b887f11eb8" + integrity sha512-H2Y7uacwSSg8IbVxdYExSI3T7uM1DzmOn2COGtCahCC3g8YtM1xYAPi2MAHyfPs61VKxP/J/UiSctcRgw4G8aw== dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "1.13.0" - "@typescript-eslint/typescript-estree" "1.13.0" - eslint-visitor-keys "^1.0.0" - -"@typescript-eslint/parser@^2.8.0": - version "2.15.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.15.0.tgz#379a71a51b0429bc3bc55c5f8aab831bf607e411" - integrity sha512-6iSgQsqAYTaHw59t0tdjzZJluRAjswdGltzKEdLtcJOxR2UVTPHYvZRqkAVGCkaMVb6Fpa60NnuozNCvsSpA9g== - dependencies: - "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "2.15.0" - "@typescript-eslint/typescript-estree" "2.15.0" + "@typescript-eslint/experimental-utils" "2.24.0" + "@typescript-eslint/typescript-estree" "2.24.0" eslint-visitor-keys "^1.1.0" -"@typescript-eslint/typescript-estree@1.13.0": - version "1.13.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e" - integrity sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw== - dependencies: - lodash.unescape "4.0.1" - semver "5.5.0" - -"@typescript-eslint/typescript-estree@2.15.0": - version "2.15.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.15.0.tgz#79ae52eed8701b164d91e968a65d85a9105e76d3" - integrity sha512-L6Pog+w3VZzXkAdyqA0VlwybF8WcwZX+mufso86CMxSdWmcizJ38lgBdpqTbc9bo92iyi0rOvmATKiwl+amjxg== +"@typescript-eslint/typescript-estree@2.24.0": + version "2.24.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.24.0.tgz#38bbc8bb479790d2f324797ffbcdb346d897c62a" + integrity sha512-RJ0yMe5owMSix55qX7Mi9V6z2FDuuDpN6eR5fzRJrp+8in9UF41IGNQHbg5aMK4/PjVaEQksLvz0IA8n+Mr/FA== dependencies: debug "^4.1.1" eslint-visitor-keys "^1.1.0" glob "^7.1.6" is-glob "^4.0.1" - lodash.unescape "4.0.1" + lodash "^4.17.15" semver "^6.3.0" tsutils "^3.17.1" @@ -560,10 +593,10 @@ acorn-globals@^4.1.0: acorn "^6.0.1" acorn-walk "^6.0.1" -acorn-jsx@^5.0.0: - version "5.1.0" - resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384" - integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw== +acorn-jsx@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" + integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== acorn-walk@^6.0.1: version "6.2.0" @@ -572,29 +605,53 @@ acorn-walk@^6.0.1: acorn@^5.5.3: version "5.7.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" + resolved "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== -acorn@^6.0.1, acorn@^6.0.7: - version "6.4.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz#b659d2ffbafa24baf5db1cdbb2c94a983ecd2784" - integrity sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw== +acorn@^6.0.1: + version "6.4.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" + integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== + +acorn@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" + integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== -ajv@^6.10.2, ajv@^6.5.5, ajv@^6.9.1: - version "6.10.2" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" - integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== +agent-base@5: + version "5.1.1" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" + integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== + +agent-base@6: + version "6.0.0" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz#5d0101f19bbfaed39980b22ae866de153b93f09a" + integrity sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw== + dependencies: + debug "4" + +ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: + version "6.12.0" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" + integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== dependencies: - fast-deep-equal "^2.0.1" + fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: +ansi-escapes@^3.0.0: version "3.2.0" resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== +ansi-escapes@^4.2.1: + version "4.3.1" + resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + dependencies: + type-fest "^0.11.0" + ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" @@ -605,6 +662,11 @@ ansi-regex@^4.0.0, ansi-regex@^4.1.0: resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -612,6 +674,14 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + anymatch@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -627,6 +697,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argv@0.0.2: + version "0.0.2" + resolved "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab" + integrity sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas= + aria-query@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc" @@ -655,7 +730,7 @@ array-equal@^1.0.0: resolved "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= -array-includes@^3.0.3: +array-includes@^3.0.3, array-includes@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ== @@ -730,29 +805,14 @@ aws-sign2@~0.7.0: integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.9.0" - resolved "https://registry.npmjs.org/aws4/-/aws4-1.9.0.tgz#24390e6ad61386b0a747265754d2a17219de862c" - integrity sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A== + version "1.9.1" + resolved "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e" + integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== axobject-query@^2.0.2: - version "2.1.1" - resolved "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.1.tgz#2a3b1271ec722d48a4cd4b3fcc20c853326a49a7" - integrity sha512-lF98xa/yvy6j3fBHAgQXIYl+J4eZadOSqsPojemUqClzNbBV38wWGpUbQbVEyf4eUF5yF7eHmGgGA2JiHyjeqw== - dependencies: - "@babel/runtime" "^7.7.4" - "@babel/runtime-corejs3" "^7.7.4" - -babel-eslint@>=8.2.0: - version "10.0.3" - resolved "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.3.tgz#81a2c669be0f205e19462fed2482d33e4687a88a" - integrity sha512-z3U7eMY6r/3f3/JB9mTsLjyxrv0Yb1zb8PCWCLpguxfCzBIZUwy23R1t/XKewP+8mEN2Ck8Dtr4q20z6ce6SoA== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.0.0" - eslint-visitor-keys "^1.0.0" - resolve "^1.12.0" + version "2.1.2" + resolved "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.2.tgz#2bdffc0371e643e5f03ba99065d5179b9ca79799" + integrity sha512-ICt34ZmrVt8UQnvPl6TVyDTkmhXmAyAT4Jh5ugfGUX4MOrZ+U/ZY6/sdylRw3qGNr9Ub5AJsaHeDMzNLehRdOQ== babel-jest@^24.9.0: version "24.9.0" @@ -853,10 +913,10 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" -browser-process-hrtime@^0.1.2: - version "0.1.3" - resolved "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" - integrity sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw== +browser-process-hrtime@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" + integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== browser-resolve@^1.11.3: version "1.11.3" @@ -940,6 +1000,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chardet@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -960,12 +1028,19 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= +clean-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz#8df7c7aae51fd36874e8f8d05b9180bc11a3fed7" + integrity sha1-jffHquUf02h06PjQW5GAvBGj/tc= + dependencies: + escape-string-regexp "^1.0.5" + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== dependencies: - restore-cursor "^2.0.0" + restore-cursor "^3.1.0" cli-width@^2.0.0: version "2.2.0" @@ -986,6 +1061,17 @@ co@^4.6.0: resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= +codecov@^3.6.5: + version "3.6.5" + resolved "https://registry.npmjs.org/codecov/-/codecov-3.6.5.tgz#d73ce62e8a021f5249f54b073e6f2d6a513f172a" + integrity sha512-v48WuDMUug6JXwmmfsMzhCHRnhUf8O3duqXvltaYJKrO1OekZWpB/eH6iIoaxMl8Qli0+u3OxptdsBOYiD7VAQ== + dependencies: + argv "0.0.2" + ignore-walk "3.0.3" + js-yaml "3.13.1" + teeny-request "6.0.1" + urlgrey "0.4.4" + collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -1001,11 +1087,23 @@ color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -1013,7 +1111,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.11.0, commander@~2.20.3: +commander@^2.11.0: version "2.20.3" resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -1028,6 +1126,11 @@ concat-map@0.0.1: resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= +confusing-browser-globals@^1.0.9: + version "1.0.9" + resolved "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz#72bc13b483c0276801681871d4898516f8f54fdd" + integrity sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw== + contains-path@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" @@ -1046,23 +1149,15 @@ copy-descriptor@^0.1.0: integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js-pure@^3.0.0: - version "3.6.2" - resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.2.tgz#81f08059134d1c7318838024e1b8e866bcb1ddb3" - integrity sha512-PRasaCPjjCB65au2dMBPtxuIR6LM8MVNdbIbN57KxcDV1FAYQWlF0pqje/HC2sM6nm/s9KqSTkMTU75pozaghA== + version "3.6.4" + resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.4.tgz#4bf1ba866e25814f149d4e9aaa08c36173506e3a" + integrity sha512-epIhRLkXdgv32xIUFaaAry2wdxZYBi6bgM7cB136dzzXXa+dFyRLTZeLUJxnd8ShrmyVXBub63n2NHo2JAt8Cw== core-util-is@1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cross-fetch@2.2.2: - version "2.2.2" - resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.2.tgz#a47ff4f7fc712daba8f6a695a11c948440d45723" - integrity sha1-pH/09/xxLauo9qaVoRyUhEDUVyM= - dependencies: - node-fetch "2.1.2" - whatwg-fetch "2.0.4" - cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -1087,9 +1182,9 @@ cssstyle@^1.0.0: cssom "0.3.x" damerau-levenshtein@^1.0.4: - version "1.0.5" - resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz#780cf7144eb2e8dbd1c3bb83ae31100ccc31a414" - integrity sha512-CBCRqFnpu715iPmw1KrdOrzRqbdFwQTwAWyyyYS42+iAgHCuXZ+/TdMgQkUENPomxEz9z1BEzuQU2Xw0kUuAgA== + version "1.0.6" + resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz#143c1641cb3d85c60c32329e26899adea8701791" + integrity sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug== dashdash@^1.12.0: version "1.14.1" @@ -1107,6 +1202,13 @@ data-urls@^1.0.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -1114,13 +1216,6 @@ debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - decamelize@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1170,7 +1265,7 @@ delayed-stream@~1.0.0: resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= -deprecation@^2.0.0: +deprecation@^2.0.0, deprecation@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== @@ -1227,6 +1322,11 @@ emoji-regex@^7.0.1, emoji-regex@^7.0.2: resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -1241,10 +1341,10 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0, es-abstract@^1.17.0-next.1: - version "1.17.0" - resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz#f42a517d0036a5591dbb2c463591dc8bb50309b1" - integrity sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug== +es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.2: + version "1.17.4" + resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz#e3aedf19706b20e7c2594c35fc0d57605a79e184" + integrity sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ== dependencies: es-to-primitive "^1.2.1" function-bind "^1.1.1" @@ -1273,41 +1373,87 @@ escape-string-regexp@^1.0.5: integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= escodegen@^1.9.1: - version "1.12.1" - resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.12.1.tgz#08770602a74ac34c7a90ca9229e7d51e379abc76" - integrity sha512-Q8t2YZ+0e0pc7NRVj3B4tSQ9rim1oi4Fh46k2xhJ2qOiEwhQfdjyEQddWdj7ZFaKmU+5104vn1qrcjEPWq+bgQ== + version "1.14.1" + resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.14.1.tgz#ba01d0c8278b5e95a9a45350142026659027a457" + integrity sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ== dependencies: - esprima "^3.1.3" + esprima "^4.0.1" estraverse "^4.2.0" esutils "^2.0.2" optionator "^0.8.1" optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^4.0.0: - version "4.3.0" - resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-4.3.0.tgz#c55c1fcac8ce4518aeb77906984e134d9eb5a4f0" - integrity sha512-sZwhSTHVVz78+kYD3t5pCWSYEdVSBR0PXnwjDRsUs8ytIrK8PLXw+6FKp8r3Z7rx4ZszdetWlXYKOHoUrrwPlA== +eslint-ast-utils@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz#3d58ba557801cfb1c941d68131ee9f8c34bd1586" + integrity sha512-otzzTim2/1+lVrlH19EfQQJEhVJSu0zOb9ygb3iapN6UlyaDtyRq4b5U1FuW0v1lRa9Fp/GJyHkSwm6NqABgCA== + dependencies: + lodash.get "^4.4.2" + lodash.zip "^4.2.0" + +eslint-config-airbnb-base@^14.0.0, eslint-config-airbnb-base@^14.1.0: + version "14.1.0" + resolved "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.1.0.tgz#2ba4592dd6843258221d9bff2b6831bd77c874e4" + integrity sha512-+XCcfGyCnbzOnktDVhwsCAx+9DmrzEmuwxyHUJpw+kqBVT744OUBrB09khgFKlK1lshVww6qXGsYPZpavoNjJw== + dependencies: + confusing-browser-globals "^1.0.9" + object.assign "^4.1.0" + object.entries "^1.1.1" + +eslint-config-airbnb-typescript@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-7.0.0.tgz#1846623dcd17d4993db1688f9698bcedeccccccc" + integrity sha512-ki0JvJEdz2E0QWMeDfSgyr7tLwSmTYhMwaZP0XNnBhQfsjAAlLXwpQZHZBIpaoPrc2Fs6pFUTUU39xD3XPXKZQ== + dependencies: + "@typescript-eslint/parser" "^2.19.0" + eslint-config-airbnb "^18.0.1" + eslint-config-airbnb-base "^14.0.0" + +eslint-config-airbnb@^18.0.1: + version "18.1.0" + resolved "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-18.1.0.tgz#724d7e93dadd2169492ff5363c5aaa779e01257d" + integrity sha512-kZFuQC/MPnH7KJp6v95xsLBf63G/w7YqdPfQ0MUanxQ7zcKUNG8j+sSY860g3NwCBOa62apw16J6pRN+AOgXzw== + dependencies: + eslint-config-airbnb-base "^14.1.0" + object.assign "^4.1.0" + object.entries "^1.1.1" + +eslint-config-prettier@^6.10.0: + version "6.10.0" + resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz#7b15e303bf9c956875c948f6b21500e48ded6a7f" + integrity sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg== dependencies: get-stdin "^6.0.0" eslint-import-resolver-node@^0.3.2: - version "0.3.2" - resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" - integrity sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q== + version "0.3.3" + resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz#dbaa52b6b2816b50bc6711af75422de808e98404" + integrity sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg== dependencies: debug "^2.6.9" - resolve "^1.5.0" + resolve "^1.13.1" + +eslint-import-resolver-typescript@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.0.0.tgz#e95f126cc12d3018b9cc11692b4dbfd3e17d3ea6" + integrity sha512-bT5Frpl8UWoHBtY25vKUOMoVIMlJQOMefHLyQ4Tz3MQpIZ2N6yYKEEIHMo38bszBNUuMBW6M3+5JNYxeiGFH4w== + dependencies: + debug "^4.1.1" + is-glob "^4.0.1" + resolve "^1.12.0" + tiny-glob "^0.2.6" + tsconfig-paths "^3.9.0" eslint-module-utils@^2.4.1: - version "2.5.0" - resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.0.tgz#cdf0b40d623032274ccd2abd7e64c4e524d6e19c" - integrity sha512-kCo8pZaNz2dsAW7nCUjuVoI11EBXXpIzfNxmaoLhXoRDOnqXLC4iSGVRdZPhOitfbdEfMEfKOiENaK6wDPZEGw== + version "2.5.2" + resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz#7878f7504824e1b857dd2505b59a8e5eda26a708" + integrity sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q== dependencies: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-eslint-comments@>=3.0.1: +eslint-plugin-eslint-comments@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.1.2.tgz#4ef6c488dbe06aa1627fea107b3e5d059fc8a395" integrity sha512-QexaqrNeteFfRTad96W+Vi4Zj1KFbkHHNMMaHZEYcovKav6gdomyGzaxSDSL3GoIyUOo078wRAdYlu1caiauIQ== @@ -1315,54 +1461,10 @@ eslint-plugin-eslint-comments@>=3.0.1: escape-string-regexp "^1.0.5" ignore "^5.0.5" -eslint-plugin-eslint-plugin@^2.1.0: - version "2.2.0" - resolved "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.2.0.tgz#6cac90a8085f658e892b155dda130deac54cfa51" - integrity sha512-X5+NT9a2GuwWyb3sHJdEEe6aD/30Fhi3/9XCmYHe/OSnWKUhmKOxFTfFM1AXZfJXjAoX7811bnoLI3fZr5AX5Q== - -eslint-plugin-flowtype@>=2.49.3: - version "4.5.3" - resolved "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.5.3.tgz#21322e62c206cb4440d32ed3ba8eabe14e6d0fdf" - integrity sha512-9PBGkk3dQ2TnP04Zrm8ziVHyNIYzd24PEY12I5DXC/R35+3if0C1/PqTQW94v3okKWoBh2/7EysMEX9AimONjQ== - dependencies: - lodash "^4.17.15" - -eslint-plugin-github@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-2.0.0.tgz#13d2946197331649e954c65d745a0fca7039eeed" - integrity sha512-bG8rnKk8wCEN4dnKYx4kMCxeFaA2Rtxb0Sh5xAvR1aQKukuqtcp7XjJ+q38LJpC0twYWtiYeBEuJoy0cCh2whw== - dependencies: - "@typescript-eslint/eslint-plugin" "^1.3.0" - "@typescript-eslint/parser" "^1.3.0" - babel-eslint ">=8.2.0" - eslint-config-prettier "^4.0.0" - eslint-plugin-eslint-comments ">=3.0.1" - eslint-plugin-flowtype ">=2.49.3" - eslint-plugin-graphql ">=3.0.1" - eslint-plugin-import ">=2.11.0" - eslint-plugin-jest ">=21.15.0" - eslint-plugin-jsx-a11y ">=6.0.0" - eslint-plugin-prettier ">=2.6.0" - eslint-plugin-react ">=7.7.0" - eslint-plugin-relay ">=1.0.0" - eslint-rule-documentation ">=1.0.0" - inquirer "^6.0.0" - prettier ">=1.12.0" - read-pkg-up "^4.0.0" - svg-element-attributes "^1.2.1" - -eslint-plugin-graphql@>=3.0.1: - version "3.1.1" - resolved "https://registry.npmjs.org/eslint-plugin-graphql/-/eslint-plugin-graphql-3.1.1.tgz#640f7f73f12cee2f7145140bd2ff21694018bff5" - integrity sha512-VNu2AipS8P1BAnE/tcJ2EmBWjFlCnG+1jKdUlFNDQjocWZlFiPpMu9xYNXePoEXK+q+jG51M/6PdhOjEgJZEaQ== - dependencies: - graphql-config "^2.0.1" - lodash "^4.11.1" - -eslint-plugin-import@>=2.11.0: - version "2.19.1" - resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.19.1.tgz#5654e10b7839d064dd0d46cd1b88ec2133a11448" - integrity sha512-x68131aKoCZlCae7rDXKSAQmbT5DQuManyXo2sK6fJJ0aK5CWAkv6A6HJZGgqC8IhjQxYPgo6/IY4Oz8AFsbBw== +eslint-plugin-import@^2.20.1: + version "2.20.1" + resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz#802423196dcb11d9ce8435a5fc02a6d3b46939b3" + integrity sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw== dependencies: array-includes "^3.0.3" array.prototype.flat "^1.2.1" @@ -1377,21 +1479,14 @@ eslint-plugin-import@>=2.11.0: read-pkg-up "^2.0.0" resolve "^1.12.0" -eslint-plugin-jest@>=21.15.0: - version "23.3.0" - resolved "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.3.0.tgz#b1443d0c46d6a0de9ef3de78176dd6688c7d5326" - integrity sha512-GE6CR4ESJeu6Huw7vfZfaXHmX2R2kCFvf2X9OMcOxfP158yLKgLWz7PqLYTwRDACi84IhpmRxO8lK7GGwG05UQ== +eslint-plugin-jest@^23.8.2: + version "23.8.2" + resolved "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.8.2.tgz#6f28b41c67ef635f803ebd9e168f6b73858eb8d4" + integrity sha512-xwbnvOsotSV27MtAe7s8uGWOori0nUsrXh2f1EnpmXua8sDfY6VZhHAhHg2sqK7HBNycRQExF074XSZ7DvfoFg== dependencies: "@typescript-eslint/experimental-utils" "^2.5.0" -eslint-plugin-jest@^22.21.0: - version "22.21.0" - resolved "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-22.21.0.tgz#8137294645866636160487d9764224b9a43e2eb1" - integrity sha512-OaqnSS7uBgcGiqXUiEnjoqxPNKvR4JWG5mSRkzVoR6+vDwlqqp11beeql1hYs0HTbdhiwrxWLxbX0Vx7roG3Ew== - dependencies: - "@typescript-eslint/experimental-utils" "^1.13.0" - -eslint-plugin-jsx-a11y@>=6.0.0: +eslint-plugin-jsx-a11y@^6.2.3: version "6.2.3" resolved "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.3.tgz#b872a09d5de51af70a97db1eea7dc933043708aa" integrity sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg== @@ -1406,48 +1501,50 @@ eslint-plugin-jsx-a11y@>=6.0.0: has "^1.0.3" jsx-ast-utils "^2.2.1" -eslint-plugin-prettier@>=2.6.0: - version "3.1.2" - resolved "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz#432e5a667666ab84ce72f945c72f77d996a5c9ba" - integrity sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA== - dependencies: - prettier-linter-helpers "^1.0.0" +eslint-plugin-promise@^4.2.1: + version "4.2.1" + resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== -eslint-plugin-react@>=7.7.0: - version "7.17.0" - resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.17.0.tgz#a31b3e134b76046abe3cd278e7482bd35a1d12d7" - integrity sha512-ODB7yg6lxhBVMeiH1c7E95FLD4E/TwmFjltiU+ethv7KPdCwgiFuOZg9zNRHyufStTDLl/dEFqI2Q1VPmCd78A== +eslint-plugin-react-hooks@^2.5.0: + version "2.5.0" + resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.5.0.tgz#c50ab7ca5945ce6d1cf8248d9e185c80b54171b6" + integrity sha512-bzvdX47Jx847bgAYf0FPX3u1oxU+mKU8tqrpj4UX9A96SbAmj/HVEefEy6rJUog5u8QIlOPTKZcBpGn5kkKfAQ== + +eslint-plugin-react@^7.19.0: + version "7.19.0" + resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz#6d08f9673628aa69c5559d33489e855d83551666" + integrity sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ== dependencies: - array-includes "^3.0.3" + array-includes "^3.1.1" doctrine "^2.1.0" - eslint-plugin-eslint-plugin "^2.1.0" has "^1.0.3" jsx-ast-utils "^2.2.3" - object.entries "^1.1.0" - object.fromentries "^2.0.1" - object.values "^1.1.0" + object.entries "^1.1.1" + object.fromentries "^2.0.2" + object.values "^1.1.1" prop-types "^15.7.2" - resolve "^1.13.1" - -eslint-plugin-relay@>=1.0.0: - version "1.5.0" - resolved "https://registry.npmjs.org/eslint-plugin-relay/-/eslint-plugin-relay-1.5.0.tgz#3eedfdc1c192541c0149b97b898ee908171f0caa" - integrity sha512-dTReYJnLy0mrvhttP37KB/IYEzrPU37BSw/pLkzvK6OQ4BITffeohGWVn1LHe3e+ZMpDK3zSp8xKx0psz7JOMQ== - dependencies: - graphql "^14.0.0 | ^15.0.0-rc.1" - -eslint-rule-documentation@>=1.0.0: - version "1.0.23" - resolved "https://registry.npmjs.org/eslint-rule-documentation/-/eslint-rule-documentation-1.0.23.tgz#4e0886145597a78d24524ec7e0cf18c6fedc23a8" - integrity sha512-pWReu3fkohwyvztx/oQWWgld2iad25TfUdi6wvhhaDPIQjHU/pyvlKgXFw1kX31SQK2Nq9MH+vRDWB0ZLy8fYw== + resolve "^1.15.1" + semver "^6.3.0" + string.prototype.matchall "^4.0.2" + xregexp "^4.3.0" -eslint-scope@^4.0.0, eslint-scope@^4.0.3: - version "4.0.3" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" - integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== +eslint-plugin-unicorn@^17.2.0: + version "17.2.0" + resolved "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-17.2.0.tgz#8f147ba24d417dc5de948c7df7d006108a37a540" + integrity sha512-0kYjrywf0kQxevFz571KrDfYMIRZ5Kq6dDgPU1EEBFeC181r+fAaPatBScWX+/hisKJ4+eCRFebxTeVylsSYmw== dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" + ci-info "^2.0.0" + clean-regexp "^1.0.0" + eslint-ast-utils "^1.1.0" + eslint-template-visitor "^1.1.0" + import-modules "^2.0.0" + lodash "^4.17.15" + read-pkg-up "^7.0.1" + regexp-tree "^0.1.20" + reserved-words "^0.1.2" + safe-regex "^2.1.1" + semver "^7.1.2" eslint-scope@^5.0.0: version "5.0.0" @@ -1457,83 +1554,88 @@ eslint-scope@^5.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.3.1: +eslint-template-visitor@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-1.1.0.tgz#f090d124d1a52e05552149fc50468ed59608b166" + integrity sha512-Lmy6QVlmFiIGl5fPi+8ACnov3sare+0Ouf7deJAGGhmUfeWJ5fVarELUxZRpsZ9sHejiJUq8626d0dn9uvcZTw== + dependencies: + eslint-visitor-keys "^1.1.0" + espree "^6.1.1" + multimap "^1.0.2" + +eslint-utils@^1.4.3: version "1.4.3" resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== dependencies: eslint-visitor-keys "^1.1.0" -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: +eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== -eslint@^5.16.0: - version "5.16.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" - integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== +eslint@^6.8.0: + version "6.8.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" + integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== dependencies: "@babel/code-frame" "^7.0.0" - ajv "^6.9.1" + ajv "^6.10.0" chalk "^2.1.0" cross-spawn "^6.0.5" debug "^4.0.1" doctrine "^3.0.0" - eslint-scope "^4.0.3" - eslint-utils "^1.3.1" - eslint-visitor-keys "^1.0.0" - espree "^5.0.1" + eslint-scope "^5.0.0" + eslint-utils "^1.4.3" + eslint-visitor-keys "^1.1.0" + espree "^6.1.2" esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" - glob "^7.1.2" - globals "^11.7.0" + glob-parent "^5.0.0" + globals "^12.1.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^6.2.2" - js-yaml "^3.13.0" + inquirer "^7.0.0" + is-glob "^4.0.0" + js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.11" + lodash "^4.17.14" minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.2" + optionator "^0.8.3" progress "^2.0.0" regexpp "^2.0.1" - semver "^5.5.1" - strip-ansi "^4.0.0" - strip-json-comments "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" table "^5.2.3" text-table "^0.2.0" + v8-compile-cache "^2.0.3" -espree@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" - integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== +espree@^6.1.1, espree@^6.1.2: + version "6.2.1" + resolved "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" + integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== dependencies: - acorn "^6.0.7" - acorn-jsx "^5.0.0" - eslint-visitor-keys "^1.0.0" - -esprima@^3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= + acorn "^7.1.1" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.1.0" -esprima@^4.0.0: +esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" - integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== + version "1.1.0" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz#c5c0b66f383e7656404f86b31334d72524eddb48" + integrity sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q== dependencies: estraverse "^4.0.0" @@ -1655,15 +1757,10 @@ extsprintf@^1.2.0: resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= - -fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== +fast-deep-equal@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" + integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.1.0" @@ -1682,10 +1779,10 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== dependencies: escape-string-regexp "^1.0.5" @@ -1725,6 +1822,14 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" @@ -1788,6 +1893,11 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= +gensync@^1.0.0-beta.1: + version "1.0.0-beta.1" + resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" + integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== + get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -1817,6 +1927,13 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +glob-parent@^5.0.0: + version "5.1.0" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" + integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== + dependencies: + is-glob "^4.0.1" + glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: version "7.1.6" resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" @@ -1829,71 +1946,44 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^11.1.0, globals@^11.7.0: +globals@^11.1.0: version "11.12.0" resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2: - version "4.2.3" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== - -graphql-config@^2.0.1: - version "2.2.1" - resolved "https://registry.npmjs.org/graphql-config/-/graphql-config-2.2.1.tgz#5fd0ec77ac7428ca5fb2026cf131be10151a0cb2" - integrity sha512-U8+1IAhw9m6WkZRRcyj8ZarK96R6lQBQ0an4lp76Ps9FyhOXENC5YQOxOFGm5CxPrX2rD0g3Je4zG5xdNJjwzQ== +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== dependencies: - graphql-import "^0.7.1" - graphql-request "^1.5.0" - js-yaml "^3.10.0" - lodash "^4.17.4" - minimatch "^3.0.4" + type-fest "^0.8.1" -graphql-import@^0.7.1: - version "0.7.1" - resolved "https://registry.npmjs.org/graphql-import/-/graphql-import-0.7.1.tgz#4add8d91a5f752d764b0a4a7a461fcd93136f223" - integrity sha512-YpwpaPjRUVlw2SN3OPljpWbVRWAhMAyfSba5U47qGMOSsPLi2gYeJtngGpymjm9nk57RFWEpjqwh4+dpYuFAPw== - dependencies: - lodash "^4.17.4" - resolve-from "^4.0.0" +globalyzer@^0.1.0: + version "0.1.4" + resolved "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.4.tgz#bc8e273afe1ac7c24eea8def5b802340c5cc534f" + integrity sha512-LeguVWaxgHN0MNbWC6YljNMzHkrCny9fzjmEUdnF1kQ7wATFD1RHFRqA1qxaX2tgxGENlcxjOflopBwj3YZiXA== -graphql-request@^1.5.0: - version "1.8.2" - resolved "https://registry.npmjs.org/graphql-request/-/graphql-request-1.8.2.tgz#398d10ae15c585676741bde3fc01d5ca948f8fbe" - integrity sha512-dDX2M+VMsxXFCmUX0Vo0TopIZIX4ggzOtiCsThgtrKR4niiaagsGTDIHj3fsOMFETpa064vzovI+4YV4QnMbcg== - dependencies: - cross-fetch "2.2.2" +globrex@^0.1.1: + version "0.1.2" + resolved "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" + integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== -"graphql@^14.0.0 | ^15.0.0-rc.1": - version "15.0.0-rc.1" - resolved "https://registry.npmjs.org/graphql/-/graphql-15.0.0-rc.1.tgz#246c5c02ee60d2fe2f670bf97847da9ad95e7e0c" - integrity sha512-yuuP9Pjtl6Pf2js/P9WKEcCBql3fTlYqBOX8EdW9Di/Y3VyK56tdK4KLULDsgIni5gcqv8GgtY5j/DMho+RXYw== - dependencies: - iterall "^1.3.0" +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2: + version "4.2.3" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== growly@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -handlebars@^4.1.2: - version "4.5.3" - resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482" - integrity sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA== - dependencies: - neo-async "^2.6.0" - optimist "^0.6.1" - source-map "^0.6.1" - optionalDependencies: - uglify-js "^3.1.4" - har-schema@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= -har-validator@~5.1.0: +har-validator@~5.1.3: version "5.1.3" resolved "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== @@ -1906,6 +1996,11 @@ has-flag@^3.0.0: resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-symbols@^1.0.0, has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" @@ -1950,9 +2045,9 @@ has@^1.0.3: function-bind "^1.1.1" hosted-git-info@^2.1.4: - version "2.8.5" - resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" - integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== + version "2.8.8" + resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" + integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== html-encoding-sniffer@^1.0.2: version "1.0.2" @@ -1961,6 +2056,20 @@ html-encoding-sniffer@^1.0.2: dependencies: whatwg-encoding "^1.0.1" +html-escaper@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.0.tgz#71e87f931de3fe09e56661ab9a29aadec707b491" + integrity sha512-a4u9BeERWGu/S8JiWEAQcdrg9v4QArtP9keViQjGMdff20fBdd8waotXaNmODqBe6uZ3Nafi7K/ho4gCQHV3Ig== + +http-proxy-agent@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -1970,6 +2079,14 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +https-proxy-agent@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" + integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== + dependencies: + agent-base "5" + debug "4" + iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -1977,6 +2094,13 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +ignore-walk@3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" + integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== + dependencies: + minimatch "^3.0.4" + ignore@^4.0.6: version "4.0.6" resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -2003,6 +2127,11 @@ import-local@^2.0.0: pkg-dir "^3.0.0" resolve-cwd "^2.0.0" +import-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/import-modules/-/import-modules-2.0.0.tgz#9c1e13b4e7a15682f70a6e3fa29534e4540cfc5d" + integrity sha512-iczM/v9drffdNnABOKwj0f9G3cFDon99VcG1mxeBsdqnbd+vnQ5c2uAiCHNQITqFTOPaEvwg3VjoWCur0uHLEw== + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -2021,25 +2150,34 @@ inherits@2: resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inquirer@^6.0.0, inquirer@^6.2.2: - version "6.5.2" - resolved "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" - integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== +inquirer@^7.0.0: + version "7.1.0" + resolved "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" + integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== dependencies: - ansi-escapes "^3.2.0" - chalk "^2.4.2" - cli-cursor "^2.1.0" + ansi-escapes "^4.2.1" + chalk "^3.0.0" + cli-cursor "^3.1.0" cli-width "^2.0.0" external-editor "^3.0.3" - figures "^2.0.0" - lodash "^4.17.12" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^6.4.0" - string-width "^2.1.0" - strip-ansi "^5.1.0" + figures "^3.0.0" + lodash "^4.17.15" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.5.3" + string-width "^4.1.0" + strip-ansi "^6.0.0" through "^2.3.6" +internal-slot@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.2.tgz#9c2e9fb3cd8e5e4256c6f45fe310067fcfa378a3" + integrity sha512-2cQNfwhAfJIkU4KZPkDI+Gj5yNNnbqi40W9Gge6dfnk4TocEVm00B3bdiL+JINrbGJil2TeHvM4rETGzk/f/0g== + dependencies: + es-abstract "^1.17.0-next.1" + has "^1.0.3" + side-channel "^1.0.2" + invariant@^2.2.4: version "2.2.4" resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -2142,12 +2280,17 @@ is-fullwidth-code-point@^2.0.0: resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + is-generator-fn@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -2290,16 +2433,11 @@ istanbul-lib-source-maps@^3.0.1: source-map "^0.6.1" istanbul-reports@^2.2.6: - version "2.2.6" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz#7b4f2660d82b29303a8fe6091f8ca4bf058da1af" - integrity sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA== + version "2.2.7" + resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz#5d939f6237d7b48393cc0959eab40cd4fd056931" + integrity sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg== dependencies: - handlebars "^4.1.2" - -iterall@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" - integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== + html-escaper "^2.0.0" jest-changed-files@^24.9.0: version "24.9.0" @@ -2682,7 +2820,7 @@ jest@^24.9.0: resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.10.0, js-yaml@^3.13.0, js-yaml@^3.13.1: +js-yaml@3.13.1, js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -2758,9 +2896,16 @@ json-stringify-safe@~5.0.1: integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= json5@2.x, json5@^2.1.0: - version "2.1.1" - resolved "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6" - integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ== + version "2.1.2" + resolved "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz#43ef1f0af9835dd624751a6b7fa48874fb2d608e" + integrity sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ== + dependencies: + minimist "^1.2.5" + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== dependencies: minimist "^1.2.0" @@ -2802,9 +2947,9 @@ kind-of@^5.0.0: integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + version "6.0.3" + resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== kleur@^3.0.3: version "3.0.3" @@ -2829,6 +2974,11 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + load-json-file@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" @@ -2865,6 +3015,13 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" @@ -2885,17 +3042,17 @@ lodash.sortby@^4.7.0: resolved "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= -lodash.unescape@4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" - integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= - lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.11.1, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4: +lodash.zip@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020" + integrity sha1-7GZi5IlkCO1KtsVCo5kLcswIACA= + +lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: version "4.17.15" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -2921,9 +3078,9 @@ make-dir@^2.1.0: semver "^5.6.0" make-error@1.x: - version "1.3.5" - resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" - integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== + version "1.3.6" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== makeerror@1.0.x: version "1.0.11" @@ -2980,10 +3137,10 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.43.0" -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== minimatch@^3.0.4: version "3.0.4" @@ -2997,15 +3154,10 @@ minimist@0.0.8: resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@^1.1.1, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= +minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== mixin-deep@^1.2.0: version "1.3.2" @@ -3032,10 +3184,15 @@ ms@^2.1.1: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -mute-stream@0.0.7: - version "0.0.7" - resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= +multimap@^1.0.2: + version "1.1.0" + resolved "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz#5263febc085a1791c33b59bb3afc6a76a2a10ca8" + integrity sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw== + +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== nan@^2.12.1: version "2.14.0" @@ -3064,22 +3221,12 @@ natural-compare@^1.4.0: resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -neo-async@^2.6.0: - version "2.6.1" - resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" - integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== - nice-try@^1.0.4: version "1.0.5" resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-fetch@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5" - integrity sha1-q4hOjn5X44qUR1POxwb3iNF2i7U= - -node-fetch@^2.3.0: +node-fetch@^2.2.0, node-fetch@^2.3.0: version "2.6.0" resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== @@ -3105,7 +3252,7 @@ node-notifier@^5.4.2: shellwords "^0.1.1" which "^1.3.0" -normalize-package-data@^2.3.2: +normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== @@ -3180,7 +3327,7 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" -object.entries@^1.1.0: +object.entries@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.1.tgz#ee1cf04153de02bb093fec33683900f57ce5399b" integrity sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ== @@ -3190,7 +3337,7 @@ object.entries@^1.1.0: function-bind "^1.1.1" has "^1.0.3" -object.fromentries@^2.0.1: +object.fromentries@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.2.tgz#4a09c9b9bb3843dd0f89acdb517a794d4f355ac9" integrity sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ== @@ -3200,7 +3347,7 @@ object.fromentries@^2.0.1: function-bind "^1.1.1" has "^1.0.3" -object.getownpropertydescriptors@^2.0.3: +object.getownpropertydescriptors@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== @@ -3215,7 +3362,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.0: +object.values@^1.1.0, object.values@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== @@ -3237,22 +3384,14 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - dependencies: - mimic-fn "^1.0.0" - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" + mimic-fn "^2.1.0" -optionator@^0.8.1, optionator@^0.8.2: +optionator@^0.8.1, optionator@^0.8.3: version "0.8.3" resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -3296,7 +3435,7 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0: +p-limit@^2.0.0, p-limit@^2.2.0: version "2.2.2" resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== @@ -3317,6 +3456,13 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + p-reduce@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" @@ -3354,6 +3500,16 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-json@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f" + integrity sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + lines-and-columns "^1.1.6" + parse5@4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -3369,16 +3525,16 @@ path-exists@^3.0.0: resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -3459,14 +3615,7 @@ prelude-ls@~1.1.2: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - -prettier@>=1.12.0, prettier@^1.19.1: +prettier@^1.19.1: version "1.19.1" resolved "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== @@ -3487,12 +3636,12 @@ progress@^2.0.0: integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== prompts@^2.0.1: - version "2.3.0" - resolved "https://registry.npmjs.org/prompts/-/prompts-2.3.0.tgz#a444e968fa4cc7e86689a74050685ac8006c4cc4" - integrity sha512-NfbbPPg/74fT7wk2XYQ7hAIp9zJyZp5Fu19iRbORqqy1BhtrkZ0fPafBU+7bmn8ie69DpT0R6QpJIN2oisYjJg== + version "2.3.1" + resolved "https://registry.npmjs.org/prompts/-/prompts-2.3.1.tgz#b63a9ce2809f106fa9ae1277c275b167af46ea05" + integrity sha512-qIP2lQyCwYbdzcqHIUi2HAxiWixhoM9OdLCWf8txXsapC/X9YdsCoeyRIXE/GP+Q0J37Q7+XN/MFqbUa7IzXNA== dependencies: kleur "^3.0.3" - sisteransi "^1.0.3" + sisteransi "^1.0.4" prop-types@^15.7.2: version "15.7.2" @@ -3503,7 +3652,7 @@ prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" -psl@^1.1.24, psl@^1.1.28: +psl@^1.1.28: version "1.7.0" resolved "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c" integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ== @@ -3516,11 +3665,6 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -3532,9 +3676,9 @@ qs@~6.5.2: integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== react-is@^16.8.1, react-is@^16.8.4: - version "16.12.0" - resolved "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" - integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== + version "16.13.0" + resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.0.tgz#0f37c3613c34fe6b37cd7f763a0d6293ab15c527" + integrity sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA== read-pkg-up@^2.0.0: version "2.0.0" @@ -3552,6 +3696,15 @@ read-pkg-up@^4.0.0: find-up "^3.0.0" read-pkg "^3.0.0" +read-pkg-up@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" + integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== + dependencies: + find-up "^4.1.0" + read-pkg "^5.2.0" + type-fest "^0.8.1" + read-pkg@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" @@ -3570,6 +3723,16 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" +read-pkg@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== + dependencies: + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" + realpath-native@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c" @@ -3577,10 +3740,10 @@ realpath-native@^1.1.0: dependencies: util.promisify "^1.0.0" -regenerator-runtime@^0.13.2: - version "0.13.3" - resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" - integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== +regenerator-runtime@^0.13.4: + version "0.13.5" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" @@ -3590,11 +3753,29 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regexp-tree@^0.1.20, regexp-tree@~0.1.1: + version "0.1.21" + resolved "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.21.tgz#55e2246b7f7d36f1b461490942fa780299c400d7" + integrity sha512-kUUXjX4AnqnR8KRTCrayAo9PzYMRKmVoGgaz2tBuz0MF3g1ZbGebmtW0yFHfFK9CmBjQKeYIgoL22pFLBJY7sw== + +regexp.prototype.flags@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" + integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + regexpp@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== +regexpp@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e" + integrity sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g== + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -3627,9 +3808,9 @@ request-promise-native@^1.0.5: tough-cookie "^2.3.3" request@^2.87.0: - version "2.88.0" - resolved "https://registry.npmjs.org/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" - integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== + version "2.88.2" + resolved "https://registry.npmjs.org/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -3638,7 +3819,7 @@ request@^2.87.0: extend "~3.0.2" forever-agent "~0.6.1" form-data "~2.3.2" - har-validator "~5.1.0" + har-validator "~5.1.3" http-signature "~1.2.0" is-typedarray "~1.0.0" isstream "~0.1.2" @@ -3648,7 +3829,7 @@ request@^2.87.0: performance-now "^2.1.0" qs "~6.5.2" safe-buffer "^5.1.2" - tough-cookie "~2.4.3" + tough-cookie "~2.5.0" tunnel-agent "^0.6.0" uuid "^3.3.2" @@ -3662,6 +3843,11 @@ require-main-filename@^2.0.0: resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +reserved-words@^0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1" + integrity sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE= + resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -3689,19 +3875,19 @@ resolve@1.1.7: resolved "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@1.x, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2, resolve@^1.5.0: - version "1.14.2" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz#dbf31d0fa98b1f29aa5169783b9c290cb865fea2" - integrity sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ== +resolve@1.x, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.1, resolve@^1.3.2: + version "1.15.1" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== dependencies: path-parse "^1.0.6" -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== dependencies: - onetime "^2.0.0" + onetime "^5.1.0" signal-exit "^3.0.2" ret@~0.1.10: @@ -3728,14 +3914,14 @@ rsvp@^4.8.4: resolved "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== -run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= +run-async@^2.4.0: + version "2.4.0" + resolved "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" + integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== dependencies: is-promise "^2.1.0" -rxjs@^6.4.0: +rxjs@^6.5.3: version "6.5.4" resolved "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== @@ -3759,6 +3945,13 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" +safe-regex@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz#f7128f00d056e2fe5c11e81a1324dd974aadced2" + integrity sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A== + dependencies: + regexp-tree "~0.1.1" + "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -3784,21 +3977,21 @@ sax@^1.2.4: resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5, semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@5.5.0: - version "5.5.0" - resolved "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== - -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.1.2: + version "7.1.3" + resolved "https://registry.npmjs.org/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6" + integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA== + set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -3831,12 +4024,20 @@ shellwords@^0.1.1: resolved "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== +side-channel@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.2.tgz#df5d1abadb4e4bf4af1cd8852bf132d2f7876947" + integrity sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA== + dependencies: + es-abstract "^1.17.0-next.1" + object-inspect "^1.7.0" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= -sisteransi@^1.0.3: +sisteransi@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3" integrity sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig== @@ -3990,6 +4191,13 @@ stealthy-require@^1.1.1: resolved "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= +stream-events@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz#bbc898ec4df33a4902d892333d47da9bf1c406d5" + integrity sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg== + dependencies: + stubs "^3.0.0" + string-length@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" @@ -3998,14 +4206,6 @@ string-length@^2.0.0: astral-regex "^1.0.0" strip-ansi "^4.0.0" -string-width@^2.1.0: - version "2.1.1" - resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -4015,6 +4215,27 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" +string-width@^4.1.0: + version "4.2.0" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.matchall@^4.0.2: + version "4.0.2" + resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.2.tgz#48bb510326fb9fdeb6a33ceaa81a6ea04ef7648e" + integrity sha512-N/jp6O5fMf9os0JU3E72Qhf590RSRZU/ungsL/qJUYVTNv7hTG0P/dbPjxINVN9jpscu3nzYwKESU3P3RY5tOg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0" + has-symbols "^1.0.1" + internal-slot "^1.0.2" + regexp.prototype.flags "^1.3.0" + side-channel "^1.0.2" + string.prototype.trimleft@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" @@ -4045,6 +4266,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -4055,10 +4283,15 @@ strip-eof@^1.0.0: resolved "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -strip-json-comments@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +strip-json-comments@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + +stubs@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" + integrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls= supports-color@^5.3.0: version "5.5.0" @@ -4074,10 +4307,12 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" -svg-element-attributes@^1.2.1: - version "1.3.0" - resolved "https://registry.npmjs.org/svg-element-attributes/-/svg-element-attributes-1.3.0.tgz#5e86111664729de6fb6d2c3fb8ffb9cb5fcfb86a" - integrity sha512-M4rTTZ186MY4/d3a4XNNuEptXOTIz5qeasp2D7gWVwIDa9e2wF1ccrFs9x7ZW6Sp4+ebCOt9GMCpccC3wt3srg== +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" symbol-tree@^3.2.2: version "3.2.4" @@ -4094,6 +4329,17 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" +teeny-request@6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/teeny-request/-/teeny-request-6.0.1.tgz#9b1f512cef152945827ba7e34f62523a4ce2c5b0" + integrity sha512-TAK0c9a00ELOqLrZ49cFxvPVogMUFaWY8dUsQc/0CuQPGF+BOxOQzXfE413BAk2kLomwNplvdtMpeaeGWmoc2g== + dependencies: + http-proxy-agent "^4.0.0" + https-proxy-agent "^4.0.0" + node-fetch "^2.2.0" + stream-events "^1.0.5" + uuid "^3.3.2" + test-exclude@^5.2.3: version "5.2.3" resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" @@ -4119,6 +4365,14 @@ through@^2.3.6: resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= +tiny-glob@^0.2.6: + version "0.2.6" + resolved "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.6.tgz#9e056e169d9788fe8a734dfa1ff02e9b92ed7eda" + integrity sha512-A7ewMqPu1B5PWwC3m7KVgAu96Ch5LA0w4SnEN/LbDREj/gAD0nPWboRbn8YoP9ISZXqeNAlMvKSKoEuhcfK3Pw== + dependencies: + globalyzer "^0.1.0" + globrex "^0.1.1" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -4161,7 +4415,7 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@^2.3.3, tough-cookie@^2.3.4: +tough-cookie@^2.3.3, tough-cookie@^2.3.4, tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== @@ -4169,14 +4423,6 @@ tough-cookie@^2.3.3, tough-cookie@^2.3.4: psl "^1.1.28" punycode "^2.1.1" -tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== - dependencies: - psl "^1.1.24" - punycode "^1.4.1" - tr46@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" @@ -4184,7 +4430,7 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" -ts-jest@^24.2.0: +ts-jest@^24.3.0: version "24.3.0" resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-24.3.0.tgz#b97814e3eab359ea840a1ac112deae68aa440869" integrity sha512-Hb94C/+QRIgjVZlJyiWwouYUF+siNJHJHknyspaOcZ+OQAIdFG/UrdQVXw/0B8Z3No34xkUXZJpOTy9alOWdVQ== @@ -4200,12 +4446,22 @@ ts-jest@^24.2.0: semver "^5.5" yargs-parser "10.x" +tsconfig-paths@^3.9.0: + version "3.9.0" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" + integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + tslib@^1.8.1, tslib@^1.9.0: - version "1.10.0" - resolved "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" - integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== + version "1.11.1" + resolved "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" + integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== -tsutils@^3.17.1, tsutils@^3.7.0: +tsutils@^3.17.1: version "3.17.1" resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== @@ -4219,6 +4475,11 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +tunnel@0.0.6: + version "0.0.6" + resolved "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" + integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" @@ -4231,18 +4492,25 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -typescript@^3.6.4: - version "3.7.4" - resolved "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz#1743a5ec5fef6a1fa9f3e4708e33c81c73876c19" - integrity sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw== +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== -uglify-js@^3.1.4: - version "3.7.4" - resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.4.tgz#e6d83a1aa32ff448bd1679359ab13d8db0fe0743" - integrity sha512-tinYWE8X1QfCHxS1lBS8yiDekyhSXOO6R66yNOCdUJeojxxw+PX2BHAz/BWyW7PQ7pkiWVxJfIEbiDxyLWvUGg== - dependencies: - commander "~2.20.3" - source-map "~0.6.1" +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + +typescript@^3.8.3: + version "3.8.3" + resolved "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" + integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== union-value@^1.0.0: version "1.0.1" @@ -4255,9 +4523,16 @@ union-value@^1.0.0: set-value "^2.0.1" universal-user-agent@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz#27da2ec87e32769619f68a14996465ea1cb9df16" - integrity sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA== + version "4.0.1" + resolved "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557" + integrity sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg== + dependencies: + os-name "^3.1.0" + +universal-user-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-5.0.0.tgz#a3182aa758069bf0e79952570ca757de3579c1d9" + integrity sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q== dependencies: os-name "^3.1.0" @@ -4281,23 +4556,35 @@ urix@^0.1.0: resolved "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= +urlgrey@0.4.4: + version "0.4.4" + resolved "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f" + integrity sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8= + use@^3.1.0: version "3.1.1" resolved "https://registry.npmjs.org/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== util.promisify@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" - integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== + version "1.0.1" + resolved "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" + integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== dependencies: - define-properties "^1.1.2" - object.getownpropertydescriptors "^2.0.3" + define-properties "^1.1.3" + es-abstract "^1.17.2" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.0" uuid@^3.3.2: - version "3.3.3" - resolved "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" - integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== + version "3.4.0" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +v8-compile-cache@^2.0.3: + version "2.1.0" + resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" + integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== validate-npm-package-license@^3.0.1: version "3.0.4" @@ -4317,11 +4604,11 @@ verror@1.10.0: extsprintf "^1.2.0" w3c-hr-time@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" - integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= + version "1.0.2" + resolved "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" + integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== dependencies: - browser-process-hrtime "^0.1.2" + browser-process-hrtime "^1.0.0" walker@^1.0.7, walker@~1.0.5: version "1.0.7" @@ -4342,11 +4629,6 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: dependencies: iconv-lite "0.4.24" -whatwg-fetch@2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" - integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== - whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0: version "2.3.0" resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" @@ -4394,11 +4676,6 @@ word-wrap@~1.2.3: resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= - wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" @@ -4441,6 +4718,13 @@ xml-name-validator@^3.0.0: resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== +xregexp@^4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/xregexp/-/xregexp-4.3.0.tgz#7e92e73d9174a99a59743f67a4ce879a04b5ae50" + integrity sha512-7jXDIFXh5yJ/orPn4SXjuVrWWoi4Cr8jfV1eHv9CixKSbU+jY4mxfrBwAuDvupPNKpMUY+FeIqsVw/JLT9+B8g== + dependencies: + "@babel/runtime-corejs3" "^7.8.3" + y18n@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" @@ -4453,18 +4737,18 @@ yargs-parser@10.x: dependencies: camelcase "^4.1.0" -yargs-parser@^13.1.1: - version "13.1.1" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" - integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== +yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== dependencies: camelcase "^5.0.0" decamelize "^1.2.0" yargs@^13.3.0: - version "13.3.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" - integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== + version "13.3.2" + resolved "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== dependencies: cliui "^5.0.0" find-up "^3.0.0" @@ -4475,4 +4759,4 @@ yargs@^13.3.0: string-width "^3.0.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^13.1.1" + yargs-parser "^13.1.2"