mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-20 07:35:10 +00:00
Fix array problems in installer
This commit is contained in:
parent
5c8120b783
commit
9d492aeb35
@ -82,7 +82,7 @@ describe('authutil tests', () => {
|
|||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await io.rmRF(fakeSourcesDirForTesting);
|
await io.rmRF(fakeSourcesDirForTesting);
|
||||||
await io.mkdirP(fakeSourcesDirForTesting);
|
await io.mkdirP(fakeSourcesDirForTesting);
|
||||||
}, 100000);
|
}, 30000);
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
if (fs.existsSync(nugetConfigFile)) {
|
if (fs.existsSync(nugetConfigFile)) {
|
||||||
|
@ -7,15 +7,15 @@ import httpClient = require('typed-rest-client/HttpClient');
|
|||||||
const toolDir = path.join(__dirname, 'runner', 'tools');
|
const toolDir = path.join(__dirname, 'runner', 'tools');
|
||||||
const tempDir = path.join(__dirname, 'runner', 'temp');
|
const tempDir = path.join(__dirname, 'runner', 'temp');
|
||||||
|
|
||||||
process.env.RUNNER_TOOL_CACHE = toolDir;
|
|
||||||
process.env.DOTNET_INSTALL_DIR = toolDir;
|
|
||||||
process.env.RUNNER_TEMP = tempDir;
|
|
||||||
import * as installer from '../src/installer';
|
import * as installer from '../src/installer';
|
||||||
|
|
||||||
const IS_WINDOWS = process.platform === 'win32';
|
const IS_WINDOWS = process.platform === 'win32';
|
||||||
|
|
||||||
describe('installer tests', () => {
|
describe('installer tests', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
process.env.RUNNER_TOOL_CACHE = toolDir;
|
||||||
|
process.env.DOTNET_INSTALL_DIR = toolDir;
|
||||||
|
process.env.RUNNER_TEMP = tempDir;
|
||||||
await io.rmRF(toolDir);
|
await io.rmRF(toolDir);
|
||||||
await io.rmRF(tempDir);
|
await io.rmRF(tempDir);
|
||||||
});
|
});
|
||||||
@ -27,10 +27,9 @@ describe('installer tests', () => {
|
|||||||
} catch {
|
} catch {
|
||||||
console.log('Failed to remove test directories');
|
console.log('Failed to remove test directories');
|
||||||
}
|
}
|
||||||
}, 100000);
|
}, 30000);
|
||||||
|
|
||||||
it('Acquires version of dotnet if no matching version is installed', async () => {
|
it('Acquires version of dotnet if no matching version is installed', async () => {
|
||||||
console.log(process.env.DOTNET_INSTALL_DIR);
|
|
||||||
await getDotnet('3.1.100');
|
await getDotnet('3.1.100');
|
||||||
const dotnetDir = path.join(toolDir, 'dncs', '3.1.100', os.arch());
|
const dotnetDir = path.join(toolDir, 'dncs', '3.1.100', os.arch());
|
||||||
|
|
||||||
@ -40,7 +39,7 @@ describe('installer tests', () => {
|
|||||||
} else {
|
} else {
|
||||||
expect(fs.existsSync(path.join(dotnetDir, 'dotnet'))).toBe(true);
|
expect(fs.existsSync(path.join(dotnetDir, 'dotnet'))).toBe(true);
|
||||||
}
|
}
|
||||||
}, 100000);
|
}, 30000);
|
||||||
|
|
||||||
it('Throws if no location contains correct dotnet version', async () => {
|
it('Throws if no location contains correct dotnet version', async () => {
|
||||||
let thrown = false;
|
let thrown = false;
|
||||||
@ -50,7 +49,7 @@ describe('installer tests', () => {
|
|||||||
thrown = true;
|
thrown = true;
|
||||||
}
|
}
|
||||||
expect(thrown).toBe(true);
|
expect(thrown).toBe(true);
|
||||||
}, 100000);
|
}, 30000);
|
||||||
|
|
||||||
it('Uses version of dotnet installed in cache', async () => {
|
it('Uses version of dotnet installed in cache', async () => {
|
||||||
const dotnetDir: string = path.join(toolDir, 'dncs', '250.0.0', os.arch());
|
const dotnetDir: string = path.join(toolDir, 'dncs', '250.0.0', os.arch());
|
||||||
@ -59,7 +58,7 @@ describe('installer tests', () => {
|
|||||||
// This will throw if it doesn't find it in the cache (because no such version exists)
|
// This will throw if it doesn't find it in the cache (because no such version exists)
|
||||||
await getDotnet('250.0.0');
|
await getDotnet('250.0.0');
|
||||||
return;
|
return;
|
||||||
});
|
}, 25000);
|
||||||
|
|
||||||
it('Uses an up to date bash download script', async () => {
|
it('Uses an up to date bash download script', async () => {
|
||||||
var httpCallbackClient = new httpClient.HttpClient(
|
var httpCallbackClient = new httpClient.HttpClient(
|
||||||
@ -79,7 +78,7 @@ describe('installer tests', () => {
|
|||||||
expect(normalizeFileContents(currentContents)).toBe(
|
expect(normalizeFileContents(currentContents)).toBe(
|
||||||
normalizeFileContents(upToDateContents)
|
normalizeFileContents(upToDateContents)
|
||||||
);
|
);
|
||||||
}, 100000);
|
}, 30000);
|
||||||
|
|
||||||
it('Uses an up to date powershell download script', async () => {
|
it('Uses an up to date powershell download script', async () => {
|
||||||
var httpCallbackClient = new httpClient.HttpClient(
|
var httpCallbackClient = new httpClient.HttpClient(
|
||||||
@ -99,7 +98,7 @@ describe('installer tests', () => {
|
|||||||
expect(normalizeFileContents(currentContents)).toBe(
|
expect(normalizeFileContents(currentContents)).toBe(
|
||||||
normalizeFileContents(upToDateContents)
|
normalizeFileContents(upToDateContents)
|
||||||
);
|
);
|
||||||
}, 100000);
|
}, 30000);
|
||||||
});
|
});
|
||||||
|
|
||||||
function normalizeFileContents(contents: string): string {
|
function normalizeFileContents(contents: string): string {
|
||||||
|
@ -27,7 +27,7 @@ describe('setup-dotnet tests', () => {
|
|||||||
} catch {
|
} catch {
|
||||||
console.log('Failed to remove test directories');
|
console.log('Failed to remove test directories');
|
||||||
}
|
}
|
||||||
}, 100000);
|
}, 30000);
|
||||||
|
|
||||||
it('Acquires version of dotnet if no matching version is installed', async () => {
|
it('Acquires version of dotnet if no matching version is installed', async () => {
|
||||||
const dotnetDir = path.join(toolDir, 'dncs', '3.1.100', os.arch());
|
const dotnetDir = path.join(toolDir, 'dncs', '3.1.100', os.arch());
|
||||||
@ -46,5 +46,5 @@ describe('setup-dotnet tests', () => {
|
|||||||
expect(fs.existsSync(path.join(dotnetDir, 'dotnet'))).toBe(true);
|
expect(fs.existsSync(path.join(dotnetDir, 'dotnet'))).toBe(true);
|
||||||
}
|
}
|
||||||
fs.unlinkSync(globalJsonPath);
|
fs.unlinkSync(globalJsonPath);
|
||||||
}, 100000);
|
}, 30000);
|
||||||
});
|
});
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
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) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
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 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); }
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -20,13 +21,9 @@ const exec = __importStar(require("@actions/exec"));
|
|||||||
const io = __importStar(require("@actions/io"));
|
const io = __importStar(require("@actions/io"));
|
||||||
const fs_1 = require("fs");
|
const fs_1 = require("fs");
|
||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const semver = __importStar(require("semver"));
|
|
||||||
const IS_WINDOWS = process.platform === 'win32';
|
const IS_WINDOWS = process.platform === 'win32';
|
||||||
class DotnetCoreInstaller {
|
class DotnetCoreInstaller {
|
||||||
constructor(version = '', jsonfile = '') {
|
constructor(version = '', jsonfile = '') {
|
||||||
if (semver.valid(semver.clean(version) || '') == null) {
|
|
||||||
throw 'Implicit version not permitted';
|
|
||||||
}
|
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.jsonfile = jsonfile;
|
this.jsonfile = jsonfile;
|
||||||
}
|
}
|
||||||
@ -73,10 +70,10 @@ class DotnetCoreInstaller {
|
|||||||
const scriptPath = yield io.which(escapedScript, true);
|
const scriptPath = yield io.which(escapedScript, true);
|
||||||
let scriptArguments = [];
|
let scriptArguments = [];
|
||||||
if (this.version) {
|
if (this.version) {
|
||||||
scriptArguments.concat(['--version', this.version]);
|
scriptArguments.push('--version', this.version);
|
||||||
}
|
}
|
||||||
if (this.jsonfile) {
|
if (this.jsonfile) {
|
||||||
scriptArguments.concat(['--jsonfile', this.jsonfile]);
|
scriptArguments.push('--jsonfile', this.jsonfile);
|
||||||
}
|
}
|
||||||
// process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used
|
// process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used
|
||||||
resultCode = yield exec.exec(`"${scriptPath}"`, scriptArguments, {
|
resultCode = yield exec.exec(`"${scriptPath}"`, scriptArguments, {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
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) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
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 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); }
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
15
node_modules/.bin/semver
generated
vendored
15
node_modules/.bin/semver
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../semver/bin/semver.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
15
node_modules/.bin/uuid
generated
vendored
15
node_modules/.bin/uuid
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../uuid/bin/uuid" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../uuid/bin/uuid" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
15
node_modules/.bin/which
generated
vendored
15
node_modules/.bin/which
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../which/bin/which" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../which/bin/which" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
1
node_modules/.bin/which
generated
vendored
Symbolic link
1
node_modules/.bin/which
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../which/bin/which
|
15
node_modules/.bin/xml2js
generated
vendored
15
node_modules/.bin/xml2js
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../fast-xml-parser/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../fast-xml-parser/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
1
node_modules/.bin/xml2js
generated
vendored
Symbolic link
1
node_modules/.bin/xml2js
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../fast-xml-parser/cli.js
|
17
node_modules/@actions/core/package.json
generated
vendored
17
node_modules/@actions/core/package.json
generated
vendored
@ -1,4 +1,10 @@
|
|||||||
{
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"@actions/core@1.2.0",
|
||||||
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
|
]
|
||||||
|
],
|
||||||
"_from": "@actions/core@1.2.0",
|
"_from": "@actions/core@1.2.0",
|
||||||
"_id": "@actions/core@1.2.0",
|
"_id": "@actions/core@1.2.0",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
@ -17,19 +23,14 @@
|
|||||||
"fetchSpec": "1.2.0"
|
"fetchSpec": "1.2.0"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"#USER",
|
"/"
|
||||||
"/",
|
|
||||||
"/@actions/tool-cache"
|
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz",
|
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.0.tgz",
|
||||||
"_shasum": "aa5f52b26c362c821d41557e599371a42f6c0b3d",
|
"_spec": "1.2.0",
|
||||||
"_spec": "@actions/core@1.2.0",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"_where": "C:\\Users\\Stanley\\Projects\\GitHub\\setup-dotnet",
|
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
"bundleDependencies": false,
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Actions core lib",
|
"description": "Actions core lib",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^12.0.2"
|
"@types/node": "^12.0.2"
|
||||||
|
12
node_modules/@actions/exec/lib/exec.d.ts
generated
vendored
Normal file
12
node_modules/@actions/exec/lib/exec.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
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<number> exit code
|
||||||
|
*/
|
||||||
|
export declare function exec(commandLine: string, args?: string[], options?: im.ExecOptions): Promise<number>;
|
35
node_modules/@actions/exec/lib/interfaces.d.ts
generated
vendored
Normal file
35
node_modules/@actions/exec/lib/interfaces.d.ts
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/// <reference types="node" />
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
}
|
@ -1,2 +1,3 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
//# sourceMappingURL=interfaces.js.map
|
1
node_modules/@actions/exec/lib/interfaces.js.map
generated
vendored
Normal file
1
node_modules/@actions/exec/lib/interfaces.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""}
|
37
node_modules/@actions/exec/lib/toolrunner.d.ts
generated
vendored
Normal file
37
node_modules/@actions/exec/lib/toolrunner.d.ts
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/// <reference types="node" />
|
||||||
|
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<number>;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 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[];
|
17
node_modules/@actions/exec/package.json
generated
vendored
17
node_modules/@actions/exec/package.json
generated
vendored
@ -1,4 +1,10 @@
|
|||||||
{
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"@actions/exec@1.0.2",
|
||||||
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
|
]
|
||||||
|
],
|
||||||
"_from": "@actions/exec@1.0.2",
|
"_from": "@actions/exec@1.0.2",
|
||||||
"_id": "@actions/exec@1.0.2",
|
"_id": "@actions/exec@1.0.2",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
@ -17,22 +23,17 @@
|
|||||||
"fetchSpec": "1.0.2"
|
"fetchSpec": "1.0.2"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"#USER",
|
"/"
|
||||||
"/",
|
|
||||||
"/@actions/tool-cache"
|
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.2.tgz",
|
"_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.2.tgz",
|
||||||
"_shasum": "80ae9c2ea0bf5d0046a9f73d2a1b15bddfff0311",
|
"_spec": "1.0.2",
|
||||||
"_spec": "@actions/exec@1.0.2",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"_where": "C:\\Users\\Stanley\\Projects\\GitHub\\setup-dotnet",
|
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/io": "^1.0.1"
|
"@actions/io": "^1.0.1"
|
||||||
},
|
},
|
||||||
"deprecated": false,
|
|
||||||
"description": "Actions exec lib",
|
"description": "Actions exec lib",
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib",
|
"lib": "lib",
|
||||||
|
4
node_modules/@actions/github/package.json
generated
vendored
4
node_modules/@actions/github/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"@actions/github@1.1.0",
|
"@actions/github@1.1.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "@actions/github@1.1.0",
|
"_from": "@actions/github@1.1.0",
|
||||||
@ -27,7 +27,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/@actions/github/-/github-1.1.0.tgz",
|
"_resolved": "https://registry.npmjs.org/@actions/github/-/github-1.1.0.tgz",
|
||||||
"_spec": "1.1.0",
|
"_spec": "1.1.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
|
7
node_modules/@actions/io/LICENSE.md
generated
vendored
Normal file
7
node_modules/@actions/io/LICENSE.md
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
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.
|
29
node_modules/@actions/io/lib/io-util.d.ts
generated
vendored
Normal file
29
node_modules/@actions/io/lib/io-util.d.ts
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/// <reference types="node" />
|
||||||
|
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<boolean>;
|
||||||
|
export declare function isDirectory(fsPath: string, useStat?: boolean): Promise<boolean>;
|
||||||
|
/**
|
||||||
|
* 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<void>;
|
||||||
|
/**
|
||||||
|
* 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<string>;
|
56
node_modules/@actions/io/lib/io.d.ts
generated
vendored
Normal file
56
node_modules/@actions/io/lib/io.d.ts
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/**
|
||||||
|
* 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<void>;
|
||||||
|
/**
|
||||||
|
* 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<void>;
|
||||||
|
/**
|
||||||
|
* Remove a path recursively with force
|
||||||
|
*
|
||||||
|
* @param inputPath path to remove
|
||||||
|
*/
|
||||||
|
export declare function rmRF(inputPath: string): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Make a directory. Creates the full path with folders in between
|
||||||
|
* Will throw if it fails
|
||||||
|
*
|
||||||
|
* @param fsPath path to create
|
||||||
|
* @returns Promise<void>
|
||||||
|
*/
|
||||||
|
export declare function mkdirP(fsPath: string): Promise<void>;
|
||||||
|
/**
|
||||||
|
* 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<string> path to tool
|
||||||
|
*/
|
||||||
|
export declare function which(tool: string, check?: boolean): Promise<string>;
|
17
node_modules/@actions/io/package.json
generated
vendored
17
node_modules/@actions/io/package.json
generated
vendored
@ -1,4 +1,10 @@
|
|||||||
{
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"@actions/io@1.0.1",
|
||||||
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
|
]
|
||||||
|
],
|
||||||
"_from": "@actions/io@1.0.1",
|
"_from": "@actions/io@1.0.1",
|
||||||
"_id": "@actions/io@1.0.1",
|
"_id": "@actions/io@1.0.1",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
@ -17,20 +23,15 @@
|
|||||||
"fetchSpec": "1.0.1"
|
"fetchSpec": "1.0.1"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"#USER",
|
|
||||||
"/",
|
"/",
|
||||||
"/@actions/exec",
|
"/@actions/exec"
|
||||||
"/@actions/tool-cache"
|
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.1.tgz",
|
"_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.1.tgz",
|
||||||
"_shasum": "81a9418fe2bbdef2d2717a8e9f85188b9c565aca",
|
"_spec": "1.0.1",
|
||||||
"_spec": "@actions/io@1.0.1",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"_where": "C:\\Users\\Stanley\\Projects\\GitHub\\setup-dotnet",
|
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
"bundleDependencies": false,
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Actions io lib",
|
"description": "Actions io lib",
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib",
|
"lib": "lib",
|
||||||
|
82
node_modules/@actions/tool-cache/README.md
generated
vendored
82
node_modules/@actions/tool-cache/README.md
generated
vendored
@ -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:
|
|
||||||
|
|
||||||
```js
|
|
||||||
const tc = require('@actions/tool-cache');
|
|
||||||
|
|
||||||
const node12Path = await tc.downloadTool('https://nodejs.org/dist/v12.7.0/node-v12.7.0-linux-x64.tar.gz');
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Extract
|
|
||||||
|
|
||||||
These can then be extracted in platform specific ways:
|
|
||||||
|
|
||||||
```js
|
|
||||||
const tc = require('@actions/tool-cache');
|
|
||||||
|
|
||||||
if (process.platform === 'win32') {
|
|
||||||
const node12Path = tc.downloadTool('https://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
|
|
||||||
const node12Path = tc.downloadTool('https://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('https://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:
|
|
||||||
|
|
||||||
```js
|
|
||||||
const tc = require('@actions/tool-cache');
|
|
||||||
const core = require('@actions/core');
|
|
||||||
|
|
||||||
const node12Path = await tc.downloadTool('https://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.
|
|
||||||
|
|
||||||
```js
|
|
||||||
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:
|
|
||||||
|
|
||||||
```js
|
|
||||||
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:
|
|
||||||
|
|
||||||
```js
|
|
||||||
const tc = require('@actions/tool-cache');
|
|
||||||
|
|
||||||
const allNodeVersions = tc.findAllVersions('node');
|
|
||||||
console.log(`Versions of node available: ${allNodeVersions}`);
|
|
||||||
```
|
|
79
node_modules/@actions/tool-cache/lib/tool-cache.d.ts
generated
vendored
79
node_modules/@actions/tool-cache/lib/tool-cache.d.ts
generated
vendored
@ -1,79 +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<string>;
|
|
||||||
/**
|
|
||||||
* 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<string>;
|
|
||||||
/**
|
|
||||||
* Extract a tar
|
|
||||||
*
|
|
||||||
* @param file path to the tar
|
|
||||||
* @param dest destination directory. Optional.
|
|
||||||
* @param flags flags for the tar. Optional.
|
|
||||||
* @returns path to the destination directory
|
|
||||||
*/
|
|
||||||
export declare function extractTar(file: string, dest?: string, flags?: string): Promise<string>;
|
|
||||||
/**
|
|
||||||
* 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<string>;
|
|
||||||
/**
|
|
||||||
* 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<string>;
|
|
||||||
/**
|
|
||||||
* 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<string>;
|
|
||||||
/**
|
|
||||||
* 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[];
|
|
438
node_modules/@actions/tool-cache/lib/tool-cache.js
generated
vendored
438
node_modules/@actions/tool-cache/lib/tool-cache.js
generated
vendored
@ -1,438 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
const 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.
|
|
||||||
* @param flags flags for the tar. 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");
|
|
||||||
}
|
|
||||||
dest = dest || (yield _createExtractFolder(dest));
|
|
||||||
const tarPath = yield io.which('tar', true);
|
|
||||||
yield exec_1.exec(`"${tarPath}"`, [flags, '-C', 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 = 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, 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
|
|
1
node_modules/@actions/tool-cache/lib/tool-cache.js.map
generated
vendored
1
node_modules/@actions/tool-cache/lib/tool-cache.js.map
generated
vendored
File diff suppressed because one or more lines are too long
76
node_modules/@actions/tool-cache/package.json
generated
vendored
76
node_modules/@actions/tool-cache/package.json
generated
vendored
@ -1,76 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "@actions/tool-cache@1.1.2",
|
|
||||||
"_id": "@actions/tool-cache@1.1.2",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-IJczPaZr02ECa3Lgws/TJEVco9tjOujiQSZbO3dHuXXjhd5vrUtfOgGwhmz3/f97L910OraPZ8SknofUk6RvOQ==",
|
|
||||||
"_location": "/@actions/tool-cache",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "version",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "@actions/tool-cache@1.1.2",
|
|
||||||
"name": "@actions/tool-cache",
|
|
||||||
"escapedName": "@actions%2ftool-cache",
|
|
||||||
"scope": "@actions",
|
|
||||||
"rawSpec": "1.1.2",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "1.1.2"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"#USER",
|
|
||||||
"/"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.1.2.tgz",
|
|
||||||
"_shasum": "304d44cecb9547324731e03ca004a3905e6530d2",
|
|
||||||
"_spec": "@actions/tool-cache@1.1.2",
|
|
||||||
"_where": "C:\\Users\\Stanley\\Projects\\GitHub\\setup-dotnet",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {
|
|
||||||
"@actions/core": "^1.1.0",
|
|
||||||
"@actions/exec": "^1.0.1",
|
|
||||||
"@actions/io": "^1.0.1",
|
|
||||||
"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"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/actions/toolkit/tree/master/packages/exec",
|
|
||||||
"keywords": [
|
|
||||||
"github",
|
|
||||||
"actions",
|
|
||||||
"exec"
|
|
||||||
],
|
|
||||||
"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.1.2"
|
|
||||||
}
|
|
4
node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json
generated
vendored
4
node_modules/@octokit/endpoint/node_modules/is-plain-object/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"is-plain-object@3.0.0",
|
"is-plain-object@3.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "is-plain-object@3.0.0",
|
"_from": "is-plain-object@3.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz",
|
||||||
"_spec": "3.0.0",
|
"_spec": "3.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Jon Schlinkert",
|
"name": "Jon Schlinkert",
|
||||||
"url": "https://github.com/jonschlinkert"
|
"url": "https://github.com/jonschlinkert"
|
||||||
|
4
node_modules/@octokit/endpoint/node_modules/isobject/package.json
generated
vendored
4
node_modules/@octokit/endpoint/node_modules/isobject/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"isobject@4.0.0",
|
"isobject@4.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "isobject@4.0.0",
|
"_from": "isobject@4.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz",
|
||||||
"_spec": "4.0.0",
|
"_spec": "4.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Jon Schlinkert",
|
"name": "Jon Schlinkert",
|
||||||
"url": "https://github.com/jonschlinkert"
|
"url": "https://github.com/jonschlinkert"
|
||||||
|
4
node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json
generated
vendored
4
node_modules/@octokit/endpoint/node_modules/universal-user-agent/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"universal-user-agent@4.0.0",
|
"universal-user-agent@4.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "universal-user-agent@4.0.0",
|
"_from": "universal-user-agent@4.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz",
|
||||||
"_spec": "4.0.0",
|
"_spec": "4.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/gr2m/universal-user-agent/issues"
|
"url": "https://github.com/gr2m/universal-user-agent/issues"
|
||||||
},
|
},
|
||||||
|
4
node_modules/@octokit/endpoint/package.json
generated
vendored
4
node_modules/@octokit/endpoint/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"@octokit/endpoint@5.3.5",
|
"@octokit/endpoint@5.3.5",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "@octokit/endpoint@5.3.5",
|
"_from": "@octokit/endpoint@5.3.5",
|
||||||
@ -29,7 +29,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.3.5.tgz",
|
"_resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.3.5.tgz",
|
||||||
"_spec": "5.3.5",
|
"_spec": "5.3.5",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/octokit/endpoint.js/issues"
|
"url": "https://github.com/octokit/endpoint.js/issues"
|
||||||
},
|
},
|
||||||
|
4
node_modules/@octokit/graphql/package.json
generated
vendored
4
node_modules/@octokit/graphql/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"@octokit/graphql@2.1.3",
|
"@octokit/graphql@2.1.3",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "@octokit/graphql@2.1.3",
|
"_from": "@octokit/graphql@2.1.3",
|
||||||
@ -27,7 +27,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-2.1.3.tgz",
|
"_resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-2.1.3.tgz",
|
||||||
"_spec": "2.1.3",
|
"_spec": "2.1.3",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Gregor Martynus",
|
"name": "Gregor Martynus",
|
||||||
"url": "https://github.com/gr2m"
|
"url": "https://github.com/gr2m"
|
||||||
|
4
node_modules/@octokit/request-error/package.json
generated
vendored
4
node_modules/@octokit/request-error/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"@octokit/request-error@1.0.4",
|
"@octokit/request-error@1.0.4",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "@octokit/request-error@1.0.4",
|
"_from": "@octokit/request-error@1.0.4",
|
||||||
@ -28,7 +28,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.0.4.tgz",
|
"_resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.0.4.tgz",
|
||||||
"_spec": "1.0.4",
|
"_spec": "1.0.4",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/octokit/request-error.js/issues"
|
"url": "https://github.com/octokit/request-error.js/issues"
|
||||||
},
|
},
|
||||||
|
4
node_modules/@octokit/request/node_modules/is-plain-object/package.json
generated
vendored
4
node_modules/@octokit/request/node_modules/is-plain-object/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"is-plain-object@3.0.0",
|
"is-plain-object@3.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "is-plain-object@3.0.0",
|
"_from": "is-plain-object@3.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz",
|
||||||
"_spec": "3.0.0",
|
"_spec": "3.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Jon Schlinkert",
|
"name": "Jon Schlinkert",
|
||||||
"url": "https://github.com/jonschlinkert"
|
"url": "https://github.com/jonschlinkert"
|
||||||
|
4
node_modules/@octokit/request/node_modules/isobject/package.json
generated
vendored
4
node_modules/@octokit/request/node_modules/isobject/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"isobject@4.0.0",
|
"isobject@4.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "isobject@4.0.0",
|
"_from": "isobject@4.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz",
|
||||||
"_spec": "4.0.0",
|
"_spec": "4.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Jon Schlinkert",
|
"name": "Jon Schlinkert",
|
||||||
"url": "https://github.com/jonschlinkert"
|
"url": "https://github.com/jonschlinkert"
|
||||||
|
4
node_modules/@octokit/request/node_modules/universal-user-agent/package.json
generated
vendored
4
node_modules/@octokit/request/node_modules/universal-user-agent/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"universal-user-agent@4.0.0",
|
"universal-user-agent@4.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "universal-user-agent@4.0.0",
|
"_from": "universal-user-agent@4.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz",
|
||||||
"_spec": "4.0.0",
|
"_spec": "4.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/gr2m/universal-user-agent/issues"
|
"url": "https://github.com/gr2m/universal-user-agent/issues"
|
||||||
},
|
},
|
||||||
|
4
node_modules/@octokit/request/package.json
generated
vendored
4
node_modules/@octokit/request/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"@octokit/request@5.1.0",
|
"@octokit/request@5.1.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "@octokit/request@5.1.0",
|
"_from": "@octokit/request@5.1.0",
|
||||||
@ -30,7 +30,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.1.0.tgz",
|
"_resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.1.0.tgz",
|
||||||
"_spec": "5.1.0",
|
"_spec": "5.1.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/octokit/request.js/issues"
|
"url": "https://github.com/octokit/request.js/issues"
|
||||||
},
|
},
|
||||||
|
4
node_modules/@octokit/rest/node_modules/universal-user-agent/package.json
generated
vendored
4
node_modules/@octokit/rest/node_modules/universal-user-agent/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"universal-user-agent@4.0.0",
|
"universal-user-agent@4.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "universal-user-agent@4.0.0",
|
"_from": "universal-user-agent@4.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz",
|
||||||
"_spec": "4.0.0",
|
"_spec": "4.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/gr2m/universal-user-agent/issues"
|
"url": "https://github.com/gr2m/universal-user-agent/issues"
|
||||||
},
|
},
|
||||||
|
4
node_modules/@octokit/rest/package.json
generated
vendored
4
node_modules/@octokit/rest/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"@octokit/rest@16.28.9",
|
"@octokit/rest@16.28.9",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "@octokit/rest@16.28.9",
|
"_from": "@octokit/rest@16.28.9",
|
||||||
@ -29,7 +29,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.28.9.tgz",
|
"_resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.28.9.tgz",
|
||||||
"_spec": "16.28.9",
|
"_spec": "16.28.9",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Gregor Martynus",
|
"name": "Gregor Martynus",
|
||||||
"url": "https://github.com/gr2m"
|
"url": "https://github.com/gr2m"
|
||||||
|
4
node_modules/atob-lite/package.json
generated
vendored
4
node_modules/atob-lite/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"atob-lite@2.0.0",
|
"atob-lite@2.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "atob-lite@2.0.0",
|
"_from": "atob-lite@2.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz",
|
||||||
"_spec": "2.0.0",
|
"_spec": "2.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Hugh Kennedy",
|
"name": "Hugh Kennedy",
|
||||||
"email": "hughskennedy@gmail.com",
|
"email": "hughskennedy@gmail.com",
|
||||||
|
4
node_modules/before-after-hook/package.json
generated
vendored
4
node_modules/before-after-hook/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"before-after-hook@2.1.0",
|
"before-after-hook@2.1.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "before-after-hook@2.1.0",
|
"_from": "before-after-hook@2.1.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",
|
"_resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",
|
||||||
"_spec": "2.1.0",
|
"_spec": "2.1.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Gregor Martynus"
|
"name": "Gregor Martynus"
|
||||||
},
|
},
|
||||||
|
4
node_modules/btoa-lite/package.json
generated
vendored
4
node_modules/btoa-lite/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"btoa-lite@1.0.0",
|
"btoa-lite@1.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "btoa-lite@1.0.0",
|
"_from": "btoa-lite@1.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz",
|
||||||
"_spec": "1.0.0",
|
"_spec": "1.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Hugh Kennedy",
|
"name": "Hugh Kennedy",
|
||||||
"email": "hughskennedy@gmail.com",
|
"email": "hughskennedy@gmail.com",
|
||||||
|
15
node_modules/cross-spawn/node_modules/.bin/semver
generated
vendored
15
node_modules/cross-spawn/node_modules/.bin/semver
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../semver/bin/semver" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../semver/bin/semver" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
1
node_modules/cross-spawn/node_modules/.bin/semver
generated
vendored
Symbolic link
1
node_modules/cross-spawn/node_modules/.bin/semver
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../semver/bin/semver
|
7
node_modules/cross-spawn/node_modules/.bin/semver.cmd
generated
vendored
7
node_modules/cross-spawn/node_modules/.bin/semver.cmd
generated
vendored
@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\semver\bin\semver" %*
|
|
||||||
)
|
|
0
node_modules/cross-spawn/node_modules/semver/bin/semver
generated
vendored
Normal file → Executable file
0
node_modules/cross-spawn/node_modules/semver/bin/semver
generated
vendored
Normal file → Executable file
6
node_modules/cross-spawn/node_modules/semver/package.json
generated
vendored
6
node_modules/cross-spawn/node_modules/semver/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"semver@5.7.0",
|
"semver@5.7.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "semver@5.7.0",
|
"_from": "semver@5.7.0",
|
||||||
@ -26,9 +26,9 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
|
"_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
|
||||||
"_spec": "5.7.0",
|
"_spec": "5.7.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "./bin/semver"
|
"semver": "bin/semver"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/npm/node-semver/issues"
|
"url": "https://github.com/npm/node-semver/issues"
|
||||||
|
4
node_modules/cross-spawn/package.json
generated
vendored
4
node_modules/cross-spawn/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"cross-spawn@6.0.5",
|
"cross-spawn@6.0.5",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "cross-spawn@6.0.5",
|
"_from": "cross-spawn@6.0.5",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
"_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||||
"_spec": "6.0.5",
|
"_spec": "6.0.5",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "André Cruz",
|
"name": "André Cruz",
|
||||||
"email": "andre@moxy.studio"
|
"email": "andre@moxy.studio"
|
||||||
|
4
node_modules/deprecation/package.json
generated
vendored
4
node_modules/deprecation/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"deprecation@2.3.1",
|
"deprecation@2.3.1",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "deprecation@2.3.1",
|
"_from": "deprecation@2.3.1",
|
||||||
@ -28,7 +28,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
"_resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
||||||
"_spec": "2.3.1",
|
"_spec": "2.3.1",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/gr2m/deprecation/issues"
|
"url": "https://github.com/gr2m/deprecation/issues"
|
||||||
},
|
},
|
||||||
|
4
node_modules/end-of-stream/package.json
generated
vendored
4
node_modules/end-of-stream/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"end-of-stream@1.4.1",
|
"end-of-stream@1.4.1",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "end-of-stream@1.4.1",
|
"_from": "end-of-stream@1.4.1",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
|
"_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
|
||||||
"_spec": "1.4.1",
|
"_spec": "1.4.1",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Mathias Buus",
|
"name": "Mathias Buus",
|
||||||
"email": "mathiasbuus@gmail.com"
|
"email": "mathiasbuus@gmail.com"
|
||||||
|
5
node_modules/execa/package.json
generated
vendored
5
node_modules/execa/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"execa@1.0.0",
|
"execa@1.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "execa@1.0.0",
|
"_from": "execa@1.0.0",
|
||||||
@ -24,13 +24,12 @@
|
|||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/husky",
|
"/husky",
|
||||||
"/jest-changed-files",
|
"/jest-changed-files",
|
||||||
"/os-locale",
|
|
||||||
"/sane",
|
"/sane",
|
||||||
"/windows-release"
|
"/windows-release"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
|
||||||
"_spec": "1.0.0",
|
"_spec": "1.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
|
0
node_modules/fast-xml-parser/cli.js
generated
vendored
Normal file → Executable file
0
node_modules/fast-xml-parser/cli.js
generated
vendored
Normal file → Executable file
16
node_modules/fast-xml-parser/package.json
generated
vendored
16
node_modules/fast-xml-parser/package.json
generated
vendored
@ -1,4 +1,10 @@
|
|||||||
{
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"fast-xml-parser@3.15.1",
|
||||||
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
|
]
|
||||||
|
],
|
||||||
"_from": "fast-xml-parser@3.15.1",
|
"_from": "fast-xml-parser@3.15.1",
|
||||||
"_id": "fast-xml-parser@3.15.1",
|
"_id": "fast-xml-parser@3.15.1",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
@ -16,24 +22,21 @@
|
|||||||
"fetchSpec": "3.15.1"
|
"fetchSpec": "3.15.1"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"#USER",
|
|
||||||
"/"
|
"/"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.15.1.tgz",
|
"_resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.15.1.tgz",
|
||||||
"_shasum": "7299ef53b00d5c0f9809599396a26e6d1af20603",
|
"_spec": "3.15.1",
|
||||||
"_spec": "fast-xml-parser@3.15.1",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"_where": "C:\\Users\\Stanley\\Projects\\GitHub\\setup-dotnet",
|
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Amit Gupta",
|
"name": "Amit Gupta",
|
||||||
"url": "https://amitkumargupta.work/"
|
"url": "https://amitkumargupta.work/"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"xml2js": "./cli.js"
|
"xml2js": "cli.js"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/NaturalIntelligence/fast-xml-parser/issues"
|
"url": "https://github.com/NaturalIntelligence/fast-xml-parser/issues"
|
||||||
},
|
},
|
||||||
"bundleDependencies": false,
|
|
||||||
"contributors": [
|
"contributors": [
|
||||||
{
|
{
|
||||||
"name": "Alfonso Muñoz-Pomer Fuentes",
|
"name": "Alfonso Muñoz-Pomer Fuentes",
|
||||||
@ -53,7 +56,6 @@
|
|||||||
"url": "https://github.com/Tatsh"
|
"url": "https://github.com/Tatsh"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"deprecated": false,
|
|
||||||
"description": "Validate XML or Parse XML to JS/JSON very fast without C/C++ based libraries",
|
"description": "Validate XML or Parse XML to JS/JSON very fast without C/C++ based libraries",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.7.5",
|
"@babel/core": "^7.7.5",
|
||||||
|
4
node_modules/get-stream/package.json
generated
vendored
4
node_modules/get-stream/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"get-stream@4.1.0",
|
"get-stream@4.1.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "get-stream@4.1.0",
|
"_from": "get-stream@4.1.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
|
"_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
|
||||||
"_spec": "4.1.0",
|
"_spec": "4.1.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
|
4
node_modules/is-stream/package.json
generated
vendored
4
node_modules/is-stream/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"is-stream@1.1.0",
|
"is-stream@1.1.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "is-stream@1.1.0",
|
"_from": "is-stream@1.1.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
"_resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||||
"_spec": "1.1.0",
|
"_spec": "1.1.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
|
4
node_modules/isexe/package.json
generated
vendored
4
node_modules/isexe/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"isexe@2.0.0",
|
"isexe@2.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "isexe@2.0.0",
|
"_from": "isexe@2.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||||
"_spec": "2.0.0",
|
"_spec": "2.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Isaac Z. Schlueter",
|
"name": "Isaac Z. Schlueter",
|
||||||
"email": "i@izs.me",
|
"email": "i@izs.me",
|
||||||
|
4
node_modules/lodash.get/package.json
generated
vendored
4
node_modules/lodash.get/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"lodash.get@4.4.2",
|
"lodash.get@4.4.2",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "lodash.get@4.4.2",
|
"_from": "lodash.get@4.4.2",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
|
"_resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
|
||||||
"_spec": "4.4.2",
|
"_spec": "4.4.2",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "John-David Dalton",
|
"name": "John-David Dalton",
|
||||||
"email": "john.david.dalton@gmail.com",
|
"email": "john.david.dalton@gmail.com",
|
||||||
|
4
node_modules/lodash.set/package.json
generated
vendored
4
node_modules/lodash.set/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"lodash.set@4.3.2",
|
"lodash.set@4.3.2",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "lodash.set@4.3.2",
|
"_from": "lodash.set@4.3.2",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz",
|
"_resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz",
|
||||||
"_spec": "4.3.2",
|
"_spec": "4.3.2",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "John-David Dalton",
|
"name": "John-David Dalton",
|
||||||
"email": "john.david.dalton@gmail.com",
|
"email": "john.david.dalton@gmail.com",
|
||||||
|
4
node_modules/lodash.uniq/package.json
generated
vendored
4
node_modules/lodash.uniq/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"lodash.uniq@4.5.0",
|
"lodash.uniq@4.5.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "lodash.uniq@4.5.0",
|
"_from": "lodash.uniq@4.5.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
|
"_resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
|
||||||
"_spec": "4.5.0",
|
"_spec": "4.5.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "John-David Dalton",
|
"name": "John-David Dalton",
|
||||||
"email": "john.david.dalton@gmail.com",
|
"email": "john.david.dalton@gmail.com",
|
||||||
|
4
node_modules/macos-release/package.json
generated
vendored
4
node_modules/macos-release/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"macos-release@2.3.0",
|
"macos-release@2.3.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "macos-release@2.3.0",
|
"_from": "macos-release@2.3.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz",
|
"_resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz",
|
||||||
"_spec": "2.3.0",
|
"_spec": "2.3.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
|
4
node_modules/nice-try/package.json
generated
vendored
4
node_modules/nice-try/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"nice-try@1.0.5",
|
"nice-try@1.0.5",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "nice-try@1.0.5",
|
"_from": "nice-try@1.0.5",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
"_resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||||
"_spec": "1.0.5",
|
"_spec": "1.0.5",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tobias Reich <tobias@electerious.com>"
|
"Tobias Reich <tobias@electerious.com>"
|
||||||
],
|
],
|
||||||
|
4
node_modules/node-fetch/package.json
generated
vendored
4
node_modules/node-fetch/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"node-fetch@2.6.0",
|
"node-fetch@2.6.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "node-fetch@2.6.0",
|
"_from": "node-fetch@2.6.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
|
"_resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
|
||||||
"_spec": "2.6.0",
|
"_spec": "2.6.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "David Frank"
|
"name": "David Frank"
|
||||||
},
|
},
|
||||||
|
4
node_modules/npm-run-path/package.json
generated
vendored
4
node_modules/npm-run-path/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"npm-run-path@2.0.2",
|
"npm-run-path@2.0.2",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "npm-run-path@2.0.2",
|
"_from": "npm-run-path@2.0.2",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
"_resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||||
"_spec": "2.0.2",
|
"_spec": "2.0.2",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
|
4
node_modules/octokit-pagination-methods/package.json
generated
vendored
4
node_modules/octokit-pagination-methods/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"octokit-pagination-methods@1.1.0",
|
"octokit-pagination-methods@1.1.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "octokit-pagination-methods@1.1.0",
|
"_from": "octokit-pagination-methods@1.1.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz",
|
"_resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz",
|
||||||
"_spec": "1.1.0",
|
"_spec": "1.1.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Gregor Martynus",
|
"name": "Gregor Martynus",
|
||||||
"url": "https://github.com/gr2m"
|
"url": "https://github.com/gr2m"
|
||||||
|
4
node_modules/once/package.json
generated
vendored
4
node_modules/once/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"once@1.4.0",
|
"once@1.4.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "once@1.4.0",
|
"_from": "once@1.4.0",
|
||||||
@ -32,7 +32,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
"_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
"_spec": "1.4.0",
|
"_spec": "1.4.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Isaac Z. Schlueter",
|
"name": "Isaac Z. Schlueter",
|
||||||
"email": "i@izs.me",
|
"email": "i@izs.me",
|
||||||
|
4
node_modules/os-name/package.json
generated
vendored
4
node_modules/os-name/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"os-name@3.1.0",
|
"os-name@3.1.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "os-name@3.1.0",
|
"_from": "os-name@3.1.0",
|
||||||
@ -29,7 +29,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz",
|
"_resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz",
|
||||||
"_spec": "3.1.0",
|
"_spec": "3.1.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
|
4
node_modules/p-finally/package.json
generated
vendored
4
node_modules/p-finally/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"p-finally@1.0.0",
|
"p-finally@1.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "p-finally@1.0.0",
|
"_from": "p-finally@1.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
||||||
"_spec": "1.0.0",
|
"_spec": "1.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
|
4
node_modules/path-key/package.json
generated
vendored
4
node_modules/path-key/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"path-key@2.0.1",
|
"path-key@2.0.1",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "path-key@2.0.1",
|
"_from": "path-key@2.0.1",
|
||||||
@ -27,7 +27,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
"_resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||||
"_spec": "2.0.1",
|
"_spec": "2.0.1",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
|
4
node_modules/pump/package.json
generated
vendored
4
node_modules/pump/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"pump@3.0.0",
|
"pump@3.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "pump@3.0.0",
|
"_from": "pump@3.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||||
"_spec": "3.0.0",
|
"_spec": "3.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Mathias Buus Madsen",
|
"name": "Mathias Buus Madsen",
|
||||||
"email": "mathiasbuus@gmail.com"
|
"email": "mathiasbuus@gmail.com"
|
||||||
|
70
node_modules/semver/CHANGELOG.md
generated
vendored
70
node_modules/semver/CHANGELOG.md
generated
vendored
@ -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
|
|
443
node_modules/semver/README.md
generated
vendored
443
node_modules/semver/README.md
generated
vendored
@ -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] <version> [<version> [...]]
|
|
||||||
Prints valid versions sorted by SemVer precedence
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-r --range <range>
|
|
||||||
Print versions that match the specified range.
|
|
||||||
|
|
||||||
-i --increment [<level>]
|
|
||||||
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>
|
|
||||||
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
|
|
||||||
<https://semver.org/>.
|
|
||||||
|
|
||||||
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`
|
|
174
node_modules/semver/bin/semver.js
generated
vendored
174
node_modules/semver/bin/semver.js
generated
vendored
@ -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] <version> [<version> [...]]',
|
|
||||||
'Prints valid versions sorted by SemVer precedence',
|
|
||||||
'',
|
|
||||||
'Options:',
|
|
||||||
'-r --range <range>',
|
|
||||||
' Print versions that match the specified range.',
|
|
||||||
'',
|
|
||||||
'-i --increment [<level>]',
|
|
||||||
' 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>',
|
|
||||||
' 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'))
|
|
||||||
}
|
|
63
node_modules/semver/package.json
generated
vendored
63
node_modules/semver/package.json
generated
vendored
@ -1,63 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "semver@6.3.0",
|
|
||||||
"_id": "semver@6.3.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
|
||||||
"_location": "/semver",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "version",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "semver@6.3.0",
|
|
||||||
"name": "semver",
|
|
||||||
"escapedName": "semver",
|
|
||||||
"rawSpec": "6.3.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "6.3.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"#USER",
|
|
||||||
"/",
|
|
||||||
"/@actions/tool-cache",
|
|
||||||
"/istanbul-lib-instrument"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
|
||||||
"_shasum": "ee0a64c8af5e8ceea67687b133761e1becbd1d3d",
|
|
||||||
"_spec": "semver@6.3.0",
|
|
||||||
"_where": "C:\\Users\\Stanley\\Projects\\GitHub\\setup-dotnet",
|
|
||||||
"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"
|
|
||||||
}
|
|
1596
node_modules/semver/semver.js
generated
vendored
1596
node_modules/semver/semver.js
generated
vendored
File diff suppressed because it is too large
Load Diff
4
node_modules/shebang-command/package.json
generated
vendored
4
node_modules/shebang-command/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"shebang-command@1.2.0",
|
"shebang-command@1.2.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "shebang-command@1.2.0",
|
"_from": "shebang-command@1.2.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
"_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||||
"_spec": "1.2.0",
|
"_spec": "1.2.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Kevin Martensson",
|
"name": "Kevin Martensson",
|
||||||
"email": "kevinmartensson@gmail.com",
|
"email": "kevinmartensson@gmail.com",
|
||||||
|
4
node_modules/shebang-regex/package.json
generated
vendored
4
node_modules/shebang-regex/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"shebang-regex@1.0.0",
|
"shebang-regex@1.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "shebang-regex@1.0.0",
|
"_from": "shebang-regex@1.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||||
"_spec": "1.0.0",
|
"_spec": "1.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
|
4
node_modules/signal-exit/package.json
generated
vendored
4
node_modules/signal-exit/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"signal-exit@3.0.2",
|
"signal-exit@3.0.2",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "signal-exit@3.0.2",
|
"_from": "signal-exit@3.0.2",
|
||||||
@ -27,7 +27,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
"_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||||
"_spec": "3.0.2",
|
"_spec": "3.0.2",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Ben Coe",
|
"name": "Ben Coe",
|
||||||
"email": "ben@npmjs.com"
|
"email": "ben@npmjs.com"
|
||||||
|
4
node_modules/strip-eof/package.json
generated
vendored
4
node_modules/strip-eof/package.json
generated
vendored
@ -2,7 +2,7 @@
|
|||||||
"_args": [
|
"_args": [
|
||||||
[
|
[
|
||||||
"strip-eof@1.0.0",
|
"strip-eof@1.0.0",
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
"/Users/zacharyeisinger/Documents/repo/setup-dotnet"
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "strip-eof@1.0.0",
|
"_from": "strip-eof@1.0.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
"_resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||||
"_spec": "1.0.0",
|
"_spec": "1.0.0",
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
"_where": "/Users/zacharyeisinger/Documents/repo/setup-dotnet",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
|
67
node_modules/tunnel/package.json
generated
vendored
67
node_modules/tunnel/package.json
generated
vendored
@ -1,67 +0,0 @@
|
|||||||
{
|
|
||||||
"_args": [
|
|
||||||
[
|
|
||||||
"tunnel@0.0.4",
|
|
||||||
"C:\\dev\\repos\\actions\\setup-dotnet"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"_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",
|
|
||||||
"_spec": "0.0.4",
|
|
||||||
"_where": "C:\\dev\\repos\\actions\\setup-dotnet",
|
|
||||||
"author": {
|
|
||||||
"name": "Koichi Kobayashi",
|
|
||||||
"email": "koichik@improvement.jp"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/koichik/node-tunnel/issues"
|
|
||||||
},
|
|
||||||
"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"
|
|
||||||
}
|
|
4
node_modules/typed-rest-client/Handlers.d.ts
generated
vendored
4
node_modules/typed-rest-client/Handlers.d.ts
generated
vendored
@ -1,4 +0,0 @@
|
|||||||
export { BasicCredentialHandler } from "./handlers/basiccreds";
|
|
||||||
export { BearerCredentialHandler } from "./handlers/bearertoken";
|
|
||||||
export { NtlmCredentialHandler } from "./handlers/ntlm";
|
|
||||||
export { PersonalAccessTokenCredentialHandler } from "./handlers/personalaccesstoken";
|
|
10
node_modules/typed-rest-client/Handlers.js
generated
vendored
10
node_modules/typed-rest-client/Handlers.js
generated
vendored
@ -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;
|
|
103
node_modules/typed-rest-client/HttpClient.d.ts
generated
vendored
103
node_modules/typed-rest-client/HttpClient.d.ts
generated
vendored
@ -1,103 +0,0 @@
|
|||||||
/// <reference types="node" />
|
|
||||||
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<string>;
|
|
||||||
}
|
|
||||||
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<ifm.IHttpClientResponse>;
|
|
||||||
get(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
|
|
||||||
del(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
|
|
||||||
post(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
|
|
||||||
patch(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
|
|
||||||
put(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
|
|
||||||
head(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
|
|
||||||
sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
|
|
||||||
/**
|
|
||||||
* 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<ifm.IHttpClientResponse>;
|
|
||||||
/**
|
|
||||||
* 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<ifm.IHttpClientResponse>;
|
|
||||||
/**
|
|
||||||
* 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);
|
|
||||||
}
|
|
455
node_modules/typed-rest-client/HttpClient.js
generated
vendored
455
node_modules/typed-rest-client/HttpClient.js
generated
vendored
@ -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;
|
|
0
node_modules/typed-rest-client/Index.d.ts
generated
vendored
0
node_modules/typed-rest-client/Index.d.ts
generated
vendored
62
node_modules/typed-rest-client/Interfaces.d.ts
generated
vendored
62
node_modules/typed-rest-client/Interfaces.d.ts
generated
vendored
@ -1,62 +0,0 @@
|
|||||||
/// <reference types="node" />
|
|
||||||
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<IHttpClientResponse>;
|
|
||||||
get(requestUrl: string, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
|
|
||||||
del(requestUrl: string, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
|
|
||||||
post(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
|
|
||||||
patch(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
|
|
||||||
put(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
|
|
||||||
sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
|
|
||||||
request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: IHeaders): Promise<IHttpClientResponse>;
|
|
||||||
requestRaw(info: IRequestInfo, data: string | NodeJS.ReadableStream): Promise<IHttpClientResponse>;
|
|
||||||
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<IHttpClientResponse>;
|
|
||||||
}
|
|
||||||
export interface IHttpClientResponse {
|
|
||||||
message: http.IncomingMessage;
|
|
||||||
readBody(): Promise<string>;
|
|
||||||
}
|
|
||||||
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;
|
|
||||||
}
|
|
5
node_modules/typed-rest-client/Interfaces.js
generated
vendored
5
node_modules/typed-rest-client/Interfaces.js
generated
vendored
@ -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 });
|
|
||||||
;
|
|
21
node_modules/typed-rest-client/LICENSE
generated
vendored
21
node_modules/typed-rest-client/LICENSE
generated
vendored
@ -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.
|
|
100
node_modules/typed-rest-client/README.md
generated
vendored
100
node_modules/typed-rest-client/README.md
generated
vendored
@ -1,100 +0,0 @@
|
|||||||
[](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:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 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.
|
|
77
node_modules/typed-rest-client/RestClient.d.ts
generated
vendored
77
node_modules/typed-rest-client/RestClient.d.ts
generated
vendored
@ -1,77 +0,0 @@
|
|||||||
/// <reference types="node" />
|
|
||||||
import httpm = require('./HttpClient');
|
|
||||||
import ifm = require("./Interfaces");
|
|
||||||
export interface IRestResponse<T> {
|
|
||||||
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<T>(requestUrl: string, options?: IRequestOptions): Promise<IRestResponse<T>>;
|
|
||||||
/**
|
|
||||||
* 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<T>(resource: string, options?: IRequestOptions): Promise<IRestResponse<T>>;
|
|
||||||
/**
|
|
||||||
* 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<T>(resource: string, options?: IRequestOptions): Promise<IRestResponse<T>>;
|
|
||||||
/**
|
|
||||||
* 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<T>(resource: string, resources: any, options?: IRequestOptions): Promise<IRestResponse<T>>;
|
|
||||||
/**
|
|
||||||
* 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<T>(resource: string, resources: any, options?: IRequestOptions): Promise<IRestResponse<T>>;
|
|
||||||
/**
|
|
||||||
* 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<T>(resource: string, resources: any, options?: IRequestOptions): Promise<IRestResponse<T>>;
|
|
||||||
uploadStream<T>(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, options?: IRequestOptions): Promise<IRestResponse<T>>;
|
|
||||||
private _headersFromOptions(options, contentType?);
|
|
||||||
private static dateTimeDeserializer(key, value);
|
|
||||||
private _processResponse<T>(res, options);
|
|
||||||
}
|
|
217
node_modules/typed-rest-client/RestClient.js
generated
vendored
217
node_modules/typed-rest-client/RestClient.js
generated
vendored
@ -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;
|
|
1318
node_modules/typed-rest-client/ThirdPartyNotice.txt
generated
vendored
1318
node_modules/typed-rest-client/ThirdPartyNotice.txt
generated
vendored
File diff suppressed because it is too large
Load Diff
7
node_modules/typed-rest-client/Util.d.ts
generated
vendored
7
node_modules/typed-rest-client/Util.d.ts
generated
vendored
@ -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;
|
|
35
node_modules/typed-rest-client/Util.js
generated
vendored
35
node_modules/typed-rest-client/Util.js
generated
vendored
@ -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;
|
|
9
node_modules/typed-rest-client/handlers/basiccreds.d.ts
generated
vendored
9
node_modules/typed-rest-client/handlers/basiccreds.d.ts
generated
vendored
@ -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<ifm.IHttpClientResponse>;
|
|
||||||
}
|
|
24
node_modules/typed-rest-client/handlers/basiccreds.js
generated
vendored
24
node_modules/typed-rest-client/handlers/basiccreds.js
generated
vendored
@ -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;
|
|
8
node_modules/typed-rest-client/handlers/bearertoken.d.ts
generated
vendored
8
node_modules/typed-rest-client/handlers/bearertoken.d.ts
generated
vendored
@ -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<ifm.IHttpClientResponse>;
|
|
||||||
}
|
|
23
node_modules/typed-rest-client/handlers/bearertoken.js
generated
vendored
23
node_modules/typed-rest-client/handlers/bearertoken.js
generated
vendored
@ -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;
|
|
13
node_modules/typed-rest-client/handlers/ntlm.d.ts
generated
vendored
13
node_modules/typed-rest-client/handlers/ntlm.d.ts
generated
vendored
@ -1,13 +0,0 @@
|
|||||||
/// <reference types="node" />
|
|
||||||
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<ifm.IHttpClientResponse>;
|
|
||||||
private handleAuthenticationPrivate(httpClient, requestInfo, objs, finalCallback);
|
|
||||||
private sendType1Message(httpClient, requestInfo, objs, finalCallback);
|
|
||||||
private sendType3Message(httpClient, requestInfo, objs, res, callback);
|
|
||||||
}
|
|
137
node_modules/typed-rest-client/handlers/ntlm.js
generated
vendored
137
node_modules/typed-rest-client/handlers/ntlm.js
generated
vendored
@ -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;
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user