mirror of
https://gitea.com/actions/setup-maven.git
synced 2025-11-08 02:46:20 +08:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e6546c999 | ||
|
|
728d3d7f66 | ||
|
|
7060d72b50 | ||
|
|
5f0391e280 | ||
|
|
eed613a1e5 | ||
|
|
dfb5e9e0e2 | ||
|
|
3c9ddfb1c6 | ||
|
|
25f7163d53 | ||
|
|
d55bf2a4b0 | ||
|
|
1d56b37995 | ||
|
|
1996e963e1 | ||
|
|
a9bcf4cc10 | ||
|
|
ae0022e050 | ||
|
|
66602c7280 | ||
|
|
fbb2b0cc60 |
@@ -4,7 +4,7 @@ Add this step into workflow
|
|||||||
|
|
||||||
```
|
```
|
||||||
- name: Set up Maven
|
- name: Set up Maven
|
||||||
uses: stCarolas/setup-maven@v1
|
uses: stCarolas/setup-maven@v4.2
|
||||||
with:
|
with:
|
||||||
maven-version: 3.5.4
|
maven-version: 3.8.2
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
name: 'Setup Maven'
|
name: 'Setup Maven'
|
||||||
description: 'Install Apache Maven and add it to the PATH'
|
description: 'Install a specific version of Apache Maven and add it to the PATH'
|
||||||
author: 'stCarolas'
|
author: 'stCarolas'
|
||||||
inputs:
|
inputs:
|
||||||
maven-version:
|
maven-version:
|
||||||
description: 'Version Spec of the version to use. Examples: 10.x, 10.15.1, >=10.15.0'
|
description: 'Version Spec of the version to use. Examples: 10.x, 10.15.1, >=10.15.0'
|
||||||
default: '3.5.4'
|
default: '3.8.2'
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'lib/setup-maven.js'
|
main: 'lib/setup-maven.js'
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ exports.getMaven = getMaven;
|
|||||||
function downloadMaven(version) {
|
function downloadMaven(version) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const toolDirectoryName = `apache-maven-${version}`;
|
const toolDirectoryName = `apache-maven-${version}`;
|
||||||
const downloadUrl = `https://www-eu.apache.org/dist/maven/maven-3/${version}/binaries/${toolDirectoryName}-bin.tar.gz`;
|
const downloadUrl = `https://archive.apache.org/dist/maven/maven-3/${version}/binaries/${toolDirectoryName}-bin.tar.gz`;
|
||||||
console.log(`downloading ${downloadUrl}`);
|
console.log(`downloading ${downloadUrl}`);
|
||||||
try {
|
try {
|
||||||
const downloadPath = yield tc.downloadTool(downloadUrl);
|
const downloadPath = yield tc.downloadTool(downloadUrl);
|
||||||
|
|||||||
1
node_modules/.bin/esparse
generated
vendored
Symbolic link
1
node_modules/.bin/esparse
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../esprima/bin/esparse.js
|
||||||
1
node_modules/.bin/esvalidate
generated
vendored
Symbolic link
1
node_modules/.bin/esvalidate
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../esprima/bin/esvalidate.js
|
||||||
1
node_modules/.bin/husky-upgrade
generated
vendored
Symbolic link
1
node_modules/.bin/husky-upgrade
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../husky/lib/upgrader/bin.js
|
||||||
1
node_modules/.bin/is-ci
generated
vendored
Symbolic link
1
node_modules/.bin/is-ci
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../is-ci/bin.js
|
||||||
1
node_modules/.bin/js-yaml
generated
vendored
Symbolic link
1
node_modules/.bin/js-yaml
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../js-yaml/bin/js-yaml.js
|
||||||
1
node_modules/.bin/prettier
generated
vendored
Symbolic link
1
node_modules/.bin/prettier
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../prettier/bin-prettier.js
|
||||||
1
node_modules/.bin/run-node
generated
vendored
Symbolic link
1
node_modules/.bin/run-node
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../run-node/run-node
|
||||||
1
node_modules/.bin/tsc
generated
vendored
Symbolic link
1
node_modules/.bin/tsc
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../typescript/bin/tsc
|
||||||
1
node_modules/.bin/tsserver
generated
vendored
Symbolic link
1
node_modules/.bin/tsserver
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../typescript/bin/tsserver
|
||||||
1112
node_modules/.package-lock.json
generated
vendored
Normal file
1112
node_modules/.package-lock.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
node_modules/@actions/core/LICENSE.md
generated
vendored
Normal file
9
node_modules/@actions/core/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
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.
|
||||||
9
node_modules/@actions/core/README.md
generated
vendored
9
node_modules/@actions/core/README.md
generated
vendored
@@ -82,7 +82,14 @@ try {
|
|||||||
core.warning('myInput was not set');
|
core.warning('myInput was not set');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (core.isDebug()) {
|
||||||
|
// curl -v https://github.com
|
||||||
|
} else {
|
||||||
|
// curl https://github.com
|
||||||
|
}
|
||||||
|
|
||||||
// Do stuff
|
// Do stuff
|
||||||
|
core.info('Output to the actions build log')
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
core.error(`Error ${err}, action may still succeed though`);
|
core.error(`Error ${err}, action may still succeed though`);
|
||||||
@@ -137,4 +144,4 @@ const core = require('@actions/core');
|
|||||||
var pid = core.getState("pidToKill");
|
var pid = core.getState("pidToKill");
|
||||||
|
|
||||||
process.kill(pid);
|
process.kill(pid);
|
||||||
```
|
```
|
||||||
|
|||||||
10
node_modules/@actions/core/lib/command.d.ts
generated
vendored
10
node_modules/@actions/core/lib/command.d.ts
generated
vendored
@@ -1,16 +1,16 @@
|
|||||||
interface CommandProperties {
|
interface CommandProperties {
|
||||||
[key: string]: string;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Commands
|
* Commands
|
||||||
*
|
*
|
||||||
* Command Format:
|
* Command Format:
|
||||||
* ##[name key=value;key=value]message
|
* ::name key=value,key=value::message
|
||||||
*
|
*
|
||||||
* Examples:
|
* Examples:
|
||||||
* ##[warning]This is the user warning message
|
* ::warning::This is the message
|
||||||
* ##[set-secret name=mypassword]definitelyNotAPassword!
|
* ::set-env name=MY_VAR::some value
|
||||||
*/
|
*/
|
||||||
export declare function issueCommand(command: string, properties: CommandProperties, message: string): void;
|
export declare function issueCommand(command: string, properties: CommandProperties, message: any): void;
|
||||||
export declare function issue(name: string, message?: string): void;
|
export declare function issue(name: string, message?: string): void;
|
||||||
export {};
|
export {};
|
||||||
|
|||||||
47
node_modules/@actions/core/lib/command.js
generated
vendored
47
node_modules/@actions/core/lib/command.js
generated
vendored
@@ -1,15 +1,23 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||||
|
result["default"] = mod;
|
||||||
|
return result;
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const os = require("os");
|
const os = __importStar(require("os"));
|
||||||
|
const utils_1 = require("./utils");
|
||||||
/**
|
/**
|
||||||
* Commands
|
* Commands
|
||||||
*
|
*
|
||||||
* Command Format:
|
* Command Format:
|
||||||
* ##[name key=value;key=value]message
|
* ::name key=value,key=value::message
|
||||||
*
|
*
|
||||||
* Examples:
|
* Examples:
|
||||||
* ##[warning]This is the user warning message
|
* ::warning::This is the message
|
||||||
* ##[set-secret name=mypassword]definitelyNotAPassword!
|
* ::set-env name=MY_VAR::some value
|
||||||
*/
|
*/
|
||||||
function issueCommand(command, properties, message) {
|
function issueCommand(command, properties, message) {
|
||||||
const cmd = new Command(command, properties, message);
|
const cmd = new Command(command, properties, message);
|
||||||
@@ -34,33 +42,38 @@ class Command {
|
|||||||
let cmdStr = CMD_STRING + this.command;
|
let cmdStr = CMD_STRING + this.command;
|
||||||
if (this.properties && Object.keys(this.properties).length > 0) {
|
if (this.properties && Object.keys(this.properties).length > 0) {
|
||||||
cmdStr += ' ';
|
cmdStr += ' ';
|
||||||
|
let first = true;
|
||||||
for (const key in this.properties) {
|
for (const key in this.properties) {
|
||||||
if (this.properties.hasOwnProperty(key)) {
|
if (this.properties.hasOwnProperty(key)) {
|
||||||
const val = this.properties[key];
|
const val = this.properties[key];
|
||||||
if (val) {
|
if (val) {
|
||||||
// safely append the val - avoid blowing up when attempting to
|
if (first) {
|
||||||
// call .replace() if message is not a string for some reason
|
first = false;
|
||||||
cmdStr += `${key}=${escape(`${val || ''}`)},`;
|
}
|
||||||
|
else {
|
||||||
|
cmdStr += ',';
|
||||||
|
}
|
||||||
|
cmdStr += `${key}=${escapeProperty(val)}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmdStr += CMD_STRING;
|
cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
|
||||||
// safely append the message - avoid blowing up when attempting to
|
|
||||||
// call .replace() if message is not a string for some reason
|
|
||||||
const message = `${this.message || ''}`;
|
|
||||||
cmdStr += escapeData(message);
|
|
||||||
return cmdStr;
|
return cmdStr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function escapeData(s) {
|
function escapeData(s) {
|
||||||
return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A');
|
return utils_1.toCommandValue(s)
|
||||||
|
.replace(/%/g, '%25')
|
||||||
|
.replace(/\r/g, '%0D')
|
||||||
|
.replace(/\n/g, '%0A');
|
||||||
}
|
}
|
||||||
function escape(s) {
|
function escapeProperty(s) {
|
||||||
return s
|
return utils_1.toCommandValue(s)
|
||||||
|
.replace(/%/g, '%25')
|
||||||
.replace(/\r/g, '%0D')
|
.replace(/\r/g, '%0D')
|
||||||
.replace(/\n/g, '%0A')
|
.replace(/\n/g, '%0A')
|
||||||
.replace(/]/g, '%5D')
|
.replace(/:/g, '%3A')
|
||||||
.replace(/;/g, '%3B');
|
.replace(/,/g, '%2C');
|
||||||
}
|
}
|
||||||
//# sourceMappingURL=command.js.map
|
//# sourceMappingURL=command.js.map
|
||||||
2
node_modules/@actions/core/lib/command.js.map
generated
vendored
2
node_modules/@actions/core/lib/command.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;AAAA,yBAAwB;AAQxB;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAe;IAEf,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,UAAkB,EAAE;IACtD,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,QAAQ;QACN,IAAI,MAAM,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAA;QAEtC,IAAI,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9D,MAAM,IAAI,GAAG,CAAA;YACb,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACvC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;oBAChC,IAAI,GAAG,EAAE;wBACP,8DAA8D;wBAC9D,6DAA6D;wBAC7D,MAAM,IAAI,GAAG,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,IAAI,EAAE,EAAE,CAAC,GAAG,CAAA;qBAC9C;iBACF;aACF;SACF;QAED,MAAM,IAAI,UAAU,CAAA;QAEpB,kEAAkE;QAClE,6DAA6D;QAC7D,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,CAAA;QACvC,MAAM,IAAI,UAAU,CAAC,OAAO,CAAC,CAAA;QAE7B,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AACtD,CAAC;AAED,SAAS,MAAM,CAAC,CAAS;IACvB,OAAO,CAAC;SACL,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"}
|
{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAwB;AACxB,mCAAsC;AAWtC;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAY;IAEZ,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,UAAkB,EAAE;IACtD,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,QAAQ;QACN,IAAI,MAAM,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAA;QAEtC,IAAI,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9D,MAAM,IAAI,GAAG,CAAA;YACb,IAAI,KAAK,GAAG,IAAI,CAAA;YAChB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACvC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;oBAChC,IAAI,GAAG,EAAE;wBACP,IAAI,KAAK,EAAE;4BACT,KAAK,GAAG,KAAK,CAAA;yBACd;6BAAM;4BACL,MAAM,IAAI,GAAG,CAAA;yBACd;wBAED,MAAM,IAAI,GAAG,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,CAAA;qBAC1C;iBACF;aACF;SACF;QAED,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAA;QACpD,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAM;IACxB,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,CAAM;IAC5B,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"}
|
||||||
32
node_modules/@actions/core/lib/core.d.ts
generated
vendored
32
node_modules/@actions/core/lib/core.d.ts
generated
vendored
@@ -21,9 +21,9 @@ export declare enum ExitCode {
|
|||||||
/**
|
/**
|
||||||
* Sets env variable for this action and future actions in the job
|
* Sets env variable for this action and future actions in the job
|
||||||
* @param name the name of the variable to set
|
* @param name the name of the variable to set
|
||||||
* @param val the value of the variable
|
* @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
|
||||||
*/
|
*/
|
||||||
export declare function exportVariable(name: string, val: string): void;
|
export declare function exportVariable(name: string, val: any): void;
|
||||||
/**
|
/**
|
||||||
* Registers a secret which will get masked from logs
|
* Registers a secret which will get masked from logs
|
||||||
* @param secret value of the secret
|
* @param secret value of the secret
|
||||||
@@ -46,15 +46,25 @@ export declare function getInput(name: string, options?: InputOptions): string;
|
|||||||
* Sets the value of an output.
|
* Sets the value of an output.
|
||||||
*
|
*
|
||||||
* @param name name of the output to set
|
* @param name name of the output to set
|
||||||
* @param value value to store
|
* @param value value to store. Non-string values will be converted to a string via JSON.stringify
|
||||||
*/
|
*/
|
||||||
export declare function setOutput(name: string, value: string): void;
|
export declare function setOutput(name: string, value: any): void;
|
||||||
|
/**
|
||||||
|
* Enables or disables the echoing of commands into stdout for the rest of the step.
|
||||||
|
* Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export declare function setCommandEcho(enabled: boolean): void;
|
||||||
/**
|
/**
|
||||||
* Sets the action status to failed.
|
* Sets the action status to failed.
|
||||||
* When the action exits it will be with an exit code of 1
|
* When the action exits it will be with an exit code of 1
|
||||||
* @param message add error issue message
|
* @param message add error issue message
|
||||||
*/
|
*/
|
||||||
export declare function setFailed(message: string): void;
|
export declare function setFailed(message: string | Error): void;
|
||||||
|
/**
|
||||||
|
* Gets whether Actions Step Debug is on or not
|
||||||
|
*/
|
||||||
|
export declare function isDebug(): boolean;
|
||||||
/**
|
/**
|
||||||
* Writes debug message to user log
|
* Writes debug message to user log
|
||||||
* @param message debug message
|
* @param message debug message
|
||||||
@@ -62,14 +72,14 @@ export declare function setFailed(message: string): void;
|
|||||||
export declare function debug(message: string): void;
|
export declare function debug(message: string): void;
|
||||||
/**
|
/**
|
||||||
* Adds an error issue
|
* Adds an error issue
|
||||||
* @param message error issue message
|
* @param message error issue message. Errors will be converted to string via toString()
|
||||||
*/
|
*/
|
||||||
export declare function error(message: string): void;
|
export declare function error(message: string | Error): void;
|
||||||
/**
|
/**
|
||||||
* Adds an warning issue
|
* Adds an warning issue
|
||||||
* @param message warning issue message
|
* @param message warning issue message. Errors will be converted to string via toString()
|
||||||
*/
|
*/
|
||||||
export declare function warning(message: string): void;
|
export declare function warning(message: string | Error): void;
|
||||||
/**
|
/**
|
||||||
* Writes info to log with console.log.
|
* Writes info to log with console.log.
|
||||||
* @param message info message
|
* @param message info message
|
||||||
@@ -100,9 +110,9 @@ export declare function group<T>(name: string, fn: () => Promise<T>): Promise<T>
|
|||||||
* Saves state for current action, the state can only be retrieved by this action's post job execution.
|
* Saves state for current action, the state can only be retrieved by this action's post job execution.
|
||||||
*
|
*
|
||||||
* @param name name of the state to store
|
* @param name name of the state to store
|
||||||
* @param value value to store
|
* @param value value to store. Non-string values will be converted to a string via JSON.stringify
|
||||||
*/
|
*/
|
||||||
export declare function saveState(name: string, value: string): void;
|
export declare function saveState(name: string, value: any): void;
|
||||||
/**
|
/**
|
||||||
* Gets the value of an state set by this action's main execution.
|
* Gets the value of an state set by this action's main execution.
|
||||||
*
|
*
|
||||||
|
|||||||
67
node_modules/@actions/core/lib/core.js
generated
vendored
67
node_modules/@actions/core/lib/core.js
generated
vendored
@@ -8,10 +8,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||||
|
result["default"] = mod;
|
||||||
|
return result;
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const command_1 = require("./command");
|
const command_1 = require("./command");
|
||||||
const os = require("os");
|
const file_command_1 = require("./file-command");
|
||||||
const path = require("path");
|
const utils_1 = require("./utils");
|
||||||
|
const os = __importStar(require("os"));
|
||||||
|
const path = __importStar(require("path"));
|
||||||
/**
|
/**
|
||||||
* The code to exit an action
|
* The code to exit an action
|
||||||
*/
|
*/
|
||||||
@@ -32,11 +41,21 @@ var ExitCode;
|
|||||||
/**
|
/**
|
||||||
* Sets env variable for this action and future actions in the job
|
* Sets env variable for this action and future actions in the job
|
||||||
* @param name the name of the variable to set
|
* @param name the name of the variable to set
|
||||||
* @param val the value of the variable
|
* @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function exportVariable(name, val) {
|
function exportVariable(name, val) {
|
||||||
process.env[name] = val;
|
const convertedVal = utils_1.toCommandValue(val);
|
||||||
command_1.issueCommand('set-env', { name }, val);
|
process.env[name] = convertedVal;
|
||||||
|
const filePath = process.env['GITHUB_ENV'] || '';
|
||||||
|
if (filePath) {
|
||||||
|
const delimiter = '_GitHubActionsFileCommandDelimeter_';
|
||||||
|
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
|
||||||
|
file_command_1.issueCommand('ENV', commandValue);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
command_1.issueCommand('set-env', { name }, convertedVal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exports.exportVariable = exportVariable;
|
exports.exportVariable = exportVariable;
|
||||||
/**
|
/**
|
||||||
@@ -52,7 +71,13 @@ exports.setSecret = setSecret;
|
|||||||
* @param inputPath
|
* @param inputPath
|
||||||
*/
|
*/
|
||||||
function addPath(inputPath) {
|
function addPath(inputPath) {
|
||||||
command_1.issueCommand('add-path', {}, inputPath);
|
const filePath = process.env['GITHUB_PATH'] || '';
|
||||||
|
if (filePath) {
|
||||||
|
file_command_1.issueCommand('PATH', inputPath);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
command_1.issueCommand('add-path', {}, inputPath);
|
||||||
|
}
|
||||||
process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
|
process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
|
||||||
}
|
}
|
||||||
exports.addPath = addPath;
|
exports.addPath = addPath;
|
||||||
@@ -75,12 +100,22 @@ exports.getInput = getInput;
|
|||||||
* Sets the value of an output.
|
* Sets the value of an output.
|
||||||
*
|
*
|
||||||
* @param name name of the output to set
|
* @param name name of the output to set
|
||||||
* @param value value to store
|
* @param value value to store. Non-string values will be converted to a string via JSON.stringify
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function setOutput(name, value) {
|
function setOutput(name, value) {
|
||||||
command_1.issueCommand('set-output', { name }, value);
|
command_1.issueCommand('set-output', { name }, value);
|
||||||
}
|
}
|
||||||
exports.setOutput = setOutput;
|
exports.setOutput = setOutput;
|
||||||
|
/**
|
||||||
|
* Enables or disables the echoing of commands into stdout for the rest of the step.
|
||||||
|
* Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function setCommandEcho(enabled) {
|
||||||
|
command_1.issue('echo', enabled ? 'on' : 'off');
|
||||||
|
}
|
||||||
|
exports.setCommandEcho = setCommandEcho;
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
// Results
|
// Results
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
@@ -97,6 +132,13 @@ exports.setFailed = setFailed;
|
|||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
// Logging Commands
|
// Logging Commands
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* Gets whether Actions Step Debug is on or not
|
||||||
|
*/
|
||||||
|
function isDebug() {
|
||||||
|
return process.env['RUNNER_DEBUG'] === '1';
|
||||||
|
}
|
||||||
|
exports.isDebug = isDebug;
|
||||||
/**
|
/**
|
||||||
* Writes debug message to user log
|
* Writes debug message to user log
|
||||||
* @param message debug message
|
* @param message debug message
|
||||||
@@ -107,18 +149,18 @@ function debug(message) {
|
|||||||
exports.debug = debug;
|
exports.debug = debug;
|
||||||
/**
|
/**
|
||||||
* Adds an error issue
|
* Adds an error issue
|
||||||
* @param message error issue message
|
* @param message error issue message. Errors will be converted to string via toString()
|
||||||
*/
|
*/
|
||||||
function error(message) {
|
function error(message) {
|
||||||
command_1.issue('error', message);
|
command_1.issue('error', message instanceof Error ? message.toString() : message);
|
||||||
}
|
}
|
||||||
exports.error = error;
|
exports.error = error;
|
||||||
/**
|
/**
|
||||||
* Adds an warning issue
|
* Adds an warning issue
|
||||||
* @param message warning issue message
|
* @param message warning issue message. Errors will be converted to string via toString()
|
||||||
*/
|
*/
|
||||||
function warning(message) {
|
function warning(message) {
|
||||||
command_1.issue('warning', message);
|
command_1.issue('warning', message instanceof Error ? message.toString() : message);
|
||||||
}
|
}
|
||||||
exports.warning = warning;
|
exports.warning = warning;
|
||||||
/**
|
/**
|
||||||
@@ -176,8 +218,9 @@ exports.group = group;
|
|||||||
* Saves state for current action, the state can only be retrieved by this action's post job execution.
|
* Saves state for current action, the state can only be retrieved by this action's post job execution.
|
||||||
*
|
*
|
||||||
* @param name name of the state to store
|
* @param name name of the state to store
|
||||||
* @param value value to store
|
* @param value value to store. Non-string values will be converted to a string via JSON.stringify
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function saveState(name, value) {
|
function saveState(name, value) {
|
||||||
command_1.issueCommand('save-state', { name }, value);
|
command_1.issueCommand('save-state', { name }, value);
|
||||||
}
|
}
|
||||||
|
|||||||
2
node_modules/@actions/core/lib/core.js.map
generated
vendored
2
node_modules/@actions/core/lib/core.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uCAA6C;AAE7C,yBAAwB;AACxB,6BAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAW;IACtD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACvB,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,GAAG,CAAC,CAAA;AACtC,CAAC;AAHD,wCAGC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;AACtC,CAAC;AAFD,8BAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;IACvC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AAHD,0BAGC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAsB;IAC3D,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;IACrE,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAA;KAC5D;IAED,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC;AARD,4BAQC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED,yEAAyE;AACzE,UAAU;AACV,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAe;IACvC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAA;IACnC,KAAK,CAAC,OAAO,CAAC,CAAA;AAChB,CAAC;AAHD,8BAGC;AAED,yEAAyE;AACzE,mBAAmB;AACnB,yEAAyE;AAEzE;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,sBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACpC,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,eAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;AACzB,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,OAAe;IACrC,eAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;AAC3B,CAAC;AAFD,0BAEC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,oBAEC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,eAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC;AAED,yEAAyE;AACzE,uBAAuB;AACvB,yEAAyE;AAEzE;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC"}
|
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAA6C;AAC7C,iDAA+D;AAC/D,mCAAsC;AAEtC,uCAAwB;AACxB,2CAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,8DAA8D;AAC9D,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAQ;IACnD,MAAM,YAAY,GAAG,sBAAc,CAAC,GAAG,CAAC,CAAA;IACxC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,YAAY,CAAA;IAEhC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;IAChD,IAAI,QAAQ,EAAE;QACZ,MAAM,SAAS,GAAG,qCAAqC,CAAA;QACvD,MAAM,YAAY,GAAG,GAAG,IAAI,KAAK,SAAS,GAAG,EAAE,CAAC,GAAG,GAAG,YAAY,GAAG,EAAE,CAAC,GAAG,GAAG,SAAS,EAAE,CAAA;QACzF,2BAAgB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;KACtC;SAAM;QACL,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,YAAY,CAAC,CAAA;KAC9C;AACH,CAAC;AAZD,wCAYC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;AACtC,CAAC;AAFD,8BAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CAAA;IACjD,IAAI,QAAQ,EAAE;QACZ,2BAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;KACpC;SAAM;QACL,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;KACxC;IACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AARD,0BAQC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAsB;IAC3D,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;IACrE,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAA;KAC5D;IAED,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC;AARD,4BAQC;AAED;;;;;GAKG;AACH,8DAA8D;AAC9D,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAU;IAChD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAC,OAAgB;IAC7C,eAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;AACvC,CAAC;AAFD,wCAEC;AAED,yEAAyE;AACzE,UAAU;AACV,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAuB;IAC/C,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAA;IAEnC,KAAK,CAAC,OAAO,CAAC,CAAA;AAChB,CAAC;AAJD,8BAIC;AAED,yEAAyE;AACzE,mBAAmB;AACnB,yEAAyE;AAEzE;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,GAAG,CAAA;AAC5C,CAAC;AAFD,0BAEC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,sBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACpC,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAuB;IAC3C,eAAK,CAAC,OAAO,EAAE,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;AACzE,CAAC;AAFD,sBAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,OAAuB;IAC7C,eAAK,CAAC,SAAS,EAAE,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;AAC3E,CAAC;AAFD,0BAEC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,oBAEC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,eAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC;AAED,yEAAyE;AACzE,uBAAuB;AACvB,yEAAyE;AAEzE;;;;;GAKG;AACH,8DAA8D;AAC9D,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAU;IAChD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC"}
|
||||||
1
node_modules/@actions/core/lib/file-command.d.ts
generated
vendored
Normal file
1
node_modules/@actions/core/lib/file-command.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export declare function issueCommand(command: string, message: any): void;
|
||||||
29
node_modules/@actions/core/lib/file-command.js
generated
vendored
Normal file
29
node_modules/@actions/core/lib/file-command.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
"use strict";
|
||||||
|
// For internal use, subject to change.
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||||
|
result["default"] = mod;
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
// We use any as a valid input type
|
||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
|
const fs = __importStar(require("fs"));
|
||||||
|
const os = __importStar(require("os"));
|
||||||
|
const utils_1 = require("./utils");
|
||||||
|
function issueCommand(command, message) {
|
||||||
|
const filePath = process.env[`GITHUB_${command}`];
|
||||||
|
if (!filePath) {
|
||||||
|
throw new Error(`Unable to find environment variable for file command ${command}`);
|
||||||
|
}
|
||||||
|
if (!fs.existsSync(filePath)) {
|
||||||
|
throw new Error(`Missing file at path: ${filePath}`);
|
||||||
|
}
|
||||||
|
fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {
|
||||||
|
encoding: 'utf8'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.issueCommand = issueCommand;
|
||||||
|
//# sourceMappingURL=file-command.js.map
|
||||||
1
node_modules/@actions/core/lib/file-command.js.map
generated
vendored
Normal file
1
node_modules/@actions/core/lib/file-command.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"file-command.js","sourceRoot":"","sources":["../src/file-command.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;;;;;;;AAEvC,mCAAmC;AACnC,uDAAuD;AAEvD,uCAAwB;AACxB,uCAAwB;AACxB,mCAAsC;AAEtC,SAAgB,YAAY,CAAC,OAAe,EAAE,OAAY;IACxD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAA;IACjD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CACb,wDAAwD,OAAO,EAAE,CAClE,CAAA;KACF;IACD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAA;KACrD;IAED,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,sBAAc,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;QACjE,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAA;AACJ,CAAC;AAdD,oCAcC"}
|
||||||
5
node_modules/@actions/core/lib/utils.d.ts
generated
vendored
Normal file
5
node_modules/@actions/core/lib/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/**
|
||||||
|
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
||||||
|
* @param input input to sanitize into a string
|
||||||
|
*/
|
||||||
|
export declare function toCommandValue(input: any): string;
|
||||||
19
node_modules/@actions/core/lib/utils.js
generated
vendored
Normal file
19
node_modules/@actions/core/lib/utils.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
"use strict";
|
||||||
|
// We use any as a valid input type
|
||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
/**
|
||||||
|
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
||||||
|
* @param input input to sanitize into a string
|
||||||
|
*/
|
||||||
|
function toCommandValue(input) {
|
||||||
|
if (input === null || input === undefined) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
else if (typeof input === 'string' || input instanceof String) {
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
return JSON.stringify(input);
|
||||||
|
}
|
||||||
|
exports.toCommandValue = toCommandValue;
|
||||||
|
//# sourceMappingURL=utils.js.map
|
||||||
1
node_modules/@actions/core/lib/utils.js.map
generated
vendored
Normal file
1
node_modules/@actions/core/lib/utils.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,uDAAuD;;AAEvD;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAAU;IACvC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;QACzC,OAAO,EAAE,CAAA;KACV;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,EAAE;QAC/D,OAAO,KAAe,CAAA;KACvB;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC;AAPD,wCAOC"}
|
||||||
29
node_modules/@actions/core/package.json
generated
vendored
29
node_modules/@actions/core/package.json
generated
vendored
@@ -1,29 +1,29 @@
|
|||||||
{
|
{
|
||||||
"_from": "@actions/core@^1.0.0",
|
"_from": "@actions/core@^1.2.6",
|
||||||
"_id": "@actions/core@1.2.0",
|
"_id": "@actions/core@1.2.6",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-ZKdyhlSlyz38S6YFfPnyNgCDZuAF2T0Qv5eHflNWytPS8Qjvz39bZFMry9Bb/dpSnqWcNeav5yM2CTYpJeY+Dw==",
|
"_integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==",
|
||||||
"_location": "/@actions/core",
|
"_location": "/@actions/core",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "range",
|
"type": "range",
|
||||||
"registry": true,
|
"registry": true,
|
||||||
"raw": "@actions/core@^1.0.0",
|
"raw": "@actions/core@^1.2.6",
|
||||||
"name": "@actions/core",
|
"name": "@actions/core",
|
||||||
"escapedName": "@actions%2fcore",
|
"escapedName": "@actions%2fcore",
|
||||||
"scope": "@actions",
|
"scope": "@actions",
|
||||||
"rawSpec": "^1.0.0",
|
"rawSpec": "^1.2.6",
|
||||||
"saveSpec": null,
|
"saveSpec": null,
|
||||||
"fetchSpec": "^1.0.0"
|
"fetchSpec": "^1.2.6"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/",
|
"/",
|
||||||
"/@actions/tool-cache"
|
"/@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.6.tgz",
|
||||||
"_shasum": "aa5f52b26c362c821d41557e599371a42f6c0b3d",
|
"_shasum": "a78d49f41a4def18e88ce47c2cac615d5694bf09",
|
||||||
"_spec": "@actions/core@^1.0.0",
|
"_spec": "@actions/core@^1.2.6",
|
||||||
"_where": "/home/stCarolas/Coding/projects/setup-maven",
|
"_where": "/home/uwe/src/github.com/uwehdaub/setup-maven",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
@@ -38,9 +38,10 @@
|
|||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib",
|
||||||
|
"!.DS_Store"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/actions/toolkit/tree/master/packages/core",
|
"homepage": "https://github.com/actions/toolkit/tree/main/packages/core",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
"actions",
|
"actions",
|
||||||
@@ -58,8 +59,10 @@
|
|||||||
"directory": "packages/core"
|
"directory": "packages/core"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json",
|
||||||
"test": "echo \"Error: run tests from root\" && exit 1",
|
"test": "echo \"Error: run tests from root\" && exit 1",
|
||||||
"tsc": "tsc"
|
"tsc": "tsc"
|
||||||
},
|
},
|
||||||
"version": "1.2.0"
|
"types": "lib/core.d.ts",
|
||||||
|
"version": "1.2.6"
|
||||||
}
|
}
|
||||||
|
|||||||
21
node_modules/@actions/http-client/LICENSE
generated
vendored
Normal file
21
node_modules/@actions/http-client/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Actions Http Client for Node.js
|
||||||
|
|
||||||
|
Copyright (c) GitHub, Inc.
|
||||||
|
|
||||||
|
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.
|
||||||
79
node_modules/@actions/http-client/README.md
generated
vendored
Normal file
79
node_modules/@actions/http-client/README.md
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="actions.png">
|
||||||
|
</p>
|
||||||
|
|
||||||
|
# Actions Http-Client
|
||||||
|
|
||||||
|
[](https://github.com/actions/http-client/actions)
|
||||||
|
|
||||||
|
A lightweight HTTP client optimized for use with actions, TypeScript with generics and async await.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- HTTP client with TypeScript generics and async/await/Promises
|
||||||
|
- Typings included so no need to acquire separately (great for intellisense and no versioning drift)
|
||||||
|
- [Proxy support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners#using-a-proxy-server-with-self-hosted-runners) just works with actions and the runner
|
||||||
|
- Targets ES2019 (runner runs actions with node 12+). Only supported on node 12+.
|
||||||
|
- Basic, Bearer and PAT Support out of the box. Extensible handlers for others.
|
||||||
|
- Redirects supported
|
||||||
|
|
||||||
|
Features and releases [here](./RELEASES.md)
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @actions/http-client --save
|
||||||
|
```
|
||||||
|
|
||||||
|
## Samples
|
||||||
|
|
||||||
|
See the [HTTP](./__tests__) 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](./__tests__) 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
|
||||||
|
```
|
||||||
|
|
||||||
|
## Node support
|
||||||
|
|
||||||
|
The http-client is built using the latest LTS version of Node 12. It may work on previous node LTS versions but it's tested and officially supported on Node12+.
|
||||||
|
|
||||||
|
## Support and Versioning
|
||||||
|
|
||||||
|
We follow semver and will hold compatibility between major versions and increment the minor version with new features and capabilities (while holding compat).
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
We welcome PRs. Please create an issue and if applicable, a design before proceeding with code.
|
||||||
|
|
||||||
|
once:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
To build:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
To run all tests:
|
||||||
|
```bash
|
||||||
|
$ npm test
|
||||||
|
```
|
||||||
26
node_modules/@actions/http-client/RELEASES.md
generated
vendored
Normal file
26
node_modules/@actions/http-client/RELEASES.md
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
## Releases
|
||||||
|
|
||||||
|
## 1.0.10
|
||||||
|
|
||||||
|
Contains a bug fix where proxy is defined without a user and password. see [PR here](https://github.com/actions/http-client/pull/42)
|
||||||
|
|
||||||
|
## 1.0.9
|
||||||
|
Throw HttpClientError instead of a generic Error from the \<verb>Json() helper methods when the server responds with a non-successful status code.
|
||||||
|
|
||||||
|
## 1.0.8
|
||||||
|
Fixed security issue where a redirect (e.g. 302) to another domain would pass headers. The fix was to strip the authorization header if the hostname was different. More [details in PR #27](https://github.com/actions/http-client/pull/27)
|
||||||
|
|
||||||
|
## 1.0.7
|
||||||
|
Update NPM dependencies and add 429 to the list of HttpCodes
|
||||||
|
|
||||||
|
## 1.0.6
|
||||||
|
Automatically sends Content-Type and Accept application/json headers for \<verb>Json() helper methods if not set in the client or parameters.
|
||||||
|
|
||||||
|
## 1.0.5
|
||||||
|
Adds \<verb>Json() helper methods for json over http scenarios.
|
||||||
|
|
||||||
|
## 1.0.4
|
||||||
|
Started to add \<verb>Json() helper methods. Do not use this release for that. Use >= 1.0.5 since there was an issue with types.
|
||||||
|
|
||||||
|
## 1.0.1 to 1.0.3
|
||||||
|
Adds proxy support.
|
||||||
BIN
node_modules/@actions/http-client/actions.png
generated
vendored
Normal file
BIN
node_modules/@actions/http-client/actions.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
23
node_modules/@actions/http-client/auth.d.ts
generated
vendored
Normal file
23
node_modules/@actions/http-client/auth.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
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>;
|
||||||
|
}
|
||||||
|
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>;
|
||||||
|
}
|
||||||
|
export declare class PersonalAccessTokenCredentialHandler implements ifm.IRequestHandler {
|
||||||
|
token: string;
|
||||||
|
constructor(token: string);
|
||||||
|
prepareRequest(options: any): void;
|
||||||
|
canHandleAuthentication(response: ifm.IHttpClientResponse): boolean;
|
||||||
|
handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise<ifm.IHttpClientResponse>;
|
||||||
|
}
|
||||||
58
node_modules/@actions/http-client/auth.js
generated
vendored
Normal file
58
node_modules/@actions/http-client/auth.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
class BasicCredentialHandler {
|
||||||
|
constructor(username, password) {
|
||||||
|
this.username = username;
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
prepareRequest(options) {
|
||||||
|
options.headers['Authorization'] =
|
||||||
|
'Basic ' +
|
||||||
|
Buffer.from(this.username + ':' + this.password).toString('base64');
|
||||||
|
}
|
||||||
|
// This handler cannot handle 401
|
||||||
|
canHandleAuthentication(response) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
handleAuthentication(httpClient, requestInfo, objs) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.BasicCredentialHandler = BasicCredentialHandler;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
// This handler cannot handle 401
|
||||||
|
canHandleAuthentication(response) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
handleAuthentication(httpClient, requestInfo, objs) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.BearerCredentialHandler = BearerCredentialHandler;
|
||||||
|
class PersonalAccessTokenCredentialHandler {
|
||||||
|
constructor(token) {
|
||||||
|
this.token = token;
|
||||||
|
}
|
||||||
|
// currently implements pre-authorization
|
||||||
|
// TODO: support preAuth = false where it hooks on 401
|
||||||
|
prepareRequest(options) {
|
||||||
|
options.headers['Authorization'] =
|
||||||
|
'Basic ' + Buffer.from('PAT:' + this.token).toString('base64');
|
||||||
|
}
|
||||||
|
// This handler cannot handle 401
|
||||||
|
canHandleAuthentication(response) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
handleAuthentication(httpClient, requestInfo, objs) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
|
||||||
124
node_modules/@actions/http-client/index.d.ts
generated
vendored
Normal file
124
node_modules/@actions/http-client/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
/// <reference types="node" />
|
||||||
|
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,
|
||||||
|
TooManyRequests = 429,
|
||||||
|
InternalServerError = 500,
|
||||||
|
NotImplemented = 501,
|
||||||
|
BadGateway = 502,
|
||||||
|
ServiceUnavailable = 503,
|
||||||
|
GatewayTimeout = 504
|
||||||
|
}
|
||||||
|
export declare enum Headers {
|
||||||
|
Accept = "accept",
|
||||||
|
ContentType = "content-type"
|
||||||
|
}
|
||||||
|
export declare enum MediaTypes {
|
||||||
|
ApplicationJson = "application/json"
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Returns the proxy URL, depending upon the supplied url and proxy environment variables.
|
||||||
|
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
||||||
|
*/
|
||||||
|
export declare function getProxyUrl(serverUrl: string): string;
|
||||||
|
export declare class HttpClientError extends Error {
|
||||||
|
constructor(message: string, statusCode: number);
|
||||||
|
statusCode: number;
|
||||||
|
result?: any;
|
||||||
|
}
|
||||||
|
export declare class HttpClientResponse implements ifm.IHttpClientResponse {
|
||||||
|
constructor(message: http.IncomingMessage);
|
||||||
|
message: http.IncomingMessage;
|
||||||
|
readBody(): Promise<string>;
|
||||||
|
}
|
||||||
|
export declare function isHttps(requestUrl: string): boolean;
|
||||||
|
export declare class HttpClient {
|
||||||
|
userAgent: string | undefined;
|
||||||
|
handlers: ifm.IRequestHandler[];
|
||||||
|
requestOptions: ifm.IRequestOptions;
|
||||||
|
private _ignoreSslError;
|
||||||
|
private _socketTimeout;
|
||||||
|
private _allowRedirects;
|
||||||
|
private _allowRedirectDowngrade;
|
||||||
|
private _maxRedirects;
|
||||||
|
private _allowRetries;
|
||||||
|
private _maxRetries;
|
||||||
|
private _agent;
|
||||||
|
private _proxyAgent;
|
||||||
|
private _keepAlive;
|
||||||
|
private _disposed;
|
||||||
|
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>;
|
||||||
|
/**
|
||||||
|
* Gets a typed object from an endpoint
|
||||||
|
* Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
|
||||||
|
*/
|
||||||
|
getJson<T>(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.ITypedResponse<T>>;
|
||||||
|
postJson<T>(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise<ifm.ITypedResponse<T>>;
|
||||||
|
putJson<T>(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise<ifm.ITypedResponse<T>>;
|
||||||
|
patchJson<T>(requestUrl: string, obj: any, additionalHeaders?: ifm.IHeaders): Promise<ifm.ITypedResponse<T>>;
|
||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
/**
|
||||||
|
* Gets an http agent. This function is useful when you need an http agent that handles
|
||||||
|
* routing through a proxy server - depending upon the url and proxy environment variables.
|
||||||
|
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
||||||
|
*/
|
||||||
|
getAgent(serverUrl: string): http.Agent;
|
||||||
|
private _prepareRequest;
|
||||||
|
private _mergeHeaders;
|
||||||
|
private _getExistingOrDefaultHeader;
|
||||||
|
private _getAgent;
|
||||||
|
private _performExponentialBackoff;
|
||||||
|
private static dateTimeDeserializer;
|
||||||
|
private _processResponse;
|
||||||
|
}
|
||||||
537
node_modules/@actions/http-client/index.js
generated
vendored
Normal file
537
node_modules/@actions/http-client/index.js
generated
vendored
Normal file
@@ -0,0 +1,537 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const http = require("http");
|
||||||
|
const https = require("https");
|
||||||
|
const pm = require("./proxy");
|
||||||
|
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["TooManyRequests"] = 429] = "TooManyRequests";
|
||||||
|
HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
|
||||||
|
HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
|
||||||
|
HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
|
||||||
|
HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
|
||||||
|
HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
|
||||||
|
})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
|
||||||
|
var Headers;
|
||||||
|
(function (Headers) {
|
||||||
|
Headers["Accept"] = "accept";
|
||||||
|
Headers["ContentType"] = "content-type";
|
||||||
|
})(Headers = exports.Headers || (exports.Headers = {}));
|
||||||
|
var MediaTypes;
|
||||||
|
(function (MediaTypes) {
|
||||||
|
MediaTypes["ApplicationJson"] = "application/json";
|
||||||
|
})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
|
||||||
|
/**
|
||||||
|
* Returns the proxy URL, depending upon the supplied url and proxy environment variables.
|
||||||
|
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
||||||
|
*/
|
||||||
|
function getProxyUrl(serverUrl) {
|
||||||
|
let proxyUrl = pm.getProxyUrl(new URL(serverUrl));
|
||||||
|
return proxyUrl ? proxyUrl.href : '';
|
||||||
|
}
|
||||||
|
exports.getProxyUrl = getProxyUrl;
|
||||||
|
const HttpRedirectCodes = [
|
||||||
|
HttpCodes.MovedPermanently,
|
||||||
|
HttpCodes.ResourceMoved,
|
||||||
|
HttpCodes.SeeOther,
|
||||||
|
HttpCodes.TemporaryRedirect,
|
||||||
|
HttpCodes.PermanentRedirect
|
||||||
|
];
|
||||||
|
const HttpResponseRetryCodes = [
|
||||||
|
HttpCodes.BadGateway,
|
||||||
|
HttpCodes.ServiceUnavailable,
|
||||||
|
HttpCodes.GatewayTimeout
|
||||||
|
];
|
||||||
|
const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
|
||||||
|
const ExponentialBackoffCeiling = 10;
|
||||||
|
const ExponentialBackoffTimeSlice = 5;
|
||||||
|
class HttpClientError extends Error {
|
||||||
|
constructor(message, statusCode) {
|
||||||
|
super(message);
|
||||||
|
this.name = 'HttpClientError';
|
||||||
|
this.statusCode = statusCode;
|
||||||
|
Object.setPrototypeOf(this, HttpClientError.prototype);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.HttpClientError = HttpClientError;
|
||||||
|
class HttpClientResponse {
|
||||||
|
constructor(message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
readBody() {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
let output = Buffer.alloc(0);
|
||||||
|
this.message.on('data', (chunk) => {
|
||||||
|
output = Buffer.concat([output, chunk]);
|
||||||
|
});
|
||||||
|
this.message.on('end', () => {
|
||||||
|
resolve(output.toString());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.HttpClientResponse = HttpClientResponse;
|
||||||
|
function isHttps(requestUrl) {
|
||||||
|
let parsedUrl = new URL(requestUrl);
|
||||||
|
return parsedUrl.protocol === 'https:';
|
||||||
|
}
|
||||||
|
exports.isHttps = isHttps;
|
||||||
|
class HttpClient {
|
||||||
|
constructor(userAgent, handlers, requestOptions) {
|
||||||
|
this._ignoreSslError = false;
|
||||||
|
this._allowRedirects = true;
|
||||||
|
this._allowRedirectDowngrade = false;
|
||||||
|
this._maxRedirects = 50;
|
||||||
|
this._allowRetries = false;
|
||||||
|
this._maxRetries = 1;
|
||||||
|
this._keepAlive = false;
|
||||||
|
this._disposed = false;
|
||||||
|
this.userAgent = userAgent;
|
||||||
|
this.handlers = handlers || [];
|
||||||
|
this.requestOptions = requestOptions;
|
||||||
|
if (requestOptions) {
|
||||||
|
if (requestOptions.ignoreSslError != null) {
|
||||||
|
this._ignoreSslError = requestOptions.ignoreSslError;
|
||||||
|
}
|
||||||
|
this._socketTimeout = requestOptions.socketTimeout;
|
||||||
|
if (requestOptions.allowRedirects != null) {
|
||||||
|
this._allowRedirects = requestOptions.allowRedirects;
|
||||||
|
}
|
||||||
|
if (requestOptions.allowRedirectDowngrade != null) {
|
||||||
|
this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
|
||||||
|
}
|
||||||
|
if (requestOptions.maxRedirects != null) {
|
||||||
|
this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
|
||||||
|
}
|
||||||
|
if (requestOptions.keepAlive != null) {
|
||||||
|
this._keepAlive = requestOptions.keepAlive;
|
||||||
|
}
|
||||||
|
if (requestOptions.allowRetries != null) {
|
||||||
|
this._allowRetries = requestOptions.allowRetries;
|
||||||
|
}
|
||||||
|
if (requestOptions.maxRetries != null) {
|
||||||
|
this._maxRetries = requestOptions.maxRetries;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
options(requestUrl, additionalHeaders) {
|
||||||
|
return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
|
||||||
|
}
|
||||||
|
get(requestUrl, additionalHeaders) {
|
||||||
|
return this.request('GET', requestUrl, null, additionalHeaders || {});
|
||||||
|
}
|
||||||
|
del(requestUrl, additionalHeaders) {
|
||||||
|
return this.request('DELETE', requestUrl, null, additionalHeaders || {});
|
||||||
|
}
|
||||||
|
post(requestUrl, data, additionalHeaders) {
|
||||||
|
return this.request('POST', requestUrl, data, additionalHeaders || {});
|
||||||
|
}
|
||||||
|
patch(requestUrl, data, additionalHeaders) {
|
||||||
|
return this.request('PATCH', requestUrl, data, additionalHeaders || {});
|
||||||
|
}
|
||||||
|
put(requestUrl, data, additionalHeaders) {
|
||||||
|
return this.request('PUT', requestUrl, data, additionalHeaders || {});
|
||||||
|
}
|
||||||
|
head(requestUrl, additionalHeaders) {
|
||||||
|
return this.request('HEAD', requestUrl, null, additionalHeaders || {});
|
||||||
|
}
|
||||||
|
sendStream(verb, requestUrl, stream, additionalHeaders) {
|
||||||
|
return this.request(verb, requestUrl, stream, additionalHeaders);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Gets a typed object from an endpoint
|
||||||
|
* Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
|
||||||
|
*/
|
||||||
|
async getJson(requestUrl, additionalHeaders = {}) {
|
||||||
|
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
|
||||||
|
let res = await this.get(requestUrl, additionalHeaders);
|
||||||
|
return this._processResponse(res, this.requestOptions);
|
||||||
|
}
|
||||||
|
async postJson(requestUrl, obj, additionalHeaders = {}) {
|
||||||
|
let data = JSON.stringify(obj, null, 2);
|
||||||
|
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
|
||||||
|
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
|
||||||
|
let res = await this.post(requestUrl, data, additionalHeaders);
|
||||||
|
return this._processResponse(res, this.requestOptions);
|
||||||
|
}
|
||||||
|
async putJson(requestUrl, obj, additionalHeaders = {}) {
|
||||||
|
let data = JSON.stringify(obj, null, 2);
|
||||||
|
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
|
||||||
|
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
|
||||||
|
let res = await this.put(requestUrl, data, additionalHeaders);
|
||||||
|
return this._processResponse(res, this.requestOptions);
|
||||||
|
}
|
||||||
|
async patchJson(requestUrl, obj, additionalHeaders = {}) {
|
||||||
|
let data = JSON.stringify(obj, null, 2);
|
||||||
|
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
|
||||||
|
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
|
||||||
|
let res = await this.patch(requestUrl, data, additionalHeaders);
|
||||||
|
return this._processResponse(res, this.requestOptions);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Makes a raw http request.
|
||||||
|
* All other methods such as get, post, patch, and request ultimately call this.
|
||||||
|
* Prefer get, del, post and patch
|
||||||
|
*/
|
||||||
|
async request(verb, requestUrl, data, headers) {
|
||||||
|
if (this._disposed) {
|
||||||
|
throw new Error('Client has already been disposed.');
|
||||||
|
}
|
||||||
|
let parsedUrl = new URL(requestUrl);
|
||||||
|
let info = this._prepareRequest(verb, parsedUrl, headers);
|
||||||
|
// Only perform retries on reads since writes may not be idempotent.
|
||||||
|
let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1
|
||||||
|
? this._maxRetries + 1
|
||||||
|
: 1;
|
||||||
|
let numTries = 0;
|
||||||
|
let response;
|
||||||
|
while (numTries < maxTries) {
|
||||||
|
response = await this.requestRaw(info, data);
|
||||||
|
// Check if it's an authentication challenge
|
||||||
|
if (response &&
|
||||||
|
response.message &&
|
||||||
|
response.message.statusCode === HttpCodes.Unauthorized) {
|
||||||
|
let authenticationHandler;
|
||||||
|
for (let i = 0; i < this.handlers.length; i++) {
|
||||||
|
if (this.handlers[i].canHandleAuthentication(response)) {
|
||||||
|
authenticationHandler = this.handlers[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (authenticationHandler) {
|
||||||
|
return authenticationHandler.handleAuthentication(this, info, data);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// We have received an unauthorized response but have no handlers to handle it.
|
||||||
|
// Let the response return to the caller.
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let redirectsRemaining = this._maxRedirects;
|
||||||
|
while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 &&
|
||||||
|
this._allowRedirects &&
|
||||||
|
redirectsRemaining > 0) {
|
||||||
|
const redirectUrl = response.message.headers['location'];
|
||||||
|
if (!redirectUrl) {
|
||||||
|
// if there's no location to redirect to, we won't
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
let parsedRedirectUrl = new URL(redirectUrl);
|
||||||
|
if (parsedUrl.protocol == 'https:' &&
|
||||||
|
parsedUrl.protocol != parsedRedirectUrl.protocol &&
|
||||||
|
!this._allowRedirectDowngrade) {
|
||||||
|
throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
|
||||||
|
}
|
||||||
|
// we need to finish reading the response before reassigning response
|
||||||
|
// which will leak the open socket.
|
||||||
|
await response.readBody();
|
||||||
|
// strip authorization header if redirected to a different hostname
|
||||||
|
if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
|
||||||
|
for (let header in headers) {
|
||||||
|
// header names are case insensitive
|
||||||
|
if (header.toLowerCase() === 'authorization') {
|
||||||
|
delete headers[header];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// let's make the request with the new redirectUrl
|
||||||
|
info = this._prepareRequest(verb, parsedRedirectUrl, headers);
|
||||||
|
response = await this.requestRaw(info, data);
|
||||||
|
redirectsRemaining--;
|
||||||
|
}
|
||||||
|
if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) {
|
||||||
|
// If not a retry code, return immediately instead of retrying
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
numTries += 1;
|
||||||
|
if (numTries < maxTries) {
|
||||||
|
await response.readBody();
|
||||||
|
await this._performExponentialBackoff(numTries);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Needs to be called if keepAlive is set to true in request options.
|
||||||
|
*/
|
||||||
|
dispose() {
|
||||||
|
if (this._agent) {
|
||||||
|
this._agent.destroy();
|
||||||
|
}
|
||||||
|
this._disposed = true;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Raw request.
|
||||||
|
* @param info
|
||||||
|
* @param data
|
||||||
|
*/
|
||||||
|
requestRaw(info, data) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let callbackForResult = function (err, res) {
|
||||||
|
if (err) {
|
||||||
|
reject(err);
|
||||||
|
}
|
||||||
|
resolve(res);
|
||||||
|
};
|
||||||
|
this.requestRawWithCallback(info, data, callbackForResult);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Raw request with callback.
|
||||||
|
* @param info
|
||||||
|
* @param data
|
||||||
|
* @param onResult
|
||||||
|
*/
|
||||||
|
requestRawWithCallback(info, data, onResult) {
|
||||||
|
let socket;
|
||||||
|
if (typeof data === 'string') {
|
||||||
|
info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
|
||||||
|
}
|
||||||
|
let callbackCalled = false;
|
||||||
|
let handleResult = (err, res) => {
|
||||||
|
if (!callbackCalled) {
|
||||||
|
callbackCalled = true;
|
||||||
|
onResult(err, res);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let req = info.httpModule.request(info.options, (msg) => {
|
||||||
|
let res = new HttpClientResponse(msg);
|
||||||
|
handleResult(null, res);
|
||||||
|
});
|
||||||
|
req.on('socket', sock => {
|
||||||
|
socket = sock;
|
||||||
|
});
|
||||||
|
// If we ever get disconnected, we want the socket to timeout eventually
|
||||||
|
req.setTimeout(this._socketTimeout || 3 * 60000, () => {
|
||||||
|
if (socket) {
|
||||||
|
socket.end();
|
||||||
|
}
|
||||||
|
handleResult(new Error('Request timeout: ' + info.options.path), null);
|
||||||
|
});
|
||||||
|
req.on('error', function (err) {
|
||||||
|
// err has statusCode property
|
||||||
|
// res should have headers
|
||||||
|
handleResult(err, null);
|
||||||
|
});
|
||||||
|
if (data && typeof data === 'string') {
|
||||||
|
req.write(data, 'utf8');
|
||||||
|
}
|
||||||
|
if (data && typeof data !== 'string') {
|
||||||
|
data.on('close', function () {
|
||||||
|
req.end();
|
||||||
|
});
|
||||||
|
data.pipe(req);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
req.end();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Gets an http agent. This function is useful when you need an http agent that handles
|
||||||
|
* routing through a proxy server - depending upon the url and proxy environment variables.
|
||||||
|
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
|
||||||
|
*/
|
||||||
|
getAgent(serverUrl) {
|
||||||
|
let parsedUrl = new URL(serverUrl);
|
||||||
|
return this._getAgent(parsedUrl);
|
||||||
|
}
|
||||||
|
_prepareRequest(method, requestUrl, headers) {
|
||||||
|
const info = {};
|
||||||
|
info.parsedUrl = requestUrl;
|
||||||
|
const usingSsl = info.parsedUrl.protocol === 'https:';
|
||||||
|
info.httpModule = usingSsl ? https : http;
|
||||||
|
const defaultPort = usingSsl ? 443 : 80;
|
||||||
|
info.options = {};
|
||||||
|
info.options.host = info.parsedUrl.hostname;
|
||||||
|
info.options.port = info.parsedUrl.port
|
||||||
|
? parseInt(info.parsedUrl.port)
|
||||||
|
: defaultPort;
|
||||||
|
info.options.path =
|
||||||
|
(info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
|
||||||
|
info.options.method = method;
|
||||||
|
info.options.headers = this._mergeHeaders(headers);
|
||||||
|
if (this.userAgent != null) {
|
||||||
|
info.options.headers['user-agent'] = this.userAgent;
|
||||||
|
}
|
||||||
|
info.options.agent = this._getAgent(info.parsedUrl);
|
||||||
|
// gives handlers an opportunity to participate
|
||||||
|
if (this.handlers) {
|
||||||
|
this.handlers.forEach(handler => {
|
||||||
|
handler.prepareRequest(info.options);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
_mergeHeaders(headers) {
|
||||||
|
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
|
||||||
|
if (this.requestOptions && this.requestOptions.headers) {
|
||||||
|
return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers));
|
||||||
|
}
|
||||||
|
return lowercaseKeys(headers || {});
|
||||||
|
}
|
||||||
|
_getExistingOrDefaultHeader(additionalHeaders, header, _default) {
|
||||||
|
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
|
||||||
|
let clientHeader;
|
||||||
|
if (this.requestOptions && this.requestOptions.headers) {
|
||||||
|
clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
|
||||||
|
}
|
||||||
|
return additionalHeaders[header] || clientHeader || _default;
|
||||||
|
}
|
||||||
|
_getAgent(parsedUrl) {
|
||||||
|
let agent;
|
||||||
|
let proxyUrl = pm.getProxyUrl(parsedUrl);
|
||||||
|
let useProxy = proxyUrl && proxyUrl.hostname;
|
||||||
|
if (this._keepAlive && useProxy) {
|
||||||
|
agent = this._proxyAgent;
|
||||||
|
}
|
||||||
|
if (this._keepAlive && !useProxy) {
|
||||||
|
agent = this._agent;
|
||||||
|
}
|
||||||
|
// if agent is already assigned use that agent.
|
||||||
|
if (!!agent) {
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
const usingSsl = parsedUrl.protocol === 'https:';
|
||||||
|
let maxSockets = 100;
|
||||||
|
if (!!this.requestOptions) {
|
||||||
|
maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
|
||||||
|
}
|
||||||
|
if (useProxy) {
|
||||||
|
// If using proxy, need tunnel
|
||||||
|
if (!tunnel) {
|
||||||
|
tunnel = require('tunnel');
|
||||||
|
}
|
||||||
|
const agentOptions = {
|
||||||
|
maxSockets: maxSockets,
|
||||||
|
keepAlive: this._keepAlive,
|
||||||
|
proxy: {
|
||||||
|
...((proxyUrl.username || proxyUrl.password) && {
|
||||||
|
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
|
||||||
|
}),
|
||||||
|
host: proxyUrl.hostname,
|
||||||
|
port: proxyUrl.port
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let tunnelAgent;
|
||||||
|
const overHttps = proxyUrl.protocol === 'https:';
|
||||||
|
if (usingSsl) {
|
||||||
|
tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
|
||||||
|
}
|
||||||
|
agent = tunnelAgent(agentOptions);
|
||||||
|
this._proxyAgent = agent;
|
||||||
|
}
|
||||||
|
// if reusing agent across request and tunneling agent isn't assigned create a new agent
|
||||||
|
if (this._keepAlive && !agent) {
|
||||||
|
const options = { keepAlive: this._keepAlive, maxSockets: maxSockets };
|
||||||
|
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
|
||||||
|
this._agent = agent;
|
||||||
|
}
|
||||||
|
// if not using private agent and tunnel agent isn't setup then use global agent
|
||||||
|
if (!agent) {
|
||||||
|
agent = usingSsl ? https.globalAgent : http.globalAgent;
|
||||||
|
}
|
||||||
|
if (usingSsl && this._ignoreSslError) {
|
||||||
|
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
|
||||||
|
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
|
||||||
|
// we have to cast it to any and change it directly
|
||||||
|
agent.options = Object.assign(agent.options || {}, {
|
||||||
|
rejectUnauthorized: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
_performExponentialBackoff(retryNumber) {
|
||||||
|
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
|
||||||
|
const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
|
||||||
|
return new Promise(resolve => setTimeout(() => resolve(), ms));
|
||||||
|
}
|
||||||
|
static dateTimeDeserializer(key, value) {
|
||||||
|
if (typeof value === 'string') {
|
||||||
|
let a = new Date(value);
|
||||||
|
if (!isNaN(a.valueOf())) {
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
async _processResponse(res, options) {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
const statusCode = res.message.statusCode;
|
||||||
|
const response = {
|
||||||
|
statusCode: statusCode,
|
||||||
|
result: null,
|
||||||
|
headers: {}
|
||||||
|
};
|
||||||
|
// not found leads to null obj returned
|
||||||
|
if (statusCode == HttpCodes.NotFound) {
|
||||||
|
resolve(response);
|
||||||
|
}
|
||||||
|
let obj;
|
||||||
|
let contents;
|
||||||
|
// get the result from the body
|
||||||
|
try {
|
||||||
|
contents = await res.readBody();
|
||||||
|
if (contents && contents.length > 0) {
|
||||||
|
if (options && options.deserializeDates) {
|
||||||
|
obj = JSON.parse(contents, HttpClient.dateTimeDeserializer);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
obj = JSON.parse(contents);
|
||||||
|
}
|
||||||
|
response.result = obj;
|
||||||
|
}
|
||||||
|
response.headers = res.message.headers;
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
// Invalid resource (contents not json); leaving result obj null
|
||||||
|
}
|
||||||
|
// note that 3xx redirects are handled by the http layer.
|
||||||
|
if (statusCode > 299) {
|
||||||
|
let msg;
|
||||||
|
// if exception/error in body, attempt to get better error
|
||||||
|
if (obj && obj.message) {
|
||||||
|
msg = obj.message;
|
||||||
|
}
|
||||||
|
else if (contents && contents.length > 0) {
|
||||||
|
// it may be the case that the exception is in the body message as string
|
||||||
|
msg = contents;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
msg = 'Failed request: (' + statusCode + ')';
|
||||||
|
}
|
||||||
|
let err = new HttpClientError(msg, statusCode);
|
||||||
|
err.result = response.result;
|
||||||
|
reject(err);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
resolve(response);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.HttpClient = HttpClient;
|
||||||
49
node_modules/@actions/http-client/interfaces.d.ts
generated
vendored
Normal file
49
node_modules/@actions/http-client/interfaces.d.ts
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
/// <reference types="node" />
|
||||||
|
import http = require('http');
|
||||||
|
export interface IHeaders {
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
httpModule: any;
|
||||||
|
}
|
||||||
|
export interface IRequestOptions {
|
||||||
|
headers?: IHeaders;
|
||||||
|
socketTimeout?: number;
|
||||||
|
ignoreSslError?: boolean;
|
||||||
|
allowRedirects?: boolean;
|
||||||
|
allowRedirectDowngrade?: boolean;
|
||||||
|
maxRedirects?: number;
|
||||||
|
maxSockets?: number;
|
||||||
|
keepAlive?: boolean;
|
||||||
|
deserializeDates?: boolean;
|
||||||
|
allowRetries?: boolean;
|
||||||
|
maxRetries?: number;
|
||||||
|
}
|
||||||
|
export interface ITypedResponse<T> {
|
||||||
|
statusCode: number;
|
||||||
|
result: T | null;
|
||||||
|
headers: Object;
|
||||||
|
}
|
||||||
2
node_modules/@actions/http-client/interfaces.js
generated
vendored
Normal file
2
node_modules/@actions/http-client/interfaces.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
6
node_modules/@actions/http-client/node_modules/tunnel/.idea/encodings.xml
generated
vendored
Normal file
6
node_modules/@actions/http-client/node_modules/tunnel/.idea/encodings.xml
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding">
|
||||||
|
<file url="PROJECT" charset="UTF-8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
8
node_modules/@actions/http-client/node_modules/tunnel/.idea/modules.xml
generated
vendored
Normal file
8
node_modules/@actions/http-client/node_modules/tunnel/.idea/modules.xml
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/node-tunnel.iml" filepath="$PROJECT_DIR$/.idea/node-tunnel.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
12
node_modules/@actions/http-client/node_modules/tunnel/.idea/node-tunnel.iml
generated
vendored
Normal file
12
node_modules/@actions/http-client/node_modules/tunnel/.idea/node-tunnel.iml
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
6
node_modules/@actions/http-client/node_modules/tunnel/.idea/vcs.xml
generated
vendored
Normal file
6
node_modules/@actions/http-client/node_modules/tunnel/.idea/vcs.xml
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
797
node_modules/@actions/http-client/node_modules/tunnel/.idea/workspace.xml
generated
vendored
Normal file
797
node_modules/@actions/http-client/node_modules/tunnel/.idea/workspace.xml
generated
vendored
Normal file
@@ -0,0 +1,797 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="3caed8aa-31ae-4b3d-ad18-6f9796663516" name="Default" comment="">
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.travis.yml" afterPath="$PROJECT_DIR$/.travis.yml" />
|
||||||
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/CHANGELOG.md" afterPath="$PROJECT_DIR$/CHANGELOG.md" />
|
||||||
|
</list>
|
||||||
|
<ignored path="$PROJECT_DIR$/.tmp/" />
|
||||||
|
<ignored path="$PROJECT_DIR$/temp/" />
|
||||||
|
<ignored path="$PROJECT_DIR$/tmp/" />
|
||||||
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
|
<option name="TRACKING_ENABLED" value="true" />
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="FileEditorManager">
|
||||||
|
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||||
|
<file leaf-file-name="package.json" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/package.json">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="34">
|
||||||
|
<caret line="2" column="19" lean-forward="false" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="README.md" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/README.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="2312">
|
||||||
|
<caret line="136" column="67" lean-forward="false" selection-start-line="136" selection-start-column="67" selection-end-line="136" selection-end-column="67" />
|
||||||
|
<folding>
|
||||||
|
<marker date="1497272379133" expanded="true" signature="590:646" ph="{...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="601:644" ph="{"host": 'localhost'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="674:737" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="884:1330" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="964:1328" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1103:1192" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1290:1324" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1357:1419" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1514:2209" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1540:1623" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1842:2207" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1981:2070" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2168:2202" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2237:2300" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2395:3180" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2475:3178" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2615:2704" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2802:2836" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3207:3269" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3366:4398" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3392:3475" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3694:4396" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3834:3923" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="4021:4055" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="4426:4489" ph="{"host": 'example.com'...}" />
|
||||||
|
</folding>
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name=".travis.yml" pinned="false" current-in-tab="true">
|
||||||
|
<entry file="file://$PROJECT_DIR$/.travis.yml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="102">
|
||||||
|
<caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="tunnel.js" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/tunnel.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="697">
|
||||||
|
<caret line="41" column="19" lean-forward="false" selection-start-line="41" selection-start-column="19" selection-end-line="41" selection-end-column="19" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="http-over-http-error.js" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-http-error.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="935">
|
||||||
|
<caret line="55" column="26" lean-forward="true" selection-start-line="55" selection-start-column="26" selection-end-line="55" selection-end-column="26" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="http-over-http-error2.js" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-http-error2.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1207">
|
||||||
|
<caret line="71" column="0" lean-forward="false" selection-start-line="71" selection-start-column="0" selection-end-line="71" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="https-over-http.js" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/https-over-http.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1479">
|
||||||
|
<caret line="87" column="0" lean-forward="false" selection-start-line="87" selection-start-column="0" selection-end-line="87" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="https-over-https.js" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/https-over-https.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="http-over-http.js" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-http.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1088">
|
||||||
|
<caret line="64" column="26" lean-forward="true" selection-start-line="64" selection-start-column="26" selection-end-line="64" selection-end-column="26" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="CHANGELOG.md" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="102">
|
||||||
|
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
</leaf>
|
||||||
|
</component>
|
||||||
|
<component name="FileTemplateManagerImpl">
|
||||||
|
<option name="RECENT_TEMPLATES">
|
||||||
|
<list>
|
||||||
|
<option value="JavaScript File" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="FindInProjectRecents">
|
||||||
|
<findStrings>
|
||||||
|
<find>max</find>
|
||||||
|
<find>onconne</find>
|
||||||
|
</findStrings>
|
||||||
|
</component>
|
||||||
|
<component name="Git.Settings">
|
||||||
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="IdeDocumentHistory">
|
||||||
|
<option name="CHANGED_PATHS">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/test/http-over-http-error.js" />
|
||||||
|
<option value="$PROJECT_DIR$/README.md" />
|
||||||
|
<option value="$PROJECT_DIR$/package.json" />
|
||||||
|
<option value="$PROJECT_DIR$/test/http-over-http-error2.js" />
|
||||||
|
<option value="$PROJECT_DIR$/test/https-over-http-localaddress.js" />
|
||||||
|
<option value="$PROJECT_DIR$/test/https-over-http.js" />
|
||||||
|
<option value="$PROJECT_DIR$/lib/tunnel.js" />
|
||||||
|
<option value="$PROJECT_DIR$/CHANGELOG.md" />
|
||||||
|
<option value="$PROJECT_DIR$/.travis.yml" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
|
||||||
|
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER">
|
||||||
|
<package-json value="$PROJECT_DIR$/package.json" />
|
||||||
|
</component>
|
||||||
|
<component name="JsFlowSettings">
|
||||||
|
<service-enabled>false</service-enabled>
|
||||||
|
<exe-path />
|
||||||
|
<annotation-enable>false</annotation-enable>
|
||||||
|
<other-services-enabled>false</other-services-enabled>
|
||||||
|
<auto-save>true</auto-save>
|
||||||
|
</component>
|
||||||
|
<component name="JsGulpfileManager">
|
||||||
|
<detection-done>true</detection-done>
|
||||||
|
<sorting>DEFINITION_ORDER</sorting>
|
||||||
|
</component>
|
||||||
|
<component name="NodeModulesDirectoryManager">
|
||||||
|
<handled-path value="$PROJECT_DIR$/node_modules" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectFrameBounds">
|
||||||
|
<option name="x" value="785" />
|
||||||
|
<option name="y" value="40" />
|
||||||
|
<option name="width" value="1788" />
|
||||||
|
<option name="height" value="1407" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectView">
|
||||||
|
<navigator currentView="ProjectPane" proportions="" version="1">
|
||||||
|
<flattenPackages />
|
||||||
|
<showMembers />
|
||||||
|
<showModules />
|
||||||
|
<showLibraryContents />
|
||||||
|
<hideEmptyPackages />
|
||||||
|
<abbreviatePackageNames />
|
||||||
|
<autoscrollToSource />
|
||||||
|
<autoscrollFromSource ProjectPane="true" />
|
||||||
|
<sortByType />
|
||||||
|
<manualOrder />
|
||||||
|
<foldersAlwaysOnTop value="true" />
|
||||||
|
</navigator>
|
||||||
|
<panes>
|
||||||
|
<pane id="Scope" />
|
||||||
|
<pane id="Scratches" />
|
||||||
|
<pane id="ProjectPane">
|
||||||
|
<subPane>
|
||||||
|
<expand>
|
||||||
|
<path>
|
||||||
|
<item name="node-tunnel" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="node-tunnel" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="node-tunnel" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="node-tunnel" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="node-tunnel" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="node-tunnel" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="test" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
</expand>
|
||||||
|
<select />
|
||||||
|
</subPane>
|
||||||
|
</pane>
|
||||||
|
</panes>
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent">
|
||||||
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||||
|
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||||
|
<property name="HbShouldOpenHtmlAsHb" value="" />
|
||||||
|
<property name="nodejs_interpreter_path" value="$PROJECT_DIR$/../../nvmw/v6.10.3/node" />
|
||||||
|
</component>
|
||||||
|
<component name="RecentsManager">
|
||||||
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
|
<recent name="C:\Users\koichik\git\koichik\node-tunnel\test" />
|
||||||
|
</key>
|
||||||
|
</component>
|
||||||
|
<component name="RunDashboard">
|
||||||
|
<option name="ruleStates">
|
||||||
|
<list>
|
||||||
|
<RuleState>
|
||||||
|
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||||
|
</RuleState>
|
||||||
|
<RuleState>
|
||||||
|
<option name="name" value="StatusDashboardGroupingRule" />
|
||||||
|
</RuleState>
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="RunManager">
|
||||||
|
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
|
||||||
|
<node-interpreter>project</node-interpreter>
|
||||||
|
<node-options />
|
||||||
|
<gulpfile />
|
||||||
|
<tasks />
|
||||||
|
<arguments />
|
||||||
|
<envs />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application">
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="DartTestRunConfigurationType" factoryName="Dart Test">
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="JavaScriptTestRunnerJest" factoryName="Jest">
|
||||||
|
<node-interpreter value="project" />
|
||||||
|
<working-dir value="" />
|
||||||
|
<envs />
|
||||||
|
<scope-kind value="ALL" />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="JavaScriptTestRunnerKarma" factoryName="Karma">
|
||||||
|
<config-file value="" />
|
||||||
|
<node-interpreter value="project" />
|
||||||
|
<envs />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="JavaScriptTestRunnerProtractor" factoryName="Protractor">
|
||||||
|
<config-file value="" />
|
||||||
|
<node-interpreter value="project" />
|
||||||
|
<envs />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir="">
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="cucumber.js" factoryName="Cucumber.js">
|
||||||
|
<option name="cucumberJsArguments" value="" />
|
||||||
|
<option name="executablePath" />
|
||||||
|
<option name="filePath" />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
|
||||||
|
<command value="run" />
|
||||||
|
<scripts />
|
||||||
|
<node-interpreter value="project" />
|
||||||
|
<envs />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="mocha-javascript-test-runner" factoryName="Mocha">
|
||||||
|
<node-interpreter>project</node-interpreter>
|
||||||
|
<node-options />
|
||||||
|
<working-directory />
|
||||||
|
<pass-parent-env>true</pass-parent-env>
|
||||||
|
<envs />
|
||||||
|
<ui />
|
||||||
|
<extra-mocha-options />
|
||||||
|
<test-kind>DIRECTORY</test-kind>
|
||||||
|
<test-directory />
|
||||||
|
<recursive>false</recursive>
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
|
<component name="ShelveChangesManager" show_recycled="false">
|
||||||
|
<option name="remove_strategy" value="false" />
|
||||||
|
</component>
|
||||||
|
<component name="SvnConfiguration">
|
||||||
|
<configuration />
|
||||||
|
</component>
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="3caed8aa-31ae-4b3d-ad18-6f9796663516" name="Default" comment="" />
|
||||||
|
<created>1497256565348</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1497256565348</updated>
|
||||||
|
<workItem from="1497256566573" duration="8794000" />
|
||||||
|
<workItem from="1497272051717" duration="2328000" />
|
||||||
|
<workItem from="1536577850117" duration="8708000" />
|
||||||
|
<workItem from="1536636907096" duration="739000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TimeTrackingManager">
|
||||||
|
<option name="totallyTimeSpent" value="20569000" />
|
||||||
|
</component>
|
||||||
|
<component name="ToolWindowManager">
|
||||||
|
<frame x="785" y="40" width="1788" height="1407" extended-state="0" />
|
||||||
|
<editor active="true" />
|
||||||
|
<layout>
|
||||||
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||||
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="SvgViewer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||||
|
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32967034" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||||
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||||
|
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||||
|
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
|
</layout>
|
||||||
|
</component>
|
||||||
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
<option name="version" value="1" />
|
||||||
|
</component>
|
||||||
|
<component name="VcsContentAnnotationSettings">
|
||||||
|
<option name="myLimit" value="2678400000" />
|
||||||
|
</component>
|
||||||
|
<component name="XDebuggerManager">
|
||||||
|
<breakpoint-manager />
|
||||||
|
<watches-manager />
|
||||||
|
</component>
|
||||||
|
<component name="editorHistoryManager">
|
||||||
|
<entry file="file://$PROJECT_DIR$/package.json">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="34">
|
||||||
|
<caret line="2" column="19" lean-forward="false" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/README.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="2312">
|
||||||
|
<caret line="136" column="67" lean-forward="false" selection-start-line="136" selection-start-column="67" selection-end-line="136" selection-end-column="67" />
|
||||||
|
<folding>
|
||||||
|
<marker date="1497272379133" expanded="true" signature="590:646" ph="{...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="601:644" ph="{"host": 'localhost'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="674:737" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="884:1330" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="964:1328" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1103:1192" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1290:1324" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1357:1419" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1514:2209" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1540:1623" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1842:2207" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1981:2070" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2168:2202" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2237:2300" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2395:3180" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2475:3178" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2615:2704" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2802:2836" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3207:3269" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3366:4398" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3392:3475" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3694:4396" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3834:3923" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="4021:4055" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="4426:4489" ph="{"host": 'example.com'...}" />
|
||||||
|
</folding>
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/.travis.yml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="102">
|
||||||
|
<caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-http-error.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="935">
|
||||||
|
<caret line="55" column="26" lean-forward="true" selection-start-line="55" selection-start-column="26" selection-end-line="55" selection-end-column="26" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-http-error2.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1207">
|
||||||
|
<caret line="71" column="0" lean-forward="false" selection-start-line="71" selection-start-column="0" selection-end-line="71" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/https-over-http.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1479">
|
||||||
|
<caret line="87" column="0" lean-forward="false" selection-start-line="87" selection-start-column="0" selection-end-line="87" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/https-over-https.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-http.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1088">
|
||||||
|
<caret line="64" column="26" lean-forward="true" selection-start-line="64" selection-start-column="26" selection-end-line="64" selection-end-column="26" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/tunnel.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="697">
|
||||||
|
<caret line="41" column="19" lean-forward="false" selection-start-line="41" selection-start-column="19" selection-end-line="41" selection-end-column="19" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/package.json">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="34">
|
||||||
|
<caret line="2" column="19" lean-forward="false" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/README.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="2312">
|
||||||
|
<caret line="136" column="67" lean-forward="false" selection-start-line="136" selection-start-column="67" selection-end-line="136" selection-end-column="67" />
|
||||||
|
<folding>
|
||||||
|
<marker date="1497272379133" expanded="true" signature="590:646" ph="{...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="601:644" ph="{"host": 'localhost'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="674:737" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="884:1330" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="964:1328" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1103:1192" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1290:1324" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1357:1419" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1514:2209" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1540:1623" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1842:2207" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1981:2070" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2168:2202" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2237:2300" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2395:3180" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2475:3178" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2615:2704" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2802:2836" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3207:3269" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3366:4398" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3392:3475" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3694:4396" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3834:3923" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="4021:4055" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="4426:4489" ph="{"host": 'example.com'...}" />
|
||||||
|
</folding>
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/tunnel.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="2550">
|
||||||
|
<caret line="150" column="0" lean-forward="false" selection-start-line="150" selection-start-column="0" selection-end-line="150" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="51">
|
||||||
|
<caret line="3" column="21" lean-forward="false" selection-start-line="3" selection-start-column="21" selection-end-line="3" selection-end-column="21" />
|
||||||
|
<folding />
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/.travis.yml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="119">
|
||||||
|
<caret line="7" column="0" lean-forward="true" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/package.json">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/README.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding>
|
||||||
|
<marker date="1497272379133" expanded="true" signature="590:646" ph="{...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="601:644" ph="{"host": 'localhost'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="674:737" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="884:1330" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="964:1328" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1103:1192" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1290:1324" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1357:1419" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1514:2209" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1540:1623" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1842:2207" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1981:2070" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2168:2202" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2237:2300" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2395:3180" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2475:3178" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2615:2704" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2802:2836" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3207:3269" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3366:4398" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3392:3475" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3694:4396" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3834:3923" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="4021:4055" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="4426:4489" ph="{"host": 'example.com'...}" />
|
||||||
|
</folding>
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/.travis.yml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/tunnel.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="2550">
|
||||||
|
<caret line="150" column="0" lean-forward="false" selection-start-line="150" selection-start-column="0" selection-end-line="150" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/https-over-https.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/https-over-https-error.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-http.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="136">
|
||||||
|
<caret line="8" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="8" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-http-error.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1309">
|
||||||
|
<caret line="77" column="0" lean-forward="false" selection-start-line="77" selection-start-column="0" selection-end-line="77" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-https.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-https.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/https-over-https-error.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/README.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="2312">
|
||||||
|
<caret line="136" column="67" lean-forward="false" selection-start-line="136" selection-start-column="67" selection-end-line="136" selection-end-column="67" />
|
||||||
|
<folding>
|
||||||
|
<marker date="1497272379133" expanded="true" signature="590:646" ph="{...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="601:644" ph="{"host": 'localhost'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="674:737" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="884:1330" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="964:1328" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1103:1192" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1290:1324" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1357:1419" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1514:2209" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1540:1623" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1842:2207" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="1981:2070" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2168:2202" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2237:2300" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2395:3180" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2475:3178" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2615:2704" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="2802:2836" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3207:3269" ph="{"host": 'example.com'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3366:4398" ph="{"maxSockets": poolSize...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3392:3475" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3694:4396" ph="{"host": proxyHost...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="3834:3923" ph="//..." />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="4021:4055" ph="{"User-Agent": 'Node'...}" />
|
||||||
|
<marker date="1497272379133" expanded="true" signature="4426:4489" ph="{"host": 'example.com'...}" />
|
||||||
|
</folding>
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/package.json">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="34">
|
||||||
|
<caret line="2" column="19" lean-forward="false" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-http-error.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="935">
|
||||||
|
<caret line="55" column="26" lean-forward="true" selection-start-line="55" selection-start-column="26" selection-end-line="55" selection-end-column="26" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-http-error2.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1207">
|
||||||
|
<caret line="71" column="0" lean-forward="false" selection-start-line="71" selection-start-column="0" selection-end-line="71" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/https-over-http-localaddress.js" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/https-over-https.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/http-over-http.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1088">
|
||||||
|
<caret line="64" column="26" lean-forward="true" selection-start-line="64" selection-start-column="26" selection-end-line="64" selection-end-column="26" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/https-over-http.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1479">
|
||||||
|
<caret line="87" column="0" lean-forward="false" selection-start-line="87" selection-start-column="0" selection-end-line="87" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/tunnel.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="697">
|
||||||
|
<caret line="41" column="19" lean-forward="false" selection-start-line="41" selection-start-column="19" selection-end-line="41" selection-end-column="19" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="102">
|
||||||
|
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/.travis.yml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="102">
|
||||||
|
<caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
node_modules/@actions/http-client/node_modules/tunnel/.travis.yml
generated
vendored
Normal file
6
node_modules/@actions/http-client/node_modules/tunnel/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- "4"
|
||||||
|
- "6"
|
||||||
|
- "8"
|
||||||
|
- "10"
|
||||||
22
node_modules/@actions/http-client/node_modules/tunnel/CHANGELOG.md
generated
vendored
Normal file
22
node_modules/@actions/http-client/node_modules/tunnel/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
- 0.0.6 (2018/09/11)
|
||||||
|
- Fix `localAddress` not working (#25)
|
||||||
|
- Fix `Host:` header for CONNECT method by @tmurakam (#29, #30)
|
||||||
|
- Fix default port for https (#32)
|
||||||
|
- Fix error handling when the proxy send illegal response body (#33)
|
||||||
|
|
||||||
|
- 0.0.5 (2017/06/12)
|
||||||
|
- Fix socket leak.
|
||||||
|
|
||||||
|
- 0.0.4 (2016/01/23)
|
||||||
|
- supported Node v0.12 or later.
|
||||||
|
|
||||||
|
- 0.0.3 (2014/01/20)
|
||||||
|
- fixed package.json
|
||||||
|
|
||||||
|
- 0.0.1 (2012/02/18)
|
||||||
|
- supported Node v0.6.x (0.6.11 or later).
|
||||||
|
|
||||||
|
- 0.0.0 (2012/02/11)
|
||||||
|
- first release.
|
||||||
21
node_modules/@actions/http-client/node_modules/tunnel/LICENSE
generated
vendored
Normal file
21
node_modules/@actions/http-client/node_modules/tunnel/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2012 Koichi Kobayashi
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
185
node_modules/@actions/http-client/node_modules/tunnel/README.md
generated
vendored
Normal file
185
node_modules/@actions/http-client/node_modules/tunnel/README.md
generated
vendored
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
# node-tunnel - HTTP/HTTPS Agents for tunneling proxies
|
||||||
|
|
||||||
|
[](https://travis-ci.org/koichik/node-tunnel)
|
||||||
|
[](https://david-dm.org/koichik/node-tunnel#info=dependencies)
|
||||||
|
[](https://david-dm.org/koichik/node-tunnel#info=devDependencies)
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var tunnel = require('tunnel');
|
||||||
|
|
||||||
|
var tunnelingAgent = tunnel.httpsOverHttp({
|
||||||
|
proxy: {
|
||||||
|
host: 'localhost',
|
||||||
|
port: 3128
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var req = https.request({
|
||||||
|
host: 'example.com',
|
||||||
|
port: 443,
|
||||||
|
agent: tunnelingAgent
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
$ npm install tunnel
|
||||||
|
|
||||||
|
## Usages
|
||||||
|
|
||||||
|
### HTTP over HTTP tunneling
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var tunnelingAgent = tunnel.httpOverHttp({
|
||||||
|
maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
|
||||||
|
|
||||||
|
proxy: { // Proxy settings
|
||||||
|
host: proxyHost, // Defaults to 'localhost'
|
||||||
|
port: proxyPort, // Defaults to 80
|
||||||
|
localAddress: localAddress, // Local interface if necessary
|
||||||
|
|
||||||
|
// Basic authorization for proxy server if necessary
|
||||||
|
proxyAuth: 'user:password',
|
||||||
|
|
||||||
|
// Header fields for proxy server if necessary
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Node'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var req = http.request({
|
||||||
|
host: 'example.com',
|
||||||
|
port: 80,
|
||||||
|
agent: tunnelingAgent
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### HTTPS over HTTP tunneling
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var tunnelingAgent = tunnel.httpsOverHttp({
|
||||||
|
maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
|
||||||
|
|
||||||
|
// CA for origin server if necessary
|
||||||
|
ca: [ fs.readFileSync('origin-server-ca.pem')],
|
||||||
|
|
||||||
|
// Client certification for origin server if necessary
|
||||||
|
key: fs.readFileSync('origin-server-key.pem'),
|
||||||
|
cert: fs.readFileSync('origin-server-cert.pem'),
|
||||||
|
|
||||||
|
proxy: { // Proxy settings
|
||||||
|
host: proxyHost, // Defaults to 'localhost'
|
||||||
|
port: proxyPort, // Defaults to 80
|
||||||
|
localAddress: localAddress, // Local interface if necessary
|
||||||
|
|
||||||
|
// Basic authorization for proxy server if necessary
|
||||||
|
proxyAuth: 'user:password',
|
||||||
|
|
||||||
|
// Header fields for proxy server if necessary
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Node'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var req = https.request({
|
||||||
|
host: 'example.com',
|
||||||
|
port: 443,
|
||||||
|
agent: tunnelingAgent
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### HTTP over HTTPS tunneling
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var tunnelingAgent = tunnel.httpOverHttps({
|
||||||
|
maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
|
||||||
|
|
||||||
|
proxy: { // Proxy settings
|
||||||
|
host: proxyHost, // Defaults to 'localhost'
|
||||||
|
port: proxyPort, // Defaults to 443
|
||||||
|
localAddress: localAddress, // Local interface if necessary
|
||||||
|
|
||||||
|
// Basic authorization for proxy server if necessary
|
||||||
|
proxyAuth: 'user:password',
|
||||||
|
|
||||||
|
// Header fields for proxy server if necessary
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Node'
|
||||||
|
},
|
||||||
|
|
||||||
|
// CA for proxy server if necessary
|
||||||
|
ca: [ fs.readFileSync('origin-server-ca.pem')],
|
||||||
|
|
||||||
|
// Server name for verification if necessary
|
||||||
|
servername: 'example.com',
|
||||||
|
|
||||||
|
// Client certification for proxy server if necessary
|
||||||
|
key: fs.readFileSync('origin-server-key.pem'),
|
||||||
|
cert: fs.readFileSync('origin-server-cert.pem'),
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var req = http.request({
|
||||||
|
host: 'example.com',
|
||||||
|
port: 80,
|
||||||
|
agent: tunnelingAgent
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### HTTPS over HTTPS tunneling
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var tunnelingAgent = tunnel.httpsOverHttps({
|
||||||
|
maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets
|
||||||
|
|
||||||
|
// CA for origin server if necessary
|
||||||
|
ca: [ fs.readFileSync('origin-server-ca.pem')],
|
||||||
|
|
||||||
|
// Client certification for origin server if necessary
|
||||||
|
key: fs.readFileSync('origin-server-key.pem'),
|
||||||
|
cert: fs.readFileSync('origin-server-cert.pem'),
|
||||||
|
|
||||||
|
proxy: { // Proxy settings
|
||||||
|
host: proxyHost, // Defaults to 'localhost'
|
||||||
|
port: proxyPort, // Defaults to 443
|
||||||
|
localAddress: localAddress, // Local interface if necessary
|
||||||
|
|
||||||
|
// Basic authorization for proxy server if necessary
|
||||||
|
proxyAuth: 'user:password',
|
||||||
|
|
||||||
|
// Header fields for proxy server if necessary
|
||||||
|
headers: {
|
||||||
|
'User-Agent': 'Node'
|
||||||
|
}
|
||||||
|
|
||||||
|
// CA for proxy server if necessary
|
||||||
|
ca: [ fs.readFileSync('origin-server-ca.pem')],
|
||||||
|
|
||||||
|
// Server name for verification if necessary
|
||||||
|
servername: 'example.com',
|
||||||
|
|
||||||
|
// Client certification for proxy server if necessary
|
||||||
|
key: fs.readFileSync('origin-server-key.pem'),
|
||||||
|
cert: fs.readFileSync('origin-server-cert.pem'),
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var req = https.request({
|
||||||
|
host: 'example.com',
|
||||||
|
port: 443,
|
||||||
|
agent: tunnelingAgent
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## CONTRIBUTORS
|
||||||
|
* [Aleksis Brezas (abresas)](https://github.com/abresas)
|
||||||
|
* [Jackson Tian (JacksonTian)](https://github.com/JacksonTian)
|
||||||
|
* [Dmitry Sorin (1999)](https://github.com/1999)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE) license.
|
||||||
1
node_modules/@actions/http-client/node_modules/tunnel/index.js
generated
vendored
Normal file
1
node_modules/@actions/http-client/node_modules/tunnel/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require('./lib/tunnel');
|
||||||
264
node_modules/@actions/http-client/node_modules/tunnel/lib/tunnel.js
generated
vendored
Normal file
264
node_modules/@actions/http-client/node_modules/tunnel/lib/tunnel.js
generated
vendored
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
var net = require('net');
|
||||||
|
var tls = require('tls');
|
||||||
|
var http = require('http');
|
||||||
|
var https = require('https');
|
||||||
|
var events = require('events');
|
||||||
|
var assert = require('assert');
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
|
||||||
|
exports.httpOverHttp = httpOverHttp;
|
||||||
|
exports.httpsOverHttp = httpsOverHttp;
|
||||||
|
exports.httpOverHttps = httpOverHttps;
|
||||||
|
exports.httpsOverHttps = httpsOverHttps;
|
||||||
|
|
||||||
|
|
||||||
|
function httpOverHttp(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = http.request;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpsOverHttp(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = http.request;
|
||||||
|
agent.createSocket = createSecureSocket;
|
||||||
|
agent.defaultPort = 443;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpOverHttps(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = https.request;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpsOverHttps(options) {
|
||||||
|
var agent = new TunnelingAgent(options);
|
||||||
|
agent.request = https.request;
|
||||||
|
agent.createSocket = createSecureSocket;
|
||||||
|
agent.defaultPort = 443;
|
||||||
|
return agent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function TunnelingAgent(options) {
|
||||||
|
var self = this;
|
||||||
|
self.options = options || {};
|
||||||
|
self.proxyOptions = self.options.proxy || {};
|
||||||
|
self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;
|
||||||
|
self.requests = [];
|
||||||
|
self.sockets = [];
|
||||||
|
|
||||||
|
self.on('free', function onFree(socket, host, port, localAddress) {
|
||||||
|
var options = toOptions(host, port, localAddress);
|
||||||
|
for (var i = 0, len = self.requests.length; i < len; ++i) {
|
||||||
|
var pending = self.requests[i];
|
||||||
|
if (pending.host === options.host && pending.port === options.port) {
|
||||||
|
// Detect the request to connect same origin server,
|
||||||
|
// reuse the connection.
|
||||||
|
self.requests.splice(i, 1);
|
||||||
|
pending.request.onSocket(socket);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
socket.destroy();
|
||||||
|
self.removeSocket(socket);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
util.inherits(TunnelingAgent, events.EventEmitter);
|
||||||
|
|
||||||
|
TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {
|
||||||
|
var self = this;
|
||||||
|
var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));
|
||||||
|
|
||||||
|
if (self.sockets.length >= this.maxSockets) {
|
||||||
|
// We are over limit so we'll add it to the queue.
|
||||||
|
self.requests.push(options);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we are under maxSockets create a new one.
|
||||||
|
self.createSocket(options, function(socket) {
|
||||||
|
socket.on('free', onFree);
|
||||||
|
socket.on('close', onCloseOrRemove);
|
||||||
|
socket.on('agentRemove', onCloseOrRemove);
|
||||||
|
req.onSocket(socket);
|
||||||
|
|
||||||
|
function onFree() {
|
||||||
|
self.emit('free', socket, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onCloseOrRemove(err) {
|
||||||
|
self.removeSocket(socket);
|
||||||
|
socket.removeListener('free', onFree);
|
||||||
|
socket.removeListener('close', onCloseOrRemove);
|
||||||
|
socket.removeListener('agentRemove', onCloseOrRemove);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
|
||||||
|
var self = this;
|
||||||
|
var placeholder = {};
|
||||||
|
self.sockets.push(placeholder);
|
||||||
|
|
||||||
|
var connectOptions = mergeOptions({}, self.proxyOptions, {
|
||||||
|
method: 'CONNECT',
|
||||||
|
path: options.host + ':' + options.port,
|
||||||
|
agent: false,
|
||||||
|
headers: {
|
||||||
|
host: options.host + ':' + options.port
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (options.localAddress) {
|
||||||
|
connectOptions.localAddress = options.localAddress;
|
||||||
|
}
|
||||||
|
if (connectOptions.proxyAuth) {
|
||||||
|
connectOptions.headers = connectOptions.headers || {};
|
||||||
|
connectOptions.headers['Proxy-Authorization'] = 'Basic ' +
|
||||||
|
new Buffer(connectOptions.proxyAuth).toString('base64');
|
||||||
|
}
|
||||||
|
|
||||||
|
debug('making CONNECT request');
|
||||||
|
var connectReq = self.request(connectOptions);
|
||||||
|
connectReq.useChunkedEncodingByDefault = false; // for v0.6
|
||||||
|
connectReq.once('response', onResponse); // for v0.6
|
||||||
|
connectReq.once('upgrade', onUpgrade); // for v0.6
|
||||||
|
connectReq.once('connect', onConnect); // for v0.7 or later
|
||||||
|
connectReq.once('error', onError);
|
||||||
|
connectReq.end();
|
||||||
|
|
||||||
|
function onResponse(res) {
|
||||||
|
// Very hacky. This is necessary to avoid http-parser leaks.
|
||||||
|
res.upgrade = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onUpgrade(res, socket, head) {
|
||||||
|
// Hacky.
|
||||||
|
process.nextTick(function() {
|
||||||
|
onConnect(res, socket, head);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onConnect(res, socket, head) {
|
||||||
|
connectReq.removeAllListeners();
|
||||||
|
socket.removeAllListeners();
|
||||||
|
|
||||||
|
if (res.statusCode !== 200) {
|
||||||
|
debug('tunneling socket could not be established, statusCode=%d',
|
||||||
|
res.statusCode);
|
||||||
|
socket.destroy();
|
||||||
|
var error = new Error('tunneling socket could not be established, ' +
|
||||||
|
'statusCode=' + res.statusCode);
|
||||||
|
error.code = 'ECONNRESET';
|
||||||
|
options.request.emit('error', error);
|
||||||
|
self.removeSocket(placeholder);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (head.length > 0) {
|
||||||
|
debug('got illegal response body from proxy');
|
||||||
|
socket.destroy();
|
||||||
|
var error = new Error('got illegal response body from proxy');
|
||||||
|
error.code = 'ECONNRESET';
|
||||||
|
options.request.emit('error', error);
|
||||||
|
self.removeSocket(placeholder);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
debug('tunneling connection has established');
|
||||||
|
self.sockets[self.sockets.indexOf(placeholder)] = socket;
|
||||||
|
return cb(socket);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onError(cause) {
|
||||||
|
connectReq.removeAllListeners();
|
||||||
|
|
||||||
|
debug('tunneling socket could not be established, cause=%s\n',
|
||||||
|
cause.message, cause.stack);
|
||||||
|
var error = new Error('tunneling socket could not be established, ' +
|
||||||
|
'cause=' + cause.message);
|
||||||
|
error.code = 'ECONNRESET';
|
||||||
|
options.request.emit('error', error);
|
||||||
|
self.removeSocket(placeholder);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
|
||||||
|
var pos = this.sockets.indexOf(socket)
|
||||||
|
if (pos === -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.sockets.splice(pos, 1);
|
||||||
|
|
||||||
|
var pending = this.requests.shift();
|
||||||
|
if (pending) {
|
||||||
|
// If we have pending requests and a socket gets closed a new one
|
||||||
|
// needs to be created to take over in the pool for the one that closed.
|
||||||
|
this.createSocket(pending, function(socket) {
|
||||||
|
pending.request.onSocket(socket);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function createSecureSocket(options, cb) {
|
||||||
|
var self = this;
|
||||||
|
TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {
|
||||||
|
var hostHeader = options.request.getHeader('host');
|
||||||
|
var tlsOptions = mergeOptions({}, self.options, {
|
||||||
|
socket: socket,
|
||||||
|
servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host
|
||||||
|
});
|
||||||
|
|
||||||
|
// 0 is dummy port for v0.6
|
||||||
|
var secureSocket = tls.connect(0, tlsOptions);
|
||||||
|
self.sockets[self.sockets.indexOf(socket)] = secureSocket;
|
||||||
|
cb(secureSocket);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function toOptions(host, port, localAddress) {
|
||||||
|
if (typeof host === 'string') { // since v0.10
|
||||||
|
return {
|
||||||
|
host: host,
|
||||||
|
port: port,
|
||||||
|
localAddress: localAddress
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return host; // for v0.11 or later
|
||||||
|
}
|
||||||
|
|
||||||
|
function mergeOptions(target) {
|
||||||
|
for (var i = 1, len = arguments.length; i < len; ++i) {
|
||||||
|
var overrides = arguments[i];
|
||||||
|
if (typeof overrides === 'object') {
|
||||||
|
var keys = Object.keys(overrides);
|
||||||
|
for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {
|
||||||
|
var k = keys[j];
|
||||||
|
if (overrides[k] !== undefined) {
|
||||||
|
target[k] = overrides[k];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var debug;
|
||||||
|
if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
|
||||||
|
debug = function() {
|
||||||
|
var args = Array.prototype.slice.call(arguments);
|
||||||
|
if (typeof args[0] === 'string') {
|
||||||
|
args[0] = 'TUNNEL: ' + args[0];
|
||||||
|
} else {
|
||||||
|
args.unshift('TUNNEL:');
|
||||||
|
}
|
||||||
|
console.error.apply(console, args);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
debug = function() {};
|
||||||
|
}
|
||||||
|
exports.debug = debug; // for test
|
||||||
34
node_modules/@actions/http-client/node_modules/tunnel/package.json
generated
vendored
Normal file
34
node_modules/@actions/http-client/node_modules/tunnel/package.json
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"name": "tunnel",
|
||||||
|
"version": "0.0.6",
|
||||||
|
"description": "Node HTTP/HTTPS Agents for tunneling proxies",
|
||||||
|
"keywords": [
|
||||||
|
"http",
|
||||||
|
"https",
|
||||||
|
"agent",
|
||||||
|
"proxy",
|
||||||
|
"tunnel"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/koichik/node-tunnel/",
|
||||||
|
"bugs": "https://github.com/koichik/node-tunnel/issues",
|
||||||
|
"license": "MIT",
|
||||||
|
"author": "Koichi Kobayashi <koichik@improvement.jp>",
|
||||||
|
"main": "./index.js",
|
||||||
|
"directories": {
|
||||||
|
"lib": "./lib"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/koichik/node-tunnel.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "mocha"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"mocha": "^5.2.0",
|
||||||
|
"should": "^13.2.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
39
node_modules/@actions/http-client/package.json
generated
vendored
Normal file
39
node_modules/@actions/http-client/package.json
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"name": "@actions/http-client",
|
||||||
|
"version": "1.0.11",
|
||||||
|
"description": "Actions Http Client",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out",
|
||||||
|
"test": "jest",
|
||||||
|
"format": "prettier --write *.ts && prettier --write **/*.ts",
|
||||||
|
"format-check": "prettier --check *.ts && prettier --check **/*.ts",
|
||||||
|
"audit-check": "npm audit --audit-level=moderate"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/actions/http-client.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"Actions",
|
||||||
|
"Http"
|
||||||
|
],
|
||||||
|
"author": "GitHub, Inc.",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/actions/http-client/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/actions/http-client#readme",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/jest": "^25.1.4",
|
||||||
|
"@types/node": "^12.12.31",
|
||||||
|
"jest": "^25.1.0",
|
||||||
|
"prettier": "^2.0.4",
|
||||||
|
"proxy": "^1.0.1",
|
||||||
|
"ts-jest": "^25.2.1",
|
||||||
|
"typescript": "^3.8.3"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tunnel": "0.0.6"
|
||||||
|
}
|
||||||
|
}
|
||||||
2
node_modules/@actions/http-client/proxy.d.ts
generated
vendored
Normal file
2
node_modules/@actions/http-client/proxy.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
export declare function getProxyUrl(reqUrl: URL): URL | undefined;
|
||||||
|
export declare function checkBypass(reqUrl: URL): boolean;
|
||||||
57
node_modules/@actions/http-client/proxy.js
generated
vendored
Normal file
57
node_modules/@actions/http-client/proxy.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
function getProxyUrl(reqUrl) {
|
||||||
|
let usingSsl = reqUrl.protocol === 'https:';
|
||||||
|
let proxyUrl;
|
||||||
|
if (checkBypass(reqUrl)) {
|
||||||
|
return proxyUrl;
|
||||||
|
}
|
||||||
|
let proxyVar;
|
||||||
|
if (usingSsl) {
|
||||||
|
proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY'];
|
||||||
|
}
|
||||||
|
if (proxyVar) {
|
||||||
|
proxyUrl = new URL(proxyVar);
|
||||||
|
}
|
||||||
|
return proxyUrl;
|
||||||
|
}
|
||||||
|
exports.getProxyUrl = getProxyUrl;
|
||||||
|
function checkBypass(reqUrl) {
|
||||||
|
if (!reqUrl.hostname) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
|
||||||
|
if (!noProxy) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Determine the request port
|
||||||
|
let reqPort;
|
||||||
|
if (reqUrl.port) {
|
||||||
|
reqPort = Number(reqUrl.port);
|
||||||
|
}
|
||||||
|
else if (reqUrl.protocol === 'http:') {
|
||||||
|
reqPort = 80;
|
||||||
|
}
|
||||||
|
else if (reqUrl.protocol === 'https:') {
|
||||||
|
reqPort = 443;
|
||||||
|
}
|
||||||
|
// Format the request hostname and hostname with port
|
||||||
|
let upperReqHosts = [reqUrl.hostname.toUpperCase()];
|
||||||
|
if (typeof reqPort === 'number') {
|
||||||
|
upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
|
||||||
|
}
|
||||||
|
// Compare request host against noproxy
|
||||||
|
for (let upperNoProxyItem of noProxy
|
||||||
|
.split(',')
|
||||||
|
.map(x => x.trim().toUpperCase())
|
||||||
|
.filter(x => x)) {
|
||||||
|
if (upperReqHosts.some(x => x === upperNoProxyItem)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
exports.checkBypass = checkBypass;
|
||||||
2
node_modules/@actions/tool-cache/README.md
generated
vendored
2
node_modules/@actions/tool-cache/README.md
generated
vendored
@@ -57,7 +57,7 @@ You can also cache files for reuse.
|
|||||||
```js
|
```js
|
||||||
const tc = require('@actions/tool-cache');
|
const tc = require('@actions/tool-cache');
|
||||||
|
|
||||||
tc.cacheFile('path/to/exe', 'destFileName.exe', 'myExeName', '1.1.0');
|
const cachedPath = await tc.cacheFile('path/to/exe', 'destFileName.exe', 'myExeName', '1.1.0');
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Find
|
#### Find
|
||||||
|
|||||||
7
node_modules/@actions/tool-cache/lib/tool-cache.d.ts
generated
vendored
7
node_modules/@actions/tool-cache/lib/tool-cache.d.ts
generated
vendored
@@ -6,9 +6,10 @@ export declare class HTTPError extends Error {
|
|||||||
* Download a tool from an url and stream it into a file
|
* Download a tool from an url and stream it into a file
|
||||||
*
|
*
|
||||||
* @param url url of tool to download
|
* @param url url of tool to download
|
||||||
|
* @param dest path to download tool
|
||||||
* @returns path to downloaded tool
|
* @returns path to downloaded tool
|
||||||
*/
|
*/
|
||||||
export declare function downloadTool(url: string): Promise<string>;
|
export declare function downloadTool(url: string, dest?: string): Promise<string>;
|
||||||
/**
|
/**
|
||||||
* Extract a .7z file
|
* Extract a .7z file
|
||||||
*
|
*
|
||||||
@@ -26,11 +27,11 @@ export declare function downloadTool(url: string): Promise<string>;
|
|||||||
*/
|
*/
|
||||||
export declare function extract7z(file: string, dest?: string, _7zPath?: string): Promise<string>;
|
export declare function extract7z(file: string, dest?: string, _7zPath?: string): Promise<string>;
|
||||||
/**
|
/**
|
||||||
* Extract a tar
|
* Extract a compressed tar archive
|
||||||
*
|
*
|
||||||
* @param file path to the tar
|
* @param file path to the tar
|
||||||
* @param dest destination directory. Optional.
|
* @param dest destination directory. Optional.
|
||||||
* @param flags flags for the tar. Optional.
|
* @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional.
|
||||||
* @returns path to the destination directory
|
* @returns path to the destination directory
|
||||||
*/
|
*/
|
||||||
export declare function extractTar(file: string, dest?: string, flags?: string): Promise<string>;
|
export declare function extractTar(file: string, dest?: string, flags?: string): Promise<string>;
|
||||||
|
|||||||
85
node_modules/@actions/tool-cache/lib/tool-cache.js
generated
vendored
85
node_modules/@actions/tool-cache/lib/tool-cache.js
generated
vendored
@@ -8,15 +8,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||||
|
result["default"] = mod;
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const core = require("@actions/core");
|
const core = __importStar(require("@actions/core"));
|
||||||
const io = require("@actions/io");
|
const io = __importStar(require("@actions/io"));
|
||||||
const fs = require("fs");
|
const fs = __importStar(require("fs"));
|
||||||
const os = require("os");
|
const os = __importStar(require("os"));
|
||||||
const path = require("path");
|
const path = __importStar(require("path"));
|
||||||
const httpm = require("typed-rest-client/HttpClient");
|
const httpm = __importStar(require("@actions/http-client"));
|
||||||
const semver = require("semver");
|
const semver = __importStar(require("semver"));
|
||||||
const uuidV4 = require("uuid/v4");
|
const v4_1 = __importDefault(require("uuid/v4"));
|
||||||
const exec_1 = require("@actions/exec/lib/exec");
|
const exec_1 = require("@actions/exec/lib/exec");
|
||||||
const assert_1 = require("assert");
|
const assert_1 = require("assert");
|
||||||
class HTTPError extends Error {
|
class HTTPError extends Error {
|
||||||
@@ -58,9 +68,10 @@ if (!tempDirectory || !cacheRoot) {
|
|||||||
* Download a tool from an url and stream it into a file
|
* Download a tool from an url and stream it into a file
|
||||||
*
|
*
|
||||||
* @param url url of tool to download
|
* @param url url of tool to download
|
||||||
|
* @param dest path to download tool
|
||||||
* @returns path to downloaded tool
|
* @returns path to downloaded tool
|
||||||
*/
|
*/
|
||||||
function downloadTool(url) {
|
function downloadTool(url, dest) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// Wrap in a promise so that we can resolve from within stream callbacks
|
// 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* () {
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||||
@@ -69,12 +80,12 @@ function downloadTool(url) {
|
|||||||
allowRetries: true,
|
allowRetries: true,
|
||||||
maxRetries: 3
|
maxRetries: 3
|
||||||
});
|
});
|
||||||
const destPath = path.join(tempDirectory, uuidV4());
|
dest = dest || path.join(tempDirectory, v4_1.default());
|
||||||
yield io.mkdirP(tempDirectory);
|
yield io.mkdirP(path.dirname(dest));
|
||||||
core.debug(`Downloading ${url}`);
|
core.debug(`Downloading ${url}`);
|
||||||
core.debug(`Downloading ${destPath}`);
|
core.debug(`Downloading ${dest}`);
|
||||||
if (fs.existsSync(destPath)) {
|
if (fs.existsSync(dest)) {
|
||||||
throw new Error(`Destination file path ${destPath} already exists`);
|
throw new Error(`Destination file path ${dest} already exists`);
|
||||||
}
|
}
|
||||||
const response = yield http.get(url);
|
const response = yield http.get(url);
|
||||||
if (response.message.statusCode !== 200) {
|
if (response.message.statusCode !== 200) {
|
||||||
@@ -82,13 +93,13 @@ function downloadTool(url) {
|
|||||||
core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);
|
core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
const file = fs.createWriteStream(destPath);
|
const file = fs.createWriteStream(dest);
|
||||||
file.on('open', () => __awaiter(this, void 0, void 0, function* () {
|
file.on('open', () => __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
const stream = response.message.pipe(file);
|
const stream = response.message.pipe(file);
|
||||||
stream.on('close', () => {
|
stream.on('close', () => {
|
||||||
core.debug('download complete');
|
core.debug('download complete');
|
||||||
resolve(destPath);
|
resolve(dest);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
@@ -127,7 +138,7 @@ function extract7z(file, dest, _7zPath) {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS');
|
assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS');
|
||||||
assert_1.ok(file, 'parameter "file" is required');
|
assert_1.ok(file, 'parameter "file" is required');
|
||||||
dest = dest || (yield _createExtractFolder(dest));
|
dest = yield _createExtractFolder(dest);
|
||||||
const originalCwd = process.cwd();
|
const originalCwd = process.cwd();
|
||||||
process.chdir(dest);
|
process.chdir(dest);
|
||||||
if (_7zPath) {
|
if (_7zPath) {
|
||||||
@@ -182,11 +193,11 @@ function extract7z(file, dest, _7zPath) {
|
|||||||
}
|
}
|
||||||
exports.extract7z = extract7z;
|
exports.extract7z = extract7z;
|
||||||
/**
|
/**
|
||||||
* Extract a tar
|
* Extract a compressed tar archive
|
||||||
*
|
*
|
||||||
* @param file path to the tar
|
* @param file path to the tar
|
||||||
* @param dest destination directory. Optional.
|
* @param dest destination directory. Optional.
|
||||||
* @param flags flags for the tar. Optional.
|
* @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional.
|
||||||
* @returns path to the destination directory
|
* @returns path to the destination directory
|
||||||
*/
|
*/
|
||||||
function extractTar(file, dest, flags = 'xz') {
|
function extractTar(file, dest, flags = 'xz') {
|
||||||
@@ -194,9 +205,35 @@ function extractTar(file, dest, flags = 'xz') {
|
|||||||
if (!file) {
|
if (!file) {
|
||||||
throw new Error("parameter 'file' is required");
|
throw new Error("parameter 'file' is required");
|
||||||
}
|
}
|
||||||
dest = dest || (yield _createExtractFolder(dest));
|
// Create dest
|
||||||
const tarPath = yield io.which('tar', true);
|
dest = yield _createExtractFolder(dest);
|
||||||
yield exec_1.exec(`"${tarPath}"`, [flags, '-C', dest, '-f', file]);
|
// Determine whether GNU tar
|
||||||
|
let versionOutput = '';
|
||||||
|
yield exec_1.exec('tar --version', [], {
|
||||||
|
ignoreReturnCode: true,
|
||||||
|
listeners: {
|
||||||
|
stdout: (data) => (versionOutput += data.toString()),
|
||||||
|
stderr: (data) => (versionOutput += data.toString())
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR');
|
||||||
|
// Initialize args
|
||||||
|
const args = [flags];
|
||||||
|
let destArg = dest;
|
||||||
|
let fileArg = file;
|
||||||
|
if (IS_WINDOWS && isGnuTar) {
|
||||||
|
args.push('--force-local');
|
||||||
|
destArg = dest.replace(/\\/g, '/');
|
||||||
|
// Technically only the dest needs to have `/` but for aesthetic consistency
|
||||||
|
// convert slashes in the file arg too.
|
||||||
|
fileArg = file.replace(/\\/g, '/');
|
||||||
|
}
|
||||||
|
if (isGnuTar) {
|
||||||
|
// Suppress warnings when using GNU tar to extract archives created by BSD tar
|
||||||
|
args.push('--warning=no-unknown-keyword');
|
||||||
|
}
|
||||||
|
args.push('-C', destArg, '-f', fileArg);
|
||||||
|
yield exec_1.exec(`tar`, args);
|
||||||
return dest;
|
return dest;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -213,7 +250,7 @@ function extractZip(file, dest) {
|
|||||||
if (!file) {
|
if (!file) {
|
||||||
throw new Error("parameter 'file' is required");
|
throw new Error("parameter 'file' is required");
|
||||||
}
|
}
|
||||||
dest = dest || (yield _createExtractFolder(dest));
|
dest = yield _createExtractFolder(dest);
|
||||||
if (IS_WINDOWS) {
|
if (IS_WINDOWS) {
|
||||||
yield extractZipWin(file, dest);
|
yield extractZipWin(file, dest);
|
||||||
}
|
}
|
||||||
@@ -380,7 +417,7 @@ function _createExtractFolder(dest) {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (!dest) {
|
if (!dest) {
|
||||||
// create a temp dir
|
// create a temp dir
|
||||||
dest = path.join(tempDirectory, uuidV4());
|
dest = path.join(tempDirectory, v4_1.default());
|
||||||
}
|
}
|
||||||
yield io.mkdirP(dest);
|
yield io.mkdirP(dest);
|
||||||
return dest;
|
return dest;
|
||||||
|
|||||||
2
node_modules/@actions/tool-cache/lib/tool-cache.js.map
generated
vendored
2
node_modules/@actions/tool-cache/lib/tool-cache.js.map
generated
vendored
File diff suppressed because one or more lines are too long
85
node_modules/@actions/tool-cache/package.json
generated
vendored
85
node_modules/@actions/tool-cache/package.json
generated
vendored
@@ -1,48 +1,16 @@
|
|||||||
{
|
{
|
||||||
"_from": "@actions/tool-cache@^1.0.0",
|
"name": "@actions/tool-cache",
|
||||||
"_id": "@actions/tool-cache@1.1.2",
|
"version": "1.3.1",
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-IJczPaZr02ECa3Lgws/TJEVco9tjOujiQSZbO3dHuXXjhd5vrUtfOgGwhmz3/f97L910OraPZ8SknofUk6RvOQ==",
|
|
||||||
"_location": "/@actions/tool-cache",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "@actions/tool-cache@^1.0.0",
|
|
||||||
"name": "@actions/tool-cache",
|
|
||||||
"escapedName": "@actions%2ftool-cache",
|
|
||||||
"scope": "@actions",
|
|
||||||
"rawSpec": "^1.0.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.0.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.1.2.tgz",
|
|
||||||
"_shasum": "304d44cecb9547324731e03ca004a3905e6530d2",
|
|
||||||
"_spec": "@actions/tool-cache@^1.0.0",
|
|
||||||
"_where": "/home/stCarolas/Coding/projects/setup-maven",
|
|
||||||
"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",
|
"description": "Actions tool-cache lib",
|
||||||
"devDependencies": {
|
"keywords": [
|
||||||
"@types/nock": "^10.0.3",
|
"github",
|
||||||
"@types/semver": "^6.0.0",
|
"actions",
|
||||||
"@types/uuid": "^3.4.4",
|
"exec"
|
||||||
"nock": "^10.0.6"
|
],
|
||||||
},
|
"homepage": "https://github.com/actions/toolkit/tree/master/packages/exec",
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "lib/tool-cache.js",
|
||||||
|
"types": "lib/tool-cache.d.ts",
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib",
|
"lib": "lib",
|
||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
@@ -51,25 +19,34 @@
|
|||||||
"lib",
|
"lib",
|
||||||
"scripts"
|
"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": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/actions/toolkit.git"
|
"url": "git+https://github.com/actions/toolkit.git",
|
||||||
|
"directory": "packages/tool-cache"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"audit-moderate": "npm install && npm audit --audit-level=moderate",
|
||||||
"test": "echo \"Error: run tests from root\" && exit 1",
|
"test": "echo \"Error: run tests from root\" && exit 1",
|
||||||
"tsc": "tsc"
|
"tsc": "tsc"
|
||||||
},
|
},
|
||||||
"version": "1.1.2"
|
"bugs": {
|
||||||
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@actions/core": "^1.2.0",
|
||||||
|
"@actions/exec": "^1.0.0",
|
||||||
|
"@actions/http-client": "^1.0.3",
|
||||||
|
"@actions/io": "^1.0.1",
|
||||||
|
"semver": "^6.1.0",
|
||||||
|
"uuid": "^3.3.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/nock": "^10.0.3",
|
||||||
|
"@types/semver": "^6.0.0",
|
||||||
|
"@types/uuid": "^3.4.4",
|
||||||
|
"nock": "^10.0.6"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
22
node_modules/@babel/code-frame/LICENSE
generated
vendored
Normal file
22
node_modules/@babel/code-frame/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
19
node_modules/@babel/code-frame/README.md
generated
vendored
Normal file
19
node_modules/@babel/code-frame/README.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# @babel/code-frame
|
||||||
|
|
||||||
|
> Generate errors that contain a code frame that point to source locations.
|
||||||
|
|
||||||
|
See our website [@babel/code-frame](https://babeljs.io/docs/en/next/babel-code-frame.html) for more information.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using npm:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install --save-dev @babel/code-frame
|
||||||
|
```
|
||||||
|
|
||||||
|
or using yarn:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add @babel/code-frame --dev
|
||||||
|
```
|
||||||
173
node_modules/@babel/code-frame/lib/index.js
generated
vendored
Normal file
173
node_modules/@babel/code-frame/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.codeFrameColumns = codeFrameColumns;
|
||||||
|
exports.default = _default;
|
||||||
|
|
||||||
|
function _highlight() {
|
||||||
|
const data = _interopRequireWildcard(require("@babel/highlight"));
|
||||||
|
|
||||||
|
_highlight = function () {
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
||||||
|
|
||||||
|
let deprecationWarningShown = false;
|
||||||
|
|
||||||
|
function getDefs(chalk) {
|
||||||
|
return {
|
||||||
|
gutter: chalk.grey,
|
||||||
|
marker: chalk.red.bold,
|
||||||
|
message: chalk.red.bold
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
||||||
|
|
||||||
|
function getMarkerLines(loc, source, opts) {
|
||||||
|
const startLoc = Object.assign({
|
||||||
|
column: 0,
|
||||||
|
line: -1
|
||||||
|
}, loc.start);
|
||||||
|
const endLoc = Object.assign({}, startLoc, loc.end);
|
||||||
|
const {
|
||||||
|
linesAbove = 2,
|
||||||
|
linesBelow = 3
|
||||||
|
} = opts || {};
|
||||||
|
const startLine = startLoc.line;
|
||||||
|
const startColumn = startLoc.column;
|
||||||
|
const endLine = endLoc.line;
|
||||||
|
const endColumn = endLoc.column;
|
||||||
|
let start = Math.max(startLine - (linesAbove + 1), 0);
|
||||||
|
let end = Math.min(source.length, endLine + linesBelow);
|
||||||
|
|
||||||
|
if (startLine === -1) {
|
||||||
|
start = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (endLine === -1) {
|
||||||
|
end = source.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
const lineDiff = endLine - startLine;
|
||||||
|
const markerLines = {};
|
||||||
|
|
||||||
|
if (lineDiff) {
|
||||||
|
for (let i = 0; i <= lineDiff; i++) {
|
||||||
|
const lineNumber = i + startLine;
|
||||||
|
|
||||||
|
if (!startColumn) {
|
||||||
|
markerLines[lineNumber] = true;
|
||||||
|
} else if (i === 0) {
|
||||||
|
const sourceLength = source[lineNumber - 1].length;
|
||||||
|
markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
|
||||||
|
} else if (i === lineDiff) {
|
||||||
|
markerLines[lineNumber] = [0, endColumn];
|
||||||
|
} else {
|
||||||
|
const sourceLength = source[lineNumber - i].length;
|
||||||
|
markerLines[lineNumber] = [0, sourceLength];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (startColumn === endColumn) {
|
||||||
|
if (startColumn) {
|
||||||
|
markerLines[startLine] = [startColumn, 0];
|
||||||
|
} else {
|
||||||
|
markerLines[startLine] = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
markerLines[startLine] = [startColumn, endColumn - startColumn];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
start,
|
||||||
|
end,
|
||||||
|
markerLines
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function codeFrameColumns(rawLines, loc, opts = {}) {
|
||||||
|
const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts);
|
||||||
|
const chalk = (0, _highlight().getChalk)(opts);
|
||||||
|
const defs = getDefs(chalk);
|
||||||
|
|
||||||
|
const maybeHighlight = (chalkFn, string) => {
|
||||||
|
return highlighted ? chalkFn(string) : string;
|
||||||
|
};
|
||||||
|
|
||||||
|
const lines = rawLines.split(NEWLINE);
|
||||||
|
const {
|
||||||
|
start,
|
||||||
|
end,
|
||||||
|
markerLines
|
||||||
|
} = getMarkerLines(loc, lines, opts);
|
||||||
|
const hasColumns = loc.start && typeof loc.start.column === "number";
|
||||||
|
const numberMaxWidth = String(end).length;
|
||||||
|
const highlightedLines = highlighted ? (0, _highlight().default)(rawLines, opts) : rawLines;
|
||||||
|
let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => {
|
||||||
|
const number = start + 1 + index;
|
||||||
|
const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
|
||||||
|
const gutter = ` ${paddedNumber} | `;
|
||||||
|
const hasMarker = markerLines[number];
|
||||||
|
const lastMarkerLine = !markerLines[number + 1];
|
||||||
|
|
||||||
|
if (hasMarker) {
|
||||||
|
let markerLine = "";
|
||||||
|
|
||||||
|
if (Array.isArray(hasMarker)) {
|
||||||
|
const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
|
||||||
|
const numberOfMarkers = hasMarker[1] || 1;
|
||||||
|
markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
|
||||||
|
|
||||||
|
if (lastMarkerLine && opts.message) {
|
||||||
|
markerLine += " " + maybeHighlight(defs.message, opts.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
|
||||||
|
} else {
|
||||||
|
return ` ${maybeHighlight(defs.gutter, gutter)}${line}`;
|
||||||
|
}
|
||||||
|
}).join("\n");
|
||||||
|
|
||||||
|
if (opts.message && !hasColumns) {
|
||||||
|
frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (highlighted) {
|
||||||
|
return chalk.reset(frame);
|
||||||
|
} else {
|
||||||
|
return frame;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function _default(rawLines, lineNumber, colNumber, opts = {}) {
|
||||||
|
if (!deprecationWarningShown) {
|
||||||
|
deprecationWarningShown = true;
|
||||||
|
const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
|
||||||
|
|
||||||
|
if (process.emitWarning) {
|
||||||
|
process.emitWarning(message, "DeprecationWarning");
|
||||||
|
} else {
|
||||||
|
const deprecationError = new Error(message);
|
||||||
|
deprecationError.name = "DeprecationWarning";
|
||||||
|
console.warn(new Error(message));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
colNumber = Math.max(colNumber, 0);
|
||||||
|
const location = {
|
||||||
|
start: {
|
||||||
|
column: colNumber,
|
||||||
|
line: lineNumber
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return codeFrameColumns(rawLines, location, opts);
|
||||||
|
}
|
||||||
57
node_modules/@babel/code-frame/package.json
generated
vendored
Normal file
57
node_modules/@babel/code-frame/package.json
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"@babel/code-frame@7.5.5",
|
||||||
|
"/home/stCarolas/Coding/projects/setup-maven"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"_development": true,
|
||||||
|
"_from": "@babel/code-frame@7.5.5",
|
||||||
|
"_id": "@babel/code-frame@7.5.5",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
|
||||||
|
"_location": "/@babel/code-frame",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "version",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "@babel/code-frame@7.5.5",
|
||||||
|
"name": "@babel/code-frame",
|
||||||
|
"escapedName": "@babel%2fcode-frame",
|
||||||
|
"scope": "@babel",
|
||||||
|
"rawSpec": "7.5.5",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "7.5.5"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/read-pkg/parse-json"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
|
||||||
|
"_spec": "7.5.5",
|
||||||
|
"_where": "/home/stCarolas/Coding/projects/setup-maven",
|
||||||
|
"author": {
|
||||||
|
"name": "Sebastian McKenzie",
|
||||||
|
"email": "sebmck@gmail.com"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/highlight": "^7.0.0"
|
||||||
|
},
|
||||||
|
"description": "Generate errors that contain a code frame that point to source locations.",
|
||||||
|
"devDependencies": {
|
||||||
|
"chalk": "^2.0.0",
|
||||||
|
"strip-ansi": "^4.0.0"
|
||||||
|
},
|
||||||
|
"gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43",
|
||||||
|
"homepage": "https://babeljs.io/",
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "lib/index.js",
|
||||||
|
"name": "@babel/code-frame",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame"
|
||||||
|
},
|
||||||
|
"version": "7.5.5"
|
||||||
|
}
|
||||||
22
node_modules/@babel/highlight/LICENSE
generated
vendored
Normal file
22
node_modules/@babel/highlight/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
19
node_modules/@babel/highlight/README.md
generated
vendored
Normal file
19
node_modules/@babel/highlight/README.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# @babel/highlight
|
||||||
|
|
||||||
|
> Syntax highlight JavaScript strings for output in terminals.
|
||||||
|
|
||||||
|
See our website [@babel/highlight](https://babeljs.io/docs/en/next/babel-highlight.html) for more information.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Using npm:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install --save-dev @babel/highlight
|
||||||
|
```
|
||||||
|
|
||||||
|
or using yarn:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add @babel/highlight --dev
|
||||||
|
```
|
||||||
129
node_modules/@babel/highlight/lib/index.js
generated
vendored
Normal file
129
node_modules/@babel/highlight/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.shouldHighlight = shouldHighlight;
|
||||||
|
exports.getChalk = getChalk;
|
||||||
|
exports.default = highlight;
|
||||||
|
|
||||||
|
function _jsTokens() {
|
||||||
|
const data = _interopRequireWildcard(require("js-tokens"));
|
||||||
|
|
||||||
|
_jsTokens = function () {
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _esutils() {
|
||||||
|
const data = _interopRequireDefault(require("esutils"));
|
||||||
|
|
||||||
|
_esutils = function () {
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _chalk() {
|
||||||
|
const data = _interopRequireDefault(require("chalk"));
|
||||||
|
|
||||||
|
_chalk = function () {
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
||||||
|
|
||||||
|
function getDefs(chalk) {
|
||||||
|
return {
|
||||||
|
keyword: chalk.cyan,
|
||||||
|
capitalized: chalk.yellow,
|
||||||
|
jsx_tag: chalk.yellow,
|
||||||
|
punctuator: chalk.yellow,
|
||||||
|
number: chalk.magenta,
|
||||||
|
string: chalk.green,
|
||||||
|
regex: chalk.magenta,
|
||||||
|
comment: chalk.grey,
|
||||||
|
invalid: chalk.white.bgRed.bold
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
||||||
|
const JSX_TAG = /^[a-z][\w-]*$/i;
|
||||||
|
const BRACKET = /^[()[\]{}]$/;
|
||||||
|
|
||||||
|
function getTokenType(match) {
|
||||||
|
const [offset, text] = match.slice(-2);
|
||||||
|
const token = (0, _jsTokens().matchToToken)(match);
|
||||||
|
|
||||||
|
if (token.type === "name") {
|
||||||
|
if (_esutils().default.keyword.isReservedWordES6(token.value)) {
|
||||||
|
return "keyword";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
|
||||||
|
return "jsx_tag";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (token.value[0] !== token.value[0].toLowerCase()) {
|
||||||
|
return "capitalized";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (token.type === "punctuator" && BRACKET.test(token.value)) {
|
||||||
|
return "bracket";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
|
||||||
|
return "punctuator";
|
||||||
|
}
|
||||||
|
|
||||||
|
return token.type;
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlightTokens(defs, text) {
|
||||||
|
return text.replace(_jsTokens().default, function (...args) {
|
||||||
|
const type = getTokenType(args);
|
||||||
|
const colorize = defs[type];
|
||||||
|
|
||||||
|
if (colorize) {
|
||||||
|
return args[0].split(NEWLINE).map(str => colorize(str)).join("\n");
|
||||||
|
} else {
|
||||||
|
return args[0];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function shouldHighlight(options) {
|
||||||
|
return _chalk().default.supportsColor || options.forceColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getChalk(options) {
|
||||||
|
let chalk = _chalk().default;
|
||||||
|
|
||||||
|
if (options.forceColor) {
|
||||||
|
chalk = new (_chalk().default.constructor)({
|
||||||
|
enabled: true,
|
||||||
|
level: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return chalk;
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlight(code, options = {}) {
|
||||||
|
if (shouldHighlight(options)) {
|
||||||
|
const chalk = getChalk(options);
|
||||||
|
const defs = getDefs(chalk);
|
||||||
|
return highlightTokens(defs, code);
|
||||||
|
} else {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
}
|
||||||
58
node_modules/@babel/highlight/package.json
generated
vendored
Normal file
58
node_modules/@babel/highlight/package.json
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"@babel/highlight@7.5.0",
|
||||||
|
"/home/stCarolas/Coding/projects/setup-maven"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"_development": true,
|
||||||
|
"_from": "@babel/highlight@7.5.0",
|
||||||
|
"_id": "@babel/highlight@7.5.0",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
|
||||||
|
"_location": "/@babel/highlight",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "version",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "@babel/highlight@7.5.0",
|
||||||
|
"name": "@babel/highlight",
|
||||||
|
"escapedName": "@babel%2fhighlight",
|
||||||
|
"scope": "@babel",
|
||||||
|
"rawSpec": "7.5.0",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "7.5.0"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/@babel/code-frame"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz",
|
||||||
|
"_spec": "7.5.0",
|
||||||
|
"_where": "/home/stCarolas/Coding/projects/setup-maven",
|
||||||
|
"author": {
|
||||||
|
"name": "suchipi",
|
||||||
|
"email": "me@suchipi.com"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"chalk": "^2.0.0",
|
||||||
|
"esutils": "^2.0.2",
|
||||||
|
"js-tokens": "^4.0.0"
|
||||||
|
},
|
||||||
|
"description": "Syntax highlight JavaScript strings for output in terminals.",
|
||||||
|
"devDependencies": {
|
||||||
|
"strip-ansi": "^4.0.0"
|
||||||
|
},
|
||||||
|
"gitHead": "49da9a07c81156e997e60146eb001ea77b7044c4",
|
||||||
|
"homepage": "https://babeljs.io/",
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "lib/index.js",
|
||||||
|
"name": "@babel/highlight",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/babel/babel/tree/master/packages/babel-highlight"
|
||||||
|
},
|
||||||
|
"version": "7.5.0"
|
||||||
|
}
|
||||||
21
node_modules/@types/normalize-package-data/LICENSE
generated
vendored
Executable file
21
node_modules/@types/normalize-package-data/LICENSE
generated
vendored
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE
|
||||||
16
node_modules/@types/normalize-package-data/README.md
generated
vendored
Executable file
16
node_modules/@types/normalize-package-data/README.md
generated
vendored
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
# Installation
|
||||||
|
> `npm install --save @types/normalize-package-data`
|
||||||
|
|
||||||
|
# Summary
|
||||||
|
This package contains type definitions for normalize-package-data (https://github.com/npm/normalize-package-data#readme).
|
||||||
|
|
||||||
|
# Details
|
||||||
|
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/normalize-package-data
|
||||||
|
|
||||||
|
Additional Details
|
||||||
|
* Last updated: Sun, 07 Jan 2018 07:34:38 GMT
|
||||||
|
* Dependencies: none
|
||||||
|
* Global values: none
|
||||||
|
|
||||||
|
# Credits
|
||||||
|
These definitions were written by Jeff Dickey <https://github.com/jdxcode>.
|
||||||
46
node_modules/@types/normalize-package-data/index.d.ts
generated
vendored
Executable file
46
node_modules/@types/normalize-package-data/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,46 @@
|
|||||||
|
// Type definitions for normalize-package-data 2.4
|
||||||
|
// Project: https://github.com/npm/normalize-package-data#readme
|
||||||
|
// Definitions by: Jeff Dickey <https://github.com/jdxcode>
|
||||||
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||||
|
|
||||||
|
export = normalize;
|
||||||
|
|
||||||
|
declare function normalize(data: normalize.Input, warn?: normalize.WarnFn, strict?: boolean): void;
|
||||||
|
declare function normalize(data: normalize.Input, strict?: boolean): void;
|
||||||
|
|
||||||
|
declare namespace normalize {
|
||||||
|
type WarnFn = (msg: string) => void;
|
||||||
|
interface Input {[k: string]: any; }
|
||||||
|
|
||||||
|
interface Person {
|
||||||
|
name?: string;
|
||||||
|
email?: string;
|
||||||
|
url?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Package {
|
||||||
|
[k: string]: any;
|
||||||
|
name: string;
|
||||||
|
version: string;
|
||||||
|
files?: string[];
|
||||||
|
bin?: {[k: string]: string };
|
||||||
|
man?: string[];
|
||||||
|
keywords?: string[];
|
||||||
|
author?: Person;
|
||||||
|
maintainers?: Person[];
|
||||||
|
contributors?: Person[];
|
||||||
|
bundleDependencies?: {[name: string]: string; };
|
||||||
|
dependencies?: {[name: string]: string; };
|
||||||
|
devDependencies?: {[name: string]: string; };
|
||||||
|
optionalDependencies?: {[name: string]: string; };
|
||||||
|
description?: string;
|
||||||
|
engines?: {[type: string]: string };
|
||||||
|
license?: string;
|
||||||
|
repository?: { type: string, url: string };
|
||||||
|
bugs?: { url: string, email?: string } | { url?: string, email: string };
|
||||||
|
homepage?: string;
|
||||||
|
scripts?: {[k: string]: string};
|
||||||
|
readme: string;
|
||||||
|
_id: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
55
node_modules/@types/normalize-package-data/package.json
generated
vendored
Executable file
55
node_modules/@types/normalize-package-data/package.json
generated
vendored
Executable file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"@types/normalize-package-data@2.4.0",
|
||||||
|
"/home/uwe/src/github.com/uwehdaub/setup-maven"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"_development": true,
|
||||||
|
"_from": "@types/normalize-package-data@2.4.0",
|
||||||
|
"_id": "@types/normalize-package-data@2.4.0",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==",
|
||||||
|
"_location": "/@types/normalize-package-data",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "version",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "@types/normalize-package-data@2.4.0",
|
||||||
|
"name": "@types/normalize-package-data",
|
||||||
|
"escapedName": "@types%2fnormalize-package-data",
|
||||||
|
"scope": "@types",
|
||||||
|
"rawSpec": "2.4.0",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "2.4.0"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/read-pkg"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
|
||||||
|
"_spec": "2.4.0",
|
||||||
|
"_where": "/home/uwe/src/github.com/uwehdaub/setup-maven",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
||||||
|
},
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"name": "Jeff Dickey",
|
||||||
|
"url": "https://github.com/jdxcode"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": {},
|
||||||
|
"description": "TypeScript definitions for normalize-package-data",
|
||||||
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "",
|
||||||
|
"name": "@types/normalize-package-data",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git"
|
||||||
|
},
|
||||||
|
"scripts": {},
|
||||||
|
"typeScriptVersion": "2.0",
|
||||||
|
"typesPublisherContentHash": "5d2101e9e55c73e1d649a6c311e0d40bdfaa25bb06bb75ea6f3bb0d149c1303b",
|
||||||
|
"version": "2.4.0"
|
||||||
|
}
|
||||||
21
node_modules/@types/semver/LICENSE
generated
vendored
Normal file
21
node_modules/@types/semver/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE
|
||||||
16
node_modules/@types/semver/README.md
generated
vendored
Normal file
16
node_modules/@types/semver/README.md
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# Installation
|
||||||
|
> `npm install --save @types/semver`
|
||||||
|
|
||||||
|
# Summary
|
||||||
|
This package contains type definitions for semver (https://github.com/npm/node-semver).
|
||||||
|
|
||||||
|
# Details
|
||||||
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver
|
||||||
|
|
||||||
|
Additional Details
|
||||||
|
* Last updated: Fri, 25 Oct 2019 20:12:50 GMT
|
||||||
|
* Dependencies: none
|
||||||
|
* Global values: none
|
||||||
|
|
||||||
|
# Credits
|
||||||
|
These definitions were written by Bart van der Schoor <https://github.com/Bartvds>, BendingBender <https://github.com/BendingBender>, Lucian Buzzo <https://github.com/LucianBuzzo>, Klaus Meinhardt <https://github.com/ajafff>, and ExE Boss <https://github.com/ExE-Boss>.
|
||||||
299
node_modules/@types/semver/index.d.ts
generated
vendored
Normal file
299
node_modules/@types/semver/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,299 @@
|
|||||||
|
// Type definitions for semver 6.2
|
||||||
|
// Project: https://github.com/npm/node-semver
|
||||||
|
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||||
|
// BendingBender <https://github.com/BendingBender>
|
||||||
|
// Lucian Buzzo <https://github.com/LucianBuzzo>
|
||||||
|
// Klaus Meinhardt <https://github.com/ajafff>
|
||||||
|
// ExE Boss <https://github.com/ExE-Boss>
|
||||||
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/semver
|
||||||
|
|
||||||
|
export const SEMVER_SPEC_VERSION: "2.0.0";
|
||||||
|
|
||||||
|
export type ReleaseType = "major" | "premajor" | "minor" | "preminor" | "patch" | "prepatch" | "prerelease";
|
||||||
|
|
||||||
|
export interface Options {
|
||||||
|
loose?: boolean;
|
||||||
|
includePrerelease?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CoerceOptions extends Options {
|
||||||
|
/**
|
||||||
|
* Used by `coerce()` to coerce from right to left.
|
||||||
|
*
|
||||||
|
* @default false
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* coerce('1.2.3.4', { rtl: true });
|
||||||
|
* // => SemVer { version: '2.3.4', ... }
|
||||||
|
*
|
||||||
|
* @since 6.2.0
|
||||||
|
*/
|
||||||
|
rtl?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the parsed version as a SemVer object, or null if it's not valid.
|
||||||
|
*/
|
||||||
|
export function parse(version: string | SemVer | null | undefined, optionsOrLoose?: boolean | Options): SemVer | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the parsed version as a string, or null if it's not valid.
|
||||||
|
*/
|
||||||
|
export function valid(version: string | SemVer | null | undefined, optionsOrLoose?: boolean | Options): string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Coerces a string to SemVer if possible
|
||||||
|
*/
|
||||||
|
export function coerce(version: string | number | SemVer | null | undefined, options?: CoerceOptions): SemVer | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns cleaned (removed leading/trailing whitespace, remove '=v' prefix) and parsed version, or null if version is invalid.
|
||||||
|
*/
|
||||||
|
export function clean(version: string, optionsOrLoose?: boolean | Options): string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid.
|
||||||
|
*/
|
||||||
|
export function inc(version: string | SemVer, release: ReleaseType, optionsOrLoose?: boolean | Options, identifier?: string): string | null;
|
||||||
|
export function inc(version: string | SemVer, release: ReleaseType, identifier?: string): string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the major version number.
|
||||||
|
*/
|
||||||
|
export function major(version: string | SemVer, optionsOrLoose?: boolean | Options): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the minor version number.
|
||||||
|
*/
|
||||||
|
export function minor(version: string | SemVer, optionsOrLoose?: boolean | Options): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the patch version number.
|
||||||
|
*/
|
||||||
|
export function patch(version: string | SemVer, optionsOrLoose?: boolean | Options): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array of prerelease components, or null if none exist.
|
||||||
|
*/
|
||||||
|
export function prerelease(version: string | SemVer, optionsOrLoose?: boolean | Options): ReadonlyArray<string> | null;
|
||||||
|
|
||||||
|
// Comparison
|
||||||
|
/**
|
||||||
|
* v1 > v2
|
||||||
|
*/
|
||||||
|
export function gt(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
/**
|
||||||
|
* v1 >= v2
|
||||||
|
*/
|
||||||
|
export function gte(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
/**
|
||||||
|
* v1 < v2
|
||||||
|
*/
|
||||||
|
export function lt(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
/**
|
||||||
|
* v1 <= v2
|
||||||
|
*/
|
||||||
|
export function lte(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
export function eq(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
/**
|
||||||
|
* v1 != v2 The opposite of eq.
|
||||||
|
*/
|
||||||
|
export function neq(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pass in a comparison string, and it'll call the corresponding semver comparison function.
|
||||||
|
* "===" and "!==" do simple string comparison, but are included for completeness.
|
||||||
|
* Throws if an invalid comparison string is provided.
|
||||||
|
*/
|
||||||
|
export function cmp(v1: string | SemVer, operator: Operator, v2: string | SemVer, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
export type Operator = '===' | '!==' | '' | '=' | '==' | '!=' | '>' | '>=' | '<' | '<=';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two versions excluding build identifiers (the bit after `+` in the semantic version string).
|
||||||
|
*
|
||||||
|
* Sorts in ascending order when passed to `Array.sort()`.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - `0` if `v1` == `v2`
|
||||||
|
* - `1` if `v1` is greater
|
||||||
|
* - `-1` if `v2` is greater.
|
||||||
|
*/
|
||||||
|
export function compare(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): 1 | 0 | -1;
|
||||||
|
/**
|
||||||
|
* The reverse of compare.
|
||||||
|
*
|
||||||
|
* Sorts in descending order when passed to `Array.sort()`.
|
||||||
|
*/
|
||||||
|
export function rcompare(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): 1 | 0 | -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two identifiers, must be numeric strings or truthy/falsy values.
|
||||||
|
*
|
||||||
|
* Sorts in ascending order when passed to `Array.sort()`.
|
||||||
|
*/
|
||||||
|
export function compareIdentifiers(a: string | null | undefined, b: string | null | undefined): 1 | 0 | -1;
|
||||||
|
/**
|
||||||
|
* The reverse of compareIdentifiers.
|
||||||
|
*
|
||||||
|
* Sorts in descending order when passed to `Array.sort()`.
|
||||||
|
*/
|
||||||
|
export function rcompareIdentifiers(a: string | null | undefined, b: string | null | undefined): 1 | 0 | -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two versions including build identifiers (the bit after `+` in the semantic version string).
|
||||||
|
*
|
||||||
|
* Sorts in ascending order when passed to `Array.sort()`.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - `0` if `v1` == `v2`
|
||||||
|
* - `1` if `v1` is greater
|
||||||
|
* - `-1` if `v2` is greater.
|
||||||
|
*
|
||||||
|
* @since 6.1.0
|
||||||
|
*/
|
||||||
|
export function compareBuild(a: string | SemVer, b: string | SemVer): 1 | 0 | -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sorts an array of semver entries in ascending order using `compareBuild()`.
|
||||||
|
*/
|
||||||
|
export function sort<T extends string | SemVer>(list: T[], optionsOrLoose?: boolean | Options): T[];
|
||||||
|
/**
|
||||||
|
* Sorts an array of semver entries in descending order using `compareBuild()`.
|
||||||
|
*/
|
||||||
|
export function rsort<T extends string | SemVer>(list: T[], optionsOrLoose?: boolean | Options): T[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
export function diff(v1: string | SemVer, v2: string | SemVer, optionsOrLoose?: boolean | Options): ReleaseType | null;
|
||||||
|
|
||||||
|
// Ranges
|
||||||
|
/**
|
||||||
|
* Return the valid range or null if it's not valid
|
||||||
|
*/
|
||||||
|
export function validRange(range: string | Range | null | undefined, optionsOrLoose?: boolean | Options): string;
|
||||||
|
/**
|
||||||
|
* Return true if the version satisfies the range.
|
||||||
|
*/
|
||||||
|
export function satisfies(version: string | SemVer, range: string | Range, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
/**
|
||||||
|
* Return the highest version in the list that satisfies the range, or null if none of them do.
|
||||||
|
*/
|
||||||
|
export function maxSatisfying<T extends string | SemVer>(versions: ReadonlyArray<T>, range: string | Range, optionsOrLoose?: boolean | Options): T | null;
|
||||||
|
/**
|
||||||
|
* Return the lowest version in the list that satisfies the range, or null if none of them do.
|
||||||
|
*/
|
||||||
|
export function minSatisfying<T extends string | SemVer>(versions: ReadonlyArray<T>, range: string | Range, optionsOrLoose?: boolean | Options): T | null;
|
||||||
|
/**
|
||||||
|
* Return the lowest version that can possibly match the given range.
|
||||||
|
*/
|
||||||
|
export function minVersion(range: string | Range, optionsOrLoose?: boolean | Options): SemVer | null;
|
||||||
|
/**
|
||||||
|
* Return true if version is greater than all the versions possible in the range.
|
||||||
|
*/
|
||||||
|
export function gtr(version: string | SemVer, range: string | Range, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
/**
|
||||||
|
* Return true if version is less than all the versions possible in the range.
|
||||||
|
*/
|
||||||
|
export function ltr(version: string | SemVer, range: string | Range, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
/**
|
||||||
|
* 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.)
|
||||||
|
*/
|
||||||
|
export function outside(version: string | SemVer, range: string | Range, hilo: '>' | '<', optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
/**
|
||||||
|
* Return true if any of the ranges comparators intersect
|
||||||
|
*/
|
||||||
|
export function intersects(range1: string | Range, range2: string | Range, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
|
||||||
|
export class SemVer {
|
||||||
|
constructor(version: string | SemVer, optionsOrLoose?: boolean | Options);
|
||||||
|
|
||||||
|
raw: string;
|
||||||
|
loose: boolean;
|
||||||
|
options: Options;
|
||||||
|
format(): string;
|
||||||
|
inspect(): string;
|
||||||
|
|
||||||
|
major: number;
|
||||||
|
minor: number;
|
||||||
|
patch: number;
|
||||||
|
version: string;
|
||||||
|
build: ReadonlyArray<string>;
|
||||||
|
prerelease: ReadonlyArray<string | number>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two versions excluding build identifiers (the bit after `+` in the semantic version string).
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - `0` if `this` == `other`
|
||||||
|
* - `1` if `this` is greater
|
||||||
|
* - `-1` if `other` is greater.
|
||||||
|
*/
|
||||||
|
compare(other: string | SemVer): 1 | 0 | -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares the release portion of two versions.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - `0` if `this` == `other`
|
||||||
|
* - `1` if `this` is greater
|
||||||
|
* - `-1` if `other` is greater.
|
||||||
|
*/
|
||||||
|
compareMain(other: string | SemVer): 1 | 0 | -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares the prerelease portion of two versions.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - `0` if `this` == `other`
|
||||||
|
* - `1` if `this` is greater
|
||||||
|
* - `-1` if `other` is greater.
|
||||||
|
*/
|
||||||
|
comparePre(other: string | SemVer): 1 | 0 | -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares the build identifier of two versions.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - `0` if `this` == `other`
|
||||||
|
* - `1` if `this` is greater
|
||||||
|
* - `-1` if `other` is greater.
|
||||||
|
*/
|
||||||
|
compareBuild(other: string | SemVer): 1 | 0 | -1;
|
||||||
|
|
||||||
|
inc(release: ReleaseType, identifier?: string): SemVer;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Comparator {
|
||||||
|
constructor(comp: string | Comparator, optionsOrLoose?: boolean | Options);
|
||||||
|
|
||||||
|
semver: SemVer;
|
||||||
|
operator: '' | '=' | '<' | '>' | '<=' | '>=';
|
||||||
|
value: string;
|
||||||
|
loose: boolean;
|
||||||
|
options: Options;
|
||||||
|
parse(comp: string): void;
|
||||||
|
test(version: string | SemVer): boolean;
|
||||||
|
intersects(comp: Comparator, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Range {
|
||||||
|
constructor(range: string | Range, optionsOrLoose?: boolean | Options);
|
||||||
|
|
||||||
|
range: string;
|
||||||
|
raw: string;
|
||||||
|
loose: boolean;
|
||||||
|
options: Options;
|
||||||
|
includePrerelease: boolean;
|
||||||
|
format(): string;
|
||||||
|
inspect(): string;
|
||||||
|
|
||||||
|
set: ReadonlyArray<ReadonlyArray<Comparator>>;
|
||||||
|
parseRange(range: string): ReadonlyArray<Comparator>;
|
||||||
|
test(version: string | SemVer): boolean;
|
||||||
|
intersects(range: Range, optionsOrLoose?: boolean | Options): boolean;
|
||||||
|
}
|
||||||
73
node_modules/@types/semver/package.json
generated
vendored
Normal file
73
node_modules/@types/semver/package.json
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"@types/semver@6.2.0",
|
||||||
|
"/home/uwe/src/github.com/uwehdaub/setup-maven"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"_development": true,
|
||||||
|
"_from": "@types/semver@6.2.0",
|
||||||
|
"_id": "@types/semver@6.2.0",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-1OzrNb4RuAzIT7wHSsgZRlMBlNsJl+do6UblR7JMW4oB7bbR+uBEYtUh7gEc/jM84GGilh68lSOokyM/zNUlBA==",
|
||||||
|
"_location": "/@types/semver",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "version",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "@types/semver@6.2.0",
|
||||||
|
"name": "@types/semver",
|
||||||
|
"escapedName": "@types%2fsemver",
|
||||||
|
"scope": "@types",
|
||||||
|
"rawSpec": "6.2.0",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "6.2.0"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"#DEV:/"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.2.0.tgz",
|
||||||
|
"_spec": "6.2.0",
|
||||||
|
"_where": "/home/uwe/src/github.com/uwehdaub/setup-maven",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
|
||||||
|
},
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"name": "Bart van der Schoor",
|
||||||
|
"url": "https://github.com/Bartvds"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BendingBender",
|
||||||
|
"url": "https://github.com/BendingBender"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Lucian Buzzo",
|
||||||
|
"url": "https://github.com/LucianBuzzo"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Klaus Meinhardt",
|
||||||
|
"url": "https://github.com/ajafff"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ExE Boss",
|
||||||
|
"url": "https://github.com/ExE-Boss"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": {},
|
||||||
|
"description": "TypeScript definitions for semver",
|
||||||
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "",
|
||||||
|
"name": "@types/semver",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||||
|
"directory": "types/semver"
|
||||||
|
},
|
||||||
|
"scripts": {},
|
||||||
|
"typeScriptVersion": "2.0",
|
||||||
|
"types": "index",
|
||||||
|
"typesPublisherContentHash": "f19d7b1ca506ce2f282d80a2b72e499a5dc5afed849026bc6a56307e1030e70a",
|
||||||
|
"version": "6.2.0"
|
||||||
|
}
|
||||||
165
node_modules/ansi-styles/index.js
generated
vendored
Normal file
165
node_modules/ansi-styles/index.js
generated
vendored
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
'use strict';
|
||||||
|
const colorConvert = require('color-convert');
|
||||||
|
|
||||||
|
const wrapAnsi16 = (fn, offset) => function () {
|
||||||
|
const code = fn.apply(colorConvert, arguments);
|
||||||
|
return `\u001B[${code + offset}m`;
|
||||||
|
};
|
||||||
|
|
||||||
|
const wrapAnsi256 = (fn, offset) => function () {
|
||||||
|
const code = fn.apply(colorConvert, arguments);
|
||||||
|
return `\u001B[${38 + offset};5;${code}m`;
|
||||||
|
};
|
||||||
|
|
||||||
|
const wrapAnsi16m = (fn, offset) => function () {
|
||||||
|
const rgb = fn.apply(colorConvert, arguments);
|
||||||
|
return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
||||||
|
};
|
||||||
|
|
||||||
|
function assembleStyles() {
|
||||||
|
const codes = new Map();
|
||||||
|
const styles = {
|
||||||
|
modifier: {
|
||||||
|
reset: [0, 0],
|
||||||
|
// 21 isn't widely supported and 22 does the same thing
|
||||||
|
bold: [1, 22],
|
||||||
|
dim: [2, 22],
|
||||||
|
italic: [3, 23],
|
||||||
|
underline: [4, 24],
|
||||||
|
inverse: [7, 27],
|
||||||
|
hidden: [8, 28],
|
||||||
|
strikethrough: [9, 29]
|
||||||
|
},
|
||||||
|
color: {
|
||||||
|
black: [30, 39],
|
||||||
|
red: [31, 39],
|
||||||
|
green: [32, 39],
|
||||||
|
yellow: [33, 39],
|
||||||
|
blue: [34, 39],
|
||||||
|
magenta: [35, 39],
|
||||||
|
cyan: [36, 39],
|
||||||
|
white: [37, 39],
|
||||||
|
gray: [90, 39],
|
||||||
|
|
||||||
|
// Bright color
|
||||||
|
redBright: [91, 39],
|
||||||
|
greenBright: [92, 39],
|
||||||
|
yellowBright: [93, 39],
|
||||||
|
blueBright: [94, 39],
|
||||||
|
magentaBright: [95, 39],
|
||||||
|
cyanBright: [96, 39],
|
||||||
|
whiteBright: [97, 39]
|
||||||
|
},
|
||||||
|
bgColor: {
|
||||||
|
bgBlack: [40, 49],
|
||||||
|
bgRed: [41, 49],
|
||||||
|
bgGreen: [42, 49],
|
||||||
|
bgYellow: [43, 49],
|
||||||
|
bgBlue: [44, 49],
|
||||||
|
bgMagenta: [45, 49],
|
||||||
|
bgCyan: [46, 49],
|
||||||
|
bgWhite: [47, 49],
|
||||||
|
|
||||||
|
// Bright color
|
||||||
|
bgBlackBright: [100, 49],
|
||||||
|
bgRedBright: [101, 49],
|
||||||
|
bgGreenBright: [102, 49],
|
||||||
|
bgYellowBright: [103, 49],
|
||||||
|
bgBlueBright: [104, 49],
|
||||||
|
bgMagentaBright: [105, 49],
|
||||||
|
bgCyanBright: [106, 49],
|
||||||
|
bgWhiteBright: [107, 49]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fix humans
|
||||||
|
styles.color.grey = styles.color.gray;
|
||||||
|
|
||||||
|
for (const groupName of Object.keys(styles)) {
|
||||||
|
const group = styles[groupName];
|
||||||
|
|
||||||
|
for (const styleName of Object.keys(group)) {
|
||||||
|
const style = group[styleName];
|
||||||
|
|
||||||
|
styles[styleName] = {
|
||||||
|
open: `\u001B[${style[0]}m`,
|
||||||
|
close: `\u001B[${style[1]}m`
|
||||||
|
};
|
||||||
|
|
||||||
|
group[styleName] = styles[styleName];
|
||||||
|
|
||||||
|
codes.set(style[0], style[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.defineProperty(styles, groupName, {
|
||||||
|
value: group,
|
||||||
|
enumerable: false
|
||||||
|
});
|
||||||
|
|
||||||
|
Object.defineProperty(styles, 'codes', {
|
||||||
|
value: codes,
|
||||||
|
enumerable: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const ansi2ansi = n => n;
|
||||||
|
const rgb2rgb = (r, g, b) => [r, g, b];
|
||||||
|
|
||||||
|
styles.color.close = '\u001B[39m';
|
||||||
|
styles.bgColor.close = '\u001B[49m';
|
||||||
|
|
||||||
|
styles.color.ansi = {
|
||||||
|
ansi: wrapAnsi16(ansi2ansi, 0)
|
||||||
|
};
|
||||||
|
styles.color.ansi256 = {
|
||||||
|
ansi256: wrapAnsi256(ansi2ansi, 0)
|
||||||
|
};
|
||||||
|
styles.color.ansi16m = {
|
||||||
|
rgb: wrapAnsi16m(rgb2rgb, 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
styles.bgColor.ansi = {
|
||||||
|
ansi: wrapAnsi16(ansi2ansi, 10)
|
||||||
|
};
|
||||||
|
styles.bgColor.ansi256 = {
|
||||||
|
ansi256: wrapAnsi256(ansi2ansi, 10)
|
||||||
|
};
|
||||||
|
styles.bgColor.ansi16m = {
|
||||||
|
rgb: wrapAnsi16m(rgb2rgb, 10)
|
||||||
|
};
|
||||||
|
|
||||||
|
for (let key of Object.keys(colorConvert)) {
|
||||||
|
if (typeof colorConvert[key] !== 'object') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const suite = colorConvert[key];
|
||||||
|
|
||||||
|
if (key === 'ansi16') {
|
||||||
|
key = 'ansi';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('ansi16' in suite) {
|
||||||
|
styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
|
||||||
|
styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('ansi256' in suite) {
|
||||||
|
styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
|
||||||
|
styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ('rgb' in suite) {
|
||||||
|
styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
|
||||||
|
styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return styles;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make the export immutable
|
||||||
|
Object.defineProperty(module, 'exports', {
|
||||||
|
enumerable: true,
|
||||||
|
get: assembleStyles
|
||||||
|
});
|
||||||
9
node_modules/ansi-styles/license
generated
vendored
Normal file
9
node_modules/ansi-styles/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
92
node_modules/ansi-styles/package.json
generated
vendored
Normal file
92
node_modules/ansi-styles/package.json
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"ansi-styles@3.2.1",
|
||||||
|
"/home/stCarolas/Coding/projects/setup-maven"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"_development": true,
|
||||||
|
"_from": "ansi-styles@3.2.1",
|
||||||
|
"_id": "ansi-styles@3.2.1",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||||
|
"_location": "/ansi-styles",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "version",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "ansi-styles@3.2.1",
|
||||||
|
"name": "ansi-styles",
|
||||||
|
"escapedName": "ansi-styles",
|
||||||
|
"rawSpec": "3.2.1",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "3.2.1"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/chalk"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||||
|
"_spec": "3.2.1",
|
||||||
|
"_where": "/home/stCarolas/Coding/projects/setup-maven",
|
||||||
|
"author": {
|
||||||
|
"name": "Sindre Sorhus",
|
||||||
|
"email": "sindresorhus@gmail.com",
|
||||||
|
"url": "sindresorhus.com"
|
||||||
|
},
|
||||||
|
"ava": {
|
||||||
|
"require": "babel-polyfill"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/chalk/ansi-styles/issues"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"color-convert": "^1.9.0"
|
||||||
|
},
|
||||||
|
"description": "ANSI escape codes for styling strings in the terminal",
|
||||||
|
"devDependencies": {
|
||||||
|
"ava": "*",
|
||||||
|
"babel-polyfill": "^6.23.0",
|
||||||
|
"svg-term-cli": "^2.1.1",
|
||||||
|
"xo": "*"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"index.js"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/chalk/ansi-styles#readme",
|
||||||
|
"keywords": [
|
||||||
|
"ansi",
|
||||||
|
"styles",
|
||||||
|
"color",
|
||||||
|
"colour",
|
||||||
|
"colors",
|
||||||
|
"terminal",
|
||||||
|
"console",
|
||||||
|
"cli",
|
||||||
|
"string",
|
||||||
|
"tty",
|
||||||
|
"escape",
|
||||||
|
"formatting",
|
||||||
|
"rgb",
|
||||||
|
"256",
|
||||||
|
"shell",
|
||||||
|
"xterm",
|
||||||
|
"log",
|
||||||
|
"logging",
|
||||||
|
"command-line",
|
||||||
|
"text"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"name": "ansi-styles",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/chalk/ansi-styles.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor",
|
||||||
|
"test": "xo && ava"
|
||||||
|
},
|
||||||
|
"version": "3.2.1"
|
||||||
|
}
|
||||||
147
node_modules/ansi-styles/readme.md
generated
vendored
Normal file
147
node_modules/ansi-styles/readme.md
generated
vendored
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
# ansi-styles [](https://travis-ci.org/chalk/ansi-styles)
|
||||||
|
|
||||||
|
> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
|
||||||
|
|
||||||
|
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
|
||||||
|
|
||||||
|
<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
|
||||||
|
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```
|
||||||
|
$ npm install ansi-styles
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```js
|
||||||
|
const style = require('ansi-styles');
|
||||||
|
|
||||||
|
console.log(`${style.green.open}Hello world!${style.green.close}`);
|
||||||
|
|
||||||
|
|
||||||
|
// Color conversion between 16/256/truecolor
|
||||||
|
// NOTE: If conversion goes to 16 colors or 256 colors, the original color
|
||||||
|
// may be degraded to fit that color palette. This means terminals
|
||||||
|
// that do not support 16 million colors will best-match the
|
||||||
|
// original color.
|
||||||
|
console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
|
||||||
|
console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
|
||||||
|
console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close);
|
||||||
|
```
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
Each style has an `open` and `close` property.
|
||||||
|
|
||||||
|
|
||||||
|
## Styles
|
||||||
|
|
||||||
|
### Modifiers
|
||||||
|
|
||||||
|
- `reset`
|
||||||
|
- `bold`
|
||||||
|
- `dim`
|
||||||
|
- `italic` *(Not widely supported)*
|
||||||
|
- `underline`
|
||||||
|
- `inverse`
|
||||||
|
- `hidden`
|
||||||
|
- `strikethrough` *(Not widely supported)*
|
||||||
|
|
||||||
|
### Colors
|
||||||
|
|
||||||
|
- `black`
|
||||||
|
- `red`
|
||||||
|
- `green`
|
||||||
|
- `yellow`
|
||||||
|
- `blue`
|
||||||
|
- `magenta`
|
||||||
|
- `cyan`
|
||||||
|
- `white`
|
||||||
|
- `gray` ("bright black")
|
||||||
|
- `redBright`
|
||||||
|
- `greenBright`
|
||||||
|
- `yellowBright`
|
||||||
|
- `blueBright`
|
||||||
|
- `magentaBright`
|
||||||
|
- `cyanBright`
|
||||||
|
- `whiteBright`
|
||||||
|
|
||||||
|
### Background colors
|
||||||
|
|
||||||
|
- `bgBlack`
|
||||||
|
- `bgRed`
|
||||||
|
- `bgGreen`
|
||||||
|
- `bgYellow`
|
||||||
|
- `bgBlue`
|
||||||
|
- `bgMagenta`
|
||||||
|
- `bgCyan`
|
||||||
|
- `bgWhite`
|
||||||
|
- `bgBlackBright`
|
||||||
|
- `bgRedBright`
|
||||||
|
- `bgGreenBright`
|
||||||
|
- `bgYellowBright`
|
||||||
|
- `bgBlueBright`
|
||||||
|
- `bgMagentaBright`
|
||||||
|
- `bgCyanBright`
|
||||||
|
- `bgWhiteBright`
|
||||||
|
|
||||||
|
|
||||||
|
## Advanced usage
|
||||||
|
|
||||||
|
By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
|
||||||
|
|
||||||
|
- `style.modifier`
|
||||||
|
- `style.color`
|
||||||
|
- `style.bgColor`
|
||||||
|
|
||||||
|
###### Example
|
||||||
|
|
||||||
|
```js
|
||||||
|
console.log(style.color.green.open);
|
||||||
|
```
|
||||||
|
|
||||||
|
Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values.
|
||||||
|
|
||||||
|
###### Example
|
||||||
|
|
||||||
|
```js
|
||||||
|
console.log(style.codes.get(36));
|
||||||
|
//=> 39
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
|
||||||
|
|
||||||
|
`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
|
||||||
|
|
||||||
|
To use these, call the associated conversion function with the intended output, for example:
|
||||||
|
|
||||||
|
```js
|
||||||
|
style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code
|
||||||
|
style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code
|
||||||
|
|
||||||
|
style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
|
||||||
|
style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
|
||||||
|
|
||||||
|
style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code
|
||||||
|
style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Related
|
||||||
|
|
||||||
|
- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
|
||||||
|
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
- [Sindre Sorhus](https://github.com/sindresorhus)
|
||||||
|
- [Josh Junon](https://github.com/qix-)
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
||||||
185
node_modules/argparse/CHANGELOG.md
generated
vendored
Normal file
185
node_modules/argparse/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
1.0.10 / 2018-02-15
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Use .concat instead of + for arrays, #122.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.9 / 2016-09-29
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Rerelease after 1.0.8 - deps cleanup.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.8 / 2016-09-29
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Maintenance (deps bump, fix node 6.5+ tests, coverage report).
|
||||||
|
|
||||||
|
|
||||||
|
1.0.7 / 2016-03-17
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Teach `addArgument` to accept string arg names. #97, @tomxtobin.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.6 / 2016-02-06
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Maintenance: moved to eslint & updated CS.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.5 / 2016-02-05
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Removed lodash dependency to significantly reduce install size.
|
||||||
|
Thanks to @mourner.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.4 / 2016-01-17
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Maintenance: lodash update to 4.0.0.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.3 / 2015-10-27
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.2 / 2015-03-22
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Relaxed lodash version dependency.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.1 / 2015-02-20
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Changed dependencies to be compatible with ancient nodejs.
|
||||||
|
|
||||||
|
|
||||||
|
1.0.0 / 2015-02-19
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Maintenance release.
|
||||||
|
- Replaced `underscore` with `lodash`.
|
||||||
|
- Bumped version to 1.0.0 to better reflect semver meaning.
|
||||||
|
- HISTORY.md -> CHANGELOG.md
|
||||||
|
|
||||||
|
|
||||||
|
0.1.16 / 2013-12-01
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- Maintenance release. Updated dependencies and docs.
|
||||||
|
|
||||||
|
|
||||||
|
0.1.15 / 2013-05-13
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- Fixed #55, @trebor89
|
||||||
|
|
||||||
|
|
||||||
|
0.1.14 / 2013-05-12
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- Fixed #62, @maxtaco
|
||||||
|
|
||||||
|
|
||||||
|
0.1.13 / 2013-04-08
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- Added `.npmignore` to reduce package size
|
||||||
|
|
||||||
|
|
||||||
|
0.1.12 / 2013-02-10
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- Fixed conflictHandler (#46), @hpaulj
|
||||||
|
|
||||||
|
|
||||||
|
0.1.11 / 2013-02-07
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- Multiple bugfixes, @hpaulj
|
||||||
|
- Added 70+ tests (ported from python), @hpaulj
|
||||||
|
- Added conflictHandler, @applepicke
|
||||||
|
- Added fromfilePrefixChar, @hpaulj
|
||||||
|
|
||||||
|
|
||||||
|
0.1.10 / 2012-12-30
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion)
|
||||||
|
support, thanks to @hpaulj
|
||||||
|
- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj
|
||||||
|
|
||||||
|
|
||||||
|
0.1.9 / 2012-12-27
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj
|
||||||
|
- Fixed default value behavior with `*` positionals, thanks to @hpaulj
|
||||||
|
- Improve `getDefault()` behavior, thanks to @hpaulj
|
||||||
|
- Imrove negative argument parsing, thanks to @hpaulj
|
||||||
|
|
||||||
|
|
||||||
|
0.1.8 / 2012-12-01
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Fixed parser parents (issue #19), thanks to @hpaulj
|
||||||
|
- Fixed negative argument parse (issue #20), thanks to @hpaulj
|
||||||
|
|
||||||
|
|
||||||
|
0.1.7 / 2012-10-14
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Fixed 'choices' argument parse (issue #16)
|
||||||
|
- Fixed stderr output (issue #15)
|
||||||
|
|
||||||
|
|
||||||
|
0.1.6 / 2012-09-09
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Fixed check for conflict of options (thanks to @tomxtobin)
|
||||||
|
|
||||||
|
|
||||||
|
0.1.5 / 2012-09-03
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Fix parser #setDefaults method (thanks to @tomxtobin)
|
||||||
|
|
||||||
|
|
||||||
|
0.1.4 / 2012-07-30
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Fixed pseudo-argument support (thanks to @CGamesPlay)
|
||||||
|
- Fixed addHelp default (should be true), if not set (thanks to @benblank)
|
||||||
|
|
||||||
|
|
||||||
|
0.1.3 / 2012-06-27
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Fixed formatter api name: Formatter -> HelpFormatter
|
||||||
|
|
||||||
|
|
||||||
|
0.1.2 / 2012-05-29
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Added basic tests
|
||||||
|
- Removed excess whitespace in help
|
||||||
|
- Fixed error reporting, when parcer with subcommands
|
||||||
|
called with empty arguments
|
||||||
|
|
||||||
|
|
||||||
|
0.1.1 / 2012-05-23
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Fixed line wrapping in help formatter
|
||||||
|
- Added better error reporting on invalid arguments
|
||||||
|
|
||||||
|
|
||||||
|
0.1.0 / 2012-05-16
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- First release.
|
||||||
21
node_modules/argparse/LICENSE
generated
vendored
Normal file
21
node_modules/argparse/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
(The MIT License)
|
||||||
|
|
||||||
|
Copyright (C) 2012 by Vitaly Puzrin
|
||||||
|
|
||||||
|
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.
|
||||||
257
node_modules/argparse/README.md
generated
vendored
Normal file
257
node_modules/argparse/README.md
generated
vendored
Normal file
@@ -0,0 +1,257 @@
|
|||||||
|
argparse
|
||||||
|
========
|
||||||
|
|
||||||
|
[](http://travis-ci.org/nodeca/argparse)
|
||||||
|
[](https://www.npmjs.org/package/argparse)
|
||||||
|
|
||||||
|
CLI arguments parser for node.js. Javascript port of python's
|
||||||
|
[argparse](http://docs.python.org/dev/library/argparse.html) module
|
||||||
|
(original version 3.2). That's a full port, except some very rare options,
|
||||||
|
recorded in issue tracker.
|
||||||
|
|
||||||
|
**NB. Difference with original.**
|
||||||
|
|
||||||
|
- Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/).
|
||||||
|
- Use `defaultValue` instead of `default`.
|
||||||
|
- Use `argparse.Const.REMAINDER` instead of `argparse.REMAINDER`, and
|
||||||
|
similarly for constant values `OPTIONAL`, `ZERO_OR_MORE`, and `ONE_OR_MORE`
|
||||||
|
(aliases for `nargs` values `'?'`, `'*'`, `'+'`, respectively), and
|
||||||
|
`SUPPRESS`.
|
||||||
|
|
||||||
|
|
||||||
|
Example
|
||||||
|
=======
|
||||||
|
|
||||||
|
test.js file:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
#!/usr/bin/env node
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var ArgumentParser = require('../lib/argparse').ArgumentParser;
|
||||||
|
var parser = new ArgumentParser({
|
||||||
|
version: '0.0.1',
|
||||||
|
addHelp:true,
|
||||||
|
description: 'Argparse example'
|
||||||
|
});
|
||||||
|
parser.addArgument(
|
||||||
|
[ '-f', '--foo' ],
|
||||||
|
{
|
||||||
|
help: 'foo bar'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
parser.addArgument(
|
||||||
|
[ '-b', '--bar' ],
|
||||||
|
{
|
||||||
|
help: 'bar foo'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
parser.addArgument(
|
||||||
|
'--baz',
|
||||||
|
{
|
||||||
|
help: 'baz bar'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
var args = parser.parseArgs();
|
||||||
|
console.dir(args);
|
||||||
|
```
|
||||||
|
|
||||||
|
Display help:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./test.js -h
|
||||||
|
usage: example.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ]
|
||||||
|
|
||||||
|
Argparse example
|
||||||
|
|
||||||
|
Optional arguments:
|
||||||
|
-h, --help Show this help message and exit.
|
||||||
|
-v, --version Show program's version number and exit.
|
||||||
|
-f FOO, --foo FOO foo bar
|
||||||
|
-b BAR, --bar BAR bar foo
|
||||||
|
--baz BAZ baz bar
|
||||||
|
```
|
||||||
|
|
||||||
|
Parse arguments:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./test.js -f=3 --bar=4 --baz 5
|
||||||
|
{ foo: '3', bar: '4', baz: '5' }
|
||||||
|
```
|
||||||
|
|
||||||
|
More [examples](https://github.com/nodeca/argparse/tree/master/examples).
|
||||||
|
|
||||||
|
|
||||||
|
ArgumentParser objects
|
||||||
|
======================
|
||||||
|
|
||||||
|
```
|
||||||
|
new ArgumentParser({parameters hash});
|
||||||
|
```
|
||||||
|
|
||||||
|
Creates a new ArgumentParser object.
|
||||||
|
|
||||||
|
**Supported params:**
|
||||||
|
|
||||||
|
- ```description``` - Text to display before the argument help.
|
||||||
|
- ```epilog``` - Text to display after the argument help.
|
||||||
|
- ```addHelp``` - Add a -h/–help option to the parser. (default: true)
|
||||||
|
- ```argumentDefault``` - Set the global default value for arguments. (default: null)
|
||||||
|
- ```parents``` - A list of ArgumentParser objects whose arguments should also be included.
|
||||||
|
- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘)
|
||||||
|
- ```formatterClass``` - A class for customizing the help output.
|
||||||
|
- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`)
|
||||||
|
- ```usage``` - The string describing the program usage (default: generated)
|
||||||
|
- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals.
|
||||||
|
|
||||||
|
**Not supported yet**
|
||||||
|
|
||||||
|
- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read.
|
||||||
|
|
||||||
|
|
||||||
|
Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects)
|
||||||
|
|
||||||
|
|
||||||
|
addArgument() method
|
||||||
|
====================
|
||||||
|
|
||||||
|
```
|
||||||
|
ArgumentParser.addArgument(name or flag or [name] or [flags...], {options})
|
||||||
|
```
|
||||||
|
|
||||||
|
Defines how a single command-line argument should be parsed.
|
||||||
|
|
||||||
|
- ```name or flag or [name] or [flags...]``` - Either a positional name
|
||||||
|
(e.g., `'foo'`), a single option (e.g., `'-f'` or `'--foo'`), an array
|
||||||
|
of a single positional name (e.g., `['foo']`), or an array of options
|
||||||
|
(e.g., `['-f', '--foo']`).
|
||||||
|
|
||||||
|
Options:
|
||||||
|
|
||||||
|
- ```action``` - The basic type of action to be taken when this argument is encountered at the command line.
|
||||||
|
- ```nargs```- The number of command-line arguments that should be consumed.
|
||||||
|
- ```constant``` - A constant value required by some action and nargs selections.
|
||||||
|
- ```defaultValue``` - The value produced if the argument is absent from the command line.
|
||||||
|
- ```type``` - The type to which the command-line argument should be converted.
|
||||||
|
- ```choices``` - A container of the allowable values for the argument.
|
||||||
|
- ```required``` - Whether or not the command-line option may be omitted (optionals only).
|
||||||
|
- ```help``` - A brief description of what the argument does.
|
||||||
|
- ```metavar``` - A name for the argument in usage messages.
|
||||||
|
- ```dest``` - The name of the attribute to be added to the object returned by parseArgs().
|
||||||
|
|
||||||
|
Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method)
|
||||||
|
|
||||||
|
|
||||||
|
Action (some details)
|
||||||
|
================
|
||||||
|
|
||||||
|
ArgumentParser objects associate command-line arguments with actions.
|
||||||
|
These actions can do just about anything with the command-line arguments associated
|
||||||
|
with them, though most actions simply add an attribute to the object returned by
|
||||||
|
parseArgs(). The action keyword argument specifies how the command-line arguments
|
||||||
|
should be handled. The supported actions are:
|
||||||
|
|
||||||
|
- ```store``` - Just stores the argument’s value. This is the default action.
|
||||||
|
- ```storeConst``` - Stores value, specified by the const keyword argument.
|
||||||
|
(Note that the const keyword argument defaults to the rather unhelpful None.)
|
||||||
|
The 'storeConst' action is most commonly used with optional arguments, that
|
||||||
|
specify some sort of flag.
|
||||||
|
- ```storeTrue``` and ```storeFalse``` - Stores values True and False
|
||||||
|
respectively. These are special cases of 'storeConst'.
|
||||||
|
- ```append``` - Stores a list, and appends each argument value to the list.
|
||||||
|
This is useful to allow an option to be specified multiple times.
|
||||||
|
- ```appendConst``` - Stores a list, and appends value, specified by the
|
||||||
|
const keyword argument to the list. (Note, that the const keyword argument defaults
|
||||||
|
is None.) The 'appendConst' action is typically used when multiple arguments need
|
||||||
|
to store constants to the same list.
|
||||||
|
- ```count``` - Counts the number of times a keyword argument occurs. For example,
|
||||||
|
used for increasing verbosity levels.
|
||||||
|
- ```help``` - Prints a complete help message for all the options in the current
|
||||||
|
parser and then exits. By default a help action is automatically added to the parser.
|
||||||
|
See ArgumentParser for details of how the output is created.
|
||||||
|
- ```version``` - Prints version information and exit. Expects a `version=`
|
||||||
|
keyword argument in the addArgument() call.
|
||||||
|
|
||||||
|
Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action)
|
||||||
|
|
||||||
|
|
||||||
|
Sub-commands
|
||||||
|
============
|
||||||
|
|
||||||
|
ArgumentParser.addSubparsers()
|
||||||
|
|
||||||
|
Many programs split their functionality into a number of sub-commands, for
|
||||||
|
example, the svn program can invoke sub-commands like `svn checkout`, `svn update`,
|
||||||
|
and `svn commit`. Splitting up functionality this way can be a particularly good
|
||||||
|
idea when a program performs several different functions which require different
|
||||||
|
kinds of command-line arguments. `ArgumentParser` supports creation of such
|
||||||
|
sub-commands with `addSubparsers()` method. The `addSubparsers()` method is
|
||||||
|
normally called with no arguments and returns an special action object.
|
||||||
|
This object has a single method `addParser()`, which takes a command name and
|
||||||
|
any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object
|
||||||
|
that can be modified as usual.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
sub_commands.js
|
||||||
|
```javascript
|
||||||
|
#!/usr/bin/env node
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var ArgumentParser = require('../lib/argparse').ArgumentParser;
|
||||||
|
var parser = new ArgumentParser({
|
||||||
|
version: '0.0.1',
|
||||||
|
addHelp:true,
|
||||||
|
description: 'Argparse examples: sub-commands',
|
||||||
|
});
|
||||||
|
|
||||||
|
var subparsers = parser.addSubparsers({
|
||||||
|
title:'subcommands',
|
||||||
|
dest:"subcommand_name"
|
||||||
|
});
|
||||||
|
|
||||||
|
var bar = subparsers.addParser('c1', {addHelp:true});
|
||||||
|
bar.addArgument(
|
||||||
|
[ '-f', '--foo' ],
|
||||||
|
{
|
||||||
|
action: 'store',
|
||||||
|
help: 'foo3 bar3'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
var bar = subparsers.addParser(
|
||||||
|
'c2',
|
||||||
|
{aliases:['co'], addHelp:true}
|
||||||
|
);
|
||||||
|
bar.addArgument(
|
||||||
|
[ '-b', '--bar' ],
|
||||||
|
{
|
||||||
|
action: 'store',
|
||||||
|
type: 'int',
|
||||||
|
help: 'foo3 bar3'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
var args = parser.parseArgs();
|
||||||
|
console.dir(args);
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands)
|
||||||
|
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
============
|
||||||
|
|
||||||
|
- [Eugene Shkuropat](https://github.com/shkuropat)
|
||||||
|
- [Paul Jacobson](https://github.com/hpaulj)
|
||||||
|
|
||||||
|
[others](https://github.com/nodeca/argparse/graphs/contributors)
|
||||||
|
|
||||||
|
License
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin).
|
||||||
|
Released under the MIT license. See
|
||||||
|
[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details.
|
||||||
|
|
||||||
|
|
||||||
3
node_modules/argparse/index.js
generated
vendored
Normal file
3
node_modules/argparse/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = require('./lib/argparse');
|
||||||
146
node_modules/argparse/lib/action.js
generated
vendored
Normal file
146
node_modules/argparse/lib/action.js
generated
vendored
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
/**
|
||||||
|
* class Action
|
||||||
|
*
|
||||||
|
* Base class for all actions
|
||||||
|
* Do not call in your code, use this class only for inherits your own action
|
||||||
|
*
|
||||||
|
* Information about how to convert command line strings to Javascript objects.
|
||||||
|
* Action objects are used by an ArgumentParser to represent the information
|
||||||
|
* needed to parse a single argument from one or more strings from the command
|
||||||
|
* line. The keyword arguments to the Action constructor are also all attributes
|
||||||
|
* of Action instances.
|
||||||
|
*
|
||||||
|
* ##### Allowed keywords:
|
||||||
|
*
|
||||||
|
* - `store`
|
||||||
|
* - `storeConstant`
|
||||||
|
* - `storeTrue`
|
||||||
|
* - `storeFalse`
|
||||||
|
* - `append`
|
||||||
|
* - `appendConstant`
|
||||||
|
* - `count`
|
||||||
|
* - `help`
|
||||||
|
* - `version`
|
||||||
|
*
|
||||||
|
* Information about action options see [[Action.new]]
|
||||||
|
*
|
||||||
|
* See also [original guide](http://docs.python.org/dev/library/argparse.html#action)
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
|
// Constants
|
||||||
|
var c = require('./const');
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* new Action(options)
|
||||||
|
*
|
||||||
|
* Base class for all actions. Used only for inherits
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* ##### Options:
|
||||||
|
*
|
||||||
|
* - `optionStrings` A list of command-line option strings for the action.
|
||||||
|
* - `dest` Attribute to hold the created object(s)
|
||||||
|
* - `nargs` The number of command-line arguments that should be consumed.
|
||||||
|
* By default, one argument will be consumed and a single value will be
|
||||||
|
* produced.
|
||||||
|
* - `constant` Default value for an action with no value.
|
||||||
|
* - `defaultValue` The value to be produced if the option is not specified.
|
||||||
|
* - `type` Cast to 'string'|'int'|'float'|'complex'|function (string). If
|
||||||
|
* None, 'string'.
|
||||||
|
* - `choices` The choices available.
|
||||||
|
* - `required` True if the action must always be specified at the command
|
||||||
|
* line.
|
||||||
|
* - `help` The help describing the argument.
|
||||||
|
* - `metavar` The name to be used for the option's argument with the help
|
||||||
|
* string. If None, the 'dest' value will be used as the name.
|
||||||
|
*
|
||||||
|
* ##### nargs supported values:
|
||||||
|
*
|
||||||
|
* - `N` (an integer) consumes N arguments (and produces a list)
|
||||||
|
* - `?` consumes zero or one arguments
|
||||||
|
* - `*` consumes zero or more arguments (and produces a list)
|
||||||
|
* - `+` consumes one or more arguments (and produces a list)
|
||||||
|
*
|
||||||
|
* Note: that the difference between the default and nargs=1 is that with the
|
||||||
|
* default, a single value will be produced, while with nargs=1, a list
|
||||||
|
* containing a single value will be produced.
|
||||||
|
**/
|
||||||
|
var Action = module.exports = function Action(options) {
|
||||||
|
options = options || {};
|
||||||
|
this.optionStrings = options.optionStrings || [];
|
||||||
|
this.dest = options.dest;
|
||||||
|
this.nargs = typeof options.nargs !== 'undefined' ? options.nargs : null;
|
||||||
|
this.constant = typeof options.constant !== 'undefined' ? options.constant : null;
|
||||||
|
this.defaultValue = options.defaultValue;
|
||||||
|
this.type = typeof options.type !== 'undefined' ? options.type : null;
|
||||||
|
this.choices = typeof options.choices !== 'undefined' ? options.choices : null;
|
||||||
|
this.required = typeof options.required !== 'undefined' ? options.required : false;
|
||||||
|
this.help = typeof options.help !== 'undefined' ? options.help : null;
|
||||||
|
this.metavar = typeof options.metavar !== 'undefined' ? options.metavar : null;
|
||||||
|
|
||||||
|
if (!(this.optionStrings instanceof Array)) {
|
||||||
|
throw new Error('optionStrings should be an array');
|
||||||
|
}
|
||||||
|
if (typeof this.required !== 'undefined' && typeof this.required !== 'boolean') {
|
||||||
|
throw new Error('required should be a boolean');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action#getName -> String
|
||||||
|
*
|
||||||
|
* Tells action name
|
||||||
|
**/
|
||||||
|
Action.prototype.getName = function () {
|
||||||
|
if (this.optionStrings.length > 0) {
|
||||||
|
return this.optionStrings.join('/');
|
||||||
|
} else if (this.metavar !== null && this.metavar !== c.SUPPRESS) {
|
||||||
|
return this.metavar;
|
||||||
|
} else if (typeof this.dest !== 'undefined' && this.dest !== c.SUPPRESS) {
|
||||||
|
return this.dest;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action#isOptional -> Boolean
|
||||||
|
*
|
||||||
|
* Return true if optional
|
||||||
|
**/
|
||||||
|
Action.prototype.isOptional = function () {
|
||||||
|
return !this.isPositional();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action#isPositional -> Boolean
|
||||||
|
*
|
||||||
|
* Return true if positional
|
||||||
|
**/
|
||||||
|
Action.prototype.isPositional = function () {
|
||||||
|
return (this.optionStrings.length === 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action#call(parser, namespace, values, optionString) -> Void
|
||||||
|
* - parser (ArgumentParser): current parser
|
||||||
|
* - namespace (Namespace): namespace for output data
|
||||||
|
* - values (Array): parsed values
|
||||||
|
* - optionString (Array): input option string(not parsed)
|
||||||
|
*
|
||||||
|
* Call the action. Should be implemented in inherited classes
|
||||||
|
*
|
||||||
|
* ##### Example
|
||||||
|
*
|
||||||
|
* ActionCount.prototype.call = function (parser, namespace, values, optionString) {
|
||||||
|
* namespace.set(this.dest, (namespace[this.dest] || 0) + 1);
|
||||||
|
* };
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
Action.prototype.call = function () {
|
||||||
|
throw new Error('.call() not defined');// Not Implemented error
|
||||||
|
};
|
||||||
53
node_modules/argparse/lib/action/append.js
generated
vendored
Normal file
53
node_modules/argparse/lib/action/append.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/*:nodoc:*
|
||||||
|
* class ActionAppend
|
||||||
|
*
|
||||||
|
* This action stores a list, and appends each argument value to the list.
|
||||||
|
* This is useful to allow an option to be specified multiple times.
|
||||||
|
* This class inherided from [[Action]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
var Action = require('../action');
|
||||||
|
|
||||||
|
// Constants
|
||||||
|
var c = require('../const');
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* new ActionAppend(options)
|
||||||
|
* - options (object): options hash see [[Action.new]]
|
||||||
|
*
|
||||||
|
* Note: options.nargs should be optional for constants
|
||||||
|
* and more then zero for other
|
||||||
|
**/
|
||||||
|
var ActionAppend = module.exports = function ActionAppend(options) {
|
||||||
|
options = options || {};
|
||||||
|
if (this.nargs <= 0) {
|
||||||
|
throw new Error('nargs for append actions must be > 0; if arg ' +
|
||||||
|
'strings are not supplying the value to append, ' +
|
||||||
|
'the append const action may be more appropriate');
|
||||||
|
}
|
||||||
|
if (!!this.constant && this.nargs !== c.OPTIONAL) {
|
||||||
|
throw new Error('nargs must be OPTIONAL to supply const');
|
||||||
|
}
|
||||||
|
Action.call(this, options);
|
||||||
|
};
|
||||||
|
util.inherits(ActionAppend, Action);
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* ActionAppend#call(parser, namespace, values, optionString) -> Void
|
||||||
|
* - parser (ArgumentParser): current parser
|
||||||
|
* - namespace (Namespace): namespace for output data
|
||||||
|
* - values (Array): parsed values
|
||||||
|
* - optionString (Array): input option string(not parsed)
|
||||||
|
*
|
||||||
|
* Call the action. Save result in namespace object
|
||||||
|
**/
|
||||||
|
ActionAppend.prototype.call = function (parser, namespace, values) {
|
||||||
|
var items = (namespace[this.dest] || []).slice();
|
||||||
|
items.push(values);
|
||||||
|
namespace.set(this.dest, items);
|
||||||
|
};
|
||||||
47
node_modules/argparse/lib/action/append/constant.js
generated
vendored
Normal file
47
node_modules/argparse/lib/action/append/constant.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/*:nodoc:*
|
||||||
|
* class ActionAppendConstant
|
||||||
|
*
|
||||||
|
* This stores a list, and appends the value specified by
|
||||||
|
* the const keyword argument to the list.
|
||||||
|
* (Note that the const keyword argument defaults to null.)
|
||||||
|
* The 'appendConst' action is typically useful when multiple
|
||||||
|
* arguments need to store constants to the same list.
|
||||||
|
*
|
||||||
|
* This class inherited from [[Action]]
|
||||||
|
**/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
var Action = require('../../action');
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* new ActionAppendConstant(options)
|
||||||
|
* - options (object): options hash see [[Action.new]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
var ActionAppendConstant = module.exports = function ActionAppendConstant(options) {
|
||||||
|
options = options || {};
|
||||||
|
options.nargs = 0;
|
||||||
|
if (typeof options.constant === 'undefined') {
|
||||||
|
throw new Error('constant option is required for appendAction');
|
||||||
|
}
|
||||||
|
Action.call(this, options);
|
||||||
|
};
|
||||||
|
util.inherits(ActionAppendConstant, Action);
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* ActionAppendConstant#call(parser, namespace, values, optionString) -> Void
|
||||||
|
* - parser (ArgumentParser): current parser
|
||||||
|
* - namespace (Namespace): namespace for output data
|
||||||
|
* - values (Array): parsed values
|
||||||
|
* - optionString (Array): input option string(not parsed)
|
||||||
|
*
|
||||||
|
* Call the action. Save result in namespace object
|
||||||
|
**/
|
||||||
|
ActionAppendConstant.prototype.call = function (parser, namespace) {
|
||||||
|
var items = [].concat(namespace[this.dest] || []);
|
||||||
|
items.push(this.constant);
|
||||||
|
namespace.set(this.dest, items);
|
||||||
|
};
|
||||||
40
node_modules/argparse/lib/action/count.js
generated
vendored
Normal file
40
node_modules/argparse/lib/action/count.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*:nodoc:*
|
||||||
|
* class ActionCount
|
||||||
|
*
|
||||||
|
* This counts the number of times a keyword argument occurs.
|
||||||
|
* For example, this is useful for increasing verbosity levels
|
||||||
|
*
|
||||||
|
* This class inherided from [[Action]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
var Action = require('../action');
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* new ActionCount(options)
|
||||||
|
* - options (object): options hash see [[Action.new]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
var ActionCount = module.exports = function ActionCount(options) {
|
||||||
|
options = options || {};
|
||||||
|
options.nargs = 0;
|
||||||
|
|
||||||
|
Action.call(this, options);
|
||||||
|
};
|
||||||
|
util.inherits(ActionCount, Action);
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* ActionCount#call(parser, namespace, values, optionString) -> Void
|
||||||
|
* - parser (ArgumentParser): current parser
|
||||||
|
* - namespace (Namespace): namespace for output data
|
||||||
|
* - values (Array): parsed values
|
||||||
|
* - optionString (Array): input option string(not parsed)
|
||||||
|
*
|
||||||
|
* Call the action. Save result in namespace object
|
||||||
|
**/
|
||||||
|
ActionCount.prototype.call = function (parser, namespace) {
|
||||||
|
namespace.set(this.dest, (namespace[this.dest] || 0) + 1);
|
||||||
|
};
|
||||||
47
node_modules/argparse/lib/action/help.js
generated
vendored
Normal file
47
node_modules/argparse/lib/action/help.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/*:nodoc:*
|
||||||
|
* class ActionHelp
|
||||||
|
*
|
||||||
|
* Support action for printing help
|
||||||
|
* This class inherided from [[Action]]
|
||||||
|
**/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
var Action = require('../action');
|
||||||
|
|
||||||
|
// Constants
|
||||||
|
var c = require('../const');
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* new ActionHelp(options)
|
||||||
|
* - options (object): options hash see [[Action.new]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
var ActionHelp = module.exports = function ActionHelp(options) {
|
||||||
|
options = options || {};
|
||||||
|
if (options.defaultValue !== null) {
|
||||||
|
options.defaultValue = options.defaultValue;
|
||||||
|
} else {
|
||||||
|
options.defaultValue = c.SUPPRESS;
|
||||||
|
}
|
||||||
|
options.dest = (options.dest !== null ? options.dest : c.SUPPRESS);
|
||||||
|
options.nargs = 0;
|
||||||
|
Action.call(this, options);
|
||||||
|
|
||||||
|
};
|
||||||
|
util.inherits(ActionHelp, Action);
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* ActionHelp#call(parser, namespace, values, optionString)
|
||||||
|
* - parser (ArgumentParser): current parser
|
||||||
|
* - namespace (Namespace): namespace for output data
|
||||||
|
* - values (Array): parsed values
|
||||||
|
* - optionString (Array): input option string(not parsed)
|
||||||
|
*
|
||||||
|
* Print help and exit
|
||||||
|
**/
|
||||||
|
ActionHelp.prototype.call = function (parser) {
|
||||||
|
parser.printHelp();
|
||||||
|
parser.exit();
|
||||||
|
};
|
||||||
50
node_modules/argparse/lib/action/store.js
generated
vendored
Normal file
50
node_modules/argparse/lib/action/store.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
/*:nodoc:*
|
||||||
|
* class ActionStore
|
||||||
|
*
|
||||||
|
* This action just stores the argument’s value. This is the default action.
|
||||||
|
*
|
||||||
|
* This class inherited from [[Action]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
var Action = require('../action');
|
||||||
|
|
||||||
|
// Constants
|
||||||
|
var c = require('../const');
|
||||||
|
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* new ActionStore(options)
|
||||||
|
* - options (object): options hash see [[Action.new]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
var ActionStore = module.exports = function ActionStore(options) {
|
||||||
|
options = options || {};
|
||||||
|
if (this.nargs <= 0) {
|
||||||
|
throw new Error('nargs for store actions must be > 0; if you ' +
|
||||||
|
'have nothing to store, actions such as store ' +
|
||||||
|
'true or store const may be more appropriate');
|
||||||
|
|
||||||
|
}
|
||||||
|
if (typeof this.constant !== 'undefined' && this.nargs !== c.OPTIONAL) {
|
||||||
|
throw new Error('nargs must be OPTIONAL to supply const');
|
||||||
|
}
|
||||||
|
Action.call(this, options);
|
||||||
|
};
|
||||||
|
util.inherits(ActionStore, Action);
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* ActionStore#call(parser, namespace, values, optionString) -> Void
|
||||||
|
* - parser (ArgumentParser): current parser
|
||||||
|
* - namespace (Namespace): namespace for output data
|
||||||
|
* - values (Array): parsed values
|
||||||
|
* - optionString (Array): input option string(not parsed)
|
||||||
|
*
|
||||||
|
* Call the action. Save result in namespace object
|
||||||
|
**/
|
||||||
|
ActionStore.prototype.call = function (parser, namespace, values) {
|
||||||
|
namespace.set(this.dest, values);
|
||||||
|
};
|
||||||
43
node_modules/argparse/lib/action/store/constant.js
generated
vendored
Normal file
43
node_modules/argparse/lib/action/store/constant.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
/*:nodoc:*
|
||||||
|
* class ActionStoreConstant
|
||||||
|
*
|
||||||
|
* This action stores the value specified by the const keyword argument.
|
||||||
|
* (Note that the const keyword argument defaults to the rather unhelpful null.)
|
||||||
|
* The 'store_const' action is most commonly used with optional
|
||||||
|
* arguments that specify some sort of flag.
|
||||||
|
*
|
||||||
|
* This class inherited from [[Action]]
|
||||||
|
**/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
var Action = require('../../action');
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* new ActionStoreConstant(options)
|
||||||
|
* - options (object): options hash see [[Action.new]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
var ActionStoreConstant = module.exports = function ActionStoreConstant(options) {
|
||||||
|
options = options || {};
|
||||||
|
options.nargs = 0;
|
||||||
|
if (typeof options.constant === 'undefined') {
|
||||||
|
throw new Error('constant option is required for storeAction');
|
||||||
|
}
|
||||||
|
Action.call(this, options);
|
||||||
|
};
|
||||||
|
util.inherits(ActionStoreConstant, Action);
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* ActionStoreConstant#call(parser, namespace, values, optionString) -> Void
|
||||||
|
* - parser (ArgumentParser): current parser
|
||||||
|
* - namespace (Namespace): namespace for output data
|
||||||
|
* - values (Array): parsed values
|
||||||
|
* - optionString (Array): input option string(not parsed)
|
||||||
|
*
|
||||||
|
* Call the action. Save result in namespace object
|
||||||
|
**/
|
||||||
|
ActionStoreConstant.prototype.call = function (parser, namespace) {
|
||||||
|
namespace.set(this.dest, this.constant);
|
||||||
|
};
|
||||||
27
node_modules/argparse/lib/action/store/false.js
generated
vendored
Normal file
27
node_modules/argparse/lib/action/store/false.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
/*:nodoc:*
|
||||||
|
* class ActionStoreFalse
|
||||||
|
*
|
||||||
|
* This action store the values False respectively.
|
||||||
|
* This is special cases of 'storeConst'
|
||||||
|
*
|
||||||
|
* This class inherited from [[Action]]
|
||||||
|
**/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
var ActionStoreConstant = require('./constant');
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* new ActionStoreFalse(options)
|
||||||
|
* - options (object): hash of options see [[Action.new]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
var ActionStoreFalse = module.exports = function ActionStoreFalse(options) {
|
||||||
|
options = options || {};
|
||||||
|
options.constant = false;
|
||||||
|
options.defaultValue = options.defaultValue !== null ? options.defaultValue : true;
|
||||||
|
ActionStoreConstant.call(this, options);
|
||||||
|
};
|
||||||
|
util.inherits(ActionStoreFalse, ActionStoreConstant);
|
||||||
26
node_modules/argparse/lib/action/store/true.js
generated
vendored
Normal file
26
node_modules/argparse/lib/action/store/true.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/*:nodoc:*
|
||||||
|
* class ActionStoreTrue
|
||||||
|
*
|
||||||
|
* This action store the values True respectively.
|
||||||
|
* This isspecial cases of 'storeConst'
|
||||||
|
*
|
||||||
|
* This class inherited from [[Action]]
|
||||||
|
**/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
var ActionStoreConstant = require('./constant');
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* new ActionStoreTrue(options)
|
||||||
|
* - options (object): options hash see [[Action.new]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
var ActionStoreTrue = module.exports = function ActionStoreTrue(options) {
|
||||||
|
options = options || {};
|
||||||
|
options.constant = true;
|
||||||
|
options.defaultValue = options.defaultValue !== null ? options.defaultValue : false;
|
||||||
|
ActionStoreConstant.call(this, options);
|
||||||
|
};
|
||||||
|
util.inherits(ActionStoreTrue, ActionStoreConstant);
|
||||||
149
node_modules/argparse/lib/action/subparsers.js
generated
vendored
Normal file
149
node_modules/argparse/lib/action/subparsers.js
generated
vendored
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
/** internal
|
||||||
|
* class ActionSubparsers
|
||||||
|
*
|
||||||
|
* Support the creation of such sub-commands with the addSubparsers()
|
||||||
|
*
|
||||||
|
* This class inherited from [[Action]]
|
||||||
|
**/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
var format = require('util').format;
|
||||||
|
|
||||||
|
|
||||||
|
var Action = require('../action');
|
||||||
|
|
||||||
|
// Constants
|
||||||
|
var c = require('../const');
|
||||||
|
|
||||||
|
// Errors
|
||||||
|
var argumentErrorHelper = require('../argument/error');
|
||||||
|
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* new ChoicesPseudoAction(name, help)
|
||||||
|
*
|
||||||
|
* Create pseudo action for correct help text
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
function ChoicesPseudoAction(name, help) {
|
||||||
|
var options = {
|
||||||
|
optionStrings: [],
|
||||||
|
dest: name,
|
||||||
|
help: help
|
||||||
|
};
|
||||||
|
|
||||||
|
Action.call(this, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
util.inherits(ChoicesPseudoAction, Action);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* new ActionSubparsers(options)
|
||||||
|
* - options (object): options hash see [[Action.new]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
function ActionSubparsers(options) {
|
||||||
|
options = options || {};
|
||||||
|
options.dest = options.dest || c.SUPPRESS;
|
||||||
|
options.nargs = c.PARSER;
|
||||||
|
|
||||||
|
this.debug = (options.debug === true);
|
||||||
|
|
||||||
|
this._progPrefix = options.prog;
|
||||||
|
this._parserClass = options.parserClass;
|
||||||
|
this._nameParserMap = {};
|
||||||
|
this._choicesActions = [];
|
||||||
|
|
||||||
|
options.choices = this._nameParserMap;
|
||||||
|
Action.call(this, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
util.inherits(ActionSubparsers, Action);
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* ActionSubparsers#addParser(name, options) -> ArgumentParser
|
||||||
|
* - name (string): sub-command name
|
||||||
|
* - options (object): see [[ArgumentParser.new]]
|
||||||
|
*
|
||||||
|
* Note:
|
||||||
|
* addParser supports an additional aliases option,
|
||||||
|
* which allows multiple strings to refer to the same subparser.
|
||||||
|
* This example, like svn, aliases co as a shorthand for checkout
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
ActionSubparsers.prototype.addParser = function (name, options) {
|
||||||
|
var parser;
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
options = options || {};
|
||||||
|
|
||||||
|
options.debug = (this.debug === true);
|
||||||
|
|
||||||
|
// set program from the existing prefix
|
||||||
|
if (!options.prog) {
|
||||||
|
options.prog = this._progPrefix + ' ' + name;
|
||||||
|
}
|
||||||
|
|
||||||
|
var aliases = options.aliases || [];
|
||||||
|
|
||||||
|
// create a pseudo-action to hold the choice help
|
||||||
|
if (!!options.help || typeof options.help === 'string') {
|
||||||
|
var help = options.help;
|
||||||
|
delete options.help;
|
||||||
|
|
||||||
|
var choiceAction = new ChoicesPseudoAction(name, help);
|
||||||
|
this._choicesActions.push(choiceAction);
|
||||||
|
}
|
||||||
|
|
||||||
|
// create the parser and add it to the map
|
||||||
|
parser = new this._parserClass(options);
|
||||||
|
this._nameParserMap[name] = parser;
|
||||||
|
|
||||||
|
// make parser available under aliases also
|
||||||
|
aliases.forEach(function (alias) {
|
||||||
|
self._nameParserMap[alias] = parser;
|
||||||
|
});
|
||||||
|
|
||||||
|
return parser;
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionSubparsers.prototype._getSubactions = function () {
|
||||||
|
return this._choicesActions;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* ActionSubparsers#call(parser, namespace, values, optionString) -> Void
|
||||||
|
* - parser (ArgumentParser): current parser
|
||||||
|
* - namespace (Namespace): namespace for output data
|
||||||
|
* - values (Array): parsed values
|
||||||
|
* - optionString (Array): input option string(not parsed)
|
||||||
|
*
|
||||||
|
* Call the action. Parse input aguments
|
||||||
|
**/
|
||||||
|
ActionSubparsers.prototype.call = function (parser, namespace, values) {
|
||||||
|
var parserName = values[0];
|
||||||
|
var argStrings = values.slice(1);
|
||||||
|
|
||||||
|
// set the parser name if requested
|
||||||
|
if (this.dest !== c.SUPPRESS) {
|
||||||
|
namespace[this.dest] = parserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
// select the parser
|
||||||
|
if (this._nameParserMap[parserName]) {
|
||||||
|
parser = this._nameParserMap[parserName];
|
||||||
|
} else {
|
||||||
|
throw argumentErrorHelper(format(
|
||||||
|
'Unknown parser "%s" (choices: [%s]).',
|
||||||
|
parserName,
|
||||||
|
Object.keys(this._nameParserMap).join(', ')
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// parse all the remaining options into the namespace
|
||||||
|
parser.parseArgs(argStrings, namespace);
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = ActionSubparsers;
|
||||||
47
node_modules/argparse/lib/action/version.js
generated
vendored
Normal file
47
node_modules/argparse/lib/action/version.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/*:nodoc:*
|
||||||
|
* class ActionVersion
|
||||||
|
*
|
||||||
|
* Support action for printing program version
|
||||||
|
* This class inherited from [[Action]]
|
||||||
|
**/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
var Action = require('../action');
|
||||||
|
|
||||||
|
//
|
||||||
|
// Constants
|
||||||
|
//
|
||||||
|
var c = require('../const');
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* new ActionVersion(options)
|
||||||
|
* - options (object): options hash see [[Action.new]]
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
var ActionVersion = module.exports = function ActionVersion(options) {
|
||||||
|
options = options || {};
|
||||||
|
options.defaultValue = (options.defaultValue ? options.defaultValue : c.SUPPRESS);
|
||||||
|
options.dest = (options.dest || c.SUPPRESS);
|
||||||
|
options.nargs = 0;
|
||||||
|
this.version = options.version;
|
||||||
|
Action.call(this, options);
|
||||||
|
};
|
||||||
|
util.inherits(ActionVersion, Action);
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* ActionVersion#call(parser, namespace, values, optionString) -> Void
|
||||||
|
* - parser (ArgumentParser): current parser
|
||||||
|
* - namespace (Namespace): namespace for output data
|
||||||
|
* - values (Array): parsed values
|
||||||
|
* - optionString (Array): input option string(not parsed)
|
||||||
|
*
|
||||||
|
* Print version and exit
|
||||||
|
**/
|
||||||
|
ActionVersion.prototype.call = function (parser) {
|
||||||
|
var version = this.version || parser.version;
|
||||||
|
var formatter = parser._getFormatter();
|
||||||
|
formatter.addText(version);
|
||||||
|
parser.exit(0, formatter.formatHelp());
|
||||||
|
};
|
||||||
482
node_modules/argparse/lib/action_container.js
generated
vendored
Normal file
482
node_modules/argparse/lib/action_container.js
generated
vendored
Normal file
@@ -0,0 +1,482 @@
|
|||||||
|
/** internal
|
||||||
|
* class ActionContainer
|
||||||
|
*
|
||||||
|
* Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]]
|
||||||
|
**/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var format = require('util').format;
|
||||||
|
|
||||||
|
// Constants
|
||||||
|
var c = require('./const');
|
||||||
|
|
||||||
|
var $$ = require('./utils');
|
||||||
|
|
||||||
|
//Actions
|
||||||
|
var ActionHelp = require('./action/help');
|
||||||
|
var ActionAppend = require('./action/append');
|
||||||
|
var ActionAppendConstant = require('./action/append/constant');
|
||||||
|
var ActionCount = require('./action/count');
|
||||||
|
var ActionStore = require('./action/store');
|
||||||
|
var ActionStoreConstant = require('./action/store/constant');
|
||||||
|
var ActionStoreTrue = require('./action/store/true');
|
||||||
|
var ActionStoreFalse = require('./action/store/false');
|
||||||
|
var ActionVersion = require('./action/version');
|
||||||
|
var ActionSubparsers = require('./action/subparsers');
|
||||||
|
|
||||||
|
// Errors
|
||||||
|
var argumentErrorHelper = require('./argument/error');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* new ActionContainer(options)
|
||||||
|
*
|
||||||
|
* Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]]
|
||||||
|
*
|
||||||
|
* ##### Options:
|
||||||
|
*
|
||||||
|
* - `description` -- A description of what the program does
|
||||||
|
* - `prefixChars` -- Characters that prefix optional arguments
|
||||||
|
* - `argumentDefault` -- The default value for all arguments
|
||||||
|
* - `conflictHandler` -- The conflict handler to use for duplicate arguments
|
||||||
|
**/
|
||||||
|
var ActionContainer = module.exports = function ActionContainer(options) {
|
||||||
|
options = options || {};
|
||||||
|
|
||||||
|
this.description = options.description;
|
||||||
|
this.argumentDefault = options.argumentDefault;
|
||||||
|
this.prefixChars = options.prefixChars || '';
|
||||||
|
this.conflictHandler = options.conflictHandler;
|
||||||
|
|
||||||
|
// set up registries
|
||||||
|
this._registries = {};
|
||||||
|
|
||||||
|
// register actions
|
||||||
|
this.register('action', null, ActionStore);
|
||||||
|
this.register('action', 'store', ActionStore);
|
||||||
|
this.register('action', 'storeConst', ActionStoreConstant);
|
||||||
|
this.register('action', 'storeTrue', ActionStoreTrue);
|
||||||
|
this.register('action', 'storeFalse', ActionStoreFalse);
|
||||||
|
this.register('action', 'append', ActionAppend);
|
||||||
|
this.register('action', 'appendConst', ActionAppendConstant);
|
||||||
|
this.register('action', 'count', ActionCount);
|
||||||
|
this.register('action', 'help', ActionHelp);
|
||||||
|
this.register('action', 'version', ActionVersion);
|
||||||
|
this.register('action', 'parsers', ActionSubparsers);
|
||||||
|
|
||||||
|
// raise an exception if the conflict handler is invalid
|
||||||
|
this._getHandler();
|
||||||
|
|
||||||
|
// action storage
|
||||||
|
this._actions = [];
|
||||||
|
this._optionStringActions = {};
|
||||||
|
|
||||||
|
// groups
|
||||||
|
this._actionGroups = [];
|
||||||
|
this._mutuallyExclusiveGroups = [];
|
||||||
|
|
||||||
|
// defaults storage
|
||||||
|
this._defaults = {};
|
||||||
|
|
||||||
|
// determines whether an "option" looks like a negative number
|
||||||
|
// -1, -1.5 -5e+4
|
||||||
|
this._regexpNegativeNumber = new RegExp('^[-]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$');
|
||||||
|
|
||||||
|
// whether or not there are any optionals that look like negative
|
||||||
|
// numbers -- uses a list so it can be shared and edited
|
||||||
|
this._hasNegativeNumberOptionals = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
// Groups must be required, then ActionContainer already defined
|
||||||
|
var ArgumentGroup = require('./argument/group');
|
||||||
|
var MutuallyExclusiveGroup = require('./argument/exclusive');
|
||||||
|
|
||||||
|
//
|
||||||
|
// Registration methods
|
||||||
|
//
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ActionContainer#register(registryName, value, object) -> Void
|
||||||
|
* - registryName (String) : object type action|type
|
||||||
|
* - value (string) : keyword
|
||||||
|
* - object (Object|Function) : handler
|
||||||
|
*
|
||||||
|
* Register handlers
|
||||||
|
**/
|
||||||
|
ActionContainer.prototype.register = function (registryName, value, object) {
|
||||||
|
this._registries[registryName] = this._registries[registryName] || {};
|
||||||
|
this._registries[registryName][value] = object;
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionContainer.prototype._registryGet = function (registryName, value, defaultValue) {
|
||||||
|
if (arguments.length < 3) {
|
||||||
|
defaultValue = null;
|
||||||
|
}
|
||||||
|
return this._registries[registryName][value] || defaultValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// Namespace default accessor methods
|
||||||
|
//
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ActionContainer#setDefaults(options) -> Void
|
||||||
|
* - options (object):hash of options see [[Action.new]]
|
||||||
|
*
|
||||||
|
* Set defaults
|
||||||
|
**/
|
||||||
|
ActionContainer.prototype.setDefaults = function (options) {
|
||||||
|
options = options || {};
|
||||||
|
for (var property in options) {
|
||||||
|
if ($$.has(options, property)) {
|
||||||
|
this._defaults[property] = options[property];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if these defaults match any existing arguments, replace the previous
|
||||||
|
// default on the object with the new one
|
||||||
|
this._actions.forEach(function (action) {
|
||||||
|
if ($$.has(options, action.dest)) {
|
||||||
|
action.defaultValue = options[action.dest];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ActionContainer#getDefault(dest) -> Mixed
|
||||||
|
* - dest (string): action destination
|
||||||
|
*
|
||||||
|
* Return action default value
|
||||||
|
**/
|
||||||
|
ActionContainer.prototype.getDefault = function (dest) {
|
||||||
|
var result = $$.has(this._defaults, dest) ? this._defaults[dest] : null;
|
||||||
|
|
||||||
|
this._actions.forEach(function (action) {
|
||||||
|
if (action.dest === dest && $$.has(action, 'defaultValue')) {
|
||||||
|
result = action.defaultValue;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
//
|
||||||
|
// Adding argument actions
|
||||||
|
//
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ActionContainer#addArgument(args, options) -> Object
|
||||||
|
* - args (String|Array): argument key, or array of argument keys
|
||||||
|
* - options (Object): action objects see [[Action.new]]
|
||||||
|
*
|
||||||
|
* #### Examples
|
||||||
|
* - addArgument([ '-f', '--foo' ], { action: 'store', defaultValue: 1, ... })
|
||||||
|
* - addArgument([ 'bar' ], { action: 'store', nargs: 1, ... })
|
||||||
|
* - addArgument('--baz', { action: 'store', nargs: 1, ... })
|
||||||
|
**/
|
||||||
|
ActionContainer.prototype.addArgument = function (args, options) {
|
||||||
|
args = args;
|
||||||
|
options = options || {};
|
||||||
|
|
||||||
|
if (typeof args === 'string') {
|
||||||
|
args = [ args ];
|
||||||
|
}
|
||||||
|
if (!Array.isArray(args)) {
|
||||||
|
throw new TypeError('addArgument first argument should be a string or an array');
|
||||||
|
}
|
||||||
|
if (typeof options !== 'object' || Array.isArray(options)) {
|
||||||
|
throw new TypeError('addArgument second argument should be a hash');
|
||||||
|
}
|
||||||
|
|
||||||
|
// if no positional args are supplied or only one is supplied and
|
||||||
|
// it doesn't look like an option string, parse a positional argument
|
||||||
|
if (!args || args.length === 1 && this.prefixChars.indexOf(args[0][0]) < 0) {
|
||||||
|
if (args && !!options.dest) {
|
||||||
|
throw new Error('dest supplied twice for positional argument');
|
||||||
|
}
|
||||||
|
options = this._getPositional(args, options);
|
||||||
|
|
||||||
|
// otherwise, we're adding an optional argument
|
||||||
|
} else {
|
||||||
|
options = this._getOptional(args, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
// if no default was supplied, use the parser-level default
|
||||||
|
if (typeof options.defaultValue === 'undefined') {
|
||||||
|
var dest = options.dest;
|
||||||
|
if ($$.has(this._defaults, dest)) {
|
||||||
|
options.defaultValue = this._defaults[dest];
|
||||||
|
} else if (typeof this.argumentDefault !== 'undefined') {
|
||||||
|
options.defaultValue = this.argumentDefault;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// create the action object, and add it to the parser
|
||||||
|
var ActionClass = this._popActionClass(options);
|
||||||
|
if (typeof ActionClass !== 'function') {
|
||||||
|
throw new Error(format('Unknown action "%s".', ActionClass));
|
||||||
|
}
|
||||||
|
var action = new ActionClass(options);
|
||||||
|
|
||||||
|
// throw an error if the action type is not callable
|
||||||
|
var typeFunction = this._registryGet('type', action.type, action.type);
|
||||||
|
if (typeof typeFunction !== 'function') {
|
||||||
|
throw new Error(format('"%s" is not callable', typeFunction));
|
||||||
|
}
|
||||||
|
|
||||||
|
return this._addAction(action);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ActionContainer#addArgumentGroup(options) -> ArgumentGroup
|
||||||
|
* - options (Object): hash of options see [[ArgumentGroup.new]]
|
||||||
|
*
|
||||||
|
* Create new arguments groups
|
||||||
|
**/
|
||||||
|
ActionContainer.prototype.addArgumentGroup = function (options) {
|
||||||
|
var group = new ArgumentGroup(this, options);
|
||||||
|
this._actionGroups.push(group);
|
||||||
|
return group;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ActionContainer#addMutuallyExclusiveGroup(options) -> ArgumentGroup
|
||||||
|
* - options (Object): {required: false}
|
||||||
|
*
|
||||||
|
* Create new mutual exclusive groups
|
||||||
|
**/
|
||||||
|
ActionContainer.prototype.addMutuallyExclusiveGroup = function (options) {
|
||||||
|
var group = new MutuallyExclusiveGroup(this, options);
|
||||||
|
this._mutuallyExclusiveGroups.push(group);
|
||||||
|
return group;
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionContainer.prototype._addAction = function (action) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
// resolve any conflicts
|
||||||
|
this._checkConflict(action);
|
||||||
|
|
||||||
|
// add to actions list
|
||||||
|
this._actions.push(action);
|
||||||
|
action.container = this;
|
||||||
|
|
||||||
|
// index the action by any option strings it has
|
||||||
|
action.optionStrings.forEach(function (optionString) {
|
||||||
|
self._optionStringActions[optionString] = action;
|
||||||
|
});
|
||||||
|
|
||||||
|
// set the flag if any option strings look like negative numbers
|
||||||
|
action.optionStrings.forEach(function (optionString) {
|
||||||
|
if (optionString.match(self._regexpNegativeNumber)) {
|
||||||
|
if (!self._hasNegativeNumberOptionals.some(Boolean)) {
|
||||||
|
self._hasNegativeNumberOptionals.push(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// return the created action
|
||||||
|
return action;
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionContainer.prototype._removeAction = function (action) {
|
||||||
|
var actionIndex = this._actions.indexOf(action);
|
||||||
|
if (actionIndex >= 0) {
|
||||||
|
this._actions.splice(actionIndex, 1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionContainer.prototype._addContainerActions = function (container) {
|
||||||
|
// collect groups by titles
|
||||||
|
var titleGroupMap = {};
|
||||||
|
this._actionGroups.forEach(function (group) {
|
||||||
|
if (titleGroupMap[group.title]) {
|
||||||
|
throw new Error(format('Cannot merge actions - two groups are named "%s".', group.title));
|
||||||
|
}
|
||||||
|
titleGroupMap[group.title] = group;
|
||||||
|
});
|
||||||
|
|
||||||
|
// map each action to its group
|
||||||
|
var groupMap = {};
|
||||||
|
function actionHash(action) {
|
||||||
|
// unique (hopefully?) string suitable as dictionary key
|
||||||
|
return action.getName();
|
||||||
|
}
|
||||||
|
container._actionGroups.forEach(function (group) {
|
||||||
|
// if a group with the title exists, use that, otherwise
|
||||||
|
// create a new group matching the container's group
|
||||||
|
if (!titleGroupMap[group.title]) {
|
||||||
|
titleGroupMap[group.title] = this.addArgumentGroup({
|
||||||
|
title: group.title,
|
||||||
|
description: group.description
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// map the actions to their new group
|
||||||
|
group._groupActions.forEach(function (action) {
|
||||||
|
groupMap[actionHash(action)] = titleGroupMap[group.title];
|
||||||
|
});
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
// add container's mutually exclusive groups
|
||||||
|
// NOTE: if add_mutually_exclusive_group ever gains title= and
|
||||||
|
// description= then this code will need to be expanded as above
|
||||||
|
var mutexGroup;
|
||||||
|
container._mutuallyExclusiveGroups.forEach(function (group) {
|
||||||
|
mutexGroup = this.addMutuallyExclusiveGroup({
|
||||||
|
required: group.required
|
||||||
|
});
|
||||||
|
// map the actions to their new mutex group
|
||||||
|
group._groupActions.forEach(function (action) {
|
||||||
|
groupMap[actionHash(action)] = mutexGroup;
|
||||||
|
});
|
||||||
|
}, this); // forEach takes a 'this' argument
|
||||||
|
|
||||||
|
// add all actions to this container or their group
|
||||||
|
container._actions.forEach(function (action) {
|
||||||
|
var key = actionHash(action);
|
||||||
|
if (groupMap[key]) {
|
||||||
|
groupMap[key]._addAction(action);
|
||||||
|
} else {
|
||||||
|
this._addAction(action);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionContainer.prototype._getPositional = function (dest, options) {
|
||||||
|
if (Array.isArray(dest)) {
|
||||||
|
dest = dest[0];
|
||||||
|
}
|
||||||
|
// make sure required is not specified
|
||||||
|
if (options.required) {
|
||||||
|
throw new Error('"required" is an invalid argument for positionals.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// mark positional arguments as required if at least one is
|
||||||
|
// always required
|
||||||
|
if (options.nargs !== c.OPTIONAL && options.nargs !== c.ZERO_OR_MORE) {
|
||||||
|
options.required = true;
|
||||||
|
}
|
||||||
|
if (options.nargs === c.ZERO_OR_MORE && typeof options.defaultValue === 'undefined') {
|
||||||
|
options.required = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// return the keyword arguments with no option strings
|
||||||
|
options.dest = dest;
|
||||||
|
options.optionStrings = [];
|
||||||
|
return options;
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionContainer.prototype._getOptional = function (args, options) {
|
||||||
|
var prefixChars = this.prefixChars;
|
||||||
|
var optionStrings = [];
|
||||||
|
var optionStringsLong = [];
|
||||||
|
|
||||||
|
// determine short and long option strings
|
||||||
|
args.forEach(function (optionString) {
|
||||||
|
// error on strings that don't start with an appropriate prefix
|
||||||
|
if (prefixChars.indexOf(optionString[0]) < 0) {
|
||||||
|
throw new Error(format('Invalid option string "%s": must start with a "%s".',
|
||||||
|
optionString,
|
||||||
|
prefixChars
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// strings starting with two prefix characters are long options
|
||||||
|
optionStrings.push(optionString);
|
||||||
|
if (optionString.length > 1 && prefixChars.indexOf(optionString[1]) >= 0) {
|
||||||
|
optionStringsLong.push(optionString);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// infer dest, '--foo-bar' -> 'foo_bar' and '-x' -> 'x'
|
||||||
|
var dest = options.dest || null;
|
||||||
|
delete options.dest;
|
||||||
|
|
||||||
|
if (!dest) {
|
||||||
|
var optionStringDest = optionStringsLong.length ? optionStringsLong[0] : optionStrings[0];
|
||||||
|
dest = $$.trimChars(optionStringDest, this.prefixChars);
|
||||||
|
|
||||||
|
if (dest.length === 0) {
|
||||||
|
throw new Error(
|
||||||
|
format('dest= is required for options like "%s"', optionStrings.join(', '))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
dest = dest.replace(/-/g, '_');
|
||||||
|
}
|
||||||
|
|
||||||
|
// return the updated keyword arguments
|
||||||
|
options.dest = dest;
|
||||||
|
options.optionStrings = optionStrings;
|
||||||
|
|
||||||
|
return options;
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionContainer.prototype._popActionClass = function (options, defaultValue) {
|
||||||
|
defaultValue = defaultValue || null;
|
||||||
|
|
||||||
|
var action = (options.action || defaultValue);
|
||||||
|
delete options.action;
|
||||||
|
|
||||||
|
var actionClass = this._registryGet('action', action, action);
|
||||||
|
return actionClass;
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionContainer.prototype._getHandler = function () {
|
||||||
|
var handlerString = this.conflictHandler;
|
||||||
|
var handlerFuncName = '_handleConflict' + $$.capitalize(handlerString);
|
||||||
|
var func = this[handlerFuncName];
|
||||||
|
if (typeof func === 'undefined') {
|
||||||
|
var msg = 'invalid conflict resolution value: ' + handlerString;
|
||||||
|
throw new Error(msg);
|
||||||
|
} else {
|
||||||
|
return func;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionContainer.prototype._checkConflict = function (action) {
|
||||||
|
var optionStringActions = this._optionStringActions;
|
||||||
|
var conflictOptionals = [];
|
||||||
|
|
||||||
|
// find all options that conflict with this option
|
||||||
|
// collect pairs, the string, and an existing action that it conflicts with
|
||||||
|
action.optionStrings.forEach(function (optionString) {
|
||||||
|
var conflOptional = optionStringActions[optionString];
|
||||||
|
if (typeof conflOptional !== 'undefined') {
|
||||||
|
conflictOptionals.push([ optionString, conflOptional ]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (conflictOptionals.length > 0) {
|
||||||
|
var conflictHandler = this._getHandler();
|
||||||
|
conflictHandler.call(this, action, conflictOptionals);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionContainer.prototype._handleConflictError = function (action, conflOptionals) {
|
||||||
|
var conflicts = conflOptionals.map(function (pair) { return pair[0]; });
|
||||||
|
conflicts = conflicts.join(', ');
|
||||||
|
throw argumentErrorHelper(
|
||||||
|
action,
|
||||||
|
format('Conflicting option string(s): %s', conflicts)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
ActionContainer.prototype._handleConflictResolve = function (action, conflOptionals) {
|
||||||
|
// remove all conflicting options
|
||||||
|
var self = this;
|
||||||
|
conflOptionals.forEach(function (pair) {
|
||||||
|
var optionString = pair[0];
|
||||||
|
var conflictingAction = pair[1];
|
||||||
|
// remove the conflicting option string
|
||||||
|
var i = conflictingAction.optionStrings.indexOf(optionString);
|
||||||
|
if (i >= 0) {
|
||||||
|
conflictingAction.optionStrings.splice(i, 1);
|
||||||
|
}
|
||||||
|
delete self._optionStringActions[optionString];
|
||||||
|
// if the option now has no option string, remove it from the
|
||||||
|
// container holding it
|
||||||
|
if (conflictingAction.optionStrings.length === 0) {
|
||||||
|
conflictingAction.container._removeAction(conflictingAction);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
14
node_modules/argparse/lib/argparse.js
generated
vendored
Normal file
14
node_modules/argparse/lib/argparse.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports.ArgumentParser = require('./argument_parser.js');
|
||||||
|
module.exports.Namespace = require('./namespace');
|
||||||
|
module.exports.Action = require('./action');
|
||||||
|
module.exports.HelpFormatter = require('./help/formatter.js');
|
||||||
|
module.exports.Const = require('./const.js');
|
||||||
|
|
||||||
|
module.exports.ArgumentDefaultsHelpFormatter =
|
||||||
|
require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter;
|
||||||
|
module.exports.RawDescriptionHelpFormatter =
|
||||||
|
require('./help/added_formatters.js').RawDescriptionHelpFormatter;
|
||||||
|
module.exports.RawTextHelpFormatter =
|
||||||
|
require('./help/added_formatters.js').RawTextHelpFormatter;
|
||||||
50
node_modules/argparse/lib/argument/error.js
generated
vendored
Normal file
50
node_modules/argparse/lib/argument/error.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
|
||||||
|
var format = require('util').format;
|
||||||
|
|
||||||
|
|
||||||
|
var ERR_CODE = 'ARGError';
|
||||||
|
|
||||||
|
/*:nodoc:*
|
||||||
|
* argumentError(argument, message) -> TypeError
|
||||||
|
* - argument (Object): action with broken argument
|
||||||
|
* - message (String): error message
|
||||||
|
*
|
||||||
|
* Error format helper. An error from creating or using an argument
|
||||||
|
* (optional or positional). The string value of this exception
|
||||||
|
* is the message, augmented with information
|
||||||
|
* about the argument that caused it.
|
||||||
|
*
|
||||||
|
* #####Example
|
||||||
|
*
|
||||||
|
* var argumentErrorHelper = require('./argument/error');
|
||||||
|
* if (conflictOptionals.length > 0) {
|
||||||
|
* throw argumentErrorHelper(
|
||||||
|
* action,
|
||||||
|
* format('Conflicting option string(s): %s', conflictOptionals.join(', '))
|
||||||
|
* );
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
module.exports = function (argument, message) {
|
||||||
|
var argumentName = null;
|
||||||
|
var errMessage;
|
||||||
|
var err;
|
||||||
|
|
||||||
|
if (argument.getName) {
|
||||||
|
argumentName = argument.getName();
|
||||||
|
} else {
|
||||||
|
argumentName = '' + argument;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!argumentName) {
|
||||||
|
errMessage = message;
|
||||||
|
} else {
|
||||||
|
errMessage = format('argument "%s": %s', argumentName, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
err = new TypeError(errMessage);
|
||||||
|
err.code = ERR_CODE;
|
||||||
|
return err;
|
||||||
|
};
|
||||||
54
node_modules/argparse/lib/argument/exclusive.js
generated
vendored
Normal file
54
node_modules/argparse/lib/argument/exclusive.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/** internal
|
||||||
|
* class MutuallyExclusiveGroup
|
||||||
|
*
|
||||||
|
* Group arguments.
|
||||||
|
* By default, ArgumentParser groups command-line arguments
|
||||||
|
* into “positional arguments” and “optional arguments”
|
||||||
|
* when displaying help messages. When there is a better
|
||||||
|
* conceptual grouping of arguments than this default one,
|
||||||
|
* appropriate groups can be created using the addArgumentGroup() method
|
||||||
|
*
|
||||||
|
* This class inherited from [[ArgumentContainer]]
|
||||||
|
**/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
var ArgumentGroup = require('./group');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* new MutuallyExclusiveGroup(container, options)
|
||||||
|
* - container (object): main container
|
||||||
|
* - options (object): options.required -> true/false
|
||||||
|
*
|
||||||
|
* `required` could be an argument itself, but making it a property of
|
||||||
|
* the options argument is more consistent with the JS adaptation of the Python)
|
||||||
|
**/
|
||||||
|
var MutuallyExclusiveGroup = module.exports = function MutuallyExclusiveGroup(container, options) {
|
||||||
|
var required;
|
||||||
|
options = options || {};
|
||||||
|
required = options.required || false;
|
||||||
|
ArgumentGroup.call(this, container);
|
||||||
|
this.required = required;
|
||||||
|
|
||||||
|
};
|
||||||
|
util.inherits(MutuallyExclusiveGroup, ArgumentGroup);
|
||||||
|
|
||||||
|
|
||||||
|
MutuallyExclusiveGroup.prototype._addAction = function (action) {
|
||||||
|
var msg;
|
||||||
|
if (action.required) {
|
||||||
|
msg = 'mutually exclusive arguments must be optional';
|
||||||
|
throw new Error(msg);
|
||||||
|
}
|
||||||
|
action = this._container._addAction(action);
|
||||||
|
this._groupActions.push(action);
|
||||||
|
return action;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
MutuallyExclusiveGroup.prototype._removeAction = function (action) {
|
||||||
|
this._container._removeAction(action);
|
||||||
|
this._groupActions.remove(action);
|
||||||
|
};
|
||||||
|
|
||||||
75
node_modules/argparse/lib/argument/group.js
generated
vendored
Normal file
75
node_modules/argparse/lib/argument/group.js
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
/** internal
|
||||||
|
* class ArgumentGroup
|
||||||
|
*
|
||||||
|
* Group arguments.
|
||||||
|
* By default, ArgumentParser groups command-line arguments
|
||||||
|
* into “positional arguments” and “optional arguments”
|
||||||
|
* when displaying help messages. When there is a better
|
||||||
|
* conceptual grouping of arguments than this default one,
|
||||||
|
* appropriate groups can be created using the addArgumentGroup() method
|
||||||
|
*
|
||||||
|
* This class inherited from [[ArgumentContainer]]
|
||||||
|
**/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var util = require('util');
|
||||||
|
|
||||||
|
var ActionContainer = require('../action_container');
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* new ArgumentGroup(container, options)
|
||||||
|
* - container (object): main container
|
||||||
|
* - options (object): hash of group options
|
||||||
|
*
|
||||||
|
* #### options
|
||||||
|
* - **prefixChars** group name prefix
|
||||||
|
* - **argumentDefault** default argument value
|
||||||
|
* - **title** group title
|
||||||
|
* - **description** group description
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
var ArgumentGroup = module.exports = function ArgumentGroup(container, options) {
|
||||||
|
|
||||||
|
options = options || {};
|
||||||
|
|
||||||
|
// add any missing keyword arguments by checking the container
|
||||||
|
options.conflictHandler = (options.conflictHandler || container.conflictHandler);
|
||||||
|
options.prefixChars = (options.prefixChars || container.prefixChars);
|
||||||
|
options.argumentDefault = (options.argumentDefault || container.argumentDefault);
|
||||||
|
|
||||||
|
ActionContainer.call(this, options);
|
||||||
|
|
||||||
|
// group attributes
|
||||||
|
this.title = options.title;
|
||||||
|
this._groupActions = [];
|
||||||
|
|
||||||
|
// share most attributes with the container
|
||||||
|
this._container = container;
|
||||||
|
this._registries = container._registries;
|
||||||
|
this._actions = container._actions;
|
||||||
|
this._optionStringActions = container._optionStringActions;
|
||||||
|
this._defaults = container._defaults;
|
||||||
|
this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals;
|
||||||
|
this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups;
|
||||||
|
};
|
||||||
|
util.inherits(ArgumentGroup, ActionContainer);
|
||||||
|
|
||||||
|
|
||||||
|
ArgumentGroup.prototype._addAction = function (action) {
|
||||||
|
// Parent add action
|
||||||
|
action = ActionContainer.prototype._addAction.call(this, action);
|
||||||
|
this._groupActions.push(action);
|
||||||
|
return action;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ArgumentGroup.prototype._removeAction = function (action) {
|
||||||
|
// Parent remove action
|
||||||
|
ActionContainer.prototype._removeAction.call(this, action);
|
||||||
|
var actionIndex = this._groupActions.indexOf(action);
|
||||||
|
if (actionIndex >= 0) {
|
||||||
|
this._groupActions.splice(actionIndex, 1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
1161
node_modules/argparse/lib/argument_parser.js
generated
vendored
Normal file
1161
node_modules/argparse/lib/argument_parser.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
node_modules/argparse/lib/const.js
generated
vendored
Normal file
21
node_modules/argparse/lib/const.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
//
|
||||||
|
// Constants
|
||||||
|
//
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports.EOL = '\n';
|
||||||
|
|
||||||
|
module.exports.SUPPRESS = '==SUPPRESS==';
|
||||||
|
|
||||||
|
module.exports.OPTIONAL = '?';
|
||||||
|
|
||||||
|
module.exports.ZERO_OR_MORE = '*';
|
||||||
|
|
||||||
|
module.exports.ONE_OR_MORE = '+';
|
||||||
|
|
||||||
|
module.exports.PARSER = 'A...';
|
||||||
|
|
||||||
|
module.exports.REMAINDER = '...';
|
||||||
|
|
||||||
|
module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args';
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user