diff --git a/.github/workflows/versions.yml b/.github/workflows/versions.yml new file mode 100644 index 0000000..be2873c --- /dev/null +++ b/.github/workflows/versions.yml @@ -0,0 +1,29 @@ +name: go-versions +on: + push: + branches: + - master + paths-ignore: + - '**.md' + pull_request: + paths-ignore: + - '**.md' +jobs: + run: + name: Go + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ubuntu-latest, windows-latest, macos-latest] + version: [1.13, 1.12.9] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: setup-go ${{ matrix.version }} + uses: ./ + with: + go-version: ${{ matrix.version}} + + - name: go version + run: go version diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 22e0e06..fed69ae 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -1,5 +1,13 @@ -name: Main workflow -on: [push] +name: build-test +on: + push: + branches: + - master + paths-ignore: + - '**.md' + pull_request: + paths-ignore: + - '**.md' jobs: run: name: Run @@ -9,12 +17,12 @@ jobs: operating-system: [ubuntu-latest, windows-latest] steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@v2 - - name: Set Node.js 10.x - uses: actions/setup-node@master + - name: Setup node 12 + uses: actions/setup-node@v1 with: - version: 10.x + node-version: 12 - name: npm install run: npm install diff --git a/.gitignore b/.gitignore index 25b580b..f45a61f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ -# Explicitly not ignoring node_modules so that they are included in package downloaded by runner -!node_modules/ -__tests__/runner/* +node_modules/ +lib # Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore # Logs diff --git a/CONDUCT b/CONDUCT new file mode 100644 index 0000000..517657b --- /dev/null +++ b/CONDUCT @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +Examples of representing a project or community include using an official +project e-mail address, posting via an official social media account, or acting +as an appointed representative at an online or offline event. Representation of +a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at opensource@github.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq \ No newline at end of file diff --git a/README.md b/README.md index f035f2c..cd52462 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # setup-go

- GitHub Actions status + GitHub Actions status + + versions status

This action sets up a go environment for use in actions by: @@ -30,10 +32,10 @@ jobs: runs-on: ubuntu-16.04 strategy: matrix: - go: [ '1.8', '1.9.3', '1.10.x' ] + go: [ '1.13', '1.12' ] name: Go ${{ matrix.go }} sample steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Setup go uses: actions/setup-go@v1 with: @@ -48,3 +50,7 @@ The scripts and documentation in this project are released under the [MIT Licens # Contributions Contributions are welcome! See [Contributor's Guide](docs/contributors.md) + +## Code of Conduct + +:wave: Be nice. See [our code of conduct](CONDUCT) diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts deleted file mode 100644 index fcaa76f..0000000 --- a/__tests__/installer.test.ts +++ /dev/null @@ -1,126 +0,0 @@ -import io = require('@actions/io'); -import fs = require('fs'); -import os = require('os'); -import path = require('path'); -import nock = require('nock'); - -const toolDir = path.join(__dirname, 'runner', 'tools'); -const tempDir = path.join(__dirname, 'runner', 'temp'); -const dataDir = path.join(__dirname, 'data'); - -process.env['RUNNER_TOOL_CACHE'] = toolDir; -process.env['RUNNER_TEMP'] = tempDir; -import * as installer from '../src/installer'; - -const IS_WINDOWS = process.platform === 'win32'; - -describe('installer tests', () => { - beforeAll(async () => { - await io.rmRF(toolDir); - await io.rmRF(tempDir); - }, 100000); - - afterAll(async () => { - try { - await io.rmRF(toolDir); - await io.rmRF(tempDir); - } catch { - console.log('Failed to remove test directories'); - } - }, 100000); - - it('Acquires version of go if no matching version is installed', async () => { - await installer.getGo('1.10.8'); - const goDir = path.join(toolDir, 'go', '1.10.8', os.arch()); - - expect(fs.existsSync(`${goDir}.complete`)).toBe(true); - if (IS_WINDOWS) { - expect(fs.existsSync(path.join(goDir, 'bin', 'go.exe'))).toBe(true); - } else { - expect(fs.existsSync(path.join(goDir, 'bin', 'go'))).toBe(true); - } - }, 100000); - - describe('the latest release of a go version', () => { - beforeEach(() => { - nock('https://golang.org') - .get('/dl/') - .query({mode: 'json', include: 'all'}) - .replyWithFile(200, path.join(dataDir, 'golang-dl.json')); - }); - - afterEach(() => { - nock.cleanAll(); - nock.enableNetConnect(); - }); - - it('Acquires latest release version of go 1.10 if using 1.10 and no matching version is installed', async () => { - await installer.getGo('1.10'); - const goDir = path.join(toolDir, 'go', '1.10.8', os.arch()); - - expect(fs.existsSync(`${goDir}.complete`)).toBe(true); - if (IS_WINDOWS) { - expect(fs.existsSync(path.join(goDir, 'bin', 'go.exe'))).toBe(true); - } else { - expect(fs.existsSync(path.join(goDir, 'bin', 'go'))).toBe(true); - } - }, 100000); - - it('Acquires latest release version of go 1.10 if using 1.10.x and no matching version is installed', async () => { - await installer.getGo('1.10.x'); - const goDir = path.join(toolDir, 'go', '1.10.8', os.arch()); - - expect(fs.existsSync(`${goDir}.complete`)).toBe(true); - if (IS_WINDOWS) { - expect(fs.existsSync(path.join(goDir, 'bin', 'go.exe'))).toBe(true); - } else { - expect(fs.existsSync(path.join(goDir, 'bin', 'go'))).toBe(true); - } - }, 100000); - - it('Acquires latest release version of go if using 1.x and no matching version is installed', async () => { - await installer.getGo('1.x'); - const goDir = path.join(toolDir, 'go', '1.13.0', os.arch()); - - expect(fs.existsSync(`${goDir}.complete`)).toBe(true); - if (IS_WINDOWS) { - expect(fs.existsSync(path.join(goDir, 'bin', 'go.exe'))).toBe(true); - } else { - expect(fs.existsSync(path.join(goDir, 'bin', 'go'))).toBe(true); - } - }, 100000); - }); - - it('Throws if no location contains correct go version', async () => { - let thrown = false; - try { - await installer.getGo('1000.0'); - } catch { - thrown = true; - } - expect(thrown).toBe(true); - }); - - it('Uses version of go installed in cache', async () => { - const goDir: string = path.join(toolDir, 'go', '250.0.0', os.arch()); - await io.mkdirP(goDir); - fs.writeFileSync(`${goDir}.complete`, 'hello'); - // This will throw if it doesn't find it in the cache (because no such version exists) - await installer.getGo('250.0'); - return; - }); - - it('Doesnt use version of go that was only partially installed in cache', async () => { - const goDir: string = path.join(toolDir, 'go', '251.0.0', os.arch()); - await io.mkdirP(goDir); - let thrown = false; - try { - // This will throw if it doesn't find it in the cache (because no such version exists) - await installer.getGo('251.0'); - } catch { - thrown = true; - } - expect(thrown).toBe(true); - return; - }); -}); diff --git a/__tests__/setup-go.test.ts b/__tests__/setup-go.test.ts new file mode 100644 index 0000000..622fdfa --- /dev/null +++ b/__tests__/setup-go.test.ts @@ -0,0 +1,155 @@ +import * as tc from '@actions/tool-cache'; +import * as core from '@actions/core'; +import fs = require('fs'); +import os = require('os'); +import path = require('path'); +import {run} from '../src/main'; +import * as httpm from '@actions/http-client'; +import * as im from '../src/installer'; +import * as sys from '../src/system'; +import { ITypedResponse } from '@actions/http-client/interfaces'; + +let goJsonData = require('./data/golang-dl.json'); + +describe('setup-go', () => { + let inSpy: jest.SpyInstance; + let tcSpy: jest.SpyInstance; + let cnSpy: jest.SpyInstance; + let getSpy: jest.SpyInstance; + let platSpy: jest.SpyInstance; + let archSpy: jest.SpyInstance; + let dlSpy: jest.SpyInstance; + let exSpy: jest.SpyInstance; + let http: httpm.HttpClient = new httpm.HttpClient('setup-go-tests'); + + beforeEach(() => { + tcSpy = jest.spyOn(tc, 'find'); + inSpy = jest.spyOn(core, 'getInput'); + cnSpy = jest.spyOn(process.stdout, 'write'); + platSpy = jest.spyOn(sys, 'getPlatform'); + archSpy = jest.spyOn(sys, 'getArch'); + dlSpy = jest.spyOn(tc, "downloadTool"); + exSpy = jest.spyOn(tc, "extractTar"); + getSpy = jest.spyOn(http, 'getJson'); + getSpy.mockImplementation(() => >{ + result: goJsonData + }); + cnSpy.mockImplementation(line => { + // uncomment to debug + //process.stderr.write('write2:' + line + '\n'); + }); + }); + + afterEach(() => { + tcSpy.mockClear(); + cnSpy.mockClear(); + jest.clearAllMocks(); + }); + + afterAll(async () => {}, 100000); + + it('finds a version of go already in the cache', async () => { + inSpy.mockImplementation(() => '1.13.0') + let toolPath = path.normalize('/cache/go/1.13.0/x64'); + tcSpy.mockImplementation(() => toolPath); + await run(); + + let expPath = path.join(toolPath, 'bin'); + expect(cnSpy).toHaveBeenCalledWith(`::add-path::${expPath}${os.EOL}`); + }); + + it('finds a version in the cache and adds it to the path', async () => { + let toolPath = path.normalize('/cache/go/1.13.0/x64'); + inSpy.mockImplementation(() => '1.13.0'); + tcSpy.mockImplementation(() => toolPath); + await run(); + + let expPath = path.join(toolPath, 'bin'); + expect(cnSpy).toHaveBeenCalledWith(`::add-path::${expPath}${os.EOL}`); + }); + + it('handles unhandled error and reports error', async () => { + let errMsg = 'unhandled error message'; + inSpy.mockImplementation(() => '1.13.0'); + tcSpy.mockImplementation(() => { + throw new Error(errMsg); + }); + await run(); + expect(cnSpy).toHaveBeenCalledWith('::error::' + errMsg + os.EOL); + }); + + it('can mock go versions query', async () => { + let r: ITypedResponse = await http.getJson('https://asite.notexist.com/path'); + expect(r).toBeDefined(); + let versions = r.result; + expect(versions).toBeDefined(); + let l:number = versions? versions.length: 0; + expect(l).toBe(76); + }); + + it('finds stable match for exact version', async () => { + platSpy.mockImplementation(() => 'linux'); + archSpy.mockImplementation(() => 'amd64'); + + // get request is already mocked + // spec: 1.13.1 => 1.13.1 (exact) + let match: im.IGoVersion | undefined = await im.findMatch('1.13.1', true); + expect(match).toBeDefined(); + let version: string = match ? match.version : ''; + expect(version).toBe('go1.13.1'); + let fileName = match ? match.files[0].filename: ''; + expect(fileName).toBe('go1.13.1.linux-amd64.tar.gz'); + }); + + it('finds stable match for exact dot zero version', async () => { + platSpy.mockImplementation(() => 'linux'); + archSpy.mockImplementation(() => 'amd64'); + + // spec: 1.13.0 => 1.13 + let match: im.IGoVersion | undefined = await im.findMatch('1.13.0', true); + expect(match).toBeDefined(); + let version: string = match ? match.version : ''; + expect(version).toBe('go1.13'); + let fileName = match ? match.files[0].filename: ''; + expect(fileName).toBe('go1.13.linux-amd64.tar.gz'); + }); + + it('finds latest patch version for minor version spec', async () => { + platSpy.mockImplementation(() => 'linux'); + archSpy.mockImplementation(() => 'amd64'); + + // spec: 1.13 => 1.13.7 (latest) + let match: im.IGoVersion | undefined = await im.findMatch('1.13', true); + expect(match).toBeDefined(); + let version: string = match ? match.version : ''; + expect(version).toBe('go1.13.7'); + let fileName = match ? match.files[0].filename: ''; + expect(fileName).toBe('go1.13.7.linux-amd64.tar.gz'); + }); + + it('finds latest patch version for caret version spec', async () => { + platSpy.mockImplementation(() => 'linux'); + archSpy.mockImplementation(() => 'amd64'); + + // spec: ^1.13.6 => 1.13.7 + let match: im.IGoVersion | undefined = await im.findMatch('^1.13.6', true); + expect(match).toBeDefined(); + let version: string = match ? match.version : ''; + expect(version).toBe('go1.13.7'); + let fileName = match ? match.files[0].filename: ''; + expect(fileName).toBe('go1.13.7.linux-amd64.tar.gz'); + }); + + it('finds latest version for major version spec', async () => { + platSpy.mockImplementation(() => 'linux'); + archSpy.mockImplementation(() => 'amd64'); + + // spec: 1 => 1.13.7 (latest) + let match: im.IGoVersion | undefined = await im.findMatch('1', true); + expect(match).toBeDefined(); + let version: string = match ? match.version : ''; + expect(version).toBe('go1.13.7'); + let fileName = match ? match.files[0].filename: ''; + expect(fileName).toBe('go1.13.7.linux-amd64.tar.gz'); + }); +}); diff --git a/action.yml b/action.yml index 1723d7f..87869bc 100644 --- a/action.yml +++ b/action.yml @@ -3,12 +3,10 @@ description: 'Setup a Go environment and add it to the PATH, additionally provid author: 'GitHub' inputs: go-version: - description: 'The Go version to download (if necessary) and use. Example: 1.9.3' - default: '1.10' -# Deprecated option, do not use. Will not be supported after October 1, 2019 - version: - description: 'Deprecated. Use go-version instead. Will not be supported after October 1, 2019' - deprecationMessage: 'The version property will not be supported after October 1, 2019. Use go-version instead' + description: 'The Go version to download (if necessary) and use. Supports semver spec and ranges.' + stable: + description: 'Whether to download only stable versions' + default: 'true' runs: using: 'node12' - main: 'lib/setup-go.js' + main: 'dist/index.js' diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..cd79128 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,4805 @@ +module.exports = +/******/ (function(modules, runtime) { // webpackBootstrap +/******/ "use strict"; +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ __webpack_require__.ab = __dirname + "/"; +/******/ +/******/ // the startup function +/******/ function startup() { +/******/ // Load entry module and return exports +/******/ return __webpack_require__(154); +/******/ }; +/******/ +/******/ // run startup +/******/ return startup(); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 1: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const childProcess = __webpack_require__(129); +const path = __webpack_require__(622); +const util_1 = __webpack_require__(669); +const ioUtil = __webpack_require__(672); +const exec = util_1.promisify(childProcess.exec); +/** + * Copies a file or folder. + * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js + * + * @param source source path + * @param dest destination path + * @param options optional. See CopyOptions. + */ +function cp(source, dest, options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const { force, recursive } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + // Dest is an existing file, but not forcing + if (destStat && destStat.isFile() && !force) { + return; + } + // If dest is an existing directory, should copy inside. + const newDest = destStat && destStat.isDirectory() + ? path.join(dest, path.basename(source)) + : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } + else { + yield cpDirRecursive(source, newDest, 0, force); + } + } + else { + if (path.relative(source, newDest) === '') { + // a file cannot be copied to itself + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); +} +exports.cp = cp; +/** + * Moves a path. + * + * @param source source path + * @param dest destination path + * @param options optional. See MoveOptions. + */ +function mv(source, dest, options = {}) { + return __awaiter(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + // If dest is directory copy src into dest + dest = path.join(dest, path.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } + else { + throw new Error('Destination already exists'); + } + } + } + yield mkdirP(path.dirname(dest)); + yield ioUtil.rename(source, dest); + }); +} +exports.mv = mv; +/** + * Remove a path recursively with force + * + * @param inputPath path to remove + */ +function rmRF(inputPath) { + return __awaiter(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another + // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del. + try { + if (yield ioUtil.isDirectory(inputPath, true)) { + yield exec(`rd /s /q "${inputPath}"`); + } + else { + yield exec(`del /f /a "${inputPath}"`); + } + } + catch (err) { + // if you try to delete a file that doesn't exist, desired result is achieved + // other errors are valid + if (err.code !== 'ENOENT') + throw err; + } + // Shelling out fails to remove a symlink folder with missing source, this unlink catches that + try { + yield ioUtil.unlink(inputPath); + } + catch (err) { + // if you try to delete a file that doesn't exist, desired result is achieved + // other errors are valid + if (err.code !== 'ENOENT') + throw err; + } + } + else { + let isDir = false; + try { + isDir = yield ioUtil.isDirectory(inputPath); + } + catch (err) { + // if you try to delete a file that doesn't exist, desired result is achieved + // other errors are valid + if (err.code !== 'ENOENT') + throw err; + return; + } + if (isDir) { + yield exec(`rm -rf "${inputPath}"`); + } + else { + yield ioUtil.unlink(inputPath); + } + } + }); +} +exports.rmRF = rmRF; +/** + * Make a directory. Creates the full path with folders in between + * Will throw if it fails + * + * @param fsPath path to create + * @returns Promise + */ +function mkdirP(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + yield ioUtil.mkdirP(fsPath); + }); +} +exports.mkdirP = mkdirP; +/** + * Returns path of a tool had the tool actually been invoked. Resolves via paths. + * If you check and the tool does not exist, it will throw. + * + * @param tool name of the tool + * @param check whether to check if tool exists + * @returns Promise path to tool + */ +function which(tool, check) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + // recursive when check=true + if (check) { + const result = yield which(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } + else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + } + try { + // build the list of extensions to try + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env.PATHEXT) { + for (const extension of process.env.PATHEXT.split(path.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + // if it's rooted, return it if exists. otherwise return empty. + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return filePath; + } + return ''; + } + // if any path separators, return empty + if (tool.includes('/') || (ioUtil.IS_WINDOWS && tool.includes('\\'))) { + return ''; + } + // build the list of directories + // + // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, + // it feels like we should not do this. Checking the current directory seems like more of a use + // case of a shell, and the which() function exposed by the toolkit should strive for consistency + // across platforms. + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path.delimiter)) { + if (p) { + directories.push(p); + } + } + } + // return the first match + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(directory + path.sep + tool, extensions); + if (filePath) { + return filePath; + } + } + return ''; + } + catch (err) { + throw new Error(`which failed with message ${err.message}`); + } + }); +} +exports.which = which; +function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + return { force, recursive }; +} +function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter(this, void 0, void 0, function* () { + // Ensure there is not a run away recursive copy + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + // Recurse + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } + else { + yield copyFile(srcFile, destFile, force); + } + } + // Change the mode for the newly created directory + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); +} +// Buffered file copy +function copyFile(srcFile, destFile, force) { + return __awaiter(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + // unlink/re-link it + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } + catch (e) { + // Try to override file permission + if (e.code === 'EPERM') { + yield ioUtil.chmod(destFile, '0666'); + yield ioUtil.unlink(destFile); + } + // other errors = it doesn't exist, no work to do + } + // Copy over symlink + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); + } + else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); +} +//# sourceMappingURL=io.js.map + +/***/ }), + +/***/ 9: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const os = __webpack_require__(87); +const events = __webpack_require__(614); +const child = __webpack_require__(129); +const path = __webpack_require__(622); +const io = __webpack_require__(1); +const ioUtil = __webpack_require__(672); +/* eslint-disable @typescript-eslint/unbound-method */ +const IS_WINDOWS = process.platform === 'win32'; +/* + * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. + */ +class ToolRunner extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool + if (IS_WINDOWS) { + // Windows + cmd file + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + // Windows + verbatim + else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } + // Windows (regular) + else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } + else { + // OSX/Linux - this can likely be improved with some form of quoting. + // creating processes on Unix is fundamentally different than Windows. + // on Unix, execvp() takes an arg array. + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + // the rest of the string ... + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + strBuffer = s; + } + catch (err) { + // streaming lines to console is best effort. Don't fail a build. + this._debug(`error processing line. Failed with error ${err}`); + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env['COMSPEC'] || 'cmd.exe'; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += ' '; + argline += options.windowsVerbatimArguments + ? a + : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str, end) { + return str.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return (this._endsWith(upperToolPath, '.CMD') || + this._endsWith(upperToolPath, '.BAT')); + } + _windowsQuoteCmdArg(arg) { + // for .exe, apply the normal quoting rules that libuv applies + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + // otherwise apply quoting rules specific to the cmd.exe command line parser. + // the libuv rules are generic and are not designed specifically for cmd.exe + // command line parser. + // + // for a detailed description of the cmd.exe command line parser, refer to + // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 + // need quotes for empty arg + if (!arg) { + return '""'; + } + // determine whether the arg needs to be quoted + const cmdSpecialChars = [ + ' ', + '\t', + '&', + '(', + ')', + '[', + ']', + '{', + '}', + '^', + '=', + ';', + '!', + "'", + '+', + ',', + '`', + '~', + '|', + '<', + '>', + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some(x => x === char)) { + needsQuotes = true; + break; + } + } + // short-circuit if quotes not needed + if (!needsQuotes) { + return arg; + } + // the following quoting rules are very similar to the rules that by libuv applies. + // + // 1) wrap the string in quotes + // + // 2) double-up quotes - i.e. " => "" + // + // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately + // doesn't work well with a cmd.exe command line. + // + // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. + // for example, the command line: + // foo.exe "myarg:""my val""" + // is parsed by a .NET console app into an arg array: + // [ "myarg:\"my val\"" ] + // which is the same end result when applying libuv quoting rules. although the actual + // command line from libuv quoting rules would look like: + // foo.exe "myarg:\"my val\"" + // + // 3) double-up slashes that precede a quote, + // e.g. hello \world => "hello \world" + // hello\"world => "hello\\""world" + // hello\\"world => "hello\\\\""world" + // hello world\ => "hello world\\" + // + // technically this is not required for a cmd.exe command line, or the batch argument parser. + // the reasons for including this as a .cmd quoting rule are: + // + // a) this is optimized for the scenario where the argument is passed from the .cmd file to an + // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. + // + // b) it's what we've been doing previously (by deferring to node default behavior) and we + // haven't heard any complaints about that aspect. + // + // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be + // escaped when used on the command line directly - even though within a .cmd file % can be escaped + // by using %%. + // + // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts + // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. + // + // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would + // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the + // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args + // to an external program. + // + // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. + // % can be escaped within a .cmd file. + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + // walk the string in reverse + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === '\\') { + reverse += '\\'; // double the slash + } + else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; // double the quote + } + else { + quoteHit = false; + } + } + reverse += '"'; + return reverse + .split('') + .reverse() + .join(''); + } + _uvQuoteCmdArg(arg) { + // Tool runner wraps child_process.spawn() and needs to apply the same quoting as + // Node in certain cases where the undocumented spawn option windowsVerbatimArguments + // is used. + // + // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, + // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), + // pasting copyright notice from Node within this function: + // + // Copyright Joyent, Inc. and other Node contributors. All rights reserved. + // + // Permission is hereby granted, free of charge, to any person obtaining a copy + // of this software and associated documentation files (the "Software"), to + // deal in the Software without restriction, including without limitation the + // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + // sell copies of the Software, and to permit persons to whom the Software is + // furnished to do so, subject to the following conditions: + // + // The above copyright notice and this permission notice shall be included in + // all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + // IN THE SOFTWARE. + if (!arg) { + // Need double quotation for empty argument + return '""'; + } + if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { + // No quotation needed + return arg; + } + if (!arg.includes('"') && !arg.includes('\\')) { + // No embedded double quotes or backslashes, so I can just wrap + // quote marks around the whole thing. + return `"${arg}"`; + } + // Expected input/output: + // input : hello"world + // output: "hello\"world" + // input : hello""world + // output: "hello\"\"world" + // input : hello\world + // output: hello\world + // input : hello\\world + // output: hello\\world + // input : hello\"world + // output: "hello\\\"world" + // input : hello\\"world + // output: "hello\\\\\"world" + // input : hello world\ + // output: "hello world\\" - note the comment in libuv actually reads "hello world\" + // but it appears the comment is wrong, it should be "hello world\\" + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + // walk the string in reverse + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === '\\') { + reverse += '\\'; + } + else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '\\'; + } + else { + quoteHit = false; + } + } + reverse += '"'; + return reverse + .split('') + .reverse() + .join(''); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 10000 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result['windowsVerbatimArguments'] = + options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter(this, void 0, void 0, function* () { + // root the tool path if it is unrooted and contains relative pathing + if (!ioUtil.isRooted(this.toolPath) && + (this.toolPath.includes('/') || + (IS_WINDOWS && this.toolPath.includes('\\')))) { + // prefer options.cwd if it is specified, however options.cwd may also need to be rooted + this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + // if the tool is only a file name, then resolve it from the PATH + // otherwise verify it exists (add extension on Windows if necessary) + this.toolPath = yield io.which(this.toolPath, true); + return new Promise((resolve, reject) => { + this._debug(`exec tool: ${this.toolPath}`); + this._debug('arguments:'); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on('debug', (message) => { + this._debug(message); + }); + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + const stdbuffer = ''; + if (cp.stdout) { + cp.stdout.on('data', (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + const errbuffer = ''; + if (cp.stderr) { + cp.stderr.on('data', (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && + optionsNonNull.errStream && + optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr + ? optionsNonNull.errStream + : optionsNonNull.outStream; + s.write(data); + } + this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on('error', (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on('exit', (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on('close', (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on('done', (error, exitCode) => { + if (stdbuffer.length > 0) { + this.emit('stdline', stdbuffer); + } + if (errbuffer.length > 0) { + this.emit('errline', errbuffer); + } + cp.removeAllListeners(); + if (error) { + reject(error); + } + else { + resolve(exitCode); + } + }); + }); + }); + } +} +exports.ToolRunner = ToolRunner; +/** + * Convert an arg string to an array of args. Handles escaping + * + * @param argString string of arguments + * @returns string[] array of arguments + */ +function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ''; + function append(c) { + // we only escape double quotes. + if (escaped && c !== '"') { + arg += '\\'; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } + else { + append(c); + } + continue; + } + if (c === '\\' && escaped) { + append(c); + continue; + } + if (c === '\\' && inQuotes) { + escaped = true; + continue; + } + if (c === ' ' && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ''; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; +} +exports.argStringToArray = argStringToArray; +class ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; // tracks whether the process has exited and stdio is closed + this.processError = ''; + this.processExitCode = 0; + this.processExited = false; // tracks whether the process has exited + this.processStderr = false; // tracks whether stderr was written to + this.delay = 10000; // 10 seconds + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error('toolPath must not be empty'); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } + else if (this.processExited) { + this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit('debug', message); + } + _setResult() { + // determine whether there is an error + let error; + if (this.processExited) { + if (this.processError) { + error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } + else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } + else if (this.processStderr && this.options.failOnStdErr) { + error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + // clear the timeout + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit('done', error, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / + 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } +} +//# sourceMappingURL=toolrunner.js.map + +/***/ }), + +/***/ 16: +/***/ (function(module) { + +module.exports = require("tls"); + +/***/ }), + +/***/ 87: +/***/ (function(module) { + +module.exports = require("os"); + +/***/ }), + +/***/ 129: +/***/ (function(module) { + +module.exports = require("child_process"); + +/***/ }), + +/***/ 139: +/***/ (function(module, __unusedexports, __webpack_require__) { + +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = __webpack_require__(417); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; + + +/***/ }), + +/***/ 141: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + + +var net = __webpack_require__(631); +var tls = __webpack_require__(16); +var http = __webpack_require__(605); +var https = __webpack_require__(211); +var events = __webpack_require__(614); +var assert = __webpack_require__(357); +var util = __webpack_require__(669); + + +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + + +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } + + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); + + function onFree() { + self.emit('free', socket, options); + } + + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } + + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + + function onError(cause) { + connectReq.removeAllListeners(); + + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); + + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; + +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} + + +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } + } + } + return target; +} + + +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); + } + console.error.apply(console, args); + } +} else { + debug = function() {}; +} +exports.debug = debug; // for test + + +/***/ }), + +/***/ 154: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const main_1 = __webpack_require__(198); +main_1.run(); + + +/***/ }), + +/***/ 198: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(__webpack_require__(470)); +const tc = __importStar(__webpack_require__(533)); +const installer = __importStar(__webpack_require__(749)); +const path = __importStar(__webpack_require__(622)); +function run() { + return __awaiter(this, void 0, void 0, function* () { + try { + // + // versionSpec is optional. If supplied, install / use from the tool cache + // If not supplied then problem matchers will still be setup. Useful for self-hosted. + // + let versionSpec = core.getInput('go-version'); + let stable = (core.getInput('stable') || '').toUpperCase() == "TRUE"; + if (versionSpec) { + let installDir = tc.find('go', versionSpec); + if (!installDir) { + installDir = yield installer.downloadGo(versionSpec, stable); + } + if (installDir) { + core.exportVariable('GOROOT', installDir); + core.addPath(path.join(installDir, 'bin')); + } + else { + throw new Error(`Could not find a version that satisfied version spec: ${versionSpec}`); + } + } + // add problem matchers + const matchersPath = path.join(__dirname, '..', 'matchers.json'); + console.log(`##[add-matcher]${matchersPath}`); + } + catch (error) { + core.setFailed(error.message); + } + }); +} +exports.run = run; + + +/***/ }), + +/***/ 211: +/***/ (function(module) { + +module.exports = require("https"); + +/***/ }), + +/***/ 280: +/***/ (function(module, exports) { + +exports = module.exports = SemVer + +var debug +/* istanbul ignore next */ +if (typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG)) { + debug = function () { + var args = Array.prototype.slice.call(arguments, 0) + args.unshift('SEMVER') + console.log.apply(console, args) + } +} else { + debug = function () {} +} + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0' + +var MAX_LENGTH = 256 +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16 + +// The actual regexps go on exports.re +var re = exports.re = [] +var src = exports.src = [] +var t = exports.tokens = {} +var R = 0 + +function tok (n) { + t[n] = R++ +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +tok('NUMERICIDENTIFIER') +src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' +tok('NUMERICIDENTIFIERLOOSE') +src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +tok('NONNUMERICIDENTIFIER') +src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' + +// ## Main Version +// Three dot-separated numeric identifiers. + +tok('MAINVERSION') +src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIER] + ')' + +tok('MAINVERSIONLOOSE') +src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +tok('PRERELEASEIDENTIFIER') +src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +tok('PRERELEASEIDENTIFIERLOOSE') +src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + + '|' + src[t.NONNUMERICIDENTIFIER] + ')' + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +tok('PRERELEASE') +src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' + +tok('PRERELEASELOOSE') +src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +tok('BUILDIDENTIFIER') +src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +tok('BUILD') +src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +tok('FULL') +tok('FULLPLAIN') +src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + + src[t.PRERELEASE] + '?' + + src[t.BUILD] + '?' + +src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +tok('LOOSEPLAIN') +src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + + src[t.PRERELEASELOOSE] + '?' + + src[t.BUILD] + '?' + +tok('LOOSE') +src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' + +tok('GTLT') +src[t.GTLT] = '((?:<|>)?=?)' + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +tok('XRANGEIDENTIFIERLOOSE') +src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' +tok('XRANGEIDENTIFIER') +src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' + +tok('XRANGEPLAIN') +src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + + '(?:' + src[t.PRERELEASE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGEPLAINLOOSE') +src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[t.PRERELEASELOOSE] + ')?' + + src[t.BUILD] + '?' + + ')?)?' + +tok('XRANGE') +src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' +tok('XRANGELOOSE') +src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +tok('COERCE') +src[t.COERCE] = '(^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])' +tok('COERCERTL') +re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +tok('LONETILDE') +src[t.LONETILDE] = '(?:~>?)' + +tok('TILDETRIM') +src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' +re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') +var tildeTrimReplace = '$1~' + +tok('TILDE') +src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' +tok('TILDELOOSE') +src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +tok('LONECARET') +src[t.LONECARET] = '(?:\\^)' + +tok('CARETTRIM') +src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' +re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') +var caretTrimReplace = '$1^' + +tok('CARET') +src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' +tok('CARETLOOSE') +src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +tok('COMPARATORLOOSE') +src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' +tok('COMPARATOR') +src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +tok('COMPARATORTRIM') +src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' + +// this one has to use the /g flag +re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') +var comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +tok('HYPHENRANGE') +src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAIN] + ')' + + '\\s*$' + +tok('HYPHENRANGELOOSE') +src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[t.XRANGEPLAINLOOSE] + ')' + + '\\s*$' + +// Star ranges basically just allow anything at all. +tok('STAR') +src[t.STAR] = '(<|>)?=?\\s*\\*' + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]) + if (!re[i]) { + re[i] = new RegExp(src[i]) + } +} + +exports.parse = parse +function parse (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + var r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +exports.valid = valid +function valid (version, options) { + var v = parse(version, options) + return v ? v.version : null +} + +exports.clean = clean +function clean (version, options) { + var s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} + +exports.SemVer = SemVer + +function SemVer (version, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + if (version instanceof SemVer) { + if (version.loose === options.loose) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + } + + if (!(this instanceof SemVer)) { + return new SemVer(version, options) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + + var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError('Invalid Version: ' + version) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map(function (id) { + if (/^[0-9]+$/.test(id)) { + var num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() +} + +SemVer.prototype.format = function () { + this.version = this.major + '.' + this.minor + '.' + this.patch + if (this.prerelease.length) { + this.version += '-' + this.prerelease.join('.') + } + return this.version +} + +SemVer.prototype.toString = function () { + return this.version +} + +SemVer.prototype.compare = function (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return this.compareMain(other) || this.comparePre(other) +} + +SemVer.prototype.compareMain = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) +} + +SemVer.prototype.comparePre = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + var i = 0 + do { + var a = this.prerelease[i] + var b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +SemVer.prototype.compareBuild = function (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + var i = 0 + do { + var a = this.build[i] + var b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) +} + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + var i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error('invalid increment argument: ' + release) + } + this.format() + this.raw = this.version + return this +} + +exports.inc = inc +function inc (version, release, loose, identifier) { + if (typeof (loose) === 'string') { + identifier = loose + loose = undefined + } + + try { + return new SemVer(version, loose).inc(release, identifier).version + } catch (er) { + return null + } +} + +exports.diff = diff +function diff (version1, version2) { + if (eq(version1, version2)) { + return null + } else { + var v1 = parse(version1) + var v2 = parse(version2) + var prefix = '' + if (v1.prerelease.length || v2.prerelease.length) { + prefix = 'pre' + var defaultResult = 'prerelease' + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} + +exports.compareIdentifiers = compareIdentifiers + +var numeric = /^[0-9]+$/ +function compareIdentifiers (a, b) { + var anum = numeric.test(a) + var bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +exports.rcompareIdentifiers = rcompareIdentifiers +function rcompareIdentifiers (a, b) { + return compareIdentifiers(b, a) +} + +exports.major = major +function major (a, loose) { + return new SemVer(a, loose).major +} + +exports.minor = minor +function minor (a, loose) { + return new SemVer(a, loose).minor +} + +exports.patch = patch +function patch (a, loose) { + return new SemVer(a, loose).patch +} + +exports.compare = compare +function compare (a, b, loose) { + return new SemVer(a, loose).compare(new SemVer(b, loose)) +} + +exports.compareLoose = compareLoose +function compareLoose (a, b) { + return compare(a, b, true) +} + +exports.compareBuild = compareBuild +function compareBuild (a, b, loose) { + var versionA = new SemVer(a, loose) + var versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} + +exports.rcompare = rcompare +function rcompare (a, b, loose) { + return compare(b, a, loose) +} + +exports.sort = sort +function sort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(a, b, loose) + }) +} + +exports.rsort = rsort +function rsort (list, loose) { + return list.sort(function (a, b) { + return exports.compareBuild(b, a, loose) + }) +} + +exports.gt = gt +function gt (a, b, loose) { + return compare(a, b, loose) > 0 +} + +exports.lt = lt +function lt (a, b, loose) { + return compare(a, b, loose) < 0 +} + +exports.eq = eq +function eq (a, b, loose) { + return compare(a, b, loose) === 0 +} + +exports.neq = neq +function neq (a, b, loose) { + return compare(a, b, loose) !== 0 +} + +exports.gte = gte +function gte (a, b, loose) { + return compare(a, b, loose) >= 0 +} + +exports.lte = lte +function lte (a, b, loose) { + return compare(a, b, loose) <= 0 +} + +exports.cmp = cmp +function cmp (a, op, b, loose) { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError('Invalid operator: ' + op) + } +} + +exports.Comparator = Comparator +function Comparator (comp, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + if (!(this instanceof Comparator)) { + return new Comparator(comp, options) + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) +} + +var ANY = {} +Comparator.prototype.parse = function (comp) { + var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var m = comp.match(r) + + if (!m) { + throw new TypeError('Invalid comparator: ' + comp) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } +} + +Comparator.prototype.toString = function () { + return this.value +} + +Comparator.prototype.test = function (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) +} + +Comparator.prototype.intersects = function (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + var rangeTmp + + if (this.operator === '') { + if (this.value === '') { + return true + } + rangeTmp = new Range(comp.value, options) + return satisfies(this.value, rangeTmp, options) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + rangeTmp = new Range(this.value, options) + return satisfies(comp.semver, rangeTmp, options) + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + var sameSemVer = this.semver.version === comp.semver.version + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')) + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')) + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan +} + +exports.Range = Range +function Range (range, options) { + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (range instanceof Range) { + if (range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + return new Range(range.value, options) + } + + if (!(this instanceof Range)) { + return new Range(range, options) + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range.split(/\s*\|\|\s*/).map(function (range) { + return this.parseRange(range.trim()) + }, this).filter(function (c) { + // throw out any that are not relevant for whatever reason + return c.length + }) + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range) + } + + this.format() +} + +Range.prototype.format = function () { + this.range = this.set.map(function (comps) { + return comps.join(' ').trim() + }).join('||').trim() + return this.range +} + +Range.prototype.toString = function () { + return this.range +} + +Range.prototype.parseRange = function (range) { + var loose = this.options.loose + range = range.trim() + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var set = range.split(' ').map(function (comp) { + return parseComparator(comp, this.options) + }, this).join(' ').split(/\s+/) + if (this.options.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function (comp) { + return !!comp.match(compRe) + }) + } + set = set.map(function (comp) { + return new Comparator(comp, this.options) + }, this) + + return set +} + +Range.prototype.intersects = function (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some(function (thisComparators) { + return ( + isSatisfiable(thisComparators, options) && + range.set.some(function (rangeComparators) { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every(function (thisComparator) { + return rangeComparators.every(function (rangeComparator) { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) +} + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +function isSatisfiable (comparators, options) { + var result = true + var remainingComparators = comparators.slice() + var testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every(function (otherComparator) { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators +function toComparators (range, options) { + return new Range(range, options).set.map(function (comp) { + return comp.map(function (c) { + return c.value + }).join(' ').trim().split(' ') + }) +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator (comp, options) { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +function isX (id) { + return !id || id.toLowerCase() === 'x' || id === '*' +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceTilde(comp, options) + }).join(' ') +} + +function replaceTilde (comp, options) { + var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, function (_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else if (pr) { + debug('replaceTilde pr', pr) + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } else { + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets (comp, options) { + return comp.trim().split(/\s+/).map(function (comp) { + return replaceCaret(comp, options) + }).join(' ') +} + +function replaceCaret (comp, options) { + debug('caret', comp, options) + var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + return comp.replace(r, function (_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr) + var ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' + } else if (isX(p)) { + if (M === '0') { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' + } else { + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + '-' + pr + + ' <' + (+M + 1) + '.0.0' + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1) + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0' + } + } else { + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0' + } + } + + debug('caret return', ret) + return ret + }) +} + +function replaceXRanges (comp, options) { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map(function (comp) { + return replaceXRange(comp, options) + }).join(' ') +} + +function replaceXRange (comp, options) { + comp = comp.trim() + var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, function (ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + var xM = isX(M) + var xm = xM || isX(m) + var xp = xm || isX(p) + var anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + ret = gtlt + M + '.' + m + '.' + p + pr + } else if (xm) { + ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr + } else if (xp) { + ret = '>=' + M + '.' + m + '.0' + pr + + ' <' + M + '.' + (+m + 1) + '.0' + pr + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars (comp, options) { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[t.STAR], '') +} + +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = '>=' + fM + '.0.0' + } else if (isX(fp)) { + from = '>=' + fM + '.' + fm + '.0' + } else { + from = '>=' + from + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = '<' + (+tM + 1) + '.0.0' + } else if (isX(tp)) { + to = '<' + tM + '.' + (+tm + 1) + '.0' + } else if (tpr) { + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr + } else { + to = '<=' + to + } + + return (from + ' ' + to).trim() +} + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false +} + +function testSet (set, version, options) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + +exports.satisfies = satisfies +function satisfies (version, range, options) { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} + +exports.maxSatisfying = maxSatisfying +function maxSatisfying (versions, range, options) { + var max = null + var maxSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} + +exports.minSatisfying = minSatisfying +function minSatisfying (versions, range, options) { + var min = null + var minSV = null + try { + var rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} + +exports.minVersion = minVersion +function minVersion (range, loose) { + range = new Range(range, loose) + + var minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + comparators.forEach(function (comparator) { + // Clone to avoid manipulating the comparator's semver object. + var compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!minver || gt(minver, compver)) { + minver = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error('Unexpected operation: ' + comparator.operator) + } + }) + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} + +exports.validRange = validRange +function validRange (range, options) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr +function ltr (version, range, options) { + return outside(version, range, '<', options) +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr +function gtr (version, range, options) { + return outside(version, range, '>', options) +} + +exports.outside = outside +function outside (version, range, hilo, options) { + version = new SemVer(version, options) + range = new Range(range, options) + + var gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i] + + var high = null + var low = null + + comparators.forEach(function (comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +exports.prerelease = prerelease +function prerelease (version, options) { + var parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} + +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version, options) { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + var match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + var next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } + + if (match === null) { + return null + } + + return parse(match[2] + + '.' + (match[3] || '0') + + '.' + (match[4] || '0'), options) +} + + +/***/ }), + +/***/ 357: +/***/ (function(module) { + +module.exports = require("assert"); + +/***/ }), + +/***/ 413: +/***/ (function(module, __unusedexports, __webpack_require__) { + +module.exports = __webpack_require__(141); + + +/***/ }), + +/***/ 417: +/***/ (function(module) { + +module.exports = require("crypto"); + +/***/ }), + +/***/ 431: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const os = __importStar(__webpack_require__(87)); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return (s || '') + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return (s || '') + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map + +/***/ }), + +/***/ 470: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const command_1 = __webpack_require__(431); +const os = __importStar(__webpack_require__(87)); +const path = __importStar(__webpack_require__(622)); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable + */ +function exportVariable(name, val) { + process.env[name] = val; + command_1.issueCommand('set-env', { name }, val); +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + command_1.issueCommand('add-path', {}, inputPath); + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. The value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store + */ +function setOutput(name, value) { + command_1.issueCommand('set-output', { name }, value); +} +exports.setOutput = setOutput; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message + */ +function error(message) { + command_1.issue('error', message); +} +exports.error = error; +/** + * Adds an warning issue + * @param message warning issue message + */ +function warning(message) { + command_1.issue('warning', message); +} +exports.warning = warning; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store + */ +function saveState(name, value) { + command_1.issueCommand('save-state', { name }, value); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +//# sourceMappingURL=core.js.map + +/***/ }), + +/***/ 533: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const core = __importStar(__webpack_require__(470)); +const io = __importStar(__webpack_require__(1)); +const fs = __importStar(__webpack_require__(747)); +const os = __importStar(__webpack_require__(87)); +const path = __importStar(__webpack_require__(622)); +const httpm = __importStar(__webpack_require__(539)); +const semver = __importStar(__webpack_require__(280)); +const v4_1 = __importDefault(__webpack_require__(826)); +const exec_1 = __webpack_require__(986); +const assert_1 = __webpack_require__(357); +class HTTPError extends Error { + constructor(httpStatusCode) { + super(`Unexpected HTTP response: ${httpStatusCode}`); + this.httpStatusCode = httpStatusCode; + Object.setPrototypeOf(this, new.target.prototype); + } +} +exports.HTTPError = HTTPError; +const IS_WINDOWS = process.platform === 'win32'; +const userAgent = 'actions/tool-cache'; +// On load grab temp directory and cache directory and remove them from env (currently don't want to expose this) +let tempDirectory = process.env['RUNNER_TEMP'] || ''; +let cacheRoot = process.env['RUNNER_TOOL_CACHE'] || ''; +// If directories not found, place them in common temp locations +if (!tempDirectory || !cacheRoot) { + let baseLocation; + if (IS_WINDOWS) { + // On windows use the USERPROFILE env variable + baseLocation = process.env['USERPROFILE'] || 'C:\\'; + } + else { + if (process.platform === 'darwin') { + baseLocation = '/Users'; + } + else { + baseLocation = '/home'; + } + } + if (!tempDirectory) { + tempDirectory = path.join(baseLocation, 'actions', 'temp'); + } + if (!cacheRoot) { + cacheRoot = path.join(baseLocation, 'actions', 'cache'); + } +} +/** + * Download a tool from an url and stream it into a file + * + * @param url url of tool to download + * @param dest path to download tool + * @returns path to downloaded tool + */ +function downloadTool(url, dest) { + return __awaiter(this, void 0, void 0, function* () { + // Wrap in a promise so that we can resolve from within stream callbacks + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + try { + const http = new httpm.HttpClient(userAgent, [], { + allowRetries: true, + maxRetries: 3 + }); + dest = dest || path.join(tempDirectory, v4_1.default()); + yield io.mkdirP(path.dirname(dest)); + core.debug(`Downloading ${url}`); + core.debug(`Downloading ${dest}`); + if (fs.existsSync(dest)) { + throw new Error(`Destination file path ${dest} already exists`); + } + const response = yield http.get(url); + if (response.message.statusCode !== 200) { + const err = new HTTPError(response.message.statusCode); + core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + throw err; + } + const file = fs.createWriteStream(dest); + file.on('open', () => __awaiter(this, void 0, void 0, function* () { + try { + const stream = response.message.pipe(file); + stream.on('close', () => { + core.debug('download complete'); + resolve(dest); + }); + } + catch (err) { + core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + reject(err); + } + })); + file.on('error', err => { + file.end(); + reject(err); + }); + } + catch (err) { + reject(err); + } + })); + }); +} +exports.downloadTool = downloadTool; +/** + * Extract a .7z file + * + * @param file path to the .7z file + * @param dest destination directory. Optional. + * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this + * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will + * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is + * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line + * interface, it is smaller than the full command line interface, and it does support long paths. At the + * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website. + * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path + * to 7zr.exe can be pass to this function. + * @returns path to the destination directory + */ +function extract7z(file, dest, _7zPath) { + return __awaiter(this, void 0, void 0, function* () { + assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS'); + assert_1.ok(file, 'parameter "file" is required'); + dest = yield _createExtractFolder(dest); + const originalCwd = process.cwd(); + process.chdir(dest); + if (_7zPath) { + try { + const args = [ + 'x', + '-bb1', + '-bd', + '-sccUTF-8', + file + ]; + const options = { + silent: true + }; + yield exec_1.exec(`"${_7zPath}"`, args, options); + } + finally { + process.chdir(originalCwd); + } + } + else { + const escapedScript = path + .join(__dirname, '..', 'scripts', 'Invoke-7zdec.ps1') + .replace(/'/g, "''") + .replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines + const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; + const args = [ + '-NoLogo', + '-Sta', + '-NoProfile', + '-NonInteractive', + '-ExecutionPolicy', + 'Unrestricted', + '-Command', + command + ]; + const options = { + silent: true + }; + try { + const powershellPath = yield io.which('powershell', true); + yield exec_1.exec(`"${powershellPath}"`, args, options); + } + finally { + process.chdir(originalCwd); + } + } + return dest; + }); +} +exports.extract7z = extract7z; +/** + * Extract a compressed tar archive + * + * @param file path to the tar + * @param dest destination directory. Optional. + * @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional. + * @returns path to the destination directory + */ +function extractTar(file, dest, flags = 'xz') { + return __awaiter(this, void 0, void 0, function* () { + if (!file) { + throw new Error("parameter 'file' is required"); + } + // Create dest + dest = yield _createExtractFolder(dest); + // Determine whether GNU tar + let versionOutput = ''; + yield exec_1.exec('tar --version', [], { + ignoreReturnCode: true, + listeners: { + stdout: (data) => (versionOutput += data.toString()), + stderr: (data) => (versionOutput += data.toString()) + } + }); + const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR'); + // Initialize args + const args = [flags]; + let destArg = dest; + let fileArg = file; + if (IS_WINDOWS && isGnuTar) { + args.push('--force-local'); + destArg = dest.replace(/\\/g, '/'); + // Technically only the dest needs to have `/` but for aesthetic consistency + // convert slashes in the file arg too. + fileArg = file.replace(/\\/g, '/'); + } + if (isGnuTar) { + // Suppress warnings when using GNU tar to extract archives created by BSD tar + args.push('--warning=no-unknown-keyword'); + } + args.push('-C', destArg, '-f', fileArg); + yield exec_1.exec(`tar`, args); + return dest; + }); +} +exports.extractTar = extractTar; +/** + * Extract a zip + * + * @param file path to the zip + * @param dest destination directory. Optional. + * @returns path to the destination directory + */ +function extractZip(file, dest) { + return __awaiter(this, void 0, void 0, function* () { + if (!file) { + throw new Error("parameter 'file' is required"); + } + dest = yield _createExtractFolder(dest); + if (IS_WINDOWS) { + yield extractZipWin(file, dest); + } + else { + yield extractZipNix(file, dest); + } + return dest; + }); +} +exports.extractZip = extractZip; +function extractZipWin(file, dest) { + return __awaiter(this, void 0, void 0, function* () { + // build the powershell command + const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines + const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + const command = `$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}')`; + // run powershell + const powershellPath = yield io.which('powershell'); + const args = [ + '-NoLogo', + '-Sta', + '-NoProfile', + '-NonInteractive', + '-ExecutionPolicy', + 'Unrestricted', + '-Command', + command + ]; + yield exec_1.exec(`"${powershellPath}"`, args); + }); +} +function extractZipNix(file, dest) { + return __awaiter(this, void 0, void 0, function* () { + const unzipPath = yield io.which('unzip'); + yield exec_1.exec(`"${unzipPath}"`, [file], { cwd: dest }); + }); +} +/** + * Caches a directory and installs it into the tool cacheDir + * + * @param sourceDir the directory to cache into tools + * @param tool tool name + * @param version version of the tool. semver format + * @param arch architecture of the tool. Optional. Defaults to machine architecture + */ +function cacheDir(sourceDir, tool, version, arch) { + return __awaiter(this, void 0, void 0, function* () { + version = semver.clean(version) || version; + arch = arch || os.arch(); + core.debug(`Caching tool ${tool} ${version} ${arch}`); + core.debug(`source dir: ${sourceDir}`); + if (!fs.statSync(sourceDir).isDirectory()) { + throw new Error('sourceDir is not a directory'); + } + // Create the tool dir + const destPath = yield _createToolPath(tool, version, arch); + // copy each child item. do not move. move can fail on Windows + // due to anti-virus software having an open handle on a file. + for (const itemName of fs.readdirSync(sourceDir)) { + const s = path.join(sourceDir, itemName); + yield io.cp(s, destPath, { recursive: true }); + } + // write .complete + _completeToolPath(tool, version, arch); + return destPath; + }); +} +exports.cacheDir = cacheDir; +/** + * Caches a downloaded file (GUID) and installs it + * into the tool cache with a given targetName + * + * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid. + * @param targetFile the name of the file name in the tools directory + * @param tool tool name + * @param version version of the tool. semver format + * @param arch architecture of the tool. Optional. Defaults to machine architecture + */ +function cacheFile(sourceFile, targetFile, tool, version, arch) { + return __awaiter(this, void 0, void 0, function* () { + version = semver.clean(version) || version; + arch = arch || os.arch(); + core.debug(`Caching tool ${tool} ${version} ${arch}`); + core.debug(`source file: ${sourceFile}`); + if (!fs.statSync(sourceFile).isFile()) { + throw new Error('sourceFile is not a file'); + } + // create the tool dir + const destFolder = yield _createToolPath(tool, version, arch); + // copy instead of move. move can fail on Windows due to + // anti-virus software having an open handle on a file. + const destPath = path.join(destFolder, targetFile); + core.debug(`destination file ${destPath}`); + yield io.cp(sourceFile, destPath); + // write .complete + _completeToolPath(tool, version, arch); + return destFolder; + }); +} +exports.cacheFile = cacheFile; +/** + * Finds the path to a tool version in the local installed tool cache + * + * @param toolName name of the tool + * @param versionSpec version of the tool + * @param arch optional arch. defaults to arch of computer + */ +function find(toolName, versionSpec, arch) { + if (!toolName) { + throw new Error('toolName parameter is required'); + } + if (!versionSpec) { + throw new Error('versionSpec parameter is required'); + } + arch = arch || os.arch(); + // attempt to resolve an explicit version + if (!_isExplicitVersion(versionSpec)) { + const localVersions = findAllVersions(toolName, arch); + const match = _evaluateVersions(localVersions, versionSpec); + versionSpec = match; + } + // check for the explicit version in the cache + let toolPath = ''; + if (versionSpec) { + versionSpec = semver.clean(versionSpec) || ''; + const cachePath = path.join(cacheRoot, toolName, versionSpec, arch); + core.debug(`checking cache: ${cachePath}`); + if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) { + core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); + toolPath = cachePath; + } + else { + core.debug('not found'); + } + } + return toolPath; +} +exports.find = find; +/** + * Finds the paths to all versions of a tool that are installed in the local tool cache + * + * @param toolName name of the tool + * @param arch optional arch. defaults to arch of computer + */ +function findAllVersions(toolName, arch) { + const versions = []; + arch = arch || os.arch(); + const toolPath = path.join(cacheRoot, toolName); + if (fs.existsSync(toolPath)) { + const children = fs.readdirSync(toolPath); + for (const child of children) { + if (_isExplicitVersion(child)) { + const fullPath = path.join(toolPath, child, arch || ''); + if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) { + versions.push(child); + } + } + } + } + return versions; +} +exports.findAllVersions = findAllVersions; +function _createExtractFolder(dest) { + return __awaiter(this, void 0, void 0, function* () { + if (!dest) { + // create a temp dir + dest = path.join(tempDirectory, v4_1.default()); + } + yield io.mkdirP(dest); + return dest; + }); +} +function _createToolPath(tool, version, arch) { + return __awaiter(this, void 0, void 0, function* () { + const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || ''); + core.debug(`destination ${folderPath}`); + const markerPath = `${folderPath}.complete`; + yield io.rmRF(folderPath); + yield io.rmRF(markerPath); + yield io.mkdirP(folderPath); + return folderPath; + }); +} +function _completeToolPath(tool, version, arch) { + const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || ''); + const markerPath = `${folderPath}.complete`; + fs.writeFileSync(markerPath, ''); + core.debug('finished caching tool'); +} +function _isExplicitVersion(versionSpec) { + const c = semver.clean(versionSpec) || ''; + core.debug(`isExplicit: ${c}`); + const valid = semver.valid(c) != null; + core.debug(`explicit? ${valid}`); + return valid; +} +function _evaluateVersions(versions, versionSpec) { + let version = ''; + core.debug(`evaluating ${versions.length} versions`); + versions = versions.sort((a, b) => { + if (semver.gt(a, b)) { + return 1; + } + return -1; + }); + for (let i = versions.length - 1; i >= 0; i--) { + const potential = versions[i]; + const satisfied = semver.satisfies(potential, versionSpec); + if (satisfied) { + version = potential; + break; + } + } + if (version) { + core.debug(`matched: ${version}`); + } + else { + core.debug('match not found'); + } + return version; +} +//# sourceMappingURL=tool-cache.js.map + +/***/ }), + +/***/ 539: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const url = __webpack_require__(835); +const http = __webpack_require__(605); +const https = __webpack_require__(211); +const pm = __webpack_require__(950); +let tunnel; +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + let proxyUrl = pm.getProxyUrl(url.parse(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect]; +const HttpResponseRetryCodes = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return new Promise(async (resolve, reject) => { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + let parsedUrl = url.parse(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + } + get(requestUrl, additionalHeaders) { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + } + del(requestUrl, additionalHeaders) { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + } + post(requestUrl, data, additionalHeaders) { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + } + patch(requestUrl, data, additionalHeaders) { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + } + put(requestUrl, data, additionalHeaders) { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + } + head(requestUrl, additionalHeaders) { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return this.request(verb, requestUrl, stream, additionalHeaders); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + async getJson(requestUrl, additionalHeaders = {}) { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + let res = await this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async postJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async putJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + async patchJson(requestUrl, obj, additionalHeaders = {}) { + let data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + let res = await this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + async request(verb, requestUrl, data, headers) { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + let parsedUrl = url.parse(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + let maxTries = (this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + while (numTries < maxTries) { + response = await this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (let i = 0; i < this.handlers.length; i++) { + if (this.handlers[i].canHandleAuthentication(response)) { + authenticationHandler = this.handlers[i]; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 + && this._allowRedirects + && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + let parsedRedirectUrl = url.parse(redirectUrl); + if (parsedUrl.protocol == 'https:' && parsedUrl.protocol != parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + await response.readBody(); + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = await this.requestRaw(info, data); + redirectsRemaining--; + } + if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + await response.readBody(); + await this._performExponentialBackoff(numTries); + } + } + return response; + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return new Promise((resolve, reject) => { + let callbackForResult = function (err, res) { + if (err) { + reject(err); + } + resolve(res); + }; + this.requestRawWithCallback(info, data, callbackForResult); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + let socket; + if (typeof (data) === 'string') { + info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + let handleResult = (err, res) => { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + }; + let req = info.httpModule.request(info.options, (msg) => { + let res = new HttpClientResponse(msg); + handleResult(null, res); + }); + req.on('socket', (sock) => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error('Request timeout: ' + info.options.path), null); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err, null); + }); + if (data && typeof (data) === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof (data) !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + let parsedUrl = url.parse(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; + info.options.path = (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers["user-agent"] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + this.handlers.forEach((handler) => { + handler.prepareRequest(info.options); + }); + } + return info; + } + _mergeHeaders(headers) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + let proxyUrl = pm.getProxyUrl(parsedUrl); + let useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (!!agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (!!this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (useProxy) { + // If using proxy, need tunnel + if (!tunnel) { + tunnel = __webpack_require__(413); + } + const agentOptions = { + maxSockets: maxSockets, + keepAlive: this._keepAlive, + proxy: { + proxyAuth: proxyUrl.auth, + host: proxyUrl.hostname, + port: proxyUrl.port + }, + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + } + static dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + let a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + async _processResponse(res, options) { + return new Promise(async (resolve, reject) => { + const statusCode = res.message.statusCode; + const response = { + statusCode: statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode == HttpCodes.NotFound) { + resolve(response); + } + let obj; + let contents; + // get the result from the body + try { + contents = await res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = "Failed request: (" + statusCode + ")"; + } + let err = new Error(msg); + // attach statusCode and body obj (if available) to the error object + err['statusCode'] = statusCode; + if (response.result) { + err['result'] = response.result; + } + reject(err); + } + else { + resolve(response); + } + }); + } +} +exports.HttpClient = HttpClient; + + +/***/ }), + +/***/ 605: +/***/ (function(module) { + +module.exports = require("http"); + +/***/ }), + +/***/ 614: +/***/ (function(module) { + +module.exports = require("events"); + +/***/ }), + +/***/ 622: +/***/ (function(module) { + +module.exports = require("path"); + +/***/ }), + +/***/ 631: +/***/ (function(module) { + +module.exports = require("net"); + +/***/ }), + +/***/ 669: +/***/ (function(module) { + +module.exports = require("util"); + +/***/ }), + +/***/ 672: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +const assert_1 = __webpack_require__(357); +const fs = __webpack_require__(747); +const path = __webpack_require__(622); +_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; +exports.IS_WINDOWS = process.platform === 'win32'; +function exists(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + try { + yield exports.stat(fsPath); + } + catch (err) { + if (err.code === 'ENOENT') { + return false; + } + throw err; + } + return true; + }); +} +exports.exists = exists; +function isDirectory(fsPath, useStat = false) { + return __awaiter(this, void 0, void 0, function* () { + const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); + return stats.isDirectory(); + }); +} +exports.isDirectory = isDirectory; +/** + * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: + * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). + */ +function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports.IS_WINDOWS) { + return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello + ); // e.g. C: or C:\hello + } + return p.startsWith('/'); +} +exports.isRooted = isRooted; +/** + * Recursively create a directory at `fsPath`. + * + * This implementation is optimistic, meaning it attempts to create the full + * path first, and backs up the path stack from there. + * + * @param fsPath The path to create + * @param maxDepth The maximum recursion depth + * @param depth The current recursion depth + */ +function mkdirP(fsPath, maxDepth = 1000, depth = 1) { + return __awaiter(this, void 0, void 0, function* () { + assert_1.ok(fsPath, 'a path argument must be provided'); + fsPath = path.resolve(fsPath); + if (depth >= maxDepth) + return exports.mkdir(fsPath); + try { + yield exports.mkdir(fsPath); + return; + } + catch (err) { + switch (err.code) { + case 'ENOENT': { + yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1); + yield exports.mkdir(fsPath); + return; + } + default: { + let stats; + try { + stats = yield exports.stat(fsPath); + } + catch (err2) { + throw err; + } + if (!stats.isDirectory()) + throw err; + } + } + } + }); +} +exports.mkdirP = mkdirP; +/** + * Best effort attempt to determine whether a file exists and is executable. + * @param filePath file path to check + * @param extensions additional file extensions to try + * @return if file exists and is executable, returns the file path. otherwise empty string. + */ +function tryGetExecutablePath(filePath, extensions) { + return __awaiter(this, void 0, void 0, function* () { + let stats = undefined; + try { + // test file exists + stats = yield exports.stat(filePath); + } + catch (err) { + if (err.code !== 'ENOENT') { + // eslint-disable-next-line no-console + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + // on Windows, test for valid extension + const upperExt = path.extname(filePath).toUpperCase(); + if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } + else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + // try each extension + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = undefined; + try { + stats = yield exports.stat(filePath); + } + catch (err) { + if (err.code !== 'ENOENT') { + // eslint-disable-next-line no-console + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports.IS_WINDOWS) { + // preserve the case of the actual file (since an extension was appended) + try { + const directory = path.dirname(filePath); + const upperName = path.basename(filePath).toUpperCase(); + for (const actualName of yield exports.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path.join(directory, actualName); + break; + } + } + } + catch (err) { + // eslint-disable-next-line no-console + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } + else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ''; + }); +} +exports.tryGetExecutablePath = tryGetExecutablePath; +function normalizeSeparators(p) { + p = p || ''; + if (exports.IS_WINDOWS) { + // convert slashes on Windows + p = p.replace(/\//g, '\\'); + // remove redundant slashes + return p.replace(/\\\\+/g, '\\'); + } + // remove redundant slashes + return p.replace(/\/\/+/g, '/'); +} +// on Mac/Linux, test the execute bit +// R W X R W X R W X +// 256 128 64 32 16 8 4 2 1 +function isUnixExecutable(stats) { + return ((stats.mode & 1) > 0 || + ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || + ((stats.mode & 64) > 0 && stats.uid === process.getuid())); +} +//# sourceMappingURL=io-util.js.map + +/***/ }), + +/***/ 722: +/***/ (function(module) { + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]]]).join(''); +} + +module.exports = bytesToUuid; + + +/***/ }), + +/***/ 737: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const os = __importStar(__webpack_require__(87)); +function getPlatform() { + // darwin and linux match already + // freebsd not supported yet but future proofed. + // 'aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos', and 'win32' + let plat = os.platform(); + // wants 'darwin', 'freebsd', 'linux', 'windows' + if (plat === 'win32') { + plat = 'windows'; + } + return plat; +} +exports.getPlatform = getPlatform; +function getArch() { + // 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x', 'x32', and 'x64'. + let arch = os.arch(); + // wants amd64, 386, arm64, armv61, ppc641e, s390x + // currently not supported by runner but future proofed mapping + switch (arch) { + case 'x64': + arch = 'amd64'; + break; + case 'ppc': + arch = 'ppc64'; + break; + case 'x32': + arch = '386'; + break; + } + return arch; +} +exports.getArch = getArch; + + +/***/ }), + +/***/ 747: +/***/ (function(module) { + +module.exports = require("fs"); + +/***/ }), + +/***/ 749: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const tc = __importStar(__webpack_require__(533)); +const path = __importStar(__webpack_require__(622)); +const semver = __importStar(__webpack_require__(280)); +const httpm = __importStar(__webpack_require__(539)); +const sys = __importStar(__webpack_require__(737)); +function downloadGo(versionSpec, stable) { + return __awaiter(this, void 0, void 0, function* () { + let toolPath; + try { + let match = yield findMatch(versionSpec, stable); + if (match) { + // download + let downloadUrl = `https://storage.googleapis.com/golang/${match.files[0]}`; + let downloadPath = yield tc.downloadTool(downloadUrl); + // extract + let extPath = sys.getPlatform() == 'windows' ? + yield tc.extractZip(downloadPath) : yield tc.extractTar(downloadPath); + // extracts with a root folder that matches the fileName downloaded + const toolRoot = path.join(extPath, 'go'); + toolPath = yield tc.cacheDir(toolRoot, 'go', versionSpec); + } + } + catch (error) { + throw `Failed to download version ${versionSpec}: ${error}`; + } + return toolPath; + }); +} +exports.downloadGo = downloadGo; +function findMatch(versionSpec, stable) { + return __awaiter(this, void 0, void 0, function* () { + let archFilter = sys.getArch(); + let platFilter = sys.getPlatform(); + let match; + const dlUrl = 'https://golang.org/dl/?mode=json&include=all'; + // this returns versions descending so latest is first + let http = new httpm.HttpClient('setup-go'); + let candidates = (yield http.getJson(dlUrl)).result; + if (!candidates) { + throw new Error(`golang download url did not return results: ${dlUrl}`); + } + let goFile; + for (let i = 0; i < candidates.length; i++) { + let candidate = candidates[i]; + let version = candidate.version.replace('go', ''); + // 1.13.0 is advertised as 1.13 preventing being able to match exactly 1.13.0 + // since a semver of 1.13 would match latest 1.13 + let parts = version.split('.'); + if (parts.length == 2) { + version = version + '.0'; + } + //console.log(version, versionSpec); + if (semver.satisfies(version, versionSpec) && candidate.stable == stable) { + goFile = candidate.files.find(file => { + return file.arch === archFilter && file.os === platFilter; + }); + if (goFile) { + match = candidate; + break; + } + } + } + ; + if (match && goFile) { + match.files = [goFile]; + } + return match; + }); +} +exports.findMatch = findMatch; + + +/***/ }), + +/***/ 826: +/***/ (function(module, __unusedexports, __webpack_require__) { + +var rng = __webpack_require__(139); +var bytesToUuid = __webpack_require__(722); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; + + +/***/ }), + +/***/ 835: +/***/ (function(module) { + +module.exports = require("url"); + +/***/ }), + +/***/ 950: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const url = __webpack_require__(835); +function getProxyUrl(reqUrl) { + let usingSsl = reqUrl.protocol === 'https:'; + let proxyUrl; + if (checkBypass(reqUrl)) { + return proxyUrl; + } + let proxyVar; + if (usingSsl) { + proxyVar = process.env["https_proxy"] || + process.env["HTTPS_PROXY"]; + } + else { + proxyVar = process.env["http_proxy"] || + process.env["HTTP_PROXY"]; + } + if (proxyVar) { + proxyUrl = url.parse(proxyVar); + } + return proxyUrl; +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + let noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + let upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (let upperNoProxyItem of noProxy.split(',').map(x => x.trim().toUpperCase()).filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; + + +/***/ }), + +/***/ 986: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const tr = __webpack_require__(9); +/** + * Exec a command. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code + */ +function exec(commandLine, args, options) { + return __awaiter(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + // Path to tool to execute should be first arg + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); +} +exports.exec = exec; +//# sourceMappingURL=exec.js.map + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/lib/installer.js b/lib/installer.js index 67a4756..1b4ee16 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -15,197 +15,73 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -// Load tempDirectory before it gets wiped by tool-cache -let tempDirectory = process.env['RUNNER_TEMPDIRECTORY'] || ''; -const core = __importStar(require("@actions/core")); const tc = __importStar(require("@actions/tool-cache")); -const os = __importStar(require("os")); const path = __importStar(require("path")); -const util = __importStar(require("util")); const semver = __importStar(require("semver")); -const restm = __importStar(require("typed-rest-client/RestClient")); -let osPlat = os.platform(); -let osArch = os.arch(); -if (!tempDirectory) { - let baseLocation; - if (process.platform === 'win32') { - // On windows use the USERPROFILE env variable - baseLocation = process.env['USERPROFILE'] || 'C:\\'; - } - else { - if (process.platform === 'darwin') { - baseLocation = '/Users'; - } - else { - baseLocation = '/home'; - } - } - tempDirectory = path.join(baseLocation, 'actions', 'temp'); -} -function getGo(version) { +const httpm = __importStar(require("@actions/http-client")); +const sys = __importStar(require("./system")); +function downloadGo(versionSpec, stable) { return __awaiter(this, void 0, void 0, function* () { - const selected = yield determineVersion(version); - if (selected) { - version = selected; - } - // check cache let toolPath; - toolPath = tc.find('go', normalizeVersion(version)); - if (!toolPath) { - // download, extract, cache - toolPath = yield acquireGo(version); - core.debug('Go tool is cached under ' + toolPath); - } - setGoEnvironmentVariables(toolPath); - toolPath = path.join(toolPath, 'bin'); - // - // prepend the tools path. instructs the agent to prepend for future tasks - // - core.addPath(toolPath); - }); -} -exports.getGo = getGo; -function acquireGo(version) { - return __awaiter(this, void 0, void 0, function* () { - // - // Download - a tool installer intimately knows how to get the tool (and construct urls) - // - let fileName = getFileName(version); - let downloadUrl = getDownloadUrl(fileName); - core.debug('Downloading Go from: ' + downloadUrl); - let downloadPath = null; try { - downloadPath = yield tc.downloadTool(downloadUrl); + let match = yield findMatch(versionSpec, stable); + if (match) { + // download + let downloadUrl = `https://storage.googleapis.com/golang/${match.files[0]}`; + let downloadPath = yield tc.downloadTool(downloadUrl); + // extract + let extPath = sys.getPlatform() == 'windows' ? + yield tc.extractZip(downloadPath) : yield tc.extractTar(downloadPath); + // extracts with a root folder that matches the fileName downloaded + const toolRoot = path.join(extPath, 'go'); + toolPath = yield tc.cacheDir(toolRoot, 'go', versionSpec); + } } catch (error) { - core.debug(error); - throw `Failed to download version ${version}: ${error}`; + throw `Failed to download version ${versionSpec}: ${error}`; } - // - // Extract - // - let extPath = tempDirectory; - if (!extPath) { - throw new Error('Temp directory not set'); - } - if (osPlat == 'win32') { - extPath = yield tc.extractZip(downloadPath); - } - else { - extPath = yield tc.extractTar(downloadPath); - } - // - // Install into the local tool cache - node extracts with a root folder that matches the fileName downloaded - // - const toolRoot = path.join(extPath, 'go'); - version = normalizeVersion(version); - return yield tc.cacheDir(toolRoot, 'go', version); + return toolPath; }); } -function getFileName(version) { - const arches = { - x64: 'amd64', - arm: 'armv6l', - arm64: 'arm64', - default: '386' - }; - const platform = osPlat == 'win32' ? 'windows' : osPlat; - const arch = arches[osArch] || arches['default']; - const ext = osPlat == 'win32' ? 'zip' : 'tar.gz'; - const filename = util.format('go%s.%s-%s.%s', version, platform, arch, ext); - return filename; -} -function getDownloadUrl(filename) { - return util.format('https://storage.googleapis.com/golang/%s', filename); -} -function setGoEnvironmentVariables(goRoot) { - core.exportVariable('GOROOT', goRoot); - const goPath = process.env['GOPATH'] || ''; - const goBin = process.env['GOBIN'] || ''; - // set GOPATH and GOBIN as user value - if (goPath) { - core.exportVariable('GOPATH', goPath); - } - if (goBin) { - core.exportVariable('GOBIN', goBin); - } -} -// This function is required to convert the version 1.10 to 1.10.0. -// Because caching utility accept only sementic version, -// which have patch number as well. -function normalizeVersion(version) { - const versionPart = version.split('.'); - if (versionPart[1] == null) { - //append minor and patch version if not available - return version.concat('.0.0'); - } - else { - // handle beta and rc: 1.10beta1 => 1.10.0-beta1, 1.10rc1 => 1.10.0-rc1 - if (versionPart[1].includes('beta') || versionPart[1].includes('rc')) { - versionPart[1] = versionPart[1] - .replace('beta', '.0-beta') - .replace('rc', '.0-rc'); - return versionPart.join('.'); - } - } - if (versionPart[2] == null) { - //append patch version if not available - return version.concat('.0'); - } - else { - // handle beta and rc: 1.8.5beta1 => 1.8.5-beta1, 1.8.5rc1 => 1.8.5-rc1 - if (versionPart[2].includes('beta') || versionPart[2].includes('rc')) { - versionPart[2] = versionPart[2] - .replace('beta', '-beta') - .replace('rc', '-rc'); - return versionPart.join('.'); - } - } - return version; -} -function determineVersion(version) { +exports.downloadGo = downloadGo; +function findMatch(versionSpec, stable) { return __awaiter(this, void 0, void 0, function* () { - if (!version.endsWith('.x')) { - const versionPart = version.split('.'); - if (versionPart[1] == null || versionPart[2] == null) { - return yield getLatestVersion(version.concat('.x')); + let archFilter = sys.getArch(); + let platFilter = sys.getPlatform(); + let match; + const dlUrl = 'https://golang.org/dl/?mode=json&include=all'; + // this returns versions descending so latest is first + let http = new httpm.HttpClient('setup-go'); + let candidates = (yield http.getJson(dlUrl)).result; + if (!candidates) { + throw new Error(`golang download url did not return results: ${dlUrl}`); + } + let goFile; + for (let i = 0; i < candidates.length; i++) { + let candidate = candidates[i]; + let version = candidate.version.replace('go', ''); + // 1.13.0 is advertised as 1.13 preventing being able to match exactly 1.13.0 + // since a semver of 1.13 would match latest 1.13 + let parts = version.split('.'); + if (parts.length == 2) { + version = version + '.0'; } - else { - return version; + //console.log(version, versionSpec); + if (semver.satisfies(version, versionSpec) && candidate.stable == stable) { + goFile = candidate.files.find(file => { + return file.arch === archFilter && file.os === platFilter; + }); + if (goFile) { + match = candidate; + break; + } } } - return yield getLatestVersion(version); - }); -} -function getLatestVersion(version) { - return __awaiter(this, void 0, void 0, function* () { - // clean .x syntax: 1.10.x -> 1.10 - const trimmedVersion = version.slice(0, version.length - 2); - const versions = yield getPossibleVersions(trimmedVersion); - core.debug(`evaluating ${versions.length} versions`); - if (version.length === 0) { - throw new Error('unable to get latest version'); + ; + if (match && goFile) { + match.files = [goFile]; } - core.debug(`matched: ${versions[0]}`); - return versions[0]; - }); -} -function getAvailableVersions() { - return __awaiter(this, void 0, void 0, function* () { - let rest = new restm.RestClient('setup-go'); - let tags = (yield rest.get('https://golang.org/dl/?mode=json&include=all')) - .result || []; - return tags.map(tag => tag.version.replace('go', '')); - }); -} -function getPossibleVersions(version) { - return __awaiter(this, void 0, void 0, function* () { - const versions = yield getAvailableVersions(); - const possibleVersions = versions.filter(v => v.startsWith(version)); - const versionMap = new Map(); - possibleVersions.forEach(v => versionMap.set(normalizeVersion(v), v)); - return Array.from(versionMap.keys()) - .sort(semver.rcompare) - .map(v => versionMap.get(v)); + return match; }); } +exports.findMatch = findMatch; diff --git a/lib/setup-go.js b/lib/setup-go.js index 34d85a1..f95a75a 100644 --- a/lib/setup-go.js +++ b/lib/setup-go.js @@ -1,44 +1,4 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", { value: true }); -const core = __importStar(require("@actions/core")); -const installer = __importStar(require("./installer")); -const path = __importStar(require("path")); -function run() { - return __awaiter(this, void 0, void 0, function* () { - try { - // - // Version is optional. If supplied, install / use from the tool cache - // If not supplied then task is still used to setup proxy, auth, etc... - // - let version = core.getInput('version'); - if (!version) { - version = core.getInput('go-version'); - } - if (version) { - yield installer.getGo(version); - } - // TODO: setup proxy from runner proxy config - const matchersPath = path.join(__dirname, '..', '.github'); - console.log(`##[add-matcher]${path.join(matchersPath, 'go.json')}`); - } - catch (error) { - core.setFailed(error.message); - } - }); -} -run(); +const main_1 = require("./main"); +main_1.run(); diff --git a/.github/go.json b/matchers.json similarity index 100% rename from .github/go.json rename to matchers.json diff --git a/node_modules/@actions/core/LICENSE.md b/node_modules/@actions/core/LICENSE.md deleted file mode 100644 index e5a73f4..0000000 --- a/node_modules/@actions/core/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2019 GitHub - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/core/README.md b/node_modules/@actions/core/README.md deleted file mode 100644 index 8d8c00f..0000000 --- a/node_modules/@actions/core/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# `@actions/core` - -> Core functions for setting results, logging, registering secrets and exporting variables across actions - -## Usage - -#### Inputs/Outputs - -You can use this library to get inputs or set outputs: - -``` -const core = require('@actions/core'); - -const myInput = core.getInput('inputName', { required: true }); - -// Do stuff - -core.setOutput('outputKey', 'outputVal'); -``` - -#### Exporting variables/secrets - -You can also export variables and secrets for future steps. Variables get set in the environment automatically, while secrets must be scoped into the environment from a workflow using `{{ secret.FOO }}`. Secrets will also be masked from the logs: - -``` -const core = require('@actions/core'); - -// Do stuff - -core.exportVariable('envVar', 'Val'); -core.exportSecret('secretVar', variableWithSecretValue); -``` - -#### PATH Manipulation - -You can explicitly add items to the path for all remaining steps in a workflow: - -``` -const core = require('@actions/core'); - -core.addPath('pathToTool'); -``` - -#### Exit codes - -You should use this library to set the failing exit code for your action: - -``` -const core = require('@actions/core'); - -try { - // Do stuff -} -catch (err) { - // setFailed logs the message and sets a failing exit code - core.setFailed(`Action failed with error ${err}`); -} - -``` - -#### Logging - -Finally, this library provides some utilities for logging: - -``` -const core = require('@actions/core'); - -const myInput = core.getInput('input'); -try { - core.debug('Inside try block'); - - if (!myInput) { - core.warning('myInput wasnt set'); - } - - // Do stuff -} -catch (err) { - core.error('Error ${err}, action may still succeed though'); -} -``` diff --git a/node_modules/@actions/core/lib/command.d.ts b/node_modules/@actions/core/lib/command.d.ts deleted file mode 100644 index 9ad8647..0000000 --- a/node_modules/@actions/core/lib/command.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -interface CommandProperties { - [key: string]: string; -} -/** - * Commands - * - * Command Format: - * ##[name key=value;key=value]message - * - * Examples: - * ##[warning]This is the user warning message - * ##[set-secret name=mypassword]definatelyNotAPassword! - */ -export declare function issueCommand(command: string, properties: CommandProperties, message: string): void; -export declare function issue(name: string, message: string): void; -export {}; diff --git a/node_modules/@actions/core/lib/command.js b/node_modules/@actions/core/lib/command.js deleted file mode 100644 index 911698e..0000000 --- a/node_modules/@actions/core/lib/command.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const os = require("os"); -/** - * Commands - * - * Command Format: - * ##[name key=value;key=value]message - * - * Examples: - * ##[warning]This is the user warning message - * ##[set-secret name=mypassword]definatelyNotAPassword! - */ -function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); -} -exports.issueCommand = issueCommand; -function issue(name, message) { - issueCommand(name, {}, message); -} -exports.issue = issue; -const CMD_PREFIX = '##['; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_PREFIX + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - // safely append the val - avoid blowing up when attempting to - // call .replace() if message is not a string for some reason - cmdStr += `${key}=${escape(`${val || ''}`)};`; - } - } - } - } - cmdStr += ']'; - // safely append the message - avoid blowing up when attempting to - // call .replace() if message is not a string for some reason - const message = `${this.message || ''}`; - cmdStr += escapeData(message); - return cmdStr; - } -} -function escapeData(s) { - return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A'); -} -function escape(s) { - return s - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/]/g, '%5D') - .replace(/;/g, '%3B'); -} -//# sourceMappingURL=command.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/command.js.map b/node_modules/@actions/core/lib/command.js.map deleted file mode 100644 index 28ea330..0000000 --- a/node_modules/@actions/core/lib/command.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;AAAA,yBAAwB;AAQxB;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAe;IAEf,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,OAAe;IACjD,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,KAAK,CAAA;AAExB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO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ff --git a/node_modules/@actions/core/lib/core.d.ts b/node_modules/@actions/core/lib/core.d.ts deleted file mode 100644 index f8afe99..0000000 --- a/node_modules/@actions/core/lib/core.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Interface for getInput options - */ -export interface InputOptions { - /** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */ - required?: boolean; -} -/** - * The code to exit an action - */ -export declare enum ExitCode { - /** - * A code indicating that the action was successful - */ - Success = 0, - /** - * A code indicating that the action was a failure - */ - Failure = 1 -} -/** - * sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable - */ -export declare function exportVariable(name: string, val: string): void; -/** - * exports the variable and registers a secret which will get masked from logs - * @param name the name of the variable to set - * @param val value of the secret - */ -export declare function exportSecret(name: string, val: string): void; -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -export declare function addPath(inputPath: string): void; -/** - * Gets the value of an input. The value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -export declare function getInput(name: string, options?: InputOptions): string; -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store - */ -export declare function setOutput(name: string, value: string): void; -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -export declare function setFailed(message: string): void; -/** - * Writes debug message to user log - * @param message debug message - */ -export declare function debug(message: string): void; -/** - * Adds an error issue - * @param message error issue message - */ -export declare function error(message: string): void; -/** - * Adds an warning issue - * @param message warning issue message - */ -export declare function warning(message: string): void; diff --git a/node_modules/@actions/core/lib/core.js b/node_modules/@actions/core/lib/core.js deleted file mode 100644 index c6397ba..0000000 --- a/node_modules/@actions/core/lib/core.js +++ /dev/null @@ -1,116 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const command_1 = require("./command"); -const path = require("path"); -/** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable - */ -function exportVariable(name, val) { - process.env[name] = val; - command_1.issueCommand('set-env', { name }, val); -} -exports.exportVariable = exportVariable; -/** - * exports the variable and registers a secret which will get masked from logs - * @param name the name of the variable to set - * @param val value of the secret - */ -function exportSecret(name, val) { - exportVariable(name, val); - command_1.issueCommand('set-secret', {}, val); -} -exports.exportSecret = exportSecret; -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - command_1.issueCommand('add-path', {}, inputPath); - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -exports.addPath = addPath; -/** - * Gets the value of an input. The value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(' ', '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - return val.trim(); -} -exports.getInput = getInput; -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store - */ -function setOutput(name, value) { - command_1.issueCommand('set-output', { name }, value); -} -exports.setOutput = setOutput; -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -exports.setFailed = setFailed; -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Writes debug message to user log - * @param message debug message - */ -function debug(message) { - command_1.issueCommand('debug', {}, message); -} -exports.debug = debug; -/** - * Adds an error issue - * @param message error issue message - */ -function error(message) { - command_1.issue('error', message); -} -exports.error = error; -/** - * Adds an warning issue - * @param message warning issue message - */ -function warning(message) { - command_1.issue('warning', message); -} -exports.warning = warning; -//# sourceMappingURL=core.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.js.map b/node_modules/@actions/core/lib/core.js.map deleted file mode 100644 index 7e3c84f..0000000 --- a/node_modules/@actions/core/lib/core.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;AAAA,uCAA6C;AAE7C,6BAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACvB,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAHD,wCAGC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,IAAY,EAAE,GAAW;IACpD,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IACzB,sBAAY,CAAC,YAAY,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;AACrC,CAAC;AAHD,oCAGC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;IACvC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AAHD,0BAGC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAsB;IAC3D,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;IACpE,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAA;KAC5D;IAED,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC;AARD,4BAQC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED,yEAAyE;AACzE,UAAU;AACV,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAe;IACvC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAA;IACnC,KAAK,CAAC,OAAO,CAAC,CAAA;AAChB,CAAC;AAHD,8BAGC;AAED,yEAAyE;AACzE,mBAAmB;AACnB,yEAAyE;AAEzE;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,sBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACpC,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,eAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;AACzB,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,OAAe;IACrC,eAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;AAC3B,CAAC;AAFD,0BAEC"} \ No newline at end of file diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json deleted file mode 100644 index 34f47ea..0000000 --- a/node_modules/@actions/core/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "@actions/core@^1.0.0", - "_id": "@actions/core@1.0.0", - "_inBundle": false, - "_integrity": "sha512-aMIlkx96XH4E/2YZtEOeyrYQfhlas9jIRkfGPqMwXD095Rdkzo4lB6ZmbxPQSzD+e1M+Xsm98ZhuSMYGv/AlqA==", - "_location": "/@actions/core", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@actions/core@^1.0.0", - "name": "@actions/core", - "escapedName": "@actions%2fcore", - "scope": "@actions", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/", - "/@actions/tool-cache" - ], - "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.0.0.tgz", - "_shasum": "4a090a2e958cc300b9ea802331034d5faf42d239", - "_spec": "@actions/core@^1.0.0", - "_where": "C:\\Users\\damccorm\\Documents\\setup-go", - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Actions core lib", - "devDependencies": { - "@types/node": "^12.0.2" - }, - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib" - ], - "gitHead": "a40bce7c8d382aa3dbadaa327acbc696e9390e55", - "homepage": "https://github.com/actions/toolkit/tree/master/packages/core", - "keywords": [ - "core", - "actions" - ], - "license": "MIT", - "main": "lib/core.js", - "name": "@actions/core", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/actions/toolkit.git" - }, - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1", - "tsc": "tsc" - }, - "version": "1.0.0" -} diff --git a/node_modules/@actions/exec/LICENSE.md b/node_modules/@actions/exec/LICENSE.md deleted file mode 100644 index e5a73f4..0000000 --- a/node_modules/@actions/exec/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2019 GitHub - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/exec/README.md b/node_modules/@actions/exec/README.md deleted file mode 100644 index e76ce0b..0000000 --- a/node_modules/@actions/exec/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# `@actions/exec` - -## Usage - -#### Basic - -You can use this package to execute your tools on the command line in a cross platform way: - -``` -const exec = require('@actions/exec'); - -await exec.exec('node index.js'); -``` - -#### Args - -You can also pass in arg arrays: - -``` -const exec = require('@actions/exec'); - -await exec.exec('node', ['index.js', 'foo=bar']); -``` - -#### Output/options - -Capture output or specify [other options](https://github.com/actions/toolkit/blob/d9347d4ab99fd507c0b9104b2cf79fb44fcc827d/packages/exec/src/interfaces.ts#L5): - -``` -const exec = require('@actions/exec'); - -const myOutput = ''; -const myError = ''; - -const options = {}; -options.listeners = { - stdout: (data: Buffer) => { - myOutput += data.toString(); - }, - stderr: (data: Buffer) => { - myError += data.toString(); - } -}; -options.cwd = './lib'; - -await exec.exec('node', ['index.js', 'foo=bar'], options); -``` - -#### Exec tools not in the PATH - -You can use it in conjunction with the `which` function from `@actions/io` to execute tools that are not in the PATH: - -``` -const exec = require('@actions/exec'); -const io = require('@actions/io'); - -const pythonPath: string = await io.which('python', true) - -await exec.exec(`"${pythonPath}"`, ['main.py']); -``` diff --git a/node_modules/@actions/exec/lib/exec.d.ts b/node_modules/@actions/exec/lib/exec.d.ts deleted file mode 100644 index 8c64aae..0000000 --- a/node_modules/@actions/exec/lib/exec.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as im from './interfaces'; -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ -export declare function exec(commandLine: string, args?: string[], options?: im.ExecOptions): Promise; diff --git a/node_modules/@actions/exec/lib/exec.js b/node_modules/@actions/exec/lib/exec.js deleted file mode 100644 index fadab33..0000000 --- a/node_modules/@actions/exec/lib/exec.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const tr = require("./toolrunner"); -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ -function exec(commandLine, args, options) { - return __awaiter(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - // Path to tool to execute should be first arg - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); -} -exports.exec = exec; -//# sourceMappingURL=exec.js.map \ No newline at end of file diff --git a/node_modules/@actions/exec/lib/exec.js.map b/node_modules/@actions/exec/lib/exec.js.map deleted file mode 100644 index 155287e..0000000 --- a/node_modules/@actions/exec/lib/exec.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exec.js","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":";;;;;;;;;;AACA,mCAAkC;AAElC;;;;;;;;;GASG;AACH,SAAsB,IAAI,CACxB,WAAmB,EACnB,IAAe,EACf,OAAwB;;QAExB,MAAM,WAAW,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAA;QACpD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;SACpE;QACD,8CAA8C;QAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;QAC/B,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAkB,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACxE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAA;IACtB,CAAC;CAAA;AAdD,oBAcC"} \ No newline at end of file diff --git a/node_modules/@actions/exec/lib/interfaces.d.ts b/node_modules/@actions/exec/lib/interfaces.d.ts deleted file mode 100644 index 1861823..0000000 --- a/node_modules/@actions/exec/lib/interfaces.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/// -import * as stream from 'stream'; -/** - * Interface for exec options - */ -export interface ExecOptions { - /** optional working directory. defaults to current */ - cwd?: string; - /** optional envvar dictionary. defaults to current process's env */ - env?: { - [key: string]: string; - }; - /** optional. defaults to false */ - silent?: boolean; - /** optional out stream to use. Defaults to process.stdout */ - outStream?: stream.Writable; - /** optional err stream to use. Defaults to process.stderr */ - errStream?: stream.Writable; - /** optional. whether to skip quoting/escaping arguments if needed. defaults to false. */ - windowsVerbatimArguments?: boolean; - /** optional. whether to fail if output to stderr. defaults to false */ - failOnStdErr?: boolean; - /** optional. defaults to failing on non zero. ignore will not fail leaving it up to the caller */ - ignoreReturnCode?: boolean; - /** optional. How long in ms to wait for STDIO streams to close after the exit event of the process before terminating. defaults to 10000 */ - delay?: number; - /** optional. Listeners for output. Callback functions that will be called on these events */ - listeners?: { - stdout?: (data: Buffer) => void; - stderr?: (data: Buffer) => void; - stdline?: (data: string) => void; - errline?: (data: string) => void; - debug?: (data: string) => void; - }; -} diff --git a/node_modules/@actions/exec/lib/interfaces.js b/node_modules/@actions/exec/lib/interfaces.js deleted file mode 100644 index db91911..0000000 --- a/node_modules/@actions/exec/lib/interfaces.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@actions/exec/lib/interfaces.js.map b/node_modules/@actions/exec/lib/interfaces.js.map deleted file mode 100644 index 8fb5f7d..0000000 --- a/node_modules/@actions/exec/lib/interfaces.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@actions/exec/lib/toolrunner.d.ts b/node_modules/@actions/exec/lib/toolrunner.d.ts deleted file mode 100644 index 9bbbb1e..0000000 --- a/node_modules/@actions/exec/lib/toolrunner.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/// -import * as events from 'events'; -import * as im from './interfaces'; -export declare class ToolRunner extends events.EventEmitter { - constructor(toolPath: string, args?: string[], options?: im.ExecOptions); - private toolPath; - private args; - private options; - private _debug; - private _getCommandString; - private _processLineBuffer; - private _getSpawnFileName; - private _getSpawnArgs; - private _endsWith; - private _isCmdFile; - private _windowsQuoteCmdArg; - private _uvQuoteCmdArg; - private _cloneExecOptions; - private _getSpawnOptions; - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec(): Promise; -} -/** - * Convert an arg string to an array of args. Handles escaping - * - * @param argString string of arguments - * @returns string[] array of arguments - */ -export declare function argStringToArray(argString: string): string[]; diff --git a/node_modules/@actions/exec/lib/toolrunner.js b/node_modules/@actions/exec/lib/toolrunner.js deleted file mode 100644 index 901cbb5..0000000 --- a/node_modules/@actions/exec/lib/toolrunner.js +++ /dev/null @@ -1,573 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const os = require("os"); -const events = require("events"); -const child = require("child_process"); -/* eslint-disable @typescript-eslint/unbound-method */ -const IS_WINDOWS = process.platform === 'win32'; -/* - * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. - */ -class ToolRunner extends events.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); - } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); - } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool - if (IS_WINDOWS) { - // Windows + cmd file - if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows + verbatim - else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows (regular) - else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) { - cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - } - } - else { - // OSX/Linux - this can likely be improved with some form of quoting. - // creating processes on Unix is fundamentally different than Windows. - // on Unix, execvp() takes an arg array. - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(os.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - // the rest of the string ... - s = s.substring(n + os.EOL.length); - n = s.indexOf(os.EOL); - } - strBuffer = s; - } - catch (err) { - // streaming lines to console is best effort. Don't fail a build. - this._debug(`error processing line. Failed with error ${err}`); - } - } - _getSpawnFileName() { - if (IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env['COMSPEC'] || 'cmd.exe'; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += ' '; - argline += options.windowsVerbatimArguments - ? a - : this._windowsQuoteCmdArg(a); - } - argline += '"'; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return (this._endsWith(upperToolPath, '.CMD') || - this._endsWith(upperToolPath, '.BAT')); - } - _windowsQuoteCmdArg(arg) { - // for .exe, apply the normal quoting rules that libuv applies - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - // otherwise apply quoting rules specific to the cmd.exe command line parser. - // the libuv rules are generic and are not designed specifically for cmd.exe - // command line parser. - // - // for a detailed description of the cmd.exe command line parser, refer to - // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 - // need quotes for empty arg - if (!arg) { - return '""'; - } - // determine whether the arg needs to be quoted - const cmdSpecialChars = [ - ' ', - '\t', - '&', - '(', - ')', - '[', - ']', - '{', - '}', - '^', - '=', - ';', - '!', - "'", - '+', - ',', - '`', - '~', - '|', - '<', - '>', - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some(x => x === char)) { - needsQuotes = true; - break; - } - } - // short-circuit if quotes not needed - if (!needsQuotes) { - return arg; - } - // the following quoting rules are very similar to the rules that by libuv applies. - // - // 1) wrap the string in quotes - // - // 2) double-up quotes - i.e. " => "" - // - // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately - // doesn't work well with a cmd.exe command line. - // - // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. - // for example, the command line: - // foo.exe "myarg:""my val""" - // is parsed by a .NET console app into an arg array: - // [ "myarg:\"my val\"" ] - // which is the same end result when applying libuv quoting rules. although the actual - // command line from libuv quoting rules would look like: - // foo.exe "myarg:\"my val\"" - // - // 3) double-up slashes that preceed a quote, - // e.g. hello \world => "hello \world" - // hello\"world => "hello\\""world" - // hello\\"world => "hello\\\\""world" - // hello world\ => "hello world\\" - // - // technically this is not required for a cmd.exe command line, or the batch argument parser. - // the reasons for including this as a .cmd quoting rule are: - // - // a) this is optimized for the scenario where the argument is passed from the .cmd file to an - // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. - // - // b) it's what we've been doing previously (by deferring to node default behavior) and we - // haven't heard any complaints about that aspect. - // - // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be - // escaped when used on the command line directly - even though within a .cmd file % can be escaped - // by using %%. - // - // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts - // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. - // - // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would - // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the - // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args - // to an external program. - // - // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. - // % can be escaped within a .cmd file. - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; // double the slash - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '"'; // double the quote - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse - .split('') - .reverse() - .join(''); - } - _uvQuoteCmdArg(arg) { - // Tool runner wraps child_process.spawn() and needs to apply the same quoting as - // Node in certain cases where the undocumented spawn option windowsVerbatimArguments - // is used. - // - // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, - // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), - // pasting copyright notice from Node within this function: - // - // Copyright Joyent, Inc. and other Node contributors. All rights reserved. - // - // Permission is hereby granted, free of charge, to any person obtaining a copy - // of this software and associated documentation files (the "Software"), to - // deal in the Software without restriction, including without limitation the - // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - // sell copies of the Software, and to permit persons to whom the Software is - // furnished to do so, subject to the following conditions: - // - // The above copyright notice and this permission notice shall be included in - // all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - // IN THE SOFTWARE. - if (!arg) { - // Need double quotation for empty argument - return '""'; - } - if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { - // No quotation needed - return arg; - } - if (!arg.includes('"') && !arg.includes('\\')) { - // No embedded double quotes or backslashes, so I can just wrap - // quote marks around the whole thing. - return `"${arg}"`; - } - // Expected input/output: - // input : hello"world - // output: "hello\"world" - // input : hello""world - // output: "hello\"\"world" - // input : hello\world - // output: hello\world - // input : hello\\world - // output: hello\\world - // input : hello\"world - // output: "hello\\\"world" - // input : hello\\"world - // output: "hello\\\\\"world" - // input : hello world\ - // output: "hello world\\" - note the comment in libuv actually reads "hello world\" - // but it appears the comment is wrong, it should be "hello world\\" - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '\\'; - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse - .split('') - .reverse() - .join(''); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 10000 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result['windowsVerbatimArguments'] = - options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; - } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - this._debug(`exec tool: ${this.toolPath}`); - this._debug('arguments:'); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.on('debug', (message) => { - this._debug(message); - }); - const fileName = this._getSpawnFileName(); - const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - const stdbuffer = ''; - if (cp.stdout) { - cp.stdout.on('data', (data) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data); - } - this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - const errbuffer = ''; - if (cp.stderr) { - cp.stderr.on('data', (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); - } - if (!optionsNonNull.silent && - optionsNonNull.errStream && - optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr - ? optionsNonNull.errStream - : optionsNonNull.outStream; - s.write(data); - } - this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on('error', (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on('exit', (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp.on('close', (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on('done', (error, exitCode) => { - if (stdbuffer.length > 0) { - this.emit('stdline', stdbuffer); - } - if (errbuffer.length > 0) { - this.emit('errline', errbuffer); - } - cp.removeAllListeners(); - if (error) { - reject(error); - } - else { - resolve(exitCode); - } - }); - }); - }); - } -} -exports.ToolRunner = ToolRunner; -/** - * Convert an arg string to an array of args. Handles escaping - * - * @param argString string of arguments - * @returns string[] array of arguments - */ -function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ''; - function append(c) { - // we only escape double quotes. - if (escaped && c !== '"') { - arg += '\\'; - } - arg += c; - escaped = false; - } - for (let i = 0; i < argString.length; i++) { - const c = argString.charAt(i); - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } - else { - append(c); - } - continue; - } - if (c === '\\' && escaped) { - append(c); - continue; - } - if (c === '\\' && inQuotes) { - escaped = true; - continue; - } - if (c === ' ' && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ''; - } - continue; - } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; -} -exports.argStringToArray = argStringToArray; -class ExecState extends events.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; // tracks whether the process has exited and stdio is closed - this.processError = ''; - this.processExitCode = 0; - this.processExited = false; // tracks whether the process has exited - this.processStderr = false; // tracks whether stderr was written to - this.delay = 10000; // 10 seconds - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error('toolPath must not be empty'); - } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; - } - } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } - else if (this.processExited) { - this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this); - } - } - _debug(message) { - this.emit('debug', message); - } - _setResult() { - // determine whether there is an error - let error; - if (this.processExited) { - if (this.processError) { - error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - } - else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - } - else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - } - // clear the timeout - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit('done', error, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) { - return; - } - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / - 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); - } - state._setResult(); - } -} -//# sourceMappingURL=toolrunner.js.map \ No newline at end of file diff --git a/node_modules/@actions/exec/lib/toolrunner.js.map b/node_modules/@actions/exec/lib/toolrunner.js.map deleted file mode 100644 index 724b15a..0000000 --- a/node_modules/@actions/exec/lib/toolrunner.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"toolrunner.js","sourceRoot":"","sources":["../src/toolrunner.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,yBAAwB;AACxB,iCAAgC;AAChC,uCAAsC;AAItC,sDAAsD;AAEtD,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C;;GAEG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,YAAY;IACjD,YAAY,QAAgB,EAAE,IAAe,EAAE,OAAwB;QACrE,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;SACjE;QAED,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;IAC9B,CAAC;IAMO,MAAM,CAAC,OAAe;QAC5B,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE;YAC1D,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,K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AC,OAAO,CAAC,CAAA;SACtB;QAED,KAAK,CAAC,UAAU,EAAE,CAAA;IACpB,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/@actions/exec/package.json b/node_modules/@actions/exec/package.json deleted file mode 100644 index 6904102..0000000 --- a/node_modules/@actions/exec/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "@actions/exec@^1.0.0", - "_id": "@actions/exec@1.0.0", - "_inBundle": false, - "_integrity": "sha512-nquH0+XKng+Ll7rZfCojN7NWSbnGh+ltwUJhzfbLkmOJgxocGX2/yXcZLMyT9fa7+tByEow/NSTrBExNlEj9fw==", - "_location": "/@actions/exec", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@actions/exec@^1.0.0", - "name": "@actions/exec", - "escapedName": "@actions%2fexec", - "scope": "@actions", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/@actions/tool-cache" - ], - "_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.0.tgz", - "_shasum": "70c8b698c9baa02965c07da5f0b185ca56f0a955", - "_spec": "@actions/exec@^1.0.0", - "_where": "C:\\Users\\damccorm\\Documents\\setup-go\\node_modules\\@actions\\tool-cache", - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Actions exec lib", - "devDependencies": { - "@actions/io": "^1.0.0" - }, - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib" - ], - "gitHead": "a40bce7c8d382aa3dbadaa327acbc696e9390e55", - "homepage": "https://github.com/actions/toolkit/tree/master/packages/exec", - "keywords": [ - "exec", - "actions" - ], - "license": "MIT", - "main": "lib/exec.js", - "name": "@actions/exec", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/actions/toolkit.git" - }, - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1", - "tsc": "tsc" - }, - "version": "1.0.0" -} diff --git a/node_modules/@actions/io/LICENSE.md b/node_modules/@actions/io/LICENSE.md deleted file mode 100644 index e5a73f4..0000000 --- a/node_modules/@actions/io/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2019 GitHub - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/io/README.md b/node_modules/@actions/io/README.md deleted file mode 100644 index 22f0901..0000000 --- a/node_modules/@actions/io/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# `@actions/io` - -> Core functions for cli filesystem scenarios - -## Usage - -#### mkdir -p - -Recursively make a directory. Follows rules specified in [man mkdir](https://linux.die.net/man/1/mkdir) with the `-p` option specified: - -``` -const io = require('@actions/io'); - -await io.mkdirP('path/to/make'); -``` - -#### cp/mv - -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): - -``` -const io = require('@actions/io'); - -// Recursive must be true for directories -const options = { recursive: true, force: false } - -await io.cp('path/to/directory', 'path/to/dest', options); -await io.mv('path/to/file', 'path/to/dest'); -``` - -#### rm -rf - -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. - -``` -const io = require('@actions/io'); - -await io.rmRF('path/to/directory'); -await io.rmRF('path/to/file'); -``` - -#### which - -Get the path to a tool and resolves via paths. Follows the rules specified in [man which](https://linux.die.net/man/1/which). - -``` -const exec = require('@actions/exec'); -const io = require('@actions/io'); - -const pythonPath: string = await io.which('python', true) - -await exec.exec(`"${pythonPath}"`, ['main.py']); -``` diff --git a/node_modules/@actions/io/lib/io-util.d.ts b/node_modules/@actions/io/lib/io-util.d.ts deleted file mode 100644 index f0214fe..0000000 --- a/node_modules/@actions/io/lib/io-util.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/// -import * as fs from 'fs'; -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; -export declare const IS_WINDOWS: boolean; -export declare function exists(fsPath: string): Promise; -export declare function isDirectory(fsPath: string, useStat?: boolean): Promise; -/** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ -export declare function isRooted(p: string): boolean; -/** - * Recursively create a directory at `fsPath`. - * - * This implementation is optimistic, meaning it attempts to create the full - * path first, and backs up the path stack from there. - * - * @param fsPath The path to create - * @param maxDepth The maximum recursion depth - * @param depth The current recursion depth - */ -export declare function mkdirP(fsPath: string, maxDepth?: number, depth?: number): Promise; -/** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ -export declare function tryGetExecutablePath(filePath: string, extensions: string[]): Promise; diff --git a/node_modules/@actions/io/lib/io-util.js b/node_modules/@actions/io/lib/io-util.js deleted file mode 100644 index d0d1f6b..0000000 --- a/node_modules/@actions/io/lib/io-util.js +++ /dev/null @@ -1,194 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -const assert_1 = require("assert"); -const fs = require("fs"); -const path = require("path"); -_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; -exports.IS_WINDOWS = process.platform === 'win32'; -function exists(fsPath) { - return __awaiter(this, void 0, void 0, function* () { - try { - yield exports.stat(fsPath); - } - catch (err) { - if (err.code === 'ENOENT') { - return false; - } - throw err; - } - return true; - }); -} -exports.exists = exists; -function isDirectory(fsPath, useStat = false) { - return __awaiter(this, void 0, void 0, function* () { - const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); - return stats.isDirectory(); - }); -} -exports.isDirectory = isDirectory; -/** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ -function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports.IS_WINDOWS) { - return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello - ); // e.g. C: or C:\hello - } - return p.startsWith('/'); -} -exports.isRooted = isRooted; -/** - * Recursively create a directory at `fsPath`. - * - * This implementation is optimistic, meaning it attempts to create the full - * path first, and backs up the path stack from there. - * - * @param fsPath The path to create - * @param maxDepth The maximum recursion depth - * @param depth The current recursion depth - */ -function mkdirP(fsPath, maxDepth = 1000, depth = 1) { - return __awaiter(this, void 0, void 0, function* () { - assert_1.ok(fsPath, 'a path argument must be provided'); - fsPath = path.resolve(fsPath); - if (depth >= maxDepth) - return exports.mkdir(fsPath); - try { - yield exports.mkdir(fsPath); - return; - } - catch (err) { - switch (err.code) { - case 'ENOENT': { - yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1); - yield exports.mkdir(fsPath); - return; - } - default: { - let stats; - try { - stats = yield exports.stat(fsPath); - } - catch (err2) { - throw err; - } - if (!stats.isDirectory()) - throw err; - } - } - } - }); -} -exports.mkdirP = mkdirP; -/** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ -function tryGetExecutablePath(filePath, extensions) { - return __awaiter(this, void 0, void 0, function* () { - let stats = undefined; - try { - // test file exists - stats = yield exports.stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports.IS_WINDOWS) { - // on Windows, test for valid extension - const upperExt = path.extname(filePath).toUpperCase(); - if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - // try each extension - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = undefined; - try { - stats = yield exports.stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports.IS_WINDOWS) { - // preserve the case of the actual file (since an extension was appended) - try { - const directory = path.dirname(filePath); - const upperName = path.basename(filePath).toUpperCase(); - for (const actualName of yield exports.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path.join(directory, actualName); - break; - } - } - } - catch (err) { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ''; - }); -} -exports.tryGetExecutablePath = tryGetExecutablePath; -function normalizeSeparators(p) { - p = p || ''; - if (exports.IS_WINDOWS) { - // convert slashes on Windows - p = p.replace(/\//g, '\\'); - // remove redundant slashes - return p.replace(/\\\\+/g, '\\'); - } - // remove redundant slashes - return p.replace(/\/\/+/g, '/'); -} -// on Mac/Linux, test the execute bit -// R W X R W X R W X -// 256 128 64 32 16 8 4 2 1 -function isUnixExecutable(stats) { - return ((stats.mode & 1) > 0 || - ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || - ((stats.mode & 64) > 0 && stats.uid === process.getuid())); -} -//# sourceMappingURL=io-util.js.map \ No newline at end of file diff --git a/node_modules/@actions/io/lib/io-util.js.map b/node_modules/@actions/io/lib/io-util.js.map deleted file mode 100644 index 95283d2..0000000 --- a/node_modules/@actions/io/lib/io-util.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"io-util.js","sourceRoot":"","sources":["../src/io-util.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAyB;AACzB,yBAAwB;AACxB,6BAA4B;AAEf,gBAYE,qTAAA;AAEF,QAAA,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAEtD,SAAsB,MAAM,CAAC,MAAc;;QACzC,IAAI;YACF,MAAM,YAAI,CAAC,MAAM,CAAC,CAAA;SACnB;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;gBACzB,OAAO,KAAK,CAAA;aACb;YAED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4EC;AAED,SAAS,mBAAmB,CAAC,CAAS;IACpC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;IACX,IAAI,kBAAU,EAAE;QACd,6BAA6B;QAC7B,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QAE1B,2BAA2B;QAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;KACjC;IAED,2BAA2B;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;AACjC,CAAC;AAED,qCAAqC;AACrC,6BAA6B;AAC7B,6BAA6B;AAC7B,SAAS,gBAAgB,CAAC,KAAe;IACvC,OAAO,CACL,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC;QACpB,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;QACxD,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAC1D,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@actions/io/lib/io.d.ts b/node_modules/@actions/io/lib/io.d.ts deleted file mode 100644 index a4ea5a7..0000000 --- a/node_modules/@actions/io/lib/io.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Interface for cp/mv options - */ -export interface CopyOptions { - /** Optional. Whether to recursively copy all subdirectories. Defaults to false */ - recursive?: boolean; - /** Optional. Whether to overwrite existing files in the destination. Defaults to true */ - force?: boolean; -} -/** - * Interface for cp/mv options - */ -export interface MoveOptions { - /** Optional. Whether to overwrite existing files in the destination. Defaults to true */ - force?: boolean; -} -/** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ -export declare function cp(source: string, dest: string, options?: CopyOptions): Promise; -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ -export declare function mv(source: string, dest: string, options?: MoveOptions): Promise; -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ -export declare function rmRF(inputPath: string): Promise; -/** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ -export declare function mkdirP(fsPath: string): Promise; -/** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ -export declare function which(tool: string, check?: boolean): Promise; diff --git a/node_modules/@actions/io/lib/io.js b/node_modules/@actions/io/lib/io.js deleted file mode 100644 index 8ac31f2..0000000 --- a/node_modules/@actions/io/lib/io.js +++ /dev/null @@ -1,289 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const childProcess = require("child_process"); -const path = require("path"); -const util_1 = require("util"); -const ioUtil = require("./io-util"); -const exec = util_1.promisify(childProcess.exec); -/** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ -function cp(source, dest, options = {}) { - return __awaiter(this, void 0, void 0, function* () { - const { force, recursive } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - // Dest is an existing file, but not forcing - if (destStat && destStat.isFile() && !force) { - return; - } - // If dest is an existing directory, should copy inside. - const newDest = destStat && destStat.isDirectory() - ? path.join(dest, path.basename(source)) - : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } - else { - yield cpDirRecursive(source, newDest, 0, force); - } - } - else { - if (path.relative(source, newDest) === '') { - // a file cannot be copied to itself - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); -} -exports.cp = cp; -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ -function mv(source, dest, options = {}) { - return __awaiter(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - // If dest is directory copy src into dest - dest = path.join(dest, path.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } - else { - throw new Error('Destination already exists'); - } - } - } - yield mkdirP(path.dirname(dest)); - yield ioUtil.rename(source, dest); - }); -} -exports.mv = mv; -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ -function rmRF(inputPath) { - return __awaiter(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another - // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del. - try { - if (yield ioUtil.isDirectory(inputPath, true)) { - yield exec(`rd /s /q "${inputPath}"`); - } - else { - yield exec(`del /f /a "${inputPath}"`); - } - } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code !== 'ENOENT') - throw err; - } - // Shelling out fails to remove a symlink folder with missing source, this unlink catches that - try { - yield ioUtil.unlink(inputPath); - } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code !== 'ENOENT') - throw err; - } - } - else { - let isDir = false; - try { - isDir = yield ioUtil.isDirectory(inputPath); - } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code !== 'ENOENT') - throw err; - return; - } - if (isDir) { - yield exec(`rm -rf "${inputPath}"`); - } - else { - yield ioUtil.unlink(inputPath); - } - } - }); -} -exports.rmRF = rmRF; -/** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ -function mkdirP(fsPath) { - return __awaiter(this, void 0, void 0, function* () { - yield ioUtil.mkdirP(fsPath); - }); -} -exports.mkdirP = mkdirP; -/** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ -function which(tool, check) { - return __awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // recursive when check=true - if (check) { - const result = yield which(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } - else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - } - try { - // build the list of extensions to try - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env.PATHEXT) { - for (const extension of process.env.PATHEXT.split(path.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - // if it's rooted, return it if exists. otherwise return empty. - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return filePath; - } - return ''; - } - // if any path separators, return empty - if (tool.includes('/') || (ioUtil.IS_WINDOWS && tool.includes('\\'))) { - return ''; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a task lib perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the task lib should strive for consistency - // across platforms. - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path.delimiter)) { - if (p) { - directories.push(p); - } - } - } - // return the first match - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(directory + path.sep + tool, extensions); - if (filePath) { - return filePath; - } - } - return ''; - } - catch (err) { - throw new Error(`which failed with message ${err.message}`); - } - }); -} -exports.which = which; -function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - return { force, recursive }; -} -function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter(this, void 0, void 0, function* () { - // Ensure there is not a run away recursive copy - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - // Recurse - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } - else { - yield copyFile(srcFile, destFile, force); - } - } - // Change the mode for the newly created directory - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); -} -// Buffered file copy -function copyFile(srcFile, destFile, force) { - return __awaiter(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - // unlink/re-link it - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } - catch (e) { - // Try to override file permission - if (e.code === 'EPERM') { - yield ioUtil.chmod(destFile, '0666'); - yield ioUtil.unlink(destFile); - } - // other errors = it doesn't exist, no work to do - } - // Copy over symlink - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); - } - else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); -} -//# sourceMappingURL=io.js.map \ No newline at end of file diff --git a/node_modules/@actions/io/lib/io.js.map b/node_modules/@actions/io/lib/io.js.map deleted file mode 100644 index e52fe05..0000000 --- a/node_modules/@actions/io/lib/io.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"io.js","sourceRoot":"","sources":["../src/io.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,8CAA6C;AAC7C,6BAA4B;AAC5B,+BAA8B;AAC9B,oCAAmC;AAEnC,MAAM,IAAI,GAAG,gBAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;AAoBzC;;;;;;;GAOG;AACH,SAAsB,EAAE,CACtB,MAAc,EACd,IAAY,EACZ,UAAuB,EAAE;;QAEzB,MAAM,EAAC,KAAK,EAAE,SAAS,EAAC,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;QAEnD,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;YAChC,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,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE;YAClC,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAM,EAAE,CAAC,CAAA;SACxD;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MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;aAC9B;YAAC,OAAO,CAAC,EAAE;gBACV,kCAAkC;gBAClC,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,EAAE;oBACtB,MAAM,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;oBACpC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;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"} \ No newline at end of file diff --git a/node_modules/@actions/io/package.json b/node_modules/@actions/io/package.json deleted file mode 100644 index 71a0840..0000000 --- a/node_modules/@actions/io/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_from": "@actions/io@^1.0.0", - "_id": "@actions/io@1.0.0", - "_inBundle": false, - "_integrity": "sha512-ezrJSRdqtXtdx1WXlfYL85+40F7gB39jCK9P0jZVODW3W6xUYmu6ZOEc/UmmElUwhRyDRm1R4yNZu1Joq2kuQg==", - "_location": "/@actions/io", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@actions/io@^1.0.0", - "name": "@actions/io", - "escapedName": "@actions%2fio", - "scope": "@actions", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "#DEV:/", - "/@actions/tool-cache" - ], - "_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.0.tgz", - "_shasum": "379454174660623bb5b3bce0be8b9e2285a62bcb", - "_spec": "@actions/io@^1.0.0", - "_where": "C:\\Users\\damccorm\\Documents\\setup-go\\node_modules\\@actions\\tool-cache", - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Actions io lib", - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib" - ], - "gitHead": "a40bce7c8d382aa3dbadaa327acbc696e9390e55", - "homepage": "https://github.com/actions/toolkit/tree/master/packages/io", - "keywords": [ - "io", - "actions" - ], - "license": "MIT", - "main": "lib/io.js", - "name": "@actions/io", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/actions/toolkit.git" - }, - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1", - "tsc": "tsc" - }, - "version": "1.0.0" -} diff --git a/node_modules/@actions/tool-cache/LICENSE.md b/node_modules/@actions/tool-cache/LICENSE.md deleted file mode 100644 index e5a73f4..0000000 --- a/node_modules/@actions/tool-cache/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2019 GitHub - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/tool-cache/README.md b/node_modules/@actions/tool-cache/README.md deleted file mode 100644 index 56c5353..0000000 --- a/node_modules/@actions/tool-cache/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# `@actions/tool-cache` - -> Functions necessary for downloading and caching tools. - -## Usage - -#### Download - -You can use this to download tools (or other files) from a download URL: - -``` -const tc = require('@actions/tool-cache'); - -const node12Path = await tc.downloadTool('http://nodejs.org/dist/v12.7.0/node-v12.7.0-linux-x64.tar.gz'); -``` - -#### Extract - -These can then be extracted in platform specific ways: - -``` -const tc = require('@actions/tool-cache'); - -if (process.platform === 'win32') { - tc.downloadTool('http://nodejs.org/dist/v12.7.0/node-v12.7.0-win-x64.zip'); - const node12ExtractedFolder = await tc.extractZip(node12Path, 'path/to/extract/to'); - - // Or alternately - tc.downloadTool('http://nodejs.org/dist/v12.7.0/node-v12.7.0-win-x64.7z'); - const node12ExtractedFolder = await tc.extract7z(node12Path, 'path/to/extract/to'); -} -else { - const node12Path = await tc.downloadTool('http://nodejs.org/dist/v12.7.0/node-v12.7.0-linux-x64.tar.gz'); - const node12ExtractedFolder = await tc.extractTar(node12Path, 'path/to/extract/to'); -} -``` - -#### Cache - -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 private runners (private runners are still in development but are on the roadmap). - -You'll often want to add it to the path as part of this step: - -``` -const tc = require('@actions/tool-cache'); -const core = require('@actions/core'); - -const node12Path = await tc.downloadTool('http://nodejs.org/dist/v12.7.0/node-v12.7.0-linux-x64.tar.gz'); -const node12ExtractedFolder = await tc.extractTar(node12Path, 'path/to/extract/to'); - -const cachedPath = await tc.cacheDir(node12ExtractedFolder, 'node', '12.7.0'); -core.addPath(cachedPath); -``` - -You can also cache files for reuse. - -``` -const tc = require('@actions/tool-cache'); - -tc.cacheFile('path/to/exe', 'destFileName.exe', 'myExeName', '1.1.0'); -``` - -#### Find - -Finally, you can find directories and files you've previously cached: - -``` -const tc = require('@actions/tool-cache'); -const core = require('@actions/core'); - -const nodeDirectory = tc.find('node', '12.x', 'x64'); -core.addPath(nodeDirectory); -``` - -You can even find all cached versions of a tool: - -``` -const tc = require('@actions/tool-cache'); - -const allNodeVersions = tc.findAllVersions('node'); -console.log(`Versions of node available: ${allNodeVersions}`); -``` diff --git a/node_modules/@actions/tool-cache/lib/tool-cache.d.ts b/node_modules/@actions/tool-cache/lib/tool-cache.d.ts deleted file mode 100644 index 877eb33..0000000 --- a/node_modules/@actions/tool-cache/lib/tool-cache.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -export declare class HTTPError extends Error { - readonly httpStatusCode: number | undefined; - constructor(httpStatusCode: number | undefined); -} -/** - * Download a tool from an url and stream it into a file - * - * @param url url of tool to download - * @returns path to downloaded tool - */ -export declare function downloadTool(url: string): Promise; -/** - * Extract a .7z file - * - * @param file path to the .7z file - * @param dest destination directory. Optional. - * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this - * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will - * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is - * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line - * interface, it is smaller than the full command line interface, and it does support long paths. At the - * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website. - * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path - * to 7zr.exe can be pass to this function. - * @returns path to the destination directory - */ -export declare function extract7z(file: string, dest?: string, _7zPath?: string): Promise; -/** - * Extract a tar - * - * @param file path to the tar - * @param dest destination directory. Optional. - * @returns path to the destination directory - */ -export declare function extractTar(file: string, dest?: string): Promise; -/** - * Extract a zip - * - * @param file path to the zip - * @param dest destination directory. Optional. - * @returns path to the destination directory - */ -export declare function extractZip(file: string, dest?: string): Promise; -/** - * Caches a directory and installs it into the tool cacheDir - * - * @param sourceDir the directory to cache into tools - * @param tool tool name - * @param version version of the tool. semver format - * @param arch architecture of the tool. Optional. Defaults to machine architecture - */ -export declare function cacheDir(sourceDir: string, tool: string, version: string, arch?: string): Promise; -/** - * Caches a downloaded file (GUID) and installs it - * into the tool cache with a given targetName - * - * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid. - * @param targetFile the name of the file name in the tools directory - * @param tool tool name - * @param version version of the tool. semver format - * @param arch architecture of the tool. Optional. Defaults to machine architecture - */ -export declare function cacheFile(sourceFile: string, targetFile: string, tool: string, version: string, arch?: string): Promise; -/** - * Finds the path to a tool version in the local installed tool cache - * - * @param toolName name of the tool - * @param versionSpec version of the tool - * @param arch optional arch. defaults to arch of computer - */ -export declare function find(toolName: string, versionSpec: string, arch?: string): string; -/** - * Finds the paths to all versions of a tool that are installed in the local tool cache - * - * @param toolName name of the tool - * @param arch optional arch. defaults to arch of computer - */ -export declare function findAllVersions(toolName: string, arch?: string): string[]; diff --git a/node_modules/@actions/tool-cache/lib/tool-cache.js b/node_modules/@actions/tool-cache/lib/tool-cache.js deleted file mode 100644 index 3c12165..0000000 --- a/node_modules/@actions/tool-cache/lib/tool-cache.js +++ /dev/null @@ -1,436 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const core = require("@actions/core"); -const io = require("@actions/io"); -const fs = require("fs"); -const os = require("os"); -const path = require("path"); -const httpm = require("typed-rest-client/HttpClient"); -const semver = require("semver"); -const uuidV4 = require("uuid/v4"); -const exec_1 = require("@actions/exec/lib/exec"); -const assert_1 = require("assert"); -class HTTPError extends Error { - constructor(httpStatusCode) { - super(`Unexpected HTTP response: ${httpStatusCode}`); - this.httpStatusCode = httpStatusCode; - Object.setPrototypeOf(this, new.target.prototype); - } -} -exports.HTTPError = HTTPError; -const IS_WINDOWS = process.platform === 'win32'; -const userAgent = 'actions/tool-cache'; -// On load grab temp directory and cache directory and remove them from env (currently don't want to expose this) -let tempDirectory = process.env['RUNNER_TEMP'] || ''; -let cacheRoot = process.env['RUNNER_TOOL_CACHE'] || ''; -// If directories not found, place them in common temp locations -if (!tempDirectory || !cacheRoot) { - let baseLocation; - if (IS_WINDOWS) { - // On windows use the USERPROFILE env variable - baseLocation = process.env['USERPROFILE'] || 'C:\\'; - } - else { - if (process.platform === 'darwin') { - baseLocation = '/Users'; - } - else { - baseLocation = '/home'; - } - } - if (!tempDirectory) { - tempDirectory = path.join(baseLocation, 'actions', 'temp'); - } - if (!cacheRoot) { - cacheRoot = path.join(baseLocation, 'actions', 'cache'); - } -} -/** - * Download a tool from an url and stream it into a file - * - * @param url url of tool to download - * @returns path to downloaded tool - */ -function downloadTool(url) { - return __awaiter(this, void 0, void 0, function* () { - // Wrap in a promise so that we can resolve from within stream callbacks - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - try { - const http = new httpm.HttpClient(userAgent, [], { - allowRetries: true, - maxRetries: 3 - }); - const destPath = path.join(tempDirectory, uuidV4()); - yield io.mkdirP(tempDirectory); - core.debug(`Downloading ${url}`); - core.debug(`Downloading ${destPath}`); - if (fs.existsSync(destPath)) { - throw new Error(`Destination file path ${destPath} already exists`); - } - const response = yield http.get(url); - if (response.message.statusCode !== 200) { - const err = new HTTPError(response.message.statusCode); - core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); - throw err; - } - const file = fs.createWriteStream(destPath); - file.on('open', () => __awaiter(this, void 0, void 0, function* () { - try { - const stream = response.message.pipe(file); - stream.on('close', () => { - core.debug('download complete'); - resolve(destPath); - }); - } - catch (err) { - core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); - reject(err); - } - })); - file.on('error', err => { - file.end(); - reject(err); - }); - } - catch (err) { - reject(err); - } - })); - }); -} -exports.downloadTool = downloadTool; -/** - * Extract a .7z file - * - * @param file path to the .7z file - * @param dest destination directory. Optional. - * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this - * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will - * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is - * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line - * interface, it is smaller than the full command line interface, and it does support long paths. At the - * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website. - * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path - * to 7zr.exe can be pass to this function. - * @returns path to the destination directory - */ -function extract7z(file, dest, _7zPath) { - return __awaiter(this, void 0, void 0, function* () { - assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS'); - assert_1.ok(file, 'parameter "file" is required'); - dest = dest || (yield _createExtractFolder(dest)); - const originalCwd = process.cwd(); - process.chdir(dest); - if (_7zPath) { - try { - const args = [ - 'x', - '-bb1', - '-bd', - '-sccUTF-8', - file - ]; - const options = { - silent: true - }; - yield exec_1.exec(`"${_7zPath}"`, args, options); - } - finally { - process.chdir(originalCwd); - } - } - else { - const escapedScript = path - .join(__dirname, '..', 'scripts', 'Invoke-7zdec.ps1') - .replace(/'/g, "''") - .replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines - const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); - const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); - const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; - const args = [ - '-NoLogo', - '-Sta', - '-NoProfile', - '-NonInteractive', - '-ExecutionPolicy', - 'Unrestricted', - '-Command', - command - ]; - const options = { - silent: true - }; - try { - const powershellPath = yield io.which('powershell', true); - yield exec_1.exec(`"${powershellPath}"`, args, options); - } - finally { - process.chdir(originalCwd); - } - } - return dest; - }); -} -exports.extract7z = extract7z; -/** - * Extract a tar - * - * @param file path to the tar - * @param dest destination directory. Optional. - * @returns path to the destination directory - */ -function extractTar(file, dest) { - return __awaiter(this, void 0, void 0, function* () { - if (!file) { - throw new Error("parameter 'file' is required"); - } - dest = dest || (yield _createExtractFolder(dest)); - const tarPath = yield io.which('tar', true); - yield exec_1.exec(`"${tarPath}"`, ['xzC', dest, '-f', file]); - return dest; - }); -} -exports.extractTar = extractTar; -/** - * Extract a zip - * - * @param file path to the zip - * @param dest destination directory. Optional. - * @returns path to the destination directory - */ -function extractZip(file, dest) { - return __awaiter(this, void 0, void 0, function* () { - if (!file) { - throw new Error("parameter 'file' is required"); - } - dest = dest || (yield _createExtractFolder(dest)); - if (IS_WINDOWS) { - yield extractZipWin(file, dest); - } - else { - yield extractZipNix(file, dest); - } - return dest; - }); -} -exports.extractZip = extractZip; -function extractZipWin(file, dest) { - return __awaiter(this, void 0, void 0, function* () { - // build the powershell command - const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines - const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); - const command = `$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}')`; - // run powershell - const powershellPath = yield io.which('powershell'); - const args = [ - '-NoLogo', - '-Sta', - '-NoProfile', - '-NonInteractive', - '-ExecutionPolicy', - 'Unrestricted', - '-Command', - command - ]; - yield exec_1.exec(`"${powershellPath}"`, args); - }); -} -function extractZipNix(file, dest) { - return __awaiter(this, void 0, void 0, function* () { - const unzipPath = path.join(__dirname, '..', 'scripts', 'externals', 'unzip'); - yield exec_1.exec(`"${unzipPath}"`, [file], { cwd: dest }); - }); -} -/** - * Caches a directory and installs it into the tool cacheDir - * - * @param sourceDir the directory to cache into tools - * @param tool tool name - * @param version version of the tool. semver format - * @param arch architecture of the tool. Optional. Defaults to machine architecture - */ -function cacheDir(sourceDir, tool, version, arch) { - return __awaiter(this, void 0, void 0, function* () { - version = semver.clean(version) || version; - arch = arch || os.arch(); - core.debug(`Caching tool ${tool} ${version} ${arch}`); - core.debug(`source dir: ${sourceDir}`); - if (!fs.statSync(sourceDir).isDirectory()) { - throw new Error('sourceDir is not a directory'); - } - // Create the tool dir - const destPath = yield _createToolPath(tool, version, arch); - // copy each child item. do not move. move can fail on Windows - // due to anti-virus software having an open handle on a file. - for (const itemName of fs.readdirSync(sourceDir)) { - const s = path.join(sourceDir, itemName); - yield io.cp(s, destPath, { recursive: true }); - } - // write .complete - _completeToolPath(tool, version, arch); - return destPath; - }); -} -exports.cacheDir = cacheDir; -/** - * Caches a downloaded file (GUID) and installs it - * into the tool cache with a given targetName - * - * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid. - * @param targetFile the name of the file name in the tools directory - * @param tool tool name - * @param version version of the tool. semver format - * @param arch architecture of the tool. Optional. Defaults to machine architecture - */ -function cacheFile(sourceFile, targetFile, tool, version, arch) { - return __awaiter(this, void 0, void 0, function* () { - version = semver.clean(version) || version; - arch = arch || os.arch(); - core.debug(`Caching tool ${tool} ${version} ${arch}`); - core.debug(`source file: ${sourceFile}`); - if (!fs.statSync(sourceFile).isFile()) { - throw new Error('sourceFile is not a file'); - } - // create the tool dir - const destFolder = yield _createToolPath(tool, version, arch); - // copy instead of move. move can fail on Windows due to - // anti-virus software having an open handle on a file. - const destPath = path.join(destFolder, targetFile); - core.debug(`destination file ${destPath}`); - yield io.cp(sourceFile, destPath); - // write .complete - _completeToolPath(tool, version, arch); - return destFolder; - }); -} -exports.cacheFile = cacheFile; -/** - * Finds the path to a tool version in the local installed tool cache - * - * @param toolName name of the tool - * @param versionSpec version of the tool - * @param arch optional arch. defaults to arch of computer - */ -function find(toolName, versionSpec, arch) { - if (!toolName) { - throw new Error('toolName parameter is required'); - } - if (!versionSpec) { - throw new Error('versionSpec parameter is required'); - } - arch = arch || os.arch(); - // attempt to resolve an explicit version - if (!_isExplicitVersion(versionSpec)) { - const localVersions = findAllVersions(toolName, arch); - const match = _evaluateVersions(localVersions, versionSpec); - versionSpec = match; - } - // check for the explicit version in the cache - let toolPath = ''; - if (versionSpec) { - versionSpec = semver.clean(versionSpec) || ''; - const cachePath = path.join(cacheRoot, toolName, versionSpec, arch); - core.debug(`checking cache: ${cachePath}`); - if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) { - core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); - toolPath = cachePath; - } - else { - core.debug('not found'); - } - } - return toolPath; -} -exports.find = find; -/** - * Finds the paths to all versions of a tool that are installed in the local tool cache - * - * @param toolName name of the tool - * @param arch optional arch. defaults to arch of computer - */ -function findAllVersions(toolName, arch) { - const versions = []; - arch = arch || os.arch(); - const toolPath = path.join(cacheRoot, toolName); - if (fs.existsSync(toolPath)) { - const children = fs.readdirSync(toolPath); - for (const child of children) { - if (_isExplicitVersion(child)) { - const fullPath = path.join(toolPath, child, arch || ''); - if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) { - versions.push(child); - } - } - } - } - return versions; -} -exports.findAllVersions = findAllVersions; -function _createExtractFolder(dest) { - return __awaiter(this, void 0, void 0, function* () { - if (!dest) { - // create a temp dir - dest = path.join(tempDirectory, uuidV4()); - } - yield io.mkdirP(dest); - return dest; - }); -} -function _createToolPath(tool, version, arch) { - return __awaiter(this, void 0, void 0, function* () { - const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || ''); - core.debug(`destination ${folderPath}`); - const markerPath = `${folderPath}.complete`; - yield io.rmRF(folderPath); - yield io.rmRF(markerPath); - yield io.mkdirP(folderPath); - return folderPath; - }); -} -function _completeToolPath(tool, version, arch) { - const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || ''); - const markerPath = `${folderPath}.complete`; - fs.writeFileSync(markerPath, ''); - core.debug('finished caching tool'); -} -function _isExplicitVersion(versionSpec) { - const c = semver.clean(versionSpec) || ''; - core.debug(`isExplicit: ${c}`); - const valid = semver.valid(c) != null; - core.debug(`explicit? ${valid}`); - return valid; -} -function _evaluateVersions(versions, versionSpec) { - let version = ''; - core.debug(`evaluating ${versions.length} versions`); - versions = versions.sort((a, b) => { - if (semver.gt(a, b)) { - return 1; - } - return -1; - }); - for (let i = versions.length - 1; i >= 0; i--) { - const potential = versions[i]; - const satisfied = semver.satisfies(potential, versionSpec); - if (satisfied) { - version = potential; - break; - } - } - if (version) { - core.debug(`matched: ${version}`); - } - else { - core.debug('match not found'); - } - return version; -} -//# sourceMappingURL=tool-cache.js.map \ No newline at end of file diff --git a/node_modules/@actions/tool-cache/lib/tool-cache.js.map b/node_modules/@actions/tool-cache/lib/tool-cache.js.map deleted file mode 100644 index 0c4f30b..0000000 --- a/node_modules/@actions/tool-cache/lib/tool-cache.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tool-cache.js","sourceRoot":"","sources":["../src/tool-cache.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,sCAAqC;AACrC,kCAAiC;AACjC,yBAAwB;AACxB,yBAAwB;AACxB,6BAA4B;AAC5B,sDAAqD;AACrD,iCAAgC;AAChC,kCAAiC;AACjC,iDAA2C;AAE3C,mCAAyB;AAEzB,MAAa,SAAU,SAAQ,KAAK;IAClC,YAAqB,cAAkC;QACrD,KAAK,CAAC,6BAA6B,cAAc,EAAE,CAAC,CAAA;QADjC,mBAAc,GAAd,cAAc,CAAoB;QAErD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;IACnD,CAAC;CACF;AALD,8BAKC;AAED,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAC/C,MAAM,SAAS,GAAG,oBAAoB,CAAA;AAEt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ACF,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QAC7C,MAAM,SAAS,GAAW,QAAQ,CAAC,CAAC,CAAC,CAAA;QACrC,MAAM,SAAS,GAAY,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;QACnE,IAAI,SAAS,EAAE;YACb,OAAO,GAAG,SAAS,CAAA;YACnB,MAAK;SACN;KACF;IAED,IAAI,OAAO,EAAE;QACX,IAAI,CAAC,KAAK,CAAC,YAAY,OAAO,EAAE,CAAC,CAAA;KAClC;SAAM;QACL,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;KAC9B;IAED,OAAO,OAAO,CAAA;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/@actions/tool-cache/package.json b/node_modules/@actions/tool-cache/package.json deleted file mode 100644 index bd09244..0000000 --- a/node_modules/@actions/tool-cache/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "@actions/tool-cache@^1.0.0", - "_id": "@actions/tool-cache@1.0.0", - "_inBundle": false, - "_integrity": "sha512-l3zT0IfDfi5Ik5aMpnXqGHGATxN8xa9ls4ue+X/CBXpPhRMRZS4vcuh5Q9T98WAGbkysRCfhpbksTPHIcKnNwQ==", - "_location": "/@actions/tool-cache", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@actions/tool-cache@^1.0.0", - "name": "@actions/tool-cache", - "escapedName": "@actions%2ftool-cache", - "scope": "@actions", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.0.0.tgz", - "_shasum": "a9ac414bd2e0bf1f5f0302f029193c418d344c09", - "_spec": "@actions/tool-cache@^1.0.0", - "_where": "C:\\Users\\damccorm\\Documents\\setup-go", - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@actions/core": "^1.0.0", - "@actions/exec": "^1.0.0", - "@actions/io": "^1.0.0", - "semver": "^6.1.0", - "typed-rest-client": "^1.4.0", - "uuid": "^3.3.2" - }, - "deprecated": false, - "description": "Actions tool-cache lib", - "devDependencies": { - "@types/nock": "^10.0.3", - "@types/semver": "^6.0.0", - "@types/uuid": "^3.4.4", - "nock": "^10.0.6" - }, - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib", - "scripts" - ], - "gitHead": "a40bce7c8d382aa3dbadaa327acbc696e9390e55", - "homepage": "https://github.com/actions/toolkit/tree/master/packages/exec", - "keywords": [ - "exec", - "actions" - ], - "license": "MIT", - "main": "lib/tool-cache.js", - "name": "@actions/tool-cache", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/actions/toolkit.git" - }, - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1", - "tsc": "tsc" - }, - "version": "1.0.0" -} diff --git a/node_modules/@actions/tool-cache/scripts/Invoke-7zdec.ps1 b/node_modules/@actions/tool-cache/scripts/Invoke-7zdec.ps1 deleted file mode 100644 index 8b39bb4..0000000 --- a/node_modules/@actions/tool-cache/scripts/Invoke-7zdec.ps1 +++ /dev/null @@ -1,60 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory = $true)] - [string]$Source, - - [Parameter(Mandatory = $true)] - [string]$Target) - -# This script translates the output from 7zdec into UTF8. Node has limited -# built-in support for encodings. -# -# 7zdec uses the system default code page. The system default code page varies -# depending on the locale configuration. On an en-US box, the system default code -# page is Windows-1252. -# -# Note, on a typical en-US box, testing with the 'ç' character is a good way to -# determine whether data is passed correctly between processes. This is because -# the 'ç' character has a different code point across each of the common encodings -# on a typical en-US box, i.e. -# 1) the default console-output code page (IBM437) -# 2) the system default code page (i.e. CP_ACP) (Windows-1252) -# 3) UTF8 - -$ErrorActionPreference = 'Stop' - -# Redefine the wrapper over STDOUT to use UTF8. Node expects UTF8 by default. -$stdout = [System.Console]::OpenStandardOutput() -$utf8 = New-Object System.Text.UTF8Encoding($false) # do not emit BOM -$writer = New-Object System.IO.StreamWriter($stdout, $utf8) -[System.Console]::SetOut($writer) - -# All subsequent output must be written using [System.Console]::WriteLine(). In -# PowerShell 4, Write-Host and Out-Default do not consider the updated stream writer. - -Set-Location -LiteralPath $Target - -# Print the ##command. -$_7zdec = Join-Path -Path "$PSScriptRoot" -ChildPath "externals/7zdec.exe" -[System.Console]::WriteLine("##[command]$_7zdec x `"$Source`"") - -# The $OutputEncoding variable instructs PowerShell how to interpret the output -# from the external command. -$OutputEncoding = [System.Text.Encoding]::Default - -# Note, the output from 7zdec.exe needs to be iterated over. Otherwise PowerShell.exe -# will launch the external command in such a way that it inherits the streams. -& $_7zdec x $Source 2>&1 | - ForEach-Object { - if ($_ -is [System.Management.Automation.ErrorRecord]) { - [System.Console]::WriteLine($_.Exception.Message) - } - else { - [System.Console]::WriteLine($_) - } - } -[System.Console]::WriteLine("##[debug]7zdec.exe exit code '$LASTEXITCODE'") -[System.Console]::Out.Flush() -if ($LASTEXITCODE -ne 0) { - exit $LASTEXITCODE -} \ No newline at end of file diff --git a/node_modules/@actions/tool-cache/scripts/externals/7zdec.exe b/node_modules/@actions/tool-cache/scripts/externals/7zdec.exe deleted file mode 100644 index 1106aa0..0000000 Binary files a/node_modules/@actions/tool-cache/scripts/externals/7zdec.exe and /dev/null differ diff --git a/node_modules/@actions/tool-cache/scripts/externals/unzip b/node_modules/@actions/tool-cache/scripts/externals/unzip deleted file mode 100644 index 4082418..0000000 Binary files a/node_modules/@actions/tool-cache/scripts/externals/unzip and /dev/null differ diff --git a/node_modules/semver/CHANGELOG.md b/node_modules/semver/CHANGELOG.md deleted file mode 100644 index f567dd3..0000000 --- a/node_modules/semver/CHANGELOG.md +++ /dev/null @@ -1,70 +0,0 @@ -# changes log - -## 6.2.0 - -* Coerce numbers to strings when passed to semver.coerce() -* Add `rtl` option to coerce from right to left - -## 6.1.3 - -* Handle X-ranges properly in includePrerelease mode - -## 6.1.2 - -* Do not throw when testing invalid version strings - -## 6.1.1 - -* Add options support for semver.coerce() -* Handle undefined version passed to Range.test - -## 6.1.0 - -* Add semver.compareBuild function -* Support `*` in semver.intersects - -## 6.0 - -* Fix `intersects` logic. - - This is technically a bug fix, but since it is also a change to behavior - that may require users updating their code, it is marked as a major - version increment. - -## 5.7 - -* Add `minVersion` method - -## 5.6 - -* Move boolean `loose` param to an options object, with - backwards-compatibility protection. -* Add ability to opt out of special prerelease version handling with - the `includePrerelease` option flag. - -## 5.5 - -* Add version coercion capabilities - -## 5.4 - -* Add intersection checking - -## 5.3 - -* Add `minSatisfying` method - -## 5.2 - -* Add `prerelease(v)` that returns prerelease components - -## 5.1 - -* Add Backus-Naur for ranges -* Remove excessively cute inspection methods - -## 5.0 - -* Remove AMD/Browserified build artifacts -* Fix ltr and gtr when using the `*` range -* Fix for range `*` with a prerelease identifier diff --git a/node_modules/semver/LICENSE b/node_modules/semver/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/semver/README.md b/node_modules/semver/README.md deleted file mode 100644 index 2293a14..0000000 --- a/node_modules/semver/README.md +++ /dev/null @@ -1,443 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - ---rtl - Coerce version strings right to left - ---ltr - Coerce version strings left to right (default) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero element in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions - are equal. Sorts in ascending order if passed to `Array.sort()`. - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version, options)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver string to -semver. It looks for the first digit in a string, and consumes all -remaining characters which satisfy at least a partial semver (e.g., `1`, -`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer -versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All -surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes -`3.4.0`). Only text which lacks digits will fail coercion (`version one` -is not valid). The maximum length for any semver component considered for -coercion is 16 characters; longer components will be ignored -(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any -semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value -components are invalid (`9999999999999999.4.7.4` is likely invalid). - -If the `options.rtl` flag is set, then `coerce` will return the right-most -coercible tuple that does not share an ending index with a longer coercible -tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not -`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of -any other overlapping SemVer tuple. - -### Clean - -* `clean(version)`: Clean a string to be a valid semver if possible - -This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. - -ex. -* `s.clean(' = v 2.1.5foo')`: `null` -* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean(' = v 2.1.5-foo')`: `null` -* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'` -* `s.clean('=v2.1.5')`: `'2.1.5'` -* `s.clean(' =v2.1.5')`: `2.1.5` -* `s.clean(' 2.1.5 ')`: `'2.1.5'` -* `s.clean('~1.0.0')`: `null` diff --git a/node_modules/semver/bin/semver.js b/node_modules/semver/bin/semver.js deleted file mode 100644 index 666034a..0000000 --- a/node_modules/semver/bin/semver.js +++ /dev/null @@ -1,174 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var rtl = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '--rtl': - rtl = true - break - case '--ltr': - rtl = false - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v, options) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - '--rtl', - ' Coerce version strings right to left', - '', - '--ltr', - ' Coerce version strings left to right (default)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json deleted file mode 100644 index b7870c6..0000000 --- a/node_modules/semver/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "semver@^6.1.1", - "_id": "semver@6.3.0", - "_inBundle": false, - "_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "_location": "/semver", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "semver@^6.1.1", - "name": "semver", - "escapedName": "semver", - "rawSpec": "^6.1.1", - "saveSpec": null, - "fetchSpec": "^6.1.1" - }, - "_requiredBy": [ - "/", - "/@actions/tool-cache", - "/istanbul-lib-instrument" - ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "_shasum": "ee0a64c8af5e8ceea67687b133761e1becbd1d3d", - "_spec": "semver@^6.1.1", - "_where": "C:\\Users\\damccorm\\Documents\\setup-go", - "bin": { - "semver": "./bin/semver.js" - }, - "bugs": { - "url": "https://github.com/npm/node-semver/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "The semantic version parser used by npm.", - "devDependencies": { - "tap": "^14.3.1" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "homepage": "https://github.com/npm/node-semver#readme", - "license": "ISC", - "main": "semver.js", - "name": "semver", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "scripts": { - "postpublish": "git push origin --follow-tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap" - }, - "tap": { - "check-coverage": true - }, - "version": "6.3.0" -} diff --git a/node_modules/semver/range.bnf b/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0..0000000 --- a/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/semver/semver.js b/node_modules/semver/semver.js deleted file mode 100644 index 636fa43..0000000 --- a/node_modules/semver/semver.js +++ /dev/null @@ -1,1596 +0,0 @@ -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var t = exports.tokens = {} -var R = 0 - -function tok (n) { - t[n] = R++ -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -tok('NUMERICIDENTIFIER') -src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' -tok('NUMERICIDENTIFIERLOOSE') -src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -tok('NONNUMERICIDENTIFIER') -src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -tok('MAINVERSION') -src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIER] + ')' - -tok('MAINVERSIONLOOSE') -src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -tok('PRERELEASEIDENTIFIER') -src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + - '|' + src[t.NONNUMERICIDENTIFIER] + ')' - -tok('PRERELEASEIDENTIFIERLOOSE') -src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + - '|' + src[t.NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -tok('PRERELEASE') -src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + - '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))' - -tok('PRERELEASELOOSE') -src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -tok('BUILDIDENTIFIER') -src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -tok('BUILD') -src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + - '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -tok('FULL') -tok('FULLPLAIN') -src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + - src[t.PRERELEASE] + '?' + - src[t.BUILD] + '?' - -src[t.FULL] = '^' + src[t.FULLPLAIN] + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -tok('LOOSEPLAIN') -src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + - src[t.PRERELEASELOOSE] + '?' + - src[t.BUILD] + '?' - -tok('LOOSE') -src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$' - -tok('GTLT') -src[t.GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -tok('XRANGEIDENTIFIERLOOSE') -src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -tok('XRANGEIDENTIFIER') -src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*' - -tok('XRANGEPLAIN') -src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + - '(?:' + src[t.PRERELEASE] + ')?' + - src[t.BUILD] + '?' + - ')?)?' - -tok('XRANGEPLAINLOOSE') -src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[t.PRERELEASELOOSE] + ')?' + - src[t.BUILD] + '?' + - ')?)?' - -tok('XRANGE') -src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$' -tok('XRANGELOOSE') -src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -tok('COERCE') -src[t.COERCE] = '(^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' -tok('COERCERTL') -re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -tok('LONETILDE') -src[t.LONETILDE] = '(?:~>?)' - -tok('TILDETRIM') -src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' -re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -tok('TILDE') -src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$' -tok('TILDELOOSE') -src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -tok('LONECARET') -src[t.LONECARET] = '(?:\\^)' - -tok('CARETTRIM') -src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' -re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -tok('CARET') -src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$' -tok('CARETLOOSE') -src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -tok('COMPARATORLOOSE') -src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$' -tok('COMPARATOR') -src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -tok('COMPARATORTRIM') -src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + - '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -tok('HYPHENRANGE') -src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[t.XRANGEPLAIN] + ')' + - '\\s*$' - -tok('HYPHENRANGELOOSE') -src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[t.XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -tok('STAR') -src[t.STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[t.LOOSE] : re[t.FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -SemVer.prototype.compareBuild = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - var i = 0 - do { - var a = this.build[i] - var b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.compareBuild = compareBuild -function compareBuild (a, b, loose) { - var versionA = new SemVer(a, loose) - var versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compareBuild(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.compareBuild(b, a, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY || version === ANY) { - return true - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - if (this.value === '') { - return true - } - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[t.COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return ( - isSatisfiable(thisComparators, options) && - range.set.some(function (rangeComparators) { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every(function (thisComparator) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) -} - -// take a set of comparators and determine whether there -// exists a version which can satisfy it -function isSatisfiable (comparators, options) { - var result = true - var remainingComparators = comparators.slice() - var testComparator = remainingComparators.pop() - - while (result && remainingComparators.length) { - result = remainingComparators.every(function (otherComparator) { - return testComparator.intersects(otherComparator, options) - }) - - testComparator = remainingComparators.pop() - } - - return result -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p + pr - } else if (xm) { - ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr - } else if (xp) { - ret = '>=' + M + '.' + m + '.0' + pr + - ' <' + M + '.' + (+m + 1) + '.0' + pr - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[t.STAR], '') -} - -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version, options) { - if (version instanceof SemVer) { - return version - } - - if (typeof version === 'number') { - version = String(version) - } - - if (typeof version !== 'string') { - return null - } - - options = options || {} - - var match = null - if (!options.rtl) { - match = version.match(re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - var next - while ((next = re[t.COERCERTL].exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length - } - // leave it in a clean state - re[t.COERCERTL].lastIndex = -1 - } - - if (match === null) { - return null - } - - return parse(match[2] + - '.' + (match[3] || '0') + - '.' + (match[4] || '0'), options) -} diff --git a/node_modules/tunnel/.npmignore b/node_modules/tunnel/.npmignore deleted file mode 100644 index 6684c76..0000000 --- a/node_modules/tunnel/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/.idea -/node_modules diff --git a/node_modules/tunnel/CHANGELOG.md b/node_modules/tunnel/CHANGELOG.md deleted file mode 100644 index 70bdbd7..0000000 --- a/node_modules/tunnel/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -# Changelog - - - 0.0.4 (2016/01/23) - - supported Node v0.12 or later. - - - 0.0.3 (2014/01/20) - - fixed package.json - - - 0.0.1 (2012/02/18) - - supported Node v0.6.x (0.6.11 or later). - - - 0.0.0 (2012/02/11) - - first release. diff --git a/node_modules/tunnel/LICENSE b/node_modules/tunnel/LICENSE deleted file mode 100644 index 8b8a895..0000000 --- a/node_modules/tunnel/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2012 Koichi Kobayashi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/tunnel/README.md b/node_modules/tunnel/README.md deleted file mode 100644 index b196162..0000000 --- a/node_modules/tunnel/README.md +++ /dev/null @@ -1,179 +0,0 @@ -# node-tunnel - HTTP/HTTPS Agents for tunneling proxies - -## Example - -```javascript -var tunnel = require('tunnel'); - -var tunnelingAgent = tunnel.httpsOverHttp({ - proxy: { - host: 'localhost', - port: 3128 - } -}); - -var req = https.request({ - host: 'example.com', - port: 443, - agent: tunnelingAgent -}); -``` - -## Installation - - $ npm install tunnel - -## Usages - -### HTTP over HTTP tunneling - -```javascript -var tunnelingAgent = tunnel.httpOverHttp({ - maxSockets: poolSize, // Defaults to 5 - - proxy: { // Proxy settings - host: proxyHost, // Defaults to 'localhost' - port: proxyPort, // Defaults to 80 - localAddress: localAddress, // Local interface if necessary - - // Basic authorization for proxy server if necessary - proxyAuth: 'user:password', - - // Header fields for proxy server if necessary - headers: { - 'User-Agent': 'Node' - } - } -}); - -var req = http.request({ - host: 'example.com', - port: 80, - agent: tunnelingAgent -}); -``` - -### HTTPS over HTTP tunneling - -```javascript -var tunnelingAgent = tunnel.httpsOverHttp({ - maxSockets: poolSize, // Defaults to 5 - - // CA for origin server if necessary - ca: [ fs.readFileSync('origin-server-ca.pem')], - - // Client certification for origin server if necessary - key: fs.readFileSync('origin-server-key.pem'), - cert: fs.readFileSync('origin-server-cert.pem'), - - proxy: { // Proxy settings - host: proxyHost, // Defaults to 'localhost' - port: proxyPort, // Defaults to 80 - localAddress: localAddress, // Local interface if necessary - - // Basic authorization for proxy server if necessary - proxyAuth: 'user:password', - - // Header fields for proxy server if necessary - headers: { - 'User-Agent': 'Node' - }, - } -}); - -var req = https.request({ - host: 'example.com', - port: 443, - agent: tunnelingAgent -}); -``` - -### HTTP over HTTPS tunneling - -```javascript -var tunnelingAgent = tunnel.httpOverHttps({ - maxSockets: poolSize, // Defaults to 5 - - proxy: { // Proxy settings - host: proxyHost, // Defaults to 'localhost' - port: proxyPort, // Defaults to 443 - localAddress: localAddress, // Local interface if necessary - - // Basic authorization for proxy server if necessary - proxyAuth: 'user:password', - - // Header fields for proxy server if necessary - headers: { - 'User-Agent': 'Node' - }, - - // CA for proxy server if necessary - ca: [ fs.readFileSync('origin-server-ca.pem')], - - // Server name for verification if necessary - servername: 'example.com', - - // Client certification for proxy server if necessary - key: fs.readFileSync('origin-server-key.pem'), - cert: fs.readFileSync('origin-server-cert.pem'), - } -}); - -var req = http.request({ - host: 'example.com', - port: 80, - agent: tunnelingAgent -}); -``` - -### HTTPS over HTTPS tunneling - -```javascript -var tunnelingAgent = tunnel.httpsOverHttps({ - maxSockets: poolSize, // Defaults to 5 - - // CA for origin server if necessary - ca: [ fs.readFileSync('origin-server-ca.pem')], - - // Client certification for origin server if necessary - key: fs.readFileSync('origin-server-key.pem'), - cert: fs.readFileSync('origin-server-cert.pem'), - - proxy: { // Proxy settings - host: proxyHost, // Defaults to 'localhost' - port: proxyPort, // Defaults to 443 - localAddress: localAddress, // Local interface if necessary - - // Basic authorization for proxy server if necessary - proxyAuth: 'user:password', - - // Header fields for proxy server if necessary - headers: { - 'User-Agent': 'Node' - } - - // CA for proxy server if necessary - ca: [ fs.readFileSync('origin-server-ca.pem')], - - // Server name for verification if necessary - servername: 'example.com', - - // Client certification for proxy server if necessary - key: fs.readFileSync('origin-server-key.pem'), - cert: fs.readFileSync('origin-server-cert.pem'), - } -}); - -var req = https.request({ - host: 'example.com', - port: 443, - agent: tunnelingAgent -}); -``` - -## CONTRIBUTORS -* [Aleksis Brezas (abresas)](https://github.com/abresas) - -## License - -Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE) license. diff --git a/node_modules/tunnel/index.js b/node_modules/tunnel/index.js deleted file mode 100644 index 2947757..0000000 --- a/node_modules/tunnel/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/tunnel'); diff --git a/node_modules/tunnel/lib/tunnel.js b/node_modules/tunnel/lib/tunnel.js deleted file mode 100644 index c42b039..0000000 --- a/node_modules/tunnel/lib/tunnel.js +++ /dev/null @@ -1,247 +0,0 @@ -'use strict'; - -var net = require('net'); -var tls = require('tls'); -var http = require('http'); -var https = require('https'); -var events = require('events'); -var assert = require('assert'); -var util = require('util'); - - -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false - }); - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode === 200) { - assert.equal(head.length, 0); - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - cb(socket); - } else { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -exports.debug = debug; // for test diff --git a/node_modules/tunnel/package.json b/node_modules/tunnel/package.json deleted file mode 100644 index 0f69f5b..0000000 --- a/node_modules/tunnel/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "tunnel@0.0.4", - "_id": "tunnel@0.0.4", - "_inBundle": false, - "_integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=", - "_location": "/tunnel", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "tunnel@0.0.4", - "name": "tunnel", - "escapedName": "tunnel", - "rawSpec": "0.0.4", - "saveSpec": null, - "fetchSpec": "0.0.4" - }, - "_requiredBy": [ - "/typed-rest-client" - ], - "_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", - "_shasum": "2d3785a158c174c9a16dc2c046ec5fc5f1742213", - "_spec": "tunnel@0.0.4", - "_where": "C:\\Users\\damccorm\\Documents\\setup-go\\node_modules\\typed-rest-client", - "author": { - "name": "Koichi Kobayashi", - "email": "koichik@improvement.jp" - }, - "bugs": { - "url": "https://github.com/koichik/node-tunnel/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node HTTP/HTTPS Agents for tunneling proxies", - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "directories": { - "lib": "./lib" - }, - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - }, - "homepage": "https://github.com/koichik/node-tunnel/", - "keywords": [ - "http", - "https", - "agent", - "proxy", - "tunnel" - ], - "license": "MIT", - "main": "./index.js", - "name": "tunnel", - "repository": { - "type": "git", - "url": "git+https://github.com/koichik/node-tunnel.git" - }, - "scripts": { - "test": "./node_modules/mocha/bin/mocha" - }, - "version": "0.0.4" -} diff --git a/node_modules/tunnel/test/http-over-http.js b/node_modules/tunnel/test/http-over-http.js deleted file mode 100644 index 73d17a2..0000000 --- a/node_modules/tunnel/test/http-over-http.js +++ /dev/null @@ -1,108 +0,0 @@ -var http = require('http'); -var net = require('net'); -var should = require('should'); -var tunnel = require('../index'); - -describe('HTTP over HTTP', function() { - it('should finish without error', function(done) { - var serverPort = 3000; - var proxyPort = 3001; - var poolSize = 3; - var N = 10; - var serverConnect = 0; - var proxyConnect = 0; - var clientConnect = 0; - var server; - var proxy; - var agent; - - server = http.createServer(function(req, res) { - tunnel.debug('SERVER: got request'); - ++serverConnect; - res.writeHead(200); - res.end('Hello' + req.url); - tunnel.debug('SERVER: sending response'); - }); - server.listen(serverPort, setupProxy); - - function setupProxy() { - proxy = http.createServer(function(req, res) { - should.fail(); - }); - proxy.on('upgrade', onConnect); // for v0.6 - proxy.on('connect', onConnect); // for v0.7 or later - - function onConnect(req, clientSocket, head) { - tunnel.debug('PROXY: got CONNECT request'); - - req.method.should.equal('CONNECT'); - req.url.should.equal('localhost:' + serverPort); - req.headers.should.not.have.property('transfer-encoding'); - req.headers.should.have.property('proxy-authorization', - 'Basic ' + new Buffer('user:password').toString('base64')); - ++proxyConnect; - - tunnel.debug('PROXY: creating a tunnel'); - var serverSocket = net.connect(serverPort, function() { - tunnel.debug('PROXY: replying to client CONNECT request'); - clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n'); - clientSocket.pipe(serverSocket); - serverSocket.write(head); - serverSocket.pipe(clientSocket); - // workaround, see joyent/node#2524 - serverSocket.on('end', function() { - clientSocket.end(); - }); - }); - } - proxy.listen(proxyPort, setupClient); - } - - function setupClient() { - agent = tunnel.httpOverHttp({ - maxSockets: poolSize, - proxy: { - port: proxyPort, - proxyAuth: 'user:password' - } - }); - - for (var i = 0; i < N; ++i) { - doClientRequest(i); - } - - function doClientRequest(i) { - tunnel.debug('CLIENT: Making HTTP request (%d)', i); - var req = http.get({ - port: serverPort, - path: '/' + i, - agent: agent - }, function(res) { - tunnel.debug('CLIENT: got HTTP response (%d)', i); - res.setEncoding('utf8'); - res.on('data', function(data) { - data.should.equal('Hello/' + i); - }); - res.on('end', function() { - ++clientConnect; - if (clientConnect === N) { - proxy.close(); - server.close(); - } - }); - }); - } - } - - server.on('close', function() { - serverConnect.should.equal(N); - proxyConnect.should.equal(poolSize); - clientConnect.should.equal(N); - - agent.sockets.should.be.empty; - agent.requests.should.be.empty; - - done(); - }); - }); -}); diff --git a/node_modules/tunnel/test/http-over-https.js b/node_modules/tunnel/test/http-over-https.js deleted file mode 100644 index c3a92fd..0000000 --- a/node_modules/tunnel/test/http-over-https.js +++ /dev/null @@ -1,130 +0,0 @@ -var http = require('http'); -var https = require('https'); -var net = require('net'); -var fs = require('fs'); -var path = require('path'); -var should = require('should'); -var tunnel = require('../index'); - -function readPem(file) { - return fs.readFileSync(path.join('test/keys', file + '.pem')); -} - -var proxyKey = readPem('proxy1-key'); -var proxyCert = readPem('proxy1-cert'); -var proxyCA = readPem('ca2-cert'); -var clientKey = readPem('client1-key'); -var clientCert = readPem('client1-cert'); -var clientCA = readPem('ca3-cert'); - -describe('HTTP over HTTPS', function() { - it('should finish without error', function(done) { - var serverPort = 3004; - var proxyPort = 3005; - var poolSize = 3; - var N = 10; - var serverConnect = 0; - var proxyConnect = 0; - var clientConnect = 0; - var server; - var proxy; - var agent; - - server = http.createServer(function(req, res) { - tunnel.debug('SERVER: got request'); - ++serverConnect; - res.writeHead(200); - res.end('Hello' + req.url); - tunnel.debug('SERVER: sending response'); - }); - server.listen(serverPort, setupProxy); - - function setupProxy() { - proxy = https.createServer({ - key: proxyKey, - cert: proxyCert, - ca: [clientCA], - requestCert: true, - rejectUnauthorized: true - }, function(req, res) { - should.fail(); - }); - proxy.on('upgrade', onConnect); // for v0.6 - proxy.on('connect', onConnect); // for v0.7 or later - - function onConnect(req, clientSocket, head) { - tunnel.debug('PROXY: got CONNECT request'); - - req.method.should.equal('CONNECT'); - req.url.should.equal('localhost:' + serverPort); - req.headers.should.not.have.property('transfer-encoding'); - ++proxyConnect; - - tunnel.debug('PROXY: creating a tunnel'); - var serverSocket = net.connect(serverPort, function() { - tunnel.debug('PROXY: replying to client CONNECT request'); - clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n'); - clientSocket.pipe(serverSocket); - serverSocket.write(head); - serverSocket.pipe(clientSocket); - // workaround, see joyent/node#2524 - serverSocket.on('end', function() { - clientSocket.end(); - }); - }); - } - proxy.listen(proxyPort, setupClient); - } - - function setupClient() { - agent = tunnel.httpOverHttps({ - maxSockets: poolSize, - proxy: { - port: proxyPort, - key: clientKey, - cert: clientCert, - ca: [proxyCA], - rejectUnauthorized: true - } - }); - - for (var i = 0; i < N; ++i) { - doClientRequest(i); - } - - function doClientRequest(i) { - tunnel.debug('CLIENT: Making HTTP request (%d)', i); - var req = http.get({ - port: serverPort, - path: '/' + i, - agent: agent - }, function(res) { - tunnel.debug('CLIENT: got HTTP response (%d)', i); - res.setEncoding('utf8'); - res.on('data', function(data) { - data.should.equal('Hello/' + i); - }); - res.on('end', function() { - ++clientConnect; - if (clientConnect === N) { - proxy.close(); - server.close(); - } - }); - }); - } - } - - server.on('close', function() { - serverConnect.should.equal(N); - proxyConnect.should.equal(poolSize); - clientConnect.should.equal(N); - - var name = 'localhost:' + serverPort; - agent.sockets.should.be.empty; - agent.requests.should.be.empty; - - done(); - }); - }); -}); diff --git a/node_modules/tunnel/test/https-over-http.js b/node_modules/tunnel/test/https-over-http.js deleted file mode 100644 index 82c4772..0000000 --- a/node_modules/tunnel/test/https-over-http.js +++ /dev/null @@ -1,130 +0,0 @@ -var http = require('http'); -var https = require('https'); -var net = require('net'); -var fs = require('fs'); -var path = require('path'); -var should = require('should'); -var tunnel = require('../index'); - -function readPem(file) { - return fs.readFileSync(path.join('test/keys', file + '.pem')); -} - -var serverKey = readPem('server1-key'); -var serverCert = readPem('server1-cert'); -var serverCA = readPem('ca1-cert'); -var clientKey = readPem('client1-key'); -var clientCert = readPem('client1-cert'); -var clientCA = readPem('ca3-cert'); - - -describe('HTTPS over HTTP', function() { - it('should finish without error', function(done) { - var serverPort = 3002; - var proxyPort = 3003; - var poolSize = 3; - var N = 10; - var serverConnect = 0; - var proxyConnect = 0; - var clientConnect = 0; - var server; - var proxy; - var agent; - - server = https.createServer({ - key: serverKey, - cert: serverCert, - ca: [clientCA], - requestCert: true, - rejectUnauthorized: true - }, function(req, res) { - tunnel.debug('SERVER: got request'); - ++serverConnect; - res.writeHead(200); - res.end('Hello' + req.url); - tunnel.debug('SERVER: sending response'); - }); - server.listen(serverPort, setupProxy); - - function setupProxy() { - proxy = http.createServer(function(req, res) { - should.fail(); - }); - proxy.on('upgrade', onConnect); // for v0.6 - proxy.on('connect', onConnect); // for v0.7 or later - - function onConnect(req, clientSocket, head) { - tunnel.debug('PROXY: got CONNECT request'); - - req.method.should.equal('CONNECT'); - req.url.should.equal('localhost:' + serverPort); - req.headers.should.not.have.property('transfer-encoding'); - ++proxyConnect; - - var serverSocket = net.connect(serverPort, function() { - tunnel.debug('PROXY: replying to client CONNECT request'); - clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n'); - clientSocket.pipe(serverSocket); - serverSocket.write(head); - serverSocket.pipe(clientSocket); - // workaround, see joyent/node#2524 - serverSocket.on('end', function() { - clientSocket.end(); - }); - }); - } - proxy.listen(proxyPort, setupClient); - } - - function setupClient() { - agent = tunnel.httpsOverHttp({ - maxSockets: poolSize, - key: clientKey, - cert: clientCert, - ca: [serverCA], - rejectUnauthorized: true, - proxy: { - port: proxyPort - } - }); - - for (var i = 0; i < N; ++i) { - doClientRequest(i); - } - - function doClientRequest(i) { - tunnel.debug('CLIENT: Making HTTPS request (%d)', i); - var req = https.get({ - port: serverPort, - path: '/' + i, - agent: agent - }, function(res) { - tunnel.debug('CLIENT: got HTTPS response (%d)', i); - res.setEncoding('utf8'); - res.on('data', function(data) { - data.should.equal('Hello/' + i); - }); - res.on('end', function() { - ++clientConnect; - if (clientConnect === N) { - proxy.close(); - server.close(); - } - }); - }); - } - } - - server.on('close', function() { - serverConnect.should.equal(N); - proxyConnect.should.equal(poolSize); - clientConnect.should.equal(N); - - var name = 'localhost:' + serverPort; - agent.sockets.should.be.empty; - agent.requests.should.be.empty; - - done(); - }); - }); -}); diff --git a/node_modules/tunnel/test/https-over-https-error.js b/node_modules/tunnel/test/https-over-https-error.js deleted file mode 100644 index c74094d..0000000 --- a/node_modules/tunnel/test/https-over-https-error.js +++ /dev/null @@ -1,261 +0,0 @@ -var http = require('http'); -var https = require('https'); -var net = require('net'); -var fs = require('fs'); -var path = require('path'); -var should = require('should'); -var tunnel = require('../index'); - -function readPem(file) { - return fs.readFileSync(path.join('test/keys', file + '.pem')); -} - -var serverKey = readPem('server2-key'); -var serverCert = readPem('server2-cert'); -var serverCA = readPem('ca1-cert'); -var proxyKey = readPem('proxy2-key'); -var proxyCert = readPem('proxy2-cert'); -var proxyCA = readPem('ca2-cert'); -var client1Key = readPem('client1-key'); -var client1Cert = readPem('client1-cert'); -var client1CA = readPem('ca3-cert'); -var client2Key = readPem('client2-key'); -var client2Cert = readPem('client2-cert'); -var client2CA = readPem('ca4-cert'); - -describe('HTTPS over HTTPS authentication failed', function() { - it('should finish without error', function(done) { - var serverPort = 3008; - var proxyPort = 3009; - var serverConnect = 0; - var proxyConnect = 0; - var clientRequest = 0; - var clientConnect = 0; - var clientError = 0; - var server; - var proxy; - - server = https.createServer({ - key: serverKey, - cert: serverCert, - ca: [client1CA], - requestCert: true, - rejectUnauthorized: true - }, function(req, res) { - tunnel.debug('SERVER: got request', req.url); - ++serverConnect; - req.on('data', function(data) { - }); - req.on('end', function() { - res.writeHead(200); - res.end('Hello, ' + serverConnect); - tunnel.debug('SERVER: sending response'); - }); - req.resume(); - }); - //server.addContext('server2', { - // key: serverKey, - // cert: serverCert, - // ca: [client1CA], - //}); - server.listen(serverPort, setupProxy); - - function setupProxy() { - proxy = https.createServer({ - key: proxyKey, - cert: proxyCert, - ca: [client2CA], - requestCert: true, - rejectUnauthorized: true - }, function(req, res) { - should.fail(); - }); - //proxy.addContext('proxy2', { - // key: proxyKey, - // cert: proxyCert, - // ca: [client2CA], - //}); - proxy.on('upgrade', onConnect); // for v0.6 - proxy.on('connect', onConnect); // for v0.7 or later - - function onConnect(req, clientSocket, head) { - req.method.should.equal('CONNECT'); - req.url.should.equal('localhost:' + serverPort); - req.headers.should.not.have.property('transfer-encoding'); - ++proxyConnect; - - var serverSocket = net.connect(serverPort, function() { - tunnel.debug('PROXY: replying to client CONNECT request'); - clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n'); - clientSocket.pipe(serverSocket); - serverSocket.write(head); - serverSocket.pipe(clientSocket); - // workaround, see #2524 - serverSocket.on('end', function() { - clientSocket.end(); - }); - }); - } - proxy.listen(proxyPort, setupClient); - } - - function setupClient() { - function doRequest(name, options, host) { - tunnel.debug('CLIENT: Making HTTPS request (%s)', name); - ++clientRequest; - var agent = tunnel.httpsOverHttps(options); - var req = https.get({ - host: 'localhost', - port: serverPort, - path: '/' + encodeURIComponent(name), - headers: { - host: host ? host : 'localhost', - }, - rejectUnauthorized: true, - agent: agent - }, function(res) { - tunnel.debug('CLIENT: got HTTPS response (%s)', name); - ++clientConnect; - res.on('data', function(data) { - }); - res.on('end', function() { - req.emit('finish'); - }); - res.resume(); - }); - req.on('error', function(err) { - tunnel.debug('CLIENT: failed HTTP response (%s)', name, err); - ++clientError; - req.emit('finish'); - }); - req.on('finish', function() { - if (clientConnect + clientError === clientRequest) { - proxy.close(); - server.close(); - } - }); - } - - doRequest('no cert origin nor proxy', { // invalid - maxSockets: 1, - ca: [serverCA], - rejectUnauthorized: true, - // no certificate for origin server - proxy: { - port: proxyPort, - ca: [proxyCA], - rejectUnauthorized: true, - headers: { - host: 'proxy2' - } - // no certificate for proxy - } - }, 'server2'); - - doRequest('no cert proxy', { // invalid - maxSockets: 1, - ca: [serverCA], - rejectUnauthorized: true, - // client certification for origin server - key: client1Key, - cert: client1Cert, - proxy: { - port: proxyPort, - ca: [proxyCA], - rejectUnauthorized: true, - headers: { - host: 'proxy2' - } - // no certificate for proxy - } - }, 'server2'); - - doRequest('no cert origin', { // invalid - maxSockets: 1, - ca: [serverCA], - rejectUnauthorized: true, - // no certificate for origin server - proxy: { - port: proxyPort, - servername: 'proxy2', - ca: [proxyCA], - rejectUnauthorized: true, - headers: { - host: 'proxy2' - }, - // client certification for proxy - key: client2Key, - cert: client2Cert - } - }, 'server2'); - - doRequest('invalid proxy server name', { // invalid - maxSockets: 1, - ca: [serverCA], - rejectUnauthorized: true, - // client certification for origin server - key: client1Key, - cert: client1Cert, - proxy: { - port: proxyPort, - ca: [proxyCA], - rejectUnauthorized: true, - // client certification for proxy - key: client2Key, - cert: client2Cert, - } - }, 'server2'); - - doRequest('invalid origin server name', { // invalid - maxSockets: 1, - ca: [serverCA], - rejectUnauthorized: true, - // client certification for origin server - key: client1Key, - cert: client1Cert, - proxy: { - port: proxyPort, - servername: 'proxy2', - ca: [proxyCA], - rejectUnauthorized: true, - headers: { - host: 'proxy2' - }, - // client certification for proxy - key: client2Key, - cert: client2Cert - } - }); - - doRequest('valid', { // valid - maxSockets: 1, - ca: [serverCA], - rejectUnauthorized: true, - // client certification for origin server - key: client1Key, - cert: client1Cert, - proxy: { - port: proxyPort, - servername: 'proxy2', - ca: [proxyCA], - rejectUnauthorized: true, - headers: { - host: 'proxy2' - }, - // client certification for proxy - key: client2Key, - cert: client2Cert - } - }, 'server2'); - } - - server.on('close', function() { - serverConnect.should.equal(1); - proxyConnect.should.equal(3); - clientConnect.should.equal(1); - clientError.should.equal(5); - - done(); - }); - }); -}); diff --git a/node_modules/tunnel/test/https-over-https.js b/node_modules/tunnel/test/https-over-https.js deleted file mode 100644 index a9f81c8..0000000 --- a/node_modules/tunnel/test/https-over-https.js +++ /dev/null @@ -1,146 +0,0 @@ -var http = require('http'); -var https = require('https'); -var net = require('net'); -var fs = require('fs'); -var path = require('path'); -var should = require('should'); -var tunnel = require('../index.js'); - -function readPem(file) { - return fs.readFileSync(path.join('test/keys', file + '.pem')); -} - -var serverKey = readPem('server1-key'); -var serverCert = readPem('server1-cert'); -var serverCA = readPem('ca1-cert'); -var proxyKey = readPem('proxy1-key'); -var proxyCert = readPem('proxy1-cert'); -var proxyCA = readPem('ca2-cert'); -var client1Key = readPem('client1-key'); -var client1Cert = readPem('client1-cert'); -var client1CA = readPem('ca3-cert'); -var client2Key = readPem('client2-key'); -var client2Cert = readPem('client2-cert'); -var client2CA = readPem('ca4-cert'); - -describe('HTTPS over HTTPS', function() { - it('should finish without error', function(done) { - var serverPort = 3006; - var proxyPort = 3007; - var poolSize = 3; - var N = 5; - var serverConnect = 0; - var proxyConnect = 0; - var clientConnect = 0; - var server; - var proxy; - var agent; - - server = https.createServer({ - key: serverKey, - cert: serverCert, - ca: [client1CA], - requestCert: true, - rejectUnauthorized: true - }, function(req, res) { - tunnel.debug('SERVER: got request'); - ++serverConnect; - res.writeHead(200); - res.end('Hello' + req.url); - tunnel.debug('SERVER: sending response'); - }); - server.listen(serverPort, setupProxy); - - function setupProxy() { - proxy = https.createServer({ - key: proxyKey, - cert: proxyCert, - ca: [client2CA], - requestCert: true, - rejectUnauthorized: true - }, function(req, res) { - should.fail(); - }); - proxy.on('upgrade', onConnect); // for v0.6 - proxy.on('connect', onConnect); // for v0.7 or later - - function onConnect(req, clientSocket, head) { - tunnel.debug('PROXY: got CONNECT request'); - req.method.should.equal('CONNECT'); - req.url.should.equal('localhost:' + serverPort); - req.headers.should.not.have.property('transfer-encoding'); - ++proxyConnect; - - var serverSocket = net.connect(serverPort, function() { - tunnel.debug('PROXY: replying to client CONNECT request'); - clientSocket.write('HTTP/1.1 200 Connection established\r\n\r\n'); - clientSocket.pipe(serverSocket); - serverSocket.write(head); - serverSocket.pipe(clientSocket); - // workaround, see joyent/node#2524 - serverSocket.on('end', function() { - clientSocket.end(); - }); - }); - } - proxy.listen(proxyPort, setupClient); - } - - function setupClient() { - agent = tunnel.httpsOverHttps({ - maxSockets: poolSize, - // client certification for origin server - key: client1Key, - cert: client1Cert, - ca: [serverCA], - rejectUnauthroized: true, - proxy: { - port: proxyPort, - // client certification for proxy - key: client2Key, - cert: client2Cert, - ca: [proxyCA], - rejectUnauthroized: true - } - }); - - for (var i = 0; i < N; ++i) { - doClientRequest(i); - } - - function doClientRequest(i) { - tunnel.debug('CLIENT: Making HTTPS request (%d)', i); - var req = https.get({ - port: serverPort, - path: '/' + i, - agent: agent - }, function(res) { - tunnel.debug('CLIENT: got HTTPS response (%d)', i); - res.setEncoding('utf8'); - res.on('data', function(data) { - data.should.equal('Hello/' + i); - }); - res.on('end', function() { - ++clientConnect; - if (clientConnect === N) { - proxy.close(); - server.close(); - } - }); - }); - } - } - - server.on('close', function() { - serverConnect.should.equal(N); - proxyConnect.should.equal(poolSize); - clientConnect.should.equal(N); - - var name = 'localhost:' + serverPort; - agent.sockets.should.be.empty; - agent.requests.should.be.empty; - - done(); - }); - }); -}); diff --git a/node_modules/tunnel/test/keys/Makefile b/node_modules/tunnel/test/keys/Makefile deleted file mode 100644 index 6b4745b..0000000 --- a/node_modules/tunnel/test/keys/Makefile +++ /dev/null @@ -1,157 +0,0 @@ -all: server1-cert.pem server2-cert.pem proxy1-cert.pem proxy2-cert.pem client1-cert.pem client2-cert.pem - - -# -# Create Certificate Authority: ca1 -# ('password' is used for the CA password.) -# -ca1-cert.pem: ca1.cnf - openssl req -new -x509 -days 9999 -config ca1.cnf -keyout ca1-key.pem -out ca1-cert.pem - -# -# Create Certificate Authority: ca2 -# ('password' is used for the CA password.) -# -ca2-cert.pem: ca2.cnf - openssl req -new -x509 -days 9999 -config ca2.cnf -keyout ca2-key.pem -out ca2-cert.pem - -# -# Create Certificate Authority: ca3 -# ('password' is used for the CA password.) -# -ca3-cert.pem: ca3.cnf - openssl req -new -x509 -days 9999 -config ca3.cnf -keyout ca3-key.pem -out ca3-cert.pem - -# -# Create Certificate Authority: ca4 -# ('password' is used for the CA password.) -# -ca4-cert.pem: ca4.cnf - openssl req -new -x509 -days 9999 -config ca4.cnf -keyout ca4-key.pem -out ca4-cert.pem - - -# -# server1 is signed by ca1. -# -server1-key.pem: - openssl genrsa -out server1-key.pem 1024 - -server1-csr.pem: server1.cnf server1-key.pem - openssl req -new -config server1.cnf -key server1-key.pem -out server1-csr.pem - -server1-cert.pem: server1-csr.pem ca1-cert.pem ca1-key.pem - openssl x509 -req \ - -days 9999 \ - -passin "pass:password" \ - -in server1-csr.pem \ - -CA ca1-cert.pem \ - -CAkey ca1-key.pem \ - -CAcreateserial \ - -out server1-cert.pem - -# -# server2 is signed by ca1. -# -server2-key.pem: - openssl genrsa -out server2-key.pem 1024 - -server2-csr.pem: server2.cnf server2-key.pem - openssl req -new -config server2.cnf -key server2-key.pem -out server2-csr.pem - -server2-cert.pem: server2-csr.pem ca1-cert.pem ca1-key.pem - openssl x509 -req \ - -days 9999 \ - -passin "pass:password" \ - -in server2-csr.pem \ - -CA ca1-cert.pem \ - -CAkey ca1-key.pem \ - -CAcreateserial \ - -out server2-cert.pem - -server2-verify: server2-cert.pem ca1-cert.pem - openssl verify -CAfile ca1-cert.pem server2-cert.pem - -# -# proxy1 is signed by ca2. -# -proxy1-key.pem: - openssl genrsa -out proxy1-key.pem 1024 - -proxy1-csr.pem: proxy1.cnf proxy1-key.pem - openssl req -new -config proxy1.cnf -key proxy1-key.pem -out proxy1-csr.pem - -proxy1-cert.pem: proxy1-csr.pem ca2-cert.pem ca2-key.pem - openssl x509 -req \ - -days 9999 \ - -passin "pass:password" \ - -in proxy1-csr.pem \ - -CA ca2-cert.pem \ - -CAkey ca2-key.pem \ - -CAcreateserial \ - -out proxy1-cert.pem - -# -# proxy2 is signed by ca2. -# -proxy2-key.pem: - openssl genrsa -out proxy2-key.pem 1024 - -proxy2-csr.pem: proxy2.cnf proxy2-key.pem - openssl req -new -config proxy2.cnf -key proxy2-key.pem -out proxy2-csr.pem - -proxy2-cert.pem: proxy2-csr.pem ca2-cert.pem ca2-key.pem - openssl x509 -req \ - -days 9999 \ - -passin "pass:password" \ - -in proxy2-csr.pem \ - -CA ca2-cert.pem \ - -CAkey ca2-key.pem \ - -CAcreateserial \ - -out proxy2-cert.pem - -proxy2-verify: proxy2-cert.pem ca2-cert.pem - openssl verify -CAfile ca2-cert.pem proxy2-cert.pem - -# -# client1 is signed by ca3. -# -client1-key.pem: - openssl genrsa -out client1-key.pem 1024 - -client1-csr.pem: client1.cnf client1-key.pem - openssl req -new -config client1.cnf -key client1-key.pem -out client1-csr.pem - -client1-cert.pem: client1-csr.pem ca3-cert.pem ca3-key.pem - openssl x509 -req \ - -days 9999 \ - -passin "pass:password" \ - -in client1-csr.pem \ - -CA ca3-cert.pem \ - -CAkey ca3-key.pem \ - -CAcreateserial \ - -out client1-cert.pem - -# -# client2 is signed by ca4. -# -client2-key.pem: - openssl genrsa -out client2-key.pem 1024 - -client2-csr.pem: client2.cnf client2-key.pem - openssl req -new -config client2.cnf -key client2-key.pem -out client2-csr.pem - -client2-cert.pem: client2-csr.pem ca4-cert.pem ca4-key.pem - openssl x509 -req \ - -days 9999 \ - -passin "pass:password" \ - -in client2-csr.pem \ - -CA ca4-cert.pem \ - -CAkey ca4-key.pem \ - -CAcreateserial \ - -out client2-cert.pem - - -clean: - rm -f *.pem *.srl - -test: client-verify server2-verify proxy1-verify proxy2-verify client-verify diff --git a/node_modules/tunnel/test/keys/agent1-cert.pem b/node_modules/tunnel/test/keys/agent1-cert.pem deleted file mode 100644 index 816f6fb..0000000 --- a/node_modules/tunnel/test/keys/agent1-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICKjCCAZMCCQDQ8o4kHKdCPDANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV -UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO -BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqGSIb3DQEJARYRcnlA -dGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEyWjB9 -MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK -EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MTEgMB4G -CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEFAANL -ADBIAkEAnzpAqcoXZxWJz/WFK7BXwD23jlREyG11x7gkydteHvn6PrVBbB5yfu6c -bk8w3/Ar608AcyMQ9vHjkLQKH7cjEQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAKha -HqjCfTIut+m/idKy3AoFh48tBHo3p9Nl5uBjQJmahKdZAaiksL24Pl+NzPQ8LIU+ -FyDHFp6OeJKN6HzZ72Bh9wpBVu6Uj1hwhZhincyTXT80wtSI/BoUAW8Ls2kwPdus -64LsJhhxqj2m4vPKNRbHB2QxnNrGi30CUf3kt3Ia ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/agent1-csr.pem b/node_modules/tunnel/test/keys/agent1-csr.pem deleted file mode 100644 index 748fd00..0000000 --- a/node_modules/tunnel/test/keys/agent1-csr.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH -EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD -EwZhZ2VudDExIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ -KoZIhvcNAQEBBQADSwAwSAJBAJ86QKnKF2cVic/1hSuwV8A9t45URMhtdce4JMnb -Xh75+j61QWwecn7unG5PMN/wK+tPAHMjEPbx45C0Ch+3IxECAwEAAaAlMCMGCSqG -SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB -AF+AfG64hNyYHum46m6i7RgnUBrJSOynGjs23TekV4he3QdMSAAPPqbll8W14+y3 -vOo7/yQ2v2uTqxCjakUNPPs= ------END CERTIFICATE REQUEST----- diff --git a/node_modules/tunnel/test/keys/agent1-key.pem b/node_modules/tunnel/test/keys/agent1-key.pem deleted file mode 100644 index 5dae7eb..0000000 --- a/node_modules/tunnel/test/keys/agent1-key.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIBOwIBAAJBAJ86QKnKF2cVic/1hSuwV8A9t45URMhtdce4JMnbXh75+j61QWwe -cn7unG5PMN/wK+tPAHMjEPbx45C0Ch+3IxECAwEAAQJBAI2cU1IuR+4IO87WPyAB -76kruoo87AeNQkjjvuQ/00+b/6IS45mcEP5Kw0NukbqBhIw2di9uQ9J51DJ/ZfQr -+YECIQDUHaN3ZjIdJ7/w8Yq9Zzz+3kY2F/xEz6e4ftOFW8bY2QIhAMAref+WYckC -oECgOLAvAxB1lI4j7oCbAaawfxKdnPj5AiEAi95rXx09aGpAsBGmSdScrPdG1v6j -83/2ebrvoZ1uFqkCIB0AssnrRVjUB6GZTNTyU3ERfdkx/RX1zvr8WkFR/lXpAiB7 -cUZ1i8ZkZrPrdVgw2cb28UJM7qZHQnXcMHTXFFvxeQ== ------END RSA PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/agent1.cnf b/node_modules/tunnel/test/keys/agent1.cnf deleted file mode 100644 index 81d2f09..0000000 --- a/node_modules/tunnel/test/keys/agent1.cnf +++ /dev/null @@ -1,19 +0,0 @@ -[ req ] -default_bits = 1024 -days = 999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = US -ST = CA -L = SF -O = Joyent -OU = Node.js -CN = agent1 -emailAddress = ry@tinyclouds.org - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/agent2-cert.pem b/node_modules/tunnel/test/keys/agent2-cert.pem deleted file mode 100644 index 8e4354d..0000000 --- a/node_modules/tunnel/test/keys/agent2-cert.pem +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIB7DCCAZYCCQC7gs0MDNn6MTANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJV -UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO -BgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEgMB4GCSqGSIb3DQEJARYR -cnlAdGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEy -WjB9MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYD -VQQKEwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEg -MB4GCSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEF -AANLADBIAkEAyXb8FrRdKbhrKLgLSsn61i1C7w7fVVVd7OQsmV/7p9WB2lWFiDlC -WKGU9SiIz/A6wNZDUAuc2E+VwtpCT561AQIDAQABMA0GCSqGSIb3DQEBBQUAA0EA -C8HzpuNhFLCI3A5KkBS5zHAQax6TFUOhbpBCR0aTDbJ6F1liDTK1lmU/BjvPoj+9 -1LHwrmh29rK8kBPEjmymCQ== ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/agent2-csr.pem b/node_modules/tunnel/test/keys/agent2-csr.pem deleted file mode 100644 index a670c4c..0000000 --- a/node_modules/tunnel/test/keys/agent2-csr.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH -EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD -EwZhZ2VudDIxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ -KoZIhvcNAQEBBQADSwAwSAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf -+6fVgdpVhYg5QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAaAlMCMGCSqG -SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB -AJnll2pt5l0pzskQSpjjLVTlFDFmJr/AZ3UK8v0WxBjYjCe5Jx4YehkChpxIyDUm -U3J9q9MDUf0+Y2+EGkssFfk= ------END CERTIFICATE REQUEST----- diff --git a/node_modules/tunnel/test/keys/agent2-key.pem b/node_modules/tunnel/test/keys/agent2-key.pem deleted file mode 100644 index 522903c..0000000 --- a/node_modules/tunnel/test/keys/agent2-key.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIBOgIBAAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf+6fVgdpVhYg5 -QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAQJBAMT6Bf34+UHKY1ObpsbH -9u2jsVblFq1rWvs8GPMY6oertzvwm3DpuSUp7PTgOB1nLTLYtCERbQ4ovtN8tn3p -OHUCIQDzIEGsoCr5vlxXvy2zJwu+fxYuhTZWMVuo1397L0VyhwIhANQh+yzqUgaf -WRtSB4T2W7ADtJI35ET61jKBty3CqJY3AiAIwju7dVW3A5WeD6Qc1SZGKZvp9yCb -AFI2BfVwwaY11wIgXF3PeGcvACMyMWsuSv7aPXHfliswAbkWuzcwA4TW01ECIGWa -cgsDvVFxmfM5NPSuT/UDTa6R5BFISB5ea0N0AR3I ------END RSA PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/agent2.cnf b/node_modules/tunnel/test/keys/agent2.cnf deleted file mode 100644 index 0a9f2c7..0000000 --- a/node_modules/tunnel/test/keys/agent2.cnf +++ /dev/null @@ -1,19 +0,0 @@ -[ req ] -default_bits = 1024 -days = 999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = US -ST = CA -L = SF -O = Joyent -OU = Node.js -CN = agent2 -emailAddress = ry@tinyclouds.org - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/agent3-cert.pem b/node_modules/tunnel/test/keys/agent3-cert.pem deleted file mode 100644 index e4a2350..0000000 --- a/node_modules/tunnel/test/keys/agent3-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICKjCCAZMCCQCDBr594bsJmTANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV -UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO -BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMjEgMB4GCSqGSIb3DQEJARYRcnlA -dGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEyWjB9 -MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK -EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MzEgMB4G -CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEFAANL -ADBIAkEAtlNDZ+bHeBI0B2gD/IWqA7Aq1hwsnS4+XpnLesjTQcL2JwFFpkR0oWrw -yjrYhCogi7c5gjKrLZF1d2JD5JgHgQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAJoK -bXwsImk7vJz9649yrmsXwnuGbEKVYMvqcGyjaZNP9lYEG41y5CeRzxhWy2rlYdhE -f2nqE2lg75oJP7LQqfQY7aCqwahM3q/GQbsfKVCGjF7TVyq9TQzd8iW+FEJIQzSE -3aN85hR67+3VAXeSzmkGSVBO2m1SJIug4qftIkc2 ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/agent3-csr.pem b/node_modules/tunnel/test/keys/agent3-csr.pem deleted file mode 100644 index e6c0c74..0000000 --- a/node_modules/tunnel/test/keys/agent3-csr.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH -EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD -EwZhZ2VudDMxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ -KoZIhvcNAQEBBQADSwAwSAJBALZTQ2fmx3gSNAdoA/yFqgOwKtYcLJ0uPl6Zy3rI -00HC9icBRaZEdKFq8Mo62IQqIIu3OYIyqy2RdXdiQ+SYB4ECAwEAAaAlMCMGCSqG -SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB -AEGo76iH+a8pnE+RWQT+wg9/BL+iIuqrcFXLs0rbGonqderrwXAe15ODwql/Bfu3 -zgMt8ooTsgMPcMX9EgmubEM= ------END CERTIFICATE REQUEST----- diff --git a/node_modules/tunnel/test/keys/agent3-key.pem b/node_modules/tunnel/test/keys/agent3-key.pem deleted file mode 100644 index d72f071..0000000 --- a/node_modules/tunnel/test/keys/agent3-key.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIBOwIBAAJBALZTQ2fmx3gSNAdoA/yFqgOwKtYcLJ0uPl6Zy3rI00HC9icBRaZE -dKFq8Mo62IQqIIu3OYIyqy2RdXdiQ+SYB4ECAwEAAQJAIk+G9s2SKgFa8y3a2jGZ -LfqABSzmJGooaIsOpLuYLd6eCC31XUDlT4rPVGRhysKQCQ4+NMjgdnj9ZqNnvXY/ -RQIhAOgbdltr3Ey2hy7RuDW5rmOeJTuVqCrZ7QI8ifyCEbYTAiEAyRfvWSvvASeP -kZTMUhATRUpuyDQW+058NE0oJSinTpsCIQCR/FPhBGI3TcaQyA9Ym0T4GwvIAkUX -TqInefRAAX8qSQIgZVJPAdIWGbHSL9sWW97HpukLCorcbYEtKbkamiZyrjMCIQCX -lX76ttkeId5OsJGQcF67eFMMr2UGZ1WMf6M39lCYHQ== ------END RSA PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/agent3.cnf b/node_modules/tunnel/test/keys/agent3.cnf deleted file mode 100644 index 26db5ba..0000000 --- a/node_modules/tunnel/test/keys/agent3.cnf +++ /dev/null @@ -1,19 +0,0 @@ -[ req ] -default_bits = 1024 -days = 999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = US -ST = CA -L = SF -O = Joyent -OU = Node.js -CN = agent3 -emailAddress = ry@tinyclouds.org - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/agent4-cert.pem b/node_modules/tunnel/test/keys/agent4-cert.pem deleted file mode 100644 index 07157b9..0000000 --- a/node_modules/tunnel/test/keys/agent4-cert.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICSDCCAbGgAwIBAgIJAIMGvn3huwmaMA0GCSqGSIb3DQEBBQUAMHoxCzAJBgNV -BAYTAlVTMQswCQYDVQQIEwJDQTELMAkGA1UEBxMCU0YxDzANBgNVBAoTBkpveWVu -dDEQMA4GA1UECxMHTm9kZS5qczEMMAoGA1UEAxMDY2EyMSAwHgYJKoZIhvcNAQkB -FhFyeUB0aW55Y2xvdWRzLm9yZzAeFw0xMTAzMTQxODI5MTJaFw0zODA3MjkxODI5 -MTJaMH0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTELMAkGA1UEBxMCU0YxDzAN -BgNVBAoTBkpveWVudDEQMA4GA1UECxMHTm9kZS5qczEPMA0GA1UEAxMGYWdlbnQ0 -MSAwHgYJKoZIhvcNAQkBFhFyeUB0aW55Y2xvdWRzLm9yZzBcMA0GCSqGSIb3DQEB -AQUAA0sAMEgCQQDN/yMfmQ8zdvmjlGk7b3Mn6wY2FjaMb4c5ENJX15vyYhKS1zhx -6n0kQIn2vf6yqG7tO5Okz2IJiD9Sa06mK6GrAgMBAAGjFzAVMBMGA1UdJQQMMAoG -CCsGAQUFBwMCMA0GCSqGSIb3DQEBBQUAA4GBAA8FXpRmdrHBdlofNvxa14zLvv0N -WnUGUmxVklFLKXvpVWTanOhVgI2TDCMrT5WvCRTD25iT1EUKWxjDhFJrklQJ+IfC -KC6fsgO7AynuxWSfSkc8/acGiAH+20vW9QxR53HYiIDMXEV/wnE0KVcr3t/d70lr -ImanTrunagV+3O4O ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/agent4-csr.pem b/node_modules/tunnel/test/keys/agent4-csr.pem deleted file mode 100644 index 97e115d..0000000 --- a/node_modules/tunnel/test/keys/agent4-csr.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH -EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD -EwZhZ2VudDQxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ -KoZIhvcNAQEBBQADSwAwSAJBAM3/Ix+ZDzN2+aOUaTtvcyfrBjYWNoxvhzkQ0lfX -m/JiEpLXOHHqfSRAifa9/rKobu07k6TPYgmIP1JrTqYroasCAwEAAaAlMCMGCSqG -SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB -AMzo7GUOBtGm5MSck1rrEE2C1bU3qoVvXVuiN3A/57zXeNeq24FZMLnkDeL9U+/b -Kj646XFou04gla982Xp74p0= ------END CERTIFICATE REQUEST----- diff --git a/node_modules/tunnel/test/keys/agent4-key.pem b/node_modules/tunnel/test/keys/agent4-key.pem deleted file mode 100644 index b770b01..0000000 --- a/node_modules/tunnel/test/keys/agent4-key.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIBOQIBAAJBAM3/Ix+ZDzN2+aOUaTtvcyfrBjYWNoxvhzkQ0lfXm/JiEpLXOHHq -fSRAifa9/rKobu07k6TPYgmIP1JrTqYroasCAwEAAQJAN8RQb+dx1A7rejtdWbfM -Rww7PD07Oz2eL/a72wgFsdIabRuVypIoHunqV0sAegYtNJt9yu+VhREw0R5tx/qz -EQIhAPY+nmzp0b4iFRk7mtGUmCTr9iwwzoqzITwphE7FpQnFAiEA1ihUHFT9YPHO -f85skM6qZv77NEgXHO8NJmQZ5GX1ZK8CICzle+Mluo0tD6W7HV4q9pZ8wzSJbY8S -W/PpKetm09F1AiAWTw8sAGKAtc/IGo3Oq+iuYAN1F8lolzJsfGMCGujsOwIgAJKP -t3eXilwX3ZlsDWSklWNZ7iYcfYrvAc3JqU6gFCE= ------END RSA PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/agent4.cnf b/node_modules/tunnel/test/keys/agent4.cnf deleted file mode 100644 index 5e583eb..0000000 --- a/node_modules/tunnel/test/keys/agent4.cnf +++ /dev/null @@ -1,21 +0,0 @@ -[ req ] -default_bits = 1024 -days = 999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = US -ST = CA -L = SF -O = Joyent -OU = Node.js -CN = agent4 -emailAddress = ry@tinyclouds.org - -[ req_attributes ] -challengePassword = A challenge password - -[ ext_key_usage ] -extendedKeyUsage = clientAuth diff --git a/node_modules/tunnel/test/keys/ca1-cert.pem b/node_modules/tunnel/test/keys/ca1-cert.pem deleted file mode 100644 index 640c084..0000000 --- a/node_modules/tunnel/test/keys/ca1-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICIzCCAYwCCQC4ONZJx5BOwjANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK -UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTExJTAjBgkqhkiG9w0B -CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw -NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww -CgYDVQQDEwNjYTExJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu -anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOJMS1ug8jUu0wwEfD4h9/Mg -w0fvs7JbpMxtwpdcFpg/6ECd8YzGUvljLzeHPe2AhF26MiWIUN3YTxZRiQQ2tv93 -afRVWchdPypytmuxv2aYGjhZ66Tv4vNRizM71OE+66+KS30gEQW2k4MTr0ZVlRPR -OVey+zRSLdVaKciB/XaBAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEApfbly4b+Ry1q -bGIgGrlTvNFvF+j2RuHqSpuTB4nKyw1tbNreKmEEb6SBEfkjcTONx5rKECZ5RRPX -z4R/o1G6Dn21ouf1pWQO0BC/HnLN30KvvsoZRoxBn/fqBlJA+j/Kpj3RQgFj6l2I -AKI5fD+ucPqRGhjmmTsNyc+Ln4UfAq8= ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/ca1-cert.srl b/node_modules/tunnel/test/keys/ca1-cert.srl deleted file mode 100644 index d7f4b79..0000000 --- a/node_modules/tunnel/test/keys/ca1-cert.srl +++ /dev/null @@ -1 +0,0 @@ -B111C9CEF0257692 diff --git a/node_modules/tunnel/test/keys/ca1-key.pem b/node_modules/tunnel/test/keys/ca1-key.pem deleted file mode 100644 index aaa58ae..0000000 --- a/node_modules/tunnel/test/keys/ca1-key.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIbo5wvG42IY0CAggA -MBQGCCqGSIb3DQMHBAgf8SPuz4biYASCAoAR4r8MVikusOAEt4Xp6nB7whrMX4iG -G792Qpf21nHZPMV73w3cdkfimbAfUn8F50tSJwdrAa8U9BjjpL9Kt0loIyXt/r8c -6PWAQ4WZuLPgTFUTJUNAXrunBHI0iFWYEN4YzJYmT1qN3J4u0diy0MkKz6eJPfZ3 -3v97+nF7dR2H86ZgLKsuE4pO5IRb60XW85d7CYaY6rU6l6mXMF0g9sIccHTlFoet -Xm6cA7NAm1XSI1ciYcoc8oaVE9dXoOALaTnBEZ2MJGpsYQ0Hr7kB4VKAO9wsOta5 -L9nXPv79Nzo1MZMChkrORFnwOzH4ffsUwVQ70jUzkt5DEyzCM1oSxFNRQESxnFrr -7c1jLg2gxAVwnqYo8njsKJ23BZqZUxHsBgB2Mg1L/iPT6zhclD0u3RZx9MR4ezB2 -IqoCF19Z5bblkReAeVRAE9Ol4hKVaCEIIPUspcw7eGVGONalHDCSXpIFnJoZLeXJ -OZjLmYlA6KkJw52eNE5IwIb8l/tha2fwNpRvlMoXp65yH9wKyJk8zPSM6WAk4dKD -nLrTCK4KtM6aIbG14Mff6WEf3uaLPM0cLwxmuypfieCZfkIzgytNdFZoBgaYUpon -zazvUMoy3gqDBorcU08SaosdRoL+s+QVkRhA29shf42lqOM4zbh0dTul4QDlLG0U -VBNeMJ3HnrqATfBU28j3bUqtuF2RffgcN/3ivlBjcyzF/iPt0TWmm6Zz5v4K8+b6 -lOm6gofIz+ffg2cXfPzrqZ2/xhFkcerRuN0Xp5eAhlI2vGJVGuEc4X+tT7VtQgLV -iovqzlLhp+ph/gsfCcsYZ9iso3ozw+Cx1HfJ8XT7yWUgXxblkt4uszEo ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/ca1.cnf b/node_modules/tunnel/test/keys/ca1.cnf deleted file mode 100644 index dcb0637..0000000 --- a/node_modules/tunnel/test/keys/ca1.cnf +++ /dev/null @@ -1,17 +0,0 @@ -[ req ] -default_bits = 1024 -days = 9999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no -output_password = password - -[ req_distinguished_name ] -C = JP -OU = nodejs_jp -CN = ca1 -emailAddress = koichik@improvement.jp - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/ca2-cert.pem b/node_modules/tunnel/test/keys/ca2-cert.pem deleted file mode 100644 index 4c29c87..0000000 --- a/node_modules/tunnel/test/keys/ca2-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICIzCCAYwCCQCxIhZSDET+8DANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK -UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0B -CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw -NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww -CgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu -anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMaaLMMe7K5eYABH3NnJoimG -LvY4S5tdGF6YRwfkn1bgGa+kEw1zNqa/Y0jSzs4h7bApt3+bKTalR4+Zk+0UmWgZ -Gvlq8+mdqDXtBKoWE3vYDPBmeNyKsgxf9UIhFOpsxVUeYP8t66qJyUk/FlFJcDqc -WPawikl1bUFSZXBKu4PxAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAwh3sXPIkA5kn -fpg7fV5haS4EpFr9ia61dzWbhXDZtasAx+nWdWqgG4T+HIYSLlMNZbGJ998uhFZf -DEHlbY/WuSBukZ0w+xqKBtPyjLIQKVvNiaTx5YMzQes62R1iklOXzBzyHbYIxFOG -dqLfIjEe/mVVoR23LN2tr8Wa6+rmd+w= ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/ca2-cert.srl b/node_modules/tunnel/test/keys/ca2-cert.srl deleted file mode 100644 index 2749952..0000000 --- a/node_modules/tunnel/test/keys/ca2-cert.srl +++ /dev/null @@ -1 +0,0 @@ -9BF2D4B2E00EDF16 diff --git a/node_modules/tunnel/test/keys/ca2-crl.pem b/node_modules/tunnel/test/keys/ca2-crl.pem deleted file mode 100644 index 166df74..0000000 --- a/node_modules/tunnel/test/keys/ca2-crl.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN X509 CRL----- -MIIBXTCBxzANBgkqhkiG9w0BAQQFADB6MQswCQYDVQQGEwJVUzELMAkGA1UECBMC -Q0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAOBgNVBAsTB05vZGUu -anMxDDAKBgNVBAMTA2NhMjEgMB4GCSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5v -cmcXDTExMDMxNDE4MjkxNloXDTEzMTIwNzE4MjkxNlowHDAaAgkAgwa+feG7CZoX -DTExMDMxNDE4MjkxNFowDQYJKoZIhvcNAQEEBQADgYEArRKuEkOla61fm4zlZtHe -LTXFV0Hgo21PScHAp6JqPol4rN5R9+EmUkv7gPCVVBJ9VjIgxSosHiLsDiz3zR+u -txHemhzbdIVANAIiChnFct8sEqH2eL4N6XNUIlMIR06NjNl7NbN8w8haqiearnuT -wmnaL4TThPmpbpKAF7N7JqQ= ------END X509 CRL----- diff --git a/node_modules/tunnel/test/keys/ca2-database.txt b/node_modules/tunnel/test/keys/ca2-database.txt deleted file mode 100644 index a0966d2..0000000 --- a/node_modules/tunnel/test/keys/ca2-database.txt +++ /dev/null @@ -1 +0,0 @@ -R 380729182912Z 110314182914Z 8306BE7DE1BB099A unknown /C=US/ST=CA/L=SF/O=Joyent/OU=Node.js/CN=agent4/emailAddress=ry@tinyclouds.org diff --git a/node_modules/tunnel/test/keys/ca2-key.pem b/node_modules/tunnel/test/keys/ca2-key.pem deleted file mode 100644 index 9cea659..0000000 --- a/node_modules/tunnel/test/keys/ca2-key.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQI3aq9fKZIOF0CAggA -MBQGCCqGSIb3DQMHBAjyunMfVve0OwSCAoAdMsrRFlQUSILw+bq3cSVIIbFjwcs0 -B1Uz2rc9SB+1qjsazjv4zvPQSXTrsx2EOSJf9PSPz7r+c0NzO9vfWLorpXof/lwL -C1tRN7/1OqEW/mTK+1wlv0M5C4cmf44BBXmI+y+RWrQ/qc+CWEMvfHwv9zWr2K+i -cLlZv55727GvZYCMMVLiqYd/Ejj98loBsE5dhN4JJ5MPaN3UHhFTCpD453GIIzCi -FRuYhOOtX4qYoEuP2db4S2qu26723ZJnYBEHkK2YZiRrgvoZHugyGIr4f/RRoSUI -fPgycgQfL3Ow+Y1G533PiZ+CYgh9cViUzhZImEPiZpSuUntAD1loOYkJuV9Ai9XZ -+t6+7tfkM3aAo1bkaU8KcfINxxNWfAhCbUQw+tGJl2A+73OM5AGjGSfzjQQL/FOa -5omfEvdfEX2XyRRlqnQ2VucvSTL9ZdzbIJGg/euJTpM44Fwc7yAZv2aprbPoPixu -yyf0LoTjlGGSBZvHkunpWx82lYEXvHhcnCxV5MDFw8wehvDrvcSuzb8//HzLOiOB -gzUr3DOQk4U1UD6xixZjAKC+NUwTVZoHg68KtmQfkq+eGUWf5oJP4xUigi3ui/Wy -OCBDdlRBkFtgLGL51KJqtq1ixx3Q9HMl0y6edr5Ls0unDIo0LtUWUUcAtr6wl+kK -zSztxFMi2zTtbhbkwoVpucNstFQNfV1k22vtnlcux2FV2DdZiJQwYpIbr8Gj6gpK -gtV5l9RFe21oZBcKPt/chrF8ayiClfGMpF3D2p2GqGCe0HuH5uM/JAFf60rbnriA -Nu1bWiXsXLRUXcLIQ/uEPR3Mvvo9k1h4Q6it1Rp67eQiXCX6h2uFq+sB ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/ca2-serial b/node_modules/tunnel/test/keys/ca2-serial deleted file mode 100644 index 8a0f05e..0000000 --- a/node_modules/tunnel/test/keys/ca2-serial +++ /dev/null @@ -1 +0,0 @@ -01 diff --git a/node_modules/tunnel/test/keys/ca2.cnf b/node_modules/tunnel/test/keys/ca2.cnf deleted file mode 100644 index 46e8274..0000000 --- a/node_modules/tunnel/test/keys/ca2.cnf +++ /dev/null @@ -1,17 +0,0 @@ -[ req ] -default_bits = 1024 -days = 9999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no -output_password = password - -[ req_distinguished_name ] -C = JP -OU = nodejs_jp -CN = ca2 -emailAddress = koichik@improvement.jp - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/ca3-cert.pem b/node_modules/tunnel/test/keys/ca3-cert.pem deleted file mode 100644 index 02b3f7a..0000000 --- a/node_modules/tunnel/test/keys/ca3-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICIzCCAYwCCQCudHFhEWiUHDANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK -UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTMxJTAjBgkqhkiG9w0B -CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw -NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww -CgYDVQQDEwNjYTMxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu -anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJPRJMhCNtxX6dQ3rLdrzVCl -XJMSRIICpbsc7arOzSJcrsIYeYC4d29dGwxYNLnAkKSmHujFT9SmFgh88CoYETLp -gE9zCk9hVCwUlWelM/UaIrzeLT4SC3VBptnLmMtk2mqFniLcaFdMycAcX8OIhAgG -fbqyT5Wxwz7UMegip2ZjAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEADpu8a/W+NPnS -mhyIOxXn8O//2oH9ELlBYFLIgTid0xmS05x/MgkXtWqiBEEZFoOfoJBJxM3vTFs0 -PiZvcVjv0IIjDF4s54yRVH+4WI2p7cil1fgzAVRTuOIuR+VyN7ct8s26a/7GFDq6 -NJMByyjsJHyxwwri5hVv+jbLCxmnDjI= ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/ca3-cert.srl b/node_modules/tunnel/test/keys/ca3-cert.srl deleted file mode 100644 index cfd39e1..0000000 --- a/node_modules/tunnel/test/keys/ca3-cert.srl +++ /dev/null @@ -1 +0,0 @@ -EF7B2CF0FA61DF41 diff --git a/node_modules/tunnel/test/keys/ca3-key.pem b/node_modules/tunnel/test/keys/ca3-key.pem deleted file mode 100644 index 8931132..0000000 --- a/node_modules/tunnel/test/keys/ca3-key.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIwAta+L4c9soCAggA -MBQGCCqGSIb3DQMHBAgqRud2p3SvogSCAoDXoDJOJDkvgFpQ6rxeV5r0fLX4SrGJ -quv4yt02QxSDUPN2ZLtBt6bLzg4Zv2pIggufYJcZ2IOUnX82T7FlvBP8hbW1q3Bs -jAso7z8kJlFrZjNudjuP2l/X8tjrVyr3I0PoRoomtcHnCcSDdyne8Dqqj1enuikF -8b7FZUqocNLfu8LmNGxMmMwjw3UqhtpP5DjqV60B8ytQFPoz/gFh6aNGvsrD/avU -Dj8EJkQZP6Q32vmCzAvSiLjk7FA7RFmBtaurE9hJYNlc5v1eo69EUwPkeVlTpglJ -5sZAHxlhQCgc72ST6uFQKiMO3ng/JJA5N9EvacYSHQvI1TQIo43V2A//zUh/5hGL -sDv4pRuFq9miX8iiQpwo1LDfRzdwg7+tiLm8/mDyeLUSzDNc6GIX/tC9R4Ukq4ge -1Cfq0gtKSRxZhM8HqpGBC9rDs5mpdUqTRsoHLFn5T6/gMiAtrLCJxgD8JsZBa8rM -KZ09QEdZXTvpyvZ8bSakP5PF6Yz3QYO32CakL7LDPpCng0QDNHG10YaZbTOgJIzQ -NJ5o87DkgDx0Bb3L8FoREIBkjpYFbQi2fvPthoepZ3D5VamVsOwOiZ2sR1WF2J8l -X9c8GdG38byO+SQIPNZ8eT5JvUcNeSlIZiVSwvaEk496d2KzhmMMfoBLFVeHXG90 -CIZPleVfkTmgNQgXPWcFngqTZdDEGsHjEDDhbEAijB3EeOxyiiEDJPMy5zqkdy5D -cZ/Y77EDbln7omcyL+cGvCgBhhYpTbtbuBtzW4CiCvcfEB5N4EtJKOTRJXIpL/d3 -oVnZruqRRKidKwFMEZU2NZJX5FneAWFSeCv0IrY2vAUIc3El+n84CFFK ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/ca3.cnf b/node_modules/tunnel/test/keys/ca3.cnf deleted file mode 100644 index 7b2378a..0000000 --- a/node_modules/tunnel/test/keys/ca3.cnf +++ /dev/null @@ -1,17 +0,0 @@ -[ req ] -default_bits = 1024 -days = 9999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no -output_password = password - -[ req_distinguished_name ] -C = JP -OU = nodejs_jp -CN = ca3 -emailAddress = koichik@improvement.jp - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/ca4-cert.pem b/node_modules/tunnel/test/keys/ca4-cert.pem deleted file mode 100644 index ed0686a..0000000 --- a/node_modules/tunnel/test/keys/ca4-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICIzCCAYwCCQDUGh2r7lOpITANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK -UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTQxJTAjBgkqhkiG9w0B -CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw -NTEwMTEyMzIxWjBWMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQww -CgYDVQQDEwNjYTQxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQu -anAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOOC+SPC8XzkjIHfKPMzzNV6 -O/LpqQWdzJtEvFNW0oQ9g8gSV4iKqwUFrLNnSlwSGigvqKqGmYtG8S17ANWInoxI -c3sQlrS2cGbgLUBNKu4hZ7s+11EPOjbnn0QUE5w9GN8fy8CDx7ID/8URYKoxcoRv -0w7EJ2agfd68KS1ayxUXAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAumPFeR63Dyki -SWQtRAe2QWkIFlSRAR2PvSDdsDMLwMeXF5wD3Hv51yfTu9Gkg0QJB86deYfQ5vfV -4QsOQ35icesa12boyYpTE0/OoEX1f/s1sLlszpRvtAki3J4bkcGWAzM5yO1fKqpQ -MbtPzLn+DA7ymxuJa6EQAEb+kaJEBuU= ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/ca4-cert.srl b/node_modules/tunnel/test/keys/ca4-cert.srl deleted file mode 100644 index 5c11314..0000000 --- a/node_modules/tunnel/test/keys/ca4-cert.srl +++ /dev/null @@ -1 +0,0 @@ -B01FE0416A2EDCF5 diff --git a/node_modules/tunnel/test/keys/ca4-key.pem b/node_modules/tunnel/test/keys/ca4-key.pem deleted file mode 100644 index fa7aca1..0000000 --- a/node_modules/tunnel/test/keys/ca4-key.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIWE/ri/feeikCAggA -MBQGCCqGSIb3DQMHBAiu6hUzoFnsVASCAoC53ZQ4gxLcFnb5yAcdCl4DdKOJ5m4G -CHosR87pJpZlO68DsCKwORUp9tTmb1/Q4Wm9n2kRf6VQNyVVm6REwzEPAgIJEgy2 -FqLmfqpTElbRsQako8UDXjDjaMO30e+Qhy8HOTrHMJZ6LgrU90xnOCPPeN9fYmIu -YBkX4qewUfu+wFzk/unUbFLChvJsEN4fdrlDwTJMHRzKwbdvg3mHlCnspWwjA2Mc -q27QPeb3mwRUajmqL0dT9y7wVYeAN2zV59VoWm6zV+dWFgyMlVrVCRYkqQC3xOsy -ZlKrGldrY8nNdv5s6+Sc7YavTJiJxHgIB7sm6QFIsdqjxTBEGD4/YhEI52SUw/xO -VJmOTWdWUz4FdWNi7286nfhZ0+mdv6fUoG54Qv6ahnUMJvEsp60LkR1gHXLzQu/m -+yDZFqY/IIg2QA7M3gL0Md5GrWydDlD2uBPoXcC4A5gfOHswzHWDKurDCpoMqdpn -CUQ/ZVl2rwF8Pnty61MjY1xCN1r8xQjFBCgcfBWw5v6sNRbr/vef3TfQIBzVm+hx -akDb1nckBsIjMT9EfeT6hXub2n0oehEHewF1COifbcOjnxToLSswPLrtb0behB+o -zTgftn+4XrkY0sFY69TzYtQVMLAsiWTpZFvAi+D++2pXlQ/bnxKJiBBc6kZuAGpN -z+cJ4kUuFE4S9v5C5vK89nIgcuJT06u8wYTy0N0j/DnIjSaVgGr0Y0841mXtU1VV -wUZjuyYrVwVT/g5r6uzEFldTcjmYkbMaxo+MYnEZZgqYJvu2QlK87YxJOwo+D1NX -4gl1s/bmlPlGw/t9TxutI3S9PEr3JM3013e9UPE+evlTG9IIrZaUPzyj ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/ca4.cnf b/node_modules/tunnel/test/keys/ca4.cnf deleted file mode 100644 index ceac8f3..0000000 --- a/node_modules/tunnel/test/keys/ca4.cnf +++ /dev/null @@ -1,17 +0,0 @@ -[ req ] -default_bits = 1024 -days = 9999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no -output_password = password - -[ req_distinguished_name ] -C = JP -OU = nodejs_jp -CN = ca4 -emailAddress = koichik@improvement.jp - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/client.cnf b/node_modules/tunnel/test/keys/client.cnf deleted file mode 100644 index e3db741..0000000 --- a/node_modules/tunnel/test/keys/client.cnf +++ /dev/null @@ -1,16 +0,0 @@ -[ req ] -default_bits = 1024 -days = 9999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = JP -OU = nodejs_jp -CN = localhost -emailAddress = koichik@improvement.jp - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/client1-cert.pem b/node_modules/tunnel/test/keys/client1-cert.pem deleted file mode 100644 index 24ea1db..0000000 --- a/node_modules/tunnel/test/keys/client1-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICKTCCAZICCQDveyzw+mHfQTANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK -UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTMxJTAjBgkqhkiG9w0B -CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw -NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw -EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92 -ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMYUuKyuxT93zvrS -mL8IMI8xu8dP3iRZDUYu6dmq6Dntgb7intfzxtEFVmfNCDGwJwg7UKx/FzftGxFb -9LksuvAQuW2FLhCrOmXUVU938OZkQRSflISD80kd4i9JEoKKYPX1imjaMugIQ0ta -Bq2orY6sna8JAUVDW6WO3wVEJ4mBAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAAbaH -bc/6dIFC9TPIDrgsLtsOtycdBJqKbFT1wThhyKncXF/iyaI+8N4UA+hXMjk8ODUl -BVmmgaN6ufMLwnx/Gdl9FLmmDq4FQ4zspClTJo42QPzg5zKoPSw5liy73LM7z+nG -g6IeM8RFlEbs109YxqvQnbHfTgeLdIsdvtNXU80= ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/client1-csr.pem b/node_modules/tunnel/test/keys/client1-csr.pem deleted file mode 100644 index c33a135..0000000 --- a/node_modules/tunnel/test/keys/client1-csr.pem +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES -MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv -dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDGFLisrsU/d876 -0pi/CDCPMbvHT94kWQ1GLunZqug57YG+4p7X88bRBVZnzQgxsCcIO1Csfxc37RsR -W/S5LLrwELlthS4Qqzpl1FVPd/DmZEEUn5SEg/NJHeIvSRKCimD19Ypo2jLoCENL -WgatqK2OrJ2vCQFFQ1uljt8FRCeJgQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg -Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAB5NvNSHX+WDlF5R -LNr7SI2NzIy5OWEAgTxLkvS0NS75zlDLScaqwgs1uNfB2AnH0Fpw9+pePEijlb+L -3VRLNpV8hRn5TKztlS3O0Z4PPb7hlDHitXukTOQYrq0juQacodVSgWqNbac+O2yK -qf4Y3A7kQO1qmDOfN6QJFYVIpPiP ------END CERTIFICATE REQUEST----- diff --git a/node_modules/tunnel/test/keys/client1-key.pem b/node_modules/tunnel/test/keys/client1-key.pem deleted file mode 100644 index 52aff97..0000000 --- a/node_modules/tunnel/test/keys/client1-key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQDGFLisrsU/d8760pi/CDCPMbvHT94kWQ1GLunZqug57YG+4p7X -88bRBVZnzQgxsCcIO1Csfxc37RsRW/S5LLrwELlthS4Qqzpl1FVPd/DmZEEUn5SE -g/NJHeIvSRKCimD19Ypo2jLoCENLWgatqK2OrJ2vCQFFQ1uljt8FRCeJgQIDAQAB -AoGAbfcM+xjfejeqGYcWs175jlVe2OyW93jUrLTYsDV4TMh08iLfaiX0pw+eg2vI -88TGNoSvacP4gNzJ3R4+wxp5AFlRKZ876yL7D0VKavMFwbyRk21+D/tLGvW6gqOC -4qi4IWSkfgBh5RK+o4jZcl5tzRPQyuxR3pJGBS33q5K2dEECQQDhV4NuKZcGDnKt -1AhmtzqsJ4wrp2a3ysZYDTWyA692NGXi2Vnpnc6Aw9JchJhT3cueFLcOTFrb/ttu -ZC/iA67pAkEA4Qe7LvcPvHlwNAmzqzOg2lYAqq+aJY2ghfJMqr3dPCJqbHJnLN6p -GXsqGngwVlnvso0O/n5g30UmzvkRMFZW2QJAbOMQy0alh3OrzntKo/eeDln9zYpS -hDUjqqCXdbF6M7AWG4vTeqOaiXYWTEZ2JPBj17tCyVH0BaIc/jbDPH9zIQJBALei -YH0l/oB2tTqyBB2cpxIlhqvDW05z8d/859WZ1PVivGg9P7cdCO+TU7uAAyokgHe7 -ptXFefYZb18NX5qLipkCQHjIo4BknrO1oisfsusWcCC700aRIYIDk0QyEEIAY3+9 -7ar/Oo1EbqWA/qN7zByPuTKrjrb91/D+IMFUFgb4RWc= ------END RSA PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/client1.cnf b/node_modules/tunnel/test/keys/client1.cnf deleted file mode 100644 index e3db741..0000000 --- a/node_modules/tunnel/test/keys/client1.cnf +++ /dev/null @@ -1,16 +0,0 @@ -[ req ] -default_bits = 1024 -days = 9999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = JP -OU = nodejs_jp -CN = localhost -emailAddress = koichik@improvement.jp - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/client2-cert.pem b/node_modules/tunnel/test/keys/client2-cert.pem deleted file mode 100644 index f0de53c..0000000 --- a/node_modules/tunnel/test/keys/client2-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICKTCCAZICCQCwH+BBai7c9TANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK -UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTQxJTAjBgkqhkiG9w0B -CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw -NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw -EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92 -ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMJQGt34PZX5pQmi -3bNp3dryr7qPO3oGhTeShLCeZ6PPCdnmVl0PnT0n8/DFBlaijbvXGU9AjcFZ7gg7 -hcSAFLGmPEb2pug021yzl7u0qUD2fnVaEzfJ04ZU4lUCFqGKsfFVQuIkDHFwadbE -AO+8EqOmDynUMkKfHPWQK6O9jt5ZAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEA143M -QIygJGDv2GFKlVgV05/CYZo6ouX9I6vPRekJnGeL98lmVH83Ogb7Xmc2SbJ18qFq -naBYnUEmHPUAZ2Ms2KuV3OOvscUSCsEJ4utJYznOT8PsemxVWrgG1Ba+zpnPkdII -p+PanKCsclNUKwBlSkJ8XfGi9CAZJBykwws3O1c= ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/client2-csr.pem b/node_modules/tunnel/test/keys/client2-csr.pem deleted file mode 100644 index b7507f4..0000000 --- a/node_modules/tunnel/test/keys/client2-csr.pem +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES -MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv -dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCUBrd+D2V+aUJ -ot2zad3a8q+6jzt6BoU3koSwnmejzwnZ5lZdD509J/PwxQZWoo271xlPQI3BWe4I -O4XEgBSxpjxG9qboNNtcs5e7tKlA9n51WhM3ydOGVOJVAhahirHxVULiJAxxcGnW -xADvvBKjpg8p1DJCnxz1kCujvY7eWQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg -Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAA//UPKPpVEpflDj -DBboWewa6yw8FEOnMvh6eeg/a8KbXfIYnkZRtxbmH06ygywBy/RUBCbM5EzyElkJ -bTVKorzCHnxuTfSnKQ68ZD+vI2SNjiWqQFXW6oOCPzLbtaTJVKw5D6ylBp8Zsu6n -BzQ/4Y42aX/HW4nfJeDydxNFYVJJ ------END CERTIFICATE REQUEST----- diff --git a/node_modules/tunnel/test/keys/client2-key.pem b/node_modules/tunnel/test/keys/client2-key.pem deleted file mode 100644 index ecb616e..0000000 --- a/node_modules/tunnel/test/keys/client2-key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICWwIBAAKBgQDCUBrd+D2V+aUJot2zad3a8q+6jzt6BoU3koSwnmejzwnZ5lZd -D509J/PwxQZWoo271xlPQI3BWe4IO4XEgBSxpjxG9qboNNtcs5e7tKlA9n51WhM3 -ydOGVOJVAhahirHxVULiJAxxcGnWxADvvBKjpg8p1DJCnxz1kCujvY7eWQIDAQAB -AoGAbiT0JdCaMFIzb/PnEdU30e1xGSIpx7C8gNTH7EnOW7d3URHU8KlyKwFjsJ4u -SpuYFdsG2Lqx3+D3IamD2O/1SgODmtdFas1C/hQ2zx42SgyBQolVJU1MHJxHqmCb -nm2Wo8aHmvFXpQ8OF4YJLPxLOSdvmq0PC17evDyjz5PciWUCQQD5yzaBpJ7yzGwd -b6nreWj6pt+jfi11YsA3gAdvTJcFzMGyNNC+U9OExjQqHsyaHyxGhHKQ6y+ybZkR -BggkudPfAkEAxyQC/hmcvWegdGI4xOJNbm0kv8UyxyeqhtgzEW2hWgEQs4k3fflZ -iNpvxyIBIp/7zZo02YqeQfZlDYuxKypUxwJAa6jQBzRCZXcBqfY0kA611kIR5U8+ -nHdBTSpbCfdCp/dGDF6DEWTjpzgdx4GawVpqJMJ09kzHM+nUrOeinuGQlQJAMAsV -Gb6OHPfaMxnbPkymh6SXQBjQNlHwhxWzxFmhmrg1EkthcufsXOLuIqmmgnb8Zc71 -PyJ9KcbK/GieNp7A0wJAIz3Mm3Up9Rlk25TH9k5e3ELjC6fkd93u94Uo145oTgDm -HSbCbjifP5eVl66PztxZppG2GBXiXT0hA/RMruTQMg== ------END RSA PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/client2.cnf b/node_modules/tunnel/test/keys/client2.cnf deleted file mode 100644 index e3db741..0000000 --- a/node_modules/tunnel/test/keys/client2.cnf +++ /dev/null @@ -1,16 +0,0 @@ -[ req ] -default_bits = 1024 -days = 9999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = JP -OU = nodejs_jp -CN = localhost -emailAddress = koichik@improvement.jp - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/proxy1-cert.pem b/node_modules/tunnel/test/keys/proxy1-cert.pem deleted file mode 100644 index 30851fe..0000000 --- a/node_modules/tunnel/test/keys/proxy1-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICKTCCAZICCQCb8tSy4A7fFTANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK -UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0B -CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw -NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw -EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92 -ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALiUyeosVxtJK8G4 -sAqU2DBLx5sMuZpV/YcW/YxUuJv3t/9TpVxcWAs6VRPzi5fqKe8TER8qxi1/I8zV -Qks1gWyZ01reU6Wpdt1MZguF036W2qKOxlJXvnqnRDWu9IFf6KMjSJjFZb6nqhQv -aiL/80hqc2qXVfuJbSYlGrKWFFINAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEABPIn -+vQoDpJx7lVNJNOe7DE+ShCXCK6jkQY8+GQXB1sz5K0OWdZxUWOOp/fcjNJua0NM -hgnylWu/pmjPh7c9xHdZhuh6LPD3F0k4QqK+I2rg45gdBPZT2IxEvxNYpGIfayvY -ofOgbienn69tMzGCMF/lUmEJu7Bn08EbL+OyNBg= ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/proxy1-csr.pem b/node_modules/tunnel/test/keys/proxy1-csr.pem deleted file mode 100644 index 78ad220..0000000 --- a/node_modules/tunnel/test/keys/proxy1-csr.pem +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES -MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv -dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4lMnqLFcbSSvB -uLAKlNgwS8ebDLmaVf2HFv2MVLib97f/U6VcXFgLOlUT84uX6invExEfKsYtfyPM -1UJLNYFsmdNa3lOlqXbdTGYLhdN+ltqijsZSV756p0Q1rvSBX+ijI0iYxWW+p6oU -L2oi//NIanNql1X7iW0mJRqylhRSDQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg -Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAFhZc2cvYGf8mCg/ -5nPWmnjNIqgy7uJnOGfE3AP4rW48yiVHCJK9ZmPogbH7gBMOBrrX8fLX3ThK9Sbj -uJlBlZD/19zjM+kvJ14DcievJ15S3KehVQ6Ipmgbz/vnAaL1D+ZiOnjQad2/Fzg4 -0MFXQaZFEUcI8fKnv/zmYi1aivej ------END CERTIFICATE REQUEST----- diff --git a/node_modules/tunnel/test/keys/proxy1-key.pem b/node_modules/tunnel/test/keys/proxy1-key.pem deleted file mode 100644 index d06fddd..0000000 --- a/node_modules/tunnel/test/keys/proxy1-key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQC4lMnqLFcbSSvBuLAKlNgwS8ebDLmaVf2HFv2MVLib97f/U6Vc -XFgLOlUT84uX6invExEfKsYtfyPM1UJLNYFsmdNa3lOlqXbdTGYLhdN+ltqijsZS -V756p0Q1rvSBX+ijI0iYxWW+p6oUL2oi//NIanNql1X7iW0mJRqylhRSDQIDAQAB -AoGADPSkl4M1Of0QzTAhaxy3b+xhvkhOXr7aZLkAYvEvZAMnLwy39puksmUNw7C8 -g5U0DEvST9W4w0jBQodVd+Hxi4dUS4BLDVVStaLMa1Fjai/4uBPxbsrvdHzDu7if -BI6t12vWNNRtTxbfCJ1Fs3nHvDG0ueBZX3fYWBIPPM4bRQECQQDjmCrxbkfFrN5z -JXHfmzoNovV7KzgwRLKOLF17dYnhaG3G77JYjhEjIg5VXmQ8XJrwS45C/io5feFA -qrsy/0v1AkEAz55QK8CLue+sn0J8Yw//yLjJT6BK4pCFFKDxyAvP/3r4t7+1TgDj -KAfUMWb5Hcn9iT3sEykUeOe0ghU0h5X2uQJBAKES2qGPuP/vvmejwpnMVCO+hxmq -ltOiavQv9eEgaHq826SFk6UUtpA01AwbB7momIckEgTbuKqDql2H94C6KdkCQQC7 -PfrtyoP5V8dmBk8qBEbZ3pVn45dFx7LNzOzhTo3yyhO/m/zGcZRsCMt9FnI7RG0M -tjTPfvAArm8kFj2+vie5AkASvVx478N8so+02QWKme4T3ZDX+HDBXgFH1+SMD91m -9tS6x2dtTNvvwBA2KFI1fUg3B/wDoKJQRrqwdl8jpoGP ------END RSA PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/proxy1.cnf b/node_modules/tunnel/test/keys/proxy1.cnf deleted file mode 100644 index e3db741..0000000 --- a/node_modules/tunnel/test/keys/proxy1.cnf +++ /dev/null @@ -1,16 +0,0 @@ -[ req ] -default_bits = 1024 -days = 9999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = JP -OU = nodejs_jp -CN = localhost -emailAddress = koichik@improvement.jp - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/proxy2-cert.pem b/node_modules/tunnel/test/keys/proxy2-cert.pem deleted file mode 100644 index dfe9d8e..0000000 --- a/node_modules/tunnel/test/keys/proxy2-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICJjCCAY8CCQCb8tSy4A7fFjANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK -UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTIxJTAjBgkqhkiG9w0B -CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw -NTEwMTEyMzIxWjBZMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMQ8w -DQYDVQQDEwZwcm94eTIxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92ZW1l -bnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALZ3oNCmB2P4Q9DoUVFq -Z1ByASLm63jTPEumv2kX81GF5QMLRl59HBM6Te1rRR7wFHL0iBQUYuEzNPmedXpU -cds0uWl5teoO63ZSKFL1QLU3PMFo56AeWeznxOhy6vwWv3M8C391X6lYsiBow3K9 -d37p//GLIR+jl6Q4xYD41zaxAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEADUQgtmot -8zqsRQInjWAypcntkxX8hdUOEudN2/zjX/YtMZbr8rRvsZzBsUDdgK+E2EmEb/N3 -9ARZ0T2zWFFphJapkZOM1o1+LawN5ON5HfTPqr6d9qlHuRdGCBpXMUERO2V43Z+S -Zwm+iw1yZEs4buTmiw6zu6Nq0fhBlTiAweE= ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/proxy2-csr.pem b/node_modules/tunnel/test/keys/proxy2-csr.pem deleted file mode 100644 index 5510e7f..0000000 --- a/node_modules/tunnel/test/keys/proxy2-csr.pem +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBvjCCAScCAQAwWTELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDEP -MA0GA1UEAxMGcHJveHkyMSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJvdmVt -ZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2d6DQpgdj+EPQ6FFR -amdQcgEi5ut40zxLpr9pF/NRheUDC0ZefRwTOk3ta0Ue8BRy9IgUFGLhMzT5nnV6 -VHHbNLlpebXqDut2UihS9UC1NzzBaOegHlns58Tocur8Fr9zPAt/dV+pWLIgaMNy -vXd+6f/xiyEfo5ekOMWA+Nc2sQIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEgY2hh -bGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBADC4dh/+gQnJcPMQ0riJ -CBVLygcCWxkNvwM3ARboyihuNbzFX1f2g23Zr5iLphiuEFCPDOyd26hHieQ8Xo1y -FPuDXpWMx9X9MLjCWg8kdtada7HsYffbUvpjjL9TxFh+rX0cmr6Ixc5kV7AV4I6V -3h8BYJebX+XfuYrI1UwEqjqI ------END CERTIFICATE REQUEST----- diff --git a/node_modules/tunnel/test/keys/proxy2-key.pem b/node_modules/tunnel/test/keys/proxy2-key.pem deleted file mode 100644 index 29eed2c..0000000 --- a/node_modules/tunnel/test/keys/proxy2-key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQC2d6DQpgdj+EPQ6FFRamdQcgEi5ut40zxLpr9pF/NRheUDC0Ze -fRwTOk3ta0Ue8BRy9IgUFGLhMzT5nnV6VHHbNLlpebXqDut2UihS9UC1NzzBaOeg -Hlns58Tocur8Fr9zPAt/dV+pWLIgaMNyvXd+6f/xiyEfo5ekOMWA+Nc2sQIDAQAB -AoGBALPH0o9Bxu5c4pSnEdgh+oFskmoNE90MY9A2D0pA6uBcCHSjW0YmBs97FuTi -WExPSBarkJgYLgStK3j3A9Dv+uzRRT0gSr34vKFh5ozI+nJZOMNJyHDOCFiT9sm7 -urDW0gSq9OW/H8NbAkxkBZw0PaB9oW5nljuieVIFDYXNAeMBAkEA6NfBHjzp3GS0 -RbtaBkxn3CRlEoUUPVd3sJ6lW2XBu5AWrgNHRSlh0oBupXgd3cxWIB69xPOg6QjU -XmvcLjBlCQJBAMidTIw4s89m4+14eY/KuXaEgxW/awLEbQP2JDCjY1wT3Ya3Ggac -HIFuGdTbd2faJPxNJjoljZnatSdwY5aXFmkCQBQZM5FBnsooYys1vdKXW8uz1Imh -tRqKZ0l2mD1obi2bhWml3MwKg2ghL+vWj3VqwvBo1uaeRQB4g6RW2R2fjckCQQCf -FnZ0oCafa2WGlMo5qDbI8K6PGXv/9srIoHH0jC0oAKzkvuEJqtTEIw6jCOM43PoF -hhyxccRH5PNRckPXULs5AkACxKEL1dN+Bx72zE8jSU4DB5arpQdGOvuVsqXgVM/5 -QLneJEHGPCqNFS1OkWUYLtX0S28X5GmHMEpLRLpgE9JY ------END RSA PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/proxy2.cnf b/node_modules/tunnel/test/keys/proxy2.cnf deleted file mode 100644 index e62c90a..0000000 --- a/node_modules/tunnel/test/keys/proxy2.cnf +++ /dev/null @@ -1,16 +0,0 @@ -[ req ] -default_bits = 1024 -days = 9999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = JP -OU = nodejs_jp -CN = proxy2 -emailAddress = koichik@improvement.jp - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/server1-cert.pem b/node_modules/tunnel/test/keys/server1-cert.pem deleted file mode 100644 index d0b6430..0000000 --- a/node_modules/tunnel/test/keys/server1-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICKTCCAZICCQCxEcnO8CV2kTANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK -UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTExJTAjBgkqhkiG9w0B -CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw -NTEwMTEyMzIxWjBcMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRIw -EAYDVQQDEwlsb2NhbGhvc3QxJTAjBgkqhkiG9w0BCQEWFmtvaWNoaWtAaW1wcm92 -ZW1lbnQuanAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALYb3z6TVgD8VmV2 -i0IHoes/HNVz+/UgXxRoA7gTUXp4Q69HBymWwm4fG61YMn7XAjy0gyC2CX/C0S74 -ZzHkhq1DCXCtlXCDx5oZhSRPpa902MVdDSRR+naLA4PPFkV2pI53hsFW37M5Dhge -+taFbih/dbjpOnhLD+SbkSKNTw/dAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAjDNi -mdmMM8Of/8iCYISqkqCG+7fz747Ntkg5fVMPufkwrBfkD9UjYVbfIpEOkZ3L0If9 -0/wNi0uZobIJnd/9B/e0cHKYnx0gkhUpMylaRvIV4odKe2vq3+mjwMb9syYXYDx3 -hw2qDMIIPr0S5ICeoIKXhbsYtODVxKSdJq+FjAI= ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/server1-csr.pem b/node_modules/tunnel/test/keys/server1-csr.pem deleted file mode 100644 index 9d9ff1b..0000000 --- a/node_modules/tunnel/test/keys/server1-csr.pem +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBwTCCASoCAQAwXDELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDES -MBAGA1UEAxMJbG9jYWxob3N0MSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJv -dmVtZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2G98+k1YA/FZl -dotCB6HrPxzVc/v1IF8UaAO4E1F6eEOvRwcplsJuHxutWDJ+1wI8tIMgtgl/wtEu -+Gcx5IatQwlwrZVwg8eaGYUkT6WvdNjFXQ0kUfp2iwODzxZFdqSOd4bBVt+zOQ4Y -HvrWhW4of3W46Tp4Sw/km5EijU8P3QIDAQABoCUwIwYJKoZIhvcNAQkHMRYTFEEg -Y2hhbGxlbmdlIHBhc3N3b3JkMA0GCSqGSIb3DQEBBQUAA4GBAJLLYClTc1BZbQi4 -2GrGEimzJoheXXD1vepECS6TaeYJFSQldMGdkn5D8TMXWW115V4hw7a1pCwvRBPH -dVEeh3u3ktI1e4pS5ozvpbpYanILrHCNOQ4PvKi9rzG9Km8CprPcrJCZlWf2QUBK -gVNgqZJeqyEcBu80/ajjc6xrZsSP ------END CERTIFICATE REQUEST----- diff --git a/node_modules/tunnel/test/keys/server1-key.pem b/node_modules/tunnel/test/keys/server1-key.pem deleted file mode 100644 index d24acc8..0000000 --- a/node_modules/tunnel/test/keys/server1-key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQC2G98+k1YA/FZldotCB6HrPxzVc/v1IF8UaAO4E1F6eEOvRwcp -lsJuHxutWDJ+1wI8tIMgtgl/wtEu+Gcx5IatQwlwrZVwg8eaGYUkT6WvdNjFXQ0k -Ufp2iwODzxZFdqSOd4bBVt+zOQ4YHvrWhW4of3W46Tp4Sw/km5EijU8P3QIDAQAB -AoGAcDioz+T3gM//ZbMxidUuQMu5twgsYhg6v1aBxDOTaEcoXqEElupikn31DlNl -eqiApmwOyl+jZunlAm7tGN/c5WjmZtW6watv1D7HjDIFJQBdiOv2jLeV5gsoArMP -f8Y13MS68nJ7/ZkqisovjBlD7ZInbyUiJj0FH/cazauflIECQQDwHgQ0J46eL5EG -3smQQG9/8b/Wsnf8s9Vz6X/KptsbL3c7mCBY9/+cGw0xVxoUOyO7KGPzpRhtz4Y0 -oP+JwISxAkEAwieUtl+SuUAn6er1tZzPPiAM2w6XGOAod+HuPjTAKVhLKHYIEJbU -jhPdjOGtZr10ED9g0m7M4n3JKMMM00W47QJBAOVkp7tztwpkgva/TG0lQeBHgnCI -G50t6NRN1Koz8crs88nZMb4NXwMxzM7AWcfOH/qjQan4pXfy9FG/JaHibGECQH8i -L+zj1E3dxsUTh+VuUv5ZOlHO0f4F+jnWBY1SOWpZWI2cDFfgjDqko3R26nbWI8Pn -3FyvFRZSS4CXiDRn+VkCQQCKPBl60QAifkZITqL0dCs+wB2hhmlWwqlpq1ZgeCby -zwmZY1auUK1BYBX1aPB85+Bm2Zhp5jnkwRcO7iSYy8+C ------END RSA PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/server1.cnf b/node_modules/tunnel/test/keys/server1.cnf deleted file mode 100644 index e3db741..0000000 --- a/node_modules/tunnel/test/keys/server1.cnf +++ /dev/null @@ -1,16 +0,0 @@ -[ req ] -default_bits = 1024 -days = 9999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = JP -OU = nodejs_jp -CN = localhost -emailAddress = koichik@improvement.jp - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/server2-cert.pem b/node_modules/tunnel/test/keys/server2-cert.pem deleted file mode 100644 index ba92620..0000000 --- a/node_modules/tunnel/test/keys/server2-cert.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICJzCCAZACCQCxEcnO8CV2kjANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJK -UDESMBAGA1UECxQJbm9kZWpzX2pwMQwwCgYDVQQDEwNjYTExJTAjBgkqhkiG9w0B -CQEWFmtvaWNoaWtAaW1wcm92ZW1lbnQuanAwHhcNMTMxMjI0MTEyMzIxWhcNNDEw -NTEwMTEyMzIxWjBaMQswCQYDVQQGEwJKUDESMBAGA1UECxQJbm9kZWpzX2pwMRAw -DgYDVQQDEwdzZXJ2ZXIyMSUwIwYJKoZIhvcNAQkBFhZrb2ljaGlrQGltcHJvdmVt -ZW50LmpwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEkKr9SHG6jtf5UNfL -u66wNi8jrbAW5keYy7ECWRGRFDE7ay4N8LDMmOO3/1eH2WpY0QM5JFxq78hoVQED -ogvoeVTw+Ni33yqY6VL2WRv84FN2BmCrDGJQ83EYdsJqPUnxuXvbmq7Viw3l/BEu -hvsp722KcToIrqt8mHKMc/nPRwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBALbdQz32 -CN0hJfJ6BtGyqee3zRSpufPY1KFV8OHSDG4qL55OfpjB5e5wsldp3VChTWzm2KM+ -xg9WSWurMINM5KLgUqCZ69ttg1gJ/SnZNolXhH0I3SG/DY4DGTHo9oJPoSrgrWbX -3ZmCoO6rrDoSuVRJ8dKMWJmt8O1pZ6ZRW2iM ------END CERTIFICATE----- diff --git a/node_modules/tunnel/test/keys/server2-csr.pem b/node_modules/tunnel/test/keys/server2-csr.pem deleted file mode 100644 index f89c510..0000000 --- a/node_modules/tunnel/test/keys/server2-csr.pem +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBvzCCASgCAQAwWjELMAkGA1UEBhMCSlAxEjAQBgNVBAsUCW5vZGVqc19qcDEQ -MA4GA1UEAxMHc2VydmVyMjElMCMGCSqGSIb3DQEJARYWa29pY2hpa0BpbXByb3Zl -bWVudC5qcDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxJCq/Uhxuo7X+VDX -y7uusDYvI62wFuZHmMuxAlkRkRQxO2suDfCwzJjjt/9Xh9lqWNEDOSRcau/IaFUB -A6IL6HlU8PjYt98qmOlS9lkb/OBTdgZgqwxiUPNxGHbCaj1J8bl725qu1YsN5fwR -Lob7Ke9tinE6CK6rfJhyjHP5z0cCAwEAAaAlMCMGCSqGSIb3DQEJBzEWExRBIGNo -YWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAAOBgQB3rCGCErgshGKEI5j9 -togUBwD3ul91yRFSBoV2hVGXsTOalWa0XCI+9+5QQEOBlj1pUT8eDU8ve55mX1UX -AZEx+cbUQa9DNeiDAMX83GqHMD8fF2zqsY1mkg5zFKG3nhoIYSG15qXcpqAhxRpX -NUQnZ4yzt2pE0aiFfkXa3PM42Q== ------END CERTIFICATE REQUEST----- diff --git a/node_modules/tunnel/test/keys/server2-key.pem b/node_modules/tunnel/test/keys/server2-key.pem deleted file mode 100644 index 9f72b5c..0000000 --- a/node_modules/tunnel/test/keys/server2-key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQDEkKr9SHG6jtf5UNfLu66wNi8jrbAW5keYy7ECWRGRFDE7ay4N -8LDMmOO3/1eH2WpY0QM5JFxq78hoVQEDogvoeVTw+Ni33yqY6VL2WRv84FN2BmCr -DGJQ83EYdsJqPUnxuXvbmq7Viw3l/BEuhvsp722KcToIrqt8mHKMc/nPRwIDAQAB -AoGAQ/bRaGoYCK1DN80gEC2ApSTW/7saW5CbyNUFCw7I6CTXMPhKID/MobFraz86 -gJpIDxWVy7gqzD7ESG67vwnUm52ITojQiY3JH7NCNhq/39/aYZOz2d7rBv2mvhk3 -w7gxUsmtPVUz3s2/h1KYaGpM3b68TwMS9nIiwwHDJS1aR8ECQQDu/kOy+Z/0EVKC -APgiEzbxewAiy7BVzNppd8CR/5m1KxlsIoMr8OdLqVwiJ/13m3eZGkPNx5pLJ9Xv -sXER0ZcPAkEA0o19xA1AJ/v5qsRaWJaA+ftgQ8ZanqsWXhM9abAvkPdFLPKYWTfO -r9f8eUDH0+O9mA2eZ2mlsEcsmIHDTY6ESQJAO2lyIvfzT5VO0Yq0JKRqMDXHnt7M -A0hds4JVmPXVnDgOpdcejLniheigQs12MVmwrZrd6DYKoUxR3rhZx3g2+QJBAK/2 -5fuaI1sHP+HSlbrhlUrWJd6egA+I5nma1MFmKGqb7Kki2eX+OPNGq87eL+LKuyG/ -h/nfFkTbRs7x67n+eFkCQQCPgy381Vpa7lmoNUfEVeMSNe74FNL05IlPDs/BHcci -1GX9XzsFEqHLtJ5t1aWbGv39gb2WmPP3LJBsRPzLa2iQ ------END RSA PRIVATE KEY----- diff --git a/node_modules/tunnel/test/keys/server2.cnf b/node_modules/tunnel/test/keys/server2.cnf deleted file mode 100644 index bfaa48b..0000000 --- a/node_modules/tunnel/test/keys/server2.cnf +++ /dev/null @@ -1,16 +0,0 @@ -[ req ] -default_bits = 1024 -days = 9999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = JP -OU = nodejs_jp -CN = server2 -emailAddress = koichik@improvement.jp - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/tunnel/test/keys/test.js b/node_modules/tunnel/test/keys/test.js deleted file mode 100644 index d828422..0000000 --- a/node_modules/tunnel/test/keys/test.js +++ /dev/null @@ -1,43 +0,0 @@ -var fs = require('fs'); -var tls = require('tls'); - -var server1Key = fs.readFileSync(__dirname + '/server1-key.pem'); -var server1Cert = fs.readFileSync(__dirname + '/server1-cert.pem'); -var clientKey = fs.readFileSync(__dirname + '/client-key.pem'); -var clientCert = fs.readFileSync(__dirname + '/client-cert.pem'); -var ca1Cert = fs.readFileSync(__dirname + '/ca1-cert.pem'); -var ca3Cert = fs.readFileSync(__dirname + '/ca3-cert.pem'); - -var server = tls.createServer({ - key: server1Key, - cert: server1Cert, - ca: [ca3Cert], - requestCert: true, - rejectUnauthorized: true, -}, function(s) { - console.log('connected on server'); - s.on('data', function(chunk) { - console.log('S:' + chunk); - s.write(chunk); - }); - s.setEncoding('utf8'); -}).listen(3000, function() { - var c = tls.connect({ - host: 'localhost', - port: 3000, - key: clientKey, - cert: clientCert, - ca: [ca1Cert], - rejectUnauthorized: true - }, function() { - console.log('connected on client'); - c.on('data', function(chunk) { - console.log('C:' + chunk); - }); - c.setEncoding('utf8'); - c.write('Hello'); - }); - c.on('error', function(err) { - console.log(err); - }); -}); diff --git a/node_modules/typed-rest-client/Handlers.d.ts b/node_modules/typed-rest-client/Handlers.d.ts deleted file mode 100644 index 780935d..0000000 --- a/node_modules/typed-rest-client/Handlers.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { BasicCredentialHandler } from "./handlers/basiccreds"; -export { BearerCredentialHandler } from "./handlers/bearertoken"; -export { NtlmCredentialHandler } from "./handlers/ntlm"; -export { PersonalAccessTokenCredentialHandler } from "./handlers/personalaccesstoken"; diff --git a/node_modules/typed-rest-client/Handlers.js b/node_modules/typed-rest-client/Handlers.js deleted file mode 100644 index 0b9e040..0000000 --- a/node_modules/typed-rest-client/Handlers.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var basiccreds_1 = require("./handlers/basiccreds"); -exports.BasicCredentialHandler = basiccreds_1.BasicCredentialHandler; -var bearertoken_1 = require("./handlers/bearertoken"); -exports.BearerCredentialHandler = bearertoken_1.BearerCredentialHandler; -var ntlm_1 = require("./handlers/ntlm"); -exports.NtlmCredentialHandler = ntlm_1.NtlmCredentialHandler; -var personalaccesstoken_1 = require("./handlers/personalaccesstoken"); -exports.PersonalAccessTokenCredentialHandler = personalaccesstoken_1.PersonalAccessTokenCredentialHandler; diff --git a/node_modules/typed-rest-client/HttpClient.d.ts b/node_modules/typed-rest-client/HttpClient.d.ts deleted file mode 100644 index f5cd014..0000000 --- a/node_modules/typed-rest-client/HttpClient.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -/// -import url = require("url"); -import http = require("http"); -import ifm = require('./Interfaces'); -export declare enum HttpCodes { - OK = 200, - MultipleChoices = 300, - MovedPermanently = 301, - ResourceMoved = 302, - SeeOther = 303, - NotModified = 304, - UseProxy = 305, - SwitchProxy = 306, - TemporaryRedirect = 307, - PermanentRedirect = 308, - BadRequest = 400, - Unauthorized = 401, - PaymentRequired = 402, - Forbidden = 403, - NotFound = 404, - MethodNotAllowed = 405, - NotAcceptable = 406, - ProxyAuthenticationRequired = 407, - RequestTimeout = 408, - Conflict = 409, - Gone = 410, - InternalServerError = 500, - NotImplemented = 501, - BadGateway = 502, - ServiceUnavailable = 503, - GatewayTimeout = 504, -} -export declare class HttpClientResponse implements ifm.IHttpClientResponse { - constructor(message: http.IncomingMessage); - message: http.IncomingMessage; - readBody(): Promise; -} -export interface RequestInfo { - options: http.RequestOptions; - parsedUrl: url.Url; - httpModule: any; -} -export declare function isHttps(requestUrl: string): boolean; -export declare class HttpClient implements ifm.IHttpClient { - userAgent: string; - handlers: ifm.IRequestHandler[]; - requestOptions: ifm.IRequestOptions; - private _ignoreSslError; - private _socketTimeout; - private _httpProxy; - private _httpProxyBypassHosts; - private _allowRedirects; - private _maxRedirects; - private _allowRetries; - private _maxRetries; - private _agent; - private _proxyAgent; - private _keepAlive; - private _disposed; - private _certConfig; - private _ca; - private _cert; - private _key; - constructor(userAgent: string, handlers?: ifm.IRequestHandler[], requestOptions?: ifm.IRequestOptions); - options(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; - get(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; - del(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; - post(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; - patch(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; - put(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise; - head(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise; - sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: ifm.IHeaders): Promise; - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: ifm.IHeaders): Promise; - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose(): void; - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info: ifm.IRequestInfo, data: string | NodeJS.ReadableStream): Promise; - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info: ifm.IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: ifm.IHttpClientResponse) => void): void; - private _prepareRequest(method, requestUrl, headers); - private _isPresigned(requestUrl); - private _mergeHeaders(headers); - private _getAgent(requestUrl); - private _getProxy(requestUrl); - private _isBypassProxy(requestUrl); - private _performExponentialBackoff(retryNumber); -} diff --git a/node_modules/typed-rest-client/HttpClient.js b/node_modules/typed-rest-client/HttpClient.js deleted file mode 100644 index 169b8f7..0000000 --- a/node_modules/typed-rest-client/HttpClient.js +++ /dev/null @@ -1,455 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const url = require("url"); -const http = require("http"); -const https = require("https"); -let fs; -let tunnel; -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); -const HttpRedirectCodes = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect]; -const HttpResponseRetryCodes = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout]; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - let output = ''; - this.message.on('data', (chunk) => { - output += chunk; - }); - this.message.on('end', () => { - resolve(output); - }); - })); - } -} -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - let parsedUrl = url.parse(requestUrl); - return parsedUrl.protocol === 'https:'; -} -exports.isHttps = isHttps; -var EnvironmentVariables; -(function (EnvironmentVariables) { - EnvironmentVariables["HTTP_PROXY"] = "HTTP_PROXY"; - EnvironmentVariables["HTTPS_PROXY"] = "HTTPS_PROXY"; -})(EnvironmentVariables || (EnvironmentVariables = {})); -class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - this._httpProxy = requestOptions.proxy; - if (requestOptions.proxy && requestOptions.proxy.proxyBypassHosts) { - this._httpProxyBypassHosts = []; - requestOptions.proxy.proxyBypassHosts.forEach(bypass => { - this._httpProxyBypassHosts.push(new RegExp(bypass, 'i')); - }); - } - this._certConfig = requestOptions.cert; - if (this._certConfig) { - // If using cert, need fs - fs = require('fs'); - // cache the cert content into memory, so we don't have to read it from disk every time - if (this._certConfig.caFile && fs.existsSync(this._certConfig.caFile)) { - this._ca = fs.readFileSync(this._certConfig.caFile, 'utf8'); - } - if (this._certConfig.certFile && fs.existsSync(this._certConfig.certFile)) { - this._cert = fs.readFileSync(this._certConfig.certFile, 'utf8'); - } - if (this._certConfig.keyFile && fs.existsSync(this._certConfig.keyFile)) { - this._key = fs.readFileSync(this._certConfig.keyFile, 'utf8'); - } - } - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - } - get(requestUrl, additionalHeaders) { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - } - del(requestUrl, additionalHeaders) { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - } - post(requestUrl, data, additionalHeaders) { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - } - patch(requestUrl, data, additionalHeaders) { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - } - put(requestUrl, data, additionalHeaders) { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - } - head(requestUrl, additionalHeaders) { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return this.request(verb, requestUrl, stream, additionalHeaders); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - let info = this._prepareRequest(verb, requestUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - let maxTries = (this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - while (numTries < maxTries) { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (let i = 0; i < this.handlers.length; i++) { - if (this.handlers[i].canHandleAuthentication(response)) { - authenticationHandler = this.handlers[i]; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 - && this._allowRedirects - && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, redirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return new Promise((resolve, reject) => { - let callbackForResult = function (err, res) { - if (err) { - reject(err); - } - resolve(res); - }; - this.requestRawWithCallback(info, data, callbackForResult); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - let socket; - let isDataString = typeof (data) === 'string'; - if (typeof (data) === 'string') { - info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - let handleResult = (err, res) => { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - }; - let req = info.httpModule.request(info.options, (msg) => { - let res = new HttpClientResponse(msg); - handleResult(null, res); - }); - req.on('socket', (sock) => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error('Request timeout: ' + info.options.path), null); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err, null); - }); - if (data && typeof (data) === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof (data) !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = url.parse(requestUrl); - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; - info.options.path = (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - info.options.headers["user-agent"] = this.userAgent; - info.options.agent = this._getAgent(requestUrl); - // gives handlers an opportunity to participate - if (this.handlers && !this._isPresigned(requestUrl)) { - this.handlers.forEach((handler) => { - handler.prepareRequest(info.options); - }); - } - return info; - } - _isPresigned(requestUrl) { - if (this.requestOptions && this.requestOptions.presignedUrlPatterns) { - const patterns = this.requestOptions.presignedUrlPatterns; - for (let i = 0; i < patterns.length; i++) { - if (requestUrl.match(patterns[i])) { - return true; - } - } - } - return false; - } - _mergeHeaders(headers) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); - } - return lowercaseKeys(headers || {}); - } - _getAgent(requestUrl) { - let agent; - let proxy = this._getProxy(requestUrl); - let useProxy = proxy.proxyUrl && proxy.proxyUrl.hostname && !this._isBypassProxy(requestUrl); - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (!!agent) { - return agent; - } - let parsedUrl = url.parse(requestUrl); - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (!!this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (useProxy) { - // If using proxy, need tunnel - if (!tunnel) { - tunnel = require('tunnel'); - } - const agentOptions = { - maxSockets: maxSockets, - keepAlive: this._keepAlive, - proxy: { - proxyAuth: proxy.proxyAuth, - host: proxy.proxyUrl.hostname, - port: proxy.proxyUrl.port - }, - }; - let tunnelAgent; - const overHttps = proxy.proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); - } - if (usingSsl && this._certConfig) { - agent.options = Object.assign(agent.options || {}, { ca: this._ca, cert: this._cert, key: this._key, passphrase: this._certConfig.passphrase }); - } - return agent; - } - _getProxy(requestUrl) { - const parsedUrl = url.parse(requestUrl); - let usingSsl = parsedUrl.protocol === 'https:'; - let proxyConfig = this._httpProxy; - // fallback to http_proxy and https_proxy env - let https_proxy = process.env[EnvironmentVariables.HTTPS_PROXY]; - let http_proxy = process.env[EnvironmentVariables.HTTP_PROXY]; - if (!proxyConfig) { - if (https_proxy && usingSsl) { - proxyConfig = { - proxyUrl: https_proxy - }; - } - else if (http_proxy) { - proxyConfig = { - proxyUrl: http_proxy - }; - } - } - let proxyUrl; - let proxyAuth; - if (proxyConfig) { - if (proxyConfig.proxyUrl.length > 0) { - proxyUrl = url.parse(proxyConfig.proxyUrl); - } - if (proxyConfig.proxyUsername || proxyConfig.proxyPassword) { - proxyAuth = proxyConfig.proxyUsername + ":" + proxyConfig.proxyPassword; - } - } - return { proxyUrl: proxyUrl, proxyAuth: proxyAuth }; - } - _isBypassProxy(requestUrl) { - if (!this._httpProxyBypassHosts) { - return false; - } - let bypass = false; - this._httpProxyBypassHosts.forEach(bypassHost => { - if (bypassHost.test(requestUrl)) { - bypass = true; - } - }); - return bypass; - } - _performExponentialBackoff(retryNumber) { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - } -} -exports.HttpClient = HttpClient; diff --git a/node_modules/typed-rest-client/Index.d.ts b/node_modules/typed-rest-client/Index.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/typed-rest-client/Index.js b/node_modules/typed-rest-client/Index.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/typed-rest-client/Index.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/typed-rest-client/Interfaces.d.ts b/node_modules/typed-rest-client/Interfaces.d.ts deleted file mode 100644 index 5900e26..0000000 --- a/node_modules/typed-rest-client/Interfaces.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/// -import http = require("http"); -import url = require("url"); -export interface IHeaders { - [key: string]: any; -} -export interface IBasicCredentials { - username: string; - password: string; -} -export interface IHttpClient { - options(requestUrl: string, additionalHeaders?: IHeaders): Promise; - get(requestUrl: string, additionalHeaders?: IHeaders): Promise; - del(requestUrl: string, additionalHeaders?: IHeaders): Promise; - post(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; - patch(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; - put(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; - sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: IHeaders): Promise; - request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: IHeaders): Promise; - requestRaw(info: IRequestInfo, data: string | NodeJS.ReadableStream): Promise; - requestRawWithCallback(info: IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: IHttpClientResponse) => void): void; -} -export interface IRequestHandler { - prepareRequest(options: http.RequestOptions): void; - canHandleAuthentication(response: IHttpClientResponse): boolean; - handleAuthentication(httpClient: IHttpClient, requestInfo: IRequestInfo, objs: any): Promise; -} -export interface IHttpClientResponse { - message: http.IncomingMessage; - readBody(): Promise; -} -export interface IRequestInfo { - options: http.RequestOptions; - parsedUrl: url.Url; - httpModule: any; -} -export interface IRequestOptions { - headers?: IHeaders; - socketTimeout?: number; - ignoreSslError?: boolean; - proxy?: IProxyConfiguration; - cert?: ICertConfiguration; - allowRedirects?: boolean; - maxRedirects?: number; - maxSockets?: number; - keepAlive?: boolean; - presignedUrlPatterns?: RegExp[]; - allowRetries?: boolean; - maxRetries?: number; -} -export interface IProxyConfiguration { - proxyUrl: string; - proxyUsername?: string; - proxyPassword?: string; - proxyBypassHosts?: string[]; -} -export interface ICertConfiguration { - caFile?: string; - certFile?: string; - keyFile?: string; - passphrase?: string; -} diff --git a/node_modules/typed-rest-client/Interfaces.js b/node_modules/typed-rest-client/Interfaces.js deleted file mode 100644 index 2bc6be2..0000000 --- a/node_modules/typed-rest-client/Interfaces.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -Object.defineProperty(exports, "__esModule", { value: true }); -; diff --git a/node_modules/typed-rest-client/LICENSE b/node_modules/typed-rest-client/LICENSE deleted file mode 100644 index 8cddf7e..0000000 --- a/node_modules/typed-rest-client/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Typed Rest Client for Node.js - -Copyright (c) Microsoft Corporation - -All rights reserved. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and -associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/typed-rest-client/README.md b/node_modules/typed-rest-client/README.md deleted file mode 100644 index 0c2b768..0000000 --- a/node_modules/typed-rest-client/README.md +++ /dev/null @@ -1,100 +0,0 @@ -[![Build Status](https://dev.azure.com/ms/typed-rest-client/_apis/build/status/Microsoft.typed-rest-client?branchName=master)](https://dev.azure.com/ms/typed-rest-client/_build/latest?definitionId=42&branchName=master) - -# Typed REST and HTTP Client with TypeScript Typings - -A lightweight REST and HTTP client optimized for use with TypeScript with generics and async await. - -## Features - - - REST and HTTP client with TypeScript generics and async/await/Promises - - Typings included so no need to acquire separately (great for intellisense and no versioning drift) - - Basic, Bearer and NTLM Support out of the box. Extensible handlers for others. - - Proxy support - - Certificate support (Self-signed server and client cert) - - Redirects supported - -Intellisense and compile support: - -![intellisense](./docs/intellisense.png) - -## Install - -``` -npm install typed-rest-client --save -``` - -Or to install the latest preview: -``` -npm install typed-rest-client@preview --save -``` - -## Samples - -See the [samples](./samples) for complete coding examples. Also see the [REST](./test/tests/resttests.ts) and [HTTP](./test/tests/httptests.ts) tests for detailed examples. - -## Errors - -### HTTP - -The HTTP client does not throw unless truly exceptional. - -* A request that successfully executes resulting in a 404, 500 etc... will return a response object with a status code and a body. -* Redirects (3xx) will be followed by default. - - -See [HTTP tests](./test/tests/httptests.ts) for detailed examples. - -### REST - -The REST client is a high-level client which uses the HTTP client. Its responsibility is to turn a body into a typed resource object. - -* A 200 will be success. -* Redirects (3xx) will be followed. -* A 404 will not throw but the result object will be null and the result statusCode will be set. -* Other 4xx and 5xx errors will throw. The status code will be attached to the error object. If a RESTful error object is returned (`{ message: xxx}`), then the error message will be that. Otherwise, it will be a generic, `Failed Request: (xxx)`. - -See [REST tests](./test/tests/resttests.ts) for detailed examples. - -## Debugging - -To enable detailed console logging of all HTTP requests and responses, set the NODE_DEBUG environment varible: - -``` -export NODE_DEBUG=http -``` - -or - -``` -set NODE_DEBUG=http -``` - - - -## Node support - -The typed-rest-client is built using the latest LTS version of Node 8. We also support the latest LTS for Node 4 and Node 6. - -## Contributing - -To contribute to this repository, see the [contribution guide](./CONTRIBUTING.md) - -To build: - -```bash -$ npm run build -``` - -To run all tests: -```bash -$ npm test -``` - -To just run unit tests: -```bash -$ npm run units -``` - -## Code of Conduct - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/node_modules/typed-rest-client/RestClient.d.ts b/node_modules/typed-rest-client/RestClient.d.ts deleted file mode 100644 index 74b33cb..0000000 --- a/node_modules/typed-rest-client/RestClient.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/// -import httpm = require('./HttpClient'); -import ifm = require("./Interfaces"); -export interface IRestResponse { - statusCode: number; - result: T | null; - headers: Object; -} -export interface IRequestOptions { - acceptHeader?: string; - additionalHeaders?: ifm.IHeaders; - responseProcessor?: Function; - deserializeDates?: boolean; -} -export declare class RestClient { - client: httpm.HttpClient; - versionParam: string; - /** - * Creates an instance of the RestClient - * @constructor - * @param {string} userAgent - userAgent for requests - * @param {string} baseUrl - (Optional) If not specified, use full urls per request. If supplied and a function passes a relative url, it will be appended to this - * @param {ifm.IRequestHandler[]} handlers - handlers are typically auth handlers (basic, bearer, ntlm supplied) - * @param {ifm.IRequestOptions} requestOptions - options for each http requests (http proxy setting, socket timeout) - */ - constructor(userAgent: string, baseUrl?: string, handlers?: ifm.IRequestHandler[], requestOptions?: ifm.IRequestOptions); - private _baseUrl; - /** - * Gets a resource from an endpoint - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} requestUrl - fully qualified or relative url - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - options(requestUrl: string, options?: IRequestOptions): Promise>; - /** - * Gets a resource from an endpoint - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} resource - fully qualified url or relative path - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - get(resource: string, options?: IRequestOptions): Promise>; - /** - * Deletes a resource from an endpoint - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} resource - fully qualified or relative url - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - del(resource: string, options?: IRequestOptions): Promise>; - /** - * Creates resource(s) from an endpoint - * T type of object returned. - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} resource - fully qualified or relative url - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - create(resource: string, resources: any, options?: IRequestOptions): Promise>; - /** - * Updates resource(s) from an endpoint - * T type of object returned. - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} resource - fully qualified or relative url - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - update(resource: string, resources: any, options?: IRequestOptions): Promise>; - /** - * Replaces resource(s) from an endpoint - * T type of object returned. - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} resource - fully qualified or relative url - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - replace(resource: string, resources: any, options?: IRequestOptions): Promise>; - uploadStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, options?: IRequestOptions): Promise>; - private _headersFromOptions(options, contentType?); - private static dateTimeDeserializer(key, value); - private _processResponse(res, options); -} diff --git a/node_modules/typed-rest-client/RestClient.js b/node_modules/typed-rest-client/RestClient.js deleted file mode 100644 index 1548b8f..0000000 --- a/node_modules/typed-rest-client/RestClient.js +++ /dev/null @@ -1,217 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const httpm = require("./HttpClient"); -const util = require("./Util"); -class RestClient { - /** - * Creates an instance of the RestClient - * @constructor - * @param {string} userAgent - userAgent for requests - * @param {string} baseUrl - (Optional) If not specified, use full urls per request. If supplied and a function passes a relative url, it will be appended to this - * @param {ifm.IRequestHandler[]} handlers - handlers are typically auth handlers (basic, bearer, ntlm supplied) - * @param {ifm.IRequestOptions} requestOptions - options for each http requests (http proxy setting, socket timeout) - */ - constructor(userAgent, baseUrl, handlers, requestOptions) { - this.client = new httpm.HttpClient(userAgent, handlers, requestOptions); - if (baseUrl) { - this._baseUrl = baseUrl; - } - } - /** - * Gets a resource from an endpoint - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} requestUrl - fully qualified or relative url - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - options(requestUrl, options) { - return __awaiter(this, void 0, void 0, function* () { - let url = util.getUrl(requestUrl, this._baseUrl); - let res = yield this.client.options(url, this._headersFromOptions(options)); - return this._processResponse(res, options); - }); - } - /** - * Gets a resource from an endpoint - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} resource - fully qualified url or relative path - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - get(resource, options) { - return __awaiter(this, void 0, void 0, function* () { - let url = util.getUrl(resource, this._baseUrl); - let res = yield this.client.get(url, this._headersFromOptions(options)); - return this._processResponse(res, options); - }); - } - /** - * Deletes a resource from an endpoint - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} resource - fully qualified or relative url - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - del(resource, options) { - return __awaiter(this, void 0, void 0, function* () { - let url = util.getUrl(resource, this._baseUrl); - let res = yield this.client.del(url, this._headersFromOptions(options)); - return this._processResponse(res, options); - }); - } - /** - * Creates resource(s) from an endpoint - * T type of object returned. - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} resource - fully qualified or relative url - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - create(resource, resources, options) { - return __awaiter(this, void 0, void 0, function* () { - let url = util.getUrl(resource, this._baseUrl); - let headers = this._headersFromOptions(options, true); - let data = JSON.stringify(resources, null, 2); - let res = yield this.client.post(url, data, headers); - return this._processResponse(res, options); - }); - } - /** - * Updates resource(s) from an endpoint - * T type of object returned. - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} resource - fully qualified or relative url - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - update(resource, resources, options) { - return __awaiter(this, void 0, void 0, function* () { - let url = util.getUrl(resource, this._baseUrl); - let headers = this._headersFromOptions(options, true); - let data = JSON.stringify(resources, null, 2); - let res = yield this.client.patch(url, data, headers); - return this._processResponse(res, options); - }); - } - /** - * Replaces resource(s) from an endpoint - * T type of object returned. - * Be aware that not found returns a null. Other error conditions reject the promise - * @param {string} resource - fully qualified or relative url - * @param {IRequestOptions} requestOptions - (optional) requestOptions object - */ - replace(resource, resources, options) { - return __awaiter(this, void 0, void 0, function* () { - let url = util.getUrl(resource, this._baseUrl); - let headers = this._headersFromOptions(options, true); - let data = JSON.stringify(resources, null, 2); - let res = yield this.client.put(url, data, headers); - return this._processResponse(res, options); - }); - } - uploadStream(verb, requestUrl, stream, options) { - return __awaiter(this, void 0, void 0, function* () { - let url = util.getUrl(requestUrl, this._baseUrl); - let headers = this._headersFromOptions(options, true); - let res = yield this.client.sendStream(verb, url, stream, headers); - return this._processResponse(res, options); - }); - } - _headersFromOptions(options, contentType) { - options = options || {}; - let headers = options.additionalHeaders || {}; - headers["Accept"] = options.acceptHeader || "application/json"; - if (contentType) { - let found = false; - for (let header in headers) { - if (header.toLowerCase() == "content-type") { - found = true; - } - } - if (!found) { - headers["Content-Type"] = 'application/json; charset=utf-8'; - } - } - return headers; - } - static dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - let a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode; - const response = { - statusCode: statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode == httpm.HttpCodes.NotFound) { - resolve(response); - } - let obj; - let contents; - // get the result from the body - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, RestClient.dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - if (options && options.responseProcessor) { - response.result = options.responseProcessor(obj); - } - else { - response.result = obj; - } - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = "Failed request: (" + statusCode + ")"; - } - let err = new Error(msg); - // attach statusCode and body obj (if available) to the error object - err['statusCode'] = statusCode; - if (response.result) { - err['result'] = response.result; - } - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -exports.RestClient = RestClient; diff --git a/node_modules/typed-rest-client/ThirdPartyNotice.txt b/node_modules/typed-rest-client/ThirdPartyNotice.txt deleted file mode 100644 index 7bd6774..0000000 --- a/node_modules/typed-rest-client/ThirdPartyNotice.txt +++ /dev/null @@ -1,1318 +0,0 @@ - -THIRD-PARTY SOFTWARE NOTICES AND INFORMATION -Do Not Translate or Localize - -This Visual Studio Team Services extension (vsts-task-lib) is based on or incorporates material from the projects listed below (Third Party IP). The original copyright notice and the license under which Microsoft received such Third Party IP, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft licenses the Third Party IP to you under the licensing terms for the Visual Studio Team Services extension. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise. - -1. @types/glob (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) -2. @types/minimatch (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) -3. @types/mocha (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) -4. @types/node (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) -5. @types/shelljs (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) -6. balanced-match (git://github.com/juliangruber/balanced-match.git) -7. brace-expansion (git://github.com/juliangruber/brace-expansion.git) -8. browser-stdout (git+ssh://git@github.com/kumavis/browser-stdout.git) -9. commander (git+https://github.com/tj/commander.js.git) -10. concat-map (git://github.com/substack/node-concat-map.git) -11. debug (git://github.com/visionmedia/debug.git) -12. diff (git://github.com/kpdecker/jsdiff.git) -13. escape-string-regexp (git+https://github.com/sindresorhus/escape-string-regexp.git) -14. fs.realpath (git+https://github.com/isaacs/fs.realpath.git) -15. glob (git://github.com/isaacs/node-glob.git) -16. graceful-readlink (git://github.com/zhiyelee/graceful-readlink.git) -17. growl (git://github.com/tj/node-growl.git) -18. has-flag (git+https://github.com/sindresorhus/has-flag.git) -19. he (git+https://github.com/mathiasbynens/he.git) -20. inflight (git+https://github.com/npm/inflight.git) -21. inherits (git://github.com/isaacs/inherits.git) -22. interpret (git://github.com/tkellen/node-interpret.git) -23. json3 (git://github.com/bestiejs/json3.git) -24. lodash.create (git+https://github.com/lodash/lodash.git) -25. lodash.isarguments (git+https://github.com/lodash/lodash.git) -26. lodash.isarray (git+https://github.com/lodash/lodash.git) -27. lodash.keys (git+https://github.com/lodash/lodash.git) -28. lodash._baseassign (git+https://github.com/lodash/lodash.git) -29. lodash._basecopy (git+https://github.com/lodash/lodash.git) -30. lodash._basecreate (git+https://github.com/lodash/lodash.git) -31. lodash._getnative (git+https://github.com/lodash/lodash.git) -32. lodash._isiterateecall (git+https://github.com/lodash/lodash.git) -33. minimatch (git://github.com/isaacs/minimatch.git) -34. minimist (git://github.com/substack/minimist.git) -35. mkdirp (git+https://github.com/substack/node-mkdirp.git) -36. mocha (git+https://github.com/mochajs/mocha.git) -37. ms (git+https://github.com/zeit/ms.git) -38. once (git://github.com/isaacs/once.git) -39. path-is-absolute (git+https://github.com/sindresorhus/path-is-absolute.git) -40. path-parse (git+https://github.com/jbgutierrez/path-parse.git) -41. rechoir (git://github.com/tkellen/node-rechoir.git) -42. resolve (git://github.com/substack/node-resolve.git) -43. semver (git://github.com/npm/node-semver.git) -44. shelljs (git://github.com/shelljs/shelljs.git) -45. supports-color (git+https://github.com/chalk/supports-color.git) -46. tunnel (git+https://github.com/koichik/node-tunnel.git) -47. typescript (git+https://github.com/Microsoft/TypeScript.git) -48. underscore (git://github.com/jashkenas/underscore.git) -49. wrappy (git+https://github.com/npm/wrappy.git) - - -%% @types/glob NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE -========================================= -END OF @types/glob NOTICES, INFORMATION, AND LICENSE - -%% @types/minimatch NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE -========================================= -END OF @types/minimatch NOTICES, INFORMATION, AND LICENSE - -%% @types/mocha NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE -========================================= -END OF @types/mocha NOTICES, INFORMATION, AND LICENSE - -%% @types/node NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE -========================================= -END OF @types/node NOTICES, INFORMATION, AND LICENSE - -%% @types/shelljs NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE -========================================= -END OF @types/shelljs NOTICES, INFORMATION, AND LICENSE - -%% balanced-match NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -========================================= -END OF balanced-match NOTICES, INFORMATION, AND LICENSE - -%% brace-expansion NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -No license text available. -========================================= -END OF brace-expansion NOTICES, INFORMATION, AND LICENSE - -%% browser-stdout NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -No license text available. -========================================= -END OF browser-stdout NOTICES, INFORMATION, AND LICENSE - -%% commander NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF commander NOTICES, INFORMATION, AND LICENSE - -%% concat-map NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF concat-map NOTICES, INFORMATION, AND LICENSE - -%% debug NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF debug NOTICES, INFORMATION, AND LICENSE - -%% diff NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Software License Agreement (BSD License) - -Copyright (c) 2009-2015, Kevin Decker - -All rights reserved. - -Redistribution and use of this software in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -* Neither the name of Kevin Decker nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -========================================= -END OF diff NOTICES, INFORMATION, AND LICENSE - -%% escape-string-regexp NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -========================================= -END OF escape-string-regexp NOTICES, INFORMATION, AND LICENSE - -%% fs.realpath NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ----- - -This library bundles a version of the `fs.realpath` and `fs.realpathSync` -methods from Node.js v0.10 under the terms of the Node.js MIT license. - -Node's license follows, also included at the header of `old.js` which contains -the licensed code: - - Copyright Joyent, Inc. and other Node contributors. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. -========================================= -END OF fs.realpath NOTICES, INFORMATION, AND LICENSE - -%% glob NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -========================================= -END OF glob NOTICES, INFORMATION, AND LICENSE - -%% graceful-readlink NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2015 Zhiye Li - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -========================================= -END OF graceful-readlink NOTICES, INFORMATION, AND LICENSE - -%% growl NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -No license text available. -========================================= -END OF growl NOTICES, INFORMATION, AND LICENSE - -%% has-flag NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -========================================= -END OF has-flag NOTICES, INFORMATION, AND LICENSE - -%% he NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF he NOTICES, INFORMATION, AND LICENSE - -%% inflight NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -========================================= -END OF inflight NOTICES, INFORMATION, AND LICENSE - -%% inherits NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -========================================= -END OF inherits NOTICES, INFORMATION, AND LICENSE - -%% interpret NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright (c) 2014 Tyler Kellen - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF interpret NOTICES, INFORMATION, AND LICENSE - -%% json3 NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright (c) 2012-2014 Kit Cambridge. -http://kitcambridge.be/ - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -========================================= -END OF json3 NOTICES, INFORMATION, AND LICENSE - -%% lodash.create NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF lodash.create NOTICES, INFORMATION, AND LICENSE - -%% lodash.isarguments NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. -========================================= -END OF lodash.isarguments NOTICES, INFORMATION, AND LICENSE - -%% lodash.isarray NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF lodash.isarray NOTICES, INFORMATION, AND LICENSE - -%% lodash.keys NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF lodash.keys NOTICES, INFORMATION, AND LICENSE - -%% lodash._baseassign NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF lodash._baseassign NOTICES, INFORMATION, AND LICENSE - -%% lodash._basecopy NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF lodash._basecopy NOTICES, INFORMATION, AND LICENSE - -%% lodash._basecreate NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF lodash._basecreate NOTICES, INFORMATION, AND LICENSE - -%% lodash._getnative NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF lodash._getnative NOTICES, INFORMATION, AND LICENSE - -%% lodash._isiterateecall NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright 2012-2015 The Dojo Foundation -Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF lodash._isiterateecall NOTICES, INFORMATION, AND LICENSE - -%% minimatch NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -========================================= -END OF minimatch NOTICES, INFORMATION, AND LICENSE - -%% minimist NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF minimist NOTICES, INFORMATION, AND LICENSE - -%% mkdirp NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -========================================= -END OF mkdirp NOTICES, INFORMATION, AND LICENSE - -%% mocha NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -(The MIT License) - -Copyright (c) 2011-2017 JS Foundation and contributors, https://js.foundation - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF mocha NOTICES, INFORMATION, AND LICENSE - -%% ms NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -========================================= -END OF ms NOTICES, INFORMATION, AND LICENSE - -%% once NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -========================================= -END OF once NOTICES, INFORMATION, AND LICENSE - -%% path-is-absolute NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -========================================= -END OF path-is-absolute NOTICES, INFORMATION, AND LICENSE - -%% path-parse NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -No license text available. -========================================= -END OF path-parse NOTICES, INFORMATION, AND LICENSE - -%% rechoir NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright (c) 2015 Tyler Kellen - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF rechoir NOTICES, INFORMATION, AND LICENSE - -%% resolve NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF resolve NOTICES, INFORMATION, AND LICENSE - -%% semver NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -========================================= -END OF semver NOTICES, INFORMATION, AND LICENSE - -%% shelljs NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright (c) 2012, Artur Adib -All rights reserved. - -You may use this project under the terms of the New BSD license as follows: - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Artur Adib nor the - names of the contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -========================================= -END OF shelljs NOTICES, INFORMATION, AND LICENSE - -%% supports-color NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -========================================= -END OF supports-color NOTICES, INFORMATION, AND LICENSE - -%% tunnel NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The MIT License (MIT) - -Copyright (c) 2012 Koichi Kobayashi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -========================================= -END OF tunnel NOTICES, INFORMATION, AND LICENSE - -%% typescript NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS -========================================= -END OF typescript NOTICES, INFORMATION, AND LICENSE - -%% underscore NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -Copyright (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative -Reporters & Editors - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. -========================================= -END OF underscore NOTICES, INFORMATION, AND LICENSE - -%% wrappy NOTICES, INFORMATION, AND LICENSE BEGIN HERE -========================================= -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -========================================= -END OF wrappy NOTICES, INFORMATION, AND LICENSE - diff --git a/node_modules/typed-rest-client/Util.d.ts b/node_modules/typed-rest-client/Util.d.ts deleted file mode 100644 index 32757e8..0000000 --- a/node_modules/typed-rest-client/Util.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * creates an url from a request url and optional base url (http://server:8080) - * @param {string} resource - a fully qualified url or relative path - * @param {string} baseUrl - an optional baseUrl (http://server:8080) - * @return {string} - resultant url - */ -export declare function getUrl(resource: string, baseUrl?: string): string; diff --git a/node_modules/typed-rest-client/Util.js b/node_modules/typed-rest-client/Util.js deleted file mode 100644 index 32981d1..0000000 --- a/node_modules/typed-rest-client/Util.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -Object.defineProperty(exports, "__esModule", { value: true }); -const url = require("url"); -const path = require("path"); -/** - * creates an url from a request url and optional base url (http://server:8080) - * @param {string} resource - a fully qualified url or relative path - * @param {string} baseUrl - an optional baseUrl (http://server:8080) - * @return {string} - resultant url - */ -function getUrl(resource, baseUrl) { - const pathApi = path.posix || path; - if (!baseUrl) { - return resource; - } - else if (!resource) { - return baseUrl; - } - else { - const base = url.parse(baseUrl); - const resultantUrl = url.parse(resource); - // resource (specific per request) elements take priority - resultantUrl.protocol = resultantUrl.protocol || base.protocol; - resultantUrl.auth = resultantUrl.auth || base.auth; - resultantUrl.host = resultantUrl.host || base.host; - resultantUrl.pathname = pathApi.resolve(base.pathname, resultantUrl.pathname); - if (!resultantUrl.pathname.endsWith('/') && resource.endsWith('/')) { - resultantUrl.pathname += '/'; - } - return url.format(resultantUrl); - } -} -exports.getUrl = getUrl; diff --git a/node_modules/typed-rest-client/handlers/basiccreds.d.ts b/node_modules/typed-rest-client/handlers/basiccreds.d.ts deleted file mode 100644 index 17ade55..0000000 --- a/node_modules/typed-rest-client/handlers/basiccreds.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import ifm = require('../Interfaces'); -export declare class BasicCredentialHandler implements ifm.IRequestHandler { - username: string; - password: string; - constructor(username: string, password: string); - prepareRequest(options: any): void; - canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; - handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; -} diff --git a/node_modules/typed-rest-client/handlers/basiccreds.js b/node_modules/typed-rest-client/handlers/basiccreds.js deleted file mode 100644 index 384a39c..0000000 --- a/node_modules/typed-rest-client/handlers/basiccreds.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -Object.defineProperty(exports, "__esModule", { value: true }); -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - options.headers['Authorization'] = 'Basic ' + new Buffer(this.username + ':' + this.password).toString('base64'); - options.headers['X-TFS-FedAuthRedirect'] = 'Suppress'; - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.BasicCredentialHandler = BasicCredentialHandler; diff --git a/node_modules/typed-rest-client/handlers/bearertoken.d.ts b/node_modules/typed-rest-client/handlers/bearertoken.d.ts deleted file mode 100644 index c08496f..0000000 --- a/node_modules/typed-rest-client/handlers/bearertoken.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import ifm = require('../Interfaces'); -export declare class BearerCredentialHandler implements ifm.IRequestHandler { - token: string; - constructor(token: string); - prepareRequest(options: any): void; - canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; - handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; -} diff --git a/node_modules/typed-rest-client/handlers/bearertoken.js b/node_modules/typed-rest-client/handlers/bearertoken.js deleted file mode 100644 index dad27a7..0000000 --- a/node_modules/typed-rest-client/handlers/bearertoken.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -Object.defineProperty(exports, "__esModule", { value: true }); -class BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - options.headers['Authorization'] = 'Bearer ' + this.token; - options.headers['X-TFS-FedAuthRedirect'] = 'Suppress'; - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.BearerCredentialHandler = BearerCredentialHandler; diff --git a/node_modules/typed-rest-client/handlers/ntlm.d.ts b/node_modules/typed-rest-client/handlers/ntlm.d.ts deleted file mode 100644 index 2f509b0..0000000 --- a/node_modules/typed-rest-client/handlers/ntlm.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// -import ifm = require('../Interfaces'); -import http = require("http"); -export declare class NtlmCredentialHandler implements ifm.IRequestHandler { - private _ntlmOptions; - constructor(username: string, password: string, workstation?: string, domain?: string); - prepareRequest(options: http.RequestOptions): void; - canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; - handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; - private handleAuthenticationPrivate(httpClient, requestInfo, objs, finalCallback); - private sendType1Message(httpClient, requestInfo, objs, finalCallback); - private sendType3Message(httpClient, requestInfo, objs, res, callback); -} diff --git a/node_modules/typed-rest-client/handlers/ntlm.js b/node_modules/typed-rest-client/handlers/ntlm.js deleted file mode 100644 index 5fbca82..0000000 --- a/node_modules/typed-rest-client/handlers/ntlm.js +++ /dev/null @@ -1,137 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -Object.defineProperty(exports, "__esModule", { value: true }); -const http = require("http"); -const https = require("https"); -const _ = require("underscore"); -const ntlm = require("../opensource/node-http-ntlm/ntlm"); -class NtlmCredentialHandler { - constructor(username, password, workstation, domain) { - this._ntlmOptions = {}; - this._ntlmOptions.username = username; - this._ntlmOptions.password = password; - if (domain !== undefined) { - this._ntlmOptions.domain = domain; - } - else { - this._ntlmOptions.domain = ''; - } - if (workstation !== undefined) { - this._ntlmOptions.workstation = workstation; - } - else { - this._ntlmOptions.workstation = ''; - } - } - prepareRequest(options) { - // No headers or options need to be set. We keep the credentials on the handler itself. - // If a (proxy) agent is set, remove it as we don't support proxy for NTLM at this time - if (options.agent) { - delete options.agent; - } - } - canHandleAuthentication(response) { - if (response && response.message && response.message.statusCode === 401) { - // Ensure that we're talking NTLM here - // Once we have the www-authenticate header, split it so we can ensure we can talk NTLM - const wwwAuthenticate = response.message.headers['www-authenticate']; - if (wwwAuthenticate) { - const mechanisms = wwwAuthenticate.split(', '); - const index = mechanisms.indexOf("NTLM"); - if (index >= 0) { - return true; - } - } - } - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return new Promise((resolve, reject) => { - const callbackForResult = function (err, res) { - if (err) { - reject(err); - } - // We have to readbody on the response before continuing otherwise there is a hang. - res.readBody().then(() => { - resolve(res); - }); - }; - this.handleAuthenticationPrivate(httpClient, requestInfo, objs, callbackForResult); - }); - } - handleAuthenticationPrivate(httpClient, requestInfo, objs, finalCallback) { - // Set up the headers for NTLM authentication - requestInfo.options = _.extend(requestInfo.options, { - username: this._ntlmOptions.username, - password: this._ntlmOptions.password, - domain: this._ntlmOptions.domain, - workstation: this._ntlmOptions.workstation - }); - if (httpClient.isSsl === true) { - requestInfo.options.agent = new https.Agent({ keepAlive: true }); - } - else { - requestInfo.options.agent = new http.Agent({ keepAlive: true }); - } - let self = this; - // The following pattern of sending the type1 message following immediately (in a setImmediate) is - // critical for the NTLM exchange to happen. If we removed setImmediate (or call in a different manner) - // the NTLM exchange will always fail with a 401. - this.sendType1Message(httpClient, requestInfo, objs, function (err, res) { - if (err) { - return finalCallback(err, null, null); - } - /// We have to readbody on the response before continuing otherwise there is a hang. - res.readBody().then(() => { - // It is critical that we have setImmediate here due to how connection requests are queued. - // If setImmediate is removed then the NTLM handshake will not work. - // setImmediate allows us to queue a second request on the same connection. If this second - // request is not queued on the connection when the first request finishes then node closes - // the connection. NTLM requires both requests to be on the same connection so we need this. - setImmediate(function () { - self.sendType3Message(httpClient, requestInfo, objs, res, finalCallback); - }); - }); - }); - } - // The following method is an adaptation of code found at https://github.com/SamDecrock/node-http-ntlm/blob/master/httpntlm.js - sendType1Message(httpClient, requestInfo, objs, finalCallback) { - const type1msg = ntlm.createType1Message(this._ntlmOptions); - const type1options = { - headers: { - 'Connection': 'keep-alive', - 'Authorization': type1msg - }, - timeout: requestInfo.options.timeout || 0, - agent: requestInfo.httpModule, - }; - const type1info = {}; - type1info.httpModule = requestInfo.httpModule; - type1info.parsedUrl = requestInfo.parsedUrl; - type1info.options = _.extend(type1options, _.omit(requestInfo.options, 'headers')); - return httpClient.requestRawWithCallback(type1info, objs, finalCallback); - } - // The following method is an adaptation of code found at https://github.com/SamDecrock/node-http-ntlm/blob/master/httpntlm.js - sendType3Message(httpClient, requestInfo, objs, res, callback) { - if (!res.message.headers && !res.message.headers['www-authenticate']) { - throw new Error('www-authenticate not found on response of second request'); - } - const type2msg = ntlm.parseType2Message(res.message.headers['www-authenticate']); - const type3msg = ntlm.createType3Message(type2msg, this._ntlmOptions); - const type3options = { - headers: { - 'Authorization': type3msg, - 'Connection': 'Close' - }, - agent: requestInfo.httpModule, - }; - const type3info = {}; - type3info.httpModule = requestInfo.httpModule; - type3info.parsedUrl = requestInfo.parsedUrl; - type3options.headers = _.extend(type3options.headers, requestInfo.options.headers); - type3info.options = _.extend(type3options, _.omit(requestInfo.options, 'headers')); - return httpClient.requestRawWithCallback(type3info, objs, callback); - } -} -exports.NtlmCredentialHandler = NtlmCredentialHandler; diff --git a/node_modules/typed-rest-client/handlers/personalaccesstoken.d.ts b/node_modules/typed-rest-client/handlers/personalaccesstoken.d.ts deleted file mode 100644 index 4bb77fd..0000000 --- a/node_modules/typed-rest-client/handlers/personalaccesstoken.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import ifm = require('../Interfaces'); -export declare class PersonalAccessTokenCredentialHandler implements ifm.IRequestHandler { - token: string; - constructor(token: string); - prepareRequest(options: any): void; - canHandleAuthentication(response: ifm.IHttpClientResponse): boolean; - handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise; -} diff --git a/node_modules/typed-rest-client/handlers/personalaccesstoken.js b/node_modules/typed-rest-client/handlers/personalaccesstoken.js deleted file mode 100644 index 4bb88f8..0000000 --- a/node_modules/typed-rest-client/handlers/personalaccesstoken.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -Object.defineProperty(exports, "__esModule", { value: true }); -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - options.headers['Authorization'] = 'Basic ' + new Buffer('PAT:' + this.token).toString('base64'); - options.headers['X-TFS-FedAuthRedirect'] = 'Suppress'; - } - // This handler cannot handle 401 - canHandleAuthentication(response) { - return false; - } - handleAuthentication(httpClient, requestInfo, objs) { - return null; - } -} -exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; diff --git a/node_modules/typed-rest-client/opensource/node-http-ntlm/ntlm.js b/node_modules/typed-rest-client/opensource/node-http-ntlm/ntlm.js deleted file mode 100644 index adf7602..0000000 --- a/node_modules/typed-rest-client/opensource/node-http-ntlm/ntlm.js +++ /dev/null @@ -1,389 +0,0 @@ -var crypto = require('crypto'); - -var flags = { - NTLM_NegotiateUnicode : 0x00000001, - NTLM_NegotiateOEM : 0x00000002, - NTLM_RequestTarget : 0x00000004, - NTLM_Unknown9 : 0x00000008, - NTLM_NegotiateSign : 0x00000010, - NTLM_NegotiateSeal : 0x00000020, - NTLM_NegotiateDatagram : 0x00000040, - NTLM_NegotiateLanManagerKey : 0x00000080, - NTLM_Unknown8 : 0x00000100, - NTLM_NegotiateNTLM : 0x00000200, - NTLM_NegotiateNTOnly : 0x00000400, - NTLM_Anonymous : 0x00000800, - NTLM_NegotiateOemDomainSupplied : 0x00001000, - NTLM_NegotiateOemWorkstationSupplied : 0x00002000, - NTLM_Unknown6 : 0x00004000, - NTLM_NegotiateAlwaysSign : 0x00008000, - NTLM_TargetTypeDomain : 0x00010000, - NTLM_TargetTypeServer : 0x00020000, - NTLM_TargetTypeShare : 0x00040000, - NTLM_NegotiateExtendedSecurity : 0x00080000, - NTLM_NegotiateIdentify : 0x00100000, - NTLM_Unknown5 : 0x00200000, - NTLM_RequestNonNTSessionKey : 0x00400000, - NTLM_NegotiateTargetInfo : 0x00800000, - NTLM_Unknown4 : 0x01000000, - NTLM_NegotiateVersion : 0x02000000, - NTLM_Unknown3 : 0x04000000, - NTLM_Unknown2 : 0x08000000, - NTLM_Unknown1 : 0x10000000, - NTLM_Negotiate128 : 0x20000000, - NTLM_NegotiateKeyExchange : 0x40000000, - NTLM_Negotiate56 : 0x80000000 -}; -var typeflags = { - NTLM_TYPE1_FLAGS : flags.NTLM_NegotiateUnicode - + flags.NTLM_NegotiateOEM - + flags.NTLM_RequestTarget - + flags.NTLM_NegotiateNTLM - + flags.NTLM_NegotiateOemDomainSupplied - + flags.NTLM_NegotiateOemWorkstationSupplied - + flags.NTLM_NegotiateAlwaysSign - + flags.NTLM_NegotiateExtendedSecurity - + flags.NTLM_NegotiateVersion - + flags.NTLM_Negotiate128 - + flags.NTLM_Negotiate56, - - NTLM_TYPE2_FLAGS : flags.NTLM_NegotiateUnicode - + flags.NTLM_RequestTarget - + flags.NTLM_NegotiateNTLM - + flags.NTLM_NegotiateAlwaysSign - + flags.NTLM_NegotiateExtendedSecurity - + flags.NTLM_NegotiateTargetInfo - + flags.NTLM_NegotiateVersion - + flags.NTLM_Negotiate128 - + flags.NTLM_Negotiate56 -}; - -function createType1Message(options){ - var domain = escape(options.domain.toUpperCase()); - var workstation = escape(options.workstation.toUpperCase()); - var protocol = 'NTLMSSP\0'; - - var BODY_LENGTH = 40; - - var type1flags = typeflags.NTLM_TYPE1_FLAGS; - if(!domain || domain === '') - type1flags = type1flags - flags.NTLM_NegotiateOemDomainSupplied; - - var pos = 0; - var buf = new Buffer(BODY_LENGTH + domain.length + workstation.length); - - - buf.write(protocol, pos, protocol.length); pos += protocol.length; // protocol - buf.writeUInt32LE(1, pos); pos += 4; // type 1 - buf.writeUInt32LE(type1flags, pos); pos += 4; // TYPE1 flag - - buf.writeUInt16LE(domain.length, pos); pos += 2; // domain length - buf.writeUInt16LE(domain.length, pos); pos += 2; // domain max length - buf.writeUInt32LE(BODY_LENGTH + workstation.length, pos); pos += 4; // domain buffer offset - - buf.writeUInt16LE(workstation.length, pos); pos += 2; // workstation length - buf.writeUInt16LE(workstation.length, pos); pos += 2; // workstation max length - buf.writeUInt32LE(BODY_LENGTH, pos); pos += 4; // workstation buffer offset - - buf.writeUInt8(5, pos); pos += 1; //ProductMajorVersion - buf.writeUInt8(1, pos); pos += 1; //ProductMinorVersion - buf.writeUInt16LE(2600, pos); pos += 2; //ProductBuild - - buf.writeUInt8(0 , pos); pos += 1; //VersionReserved1 - buf.writeUInt8(0 , pos); pos += 1; //VersionReserved2 - buf.writeUInt8(0 , pos); pos += 1; //VersionReserved3 - buf.writeUInt8(15, pos); pos += 1; //NTLMRevisionCurrent - - buf.write(workstation, pos, workstation.length, 'ascii'); pos += workstation.length; // workstation string - buf.write(domain , pos, domain.length , 'ascii'); pos += domain.length; - - return 'NTLM ' + buf.toString('base64'); -} - -function parseType2Message(rawmsg, callback){ - var match = rawmsg.match(/NTLM (.+)?/); - if(!match || !match[1]) - return callback(new Error("Couldn't find NTLM in the message type2 comming from the server")); - - var buf = new Buffer(match[1], 'base64'); - - var msg = {}; - - msg.signature = buf.slice(0, 8); - msg.type = buf.readInt16LE(8); - - if(msg.type != 2) - return callback(new Error("Server didn't return a type 2 message")); - - msg.targetNameLen = buf.readInt16LE(12); - msg.targetNameMaxLen = buf.readInt16LE(14); - msg.targetNameOffset = buf.readInt32LE(16); - msg.targetName = buf.slice(msg.targetNameOffset, msg.targetNameOffset + msg.targetNameMaxLen); - - msg.negotiateFlags = buf.readInt32LE(20); - msg.serverChallenge = buf.slice(24, 32); - msg.reserved = buf.slice(32, 40); - - if(msg.negotiateFlags & flags.NTLM_NegotiateTargetInfo){ - msg.targetInfoLen = buf.readInt16LE(40); - msg.targetInfoMaxLen = buf.readInt16LE(42); - msg.targetInfoOffset = buf.readInt32LE(44); - msg.targetInfo = buf.slice(msg.targetInfoOffset, msg.targetInfoOffset + msg.targetInfoLen); - } - return msg; -} - -function createType3Message(msg2, options){ - var nonce = msg2.serverChallenge; - var username = options.username; - var password = options.password; - var negotiateFlags = msg2.negotiateFlags; - - var isUnicode = negotiateFlags & flags.NTLM_NegotiateUnicode; - var isNegotiateExtendedSecurity = negotiateFlags & flags.NTLM_NegotiateExtendedSecurity; - - var BODY_LENGTH = 72; - - var domainName = escape(options.domain.toUpperCase()); - var workstation = escape(options.workstation.toUpperCase()); - - var workstationBytes, domainNameBytes, usernameBytes, encryptedRandomSessionKeyBytes; - - var encryptedRandomSessionKey = ""; - if(isUnicode){ - workstationBytes = new Buffer(workstation, 'utf16le'); - domainNameBytes = new Buffer(domainName, 'utf16le'); - usernameBytes = new Buffer(username, 'utf16le'); - encryptedRandomSessionKeyBytes = new Buffer(encryptedRandomSessionKey, 'utf16le'); - }else{ - workstationBytes = new Buffer(workstation, 'ascii'); - domainNameBytes = new Buffer(domainName, 'ascii'); - usernameBytes = new Buffer(username, 'ascii'); - encryptedRandomSessionKeyBytes = new Buffer(encryptedRandomSessionKey, 'ascii'); - } - - var lmChallengeResponse = calc_resp(create_LM_hashed_password_v1(password), nonce); - var ntChallengeResponse = calc_resp(create_NT_hashed_password_v1(password), nonce); - - if(isNegotiateExtendedSecurity){ - var pwhash = create_NT_hashed_password_v1(password); - var clientChallenge = ""; - for(var i=0; i < 8; i++){ - clientChallenge += String.fromCharCode( Math.floor(Math.random()*256) ); - } - var clientChallengeBytes = new Buffer(clientChallenge, 'ascii'); - var challenges = ntlm2sr_calc_resp(pwhash, nonce, clientChallengeBytes); - lmChallengeResponse = challenges.lmChallengeResponse; - ntChallengeResponse = challenges.ntChallengeResponse; - } - - var signature = 'NTLMSSP\0'; - - var pos = 0; - var buf = new Buffer(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length + ntChallengeResponse.length + encryptedRandomSessionKeyBytes.length); - - buf.write(signature, pos, signature.length); pos += signature.length; - buf.writeUInt32LE(3, pos); pos += 4; // type 1 - - buf.writeUInt16LE(lmChallengeResponse.length, pos); pos += 2; // LmChallengeResponseLen - buf.writeUInt16LE(lmChallengeResponse.length, pos); pos += 2; // LmChallengeResponseMaxLen - buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length, pos); pos += 4; // LmChallengeResponseOffset - - buf.writeUInt16LE(ntChallengeResponse.length, pos); pos += 2; // NtChallengeResponseLen - buf.writeUInt16LE(ntChallengeResponse.length, pos); pos += 2; // NtChallengeResponseMaxLen - buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length, pos); pos += 4; // NtChallengeResponseOffset - - buf.writeUInt16LE(domainNameBytes.length, pos); pos += 2; // DomainNameLen - buf.writeUInt16LE(domainNameBytes.length, pos); pos += 2; // DomainNameMaxLen - buf.writeUInt32LE(BODY_LENGTH, pos); pos += 4; // DomainNameOffset - - buf.writeUInt16LE(usernameBytes.length, pos); pos += 2; // UserNameLen - buf.writeUInt16LE(usernameBytes.length, pos); pos += 2; // UserNameMaxLen - buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length, pos); pos += 4; // UserNameOffset - - buf.writeUInt16LE(workstationBytes.length, pos); pos += 2; // WorkstationLen - buf.writeUInt16LE(workstationBytes.length, pos); pos += 2; // WorkstationMaxLen - buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length, pos); pos += 4; // WorkstationOffset - - buf.writeUInt16LE(encryptedRandomSessionKeyBytes.length, pos); pos += 2; // EncryptedRandomSessionKeyLen - buf.writeUInt16LE(encryptedRandomSessionKeyBytes.length, pos); pos += 2; // EncryptedRandomSessionKeyMaxLen - buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length + ntChallengeResponse.length, pos); pos += 4; // EncryptedRandomSessionKeyOffset - - buf.writeUInt32LE(typeflags.NTLM_TYPE2_FLAGS, pos); pos += 4; // NegotiateFlags - - buf.writeUInt8(5, pos); pos++; // ProductMajorVersion - buf.writeUInt8(1, pos); pos++; // ProductMinorVersion - buf.writeUInt16LE(2600, pos); pos += 2; // ProductBuild - buf.writeUInt8(0, pos); pos++; // VersionReserved1 - buf.writeUInt8(0, pos); pos++; // VersionReserved2 - buf.writeUInt8(0, pos); pos++; // VersionReserved3 - buf.writeUInt8(15, pos); pos++; // NTLMRevisionCurrent - - domainNameBytes.copy(buf, pos); pos += domainNameBytes.length; - usernameBytes.copy(buf, pos); pos += usernameBytes.length; - workstationBytes.copy(buf, pos); pos += workstationBytes.length; - lmChallengeResponse.copy(buf, pos); pos += lmChallengeResponse.length; - ntChallengeResponse.copy(buf, pos); pos += ntChallengeResponse.length; - encryptedRandomSessionKeyBytes.copy(buf, pos); pos += encryptedRandomSessionKeyBytes.length; - - return 'NTLM ' + buf.toString('base64'); -} - -function create_LM_hashed_password_v1(password){ - // fix the password length to 14 bytes - password = password.toUpperCase(); - var passwordBytes = new Buffer(password, 'ascii'); - - var passwordBytesPadded = new Buffer(14); - passwordBytesPadded.fill("\0"); - var sourceEnd = 14; - if(passwordBytes.length < 14) sourceEnd = passwordBytes.length; - passwordBytes.copy(passwordBytesPadded, 0, 0, sourceEnd); - - // split into 2 parts of 7 bytes: - var firstPart = passwordBytesPadded.slice(0,7); - var secondPart = passwordBytesPadded.slice(7); - - function encrypt(buf){ - var key = insertZerosEvery7Bits(buf); - var des = crypto.createCipheriv('DES-ECB', key, ''); - return des.update("KGS!@#$%"); // page 57 in [MS-NLMP]); - } - - var firstPartEncrypted = encrypt(firstPart); - var secondPartEncrypted = encrypt(secondPart); - - return Buffer.concat([firstPartEncrypted, secondPartEncrypted]); -} - -function insertZerosEvery7Bits(buf){ - var binaryArray = bytes2binaryArray(buf); - var newBinaryArray = []; - for(var i=0; i array.length) - break; - - var binString1 = '' + array[i] + '' + array[i+1] + '' + array[i+2] + '' + array[i+3]; - var binString2 = '' + array[i+4] + '' + array[i+5] + '' + array[i+6] + '' + array[i+7]; - var hexchar1 = binary2hex[binString1]; - var hexchar2 = binary2hex[binString2]; - - var buf = new Buffer(hexchar1 + '' + hexchar2, 'hex'); - bufArray.push(buf); - } - - return Buffer.concat(bufArray); -} - -function create_NT_hashed_password_v1(password){ - var buf = new Buffer(password, 'utf16le'); - var md4 = crypto.createHash('md4'); - md4.update(buf); - return new Buffer(md4.digest()); -} - -function calc_resp(password_hash, server_challenge){ - // padding with zeros to make the hash 21 bytes long - var passHashPadded = new Buffer(21); - passHashPadded.fill("\0"); - password_hash.copy(passHashPadded, 0, 0, password_hash.length); - - var resArray = []; - - var des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(0,7)), ''); - resArray.push( des.update(server_challenge.slice(0,8)) ); - - des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(7,14)), ''); - resArray.push( des.update(server_challenge.slice(0,8)) ); - - des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(14,21)), ''); - resArray.push( des.update(server_challenge.slice(0,8)) ); - - return Buffer.concat(resArray); -} - -function ntlm2sr_calc_resp(responseKeyNT, serverChallenge, clientChallenge){ - // padding with zeros to make the hash 16 bytes longer - var lmChallengeResponse = new Buffer(clientChallenge.length + 16); - lmChallengeResponse.fill("\0"); - clientChallenge.copy(lmChallengeResponse, 0, 0, clientChallenge.length); - - var buf = Buffer.concat([serverChallenge, clientChallenge]); - var md5 = crypto.createHash('md5'); - md5.update(buf); - var sess = md5.digest(); - var ntChallengeResponse = calc_resp(responseKeyNT, sess.slice(0,8)); - - return { - lmChallengeResponse: lmChallengeResponse, - ntChallengeResponse: ntChallengeResponse - }; -} - -exports.createType1Message = createType1Message; -exports.parseType2Message = parseType2Message; -exports.createType3Message = createType3Message; - - - diff --git a/node_modules/typed-rest-client/opensource/node-http-ntlm/readme.txt b/node_modules/typed-rest-client/opensource/node-http-ntlm/readme.txt deleted file mode 100644 index b341600..0000000 --- a/node_modules/typed-rest-client/opensource/node-http-ntlm/readme.txt +++ /dev/null @@ -1,6 +0,0 @@ -// This software (ntlm.js) was copied from a file of the same name at https://github.com/SamDecrock/node-http-ntlm/blob/master/ntlm.js. -// -// As of this writing, it is a part of the node-http-ntlm module produced by SamDecrock. -// -// It is used as a part of the NTLM support provided by the vso-node-api library. -// diff --git a/node_modules/typed-rest-client/package.json b/node_modules/typed-rest-client/package.json deleted file mode 100644 index e16f729..0000000 --- a/node_modules/typed-rest-client/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "typed-rest-client@^1.4.0", - "_id": "typed-rest-client@1.5.0", - "_inBundle": false, - "_integrity": "sha512-DVZRlmsfnTjp6ZJaatcdyvvwYwbWvR4YDNFDqb+qdTxpvaVP99YCpBkA8rxsLtAPjBVoDe4fNsnMIdZTiPuKWg==", - "_location": "/typed-rest-client", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "typed-rest-client@^1.4.0", - "name": "typed-rest-client", - "escapedName": "typed-rest-client", - "rawSpec": "^1.4.0", - "saveSpec": null, - "fetchSpec": "^1.4.0" - }, - "_requiredBy": [ - "/@actions/tool-cache" - ], - "_resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.5.0.tgz", - "_shasum": "c0dda6e775b942fd46a2d99f2160a94953206fc2", - "_spec": "typed-rest-client@^1.4.0", - "_where": "C:\\Users\\damccorm\\Documents\\setup-go\\node_modules\\@actions\\tool-cache", - "author": { - "name": "Microsoft Corporation" - }, - "bugs": { - "url": "https://github.com/Microsoft/typed-rest-client/issues" - }, - "bundleDependencies": false, - "dependencies": { - "tunnel": "0.0.4", - "underscore": "1.8.3" - }, - "deprecated": false, - "description": "Node Rest and Http Clients for use with TypeScript", - "devDependencies": { - "@types/mocha": "^2.2.44", - "@types/node": "^6.0.92", - "@types/shelljs": "0.7.4", - "mocha": "^3.5.3", - "nock": "9.6.1", - "react-scripts": "1.1.5", - "semver": "4.3.3", - "shelljs": "0.7.6", - "typescript": "3.1.5" - }, - "homepage": "https://github.com/Microsoft/typed-rest-client#readme", - "keywords": [ - "rest", - "http", - "client", - "typescript", - "node" - ], - "license": "MIT", - "main": "./RestClient.js", - "name": "typed-rest-client", - "repository": { - "type": "git", - "url": "git+https://github.com/Microsoft/typed-rest-client.git" - }, - "scripts": { - "bt": "node make.js buildtest", - "build": "node make.js build", - "samples": "node make.js samples", - "test": "node make.js test", - "units": "node make.js units", - "validate": "node make.js validate" - }, - "version": "1.5.0" -} diff --git a/node_modules/underscore/LICENSE b/node_modules/underscore/LICENSE deleted file mode 100644 index ad0e71b..0000000 --- a/node_modules/underscore/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative -Reporters & Editors - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/underscore/README.md b/node_modules/underscore/README.md deleted file mode 100644 index c2ba259..0000000 --- a/node_modules/underscore/README.md +++ /dev/null @@ -1,22 +0,0 @@ - __ - /\ \ __ - __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____ - /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\ - \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\ - \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/ - \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/ - \ \____/ - \/___/ - -Underscore.js is a utility-belt library for JavaScript that provides -support for the usual functional suspects (each, map, reduce, filter...) -without extending any core JavaScript objects. - -For Docs, License, Tests, and pre-packed downloads, see: -http://underscorejs.org - -Underscore is an open-sourced component of DocumentCloud: -https://github.com/documentcloud - -Many thanks to our contributors: -https://github.com/jashkenas/underscore/contributors diff --git a/node_modules/underscore/package.json b/node_modules/underscore/package.json deleted file mode 100644 index 1f9eb60..0000000 --- a/node_modules/underscore/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "underscore@1.8.3", - "_id": "underscore@1.8.3", - "_inBundle": false, - "_integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", - "_location": "/underscore", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "underscore@1.8.3", - "name": "underscore", - "escapedName": "underscore", - "rawSpec": "1.8.3", - "saveSpec": null, - "fetchSpec": "1.8.3" - }, - "_requiredBy": [ - "/typed-rest-client" - ], - "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "_shasum": "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022", - "_spec": "underscore@1.8.3", - "_where": "C:\\Users\\damccorm\\Documents\\setup-go\\node_modules\\typed-rest-client", - "author": { - "name": "Jeremy Ashkenas", - "email": "jeremy@documentcloud.org" - }, - "bugs": { - "url": "https://github.com/jashkenas/underscore/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "JavaScript's functional programming helper library.", - "devDependencies": { - "docco": "*", - "eslint": "0.6.x", - "karma": "~0.12.31", - "karma-qunit": "~0.1.4", - "qunit-cli": "~0.2.0", - "uglify-js": "2.4.x" - }, - "files": [ - "underscore.js", - "underscore-min.js", - "underscore-min.map", - "LICENSE" - ], - "homepage": "http://underscorejs.org", - "keywords": [ - "util", - "functional", - "server", - "client", - "browser" - ], - "license": "MIT", - "main": "underscore.js", - "name": "underscore", - "repository": { - "type": "git", - "url": "git://github.com/jashkenas/underscore.git" - }, - "scripts": { - "build": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js", - "doc": "docco underscore.js", - "lint": "eslint underscore.js test/*.js", - "test": "npm run test-node && npm run lint", - "test-browser": "npm i karma-phantomjs-launcher && ./node_modules/karma/bin/karma start", - "test-node": "qunit-cli test/*.js" - }, - "version": "1.8.3" -} diff --git a/node_modules/underscore/underscore-min.js b/node_modules/underscore/underscore-min.js deleted file mode 100644 index f01025b..0000000 --- a/node_modules/underscore/underscore-min.js +++ /dev/null @@ -1,6 +0,0 @@ -// Underscore.js 1.8.3 -// http://underscorejs.org -// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. -(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this); -//# sourceMappingURL=underscore-min.map \ No newline at end of file diff --git a/node_modules/underscore/underscore-min.map b/node_modules/underscore/underscore-min.map deleted file mode 100644 index cf356bf..0000000 --- a/node_modules/underscore/underscore-min.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"underscore-min.js","sources":["underscore.js"],"names":["createReduce","dir","iterator","obj","iteratee","memo","keys","index","length","currentKey","context","optimizeCb","isArrayLike","_","arguments","createPredicateIndexFinder","array","predicate","cb","getLength","createIndexFinder","predicateFind","sortedIndex","item","idx","i","Math","max","min","slice","call","isNaN","collectNonEnumProps","nonEnumIdx","nonEnumerableProps","constructor","proto","isFunction","prototype","ObjProto","prop","has","contains","push","root","this","previousUnderscore","ArrayProto","Array","Object","FuncProto","Function","toString","hasOwnProperty","nativeIsArray","isArray","nativeKeys","nativeBind","bind","nativeCreate","create","Ctor","_wrapped","exports","module","VERSION","func","argCount","value","other","collection","accumulator","apply","identity","isObject","matcher","property","Infinity","createAssigner","keysFunc","undefinedOnly","source","l","key","baseCreate","result","MAX_ARRAY_INDEX","pow","each","forEach","map","collect","results","reduce","foldl","inject","reduceRight","foldr","find","detect","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","includes","include","fromIndex","guard","values","indexOf","invoke","method","args","isFunc","pluck","where","attrs","findWhere","computed","lastComputed","shuffle","rand","set","shuffled","random","sample","n","sortBy","criteria","sort","left","right","a","b","group","behavior","groupBy","indexBy","countBy","toArray","size","partition","pass","fail","first","head","take","initial","last","rest","tail","drop","compact","flatten","input","shallow","strict","startIndex","output","isArguments","j","len","without","difference","uniq","unique","isSorted","isBoolean","seen","union","intersection","argsLength","zip","unzip","object","findLastIndex","low","high","mid","floor","lastIndexOf","range","start","stop","step","ceil","executeBound","sourceFunc","boundFunc","callingContext","self","TypeError","bound","concat","partial","boundArgs","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","remaining","clearTimeout","trailing","debounce","immediate","timestamp","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","allKeys","mapObject","pairs","invert","functions","methods","names","extend","extendOwn","assign","pick","oiteratee","omit","String","defaults","props","clone","tap","interceptor","isMatch","eq","aStack","bStack","className","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isString","isElement","nodeType","type","name","Int8Array","isFinite","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","&","<",">","\"","'","`","unescapeMap","createEscaper","escaper","match","join","testRegexp","RegExp","replaceRegexp","string","test","replace","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","
","
","escapeChar","template","text","settings","oldSettings","offset","variable","render","e","data","argument","chain","instance","_chain","mixin","valueOf","toJSON","define","amd"],"mappings":";;;;CAKC,WA4KC,QAASA,GAAaC,GAGpB,QAASC,GAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,GAClD,KAAOD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAAK,CACjD,GAAIQ,GAAaH,EAAOA,EAAKC,GAASA,CACtCF,GAAOD,EAASC,EAAMF,EAAIM,GAAaA,EAAYN,GAErD,MAAOE,GAGT,MAAO,UAASF,EAAKC,EAAUC,EAAMK,GACnCN,EAAWO,EAAWP,EAAUM,EAAS,EACzC,IAAIJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvBD,EAAQN,EAAM,EAAI,EAAIO,EAAS,CAMnC,OAJIM,WAAUN,OAAS,IACrBH,EAAOF,EAAIG,EAAOA,EAAKC,GAASA,GAChCA,GAASN,GAEJC,EAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,IA+ZtD,QAASO,GAA2Bd,GAClC,MAAO,UAASe,EAAOC,EAAWP,GAChCO,EAAYC,EAAGD,EAAWP,EAG1B,KAFA,GAAIF,GAASW,EAAUH,GACnBT,EAAQN,EAAM,EAAI,EAAIO,EAAS,EAC5BD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAC5C,GAAIgB,EAAUD,EAAMT,GAAQA,EAAOS,GAAQ,MAAOT,EAEpD,QAAQ,GAsBZ,QAASa,GAAkBnB,EAAKoB,EAAeC,GAC7C,MAAO,UAASN,EAAOO,EAAMC,GAC3B,GAAIC,GAAI,EAAGjB,EAASW,E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B,MAAO1L,GAAOxC,KAAMyE,EAAO9C,MAAM3B,KAAKiB,SAAUhD,eAKpDD,EAAEyB,UAAU8B,MAAQ,WAClB,MAAOvB,MAAKiB,UAKdjD,EAAEyB,UAAU0S,QAAUnU,EAAEyB,UAAU2S,OAASpU,EAAEyB,UAAU8B,MAEvDvD,EAAEyB,UAAUc,SAAW,WACrB,MAAO,GAAKP,KAAKiB,UAUG,kBAAXoR,SAAyBA,OAAOC,KACzCD,OAAO,gBAAkB,WACvB,MAAOrU,OAGXiB,KAAKe"} \ No newline at end of file diff --git a/node_modules/underscore/underscore.js b/node_modules/underscore/underscore.js deleted file mode 100644 index b29332f..0000000 --- a/node_modules/underscore/underscore.js +++ /dev/null @@ -1,1548 +0,0 @@ -// Underscore.js 1.8.3 -// http://underscorejs.org -// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. - -(function() { - - // Baseline setup - // -------------- - - // Establish the root object, `window` in the browser, or `exports` on the server. - var root = this; - - // Save the previous value of the `_` variable. - var previousUnderscore = root._; - - // Save bytes in the minified (but not gzipped) version: - var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; - - // Create quick reference variables for speed access to core prototypes. - var - push = ArrayProto.push, - slice = ArrayProto.slice, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - - // All **ECMAScript 5** native function implementations that we hope to use - // are declared here. - var - nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeBind = FuncProto.bind, - nativeCreate = Object.create; - - // Naked function reference for surrogate-prototype-swapping. - var Ctor = function(){}; - - // Create a safe reference to the Underscore object for use below. - var _ = function(obj) { - if (obj instanceof _) return obj; - if (!(this instanceof _)) return new _(obj); - this._wrapped = obj; - }; - - // Export the Underscore object for **Node.js**, with - // backwards-compatibility for the old `require()` API. If we're in - // the browser, add `_` as a global object. - if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - exports = module.exports = _; - } - exports._ = _; - } else { - root._ = _; - } - - // Current version. - _.VERSION = '1.8.3'; - - // Internal function that returns an efficient (for current engines) version - // of the passed-in callback, to be repeatedly applied in other Underscore - // functions. - var optimizeCb = function(func, context, argCount) { - if (context === void 0) return func; - switch (argCount == null ? 3 : argCount) { - case 1: return function(value) { - return func.call(context, value); - }; - case 2: return function(value, other) { - return func.call(context, value, other); - }; - case 3: return function(value, index, collection) { - return func.call(context, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(context, accumulator, value, index, collection); - }; - } - return function() { - return func.apply(context, arguments); - }; - }; - - // A mostly-internal function to generate callbacks that can be applied - // to each element in a collection, returning the desired result — either - // identity, an arbitrary callback, a property matcher, or a property accessor. - var cb = function(value, context, argCount) { - if (value == null) return _.identity; - if (_.isFunction(value)) return optimizeCb(value, context, argCount); - if (_.isObject(value)) return _.matcher(value); - return _.property(value); - }; - _.iteratee = function(value, context) { - return cb(value, context, Infinity); - }; - - // An internal function for creating assigner functions. - var createAssigner = function(keysFunc, undefinedOnly) { - return function(obj) { - var length = arguments.length; - if (length < 2 || obj == null) return obj; - for (var index = 1; index < length; index++) { - var source = arguments[index], - keys = keysFunc(source), - l = keys.length; - for (var i = 0; i < l; i++) { - var key = keys[i]; - if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key]; - } - } - return obj; - }; - }; - - // An internal function for creating a new object that inherits from another. - var baseCreate = function(prototype) { - if (!_.isObject(prototype)) return {}; - if (nativeCreate) return nativeCreate(prototype); - Ctor.prototype = prototype; - var result = new Ctor; - Ctor.prototype = null; - return result; - }; - - var property = function(key) { - return function(obj) { - return obj == null ? void 0 : obj[key]; - }; - }; - - // Helper for collection methods to determine whether a collection - // should be iterated as an array or as an object - // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength - // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 - var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; - var getLength = property('length'); - var isArrayLike = function(collection) { - var length = getLength(collection); - return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; - }; - - // Collection Functions - // -------------------- - - // The cornerstone, an `each` implementation, aka `forEach`. - // Handles raw objects in addition to array-likes. Treats all - // sparse array-likes as if they were dense. - _.each = _.forEach = function(obj, iteratee, context) { - iteratee = optimizeCb(iteratee, context); - var i, length; - if (isArrayLike(obj)) { - for (i = 0, length = obj.length; i < length; i++) { - iteratee(obj[i], i, obj); - } - } else { - var keys = _.keys(obj); - for (i = 0, length = keys.length; i < length; i++) { - iteratee(obj[keys[i]], keys[i], obj); - } - } - return obj; - }; - - // Return the results of applying the iteratee to each element. - _.map = _.collect = function(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length, - results = Array(length); - for (var index = 0; index < length; index++) { - var currentKey = keys ? keys[index] : index; - results[index] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - }; - - // Create a reducing function iterating left or right. - function createReduce(dir) { - // Optimized iterator function as using arguments.length - // in the main function will deoptimize the, see #1991. - function iterator(obj, iteratee, memo, keys, index, length) { - for (; index >= 0 && index < length; index += dir) { - var currentKey = keys ? keys[index] : index; - memo = iteratee(memo, obj[currentKey], currentKey, obj); - } - return memo; - } - - return function(obj, iteratee, memo, context) { - iteratee = optimizeCb(iteratee, context, 4); - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length, - index = dir > 0 ? 0 : length - 1; - // Determine the initial value if none is provided. - if (arguments.length < 3) { - memo = obj[keys ? keys[index] : index]; - index += dir; - } - return iterator(obj, iteratee, memo, keys, index, length); - }; - } - - // **Reduce** builds up a single result from a list of values, aka `inject`, - // or `foldl`. - _.reduce = _.foldl = _.inject = createReduce(1); - - // The right-associative version of reduce, also known as `foldr`. - _.reduceRight = _.foldr = createReduce(-1); - - // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, predicate, context) { - var key; - if (isArrayLike(obj)) { - key = _.findIndex(obj, predicate, context); - } else { - key = _.findKey(obj, predicate, context); - } - if (key !== void 0 && key !== -1) return obj[key]; - }; - - // Return all the elements that pass a truth test. - // Aliased as `select`. - _.filter = _.select = function(obj, predicate, context) { - var results = []; - predicate = cb(predicate, context); - _.each(obj, function(value, index, list) { - if (predicate(value, index, list)) results.push(value); - }); - return results; - }; - - // Return all the elements for which a truth test fails. - _.reject = function(obj, predicate, context) { - return _.filter(obj, _.negate(cb(predicate)), context); - }; - - // Determine whether all of the elements match a truth test. - // Aliased as `all`. - _.every = _.all = function(obj, predicate, context) { - predicate = cb(predicate, context); - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = keys ? keys[index] : index; - if (!predicate(obj[currentKey], currentKey, obj)) return false; - } - return true; - }; - - // Determine if at least one element in the object matches a truth test. - // Aliased as `any`. - _.some = _.any = function(obj, predicate, context) { - predicate = cb(predicate, context); - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = keys ? keys[index] : index; - if (predicate(obj[currentKey], currentKey, obj)) return true; - } - return false; - }; - - // Determine if the array or object contains a given item (using `===`). - // Aliased as `includes` and `include`. - _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) { - if (!isArrayLike(obj)) obj = _.values(obj); - if (typeof fromIndex != 'number' || guard) fromIndex = 0; - return _.indexOf(obj, item, fromIndex) >= 0; - }; - - // Invoke a method (with arguments) on every item in a collection. - _.invoke = function(obj, method) { - var args = slice.call(arguments, 2); - var isFunc = _.isFunction(method); - return _.map(obj, function(value) { - var func = isFunc ? method : value[method]; - return func == null ? func : func.apply(value, args); - }); - }; - - // Convenience version of a common use case of `map`: fetching a property. - _.pluck = function(obj, key) { - return _.map(obj, _.property(key)); - }; - - // Convenience version of a common use case of `filter`: selecting only objects - // containing specific `key:value` pairs. - _.where = function(obj, attrs) { - return _.filter(obj, _.matcher(attrs)); - }; - - // Convenience version of a common use case of `find`: getting the first object - // containing specific `key:value` pairs. - _.findWhere = function(obj, attrs) { - return _.find(obj, _.matcher(attrs)); - }; - - // Return the maximum element (or element-based computation). - _.max = function(obj, iteratee, context) { - var result = -Infinity, lastComputed = -Infinity, - value, computed; - if (iteratee == null && obj != null) { - obj = isArrayLike(obj) ? obj : _.values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value > result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - _.each(obj, function(value, index, list) { - computed = iteratee(value, index, list); - if (computed > lastComputed || computed === -Infinity && result === -Infinity) { - result = value; - lastComputed = computed; - } - }); - } - return result; - }; - - // Return the minimum element (or element-based computation). - _.min = function(obj, iteratee, context) { - var result = Infinity, lastComputed = Infinity, - value, computed; - if (iteratee == null && obj != null) { - obj = isArrayLike(obj) ? obj : _.values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value < result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - _.each(obj, function(value, index, list) { - computed = iteratee(value, index, list); - if (computed < lastComputed || computed === Infinity && result === Infinity) { - result = value; - lastComputed = computed; - } - }); - } - return result; - }; - - // Shuffle a collection, using the modern version of the - // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). - _.shuffle = function(obj) { - var set = isArrayLike(obj) ? obj : _.values(obj); - var length = set.length; - var shuffled = Array(length); - for (var index = 0, rand; index < length; index++) { - rand = _.random(0, index); - if (rand !== index) shuffled[index] = shuffled[rand]; - shuffled[rand] = set[index]; - } - return shuffled; - }; - - // Sample **n** random values from a collection. - // If **n** is not specified, returns a single random element. - // The internal `guard` argument allows it to work with `map`. - _.sample = function(obj, n, guard) { - if (n == null || guard) { - if (!isArrayLike(obj)) obj = _.values(obj); - return obj[_.random(obj.length - 1)]; - } - return _.shuffle(obj).slice(0, Math.max(0, n)); - }; - - // Sort the object's values by a criterion produced by an iteratee. - _.sortBy = function(obj, iteratee, context) { - iteratee = cb(iteratee, context); - return _.pluck(_.map(obj, function(value, index, list) { - return { - value: value, - index: index, - criteria: iteratee(value, index, list) - }; - }).sort(function(left, right) { - var a = left.criteria; - var b = right.criteria; - if (a !== b) { - if (a > b || a === void 0) return 1; - if (a < b || b === void 0) return -1; - } - return left.index - right.index; - }), 'value'); - }; - - // An internal function used for aggregate "group by" operations. - var group = function(behavior) { - return function(obj, iteratee, context) { - var result = {}; - iteratee = cb(iteratee, context); - _.each(obj, function(value, index) { - var key = iteratee(value, index, obj); - behavior(result, value, key); - }); - return result; - }; - }; - - // Groups the object's values by a criterion. Pass either a string attribute - // to group by, or a function that returns the criterion. - _.groupBy = group(function(result, value, key) { - if (_.has(result, key)) result[key].push(value); else result[key] = [value]; - }); - - // Indexes the object's values by a criterion, similar to `groupBy`, but for - // when you know that your index values will be unique. - _.indexBy = group(function(result, value, key) { - result[key] = value; - }); - - // Counts instances of an object that group by a certain criterion. Pass - // either a string attribute to count by, or a function that returns the - // criterion. - _.countBy = group(function(result, value, key) { - if (_.has(result, key)) result[key]++; else result[key] = 1; - }); - - // Safely create a real, live array from anything iterable. - _.toArray = function(obj) { - if (!obj) return []; - if (_.isArray(obj)) return slice.call(obj); - if (isArrayLike(obj)) return _.map(obj, _.identity); - return _.values(obj); - }; - - // Return the number of elements in an object. - _.size = function(obj) { - if (obj == null) return 0; - return isArrayLike(obj) ? obj.length : _.keys(obj).length; - }; - - // Split a collection into two arrays: one whose elements all satisfy the given - // predicate, and one whose elements all do not satisfy the predicate. - _.partition = function(obj, predicate, context) { - predicate = cb(predicate, context); - var pass = [], fail = []; - _.each(obj, function(value, key, obj) { - (predicate(value, key, obj) ? pass : fail).push(value); - }); - return [pass, fail]; - }; - - // Array Functions - // --------------- - - // Get the first element of an array. Passing **n** will return the first N - // values in the array. Aliased as `head` and `take`. The **guard** check - // allows it to work with `_.map`. - _.first = _.head = _.take = function(array, n, guard) { - if (array == null) return void 0; - if (n == null || guard) return array[0]; - return _.initial(array, array.length - n); - }; - - // Returns everything but the last entry of the array. Especially useful on - // the arguments object. Passing **n** will return all the values in - // the array, excluding the last N. - _.initial = function(array, n, guard) { - return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); - }; - - // Get the last element of an array. Passing **n** will return the last N - // values in the array. - _.last = function(array, n, guard) { - if (array == null) return void 0; - if (n == null || guard) return array[array.length - 1]; - return _.rest(array, Math.max(0, array.length - n)); - }; - - // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. - // Especially useful on the arguments object. Passing an **n** will return - // the rest N values in the array. - _.rest = _.tail = _.drop = function(array, n, guard) { - return slice.call(array, n == null || guard ? 1 : n); - }; - - // Trim out all falsy values from an array. - _.compact = function(array) { - return _.filter(array, _.identity); - }; - - // Internal implementation of a recursive `flatten` function. - var flatten = function(input, shallow, strict, startIndex) { - var output = [], idx = 0; - for (var i = startIndex || 0, length = getLength(input); i < length; i++) { - var value = input[i]; - if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) { - //flatten current level of array or arguments object - if (!shallow) value = flatten(value, shallow, strict); - var j = 0, len = value.length; - output.length += len; - while (j < len) { - output[idx++] = value[j++]; - } - } else if (!strict) { - output[idx++] = value; - } - } - return output; - }; - - // Flatten out an array, either recursively (by default), or just one level. - _.flatten = function(array, shallow) { - return flatten(array, shallow, false); - }; - - // Return a version of the array that does not contain the specified value(s). - _.without = function(array) { - return _.difference(array, slice.call(arguments, 1)); - }; - - // Produce a duplicate-free version of the array. If the array has already - // been sorted, you have the option of using a faster algorithm. - // Aliased as `unique`. - _.uniq = _.unique = function(array, isSorted, iteratee, context) { - if (!_.isBoolean(isSorted)) { - context = iteratee; - iteratee = isSorted; - isSorted = false; - } - if (iteratee != null) iteratee = cb(iteratee, context); - var result = []; - var seen = []; - for (var i = 0, length = getLength(array); i < length; i++) { - var value = array[i], - computed = iteratee ? iteratee(value, i, array) : value; - if (isSorted) { - if (!i || seen !== computed) result.push(value); - seen = computed; - } else if (iteratee) { - if (!_.contains(seen, computed)) { - seen.push(computed); - result.push(value); - } - } else if (!_.contains(result, value)) { - result.push(value); - } - } - return result; - }; - - // Produce an array that contains the union: each distinct element from all of - // the passed-in arrays. - _.union = function() { - return _.uniq(flatten(arguments, true, true)); - }; - - // Produce an array that contains every item shared between all the - // passed-in arrays. - _.intersection = function(array) { - var result = []; - var argsLength = arguments.length; - for (var i = 0, length = getLength(array); i < length; i++) { - var item = array[i]; - if (_.contains(result, item)) continue; - for (var j = 1; j < argsLength; j++) { - if (!_.contains(arguments[j], item)) break; - } - if (j === argsLength) result.push(item); - } - return result; - }; - - // Take the difference between one array and a number of other arrays. - // Only the elements present in just the first array will remain. - _.difference = function(array) { - var rest = flatten(arguments, true, true, 1); - return _.filter(array, function(value){ - return !_.contains(rest, value); - }); - }; - - // Zip together multiple lists into a single array -- elements that share - // an index go together. - _.zip = function() { - return _.unzip(arguments); - }; - - // Complement of _.zip. Unzip accepts an array of arrays and groups - // each array's elements on shared indices - _.unzip = function(array) { - var length = array && _.max(array, getLength).length || 0; - var result = Array(length); - - for (var index = 0; index < length; index++) { - result[index] = _.pluck(array, index); - } - return result; - }; - - // Converts lists into objects. Pass either a single array of `[key, value]` - // pairs, or two parallel arrays of the same length -- one of keys, and one of - // the corresponding values. - _.object = function(list, values) { - var result = {}; - for (var i = 0, length = getLength(list); i < length; i++) { - if (values) { - result[list[i]] = values[i]; - } else { - result[list[i][0]] = list[i][1]; - } - } - return result; - }; - - // Generator function to create the findIndex and findLastIndex functions - function createPredicateIndexFinder(dir) { - return function(array, predicate, context) { - predicate = cb(predicate, context); - var length = getLength(array); - var index = dir > 0 ? 0 : length - 1; - for (; index >= 0 && index < length; index += dir) { - if (predicate(array[index], index, array)) return index; - } - return -1; - }; - } - - // Returns the first index on an array-like that passes a predicate test - _.findIndex = createPredicateIndexFinder(1); - _.findLastIndex = createPredicateIndexFinder(-1); - - // Use a comparator function to figure out the smallest index at which - // an object should be inserted so as to maintain order. Uses binary search. - _.sortedIndex = function(array, obj, iteratee, context) { - iteratee = cb(iteratee, context, 1); - var value = iteratee(obj); - var low = 0, high = getLength(array); - while (low < high) { - var mid = Math.floor((low + high) / 2); - if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; - } - return low; - }; - - // Generator function to create the indexOf and lastIndexOf functions - function createIndexFinder(dir, predicateFind, sortedIndex) { - return function(array, item, idx) { - var i = 0, length = getLength(array); - if (typeof idx == 'number') { - if (dir > 0) { - i = idx >= 0 ? idx : Math.max(idx + length, i); - } else { - length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; - } - } else if (sortedIndex && idx && length) { - idx = sortedIndex(array, item); - return array[idx] === item ? idx : -1; - } - if (item !== item) { - idx = predicateFind(slice.call(array, i, length), _.isNaN); - return idx >= 0 ? idx + i : -1; - } - for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { - if (array[idx] === item) return idx; - } - return -1; - }; - } - - // Return the position of the first occurrence of an item in an array, - // or -1 if the item is not included in the array. - // If the array is large and already in sort order, pass `true` - // for **isSorted** to use binary search. - _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex); - _.lastIndexOf = createIndexFinder(-1, _.findLastIndex); - - // Generate an integer Array containing an arithmetic progression. A port of - // the native Python `range()` function. See - // [the Python documentation](http://docs.python.org/library/functions.html#range). - _.range = function(start, stop, step) { - if (stop == null) { - stop = start || 0; - start = 0; - } - step = step || 1; - - var length = Math.max(Math.ceil((stop - start) / step), 0); - var range = Array(length); - - for (var idx = 0; idx < length; idx++, start += step) { - range[idx] = start; - } - - return range; - }; - - // Function (ahem) Functions - // ------------------ - - // Determines whether to execute a function as a constructor - // or a normal function with the provided arguments - var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) { - if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); - var self = baseCreate(sourceFunc.prototype); - var result = sourceFunc.apply(self, args); - if (_.isObject(result)) return result; - return self; - }; - - // Create a function bound to a given object (assigning `this`, and arguments, - // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if - // available. - _.bind = function(func, context) { - if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); - var args = slice.call(arguments, 2); - var bound = function() { - return executeBound(func, bound, context, this, args.concat(slice.call(arguments))); - }; - return bound; - }; - - // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. _ acts - // as a placeholder, allowing any combination of arguments to be pre-filled. - _.partial = function(func) { - var boundArgs = slice.call(arguments, 1); - var bound = function() { - var position = 0, length = boundArgs.length; - var args = Array(length); - for (var i = 0; i < length; i++) { - args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i]; - } - while (position < arguments.length) args.push(arguments[position++]); - return executeBound(func, bound, this, this, args); - }; - return bound; - }; - - // Bind a number of an object's methods to that object. Remaining arguments - // are the method names to be bound. Useful for ensuring that all callbacks - // defined on an object belong to it. - _.bindAll = function(obj) { - var i, length = arguments.length, key; - if (length <= 1) throw new Error('bindAll must be passed function names'); - for (i = 1; i < length; i++) { - key = arguments[i]; - obj[key] = _.bind(obj[key], obj); - } - return obj; - }; - - // Memoize an expensive function by storing its results. - _.memoize = function(func, hasher) { - var memoize = function(key) { - var cache = memoize.cache; - var address = '' + (hasher ? hasher.apply(this, arguments) : key); - if (!_.has(cache, address)) cache[address] = func.apply(this, arguments); - return cache[address]; - }; - memoize.cache = {}; - return memoize; - }; - - // Delays a function for the given number of milliseconds, and then calls - // it with the arguments supplied. - _.delay = function(func, wait) { - var args = slice.call(arguments, 2); - return setTimeout(function(){ - return func.apply(null, args); - }, wait); - }; - - // Defers a function, scheduling it to run after the current call stack has - // cleared. - _.defer = _.partial(_.delay, _, 1); - - // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. Normally, the throttled function will run - // as much as it can, without ever going more than once per `wait` duration; - // but if you'd like to disable the execution on the leading edge, pass - // `{leading: false}`. To disable execution on the trailing edge, ditto. - _.throttle = function(func, wait, options) { - var context, args, result; - var timeout = null; - var previous = 0; - if (!options) options = {}; - var later = function() { - previous = options.leading === false ? 0 : _.now(); - timeout = null; - result = func.apply(context, args); - if (!timeout) context = args = null; - }; - return function() { - var now = _.now(); - if (!previous && options.leading === false) previous = now; - var remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0 || remaining > wait) { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - previous = now; - result = func.apply(context, args); - if (!timeout) context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; - }; - - // Returns a function, that, as long as it continues to be invoked, will not - // be triggered. The function will be called after it stops being called for - // N milliseconds. If `immediate` is passed, trigger the function on the - // leading edge, instead of the trailing. - _.debounce = function(func, wait, immediate) { - var timeout, args, context, timestamp, result; - - var later = function() { - var last = _.now() - timestamp; - - if (last < wait && last >= 0) { - timeout = setTimeout(later, wait - last); - } else { - timeout = null; - if (!immediate) { - result = func.apply(context, args); - if (!timeout) context = args = null; - } - } - }; - - return function() { - context = this; - args = arguments; - timestamp = _.now(); - var callNow = immediate && !timeout; - if (!timeout) timeout = setTimeout(later, wait); - if (callNow) { - result = func.apply(context, args); - context = args = null; - } - - return result; - }; - }; - - // Returns the first function passed as an argument to the second, - // allowing you to adjust arguments, run code before and after, and - // conditionally execute the original function. - _.wrap = function(func, wrapper) { - return _.partial(wrapper, func); - }; - - // Returns a negated version of the passed-in predicate. - _.negate = function(predicate) { - return function() { - return !predicate.apply(this, arguments); - }; - }; - - // Returns a function that is the composition of a list of functions, each - // consuming the return value of the function that follows. - _.compose = function() { - var args = arguments; - var start = args.length - 1; - return function() { - var i = start; - var result = args[start].apply(this, arguments); - while (i--) result = args[i].call(this, result); - return result; - }; - }; - - // Returns a function that will only be executed on and after the Nth call. - _.after = function(times, func) { - return function() { - if (--times < 1) { - return func.apply(this, arguments); - } - }; - }; - - // Returns a function that will only be executed up to (but not including) the Nth call. - _.before = function(times, func) { - var memo; - return function() { - if (--times > 0) { - memo = func.apply(this, arguments); - } - if (times <= 1) func = null; - return memo; - }; - }; - - // Returns a function that will be executed at most one time, no matter how - // often you call it. Useful for lazy initialization. - _.once = _.partial(_.before, 2); - - // Object Functions - // ---------------- - - // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. - var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); - var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', - 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; - - function collectNonEnumProps(obj, keys) { - var nonEnumIdx = nonEnumerableProps.length; - var constructor = obj.constructor; - var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto; - - // Constructor is a special case. - var prop = 'constructor'; - if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); - - while (nonEnumIdx--) { - prop = nonEnumerableProps[nonEnumIdx]; - if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) { - keys.push(prop); - } - } - } - - // Retrieve the names of an object's own properties. - // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = function(obj) { - if (!_.isObject(obj)) return []; - if (nativeKeys) return nativeKeys(obj); - var keys = []; - for (var key in obj) if (_.has(obj, key)) keys.push(key); - // Ahem, IE < 9. - if (hasEnumBug) collectNonEnumProps(obj, keys); - return keys; - }; - - // Retrieve all the property names of an object. - _.allKeys = function(obj) { - if (!_.isObject(obj)) return []; - var keys = []; - for (var key in obj) keys.push(key); - // Ahem, IE < 9. - if (hasEnumBug) collectNonEnumProps(obj, keys); - return keys; - }; - - // Retrieve the values of an object's properties. - _.values = function(obj) { - var keys = _.keys(obj); - var length = keys.length; - var values = Array(length); - for (var i = 0; i < length; i++) { - values[i] = obj[keys[i]]; - } - return values; - }; - - // Returns the results of applying the iteratee to each element of the object - // In contrast to _.map it returns an object - _.mapObject = function(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var keys = _.keys(obj), - length = keys.length, - results = {}, - currentKey; - for (var index = 0; index < length; index++) { - currentKey = keys[index]; - results[currentKey] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - }; - - // Convert an object into a list of `[key, value]` pairs. - _.pairs = function(obj) { - var keys = _.keys(obj); - var length = keys.length; - var pairs = Array(length); - for (var i = 0; i < length; i++) { - pairs[i] = [keys[i], obj[keys[i]]]; - } - return pairs; - }; - - // Invert the keys and values of an object. The values must be serializable. - _.invert = function(obj) { - var result = {}; - var keys = _.keys(obj); - for (var i = 0, length = keys.length; i < length; i++) { - result[obj[keys[i]]] = keys[i]; - } - return result; - }; - - // Return a sorted list of the function names available on the object. - // Aliased as `methods` - _.functions = _.methods = function(obj) { - var names = []; - for (var key in obj) { - if (_.isFunction(obj[key])) names.push(key); - } - return names.sort(); - }; - - // Extend a given object with all the properties in passed-in object(s). - _.extend = createAssigner(_.allKeys); - - // Assigns a given object with all the own properties in the passed-in object(s) - // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) - _.extendOwn = _.assign = createAssigner(_.keys); - - // Returns the first key on an object that passes a predicate test - _.findKey = function(obj, predicate, context) { - predicate = cb(predicate, context); - var keys = _.keys(obj), key; - for (var i = 0, length = keys.length; i < length; i++) { - key = keys[i]; - if (predicate(obj[key], key, obj)) return key; - } - }; - - // Return a copy of the object only containing the whitelisted properties. - _.pick = function(object, oiteratee, context) { - var result = {}, obj = object, iteratee, keys; - if (obj == null) return result; - if (_.isFunction(oiteratee)) { - keys = _.allKeys(obj); - iteratee = optimizeCb(oiteratee, context); - } else { - keys = flatten(arguments, false, false, 1); - iteratee = function(value, key, obj) { return key in obj; }; - obj = Object(obj); - } - for (var i = 0, length = keys.length; i < length; i++) { - var key = keys[i]; - var value = obj[key]; - if (iteratee(value, key, obj)) result[key] = value; - } - return result; - }; - - // Return a copy of the object without the blacklisted properties. - _.omit = function(obj, iteratee, context) { - if (_.isFunction(iteratee)) { - iteratee = _.negate(iteratee); - } else { - var keys = _.map(flatten(arguments, false, false, 1), String); - iteratee = function(value, key) { - return !_.contains(keys, key); - }; - } - return _.pick(obj, iteratee, context); - }; - - // Fill in a given object with default properties. - _.defaults = createAssigner(_.allKeys, true); - - // Creates an object that inherits from the given prototype object. - // If additional properties are provided then they will be added to the - // created object. - _.create = function(prototype, props) { - var result = baseCreate(prototype); - if (props) _.extendOwn(result, props); - return result; - }; - - // Create a (shallow-cloned) duplicate of an object. - _.clone = function(obj) { - if (!_.isObject(obj)) return obj; - return _.isArray(obj) ? obj.slice() : _.extend({}, obj); - }; - - // Invokes interceptor with the obj, and then returns obj. - // The primary purpose of this method is to "tap into" a method chain, in - // order to perform operations on intermediate results within the chain. - _.tap = function(obj, interceptor) { - interceptor(obj); - return obj; - }; - - // Returns whether an object has a given set of `key:value` pairs. - _.isMatch = function(object, attrs) { - var keys = _.keys(attrs), length = keys.length; - if (object == null) return !length; - var obj = Object(object); - for (var i = 0; i < length; i++) { - var key = keys[i]; - if (attrs[key] !== obj[key] || !(key in obj)) return false; - } - return true; - }; - - - // Internal recursive comparison function for `isEqual`. - var eq = function(a, b, aStack, bStack) { - // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). - if (a === b) return a !== 0 || 1 / a === 1 / b; - // A strict comparison is necessary because `null == undefined`. - if (a == null || b == null) return a === b; - // Unwrap any wrapped objects. - if (a instanceof _) a = a._wrapped; - if (b instanceof _) b = b._wrapped; - // Compare `[[Class]]` names. - var className = toString.call(a); - if (className !== toString.call(b)) return false; - switch (className) { - // Strings, numbers, regular expressions, dates, and booleans are compared by value. - case '[object RegExp]': - // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return '' + a === '' + b; - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. - // Object(NaN) is equivalent to NaN - if (+a !== +a) return +b !== +b; - // An `egal` comparison is performed for other numeric values. - return +a === 0 ? 1 / +a === 1 / b : +a === +b; - case '[object Date]': - case '[object Boolean]': - // Coerce dates and booleans to numeric primitive values. Dates are compared by their - // millisecond representations. Note that invalid dates with millisecond representations - // of `NaN` are not equivalent. - return +a === +b; - } - - var areArrays = className === '[object Array]'; - if (!areArrays) { - if (typeof a != 'object' || typeof b != 'object') return false; - - // Objects with different constructors are not equivalent, but `Object`s or `Array`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && - _.isFunction(bCtor) && bCtor instanceof bCtor) - && ('constructor' in a && 'constructor' in b)) { - return false; - } - } - // Assume equality for cyclic structures. The algorithm for detecting cyclic - // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. - - // Initializing stack of traversed objects. - // It's done here since we only need them for objects and arrays comparison. - aStack = aStack || []; - bStack = bStack || []; - var length = aStack.length; - while (length--) { - // Linear search. Performance is inversely proportional to the number of - // unique nested structures. - if (aStack[length] === a) return bStack[length] === b; - } - - // Add the first object to the stack of traversed objects. - aStack.push(a); - bStack.push(b); - - // Recursively compare objects and arrays. - if (areArrays) { - // Compare array lengths to determine if a deep comparison is necessary. - length = a.length; - if (length !== b.length) return false; - // Deep compare the contents, ignoring non-numeric properties. - while (length--) { - if (!eq(a[length], b[length], aStack, bStack)) return false; - } - } else { - // Deep compare objects. - var keys = _.keys(a), key; - length = keys.length; - // Ensure that both objects contain the same number of properties before comparing deep equality. - if (_.keys(b).length !== length) return false; - while (length--) { - // Deep compare each member - key = keys[length]; - if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; - } - } - // Remove the first object from the stack of traversed objects. - aStack.pop(); - bStack.pop(); - return true; - }; - - // Perform a deep comparison to check if two objects are equal. - _.isEqual = function(a, b) { - return eq(a, b); - }; - - // Is a given array, string, or object empty? - // An "empty" object has no enumerable own-properties. - _.isEmpty = function(obj) { - if (obj == null) return true; - if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0; - return _.keys(obj).length === 0; - }; - - // Is a given value a DOM element? - _.isElement = function(obj) { - return !!(obj && obj.nodeType === 1); - }; - - // Is a given value an array? - // Delegates to ECMA5's native Array.isArray - _.isArray = nativeIsArray || function(obj) { - return toString.call(obj) === '[object Array]'; - }; - - // Is a given variable an object? - _.isObject = function(obj) { - var type = typeof obj; - return type === 'function' || type === 'object' && !!obj; - }; - - // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError. - _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) { - _['is' + name] = function(obj) { - return toString.call(obj) === '[object ' + name + ']'; - }; - }); - - // Define a fallback version of the method in browsers (ahem, IE < 9), where - // there isn't any inspectable "Arguments" type. - if (!_.isArguments(arguments)) { - _.isArguments = function(obj) { - return _.has(obj, 'callee'); - }; - } - - // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8, - // IE 11 (#1621), and in Safari 8 (#1929). - if (typeof /./ != 'function' && typeof Int8Array != 'object') { - _.isFunction = function(obj) { - return typeof obj == 'function' || false; - }; - } - - // Is a given object a finite number? - _.isFinite = function(obj) { - return isFinite(obj) && !isNaN(parseFloat(obj)); - }; - - // Is the given value `NaN`? (NaN is the only number which does not equal itself). - _.isNaN = function(obj) { - return _.isNumber(obj) && obj !== +obj; - }; - - // Is a given value a boolean? - _.isBoolean = function(obj) { - return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; - }; - - // Is a given value equal to null? - _.isNull = function(obj) { - return obj === null; - }; - - // Is a given variable undefined? - _.isUndefined = function(obj) { - return obj === void 0; - }; - - // Shortcut function for checking if an object has a given property directly - // on itself (in other words, not on a prototype). - _.has = function(obj, key) { - return obj != null && hasOwnProperty.call(obj, key); - }; - - // Utility Functions - // ----------------- - - // Run Underscore.js in *noConflict* mode, returning the `_` variable to its - // previous owner. Returns a reference to the Underscore object. - _.noConflict = function() { - root._ = previousUnderscore; - return this; - }; - - // Keep the identity function around for default iteratees. - _.identity = function(value) { - return value; - }; - - // Predicate-generating functions. Often useful outside of Underscore. - _.constant = function(value) { - return function() { - return value; - }; - }; - - _.noop = function(){}; - - _.property = property; - - // Generates a function for a given object that returns a given property. - _.propertyOf = function(obj) { - return obj == null ? function(){} : function(key) { - return obj[key]; - }; - }; - - // Returns a predicate for checking whether an object has a given set of - // `key:value` pairs. - _.matcher = _.matches = function(attrs) { - attrs = _.extendOwn({}, attrs); - return function(obj) { - return _.isMatch(obj, attrs); - }; - }; - - // Run a function **n** times. - _.times = function(n, iteratee, context) { - var accum = Array(Math.max(0, n)); - iteratee = optimizeCb(iteratee, context, 1); - for (var i = 0; i < n; i++) accum[i] = iteratee(i); - return accum; - }; - - // Return a random integer between min and max (inclusive). - _.random = function(min, max) { - if (max == null) { - max = min; - min = 0; - } - return min + Math.floor(Math.random() * (max - min + 1)); - }; - - // A (possibly faster) way to get the current timestamp as an integer. - _.now = Date.now || function() { - return new Date().getTime(); - }; - - // List of HTML entities for escaping. - var escapeMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' - }; - var unescapeMap = _.invert(escapeMap); - - // Functions for escaping and unescaping strings to/from HTML interpolation. - var createEscaper = function(map) { - var escaper = function(match) { - return map[match]; - }; - // Regexes for identifying a key that needs to be escaped - var source = '(?:' + _.keys(map).join('|') + ')'; - var testRegexp = RegExp(source); - var replaceRegexp = RegExp(source, 'g'); - return function(string) { - string = string == null ? '' : '' + string; - return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; - }; - }; - _.escape = createEscaper(escapeMap); - _.unescape = createEscaper(unescapeMap); - - // If the value of the named `property` is a function then invoke it with the - // `object` as context; otherwise, return it. - _.result = function(object, property, fallback) { - var value = object == null ? void 0 : object[property]; - if (value === void 0) { - value = fallback; - } - return _.isFunction(value) ? value.call(object) : value; - }; - - // Generate a unique integer id (unique within the entire client session). - // Useful for temporary DOM ids. - var idCounter = 0; - _.uniqueId = function(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; - }; - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\u2028|\u2029/g; - - var escapeChar = function(match) { - return '\\' + escapes[match]; - }; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - // NB: `oldSettings` only exists for backwards compatibility. - _.template = function(text, settings, oldSettings) { - if (!settings && oldSettings) settings = oldSettings; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset).replace(escaper, escapeChar); - index = offset + match.length; - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } else if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } else if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - - // Adobe VMs need the match returned to produce the correct offest. - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + 'return __p;\n'; - - try { - var render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled source as a convenience for precompilation. - var argument = settings.variable || 'obj'; - template.source = 'function(' + argument + '){\n' + source + '}'; - - return template; - }; - - // Add a "chain" function. Start chaining a wrapped Underscore object. - _.chain = function(obj) { - var instance = _(obj); - instance._chain = true; - return instance; - }; - - // OOP - // --------------- - // If Underscore is called as a function, it returns a wrapped object that - // can be used OO-style. This wrapper holds altered versions of all the - // underscore functions. Wrapped objects may be chained. - - // Helper function to continue chaining intermediate results. - var result = function(instance, obj) { - return instance._chain ? _(obj).chain() : obj; - }; - - // Add your own custom functions to the Underscore object. - _.mixin = function(obj) { - _.each(_.functions(obj), function(name) { - var func = _[name] = obj[name]; - _.prototype[name] = function() { - var args = [this._wrapped]; - push.apply(args, arguments); - return result(this, func.apply(_, args)); - }; - }); - }; - - // Add all of the Underscore functions to the wrapper object. - _.mixin(_); - - // Add all mutator Array functions to the wrapper. - _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - var obj = this._wrapped; - method.apply(obj, arguments); - if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; - return result(this, obj); - }; - }); - - // Add all accessor Array functions to the wrapper. - _.each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - return result(this, method.apply(this._wrapped, arguments)); - }; - }); - - // Extracts the result from a wrapped and chained object. - _.prototype.value = function() { - return this._wrapped; - }; - - // Provide unwrapping proxy for some methods used in engine operations - // such as arithmetic and JSON stringification. - _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; - - _.prototype.toString = function() { - return '' + this._wrapped; - }; - - // AMD registration happens at the end for compatibility with AMD loaders - // that may not enforce next-turn semantics on modules. Even though general - // practice for AMD registration is to be anonymous, underscore registers - // as a named module because, like jQuery, it is a base library that is - // popular enough to be bundled in a third party lib, but not be part of - // an AMD load request. Those cases could generate an error when an - // anonymous define() is called outside of a loader request. - if (typeof define === 'function' && define.amd) { - define('underscore', [], function() { - return _; - }); - } -}.call(this)); diff --git a/node_modules/uuid/.eslintrc.json b/node_modules/uuid/.eslintrc.json deleted file mode 100644 index 734a8e1..0000000 --- a/node_modules/uuid/.eslintrc.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "root": true, - "env": { - "browser": true, - "commonjs": true, - "node": true, - "mocha": true - }, - "extends": ["eslint:recommended"], - "rules": { - "array-bracket-spacing": ["warn", "never"], - "arrow-body-style": ["warn", "as-needed"], - "arrow-parens": ["warn", "as-needed"], - "arrow-spacing": "warn", - "brace-style": ["warn", "1tbs"], - "camelcase": "warn", - "comma-spacing": ["warn", {"after": true}], - "dot-notation": "warn", - "eqeqeq": ["warn", "smart"], - "indent": ["warn", 2, { - "SwitchCase": 1, - "FunctionDeclaration": {"parameters": 1}, - "MemberExpression": 1, - "CallExpression": {"arguments": 1} - }], - "key-spacing": ["warn", {"beforeColon": false, "afterColon": true, "mode": "minimum"}], - "keyword-spacing": "warn", - "no-console": "off", - "no-empty": "off", - "no-multi-spaces": "warn", - "no-redeclare": "off", - "no-restricted-globals": ["warn", "Promise"], - "no-trailing-spaces": "warn", - "no-undef": "error", - "no-unused-vars": ["warn", {"args": "none"}], - "one-var": ["warn", "never"], - "padded-blocks": ["warn", "never"], - "object-curly-spacing": ["warn", "never"], - "quotes": ["warn", "single"], - "react/prop-types": "off", - "react/jsx-no-bind": "off", - "semi": ["warn", "always"], - "space-before-blocks": ["warn", "always"], - "space-before-function-paren": ["warn", "never"], - "space-in-parens": ["warn", "never"] - } -} diff --git a/node_modules/uuid/AUTHORS b/node_modules/uuid/AUTHORS deleted file mode 100644 index 5a10523..0000000 --- a/node_modules/uuid/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -Robert Kieffer -Christoph Tavan -AJ ONeal -Vincent Voyer -Roman Shtylman diff --git a/node_modules/uuid/CHANGELOG.md b/node_modules/uuid/CHANGELOG.md deleted file mode 100644 index f29d399..0000000 --- a/node_modules/uuid/CHANGELOG.md +++ /dev/null @@ -1,110 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [3.3.2](https://github.com/kelektiv/node-uuid/compare/v3.3.1...v3.3.2) (2018-06-28) - - -### Bug Fixes - -* typo ([305d877](https://github.com/kelektiv/node-uuid/commit/305d877)) - - - - -## [3.3.1](https://github.com/kelektiv/node-uuid/compare/v3.3.0...v3.3.1) (2018-06-28) - - -### Bug Fixes - -* fix [#284](https://github.com/kelektiv/node-uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/kelektiv/node-uuid/commit/f2a60f2)) - - - - -# [3.3.0](https://github.com/kelektiv/node-uuid/compare/v3.2.1...v3.3.0) (2018-06-22) - - -### Bug Fixes - -* assignment to readonly property to allow running in strict mode ([#270](https://github.com/kelektiv/node-uuid/issues/270)) ([d062fdc](https://github.com/kelektiv/node-uuid/commit/d062fdc)) -* fix [#229](https://github.com/kelektiv/node-uuid/issues/229) ([c9684d4](https://github.com/kelektiv/node-uuid/commit/c9684d4)) -* Get correct version of IE11 crypto ([#274](https://github.com/kelektiv/node-uuid/issues/274)) ([153d331](https://github.com/kelektiv/node-uuid/commit/153d331)) -* mem issue when generating uuid ([#267](https://github.com/kelektiv/node-uuid/issues/267)) ([c47702c](https://github.com/kelektiv/node-uuid/commit/c47702c)) - -### Features - -* enforce Conventional Commit style commit messages ([#282](https://github.com/kelektiv/node-uuid/issues/282)) ([cc9a182](https://github.com/kelektiv/node-uuid/commit/cc9a182)) - - - -## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.2.0...v3.2.1) (2018-01-16) - - -### Bug Fixes - -* use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b)) - - - - -# [3.2.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.0) (2018-01-16) - - -### Bug Fixes - -* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/kelektiv/node-uuid/commit/09fa824)) -* use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b)) - - -### Features - -* Add v3 Support ([#217](https://github.com/kelektiv/node-uuid/issues/217)) ([d94f726](https://github.com/kelektiv/node-uuid/commit/d94f726)) - - -# [3.1.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.0.1) (2017-06-17) - -### Bug Fixes - -* (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) -* Fix typo (#178) -* Simple typo fix (#165) - -### Features -* v5 support in CLI (#197) -* V5 support (#188) - - -# 3.0.1 (2016-11-28) - -* split uuid versions into separate files - - -# 3.0.0 (2016-11-17) - -* remove .parse and .unparse - - -# 2.0.0 - -* Removed uuid.BufferClass - - -# 1.4.0 - -* Improved module context detection -* Removed public RNG functions - - -# 1.3.2 - -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - - -# 1.3.0 - -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/uuid/LICENSE.md b/node_modules/uuid/LICENSE.md deleted file mode 100644 index 8c84e39..0000000 --- a/node_modules/uuid/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010-2016 Robert Kieffer and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/uuid/README.md b/node_modules/uuid/README.md deleted file mode 100644 index 9cbe1ac..0000000 --- a/node_modules/uuid/README.md +++ /dev/null @@ -1,293 +0,0 @@ - - -# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Support for version 1, 3, 4 and 5 UUIDs -* Cross-platform -* Uses cryptographically-strong random number APIs (when available) -* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) - -[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be -supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] - -## Quickstart - CommonJS (Recommended) - -```shell -npm install uuid -``` - -Then generate your uuid version of choice ... - -Version 1 (timestamp): - -```javascript -const uuidv1 = require('uuid/v1'); -uuidv1(); // ⇨ '45745c60-7b1a-11e8-9c9c-2d42b21b1a3e' - -``` - -Version 3 (namespace): - -```javascript -const uuidv3 = require('uuid/v3'); - -// ... using predefined DNS namespace (for domain names) -uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6' - -// ... using predefined URL namespace (for, well, URLs) -uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138' - -// ... using a custom namespace -// -// Note: Custom namespaces should be a UUID string specific to your application! -// E.g. the one here was generated using this modules `uuid` CLI. -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; -uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686' - -``` - -Version 4 (random): - -```javascript -const uuidv4 = require('uuid/v4'); -uuidv4(); // ⇨ '10ba038e-48da-487b-96e8-8d3b99b6d18a' - -``` - -Version 5 (namespace): - -```javascript -const uuidv5 = require('uuid/v5'); - -// ... using predefined DNS namespace (for domain names) -uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec' - -// ... using predefined URL namespace (for, well, URLs) -uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1' - -// ... using a custom namespace -// -// Note: Custom namespaces should be a UUID string specific to your application! -// E.g. the one here was generated using this modules `uuid` CLI. -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; -uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' - -``` - -## Quickstart - Browser-ready Versions - -Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in). - -For version 1 uuids: - -```html - - -``` - -For version 3 uuids: - -```html - - -``` - -For version 4 uuids: - -```html - - -``` - -For version 5 uuids: - -```html - - -``` - -## API - -### Version 1 - -```javascript -const uuidv1 = require('uuid/v1'); - -// Incantations -uuidv1(); -uuidv1(options); -uuidv1(options, buffer, offset); -``` - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. - * `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. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Note: The id is generated guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -const v1options = { - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}; -uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' - -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -const arr = new Array(); -uuidv1(null, arr, 0); // ⇨ [ 69, 117, 109, 208, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62 ] -uuidv1(null, arr, 16); // ⇨ [ 69, 117, 109, 208, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62, 69, 117, 109, 209, 123, 26, 17, 232, 146, 52, 45, 66, 178, 27, 26, 62 ] - -``` - -### Version 3 - -```javascript -const uuidv3 = require('uuid/v3'); - -// Incantations -uuidv3(name, namespace); -uuidv3(name, namespace, buffer); -uuidv3(name, namespace, buffer, offset); -``` - -Generate and return a RFC4122 v3 UUID. - -* `name` - (String | Array[]) "name" to create UUID with -* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: - -```javascript -uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424' - -``` - -### Version 4 - -```javascript -const uuidv4 = require('uuid/v4') - -// Incantations -uuidv4(); -uuidv4(options); -uuidv4(options, buffer, offset); -``` - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with predefined `random` values - -```javascript -const v4options = { - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}; -uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' - -``` - -Example: Generate two IDs in a single buffer - -```javascript -const buffer = new Array(); -uuidv4(null, buffer, 0); // ⇨ [ 54, 122, 218, 70, 45, 70, 65, 24, 171, 53, 95, 130, 83, 195, 242, 45 ] -uuidv4(null, buffer, 16); // ⇨ [ 54, 122, 218, 70, 45, 70, 65, 24, 171, 53, 95, 130, 83, 195, 242, 45, 108, 204, 255, 103, 171, 86, 76, 94, 178, 225, 188, 236, 150, 20, 151, 87 ] - -``` - -### Version 5 - -```javascript -const uuidv5 = require('uuid/v5'); - -// Incantations -uuidv5(name, namespace); -uuidv5(name, namespace, buffer); -uuidv5(name, namespace, buffer, offset); -``` - -Generate and return a RFC4122 v5 UUID. - -* `name` - (String | Array[]) "name" to create UUID with -* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: - -```javascript -uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b' - -``` - -## Command Line - -UUIDs can be generated from the command line with the `uuid` command. - -```shell -$ uuid -ddeb27fb-d9a0-4624-be4d-4615062daed4 - -$ uuid v1 -02d37060-d446-11e7-a9fa-7bdae751ebe1 -``` - -Type `uuid --help` for usage details - -## Testing - -```shell -npm test -``` - ----- -Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/node_modules/uuid/README_js.md b/node_modules/uuid/README_js.md deleted file mode 100644 index f34453b..0000000 --- a/node_modules/uuid/README_js.md +++ /dev/null @@ -1,280 +0,0 @@ -```javascript --hide -runmd.onRequire = path => path.replace(/^uuid/, './'); -``` - -# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Support for version 1, 3, 4 and 5 UUIDs -* Cross-platform -* Uses cryptographically-strong random number APIs (when available) -* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) - -[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be -supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] - -## Quickstart - CommonJS (Recommended) - -```shell -npm install uuid -``` - -Then generate your uuid version of choice ... - -Version 1 (timestamp): - -```javascript --run v1 -const uuidv1 = require('uuid/v1'); -uuidv1(); // RESULT -``` - -Version 3 (namespace): - -```javascript --run v3 -const uuidv3 = require('uuid/v3'); - -// ... using predefined DNS namespace (for domain names) -uuidv3('hello.example.com', uuidv3.DNS); // RESULT - -// ... using predefined URL namespace (for, well, URLs) -uuidv3('http://example.com/hello', uuidv3.URL); // RESULT - -// ... using a custom namespace -// -// Note: Custom namespaces should be a UUID string specific to your application! -// E.g. the one here was generated using this modules `uuid` CLI. -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; -uuidv3('Hello, World!', MY_NAMESPACE); // RESULT -``` - -Version 4 (random): - -```javascript --run v4 -const uuidv4 = require('uuid/v4'); -uuidv4(); // RESULT -``` - -Version 5 (namespace): - -```javascript --run v5 -const uuidv5 = require('uuid/v5'); - -// ... using predefined DNS namespace (for domain names) -uuidv5('hello.example.com', uuidv5.DNS); // RESULT - -// ... using predefined URL namespace (for, well, URLs) -uuidv5('http://example.com/hello', uuidv5.URL); // RESULT - -// ... using a custom namespace -// -// Note: Custom namespaces should be a UUID string specific to your application! -// E.g. the one here was generated using this modules `uuid` CLI. -const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; -uuidv5('Hello, World!', MY_NAMESPACE); // RESULT -``` - -## Quickstart - Browser-ready Versions - -Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in). - -For version 1 uuids: - -```html - - -``` - -For version 3 uuids: - -```html - - -``` - -For version 4 uuids: - -```html - - -``` - -For version 5 uuids: - -```html - - -``` - -## API - -### Version 1 - -```javascript -const uuidv1 = require('uuid/v1'); - -// Incantations -uuidv1(); -uuidv1(options); -uuidv1(options, buffer, offset); -``` - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. - * `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. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Note: The id is generated guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript --run v1 -const v1options = { - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}; -uuidv1(v1options); // RESULT -``` - -Example: In-place generation of two binary IDs - -```javascript --run v1 -// Generate two ids in an array -const arr = new Array(); -uuidv1(null, arr, 0); // RESULT -uuidv1(null, arr, 16); // RESULT -``` - -### Version 3 - -```javascript -const uuidv3 = require('uuid/v3'); - -// Incantations -uuidv3(name, namespace); -uuidv3(name, namespace, buffer); -uuidv3(name, namespace, buffer, offset); -``` - -Generate and return a RFC4122 v3 UUID. - -* `name` - (String | Array[]) "name" to create UUID with -* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: - -```javascript --run v3 -uuidv3('hello world', MY_NAMESPACE); // RESULT -``` - -### Version 4 - -```javascript -const uuidv4 = require('uuid/v4') - -// Incantations -uuidv4(); -uuidv4(options); -uuidv4(options, buffer, offset); -``` - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with predefined `random` values - -```javascript --run v4 -const v4options = { - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}; -uuidv4(v4options); // RESULT -``` - -Example: Generate two IDs in a single buffer - -```javascript --run v4 -const buffer = new Array(); -uuidv4(null, buffer, 0); // RESULT -uuidv4(null, buffer, 16); // RESULT -``` - -### Version 5 - -```javascript -const uuidv5 = require('uuid/v5'); - -// Incantations -uuidv5(name, namespace); -uuidv5(name, namespace, buffer); -uuidv5(name, namespace, buffer, offset); -``` - -Generate and return a RFC4122 v5 UUID. - -* `name` - (String | Array[]) "name" to create UUID with -* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: - -```javascript --run v5 -uuidv5('hello world', MY_NAMESPACE); // RESULT -``` - -## Command Line - -UUIDs can be generated from the command line with the `uuid` command. - -```shell -$ uuid -ddeb27fb-d9a0-4624-be4d-4615062daed4 - -$ uuid v1 -02d37060-d446-11e7-a9fa-7bdae751ebe1 -``` - -Type `uuid --help` for usage details - -## Testing - -```shell -npm test -``` diff --git a/node_modules/uuid/bin/uuid b/node_modules/uuid/bin/uuid deleted file mode 100644 index 502626e..0000000 --- a/node_modules/uuid/bin/uuid +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env node -var assert = require('assert'); - -function usage() { - console.log('Usage:'); - console.log(' uuid'); - console.log(' uuid v1'); - console.log(' uuid v3 '); - console.log(' uuid v4'); - console.log(' uuid v5 '); - console.log(' uuid --help'); - console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); -} - -var args = process.argv.slice(2); - -if (args.indexOf('--help') >= 0) { - usage(); - process.exit(0); -} -var version = args.shift() || 'v4'; - -switch (version) { - case 'v1': - var uuidV1 = require('../v1'); - console.log(uuidV1()); - break; - - case 'v3': - var uuidV3 = require('../v3'); - - var name = args.shift(); - var namespace = args.shift(); - assert(name != null, 'v3 name not specified'); - assert(namespace != null, 'v3 namespace not specified'); - - if (namespace == 'URL') namespace = uuidV3.URL; - if (namespace == 'DNS') namespace = uuidV3.DNS; - - console.log(uuidV3(name, namespace)); - break; - - case 'v4': - var uuidV4 = require('../v4'); - console.log(uuidV4()); - break; - - case 'v5': - var uuidV5 = require('../v5'); - - var name = args.shift(); - var namespace = args.shift(); - assert(name != null, 'v5 name not specified'); - assert(namespace != null, 'v5 namespace not specified'); - - if (namespace == 'URL') namespace = uuidV5.URL; - if (namespace == 'DNS') namespace = uuidV5.DNS; - - console.log(uuidV5(name, namespace)); - break; - - default: - usage(); - process.exit(1); -} diff --git a/node_modules/uuid/index.js b/node_modules/uuid/index.js deleted file mode 100644 index e96791a..0000000 --- a/node_modules/uuid/index.js +++ /dev/null @@ -1,8 +0,0 @@ -var v1 = require('./v1'); -var v4 = require('./v4'); - -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; - -module.exports = uuid; diff --git a/node_modules/uuid/lib/bytesToUuid.js b/node_modules/uuid/lib/bytesToUuid.js deleted file mode 100644 index 847c482..0000000 --- a/node_modules/uuid/lib/bytesToUuid.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); -} - -function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return ([bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]]]).join(''); -} - -module.exports = bytesToUuid; diff --git a/node_modules/uuid/lib/md5-browser.js b/node_modules/uuid/lib/md5-browser.js deleted file mode 100644 index 9b3b6c7..0000000 --- a/node_modules/uuid/lib/md5-browser.js +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Browser-compatible JavaScript MD5 - * - * Modification of JavaScript MD5 - * https://github.com/blueimp/JavaScript-MD5 - * - * Copyright 2011, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://opensource.org/licenses/MIT - * - * Based on - * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message - * Digest Algorithm, as defined in RFC 1321. - * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for more info. - */ - -'use strict'; - -function md5(bytes) { - if (typeof(bytes) == 'string') { - var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - bytes = new Array(msg.length); - for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); - } - - return md5ToHexEncodedArray( - wordsToMd5( - bytesToWords(bytes) - , bytes.length * 8) - ); -} - - -/* -* Convert an array of little-endian words to an array of bytes -*/ -function md5ToHexEncodedArray(input) { - var i; - var x; - var output = []; - var length32 = input.length * 32; - var hexTab = '0123456789abcdef'; - var hex; - - for (i = 0; i < length32; i += 8) { - x = (input[i >> 5] >>> (i % 32)) & 0xFF; - - hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16); - - output.push(hex); - } - return output; -} - -/* -* Calculate the MD5 of an array of little-endian words, and a bit length. -*/ -function wordsToMd5(x, len) { - /* append padding */ - x[len >> 5] |= 0x80 << (len % 32); - x[(((len + 64) >>> 9) << 4) + 14] = len; - - var i; - var olda; - var oldb; - var oldc; - var oldd; - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - - var d = 271733878; - - for (i = 0; i < x.length; i += 16) { - olda = a; - oldb = b; - oldc = c; - oldd = d; - - a = md5ff(a, b, c, d, x[i], 7, -680876936); - d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); - c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); - b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); - a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); - d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); - c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); - b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); - a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); - d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); - c = md5ff(c, d, a, b, x[i + 10], 17, -42063); - b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); - a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); - d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); - c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); - b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); - - a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); - d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); - c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); - b = md5gg(b, c, d, a, x[i], 20, -373897302); - a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); - d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); - c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); - b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); - a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); - d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); - c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); - b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); - a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); - d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); - c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); - b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); - - a = md5hh(a, b, c, d, x[i + 5], 4, -378558); - d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); - c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); - b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); - a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); - d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); - c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); - b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); - a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); - d = md5hh(d, a, b, c, x[i], 11, -358537222); - c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); - b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); - a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); - d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); - c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); - b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); - - a = md5ii(a, b, c, d, x[i], 6, -198630844); - d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); - c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); - b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); - a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); - d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); - c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); - b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); - a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); - d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); - c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); - b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); - a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); - d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); - c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); - b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); - - a = safeAdd(a, olda); - b = safeAdd(b, oldb); - c = safeAdd(c, oldc); - d = safeAdd(d, oldd); - } - return [a, b, c, d]; -} - -/* -* Convert an array bytes to an array of little-endian words -* Characters >255 have their high-byte silently ignored. -*/ -function bytesToWords(input) { - var i; - var output = []; - output[(input.length >> 2) - 1] = undefined; - for (i = 0; i < output.length; i += 1) { - output[i] = 0; - } - var length8 = input.length * 8; - for (i = 0; i < length8; i += 8) { - output[i >> 5] |= (input[(i / 8)] & 0xFF) << (i % 32); - } - - return output; -} - -/* -* Add integers, wrapping at 2^32. This uses 16-bit operations internally -* to work around bugs in some JS interpreters. -*/ -function safeAdd(x, y) { - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); -} - -/* -* Bitwise rotate a 32-bit number to the left. -*/ -function bitRotateLeft(num, cnt) { - return (num << cnt) | (num >>> (32 - cnt)); -} - -/* -* These functions implement the four basic operations the algorithm uses. -*/ -function md5cmn(q, a, b, x, s, t) { - return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); -} -function md5ff(a, b, c, d, x, s, t) { - return md5cmn((b & c) | ((~b) & d), a, b, x, s, t); -} -function md5gg(a, b, c, d, x, s, t) { - return md5cmn((b & d) | (c & (~d)), a, b, x, s, t); -} -function md5hh(a, b, c, d, x, s, t) { - return md5cmn(b ^ c ^ d, a, b, x, s, t); -} -function md5ii(a, b, c, d, x, s, t) { - return md5cmn(c ^ (b | (~d)), a, b, x, s, t); -} - -module.exports = md5; diff --git a/node_modules/uuid/lib/md5.js b/node_modules/uuid/lib/md5.js deleted file mode 100644 index 7044b87..0000000 --- a/node_modules/uuid/lib/md5.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -var crypto = require('crypto'); - -function md5(bytes) { - if (typeof Buffer.from === 'function') { - // Modern Buffer API - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - } else { - // Pre-v4 Buffer API - if (Array.isArray(bytes)) { - bytes = new Buffer(bytes); - } else if (typeof bytes === 'string') { - bytes = new Buffer(bytes, 'utf8'); - } - } - - return crypto.createHash('md5').update(bytes).digest(); -} - -module.exports = md5; diff --git a/node_modules/uuid/lib/rng-browser.js b/node_modules/uuid/lib/rng-browser.js deleted file mode 100644 index 6361fb8..0000000 --- a/node_modules/uuid/lib/rng-browser.js +++ /dev/null @@ -1,34 +0,0 @@ -// Unique ID creation requires a high quality random # generator. In the -// browser this is a little complicated due to unknown quality of Math.random() -// and inconsistent support for the `crypto` API. We do the best we can via -// feature-detection - -// getRandomValues needs to be invoked in a context where "this" is a Crypto -// implementation. Also, find the complete implementation of crypto on IE11. -var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || - (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto)); - -if (getRandomValues) { - // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto - var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef - - module.exports = function whatwgRNG() { - getRandomValues(rnds8); - return rnds8; - }; -} else { - // Math.random()-based (RNG) - // - // If all else fails, use Math.random(). It's fast, but is of unspecified - // quality. - var rnds = new Array(16); - - module.exports = function mathRNG() { - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) === 0) r = Math.random() * 0x100000000; - rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return rnds; - }; -} diff --git a/node_modules/uuid/lib/rng.js b/node_modules/uuid/lib/rng.js deleted file mode 100644 index 58f0dc9..0000000 --- a/node_modules/uuid/lib/rng.js +++ /dev/null @@ -1,8 +0,0 @@ -// Unique ID creation requires a high quality random # generator. In node.js -// this is pretty straight-forward - we use the crypto API. - -var crypto = require('crypto'); - -module.exports = function nodeRNG() { - return crypto.randomBytes(16); -}; diff --git a/node_modules/uuid/lib/sha1-browser.js b/node_modules/uuid/lib/sha1-browser.js deleted file mode 100644 index 5758ed7..0000000 --- a/node_modules/uuid/lib/sha1-browser.js +++ /dev/null @@ -1,89 +0,0 @@ -// Adapted from Chris Veness' SHA1 code at -// http://www.movable-type.co.uk/scripts/sha1.html -'use strict'; - -function f(s, x, y, z) { - switch (s) { - case 0: return (x & y) ^ (~x & z); - case 1: return x ^ y ^ z; - case 2: return (x & y) ^ (x & z) ^ (y & z); - case 3: return x ^ y ^ z; - } -} - -function ROTL(x, n) { - return (x << n) | (x>>> (32 - n)); -} - -function sha1(bytes) { - var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; - var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; - - if (typeof(bytes) == 'string') { - var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape - bytes = new Array(msg.length); - for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); - } - - bytes.push(0x80); - - var l = bytes.length/4 + 2; - var N = Math.ceil(l/16); - var M = new Array(N); - - for (var i=0; i>> 0; - e = d; - d = c; - c = ROTL(b, 30) >>> 0; - b = a; - a = T; - } - - H[0] = (H[0] + a) >>> 0; - H[1] = (H[1] + b) >>> 0; - H[2] = (H[2] + c) >>> 0; - H[3] = (H[3] + d) >>> 0; - H[4] = (H[4] + e) >>> 0; - } - - return [ - H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, - H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, - H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, - H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, - H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff - ]; -} - -module.exports = sha1; diff --git a/node_modules/uuid/lib/sha1.js b/node_modules/uuid/lib/sha1.js deleted file mode 100644 index 0b54b25..0000000 --- a/node_modules/uuid/lib/sha1.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -var crypto = require('crypto'); - -function sha1(bytes) { - if (typeof Buffer.from === 'function') { - // Modern Buffer API - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - } else { - // Pre-v4 Buffer API - if (Array.isArray(bytes)) { - bytes = new Buffer(bytes); - } else if (typeof bytes === 'string') { - bytes = new Buffer(bytes, 'utf8'); - } - } - - return crypto.createHash('sha1').update(bytes).digest(); -} - -module.exports = sha1; diff --git a/node_modules/uuid/lib/v35.js b/node_modules/uuid/lib/v35.js deleted file mode 100644 index 8b066cc..0000000 --- a/node_modules/uuid/lib/v35.js +++ /dev/null @@ -1,57 +0,0 @@ -var bytesToUuid = require('./bytesToUuid'); - -function uuidToBytes(uuid) { - // Note: We assume we're being passed a valid uuid string - var bytes = []; - uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) { - bytes.push(parseInt(hex, 16)); - }); - - return bytes; -} - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - var bytes = new Array(str.length); - for (var i = 0; i < str.length; i++) { - bytes[i] = str.charCodeAt(i); - } - return bytes; -} - -module.exports = function(name, version, hashfunc) { - var generateUUID = function(value, namespace, buf, offset) { - var off = buf && offset || 0; - - if (typeof(value) == 'string') value = stringToBytes(value); - if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace); - - if (!Array.isArray(value)) throw TypeError('value must be an array of bytes'); - if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); - - // Per 4.3 - var bytes = hashfunc(namespace.concat(value)); - bytes[6] = (bytes[6] & 0x0f) | version; - bytes[8] = (bytes[8] & 0x3f) | 0x80; - - if (buf) { - for (var idx = 0; idx < 16; ++idx) { - buf[off+idx] = bytes[idx]; - } - } - - return buf || bytesToUuid(bytes); - }; - - // Function#name is not settable on some platforms (#270) - try { - generateUUID.name = name; - } catch (err) { - } - - // Pre-defined namespaces, per Appendix C - generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; - generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; - - return generateUUID; -}; diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json deleted file mode 100644 index f7eaf85..0000000 --- a/node_modules/uuid/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "_from": "uuid@^3.3.2", - "_id": "uuid@3.3.2", - "_inBundle": false, - "_integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "_location": "/uuid", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "uuid@^3.3.2", - "name": "uuid", - "escapedName": "uuid", - "rawSpec": "^3.3.2", - "saveSpec": null, - "fetchSpec": "^3.3.2" - }, - "_requiredBy": [ - "/@actions/tool-cache", - "/request" - ], - "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "_shasum": "1b4af4955eb3077c501c23872fc6513811587131", - "_spec": "uuid@^3.3.2", - "_where": "C:\\Users\\damccorm\\Documents\\setup-go\\node_modules\\@actions\\tool-cache", - "bin": { - "uuid": "./bin/uuid" - }, - "browser": { - "./lib/rng.js": "./lib/rng-browser.js", - "./lib/sha1.js": "./lib/sha1-browser.js", - "./lib/md5.js": "./lib/md5-browser.js" - }, - "bugs": { - "url": "https://github.com/kelektiv/node-uuid/issues" - }, - "bundleDependencies": false, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "contributors": [ - { - "name": "Robert Kieffer", - "email": "robert@broofa.com" - }, - { - "name": "Christoph Tavan", - "email": "dev@tavan.de" - }, - { - "name": "AJ ONeal", - "email": "coolaj86@gmail.com" - }, - { - "name": "Vincent Voyer", - "email": "vincent@zeroload.net" - }, - { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - } - ], - "deprecated": false, - "description": "RFC4122 (v1, v4, and v5) UUIDs", - "devDependencies": { - "@commitlint/cli": "7.0.0", - "@commitlint/config-conventional": "7.0.1", - "eslint": "4.19.1", - "husky": "0.14.3", - "mocha": "5.2.0", - "runmd": "1.0.1", - "standard-version": "4.4.0" - }, - "homepage": "https://github.com/kelektiv/node-uuid#readme", - "keywords": [ - "uuid", - "guid", - "rfc4122" - ], - "license": "MIT", - "name": "uuid", - "repository": { - "type": "git", - "url": "git+https://github.com/kelektiv/node-uuid.git" - }, - "scripts": { - "commitmsg": "commitlint -E GIT_PARAMS", - "md": "runmd --watch --output=README.md README_js.md", - "prepare": "runmd --output=README.md README_js.md", - "release": "standard-version", - "test": "mocha test/test.js" - }, - "version": "3.3.2" -} diff --git a/node_modules/uuid/v1.js b/node_modules/uuid/v1.js deleted file mode 100644 index d84c0f4..0000000 --- a/node_modules/uuid/v1.js +++ /dev/null @@ -1,109 +0,0 @@ -var rng = require('./lib/rng'); -var bytesToUuid = require('./lib/bytesToUuid'); - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -var _nodeId; -var _clockseq; - -// Previous uuid creation time -var _lastMSecs = 0; -var _lastNSecs = 0; - -// See https://github.com/broofa/node-uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - var node = options.node || _nodeId; - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - - // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - if (node == null || clockseq == null) { - var seedBytes = rng(); - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [ - seedBytes[0] | 0x01, - seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] - ]; - } - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - for (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf ? buf : bytesToUuid(b); -} - -module.exports = v1; diff --git a/node_modules/uuid/v3.js b/node_modules/uuid/v3.js deleted file mode 100644 index ee7e14c..0000000 --- a/node_modules/uuid/v3.js +++ /dev/null @@ -1,4 +0,0 @@ -var v35 = require('./lib/v35.js'); -var md5 = require('./lib/md5'); - -module.exports = v35('v3', 0x30, md5); \ No newline at end of file diff --git a/node_modules/uuid/v4.js b/node_modules/uuid/v4.js deleted file mode 100644 index 1f07be1..0000000 --- a/node_modules/uuid/v4.js +++ /dev/null @@ -1,29 +0,0 @@ -var rng = require('./lib/rng'); -var bytesToUuid = require('./lib/bytesToUuid'); - -function v4(options, buf, offset) { - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || bytesToUuid(rnds); -} - -module.exports = v4; diff --git a/node_modules/uuid/v5.js b/node_modules/uuid/v5.js deleted file mode 100644 index 4945baf..0000000 --- a/node_modules/uuid/v5.js +++ /dev/null @@ -1,3 +0,0 @@ -var v35 = require('./lib/v35.js'); -var sha1 = require('./lib/sha1'); -module.exports = v35('v5', 0x50, sha1); diff --git a/package-lock.json b/package-lock.json index c7f53dc..a359c0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,30 +5,41 @@ "requires": true, "dependencies": { "@actions/core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.0.0.tgz", - "integrity": "sha512-aMIlkx96XH4E/2YZtEOeyrYQfhlas9jIRkfGPqMwXD095Rdkzo4lB6ZmbxPQSzD+e1M+Xsm98ZhuSMYGv/AlqA==" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.2.tgz", + "integrity": "sha512-IbCx7oefq+Gi6FWbSs2Fnw8VkEI6Y4gvjrYprY3RV//ksq/KPMlClOerJ4jRosyal6zkUIc8R9fS/cpRMlGClg==" }, "@actions/exec": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.0.tgz", - "integrity": "sha512-nquH0+XKng+Ll7rZfCojN7NWSbnGh+ltwUJhzfbLkmOJgxocGX2/yXcZLMyT9fa7+tByEow/NSTrBExNlEj9fw==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.3.tgz", + "integrity": "sha512-TogJGnueOmM7ntCi0ASTUj4LapRRtDfj57Ja4IhPmg2fls28uVOPbAn8N+JifaOumN2UG3oEO/Ixek2A4NcYSA==", + "requires": { + "@actions/io": "^1.0.1" + } + }, + "@actions/http-client": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.6.tgz", + "integrity": "sha512-LGmio4w98UyGX33b/W6V6Nx/sQHRXZ859YlMkn36wPsXPB82u8xTVlA/Dq2DXrm6lEq9RVmisRJa1c+HETAIJA==", + "requires": { + "tunnel": "0.0.6" + } }, "@actions/io": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.0.tgz", - "integrity": "sha512-ezrJSRdqtXtdx1WXlfYL85+40F7gB39jCK9P0jZVODW3W6xUYmu6ZOEc/UmmElUwhRyDRm1R4yNZu1Joq2kuQg==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz", + "integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==" }, "@actions/tool-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.0.0.tgz", - "integrity": "sha512-l3zT0IfDfi5Ik5aMpnXqGHGATxN8xa9ls4ue+X/CBXpPhRMRZS4vcuh5Q9T98WAGbkysRCfhpbksTPHIcKnNwQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.3.1.tgz", + "integrity": "sha512-sKoEJv0/c7WzjPEq2PO12Sc8QdEp58XIBHMm3c4lUn/iZWgLz9HBeCuFGpLQjDvXJNfLZ4g+WD+rMjgOmpH4Ag==", "requires": { - "@actions/core": "^1.0.0", + "@actions/core": "^1.2.0", "@actions/exec": "^1.0.0", - "@actions/io": "^1.0.0", + "@actions/http-client": "^1.0.3", + "@actions/io": "^1.0.1", "semver": "^6.1.0", - "typed-rest-client": "^1.4.0", "uuid": "^3.3.2" } }, @@ -530,27 +541,12 @@ "integrity": "sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA==", "dev": true }, - "@types/nock": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@types/nock/-/nock-10.0.3.tgz", - "integrity": "sha512-OthuN+2FuzfZO3yONJ/QVjKmLEuRagS9TV9lEId+WHL9KhftYG+/2z+pxlr0UgVVXSpVD8woie/3fzQn8ft/Ow==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "@types/node": { "version": "12.7.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.1.tgz", "integrity": "sha512-aK9jxMypeSrhiYofWWBf/T7O+KwaiAHzM4sveCdWPn71lzUSMimRnKzhXDKfKwV1kWoBo2P1aGgaIYGLf9/ljw==", "dev": true }, - "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", - "dev": true - }, "@types/semver": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.0.1.tgz", @@ -569,6 +565,12 @@ "integrity": "sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw==", "dev": true }, + "@zeit/ncc": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.21.0.tgz", + "integrity": "sha512-RUMdvVK/w78oo+yBjruZltt0kJXYar2un/1bYQ2LuHG7GmFVm+QjxzEmySwREctaJdEnBvlMdUNWd9hXHxEI3g==", + "dev": true + }, "abab": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", @@ -648,15 +650,6 @@ "normalize-path": "^2.1.1" } }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -977,30 +970,6 @@ "unset-value": "^1.0.0" } }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -1157,9 +1126,9 @@ } }, "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true, "optional": true }, @@ -1196,18 +1165,6 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - } - }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -1476,12 +1433,6 @@ } } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, "estraverse": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", @@ -2331,12 +2282,6 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, - "get-stdin": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", - "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", - "dev": true - }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -2394,9 +2339,9 @@ "dev": true }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.2.tgz", + "integrity": "sha512-4PwqDL2laXtTWZghzzCtunQUTLbo31pcCJrd/B/9JP8XbhVzpS5ZXuKqlOzsd1rtcaLo4KqAn8nl8mkknS4MHw==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -2500,24 +2445,6 @@ "sshpk": "^1.7.0" } }, - "husky": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/husky/-/husky-2.7.0.tgz", - "integrity": "sha512-LIi8zzT6PyFpcYKdvWRCn/8X+6SuG2TgYYMrM6ckEYhlp44UcEduVymZGIZNLiwOUjrEud+78w/AsAiqJA/kRg==", - "dev": true, - "requires": { - "cosmiconfig": "^5.2.0", - "execa": "^1.0.0", - "find-up": "^3.0.0", - "get-stdin": "^7.0.0", - "is-ci": "^2.0.0", - "pkg-dir": "^4.1.0", - "please-upgrade-node": "^3.1.1", - "read-pkg": "^5.1.1", - "run-node": "^1.0.0", - "slash": "^3.0.0" - } - }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -2527,16 +2454,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, "import-local": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", @@ -2687,12 +2604,6 @@ } } }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -3372,16 +3283,6 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -3516,12 +3417,6 @@ "type-check": "~0.3.2" } }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -4186,60 +4081,6 @@ "node-modules-regexp": "^1.0.0" } }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } - } - }, - "please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", - "dev": true, - "requires": { - "semver-compare": "^1.0.0" - } - }, "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", @@ -4332,32 +4173,6 @@ "integrity": "sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw==", "dev": true }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" - } - } - } - }, "read-pkg-up": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", @@ -4562,12 +4377,6 @@ "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", "dev": true }, - "run-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz", - "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==", - "dev": true - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -4617,12 +4426,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -4685,12 +4488,6 @@ "integrity": "sha512-SbEG75TzH8G7eVXFSN5f9EExILKfly7SUvVY5DhhYLvfhKqhDFY0OzevWa/zwak0RLRfWS5AvfMWpd9gJvr5Yg==", "dev": true }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -4880,12 +4677,6 @@ "extend-shallow": "^3.0.0" } }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -5173,9 +4964,9 @@ } }, "tunnel": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", - "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=" + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, "tunnel-agent": { "version": "0.6.0", @@ -5207,21 +4998,6 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - }, - "typed-rest-client": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.5.0.tgz", - "integrity": "sha512-DVZRlmsfnTjp6ZJaatcdyvvwYwbWvR4YDNFDqb+qdTxpvaVP99YCpBkA8rxsLtAPjBVoDe4fNsnMIdZTiPuKWg==", - "requires": { - "tunnel": "0.0.4", - "underscore": "1.8.3" - } - }, "typescript": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", @@ -5229,21 +5005,16 @@ "dev": true }, "uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", + "version": "3.7.6", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.6.tgz", + "integrity": "sha512-yYqjArOYSxvqeeiYH2VGjZOqq6SVmhxzaPjJC1W2F9e+bqvFL9QXQ2osQuKUFjM2hGjKG2YclQnRKWQSt/nOTQ==", "dev": true, "optional": true, "requires": { - "commander": "~2.20.0", + "commander": "~2.20.3", "source-map": "~0.6.1" } }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", diff --git a/package.json b/package.json index f9a3c03..294349d 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,11 @@ "description": "setup go action", "main": "lib/setup-go.js", "scripts": { - "build": "tsc", + "build": "tsc && ncc build", "format": "prettier --write **/*.ts", "format-check": "prettier --check **/*.ts", - "test": "jest" + "test": "jest", + "pre-checkin": "npm run format && npm run build && npm test" }, "repository": { "type": "git", @@ -22,29 +23,21 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@actions/core": "^1.0.0", - "@actions/tool-cache": "^1.0.0", + "@actions/core": "^1.2.2", + "@actions/http-client": "^1.0.6", + "@actions/tool-cache": "^1.3.1", "semver": "^6.1.1" }, "devDependencies": { - "@actions/io": "^1.0.0", "@types/jest": "^24.0.13", - "@types/nock": "^10.0.3", "@types/node": "^12.0.4", "@types/semver": "^6.0.0", - "husky": "^2.3.0", + "@zeit/ncc": "^0.21.0", "jest": "^24.8.0", "jest-circus": "^24.7.1", "nock": "^10.0.6", "prettier": "^1.17.1", "ts-jest": "^24.0.2", "typescript": "^3.5.1" - }, - "husky": { - "skipCI": true, - "hooks": { - "pre-commit": "npm run build && npm run format", - "post-commit": "npm prune --production && git add node_modules/* && git commit -m \"Husky commit correct node modules\"" - } } } diff --git a/src/installer.ts b/src/installer.ts index 9f25476..f925b46 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -1,223 +1,91 @@ -// Load tempDirectory before it gets wiped by tool-cache -let tempDirectory = process.env['RUNNER_TEMPDIRECTORY'] || ''; -import * as core from '@actions/core'; import * as tc from '@actions/tool-cache'; -import * as os from 'os'; import * as path from 'path'; -import * as util from 'util'; import * as semver from 'semver'; -import * as restm from 'typed-rest-client/RestClient'; +import * as httpm from '@actions/http-client' +import * as sys from './system' -let osPlat: string = os.platform(); -let osArch: string = os.arch(); +export async function downloadGo(versionSpec: string, stable: boolean): Promise { + let toolPath: string | undefined; -if (!tempDirectory) { - let baseLocation; - if (process.platform === 'win32') { - // On windows use the USERPROFILE env variable - baseLocation = process.env['USERPROFILE'] || 'C:\\'; - } else { - if (process.platform === 'darwin') { - baseLocation = '/Users'; - } else { - baseLocation = '/home'; - } - } - tempDirectory = path.join(baseLocation, 'actions', 'temp'); -} - -export async function getGo(version: string) { - const selected = await determineVersion(version); - if (selected) { - version = selected; - } - - // check cache - let toolPath: string; - toolPath = tc.find('go', normalizeVersion(version)); - - if (!toolPath) { - // download, extract, cache - toolPath = await acquireGo(version); - core.debug('Go tool is cached under ' + toolPath); - } - - setGoEnvironmentVariables(toolPath); - - toolPath = path.join(toolPath, 'bin'); - // - // prepend the tools path. instructs the agent to prepend for future tasks - // - core.addPath(toolPath); -} - -async function acquireGo(version: string): Promise { - // - // Download - a tool installer intimately knows how to get the tool (and construct urls) - // - let fileName: string = getFileName(version); - let downloadUrl: string = getDownloadUrl(fileName); - - core.debug('Downloading Go from: ' + downloadUrl); - - let downloadPath: string | null = null; try { - downloadPath = await tc.downloadTool(downloadUrl); + let match: IGoVersion | undefined = await findMatch(versionSpec, stable); + + if (match) { + // download + let downloadUrl: string = `https://storage.googleapis.com/golang/${match.files[0]}`; + let downloadPath: string = await tc.downloadTool(downloadUrl); + + // extract + let extPath: string = sys.getPlatform() == 'windows'? + await tc.extractZip(downloadPath): await tc.extractTar(downloadPath); + + // extracts with a root folder that matches the fileName downloaded + const toolRoot = path.join(extPath, 'go'); + toolPath = await tc.cacheDir(toolRoot, 'go', versionSpec); + } } catch (error) { - core.debug(error); - - throw `Failed to download version ${version}: ${error}`; + throw `Failed to download version ${versionSpec}: ${error}`; } - // - // Extract - // - let extPath: string = tempDirectory; - if (!extPath) { - throw new Error('Temp directory not set'); - } - - if (osPlat == 'win32') { - extPath = await tc.extractZip(downloadPath); - } else { - extPath = await tc.extractTar(downloadPath); - } - - // - // Install into the local tool cache - node extracts with a root folder that matches the fileName downloaded - // - const toolRoot = path.join(extPath, 'go'); - version = normalizeVersion(version); - return await tc.cacheDir(toolRoot, 'go', version); + return toolPath; } -function getFileName(version: string): string { - const arches: {[arch: string]: string} = { - x64: 'amd64', - arm: 'armv6l', - arm64: 'arm64', - default: '386' +export interface IGoVersionFile { + filename: string, + // darwin, linux, windows + os: string, + arch: string +} + +export interface IGoVersion { + version: string; + stable: boolean; + files: IGoVersionFile[]; +} + +export async function findMatch(versionSpec: string, stable: boolean): Promise { + let archFilter = sys.getArch(); + let platFilter = sys.getPlatform(); + + let match: IGoVersion| undefined; + const dlUrl: string = 'https://golang.org/dl/?mode=json&include=all'; + + // this returns versions descending so latest is first + let http: httpm.HttpClient = new httpm.HttpClient('setup-go'); + let candidates: IGoVersion[] | null = (await http.getJson(dlUrl)).result; + + if (!candidates) { + throw new Error(`golang download url did not return results: ${dlUrl}`); + } + + let goFile: IGoVersionFile | undefined; + for (let i=0; i < candidates.length; i++) { + let candidate: IGoVersion = candidates[i]; + let version = candidate.version.replace('go', ''); + + // 1.13.0 is advertised as 1.13 preventing being able to match exactly 1.13.0 + // since a semver of 1.13 would match latest 1.13 + let parts: string[] = version.split('.'); + if (parts.length == 2) { + version = version + '.0'; + } + + //console.log(version, versionSpec); + if (semver.satisfies(version, versionSpec) && candidate.stable == stable) { + goFile = candidate.files.find(file => { + return file.arch === archFilter && file.os === platFilter; + }); + + if (goFile) { + match = candidate; + break; + } + } }; - const platform: string = osPlat == 'win32' ? 'windows' : osPlat; - const arch: string = arches[osArch] || arches['default']; - const ext: string = osPlat == 'win32' ? 'zip' : 'tar.gz'; - const filename: string = util.format( - 'go%s.%s-%s.%s', - version, - platform, - arch, - ext - ); - - return filename; -} - -function getDownloadUrl(filename: string): string { - return util.format('https://storage.googleapis.com/golang/%s', filename); -} - -function setGoEnvironmentVariables(goRoot: string) { - core.exportVariable('GOROOT', goRoot); - - const goPath: string = process.env['GOPATH'] || ''; - const goBin: string = process.env['GOBIN'] || ''; - - // set GOPATH and GOBIN as user value - if (goPath) { - core.exportVariable('GOPATH', goPath); - } - if (goBin) { - core.exportVariable('GOBIN', goBin); - } -} - -// This function is required to convert the version 1.10 to 1.10.0. -// Because caching utility accept only sementic version, -// which have patch number as well. -function normalizeVersion(version: string): string { - const versionPart = version.split('.'); - if (versionPart[1] == null) { - //append minor and patch version if not available - return version.concat('.0.0'); - } else { - // handle beta and rc: 1.10beta1 => 1.10.0-beta1, 1.10rc1 => 1.10.0-rc1 - if (versionPart[1].includes('beta') || versionPart[1].includes('rc')) { - versionPart[1] = versionPart[1] - .replace('beta', '.0-beta') - .replace('rc', '.0-rc'); - return versionPart.join('.'); - } + if (match && goFile) { + match.files = [ goFile ]; } - if (versionPart[2] == null) { - //append patch version if not available - return version.concat('.0'); - } else { - // handle beta and rc: 1.8.5beta1 => 1.8.5-beta1, 1.8.5rc1 => 1.8.5-rc1 - if (versionPart[2].includes('beta') || versionPart[2].includes('rc')) { - versionPart[2] = versionPart[2] - .replace('beta', '-beta') - .replace('rc', '-rc'); - return versionPart.join('.'); - } - } - - return version; -} - -async function determineVersion(version: string): Promise { - if (!version.endsWith('.x')) { - const versionPart = version.split('.'); - - if (versionPart[1] == null || versionPart[2] == null) { - return await getLatestVersion(version.concat('.x')); - } else { - return version; - } - } - - return await getLatestVersion(version); -} - -async function getLatestVersion(version: string): Promise { - // clean .x syntax: 1.10.x -> 1.10 - const trimmedVersion = version.slice(0, version.length - 2); - - const versions = await getPossibleVersions(trimmedVersion); - - core.debug(`evaluating ${versions.length} versions`); - - if (version.length === 0) { - throw new Error('unable to get latest version'); - } - - core.debug(`matched: ${versions[0]}`); - - return versions[0]; -} - -interface IGoRef { - version: string; -} - -async function getAvailableVersions(): Promise { - let rest: restm.RestClient = new restm.RestClient('setup-go'); - let tags: IGoRef[] = - (await rest.get('https://golang.org/dl/?mode=json&include=all')) - .result || []; - - return tags.map(tag => tag.version.replace('go', '')); -} - -async function getPossibleVersions(version: string): Promise { - const versions = await getAvailableVersions(); - const possibleVersions = versions.filter(v => v.startsWith(version)); - - const versionMap = new Map(); - possibleVersions.forEach(v => versionMap.set(normalizeVersion(v), v)); - - return Array.from(versionMap.keys()) - .sort(semver.rcompare) - .map(v => versionMap.get(v)); + return match; } diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..26e34e7 --- /dev/null +++ b/src/main.ts @@ -0,0 +1,37 @@ +import * as core from '@actions/core'; +import * as tc from '@actions/tool-cache'; +import * as installer from './installer'; +import * as path from 'path'; + +export async function run() { + try { + // + // versionSpec is optional. If supplied, install / use from the tool cache + // If not supplied then problem matchers will still be setup. Useful for self-hosted. + // + let versionSpec = core.getInput('go-version'); + let stable: boolean = (core.getInput('stable') || '').toUpperCase() == "TRUE"; + + if (versionSpec) { + let installDir: string | undefined = tc.find('go', versionSpec); + + if (!installDir) { + installDir = await installer.downloadGo(versionSpec, stable); + } + + if (installDir) { + core.exportVariable('GOROOT', installDir); + core.addPath(path.join(installDir, 'bin')); + } + else { + throw new Error(`Could not find a version that satisfied version spec: ${versionSpec}`); + } + } + + // add problem matchers + const matchersPath = path.join(__dirname, '..', 'matchers.json'); + console.log(`##[add-matcher]${matchersPath}`); + } catch (error) { + core.setFailed(error.message); + } +} \ No newline at end of file diff --git a/src/setup-go.ts b/src/setup-go.ts index f292196..7045ac0 100644 --- a/src/setup-go.ts +++ b/src/setup-go.ts @@ -1,28 +1,3 @@ -import * as core from '@actions/core'; -import * as installer from './installer'; -import * as path from 'path'; - -async function run() { - try { - // - // Version is optional. If supplied, install / use from the tool cache - // If not supplied then task is still used to setup proxy, auth, etc... - // - let version = core.getInput('version'); - if (!version) { - version = core.getInput('go-version'); - } - if (version) { - await installer.getGo(version); - } - - // TODO: setup proxy from runner proxy config - - const matchersPath = path.join(__dirname, '..', '.github'); - console.log(`##[add-matcher]${path.join(matchersPath, 'go.json')}`); - } catch (error) { - core.setFailed(error.message); - } -} +import {run} from './main' run(); diff --git a/src/system.ts b/src/system.ts new file mode 100644 index 0000000..5ed02f4 --- /dev/null +++ b/src/system.ts @@ -0,0 +1,37 @@ +import * as os from 'os'; + +export function getPlatform(): string { + // darwin and linux match already + // freebsd not supported yet but future proofed. + + // 'aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos', and 'win32' + let plat: string = os.platform(); + + // wants 'darwin', 'freebsd', 'linux', 'windows' + if (plat === 'win32') { + plat = 'windows'; + } + + return plat; + } + + export function getArch(): string { + // 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x', 'x32', and 'x64'. + let arch: string = os.arch(); + + // wants amd64, 386, arm64, armv61, ppc641e, s390x + // currently not supported by runner but future proofed mapping + switch (arch) { + case 'x64': + arch = 'amd64'; + break; + case 'ppc': + arch = 'ppc64'; + break; + case 'x32': + arch = '386'; + break; + } + + return arch; + } \ No newline at end of file