├── .gitignore ├── LICENSE ├── README.md ├── action.yml ├── node_modules ├── .bin │ ├── semver │ ├── semver.cmd │ ├── which │ └── which.cmd ├── @actions │ ├── core │ │ ├── README.md │ │ ├── lib │ │ │ ├── command.d.ts │ │ │ ├── command.js │ │ │ ├── command.js.map │ │ │ ├── core.d.ts │ │ │ ├── core.js │ │ │ └── core.js.map │ │ └── package.json │ ├── exec │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── lib │ │ │ ├── exec.d.ts │ │ │ ├── exec.js │ │ │ ├── exec.js.map │ │ │ ├── interfaces.d.ts │ │ │ ├── interfaces.js │ │ │ ├── interfaces.js.map │ │ │ ├── toolrunner.d.ts │ │ │ ├── toolrunner.js │ │ │ └── toolrunner.js.map │ │ └── package.json │ └── github │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── lib │ │ ├── context.d.ts │ │ ├── context.js │ │ ├── context.js.map │ │ ├── github.d.ts │ │ ├── github.js │ │ ├── github.js.map │ │ ├── interfaces.d.ts │ │ ├── interfaces.js │ │ └── interfaces.js.map │ │ └── package.json ├── @octokit │ ├── endpoint │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dist-node │ │ │ ├── index.js │ │ │ └── index.js.map │ │ ├── dist-src │ │ │ ├── defaults.js │ │ │ ├── endpoint-with-defaults.js │ │ │ ├── generated │ │ │ │ └── routes.js │ │ │ ├── index.js │ │ │ ├── merge.js │ │ │ ├── parse.js │ │ │ ├── types.js │ │ │ ├── util │ │ │ │ ├── add-query-parameters.js │ │ │ │ ├── extract-url-variable-names.js │ │ │ │ ├── lowercase-keys.js │ │ │ │ ├── merge-deep.js │ │ │ │ ├── omit.js │ │ │ │ └── url-template.js │ │ │ ├── version.js │ │ │ └── with-defaults.js │ │ ├── dist-types │ │ │ ├── defaults.d.ts │ │ │ ├── endpoint-with-defaults.d.ts │ │ │ ├── generated │ │ │ │ └── routes.d.ts │ │ │ ├── index.d.ts │ │ │ ├── merge.d.ts │ │ │ ├── parse.d.ts │ │ │ ├── types.d.ts │ │ │ ├── util │ │ │ │ ├── add-query-parameters.d.ts │ │ │ │ ├── extract-url-variable-names.d.ts │ │ │ │ ├── lowercase-keys.d.ts │ │ │ │ ├── merge-deep.d.ts │ │ │ │ ├── omit.d.ts │ │ │ │ └── url-template.d.ts │ │ │ ├── version.d.ts │ │ │ └── with-defaults.d.ts │ │ ├── dist-web │ │ │ ├── index.js │ │ │ └── index.js.map │ │ ├── node_modules │ │ │ └── universal-user-agent │ │ │ │ ├── LICENSE.md │ │ │ │ ├── README.md │ │ │ │ ├── dist-node │ │ │ │ ├── index.js │ │ │ │ └── index.js.map │ │ │ │ ├── dist-src │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── node.js │ │ │ │ ├── dist-types │ │ │ │ ├── browser.d.ts │ │ │ │ ├── index.d.ts │ │ │ │ └── node.d.ts │ │ │ │ ├── dist-web │ │ │ │ ├── index.js │ │ │ │ └── index.js.map │ │ │ │ └── package.json │ │ └── package.json │ ├── graphql │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.js │ │ ├── lib │ │ │ ├── error.js │ │ │ ├── graphql.js │ │ │ └── with-defaults.js │ │ └── package.json │ ├── request-error │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dist-node │ │ │ └── index.js │ │ ├── dist-src │ │ │ ├── index.js │ │ │ └── types.js │ │ ├── dist-types │ │ │ ├── index.d.ts │ │ │ └── types.d.ts │ │ ├── dist-web │ │ │ └── index.js │ │ └── package.json │ ├── request │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dist-node │ │ │ ├── index.js │ │ │ └── index.js.map │ │ ├── dist-src │ │ │ ├── fetch-wrapper.js │ │ │ ├── get-buffer-response.js │ │ │ ├── index.js │ │ │ ├── types.js │ │ │ ├── version.js │ │ │ └── with-defaults.js │ │ ├── dist-types │ │ │ ├── fetch-wrapper.d.ts │ │ │ ├── get-buffer-response.d.ts │ │ │ ├── index.d.ts │ │ │ ├── types.d.ts │ │ │ ├── version.d.ts │ │ │ └── with-defaults.d.ts │ │ ├── dist-web │ │ │ ├── index.js │ │ │ └── index.js.map │ │ ├── node_modules │ │ │ └── universal-user-agent │ │ │ │ ├── LICENSE.md │ │ │ │ ├── README.md │ │ │ │ ├── dist-node │ │ │ │ ├── index.js │ │ │ │ └── index.js.map │ │ │ │ ├── dist-src │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── node.js │ │ │ │ ├── dist-types │ │ │ │ ├── browser.d.ts │ │ │ │ ├── index.d.ts │ │ │ │ └── node.d.ts │ │ │ │ ├── dist-web │ │ │ │ ├── index.js │ │ │ │ └── index.js.map │ │ │ │ └── package.json │ │ └── package.json │ └── rest │ │ ├── LICENSE │ │ ├── README.md │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── lib │ │ ├── constructor.js │ │ ├── core.js │ │ ├── factory.js │ │ ├── parse-client-options.js │ │ └── register-plugin.js │ │ ├── node_modules │ │ └── universal-user-agent │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── dist-node │ │ │ ├── index.js │ │ │ └── index.js.map │ │ │ ├── dist-src │ │ │ ├── browser.js │ │ │ ├── index.js │ │ │ └── node.js │ │ │ ├── dist-types │ │ │ ├── browser.d.ts │ │ │ ├── index.d.ts │ │ │ └── node.d.ts │ │ │ ├── dist-web │ │ │ ├── index.js │ │ │ └── index.js.map │ │ │ └── package.json │ │ ├── package.json │ │ └── plugins │ │ ├── authentication-deprecated │ │ ├── authenticate.js │ │ ├── before-request.js │ │ ├── index.js │ │ └── request-error.js │ │ ├── authentication │ │ ├── before-request.js │ │ ├── index.js │ │ ├── request-error.js │ │ ├── validate.js │ │ └── with-authorization-prefix.js │ │ ├── log │ │ └── index.js │ │ ├── normalize-git-reference-responses │ │ └── index.js │ │ ├── pagination │ │ ├── index.js │ │ ├── iterator.js │ │ ├── normalize-paginated-list-response.js │ │ └── paginate.js │ │ ├── register-endpoints │ │ ├── index.js │ │ └── register-endpoints.js │ │ ├── rest-api-endpoints │ │ ├── index.js │ │ └── routes.json │ │ └── validate │ │ ├── index.js │ │ └── validate.js ├── atob-lite │ ├── .npmignore │ ├── LICENSE.md │ ├── README.md │ ├── atob-browser.js │ ├── atob-node.js │ └── package.json ├── before-after-hook │ ├── LICENSE │ ├── README.md │ ├── index.d.ts │ ├── index.js │ ├── lib │ │ ├── add.js │ │ ├── register.js │ │ └── remove.js │ └── package.json ├── btoa-lite │ ├── .npmignore │ ├── LICENSE.md │ ├── README.md │ ├── btoa-browser.js │ ├── btoa-node.js │ └── package.json ├── cross-spawn │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── enoent.js │ │ ├── parse.js │ │ └── util │ │ │ ├── escape.js │ │ │ ├── readShebang.js │ │ │ └── resolveCommand.js │ └── package.json ├── debug │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── dist │ │ └── debug.js │ ├── node.js │ ├── package.json │ └── src │ │ ├── browser.js │ │ ├── common.js │ │ ├── index.js │ │ └── node.js ├── deprecation │ ├── LICENSE │ ├── README.md │ ├── dist-node │ │ └── index.js │ ├── dist-src │ │ └── index.js │ ├── dist-types │ │ └── index.d.ts │ ├── dist-web │ │ └── index.js │ └── package.json ├── end-of-stream │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── execa │ ├── index.js │ ├── lib │ │ ├── errname.js │ │ └── stdio.js │ ├── license │ ├── package.json │ └── readme.md ├── follow-redirects │ ├── LICENSE │ ├── README.md │ ├── http.js │ ├── https.js │ ├── index.js │ └── package.json ├── get-stream │ ├── buffer-stream.js │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── is-plain-object │ ├── LICENSE │ ├── README.md │ ├── index.cjs.js │ ├── index.d.ts │ ├── index.js │ └── package.json ├── is-stream │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── isexe │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── mode.js │ ├── package.json │ ├── test │ │ └── basic.js │ └── windows.js ├── isobject │ ├── LICENSE │ ├── README.md │ ├── index.cjs.js │ ├── index.d.ts │ ├── index.js │ └── package.json ├── lodash.get │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── lodash.set │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── lodash.uniq │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── macos-release │ ├── index.d.ts │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── ms │ ├── index.js │ ├── license.md │ ├── package.json │ └── readme.md ├── nice-try │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── package.json │ └── src │ │ └── index.js ├── node-fetch │ ├── CHANGELOG.md │ ├── LICENSE.md │ ├── README.md │ ├── browser.js │ ├── lib │ │ ├── index.es.js │ │ ├── index.js │ │ └── index.mjs │ └── package.json ├── npm-run-path │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── octokit-pagination-methods │ ├── .travis.yml │ ├── CODE_OF_CONDUCT.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ ├── deprecate.js │ │ ├── get-first-page.js │ │ ├── get-last-page.js │ │ ├── get-next-page.js │ │ ├── get-page-links.js │ │ ├── get-page.js │ │ ├── get-previous-page.js │ │ ├── has-first-page.js │ │ ├── has-last-page.js │ │ ├── has-next-page.js │ │ ├── has-previous-page.js │ │ └── http-error.js │ ├── package.json │ └── test.js ├── once │ ├── LICENSE │ ├── README.md │ ├── once.js │ └── package.json ├── os-name │ ├── index.d.ts │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── p-finally │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── path-key │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── pump │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ ├── test-browser.js │ └── test-node.js ├── semver │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── bin │ │ └── semver │ ├── package.json │ ├── range.bnf │ └── semver.js ├── shebang-command │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── shebang-regex │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── signal-exit │ ├── CHANGELOG.md │ ├── LICENSE.txt │ ├── README.md │ ├── index.js │ ├── package.json │ └── signals.js ├── strip-eof │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── universal-user-agent │ ├── .travis.yml │ ├── LICENSE.md │ ├── README.md │ ├── browser.js │ ├── cypress.json │ ├── index.d.ts │ ├── index.js │ ├── package.json │ └── test │ │ └── smoke-test.js ├── which │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── bin │ │ └── which │ ├── package.json │ └── which.js ├── windows-release │ ├── index.d.ts │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md └── wrappy │ ├── LICENSE │ ├── README.md │ ├── package.json │ └── wrappy.js ├── package-lock.json ├── package.json └── src ├── main.js └── utilities.js /.gitignore: -------------------------------------------------------------------------------- 1 | __tests__/runner/* 2 | 3 | # Logs 4 | logs 5 | *.log 6 | npm-debug.log* 7 | 8 | # Output of 'npm pack' 9 | *.tgz 10 | 11 | *.iml 12 | .idea/ 13 | *.code-workspace -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'GP Security Scan' 2 | description: 'Scan packages and Docker images uploaded to GitHub Packages' 3 | author: 'WhiteSource' 4 | inputs: 5 | gp-token: 6 | description: 'GitHub access token with read/write privileges to GitHub Packages' 7 | required: true 8 | ws-destination-url: 9 | description: 'WS environment destination url' 10 | required: true 11 | ws-api-key: 12 | description: 'WS organization api key' 13 | required: true 14 | ws-user-key: 15 | description: 'WS user key' 16 | required: true 17 | ws-product-key: 18 | description: 'WS product key to publish results to' 19 | required: false 20 | print-scan-report: 21 | description: 'Whether to print the results report' 22 | required: false 23 | default: false 24 | actions_step_debug: 25 | description: 'Whether to print debug logs' 26 | required: false 27 | default: false 28 | outputs: 29 | scan-report-file-path: 30 | description: 'Path of the scan report file' 31 | scan-report-folder-path: 32 | description: 'Path of the folder of the scan report file' 33 | runs: 34 | using: 'node12' 35 | main: 'src/main.js' 36 | branding: 37 | icon: 'shield' 38 | color: 'purple' 39 | -------------------------------------------------------------------------------- /node_modules/.bin/semver: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../semver/bin/semver" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../semver/bin/semver" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /node_modules/.bin/semver.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\semver\bin\semver" %* 7 | ) -------------------------------------------------------------------------------- /node_modules/.bin/which: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../which/bin/which" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../which/bin/which" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /node_modules/.bin/which.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\which\bin\which" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\which\bin\which" %* 7 | ) -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.d.ts: -------------------------------------------------------------------------------- 1 | interface CommandProperties { 2 | [key: string]: string; 3 | } 4 | /** 5 | * Commands 6 | * 7 | * Command Format: 8 | * ##[name key=value;key=value]message 9 | * 10 | * Examples: 11 | * ##[warning]This is the user warning message 12 | * ##[set-secret name=mypassword]definitelyNotAPassword! 13 | */ 14 | export declare function issueCommand(command: string, properties: CommandProperties, message: string): void; 15 | export declare function issue(name: string, message?: string): void; 16 | export {}; 17 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;AAAA,yBAAwB;AAQxB;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAe;IAEf,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,UAAkB,EAAE;IACtD,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,QAAQ;QACN,IAAI,MAAM,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAA;QAEtC,IAAI,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9D,MAAM,IAAI,GAAG,CAAA;YACb,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACvC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;oBAChC,IAAI,GAAG,EAAE;wBACP,8DAA8D;wBAC9D,6DAA6D;wBAC7D,MAAM,IAAI,GAAG,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE,EAAE,CAAC,GAAG,CAAA;qBAC9C;iBACF;aACF;SACF;QAED,MAAM,IAAI,UAAU,CAAA;QAEpB,kEAAkE;QAClE,6DAA6D;QAC7D,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,CAAA;QACvC,MAAM,IAAI,UAAU,CAAC,OAAO,CAAC,CAAA;QAE7B,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AACtD,CAAC;AAED,SAAS,MAAM,CAAC,CAAS;IACvB,OAAO,CAAC;SACL,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"} -------------------------------------------------------------------------------- /node_modules/@actions/exec/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2019 GitHub 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/@actions/exec/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/exec` 2 | 3 | ## Usage 4 | 5 | #### Basic 6 | 7 | You can use this package to execute your tools on the command line in a cross platform way: 8 | 9 | ```js 10 | const exec = require('@actions/exec'); 11 | 12 | await exec.exec('node index.js'); 13 | ``` 14 | 15 | #### Args 16 | 17 | You can also pass in arg arrays: 18 | 19 | ```js 20 | const exec = require('@actions/exec'); 21 | 22 | await exec.exec('node', ['index.js', 'foo=bar']); 23 | ``` 24 | 25 | #### Output/options 26 | 27 | Capture output or specify [other options](https://github.com/actions/toolkit/blob/d9347d4ab99fd507c0b9104b2cf79fb44fcc827d/packages/exec/src/interfaces.ts#L5): 28 | 29 | ```js 30 | const exec = require('@actions/exec'); 31 | 32 | let myOutput = ''; 33 | let myError = ''; 34 | 35 | const options = {}; 36 | options.listeners = { 37 | stdout: (data: Buffer) => { 38 | myOutput += data.toString(); 39 | }, 40 | stderr: (data: Buffer) => { 41 | myError += data.toString(); 42 | } 43 | }; 44 | options.cwd = './lib'; 45 | 46 | await exec.exec('node', ['index.js', 'foo=bar'], options); 47 | ``` 48 | 49 | #### Exec tools not in the PATH 50 | 51 | You can use it in conjunction with the `which` function from `@actions/io` to execute tools that are not in the PATH: 52 | 53 | ```js 54 | const exec = require('@actions/exec'); 55 | const io = require('@actions/io'); 56 | 57 | const pythonPath: string = await io.which('python', true) 58 | 59 | await exec.exec(`"${pythonPath}"`, ['main.py']); 60 | ``` 61 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.d.ts: -------------------------------------------------------------------------------- 1 | import * as im from './interfaces'; 2 | /** 3 | * Exec a command. 4 | * Output will be streamed to the live console. 5 | * Returns promise with return code 6 | * 7 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 8 | * @param args optional arguments for tool. Escaping is handled by the lib. 9 | * @param options optional exec options. See ExecOptions 10 | * @returns Promise exit code 11 | */ 12 | export declare function exec(commandLine: string, args?: string[], options?: im.ExecOptions): Promise; 13 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"exec.js","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,mCAAkC;AAElC;;;;;;;;;GASG;AACH,SAAsB,IAAI,CACxB,WAAmB,EACnB,IAAe,EACf,OAAwB;;QAExB,MAAM,WAAW,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAA;QACpD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;SACpE;QACD,8CAA8C;QAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;QAC/B,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAkB,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACxE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAA;IACtB,CAAC;CAAA;AAdD,oBAcC"} -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as stream from 'stream'; 3 | /** 4 | * Interface for exec options 5 | */ 6 | export interface ExecOptions { 7 | /** optional working directory. defaults to current */ 8 | cwd?: string; 9 | /** optional envvar dictionary. defaults to current process's env */ 10 | env?: { 11 | [key: string]: string; 12 | }; 13 | /** optional. defaults to false */ 14 | silent?: boolean; 15 | /** optional out stream to use. Defaults to process.stdout */ 16 | outStream?: stream.Writable; 17 | /** optional err stream to use. Defaults to process.stderr */ 18 | errStream?: stream.Writable; 19 | /** optional. whether to skip quoting/escaping arguments if needed. defaults to false. */ 20 | windowsVerbatimArguments?: boolean; 21 | /** optional. whether to fail if output to stderr. defaults to false */ 22 | failOnStdErr?: boolean; 23 | /** optional. defaults to failing on non zero. ignore will not fail leaving it up to the caller */ 24 | ignoreReturnCode?: boolean; 25 | /** optional. How long in ms to wait for STDIO streams to close after the exit event of the process before terminating. defaults to 10000 */ 26 | delay?: number; 27 | /** optional. Listeners for output. Callback functions that will be called on these events */ 28 | listeners?: { 29 | stdout?: (data: Buffer) => void; 30 | stderr?: (data: Buffer) => void; 31 | stdline?: (data: string) => void; 32 | errline?: (data: string) => void; 33 | debug?: (data: string) => void; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | //# sourceMappingURL=interfaces.js.map -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/interfaces.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/toolrunner.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as events from 'events'; 3 | import * as im from './interfaces'; 4 | export declare class ToolRunner extends events.EventEmitter { 5 | constructor(toolPath: string, args?: string[], options?: im.ExecOptions); 6 | private toolPath; 7 | private args; 8 | private options; 9 | private _debug; 10 | private _getCommandString; 11 | private _processLineBuffer; 12 | private _getSpawnFileName; 13 | private _getSpawnArgs; 14 | private _endsWith; 15 | private _isCmdFile; 16 | private _windowsQuoteCmdArg; 17 | private _uvQuoteCmdArg; 18 | private _cloneExecOptions; 19 | private _getSpawnOptions; 20 | /** 21 | * Exec a tool. 22 | * Output will be streamed to the live console. 23 | * Returns promise with return code 24 | * 25 | * @param tool path to tool to exec 26 | * @param options optional exec options. See ExecOptions 27 | * @returns number 28 | */ 29 | exec(): Promise; 30 | } 31 | /** 32 | * Convert an arg string to an array of args. Handles escaping 33 | * 34 | * @param argString string of arguments 35 | * @returns string[] array of arguments 36 | */ 37 | export declare function argStringToArray(argString: string): string[]; 38 | -------------------------------------------------------------------------------- /node_modules/@actions/github/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2019 GitHub 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/@actions/github/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/github` 2 | 3 | > A hydrated Octokit client. 4 | 5 | ## Usage 6 | 7 | Returns an Octokit client. See https://octokit.github.io/rest.js for the API. 8 | 9 | ```js 10 | const github = require('@actions/github'); 11 | const core = require('@actions/core'); 12 | 13 | // This should be a token with access to your repository scoped in as a secret. 14 | const myToken = core.getInput('myToken'); 15 | 16 | const octokit = new github.GitHub(myToken); 17 | 18 | const { data: pullRequest } = await octokit.pulls.get({ 19 | owner: 'octokit', 20 | repo: 'rest.js', 21 | pull_number: 123, 22 | mediaType: { 23 | format: 'diff' 24 | } 25 | }); 26 | 27 | console.log(pullRequest); 28 | ``` 29 | 30 | You can pass client options (except `auth`, which is handled by the token argument), as specified by [Octokit](https://octokit.github.io/rest.js/), as a second argument to the `GitHub` constructor. 31 | 32 | You can also make GraphQL requests. See https://github.com/octokit/graphql.js for the API. 33 | 34 | ```js 35 | const result = await octokit.graphql(query, variables); 36 | ``` 37 | 38 | Finally, you can get the context of the current action: 39 | 40 | ```js 41 | const github = require('@actions/github'); 42 | 43 | const context = github.context; 44 | 45 | const newIssue = await octokit.issues.create({ 46 | ...context.repo, 47 | title: 'New issue!', 48 | body: 'Hello Universe!' 49 | }); 50 | ``` 51 | -------------------------------------------------------------------------------- /node_modules/@actions/github/lib/context.d.ts: -------------------------------------------------------------------------------- 1 | import { WebhookPayload } from './interfaces'; 2 | export declare class Context { 3 | /** 4 | * Webhook payload object that triggered the workflow 5 | */ 6 | payload: WebhookPayload; 7 | eventName: string; 8 | sha: string; 9 | ref: string; 10 | workflow: string; 11 | action: string; 12 | actor: string; 13 | /** 14 | * Hydrate the context from the environment 15 | */ 16 | constructor(); 17 | readonly issue: { 18 | owner: string; 19 | repo: string; 20 | number: number; 21 | }; 22 | readonly repo: { 23 | owner: string; 24 | repo: string; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/@actions/github/lib/context.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;AAEA,2BAA2C;AAC3C,2BAAsB;AAEtB,MAAa,OAAO;IAalB;;OAEG;IACH;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,IAAI,eAAU,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CACvB,iBAAY,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC,CAChE,CAAA;aACF;iBAAM;gBACL,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,qBACE,OAAO,CAAC,GAAG,CAAC,iBACd,kBAAkB,QAAG,EAAE,CACxB,CAAA;aACF;SACF;QACD,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,iBAA2B,CAAA;QACxD,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAyB,CAAA;QACrD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAuB,CAAA;QACjD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,YAAsB,CAAA;IACjD,CAAC;IAED,IAAI,KAAK;QACP,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAE5B,uCACK,IAAI,CAAC,IAAI,KACZ,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,CAAC,MAAM,IACjE;IACH,CAAC;IAED,IAAI,IAAI;QACN,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAC9D,OAAO,EAAC,KAAK,EAAE,IAAI,EAAC,CAAA;SACrB;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC3B,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK;gBAC1C,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI;aACnC,CAAA;SACF;QAED,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAA;IACH,CAAC;CACF;AAjED,0BAiEC"} -------------------------------------------------------------------------------- /node_modules/@actions/github/lib/github.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQlQueryResponse, Variables } from '@octokit/graphql'; 2 | import Octokit from '@octokit/rest'; 3 | import * as Context from './context'; 4 | export declare const context: Context.Context; 5 | export declare class GitHub extends Octokit { 6 | graphql: (query: string, variables?: Variables) => Promise; 7 | constructor(token: string, opts?: Omit); 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/@actions/github/lib/github.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | var __importStar = (this && this.__importStar) || function (mod) { 6 | if (mod && mod.__esModule) return mod; 7 | var result = {}; 8 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; 9 | result["default"] = mod; 10 | return result; 11 | }; 12 | Object.defineProperty(exports, "__esModule", { value: true }); 13 | // Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/github.ts 14 | const graphql_1 = require("@octokit/graphql"); 15 | const rest_1 = __importDefault(require("@octokit/rest")); 16 | const Context = __importStar(require("./context")); 17 | // We need this in order to extend Octokit 18 | rest_1.default.prototype = new rest_1.default(); 19 | exports.context = new Context.Context(); 20 | class GitHub extends rest_1.default { 21 | constructor(token, opts = {}) { 22 | super(Object.assign(Object.assign({}, opts), { auth: `token ${token}` })); 23 | this.graphql = graphql_1.defaults({ 24 | headers: { authorization: `token ${token}` } 25 | }); 26 | } 27 | } 28 | exports.GitHub = GitHub; 29 | //# sourceMappingURL=github.js.map -------------------------------------------------------------------------------- /node_modules/@actions/github/lib/github.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gGAAgG;AAChG,8CAA0E;AAC1E,yDAAmC;AACnC,mDAAoC;AAEpC,0CAA0C;AAC1C,cAAO,CAAC,SAAS,GAAG,IAAI,cAAO,EAAE,CAAA;AAEpB,QAAA,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;AAE5C,MAAa,MAAO,SAAQ,cAAO;IAMjC,YAAY,KAAa,EAAE,OAAsC,EAAE;QACjE,KAAK,iCAAK,IAAI,KAAE,IAAI,EAAE,SAAS,KAAK,EAAE,IAAE,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,kBAAQ,CAAC;YACtB,OAAO,EAAE,EAAC,aAAa,EAAE,SAAS,KAAK,EAAE,EAAC;SAC3C,CAAC,CAAA;IACJ,CAAC;CACF;AAZD,wBAYC"} -------------------------------------------------------------------------------- /node_modules/@actions/github/lib/interfaces.d.ts: -------------------------------------------------------------------------------- 1 | export interface PayloadRepository { 2 | [key: string]: any; 3 | full_name?: string; 4 | name: string; 5 | owner: { 6 | [key: string]: any; 7 | login: string; 8 | name?: string; 9 | }; 10 | html_url?: string; 11 | } 12 | export interface WebhookPayload { 13 | [key: string]: any; 14 | repository?: PayloadRepository; 15 | issue?: { 16 | [key: string]: any; 17 | number: number; 18 | html_url?: string; 19 | body?: string; 20 | }; 21 | pull_request?: { 22 | [key: string]: any; 23 | number: number; 24 | html_url?: string; 25 | body?: string; 26 | }; 27 | sender?: { 28 | [key: string]: any; 29 | type: string; 30 | }; 31 | action?: string; 32 | installation?: { 33 | id: number; 34 | [key: string]: any; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/@actions/github/lib/interfaces.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* eslint-disable @typescript-eslint/no-explicit-any */ 3 | Object.defineProperty(exports, "__esModule", { value: true }); 4 | //# sourceMappingURL=interfaces.js.map -------------------------------------------------------------------------------- /node_modules/@actions/github/lib/interfaces.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA,uDAAuD"} -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2018 Octokit contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/defaults.js: -------------------------------------------------------------------------------- 1 | import { getUserAgent } from "universal-user-agent"; 2 | import { VERSION } from "./version"; 3 | const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; 4 | export const DEFAULTS = { 5 | method: "GET", 6 | baseUrl: "https://api.github.com", 7 | headers: { 8 | accept: "application/vnd.github.v3+json", 9 | "user-agent": userAgent 10 | }, 11 | mediaType: { 12 | format: "", 13 | previews: [] 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js: -------------------------------------------------------------------------------- 1 | import { merge } from "./merge"; 2 | import { parse } from "./parse"; 3 | export function endpointWithDefaults(defaults, route, options) { 4 | return parse(merge(defaults, route, options)); 5 | } 6 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/generated/routes.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitesource/GitHubPackagesSecurityAction/71f6f4fc1b85615df665c24400572964e2c4cc4f/node_modules/@octokit/endpoint/dist-src/generated/routes.js -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/index.js: -------------------------------------------------------------------------------- 1 | import { withDefaults } from "./with-defaults"; 2 | import { DEFAULTS } from "./defaults"; 3 | export const endpoint = withDefaults(null, DEFAULTS); 4 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/merge.js: -------------------------------------------------------------------------------- 1 | import { lowercaseKeys } from "./util/lowercase-keys"; 2 | import { mergeDeep } from "./util/merge-deep"; 3 | export function merge(defaults, route, options) { 4 | if (typeof route === "string") { 5 | let [method, url] = route.split(" "); 6 | options = Object.assign(url ? { method, url } : { url: method }, options); 7 | } 8 | else { 9 | options = Object.assign({}, route); 10 | } 11 | // lowercase header names before merging with defaults to avoid duplicates 12 | options.headers = lowercaseKeys(options.headers); 13 | const mergedOptions = mergeDeep(defaults || {}, options); 14 | // mediaType.previews arrays are merged, instead of overwritten 15 | if (defaults && defaults.mediaType.previews.length) { 16 | mergedOptions.mediaType.previews = defaults.mediaType.previews 17 | .filter(preview => !mergedOptions.mediaType.previews.includes(preview)) 18 | .concat(mergedOptions.mediaType.previews); 19 | } 20 | mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); 21 | return mergedOptions; 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/types.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitesource/GitHubPackagesSecurityAction/71f6f4fc1b85615df665c24400572964e2c4cc4f/node_modules/@octokit/endpoint/dist-src/types.js -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js: -------------------------------------------------------------------------------- 1 | export function addQueryParameters(url, parameters) { 2 | const separator = /\?/.test(url) ? "&" : "?"; 3 | const names = Object.keys(parameters); 4 | if (names.length === 0) { 5 | return url; 6 | } 7 | return (url + 8 | separator + 9 | names 10 | .map(name => { 11 | if (name === "q") { 12 | return ("q=" + 13 | parameters 14 | .q.split("+") 15 | .map(encodeURIComponent) 16 | .join("+")); 17 | } 18 | return `${name}=${encodeURIComponent(parameters[name])}`; 19 | }) 20 | .join("&")); 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js: -------------------------------------------------------------------------------- 1 | const urlVariableRegex = /\{[^}]+\}/g; 2 | function removeNonChars(variableName) { 3 | return variableName.replace(/^\W+|\W+$/g, "").split(/,/); 4 | } 5 | export function extractUrlVariableNames(url) { 6 | const matches = url.match(urlVariableRegex); 7 | if (!matches) { 8 | return []; 9 | } 10 | return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); 11 | } 12 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js: -------------------------------------------------------------------------------- 1 | export function lowercaseKeys(object) { 2 | if (!object) { 3 | return {}; 4 | } 5 | return Object.keys(object).reduce((newObj, key) => { 6 | newObj[key.toLowerCase()] = object[key]; 7 | return newObj; 8 | }, {}); 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/util/merge-deep.js: -------------------------------------------------------------------------------- 1 | import isPlainObject from "is-plain-object"; 2 | export function mergeDeep(defaults, options) { 3 | const result = Object.assign({}, defaults); 4 | Object.keys(options).forEach(key => { 5 | if (isPlainObject(options[key])) { 6 | if (!(key in defaults)) 7 | Object.assign(result, { [key]: options[key] }); 8 | else 9 | result[key] = mergeDeep(defaults[key], options[key]); 10 | } 11 | else { 12 | Object.assign(result, { [key]: options[key] }); 13 | } 14 | }); 15 | return result; 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/util/omit.js: -------------------------------------------------------------------------------- 1 | export function omit(object, keysToOmit) { 2 | return Object.keys(object) 3 | .filter(option => !keysToOmit.includes(option)) 4 | .reduce((obj, key) => { 5 | obj[key] = object[key]; 6 | return obj; 7 | }, {}); 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/version.js: -------------------------------------------------------------------------------- 1 | export const VERSION = "0.0.0-development"; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-src/with-defaults.js: -------------------------------------------------------------------------------- 1 | import { endpointWithDefaults } from "./endpoint-with-defaults"; 2 | import { merge } from "./merge"; 3 | import { parse } from "./parse"; 4 | export function withDefaults(oldDefaults, newDefaults) { 5 | const DEFAULTS = merge(oldDefaults, newDefaults); 6 | const endpoint = endpointWithDefaults.bind(null, DEFAULTS); 7 | return Object.assign(endpoint, { 8 | DEFAULTS, 9 | defaults: withDefaults.bind(null, DEFAULTS), 10 | merge: merge.bind(null, DEFAULTS), 11 | parse 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/defaults.d.ts: -------------------------------------------------------------------------------- 1 | import { Defaults } from "./types"; 2 | export declare const DEFAULTS: Defaults; 3 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts: -------------------------------------------------------------------------------- 1 | import { Defaults, Endpoint, RequestOptions, Route, Parameters } from "./types"; 2 | export declare function endpointWithDefaults(defaults: Defaults, route: Route | Endpoint, options?: Parameters): RequestOptions; 3 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/index.d.ts: -------------------------------------------------------------------------------- 1 | export declare const endpoint: import("./types").endpoint; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/merge.d.ts: -------------------------------------------------------------------------------- 1 | import { Defaults, Route, Parameters } from "./types"; 2 | export declare function merge(defaults: Defaults | null, route?: Route | Parameters, options?: Parameters): Defaults; 3 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/parse.d.ts: -------------------------------------------------------------------------------- 1 | import { Defaults, RequestOptions } from "./types"; 2 | export declare function parse(options: Defaults): RequestOptions; 3 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts: -------------------------------------------------------------------------------- 1 | export declare function addQueryParameters(url: string, parameters: { 2 | [x: string]: string | undefined; 3 | q?: string; 4 | }): string; 5 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts: -------------------------------------------------------------------------------- 1 | export declare function extractUrlVariableNames(url: string): string[]; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts: -------------------------------------------------------------------------------- 1 | export declare function lowercaseKeys(object?: { 2 | [key: string]: any; 3 | }): { 4 | [key: string]: any; 5 | }; 6 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts: -------------------------------------------------------------------------------- 1 | export declare function mergeDeep(defaults: any, options: any): object; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/util/omit.d.ts: -------------------------------------------------------------------------------- 1 | export declare function omit(object: { 2 | [key: string]: any; 3 | }, keysToOmit: string[]): { 4 | [key: string]: any; 5 | }; 6 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts: -------------------------------------------------------------------------------- 1 | export declare function parseUrl(template: string): { 2 | expand: (context: object) => string; 3 | }; 4 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/version.d.ts: -------------------------------------------------------------------------------- 1 | export declare const VERSION = "0.0.0-development"; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts: -------------------------------------------------------------------------------- 1 | import { Defaults, endpoint, Parameters } from "./types"; 2 | export declare function withDefaults(oldDefaults: Defaults | null, newDefaults: Parameters): endpoint; 3 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/LICENSE.md: -------------------------------------------------------------------------------- 1 | # [ISC License](https://spdx.org/licenses/ISC) 2 | 3 | Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 8 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/README.md: -------------------------------------------------------------------------------- 1 | # universal-user-agent 2 | 3 | > Get a user agent string in both browser and node 4 | 5 | [![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) 6 | [![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) 7 | [![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) 8 | 9 | ```js 10 | const { getUserAgent } = require("universal-user-agent"); 11 | // or import { getUserAgent } from "universal-user-agent"; 12 | 13 | const userAgent = getUserAgent(); 14 | // userAgent will look like this 15 | // in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" 16 | // in node: Node.js/v8.9.4 (macOS High Sierra; x64) 17 | ``` 18 | 19 | ## Credits 20 | 21 | The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). 22 | 23 | ## License 24 | 25 | [ISC](LICENSE.md) 26 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, '__esModule', { value: true }); 4 | 5 | function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } 6 | 7 | var osName = _interopDefault(require('os-name')); 8 | 9 | function getUserAgent() { 10 | try { 11 | return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; 12 | } catch (error) { 13 | if (/wmic os get Caption/.test(error.message)) { 14 | return "Windows "; 15 | } 16 | 17 | throw error; 18 | } 19 | } 20 | 21 | exports.getUserAgent = getUserAgent; 22 | //# sourceMappingURL=index.js.map 23 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-node/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sources":["../dist-src/node.js"],"sourcesContent":["import osName from \"os-name\";\nexport function getUserAgent() {\n try {\n return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;\n }\n catch (error) {\n if (/wmic os get Caption/.test(error.message)) {\n return \"Windows \";\n }\n throw error;\n }\n}\n"],"names":["getUserAgent","process","version","substr","osName","arch","error","test","message"],"mappings":";;;;;;;;AACO,SAASA,YAAT,GAAwB;MACvB;WACQ,WAAUC,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIC,MAAM,EAAG,KAAIH,OAAO,CAACI,IAAK,GAA1E;GADJ,CAGA,OAAOC,KAAP,EAAc;QACN,sBAAsBC,IAAtB,CAA2BD,KAAK,CAACE,OAAjC,CAAJ,EAA+C;aACpC,gCAAP;;;UAEEF,KAAN;;;;;;"} -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/browser.js: -------------------------------------------------------------------------------- 1 | export function getUserAgent() { 2 | return navigator.userAgent; 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/index.js: -------------------------------------------------------------------------------- 1 | export { getUserAgent } from "./node"; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-src/node.js: -------------------------------------------------------------------------------- 1 | import osName from "os-name"; 2 | export function getUserAgent() { 3 | try { 4 | return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; 5 | } 6 | catch (error) { 7 | if (/wmic os get Caption/.test(error.message)) { 8 | return "Windows "; 9 | } 10 | throw error; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/browser.d.ts: -------------------------------------------------------------------------------- 1 | export declare function getUserAgent(): string; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/index.d.ts: -------------------------------------------------------------------------------- 1 | export { getUserAgent } from "./node"; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-types/node.d.ts: -------------------------------------------------------------------------------- 1 | export declare function getUserAgent(): string; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js: -------------------------------------------------------------------------------- 1 | function getUserAgent() { 2 | return navigator.userAgent; 3 | } 4 | 5 | export { getUserAgent }; 6 | //# sourceMappingURL=index.js.map 7 | -------------------------------------------------------------------------------- /node_modules/@octokit/endpoint/node_modules/universal-user-agent/dist-web/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sources":["../dist-src/browser.js"],"sourcesContent":["export function getUserAgent() {\n return navigator.userAgent;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;IAC3B,OAAO,SAAS,CAAC,SAAS,CAAC;CAC9B;;;;"} -------------------------------------------------------------------------------- /node_modules/@octokit/graphql/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2018 Octokit contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/@octokit/graphql/index.js: -------------------------------------------------------------------------------- 1 | const { request } = require('@octokit/request') 2 | const getUserAgent = require('universal-user-agent') 3 | 4 | const version = require('./package.json').version 5 | const userAgent = `octokit-graphql.js/${version} ${getUserAgent()}` 6 | 7 | const withDefaults = require('./lib/with-defaults') 8 | 9 | module.exports = withDefaults(request, { 10 | method: 'POST', 11 | url: '/graphql', 12 | headers: { 13 | 'user-agent': userAgent 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /node_modules/@octokit/graphql/lib/error.js: -------------------------------------------------------------------------------- 1 | module.exports = class GraphqlError extends Error { 2 | constructor (request, response) { 3 | const message = response.data.errors[0].message 4 | super(message) 5 | 6 | Object.assign(this, response.data) 7 | this.name = 'GraphqlError' 8 | this.request = request 9 | 10 | // Maintains proper stack trace (only available on V8) 11 | /* istanbul ignore next */ 12 | if (Error.captureStackTrace) { 13 | Error.captureStackTrace(this, this.constructor) 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/@octokit/graphql/lib/graphql.js: -------------------------------------------------------------------------------- 1 | module.exports = graphql 2 | 3 | const GraphqlError = require('./error') 4 | 5 | const NON_VARIABLE_OPTIONS = ['method', 'baseUrl', 'url', 'headers', 'request', 'query'] 6 | 7 | function graphql (request, query, options) { 8 | if (typeof query === 'string') { 9 | options = Object.assign({ query }, options) 10 | } else { 11 | options = query 12 | } 13 | 14 | const requestOptions = Object.keys(options).reduce((result, key) => { 15 | if (NON_VARIABLE_OPTIONS.includes(key)) { 16 | result[key] = options[key] 17 | return result 18 | } 19 | 20 | if (!result.variables) { 21 | result.variables = {} 22 | } 23 | 24 | result.variables[key] = options[key] 25 | return result 26 | }, {}) 27 | 28 | return request(requestOptions) 29 | .then(response => { 30 | if (response.data.errors) { 31 | throw new GraphqlError(requestOptions, response) 32 | } 33 | 34 | return response.data.data 35 | }) 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/@octokit/graphql/lib/with-defaults.js: -------------------------------------------------------------------------------- 1 | module.exports = withDefaults 2 | 3 | const graphql = require('./graphql') 4 | 5 | function withDefaults (request, newDefaults) { 6 | const newRequest = request.defaults(newDefaults) 7 | const newApi = function (query, options) { 8 | return graphql(newRequest, query, options) 9 | } 10 | 11 | newApi.defaults = withDefaults.bind(null, newRequest) 12 | return newApi 13 | } 14 | -------------------------------------------------------------------------------- /node_modules/@octokit/request-error/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2019 Octokit contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/@octokit/request-error/dist-src/types.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitesource/GitHubPackagesSecurityAction/71f6f4fc1b85615df665c24400572964e2c4cc4f/node_modules/@octokit/request-error/dist-src/types.js -------------------------------------------------------------------------------- /node_modules/@octokit/request-error/dist-types/index.d.ts: -------------------------------------------------------------------------------- 1 | import { RequestOptions, ResponseHeaders, RequestErrorOptions } from "./types"; 2 | /** 3 | * Error with extra properties to help with debugging 4 | */ 5 | export declare class RequestError extends Error { 6 | name: "HttpError"; 7 | /** 8 | * http status code 9 | */ 10 | status: number; 11 | /** 12 | * http status code 13 | * 14 | * @deprecated `error.code` is deprecated in favor of `error.status` 15 | */ 16 | code: number; 17 | /** 18 | * error response headers 19 | */ 20 | headers: ResponseHeaders; 21 | /** 22 | * Request options that lead to the error. 23 | */ 24 | request: RequestOptions; 25 | constructor(message: string, statusCode: number, options: RequestErrorOptions); 26 | } 27 | -------------------------------------------------------------------------------- /node_modules/@octokit/request-error/dist-types/types.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Relative or absolute URL. Examples: `'/orgs/:org'`, `https://example.com/foo/bar` 3 | */ 4 | export declare type Url = string; 5 | /** 6 | * Request method 7 | */ 8 | export declare type Method = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; 9 | export declare type RequestHeaders = { 10 | /** 11 | * Used for API previews and custom formats 12 | */ 13 | accept?: string; 14 | /** 15 | * Redacted authorization header 16 | */ 17 | authorization?: string; 18 | "user-agent"?: string; 19 | [header: string]: string | number | undefined; 20 | }; 21 | export declare type ResponseHeaders = { 22 | [header: string]: string; 23 | }; 24 | export declare type EndpointRequestOptions = { 25 | [option: string]: any; 26 | }; 27 | export declare type RequestOptions = { 28 | method: Method; 29 | url: Url; 30 | headers: RequestHeaders; 31 | body?: any; 32 | request?: EndpointRequestOptions; 33 | }; 34 | export declare type RequestErrorOptions = { 35 | headers: ResponseHeaders; 36 | request: RequestOptions; 37 | }; 38 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2018 Octokit contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/dist-src/get-buffer-response.js: -------------------------------------------------------------------------------- 1 | export default function getBufferResponse(response) { 2 | return response.arrayBuffer(); 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/dist-src/index.js: -------------------------------------------------------------------------------- 1 | import { endpoint } from "@octokit/endpoint"; 2 | import { getUserAgent } from "universal-user-agent"; 3 | import { VERSION } from "./version"; 4 | import withDefaults from "./with-defaults"; 5 | export const request = withDefaults(endpoint, { 6 | headers: { 7 | "user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}` 8 | } 9 | }); 10 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/dist-src/types.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/whitesource/GitHubPackagesSecurityAction/71f6f4fc1b85615df665c24400572964e2c4cc4f/node_modules/@octokit/request/dist-src/types.js -------------------------------------------------------------------------------- /node_modules/@octokit/request/dist-src/version.js: -------------------------------------------------------------------------------- 1 | export const VERSION = "0.0.0-development"; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/dist-src/with-defaults.js: -------------------------------------------------------------------------------- 1 | import fetchWrapper from "./fetch-wrapper"; 2 | export default function withDefaults(oldEndpoint, newDefaults) { 3 | const endpoint = oldEndpoint.defaults(newDefaults); 4 | const newApi = function (route, parameters) { 5 | const endpointOptions = endpoint.merge(route, parameters); 6 | if (!endpointOptions.request || !endpointOptions.request.hook) { 7 | return fetchWrapper(endpoint.parse(endpointOptions)); 8 | } 9 | const request = (route, parameters) => { 10 | return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); 11 | }; 12 | Object.assign(request, { 13 | endpoint, 14 | defaults: withDefaults.bind(null, endpoint) 15 | }); 16 | return endpointOptions.request.hook(request, endpointOptions); 17 | }; 18 | return Object.assign(newApi, { 19 | endpoint, 20 | defaults: withDefaults.bind(null, endpoint) 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts: -------------------------------------------------------------------------------- 1 | import { endpoint } from "./types"; 2 | export default function fetchWrapper(requestOptions: ReturnType & { 3 | redirect?: string; 4 | }): Promise<{ 5 | status: number; 6 | url: string; 7 | headers: { 8 | [header: string]: string; 9 | }; 10 | data: any; 11 | }>; 12 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/dist-types/get-buffer-response.d.ts: -------------------------------------------------------------------------------- 1 | import { Response } from "node-fetch"; 2 | export default function getBufferResponse(response: Response): Promise; 3 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/dist-types/index.d.ts: -------------------------------------------------------------------------------- 1 | export declare const request: import("./types").request; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/dist-types/version.d.ts: -------------------------------------------------------------------------------- 1 | export declare const VERSION = "0.0.0-development"; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/dist-types/with-defaults.d.ts: -------------------------------------------------------------------------------- 1 | import { request, endpoint, Parameters } from "./types"; 2 | export default function withDefaults(oldEndpoint: endpoint, newDefaults: Parameters): request; 3 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/LICENSE.md: -------------------------------------------------------------------------------- 1 | # [ISC License](https://spdx.org/licenses/ISC) 2 | 3 | Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 8 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/README.md: -------------------------------------------------------------------------------- 1 | # universal-user-agent 2 | 3 | > Get a user agent string in both browser and node 4 | 5 | [![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) 6 | [![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) 7 | [![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) 8 | 9 | ```js 10 | const { getUserAgent } = require("universal-user-agent"); 11 | // or import { getUserAgent } from "universal-user-agent"; 12 | 13 | const userAgent = getUserAgent(); 14 | // userAgent will look like this 15 | // in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" 16 | // in node: Node.js/v8.9.4 (macOS High Sierra; x64) 17 | ``` 18 | 19 | ## Credits 20 | 21 | The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). 22 | 23 | ## License 24 | 25 | [ISC](LICENSE.md) 26 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, '__esModule', { value: true }); 4 | 5 | function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } 6 | 7 | var osName = _interopDefault(require('os-name')); 8 | 9 | function getUserAgent() { 10 | try { 11 | return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; 12 | } catch (error) { 13 | if (/wmic os get Caption/.test(error.message)) { 14 | return "Windows "; 15 | } 16 | 17 | throw error; 18 | } 19 | } 20 | 21 | exports.getUserAgent = getUserAgent; 22 | //# sourceMappingURL=index.js.map 23 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/dist-node/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sources":["../dist-src/node.js"],"sourcesContent":["import osName from \"os-name\";\nexport function getUserAgent() {\n try {\n return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;\n }\n catch (error) {\n if (/wmic os get Caption/.test(error.message)) {\n return \"Windows \";\n }\n throw error;\n }\n}\n"],"names":["getUserAgent","process","version","substr","osName","arch","error","test","message"],"mappings":";;;;;;;;AACO,SAASA,YAAT,GAAwB;MACvB;WACQ,WAAUC,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIC,MAAM,EAAG,KAAIH,OAAO,CAACI,IAAK,GAA1E;GADJ,CAGA,OAAOC,KAAP,EAAc;QACN,sBAAsBC,IAAtB,CAA2BD,KAAK,CAACE,OAAjC,CAAJ,EAA+C;aACpC,gCAAP;;;UAEEF,KAAN;;;;;;"} -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/browser.js: -------------------------------------------------------------------------------- 1 | export function getUserAgent() { 2 | return navigator.userAgent; 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/index.js: -------------------------------------------------------------------------------- 1 | export { getUserAgent } from "./node"; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/dist-src/node.js: -------------------------------------------------------------------------------- 1 | import osName from "os-name"; 2 | export function getUserAgent() { 3 | try { 4 | return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; 5 | } 6 | catch (error) { 7 | if (/wmic os get Caption/.test(error.message)) { 8 | return "Windows "; 9 | } 10 | throw error; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/browser.d.ts: -------------------------------------------------------------------------------- 1 | export declare function getUserAgent(): string; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/index.d.ts: -------------------------------------------------------------------------------- 1 | export { getUserAgent } from "./node"; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/dist-types/node.d.ts: -------------------------------------------------------------------------------- 1 | export declare function getUserAgent(): string; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js: -------------------------------------------------------------------------------- 1 | function getUserAgent() { 2 | return navigator.userAgent; 3 | } 4 | 5 | export { getUserAgent }; 6 | //# sourceMappingURL=index.js.map 7 | -------------------------------------------------------------------------------- /node_modules/@octokit/request/node_modules/universal-user-agent/dist-web/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sources":["../dist-src/browser.js"],"sourcesContent":["export function getUserAgent() {\n return navigator.userAgent;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;IAC3B,OAAO,SAAS,CAAC,SAAS,CAAC;CAC9B;;;;"} -------------------------------------------------------------------------------- /node_modules/@octokit/rest/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer) 4 | Copyright (c) 2017-2018 Octokit contributors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/README.md: -------------------------------------------------------------------------------- 1 | # rest.js 2 | 3 | > GitHub REST API client for JavaScript 4 | 5 | [![@latest](https://img.shields.io/npm/v/@octokit/rest.svg)](https://www.npmjs.com/package/@octokit/rest) 6 | ![Build Status](https://github.com/octokit/rest.js/workflows/Test/badge.svg) 7 | [![Greenkeeper](https://badges.greenkeeper.io/octokit/rest.js.svg)](https://greenkeeper.io/) 8 | 9 | ## Installation 10 | 11 | ```shell 12 | npm install @octokit/rest 13 | ``` 14 | 15 | ## Usage 16 | 17 | ```js 18 | const Octokit = require("@octokit/rest"); 19 | const octokit = new Octokit(); 20 | 21 | // Compare: https://developer.github.com/v3/repos/#list-organization-repositories 22 | octokit.repos 23 | .listForOrg({ 24 | org: "octokit", 25 | type: "public" 26 | }) 27 | .then(({ data }) => { 28 | // handle data 29 | }); 30 | ``` 31 | 32 | See https://octokit.github.io/rest.js/ for full documentation. 33 | 34 | ## Contributing 35 | 36 | We would love you to contribute to `@octokit/rest`, pull requests are very welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information. 37 | 38 | ## Credits 39 | 40 | `@octokit/rest` was originally created as [`node-github`](https://www.npmjs.com/package/github) in 2012 by Mike de Boer from Cloud9 IDE, Inc. 41 | 42 | It was adopted and renamed by GitHub in 2017 43 | 44 | ## LICENSE 45 | 46 | [MIT](LICENSE) 47 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/index.js: -------------------------------------------------------------------------------- 1 | const Octokit = require("./lib/core"); 2 | 3 | const CORE_PLUGINS = [ 4 | require("./plugins/log"), 5 | require("./plugins/authentication-deprecated"), // deprecated: remove in v17 6 | require("./plugins/authentication"), 7 | require("./plugins/pagination"), 8 | require("./plugins/normalize-git-reference-responses"), 9 | require("./plugins/register-endpoints"), 10 | require("./plugins/rest-api-endpoints"), 11 | require("./plugins/validate"), 12 | 13 | require("octokit-pagination-methods") // deprecated: remove in v17 14 | ]; 15 | 16 | module.exports = Octokit.plugin(CORE_PLUGINS); 17 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/lib/constructor.js: -------------------------------------------------------------------------------- 1 | module.exports = Octokit; 2 | 3 | const { request } = require("@octokit/request"); 4 | const Hook = require("before-after-hook"); 5 | 6 | const parseClientOptions = require("./parse-client-options"); 7 | 8 | function Octokit(plugins, options) { 9 | options = options || {}; 10 | const hook = new Hook.Collection(); 11 | const log = Object.assign( 12 | { 13 | debug: () => {}, 14 | info: () => {}, 15 | warn: console.warn, 16 | error: console.error 17 | }, 18 | options && options.log 19 | ); 20 | const api = { 21 | hook, 22 | log, 23 | request: request.defaults(parseClientOptions(options, log, hook)) 24 | }; 25 | 26 | plugins.forEach(pluginFunction => pluginFunction(api, options)); 27 | 28 | return api; 29 | } 30 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/lib/core.js: -------------------------------------------------------------------------------- 1 | const factory = require("./factory"); 2 | 3 | module.exports = factory(); 4 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/lib/factory.js: -------------------------------------------------------------------------------- 1 | module.exports = factory; 2 | 3 | const Octokit = require("./constructor"); 4 | const registerPlugin = require("./register-plugin"); 5 | 6 | function factory(plugins) { 7 | const Api = Octokit.bind(null, plugins || []); 8 | Api.plugin = registerPlugin.bind(null, plugins || []); 9 | return Api; 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/lib/register-plugin.js: -------------------------------------------------------------------------------- 1 | module.exports = registerPlugin; 2 | 3 | const factory = require("./factory"); 4 | 5 | function registerPlugin(plugins, pluginFunction) { 6 | return factory( 7 | plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction) 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/LICENSE.md: -------------------------------------------------------------------------------- 1 | # [ISC License](https://spdx.org/licenses/ISC) 2 | 3 | Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 8 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/README.md: -------------------------------------------------------------------------------- 1 | # universal-user-agent 2 | 3 | > Get a user agent string in both browser and node 4 | 5 | [![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) 6 | [![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) 7 | [![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) 8 | 9 | ```js 10 | const { getUserAgent } = require("universal-user-agent"); 11 | // or import { getUserAgent } from "universal-user-agent"; 12 | 13 | const userAgent = getUserAgent(); 14 | // userAgent will look like this 15 | // in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" 16 | // in node: Node.js/v8.9.4 (macOS High Sierra; x64) 17 | ``` 18 | 19 | ## Credits 20 | 21 | The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). 22 | 23 | ## License 24 | 25 | [ISC](LICENSE.md) 26 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, '__esModule', { value: true }); 4 | 5 | function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } 6 | 7 | var osName = _interopDefault(require('os-name')); 8 | 9 | function getUserAgent() { 10 | try { 11 | return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; 12 | } catch (error) { 13 | if (/wmic os get Caption/.test(error.message)) { 14 | return "Windows "; 15 | } 16 | 17 | throw error; 18 | } 19 | } 20 | 21 | exports.getUserAgent = getUserAgent; 22 | //# sourceMappingURL=index.js.map 23 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/dist-node/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sources":["../dist-src/node.js"],"sourcesContent":["import osName from \"os-name\";\nexport function getUserAgent() {\n try {\n return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;\n }\n catch (error) {\n if (/wmic os get Caption/.test(error.message)) {\n return \"Windows \";\n }\n throw error;\n }\n}\n"],"names":["getUserAgent","process","version","substr","osName","arch","error","test","message"],"mappings":";;;;;;;;AACO,SAASA,YAAT,GAAwB;MACvB;WACQ,WAAUC,OAAO,CAACC,OAAR,CAAgBC,MAAhB,CAAuB,CAAvB,CAA0B,KAAIC,MAAM,EAAG,KAAIH,OAAO,CAACI,IAAK,GAA1E;GADJ,CAGA,OAAOC,KAAP,EAAc;QACN,sBAAsBC,IAAtB,CAA2BD,KAAK,CAACE,OAAjC,CAAJ,EAA+C;aACpC,gCAAP;;;UAEEF,KAAN;;;;;;"} -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/browser.js: -------------------------------------------------------------------------------- 1 | export function getUserAgent() { 2 | return navigator.userAgent; 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/index.js: -------------------------------------------------------------------------------- 1 | export { getUserAgent } from "./node"; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/dist-src/node.js: -------------------------------------------------------------------------------- 1 | import osName from "os-name"; 2 | export function getUserAgent() { 3 | try { 4 | return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`; 5 | } 6 | catch (error) { 7 | if (/wmic os get Caption/.test(error.message)) { 8 | return "Windows "; 9 | } 10 | throw error; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/browser.d.ts: -------------------------------------------------------------------------------- 1 | export declare function getUserAgent(): string; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/index.d.ts: -------------------------------------------------------------------------------- 1 | export { getUserAgent } from "./node"; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/dist-types/node.d.ts: -------------------------------------------------------------------------------- 1 | export declare function getUserAgent(): string; 2 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js: -------------------------------------------------------------------------------- 1 | function getUserAgent() { 2 | return navigator.userAgent; 3 | } 4 | 5 | export { getUserAgent }; 6 | //# sourceMappingURL=index.js.map 7 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/node_modules/universal-user-agent/dist-web/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sources":["../dist-src/browser.js"],"sourcesContent":["export function getUserAgent() {\n return navigator.userAgent;\n}\n"],"names":[],"mappings":"AAAO,SAAS,YAAY,GAAG;IAC3B,OAAO,SAAS,CAAC,SAAS,CAAC;CAC9B;;;;"} -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js: -------------------------------------------------------------------------------- 1 | module.exports = authenticate; 2 | 3 | const { Deprecation } = require("deprecation"); 4 | const once = require("once"); 5 | 6 | const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)); 7 | 8 | function authenticate(state, options) { 9 | deprecateAuthenticate( 10 | state.octokit.log, 11 | new Deprecation( 12 | '[@octokit/rest] octokit.authenticate() is deprecated. Use "auth" constructor option instead.' 13 | ) 14 | ); 15 | 16 | if (!options) { 17 | state.auth = false; 18 | return; 19 | } 20 | 21 | switch (options.type) { 22 | case "basic": 23 | if (!options.username || !options.password) { 24 | throw new Error( 25 | "Basic authentication requires both a username and password to be set" 26 | ); 27 | } 28 | break; 29 | 30 | case "oauth": 31 | if (!options.token && !(options.key && options.secret)) { 32 | throw new Error( 33 | "OAuth2 authentication requires a token or key & secret to be set" 34 | ); 35 | } 36 | break; 37 | 38 | case "token": 39 | case "app": 40 | if (!options.token) { 41 | throw new Error("Token authentication requires a token to be set"); 42 | } 43 | break; 44 | 45 | default: 46 | throw new Error( 47 | "Invalid authentication type, must be 'basic', 'oauth', 'token' or 'app'" 48 | ); 49 | } 50 | 51 | state.auth = options; 52 | } 53 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/authentication-deprecated/before-request.js: -------------------------------------------------------------------------------- 1 | module.exports = authenticationBeforeRequest; 2 | 3 | const btoa = require("btoa-lite"); 4 | const uniq = require("lodash.uniq"); 5 | 6 | function authenticationBeforeRequest(state, options) { 7 | if (!state.auth.type) { 8 | return; 9 | } 10 | 11 | if (state.auth.type === "basic") { 12 | const hash = btoa(`${state.auth.username}:${state.auth.password}`); 13 | options.headers.authorization = `Basic ${hash}`; 14 | return; 15 | } 16 | 17 | if (state.auth.type === "token") { 18 | options.headers.authorization = `token ${state.auth.token}`; 19 | return; 20 | } 21 | 22 | if (state.auth.type === "app") { 23 | options.headers.authorization = `Bearer ${state.auth.token}`; 24 | const acceptHeaders = options.headers.accept 25 | .split(",") 26 | .concat("application/vnd.github.machine-man-preview+json"); 27 | options.headers.accept = uniq(acceptHeaders) 28 | .filter(Boolean) 29 | .join(","); 30 | return; 31 | } 32 | 33 | options.url += options.url.indexOf("?") === -1 ? "?" : "&"; 34 | 35 | if (state.auth.token) { 36 | options.url += `access_token=${encodeURIComponent(state.auth.token)}`; 37 | return; 38 | } 39 | 40 | const key = encodeURIComponent(state.auth.key); 41 | const secret = encodeURIComponent(state.auth.secret); 42 | options.url += `client_id=${key}&client_secret=${secret}`; 43 | } 44 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/authentication-deprecated/index.js: -------------------------------------------------------------------------------- 1 | module.exports = authenticationPlugin; 2 | 3 | const { Deprecation } = require("deprecation"); 4 | const once = require("once"); 5 | 6 | const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation)); 7 | 8 | const authenticate = require("./authenticate"); 9 | const beforeRequest = require("./before-request"); 10 | const requestError = require("./request-error"); 11 | 12 | function authenticationPlugin(octokit, options) { 13 | if (options.auth) { 14 | octokit.authenticate = () => { 15 | deprecateAuthenticate( 16 | octokit.log, 17 | new Deprecation( 18 | '[@octokit/rest] octokit.authenticate() is deprecated and has no effect when "auth" option is set on Octokit constructor' 19 | ) 20 | ); 21 | }; 22 | return; 23 | } 24 | const state = { 25 | octokit, 26 | auth: false 27 | }; 28 | octokit.authenticate = authenticate.bind(null, state); 29 | octokit.hook.before("request", beforeRequest.bind(null, state)); 30 | octokit.hook.error("request", requestError.bind(null, state)); 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/authentication-deprecated/request-error.js: -------------------------------------------------------------------------------- 1 | module.exports = authenticationRequestError; 2 | 3 | const { RequestError } = require("@octokit/request-error"); 4 | 5 | function authenticationRequestError(state, error, options) { 6 | /* istanbul ignore next */ 7 | if (!error.headers) throw error; 8 | 9 | const otpRequired = /required/.test(error.headers["x-github-otp"] || ""); 10 | // handle "2FA required" error only 11 | if (error.status !== 401 || !otpRequired) { 12 | throw error; 13 | } 14 | 15 | if ( 16 | error.status === 401 && 17 | otpRequired && 18 | error.request && 19 | error.request.headers["x-github-otp"] 20 | ) { 21 | throw new RequestError( 22 | "Invalid one-time password for two-factor authentication", 23 | 401, 24 | { 25 | headers: error.headers, 26 | request: options 27 | } 28 | ); 29 | } 30 | 31 | if (typeof state.auth.on2fa !== "function") { 32 | throw new RequestError( 33 | "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication", 34 | 401, 35 | { 36 | headers: error.headers, 37 | request: options 38 | } 39 | ); 40 | } 41 | 42 | return Promise.resolve() 43 | .then(() => { 44 | return state.auth.on2fa(); 45 | }) 46 | .then(oneTimePassword => { 47 | const newOptions = Object.assign(options, { 48 | headers: Object.assign( 49 | { "x-github-otp": oneTimePassword }, 50 | options.headers 51 | ) 52 | }); 53 | return state.octokit.request(newOptions); 54 | }); 55 | } 56 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/authentication/index.js: -------------------------------------------------------------------------------- 1 | module.exports = authenticationPlugin; 2 | 3 | const beforeRequest = require("./before-request"); 4 | const requestError = require("./request-error"); 5 | const validate = require("./validate"); 6 | 7 | function authenticationPlugin(octokit, options) { 8 | if (!options.auth) { 9 | return; 10 | } 11 | 12 | validate(options.auth); 13 | 14 | const state = { 15 | octokit, 16 | auth: options.auth 17 | }; 18 | 19 | octokit.hook.before("request", beforeRequest.bind(null, state)); 20 | octokit.hook.error("request", requestError.bind(null, state)); 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/authentication/validate.js: -------------------------------------------------------------------------------- 1 | module.exports = validateAuth; 2 | 3 | function validateAuth(auth) { 4 | if (typeof auth === "string") { 5 | return; 6 | } 7 | 8 | if (typeof auth === "function") { 9 | return; 10 | } 11 | 12 | if (auth.username && auth.password) { 13 | return; 14 | } 15 | 16 | if (auth.clientId && auth.clientSecret) { 17 | return; 18 | } 19 | 20 | throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`); 21 | } 22 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/authentication/with-authorization-prefix.js: -------------------------------------------------------------------------------- 1 | module.exports = withAuthorizationPrefix; 2 | 3 | const atob = require("atob-lite"); 4 | 5 | const REGEX_IS_BASIC_AUTH = /^[\w-]+:/; 6 | 7 | function withAuthorizationPrefix(authorization) { 8 | if (/^(basic|bearer|token) /i.test(authorization)) { 9 | return authorization; 10 | } 11 | 12 | try { 13 | if (REGEX_IS_BASIC_AUTH.test(atob(authorization))) { 14 | return `basic ${authorization}`; 15 | } 16 | } catch (error) {} 17 | 18 | if (authorization.split(/\./).length === 3) { 19 | return `bearer ${authorization}`; 20 | } 21 | 22 | return `token ${authorization}`; 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/log/index.js: -------------------------------------------------------------------------------- 1 | module.exports = octokitDebug; 2 | 3 | function octokitDebug(octokit) { 4 | octokit.hook.wrap("request", (request, options) => { 5 | octokit.log.debug("request", options); 6 | const start = Date.now(); 7 | const requestOptions = octokit.request.endpoint.parse(options); 8 | const path = requestOptions.url.replace(options.baseUrl, ""); 9 | 10 | return request(options) 11 | .then(response => { 12 | octokit.log.info( 13 | `${requestOptions.method} ${path} - ${ 14 | response.status 15 | } in ${Date.now() - start}ms` 16 | ); 17 | return response; 18 | }) 19 | 20 | .catch(error => { 21 | octokit.log.info( 22 | `${requestOptions.method} ${path} - ${error.status} in ${Date.now() - 23 | start}ms` 24 | ); 25 | throw error; 26 | }); 27 | }); 28 | } 29 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/normalize-git-reference-responses/index.js: -------------------------------------------------------------------------------- 1 | module.exports = octokitRestNormalizeGitReferenceResponses; 2 | 3 | const { RequestError } = require("@octokit/request-error"); 4 | 5 | function octokitRestNormalizeGitReferenceResponses(octokit) { 6 | octokit.hook.wrap("request", (request, options) => { 7 | const isGetOrListRefRequest = /\/repos\/:?\w+\/:?\w+\/git\/refs\/:?\w+/.test( 8 | options.url 9 | ); 10 | 11 | if (!isGetOrListRefRequest) { 12 | return request(options); 13 | } 14 | 15 | const isGetRefRequest = "ref" in options; 16 | 17 | return request(options) 18 | .then(response => { 19 | // request single reference 20 | if (isGetRefRequest) { 21 | if (Array.isArray(response.data)) { 22 | throw new RequestError( 23 | `More than one reference found for "${options.ref}"`, 24 | 404, 25 | { 26 | request: options 27 | } 28 | ); 29 | } 30 | 31 | // ✅ received single reference 32 | return response; 33 | } 34 | 35 | // request list of references 36 | if (!Array.isArray(response.data)) { 37 | response.data = [response.data]; 38 | } 39 | 40 | return response; 41 | }) 42 | 43 | .catch(error => { 44 | if (isGetRefRequest) { 45 | throw error; 46 | } 47 | 48 | if (error.status === 404) { 49 | return { 50 | status: 200, 51 | headers: error.headers, 52 | data: [] 53 | }; 54 | } 55 | 56 | throw error; 57 | }); 58 | }); 59 | } 60 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/pagination/index.js: -------------------------------------------------------------------------------- 1 | module.exports = paginatePlugin; 2 | 3 | const iterator = require("./iterator"); 4 | const paginate = require("./paginate"); 5 | 6 | function paginatePlugin(octokit) { 7 | octokit.paginate = paginate.bind(null, octokit); 8 | octokit.paginate.iterator = iterator.bind(null, octokit); 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/pagination/iterator.js: -------------------------------------------------------------------------------- 1 | module.exports = iterator; 2 | 3 | const normalizePaginatedListResponse = require("./normalize-paginated-list-response"); 4 | 5 | function iterator(octokit, options) { 6 | const headers = options.headers; 7 | let url = octokit.request.endpoint(options).url; 8 | 9 | return { 10 | [Symbol.asyncIterator]: () => ({ 11 | next() { 12 | if (!url) { 13 | return Promise.resolve({ done: true }); 14 | } 15 | 16 | return octokit 17 | .request({ url, headers }) 18 | 19 | .then(response => { 20 | normalizePaginatedListResponse(octokit, url, response); 21 | 22 | // `response.headers.link` format: 23 | // '; rel="next", ; rel="last"' 24 | // sets `url` to undefined if "next" URL is not present or `link` header is not set 25 | url = ((response.headers.link || "").match( 26 | /<([^>]+)>;\s*rel="next"/ 27 | ) || [])[1]; 28 | 29 | return { value: response }; 30 | }); 31 | } 32 | }) 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/pagination/paginate.js: -------------------------------------------------------------------------------- 1 | module.exports = paginate; 2 | 3 | const iterator = require("./iterator"); 4 | 5 | function paginate(octokit, route, options, mapFn) { 6 | if (typeof options === "function") { 7 | mapFn = options; 8 | options = undefined; 9 | } 10 | options = octokit.request.endpoint.merge(route, options); 11 | return gather( 12 | octokit, 13 | [], 14 | iterator(octokit, options)[Symbol.asyncIterator](), 15 | mapFn 16 | ); 17 | } 18 | 19 | function gather(octokit, results, iterator, mapFn) { 20 | return iterator.next().then(result => { 21 | if (result.done) { 22 | return results; 23 | } 24 | 25 | let earlyExit = false; 26 | function done() { 27 | earlyExit = true; 28 | } 29 | 30 | results = results.concat( 31 | mapFn ? mapFn(result.value, done) : result.value.data 32 | ); 33 | 34 | if (earlyExit) { 35 | return results; 36 | } 37 | 38 | return gather(octokit, results, iterator, mapFn); 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/register-endpoints/index.js: -------------------------------------------------------------------------------- 1 | module.exports = octokitRegisterEndpoints; 2 | 3 | const registerEndpoints = require("./register-endpoints"); 4 | 5 | function octokitRegisterEndpoints(octokit) { 6 | octokit.registerEndpoints = registerEndpoints.bind(null, octokit); 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/rest-api-endpoints/index.js: -------------------------------------------------------------------------------- 1 | module.exports = octokitRestApiEndpoints; 2 | 3 | const ROUTES = require("./routes.json"); 4 | 5 | function octokitRestApiEndpoints(octokit) { 6 | // Aliasing scopes for backward compatibility 7 | // See https://github.com/octokit/rest.js/pull/1134 8 | ROUTES.gitdata = ROUTES.git; 9 | ROUTES.authorization = ROUTES.oauthAuthorizations; 10 | ROUTES.pullRequests = ROUTES.pulls; 11 | 12 | octokit.registerEndpoints(ROUTES); 13 | } 14 | -------------------------------------------------------------------------------- /node_modules/@octokit/rest/plugins/validate/index.js: -------------------------------------------------------------------------------- 1 | module.exports = octokitValidate; 2 | 3 | const validate = require("./validate"); 4 | 5 | function octokitValidate(octokit) { 6 | octokit.hook.before("request", validate.bind(null, octokit)); 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/atob-lite/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log 3 | .DS_Store 4 | bundle.js 5 | test 6 | test.js 7 | -------------------------------------------------------------------------------- /node_modules/atob-lite/LICENSE.md: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/atob-lite/README.md: -------------------------------------------------------------------------------- 1 | # atob-lite 2 | ![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat) 3 | ![](http://img.shields.io/npm/v/atob-lite.svg?style=flat) 4 | ![](http://img.shields.io/npm/dm/atob-lite.svg?style=flat) 5 | ![](http://img.shields.io/npm/l/atob-lite.svg?style=flat) 6 | 7 | Smallest/simplest possible means of using atob with both Node and browserify. 8 | 9 | In the browser, decoding base64 strings is done using: 10 | 11 | ``` javascript 12 | var decoded = atob(encoded) 13 | ``` 14 | 15 | However in Node, it's done like so: 16 | 17 | ``` javascript 18 | var decoded = new Buffer(encoded, 'base64').toString('utf8') 19 | ``` 20 | 21 | You can easily check if `Buffer` exists and switch between the approaches 22 | accordingly, but using `Buffer` anywhere in your browser source will pull 23 | in browserify's `Buffer` shim which is pretty hefty. This package uses 24 | the `main` and `browser` fields in its `package.json` to perform this 25 | check at build time and avoid pulling `Buffer` in unnecessarily. 26 | 27 | ## Usage 28 | 29 | [![NPM](https://nodei.co/npm/atob-lite.png)](https://nodei.co/npm/atob-lite/) 30 | 31 | ### `decoded = atob(encoded)` 32 | 33 | Returns the decoded value of a base64-encoded string. 34 | 35 | ## License 36 | 37 | MIT. See [LICENSE.md](http://github.com/hughsk/atob-lite/blob/master/LICENSE.md) for details. 38 | -------------------------------------------------------------------------------- /node_modules/atob-lite/atob-browser.js: -------------------------------------------------------------------------------- 1 | module.exports = function _atob(str) { 2 | return atob(str) 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/atob-lite/atob-node.js: -------------------------------------------------------------------------------- 1 | module.exports = function atob(str) { 2 | return Buffer.from(str, 'base64').toString('binary') 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/before-after-hook/lib/add.js: -------------------------------------------------------------------------------- 1 | module.exports = addHook 2 | 3 | function addHook (state, kind, name, hook) { 4 | var orig = hook 5 | if (!state.registry[name]) { 6 | state.registry[name] = [] 7 | } 8 | 9 | if (kind === 'before') { 10 | hook = function (method, options) { 11 | return Promise.resolve() 12 | .then(orig.bind(null, options)) 13 | .then(method.bind(null, options)) 14 | } 15 | } 16 | 17 | if (kind === 'after') { 18 | hook = function (method, options) { 19 | var result 20 | return Promise.resolve() 21 | .then(method.bind(null, options)) 22 | .then(function (result_) { 23 | result = result_ 24 | return orig(result, options) 25 | }) 26 | .then(function () { 27 | return result 28 | }) 29 | } 30 | } 31 | 32 | if (kind === 'error') { 33 | hook = function (method, options) { 34 | return Promise.resolve() 35 | .then(method.bind(null, options)) 36 | .catch(function (error) { 37 | return orig(error, options) 38 | }) 39 | } 40 | } 41 | 42 | state.registry[name].push({ 43 | hook: hook, 44 | orig: orig 45 | }) 46 | } 47 | -------------------------------------------------------------------------------- /node_modules/before-after-hook/lib/register.js: -------------------------------------------------------------------------------- 1 | module.exports = register 2 | 3 | function register (state, name, method, options) { 4 | if (typeof method !== 'function') { 5 | throw new Error('method for before hook must be a function') 6 | } 7 | 8 | if (!options) { 9 | options = {} 10 | } 11 | 12 | if (Array.isArray(name)) { 13 | return name.reverse().reduce(function (callback, name) { 14 | return register.bind(null, state, name, callback, options) 15 | }, method)() 16 | } 17 | 18 | return Promise.resolve() 19 | .then(function () { 20 | if (!state.registry[name]) { 21 | return method(options) 22 | } 23 | 24 | return (state.registry[name]).reduce(function (method, registered) { 25 | return registered.hook.bind(null, method, options) 26 | }, method)() 27 | }) 28 | } 29 | -------------------------------------------------------------------------------- /node_modules/before-after-hook/lib/remove.js: -------------------------------------------------------------------------------- 1 | module.exports = removeHook 2 | 3 | function removeHook (state, name, method) { 4 | if (!state.registry[name]) { 5 | return 6 | } 7 | 8 | var index = state.registry[name] 9 | .map(function (registered) { return registered.orig }) 10 | .indexOf(method) 11 | 12 | if (index === -1) { 13 | return 14 | } 15 | 16 | state.registry[name].splice(index, 1) 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/btoa-lite/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log 3 | .DS_Store 4 | bundle.js 5 | test 6 | test.js 7 | -------------------------------------------------------------------------------- /node_modules/btoa-lite/LICENSE.md: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/btoa-lite/README.md: -------------------------------------------------------------------------------- 1 | # btoa-lite 2 | ![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat) 3 | ![](http://img.shields.io/npm/v/btoa-lite.svg?style=flat) 4 | ![](http://img.shields.io/npm/dm/btoa-lite.svg?style=flat) 5 | ![](http://img.shields.io/npm/l/btoa-lite.svg?style=flat) 6 | 7 | Smallest/simplest possible means of using btoa with both Node and browserify. 8 | 9 | In the browser, encoding base64 strings is done using: 10 | 11 | ``` javascript 12 | var encoded = btoa(decoded) 13 | ``` 14 | 15 | However in Node, it's done like so: 16 | 17 | ``` javascript 18 | var encoded = new Buffer(decoded).toString('base64') 19 | ``` 20 | 21 | You can easily check if `Buffer` exists and switch between the approaches 22 | accordingly, but using `Buffer` anywhere in your browser source will pull 23 | in browserify's `Buffer` shim which is pretty hefty. This package uses 24 | the `main` and `browser` fields in its `package.json` to perform this 25 | check at build time and avoid pulling `Buffer` in unnecessarily. 26 | 27 | ## Usage 28 | 29 | [![NPM](https://nodei.co/npm/btoa-lite.png)](https://nodei.co/npm/btoa-lite/) 30 | 31 | ### `encoded = btoa(decoded)` 32 | 33 | Returns the base64-encoded value of a string. 34 | 35 | ## License 36 | 37 | MIT. See [LICENSE.md](http://github.com/hughsk/btoa-lite/blob/master/LICENSE.md) for details. 38 | -------------------------------------------------------------------------------- /node_modules/btoa-lite/btoa-browser.js: -------------------------------------------------------------------------------- 1 | module.exports = function _btoa(str) { 2 | return btoa(str) 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/btoa-lite/btoa-node.js: -------------------------------------------------------------------------------- 1 | module.exports = function btoa(str) { 2 | return new Buffer(str).toString('base64') 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/cross-spawn/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Made With MOXY Lda 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/cross-spawn/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const cp = require('child_process'); 4 | const parse = require('./lib/parse'); 5 | const enoent = require('./lib/enoent'); 6 | 7 | function spawn(command, args, options) { 8 | // Parse the arguments 9 | const parsed = parse(command, args, options); 10 | 11 | // Spawn the child process 12 | const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); 13 | 14 | // Hook into child process "exit" event to emit an error if the command 15 | // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 16 | enoent.hookChildProcess(spawned, parsed); 17 | 18 | return spawned; 19 | } 20 | 21 | function spawnSync(command, args, options) { 22 | // Parse the arguments 23 | const parsed = parse(command, args, options); 24 | 25 | // Spawn the child process 26 | const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); 27 | 28 | // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 29 | result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); 30 | 31 | return result; 32 | } 33 | 34 | module.exports = spawn; 35 | module.exports.spawn = spawn; 36 | module.exports.sync = spawnSync; 37 | 38 | module.exports._parse = parse; 39 | module.exports._enoent = enoent; 40 | -------------------------------------------------------------------------------- /node_modules/cross-spawn/lib/util/escape.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // See http://www.robvanderwoude.com/escapechars.php 4 | const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; 5 | 6 | function escapeCommand(arg) { 7 | // Escape meta chars 8 | arg = arg.replace(metaCharsRegExp, '^$1'); 9 | 10 | return arg; 11 | } 12 | 13 | function escapeArgument(arg, doubleEscapeMetaChars) { 14 | // Convert to string 15 | arg = `${arg}`; 16 | 17 | // Algorithm below is based on https://qntm.org/cmd 18 | 19 | // Sequence of backslashes followed by a double quote: 20 | // double up all the backslashes and escape the double quote 21 | arg = arg.replace(/(\\*)"/g, '$1$1\\"'); 22 | 23 | // Sequence of backslashes followed by the end of the string 24 | // (which will become a double quote later): 25 | // double up all the backslashes 26 | arg = arg.replace(/(\\*)$/, '$1$1'); 27 | 28 | // All other backslashes occur literally 29 | 30 | // Quote the whole thing: 31 | arg = `"${arg}"`; 32 | 33 | // Escape meta chars 34 | arg = arg.replace(metaCharsRegExp, '^$1'); 35 | 36 | // Double escape meta chars if necessary 37 | if (doubleEscapeMetaChars) { 38 | arg = arg.replace(metaCharsRegExp, '^$1'); 39 | } 40 | 41 | return arg; 42 | } 43 | 44 | module.exports.command = escapeCommand; 45 | module.exports.argument = escapeArgument; 46 | -------------------------------------------------------------------------------- /node_modules/cross-spawn/lib/util/readShebang.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs'); 4 | const shebangCommand = require('shebang-command'); 5 | 6 | function readShebang(command) { 7 | // Read the first 150 bytes from the file 8 | const size = 150; 9 | let buffer; 10 | 11 | if (Buffer.alloc) { 12 | // Node.js v4.5+ / v5.10+ 13 | buffer = Buffer.alloc(size); 14 | } else { 15 | // Old Node.js API 16 | buffer = new Buffer(size); 17 | buffer.fill(0); // zero-fill 18 | } 19 | 20 | let fd; 21 | 22 | try { 23 | fd = fs.openSync(command, 'r'); 24 | fs.readSync(fd, buffer, 0, size, 0); 25 | fs.closeSync(fd); 26 | } catch (e) { /* Empty */ } 27 | 28 | // Attempt to extract shebang (null is returned if not a shebang) 29 | return shebangCommand(buffer.toString()); 30 | } 31 | 32 | module.exports = readShebang; 33 | -------------------------------------------------------------------------------- /node_modules/cross-spawn/lib/util/resolveCommand.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | const which = require('which'); 5 | const pathKey = require('path-key')(); 6 | 7 | function resolveCommandAttempt(parsed, withoutPathExt) { 8 | const cwd = process.cwd(); 9 | const hasCustomCwd = parsed.options.cwd != null; 10 | 11 | // If a custom `cwd` was specified, we need to change the process cwd 12 | // because `which` will do stat calls but does not support a custom cwd 13 | if (hasCustomCwd) { 14 | try { 15 | process.chdir(parsed.options.cwd); 16 | } catch (err) { 17 | /* Empty */ 18 | } 19 | } 20 | 21 | let resolved; 22 | 23 | try { 24 | resolved = which.sync(parsed.command, { 25 | path: (parsed.options.env || process.env)[pathKey], 26 | pathExt: withoutPathExt ? path.delimiter : undefined, 27 | }); 28 | } catch (e) { 29 | /* Empty */ 30 | } finally { 31 | process.chdir(cwd); 32 | } 33 | 34 | // If we successfully resolved, ensure that an absolute path is returned 35 | // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it 36 | if (resolved) { 37 | resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); 38 | } 39 | 40 | return resolved; 41 | } 42 | 43 | function resolveCommand(parsed) { 44 | return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); 45 | } 46 | 47 | module.exports = resolveCommand; 48 | -------------------------------------------------------------------------------- /node_modules/debug/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | /** 4 | * Detect Electron renderer / nwjs process, which is node, but we should 5 | * treat as a browser. 6 | */ 7 | if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { 8 | module.exports = require('./browser.js'); 9 | } else { 10 | module.exports = require('./node.js'); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /node_modules/deprecation/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Gregor Martynus and contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/deprecation/README.md: -------------------------------------------------------------------------------- 1 | # deprecation 2 | 3 | > Log a deprecation message with stack 4 | 5 | ![build](https://action-badges.now.sh/gr2m/deprecation) 6 | 7 | ## Usage 8 | 9 | 10 | 11 | 24 | 36 | 37 |
12 | Browsers 13 | 14 | 15 | Load `deprecation` directly from [cdn.pika.dev](https://cdn.pika.dev) 16 | 17 | ```html 18 | 21 | ``` 22 | 23 |
25 | Node 26 | 27 | 28 | Install with `npm install deprecation` 29 | 30 | ```js 31 | const { Deprecation } = require("deprecation"); 32 | // or: import { Deprecation } from "deprecation"; 33 | ``` 34 | 35 |
38 | 39 | ```js 40 | function foo() { 41 | bar(); 42 | } 43 | 44 | function bar() { 45 | baz(); 46 | } 47 | 48 | function baz() { 49 | console.warn(new Deprecation("[my-lib] foo() is deprecated, use bar()")); 50 | } 51 | 52 | foo(); 53 | // { Deprecation: [my-lib] foo() is deprecated, use bar() 54 | // at baz (/path/to/file.js:12:15) 55 | // at bar (/path/to/file.js:8:3) 56 | // at foo (/path/to/file.js:4:3) 57 | ``` 58 | 59 | To log a deprecation message only once, you can use the [once](https://www.npmjs.com/package/once) module. 60 | 61 | ```js 62 | const Deprecation = require("deprecation"); 63 | const once = require("once"); 64 | 65 | const deprecateFoo = once(console.warn); 66 | 67 | function foo() { 68 | deprecateFoo(new Deprecation("[my-lib] foo() is deprecated, use bar()")); 69 | } 70 | 71 | foo(); 72 | foo(); // logs nothing 73 | ``` 74 | 75 | ## License 76 | 77 | [ISC](LICENSE) 78 | -------------------------------------------------------------------------------- /node_modules/deprecation/dist-node/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, '__esModule', { value: true }); 4 | 5 | class Deprecation extends Error { 6 | constructor(message) { 7 | super(message); // Maintains proper stack trace (only available on V8) 8 | 9 | /* istanbul ignore next */ 10 | 11 | if (Error.captureStackTrace) { 12 | Error.captureStackTrace(this, this.constructor); 13 | } 14 | 15 | this.name = 'Deprecation'; 16 | } 17 | 18 | } 19 | 20 | exports.Deprecation = Deprecation; 21 | -------------------------------------------------------------------------------- /node_modules/deprecation/dist-src/index.js: -------------------------------------------------------------------------------- 1 | export class Deprecation extends Error { 2 | constructor(message) { 3 | super(message); // Maintains proper stack trace (only available on V8) 4 | 5 | /* istanbul ignore next */ 6 | 7 | if (Error.captureStackTrace) { 8 | Error.captureStackTrace(this, this.constructor); 9 | } 10 | 11 | this.name = 'Deprecation'; 12 | } 13 | 14 | } -------------------------------------------------------------------------------- /node_modules/deprecation/dist-types/index.d.ts: -------------------------------------------------------------------------------- 1 | export class Deprecation extends Error { 2 | name: "Deprecation"; 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/deprecation/dist-web/index.js: -------------------------------------------------------------------------------- 1 | class Deprecation extends Error { 2 | constructor(message) { 3 | super(message); // Maintains proper stack trace (only available on V8) 4 | 5 | /* istanbul ignore next */ 6 | 7 | if (Error.captureStackTrace) { 8 | Error.captureStackTrace(this, this.constructor); 9 | } 10 | 11 | this.name = 'Deprecation'; 12 | } 13 | 14 | } 15 | 16 | export { Deprecation }; 17 | -------------------------------------------------------------------------------- /node_modules/end-of-stream/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Mathias Buus 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/execa/lib/errname.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | // Older verions of Node.js might not have `util.getSystemErrorName()`. 3 | // In that case, fall back to a deprecated internal. 4 | const util = require('util'); 5 | 6 | let uv; 7 | 8 | if (typeof util.getSystemErrorName === 'function') { 9 | module.exports = util.getSystemErrorName; 10 | } else { 11 | try { 12 | uv = process.binding('uv'); 13 | 14 | if (typeof uv.errname !== 'function') { 15 | throw new TypeError('uv.errname is not a function'); 16 | } 17 | } catch (err) { 18 | console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); 19 | uv = null; 20 | } 21 | 22 | module.exports = code => errname(uv, code); 23 | } 24 | 25 | // Used for testing the fallback behavior 26 | module.exports.__test__ = errname; 27 | 28 | function errname(uv, code) { 29 | if (uv) { 30 | return uv.errname(code); 31 | } 32 | 33 | if (!(code < 0)) { 34 | throw new Error('err >= 0'); 35 | } 36 | 37 | return `Unknown system error ${code}`; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /node_modules/execa/lib/stdio.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const alias = ['stdin', 'stdout', 'stderr']; 3 | 4 | const hasAlias = opts => alias.some(x => Boolean(opts[x])); 5 | 6 | module.exports = opts => { 7 | if (!opts) { 8 | return null; 9 | } 10 | 11 | if (opts.stdio && hasAlias(opts)) { 12 | throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); 13 | } 14 | 15 | if (typeof opts.stdio === 'string') { 16 | return opts.stdio; 17 | } 18 | 19 | const stdio = opts.stdio || []; 20 | 21 | if (!Array.isArray(stdio)) { 22 | throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); 23 | } 24 | 25 | const result = []; 26 | const len = Math.max(stdio.length, alias.length); 27 | 28 | for (let i = 0; i < len; i++) { 29 | let value = null; 30 | 31 | if (stdio[i] !== undefined) { 32 | value = stdio[i]; 33 | } else if (opts[alias[i]] !== undefined) { 34 | value = opts[alias[i]]; 35 | } 36 | 37 | result[i] = value; 38 | } 39 | 40 | return result; 41 | }; 42 | -------------------------------------------------------------------------------- /node_modules/execa/license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/follow-redirects/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 18 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/follow-redirects/http.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./").http; 2 | -------------------------------------------------------------------------------- /node_modules/follow-redirects/https.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./").https; 2 | -------------------------------------------------------------------------------- /node_modules/get-stream/buffer-stream.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const {PassThrough} = require('stream'); 3 | 4 | module.exports = options => { 5 | options = Object.assign({}, options); 6 | 7 | const {array} = options; 8 | let {encoding} = options; 9 | const buffer = encoding === 'buffer'; 10 | let objectMode = false; 11 | 12 | if (array) { 13 | objectMode = !(encoding || buffer); 14 | } else { 15 | encoding = encoding || 'utf8'; 16 | } 17 | 18 | if (buffer) { 19 | encoding = null; 20 | } 21 | 22 | let len = 0; 23 | const ret = []; 24 | const stream = new PassThrough({objectMode}); 25 | 26 | if (encoding) { 27 | stream.setEncoding(encoding); 28 | } 29 | 30 | stream.on('data', chunk => { 31 | ret.push(chunk); 32 | 33 | if (objectMode) { 34 | len = ret.length; 35 | } else { 36 | len += chunk.length; 37 | } 38 | }); 39 | 40 | stream.getBufferedValue = () => { 41 | if (array) { 42 | return ret; 43 | } 44 | 45 | return buffer ? Buffer.concat(ret, len) : ret.join(''); 46 | }; 47 | 48 | stream.getBufferedLength = () => len; 49 | 50 | return stream; 51 | }; 52 | -------------------------------------------------------------------------------- /node_modules/get-stream/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const pump = require('pump'); 3 | const bufferStream = require('./buffer-stream'); 4 | 5 | class MaxBufferError extends Error { 6 | constructor() { 7 | super('maxBuffer exceeded'); 8 | this.name = 'MaxBufferError'; 9 | } 10 | } 11 | 12 | function getStream(inputStream, options) { 13 | if (!inputStream) { 14 | return Promise.reject(new Error('Expected a stream')); 15 | } 16 | 17 | options = Object.assign({maxBuffer: Infinity}, options); 18 | 19 | const {maxBuffer} = options; 20 | 21 | let stream; 22 | return new Promise((resolve, reject) => { 23 | const rejectPromise = error => { 24 | if (error) { // A null check 25 | error.bufferedData = stream.getBufferedValue(); 26 | } 27 | reject(error); 28 | }; 29 | 30 | stream = pump(inputStream, bufferStream(options), error => { 31 | if (error) { 32 | rejectPromise(error); 33 | return; 34 | } 35 | 36 | resolve(); 37 | }); 38 | 39 | stream.on('data', () => { 40 | if (stream.getBufferedLength() > maxBuffer) { 41 | rejectPromise(new MaxBufferError()); 42 | } 43 | }); 44 | }).then(() => stream.getBufferedValue()); 45 | } 46 | 47 | module.exports = getStream; 48 | module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'})); 49 | module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true})); 50 | module.exports.MaxBufferError = MaxBufferError; 51 | -------------------------------------------------------------------------------- /node_modules/get-stream/license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/is-plain-object/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2017, Jon Schlinkert. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/is-plain-object/index.cjs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * isobject 5 | * 6 | * Copyright (c) 2014-2017, Jon Schlinkert. 7 | * Released under the MIT License. 8 | */ 9 | 10 | function isObject(val) { 11 | return val != null && typeof val === 'object' && Array.isArray(val) === false; 12 | } 13 | 14 | /*! 15 | * is-plain-object 16 | * 17 | * Copyright (c) 2014-2017, Jon Schlinkert. 18 | * Released under the MIT License. 19 | */ 20 | 21 | function isObjectObject(o) { 22 | return isObject(o) === true 23 | && Object.prototype.toString.call(o) === '[object Object]'; 24 | } 25 | 26 | function isPlainObject(o) { 27 | var ctor,prot; 28 | 29 | if (isObjectObject(o) === false) return false; 30 | 31 | // If has modified constructor 32 | ctor = o.constructor; 33 | if (typeof ctor !== 'function') return false; 34 | 35 | // If has modified prototype 36 | prot = ctor.prototype; 37 | if (isObjectObject(prot) === false) return false; 38 | 39 | // If constructor does not have an Object-specific method 40 | if (prot.hasOwnProperty('isPrototypeOf') === false) { 41 | return false; 42 | } 43 | 44 | // Most likely a plain Object 45 | return true; 46 | } 47 | 48 | module.exports = isPlainObject; 49 | -------------------------------------------------------------------------------- /node_modules/is-plain-object/index.d.ts: -------------------------------------------------------------------------------- 1 | declare function isPlainObject(o: any): boolean; 2 | 3 | export default isPlainObject; 4 | -------------------------------------------------------------------------------- /node_modules/is-plain-object/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * is-plain-object 3 | * 4 | * Copyright (c) 2014-2017, Jon Schlinkert. 5 | * Released under the MIT License. 6 | */ 7 | 8 | import isObject from 'isobject'; 9 | 10 | function isObjectObject(o) { 11 | return isObject(o) === true 12 | && Object.prototype.toString.call(o) === '[object Object]'; 13 | } 14 | 15 | export default function isPlainObject(o) { 16 | var ctor,prot; 17 | 18 | if (isObjectObject(o) === false) return false; 19 | 20 | // If has modified constructor 21 | ctor = o.constructor; 22 | if (typeof ctor !== 'function') return false; 23 | 24 | // If has modified prototype 25 | prot = ctor.prototype; 26 | if (isObjectObject(prot) === false) return false; 27 | 28 | // If constructor does not have an Object-specific method 29 | if (prot.hasOwnProperty('isPrototypeOf') === false) { 30 | return false; 31 | } 32 | 33 | // Most likely a plain Object 34 | return true; 35 | }; 36 | -------------------------------------------------------------------------------- /node_modules/is-stream/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var isStream = module.exports = function (stream) { 4 | return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; 5 | }; 6 | 7 | isStream.writable = function (stream) { 8 | return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; 9 | }; 10 | 11 | isStream.readable = function (stream) { 12 | return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; 13 | }; 14 | 15 | isStream.duplex = function (stream) { 16 | return isStream.writable(stream) && isStream.readable(stream); 17 | }; 18 | 19 | isStream.transform = function (stream) { 20 | return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; 21 | }; 22 | -------------------------------------------------------------------------------- /node_modules/is-stream/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/is-stream/readme.md: -------------------------------------------------------------------------------- 1 | # is-stream [![Build Status](https://travis-ci.org/sindresorhus/is-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/is-stream) 2 | 3 | > Check if something is a [Node.js stream](https://nodejs.org/api/stream.html) 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install --save is-stream 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const fs = require('fs'); 17 | const isStream = require('is-stream'); 18 | 19 | isStream(fs.createReadStream('unicorn.png')); 20 | //=> true 21 | 22 | isStream({}); 23 | //=> false 24 | ``` 25 | 26 | 27 | ## API 28 | 29 | ### isStream(stream) 30 | 31 | #### isStream.writable(stream) 32 | 33 | #### isStream.readable(stream) 34 | 35 | #### isStream.duplex(stream) 36 | 37 | #### isStream.transform(stream) 38 | 39 | 40 | ## License 41 | 42 | MIT © [Sindre Sorhus](https://sindresorhus.com) 43 | -------------------------------------------------------------------------------- /node_modules/isexe/.npmignore: -------------------------------------------------------------------------------- 1 | .nyc_output/ 2 | coverage/ 3 | -------------------------------------------------------------------------------- /node_modules/isexe/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/isexe/README.md: -------------------------------------------------------------------------------- 1 | # isexe 2 | 3 | Minimal module to check if a file is executable, and a normal file. 4 | 5 | Uses `fs.stat` and tests against the `PATHEXT` environment variable on 6 | Windows. 7 | 8 | ## USAGE 9 | 10 | ```javascript 11 | var isexe = require('isexe') 12 | isexe('some-file-name', function (err, isExe) { 13 | if (err) { 14 | console.error('probably file does not exist or something', err) 15 | } else if (isExe) { 16 | console.error('this thing can be run') 17 | } else { 18 | console.error('cannot be run') 19 | } 20 | }) 21 | 22 | // same thing but synchronous, throws errors 23 | var isExe = isexe.sync('some-file-name') 24 | 25 | // treat errors as just "not executable" 26 | isexe('maybe-missing-file', { ignoreErrors: true }, callback) 27 | var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) 28 | ``` 29 | 30 | ## API 31 | 32 | ### `isexe(path, [options], [callback])` 33 | 34 | Check if the path is executable. If no callback provided, and a 35 | global `Promise` object is available, then a Promise will be returned. 36 | 37 | Will raise whatever errors may be raised by `fs.stat`, unless 38 | `options.ignoreErrors` is set to true. 39 | 40 | ### `isexe.sync(path, [options])` 41 | 42 | Same as `isexe` but returns the value and throws any errors raised. 43 | 44 | ### Options 45 | 46 | * `ignoreErrors` Treat all errors as "no, this is not executable", but 47 | don't raise them. 48 | * `uid` Number to use as the user id 49 | * `gid` Number to use as the group id 50 | * `pathExt` List of path extensions to use instead of `PATHEXT` 51 | environment variable on Windows. 52 | -------------------------------------------------------------------------------- /node_modules/isexe/index.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var core 3 | if (process.platform === 'win32' || global.TESTING_WINDOWS) { 4 | core = require('./windows.js') 5 | } else { 6 | core = require('./mode.js') 7 | } 8 | 9 | module.exports = isexe 10 | isexe.sync = sync 11 | 12 | function isexe (path, options, cb) { 13 | if (typeof options === 'function') { 14 | cb = options 15 | options = {} 16 | } 17 | 18 | if (!cb) { 19 | if (typeof Promise !== 'function') { 20 | throw new TypeError('callback not provided') 21 | } 22 | 23 | return new Promise(function (resolve, reject) { 24 | isexe(path, options || {}, function (er, is) { 25 | if (er) { 26 | reject(er) 27 | } else { 28 | resolve(is) 29 | } 30 | }) 31 | }) 32 | } 33 | 34 | core(path, options || {}, function (er, is) { 35 | // ignore EACCES because that just means we aren't allowed to run it 36 | if (er) { 37 | if (er.code === 'EACCES' || options && options.ignoreErrors) { 38 | er = null 39 | is = false 40 | } 41 | } 42 | cb(er, is) 43 | }) 44 | } 45 | 46 | function sync (path, options) { 47 | // my kingdom for a filtered catch 48 | try { 49 | return core.sync(path, options || {}) 50 | } catch (er) { 51 | if (options && options.ignoreErrors || er.code === 'EACCES') { 52 | return false 53 | } else { 54 | throw er 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /node_modules/isexe/mode.js: -------------------------------------------------------------------------------- 1 | module.exports = isexe 2 | isexe.sync = sync 3 | 4 | var fs = require('fs') 5 | 6 | function isexe (path, options, cb) { 7 | fs.stat(path, function (er, stat) { 8 | cb(er, er ? false : checkStat(stat, options)) 9 | }) 10 | } 11 | 12 | function sync (path, options) { 13 | return checkStat(fs.statSync(path), options) 14 | } 15 | 16 | function checkStat (stat, options) { 17 | return stat.isFile() && checkMode(stat, options) 18 | } 19 | 20 | function checkMode (stat, options) { 21 | var mod = stat.mode 22 | var uid = stat.uid 23 | var gid = stat.gid 24 | 25 | var myUid = options.uid !== undefined ? 26 | options.uid : process.getuid && process.getuid() 27 | var myGid = options.gid !== undefined ? 28 | options.gid : process.getgid && process.getgid() 29 | 30 | var u = parseInt('100', 8) 31 | var g = parseInt('010', 8) 32 | var o = parseInt('001', 8) 33 | var ug = u | g 34 | 35 | var ret = (mod & o) || 36 | (mod & g) && gid === myGid || 37 | (mod & u) && uid === myUid || 38 | (mod & ug) && myUid === 0 39 | 40 | return ret 41 | } 42 | -------------------------------------------------------------------------------- /node_modules/isexe/windows.js: -------------------------------------------------------------------------------- 1 | module.exports = isexe 2 | isexe.sync = sync 3 | 4 | var fs = require('fs') 5 | 6 | function checkPathExt (path, options) { 7 | var pathext = options.pathExt !== undefined ? 8 | options.pathExt : process.env.PATHEXT 9 | 10 | if (!pathext) { 11 | return true 12 | } 13 | 14 | pathext = pathext.split(';') 15 | if (pathext.indexOf('') !== -1) { 16 | return true 17 | } 18 | for (var i = 0; i < pathext.length; i++) { 19 | var p = pathext[i].toLowerCase() 20 | if (p && path.substr(-p.length).toLowerCase() === p) { 21 | return true 22 | } 23 | } 24 | return false 25 | } 26 | 27 | function checkStat (stat, path, options) { 28 | if (!stat.isSymbolicLink() && !stat.isFile()) { 29 | return false 30 | } 31 | return checkPathExt(path, options) 32 | } 33 | 34 | function isexe (path, options, cb) { 35 | fs.stat(path, function (er, stat) { 36 | cb(er, er ? false : checkStat(stat, path, options)) 37 | }) 38 | } 39 | 40 | function sync (path, options) { 41 | return checkStat(fs.statSync(path), path, options) 42 | } 43 | -------------------------------------------------------------------------------- /node_modules/isobject/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2017, Jon Schlinkert. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/isobject/index.cjs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*! 4 | * isobject 5 | * 6 | * Copyright (c) 2014-2017, Jon Schlinkert. 7 | * Released under the MIT License. 8 | */ 9 | 10 | function isObject(val) { 11 | return val != null && typeof val === 'object' && Array.isArray(val) === false; 12 | } 13 | 14 | module.exports = isObject; 15 | -------------------------------------------------------------------------------- /node_modules/isobject/index.d.ts: -------------------------------------------------------------------------------- 1 | declare function isObject(val: any): boolean; 2 | 3 | export default isObject; 4 | -------------------------------------------------------------------------------- /node_modules/isobject/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * isobject 3 | * 4 | * Copyright (c) 2014-2017, Jon Schlinkert. 5 | * Released under the MIT License. 6 | */ 7 | 8 | export default function isObject(val) { 9 | return val != null && typeof val === 'object' && Array.isArray(val) === false; 10 | }; 11 | -------------------------------------------------------------------------------- /node_modules/lodash.get/README.md: -------------------------------------------------------------------------------- 1 | # lodash.get v4.4.2 2 | 3 | The [lodash](https://lodash.com/) method `_.get` exported as a [Node.js](https://nodejs.org/) module. 4 | 5 | ## Installation 6 | 7 | Using npm: 8 | ```bash 9 | $ {sudo -H} npm i -g npm 10 | $ npm i --save lodash.get 11 | ``` 12 | 13 | In Node.js: 14 | ```js 15 | var get = require('lodash.get'); 16 | ``` 17 | 18 | See the [documentation](https://lodash.com/docs#get) or [package source](https://github.com/lodash/lodash/blob/4.4.2-npm-packages/lodash.get) for more details. 19 | -------------------------------------------------------------------------------- /node_modules/lodash.set/README.md: -------------------------------------------------------------------------------- 1 | # lodash.set v4.3.2 2 | 3 | The [lodash](https://lodash.com/) method `_.set` exported as a [Node.js](https://nodejs.org/) module. 4 | 5 | ## Installation 6 | 7 | Using npm: 8 | ```bash 9 | $ {sudo -H} npm i -g npm 10 | $ npm i --save lodash.set 11 | ``` 12 | 13 | In Node.js: 14 | ```js 15 | var set = require('lodash.set'); 16 | ``` 17 | 18 | See the [documentation](https://lodash.com/docs#set) or [package source](https://github.com/lodash/lodash/blob/4.3.2-npm-packages/lodash.set) for more details. 19 | -------------------------------------------------------------------------------- /node_modules/lodash.uniq/README.md: -------------------------------------------------------------------------------- 1 | # lodash.uniq v4.5.0 2 | 3 | The [lodash](https://lodash.com/) method `_.uniq` exported as a [Node.js](https://nodejs.org/) module. 4 | 5 | ## Installation 6 | 7 | Using npm: 8 | ```bash 9 | $ {sudo -H} npm i -g npm 10 | $ npm i --save lodash.uniq 11 | ``` 12 | 13 | In Node.js: 14 | ```js 15 | var uniq = require('lodash.uniq'); 16 | ``` 17 | 18 | See the [documentation](https://lodash.com/docs#uniq) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.uniq) for more details. 19 | -------------------------------------------------------------------------------- /node_modules/macos-release/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const macosRelease: { 2 | /** 3 | Get the name and version of a macOS release from the Darwin version. 4 | 5 | @param release - By default, the current operating system is used, but you can supply a custom [Darwin kernel version](http://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). 6 | 7 | @example 8 | ``` 9 | import * as os from 'os'; 10 | import macosRelease = require('macos-release'); 11 | 12 | // On a macOS Sierra system 13 | 14 | macosRelease(); 15 | //=> {name: 'Sierra', version: '10.12'} 16 | 17 | os.release(); 18 | //=> 13.2.0 19 | // This is the Darwin kernel version 20 | 21 | macosRelease(os.release()); 22 | //=> {name: 'Sierra', version: '10.12'} 23 | 24 | macosRelease('14.0.0'); 25 | //=> {name: 'Yosemite', version: '10.10'} 26 | ``` 27 | */ 28 | (release?: string): string; 29 | 30 | // TODO: remove this in the next major version, refactor the whole definition to: 31 | // declare function macosRelease(release?: string): string; 32 | // export = macosRelease; 33 | default: typeof macosRelease; 34 | }; 35 | 36 | export = macosRelease; 37 | -------------------------------------------------------------------------------- /node_modules/macos-release/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const os = require('os'); 3 | 4 | const nameMap = new Map([ 5 | [19, 'Catalina'], 6 | [18, 'Mojave'], 7 | [17, 'High Sierra'], 8 | [16, 'Sierra'], 9 | [15, 'El Capitan'], 10 | [14, 'Yosemite'], 11 | [13, 'Mavericks'], 12 | [12, 'Mountain Lion'], 13 | [11, 'Lion'], 14 | [10, 'Snow Leopard'], 15 | [9, 'Leopard'], 16 | [8, 'Tiger'], 17 | [7, 'Panther'], 18 | [6, 'Jaguar'], 19 | [5, 'Puma'] 20 | ]); 21 | 22 | const macosRelease = release => { 23 | release = Number((release || os.release()).split('.')[0]); 24 | return { 25 | name: nameMap.get(release), 26 | version: '10.' + (release - 4) 27 | }; 28 | }; 29 | 30 | module.exports = macosRelease; 31 | // TODO: remove this in the next major version 32 | module.exports.default = macosRelease; 33 | -------------------------------------------------------------------------------- /node_modules/macos-release/license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/ms/license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/nice-try/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 6 | 7 | ## [1.0.5] - 2018-08-25 8 | 9 | ### Changed 10 | 11 | - Removed `prepublish` script from `package.json` 12 | 13 | ## [1.0.4] - 2017-08-08 14 | 15 | ### New 16 | 17 | - Added a changelog 18 | 19 | ### Changed 20 | 21 | - Ignore `yarn.lock` and `package-lock.json` files -------------------------------------------------------------------------------- /node_modules/nice-try/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Tobias Reich 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/nice-try/README.md: -------------------------------------------------------------------------------- 1 | # nice-try 2 | 3 | [![Travis Build Status](https://travis-ci.org/electerious/nice-try.svg?branch=master)](https://travis-ci.org/electerious/nice-try) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/8tqb09wrwci3xf8l?svg=true)](https://ci.appveyor.com/project/electerious/nice-try) [![Coverage Status](https://coveralls.io/repos/github/electerious/nice-try/badge.svg?branch=master)](https://coveralls.io/github/electerious/nice-try?branch=master) [![Dependencies](https://david-dm.org/electerious/nice-try.svg)](https://david-dm.org/electerious/nice-try#info=dependencies) [![Greenkeeper badge](https://badges.greenkeeper.io/electerious/nice-try.svg)](https://greenkeeper.io/) 4 | 5 | A function that tries to execute a function and discards any error that occurs. 6 | 7 | ## Install 8 | 9 | ``` 10 | npm install nice-try 11 | ``` 12 | 13 | ## Usage 14 | 15 | ```js 16 | const niceTry = require('nice-try') 17 | 18 | niceTry(() => JSON.parse('true')) // true 19 | niceTry(() => JSON.parse('truee')) // undefined 20 | niceTry() // undefined 21 | niceTry(true) // undefined 22 | ``` 23 | 24 | ## API 25 | 26 | ### Parameters 27 | 28 | - `fn` `{Function}` Function that might or might not throw an error. 29 | 30 | ### Returns 31 | 32 | - `{?*}` Return-value of the function when no error occurred. -------------------------------------------------------------------------------- /node_modules/nice-try/src/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /** 4 | * Tries to execute a function and discards any error that occurs. 5 | * @param {Function} fn - Function that might or might not throw an error. 6 | * @returns {?*} Return-value of the function when no error occurred. 7 | */ 8 | module.exports = function(fn) { 9 | 10 | try { return fn() } catch (e) {} 11 | 12 | } -------------------------------------------------------------------------------- /node_modules/node-fetch/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 David Frank 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /node_modules/node-fetch/browser.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | // ref: https://github.com/tc39/proposal-global 4 | var getGlobal = function () { 5 | // the only reliable means to get the global object is 6 | // `Function('return this')()` 7 | // However, this causes CSP violations in Chrome apps. 8 | if (typeof self !== 'undefined') { return self; } 9 | if (typeof window !== 'undefined') { return window; } 10 | if (typeof global !== 'undefined') { return global; } 11 | throw new Error('unable to locate global object'); 12 | } 13 | 14 | var global = getGlobal(); 15 | 16 | module.exports = exports = global.fetch; 17 | 18 | // Needed for TypeScript and Webpack. 19 | exports.default = global.fetch.bind(global); 20 | 21 | exports.Headers = global.Headers; 22 | exports.Request = global.Request; 23 | exports.Response = global.Response; -------------------------------------------------------------------------------- /node_modules/npm-run-path/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const path = require('path'); 3 | const pathKey = require('path-key'); 4 | 5 | module.exports = opts => { 6 | opts = Object.assign({ 7 | cwd: process.cwd(), 8 | path: process.env[pathKey()] 9 | }, opts); 10 | 11 | let prev; 12 | let pth = path.resolve(opts.cwd); 13 | const ret = []; 14 | 15 | while (prev !== pth) { 16 | ret.push(path.join(pth, 'node_modules/.bin')); 17 | prev = pth; 18 | pth = path.resolve(pth, '..'); 19 | } 20 | 21 | // ensure the running `node` binary is used 22 | ret.push(path.dirname(process.execPath)); 23 | 24 | return ret.concat(opts.path).join(path.delimiter); 25 | }; 26 | 27 | module.exports.env = opts => { 28 | opts = Object.assign({ 29 | env: process.env 30 | }, opts); 31 | 32 | const env = Object.assign({}, opts.env); 33 | const path = pathKey({env}); 34 | 35 | opts.path = env[path]; 36 | env[path] = module.exports(opts); 37 | 38 | return env; 39 | }; 40 | -------------------------------------------------------------------------------- /node_modules/npm-run-path/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | cache: 3 | directories: 4 | - ~/.npm 5 | 6 | # Trigger a push build on master and greenkeeper branches + PRs build on every branches 7 | # Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) 8 | branches: 9 | only: 10 | - master 11 | - /^greenkeeper.*$/ 12 | 13 | branches: 14 | except: 15 | - /^v\d+\.\d+\.\d+$/ 16 | 17 | jobs: 18 | include: 19 | - stage: test 20 | node_js: 6 21 | - node_js: 8 22 | install: npm ci 23 | - node_js: 10 24 | install: npm ci 25 | - node_js: lts/* 26 | script: npm run coverage:upload 27 | - stage: release 28 | env: semantic-release 29 | node_js: lts/* 30 | install: npm ci 31 | script: npm run semantic-release 32 | 33 | stages: 34 | - test 35 | - name: release 36 | if: branch = master AND type IN (push) 37 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2012 Cloud9 IDE, Inc. (Mike de Boer) 4 | Copyright (c) 2017-2018 Octokit contributors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/index.js: -------------------------------------------------------------------------------- 1 | module.exports = paginationMethodsPlugin 2 | 3 | function paginationMethodsPlugin (octokit) { 4 | octokit.getFirstPage = require('./lib/get-first-page').bind(null, octokit) 5 | octokit.getLastPage = require('./lib/get-last-page').bind(null, octokit) 6 | octokit.getNextPage = require('./lib/get-next-page').bind(null, octokit) 7 | octokit.getPreviousPage = require('./lib/get-previous-page').bind(null, octokit) 8 | octokit.hasFirstPage = require('./lib/has-first-page') 9 | octokit.hasLastPage = require('./lib/has-last-page') 10 | octokit.hasNextPage = require('./lib/has-next-page') 11 | octokit.hasPreviousPage = require('./lib/has-previous-page') 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/deprecate.js: -------------------------------------------------------------------------------- 1 | module.exports = deprecate 2 | 3 | const loggedMessages = {} 4 | 5 | function deprecate (message) { 6 | if (loggedMessages[message]) { 7 | return 8 | } 9 | 10 | console.warn(`DEPRECATED (@octokit/rest): ${message}`) 11 | loggedMessages[message] = 1 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/get-first-page.js: -------------------------------------------------------------------------------- 1 | module.exports = getFirstPage 2 | 3 | const getPage = require('./get-page') 4 | 5 | function getFirstPage (octokit, link, headers) { 6 | return getPage(octokit, link, 'first', headers) 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/get-last-page.js: -------------------------------------------------------------------------------- 1 | module.exports = getLastPage 2 | 3 | const getPage = require('./get-page') 4 | 5 | function getLastPage (octokit, link, headers) { 6 | return getPage(octokit, link, 'last', headers) 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/get-next-page.js: -------------------------------------------------------------------------------- 1 | module.exports = getNextPage 2 | 3 | const getPage = require('./get-page') 4 | 5 | function getNextPage (octokit, link, headers) { 6 | return getPage(octokit, link, 'next', headers) 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/get-page-links.js: -------------------------------------------------------------------------------- 1 | module.exports = getPageLinks 2 | 3 | function getPageLinks (link) { 4 | link = link.link || link.headers.link || '' 5 | 6 | const links = {} 7 | 8 | // link format: 9 | // '; rel="next", ; rel="last"' 10 | link.replace(/<([^>]*)>;\s*rel="([\w]*)"/g, (m, uri, type) => { 11 | links[type] = uri 12 | }) 13 | 14 | return links 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/get-page.js: -------------------------------------------------------------------------------- 1 | module.exports = getPage 2 | 3 | const deprecate = require('./deprecate') 4 | const getPageLinks = require('./get-page-links') 5 | const HttpError = require('./http-error') 6 | 7 | function getPage (octokit, link, which, headers) { 8 | 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.`) 9 | const url = getPageLinks(link)[which] 10 | 11 | if (!url) { 12 | const urlError = new HttpError(`No ${which} page found`, 404) 13 | return Promise.reject(urlError) 14 | } 15 | 16 | const requestOptions = { 17 | url, 18 | headers: applyAcceptHeader(link, headers) 19 | } 20 | 21 | const promise = octokit.request(requestOptions) 22 | 23 | return promise 24 | } 25 | 26 | function applyAcceptHeader (res, headers) { 27 | const previous = res.headers && res.headers['x-github-media-type'] 28 | 29 | if (!previous || (headers && headers.accept)) { 30 | return headers 31 | } 32 | headers = headers || {} 33 | headers.accept = 'application/vnd.' + previous 34 | .replace('; param=', '.') 35 | .replace('; format=', '+') 36 | 37 | return headers 38 | } 39 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/get-previous-page.js: -------------------------------------------------------------------------------- 1 | module.exports = getPreviousPage 2 | 3 | const getPage = require('./get-page') 4 | 5 | function getPreviousPage (octokit, link, headers) { 6 | return getPage(octokit, link, 'prev', headers) 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/has-first-page.js: -------------------------------------------------------------------------------- 1 | module.exports = hasFirstPage 2 | 3 | const deprecate = require('./deprecate') 4 | const getPageLinks = require('./get-page-links') 5 | 6 | function hasFirstPage (link) { 7 | deprecate(`octokit.hasFirstPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) 8 | return getPageLinks(link).first 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/has-last-page.js: -------------------------------------------------------------------------------- 1 | module.exports = hasLastPage 2 | 3 | const deprecate = require('./deprecate') 4 | const getPageLinks = require('./get-page-links') 5 | 6 | function hasLastPage (link) { 7 | deprecate(`octokit.hasLastPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) 8 | return getPageLinks(link).last 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/has-next-page.js: -------------------------------------------------------------------------------- 1 | module.exports = hasNextPage 2 | 3 | const deprecate = require('./deprecate') 4 | const getPageLinks = require('./get-page-links') 5 | 6 | function hasNextPage (link) { 7 | deprecate(`octokit.hasNextPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) 8 | return getPageLinks(link).next 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/has-previous-page.js: -------------------------------------------------------------------------------- 1 | module.exports = hasPreviousPage 2 | 3 | const deprecate = require('./deprecate') 4 | const getPageLinks = require('./get-page-links') 5 | 6 | function hasPreviousPage (link) { 7 | deprecate(`octokit.hasPreviousPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`) 8 | return getPageLinks(link).prev 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/octokit-pagination-methods/lib/http-error.js: -------------------------------------------------------------------------------- 1 | module.exports = class HttpError extends Error { 2 | constructor (message, code, headers) { 3 | super(message) 4 | 5 | // Maintains proper stack trace (only available on V8) 6 | /* istanbul ignore next */ 7 | if (Error.captureStackTrace) { 8 | Error.captureStackTrace(this, this.constructor) 9 | } 10 | 11 | this.name = 'HttpError' 12 | this.code = code 13 | this.headers = headers 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/once/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/once/once.js: -------------------------------------------------------------------------------- 1 | var wrappy = require('wrappy') 2 | module.exports = wrappy(once) 3 | module.exports.strict = wrappy(onceStrict) 4 | 5 | once.proto = once(function () { 6 | Object.defineProperty(Function.prototype, 'once', { 7 | value: function () { 8 | return once(this) 9 | }, 10 | configurable: true 11 | }) 12 | 13 | Object.defineProperty(Function.prototype, 'onceStrict', { 14 | value: function () { 15 | return onceStrict(this) 16 | }, 17 | configurable: true 18 | }) 19 | }) 20 | 21 | function once (fn) { 22 | var f = function () { 23 | if (f.called) return f.value 24 | f.called = true 25 | return f.value = fn.apply(this, arguments) 26 | } 27 | f.called = false 28 | return f 29 | } 30 | 31 | function onceStrict (fn) { 32 | var f = function () { 33 | if (f.called) 34 | throw new Error(f.onceError) 35 | f.called = true 36 | return f.value = fn.apply(this, arguments) 37 | } 38 | var name = fn.name || 'Function wrapped with `once`' 39 | f.onceError = name + " shouldn't be called more than once" 40 | f.called = false 41 | return f 42 | } 43 | -------------------------------------------------------------------------------- /node_modules/os-name/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | /** 4 | Get the name of the current operating system. 5 | 6 | By default, the name of the current operating system is returned. 7 | 8 | @param platform - Custom platform name. 9 | @param release - Custom release name. 10 | 11 | @example 12 | ``` 13 | import * as os fron 'os'; 14 | import osName = require('os-name'); 15 | 16 | // On a macOS Sierra system 17 | 18 | osName(); 19 | //=> 'macOS Sierra' 20 | 21 | osName(os.platform(), os.release()); 22 | //=> 'macOS Sierra' 23 | 24 | osName('darwin', '14.0.0'); 25 | //=> 'OS X Yosemite' 26 | 27 | osName('linux', '3.13.0-24-generic'); 28 | //=> 'Linux 3.13' 29 | 30 | osName('win32', '6.3.9600'); 31 | //=> 'Windows 8.1' 32 | ``` 33 | */ 34 | declare function osName(): string; 35 | declare function osName(platform: NodeJS.Platform, release: string): string; 36 | 37 | export = osName; 38 | -------------------------------------------------------------------------------- /node_modules/os-name/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const os = require('os'); 3 | const macosRelease = require('macos-release'); 4 | const winRelease = require('windows-release'); 5 | 6 | const osName = (platform, release) => { 7 | if (!platform && release) { 8 | throw new Error('You can\'t specify a `release` without specifying `platform`'); 9 | } 10 | 11 | platform = platform || os.platform(); 12 | 13 | let id; 14 | 15 | if (platform === 'darwin') { 16 | if (!release && os.platform() === 'darwin') { 17 | release = os.release(); 18 | } 19 | 20 | const prefix = release ? (Number(release.split('.')[0]) > 15 ? 'macOS' : 'OS X') : 'macOS'; 21 | id = release ? macosRelease(release).name : ''; 22 | return prefix + (id ? ' ' + id : ''); 23 | } 24 | 25 | if (platform === 'linux') { 26 | if (!release && os.platform() === 'linux') { 27 | release = os.release(); 28 | } 29 | 30 | id = release ? release.replace(/^(\d+\.\d+).*/, '$1') : ''; 31 | return 'Linux' + (id ? ' ' + id : ''); 32 | } 33 | 34 | if (platform === 'win32') { 35 | if (!release && os.platform() === 'win32') { 36 | release = os.release(); 37 | } 38 | 39 | id = release ? winRelease(release) : ''; 40 | return 'Windows' + (id ? ' ' + id : ''); 41 | } 42 | 43 | return platform; 44 | }; 45 | 46 | module.exports = osName; 47 | -------------------------------------------------------------------------------- /node_modules/os-name/license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/os-name/readme.md: -------------------------------------------------------------------------------- 1 | # os-name [![Build Status](https://travis-ci.org/sindresorhus/os-name.svg?branch=master)](https://travis-ci.org/sindresorhus/os-name) 2 | 3 | > Get the name of the current operating system
4 | > Example: `macOS Sierra` 5 | 6 | Useful for analytics and debugging. 7 | 8 | 9 | ## Install 10 | 11 | ``` 12 | $ npm install os-name 13 | ``` 14 | 15 | 16 | ## Usage 17 | 18 | ```js 19 | const os = require('os'); 20 | const osName = require('os-name'); 21 | 22 | // On a macOS Sierra system 23 | 24 | osName(); 25 | //=> 'macOS Sierra' 26 | 27 | osName(os.platform(), os.release()); 28 | //=> 'macOS Sierra' 29 | 30 | osName('darwin', '14.0.0'); 31 | //=> 'OS X Yosemite' 32 | 33 | osName('linux', '3.13.0-24-generic'); 34 | //=> 'Linux 3.13' 35 | 36 | osName('win32', '6.3.9600'); 37 | //=> 'Windows 8.1' 38 | ``` 39 | 40 | 41 | ## API 42 | 43 | ### osName([platform, release]) 44 | 45 | By default, the name of the current operating system is returned. 46 | 47 | You can optionally supply a custom [`os.platform()`](https://nodejs.org/api/os.html#os_os_platform) and [`os.release()`](https://nodejs.org/api/os.html#os_os_release). 48 | 49 | Check out [`getos`](https://github.com/wblankenship/getos) if you need the Linux distribution name. 50 | 51 | 52 | ## Contributing 53 | 54 | Production systems depend on this package for logging / tracking. Please be careful when introducing new output, and adhere to existing output format (whitespace, capitalization, etc.). 55 | 56 | 57 | ## Related 58 | 59 | - [os-name-cli](https://github.com/sindresorhus/os-name-cli) - CLI for this module 60 | 61 | 62 | ## License 63 | 64 | MIT © [Sindre Sorhus](https://sindresorhus.com) 65 | -------------------------------------------------------------------------------- /node_modules/p-finally/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = (promise, onFinally) => { 3 | onFinally = onFinally || (() => {}); 4 | 5 | return promise.then( 6 | val => new Promise(resolve => { 7 | resolve(onFinally()); 8 | }).then(() => val), 9 | err => new Promise(resolve => { 10 | resolve(onFinally()); 11 | }).then(() => { 12 | throw err; 13 | }) 14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /node_modules/p-finally/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/p-finally/readme.md: -------------------------------------------------------------------------------- 1 | # p-finally [![Build Status](https://travis-ci.org/sindresorhus/p-finally.svg?branch=master)](https://travis-ci.org/sindresorhus/p-finally) 2 | 3 | > [`Promise#finally()`](https://github.com/tc39/proposal-promise-finally) [ponyfill](https://ponyfill.com) - Invoked when the promise is settled regardless of outcome 4 | 5 | Useful for cleanup. 6 | 7 | 8 | ## Install 9 | 10 | ``` 11 | $ npm install --save p-finally 12 | ``` 13 | 14 | 15 | ## Usage 16 | 17 | ```js 18 | const pFinally = require('p-finally'); 19 | 20 | const dir = createTempDir(); 21 | 22 | pFinally(write(dir), () => cleanup(dir)); 23 | ``` 24 | 25 | 26 | ## API 27 | 28 | ### pFinally(promise, [onFinally]) 29 | 30 | Returns a `Promise`. 31 | 32 | #### onFinally 33 | 34 | Type: `Function` 35 | 36 | Note: Throwing or returning a rejected promise will reject `promise` with the rejection reason. 37 | 38 | 39 | ## Related 40 | 41 | - [p-try](https://github.com/sindresorhus/p-try) - `Promise#try()` ponyfill - Starts a promise chain 42 | - [More…](https://github.com/sindresorhus/promise-fun) 43 | 44 | 45 | ## License 46 | 47 | MIT © [Sindre Sorhus](https://sindresorhus.com) 48 | -------------------------------------------------------------------------------- /node_modules/path-key/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = opts => { 3 | opts = opts || {}; 4 | 5 | const env = opts.env || process.env; 6 | const platform = opts.platform || process.platform; 7 | 8 | if (platform !== 'win32') { 9 | return 'PATH'; 10 | } 11 | 12 | return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path'; 13 | }; 14 | -------------------------------------------------------------------------------- /node_modules/path-key/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/path-key/readme.md: -------------------------------------------------------------------------------- 1 | # path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key) 2 | 3 | > Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform 4 | 5 | It's usually `PATH`, but on Windows it can be any casing like `Path`... 6 | 7 | 8 | ## Install 9 | 10 | ``` 11 | $ npm install --save path-key 12 | ``` 13 | 14 | 15 | ## Usage 16 | 17 | ```js 18 | const pathKey = require('path-key'); 19 | 20 | const key = pathKey(); 21 | //=> 'PATH' 22 | 23 | const PATH = process.env[key]; 24 | //=> '/usr/local/bin:/usr/bin:/bin' 25 | ``` 26 | 27 | 28 | ## API 29 | 30 | ### pathKey([options]) 31 | 32 | #### options 33 | 34 | ##### env 35 | 36 | Type: `Object`
37 | Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env) 38 | 39 | Use a custom environment variables object. 40 | 41 | #### platform 42 | 43 | Type: `string`
44 | Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform) 45 | 46 | Get the PATH key for a specific platform. 47 | 48 | 49 | ## License 50 | 51 | MIT © [Sindre Sorhus](https://sindresorhus.com) 52 | -------------------------------------------------------------------------------- /node_modules/pump/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | 5 | script: "npm test" 6 | -------------------------------------------------------------------------------- /node_modules/pump/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Mathias Buus 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/pump/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "pump@3.0.0", 5 | "C:\\Yossi\\GitHub\\GprSecurityAction" 6 | ] 7 | ], 8 | "_from": "pump@3.0.0", 9 | "_id": "pump@3.0.0", 10 | "_inBundle": false, 11 | "_integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 12 | "_location": "/pump", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "pump@3.0.0", 18 | "name": "pump", 19 | "escapedName": "pump", 20 | "rawSpec": "3.0.0", 21 | "saveSpec": null, 22 | "fetchSpec": "3.0.0" 23 | }, 24 | "_requiredBy": [ 25 | "/get-stream" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 28 | "_spec": "3.0.0", 29 | "_where": "C:\\Yossi\\GitHub\\GprSecurityAction", 30 | "author": { 31 | "name": "Mathias Buus Madsen", 32 | "email": "mathiasbuus@gmail.com" 33 | }, 34 | "browser": { 35 | "fs": false 36 | }, 37 | "bugs": { 38 | "url": "https://github.com/mafintosh/pump/issues" 39 | }, 40 | "dependencies": { 41 | "end-of-stream": "^1.1.0", 42 | "once": "^1.3.1" 43 | }, 44 | "description": "pipe streams together and close all of them if one of them closes", 45 | "homepage": "https://github.com/mafintosh/pump#readme", 46 | "keywords": [ 47 | "streams", 48 | "pipe", 49 | "destroy", 50 | "callback" 51 | ], 52 | "license": "MIT", 53 | "name": "pump", 54 | "repository": { 55 | "type": "git", 56 | "url": "git://github.com/mafintosh/pump.git" 57 | }, 58 | "scripts": { 59 | "test": "node test-browser.js && node test-node.js" 60 | }, 61 | "version": "3.0.0" 62 | } 63 | -------------------------------------------------------------------------------- /node_modules/pump/test-browser.js: -------------------------------------------------------------------------------- 1 | var stream = require('stream') 2 | var pump = require('./index') 3 | 4 | var rs = new stream.Readable() 5 | var ws = new stream.Writable() 6 | 7 | rs._read = function (size) { 8 | this.push(Buffer(size).fill('abc')) 9 | } 10 | 11 | ws._write = function (chunk, encoding, cb) { 12 | setTimeout(function () { 13 | cb() 14 | }, 100) 15 | } 16 | 17 | var toHex = function () { 18 | var reverse = new (require('stream').Transform)() 19 | 20 | reverse._transform = function (chunk, enc, callback) { 21 | reverse.push(chunk.toString('hex')) 22 | callback() 23 | } 24 | 25 | return reverse 26 | } 27 | 28 | var wsClosed = false 29 | var rsClosed = false 30 | var callbackCalled = false 31 | 32 | var check = function () { 33 | if (wsClosed && rsClosed && callbackCalled) { 34 | console.log('test-browser.js passes') 35 | clearTimeout(timeout) 36 | } 37 | } 38 | 39 | ws.on('finish', function () { 40 | wsClosed = true 41 | check() 42 | }) 43 | 44 | rs.on('end', function () { 45 | rsClosed = true 46 | check() 47 | }) 48 | 49 | var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { 50 | callbackCalled = true 51 | check() 52 | }) 53 | 54 | if (res !== ws) { 55 | throw new Error('should return last stream') 56 | } 57 | 58 | setTimeout(function () { 59 | rs.push(null) 60 | rs.emit('close') 61 | }, 1000) 62 | 63 | var timeout = setTimeout(function () { 64 | check() 65 | throw new Error('timeout') 66 | }, 5000) 67 | -------------------------------------------------------------------------------- /node_modules/pump/test-node.js: -------------------------------------------------------------------------------- 1 | var pump = require('./index') 2 | 3 | var rs = require('fs').createReadStream('/dev/random') 4 | var ws = require('fs').createWriteStream('/dev/null') 5 | 6 | var toHex = function () { 7 | var reverse = new (require('stream').Transform)() 8 | 9 | reverse._transform = function (chunk, enc, callback) { 10 | reverse.push(chunk.toString('hex')) 11 | callback() 12 | } 13 | 14 | return reverse 15 | } 16 | 17 | var wsClosed = false 18 | var rsClosed = false 19 | var callbackCalled = false 20 | 21 | var check = function () { 22 | if (wsClosed && rsClosed && callbackCalled) { 23 | console.log('test-node.js passes') 24 | clearTimeout(timeout) 25 | } 26 | } 27 | 28 | ws.on('close', function () { 29 | wsClosed = true 30 | check() 31 | }) 32 | 33 | rs.on('close', function () { 34 | rsClosed = true 35 | check() 36 | }) 37 | 38 | var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { 39 | callbackCalled = true 40 | check() 41 | }) 42 | 43 | if (res !== ws) { 44 | throw new Error('should return last stream') 45 | } 46 | 47 | setTimeout(function () { 48 | rs.destroy() 49 | }, 1000) 50 | 51 | var timeout = setTimeout(function () { 52 | throw new Error('timeout') 53 | }, 5000) 54 | -------------------------------------------------------------------------------- /node_modules/semver/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # changes log 2 | 3 | ## 5.7 4 | 5 | * Add `minVersion` method 6 | 7 | ## 5.6 8 | 9 | * Move boolean `loose` param to an options object, with 10 | backwards-compatibility protection. 11 | * Add ability to opt out of special prerelease version handling with 12 | the `includePrerelease` option flag. 13 | 14 | ## 5.5 15 | 16 | * Add version coercion capabilities 17 | 18 | ## 5.4 19 | 20 | * Add intersection checking 21 | 22 | ## 5.3 23 | 24 | * Add `minSatisfying` method 25 | 26 | ## 5.2 27 | 28 | * Add `prerelease(v)` that returns prerelease components 29 | 30 | ## 5.1 31 | 32 | * Add Backus-Naur for ranges 33 | * Remove excessively cute inspection methods 34 | 35 | ## 5.0 36 | 37 | * Remove AMD/Browserified build artifacts 38 | * Fix ltr and gtr when using the `*` range 39 | * Fix for range `*` with a prerelease identifier 40 | -------------------------------------------------------------------------------- /node_modules/semver/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/semver/range.bnf: -------------------------------------------------------------------------------- 1 | range-set ::= range ( logical-or range ) * 2 | logical-or ::= ( ' ' ) * '||' ( ' ' ) * 3 | range ::= hyphen | simple ( ' ' simple ) * | '' 4 | hyphen ::= partial ' - ' partial 5 | simple ::= primitive | partial | tilde | caret 6 | primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial 7 | partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? 8 | xr ::= 'x' | 'X' | '*' | nr 9 | nr ::= '0' | [1-9] ( [0-9] ) * 10 | tilde ::= '~' partial 11 | caret ::= '^' partial 12 | qualifier ::= ( '-' pre )? ( '+' build )? 13 | pre ::= parts 14 | build ::= parts 15 | parts ::= part ( '.' part ) * 16 | part ::= nr | [-0-9A-Za-z]+ 17 | -------------------------------------------------------------------------------- /node_modules/shebang-command/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var shebangRegex = require('shebang-regex'); 3 | 4 | module.exports = function (str) { 5 | var match = str.match(shebangRegex); 6 | 7 | if (!match) { 8 | return null; 9 | } 10 | 11 | var arr = match[0].replace(/#! ?/, '').split(' '); 12 | var bin = arr[0].split('/').pop(); 13 | var arg = arr[1]; 14 | 15 | return (bin === 'env' ? 16 | arg : 17 | bin + (arg ? ' ' + arg : '') 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /node_modules/shebang-command/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Kevin Martensson (github.com/kevva) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/shebang-command/readme.md: -------------------------------------------------------------------------------- 1 | # shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command) 2 | 3 | > Get the command from a shebang 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install --save shebang-command 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const shebangCommand = require('shebang-command'); 17 | 18 | shebangCommand('#!/usr/bin/env node'); 19 | //=> 'node' 20 | 21 | shebangCommand('#!/bin/bash'); 22 | //=> 'bash' 23 | ``` 24 | 25 | 26 | ## API 27 | 28 | ### shebangCommand(string) 29 | 30 | #### string 31 | 32 | Type: `string` 33 | 34 | String containing a shebang. 35 | 36 | 37 | ## License 38 | 39 | MIT © [Kevin Martensson](http://github.com/kevva) 40 | -------------------------------------------------------------------------------- /node_modules/shebang-regex/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = /^#!.*/; 3 | -------------------------------------------------------------------------------- /node_modules/shebang-regex/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/shebang-regex/readme.md: -------------------------------------------------------------------------------- 1 | # shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex) 2 | 3 | > Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install --save shebang-regex 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | var shebangRegex = require('shebang-regex'); 17 | var str = '#!/usr/bin/env node\nconsole.log("unicorns");'; 18 | 19 | shebangRegex.test(str); 20 | //=> true 21 | 22 | shebangRegex.exec(str)[0]; 23 | //=> '#!/usr/bin/env node' 24 | ``` 25 | 26 | 27 | ## License 28 | 29 | MIT © [Sindre Sorhus](http://sindresorhus.com) 30 | -------------------------------------------------------------------------------- /node_modules/signal-exit/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. 4 | 5 | 6 | ## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08) 7 | 8 | 9 | ### Bug Fixes 10 | 11 | * do not listen on SIGBUS, SIGFPE, SIGSEGV and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/tapjs/signal-exit/commit/5b105fb)) 12 | 13 | 14 | 15 | 16 | # [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13) 17 | 18 | 19 | ### Bug Fixes 20 | 21 | * get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8)) 22 | * hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c)) 23 | 24 | 25 | ### BREAKING CHANGES 26 | 27 | * signal-exit no longer wires into SIGPROF 28 | -------------------------------------------------------------------------------- /node_modules/signal-exit/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) 2015, Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software 6 | for any purpose with or without fee is hereby granted, provided 7 | that the above copyright notice and this permission notice 8 | appear in all copies. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES 12 | OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE 13 | LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES 14 | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 15 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 16 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | -------------------------------------------------------------------------------- /node_modules/signal-exit/README.md: -------------------------------------------------------------------------------- 1 | # signal-exit 2 | 3 | [![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit) 4 | [![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master) 5 | [![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) 6 | [![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit) 7 | [![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) 8 | 9 | When you want to fire an event no matter how a process exits: 10 | 11 | * reaching the end of execution. 12 | * explicitly having `process.exit(code)` called. 13 | * having `process.kill(pid, sig)` called. 14 | * receiving a fatal signal from outside the process 15 | 16 | Use `signal-exit`. 17 | 18 | ```js 19 | var onExit = require('signal-exit') 20 | 21 | onExit(function (code, signal) { 22 | console.log('process exited!') 23 | }) 24 | ``` 25 | 26 | ## API 27 | 28 | `var remove = onExit(function (code, signal) {}, options)` 29 | 30 | The return value of the function is a function that will remove the 31 | handler. 32 | 33 | Note that the function *only* fires for signals if the signal would 34 | cause the proces to exit. That is, there are no other listeners, and 35 | it is a fatal signal. 36 | 37 | ## Options 38 | 39 | * `alwaysLast`: Run this handler after any other signal or exit 40 | handlers. This causes `process.emit` to be monkeypatched. 41 | -------------------------------------------------------------------------------- /node_modules/signal-exit/signals.js: -------------------------------------------------------------------------------- 1 | // This is not the set of all possible signals. 2 | // 3 | // It IS, however, the set of all signals that trigger 4 | // an exit on either Linux or BSD systems. Linux is a 5 | // superset of the signal names supported on BSD, and 6 | // the unknown signals just fail to register, so we can 7 | // catch that easily enough. 8 | // 9 | // Don't bother with SIGKILL. It's uncatchable, which 10 | // means that we can't fire any callbacks anyway. 11 | // 12 | // If a user does happen to register a handler on a non- 13 | // fatal signal like SIGWINCH or something, and then 14 | // exit, it'll end up firing `process.emit('exit')`, so 15 | // the handler will be fired anyway. 16 | // 17 | // SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised 18 | // artificially, inherently leave the process in a 19 | // state from which it is not safe to try and enter JS 20 | // listeners. 21 | module.exports = [ 22 | 'SIGABRT', 23 | 'SIGALRM', 24 | 'SIGHUP', 25 | 'SIGINT', 26 | 'SIGTERM' 27 | ] 28 | 29 | if (process.platform !== 'win32') { 30 | module.exports.push( 31 | 'SIGVTALRM', 32 | 'SIGXCPU', 33 | 'SIGXFSZ', 34 | 'SIGUSR2', 35 | 'SIGTRAP', 36 | 'SIGSYS', 37 | 'SIGQUIT', 38 | 'SIGIOT' 39 | // should detect profiler and enable/disable accordingly. 40 | // see #21 41 | // 'SIGPROF' 42 | ) 43 | } 44 | 45 | if (process.platform === 'linux') { 46 | module.exports.push( 47 | 'SIGIO', 48 | 'SIGPOLL', 49 | 'SIGPWR', 50 | 'SIGSTKFLT', 51 | 'SIGUNUSED' 52 | ) 53 | } 54 | -------------------------------------------------------------------------------- /node_modules/strip-eof/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = function (x) { 3 | var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt(); 4 | var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt(); 5 | 6 | if (x[x.length - 1] === lf) { 7 | x = x.slice(0, x.length - 1); 8 | } 9 | 10 | if (x[x.length - 1] === cr) { 11 | x = x.slice(0, x.length - 1); 12 | } 13 | 14 | return x; 15 | }; 16 | -------------------------------------------------------------------------------- /node_modules/strip-eof/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/strip-eof/readme.md: -------------------------------------------------------------------------------- 1 | # strip-eof [![Build Status](https://travis-ci.org/sindresorhus/strip-eof.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-eof) 2 | 3 | > Strip the [End-Of-File](https://en.wikipedia.org/wiki/End-of-file) (EOF) character from a string/buffer 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install --save strip-eof 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const stripEof = require('strip-eof'); 17 | 18 | stripEof('foo\nbar\n\n'); 19 | //=> 'foo\nbar\n' 20 | 21 | stripEof(new Buffer('foo\nbar\n\n')).toString(); 22 | //=> 'foo\nbar\n' 23 | ``` 24 | 25 | 26 | ## License 27 | 28 | MIT © [Sindre Sorhus](http://sindresorhus.com) 29 | -------------------------------------------------------------------------------- /node_modules/universal-user-agent/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | cache: 3 | directories: 4 | - ~/.npm 5 | - node_modules/cypress/dist 6 | 7 | # Trigger a push build on master and greenkeeper branches + PRs build on every branches 8 | # Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) 9 | branches: 10 | only: 11 | - master 12 | - /^greenkeeper.*$/ 13 | 14 | stages: 15 | - test 16 | - name: release 17 | if: branch = master AND type IN (push) 18 | 19 | jobs: 20 | include: 21 | - stage: test 22 | node_js: 6 23 | script: npm run test 24 | - node_js: 8 25 | script: npm run test 26 | - node_js: 10 27 | env: Node 10 & coverage upload 28 | script: 29 | - npm run test 30 | - npm run coverage:upload 31 | - node_js: lts/* 32 | env: browser tests 33 | script: npm run test:browser 34 | 35 | - stage: release 36 | node_js: lts/* 37 | env: semantic-release 38 | script: npm run semantic-release 39 | -------------------------------------------------------------------------------- /node_modules/universal-user-agent/LICENSE.md: -------------------------------------------------------------------------------- 1 | # [ISC License](https://spdx.org/licenses/ISC) 2 | 3 | Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 8 | -------------------------------------------------------------------------------- /node_modules/universal-user-agent/README.md: -------------------------------------------------------------------------------- 1 | # universal-user-agent 2 | 3 | > Get a user agent string in both browser and node 4 | 5 | [![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent) 6 | [![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent) 7 | [![Coverage Status](https://coveralls.io/repos/github/gr2m/universal-user-agent/badge.svg)](https://coveralls.io/github/gr2m/universal-user-agent) 8 | [![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/) 9 | 10 | ```js 11 | const getUserAgent = require('universal-user-agent') 12 | const userAgent = getUserAgent() 13 | 14 | // userAgent will look like this 15 | // in browser: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0" 16 | // in node: Node.js/v8.9.4 (macOS High Sierra; x64) 17 | ``` 18 | 19 | ## Credits 20 | 21 | The Node implementation was originally inspired by [default-user-agent](https://www.npmjs.com/package/default-user-agent). 22 | 23 | ## License 24 | 25 | [ISC](LICENSE.md) 26 | -------------------------------------------------------------------------------- /node_modules/universal-user-agent/browser.js: -------------------------------------------------------------------------------- 1 | module.exports = getUserAgentBrowser 2 | 3 | function getUserAgentBrowser () { 4 | /* global navigator */ 5 | return navigator.userAgent 6 | } 7 | -------------------------------------------------------------------------------- /node_modules/universal-user-agent/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "integrationFolder": "test", 3 | "video": false 4 | } 5 | -------------------------------------------------------------------------------- /node_modules/universal-user-agent/index.d.ts: -------------------------------------------------------------------------------- 1 | export default function getUserAgentNode(): string; 2 | -------------------------------------------------------------------------------- /node_modules/universal-user-agent/index.js: -------------------------------------------------------------------------------- 1 | module.exports = getUserAgentNode 2 | 3 | const osName = require('os-name') 4 | 5 | function getUserAgentNode () { 6 | try { 7 | return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})` 8 | } catch (error) { 9 | if (/wmic os get Caption/.test(error.message)) { 10 | return 'Windows ' 11 | } 12 | 13 | throw error 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/universal-user-agent/test/smoke-test.js: -------------------------------------------------------------------------------- 1 | // make tests run in both Node & Express 2 | if (!global.cy) { 3 | const chai = require('chai') 4 | const sinon = require('sinon') 5 | const sinonChai = require('sinon-chai') 6 | chai.use(sinonChai) 7 | global.expect = chai.expect 8 | 9 | let sandbox 10 | beforeEach(() => { 11 | sandbox = sinon.createSandbox() 12 | global.cy = { 13 | stub: function () { 14 | return sandbox.stub.apply(sandbox, arguments) 15 | }, 16 | log () { 17 | console.log.apply(console, arguments) 18 | } 19 | } 20 | }) 21 | 22 | afterEach(() => { 23 | sandbox.restore() 24 | }) 25 | } 26 | 27 | const getUserAgent = require('..') 28 | 29 | describe('smoke', () => { 30 | it('works', () => { 31 | expect(getUserAgent()).to.be.a('string') 32 | expect(getUserAgent().length).to.be.above(10) 33 | }) 34 | 35 | if (!process.browser) { // test on node only 36 | const proxyquire = require('proxyquire').noCallThru() 37 | it('works around wmic error on Windows (#5)', () => { 38 | const getUserAgent = proxyquire('..', { 39 | 'os-name': () => { 40 | throw new Error('Command failed: wmic os get Caption') 41 | } 42 | }) 43 | 44 | expect(getUserAgent()).to.equal('Windows ') 45 | }) 46 | 47 | it('does not swallow unexpected errors', () => { 48 | const getUserAgent = proxyquire('..', { 49 | 'os-name': () => { 50 | throw new Error('oops') 51 | } 52 | }) 53 | 54 | expect(getUserAgent).to.throw('oops') 55 | }) 56 | } 57 | }) 58 | -------------------------------------------------------------------------------- /node_modules/which/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/which/README.md: -------------------------------------------------------------------------------- 1 | # which 2 | 3 | Like the unix `which` utility. 4 | 5 | Finds the first instance of a specified executable in the PATH 6 | environment variable. Does not cache the results, so `hash -r` is not 7 | needed when the PATH changes. 8 | 9 | ## USAGE 10 | 11 | ```javascript 12 | var which = require('which') 13 | 14 | // async usage 15 | which('node', function (er, resolvedPath) { 16 | // er is returned if no "node" is found on the PATH 17 | // if it is found, then the absolute path to the exec is returned 18 | }) 19 | 20 | // sync usage 21 | // throws if not found 22 | var resolved = which.sync('node') 23 | 24 | // if nothrow option is used, returns null if not found 25 | resolved = which.sync('node', {nothrow: true}) 26 | 27 | // Pass options to override the PATH and PATHEXT environment vars. 28 | which('node', { path: someOtherPath }, function (er, resolved) { 29 | if (er) 30 | throw er 31 | console.log('found at %j', resolved) 32 | }) 33 | ``` 34 | 35 | ## CLI USAGE 36 | 37 | Same as the BSD `which(1)` binary. 38 | 39 | ``` 40 | usage: which [-as] program ... 41 | ``` 42 | 43 | ## OPTIONS 44 | 45 | You may pass an options object as the second argument. 46 | 47 | - `path`: Use instead of the `PATH` environment variable. 48 | - `pathExt`: Use instead of the `PATHEXT` environment variable. 49 | - `all`: Return all matches, instead of just the first one. Note that 50 | this means the function returns an array of strings instead of a 51 | single string. 52 | -------------------------------------------------------------------------------- /node_modules/which/bin/which: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var which = require("../") 3 | if (process.argv.length < 3) 4 | usage() 5 | 6 | function usage () { 7 | console.error('usage: which [-as] program ...') 8 | process.exit(1) 9 | } 10 | 11 | var all = false 12 | var silent = false 13 | var dashdash = false 14 | var args = process.argv.slice(2).filter(function (arg) { 15 | if (dashdash || !/^-/.test(arg)) 16 | return true 17 | 18 | if (arg === '--') { 19 | dashdash = true 20 | return false 21 | } 22 | 23 | var flags = arg.substr(1).split('') 24 | for (var f = 0; f < flags.length; f++) { 25 | var flag = flags[f] 26 | switch (flag) { 27 | case 's': 28 | silent = true 29 | break 30 | case 'a': 31 | all = true 32 | break 33 | default: 34 | console.error('which: illegal option -- ' + flag) 35 | usage() 36 | } 37 | } 38 | return false 39 | }) 40 | 41 | process.exit(args.reduce(function (pv, current) { 42 | try { 43 | var f = which.sync(current, { all: all }) 44 | if (all) 45 | f = f.join('\n') 46 | if (!silent) 47 | console.log(f) 48 | return pv; 49 | } catch (e) { 50 | return 1; 51 | } 52 | }, 0)) 53 | -------------------------------------------------------------------------------- /node_modules/windows-release/index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Get the name of a Windows version from the release number: `5.1.2600` → `XP`. 3 | 4 | @param release - By default, the current OS is used, but you can supply a custom release number, which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). 5 | 6 | Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches `os.release()`. 7 | 8 | @example 9 | ``` 10 | import * as os from 'os'; 11 | import windowsRelease = require('windows-release'); 12 | 13 | // On a Windows XP system 14 | 15 | windowsRelease(); 16 | //=> 'XP' 17 | 18 | os.release(); 19 | //=> '5.1.2600' 20 | 21 | windowsRelease(os.release()); 22 | //=> 'XP' 23 | 24 | windowsRelease('4.9.3000'); 25 | //=> 'ME' 26 | ``` 27 | */ 28 | declare function windowsRelease(release?: string): string; 29 | 30 | export = windowsRelease; 31 | -------------------------------------------------------------------------------- /node_modules/windows-release/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const os = require('os'); 3 | const execa = require('execa'); 4 | 5 | // Reference: https://www.gaijin.at/en/lstwinver.php 6 | const names = new Map([ 7 | ['10.0', '10'], 8 | ['6.3', '8.1'], 9 | ['6.2', '8'], 10 | ['6.1', '7'], 11 | ['6.0', 'Vista'], 12 | ['5.2', 'Server 2003'], 13 | ['5.1', 'XP'], 14 | ['5.0', '2000'], 15 | ['4.9', 'ME'], 16 | ['4.1', '98'], 17 | ['4.0', '95'] 18 | ]); 19 | 20 | const windowsRelease = release => { 21 | const version = /\d+\.\d/.exec(release || os.release()); 22 | 23 | if (release && !version) { 24 | throw new Error('`release` argument doesn\'t match `n.n`'); 25 | } 26 | 27 | const ver = (version || [])[0]; 28 | 29 | // Server 2008, 2012 and 2016 versions are ambiguous with desktop versions and must be detected at runtime. 30 | // If `release` is omitted or we're on a Windows system, and the version number is an ambiguous version 31 | // then use `wmic` to get the OS caption: https://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx 32 | // If the resulting caption contains the year 2008, 2012 or 2016, it is a server version, so return a server OS name. 33 | if ((!release || release === os.release()) && ['6.1', '6.2', '6.3', '10.0'].includes(ver)) { 34 | const stdout = execa.sync('wmic', ['os', 'get', 'Caption']).stdout || ''; 35 | const year = (stdout.match(/2008|2012|2016/) || [])[0]; 36 | if (year) { 37 | return `Server ${year}`; 38 | } 39 | } 40 | 41 | return names.get(ver); 42 | }; 43 | 44 | module.exports = windowsRelease; 45 | -------------------------------------------------------------------------------- /node_modules/windows-release/license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/windows-release/readme.md: -------------------------------------------------------------------------------- 1 | # windows-release [![Build Status](https://travis-ci.org/sindresorhus/windows-release.svg?branch=master)](https://travis-ci.org/sindresorhus/windows-release) 2 | 3 | > Get the name of a Windows version from the release number: `5.1.2600` → `XP` 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install windows-release 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const os = require('os'); 17 | const windowsRelease = require('windows-release'); 18 | 19 | // On a Windows XP system 20 | 21 | windowsRelease(); 22 | //=> 'XP' 23 | 24 | os.release(); 25 | //=> '5.1.2600' 26 | 27 | windowsRelease(os.release()); 28 | //=> 'XP' 29 | 30 | windowsRelease('4.9.3000'); 31 | //=> 'ME' 32 | ``` 33 | 34 | 35 | ## API 36 | 37 | ### windowsRelease([release]) 38 | 39 | #### release 40 | 41 | Type: `string` 42 | 43 | By default, the current OS is used, but you can supply a custom release number, which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release). 44 | 45 | Note: Most Windows Server versions cannot be detected based on the release number alone. There is runtime detection in place to work around this, but it will only be used if no argument is supplied, or the supplied argument matches `os.release()`. 46 | 47 | 48 | ## Related 49 | 50 | - [os-name](https://github.com/sindresorhus/os-name) - Get the name of the current operating system 51 | - [macos-release](https://github.com/sindresorhus/macos-release) - Get the name and version of a macOS release from the Darwin version 52 | 53 | 54 | ## License 55 | 56 | MIT © [Sindre Sorhus](https://sindresorhus.com) 57 | -------------------------------------------------------------------------------- /node_modules/wrappy/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/wrappy/README.md: -------------------------------------------------------------------------------- 1 | # wrappy 2 | 3 | Callback wrapping utility 4 | 5 | ## USAGE 6 | 7 | ```javascript 8 | var wrappy = require("wrappy") 9 | 10 | // var wrapper = wrappy(wrapperFunction) 11 | 12 | // make sure a cb is called only once 13 | // See also: http://npm.im/once for this specific use case 14 | var once = wrappy(function (cb) { 15 | var called = false 16 | return function () { 17 | if (called) return 18 | called = true 19 | return cb.apply(this, arguments) 20 | } 21 | }) 22 | 23 | function printBoo () { 24 | console.log('boo') 25 | } 26 | // has some rando property 27 | printBoo.iAmBooPrinter = true 28 | 29 | var onlyPrintOnce = once(printBoo) 30 | 31 | onlyPrintOnce() // prints 'boo' 32 | onlyPrintOnce() // does nothing 33 | 34 | // random property is retained! 35 | assert.equal(onlyPrintOnce.iAmBooPrinter, true) 36 | ``` 37 | -------------------------------------------------------------------------------- /node_modules/wrappy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "wrappy@1.0.2", 5 | "C:\\Yossi\\GitHub\\GprSecurityAction" 6 | ] 7 | ], 8 | "_from": "wrappy@1.0.2", 9 | "_id": "wrappy@1.0.2", 10 | "_inBundle": false, 11 | "_integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 12 | "_location": "/wrappy", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "wrappy@1.0.2", 18 | "name": "wrappy", 19 | "escapedName": "wrappy", 20 | "rawSpec": "1.0.2", 21 | "saveSpec": null, 22 | "fetchSpec": "1.0.2" 23 | }, 24 | "_requiredBy": [ 25 | "/once" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 28 | "_spec": "1.0.2", 29 | "_where": "C:\\Yossi\\GitHub\\GprSecurityAction", 30 | "author": { 31 | "name": "Isaac Z. Schlueter", 32 | "email": "i@izs.me", 33 | "url": "http://blog.izs.me/" 34 | }, 35 | "bugs": { 36 | "url": "https://github.com/npm/wrappy/issues" 37 | }, 38 | "dependencies": {}, 39 | "description": "Callback wrapping utility", 40 | "devDependencies": { 41 | "tap": "^2.3.1" 42 | }, 43 | "directories": { 44 | "test": "test" 45 | }, 46 | "files": [ 47 | "wrappy.js" 48 | ], 49 | "homepage": "https://github.com/npm/wrappy", 50 | "license": "ISC", 51 | "main": "wrappy.js", 52 | "name": "wrappy", 53 | "repository": { 54 | "type": "git", 55 | "url": "git+https://github.com/npm/wrappy.git" 56 | }, 57 | "scripts": { 58 | "test": "tap --coverage test/*.js" 59 | }, 60 | "version": "1.0.2" 61 | } 62 | -------------------------------------------------------------------------------- /node_modules/wrappy/wrappy.js: -------------------------------------------------------------------------------- 1 | // Returns a wrapper function that returns a wrapped callback 2 | // The wrapper function should do some stuff, and return a 3 | // presumably different callback function. 4 | // This makes sure that own properties are retained, so that 5 | // decorations and such are not lost along the way. 6 | module.exports = wrappy 7 | function wrappy (fn, cb) { 8 | if (fn && cb) return wrappy(fn)(cb) 9 | 10 | if (typeof fn !== 'function') 11 | throw new TypeError('need wrapper function') 12 | 13 | Object.keys(fn).forEach(function (k) { 14 | wrapper[k] = fn[k] 15 | }) 16 | 17 | return wrapper 18 | 19 | function wrapper() { 20 | var args = new Array(arguments.length) 21 | for (var i = 0; i < args.length; i++) { 22 | args[i] = arguments[i] 23 | } 24 | var ret = fn.apply(this, args) 25 | var cb = args[args.length-1] 26 | if (typeof ret === 'function' && ret !== cb) { 27 | Object.keys(cb).forEach(function (k) { 28 | ret[k] = cb[k] 29 | }) 30 | } 31 | return ret 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ws-gp-security-action", 3 | "version": "19.10.1", 4 | "private": true, 5 | "description": "WhiteSource GitHub Packages security scanning action", 6 | "main": "src/main.js", 7 | "keywords": [ 8 | "actions", 9 | "github", 10 | "gp", 11 | "packages", 12 | "whitesource", 13 | "security" 14 | ], 15 | "author": "WhiteSource", 16 | "license": "Apache 2.0", 17 | "dependencies": { 18 | "@actions/core": "^1.1.1", 19 | "@actions/github": "^1.1.0", 20 | "@actions/exec": "^1.0.1", 21 | "follow-redirects": "^1.9.0" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/utilities.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const https = require('follow-redirects').https; 3 | const core = require('@actions/core'); 4 | 5 | module.exports.download = function (url, dest) { 6 | return new Promise((resolve, reject) => { 7 | var file = fs.createWriteStream(dest); 8 | https.get(url, function (response) { 9 | response.pipe(file); 10 | file.on('finish', function () { 11 | file.close(); 12 | core.info('Finished downloading file ' + url); 13 | resolve(dest); 14 | }); 15 | }).on('error', function (err) { // Handle errors 16 | core.error('Failed downloading file ' + url + '. Error: ' + err.message); 17 | fs.unlinkSync(dest); 18 | reject(err.message); 19 | }); 20 | }); 21 | }; 22 | 23 | module.exports.findSingleFile = function (directory, endsWith) { 24 | return findSingleFileRecursive(directory, endsWith); 25 | }; 26 | 27 | function findSingleFileRecursive (directory, endsWith) { 28 | let files = fs.readdirSync(directory); 29 | for(let i = 0; i < files.length; i++) { 30 | let filePath = directory + '/' + files[i]; 31 | let stat = fs.statSync(filePath); 32 | if (stat && stat.isDirectory()) { 33 | let fileName = findSingleFileRecursive(filePath, endsWith); 34 | if (fileName !== '') return fileName; 35 | } else if (filePath.endsWith(endsWith)) { 36 | return filePath; 37 | } 38 | } 39 | return ''; 40 | } --------------------------------------------------------------------------------