├── .github └── workflows │ ├── CI.yml │ └── main.yml ├── LICENSE ├── README.md ├── action.yml ├── index.js ├── logo.svg ├── node_modules ├── .bin │ ├── semver │ └── uuid ├── @actions │ ├── core │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── lib │ │ │ ├── command.d.ts │ │ │ ├── command.js │ │ │ ├── command.js.map │ │ │ ├── core.d.ts │ │ │ ├── core.js │ │ │ ├── core.js.map │ │ │ ├── file-command.d.ts │ │ │ ├── file-command.js │ │ │ ├── file-command.js.map │ │ │ ├── oidc-utils.d.ts │ │ │ ├── oidc-utils.js │ │ │ ├── oidc-utils.js.map │ │ │ ├── utils.d.ts │ │ │ ├── utils.js │ │ │ └── utils.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 │ ├── http-client │ │ ├── LICENSE │ │ ├── README.md │ │ ├── RELEASES.md │ │ ├── actions.png │ │ ├── auth.d.ts │ │ ├── auth.js │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── interfaces.d.ts │ │ ├── interfaces.js │ │ ├── package.json │ │ ├── proxy.d.ts │ │ └── proxy.js │ ├── io │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── lib │ │ │ ├── io-util.d.ts │ │ │ ├── io-util.js │ │ │ ├── io-util.js.map │ │ │ ├── io.d.ts │ │ │ ├── io.js │ │ │ └── io.js.map │ │ └── package.json │ └── tool-cache │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── lib │ │ ├── manifest.d.ts │ │ ├── manifest.js │ │ ├── manifest.js.map │ │ ├── retry-helper.d.ts │ │ ├── retry-helper.js │ │ ├── retry-helper.js.map │ │ ├── tool-cache.d.ts │ │ ├── tool-cache.js │ │ └── tool-cache.js.map │ │ ├── package.json │ │ └── scripts │ │ ├── Invoke-7zdec.ps1 │ │ └── externals │ │ └── 7zdec.exe ├── semver │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── bin │ │ └── semver.js │ ├── package.json │ ├── range.bnf │ └── semver.js ├── tunnel │ ├── .idea │ │ ├── encodings.xml │ │ ├── modules.xml │ │ ├── node-tunnel.iml │ │ ├── vcs.xml │ │ └── workspace.xml │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ │ └── tunnel.js │ └── package.json └── uuid │ ├── AUTHORS │ ├── CHANGELOG.md │ ├── LICENSE.md │ ├── README.md │ ├── bin │ └── uuid │ ├── index.js │ ├── lib │ ├── bytesToUuid.js │ ├── md5-browser.js │ ├── md5.js │ ├── rng-browser.js │ ├── rng.js │ ├── sha1-browser.js │ ├── sha1.js │ └── v35.js │ ├── package.json │ ├── v1.js │ ├── v3.js │ ├── v4.js │ └── v5.js ├── package-lock.json └── package.json /.github/workflows/CI.yml: -------------------------------------------------------------------------------- 1 | name: CI on branch 2 | 3 | # Controls when the workflow will run 4 | on: [push, workflow_dispatch, pull_request] 5 | 6 | jobs: 7 | ubuntu-ci: 8 | name: Spectral ubuntu CI 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v3 12 | - name: Install and run Spectral CI 13 | uses: ./ 14 | with: 15 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 16 | spectral-args: scan --ok 17 | ubuntu-audit: 18 | name: Spectral ubuntu audit 19 | runs-on: ubuntu-latest 20 | steps: 21 | - uses: actions/checkout@v3 22 | - name: Install and run Spectral Audit 23 | uses: ./ 24 | with: 25 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 26 | spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok 27 | macos-ci: 28 | name: Spectral macos CI 29 | runs-on: ubuntu-latest 30 | steps: 31 | - uses: actions/checkout@v3 32 | - name: Install and run Spectral CI 33 | uses: ./ 34 | with: 35 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 36 | spectral-args: scan --ok 37 | macos-audit: 38 | name: Spectral macos audit 39 | runs-on: ubuntu-latest 40 | steps: 41 | - uses: actions/checkout@v3 42 | - name: Install and run Spectral Audit 43 | uses: ./ 44 | with: 45 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 46 | spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok 47 | windows-ci: 48 | name: Spectral windows CI 49 | runs-on: windows-latest 50 | steps: 51 | - uses: actions/checkout@v3 52 | - name: Install and run Spectral CI 53 | uses: ./ 54 | with: 55 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 56 | spectral-args: scan --ok 57 | windows-audit: 58 | name: Spectral windows audit 59 | runs-on: windows-latest 60 | steps: 61 | - uses: actions/checkout@v3 62 | - name: Install and run Spectral Audit 63 | uses: ./ 64 | with: 65 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 66 | spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok 67 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI (example) 2 | 3 | # Controls when the workflow will run 4 | on: [push, workflow_dispatch] 5 | 6 | jobs: 7 | ubuntu-ci: 8 | name: Spectral ubuntu CI 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v3 12 | - name: Install and run Spectral CI 13 | uses: spectralops/spectral-github-action@v4 14 | with: 15 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 16 | spectral-args: scan --ok 17 | ubuntu-audit: 18 | name: Spectral ubuntu audit 19 | runs-on: ubuntu-latest 20 | steps: 21 | - uses: actions/checkout@v3 22 | - name: Install and run Spectral Audit 23 | uses: spectralops/spectral-github-action@v4 24 | with: 25 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 26 | spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok 27 | macos-ci: 28 | name: Spectral macos CI 29 | runs-on: ubuntu-latest 30 | steps: 31 | - uses: actions/checkout@v3 32 | - name: Install and run Spectral CI 33 | uses: spectralops/spectral-github-action@v4 34 | with: 35 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 36 | spectral-args: scan --ok 37 | macos-audit: 38 | name: Spectral macos audit 39 | runs-on: ubuntu-latest 40 | steps: 41 | - uses: actions/checkout@v3 42 | - name: Install and run Spectral Audit 43 | uses: spectralops/spectral-github-action@v4 44 | with: 45 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 46 | spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok 47 | windows-ci: 48 | name: Spectral windows CI 49 | runs-on: windows-latest 50 | steps: 51 | - uses: actions/checkout@v3 52 | - name: Install and run Spectral CI 53 | uses: spectralops/spectral-github-action@v4 54 | with: 55 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 56 | spectral-args: scan --ok 57 | windows-audit: 58 | name: Spectral windows audit 59 | runs-on: windows-latest 60 | steps: 61 | - uses: actions/checkout@v3 62 | - name: Install and run Spectral Audit 63 | uses: spectralops/spectral-github-action@v4 64 | with: 65 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 66 | spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok 67 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 SpectralOps 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. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 |
3 |
4 |

5 | 6 | SpectralOps logo 7 | 8 |

9 |

10 | 11 | 12 |

13 |

Spectral Scan

14 |

15 | 16 | # Install Spectral Scan action 17 | 18 | Spectral Scan is a single self-contained binary, that's easy to get and use. This action installs the latest Spectral version into your PATH. 19 | 20 | ## Example usage 21 | 22 | Include this Action as a step in your workflow: 23 | 24 | ``` 25 | uses: spectralops/spectral-github-action@v4 26 | with: 27 | spectral-dsn: $SPECTRAL_DSN 28 | spectral-args: scan --ok 29 | ``` 30 | 31 | You can see an example of this Action [here](https://github.com/SpectralOps/spectral-github-action/tree/main/.github/workflows/main.yml) 32 | 33 | ## Configuration 34 | 35 | You'll need to provide Spectral DSN as an input variable. You should always store your DSN in a secure way, like below in [GitHub secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets). 36 | 37 | ```yaml 38 | name: Spectral 39 | 40 | on: [push] 41 | 42 | jobs: 43 | scan: 44 | runs-on: ubuntu-latest 45 | steps: 46 | - uses: actions/checkout@v3 47 | - name: Install and run Spectral CI 48 | uses: spectralops/spectral-github-action@v4 49 | with: 50 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 51 | spectral-args: scan --ok 52 | ``` 53 | 54 | Spectral provides another scan option to audit your Github/Gitlab organization, user or repo. 55 | 56 | ```yaml 57 | name: Spectral 58 | 59 | on: [push] 60 | 61 | jobs: 62 | scan: 63 | runs-on: ubuntu-latest 64 | steps: 65 | - uses: actions/checkout@v3 66 | - name: Install and run Spectral Audit 67 | uses: spectralops/spectral-github-action@v4 68 | with: 69 | spectral-dsn: ${{ secrets.SPECTRAL_DSN }} 70 | spectral-args: github -k repo -t ${{ secrets.MY_GITHUB_TOKEN }} https://github.com/SpectralOps/spectral-github-action --include-tags base,audit --ok 71 | ``` 72 | 73 | ### How to Contribute 74 | 75 | We welcome [issues](https://github.com/SpectralOps/spectral-github-action/issues) to and [pull requests](https://github.com/SpectralOps/spectral-github-action/pulls) against this repository! 76 | 77 | ## License 78 | 79 | This project is licensed under the MIT License. See [LICENSE](LICENSE) for further details. 80 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: "Spectral Scan" 2 | description: "Automated Secrets, Misconfiguration, and IaC Misconfiguration detection by SpectralOps" 3 | inputs: 4 | spectral-dsn: 5 | description: "Your Spectral DSN" 6 | required: true 7 | spectral-args: 8 | description: "Arguments for Spectral scan" 9 | required: true 10 | branding: 11 | icon: "download" 12 | color: "purple" 13 | runs: 14 | using: "node20" 15 | main: "index.js" 16 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const core = require('@actions/core'); 2 | const io = require('@actions/io'); 3 | const tc = require('@actions/tool-cache'); 4 | const exec = require("@actions/exec").exec; 5 | 6 | const workspace = process.env.GITHUB_WORKSPACE; 7 | const spectralDsn = core.getInput('spectral-dsn') 8 | const binDir = `${workspace}/bin`; 9 | 10 | // Provide SPECTRAL_DSN to spectral binary through env 11 | core.exportVariable('SPECTRAL_DSN', spectralDsn); 12 | 13 | main().catch(error => { 14 | core.setFailed(error) 15 | }) 16 | 17 | async function main() { 18 | switch (process.platform) { 19 | case 'win32': 20 | await installExecutable(binDir) 21 | break; 22 | case 'linux': 23 | await installZip(binDir, process.platform) 24 | break; 25 | case 'darwin': 26 | await installZip(binDir, 'mac') 27 | break; 28 | default: 29 | throw new Error(`Platform: ${process.platform} is not supported`); 30 | } 31 | 32 | await core.addPath(binDir) 33 | await runSpectral() 34 | } 35 | 36 | async function downloadTool(platform) { 37 | const url = `${spectralDsn}/latest/dl/${platform}` 38 | return await tc.downloadTool(url); 39 | } 40 | 41 | async function installZip(path, platform) { 42 | await io.mkdirP(path); 43 | const downloadPath = await downloadTool(platform) 44 | await tc.extractTar(downloadPath, path) 45 | } 46 | 47 | async function installExecutable(path) { 48 | await io.mkdirP(path); 49 | const downloadPath = await downloadTool('exe') 50 | await io.mv(downloadPath, `${path}/spectral.exe`) 51 | } 52 | 53 | async function runSpectral() { 54 | const scanCommand = getScanCommand() 55 | await exec(scanCommand) 56 | } 57 | 58 | function getScanCommand() { 59 | const spectralArgs = core.getInput('spectral-args') 60 | return `${process.platform === 'win32' ? 'spectral.exe' : 'spectral'} ${spectralArgs}` 61 | } 62 | -------------------------------------------------------------------------------- /node_modules/.bin/semver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // Standalone semver comparison program. 3 | // Exits successfully and prints matching version(s) if 4 | // any supplied version is valid and passes all tests. 5 | 6 | var argv = process.argv.slice(2) 7 | 8 | var versions = [] 9 | 10 | var range = [] 11 | 12 | var inc = null 13 | 14 | var version = require('../package.json').version 15 | 16 | var loose = false 17 | 18 | var includePrerelease = false 19 | 20 | var coerce = false 21 | 22 | var rtl = false 23 | 24 | var identifier 25 | 26 | var semver = require('../semver') 27 | 28 | var reverse = false 29 | 30 | var options = {} 31 | 32 | main() 33 | 34 | function main () { 35 | if (!argv.length) return help() 36 | while (argv.length) { 37 | var a = argv.shift() 38 | var indexOfEqualSign = a.indexOf('=') 39 | if (indexOfEqualSign !== -1) { 40 | a = a.slice(0, indexOfEqualSign) 41 | argv.unshift(a.slice(indexOfEqualSign + 1)) 42 | } 43 | switch (a) { 44 | case '-rv': case '-rev': case '--rev': case '--reverse': 45 | reverse = true 46 | break 47 | case '-l': case '--loose': 48 | loose = true 49 | break 50 | case '-p': case '--include-prerelease': 51 | includePrerelease = true 52 | break 53 | case '-v': case '--version': 54 | versions.push(argv.shift()) 55 | break 56 | case '-i': case '--inc': case '--increment': 57 | switch (argv[0]) { 58 | case 'major': case 'minor': case 'patch': case 'prerelease': 59 | case 'premajor': case 'preminor': case 'prepatch': 60 | inc = argv.shift() 61 | break 62 | default: 63 | inc = 'patch' 64 | break 65 | } 66 | break 67 | case '--preid': 68 | identifier = argv.shift() 69 | break 70 | case '-r': case '--range': 71 | range.push(argv.shift()) 72 | break 73 | case '-c': case '--coerce': 74 | coerce = true 75 | break 76 | case '--rtl': 77 | rtl = true 78 | break 79 | case '--ltr': 80 | rtl = false 81 | break 82 | case '-h': case '--help': case '-?': 83 | return help() 84 | default: 85 | versions.push(a) 86 | break 87 | } 88 | } 89 | 90 | var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } 91 | 92 | versions = versions.map(function (v) { 93 | return coerce ? (semver.coerce(v, options) || { version: v }).version : v 94 | }).filter(function (v) { 95 | return semver.valid(v) 96 | }) 97 | if (!versions.length) return fail() 98 | if (inc && (versions.length !== 1 || range.length)) { return failInc() } 99 | 100 | for (var i = 0, l = range.length; i < l; i++) { 101 | versions = versions.filter(function (v) { 102 | return semver.satisfies(v, range[i], options) 103 | }) 104 | if (!versions.length) return fail() 105 | } 106 | return success(versions) 107 | } 108 | 109 | function failInc () { 110 | console.error('--inc can only be used on a single version with no range') 111 | fail() 112 | } 113 | 114 | function fail () { process.exit(1) } 115 | 116 | function success () { 117 | var compare = reverse ? 'rcompare' : 'compare' 118 | versions.sort(function (a, b) { 119 | return semver[compare](a, b, options) 120 | }).map(function (v) { 121 | return semver.clean(v, options) 122 | }).map(function (v) { 123 | return inc ? semver.inc(v, inc, options, identifier) : v 124 | }).forEach(function (v, i, _) { console.log(v) }) 125 | } 126 | 127 | function help () { 128 | console.log(['SemVer ' + version, 129 | '', 130 | 'A JavaScript implementation of the https://semver.org/ specification', 131 | 'Copyright Isaac Z. Schlueter', 132 | '', 133 | 'Usage: semver [options] [ [...]]', 134 | 'Prints valid versions sorted by SemVer precedence', 135 | '', 136 | 'Options:', 137 | '-r --range ', 138 | ' Print versions that match the specified range.', 139 | '', 140 | '-i --increment []', 141 | ' Increment a version by the specified level. Level can', 142 | ' be one of: major, minor, patch, premajor, preminor,', 143 | " prepatch, or prerelease. Default level is 'patch'.", 144 | ' Only one version may be specified.', 145 | '', 146 | '--preid ', 147 | ' Identifier to be used to prefix premajor, preminor,', 148 | ' prepatch or prerelease version increments.', 149 | '', 150 | '-l --loose', 151 | ' Interpret versions and ranges loosely', 152 | '', 153 | '-p --include-prerelease', 154 | ' Always include prerelease versions in range matching', 155 | '', 156 | '-c --coerce', 157 | ' Coerce a string into SemVer if possible', 158 | ' (does not imply --loose)', 159 | '', 160 | '--rtl', 161 | ' Coerce version strings right to left', 162 | '', 163 | '--ltr', 164 | ' Coerce version strings left to right (default)', 165 | '', 166 | 'Program exits successfully if any valid version satisfies', 167 | 'all supplied ranges, and prints all satisfying versions.', 168 | '', 169 | 'If no satisfying versions are found, then exits failure.', 170 | '', 171 | 'Versions are printed in ascending order, so supplying', 172 | 'multiple versions to the utility will just sort them.' 173 | ].join('\n')) 174 | } 175 | -------------------------------------------------------------------------------- /node_modules/.bin/uuid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var assert = require('assert'); 3 | 4 | function usage() { 5 | console.log('Usage:'); 6 | console.log(' uuid'); 7 | console.log(' uuid v1'); 8 | console.log(' uuid v3 '); 9 | console.log(' uuid v4'); 10 | console.log(' uuid v5 '); 11 | console.log(' uuid --help'); 12 | console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); 13 | } 14 | 15 | var args = process.argv.slice(2); 16 | 17 | if (args.indexOf('--help') >= 0) { 18 | usage(); 19 | process.exit(0); 20 | } 21 | var version = args.shift() || 'v4'; 22 | 23 | switch (version) { 24 | case 'v1': 25 | var uuidV1 = require('../v1'); 26 | console.log(uuidV1()); 27 | break; 28 | 29 | case 'v3': 30 | var uuidV3 = require('../v3'); 31 | 32 | var name = args.shift(); 33 | var namespace = args.shift(); 34 | assert(name != null, 'v3 name not specified'); 35 | assert(namespace != null, 'v3 namespace not specified'); 36 | 37 | if (namespace == 'URL') namespace = uuidV3.URL; 38 | if (namespace == 'DNS') namespace = uuidV3.DNS; 39 | 40 | console.log(uuidV3(name, namespace)); 41 | break; 42 | 43 | case 'v4': 44 | var uuidV4 = require('../v4'); 45 | console.log(uuidV4()); 46 | break; 47 | 48 | case 'v5': 49 | var uuidV5 = require('../v5'); 50 | 51 | var name = args.shift(); 52 | var namespace = args.shift(); 53 | assert(name != null, 'v5 name not specified'); 54 | assert(namespace != null, 'v5 namespace not specified'); 55 | 56 | if (namespace == 'URL') namespace = uuidV5.URL; 57 | if (namespace == 'DNS') namespace = uuidV5.DNS; 58 | 59 | console.log(uuidV5(name, namespace)); 60 | break; 61 | 62 | default: 63 | usage(); 64 | process.exit(1); 65 | } 66 | -------------------------------------------------------------------------------- /node_modules/@actions/core/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2019 GitHub 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. -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.d.ts: -------------------------------------------------------------------------------- 1 | export interface CommandProperties { 2 | [key: string]: any; 3 | } 4 | /** 5 | * Commands 6 | * 7 | * Command Format: 8 | * ::name key=value,key=value::message 9 | * 10 | * Examples: 11 | * ::warning::This is the message 12 | * ::set-env name=MY_VAR::some value 13 | */ 14 | export declare function issueCommand(command: string, properties: CommandProperties, message: any): void; 15 | export declare function issue(name: string, message?: string): void; 16 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 5 | }) : (function(o, m, k, k2) { 6 | if (k2 === undefined) k2 = k; 7 | o[k2] = m[k]; 8 | })); 9 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 10 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 11 | }) : function(o, v) { 12 | o["default"] = v; 13 | }); 14 | var __importStar = (this && this.__importStar) || function (mod) { 15 | if (mod && mod.__esModule) return mod; 16 | var result = {}; 17 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 18 | __setModuleDefault(result, mod); 19 | return result; 20 | }; 21 | Object.defineProperty(exports, "__esModule", { value: true }); 22 | exports.issue = exports.issueCommand = void 0; 23 | const os = __importStar(require("os")); 24 | const utils_1 = require("./utils"); 25 | /** 26 | * Commands 27 | * 28 | * Command Format: 29 | * ::name key=value,key=value::message 30 | * 31 | * Examples: 32 | * ::warning::This is the message 33 | * ::set-env name=MY_VAR::some value 34 | */ 35 | function issueCommand(command, properties, message) { 36 | const cmd = new Command(command, properties, message); 37 | process.stdout.write(cmd.toString() + os.EOL); 38 | } 39 | exports.issueCommand = issueCommand; 40 | function issue(name, message = '') { 41 | issueCommand(name, {}, message); 42 | } 43 | exports.issue = issue; 44 | const CMD_STRING = '::'; 45 | class Command { 46 | constructor(command, properties, message) { 47 | if (!command) { 48 | command = 'missing.command'; 49 | } 50 | this.command = command; 51 | this.properties = properties; 52 | this.message = message; 53 | } 54 | toString() { 55 | let cmdStr = CMD_STRING + this.command; 56 | if (this.properties && Object.keys(this.properties).length > 0) { 57 | cmdStr += ' '; 58 | let first = true; 59 | for (const key in this.properties) { 60 | if (this.properties.hasOwnProperty(key)) { 61 | const val = this.properties[key]; 62 | if (val) { 63 | if (first) { 64 | first = false; 65 | } 66 | else { 67 | cmdStr += ','; 68 | } 69 | cmdStr += `${key}=${escapeProperty(val)}`; 70 | } 71 | } 72 | } 73 | } 74 | cmdStr += `${CMD_STRING}${escapeData(this.message)}`; 75 | return cmdStr; 76 | } 77 | } 78 | function escapeData(s) { 79 | return utils_1.toCommandValue(s) 80 | .replace(/%/g, '%25') 81 | .replace(/\r/g, '%0D') 82 | .replace(/\n/g, '%0A'); 83 | } 84 | function escapeProperty(s) { 85 | return utils_1.toCommandValue(s) 86 | .replace(/%/g, '%25') 87 | .replace(/\r/g, '%0D') 88 | .replace(/\n/g, '%0A') 89 | .replace(/:/g, '%3A') 90 | .replace(/,/g, '%2C'); 91 | } 92 | //# sourceMappingURL=command.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/command.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA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BACP,IAAI,KAAK,EAAE;4BACT,KAAK,GAAG,KAAK,CAAA;yBACd;6BAAM;4BACL,MAAM,IAAI,GAAG,CAAA;yBACd;wBAED,MAAM,IAAI,GAAG,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,CAAA;qBAC1C;iBACF;aACF;SACF;QAED,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAA;QACpD,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAM;IACxB,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,CAAM;IAC5B,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,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/core/lib/core.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Interface for getInput options 3 | */ 4 | export interface InputOptions { 5 | /** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */ 6 | required?: boolean; 7 | /** Optional. Whether leading/trailing whitespace will be trimmed for the input. Defaults to true */ 8 | trimWhitespace?: boolean; 9 | } 10 | /** 11 | * The code to exit an action 12 | */ 13 | export declare enum ExitCode { 14 | /** 15 | * A code indicating that the action was successful 16 | */ 17 | Success = 0, 18 | /** 19 | * A code indicating that the action was a failure 20 | */ 21 | Failure = 1 22 | } 23 | /** 24 | * Optional properties that can be sent with annotatation commands (notice, error, and warning) 25 | * See: https://docs.github.com/en/rest/reference/checks#create-a-check-run for more information about annotations. 26 | */ 27 | export interface AnnotationProperties { 28 | /** 29 | * A title for the annotation. 30 | */ 31 | title?: string; 32 | /** 33 | * The path of the file for which the annotation should be created. 34 | */ 35 | file?: string; 36 | /** 37 | * The start line for the annotation. 38 | */ 39 | startLine?: number; 40 | /** 41 | * The end line for the annotation. Defaults to `startLine` when `startLine` is provided. 42 | */ 43 | endLine?: number; 44 | /** 45 | * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. 46 | */ 47 | startColumn?: number; 48 | /** 49 | * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. 50 | * Defaults to `startColumn` when `startColumn` is provided. 51 | */ 52 | endColumn?: number; 53 | } 54 | /** 55 | * Sets env variable for this action and future actions in the job 56 | * @param name the name of the variable to set 57 | * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify 58 | */ 59 | export declare function exportVariable(name: string, val: any): void; 60 | /** 61 | * Registers a secret which will get masked from logs 62 | * @param secret value of the secret 63 | */ 64 | export declare function setSecret(secret: string): void; 65 | /** 66 | * Prepends inputPath to the PATH (for this action and future actions) 67 | * @param inputPath 68 | */ 69 | export declare function addPath(inputPath: string): void; 70 | /** 71 | * Gets the value of an input. 72 | * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. 73 | * Returns an empty string if the value is not defined. 74 | * 75 | * @param name name of the input to get 76 | * @param options optional. See InputOptions. 77 | * @returns string 78 | */ 79 | export declare function getInput(name: string, options?: InputOptions): string; 80 | /** 81 | * Gets the values of an multiline input. Each value is also trimmed. 82 | * 83 | * @param name name of the input to get 84 | * @param options optional. See InputOptions. 85 | * @returns string[] 86 | * 87 | */ 88 | export declare function getMultilineInput(name: string, options?: InputOptions): string[]; 89 | /** 90 | * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. 91 | * Support boolean input list: `true | True | TRUE | false | False | FALSE` . 92 | * The return value is also in boolean type. 93 | * ref: https://yaml.org/spec/1.2/spec.html#id2804923 94 | * 95 | * @param name name of the input to get 96 | * @param options optional. See InputOptions. 97 | * @returns boolean 98 | */ 99 | export declare function getBooleanInput(name: string, options?: InputOptions): boolean; 100 | /** 101 | * Sets the value of an output. 102 | * 103 | * @param name name of the output to set 104 | * @param value value to store. Non-string values will be converted to a string via JSON.stringify 105 | */ 106 | export declare function setOutput(name: string, value: any): void; 107 | /** 108 | * Enables or disables the echoing of commands into stdout for the rest of the step. 109 | * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. 110 | * 111 | */ 112 | export declare function setCommandEcho(enabled: boolean): void; 113 | /** 114 | * Sets the action status to failed. 115 | * When the action exits it will be with an exit code of 1 116 | * @param message add error issue message 117 | */ 118 | export declare function setFailed(message: string | Error): void; 119 | /** 120 | * Gets whether Actions Step Debug is on or not 121 | */ 122 | export declare function isDebug(): boolean; 123 | /** 124 | * Writes debug message to user log 125 | * @param message debug message 126 | */ 127 | export declare function debug(message: string): void; 128 | /** 129 | * Adds an error issue 130 | * @param message error issue message. Errors will be converted to string via toString() 131 | * @param properties optional properties to add to the annotation. 132 | */ 133 | export declare function error(message: string | Error, properties?: AnnotationProperties): void; 134 | /** 135 | * Adds a warning issue 136 | * @param message warning issue message. Errors will be converted to string via toString() 137 | * @param properties optional properties to add to the annotation. 138 | */ 139 | export declare function warning(message: string | Error, properties?: AnnotationProperties): void; 140 | /** 141 | * Adds a notice issue 142 | * @param message notice issue message. Errors will be converted to string via toString() 143 | * @param properties optional properties to add to the annotation. 144 | */ 145 | export declare function notice(message: string | Error, properties?: AnnotationProperties): void; 146 | /** 147 | * Writes info to log with console.log. 148 | * @param message info message 149 | */ 150 | export declare function info(message: string): void; 151 | /** 152 | * Begin an output group. 153 | * 154 | * Output until the next `groupEnd` will be foldable in this group 155 | * 156 | * @param name The name of the output group 157 | */ 158 | export declare function startGroup(name: string): void; 159 | /** 160 | * End an output group. 161 | */ 162 | export declare function endGroup(): void; 163 | /** 164 | * Wrap an asynchronous function call in a group. 165 | * 166 | * Returns the same type as the function itself. 167 | * 168 | * @param name The name of the group 169 | * @param fn The function to wrap in the group 170 | */ 171 | export declare function group(name: string, fn: () => Promise): Promise; 172 | /** 173 | * Saves state for current action, the state can only be retrieved by this action's post job execution. 174 | * 175 | * @param name name of the state to store 176 | * @param value value to store. Non-string values will be converted to a string via JSON.stringify 177 | */ 178 | export declare function saveState(name: string, value: any): void; 179 | /** 180 | * Gets the value of an state set by this action's main execution. 181 | * 182 | * @param name name of the state to get 183 | * @returns string 184 | */ 185 | export declare function getState(name: string): string; 186 | export declare function getIDToken(aud?: string): Promise; 187 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/core.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA6C;AAC7C,iDAA+D;AAC/D,mCAA2D;AAE3D,uCAAwB;AACxB,2CAA4B;AAE5B,6CAAuC;AAavC;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAuCD,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,8DAA8D;AAC9D,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAQ;IACnD,MAAM,YAAY,GAAG,sBAAc,CAAC,GAAG,CAAC,CAAA;IACxC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,YAAY,CAAA;IAEhC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;IAChD,IAAI,QAAQ,EAAE;QACZ,MAAM,SAAS,GAAG,qCAAqC,CAAA;QACvD,MAAM,YAAY,GAAG,GAAG,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AAFD,gCAEC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/file-command.d.ts: -------------------------------------------------------------------------------- 1 | export declare function issueCommand(command: string, message: any): void; 2 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/file-command.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | // For internal use, subject to change. 3 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 4 | if (k2 === undefined) k2 = k; 5 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 6 | }) : (function(o, m, k, k2) { 7 | if (k2 === undefined) k2 = k; 8 | o[k2] = m[k]; 9 | })); 10 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 11 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 12 | }) : function(o, v) { 13 | o["default"] = v; 14 | }); 15 | var __importStar = (this && this.__importStar) || function (mod) { 16 | if (mod && mod.__esModule) return mod; 17 | var result = {}; 18 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 19 | __setModuleDefault(result, mod); 20 | return result; 21 | }; 22 | Object.defineProperty(exports, "__esModule", { value: true }); 23 | exports.issueCommand = void 0; 24 | // We use any as a valid input type 25 | /* eslint-disable @typescript-eslint/no-explicit-any */ 26 | const fs = __importStar(require("fs")); 27 | const os = __importStar(require("os")); 28 | const utils_1 = require("./utils"); 29 | function issueCommand(command, message) { 30 | const filePath = process.env[`GITHUB_${command}`]; 31 | if (!filePath) { 32 | throw new Error(`Unable to find environment variable for file command ${command}`); 33 | } 34 | if (!fs.existsSync(filePath)) { 35 | throw new Error(`Missing file at path: ${filePath}`); 36 | } 37 | fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { 38 | encoding: 'utf8' 39 | }); 40 | } 41 | exports.issueCommand = issueCommand; 42 | //# sourceMappingURL=file-command.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/file-command.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"file-command.js","sourceRoot":"","sources":["../src/file-command.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;;;;;;;;;;;;;;;;;;;;AAEvC,mCAAmC;AACnC,uDAAuD;AAEvD,uCAAwB;AACxB,uCAAwB;AACxB,mCAAsC;AAEtC,SAAgB,YAAY,CAAC,OAAe,EAAE,OAAY;IACxD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAA;IACjD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CACb,wDAAwD,OAAO,EAAE,CAClE,CAAA;KACF;IACD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAA;KACrD;IAED,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,sBAAc,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;QACjE,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAA;AACJ,CAAC;AAdD,oCAcC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/oidc-utils.d.ts: -------------------------------------------------------------------------------- 1 | export declare class OidcClient { 2 | private static createHttpClient; 3 | private static getRequestToken; 4 | private static getIDTokenUrl; 5 | private static getCall; 6 | static getIDToken(audience?: string): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/oidc-utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 | return new (P || (P = Promise))(function (resolve, reject) { 5 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 | }); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.OidcClient = void 0; 13 | const http_client_1 = require("@actions/http-client"); 14 | const auth_1 = require("@actions/http-client/auth"); 15 | const core_1 = require("./core"); 16 | class OidcClient { 17 | static createHttpClient(allowRetry = true, maxRetry = 10) { 18 | const requestOptions = { 19 | allowRetries: allowRetry, 20 | maxRetries: maxRetry 21 | }; 22 | return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); 23 | } 24 | static getRequestToken() { 25 | const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; 26 | if (!token) { 27 | throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); 28 | } 29 | return token; 30 | } 31 | static getIDTokenUrl() { 32 | const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; 33 | if (!runtimeUrl) { 34 | throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); 35 | } 36 | return runtimeUrl; 37 | } 38 | static getCall(id_token_url) { 39 | var _a; 40 | return __awaiter(this, void 0, void 0, function* () { 41 | const httpclient = OidcClient.createHttpClient(); 42 | const res = yield httpclient 43 | .getJson(id_token_url) 44 | .catch(error => { 45 | throw new Error(`Failed to get ID Token. \n 46 | Error Code : ${error.statusCode}\n 47 | Error Message: ${error.result.message}`); 48 | }); 49 | const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; 50 | if (!id_token) { 51 | throw new Error('Response json body do not have ID Token field'); 52 | } 53 | return id_token; 54 | }); 55 | } 56 | static getIDToken(audience) { 57 | return __awaiter(this, void 0, void 0, function* () { 58 | try { 59 | // New ID Token is requested from action service 60 | let id_token_url = OidcClient.getIDTokenUrl(); 61 | if (audience) { 62 | const encodedAudience = encodeURIComponent(audience); 63 | id_token_url = `${id_token_url}&audience=${encodedAudience}`; 64 | } 65 | core_1.debug(`ID token url is ${id_token_url}`); 66 | const id_token = yield OidcClient.getCall(id_token_url); 67 | core_1.setSecret(id_token); 68 | return id_token; 69 | } 70 | catch (error) { 71 | throw new Error(`Error message: ${error.message}`); 72 | } 73 | }); 74 | } 75 | } 76 | exports.OidcClient = OidcClient; 77 | //# sourceMappingURL=oidc-utils.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/oidc-utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"oidc-utils.js","sourceRoot":"","sources":["../src/oidc-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,sDAA+C;AAC/C,oDAAiE;AACjE,iCAAuC;AAKvC,MAAa,UAAU;IACb,MAAM,CAAC,gBAAgB,CAC7B,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,EAAE;QAEb,MAAM,cAAc,GAAoB;YACtC,YAAY,EAAE,UAAU;YACxB,UAAU,EAAE,QAAQ;SACrB,CAAA;QAED,OAAO,IAAI,wBAAU,CACnB,qBAAqB,EACrB,CAAC,IAAI,8BAAuB,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC,EAC3D,cAAc,CACf,CAAA;IACH,CAAC;IAEO,MAAM,CAAC,eAAe;QAC5B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;QAC3D,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CACb,2DAA2D,CAC5D,CAAA;SACF;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAEO,MAAM,CAAC,aAAa;QAC1B,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAA;QAC9D,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;SAC3E;QACD,OAAO,UAAU,CAAA;IACnB,CAAC;IAEO,MAAM,CAAO,OAAO,CAAC,YAAoB;;;YAC/C,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAA;YAEhD,MAAM,GAAG,GAAG,MAAM,UAAU;iBACzB,OAAO,CAAgB,YAAY,CAAC;iBACpC,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,MAAM,IAAI,KAAK,CACb;uBACa,KAAK,CAAC,UAAU;yBACd,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CACtC,CAAA;YACH,CAAC,CAAC,CAAA;YAEJ,MAAM,QAAQ,SAAG,GAAG,CAAC,MAAM,0CAAE,KAAK,CAAA;YAClC,IAAI,CAAC,QAAQ,EAAE;gBACb,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;aACjE;YACD,OAAO,QAAQ,CAAA;;KAChB;IAED,MAAM,CAAO,UAAU,CAAC,QAAiB;;YACvC,IAAI;gBACF,gDAAgD;gBAChD,IAAI,YAAY,GAAW,UAAU,CAAC,aAAa,EAAE,CAAA;gBACrD,IAAI,QAAQ,EAAE;oBACZ,MAAM,eAAe,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;oBACpD,YAAY,GAAG,GAAG,YAAY,aAAa,eAAe,EAAE,CAAA;iBAC7D;gBAED,YAAK,CAAC,mBAAmB,YAAY,EAAE,CAAC,CAAA;gBAExC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;gBACvD,gBAAS,CAAC,QAAQ,CAAC,CAAA;gBACnB,OAAO,QAAQ,CAAA;aAChB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,IAAI,KAAK,CAAC,kBAAkB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;aACnD;QACH,CAAC;KAAA;CACF;AAzED,gCAyEC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/utils.d.ts: -------------------------------------------------------------------------------- 1 | import { AnnotationProperties } from './core'; 2 | import { CommandProperties } from './command'; 3 | /** 4 | * Sanitizes an input into a string so it can be passed into issueCommand safely 5 | * @param input input to sanitize into a string 6 | */ 7 | export declare function toCommandValue(input: any): string; 8 | /** 9 | * 10 | * @param annotationProperties 11 | * @returns The command properties to send with the actual annotation command 12 | * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 13 | */ 14 | export declare function toCommandProperties(annotationProperties: AnnotationProperties): CommandProperties; 15 | -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | // We use any as a valid input type 3 | /* eslint-disable @typescript-eslint/no-explicit-any */ 4 | Object.defineProperty(exports, "__esModule", { value: true }); 5 | exports.toCommandProperties = exports.toCommandValue = void 0; 6 | /** 7 | * Sanitizes an input into a string so it can be passed into issueCommand safely 8 | * @param input input to sanitize into a string 9 | */ 10 | function toCommandValue(input) { 11 | if (input === null || input === undefined) { 12 | return ''; 13 | } 14 | else if (typeof input === 'string' || input instanceof String) { 15 | return input; 16 | } 17 | return JSON.stringify(input); 18 | } 19 | exports.toCommandValue = toCommandValue; 20 | /** 21 | * 22 | * @param annotationProperties 23 | * @returns The command properties to send with the actual annotation command 24 | * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 25 | */ 26 | function toCommandProperties(annotationProperties) { 27 | if (!Object.keys(annotationProperties).length) { 28 | return {}; 29 | } 30 | return { 31 | title: annotationProperties.title, 32 | file: annotationProperties.file, 33 | line: annotationProperties.startLine, 34 | endLine: annotationProperties.endLine, 35 | col: annotationProperties.startColumn, 36 | endColumn: annotationProperties.endColumn 37 | }; 38 | } 39 | exports.toCommandProperties = toCommandProperties; 40 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /node_modules/@actions/core/lib/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,uDAAuD;;;AAKvD;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAAU;IACvC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;QACzC,OAAO,EAAE,CAAA;KACV;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,EAAE;QAC/D,OAAO,KAAe,CAAA;KACvB;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC;AAPD,wCAOC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,oBAA0C;IAE1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,EAAE;QAC7C,OAAO,EAAE,CAAA;KACV;IAED,OAAO;QACL,KAAK,EAAE,oBAAoB,CAAC,KAAK;QACjC,IAAI,EAAE,oBAAoB,CAAC,IAAI;QAC/B,IAAI,EAAE,oBAAoB,CAAC,SAAS;QACpC,OAAO,EAAE,oBAAoB,CAAC,OAAO;QACrC,GAAG,EAAE,oBAAoB,CAAC,WAAW;QACrC,SAAS,EAAE,oBAAoB,CAAC,SAAS;KAC1C,CAAA;AACH,CAAC;AAfD,kDAeC"} -------------------------------------------------------------------------------- /node_modules/@actions/core/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@actions/core@1.6.0", 5 | "/Users/guylevintal/Desktop/Git/spectral-github-action" 6 | ] 7 | ], 8 | "_from": "@actions/core@1.6.0", 9 | "_id": "@actions/core@1.6.0", 10 | "_inBundle": false, 11 | "_integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==", 12 | "_location": "/@actions/core", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "@actions/core@1.6.0", 18 | "name": "@actions/core", 19 | "escapedName": "@actions%2fcore", 20 | "scope": "@actions", 21 | "rawSpec": "1.6.0", 22 | "saveSpec": null, 23 | "fetchSpec": "1.6.0" 24 | }, 25 | "_requiredBy": [ 26 | "/", 27 | "/@actions/tool-cache" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz", 30 | "_spec": "1.6.0", 31 | "_where": "/Users/guylevintal/Desktop/Git/spectral-github-action", 32 | "bugs": { 33 | "url": "https://github.com/actions/toolkit/issues" 34 | }, 35 | "dependencies": { 36 | "@actions/http-client": "^1.0.11" 37 | }, 38 | "description": "Actions core lib", 39 | "devDependencies": { 40 | "@types/node": "^12.0.2" 41 | }, 42 | "directories": { 43 | "lib": "lib", 44 | "test": "__tests__" 45 | }, 46 | "files": [ 47 | "lib", 48 | "!.DS_Store" 49 | ], 50 | "homepage": "https://github.com/actions/toolkit/tree/main/packages/core", 51 | "keywords": [ 52 | "github", 53 | "actions", 54 | "core" 55 | ], 56 | "license": "MIT", 57 | "main": "lib/core.js", 58 | "name": "@actions/core", 59 | "publishConfig": { 60 | "access": "public" 61 | }, 62 | "repository": { 63 | "type": "git", 64 | "url": "git+https://github.com/actions/toolkit.git", 65 | "directory": "packages/core" 66 | }, 67 | "scripts": { 68 | "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", 69 | "test": "echo \"Error: run tests from root\" && exit 1", 70 | "tsc": "tsc" 71 | }, 72 | "types": "lib/core.d.ts", 73 | "version": "1.6.0" 74 | } 75 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2019 GitHub 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. -------------------------------------------------------------------------------- /node_modules/@actions/exec/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/exec` 2 | 3 | ## Usage 4 | 5 | #### Basic 6 | 7 | You can use this package to execute tools 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 specify the full path for tools not in the PATH: 52 | 53 | ```js 54 | const exec = require('@actions/exec'); 55 | 56 | await exec.exec('"/path/to/my-tool"', ['arg1']); 57 | ``` 58 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.d.ts: -------------------------------------------------------------------------------- 1 | import { ExecOptions, ExecOutput, ExecListeners } from './interfaces'; 2 | export { ExecOptions, ExecOutput, ExecListeners }; 3 | /** 4 | * Exec a command. 5 | * Output will be streamed to the live console. 6 | * Returns promise with return code 7 | * 8 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 9 | * @param args optional arguments for tool. Escaping is handled by the lib. 10 | * @param options optional exec options. See ExecOptions 11 | * @returns Promise exit code 12 | */ 13 | export declare function exec(commandLine: string, args?: string[], options?: ExecOptions): Promise; 14 | /** 15 | * Exec a command and get the output. 16 | * Output will be streamed to the live console. 17 | * Returns promise with the exit code and collected stdout and stderr 18 | * 19 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 20 | * @param args optional arguments for tool. Escaping is handled by the lib. 21 | * @param options optional exec options. See ExecOptions 22 | * @returns Promise exit code, stdout, and stderr 23 | */ 24 | export declare function getExecOutput(commandLine: string, args?: string[], options?: ExecOptions): Promise; 25 | -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 5 | }) : (function(o, m, k, k2) { 6 | if (k2 === undefined) k2 = k; 7 | o[k2] = m[k]; 8 | })); 9 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 10 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 11 | }) : function(o, v) { 12 | o["default"] = v; 13 | }); 14 | var __importStar = (this && this.__importStar) || function (mod) { 15 | if (mod && mod.__esModule) return mod; 16 | var result = {}; 17 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 18 | __setModuleDefault(result, mod); 19 | return result; 20 | }; 21 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 22 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 23 | return new (P || (P = Promise))(function (resolve, reject) { 24 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 25 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 26 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 27 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 28 | }); 29 | }; 30 | Object.defineProperty(exports, "__esModule", { value: true }); 31 | exports.getExecOutput = exports.exec = void 0; 32 | const string_decoder_1 = require("string_decoder"); 33 | const tr = __importStar(require("./toolrunner")); 34 | /** 35 | * Exec a command. 36 | * Output will be streamed to the live console. 37 | * Returns promise with return code 38 | * 39 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 40 | * @param args optional arguments for tool. Escaping is handled by the lib. 41 | * @param options optional exec options. See ExecOptions 42 | * @returns Promise exit code 43 | */ 44 | function exec(commandLine, args, options) { 45 | return __awaiter(this, void 0, void 0, function* () { 46 | const commandArgs = tr.argStringToArray(commandLine); 47 | if (commandArgs.length === 0) { 48 | throw new Error(`Parameter 'commandLine' cannot be null or empty.`); 49 | } 50 | // Path to tool to execute should be first arg 51 | const toolPath = commandArgs[0]; 52 | args = commandArgs.slice(1).concat(args || []); 53 | const runner = new tr.ToolRunner(toolPath, args, options); 54 | return runner.exec(); 55 | }); 56 | } 57 | exports.exec = exec; 58 | /** 59 | * Exec a command and get the output. 60 | * Output will be streamed to the live console. 61 | * Returns promise with the exit code and collected stdout and stderr 62 | * 63 | * @param commandLine command to execute (can include additional args). Must be correctly escaped. 64 | * @param args optional arguments for tool. Escaping is handled by the lib. 65 | * @param options optional exec options. See ExecOptions 66 | * @returns Promise exit code, stdout, and stderr 67 | */ 68 | function getExecOutput(commandLine, args, options) { 69 | var _a, _b; 70 | return __awaiter(this, void 0, void 0, function* () { 71 | let stdout = ''; 72 | let stderr = ''; 73 | //Using string decoder covers the case where a mult-byte character is split 74 | const stdoutDecoder = new string_decoder_1.StringDecoder('utf8'); 75 | const stderrDecoder = new string_decoder_1.StringDecoder('utf8'); 76 | const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; 77 | const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; 78 | const stdErrListener = (data) => { 79 | stderr += stderrDecoder.write(data); 80 | if (originalStdErrListener) { 81 | originalStdErrListener(data); 82 | } 83 | }; 84 | const stdOutListener = (data) => { 85 | stdout += stdoutDecoder.write(data); 86 | if (originalStdoutListener) { 87 | originalStdoutListener(data); 88 | } 89 | }; 90 | const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); 91 | const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); 92 | //flush any remaining characters 93 | stdout += stdoutDecoder.end(); 94 | stderr += stderrDecoder.end(); 95 | return { 96 | exitCode, 97 | stdout, 98 | stderr 99 | }; 100 | }); 101 | } 102 | exports.getExecOutput = getExecOutput; 103 | //# sourceMappingURL=exec.js.map -------------------------------------------------------------------------------- /node_modules/@actions/exec/lib/exec.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"exec.js","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAA4C;AAE5C,iDAAkC;AAIlC;;;;;;;;;GASG;AACH,SAAsB,IAAI,CACxB,WAAmB,EACnB,IAAe,EACf,OAAqB;;QAErB,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,M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OAAO,uBAAP,OAAO,CAAE,SAAS,KACrB,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACvB,CAAA;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,IAAI,kCAAM,OAAO,KAAE,SAAS,IAAE,CAAA;QAEvE,gCAAgC;QAChC,MAAM,IAAI,aAAa,CAAC,GAAG,EAAE,CAAA;QAC7B,MAAM,IAAI,aAAa,CAAC,GAAG,EAAE,CAAA;QAE7B,OAAO;YACL,QAAQ;YACR,MAAM;YACN,MAAM;SACP,CAAA;;CACF;AA9CD,sCA8CC"} -------------------------------------------------------------------------------- /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. input to write to the process on STDIN. */ 28 | input?: Buffer; 29 | /** optional. Listeners for output. Callback functions that will be called on these events */ 30 | listeners?: ExecListeners; 31 | } 32 | /** 33 | * Interface for the output of getExecOutput() 34 | */ 35 | export interface ExecOutput { 36 | /**The exit code of the process */ 37 | exitCode: number; 38 | /**The entire stdout of the process as a string */ 39 | stdout: string; 40 | /**The entire stderr of the process as a string */ 41 | stderr: string; 42 | } 43 | /** 44 | * The user defined listeners for an exec call 45 | */ 46 | export interface ExecListeners { 47 | /** A call back for each buffer of stdout */ 48 | stdout?: (data: Buffer) => void; 49 | /** A call back for each buffer of stderr */ 50 | stderr?: (data: Buffer) => void; 51 | /** A call back for each line of stdout */ 52 | stdline?: (data: string) => void; 53 | /** A call back for each line of stderr */ 54 | errline?: (data: string) => void; 55 | /** A call back for each debug log */ 56 | debug?: (data: string) => void; 57 | } 58 | -------------------------------------------------------------------------------- /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/exec/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@actions/exec@1.1.0", 5 | "/Users/guylevintal/Desktop/Git/spectral-github-action" 6 | ] 7 | ], 8 | "_from": "@actions/exec@1.1.0", 9 | "_id": "@actions/exec@1.1.0", 10 | "_inBundle": false, 11 | "_integrity": "sha512-LImpN9AY0J1R1mEYJjVJfSZWU4zYOlEcwSTgPve1rFQqK5AwrEs6uWW5Rv70gbDIQIAUwI86z6B+9mPK4w9Sbg==", 12 | "_location": "/@actions/exec", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "@actions/exec@1.1.0", 18 | "name": "@actions/exec", 19 | "escapedName": "@actions%2fexec", 20 | "scope": "@actions", 21 | "rawSpec": "1.1.0", 22 | "saveSpec": null, 23 | "fetchSpec": "1.1.0" 24 | }, 25 | "_requiredBy": [ 26 | "/@actions/tool-cache" 27 | ], 28 | "_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.0.tgz", 29 | "_spec": "1.1.0", 30 | "_where": "/Users/guylevintal/Desktop/Git/spectral-github-action", 31 | "bugs": { 32 | "url": "https://github.com/actions/toolkit/issues" 33 | }, 34 | "dependencies": { 35 | "@actions/io": "^1.0.1" 36 | }, 37 | "description": "Actions exec lib", 38 | "directories": { 39 | "lib": "lib", 40 | "test": "__tests__" 41 | }, 42 | "files": [ 43 | "lib", 44 | "!.DS_Store" 45 | ], 46 | "homepage": "https://github.com/actions/toolkit/tree/main/packages/exec", 47 | "keywords": [ 48 | "github", 49 | "actions", 50 | "exec" 51 | ], 52 | "license": "MIT", 53 | "main": "lib/exec.js", 54 | "name": "@actions/exec", 55 | "publishConfig": { 56 | "access": "public" 57 | }, 58 | "repository": { 59 | "type": "git", 60 | "url": "git+https://github.com/actions/toolkit.git", 61 | "directory": "packages/exec" 62 | }, 63 | "scripts": { 64 | "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", 65 | "test": "echo \"Error: run tests from root\" && exit 1", 66 | "tsc": "tsc" 67 | }, 68 | "types": "lib/exec.d.ts", 69 | "version": "1.1.0" 70 | } 71 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/LICENSE: -------------------------------------------------------------------------------- 1 | Actions Http Client for Node.js 2 | 3 | Copyright (c) GitHub, Inc. 4 | 5 | All rights reserved. 6 | 7 | MIT License 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 10 | associated documentation files (the "Software"), to deal in the Software without restriction, 11 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 13 | subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 18 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 19 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/README.md: -------------------------------------------------------------------------------- 1 | 2 |

3 | 4 |

5 | 6 | # Actions Http-Client 7 | 8 | [![Http Status](https://github.com/actions/http-client/workflows/http-tests/badge.svg)](https://github.com/actions/http-client/actions) 9 | 10 | A lightweight HTTP client optimized for use with actions, TypeScript with generics and async await. 11 | 12 | ## Features 13 | 14 | - HTTP client with TypeScript generics and async/await/Promises 15 | - Typings included so no need to acquire separately (great for intellisense and no versioning drift) 16 | - [Proxy support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners#using-a-proxy-server-with-self-hosted-runners) just works with actions and the runner 17 | - Targets ES2019 (runner runs actions with node 12+). Only supported on node 12+. 18 | - Basic, Bearer and PAT Support out of the box. Extensible handlers for others. 19 | - Redirects supported 20 | 21 | Features and releases [here](./RELEASES.md) 22 | 23 | ## Install 24 | 25 | ``` 26 | npm install @actions/http-client --save 27 | ``` 28 | 29 | ## Samples 30 | 31 | See the [HTTP](./__tests__) tests for detailed examples. 32 | 33 | ## Errors 34 | 35 | ### HTTP 36 | 37 | The HTTP client does not throw unless truly exceptional. 38 | 39 | * A request that successfully executes resulting in a 404, 500 etc... will return a response object with a status code and a body. 40 | * Redirects (3xx) will be followed by default. 41 | 42 | See [HTTP tests](./__tests__) for detailed examples. 43 | 44 | ## Debugging 45 | 46 | To enable detailed console logging of all HTTP requests and responses, set the NODE_DEBUG environment varible: 47 | 48 | ``` 49 | export NODE_DEBUG=http 50 | ``` 51 | 52 | ## Node support 53 | 54 | The http-client is built using the latest LTS version of Node 12. It may work on previous node LTS versions but it's tested and officially supported on Node12+. 55 | 56 | ## Support and Versioning 57 | 58 | We follow semver and will hold compatibility between major versions and increment the minor version with new features and capabilities (while holding compat). 59 | 60 | ## Contributing 61 | 62 | We welcome PRs. Please create an issue and if applicable, a design before proceeding with code. 63 | 64 | once: 65 | 66 | ```bash 67 | $ npm install 68 | ``` 69 | 70 | To build: 71 | 72 | ```bash 73 | $ npm run build 74 | ``` 75 | 76 | To run all tests: 77 | ```bash 78 | $ npm test 79 | ``` 80 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/RELEASES.md: -------------------------------------------------------------------------------- 1 | ## Releases 2 | 3 | ## 1.0.10 4 | 5 | Contains a bug fix where proxy is defined without a user and password. see [PR here](https://github.com/actions/http-client/pull/42) 6 | 7 | ## 1.0.9 8 | Throw HttpClientError instead of a generic Error from the \Json() helper methods when the server responds with a non-successful status code. 9 | 10 | ## 1.0.8 11 | Fixed security issue where a redirect (e.g. 302) to another domain would pass headers. The fix was to strip the authorization header if the hostname was different. More [details in PR #27](https://github.com/actions/http-client/pull/27) 12 | 13 | ## 1.0.7 14 | Update NPM dependencies and add 429 to the list of HttpCodes 15 | 16 | ## 1.0.6 17 | Automatically sends Content-Type and Accept application/json headers for \Json() helper methods if not set in the client or parameters. 18 | 19 | ## 1.0.5 20 | Adds \Json() helper methods for json over http scenarios. 21 | 22 | ## 1.0.4 23 | Started to add \Json() helper methods. Do not use this release for that. Use >= 1.0.5 since there was an issue with types. 24 | 25 | ## 1.0.1 to 1.0.3 26 | Adds proxy support. 27 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectralOps/spectral-github-action/e5c74cf93c5dfc163527851a1e907f4e7d956d4e/node_modules/@actions/http-client/actions.png -------------------------------------------------------------------------------- /node_modules/@actions/http-client/auth.d.ts: -------------------------------------------------------------------------------- 1 | import ifm = require('./interfaces'); 2 | export declare class BasicCredentialHandler implements ifm.IRequestHandler { 3 | username: string; 4 | password: string; 5 | constructor(username: string, password: string); 6 | prepareRequest(options: any): void; 7 | canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; 8 | handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; 9 | } 10 | export declare class BearerCredentialHandler implements ifm.IRequestHandler { 11 | token: string; 12 | constructor(token: string); 13 | prepareRequest(options: any): void; 14 | canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; 15 | handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; 16 | } 17 | export declare class PersonalAccessTokenCredentialHandler implements ifm.IRequestHandler { 18 | token: string; 19 | constructor(token: string); 20 | prepareRequest(options: any): void; 21 | canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; 22 | handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; 23 | } 24 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/auth.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | class BasicCredentialHandler { 4 | constructor(username, password) { 5 | this.username = username; 6 | this.password = password; 7 | } 8 | prepareRequest(options) { 9 | options.headers['Authorization'] = 10 | 'Basic ' + 11 | Buffer.from(this.username + ':' + this.password).toString('base64'); 12 | } 13 | // This handler cannot handle 401 14 | canHandleAuthentication(response) { 15 | return false; 16 | } 17 | handleAuthentication(httpClient, requestInfo, objs) { 18 | return null; 19 | } 20 | } 21 | exports.BasicCredentialHandler = BasicCredentialHandler; 22 | class BearerCredentialHandler { 23 | constructor(token) { 24 | this.token = token; 25 | } 26 | // currently implements pre-authorization 27 | // TODO: support preAuth = false where it hooks on 401 28 | prepareRequest(options) { 29 | options.headers['Authorization'] = 'Bearer ' + this.token; 30 | } 31 | // This handler cannot handle 401 32 | canHandleAuthentication(response) { 33 | return false; 34 | } 35 | handleAuthentication(httpClient, requestInfo, objs) { 36 | return null; 37 | } 38 | } 39 | exports.BearerCredentialHandler = BearerCredentialHandler; 40 | class PersonalAccessTokenCredentialHandler { 41 | constructor(token) { 42 | this.token = token; 43 | } 44 | // currently implements pre-authorization 45 | // TODO: support preAuth = false where it hooks on 401 46 | prepareRequest(options) { 47 | options.headers['Authorization'] = 48 | 'Basic ' + Buffer.from('PAT:' + this.token).toString('base64'); 49 | } 50 | // This handler cannot handle 401 51 | canHandleAuthentication(response) { 52 | return false; 53 | } 54 | handleAuthentication(httpClient, requestInfo, objs) { 55 | return null; 56 | } 57 | } 58 | exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; 59 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import http = require('http'); 3 | import ifm = require('./interfaces'); 4 | export declare enum HttpCodes { 5 | OK = 200, 6 | MultipleChoices = 300, 7 | MovedPermanently = 301, 8 | ResourceMoved = 302, 9 | SeeOther = 303, 10 | NotModified = 304, 11 | UseProxy = 305, 12 | SwitchProxy = 306, 13 | TemporaryRedirect = 307, 14 | PermanentRedirect = 308, 15 | BadRequest = 400, 16 | Unauthorized = 401, 17 | PaymentRequired = 402, 18 | Forbidden = 403, 19 | NotFound = 404, 20 | MethodNotAllowed = 405, 21 | NotAcceptable = 406, 22 | ProxyAuthenticationRequired = 407, 23 | RequestTimeout = 408, 24 | Conflict = 409, 25 | Gone = 410, 26 | TooManyRequests = 429, 27 | InternalServerError = 500, 28 | NotImplemented = 501, 29 | BadGateway = 502, 30 | ServiceUnavailable = 503, 31 | GatewayTimeout = 504 32 | } 33 | export declare enum Headers { 34 | Accept = "accept", 35 | ContentType = "content-type" 36 | } 37 | export declare enum MediaTypes { 38 | ApplicationJson = "application/json" 39 | } 40 | /** 41 | * Returns the proxy URL, depending upon the supplied url and proxy environment variables. 42 | * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com 43 | */ 44 | export declare function getProxyUrl(serverUrl: string): string; 45 | export declare class HttpClientError extends Error { 46 | constructor(message: string, statusCode: number); 47 | statusCode: number; 48 | result?: any; 49 | } 50 | export declare class HttpClientResponse implements ifm.IHttpClientResponse { 51 | constructor(message: http.IncomingMessage); 52 | message: http.IncomingMessage; 53 | readBody(): Promise; 54 | } 55 | export declare function isHttps(requestUrl: string): boolean; 56 | export declare class HttpClient { 57 | userAgent: string | undefined; 58 | handlers: ifm.IRequestHandler[]; 59 | requestOptions: ifm.IRequestOptions; 60 | private _ignoreSslError; 61 | private _socketTimeout; 62 | private _allowRedirects; 63 | private _allowRedirectDowngrade; 64 | private _maxRedirects; 65 | private _allowRetries; 66 | private _maxRetries; 67 | private _agent; 68 | private _proxyAgent; 69 | private _keepAlive; 70 | private _disposed; 71 | constructor(userAgent?: string, handlers?: ifm.IRequestHandler[], requestOptions?: ifm.IRequestOptions); 72 | options(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; 73 | get(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; 74 | del(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; 75 | post(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; 76 | patch(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; 77 | put(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; 78 | head(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; 79 | sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: ifm.IHeaders): Promise; 80 | /** 81 | * Gets a typed object from an endpoint 82 | * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise 83 | */ 84 | getJson(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise>; 85 | postJson(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise>; 86 | putJson(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise>; 87 | patchJson(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise>; 88 | /** 89 | * Makes a raw http request. 90 | * All other methods such as get, post, patch, and request ultimately call this. 91 | * Prefer get, del, post and patch 92 | */ 93 | request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: ifm.IHeaders): Promise; 94 | /** 95 | * Needs to be called if keepAlive is set to true in request options. 96 | */ 97 | dispose(): void; 98 | /** 99 | * Raw request. 100 | * @param info 101 | * @param data 102 | */ 103 | requestRaw(info: ifm.IRequestInfo, data: string | NodeJS.ReadableStream): Promise; 104 | /** 105 | * Raw request with callback. 106 | * @param info 107 | * @param data 108 | * @param onResult 109 | */ 110 | requestRawWithCallback(info: ifm.IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: ifm.IHttpClientResponse) => void): void; 111 | /** 112 | * Gets an http agent. This function is useful when you need an http agent that handles 113 | * routing through a proxy server - depending upon the url and proxy environment variables. 114 | * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com 115 | */ 116 | getAgent(serverUrl: string): http.Agent; 117 | private _prepareRequest; 118 | private _mergeHeaders; 119 | private _getExistingOrDefaultHeader; 120 | private _getAgent; 121 | private _performExponentialBackoff; 122 | private static dateTimeDeserializer; 123 | private _processResponse; 124 | } 125 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/interfaces.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import http = require('http'); 3 | export interface IHeaders { 4 | [key: string]: any; 5 | } 6 | export interface IHttpClient { 7 | options(requestUrl: string, additionalHeaders?: IHeaders): Promise; 8 | get(requestUrl: string, additionalHeaders?: IHeaders): Promise; 9 | del(requestUrl: string, additionalHeaders?: IHeaders): Promise; 10 | post(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; 11 | patch(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; 12 | put(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; 13 | sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: IHeaders): Promise; 14 | request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: IHeaders): Promise; 15 | requestRaw(info: IRequestInfo, data: string | NodeJS.ReadableStream): Promise; 16 | requestRawWithCallback(info: IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: IHttpClientResponse) => void): void; 17 | } 18 | export interface IRequestHandler { 19 | prepareRequest(options: http.RequestOptions): void; 20 | canHandleAuthentication(response: IHttpClientResponse): boolean; 21 | handleAuthentication(httpClient: IHttpClient, requestInfo: IRequestInfo, objs: any): Promise; 22 | } 23 | export interface IHttpClientResponse { 24 | message: http.IncomingMessage; 25 | readBody(): Promise; 26 | } 27 | export interface IRequestInfo { 28 | options: http.RequestOptions; 29 | parsedUrl: URL; 30 | httpModule: any; 31 | } 32 | export interface IRequestOptions { 33 | headers?: IHeaders; 34 | socketTimeout?: number; 35 | ignoreSslError?: boolean; 36 | allowRedirects?: boolean; 37 | allowRedirectDowngrade?: boolean; 38 | maxRedirects?: number; 39 | maxSockets?: number; 40 | keepAlive?: boolean; 41 | deserializeDates?: boolean; 42 | allowRetries?: boolean; 43 | maxRetries?: number; 44 | } 45 | export interface ITypedResponse { 46 | statusCode: number; 47 | result: T | null; 48 | headers: Object; 49 | } 50 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/interfaces.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@actions/http-client@1.0.11", 5 | "/Users/guylevintal/Desktop/Git/spectral-github-action" 6 | ] 7 | ], 8 | "_from": "@actions/http-client@1.0.11", 9 | "_id": "@actions/http-client@1.0.11", 10 | "_inBundle": false, 11 | "_integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==", 12 | "_location": "/@actions/http-client", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "@actions/http-client@1.0.11", 18 | "name": "@actions/http-client", 19 | "escapedName": "@actions%2fhttp-client", 20 | "scope": "@actions", 21 | "rawSpec": "1.0.11", 22 | "saveSpec": null, 23 | "fetchSpec": "1.0.11" 24 | }, 25 | "_requiredBy": [ 26 | "/@actions/core", 27 | "/@actions/tool-cache" 28 | ], 29 | "_resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz", 30 | "_spec": "1.0.11", 31 | "_where": "/Users/guylevintal/Desktop/Git/spectral-github-action", 32 | "author": { 33 | "name": "GitHub, Inc." 34 | }, 35 | "bugs": { 36 | "url": "https://github.com/actions/http-client/issues" 37 | }, 38 | "dependencies": { 39 | "tunnel": "0.0.6" 40 | }, 41 | "description": "Actions Http Client", 42 | "devDependencies": { 43 | "@types/jest": "^25.1.4", 44 | "@types/node": "^12.12.31", 45 | "jest": "^25.1.0", 46 | "prettier": "^2.0.4", 47 | "proxy": "^1.0.1", 48 | "ts-jest": "^25.2.1", 49 | "typescript": "^3.8.3" 50 | }, 51 | "homepage": "https://github.com/actions/http-client#readme", 52 | "keywords": [ 53 | "Actions", 54 | "Http" 55 | ], 56 | "license": "MIT", 57 | "main": "index.js", 58 | "name": "@actions/http-client", 59 | "repository": { 60 | "type": "git", 61 | "url": "git+https://github.com/actions/http-client.git" 62 | }, 63 | "scripts": { 64 | "audit-check": "npm audit --audit-level=moderate", 65 | "build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out", 66 | "format": "prettier --write *.ts && prettier --write **/*.ts", 67 | "format-check": "prettier --check *.ts && prettier --check **/*.ts", 68 | "test": "jest" 69 | }, 70 | "version": "1.0.11" 71 | } 72 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/proxy.d.ts: -------------------------------------------------------------------------------- 1 | export declare function getProxyUrl(reqUrl: URL): URL | undefined; 2 | export declare function checkBypass(reqUrl: URL): boolean; 3 | -------------------------------------------------------------------------------- /node_modules/@actions/http-client/proxy.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | function getProxyUrl(reqUrl) { 4 | let usingSsl = reqUrl.protocol === 'https:'; 5 | let proxyUrl; 6 | if (checkBypass(reqUrl)) { 7 | return proxyUrl; 8 | } 9 | let proxyVar; 10 | if (usingSsl) { 11 | proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; 12 | } 13 | else { 14 | proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; 15 | } 16 | if (proxyVar) { 17 | proxyUrl = new URL(proxyVar); 18 | } 19 | return proxyUrl; 20 | } 21 | exports.getProxyUrl = getProxyUrl; 22 | function checkBypass(reqUrl) { 23 | if (!reqUrl.hostname) { 24 | return false; 25 | } 26 | let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; 27 | if (!noProxy) { 28 | return false; 29 | } 30 | // Determine the request port 31 | let reqPort; 32 | if (reqUrl.port) { 33 | reqPort = Number(reqUrl.port); 34 | } 35 | else if (reqUrl.protocol === 'http:') { 36 | reqPort = 80; 37 | } 38 | else if (reqUrl.protocol === 'https:') { 39 | reqPort = 443; 40 | } 41 | // Format the request hostname and hostname with port 42 | let upperReqHosts = [reqUrl.hostname.toUpperCase()]; 43 | if (typeof reqPort === 'number') { 44 | upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); 45 | } 46 | // Compare request host against noproxy 47 | for (let upperNoProxyItem of noProxy 48 | .split(',') 49 | .map(x => x.trim().toUpperCase()) 50 | .filter(x => x)) { 51 | if (upperReqHosts.some(x => x === upperNoProxyItem)) { 52 | return true; 53 | } 54 | } 55 | return false; 56 | } 57 | exports.checkBypass = checkBypass; 58 | -------------------------------------------------------------------------------- /node_modules/@actions/io/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2019 GitHub 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. -------------------------------------------------------------------------------- /node_modules/@actions/io/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/io` 2 | 3 | > Core functions for cli filesystem scenarios 4 | 5 | ## Usage 6 | 7 | #### mkdir -p 8 | 9 | Recursively make a directory. Follows rules specified in [man mkdir](https://linux.die.net/man/1/mkdir) with the `-p` option specified: 10 | 11 | ```js 12 | const io = require('@actions/io'); 13 | 14 | await io.mkdirP('path/to/make'); 15 | ``` 16 | 17 | #### cp/mv 18 | 19 | Copy or move files or folders. Follows rules specified in [man cp](https://linux.die.net/man/1/cp) and [man mv](https://linux.die.net/man/1/mv): 20 | 21 | ```js 22 | const io = require('@actions/io'); 23 | 24 | // Recursive must be true for directories 25 | const options = { recursive: true, force: false } 26 | 27 | await io.cp('path/to/directory', 'path/to/dest', options); 28 | await io.mv('path/to/file', 'path/to/dest'); 29 | ``` 30 | 31 | #### rm -rf 32 | 33 | Remove a file or folder recursively. Follows rules specified in [man rm](https://linux.die.net/man/1/rm) with the `-r` and `-f` rules specified. 34 | 35 | ```js 36 | const io = require('@actions/io'); 37 | 38 | await io.rmRF('path/to/directory'); 39 | await io.rmRF('path/to/file'); 40 | ``` 41 | 42 | #### which 43 | 44 | Get the path to a tool and resolves via paths. Follows the rules specified in [man which](https://linux.die.net/man/1/which). 45 | 46 | ```js 47 | const exec = require('@actions/exec'); 48 | const io = require('@actions/io'); 49 | 50 | const pythonPath: string = await io.which('python', true) 51 | 52 | await exec.exec(`"${pythonPath}"`, ['main.py']); 53 | ``` 54 | -------------------------------------------------------------------------------- /node_modules/@actions/io/lib/io-util.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import * as fs from 'fs'; 3 | export declare const chmod: typeof fs.promises.chmod, copyFile: typeof fs.promises.copyFile, lstat: typeof fs.promises.lstat, mkdir: typeof fs.promises.mkdir, readdir: typeof fs.promises.readdir, readlink: typeof fs.promises.readlink, rename: typeof fs.promises.rename, rmdir: typeof fs.promises.rmdir, stat: typeof fs.promises.stat, symlink: typeof fs.promises.symlink, unlink: typeof fs.promises.unlink; 4 | export declare const IS_WINDOWS: boolean; 5 | export declare function exists(fsPath: string): Promise; 6 | export declare function isDirectory(fsPath: string, useStat?: boolean): Promise; 7 | /** 8 | * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: 9 | * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). 10 | */ 11 | export declare function isRooted(p: string): boolean; 12 | /** 13 | * Best effort attempt to determine whether a file exists and is executable. 14 | * @param filePath file path to check 15 | * @param extensions additional file extensions to try 16 | * @return if file exists and is executable, returns the file path. otherwise empty string. 17 | */ 18 | export declare function tryGetExecutablePath(filePath: string, extensions: string[]): Promise; 19 | export declare function getCmdPath(): string; 20 | -------------------------------------------------------------------------------- /node_modules/@actions/io/lib/io-util.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 5 | }) : (function(o, m, k, k2) { 6 | if (k2 === undefined) k2 = k; 7 | o[k2] = m[k]; 8 | })); 9 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 10 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 11 | }) : function(o, v) { 12 | o["default"] = v; 13 | }); 14 | var __importStar = (this && this.__importStar) || function (mod) { 15 | if (mod && mod.__esModule) return mod; 16 | var result = {}; 17 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 18 | __setModuleDefault(result, mod); 19 | return result; 20 | }; 21 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 22 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 23 | return new (P || (P = Promise))(function (resolve, reject) { 24 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 25 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 26 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 27 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 28 | }); 29 | }; 30 | var _a; 31 | Object.defineProperty(exports, "__esModule", { value: true }); 32 | exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; 33 | const fs = __importStar(require("fs")); 34 | const path = __importStar(require("path")); 35 | _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; 36 | exports.IS_WINDOWS = process.platform === 'win32'; 37 | function exists(fsPath) { 38 | return __awaiter(this, void 0, void 0, function* () { 39 | try { 40 | yield exports.stat(fsPath); 41 | } 42 | catch (err) { 43 | if (err.code === 'ENOENT') { 44 | return false; 45 | } 46 | throw err; 47 | } 48 | return true; 49 | }); 50 | } 51 | exports.exists = exists; 52 | function isDirectory(fsPath, useStat = false) { 53 | return __awaiter(this, void 0, void 0, function* () { 54 | const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); 55 | return stats.isDirectory(); 56 | }); 57 | } 58 | exports.isDirectory = isDirectory; 59 | /** 60 | * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: 61 | * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). 62 | */ 63 | function isRooted(p) { 64 | p = normalizeSeparators(p); 65 | if (!p) { 66 | throw new Error('isRooted() parameter "p" cannot be empty'); 67 | } 68 | if (exports.IS_WINDOWS) { 69 | return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello 70 | ); // e.g. C: or C:\hello 71 | } 72 | return p.startsWith('/'); 73 | } 74 | exports.isRooted = isRooted; 75 | /** 76 | * Best effort attempt to determine whether a file exists and is executable. 77 | * @param filePath file path to check 78 | * @param extensions additional file extensions to try 79 | * @return if file exists and is executable, returns the file path. otherwise empty string. 80 | */ 81 | function tryGetExecutablePath(filePath, extensions) { 82 | return __awaiter(this, void 0, void 0, function* () { 83 | let stats = undefined; 84 | try { 85 | // test file exists 86 | stats = yield exports.stat(filePath); 87 | } 88 | catch (err) { 89 | if (err.code !== 'ENOENT') { 90 | // eslint-disable-next-line no-console 91 | console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); 92 | } 93 | } 94 | if (stats && stats.isFile()) { 95 | if (exports.IS_WINDOWS) { 96 | // on Windows, test for valid extension 97 | const upperExt = path.extname(filePath).toUpperCase(); 98 | if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { 99 | return filePath; 100 | } 101 | } 102 | else { 103 | if (isUnixExecutable(stats)) { 104 | return filePath; 105 | } 106 | } 107 | } 108 | // try each extension 109 | const originalFilePath = filePath; 110 | for (const extension of extensions) { 111 | filePath = originalFilePath + extension; 112 | stats = undefined; 113 | try { 114 | stats = yield exports.stat(filePath); 115 | } 116 | catch (err) { 117 | if (err.code !== 'ENOENT') { 118 | // eslint-disable-next-line no-console 119 | console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); 120 | } 121 | } 122 | if (stats && stats.isFile()) { 123 | if (exports.IS_WINDOWS) { 124 | // preserve the case of the actual file (since an extension was appended) 125 | try { 126 | const directory = path.dirname(filePath); 127 | const upperName = path.basename(filePath).toUpperCase(); 128 | for (const actualName of yield exports.readdir(directory)) { 129 | if (upperName === actualName.toUpperCase()) { 130 | filePath = path.join(directory, actualName); 131 | break; 132 | } 133 | } 134 | } 135 | catch (err) { 136 | // eslint-disable-next-line no-console 137 | console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); 138 | } 139 | return filePath; 140 | } 141 | else { 142 | if (isUnixExecutable(stats)) { 143 | return filePath; 144 | } 145 | } 146 | } 147 | } 148 | return ''; 149 | }); 150 | } 151 | exports.tryGetExecutablePath = tryGetExecutablePath; 152 | function normalizeSeparators(p) { 153 | p = p || ''; 154 | if (exports.IS_WINDOWS) { 155 | // convert slashes on Windows 156 | p = p.replace(/\//g, '\\'); 157 | // remove redundant slashes 158 | return p.replace(/\\\\+/g, '\\'); 159 | } 160 | // remove redundant slashes 161 | return p.replace(/\/\/+/g, '/'); 162 | } 163 | // on Mac/Linux, test the execute bit 164 | // R W X R W X R W X 165 | // 256 128 64 32 16 8 4 2 1 166 | function isUnixExecutable(stats) { 167 | return ((stats.mode & 1) > 0 || 168 | ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || 169 | ((stats.mode & 64) > 0 && stats.uid === process.getuid())); 170 | } 171 | // Get the path of cmd.exe in windows 172 | function getCmdPath() { 173 | var _a; 174 | return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; 175 | } 176 | exports.getCmdPath = getCmdPath; 177 | //# sourceMappingURL=io-util.js.map -------------------------------------------------------------------------------- /node_modules/@actions/io/lib/io-util.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"io-util.js","sourceRoot":"","sources":["../src/io-util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,2CAA4B;AAEf,KAYT,EAAE,CAAC,QAAQ,EAXb,aAAK,aACL,gBAAQ,gBACR,aAAK,aACL,aAAK,aACL,eAAO,eACP,gBAAQ,gBACR,cAAM,cACN,aAAK,aACL,YAAI,YACJ,eAAO,eACP,cAAM,aACO;AAEF,QAAA,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAEtD,SAAsB,MAAM,CAAC,MAAc;;QACzC,IAAI;YACF,MAAM,YAAI,CAAC,MAAM,CAAC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;AACH,CAAC;AAED,qCAAqC;AACrC,SAAgB,UAAU;;IACxB,aAAO,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAI,SAAS,CAAA;AAC5C,CAAC;AAFD,gCAEC"} -------------------------------------------------------------------------------- /node_modules/@actions/io/lib/io.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Interface for cp/mv options 3 | */ 4 | export interface CopyOptions { 5 | /** Optional. Whether to recursively copy all subdirectories. Defaults to false */ 6 | recursive?: boolean; 7 | /** Optional. Whether to overwrite existing files in the destination. Defaults to true */ 8 | force?: boolean; 9 | /** Optional. Whether to copy the source directory along with all the files. Only takes effect when recursive=true and copying a directory. Default is true*/ 10 | copySourceDirectory?: boolean; 11 | } 12 | /** 13 | * Interface for cp/mv options 14 | */ 15 | export interface MoveOptions { 16 | /** Optional. Whether to overwrite existing files in the destination. Defaults to true */ 17 | force?: boolean; 18 | } 19 | /** 20 | * Copies a file or folder. 21 | * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js 22 | * 23 | * @param source source path 24 | * @param dest destination path 25 | * @param options optional. See CopyOptions. 26 | */ 27 | export declare function cp(source: string, dest: string, options?: CopyOptions): Promise; 28 | /** 29 | * Moves a path. 30 | * 31 | * @param source source path 32 | * @param dest destination path 33 | * @param options optional. See MoveOptions. 34 | */ 35 | export declare function mv(source: string, dest: string, options?: MoveOptions): Promise; 36 | /** 37 | * Remove a path recursively with force 38 | * 39 | * @param inputPath path to remove 40 | */ 41 | export declare function rmRF(inputPath: string): Promise; 42 | /** 43 | * Make a directory. Creates the full path with folders in between 44 | * Will throw if it fails 45 | * 46 | * @param fsPath path to create 47 | * @returns Promise 48 | */ 49 | export declare function mkdirP(fsPath: string): Promise; 50 | /** 51 | * Returns path of a tool had the tool actually been invoked. Resolves via paths. 52 | * If you check and the tool does not exist, it will throw. 53 | * 54 | * @param tool name of the tool 55 | * @param check whether to check if tool exists 56 | * @returns Promise path to tool 57 | */ 58 | export declare function which(tool: string, check?: boolean): Promise; 59 | /** 60 | * Returns a list of all occurrences of the given tool on the system path. 61 | * 62 | * @returns Promise the paths of the tool 63 | */ 64 | export declare function findInPath(tool: string): Promise; 65 | -------------------------------------------------------------------------------- /node_modules/@actions/io/lib/io.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"io.js","sourceRoot":"","sources":["../src/io.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAyB;AACzB,4DAA6C;AAC7C,2CAA4B;AAC5B,+BAA8B;AAC9B,kDAAmC;AAEnC,MAAM,IAAI,GAAG,gBAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;AACzC,MAAM,QAAQ,GAAG,gBAAS,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAA;AAsBjD;;;;;;;GAOG;AACH,SAAsB,EAAE,CACtB,MAAc,EACd,IAAY,EACZ,UAAuB,EAAE;;QAEzB,MAAM,EAAC,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAC,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;QAExE,MAAM,QAAQ,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QAC7E,4CAA4C;QAC5C,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE;YAC3C,OAAM;SACP;QAED,wDAAwD;QACxD,MAAM,OAAO,GACX,QAAQ,IAAI,QAAQ,CAAC,WAAW,EAAE,IAAI,mBAAmB;YACvD,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACxC,CAAC,CAAC,IAAI,CAAA;QAEV,IAAI,CAAC,CAAC,MAAM,MAAM,CAA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A;iBAC9B;gBACD,iDAAiD;aAClD;YAED,oBAAoB;YACpB,MAAM,WAAW,GAAW,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;YAC1D,MAAM,MAAM,CAAC,OAAO,CAClB,WAAW,EACX,QAAQ,EACR,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CACtC,CAAA;SACF;aAAM,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,KAAK,EAAE;YACpD,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;SACzC;IACH,CAAC;CAAA"} -------------------------------------------------------------------------------- /node_modules/@actions/io/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@actions/io@1.1.1", 5 | "/Users/guylevintal/Desktop/Git/spectral-github-action" 6 | ] 7 | ], 8 | "_from": "@actions/io@1.1.1", 9 | "_id": "@actions/io@1.1.1", 10 | "_inBundle": false, 11 | "_integrity": "sha512-Qi4JoKXjmE0O67wAOH6y0n26QXhMKMFo7GD/4IXNVcrtLjUlGjGuVys6pQgwF3ArfGTQu0XpqaNr0YhED2RaRA==", 12 | "_location": "/@actions/io", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "@actions/io@1.1.1", 18 | "name": "@actions/io", 19 | "escapedName": "@actions%2fio", 20 | "scope": "@actions", 21 | "rawSpec": "1.1.1", 22 | "saveSpec": null, 23 | "fetchSpec": "1.1.1" 24 | }, 25 | "_requiredBy": [ 26 | "/", 27 | "/@actions/exec", 28 | "/@actions/tool-cache" 29 | ], 30 | "_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.1.tgz", 31 | "_spec": "1.1.1", 32 | "_where": "/Users/guylevintal/Desktop/Git/spectral-github-action", 33 | "bugs": { 34 | "url": "https://github.com/actions/toolkit/issues" 35 | }, 36 | "description": "Actions io lib", 37 | "directories": { 38 | "lib": "lib", 39 | "test": "__tests__" 40 | }, 41 | "files": [ 42 | "lib" 43 | ], 44 | "homepage": "https://github.com/actions/toolkit/tree/main/packages/io", 45 | "keywords": [ 46 | "github", 47 | "actions", 48 | "io" 49 | ], 50 | "license": "MIT", 51 | "main": "lib/io.js", 52 | "name": "@actions/io", 53 | "publishConfig": { 54 | "access": "public" 55 | }, 56 | "repository": { 57 | "type": "git", 58 | "url": "git+https://github.com/actions/toolkit.git", 59 | "directory": "packages/io" 60 | }, 61 | "scripts": { 62 | "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", 63 | "test": "echo \"Error: run tests from root\" && exit 1", 64 | "tsc": "tsc" 65 | }, 66 | "types": "lib/io.d.ts", 67 | "version": "1.1.1" 68 | } 69 | -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright 2019 GitHub 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. -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/README.md: -------------------------------------------------------------------------------- 1 | # `@actions/tool-cache` 2 | 3 | > Functions necessary for downloading and caching tools. 4 | 5 | ## Usage 6 | 7 | #### Download 8 | 9 | You can use this to download tools (or other files) from a download URL: 10 | 11 | ```js 12 | const tc = require('@actions/tool-cache'); 13 | 14 | const node12Path = await tc.downloadTool('https://nodejs.org/dist/v12.7.0/node-v12.7.0-linux-x64.tar.gz'); 15 | ``` 16 | 17 | #### Extract 18 | 19 | These can then be extracted in platform specific ways: 20 | 21 | ```js 22 | const tc = require('@actions/tool-cache'); 23 | 24 | if (process.platform === 'win32') { 25 | const node12Path = await tc.downloadTool('https://nodejs.org/dist/v12.7.0/node-v12.7.0-win-x64.zip'); 26 | const node12ExtractedFolder = await tc.extractZip(node12Path, 'path/to/extract/to'); 27 | 28 | // Or alternately 29 | const node12Path = await tc.downloadTool('https://nodejs.org/dist/v12.7.0/node-v12.7.0-win-x64.7z'); 30 | const node12ExtractedFolder = await tc.extract7z(node12Path, 'path/to/extract/to'); 31 | } 32 | else if (process.platform === 'darwin') { 33 | const node12Path = await tc.downloadTool('https://nodejs.org/dist/v12.7.0/node-v12.7.0.pkg'); 34 | const node12ExtractedFolder = await tc.extractXar(node12Path, 'path/to/extract/to'); 35 | } 36 | else { 37 | const node12Path = await tc.downloadTool('https://nodejs.org/dist/v12.7.0/node-v12.7.0-linux-x64.tar.gz'); 38 | const node12ExtractedFolder = await tc.extractTar(node12Path, 'path/to/extract/to'); 39 | } 40 | ``` 41 | 42 | #### Cache 43 | 44 | Finally, you can cache these directories in our tool-cache. This is useful if you want to switch back and forth between versions of a tool, or save a tool between runs for self-hosted runners. 45 | 46 | You'll often want to add it to the path as part of this step: 47 | 48 | ```js 49 | const tc = require('@actions/tool-cache'); 50 | const core = require('@actions/core'); 51 | 52 | const node12Path = await tc.downloadTool('https://nodejs.org/dist/v12.7.0/node-v12.7.0-linux-x64.tar.gz'); 53 | const node12ExtractedFolder = await tc.extractTar(node12Path, 'path/to/extract/to'); 54 | 55 | const cachedPath = await tc.cacheDir(node12ExtractedFolder, 'node', '12.7.0'); 56 | core.addPath(cachedPath); 57 | ``` 58 | 59 | You can also cache files for reuse. 60 | 61 | ```js 62 | const tc = require('@actions/tool-cache'); 63 | 64 | const cachedPath = await tc.cacheFile('path/to/exe', 'destFileName.exe', 'myExeName', '1.1.0'); 65 | ``` 66 | 67 | #### Find 68 | 69 | Finally, you can find directories and files you've previously cached: 70 | 71 | ```js 72 | const tc = require('@actions/tool-cache'); 73 | const core = require('@actions/core'); 74 | 75 | const nodeDirectory = tc.find('node', '12.x', 'x64'); 76 | core.addPath(nodeDirectory); 77 | ``` 78 | 79 | You can even find all cached versions of a tool: 80 | 81 | ```js 82 | const tc = require('@actions/tool-cache'); 83 | 84 | const allNodeVersions = tc.findAllVersions('node'); 85 | console.log(`Versions of node available: ${allNodeVersions}`); 86 | ``` 87 | -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/lib/manifest.d.ts: -------------------------------------------------------------------------------- 1 | export interface IToolReleaseFile { 2 | filename: string; 3 | platform: string; 4 | platform_version?: string; 5 | arch: string; 6 | download_url: string; 7 | } 8 | export interface IToolRelease { 9 | version: string; 10 | stable: boolean; 11 | release_url: string; 12 | files: IToolReleaseFile[]; 13 | } 14 | export declare function _findMatch(versionSpec: string, stable: boolean, candidates: IToolRelease[], archFilter: string): Promise; 15 | export declare function _getOsVersion(): string; 16 | export declare function _readLinuxVersionFile(): string; 17 | -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/lib/manifest.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 5 | }) : (function(o, m, k, k2) { 6 | if (k2 === undefined) k2 = k; 7 | o[k2] = m[k]; 8 | })); 9 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 10 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 11 | }) : function(o, v) { 12 | o["default"] = v; 13 | }); 14 | var __importStar = (this && this.__importStar) || function (mod) { 15 | if (mod && mod.__esModule) return mod; 16 | var result = {}; 17 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 18 | __setModuleDefault(result, mod); 19 | return result; 20 | }; 21 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 22 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 23 | return new (P || (P = Promise))(function (resolve, reject) { 24 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 25 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 26 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 27 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 28 | }); 29 | }; 30 | Object.defineProperty(exports, "__esModule", { value: true }); 31 | exports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0; 32 | const semver = __importStar(require("semver")); 33 | const core_1 = require("@actions/core"); 34 | // needs to be require for core node modules to be mocked 35 | /* eslint @typescript-eslint/no-require-imports: 0 */ 36 | const os = require("os"); 37 | const cp = require("child_process"); 38 | const fs = require("fs"); 39 | function _findMatch(versionSpec, stable, candidates, archFilter) { 40 | return __awaiter(this, void 0, void 0, function* () { 41 | const platFilter = os.platform(); 42 | let result; 43 | let match; 44 | let file; 45 | for (const candidate of candidates) { 46 | const version = candidate.version; 47 | core_1.debug(`check ${version} satisfies ${versionSpec}`); 48 | if (semver.satisfies(version, versionSpec) && 49 | (!stable || candidate.stable === stable)) { 50 | file = candidate.files.find(item => { 51 | core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); 52 | let chk = item.arch === archFilter && item.platform === platFilter; 53 | if (chk && item.platform_version) { 54 | const osVersion = module.exports._getOsVersion(); 55 | if (osVersion === item.platform_version) { 56 | chk = true; 57 | } 58 | else { 59 | chk = semver.satisfies(osVersion, item.platform_version); 60 | } 61 | } 62 | return chk; 63 | }); 64 | if (file) { 65 | core_1.debug(`matched ${candidate.version}`); 66 | match = candidate; 67 | break; 68 | } 69 | } 70 | } 71 | if (match && file) { 72 | // clone since we're mutating the file list to be only the file that matches 73 | result = Object.assign({}, match); 74 | result.files = [file]; 75 | } 76 | return result; 77 | }); 78 | } 79 | exports._findMatch = _findMatch; 80 | function _getOsVersion() { 81 | // TODO: add windows and other linux, arm variants 82 | // right now filtering on version is only an ubuntu and macos scenario for tools we build for hosted (python) 83 | const plat = os.platform(); 84 | let version = ''; 85 | if (plat === 'darwin') { 86 | version = cp.execSync('sw_vers -productVersion').toString(); 87 | } 88 | else if (plat === 'linux') { 89 | // lsb_release process not in some containers, readfile 90 | // Run cat /etc/lsb-release 91 | // DISTRIB_ID=Ubuntu 92 | // DISTRIB_RELEASE=18.04 93 | // DISTRIB_CODENAME=bionic 94 | // DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS" 95 | const lsbContents = module.exports._readLinuxVersionFile(); 96 | if (lsbContents) { 97 | const lines = lsbContents.split('\n'); 98 | for (const line of lines) { 99 | const parts = line.split('='); 100 | if (parts.length === 2 && 101 | (parts[0].trim() === 'VERSION_ID' || 102 | parts[0].trim() === 'DISTRIB_RELEASE')) { 103 | version = parts[1] 104 | .trim() 105 | .replace(/^"/, '') 106 | .replace(/"$/, ''); 107 | break; 108 | } 109 | } 110 | } 111 | } 112 | return version; 113 | } 114 | exports._getOsVersion = _getOsVersion; 115 | function _readLinuxVersionFile() { 116 | const lsbReleaseFile = '/etc/lsb-release'; 117 | const osReleaseFile = '/etc/os-release'; 118 | let contents = ''; 119 | if (fs.existsSync(lsbReleaseFile)) { 120 | contents = fs.readFileSync(lsbReleaseFile).toString(); 121 | } 122 | else if (fs.existsSync(osReleaseFile)) { 123 | contents = fs.readFileSync(osReleaseFile).toString(); 124 | } 125 | return contents; 126 | } 127 | exports._readLinuxVersionFile = _readLinuxVersionFile; 128 | //# sourceMappingURL=manifest.js.map -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/lib/manifest.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAgC;AAChC,wCAAmC;AAEnC,yDAAyD;AACzD,qDAAqD;AAErD,yBAAyB;AACzB,oCAAoC;AACpC,yBAAyB;AAqDzB,SAAsB,UAAU,CAC9B,WAAmB,EACnB,MAAe,EACf,UAA0B,EAC1B,UAAkB;;QAElB,MAAM,UAAU,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAA;QAEhC,IAAI,MAAgC,CAAA;QACpC,IAAI,KAA+B,CAAA;QAEnC,IAAI,IAAkC,CAAA;QACtC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YAClC,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAA;YAEjC,YAAK,CAAC,SAAS,OAAO,cAAc,WAAW,EAAE,CAAC,CAAA;YAClD,IACE,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC;gBACtC,CAAC,CAAC,MAAM,IAAI,SAAS,CAAC,MAAM,KAAK,MAAM,CAAC,EACxC;gBACA,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;oBACjC,YAAK,CACH,GAAG,IAAI,CAAC,IAAI,MAAM,UAAU,OAAO,IAAI,CAAC,QAAQ,MAAM,UAAU,EAAE,CACnE,CAAA;oBAED,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,QAAQ,KAAK,UAAU,CAAA;oBAClE,IAAI,GAAG,IAAI,IAAI,CAAC,gBAAgB,EAAE;wBAChC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa,EAAE,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AE;gBACxB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;gBAC7B,IACE,KAAK,CAAC,MAAM,KAAK,CAAC;oBAClB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,YAAY;wBAC/B,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,iBAAiB,CAAC,EACxC;oBACA,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC;yBACf,IAAI,EAAE;yBACN,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;yBACjB,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;oBACpB,MAAK;iBACN;aACF;SACF;KACF;IAED,OAAO,OAAO,CAAA;AAChB,CAAC;AApCD,sCAoCC;AAED,SAAgB,qBAAqB;IACnC,MAAM,cAAc,GAAG,kBAAkB,CAAA;IACzC,MAAM,aAAa,GAAG,iBAAiB,CAAA;IACvC,IAAI,QAAQ,GAAG,EAAE,CAAA;IAEjB,IAAI,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;QACjC,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE,CAAA;KACtD;SAAM,IAAI,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE;QACvC,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE,CAAA;KACrD;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC;AAZD,sDAYC"} -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/lib/retry-helper.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Internal class for retries 3 | */ 4 | export declare class RetryHelper { 5 | private maxAttempts; 6 | private minSeconds; 7 | private maxSeconds; 8 | constructor(maxAttempts: number, minSeconds: number, maxSeconds: number); 9 | execute(action: () => Promise, isRetryable?: (e: Error) => boolean): Promise; 10 | private getSleepAmount; 11 | private sleep; 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/lib/retry-helper.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 5 | }) : (function(o, m, k, k2) { 6 | if (k2 === undefined) k2 = k; 7 | o[k2] = m[k]; 8 | })); 9 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 10 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 11 | }) : function(o, v) { 12 | o["default"] = v; 13 | }); 14 | var __importStar = (this && this.__importStar) || function (mod) { 15 | if (mod && mod.__esModule) return mod; 16 | var result = {}; 17 | if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 18 | __setModuleDefault(result, mod); 19 | return result; 20 | }; 21 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 22 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 23 | return new (P || (P = Promise))(function (resolve, reject) { 24 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 25 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 26 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 27 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 28 | }); 29 | }; 30 | Object.defineProperty(exports, "__esModule", { value: true }); 31 | exports.RetryHelper = void 0; 32 | const core = __importStar(require("@actions/core")); 33 | /** 34 | * Internal class for retries 35 | */ 36 | class RetryHelper { 37 | constructor(maxAttempts, minSeconds, maxSeconds) { 38 | if (maxAttempts < 1) { 39 | throw new Error('max attempts should be greater than or equal to 1'); 40 | } 41 | this.maxAttempts = maxAttempts; 42 | this.minSeconds = Math.floor(minSeconds); 43 | this.maxSeconds = Math.floor(maxSeconds); 44 | if (this.minSeconds > this.maxSeconds) { 45 | throw new Error('min seconds should be less than or equal to max seconds'); 46 | } 47 | } 48 | execute(action, isRetryable) { 49 | return __awaiter(this, void 0, void 0, function* () { 50 | let attempt = 1; 51 | while (attempt < this.maxAttempts) { 52 | // Try 53 | try { 54 | return yield action(); 55 | } 56 | catch (err) { 57 | if (isRetryable && !isRetryable(err)) { 58 | throw err; 59 | } 60 | core.info(err.message); 61 | } 62 | // Sleep 63 | const seconds = this.getSleepAmount(); 64 | core.info(`Waiting ${seconds} seconds before trying again`); 65 | yield this.sleep(seconds); 66 | attempt++; 67 | } 68 | // Last attempt 69 | return yield action(); 70 | }); 71 | } 72 | getSleepAmount() { 73 | return (Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + 74 | this.minSeconds); 75 | } 76 | sleep(seconds) { 77 | return __awaiter(this, void 0, void 0, function* () { 78 | return new Promise(resolve => setTimeout(resolve, seconds * 1000)); 79 | }); 80 | } 81 | } 82 | exports.RetryHelper = RetryHelper; 83 | //# sourceMappingURL=retry-helper.js.map -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/lib/retry-helper.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"retry-helper.js","sourceRoot":"","sources":["../src/retry-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AAErC;;GAEG;AACH,MAAa,WAAW;IAKtB,YAAY,WAAmB,EAAE,UAAkB,EAAE,UAAkB;QACrE,IAAI,WAAW,GAAG,CAAC,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;SACrE;QAED,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;QACxC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;QACxC,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE;YACrC,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;SAC3E;IACH,CAAC;IAEK,OAAO,CACX,MAAwB,EACxB,WAAmC;;YAEnC,IAAI,OAAO,GAAG,CAAC,CAAA;YACf,OAAO,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE;gBACjC,MAAM;gBACN,IAAI;oBACF,OAAO,MAAM,MAAM,EAAE,CAAA;iBACtB;gBAAC,OAAO,GAAG,EAAE;oBACZ,IAAI,WAAW,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE;wBACpC,MAAM,GAAG,CAAA;qBACV;oBAED,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;iBACvB;gBAED,QAAQ;gBACR,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,EAAE,CAAA;gBACrC,IAAI,CAAC,IAAI,CAAC,WAAW,OAAO,8BAA8B,CAAC,CAAA;gBAC3D,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;gBACzB,OAAO,EAAE,CAAA;aACV;YAED,eAAe;YACf,OAAO,MAAM,MAAM,EAAE,CAAA;QACvB,CAAC;KAAA;IAEO,cAAc;QACpB,OAAO,CACL,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;YACnE,IAAI,CAAC,UAAU,CAChB,CAAA;IACH,CAAC;IAEa,KAAK,CAAC,OAAe;;YACjC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC,CAAC,CAAA;QACpE,CAAC;KAAA;CACF;AAxDD,kCAwDC"} -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/lib/tool-cache.d.ts: -------------------------------------------------------------------------------- 1 | import * as mm from './manifest'; 2 | import { IHeaders } from '@actions/http-client/interfaces'; 3 | export declare class HTTPError extends Error { 4 | readonly httpStatusCode: number | undefined; 5 | constructor(httpStatusCode: number | undefined); 6 | } 7 | /** 8 | * Download a tool from an url and stream it into a file 9 | * 10 | * @param url url of tool to download 11 | * @param dest path to download tool 12 | * @param auth authorization header 13 | * @param headers other headers 14 | * @returns path to downloaded tool 15 | */ 16 | export declare function downloadTool(url: string, dest?: string, auth?: string, headers?: IHeaders): Promise; 17 | /** 18 | * Extract a .7z file 19 | * 20 | * @param file path to the .7z file 21 | * @param dest destination directory. Optional. 22 | * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this 23 | * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will 24 | * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is 25 | * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line 26 | * interface, it is smaller than the full command line interface, and it does support long paths. At the 27 | * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website. 28 | * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path 29 | * to 7zr.exe can be pass to this function. 30 | * @returns path to the destination directory 31 | */ 32 | export declare function extract7z(file: string, dest?: string, _7zPath?: string): Promise; 33 | /** 34 | * Extract a compressed tar archive 35 | * 36 | * @param file path to the tar 37 | * @param dest destination directory. Optional. 38 | * @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional. 39 | * @returns path to the destination directory 40 | */ 41 | export declare function extractTar(file: string, dest?: string, flags?: string | string[]): Promise; 42 | /** 43 | * Extract a xar compatible archive 44 | * 45 | * @param file path to the archive 46 | * @param dest destination directory. Optional. 47 | * @param flags flags for the xar. Optional. 48 | * @returns path to the destination directory 49 | */ 50 | export declare function extractXar(file: string, dest?: string, flags?: string | string[]): Promise; 51 | /** 52 | * Extract a zip 53 | * 54 | * @param file path to the zip 55 | * @param dest destination directory. Optional. 56 | * @returns path to the destination directory 57 | */ 58 | export declare function extractZip(file: string, dest?: string): Promise; 59 | /** 60 | * Caches a directory and installs it into the tool cacheDir 61 | * 62 | * @param sourceDir the directory to cache into tools 63 | * @param tool tool name 64 | * @param version version of the tool. semver format 65 | * @param arch architecture of the tool. Optional. Defaults to machine architecture 66 | */ 67 | export declare function cacheDir(sourceDir: string, tool: string, version: string, arch?: string): Promise; 68 | /** 69 | * Caches a downloaded file (GUID) and installs it 70 | * into the tool cache with a given targetName 71 | * 72 | * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid. 73 | * @param targetFile the name of the file name in the tools directory 74 | * @param tool tool name 75 | * @param version version of the tool. semver format 76 | * @param arch architecture of the tool. Optional. Defaults to machine architecture 77 | */ 78 | export declare function cacheFile(sourceFile: string, targetFile: string, tool: string, version: string, arch?: string): Promise; 79 | /** 80 | * Finds the path to a tool version in the local installed tool cache 81 | * 82 | * @param toolName name of the tool 83 | * @param versionSpec version of the tool 84 | * @param arch optional arch. defaults to arch of computer 85 | */ 86 | export declare function find(toolName: string, versionSpec: string, arch?: string): string; 87 | /** 88 | * Finds the paths to all versions of a tool that are installed in the local tool cache 89 | * 90 | * @param toolName name of the tool 91 | * @param arch optional arch. defaults to arch of computer 92 | */ 93 | export declare function findAllVersions(toolName: string, arch?: string): string[]; 94 | export declare type IToolRelease = mm.IToolRelease; 95 | export declare type IToolReleaseFile = mm.IToolReleaseFile; 96 | export declare function getManifestFromRepo(owner: string, repo: string, auth?: string, branch?: string): Promise; 97 | export declare function findFromManifest(versionSpec: string, stable: boolean, manifest: IToolRelease[], archFilter?: string): Promise; 98 | /** 99 | * Check if version string is explicit 100 | * 101 | * @param versionSpec version string to check 102 | */ 103 | export declare function isExplicitVersion(versionSpec: string): boolean; 104 | /** 105 | * Get the highest satisfiying semantic version in `versions` which satisfies `versionSpec` 106 | * 107 | * @param versions array of versions to evaluate 108 | * @param versionSpec semantic version spec to satisfy 109 | */ 110 | export declare function evaluateVersions(versions: string[], versionSpec: string): string; 111 | -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "@actions/tool-cache@1.7.1", 5 | "/Users/guylevintal/Desktop/Git/spectral-github-action" 6 | ] 7 | ], 8 | "_from": "@actions/tool-cache@1.7.1", 9 | "_id": "@actions/tool-cache@1.7.1", 10 | "_inBundle": false, 11 | "_integrity": "sha512-y1xxxOhXaBUIUit3lhepmu/0xdgiTMpnZRLmVdtF0hTm521doi+MdRRRP62czHvM7wxH6epj4JPNJQ3iJpOrkQ==", 12 | "_location": "/@actions/tool-cache", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "@actions/tool-cache@1.7.1", 18 | "name": "@actions/tool-cache", 19 | "escapedName": "@actions%2ftool-cache", 20 | "scope": "@actions", 21 | "rawSpec": "1.7.1", 22 | "saveSpec": null, 23 | "fetchSpec": "1.7.1" 24 | }, 25 | "_requiredBy": [ 26 | "/" 27 | ], 28 | "_resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.7.1.tgz", 29 | "_spec": "1.7.1", 30 | "_where": "/Users/guylevintal/Desktop/Git/spectral-github-action", 31 | "bugs": { 32 | "url": "https://github.com/actions/toolkit/issues" 33 | }, 34 | "dependencies": { 35 | "@actions/core": "^1.2.6", 36 | "@actions/exec": "^1.0.0", 37 | "@actions/http-client": "^1.0.8", 38 | "@actions/io": "^1.1.1", 39 | "semver": "^6.1.0", 40 | "uuid": "^3.3.2" 41 | }, 42 | "description": "Actions tool-cache lib", 43 | "devDependencies": { 44 | "@types/nock": "^10.0.3", 45 | "@types/semver": "^6.0.0", 46 | "@types/uuid": "^3.4.4", 47 | "nock": "^10.0.6" 48 | }, 49 | "directories": { 50 | "lib": "lib", 51 | "test": "__tests__" 52 | }, 53 | "files": [ 54 | "lib", 55 | "scripts" 56 | ], 57 | "homepage": "https://github.com/actions/toolkit/tree/main/packages/tool-cache", 58 | "keywords": [ 59 | "github", 60 | "actions", 61 | "exec" 62 | ], 63 | "license": "MIT", 64 | "main": "lib/tool-cache.js", 65 | "name": "@actions/tool-cache", 66 | "publishConfig": { 67 | "access": "public" 68 | }, 69 | "repository": { 70 | "type": "git", 71 | "url": "git+https://github.com/actions/toolkit.git", 72 | "directory": "packages/tool-cache" 73 | }, 74 | "scripts": { 75 | "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", 76 | "test": "echo \"Error: run tests from root\" && exit 1", 77 | "tsc": "tsc" 78 | }, 79 | "types": "lib/tool-cache.d.ts", 80 | "version": "1.7.1" 81 | } 82 | -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/scripts/Invoke-7zdec.ps1: -------------------------------------------------------------------------------- 1 | [CmdletBinding()] 2 | param( 3 | [Parameter(Mandatory = $true)] 4 | [string]$Source, 5 | 6 | [Parameter(Mandatory = $true)] 7 | [string]$Target) 8 | 9 | # This script translates the output from 7zdec into UTF8. Node has limited 10 | # built-in support for encodings. 11 | # 12 | # 7zdec uses the system default code page. The system default code page varies 13 | # depending on the locale configuration. On an en-US box, the system default code 14 | # page is Windows-1252. 15 | # 16 | # Note, on a typical en-US box, testing with the 'ç' character is a good way to 17 | # determine whether data is passed correctly between processes. This is because 18 | # the 'ç' character has a different code point across each of the common encodings 19 | # on a typical en-US box, i.e. 20 | # 1) the default console-output code page (IBM437) 21 | # 2) the system default code page (i.e. CP_ACP) (Windows-1252) 22 | # 3) UTF8 23 | 24 | $ErrorActionPreference = 'Stop' 25 | 26 | # Redefine the wrapper over STDOUT to use UTF8. Node expects UTF8 by default. 27 | $stdout = [System.Console]::OpenStandardOutput() 28 | $utf8 = New-Object System.Text.UTF8Encoding($false) # do not emit BOM 29 | $writer = New-Object System.IO.StreamWriter($stdout, $utf8) 30 | [System.Console]::SetOut($writer) 31 | 32 | # All subsequent output must be written using [System.Console]::WriteLine(). In 33 | # PowerShell 4, Write-Host and Out-Default do not consider the updated stream writer. 34 | 35 | Set-Location -LiteralPath $Target 36 | 37 | # Print the ##command. 38 | $_7zdec = Join-Path -Path "$PSScriptRoot" -ChildPath "externals/7zdec.exe" 39 | [System.Console]::WriteLine("##[command]$_7zdec x `"$Source`"") 40 | 41 | # The $OutputEncoding variable instructs PowerShell how to interpret the output 42 | # from the external command. 43 | $OutputEncoding = [System.Text.Encoding]::Default 44 | 45 | # Note, the output from 7zdec.exe needs to be iterated over. Otherwise PowerShell.exe 46 | # will launch the external command in such a way that it inherits the streams. 47 | & $_7zdec x $Source 2>&1 | 48 | ForEach-Object { 49 | if ($_ -is [System.Management.Automation.ErrorRecord]) { 50 | [System.Console]::WriteLine($_.Exception.Message) 51 | } 52 | else { 53 | [System.Console]::WriteLine($_) 54 | } 55 | } 56 | [System.Console]::WriteLine("##[debug]7zdec.exe exit code '$LASTEXITCODE'") 57 | [System.Console]::Out.Flush() 58 | if ($LASTEXITCODE -ne 0) { 59 | exit $LASTEXITCODE 60 | } -------------------------------------------------------------------------------- /node_modules/@actions/tool-cache/scripts/externals/7zdec.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpectralOps/spectral-github-action/e5c74cf93c5dfc163527851a1e907f4e7d956d4e/node_modules/@actions/tool-cache/scripts/externals/7zdec.exe -------------------------------------------------------------------------------- /node_modules/semver/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # changes log 2 | 3 | ## 6.2.0 4 | 5 | * Coerce numbers to strings when passed to semver.coerce() 6 | * Add `rtl` option to coerce from right to left 7 | 8 | ## 6.1.3 9 | 10 | * Handle X-ranges properly in includePrerelease mode 11 | 12 | ## 6.1.2 13 | 14 | * Do not throw when testing invalid version strings 15 | 16 | ## 6.1.1 17 | 18 | * Add options support for semver.coerce() 19 | * Handle undefined version passed to Range.test 20 | 21 | ## 6.1.0 22 | 23 | * Add semver.compareBuild function 24 | * Support `*` in semver.intersects 25 | 26 | ## 6.0 27 | 28 | * Fix `intersects` logic. 29 | 30 | This is technically a bug fix, but since it is also a change to behavior 31 | that may require users updating their code, it is marked as a major 32 | version increment. 33 | 34 | ## 5.7 35 | 36 | * Add `minVersion` method 37 | 38 | ## 5.6 39 | 40 | * Move boolean `loose` param to an options object, with 41 | backwards-compatibility protection. 42 | * Add ability to opt out of special prerelease version handling with 43 | the `includePrerelease` option flag. 44 | 45 | ## 5.5 46 | 47 | * Add version coercion capabilities 48 | 49 | ## 5.4 50 | 51 | * Add intersection checking 52 | 53 | ## 5.3 54 | 55 | * Add `minSatisfying` method 56 | 57 | ## 5.2 58 | 59 | * Add `prerelease(v)` that returns prerelease components 60 | 61 | ## 5.1 62 | 63 | * Add Backus-Naur for ranges 64 | * Remove excessively cute inspection methods 65 | 66 | ## 5.0 67 | 68 | * Remove AMD/Browserified build artifacts 69 | * Fix ltr and gtr when using the `*` range 70 | * Fix for range `*` with a prerelease identifier 71 | -------------------------------------------------------------------------------- /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/bin/semver.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // Standalone semver comparison program. 3 | // Exits successfully and prints matching version(s) if 4 | // any supplied version is valid and passes all tests. 5 | 6 | var argv = process.argv.slice(2) 7 | 8 | var versions = [] 9 | 10 | var range = [] 11 | 12 | var inc = null 13 | 14 | var version = require('../package.json').version 15 | 16 | var loose = false 17 | 18 | var includePrerelease = false 19 | 20 | var coerce = false 21 | 22 | var rtl = false 23 | 24 | var identifier 25 | 26 | var semver = require('../semver') 27 | 28 | var reverse = false 29 | 30 | var options = {} 31 | 32 | main() 33 | 34 | function main () { 35 | if (!argv.length) return help() 36 | while (argv.length) { 37 | var a = argv.shift() 38 | var indexOfEqualSign = a.indexOf('=') 39 | if (indexOfEqualSign !== -1) { 40 | a = a.slice(0, indexOfEqualSign) 41 | argv.unshift(a.slice(indexOfEqualSign + 1)) 42 | } 43 | switch (a) { 44 | case '-rv': case '-rev': case '--rev': case '--reverse': 45 | reverse = true 46 | break 47 | case '-l': case '--loose': 48 | loose = true 49 | break 50 | case '-p': case '--include-prerelease': 51 | includePrerelease = true 52 | break 53 | case '-v': case '--version': 54 | versions.push(argv.shift()) 55 | break 56 | case '-i': case '--inc': case '--increment': 57 | switch (argv[0]) { 58 | case 'major': case 'minor': case 'patch': case 'prerelease': 59 | case 'premajor': case 'preminor': case 'prepatch': 60 | inc = argv.shift() 61 | break 62 | default: 63 | inc = 'patch' 64 | break 65 | } 66 | break 67 | case '--preid': 68 | identifier = argv.shift() 69 | break 70 | case '-r': case '--range': 71 | range.push(argv.shift()) 72 | break 73 | case '-c': case '--coerce': 74 | coerce = true 75 | break 76 | case '--rtl': 77 | rtl = true 78 | break 79 | case '--ltr': 80 | rtl = false 81 | break 82 | case '-h': case '--help': case '-?': 83 | return help() 84 | default: 85 | versions.push(a) 86 | break 87 | } 88 | } 89 | 90 | var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } 91 | 92 | versions = versions.map(function (v) { 93 | return coerce ? (semver.coerce(v, options) || { version: v }).version : v 94 | }).filter(function (v) { 95 | return semver.valid(v) 96 | }) 97 | if (!versions.length) return fail() 98 | if (inc && (versions.length !== 1 || range.length)) { return failInc() } 99 | 100 | for (var i = 0, l = range.length; i < l; i++) { 101 | versions = versions.filter(function (v) { 102 | return semver.satisfies(v, range[i], options) 103 | }) 104 | if (!versions.length) return fail() 105 | } 106 | return success(versions) 107 | } 108 | 109 | function failInc () { 110 | console.error('--inc can only be used on a single version with no range') 111 | fail() 112 | } 113 | 114 | function fail () { process.exit(1) } 115 | 116 | function success () { 117 | var compare = reverse ? 'rcompare' : 'compare' 118 | versions.sort(function (a, b) { 119 | return semver[compare](a, b, options) 120 | }).map(function (v) { 121 | return semver.clean(v, options) 122 | }).map(function (v) { 123 | return inc ? semver.inc(v, inc, options, identifier) : v 124 | }).forEach(function (v, i, _) { console.log(v) }) 125 | } 126 | 127 | function help () { 128 | console.log(['SemVer ' + version, 129 | '', 130 | 'A JavaScript implementation of the https://semver.org/ specification', 131 | 'Copyright Isaac Z. Schlueter', 132 | '', 133 | 'Usage: semver [options] [ [...]]', 134 | 'Prints valid versions sorted by SemVer precedence', 135 | '', 136 | 'Options:', 137 | '-r --range ', 138 | ' Print versions that match the specified range.', 139 | '', 140 | '-i --increment []', 141 | ' Increment a version by the specified level. Level can', 142 | ' be one of: major, minor, patch, premajor, preminor,', 143 | " prepatch, or prerelease. Default level is 'patch'.", 144 | ' Only one version may be specified.', 145 | '', 146 | '--preid ', 147 | ' Identifier to be used to prefix premajor, preminor,', 148 | ' prepatch or prerelease version increments.', 149 | '', 150 | '-l --loose', 151 | ' Interpret versions and ranges loosely', 152 | '', 153 | '-p --include-prerelease', 154 | ' Always include prerelease versions in range matching', 155 | '', 156 | '-c --coerce', 157 | ' Coerce a string into SemVer if possible', 158 | ' (does not imply --loose)', 159 | '', 160 | '--rtl', 161 | ' Coerce version strings right to left', 162 | '', 163 | '--ltr', 164 | ' Coerce version strings left to right (default)', 165 | '', 166 | 'Program exits successfully if any valid version satisfies', 167 | 'all supplied ranges, and prints all satisfying versions.', 168 | '', 169 | 'If no satisfying versions are found, then exits failure.', 170 | '', 171 | 'Versions are printed in ascending order, so supplying', 172 | 'multiple versions to the utility will just sort them.' 173 | ].join('\n')) 174 | } 175 | -------------------------------------------------------------------------------- /node_modules/semver/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "semver@6.3.0", 5 | "/Users/guylevintal/Desktop/Git/spectral-github-action" 6 | ] 7 | ], 8 | "_from": "semver@6.3.0", 9 | "_id": "semver@6.3.0", 10 | "_inBundle": false, 11 | "_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 12 | "_location": "/semver", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "semver@6.3.0", 18 | "name": "semver", 19 | "escapedName": "semver", 20 | "rawSpec": "6.3.0", 21 | "saveSpec": null, 22 | "fetchSpec": "6.3.0" 23 | }, 24 | "_requiredBy": [ 25 | "/@actions/tool-cache" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 28 | "_spec": "6.3.0", 29 | "_where": "/Users/guylevintal/Desktop/Git/spectral-github-action", 30 | "bin": { 31 | "semver": "bin/semver.js" 32 | }, 33 | "bugs": { 34 | "url": "https://github.com/npm/node-semver/issues" 35 | }, 36 | "description": "The semantic version parser used by npm.", 37 | "devDependencies": { 38 | "tap": "^14.3.1" 39 | }, 40 | "files": [ 41 | "bin", 42 | "range.bnf", 43 | "semver.js" 44 | ], 45 | "homepage": "https://github.com/npm/node-semver#readme", 46 | "license": "ISC", 47 | "main": "semver.js", 48 | "name": "semver", 49 | "repository": { 50 | "type": "git", 51 | "url": "git+https://github.com/npm/node-semver.git" 52 | }, 53 | "scripts": { 54 | "postpublish": "git push origin --follow-tags", 55 | "postversion": "npm publish", 56 | "preversion": "npm test", 57 | "test": "tap" 58 | }, 59 | "tap": { 60 | "check-coverage": true 61 | }, 62 | "version": "6.3.0" 63 | } 64 | -------------------------------------------------------------------------------- /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/tunnel/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /node_modules/tunnel/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /node_modules/tunnel/.idea/node-tunnel.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /node_modules/tunnel/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /node_modules/tunnel/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "6" 5 | - "8" 6 | - "10" 7 | -------------------------------------------------------------------------------- /node_modules/tunnel/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | - 0.0.6 (2018/09/11) 4 | - Fix `localAddress` not working (#25) 5 | - Fix `Host:` header for CONNECT method by @tmurakam (#29, #30) 6 | - Fix default port for https (#32) 7 | - Fix error handling when the proxy send illegal response body (#33) 8 | 9 | - 0.0.5 (2017/06/12) 10 | - Fix socket leak. 11 | 12 | - 0.0.4 (2016/01/23) 13 | - supported Node v0.12 or later. 14 | 15 | - 0.0.3 (2014/01/20) 16 | - fixed package.json 17 | 18 | - 0.0.1 (2012/02/18) 19 | - supported Node v0.6.x (0.6.11 or later). 20 | 21 | - 0.0.0 (2012/02/11) 22 | - first release. 23 | -------------------------------------------------------------------------------- /node_modules/tunnel/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012 Koichi Kobayashi 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/tunnel/README.md: -------------------------------------------------------------------------------- 1 | # node-tunnel - HTTP/HTTPS Agents for tunneling proxies 2 | 3 | [![Build Status](https://img.shields.io/travis/koichik/node-tunnel.svg?style=flat)](https://travis-ci.org/koichik/node-tunnel) 4 | [![Dependency Status](http://img.shields.io/david/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=dependencies) 5 | [![DevDependency Status](http://img.shields.io/david/dev/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=devDependencies) 6 | 7 | ## Example 8 | 9 | ```javascript 10 | var tunnel = require('tunnel'); 11 | 12 | var tunnelingAgent = tunnel.httpsOverHttp({ 13 | proxy: { 14 | host: 'localhost', 15 | port: 3128 16 | } 17 | }); 18 | 19 | var req = https.request({ 20 | host: 'example.com', 21 | port: 443, 22 | agent: tunnelingAgent 23 | }); 24 | ``` 25 | 26 | ## Installation 27 | 28 | $ npm install tunnel 29 | 30 | ## Usages 31 | 32 | ### HTTP over HTTP tunneling 33 | 34 | ```javascript 35 | var tunnelingAgent = tunnel.httpOverHttp({ 36 | maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets 37 | 38 | proxy: { // Proxy settings 39 | host: proxyHost, // Defaults to 'localhost' 40 | port: proxyPort, // Defaults to 80 41 | localAddress: localAddress, // Local interface if necessary 42 | 43 | // Basic authorization for proxy server if necessary 44 | proxyAuth: 'user:password', 45 | 46 | // Header fields for proxy server if necessary 47 | headers: { 48 | 'User-Agent': 'Node' 49 | } 50 | } 51 | }); 52 | 53 | var req = http.request({ 54 | host: 'example.com', 55 | port: 80, 56 | agent: tunnelingAgent 57 | }); 58 | ``` 59 | 60 | ### HTTPS over HTTP tunneling 61 | 62 | ```javascript 63 | var tunnelingAgent = tunnel.httpsOverHttp({ 64 | maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets 65 | 66 | // CA for origin server if necessary 67 | ca: [ fs.readFileSync('origin-server-ca.pem')], 68 | 69 | // Client certification for origin server if necessary 70 | key: fs.readFileSync('origin-server-key.pem'), 71 | cert: fs.readFileSync('origin-server-cert.pem'), 72 | 73 | proxy: { // Proxy settings 74 | host: proxyHost, // Defaults to 'localhost' 75 | port: proxyPort, // Defaults to 80 76 | localAddress: localAddress, // Local interface if necessary 77 | 78 | // Basic authorization for proxy server if necessary 79 | proxyAuth: 'user:password', 80 | 81 | // Header fields for proxy server if necessary 82 | headers: { 83 | 'User-Agent': 'Node' 84 | }, 85 | } 86 | }); 87 | 88 | var req = https.request({ 89 | host: 'example.com', 90 | port: 443, 91 | agent: tunnelingAgent 92 | }); 93 | ``` 94 | 95 | ### HTTP over HTTPS tunneling 96 | 97 | ```javascript 98 | var tunnelingAgent = tunnel.httpOverHttps({ 99 | maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets 100 | 101 | proxy: { // Proxy settings 102 | host: proxyHost, // Defaults to 'localhost' 103 | port: proxyPort, // Defaults to 443 104 | localAddress: localAddress, // Local interface if necessary 105 | 106 | // Basic authorization for proxy server if necessary 107 | proxyAuth: 'user:password', 108 | 109 | // Header fields for proxy server if necessary 110 | headers: { 111 | 'User-Agent': 'Node' 112 | }, 113 | 114 | // CA for proxy server if necessary 115 | ca: [ fs.readFileSync('origin-server-ca.pem')], 116 | 117 | // Server name for verification if necessary 118 | servername: 'example.com', 119 | 120 | // Client certification for proxy server if necessary 121 | key: fs.readFileSync('origin-server-key.pem'), 122 | cert: fs.readFileSync('origin-server-cert.pem'), 123 | } 124 | }); 125 | 126 | var req = http.request({ 127 | host: 'example.com', 128 | port: 80, 129 | agent: tunnelingAgent 130 | }); 131 | ``` 132 | 133 | ### HTTPS over HTTPS tunneling 134 | 135 | ```javascript 136 | var tunnelingAgent = tunnel.httpsOverHttps({ 137 | maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets 138 | 139 | // CA for origin server if necessary 140 | ca: [ fs.readFileSync('origin-server-ca.pem')], 141 | 142 | // Client certification for origin server if necessary 143 | key: fs.readFileSync('origin-server-key.pem'), 144 | cert: fs.readFileSync('origin-server-cert.pem'), 145 | 146 | proxy: { // Proxy settings 147 | host: proxyHost, // Defaults to 'localhost' 148 | port: proxyPort, // Defaults to 443 149 | localAddress: localAddress, // Local interface if necessary 150 | 151 | // Basic authorization for proxy server if necessary 152 | proxyAuth: 'user:password', 153 | 154 | // Header fields for proxy server if necessary 155 | headers: { 156 | 'User-Agent': 'Node' 157 | } 158 | 159 | // CA for proxy server if necessary 160 | ca: [ fs.readFileSync('origin-server-ca.pem')], 161 | 162 | // Server name for verification if necessary 163 | servername: 'example.com', 164 | 165 | // Client certification for proxy server if necessary 166 | key: fs.readFileSync('origin-server-key.pem'), 167 | cert: fs.readFileSync('origin-server-cert.pem'), 168 | } 169 | }); 170 | 171 | var req = https.request({ 172 | host: 'example.com', 173 | port: 443, 174 | agent: tunnelingAgent 175 | }); 176 | ``` 177 | 178 | ## CONTRIBUTORS 179 | * [Aleksis Brezas (abresas)](https://github.com/abresas) 180 | * [Jackson Tian (JacksonTian)](https://github.com/JacksonTian) 181 | * [Dmitry Sorin (1999)](https://github.com/1999) 182 | 183 | ## License 184 | 185 | Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE) license. 186 | -------------------------------------------------------------------------------- /node_modules/tunnel/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/tunnel'); 2 | -------------------------------------------------------------------------------- /node_modules/tunnel/lib/tunnel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var net = require('net'); 4 | var tls = require('tls'); 5 | var http = require('http'); 6 | var https = require('https'); 7 | var events = require('events'); 8 | var assert = require('assert'); 9 | var util = require('util'); 10 | 11 | 12 | exports.httpOverHttp = httpOverHttp; 13 | exports.httpsOverHttp = httpsOverHttp; 14 | exports.httpOverHttps = httpOverHttps; 15 | exports.httpsOverHttps = httpsOverHttps; 16 | 17 | 18 | function httpOverHttp(options) { 19 | var agent = new TunnelingAgent(options); 20 | agent.request = http.request; 21 | return agent; 22 | } 23 | 24 | function httpsOverHttp(options) { 25 | var agent = new TunnelingAgent(options); 26 | agent.request = http.request; 27 | agent.createSocket = createSecureSocket; 28 | agent.defaultPort = 443; 29 | return agent; 30 | } 31 | 32 | function httpOverHttps(options) { 33 | var agent = new TunnelingAgent(options); 34 | agent.request = https.request; 35 | return agent; 36 | } 37 | 38 | function httpsOverHttps(options) { 39 | var agent = new TunnelingAgent(options); 40 | agent.request = https.request; 41 | agent.createSocket = createSecureSocket; 42 | agent.defaultPort = 443; 43 | return agent; 44 | } 45 | 46 | 47 | function TunnelingAgent(options) { 48 | var self = this; 49 | self.options = options || {}; 50 | self.proxyOptions = self.options.proxy || {}; 51 | self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; 52 | self.requests = []; 53 | self.sockets = []; 54 | 55 | self.on('free', function onFree(socket, host, port, localAddress) { 56 | var options = toOptions(host, port, localAddress); 57 | for (var i = 0, len = self.requests.length; i < len; ++i) { 58 | var pending = self.requests[i]; 59 | if (pending.host === options.host && pending.port === options.port) { 60 | // Detect the request to connect same origin server, 61 | // reuse the connection. 62 | self.requests.splice(i, 1); 63 | pending.request.onSocket(socket); 64 | return; 65 | } 66 | } 67 | socket.destroy(); 68 | self.removeSocket(socket); 69 | }); 70 | } 71 | util.inherits(TunnelingAgent, events.EventEmitter); 72 | 73 | TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { 74 | var self = this; 75 | var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); 76 | 77 | if (self.sockets.length >= this.maxSockets) { 78 | // We are over limit so we'll add it to the queue. 79 | self.requests.push(options); 80 | return; 81 | } 82 | 83 | // If we are under maxSockets create a new one. 84 | self.createSocket(options, function(socket) { 85 | socket.on('free', onFree); 86 | socket.on('close', onCloseOrRemove); 87 | socket.on('agentRemove', onCloseOrRemove); 88 | req.onSocket(socket); 89 | 90 | function onFree() { 91 | self.emit('free', socket, options); 92 | } 93 | 94 | function onCloseOrRemove(err) { 95 | self.removeSocket(socket); 96 | socket.removeListener('free', onFree); 97 | socket.removeListener('close', onCloseOrRemove); 98 | socket.removeListener('agentRemove', onCloseOrRemove); 99 | } 100 | }); 101 | }; 102 | 103 | TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { 104 | var self = this; 105 | var placeholder = {}; 106 | self.sockets.push(placeholder); 107 | 108 | var connectOptions = mergeOptions({}, self.proxyOptions, { 109 | method: 'CONNECT', 110 | path: options.host + ':' + options.port, 111 | agent: false, 112 | headers: { 113 | host: options.host + ':' + options.port 114 | } 115 | }); 116 | if (options.localAddress) { 117 | connectOptions.localAddress = options.localAddress; 118 | } 119 | if (connectOptions.proxyAuth) { 120 | connectOptions.headers = connectOptions.headers || {}; 121 | connectOptions.headers['Proxy-Authorization'] = 'Basic ' + 122 | new Buffer(connectOptions.proxyAuth).toString('base64'); 123 | } 124 | 125 | debug('making CONNECT request'); 126 | var connectReq = self.request(connectOptions); 127 | connectReq.useChunkedEncodingByDefault = false; // for v0.6 128 | connectReq.once('response', onResponse); // for v0.6 129 | connectReq.once('upgrade', onUpgrade); // for v0.6 130 | connectReq.once('connect', onConnect); // for v0.7 or later 131 | connectReq.once('error', onError); 132 | connectReq.end(); 133 | 134 | function onResponse(res) { 135 | // Very hacky. This is necessary to avoid http-parser leaks. 136 | res.upgrade = true; 137 | } 138 | 139 | function onUpgrade(res, socket, head) { 140 | // Hacky. 141 | process.nextTick(function() { 142 | onConnect(res, socket, head); 143 | }); 144 | } 145 | 146 | function onConnect(res, socket, head) { 147 | connectReq.removeAllListeners(); 148 | socket.removeAllListeners(); 149 | 150 | if (res.statusCode !== 200) { 151 | debug('tunneling socket could not be established, statusCode=%d', 152 | res.statusCode); 153 | socket.destroy(); 154 | var error = new Error('tunneling socket could not be established, ' + 155 | 'statusCode=' + res.statusCode); 156 | error.code = 'ECONNRESET'; 157 | options.request.emit('error', error); 158 | self.removeSocket(placeholder); 159 | return; 160 | } 161 | if (head.length > 0) { 162 | debug('got illegal response body from proxy'); 163 | socket.destroy(); 164 | var error = new Error('got illegal response body from proxy'); 165 | error.code = 'ECONNRESET'; 166 | options.request.emit('error', error); 167 | self.removeSocket(placeholder); 168 | return; 169 | } 170 | debug('tunneling connection has established'); 171 | self.sockets[self.sockets.indexOf(placeholder)] = socket; 172 | return cb(socket); 173 | } 174 | 175 | function onError(cause) { 176 | connectReq.removeAllListeners(); 177 | 178 | debug('tunneling socket could not be established, cause=%s\n', 179 | cause.message, cause.stack); 180 | var error = new Error('tunneling socket could not be established, ' + 181 | 'cause=' + cause.message); 182 | error.code = 'ECONNRESET'; 183 | options.request.emit('error', error); 184 | self.removeSocket(placeholder); 185 | } 186 | }; 187 | 188 | TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { 189 | var pos = this.sockets.indexOf(socket) 190 | if (pos === -1) { 191 | return; 192 | } 193 | this.sockets.splice(pos, 1); 194 | 195 | var pending = this.requests.shift(); 196 | if (pending) { 197 | // If we have pending requests and a socket gets closed a new one 198 | // needs to be created to take over in the pool for the one that closed. 199 | this.createSocket(pending, function(socket) { 200 | pending.request.onSocket(socket); 201 | }); 202 | } 203 | }; 204 | 205 | function createSecureSocket(options, cb) { 206 | var self = this; 207 | TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { 208 | var hostHeader = options.request.getHeader('host'); 209 | var tlsOptions = mergeOptions({}, self.options, { 210 | socket: socket, 211 | servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host 212 | }); 213 | 214 | // 0 is dummy port for v0.6 215 | var secureSocket = tls.connect(0, tlsOptions); 216 | self.sockets[self.sockets.indexOf(socket)] = secureSocket; 217 | cb(secureSocket); 218 | }); 219 | } 220 | 221 | 222 | function toOptions(host, port, localAddress) { 223 | if (typeof host === 'string') { // since v0.10 224 | return { 225 | host: host, 226 | port: port, 227 | localAddress: localAddress 228 | }; 229 | } 230 | return host; // for v0.11 or later 231 | } 232 | 233 | function mergeOptions(target) { 234 | for (var i = 1, len = arguments.length; i < len; ++i) { 235 | var overrides = arguments[i]; 236 | if (typeof overrides === 'object') { 237 | var keys = Object.keys(overrides); 238 | for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { 239 | var k = keys[j]; 240 | if (overrides[k] !== undefined) { 241 | target[k] = overrides[k]; 242 | } 243 | } 244 | } 245 | } 246 | return target; 247 | } 248 | 249 | 250 | var debug; 251 | if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { 252 | debug = function() { 253 | var args = Array.prototype.slice.call(arguments); 254 | if (typeof args[0] === 'string') { 255 | args[0] = 'TUNNEL: ' + args[0]; 256 | } else { 257 | args.unshift('TUNNEL:'); 258 | } 259 | console.error.apply(console, args); 260 | } 261 | } else { 262 | debug = function() {}; 263 | } 264 | exports.debug = debug; // for test 265 | -------------------------------------------------------------------------------- /node_modules/tunnel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "tunnel@0.0.6", 5 | "/Users/guylevintal/Desktop/Git/spectral-github-action" 6 | ] 7 | ], 8 | "_from": "tunnel@0.0.6", 9 | "_id": "tunnel@0.0.6", 10 | "_inBundle": false, 11 | "_integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", 12 | "_location": "/tunnel", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "tunnel@0.0.6", 18 | "name": "tunnel", 19 | "escapedName": "tunnel", 20 | "rawSpec": "0.0.6", 21 | "saveSpec": null, 22 | "fetchSpec": "0.0.6" 23 | }, 24 | "_requiredBy": [ 25 | "/@actions/http-client" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", 28 | "_spec": "0.0.6", 29 | "_where": "/Users/guylevintal/Desktop/Git/spectral-github-action", 30 | "author": { 31 | "name": "Koichi Kobayashi", 32 | "email": "koichik@improvement.jp" 33 | }, 34 | "bugs": { 35 | "url": "https://github.com/koichik/node-tunnel/issues" 36 | }, 37 | "description": "Node HTTP/HTTPS Agents for tunneling proxies", 38 | "devDependencies": { 39 | "mocha": "^5.2.0", 40 | "should": "^13.2.3" 41 | }, 42 | "directories": { 43 | "lib": "./lib" 44 | }, 45 | "engines": { 46 | "node": ">=0.6.11 <=0.7.0 || >=0.7.3" 47 | }, 48 | "homepage": "https://github.com/koichik/node-tunnel/", 49 | "keywords": [ 50 | "http", 51 | "https", 52 | "agent", 53 | "proxy", 54 | "tunnel" 55 | ], 56 | "license": "MIT", 57 | "main": "./index.js", 58 | "name": "tunnel", 59 | "repository": { 60 | "type": "git", 61 | "url": "git+https://github.com/koichik/node-tunnel.git" 62 | }, 63 | "scripts": { 64 | "test": "mocha" 65 | }, 66 | "version": "0.0.6" 67 | } 68 | -------------------------------------------------------------------------------- /node_modules/uuid/AUTHORS: -------------------------------------------------------------------------------- 1 | Robert Kieffer 2 | Christoph Tavan 3 | AJ ONeal 4 | Vincent Voyer 5 | Roman Shtylman 6 | -------------------------------------------------------------------------------- /node_modules/uuid/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 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 | ## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) 6 | 7 | 8 | ### Features 9 | 10 | * rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) 11 | 12 | ### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) 13 | 14 | 15 | ## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) 16 | 17 | 18 | ### Bug Fixes 19 | 20 | * typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) 21 | 22 | 23 | 24 | 25 | ## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) 26 | 27 | 28 | ### Bug Fixes 29 | 30 | * fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) 31 | 32 | 33 | 34 | 35 | # [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) 36 | 37 | 38 | ### Bug Fixes 39 | 40 | * assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) 41 | * fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) 42 | * Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) 43 | * mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) 44 | 45 | ### Features 46 | 47 | * enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) 48 | 49 | 50 | 51 | ## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) 52 | 53 | 54 | ### Bug Fixes 55 | 56 | * use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) 57 | 58 | 59 | 60 | 61 | # [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) 62 | 63 | 64 | ### Bug Fixes 65 | 66 | * remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) 67 | * use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) 68 | 69 | 70 | ### Features 71 | 72 | * Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) 73 | 74 | 75 | # [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) 76 | 77 | ### Bug Fixes 78 | 79 | * (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) 80 | * Fix typo (#178) 81 | * Simple typo fix (#165) 82 | 83 | ### Features 84 | * v5 support in CLI (#197) 85 | * V5 support (#188) 86 | 87 | 88 | # 3.0.1 (2016-11-28) 89 | 90 | * split uuid versions into separate files 91 | 92 | 93 | # 3.0.0 (2016-11-17) 94 | 95 | * remove .parse and .unparse 96 | 97 | 98 | # 2.0.0 99 | 100 | * Removed uuid.BufferClass 101 | 102 | 103 | # 1.4.0 104 | 105 | * Improved module context detection 106 | * Removed public RNG functions 107 | 108 | 109 | # 1.3.2 110 | 111 | * Improve tests and handling of v1() options (Issue #24) 112 | * Expose RNG option to allow for perf testing with different generators 113 | 114 | 115 | # 1.3.0 116 | 117 | * Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! 118 | * Support for node.js crypto API 119 | * De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code 120 | -------------------------------------------------------------------------------- /node_modules/uuid/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2010-2016 Robert Kieffer and other 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 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/uuid/README.md: -------------------------------------------------------------------------------- 1 | 4 | 5 | # uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # 6 | 7 | Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. 8 | 9 | Features: 10 | 11 | * Support for version 1, 3, 4 and 5 UUIDs 12 | * Cross-platform 13 | * Uses cryptographically-strong random number APIs (when available) 14 | * Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) 15 | 16 | [**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be 17 | supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] 18 | 19 | ## Quickstart - CommonJS (Recommended) 20 | 21 | ```shell 22 | npm install uuid 23 | ``` 24 | 25 | Then generate your uuid version of choice ... 26 | 27 | Version 1 (timestamp): 28 | 29 | ```javascript 30 | const uuidv1 = require('uuid/v1'); 31 | uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' 32 | 33 | ``` 34 | 35 | Version 3 (namespace): 36 | 37 | ```javascript 38 | const uuidv3 = require('uuid/v3'); 39 | 40 | // ... using predefined DNS namespace (for domain names) 41 | uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6' 42 | 43 | // ... using predefined URL namespace (for, well, URLs) 44 | uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138' 45 | 46 | // ... using a custom namespace 47 | // 48 | // Note: Custom namespaces should be a UUID string specific to your application! 49 | // E.g. the one here was generated using this modules `uuid` CLI. 50 | const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; 51 | uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686' 52 | 53 | ``` 54 | 55 | Version 4 (random): 56 | 57 | ```javascript 58 | const uuidv4 = require('uuid/v4'); 59 | uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' 60 | 61 | ``` 62 | 63 | Version 5 (namespace): 64 | 65 | ```javascript 66 | const uuidv5 = require('uuid/v5'); 67 | 68 | // ... using predefined DNS namespace (for domain names) 69 | uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec' 70 | 71 | // ... using predefined URL namespace (for, well, URLs) 72 | uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1' 73 | 74 | // ... using a custom namespace 75 | // 76 | // Note: Custom namespaces should be a UUID string specific to your application! 77 | // E.g. the one here was generated using this modules `uuid` CLI. 78 | const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; 79 | uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' 80 | 81 | ``` 82 | 83 | ## API 84 | 85 | ### Version 1 86 | 87 | ```javascript 88 | const uuidv1 = require('uuid/v1'); 89 | 90 | // Incantations 91 | uuidv1(); 92 | uuidv1(options); 93 | uuidv1(options, buffer, offset); 94 | ``` 95 | 96 | Generate and return a RFC4122 v1 (timestamp-based) UUID. 97 | 98 | * `options` - (Object) Optional uuid state to apply. Properties may include: 99 | 100 | * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. 101 | * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. 102 | * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. 103 | * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. 104 | 105 | * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. 106 | * `offset` - (Number) Starting index in `buffer` at which to begin writing. 107 | 108 | Returns `buffer`, if specified, otherwise the string form of the UUID 109 | 110 | Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. 111 | 112 | Example: Generate string UUID with fully-specified options 113 | 114 | ```javascript 115 | const v1options = { 116 | node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], 117 | clockseq: 0x1234, 118 | msecs: new Date('2011-11-01').getTime(), 119 | nsecs: 5678 120 | }; 121 | uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' 122 | 123 | ``` 124 | 125 | Example: In-place generation of two binary IDs 126 | 127 | ```javascript 128 | // Generate two ids in an array 129 | const arr = new Array(); 130 | uuidv1(null, arr, 0); // ⇨ 131 | // [ 132 | // 44, 94, 164, 192, 64, 103, 133 | // 17, 233, 146, 52, 155, 29, 134 | // 235, 77, 59, 125 135 | // ] 136 | uuidv1(null, arr, 16); // ⇨ 137 | // [ 138 | // 44, 94, 164, 192, 64, 103, 17, 233, 139 | // 146, 52, 155, 29, 235, 77, 59, 125, 140 | // 44, 94, 164, 193, 64, 103, 17, 233, 141 | // 146, 52, 155, 29, 235, 77, 59, 125 142 | // ] 143 | 144 | ``` 145 | 146 | ### Version 3 147 | 148 | ```javascript 149 | const uuidv3 = require('uuid/v3'); 150 | 151 | // Incantations 152 | uuidv3(name, namespace); 153 | uuidv3(name, namespace, buffer); 154 | uuidv3(name, namespace, buffer, offset); 155 | ``` 156 | 157 | Generate and return a RFC4122 v3 UUID. 158 | 159 | * `name` - (String | Array[]) "name" to create UUID with 160 | * `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values 161 | * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. 162 | * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 163 | 164 | Returns `buffer`, if specified, otherwise the string form of the UUID 165 | 166 | Example: 167 | 168 | ```javascript 169 | uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424' 170 | 171 | ``` 172 | 173 | ### Version 4 174 | 175 | ```javascript 176 | const uuidv4 = require('uuid/v4') 177 | 178 | // Incantations 179 | uuidv4(); 180 | uuidv4(options); 181 | uuidv4(options, buffer, offset); 182 | ``` 183 | 184 | Generate and return a RFC4122 v4 UUID. 185 | 186 | * `options` - (Object) Optional uuid state to apply. Properties may include: 187 | * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values 188 | * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) 189 | * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. 190 | * `offset` - (Number) Starting index in `buffer` at which to begin writing. 191 | 192 | Returns `buffer`, if specified, otherwise the string form of the UUID 193 | 194 | Example: Generate string UUID with predefined `random` values 195 | 196 | ```javascript 197 | const v4options = { 198 | random: [ 199 | 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 200 | 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 201 | ] 202 | }; 203 | uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' 204 | 205 | ``` 206 | 207 | Example: Generate two IDs in a single buffer 208 | 209 | ```javascript 210 | const buffer = new Array(); 211 | uuidv4(null, buffer, 0); // ⇨ 212 | // [ 213 | // 155, 29, 235, 77, 59, 214 | // 125, 75, 173, 155, 221, 215 | // 43, 13, 123, 61, 203, 216 | // 109 217 | // ] 218 | uuidv4(null, buffer, 16); // ⇨ 219 | // [ 220 | // 155, 29, 235, 77, 59, 125, 75, 173, 221 | // 155, 221, 43, 13, 123, 61, 203, 109, 222 | // 27, 157, 107, 205, 187, 253, 75, 45, 223 | // 155, 93, 171, 141, 251, 189, 75, 237 224 | // ] 225 | 226 | ``` 227 | 228 | ### Version 5 229 | 230 | ```javascript 231 | const uuidv5 = require('uuid/v5'); 232 | 233 | // Incantations 234 | uuidv5(name, namespace); 235 | uuidv5(name, namespace, buffer); 236 | uuidv5(name, namespace, buffer, offset); 237 | ``` 238 | 239 | Generate and return a RFC4122 v5 UUID. 240 | 241 | * `name` - (String | Array[]) "name" to create UUID with 242 | * `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values 243 | * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. 244 | * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 245 | 246 | Returns `buffer`, if specified, otherwise the string form of the UUID 247 | 248 | Example: 249 | 250 | ```javascript 251 | uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b' 252 | 253 | ``` 254 | 255 | ## Command Line 256 | 257 | UUIDs can be generated from the command line with the `uuid` command. 258 | 259 | ```shell 260 | $ uuid 261 | ddeb27fb-d9a0-4624-be4d-4615062daed4 262 | 263 | $ uuid v1 264 | 02d37060-d446-11e7-a9fa-7bdae751ebe1 265 | ``` 266 | 267 | Type `uuid --help` for usage details 268 | 269 | ## Testing 270 | 271 | ```shell 272 | npm test 273 | ``` 274 | 275 | ---- 276 | Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) -------------------------------------------------------------------------------- /node_modules/uuid/bin/uuid: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var assert = require('assert'); 3 | 4 | function usage() { 5 | console.log('Usage:'); 6 | console.log(' uuid'); 7 | console.log(' uuid v1'); 8 | console.log(' uuid v3 '); 9 | console.log(' uuid v4'); 10 | console.log(' uuid v5 '); 11 | console.log(' uuid --help'); 12 | console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); 13 | } 14 | 15 | var args = process.argv.slice(2); 16 | 17 | if (args.indexOf('--help') >= 0) { 18 | usage(); 19 | process.exit(0); 20 | } 21 | var version = args.shift() || 'v4'; 22 | 23 | switch (version) { 24 | case 'v1': 25 | var uuidV1 = require('../v1'); 26 | console.log(uuidV1()); 27 | break; 28 | 29 | case 'v3': 30 | var uuidV3 = require('../v3'); 31 | 32 | var name = args.shift(); 33 | var namespace = args.shift(); 34 | assert(name != null, 'v3 name not specified'); 35 | assert(namespace != null, 'v3 namespace not specified'); 36 | 37 | if (namespace == 'URL') namespace = uuidV3.URL; 38 | if (namespace == 'DNS') namespace = uuidV3.DNS; 39 | 40 | console.log(uuidV3(name, namespace)); 41 | break; 42 | 43 | case 'v4': 44 | var uuidV4 = require('../v4'); 45 | console.log(uuidV4()); 46 | break; 47 | 48 | case 'v5': 49 | var uuidV5 = require('../v5'); 50 | 51 | var name = args.shift(); 52 | var namespace = args.shift(); 53 | assert(name != null, 'v5 name not specified'); 54 | assert(namespace != null, 'v5 namespace not specified'); 55 | 56 | if (namespace == 'URL') namespace = uuidV5.URL; 57 | if (namespace == 'DNS') namespace = uuidV5.DNS; 58 | 59 | console.log(uuidV5(name, namespace)); 60 | break; 61 | 62 | default: 63 | usage(); 64 | process.exit(1); 65 | } 66 | -------------------------------------------------------------------------------- /node_modules/uuid/index.js: -------------------------------------------------------------------------------- 1 | var v1 = require('./v1'); 2 | var v4 = require('./v4'); 3 | 4 | var uuid = v4; 5 | uuid.v1 = v1; 6 | uuid.v4 = v4; 7 | 8 | module.exports = uuid; 9 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/bytesToUuid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Convert array of 16 byte values to UUID string format of the form: 3 | * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX 4 | */ 5 | var byteToHex = []; 6 | for (var i = 0; i < 256; ++i) { 7 | byteToHex[i] = (i + 0x100).toString(16).substr(1); 8 | } 9 | 10 | function bytesToUuid(buf, offset) { 11 | var i = offset || 0; 12 | var bth = byteToHex; 13 | // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 14 | return ([ 15 | bth[buf[i++]], bth[buf[i++]], 16 | bth[buf[i++]], bth[buf[i++]], '-', 17 | bth[buf[i++]], bth[buf[i++]], '-', 18 | bth[buf[i++]], bth[buf[i++]], '-', 19 | bth[buf[i++]], bth[buf[i++]], '-', 20 | bth[buf[i++]], bth[buf[i++]], 21 | bth[buf[i++]], bth[buf[i++]], 22 | bth[buf[i++]], bth[buf[i++]] 23 | ]).join(''); 24 | } 25 | 26 | module.exports = bytesToUuid; 27 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/md5-browser.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Browser-compatible JavaScript MD5 3 | * 4 | * Modification of JavaScript MD5 5 | * https://github.com/blueimp/JavaScript-MD5 6 | * 7 | * Copyright 2011, Sebastian Tschan 8 | * https://blueimp.net 9 | * 10 | * Licensed under the MIT license: 11 | * https://opensource.org/licenses/MIT 12 | * 13 | * Based on 14 | * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message 15 | * Digest Algorithm, as defined in RFC 1321. 16 | * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 17 | * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet 18 | * Distributed under the BSD License 19 | * See http://pajhome.org.uk/crypt/md5 for more info. 20 | */ 21 | 22 | 'use strict'; 23 | 24 | function md5(bytes) { 25 | if (typeof(bytes) == 'string') { 26 | var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape 27 | bytes = new Array(msg.length); 28 | for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); 29 | } 30 | 31 | return md5ToHexEncodedArray( 32 | wordsToMd5( 33 | bytesToWords(bytes) 34 | , bytes.length * 8) 35 | ); 36 | } 37 | 38 | 39 | /* 40 | * Convert an array of little-endian words to an array of bytes 41 | */ 42 | function md5ToHexEncodedArray(input) { 43 | var i; 44 | var x; 45 | var output = []; 46 | var length32 = input.length * 32; 47 | var hexTab = '0123456789abcdef'; 48 | var hex; 49 | 50 | for (i = 0; i < length32; i += 8) { 51 | x = (input[i >> 5] >>> (i % 32)) & 0xFF; 52 | 53 | hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16); 54 | 55 | output.push(hex); 56 | } 57 | return output; 58 | } 59 | 60 | /* 61 | * Calculate the MD5 of an array of little-endian words, and a bit length. 62 | */ 63 | function wordsToMd5(x, len) { 64 | /* append padding */ 65 | x[len >> 5] |= 0x80 << (len % 32); 66 | x[(((len + 64) >>> 9) << 4) + 14] = len; 67 | 68 | var i; 69 | var olda; 70 | var oldb; 71 | var oldc; 72 | var oldd; 73 | var a = 1732584193; 74 | var b = -271733879; 75 | var c = -1732584194; 76 | 77 | var d = 271733878; 78 | 79 | for (i = 0; i < x.length; i += 16) { 80 | olda = a; 81 | oldb = b; 82 | oldc = c; 83 | oldd = d; 84 | 85 | a = md5ff(a, b, c, d, x[i], 7, -680876936); 86 | d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); 87 | c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); 88 | b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); 89 | a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); 90 | d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); 91 | c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); 92 | b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); 93 | a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); 94 | d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); 95 | c = md5ff(c, d, a, b, x[i + 10], 17, -42063); 96 | b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); 97 | a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); 98 | d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); 99 | c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); 100 | b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); 101 | 102 | a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); 103 | d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); 104 | c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); 105 | b = md5gg(b, c, d, a, x[i], 20, -373897302); 106 | a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); 107 | d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); 108 | c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); 109 | b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); 110 | a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); 111 | d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); 112 | c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); 113 | b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); 114 | a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); 115 | d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); 116 | c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); 117 | b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); 118 | 119 | a = md5hh(a, b, c, d, x[i + 5], 4, -378558); 120 | d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); 121 | c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); 122 | b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); 123 | a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); 124 | d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); 125 | c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); 126 | b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); 127 | a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); 128 | d = md5hh(d, a, b, c, x[i], 11, -358537222); 129 | c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); 130 | b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); 131 | a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); 132 | d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); 133 | c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); 134 | b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); 135 | 136 | a = md5ii(a, b, c, d, x[i], 6, -198630844); 137 | d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); 138 | c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); 139 | b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); 140 | a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); 141 | d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); 142 | c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); 143 | b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); 144 | a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); 145 | d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); 146 | c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); 147 | b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); 148 | a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); 149 | d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); 150 | c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); 151 | b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); 152 | 153 | a = safeAdd(a, olda); 154 | b = safeAdd(b, oldb); 155 | c = safeAdd(c, oldc); 156 | d = safeAdd(d, oldd); 157 | } 158 | return [a, b, c, d]; 159 | } 160 | 161 | /* 162 | * Convert an array bytes to an array of little-endian words 163 | * Characters >255 have their high-byte silently ignored. 164 | */ 165 | function bytesToWords(input) { 166 | var i; 167 | var output = []; 168 | output[(input.length >> 2) - 1] = undefined; 169 | for (i = 0; i < output.length; i += 1) { 170 | output[i] = 0; 171 | } 172 | var length8 = input.length * 8; 173 | for (i = 0; i < length8; i += 8) { 174 | output[i >> 5] |= (input[(i / 8)] & 0xFF) << (i % 32); 175 | } 176 | 177 | return output; 178 | } 179 | 180 | /* 181 | * Add integers, wrapping at 2^32. This uses 16-bit operations internally 182 | * to work around bugs in some JS interpreters. 183 | */ 184 | function safeAdd(x, y) { 185 | var lsw = (x & 0xFFFF) + (y & 0xFFFF); 186 | var msw = (x >> 16) + (y >> 16) + (lsw >> 16); 187 | return (msw << 16) | (lsw & 0xFFFF); 188 | } 189 | 190 | /* 191 | * Bitwise rotate a 32-bit number to the left. 192 | */ 193 | function bitRotateLeft(num, cnt) { 194 | return (num << cnt) | (num >>> (32 - cnt)); 195 | } 196 | 197 | /* 198 | * These functions implement the four basic operations the algorithm uses. 199 | */ 200 | function md5cmn(q, a, b, x, s, t) { 201 | return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); 202 | } 203 | function md5ff(a, b, c, d, x, s, t) { 204 | return md5cmn((b & c) | ((~b) & d), a, b, x, s, t); 205 | } 206 | function md5gg(a, b, c, d, x, s, t) { 207 | return md5cmn((b & d) | (c & (~d)), a, b, x, s, t); 208 | } 209 | function md5hh(a, b, c, d, x, s, t) { 210 | return md5cmn(b ^ c ^ d, a, b, x, s, t); 211 | } 212 | function md5ii(a, b, c, d, x, s, t) { 213 | return md5cmn(c ^ (b | (~d)), a, b, x, s, t); 214 | } 215 | 216 | module.exports = md5; 217 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/md5.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var crypto = require('crypto'); 4 | 5 | function md5(bytes) { 6 | if (typeof Buffer.from === 'function') { 7 | // Modern Buffer API 8 | if (Array.isArray(bytes)) { 9 | bytes = Buffer.from(bytes); 10 | } else if (typeof bytes === 'string') { 11 | bytes = Buffer.from(bytes, 'utf8'); 12 | } 13 | } else { 14 | // Pre-v4 Buffer API 15 | if (Array.isArray(bytes)) { 16 | bytes = new Buffer(bytes); 17 | } else if (typeof bytes === 'string') { 18 | bytes = new Buffer(bytes, 'utf8'); 19 | } 20 | } 21 | 22 | return crypto.createHash('md5').update(bytes).digest(); 23 | } 24 | 25 | module.exports = md5; 26 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/rng-browser.js: -------------------------------------------------------------------------------- 1 | // Unique ID creation requires a high quality random # generator. In the 2 | // browser this is a little complicated due to unknown quality of Math.random() 3 | // and inconsistent support for the `crypto` API. We do the best we can via 4 | // feature-detection 5 | 6 | // getRandomValues needs to be invoked in a context where "this" is a Crypto 7 | // implementation. Also, find the complete implementation of crypto on IE11. 8 | var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || 9 | (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); 10 | 11 | if (getRandomValues) { 12 | // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto 13 | var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef 14 | 15 | module.exports = function whatwgRNG() { 16 | getRandomValues(rnds8); 17 | return rnds8; 18 | }; 19 | } else { 20 | // Math.random()-based (RNG) 21 | // 22 | // If all else fails, use Math.random(). It's fast, but is of unspecified 23 | // quality. 24 | var rnds = new Array(16); 25 | 26 | module.exports = function mathRNG() { 27 | for (var i = 0, r; i < 16; i++) { 28 | if ((i & 0x03) === 0) r = Math.random() * 0x100000000; 29 | rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; 30 | } 31 | 32 | return rnds; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/rng.js: -------------------------------------------------------------------------------- 1 | // Unique ID creation requires a high quality random # generator. In node.js 2 | // this is pretty straight-forward - we use the crypto API. 3 | 4 | var crypto = require('crypto'); 5 | 6 | module.exports = function nodeRNG() { 7 | return crypto.randomBytes(16); 8 | }; 9 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/sha1-browser.js: -------------------------------------------------------------------------------- 1 | // Adapted from Chris Veness' SHA1 code at 2 | // http://www.movable-type.co.uk/scripts/sha1.html 3 | 'use strict'; 4 | 5 | function f(s, x, y, z) { 6 | switch (s) { 7 | case 0: return (x & y) ^ (~x & z); 8 | case 1: return x ^ y ^ z; 9 | case 2: return (x & y) ^ (x & z) ^ (y & z); 10 | case 3: return x ^ y ^ z; 11 | } 12 | } 13 | 14 | function ROTL(x, n) { 15 | return (x << n) | (x>>> (32 - n)); 16 | } 17 | 18 | function sha1(bytes) { 19 | var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; 20 | var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; 21 | 22 | if (typeof(bytes) == 'string') { 23 | var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape 24 | bytes = new Array(msg.length); 25 | for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); 26 | } 27 | 28 | bytes.push(0x80); 29 | 30 | var l = bytes.length/4 + 2; 31 | var N = Math.ceil(l/16); 32 | var M = new Array(N); 33 | 34 | for (var i=0; i>> 0; 66 | e = d; 67 | d = c; 68 | c = ROTL(b, 30) >>> 0; 69 | b = a; 70 | a = T; 71 | } 72 | 73 | H[0] = (H[0] + a) >>> 0; 74 | H[1] = (H[1] + b) >>> 0; 75 | H[2] = (H[2] + c) >>> 0; 76 | H[3] = (H[3] + d) >>> 0; 77 | H[4] = (H[4] + e) >>> 0; 78 | } 79 | 80 | return [ 81 | H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, 82 | H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, 83 | H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, 84 | H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, 85 | H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff 86 | ]; 87 | } 88 | 89 | module.exports = sha1; 90 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/sha1.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var crypto = require('crypto'); 4 | 5 | function sha1(bytes) { 6 | if (typeof Buffer.from === 'function') { 7 | // Modern Buffer API 8 | if (Array.isArray(bytes)) { 9 | bytes = Buffer.from(bytes); 10 | } else if (typeof bytes === 'string') { 11 | bytes = Buffer.from(bytes, 'utf8'); 12 | } 13 | } else { 14 | // Pre-v4 Buffer API 15 | if (Array.isArray(bytes)) { 16 | bytes = new Buffer(bytes); 17 | } else if (typeof bytes === 'string') { 18 | bytes = new Buffer(bytes, 'utf8'); 19 | } 20 | } 21 | 22 | return crypto.createHash('sha1').update(bytes).digest(); 23 | } 24 | 25 | module.exports = sha1; 26 | -------------------------------------------------------------------------------- /node_modules/uuid/lib/v35.js: -------------------------------------------------------------------------------- 1 | var bytesToUuid = require('./bytesToUuid'); 2 | 3 | function uuidToBytes(uuid) { 4 | // Note: We assume we're being passed a valid uuid string 5 | var bytes = []; 6 | uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) { 7 | bytes.push(parseInt(hex, 16)); 8 | }); 9 | 10 | return bytes; 11 | } 12 | 13 | function stringToBytes(str) { 14 | str = unescape(encodeURIComponent(str)); // UTF8 escape 15 | var bytes = new Array(str.length); 16 | for (var i = 0; i < str.length; i++) { 17 | bytes[i] = str.charCodeAt(i); 18 | } 19 | return bytes; 20 | } 21 | 22 | module.exports = function(name, version, hashfunc) { 23 | var generateUUID = function(value, namespace, buf, offset) { 24 | var off = buf && offset || 0; 25 | 26 | if (typeof(value) == 'string') value = stringToBytes(value); 27 | if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace); 28 | 29 | if (!Array.isArray(value)) throw TypeError('value must be an array of bytes'); 30 | if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); 31 | 32 | // Per 4.3 33 | var bytes = hashfunc(namespace.concat(value)); 34 | bytes[6] = (bytes[6] & 0x0f) | version; 35 | bytes[8] = (bytes[8] & 0x3f) | 0x80; 36 | 37 | if (buf) { 38 | for (var idx = 0; idx < 16; ++idx) { 39 | buf[off+idx] = bytes[idx]; 40 | } 41 | } 42 | 43 | return buf || bytesToUuid(bytes); 44 | }; 45 | 46 | // Function#name is not settable on some platforms (#270) 47 | try { 48 | generateUUID.name = name; 49 | } catch (err) { 50 | } 51 | 52 | // Pre-defined namespaces, per Appendix C 53 | generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; 54 | generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; 55 | 56 | return generateUUID; 57 | }; 58 | -------------------------------------------------------------------------------- /node_modules/uuid/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "uuid@3.4.0", 5 | "/Users/guylevintal/Desktop/Git/spectral-github-action" 6 | ] 7 | ], 8 | "_from": "uuid@3.4.0", 9 | "_id": "uuid@3.4.0", 10 | "_inBundle": false, 11 | "_integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", 12 | "_location": "/uuid", 13 | "_phantomChildren": {}, 14 | "_requested": { 15 | "type": "version", 16 | "registry": true, 17 | "raw": "uuid@3.4.0", 18 | "name": "uuid", 19 | "escapedName": "uuid", 20 | "rawSpec": "3.4.0", 21 | "saveSpec": null, 22 | "fetchSpec": "3.4.0" 23 | }, 24 | "_requiredBy": [ 25 | "/@actions/tool-cache" 26 | ], 27 | "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", 28 | "_spec": "3.4.0", 29 | "_where": "/Users/guylevintal/Desktop/Git/spectral-github-action", 30 | "bin": { 31 | "uuid": "bin/uuid" 32 | }, 33 | "browser": { 34 | "./lib/rng.js": "./lib/rng-browser.js", 35 | "./lib/sha1.js": "./lib/sha1-browser.js", 36 | "./lib/md5.js": "./lib/md5-browser.js" 37 | }, 38 | "bugs": { 39 | "url": "https://github.com/uuidjs/uuid/issues" 40 | }, 41 | "commitlint": { 42 | "extends": [ 43 | "@commitlint/config-conventional" 44 | ] 45 | }, 46 | "contributors": [ 47 | { 48 | "name": "Robert Kieffer", 49 | "email": "robert@broofa.com" 50 | }, 51 | { 52 | "name": "Christoph Tavan", 53 | "email": "dev@tavan.de" 54 | }, 55 | { 56 | "name": "AJ ONeal", 57 | "email": "coolaj86@gmail.com" 58 | }, 59 | { 60 | "name": "Vincent Voyer", 61 | "email": "vincent@zeroload.net" 62 | }, 63 | { 64 | "name": "Roman Shtylman", 65 | "email": "shtylman@gmail.com" 66 | } 67 | ], 68 | "description": "RFC4122 (v1, v4, and v5) UUIDs", 69 | "devDependencies": { 70 | "@commitlint/cli": "~8.2.0", 71 | "@commitlint/config-conventional": "~8.2.0", 72 | "eslint": "~6.4.0", 73 | "husky": "~3.0.5", 74 | "mocha": "6.2.0", 75 | "runmd": "1.2.1", 76 | "standard-version": "7.0.0" 77 | }, 78 | "homepage": "https://github.com/uuidjs/uuid#readme", 79 | "husky": { 80 | "hooks": { 81 | "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" 82 | } 83 | }, 84 | "keywords": [ 85 | "uuid", 86 | "guid", 87 | "rfc4122" 88 | ], 89 | "license": "MIT", 90 | "name": "uuid", 91 | "repository": { 92 | "type": "git", 93 | "url": "git+https://github.com/uuidjs/uuid.git" 94 | }, 95 | "scripts": { 96 | "lint": "eslint .", 97 | "md": "runmd --watch --output=README.md README_js.md", 98 | "prepare": "runmd --output=README.md README_js.md", 99 | "release": "standard-version", 100 | "test": "npm run lint && mocha test/test.js" 101 | }, 102 | "version": "3.4.0" 103 | } 104 | -------------------------------------------------------------------------------- /node_modules/uuid/v1.js: -------------------------------------------------------------------------------- 1 | var rng = require('./lib/rng'); 2 | var bytesToUuid = require('./lib/bytesToUuid'); 3 | 4 | // **`v1()` - Generate time-based UUID** 5 | // 6 | // Inspired by https://github.com/LiosK/UUID.js 7 | // and http://docs.python.org/library/uuid.html 8 | 9 | var _nodeId; 10 | var _clockseq; 11 | 12 | // Previous uuid creation time 13 | var _lastMSecs = 0; 14 | var _lastNSecs = 0; 15 | 16 | // See https://github.com/uuidjs/uuid for API details 17 | function v1(options, buf, offset) { 18 | var i = buf && offset || 0; 19 | var b = buf || []; 20 | 21 | options = options || {}; 22 | var node = options.node || _nodeId; 23 | var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; 24 | 25 | // node and clockseq need to be initialized to random values if they're not 26 | // specified. We do this lazily to minimize issues related to insufficient 27 | // system entropy. See #189 28 | if (node == null || clockseq == null) { 29 | var seedBytes = rng(); 30 | if (node == null) { 31 | // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) 32 | node = _nodeId = [ 33 | seedBytes[0] | 0x01, 34 | seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] 35 | ]; 36 | } 37 | if (clockseq == null) { 38 | // Per 4.2.2, randomize (14 bit) clockseq 39 | clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; 40 | } 41 | } 42 | 43 | // UUID timestamps are 100 nano-second units since the Gregorian epoch, 44 | // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so 45 | // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' 46 | // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. 47 | var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); 48 | 49 | // Per 4.2.1.2, use count of uuid's generated during the current clock 50 | // cycle to simulate higher resolution clock 51 | var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; 52 | 53 | // Time since last uuid creation (in msecs) 54 | var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; 55 | 56 | // Per 4.2.1.2, Bump clockseq on clock regression 57 | if (dt < 0 && options.clockseq === undefined) { 58 | clockseq = clockseq + 1 & 0x3fff; 59 | } 60 | 61 | // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new 62 | // time interval 63 | if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { 64 | nsecs = 0; 65 | } 66 | 67 | // Per 4.2.1.2 Throw error if too many uuids are requested 68 | if (nsecs >= 10000) { 69 | throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); 70 | } 71 | 72 | _lastMSecs = msecs; 73 | _lastNSecs = nsecs; 74 | _clockseq = clockseq; 75 | 76 | // Per 4.1.4 - Convert from unix epoch to Gregorian epoch 77 | msecs += 12219292800000; 78 | 79 | // `time_low` 80 | var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; 81 | b[i++] = tl >>> 24 & 0xff; 82 | b[i++] = tl >>> 16 & 0xff; 83 | b[i++] = tl >>> 8 & 0xff; 84 | b[i++] = tl & 0xff; 85 | 86 | // `time_mid` 87 | var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; 88 | b[i++] = tmh >>> 8 & 0xff; 89 | b[i++] = tmh & 0xff; 90 | 91 | // `time_high_and_version` 92 | b[i++] = tmh >>> 24 & 0xf | 0x10; // include version 93 | b[i++] = tmh >>> 16 & 0xff; 94 | 95 | // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) 96 | b[i++] = clockseq >>> 8 | 0x80; 97 | 98 | // `clock_seq_low` 99 | b[i++] = clockseq & 0xff; 100 | 101 | // `node` 102 | for (var n = 0; n < 6; ++n) { 103 | b[i + n] = node[n]; 104 | } 105 | 106 | return buf ? buf : bytesToUuid(b); 107 | } 108 | 109 | module.exports = v1; 110 | -------------------------------------------------------------------------------- /node_modules/uuid/v3.js: -------------------------------------------------------------------------------- 1 | var v35 = require('./lib/v35.js'); 2 | var md5 = require('./lib/md5'); 3 | 4 | module.exports = v35('v3', 0x30, md5); -------------------------------------------------------------------------------- /node_modules/uuid/v4.js: -------------------------------------------------------------------------------- 1 | var rng = require('./lib/rng'); 2 | var bytesToUuid = require('./lib/bytesToUuid'); 3 | 4 | function v4(options, buf, offset) { 5 | var i = buf && offset || 0; 6 | 7 | if (typeof(options) == 'string') { 8 | buf = options === 'binary' ? new Array(16) : null; 9 | options = null; 10 | } 11 | options = options || {}; 12 | 13 | var rnds = options.random || (options.rng || rng)(); 14 | 15 | // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` 16 | rnds[6] = (rnds[6] & 0x0f) | 0x40; 17 | rnds[8] = (rnds[8] & 0x3f) | 0x80; 18 | 19 | // Copy bytes to buffer, if provided 20 | if (buf) { 21 | for (var ii = 0; ii < 16; ++ii) { 22 | buf[i + ii] = rnds[ii]; 23 | } 24 | } 25 | 26 | return buf || bytesToUuid(rnds); 27 | } 28 | 29 | module.exports = v4; 30 | -------------------------------------------------------------------------------- /node_modules/uuid/v5.js: -------------------------------------------------------------------------------- 1 | var v35 = require('./lib/v35.js'); 2 | var sha1 = require('./lib/sha1'); 3 | module.exports = v35('v5', 0x50, sha1); 4 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spectral-github-action", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@actions/core": { 8 | "version": "1.6.0", 9 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz", 10 | "integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==", 11 | "requires": { 12 | "@actions/http-client": "^1.0.11" 13 | } 14 | }, 15 | "@actions/exec": { 16 | "version": "1.1.0", 17 | "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.0.tgz", 18 | "integrity": "sha512-LImpN9AY0J1R1mEYJjVJfSZWU4zYOlEcwSTgPve1rFQqK5AwrEs6uWW5Rv70gbDIQIAUwI86z6B+9mPK4w9Sbg==", 19 | "requires": { 20 | "@actions/io": "^1.0.1" 21 | } 22 | }, 23 | "@actions/http-client": { 24 | "version": "1.0.11", 25 | "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz", 26 | "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==", 27 | "requires": { 28 | "tunnel": "0.0.6" 29 | } 30 | }, 31 | "@actions/io": { 32 | "version": "1.1.1", 33 | "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.1.tgz", 34 | "integrity": "sha512-Qi4JoKXjmE0O67wAOH6y0n26QXhMKMFo7GD/4IXNVcrtLjUlGjGuVys6pQgwF3ArfGTQu0XpqaNr0YhED2RaRA==" 35 | }, 36 | "@actions/tool-cache": { 37 | "version": "1.7.1", 38 | "resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.7.1.tgz", 39 | "integrity": "sha512-y1xxxOhXaBUIUit3lhepmu/0xdgiTMpnZRLmVdtF0hTm521doi+MdRRRP62czHvM7wxH6epj4JPNJQ3iJpOrkQ==", 40 | "requires": { 41 | "@actions/core": "^1.2.6", 42 | "@actions/exec": "^1.0.0", 43 | "@actions/http-client": "^1.0.8", 44 | "@actions/io": "^1.1.1", 45 | "semver": "^6.1.0", 46 | "uuid": "^3.3.2" 47 | } 48 | }, 49 | "semver": { 50 | "version": "6.3.0", 51 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 52 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" 53 | }, 54 | "tunnel": { 55 | "version": "0.0.6", 56 | "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", 57 | "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" 58 | }, 59 | "uuid": { 60 | "version": "3.4.0", 61 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", 62 | "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spectral-github-action", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": {}, 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/SpectralOps/spectral-github-action.git" 10 | }, 11 | "keywords": [], 12 | "author": "", 13 | "license": "MIT", 14 | "bugs": { 15 | "url": "https://github.com/SpectralOps/spectral-github-action" 16 | }, 17 | "homepage": "https://github.com/SpectralOps/spectral-github-action#readme", 18 | "dependencies": { 19 | "@actions/core": "^1.6.0", 20 | "@actions/io": "^1.1.1", 21 | "@actions/tool-cache": "^1.7.1" 22 | } 23 | } 24 | --------------------------------------------------------------------------------