chore(release): v2.0.0

releases/v3 v2.0.0
Conventional Changelog Action 2020-04-16 08:14:32 +00:00
parent 54ce96d927
commit ae327a3e71
83 changed files with 3685 additions and 430 deletions

View File

@ -1,3 +1,17 @@
# [2.0.0](https://github.com/TriPSs/conventional-changelog-action/compare/v1.3.0...v2.0.0) (2020-04-16)
### Code Refactoring
* Changed int 5 to string 5 as default value ([b7d2808](https://github.com/TriPSs/conventional-changelog-action/commit/b7d28084e6d04b3b171793bfb8b28e47efb23025))
### BREAKING CHANGES
* Changed changelog-release-count to release-count
# [1.3.0](https://github.com/TriPSs/conventional-changelog-action/compare/v1.2.0...v1.3.0) (2020-02-04)

42
node_modules/.yarn-integrity generated vendored
View File

@ -8,15 +8,17 @@
],
"linkedModules": [],
"topLevelPatterns": [
"@actions/core@^1.1.3",
"@actions/exec@^1.0.1",
"conventional-changelog@^3.1.12",
"conventional-recommended-bump@^6.0.2"
"@actions/core@1.2.3",
"@actions/exec@1.0.3",
"conventional-changelog@3.1.18",
"conventional-recommended-bump@6.0.5"
],
"lockfileEntries": {
"@actions/core@^1.1.3": "https://registry.yarnpkg.com/@actions/core/-/core-1.1.3.tgz#543b0e7ca0e53dccc5dca4811a4fac59c1b35f5c",
"@actions/exec@^1.0.1": "https://registry.yarnpkg.com/@actions/exec/-/exec-1.0.1.tgz#1624b541165697e7008d7c87bc1f69f191263c6c",
"@actions/core@1.2.3": "https://registry.yarnpkg.com/@actions/core/-/core-1.2.3.tgz#e844b4fa0820e206075445079130868f95bfca95",
"@actions/exec@1.0.3": "https://registry.yarnpkg.com/@actions/exec/-/exec-1.0.3.tgz#b967f8700d6ff011dcc91243b58bafc1bb9ab95f",
"@actions/io@^1.0.1": "https://registry.yarnpkg.com/@actions/io/-/io-1.0.2.tgz#2f614b6e69ce14d191180451eb38e6576a6e6b27",
"JSONStream@^1.0.4": "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0",
"add-stream@^1.0.0": "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa",
"array-find-index@^1.0.1": "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1",
"array-ify@^1.0.0": "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece",
"arrify@^1.0.1": "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d",
@ -28,22 +30,22 @@
"commander@2.20.0": "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422",
"compare-func@^1.3.1": "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648",
"concat-stream@^2.0.0": "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1",
"conventional-changelog-angular@^5.0.5": "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.5.tgz#69b541bcf3e538a8578b1e5fbaabe9bd8f572b57",
"conventional-changelog-angular@^5.0.6": "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz#269540c624553aded809c29a3508fdc2b544c059",
"conventional-changelog-atom@^2.0.3": "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-2.0.3.tgz#3bd14280aa09fe3ec49a0e8fe97b5002db02aad4",
"conventional-changelog-codemirror@^2.0.3": "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.3.tgz#ebc088154684f8f5171446b8d546ba6b460d46f2",
"conventional-changelog-conventionalcommits@^4.2.1": "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.2.1.tgz#d6cb2e2c5d7bfca044a08b9dba84b4082e1a1bd9",
"conventional-changelog-core@^4.0.2": "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.0.2.tgz#b9b74b4d5e63eb7647ea821bce8969de31a06e80",
"conventional-changelog-conventionalcommits@^4.2.3": "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.2.3.tgz#22855b32d57d0328951c1c2dc01b172a5f24ea37",
"conventional-changelog-core@^4.1.4": "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.1.4.tgz#39be27fca6ef20a0f998d7a3a1e97cfa8a055cb6",
"conventional-changelog-ember@^2.0.4": "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-2.0.4.tgz#c29b78e4af7825cbecb6c3fd6086ca5c09471ac1",
"conventional-changelog-eslint@^3.0.4": "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.4.tgz#8f4736a23e0cd97e890e76fccc287db2f205f2ff",
"conventional-changelog-express@^2.0.1": "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-2.0.1.tgz#fea2231d99a5381b4e6badb0c1c40a41fcacb755",
"conventional-changelog-jquery@^3.0.6": "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.6.tgz#460236ad8fb1d29ff932a14fe4e3a45379b63c5e",
"conventional-changelog-jshint@^2.0.3": "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.3.tgz#ef6e2caf2ee6ffdfda78fcdf7ce87cf6c512d728",
"conventional-changelog-preset-loader@^2.2.0": "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.2.0.tgz#571e2b3d7b53d65587bea9eedf6e37faa5db4fcc",
"conventional-changelog-writer@^4.0.9": "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.9.tgz#44ac4c48121bc90e71cb2947e1ea1a6c222ccd7f",
"conventional-changelog@^3.1.12": "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.12.tgz#ede5b6803cfa8af6c7ea97e54ce5519508903afb",
"conventional-changelog-preset-loader@^2.3.0": "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.0.tgz#580fa8ab02cef22c24294d25e52d7ccd247a9a6a",
"conventional-changelog-writer@^4.0.11": "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.11.tgz#9f56d2122d20c96eb48baae0bf1deffaed1edba4",
"conventional-changelog@3.1.18": "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.18.tgz#7da0a5ab34a604b920b8bf71c6cf5d952f0e805e",
"conventional-commits-filter@^2.0.2": "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.2.tgz#f122f89fbcd5bb81e2af2fcac0254d062d1039c1",
"conventional-commits-parser@^3.0.5": "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.5.tgz#df471d6cb3f6fecfd1356ac72e0b577dbdae0a9c",
"conventional-recommended-bump@^6.0.2": "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.0.2.tgz#086e3380e8d66ca2b962d84af863a28d532f355a",
"conventional-commits-parser@^3.0.8": "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz#23310a9bda6c93c874224375e72b09fb275fe710",
"conventional-recommended-bump@6.0.5": "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.0.5.tgz#be7ec24b43bef57108042ea1d49758b58beabc03",
"core-util-is@~1.0.0": "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7",
"currently-unhandled@^0.4.1": "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea",
"dargs@^4.0.1": "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17",
@ -60,7 +62,7 @@
"get-stdin@^4.0.1": "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe",
"git-raw-commits@2.0.0": "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5",
"git-remote-origin-url@^2.0.0": "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f",
"git-semver-tags@^3.0.0": "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-3.0.0.tgz#fe10147824657662c82efd9341f0fa59f74ddcba",
"git-semver-tags@^3.0.1": "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-3.0.1.tgz#9cb9e4974437de1f71f32da3bfe74f4d35afb1b9",
"gitconfiglocal@^1.0.0": "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b",
"graceful-fs@^4.1.2": "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02",
"handlebars@^4.4.0": "https://registry.yarnpkg.com/handlebars/-/handlebars-4.4.3.tgz#180bae52c1d0e9ec0c15d7e82a4362d662762f6e",
@ -74,7 +76,7 @@
"is-finite@^1.0.0": "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa",
"is-obj@^1.0.0": "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f",
"is-plain-obj@^1.1.0": "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e",
"is-text-path@^2.0.0": "https://registry.yarnpkg.com/is-text-path/-/is-text-path-2.0.0.tgz#b2484e2b720a633feb2e85b67dc193ff72c75636",
"is-text-path@^1.0.1": "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e",
"is-utf8@^0.2.0": "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72",
"isarray@~1.0.0": "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11",
"json-parse-better-errors@^1.0.1": "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9",
@ -87,13 +89,14 @@
"lodash.ismatch@^4.4.0": "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37",
"lodash.template@^4.0.2": "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab",
"lodash.templatesettings@^4.0.0": "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33",
"lodash@^4.2.1": "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548",
"lodash@^4.17.15": "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548",
"loud-rejection@^1.0.0": "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f",
"map-obj@^1.0.0": "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d",
"map-obj@^1.0.1": "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d",
"map-obj@^2.0.0": "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9",
"meow@^3.3.0": "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb",
"meow@^4.0.0": "https://registry.yarnpkg.com/meow/-/meow-4.0.1.tgz#d48598f6f4b1472f35bf6317a95945ace347f975",
"meow@^5.0.0": "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4",
"minimist-options@^3.0.1": "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954",
"minimist@^1.1.3": "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284",
"minimist@~0.0.1": "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf",
@ -156,7 +159,7 @@
"strip-bom@^3.0.0": "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3",
"strip-indent@^1.0.1": "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2",
"strip-indent@^2.0.0": "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68",
"text-extensions@^2.0.0": "https://registry.yarnpkg.com/text-extensions/-/text-extensions-2.0.0.tgz#43eabd1b495482fae4a2bf65e5f56c29f69220f6",
"text-extensions@^1.0.0": "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26",
"through2@^2.0.0": "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd",
"through2@^2.0.2": "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd",
"through2@^3.0.0": "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a",
@ -171,7 +174,8 @@
"util-deprecate@~1.0.1": "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf",
"validate-npm-package-license@^3.0.1": "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a",
"wordwrap@~0.0.2": "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107",
"xtend@~4.0.1": "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
"xtend@~4.0.1": "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54",
"yargs-parser@^10.0.0": "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8"
},
"files": [],
"artifacts": {}

39
node_modules/@actions/core/README.md generated vendored
View File

@ -82,6 +82,12 @@ try {
core.warning('myInput was not set');
}
if (core.isDebug()) {
// curl -v https://github.com
} else {
// curl https://github.com
}
// Do stuff
}
catch (err) {
@ -104,4 +110,37 @@ const result = await core.group('Do something async', async () => {
const response = await doSomeHTTPRequest()
return response
})
```
#### Action state
You can use this library to save state and get state for sharing information between a given wrapper action:
**action.yml**
```yaml
name: 'Wrapper action sample'
inputs:
name:
default: 'GitHub'
runs:
using: 'node12'
main: 'main.js'
post: 'cleanup.js'
```
In action's `main.js`:
```js
const core = require('@actions/core');
core.saveState("pidToKill", 12345);
```
In action's `cleanup.js`:
```js
const core = require('@actions/core');
var pid = core.getState("pidToKill");
process.kill(pid);
```

View File

@ -5,11 +5,11 @@ interface CommandProperties {
* Commands
*
* Command Format:
* ##[name key=value;key=value]message
* ::name key=value,key=value::message
*
* Examples:
* ##[warning]This is the user warning message
* ##[set-secret name=mypassword]definitelyNotAPassword!
* ::warning::This is the message
* ::set-env name=MY_VAR::some value
*/
export declare function issueCommand(command: string, properties: CommandProperties, message: string): void;
export declare function issue(name: string, message?: string): void;

View File

@ -1,15 +1,22 @@
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const os = require("os");
const os = __importStar(require("os"));
/**
* Commands
*
* Command Format:
* ##[name key=value;key=value]message
* ::name key=value,key=value::message
*
* Examples:
* ##[warning]This is the user warning message
* ##[set-secret name=mypassword]definitelyNotAPassword!
* ::warning::This is the message
* ::set-env name=MY_VAR::some value
*/
function issueCommand(command, properties, message) {
const cmd = new Command(command, properties, message);
@ -34,33 +41,38 @@ class Command {
let cmdStr = CMD_STRING + this.command;
if (this.properties && Object.keys(this.properties).length > 0) {
cmdStr += ' ';
let first = true;
for (const key in this.properties) {
if (this.properties.hasOwnProperty(key)) {
const val = this.properties[key];
if (val) {
// safely append the val - avoid blowing up when attempting to
// call .replace() if message is not a string for some reason
cmdStr += `${key}=${escape(`${val || ''}`)},`;
if (first) {
first = false;
}
else {
cmdStr += ',';
}
cmdStr += `${key}=${escapeProperty(val)}`;
}
}
}
}
cmdStr += CMD_STRING;
// 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);
cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
return cmdStr;
}
}
function escapeData(s) {
return s.replace(/\r/g, '%0D').replace(/\n/g, '%0A');
return (s || '')
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A');
}
function escape(s) {
return s
function escapeProperty(s) {
return (s || '')
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A')
.replace(/]/g, '%5D')
.replace(/;/g, '%3B');
.replace(/:/g, '%3A')
.replace(/,/g, '%2C');
}
//# sourceMappingURL=command.js.map

View File

@ -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,C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,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,CAAS;IAC3B,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;SACb,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,CAAS;IAC/B,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;SACb,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"}

View File

@ -55,6 +55,10 @@ export declare function setOutput(name: string, value: string): void;
* @param message add error issue message
*/
export declare function setFailed(message: string): void;
/**
* Gets whether Actions Step Debug is on or not
*/
export declare function isDebug(): boolean;
/**
* Writes debug message to user log
* @param message debug message
@ -96,3 +100,17 @@ export declare function endGroup(): void;
* @param fn The function to wrap in the group
*/
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.
*
* @param name name of the state to store
* @param value value to store
*/
export declare function saveState(name: string, value: string): void;
/**
* Gets the value of an state set by this action's main execution.
*
* @param name name of the state to get
* @returns string
*/
export declare function getState(name: string): string;

View File

@ -8,10 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const command_1 = require("./command");
const os = require("os");
const path = require("path");
const os = __importStar(require("os"));
const path = __importStar(require("path"));
/**
* The code to exit an action
*/
@ -97,6 +104,13 @@ exports.setFailed = setFailed;
//-----------------------------------------------------------------------
// 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
* @param message debug message
@ -169,4 +183,27 @@ function group(name, fn) {
});
}
exports.group = group;
//-----------------------------------------------------------------------
// Wrapper action state
//-----------------------------------------------------------------------
/**
* Saves state for current action, the state can only be retrieved by this action's post job execution.
*
* @param name name of the state to store
* @param value value to store
*/
function saveState(name, value) {
command_1.issueCommand('save-state', { name }, value);
}
exports.saveState = saveState;
/**
* Gets the value of an state set by this action's main execution.
*
* @param name name of the state to get
* @returns string
*/
function getState(name) {
return process.env[`STATE_${name}`] || '';
}
exports.getState = getState;
//# sourceMappingURL=core.js.map

View File

@ -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,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U,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"}

View File

@ -1,6 +1,6 @@
{
"name": "@actions/core",
"version": "1.1.3",
"version": "1.2.3",
"description": "Actions core lib",
"keywords": [
"github",
@ -10,6 +10,7 @@
"homepage": "https://github.com/actions/toolkit/tree/master/packages/core",
"license": "MIT",
"main": "lib/core.js",
"types": "lib/core.d.ts",
"directories": {
"lib": "lib",
"test": "__tests__"
@ -26,6 +27,7 @@
"directory": "packages/core"
},
"scripts": {
"audit-moderate": "npm install && npm audit --audit-level=moderate",
"test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc"
},

View File

@ -4,7 +4,7 @@
#### Basic
You can use this package to execute your tools on the command line in a cross platform way:
You can use this package to execute tools in a cross platform way:
```js
const exec = require('@actions/exec');
@ -48,13 +48,10 @@ await exec.exec('node', ['index.js', 'foo=bar'], options);
#### Exec tools not in the PATH
You can use it in conjunction with the `which` function from `@actions/io` to execute tools that are not in the PATH:
You can specify the full path for tools not in the PATH:
```js
const exec = require('@actions/exec');
const io = require('@actions/io');
const pythonPath: string = await io.which('python', true)
await exec.exec(`"${pythonPath}"`, ['main.py']);
await exec.exec('"/path/to/my-tool"', ['arg1']);
```

View File

@ -12,6 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
const os = require("os");
const events = require("events");
const child = require("child_process");
const path = require("path");
const io = require("@actions/io");
const ioUtil = require("@actions/io/lib/io-util");
/* eslint-disable @typescript-eslint/unbound-method */
const IS_WINDOWS = process.platform === 'win32';
/*
@ -357,6 +360,16 @@ class ToolRunner extends events.EventEmitter {
*/
exec() {
return __awaiter(this, void 0, void 0, function* () {
// root the tool path if it is unrooted and contains relative pathing
if (!ioUtil.isRooted(this.toolPath) &&
(this.toolPath.includes('/') ||
(IS_WINDOWS && this.toolPath.includes('\\')))) {
// prefer options.cwd if it is specified, however options.cwd may also need to be rooted
this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
}
// if the tool is only a file name, then resolve it from the PATH
// otherwise verify it exists (add extension on Windows if necessary)
this.toolPath = yield io.which(this.toolPath, true);
return new Promise((resolve, reject) => {
this._debug(`exec tool: ${this.toolPath}`);
this._debug('arguments:');

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "@actions/exec",
"version": "1.0.1",
"version": "1.0.3",
"description": "Actions exec lib",
"keywords": [
"github",
@ -10,6 +10,7 @@
"homepage": "https://github.com/actions/toolkit/tree/master/packages/exec",
"license": "MIT",
"main": "lib/exec.js",
"types": "lib/exec.d.ts",
"directories": {
"lib": "lib",
"test": "__tests__"
@ -22,17 +23,18 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/actions/toolkit.git"
"url": "git+https://github.com/actions/toolkit.git",
"directory": "packages/exec"
},
"scripts": {
"audit-moderate": "npm install && npm audit --audit-level=moderate",
"test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc"
},
"bugs": {
"url": "https://github.com/actions/toolkit/issues"
},
"devDependencies": {
"dependencies": {
"@actions/io": "^1.0.1"
},
"gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52"
}
}

53
node_modules/@actions/io/README.md generated vendored 100644
View File

@ -0,0 +1,53 @@
# `@actions/io`
> Core functions for cli filesystem scenarios
## Usage
#### mkdir -p
Recursively make a directory. Follows rules specified in [man mkdir](https://linux.die.net/man/1/mkdir) with the `-p` option specified:
```js
const io = require('@actions/io');
await io.mkdirP('path/to/make');
```
#### cp/mv
Copy or move files or folders. Follows rules specified in [man cp](https://linux.die.net/man/1/cp) and [man mv](https://linux.die.net/man/1/mv):
```js
const io = require('@actions/io');
// Recursive must be true for directories
const options = { recursive: true, force: false }
await io.cp('path/to/directory', 'path/to/dest', options);
await io.mv('path/to/file', 'path/to/dest');
```
#### rm -rf
Remove a file or folder recursively. Follows rules specified in [man rm](https://linux.die.net/man/1/rm) with the `-r` and `-f` rules specified.
```js
const io = require('@actions/io');
await io.rmRF('path/to/directory');
await io.rmRF('path/to/file');
```
#### which
Get the path to a tool and resolves via paths. Follows the rules specified in [man which](https://linux.die.net/man/1/which).
```js
const exec = require('@actions/exec');
const io = require('@actions/io');
const pythonPath: string = await io.which('python', true)
await exec.exec(`"${pythonPath}"`, ['main.py']);
```

29
node_modules/@actions/io/lib/io-util.d.ts generated vendored 100644
View File

@ -0,0 +1,29 @@
/// <reference types="node" />
import * as fs from 'fs';
export declare const chmod: typeof fs.promises.chmod, copyFile: typeof fs.promises.copyFile, lstat: typeof fs.promises.lstat, mkdir: typeof fs.promises.mkdir, readdir: typeof fs.promises.readdir, readlink: typeof fs.promises.readlink, rename: typeof fs.promises.rename, rmdir: typeof fs.promises.rmdir, stat: typeof fs.promises.stat, symlink: typeof fs.promises.symlink, unlink: typeof fs.promises.unlink;
export declare const IS_WINDOWS: boolean;
export declare function exists(fsPath: string): Promise<boolean>;
export declare function isDirectory(fsPath: string, useStat?: boolean): Promise<boolean>;
/**
* On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:
* \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases).
*/
export declare function isRooted(p: string): boolean;
/**
* Recursively create a directory at `fsPath`.
*
* This implementation is optimistic, meaning it attempts to create the full
* path first, and backs up the path stack from there.
*
* @param fsPath The path to create
* @param maxDepth The maximum recursion depth
* @param depth The current recursion depth
*/
export declare function mkdirP(fsPath: string, maxDepth?: number, depth?: number): Promise<void>;
/**
* Best effort attempt to determine whether a file exists and is executable.
* @param filePath file path to check
* @param extensions additional file extensions to try
* @return if file exists and is executable, returns the file path. otherwise empty string.
*/
export declare function tryGetExecutablePath(filePath: string, extensions: string[]): Promise<string>;

195
node_modules/@actions/io/lib/io-util.js generated vendored 100644
View File

@ -0,0 +1,195 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
const assert_1 = require("assert");
const fs = require("fs");
const path = require("path");
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
exports.IS_WINDOWS = process.platform === 'win32';
function exists(fsPath) {
return __awaiter(this, void 0, void 0, function* () {
try {
yield exports.stat(fsPath);
}
catch (err) {
if (err.code === 'ENOENT') {
return false;
}
throw err;
}
return true;
});
}
exports.exists = exists;
function isDirectory(fsPath, useStat = false) {
return __awaiter(this, void 0, void 0, function* () {
const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);
return stats.isDirectory();
});
}
exports.isDirectory = isDirectory;
/**
* On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:
* \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases).
*/
function isRooted(p) {
p = normalizeSeparators(p);
if (!p) {
throw new Error('isRooted() parameter "p" cannot be empty');
}
if (exports.IS_WINDOWS) {
return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello
); // e.g. C: or C:\hello
}
return p.startsWith('/');
}
exports.isRooted = isRooted;
/**
* Recursively create a directory at `fsPath`.
*
* This implementation is optimistic, meaning it attempts to create the full
* path first, and backs up the path stack from there.
*
* @param fsPath The path to create
* @param maxDepth The maximum recursion depth
* @param depth The current recursion depth
*/
function mkdirP(fsPath, maxDepth = 1000, depth = 1) {
return __awaiter(this, void 0, void 0, function* () {
assert_1.ok(fsPath, 'a path argument must be provided');
fsPath = path.resolve(fsPath);
if (depth >= maxDepth)
return exports.mkdir(fsPath);
try {
yield exports.mkdir(fsPath);
return;
}
catch (err) {
switch (err.code) {
case 'ENOENT': {
yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1);
yield exports.mkdir(fsPath);
return;
}
default: {
let stats;
try {
stats = yield exports.stat(fsPath);
}
catch (err2) {
throw err;
}
if (!stats.isDirectory())
throw err;
}
}
}
});
}
exports.mkdirP = mkdirP;
/**
* Best effort attempt to determine whether a file exists and is executable.
* @param filePath file path to check
* @param extensions additional file extensions to try
* @return if file exists and is executable, returns the file path. otherwise empty string.
*/
function tryGetExecutablePath(filePath, extensions) {
return __awaiter(this, void 0, void 0, function* () {
let stats = undefined;
try {
// test file exists
stats = yield exports.stat(filePath);
}
catch (err) {
if (err.code !== 'ENOENT') {
// eslint-disable-next-line no-console
console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
}
}
if (stats && stats.isFile()) {
if (exports.IS_WINDOWS) {
// on Windows, test for valid extension
const upperExt = path.extname(filePath).toUpperCase();
if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {
return filePath;
}
}
else {
if (isUnixExecutable(stats)) {
return filePath;
}
}
}
// try each extension
const originalFilePath = filePath;
for (const extension of extensions) {
filePath = originalFilePath + extension;
stats = undefined;
try {
stats = yield exports.stat(filePath);
}
catch (err) {
if (err.code !== 'ENOENT') {
// eslint-disable-next-line no-console
console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
}
}
if (stats && stats.isFile()) {
if (exports.IS_WINDOWS) {
// preserve the case of the actual file (since an extension was appended)
try {
const directory = path.dirname(filePath);
const upperName = path.basename(filePath).toUpperCase();
for (const actualName of yield exports.readdir(directory)) {
if (upperName === actualName.toUpperCase()) {
filePath = path.join(directory, actualName);
break;
}
}
}
catch (err) {
// eslint-disable-next-line no-console
console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);
}
return filePath;
}
else {
if (isUnixExecutable(stats)) {
return filePath;
}
}
}
}
return '';
});
}
exports.tryGetExecutablePath = tryGetExecutablePath;
function normalizeSeparators(p) {
p = p || '';
if (exports.IS_WINDOWS) {
// convert slashes on Windows
p = p.replace(/\//g, '\\');
// remove redundant slashes
return p.replace(/\\\\+/g, '\\');
}
// remove redundant slashes
return p.replace(/\/\/+/g, '/');
}
// on Mac/Linux, test the execute bit
// R W X R W X R W X
// 256 128 64 32 16 8 4 2 1
function isUnixExecutable(stats) {
return ((stats.mode & 1) > 0 ||
((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||
((stats.mode & 64) > 0 && stats.uid === process.getuid()));
}
//# sourceMappingURL=io-util.js.map

1
node_modules/@actions/io/lib/io-util.js.map generated vendored 100644
View File

@ -0,0 +1 @@
{"version":3,"file":"io-util.js","sourceRoot":"","sources":["../src/io-util.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAyB;AACzB,yBAAwB;AACxB,6BAA4B;AAEf,gBAYE,qTAAA;AAEF,QAAA,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GAAG,CACT,yEAAyE,QAAQ,MAAM,GAAG,EAAE,CAC7F,CAAA;qBACF;oBAED,OAAO,QAAQ,CAAA;iBAChB;qBAAM;oBACL,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;wBAC3B,OAAO,QAAQ,CAAA;qBAChB;iBACF;aACF;SACF;QAED,OAAO,EAAE,CAAA;IACX,CAAC;CAAA;AA5ED,oDA4EC;AAED,SAAS,mBAAmB,CAAC,CAAS;IACpC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAA;IACX,IAAI,kBAAU,EAAE;QACd,6BAA6B;QAC7B,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QAE1B,2BAA2B;QAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;KACjC;IAED,2BAA2B;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;AACjC,CAAC;AAED,qCAAqC;AACrC,6BAA6B;AAC7B,6BAA6B;AAC7B,SAAS,gBAAgB,CAAC,KAAe;IACvC,OAAO,CACL,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC;QACpB,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;QACxD,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAC1D,CAAA;AACH,CAAC"}

56
node_modules/@actions/io/lib/io.d.ts generated vendored 100644
View File

@ -0,0 +1,56 @@
/**
* Interface for cp/mv options
*/
export interface CopyOptions {
/** Optional. Whether to recursively copy all subdirectories. Defaults to false */
recursive?: boolean;
/** Optional. Whether to overwrite existing files in the destination. Defaults to true */
force?: boolean;
}
/**
* Interface for cp/mv options
*/
export interface MoveOptions {
/** Optional. Whether to overwrite existing files in the destination. Defaults to true */
force?: boolean;
}
/**
* Copies a file or folder.
* Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
*
* @param source source path
* @param dest destination path
* @param options optional. See CopyOptions.
*/
export declare function cp(source: string, dest: string, options?: CopyOptions): Promise<void>;
/**
* Moves a path.
*
* @param source source path
* @param dest destination path
* @param options optional. See MoveOptions.
*/
export declare function mv(source: string, dest: string, options?: MoveOptions): Promise<void>;
/**
* Remove a path recursively with force
*
* @param inputPath path to remove
*/
export declare function rmRF(inputPath: string): Promise<void>;
/**
* Make a directory. Creates the full path with folders in between
* Will throw if it fails
*
* @param fsPath path to create
* @returns Promise<void>
*/
export declare function mkdirP(fsPath: string): Promise<void>;
/**
* Returns path of a tool had the tool actually been invoked. Resolves via paths.
* If you check and the tool does not exist, it will throw.
*
* @param tool name of the tool
* @param check whether to check if tool exists
* @returns Promise<string> path to tool
*/
export declare function which(tool: string, check?: boolean): Promise<string>;

290
node_modules/@actions/io/lib/io.js generated vendored 100644
View File

@ -0,0 +1,290 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const childProcess = require("child_process");
const path = require("path");
const util_1 = require("util");
const ioUtil = require("./io-util");
const exec = util_1.promisify(childProcess.exec);
/**
* Copies a file or folder.
* Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
*
* @param source source path
* @param dest destination path
* @param options optional. See CopyOptions.
*/
function cp(source, dest, options = {}) {
return __awaiter(this, void 0, void 0, function* () {
const { force, recursive } = readCopyOptions(options);
const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;
// Dest is an existing file, but not forcing
if (destStat && destStat.isFile() && !force) {
return;
}
// If dest is an existing directory, should copy inside.
const newDest = destStat && destStat.isDirectory()
? path.join(dest, path.basename(source))
: dest;
if (!(yield ioUtil.exists(source))) {
throw new Error(`no such file or directory: ${source}`);
}
const sourceStat = yield ioUtil.stat(source);
if (sourceStat.isDirectory()) {
if (!recursive) {
throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);
}
else {
yield cpDirRecursive(source, newDest, 0, force);
}
}
else {
if (path.relative(source, newDest) === '') {
// a file cannot be copied to itself
throw new Error(`'${newDest}' and '${source}' are the same file`);
}
yield copyFile(source, newDest, force);
}
});
}
exports.cp = cp;
/**
* Moves a path.
*
* @param source source path
* @param dest destination path
* @param options optional. See MoveOptions.
*/
function mv(source, dest, options = {}) {
return __awaiter(this, void 0, void 0, function* () {
if (yield ioUtil.exists(dest)) {
let destExists = true;
if (yield ioUtil.isDirectory(dest)) {
// If dest is directory copy src into dest
dest = path.join(dest, path.basename(source));
destExists = yield ioUtil.exists(dest);
}
if (destExists) {
if (options.force == null || options.force) {
yield rmRF(dest);
}
else {
throw new Error('Destination already exists');
}
}
}
yield mkdirP(path.dirname(dest));
yield ioUtil.rename(source, dest);
});
}
exports.mv = mv;
/**
* Remove a path recursively with force
*
* @param inputPath path to remove
*/
function rmRF(inputPath) {
return __awaiter(this, void 0, void 0, function* () {
if (ioUtil.IS_WINDOWS) {
// Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another
// program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.
try {
if (yield ioUtil.isDirectory(inputPath, true)) {
yield exec(`rd /s /q "${inputPath}"`);
}
else {
yield exec(`del /f /a "${inputPath}"`);
}
}
catch (err) {
// if you try to delete a file that doesn't exist, desired result is achieved
// other errors are valid
if (err.code !== 'ENOENT')
throw err;
}
// Shelling out fails to remove a symlink folder with missing source, this unlink catches that
try {
yield ioUtil.unlink(inputPath);
}
catch (err) {
// if you try to delete a file that doesn't exist, desired result is achieved
// other errors are valid
if (err.code !== 'ENOENT')
throw err;
}
}
else {
let isDir = false;
try {
isDir = yield ioUtil.isDirectory(inputPath);
}
catch (err) {
// if you try to delete a file that doesn't exist, desired result is achieved
// other errors are valid
if (err.code !== 'ENOENT')
throw err;
return;
}
if (isDir) {
yield exec(`rm -rf "${inputPath}"`);
}
else {
yield ioUtil.unlink(inputPath);
}
}
});
}
exports.rmRF = rmRF;
/**
* Make a directory. Creates the full path with folders in between
* Will throw if it fails
*
* @param fsPath path to create
* @returns Promise<void>
*/
function mkdirP(fsPath) {
return __awaiter(this, void 0, void 0, function* () {
yield ioUtil.mkdirP(fsPath);
});
}
exports.mkdirP = mkdirP;
/**
* Returns path of a tool had the tool actually been invoked. Resolves via paths.
* If you check and the tool does not exist, it will throw.
*
* @param tool name of the tool
* @param check whether to check if tool exists
* @returns Promise<string> path to tool
*/
function which(tool, check) {
return __awaiter(this, void 0, void 0, function* () {
if (!tool) {
throw new Error("parameter 'tool' is required");
}
// recursive when check=true
if (check) {
const result = yield which(tool, false);
if (!result) {
if (ioUtil.IS_WINDOWS) {
throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);
}
else {
throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
}
}
}
try {
// build the list of extensions to try
const extensions = [];
if (ioUtil.IS_WINDOWS && process.env.PATHEXT) {
for (const extension of process.env.PATHEXT.split(path.delimiter)) {
if (extension) {
extensions.push(extension);
}
}
}
// if it's rooted, return it if exists. otherwise return empty.
if (ioUtil.isRooted(tool)) {
const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);
if (filePath) {
return filePath;
}
return '';
}
// if any path separators, return empty
if (tool.includes('/') || (ioUtil.IS_WINDOWS && tool.includes('\\'))) {
return '';
}
// build the list of directories
//
// Note, technically "where" checks the current directory on Windows. From a toolkit perspective,
// it feels like we should not do this. Checking the current directory seems like more of a use
// case of a shell, and the which() function exposed by the toolkit should strive for consistency
// across platforms.
const directories = [];
if (process.env.PATH) {
for (const p of process.env.PATH.split(path.delimiter)) {
if (p) {
directories.push(p);
}
}
}
// return the first match
for (const directory of directories) {
const filePath = yield ioUtil.tryGetExecutablePath(directory + path.sep + tool, extensions);
if (filePath) {
return filePath;
}
}
return '';
}
catch (err) {
throw new Error(`which failed with message ${err.message}`);
}
});
}
exports.which = which;
function readCopyOptions(options) {
const force = options.force == null ? true : options.force;
const recursive = Boolean(options.recursive);
return { force, recursive };
}
function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
return __awaiter(this, void 0, void 0, function* () {
// Ensure there is not a run away recursive copy
if (currentDepth >= 255)
return;
currentDepth++;
yield mkdirP(destDir);
const files = yield ioUtil.readdir(sourceDir);
for (const fileName of files) {
const srcFile = `${sourceDir}/${fileName}`;
const destFile = `${destDir}/${fileName}`;
const srcFileStat = yield ioUtil.lstat(srcFile);
if (srcFileStat.isDirectory()) {
// Recurse
yield cpDirRecursive(srcFile, destFile, currentDepth, force);
}
else {
yield copyFile(srcFile, destFile, force);
}
}
// Change the mode for the newly created directory
yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);
});
}
// Buffered file copy
function copyFile(srcFile, destFile, force) {
return __awaiter(this, void 0, void 0, function* () {
if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {
// unlink/re-link it
try {
yield ioUtil.lstat(destFile);
yield ioUtil.unlink(destFile);
}
catch (e) {
// Try to override file permission
if (e.code === 'EPERM') {
yield ioUtil.chmod(destFile, '0666');
yield ioUtil.unlink(destFile);
}
// other errors = it doesn't exist, no work to do
}
// Copy over symlink
const symlinkFull = yield ioUtil.readlink(srcFile);
yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);
}
else if (!(yield ioUtil.exists(destFile)) || force) {
yield ioUtil.copyFile(srcFile, destFile);
}
});
}
//# sourceMappingURL=io.js.map

1
node_modules/@actions/io/lib/io.js.map generated vendored 100644

File diff suppressed because one or more lines are too long

37
node_modules/@actions/io/package.json generated vendored 100644
View File

@ -0,0 +1,37 @@
{
"name": "@actions/io",
"version": "1.0.2",
"description": "Actions io lib",
"keywords": [
"github",
"actions",
"io"
],
"homepage": "https://github.com/actions/toolkit/tree/master/packages/io",
"license": "MIT",
"main": "lib/io.js",
"types": "lib/io.d.ts",
"directories": {
"lib": "lib",
"test": "__tests__"
},
"files": [
"lib"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/actions/toolkit.git",
"directory": "packages/io"
},
"scripts": {
"audit-moderate": "npm install && npm audit --audit-level=moderate",
"test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc"
},
"bugs": {
"url": "https://github.com/actions/toolkit/issues"
}
}

25
node_modules/add-stream/.jshintrc generated vendored 100644
View File

@ -0,0 +1,25 @@
{
"node": true,
"bitwise": false,
"camelcase": true,
"eqeqeq": true,
"forin": true,
"freeze": true,
"immed": true,
"indent": 4,
"latedef": "nofunc",
"newcap": true,
"noarg": true,
"quotmark": "single",
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"globals": {
"describe": false,
"it": false,
"beforeEach": false,
"afterEach": false
}
}

7
node_modules/add-stream/.npmignore generated vendored 100644
View File

@ -0,0 +1,7 @@
/.idea
/atlassian-ide-plugin.xml
*.iml
.DS_Store
/node_modules
/coverage

4
node_modules/add-stream/.travis.yml generated vendored 100644
View File

@ -0,0 +1,4 @@
language: node_js
node_js:
- "0.11"
- "0.10"

38
node_modules/add-stream/README.md generated vendored 100644
View File

@ -0,0 +1,38 @@
# add-stream [![Build Status](https://travis-ci.org/wilsonjackson/add-stream.svg?branch=master)](https://travis-ci.org/wilsonjackson/add-stream)
> Append the contents of one stream onto another.
## Usage
```js
var fs = require('fs');
var es = require('event-stream');
var addStream = require('add-stream');
// Append strings/buffers
fs.createReadStream('1.txt') // 1.txt contains: number1
.pipe(addStream(fs.createReadStream('2.txt'))) // 2.txt contains: number2
.pipe(fs.createWriteStream('appended.txt')); // appended.txt contains: number1number2
// Append object streams
es.readArray([1, 2, 3])
.pipe(addStream.obj(es.readArray([4, 5, 6])))
.pipe(es.writeArray(function (err, array) {
console.log(array); // [ 1, 2, 3, 4, 5, 6 ]
}));
```
## API
### var transformStream = addStream(stream, opts = {})
Create a transform stream that appends the contents of `stream` onto whatever
is piped into it. Options are passed to the transform stream's constructor.
### var transformStream = addStream.obj(stream, opts = {})
A convenient shortcut for `addStream(stream, {objectMode: true})`.
## License
MIT

56
node_modules/add-stream/index.js generated vendored 100644
View File

@ -0,0 +1,56 @@
'use strict';
var PassThrough = require('stream').PassThrough;
var Writable = require('stream').Writable;
var util = require('util');
util.inherits(Appendee, PassThrough);
util.inherits(Appender, Writable);
function Appendee(factory, opts) {
PassThrough.call(this, opts);
this.factory = factory;
this.opts = opts;
}
//noinspection JSUnusedGlobalSymbols
Appendee.prototype._flush = function (end) {
var stream = this.factory();
stream.pipe(new Appender(this, this.opts))
.on('finish', end);
stream.resume();
};
function Appender(target, opts) {
Writable.call(this, opts);
this.target = target;
}
//noinspection JSUnusedGlobalSymbols
Appender.prototype._write = function (chunk, enc, cb) {
this.target.push(chunk);
cb();
};
function addStream(stream, opts) {
opts = opts || {};
var factory;
if (typeof stream === 'function') {
factory = stream;
}
else {
stream.pause();
factory = function () {
return stream;
};
}
return new Appendee(factory, opts);
}
addStream.obj = function (stream, opts) {
opts = opts || {};
opts.objectMode = true;
return addStream(stream, opts);
};
module.exports = addStream;

34
node_modules/add-stream/package.json generated vendored 100644
View File

@ -0,0 +1,34 @@
{
"name": "add-stream",
"version": "1.0.0",
"description": "Append the contents of one stream onto another.",
"main": "index.js",
"scripts": {
"test": "mocha",
"cover": "istanbul cover node_modules/.bin/_mocha -- -u exports -R spec"
},
"repository": {
"type": "git",
"url": "https://github.com/wilsonjackson/add-stream"
},
"keywords": [
"stream",
"append",
"add",
"concat",
"gulpfriendly"
],
"author": "Majid Burney <moocow@euphoricsoup.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/wilsonjackson/add-stream/issues"
},
"homepage": "https://github.com/wilsonjackson/add-stream",
"dependencies": {},
"devDependencies": {
"chai": "^1.10.0",
"event-stream": "^3.1.7",
"istanbul": "^0.3.4",
"mocha": "^2.0.1"
}
}

64
node_modules/add-stream/test/spec.js generated vendored 100644
View File

@ -0,0 +1,64 @@
'use strict';
var chai = require('chai');
var expect = chai.expect;
var es = require('event-stream');
var addStream = require('../');
describe('add-stream', function () {
function emit(chunks) {
var mutableChunks = [].concat(chunks);
return es.readable(function (count, callback) {
if (mutableChunks.length === 0) {
return this.emit('end');
}
callback(null, mutableChunks.shift());
});
}
describe('buffer mode', function () {
it('should append a stream', function (done) {
var firstChunks = ['abc', 'def'];
var secondChunks = ['ghi', 'jkl'];
emit(firstChunks)
.pipe(addStream(emit(secondChunks)))
.pipe(es.wait(function (err, buffer) {
expect(buffer.toString()).to.equal(firstChunks.concat(secondChunks).join(''));
done();
}));
});
it('should append a stream from a factory function', function (done) {
var firstChunks = ['abc', 'def'];
var secondChunks = ['ghi', 'jkl'];
emit(firstChunks)
.pipe(addStream(function () {
return emit(secondChunks);
}))
.pipe(es.wait(function (err, buffer) {
expect(buffer.toString()).to.equal(firstChunks.concat(secondChunks).join(''));
done();
}));
});
});
describe('object mode', function () {
it('should append a stream', function (done) {
es.readArray([{p: 1}, {p: 2}, {p: 3}])
.pipe(addStream.obj(es.readArray([{p: 4}, {p: 5}, {p: 6}])))
.pipe(es.writeArray(function (err, array) {
expect(array).to.eql([{p: 1}, {p: 2}, {p: 3}, {p: 4}, {p: 5}, {p: 6}]);
done();
}));
});
it('should append a stream from a factory function', function (done) {
es.readArray([{p: 1}, {p: 2}, {p: 3}])
.pipe(addStream.obj(function () {return es.readArray([{p: 4}, {p: 5}, {p: 6}])}))
.pipe(es.writeArray(function (err, array) {
expect(array).to.eql([{p: 1}, {p: 2}, {p: 3}, {p: 4}, {p: 5}, {p: 6}]);
done();
}));
});
});
});

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [5.0.6](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-angular@5.0.5...conventional-changelog-angular@5.0.6) (2019-11-07)
### Bug Fixes
* revertPattern match default git revert format ([#545](https://github.com/conventional-changelog/conventional-changelog/issues/545)) ([fe449f8](https://github.com/conventional-changelog/conventional-changelog/commit/fe449f899567574a36d1819b313e2caa899052ff))
## [5.0.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-angular@5.0.3...conventional-changelog-angular@5.0.4) (2019-10-02)

View File

@ -1,6 +1,6 @@
{
"name": "conventional-changelog-angular",
"version": "5.0.5",
"version": "5.0.6",
"description": "conventional-changelog angular preset",
"main": "index.js",
"scripts": {
@ -36,5 +36,5 @@
"compare-func": "^1.3.1",
"q": "^1.5.1"
},
"gitHead": "7c1c8ad819b05c12c7d58c92ac386b45ada6f6a8"
"gitHead": "741e90744cdb58e82e71feb36018047d7baca768"
}

View File

@ -8,6 +8,6 @@ module.exports = {
`subject`
],
noteKeywords: [`BREAKING CHANGE`],
revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./,
revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
revertCorrespondence: [`header`, `hash`]
}

View File

@ -39,7 +39,7 @@ function getWriterOpts () {
commit.type = `Bug Fixes`
} else if (commit.type === `perf`) {
commit.type = `Performance Improvements`
} else if (commit.type === `revert`) {
} else if (commit.type === `revert` || commit.revert) {
commit.type = `Reverts`
} else if (discard) {
return

View File

@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [4.2.3](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-conventionalcommits@4.2.2...conventional-changelog-conventionalcommits@4.2.3) (2019-11-07)
### Bug Fixes
* revertPattern match default git revert format ([#545](https://github.com/conventional-changelog/conventional-changelog/issues/545)) ([fe449f8](https://github.com/conventional-changelog/conventional-changelog/commit/fe449f899567574a36d1819b313e2caa899052ff))
## [4.2.2](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-conventionalcommits@4.2.1...conventional-changelog-conventionalcommits@4.2.2) (2019-10-24)
### Bug Fixes
* **deps:** update lodash to fix security issues ([#535](https://github.com/conventional-changelog/conventional-changelog/issues/535)) ([ac43f51](https://github.com/conventional-changelog/conventional-changelog/commit/ac43f51de1f3b597c32f7f8442917a2d06199018))
# [4.2.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-conventionalcommits@4.1.0...conventional-changelog-conventionalcommits@4.2.0) (2019-10-02)

View File

@ -1,6 +1,6 @@
{
"name": "conventional-changelog-conventionalcommits",
"version": "4.2.1",
"version": "4.2.3",
"description": "conventional-changelog conventionalcommits.org preset",
"main": "index.js",
"scripts": {
@ -35,8 +35,8 @@
"homepage": "https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular#readme",
"dependencies": {
"compare-func": "^1.3.1",
"lodash": "^4.2.1",
"lodash": "^4.17.15",
"q": "^1.5.1"
},
"gitHead": "7c1c8ad819b05c12c7d58c92ac386b45ada6f6a8"
"gitHead": "741e90744cdb58e82e71feb36018047d7baca768"
}

View File

@ -11,7 +11,7 @@ module.exports = function (config) {
`subject`
],
noteKeywords: [`BREAKING CHANGE`],
revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./,
revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
revertCorrespondence: [`header`, `hash`],
issuePrefixes: config.issuePrefixes
}

View File

@ -65,7 +65,7 @@ function getWriterOpts (config) {
transform: (commit, context) => {
let discard = true
const issues = []
const typeKey = (commit.type || '').toLowerCase()
const typeKey = (commit.revert ? 'revert' : (commit.type || '')).toLowerCase()
// adds additional breaking change notes
// for the special case, test(system)!: hello world, where there is

View File

@ -3,6 +3,69 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [4.1.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-core@4.1.3...conventional-changelog-core@4.1.4) (2019-12-15)
### Bug Fixes
* **conventional-changelog-core:** fix duplicated commits when `from` is specified ([#573](https://github.com/conventional-changelog/conventional-changelog/issues/573)) ([f1feeab](https://github.com/conventional-changelog/conventional-changelog/commit/f1feeab86ed28f1e75c8f3a6b072c9dc18111c65)), closes [#567](https://github.com/conventional-changelog/conventional-changelog/issues/567)
## [4.1.3](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-core@4.1.2...conventional-changelog-core@4.1.3) (2019-11-27)
### Bug Fixes
* **conventional-changelog-core:** read current version properly when tagPrefix is provided ([5e7cc75](https://github.com/conventional-changelog/conventional-changelog/commit/5e7cc759cca4557f8ed3b48ed9d4dfb9c701785f)), closes [#562](https://github.com/conventional-changelog/conventional-changelog/issues/562) [#337](https://github.com/conventional-changelog/conventional-changelog/issues/337)
## [4.1.2](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-core@4.1.1...conventional-changelog-core@4.1.2) (2019-11-21)
### Bug Fixes
* call gitRawCommits with ranges [tag1..tag2, tag2..tag3, ..., tagX..HEAD] to make sure commits are returned in right order. ([2fba5c7](https://github.com/conventional-changelog/conventional-changelog/commit/2fba5c7a02e0e34093a6bd9a01109457db9b84c5)), closes [#408](https://github.com/conventional-changelog/conventional-changelog/issues/408)
## [4.1.1](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-core@4.1.0...conventional-changelog-core@4.1.1) (2019-11-14)
**Note:** Version bump only for package conventional-changelog-core
# [4.1.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-core@4.0.3...conventional-changelog-core@4.1.0) (2019-11-07)
### Features
* **conventional-changelog-core:** provide facility to define gitExecOpts. ([#480](https://github.com/conventional-changelog/conventional-changelog/issues/480)) ([814f878](https://github.com/conventional-changelog/conventional-changelog/commit/814f878054ca3c9ec00c3147478eb1e6a2762e9a))
## [4.0.3](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-core@4.0.2...conventional-changelog-core@4.0.3) (2019-10-24)
### Bug Fixes
* **deps:** update lodash to fix security issues ([#535](https://github.com/conventional-changelog/conventional-changelog/issues/535)) ([ac43f51](https://github.com/conventional-changelog/conventional-changelog/commit/ac43f51de1f3b597c32f7f8442917a2d06199018))
## [4.0.1](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-core@4.0.0...conventional-changelog-core@4.0.1) (2019-10-02)
**Note:** Version bump only for package conventional-changelog-core

View File

@ -1,28 +1,85 @@
'use strict'
const addStream = require('add-stream')
const gitRawCommits = require('git-raw-commits')
const conventionalCommitsParser = require('conventional-commits-parser')
const conventionalChangelogWriter = require('conventional-changelog-writer')
const _ = require('lodash')
const stream = require('stream')
const through = require('through2')
const mergeConfig = require('./lib/merge-config')
function conventionalChangelog (options, context, gitRawCommitsOpts, parserOpts, writerOpts) {
function conventionalChangelog (options, context, gitRawCommitsOpts, parserOpts, writerOpts, gitRawExecOpts) {
writerOpts = writerOpts || {}
var readable = new stream.Readable({
objectMode: writerOpts.includeDetails
})
readable._read = function () {}
readable._read = function () { }
mergeConfig(options, context, gitRawCommitsOpts, parserOpts, writerOpts)
mergeConfig(options, context, gitRawCommitsOpts, parserOpts, writerOpts, gitRawExecOpts)
.then(function (data) {
options = data.options
context = data.context
gitRawCommitsOpts = data.gitRawCommitsOpts
parserOpts = data.parserOpts
writerOpts = data.writerOpts
gitRawExecOpts = data.gitRawExecOpts
gitRawCommits(gitRawCommitsOpts)
var reverseTags = context.gitSemverTags.slice(0).reverse()
reverseTags.push('HEAD')
if (gitRawCommitsOpts.from) {
if (reverseTags.indexOf(gitRawCommitsOpts.from) !== -1) {
reverseTags = reverseTags.slice(reverseTags.indexOf(gitRawCommitsOpts.from))
} else {
reverseTags = [gitRawCommitsOpts.from, 'HEAD']
}
}
var commitsErrorThrown = false
var commitsStream = new stream.Readable({
objectMode: true
})
commitsStream._read = function () { }
function commitsRange (from, to) {
return gitRawCommits(_.merge({}, gitRawCommitsOpts, {
from: from,
to: to
}))
.on('error', function (err) {
if (!commitsErrorThrown) {
setImmediate(commitsStream.emit.bind(commitsStream), 'error', err)
commitsErrorThrown = true
}
})
}
var streams = reverseTags.map((to, i) => {
const from = i > 0
? reverseTags[i - 1]
: ''
return commitsRange(from, to)
})
if (gitRawCommitsOpts.from) {
streams = streams.splice(1)
}
if (gitRawCommitsOpts.reverse) {
streams.reverse()
}
streams.reduce((prev, next) => next.pipe(addStream(prev)))
.on('data', function (data) {
setImmediate(commitsStream.emit.bind(commitsStream), 'data', data)
})
.on('end', function () {
setImmediate(commitsStream.emit.bind(commitsStream), 'end')
})
commitsStream
.on('error', function (err) {
err.message = 'Error in git-raw-commits: ' + err.message
setImmediate(readable.emit.bind(readable), 'error', err)

View File

@ -14,11 +14,10 @@ try {
}
var readPkg = require('read-pkg')
var readPkgUp = require('read-pkg-up')
var url = require('url')
var URL = require('url').URL
var _ = require('lodash')
var rhosts = /github|bitbucket|gitlab/i
var rtag = /tag:\s*[v=]?(.+?)[,)]/gi
function semverTagsPromise (options) {
return Q.Promise(function (resolve, reject) {
@ -52,13 +51,16 @@ function guessNextTag (previousTag, version) {
return version
}
function mergeConfig (options, context, gitRawCommitsOpts, parserOpts, writerOpts) {
function mergeConfig (options, context, gitRawCommitsOpts, parserOpts, writerOpts, gitRawExecOpts) {
var configPromise
var pkgPromise
var gitRemoteOriginUrlPromise
context = context || {}
gitRawCommitsOpts = gitRawCommitsOpts || {}
gitRawExecOpts = gitRawExecOpts || {}
var rtag = options && options.tagPrefix ? new RegExp(`tag:\\s*[=]?${options.tagPrefix}(.+?)[,)]`, 'gi') : /tag:\s*[v=]?(.+?)[,)]/gi
options = _.merge({
pkg: {
@ -164,8 +166,18 @@ function mergeConfig (options, context, gitRawCommitsOpts, parserOpts, writerOpt
if (repo.browse) {
var browse = repo.browse()
var parsedBrowse = url.parse(browse)
context.host = context.host || (repo.domain ? (parsedBrowse.protocol + (parsedBrowse.slashes ? '//' : '') + repo.domain) : null)
if (!context.host) {
if (repo.domain) {
var parsedBrowse = new URL(browse)
if (parsedBrowse.origin.indexOf('//') !== -1) {
context.host = parsedBrowse.protocol + '//' + repo.domain
} else {
context.host = parsedBrowse.protocol + repo.domain
}
} else {
context.host = null
}
}
context.owner = context.owner || repo.user || ''
context.repository = context.repository || repo.project
context.repoUrl = browse
@ -292,6 +304,8 @@ function mergeConfig (options, context, gitRawCommitsOpts, parserOpts, writerOpt
} else if (!context.currentTag) {
if (options.lernaPackage) {
context.currentTag = options.lernaPackage + '@' + context.version
} else if (options.tagPrefix) {
context.currentTag = options.tagPrefix + context.version
} else {
context.currentTag = guessNextTag(gitSemverTags[0], context.version)
}
@ -318,7 +332,8 @@ function mergeConfig (options, context, gitRawCommitsOpts, parserOpts, writerOpt
context: context,
gitRawCommitsOpts: gitRawCommitsOpts,
parserOpts: parserOpts,
writerOpts: writerOpts
writerOpts: writerOpts,
gitRawExecOpts: gitRawExecOpts
}
})
}

View File

@ -1,6 +1,6 @@
{
"name": "conventional-changelog-core",
"version": "4.0.2",
"version": "4.1.4",
"description": "conventional-changelog core",
"repository": {
"type": "git",
@ -26,14 +26,15 @@
},
"homepage": "https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core#readme",
"dependencies": {
"conventional-changelog-writer": "^4.0.9",
"conventional-commits-parser": "^3.0.5",
"add-stream": "^1.0.0",
"conventional-changelog-writer": "^4.0.11",
"conventional-commits-parser": "^3.0.8",
"dateformat": "^3.0.0",
"get-pkg-repo": "^1.0.0",
"git-raw-commits": "2.0.0",
"git-remote-origin-url": "^2.0.0",
"git-semver-tags": "^3.0.0",
"lodash": "^4.2.1",
"git-semver-tags": "^3.0.1",
"lodash": "^4.17.15",
"normalize-package-data": "^2.3.5",
"q": "^1.5.1",
"read-pkg": "^3.0.0",
@ -43,5 +44,5 @@
"scripts": {
"test-windows": "mocha --timeout 30000"
},
"gitHead": "7c1c8ad819b05c12c7d58c92ac386b45ada6f6a8"
"gitHead": "d25d7acf46b60aa8c947ee71be2b4e057937219b"
}

View File

@ -3,6 +3,27 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.3.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-preset-loader@2.2.0...conventional-changelog-preset-loader@2.3.0) (2019-10-24)
### Bug Fixes
* **preset-loader:** fix handling conventionalcommits preset without config object ([6425972](https://github.com/conventional-changelog/conventional-changelog/commit/64259723085eaa21a281391acb9fc0704319c8b3)), closes [#512](https://github.com/conventional-changelog/conventional-changelog/issues/512)
### Features
* **preset-loader:** allow use of absolute package path ([#530](https://github.com/conventional-changelog/conventional-changelog/issues/530)) ([84d28b2](https://github.com/conventional-changelog/conventional-changelog/commit/84d28b285f787e9b1252aadf55f07a358635a5a6))
### Reverts
* "fix(preset-loader): fix handling conventionalcommits preset without config object" ([#520](https://github.com/conventional-changelog/conventional-changelog/issues/520)) ([417139c](https://github.com/conventional-changelog/conventional-changelog/commit/417139cbdae13d76ba325a8505534419325102a6))
# [2.2.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-preset-loader@2.1.1...conventional-changelog-preset-loader@2.2.0) (2019-07-29)

View File

@ -1,4 +1,7 @@
'use strict'
const nodePath = require('path')
module.exports = presetLoader(require)
module.exports.presetLoader = presetLoader
@ -6,30 +9,40 @@ function presetLoader (requireMethod) {
return path => {
let name = ''
let scope = ''
let absolutePath = ''
if (typeof path === 'string') {
name = path.toLowerCase()
if (nodePath.isAbsolute(path)) {
absolutePath = path
}
} else if (typeof path === 'object' && path.name) {
// Rather than a string preset name, options.preset can be an object
// with a "name" key indicating the preset to load; additinoal key/value
// pairs are assumed to be configuration for the preset. See the documentation
// for a given preset for configuration available.
name = path.name.toLowerCase()
if (nodePath.isAbsolute(path.name)) {
absolutePath = path.name
}
} else {
throw Error('preset must be string or object with key name')
}
if (name[0] === `@`) {
const parts = name.split(`/`)
scope = parts.shift() + `/`
name = parts.join(`/`)
}
if (!absolutePath) {
if (name[0] === `@`) {
const parts = name.split(`/`)
scope = parts.shift() + `/`
name = parts.join(`/`)
}
if (!name.startsWith('conventional-changelog-')) {
name = `conventional-changelog-${name}`
if (!name.startsWith('conventional-changelog-')) {
name = `conventional-changelog-${name}`
}
}
try {
const config = requireMethod(`${scope}${name}`)
const config = requireMethod(absolutePath || `${scope}${name}`)
// rather than returning a promise, presets can return a builder function
// which accepts a config object (allowing for customization) and returns
// a promise.

View File

@ -1,6 +1,6 @@
{
"name": "conventional-changelog-preset-loader",
"version": "2.2.0",
"version": "2.3.0",
"description": "Configuration preset loader for `conventional-changelog`.",
"repository": {
"type": "git",
@ -25,5 +25,5 @@
"scripts": {
"test-windows": "mocha --timeout 30000"
},
"gitHead": "dadbbf8b1acbe4b3a8f345633bde3f4a4ad0bea4"
"gitHead": "e865af4df8d06795cebc7af09364ade19119e089"
}

View File

@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [4.0.11](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.10...conventional-changelog-writer@4.0.11) (2019-11-14)
### Bug Fixes
* add types for cli flags ([#551](https://github.com/conventional-changelog/conventional-changelog/issues/551)) ([bf1d64a](https://github.com/conventional-changelog/conventional-changelog/commit/bf1d64aeaf8f262d4b2beec02d2aebb78df7343b))
## [4.0.10](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.9...conventional-changelog-writer@4.0.10) (2019-10-24)
### Bug Fixes
* **deps:** update lodash to fix security issues ([#535](https://github.com/conventional-changelog/conventional-changelog/issues/535)) ([ac43f51](https://github.com/conventional-changelog/conventional-changelog/commit/ac43f51de1f3b597c32f7f8442917a2d06199018))
## [4.0.8](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.7...conventional-changelog-writer@4.0.8) (2019-10-02)
**Note:** Version bump only for package conventional-changelog-writer

View File

@ -22,10 +22,12 @@ var cli = meow(`
`, {
flags: {
context: {
alias: `c`
alias: 'c',
type: 'string'
},
options: {
alias: `o`
alias: 'o',
type: 'string'
}
}
})

View File

@ -1,6 +1,6 @@
{
"name": "conventional-changelog-writer",
"version": "4.0.9",
"version": "4.0.11",
"description": "Write logs based on conventional commits and templates",
"bugs": {
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
@ -41,8 +41,8 @@
"dateformat": "^3.0.0",
"handlebars": "^4.4.0",
"json-stringify-safe": "^5.0.1",
"lodash": "^4.2.1",
"meow": "^4.0.0",
"lodash": "^4.17.15",
"meow": "^5.0.0",
"semver": "^6.0.0",
"split": "^1.0.0",
"through2": "^3.0.0"
@ -53,5 +53,5 @@
"bin": {
"conventional-changelog-writer": "cli.js"
},
"gitHead": "7c1c8ad819b05c12c7d58c92ac386b45ada6f6a8"
"gitHead": "79217815a7ce5f3d3f833961ce9a14bd454e5789"
}

View File

@ -3,6 +3,54 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.1.18](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog@3.1.17...conventional-changelog@3.1.18) (2019-12-15)
**Note:** Version bump only for package conventional-changelog
## [3.1.17](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog@3.1.16...conventional-changelog@3.1.17) (2019-11-27)
**Note:** Version bump only for package conventional-changelog
## [3.1.16](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog@3.1.15...conventional-changelog@3.1.16) (2019-11-21)
**Note:** Version bump only for package conventional-changelog
## [3.1.15](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog@3.1.14...conventional-changelog@3.1.15) (2019-11-14)
**Note:** Version bump only for package conventional-changelog
## [3.1.14](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog@3.1.13...conventional-changelog@3.1.14) (2019-11-07)
**Note:** Version bump only for package conventional-changelog
## [3.1.13](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog@3.1.12...conventional-changelog@3.1.13) (2019-10-24)
**Note:** Version bump only for package conventional-changelog
## [3.1.11](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog@3.1.10...conventional-changelog@3.1.11) (2019-10-02)
**Note:** Version bump only for package conventional-changelog

View File

@ -1,6 +1,6 @@
{
"name": "conventional-changelog",
"version": "3.1.12",
"version": "3.1.18",
"description": "Generate a changelog from git metadata",
"repository": {
"type": "git",
@ -35,20 +35,20 @@
},
"homepage": "https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog#readme",
"dependencies": {
"conventional-changelog-angular": "^5.0.5",
"conventional-changelog-angular": "^5.0.6",
"conventional-changelog-atom": "^2.0.3",
"conventional-changelog-codemirror": "^2.0.3",
"conventional-changelog-conventionalcommits": "^4.2.1",
"conventional-changelog-core": "^4.0.2",
"conventional-changelog-conventionalcommits": "^4.2.3",
"conventional-changelog-core": "^4.1.4",
"conventional-changelog-ember": "^2.0.4",
"conventional-changelog-eslint": "^3.0.4",
"conventional-changelog-express": "^2.0.1",
"conventional-changelog-jquery": "^3.0.6",
"conventional-changelog-jshint": "^2.0.3",
"conventional-changelog-preset-loader": "^2.2.0"
"conventional-changelog-preset-loader": "^2.3.0"
},
"scripts": {
"test-windows": "mocha --timeout 30000"
},
"gitHead": "7c1c8ad819b05c12c7d58c92ac386b45ada6f6a8"
"gitHead": "d25d7acf46b60aa8c947ee71be2b4e057937219b"
}

View File

@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.0.8](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.7...conventional-commits-parser@3.0.8) (2019-11-14)
### Bug Fixes
* add types for cli flags ([#551](https://github.com/conventional-changelog/conventional-changelog/issues/551)) ([bf1d64a](https://github.com/conventional-changelog/conventional-changelog/commit/bf1d64aeaf8f262d4b2beec02d2aebb78df7343b))
## [3.0.7](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.6...conventional-commits-parser@3.0.7) (2019-11-07)
### Bug Fixes
* **conventional-commits-parser:** add breaking change notes if header match `breakingHeaderPattern` ([#544](https://github.com/conventional-changelog/conventional-changelog/issues/544)) ([efdf3cb](https://github.com/conventional-changelog/conventional-changelog/commit/efdf3cbc9de3278b180a48beebb74e596e3c5f94))
* **conventional-commits-parser:** add missing separator pipe to non tty parser ([#546](https://github.com/conventional-changelog/conventional-changelog/issues/546)) ([c522743](https://github.com/conventional-changelog/conventional-changelog/commit/c5227437b0b300f30a57e8ba5df2a8ab8d163af0))
## [3.0.6](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.5...conventional-commits-parser@3.0.6) (2019-10-24)
### Bug Fixes
* **conventional-commits-parser:** downgrade is-text-path due to node 6 incompatibility ([#536](https://github.com/conventional-changelog/conventional-changelog/issues/536)) ([3aa2637](https://github.com/conventional-changelog/conventional-changelog/commit/3aa2637a1c65bb4db3d8bf2c6ce17e6f5abe1ca1))
* **deps:** update lodash to fix security issues ([#535](https://github.com/conventional-changelog/conventional-changelog/issues/535)) ([ac43f51](https://github.com/conventional-changelog/conventional-changelog/commit/ac43f51de1f3b597c32f7f8442917a2d06199018))
## [3.0.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.3...conventional-commits-parser@3.0.4) (2019-10-02)
**Note:** Version bump only for package conventional-commits-parser

View File

@ -43,25 +43,38 @@ var cli = meow(`
`, {
flags: {
'header-pattern': {
alias: `p`
alias: 'p',
type: 'string'
},
'header-correspondence': {
alias: `c`
alias: 'c',
type: 'string'
},
'reference-actions': {
alias: `r`
alias: 'r',
type: 'string'
},
'issue-prefixes': {
alias: `i`
alias: 'i',
type: 'string'
},
'note-keywords': {
alias: `n`
alias: 'n',
type: 'string'
},
'field-pattern': {
alias: `f`
alias: 'f',
type: 'string'
},
'revert-pattern': {
type: 'string'
},
'revert-correspondence': {
type: 'string'
},
verbose: {
alias: `v`
alias: 'v',
type: 'boolean'
}
}
})
@ -137,6 +150,7 @@ if (process.stdin.isTTY) {
} else {
options.warn = true
process.stdin
.pipe(split(separator))
.pipe(conventionalCommitsParser(options))
.on('error', function (err) {
console.error(err.toString())

View File

@ -253,6 +253,17 @@ function parser (raw, options, regex) {
}
})
if (options.breakingHeaderPattern && notes.length === 0) {
var breakingHeader = header.match(options.breakingHeaderPattern)
if (breakingHeader) {
const noteText = breakingHeader[3] // the description of the change.
notes.push({
title: 'BREAKING CHANGE',
text: noteText
})
}
}
while ((mentionsMatch = regex.mentions.exec(raw))) {
mentions.push(mentionsMatch[1])
}

View File

@ -1,6 +1,6 @@
{
"name": "conventional-commits-parser",
"version": "3.0.5",
"version": "3.0.8",
"description": "Parse raw conventional commits",
"bugs": {
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
@ -34,9 +34,9 @@
],
"dependencies": {
"JSONStream": "^1.0.4",
"is-text-path": "^2.0.0",
"lodash": "^4.2.1",
"meow": "^4.0.0",
"is-text-path": "^1.0.1",
"lodash": "^4.17.15",
"meow": "^5.0.0",
"split2": "^2.0.0",
"through2": "^3.0.0",
"trim-off-newlines": "^1.0.0"
@ -47,5 +47,5 @@
"bin": {
"conventional-commits-parser": "cli.js"
},
"gitHead": "7c1c8ad819b05c12c7d58c92ac386b45ada6f6a8"
"gitHead": "79217815a7ce5f3d3f833961ce9a14bd454e5789"
}

View File

@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.0.5](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@6.0.4...conventional-recommended-bump@6.0.5) (2019-11-14)
**Note:** Version bump only for package conventional-recommended-bump
## [6.0.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@6.0.3...conventional-recommended-bump@6.0.4) (2019-11-07)
### Bug Fixes
* revertPattern match default git revert format ([#545](https://github.com/conventional-changelog/conventional-changelog/issues/545)) ([fe449f8](https://github.com/conventional-changelog/conventional-changelog/commit/fe449f899567574a36d1819b313e2caa899052ff))
## [6.0.3](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@6.0.2...conventional-recommended-bump@6.0.3) (2019-10-24)
**Note:** Version bump only for package conventional-recommended-bump
## [6.0.1](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-recommended-bump@6.0.0...conventional-recommended-bump@6.0.1) (2019-10-02)
**Note:** Version bump only for package conventional-recommended-bump

View File

@ -1,6 +1,6 @@
{
"name": "conventional-recommended-bump",
"version": "6.0.2",
"version": "6.0.5",
"description": "Get a recommended version bump based on conventional commits",
"bugs": {
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
@ -32,17 +32,17 @@
],
"dependencies": {
"concat-stream": "^2.0.0",
"conventional-changelog-preset-loader": "^2.2.0",
"conventional-changelog-preset-loader": "^2.3.0",
"conventional-commits-filter": "^2.0.2",
"conventional-commits-parser": "^3.0.5",
"conventional-commits-parser": "^3.0.8",
"git-raw-commits": "2.0.0",
"git-semver-tags": "^3.0.0",
"meow": "^4.0.0",
"git-semver-tags": "^3.0.1",
"meow": "^5.0.0",
"q": "^1.5.1"
},
"scripts": {
"test-windows": "mocha --timeout 30000 ./test/preset-resolver.spec.js"
},
"bin": "cli.js",
"gitHead": "7c1c8ad819b05c12c7d58c92ac386b45ada6f6a8"
"gitHead": "79217815a7ce5f3d3f833961ce9a14bd454e5789"
}

View File

@ -0,0 +1,96 @@
'use strict';
const path = require('path');
const buildMinimistOptions = require('minimist-options');
const minimist = require('minimist');
const camelcaseKeys = require('camelcase-keys');
const decamelizeKeys = require('decamelize-keys');
const trimNewlines = require('trim-newlines');
const redent = require('redent');
const readPkgUp = require('read-pkg-up');
const loudRejection = require('loud-rejection');
const normalizePackageData = require('normalize-package-data');
// Prevent caching of this module so module.parent is always accurate
delete require.cache[__filename];
const parentDir = path.dirname(module.parent.filename);
module.exports = (helpMessage, opts) => {
loudRejection();
if (typeof helpMessage === 'object' && !Array.isArray(helpMessage)) {
opts = helpMessage;
helpMessage = '';
}
opts = Object.assign({
pkg: readPkgUp.sync({
cwd: parentDir,
normalize: false
}).pkg || {},
argv: process.argv.slice(2),
inferType: false,
input: 'string',
help: helpMessage,
autoHelp: true,
autoVersion: true
}, opts);
let minimistOpts = Object.assign({
arguments: opts.input
}, opts.flags);
minimistOpts = decamelizeKeys(minimistOpts, '-', {exclude: ['stopEarly', '--']});
if (opts.inferType) {
delete minimistOpts.arguments;
}
minimistOpts = buildMinimistOptions(minimistOpts);
const pkg = opts.pkg;
const argv = minimist(opts.argv, minimistOpts);
let help = redent(trimNewlines((opts.help || '').replace(/\t+\n*$/, '')), 2);
normalizePackageData(pkg);
process.title = pkg.bin ? Object.keys(pkg.bin)[0] : pkg.name;
let description = opts.description;
if (!description && description !== false) {
description = pkg.description;
}
help = (description ? `\n ${description}\n` : '') + (help ? `\n${help}\n` : '\n');
const showHelp = code => {
console.log(help);
process.exit(typeof code === 'number' ? code : 2);
};
const showVersion = () => {
console.log(typeof opts.version === 'string' ? opts.version : pkg.version);
process.exit();
};
if (argv.version && opts.autoVersion) {
showVersion();
}
if (argv.help && opts.autoHelp) {
showHelp(0);
}
const input = argv._;
delete argv._;
const flags = camelcaseKeys(argv, {exclude: ['--', /^\w$/]});
return {
input,
flags,
pkg,
help,
showHelp,
showVersion
};
};

View File

@ -1,7 +1,9 @@
Copyright 2019 GitHub
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.
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.

View File

@ -0,0 +1,62 @@
{
"name": "meow",
"version": "4.0.1",
"description": "CLI app helper",
"license": "MIT",
"repository": "sindresorhus/meow",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"cli",
"bin",
"util",
"utility",
"helper",
"argv",
"command",
"line",
"meow",
"cat",
"kitten",
"parser",
"option",
"flags",
"input",
"cmd",
"console"
],
"dependencies": {
"camelcase-keys": "^4.0.0",
"decamelize-keys": "^1.0.0",
"loud-rejection": "^1.0.0",
"minimist": "^1.1.3",
"minimist-options": "^3.0.1",
"normalize-package-data": "^2.3.4",
"read-pkg-up": "^3.0.0",
"redent": "^2.0.0",
"trim-newlines": "^2.0.0"
},
"devDependencies": {
"ava": "*",
"execa": "^0.8.0",
"indent-string": "^3.0.0",
"xo": "*"
},
"xo": {
"rules": {
"unicorn/no-process-exit": "off"
}
}
}

View File

@ -0,0 +1,197 @@
# meow [![Build Status](https://travis-ci.org/sindresorhus/meow.svg?branch=master)](https://travis-ci.org/sindresorhus/meow)
> CLI app helper
![](meow.gif)
## Features
- Parses arguments
- Converts flags to [camelCase](https://github.com/sindresorhus/camelcase)
- Outputs version when `--version`
- Outputs description and supplied help text when `--help`
- Makes unhandled rejected promises [fail loudly](https://github.com/sindresorhus/loud-rejection) instead of the default silent fail
- Sets the process title to the binary name defined in package.json
## Install
```
$ npm install meow
```
## Usage
```
$ ./foo-app.js unicorns --rainbow
```
```js
#!/usr/bin/env node
'use strict';
const meow = require('meow');
const foo = require('.');
const cli = meow(`
Usage
$ foo <input>
Options
--rainbow, -r Include a rainbow
Examples
$ foo unicorns --rainbow
🌈 unicorns 🌈
`, {
flags: {
rainbow: {
type: 'boolean',
alias: 'r'
}
}
});
/*
{
input: ['unicorns'],
flags: {rainbow: true},
...
}
*/
foo(cli.input[0], cli.flags);
```
## API
### meow(options, [minimistOptions])
Returns an `Object` with:
- `input` *(Array)* - Non-flag arguments
- `flags` *(Object)* - Flags converted to camelCase
- `pkg` *(Object)* - The `package.json` object
- `help` *(string)* - The help text used with `--help`
- `showHelp([code=2])` *(Function)* - Show the help text and exit with `code`
- `showVersion()` *(Function)* - Show the version text and exit
#### options
Type: `Object` `Array` `string`
Can either be a string/array that is the `help` or an options object.
##### flags
Type: `Object`
Define argument flags.
The key is the flag name and the value is an object with any of:
- `type`: Type of value. (Possible values: `string` `boolean`)
- `alias`: Usually used to define a short flag alias.
- `default`: Default value when the flag is not specified.
Example:
```js
flags: {
unicorn: {
type: 'string',
alias: 'u',
default: 'rainbow'
}
}
```
##### description
Type: `string` `boolean`<br>
Default: The package.json `"description"` property
Description to show above the help text.
Set it to `false` to disable it altogether.
##### help
Type: `string` `boolean`
The help text you want shown.
The input is reindented and starting/ending newlines are trimmed which means you can use a [template literal](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/template_strings) without having to care about using the correct amount of indent.
The description will be shown above your help text automatically.
##### version
Type: `string` `boolean`<br>
Default: The package.json `"version"` property
Set a custom version output.
##### autoHelp
Type: `boolean`<br>
Default: `true`
Automatically show the help text when the `--help` flag is present. Useful to set this value to `false` when a CLI manages child CLIs with their own help text.
##### autoVersion
Type: `boolean`<br>
Default: `true`
Automatically show the version text when the `--version` flag is present. Useful to set this value to `false` when a CLI manages child CLIs with their own version text.
##### pkg
Type: `Object`<br>
Default: Closest package.json upwards
package.json as an `Object`.
*You most likely don't need this option.*
##### argv
Type: `Array`<br>
Default: `process.argv.slice(2)`
Custom arguments object.
##### inferType
Type: `boolean`<br>
Default: `false`
Infer the argument type.
By default, the argument `5` in `$ foo 5` becomes a string. Enabling this would infer it as a number.
## Promises
Meow will make unhandled rejected promises [fail loudly](https://github.com/sindresorhus/loud-rejection) instead of the default silent fail. Meaning you don't have to manually `.catch()` promises used in your CLI.
## Tips
See [`chalk`](https://github.com/chalk/chalk) if you want to colorize the terminal output.
See [`get-stdin`](https://github.com/sindresorhus/get-stdin) if you want to accept input from stdin.
See [`conf`](https://github.com/sindresorhus/conf) if you need to persist some data.
See [`update-notifier`](https://github.com/yeoman/update-notifier) if you want update notifications.
[More useful CLI utilities…](https://github.com/sindresorhus/awesome-nodejs#command-line-utilities)
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.0.1](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@3.0.0...git-semver-tags@3.0.1) (2019-11-14)
### Bug Fixes
* add types for cli flags ([#551](https://github.com/conventional-changelog/conventional-changelog/issues/551)) ([bf1d64a](https://github.com/conventional-changelog/conventional-changelog/commit/bf1d64aeaf8f262d4b2beec02d2aebb78df7343b))
# [3.0.0](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@2.0.3...git-semver-tags@3.0.0) (2019-07-29)

20
node_modules/git-semver-tags/cli.js generated vendored
View File

@ -10,8 +10,24 @@ var args = meow(`
--cwd path to git repository to be searched
--lerna parse lerna style git tags
--package <name> when listing lerna style tags, filter by a package
--tagPrefix <prefix> prefix to remove from the tags during their processing`
)
--tagPrefix <prefix> prefix to remove from the tags during their processing`,
{
booleanDefault: undefined,
flags: {
cwd: {
type: 'string'
},
lerna: {
type: 'boolean'
},
package: {
type: 'string'
},
tagPrefix: {
type: 'string'
}
}
})
gitSemverTags({
lernaTags: args.flags.lerna,

View File

@ -1,6 +1,6 @@
{
"name": "git-semver-tags",
"version": "3.0.0",
"version": "3.0.1",
"description": "Get all git semver tags of your repository in reverse chronological order",
"bugs": {
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
@ -32,7 +32,7 @@
"git"
],
"dependencies": {
"meow": "^4.0.0",
"meow": "^5.0.0",
"semver": "^6.0.0"
},
"scripts": {
@ -41,5 +41,5 @@
"bin": {
"git-semver-tags": "cli.js"
},
"gitHead": "dadbbf8b1acbe4b3a8f345633bde3f4a4ad0bea4"
"gitHead": "79217815a7ce5f3d3f833961ce9a14bd454e5789"
}

17
node_modules/is-text-path/index.d.ts generated vendored
View File

@ -1,17 +0,0 @@
/**
Check if a file path is a text file.
@example
```
import isTextPath = require('is-text-path');
isTextPath('source/unicorn.txt');
//=> true
isTextPath('source/unicorn.png');
//=> false
```
*/
declare function isTextPath(filepath: string): boolean;
export = isTextPath;

13
node_modules/is-text-path/index.js generated vendored
View File

@ -1,7 +1,12 @@
'use strict';
const path = require('path');
const textExtensions = require('text-extensions');
var path = require('path');
var textExtensions = require('text-extensions');
var exts = Object.create(null);
const extensions = new Set(textExtensions);
textExtensions.forEach(function (el) {
exts[el] = true;
});
module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase());
module.exports = function (filepath) {
return path.extname(filepath).slice(1).toLowerCase() in exts;
};

20
node_modules/is-text-path/license generated vendored
View File

@ -1,9 +1,21 @@
MIT License
The MIT License (MIT)
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:
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 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.
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.

View File

@ -1,40 +1,39 @@
{
"name": "is-text-path",
"version": "2.0.0",
"description": "Check if a file path is a text file",
"license": "MIT",
"repository": "sindresorhus/is-text-path",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"text",
"extensions",
"extension",
"file",
"path",
"check",
"detect",
"is"
],
"dependencies": {
"text-extensions": "^2.0.0"
},
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
"name": "is-text-path",
"version": "1.0.1",
"description": "Check if a filepath is a text file",
"license": "MIT",
"repository": "sindresorhus/is-text-path",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "node test.js"
},
"files": [
"index.js"
],
"keywords": [
"txt",
"text",
"ext",
"extensions",
"extension",
"file",
"path",
"check",
"detect",
"is"
],
"dependencies": {
"text-extensions": "^1.0.0"
},
"devDependencies": {
"ava": "0.0.4"
}
}

14
node_modules/is-text-path/readme.md generated vendored
View File

@ -1,24 +1,24 @@
# is-text-path [![Build Status](https://travis-ci.org/sindresorhus/is-text-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-text-path)
> Check if a file path is a text file
> Check if a filepath is a text file
## Install
```
$ npm install is-text-path
$ npm install --save is-text-path
```
## Usage
```js
const isTextPath = require('is-text-path');
var isTextPath = require('is-text-path');
isTextPath('source/unicorn.txt');
isTextPath('src/unicorn.txt');
//=> true
isTextPath('source/unicorn.png');
isTextPath('src/unicorn.png');
//=> false
```
@ -26,9 +26,9 @@ isTextPath('source/unicorn.png');
## Related
- [`text-extensions`](https://github.com/sindresorhus/text-extensions) - List of text file extensions
- [`is-binary-path`](https://github.com/sindresorhus/is-binary-path) - Check if a file path is a binary file
- [`is-binary-path`](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)
MIT © [Sindre Sorhus](http://sindresorhus.com)

58
node_modules/meow/index.js generated vendored
View File

@ -1,7 +1,7 @@
'use strict';
const path = require('path');
const buildMinimistOptions = require('minimist-options');
const minimist = require('minimist');
const yargs = require('yargs-parser');
const camelcaseKeys = require('camelcase-keys');
const decamelizeKeys = require('decamelize-keys');
const trimNewlines = require('trim-newlines');
@ -14,15 +14,15 @@ const normalizePackageData = require('normalize-package-data');
delete require.cache[__filename];
const parentDir = path.dirname(module.parent.filename);
module.exports = (helpMessage, opts) => {
module.exports = (helpMessage, options) => {
loudRejection();
if (typeof helpMessage === 'object' && !Array.isArray(helpMessage)) {
opts = helpMessage;
options = helpMessage;
helpMessage = '';
}
opts = Object.assign({
options = Object.assign({
pkg: readPkgUp.sync({
cwd: parentDir,
normalize: false
@ -32,32 +32,48 @@ module.exports = (helpMessage, opts) => {
input: 'string',
help: helpMessage,
autoHelp: true,
autoVersion: true
}, opts);
autoVersion: true,
booleanDefault: false
}, options);
let minimistOpts = Object.assign({
arguments: opts.input
}, opts.flags);
const minimistFlags = options.flags && typeof options.booleanDefault !== 'undefined' ? Object.keys(options.flags).reduce(
(flags, flag) => {
if (flags[flag].type === 'boolean' && !Object.prototype.hasOwnProperty.call(flags[flag], 'default')) {
flags[flag].default = options.booleanDefault;
}
minimistOpts = decamelizeKeys(minimistOpts, '-', {exclude: ['stopEarly', '--']});
return flags;
},
options.flags
) : options.flags;
if (opts.inferType) {
delete minimistOpts.arguments;
let minimistoptions = Object.assign({
arguments: options.input
}, minimistFlags);
minimistoptions = decamelizeKeys(minimistoptions, '-', {exclude: ['stopEarly', '--']});
if (options.inferType) {
delete minimistoptions.arguments;
}
minimistOpts = buildMinimistOptions(minimistOpts);
minimistoptions = buildMinimistOptions(minimistoptions);
const pkg = opts.pkg;
const argv = minimist(opts.argv, minimistOpts);
let help = redent(trimNewlines((opts.help || '').replace(/\t+\n*$/, '')), 2);
if (minimistoptions['--']) {
minimistoptions.configuration = Object.assign({}, minimistoptions.configuration, {'populate--': true});
}
const {pkg} = options;
const argv = yargs(options.argv, minimistoptions);
let help = redent(trimNewlines((options.help || '').replace(/\t+\n*$/, '')), 2);
normalizePackageData(pkg);
process.title = pkg.bin ? Object.keys(pkg.bin)[0] : pkg.name;
let description = opts.description;
let {description} = options;
if (!description && description !== false) {
description = pkg.description;
({description} = pkg);
}
help = (description ? `\n ${description}\n` : '') + (help ? `\n${help}\n` : '\n');
@ -68,15 +84,15 @@ module.exports = (helpMessage, opts) => {
};
const showVersion = () => {
console.log(typeof opts.version === 'string' ? opts.version : pkg.version);
console.log(typeof options.version === 'string' ? options.version : pkg.version);
process.exit();
};
if (argv.version && opts.autoVersion) {
if (argv.version && options.autoVersion) {
showVersion();
}
if (argv.help && opts.autoHelp) {
if (argv.help && options.autoHelp) {
showHelp(0);
}

10
node_modules/meow/package.json generated vendored
View File

@ -1,6 +1,6 @@
{
"name": "meow",
"version": "4.0.1",
"version": "5.0.0",
"description": "CLI app helper",
"license": "MIT",
"repository": "sindresorhus/meow",
@ -10,7 +10,7 @@
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"scripts": {
"test": "xo && ava"
@ -41,16 +41,16 @@
"camelcase-keys": "^4.0.0",
"decamelize-keys": "^1.0.0",
"loud-rejection": "^1.0.0",
"minimist": "^1.1.3",
"minimist-options": "^3.0.1",
"normalize-package-data": "^2.3.4",
"read-pkg-up": "^3.0.0",
"redent": "^2.0.0",
"trim-newlines": "^2.0.0"
"trim-newlines": "^2.0.0",
"yargs-parser": "^10.0.0"
},
"devDependencies": {
"ava": "*",
"execa": "^0.8.0",
"execa": "^0.10.0",
"indent-string": "^3.0.0",
"xo": "*"
},

49
node_modules/meow/readme.md generated vendored
View File

@ -173,6 +173,55 @@ Infer the argument type.
By default, the argument `5` in `$ foo 5` becomes a string. Enabling this would infer it as a number.
##### booleanDefault
Type: `boolean` `null` `undefined`<br>
Default: `false`
Value of `boolean` flags not defined in `argv`.
If set to `undefined` the flags not defined in `argv` will be excluded from the result.
The `default` value set in `boolean` flags take precedence over `booleanDefault`.
Example:
```js
const cli = meow(`
Usage
$ foo
Options
--rainbow, -r Include a rainbow
--unicorn, -r Include a unicorn
Examples
$ foo
🌈 unicorns 🌈
`, {
booleanDefault: undefined,
flags: {
rainbow: {
type: 'boolean',
default: true
alias: 'r'
},
unicorn: {
type: 'boolean',
default: false
alias: 'u'
},
cake: {
type: 'boolean',
alias: 'c'
}
}
});
/*
{
flags: {rainbow: true, unicorn: false},
}
*/
```
## Promises

View File

@ -1,14 +0,0 @@
/**
List of text file extensions.
@example
```
import textExtensions = require('text-extensions');
console.log(textExtensions);
//=> ['asp', 'aspx', …]
```
*/
declare const textExtensions: readonly string[];
export = textExtensions;

View File

@ -1,3 +0,0 @@
'use strict';
module.exports = require('./text-extensions.json');

View File

@ -1,6 +1,6 @@
{
"name": "text-extensions",
"version": "2.0.0",
"version": "1.9.0",
"description": "List of text file extensions",
"license": "MIT",
"repository": "sindresorhus/text-extensions",
@ -9,21 +9,20 @@
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"main": "text-extensions.json",
"engines": {
"node": ">=8"
"node": ">=0.10"
},
"scripts": {
"test": "xo && ava && tsd"
"test": ""
},
"files": [
"index.js",
"index.d.ts",
"text-extensions.json",
"text-extensions.json.d.ts"
"text-extensions.json"
],
"keywords": [
"text",
"ascii",
"ext",
"extensions",
"extension",
"file",
@ -32,8 +31,6 @@
"array"
],
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
"ava": "*"
}
}

View File

@ -2,7 +2,7 @@
> List of text file extensions
The list is just a [JSON file](text-extensions.json) and can be used anywhere.
The list is just a [JSON file](text-extensions.json) and can be used wherever.
## Install
@ -18,13 +18,13 @@ $ npm install text-extensions
const textExtensions = require('text-extensions');
console.log(textExtensions);
//=> ['asp', 'aspx', ]
//=> ['asp', 'aspx', ...]
```
## Related
- [is-text-path](https://github.com/sindresorhus/is-text-path) - Check if a file path is a text file
- [is-text-path](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file
- [binary-extensions](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions

View File

@ -1,27 +1,11 @@
[
"ada",
"adb",
"ads",
"applescript",
"au3",
"as",
"asc",
"ascx",
"ascii",
"asm",
"asmx",
"asp",
"aspx",
"atom",
"awk",
"bas",
"bash",
"bashrc",
"bat",
"bbcolors",
"bcp",
"bdsgroup",
"bdsproj",
"bib",
"bowerrc",
"c",
@ -30,201 +14,86 @@
"cfc",
"cfg",
"cfm",
"cfml",
"cgi",
"clj",
"cljs",
"cls",
"cmake",
"cmd",
"cnf",
"cob",
"code-snippets",
"coffee",
"coffeekup",
"conf",
"cp",
"cpp",
"cpt",
"cpy",
"crt",
"cs",
"csh",
"cson",
"csproj",
"csr",
"css",
"csslintrc",
"csv",
"ctl",
"curlrc",
"cxx",
"d",
"dart",
"dfm",
"diff",
"dof",
"dpk",
"dpr",
"dproj",
"dtd",
"eco",
"editorconfig",
"ejs",
"el",
"elm",
"emacs",
"eml",
"ent",
"erb",
"erl",
"eslintignore",
"eslintrc",
"ex",
"exs",
"f",
"f03",
"f77",
"f90",
"f95",
"fish",
"for",
"fpp",
"frm",
"fs",
"fsproj",
"fsx",
"ftn",
"gemrc",
"gemspec",
"gitattributes",
"gitconfig",
"gitignore",
"gitkeep",
"gitmodules",
"go",
"gpp",
"gradle",
"groovy",
"groupproj",
"grunit",
"gtmpl",
"gvimrc",
"h",
"haml",
"hbs",
"hgignore",
"hh",
"hrl",
"hpp",
"hs",
"hta",
"htaccess",
"htc",
"htm",
"html",
"htpasswd",
"hxx",
"iced",
"iml",
"inc",
"ini",
"ino",
"int",
"irbrc",
"itcl",
"itermcolors",
"itk",
"jade",
"java",
"jhtm",
"jhtml",
"js",
"jscsrc",
"jshintignore",
"jshintrc",
"json",
"json5",
"jsonld",
"jsp",
"jspx",
"jsx",
"ksh",
"less",
"lhs",
"lisp",
"log",
"ls",
"lsp",
"lua",
"m",
"m4",
"mak",
"map",
"markdown",
"master",
"md",
"mdown",
"mdwn",
"mdx",
"metadata",
"mht",
"mhtml",
"mjs",
"mk",
"mkd",
"mkdn",
"mkdown",
"ml",
"mli",
"mm",
"mxml",
"nfm",
"nfo",
"noon",
"npmignore",
"npmrc",
"nuspec",
"nvmrc",
"ops",
"pas",
"pasm",
"patch",
"pbxproj",
"pch",
"pem",
"pg",
"php",
"php3",
"php4",
"php5",
"phpt",
"phtml",
"pir",
"pl",
"pm",
"pmc",
"pod",
"pot",
"prettierrc",
"properties",
"props",
"pt",
"pug",
"purs",
"py",
"pyx",
"r",
"rake",
"rb",
"rbw",
"rc",
"rdoc",
"rdoc_options",
"resx",
"rexx",
"rhtml",
"rjs",
"rlib",
"ron",
"rs",
@ -232,26 +101,15 @@
"rst",
"rtf",
"rvmrc",
"rxml",
"s",
"sass",
"scala",
"scm",
"scss",
"seestyle",
"sh",
"shtml",
"sln",
"sls",
"spec",
"sql",
"sqlite",
"sqlproj",
"ss",
"sss",
"st",
"strings",
"sty",
"styl",
"stylus",
"sub",
@ -264,57 +122,27 @@
"sublime-project",
"sublime-settings",
"sublime-workspace",
"sv",
"svc",
"svg",
"swift",
"t",
"tcl",
"tcsh",
"terminal",
"tex",
"text",
"textile",
"tg",
"tk",
"tmLanguage",
"tmTheme",
"tmpl",
"tpl",
"ts",
"tsv",
"tsx",
"tt",
"tt2",
"ttml",
"twig",
"txt",
"v",
"vb",
"vbproj",
"vbs",
"vcproj",
"vcxproj",
"vh",
"vhd",
"vhdl",
"vim",
"viminfo",
"vimrc",
"vm",
"vue",
"webapp",
"x-php",
"wsc",
"xaml",
"xht",
"xhtml",
"xml",
"xs",
"xsd",
"xsl",
"xslt",
"y",
"yaml",
"yml",
"zsh",

View File

@ -1,3 +0,0 @@
declare const textExtensionsJson: readonly string[];
export = textExtensionsJson;

353
node_modules/yargs-parser/CHANGELOG.md generated vendored 100644
View File

@ -0,0 +1,353 @@
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
<a name="10.1.0"></a>
# [10.1.0](https://github.com/yargs/yargs-parser/compare/v10.0.0...v10.1.0) (2018-06-29)
### Features
* add `set-placeholder-key` configuration ([#123](https://github.com/yargs/yargs-parser/issues/123)) ([19386ee](https://github.com/yargs/yargs-parser/commit/19386ee))
<a name="10.0.0"></a>
# [10.0.0](https://github.com/yargs/yargs-parser/compare/v9.0.2...v10.0.0) (2018-04-04)
### Bug Fixes
* do not set boolean flags if not defined in `argv` ([#119](https://github.com/yargs/yargs-parser/issues/119)) ([f6e6599](https://github.com/yargs/yargs-parser/commit/f6e6599))
### BREAKING CHANGES
* `boolean` flags defined without a `default` value will now behave like other option type and won't be set in the parsed results when the user doesn't set the corresponding CLI arg.
Previous behavior:
```js
var parse = require('yargs-parser');
parse('--flag', {boolean: ['flag']});
// => { _: [], flag: true }
parse('--no-flag', {boolean: ['flag']});
// => { _: [], flag: false }
parse('', {boolean: ['flag']});
// => { _: [], flag: false }
```
New behavior:
```js
var parse = require('yargs-parser');
parse('--flag', {boolean: ['flag']});
// => { _: [], flag: true }
parse('--no-flag', {boolean: ['flag']});
// => { _: [], flag: false }
parse('', {boolean: ['flag']});
// => { _: [] } => flag not set similarly to other option type
```
<a name="9.0.2"></a>
## [9.0.2](https://github.com/yargs/yargs-parser/compare/v9.0.1...v9.0.2) (2018-01-20)
### Bug Fixes
* nargs was still aggressively consuming too many arguments ([9b28aad](https://github.com/yargs/yargs-parser/commit/9b28aad))
<a name="9.0.1"></a>
## [9.0.1](https://github.com/yargs/yargs-parser/compare/v9.0.0...v9.0.1) (2018-01-20)
### Bug Fixes
* nargs was consuming too many arguments ([4fef206](https://github.com/yargs/yargs-parser/commit/4fef206))
<a name="9.0.0"></a>
# [9.0.0](https://github.com/yargs/yargs-parser/compare/v8.1.0...v9.0.0) (2018-01-20)
### Features
* narg arguments no longer consume flag arguments ([#114](https://github.com/yargs/yargs-parser/issues/114)) ([60bb9b3](https://github.com/yargs/yargs-parser/commit/60bb9b3))
### BREAKING CHANGES
* arguments of form --foo, -abc, will no longer be consumed by nargs
<a name="8.1.0"></a>
# [8.1.0](https://github.com/yargs/yargs-parser/compare/v8.0.0...v8.1.0) (2017-12-20)
### Bug Fixes
* allow null config values ([#108](https://github.com/yargs/yargs-parser/issues/108)) ([d8b14f9](https://github.com/yargs/yargs-parser/commit/d8b14f9))
* ensure consistent parsing of dot-notation arguments ([#102](https://github.com/yargs/yargs-parser/issues/102)) ([c9bd79c](https://github.com/yargs/yargs-parser/commit/c9bd79c))
* implement [@antoniom](https://github.com/antoniom)'s fix for camel-case expansion ([3087e1d](https://github.com/yargs/yargs-parser/commit/3087e1d))
* only run coercion functions once, despite aliases. ([#76](https://github.com/yargs/yargs-parser/issues/76)) ([#103](https://github.com/yargs/yargs-parser/issues/103)) ([507aaef](https://github.com/yargs/yargs-parser/commit/507aaef))
* scientific notation circumvented bounds check ([#110](https://github.com/yargs/yargs-parser/issues/110)) ([3571f57](https://github.com/yargs/yargs-parser/commit/3571f57))
* tokenizer should ignore spaces at the beginning of the argString ([#106](https://github.com/yargs/yargs-parser/issues/106)) ([f34ead9](https://github.com/yargs/yargs-parser/commit/f34ead9))
### Features
* make combining arrays a configurable option ([#111](https://github.com/yargs/yargs-parser/issues/111)) ([c8bf536](https://github.com/yargs/yargs-parser/commit/c8bf536))
* merge array from arguments with array from config ([#83](https://github.com/yargs/yargs-parser/issues/83)) ([806ddd6](https://github.com/yargs/yargs-parser/commit/806ddd6))
<a name="8.0.0"></a>
# [8.0.0](https://github.com/yargs/yargs-parser/compare/v7.0.0...v8.0.0) (2017-10-05)
### Bug Fixes
* Ignore multiple spaces between arguments. ([#100](https://github.com/yargs/yargs-parser/issues/100)) ([d137227](https://github.com/yargs/yargs-parser/commit/d137227))
### Features
* allow configuration of prefix for boolean negation ([#94](https://github.com/yargs/yargs-parser/issues/94)) ([00bde7d](https://github.com/yargs/yargs-parser/commit/00bde7d))
* reworking how numbers are parsed ([#104](https://github.com/yargs/yargs-parser/issues/104)) ([fba00eb](https://github.com/yargs/yargs-parser/commit/fba00eb))
### BREAKING CHANGES
* strings that fail `Number.isSafeInteger()` are no longer coerced into numbers.
<a name="7.0.0"></a>
# [7.0.0](https://github.com/yargs/yargs-parser/compare/v6.0.1...v7.0.0) (2017-05-02)
### Chores
* revert populate-- logic ([#91](https://github.com/yargs/yargs-parser/issues/91)) ([6003e6d](https://github.com/yargs/yargs-parser/commit/6003e6d))
### BREAKING CHANGES
* populate-- now defaults to false.
<a name="6.0.1"></a>
## [6.0.1](https://github.com/yargs/yargs-parser/compare/v6.0.0...v6.0.1) (2017-05-01)
### Bug Fixes
* default '--' to undefined when not provided; this is closer to the array API ([#90](https://github.com/yargs/yargs-parser/issues/90)) ([4e739cc](https://github.com/yargs/yargs-parser/commit/4e739cc))
<a name="6.0.0"></a>
# [6.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v6.0.0) (2017-05-01)
### Bug Fixes
* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f))
* parsing hints should apply for dot notation keys ([#86](https://github.com/yargs/yargs-parser/issues/86)) ([3e47d62](https://github.com/yargs/yargs-parser/commit/3e47d62))
### Chores
* upgrade to newest version of camelcase ([#87](https://github.com/yargs/yargs-parser/issues/87)) ([f1903aa](https://github.com/yargs/yargs-parser/commit/f1903aa))
### Features
* add -- option which allows arguments after the -- flag to be returned separated from positional arguments ([#84](https://github.com/yargs/yargs-parser/issues/84)) ([2572ca8](https://github.com/yargs/yargs-parser/commit/2572ca8))
* when parsing stops, we now populate "--" by default ([#88](https://github.com/yargs/yargs-parser/issues/88)) ([cd666db](https://github.com/yargs/yargs-parser/commit/cd666db))
### BREAKING CHANGES
* rather than placing arguments in "_", when parsing is stopped via "--"; we now populate an array called "--" by default.
* camelcase now requires Node 4+.
* environment variables will now override config files (args, env, config-file, config-object)
<a name="5.0.0"></a>
# [5.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v5.0.0) (2017-02-18)
### Bug Fixes
* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f))
### BREAKING CHANGES
* environment variables will now override config files (args, env, config-file, config-object)
<a name="4.2.1"></a>
## [4.2.1](https://github.com/yargs/yargs-parser/compare/v4.2.0...v4.2.1) (2017-01-02)
### Bug Fixes
* flatten/duplicate regression ([#75](https://github.com/yargs/yargs-parser/issues/75)) ([68d68a0](https://github.com/yargs/yargs-parser/commit/68d68a0))
<a name="4.2.0"></a>
# [4.2.0](https://github.com/yargs/yargs-parser/compare/v4.1.0...v4.2.0) (2016-12-01)
### Bug Fixes
* inner objects in configs had their keys appended to top-level key when dot-notation was disabled ([#72](https://github.com/yargs/yargs-parser/issues/72)) ([0b1b5f9](https://github.com/yargs/yargs-parser/commit/0b1b5f9))
### Features
* allow multiple arrays to be provided, rather than always combining ([#71](https://github.com/yargs/yargs-parser/issues/71)) ([0f0fb2d](https://github.com/yargs/yargs-parser/commit/0f0fb2d))
<a name="4.1.0"></a>
# [4.1.0](https://github.com/yargs/yargs-parser/compare/v4.0.2...v4.1.0) (2016-11-07)
### Features
* apply coercions to default options ([#65](https://github.com/yargs/yargs-parser/issues/65)) ([c79052b](https://github.com/yargs/yargs-parser/commit/c79052b))
* handle dot notation boolean options ([#63](https://github.com/yargs/yargs-parser/issues/63)) ([02c3545](https://github.com/yargs/yargs-parser/commit/02c3545))
<a name="4.0.2"></a>
## [4.0.2](https://github.com/yargs/yargs-parser/compare/v4.0.1...v4.0.2) (2016-09-30)
### Bug Fixes
* whoops, let's make the assign not change the Object key order ([29d069a](https://github.com/yargs/yargs-parser/commit/29d069a))
<a name="4.0.1"></a>
## [4.0.1](https://github.com/yargs/yargs-parser/compare/v4.0.0...v4.0.1) (2016-09-30)
### Bug Fixes
* lodash.assign was deprecated ([#59](https://github.com/yargs/yargs-parser/issues/59)) ([5e7eb11](https://github.com/yargs/yargs-parser/commit/5e7eb11))
<a name="4.0.0"></a>
# [4.0.0](https://github.com/yargs/yargs-parser/compare/v3.2.0...v4.0.0) (2016-09-26)
### Bug Fixes
* coerce should be applied to the final objects and arrays created ([#57](https://github.com/yargs/yargs-parser/issues/57)) ([4ca69da](https://github.com/yargs/yargs-parser/commit/4ca69da))
### BREAKING CHANGES
* coerce is no longer applied to individual arguments in an implicit array.
<a name="3.2.0"></a>
# [3.2.0](https://github.com/yargs/yargs-parser/compare/v3.1.0...v3.2.0) (2016-08-13)
### Features
* coerce full array instead of each element ([#51](https://github.com/yargs/yargs-parser/issues/51)) ([cc4dc56](https://github.com/yargs/yargs-parser/commit/cc4dc56))
<a name="3.1.0"></a>
# [3.1.0](https://github.com/yargs/yargs-parser/compare/v3.0.0...v3.1.0) (2016-08-09)
### Bug Fixes
* address pkgConf parsing bug outlined in [#37](https://github.com/yargs/yargs-parser/issues/37) ([#45](https://github.com/yargs/yargs-parser/issues/45)) ([be76ee6](https://github.com/yargs/yargs-parser/commit/be76ee6))
* better parsing of negative values ([#44](https://github.com/yargs/yargs-parser/issues/44)) ([2e43692](https://github.com/yargs/yargs-parser/commit/2e43692))
* check aliases when guessing defaults for arguments fixes [#41](https://github.com/yargs/yargs-parser/issues/41) ([#43](https://github.com/yargs/yargs-parser/issues/43)) ([f3e4616](https://github.com/yargs/yargs-parser/commit/f3e4616))
### Features
* added coerce option, for providing specialized argument parsing ([#42](https://github.com/yargs/yargs-parser/issues/42)) ([7b49cd2](https://github.com/yargs/yargs-parser/commit/7b49cd2))
<a name="3.0.0"></a>
# [3.0.0](https://github.com/yargs/yargs-parser/compare/v2.4.1...v3.0.0) (2016-08-07)
### Bug Fixes
* parsing issue with numeric character in group of options ([#19](https://github.com/yargs/yargs-parser/issues/19)) ([f743236](https://github.com/yargs/yargs-parser/commit/f743236))
* upgraded lodash.assign ([5d7fdf4](https://github.com/yargs/yargs-parser/commit/5d7fdf4))
### BREAKING CHANGES
* subtle change to how values are parsed in a group of single-character arguments.
* _first released in 3.1.0, better handling of negative values should be considered a breaking change._
<a name="2.4.1"></a>
## [2.4.1](https://github.com/yargs/yargs-parser/compare/v2.4.0...v2.4.1) (2016-07-16)
### Bug Fixes
* **count:** do not increment a default value ([#39](https://github.com/yargs/yargs-parser/issues/39)) ([b04a189](https://github.com/yargs/yargs-parser/commit/b04a189))
<a name="2.4.0"></a>
# [2.4.0](https://github.com/yargs/yargs-parser/compare/v2.3.0...v2.4.0) (2016-04-11)
### Features
* **environment:** Support nested options in environment variables ([#26](https://github.com/yargs/yargs-parser/issues/26)) thanks [@elas7](https://github.com/elas7) \o/ ([020778b](https://github.com/yargs/yargs-parser/commit/020778b))
<a name="2.3.0"></a>
# [2.3.0](https://github.com/yargs/yargs-parser/compare/v2.2.0...v2.3.0) (2016-04-09)
### Bug Fixes
* **boolean:** fix for boolean options with non boolean defaults (#20) ([2dbe86b](https://github.com/yargs/yargs-parser/commit/2dbe86b)), closes [(#20](https://github.com/(/issues/20)
* **package:** remove tests from tarball ([0353c0d](https://github.com/yargs/yargs-parser/commit/0353c0d))
* **parsing:** handle calling short option with an empty string as the next value. ([a867165](https://github.com/yargs/yargs-parser/commit/a867165))
* boolean flag when next value contains the strings 'true' or 'false'. ([69941a6](https://github.com/yargs/yargs-parser/commit/69941a6))
* update dependencies; add standard-version bin for next release (#24) ([822d9d5](https://github.com/yargs/yargs-parser/commit/822d9d5))
### Features
* **configuration:** Allow to pass configuration objects to yargs-parser ([0780900](https://github.com/yargs/yargs-parser/commit/0780900))
* **normalize:** allow normalize to work with arrays ([e0eaa1a](https://github.com/yargs/yargs-parser/commit/e0eaa1a))

14
node_modules/yargs-parser/LICENSE.txt generated vendored 100644
View File

@ -0,0 +1,14 @@
Copyright (c) 2016, Contributors
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice
appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

329
node_modules/yargs-parser/README.md generated vendored 100644
View File

@ -0,0 +1,329 @@
# yargs-parser
[![Build Status](https://travis-ci.org/yargs/yargs-parser.png)](https://travis-ci.org/yargs/yargs-parser)
[![Coverage Status](https://coveralls.io/repos/yargs/yargs-parser/badge.svg?branch=)](https://coveralls.io/r/yargs/yargs-parser?branch=master)
[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser)
[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/yargs-parser/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/yargs-parser)
[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)
The mighty option parser used by [yargs](https://github.com/yargs/yargs).
visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions.
<img width="250" src="https://raw.githubusercontent.com/yargs/yargs-parser/master/yargs-logo.png">
## Example
```sh
npm i yargs-parser --save
```
```js
var argv = require('yargs-parser')(process.argv.slice(2))
console.log(argv)
```
```sh
node example.js --foo=33 --bar hello
{ _: [], foo: 33, bar: 'hello' }
```
_or parse a string!_
```js
var argv = require('./')('--foo=99 --bar=33')
console.log(argv)
```
```sh
{ _: [], foo: 99, bar: 33 }
```
Convert an array of mixed types before passing to `yargs-parser`:
```js
var parse = require('yargs-parser')
parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string
parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings
```
## API
### require('yargs-parser')(args, opts={})
Parses command line arguments returning a simple mapping of keys and values.
**expects:**
* `args`: a string or array of strings representing the options to parse.
* `opts`: provide a set of hints indicating how `args` should be parsed:
* `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`.
* `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.
* `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`.
* `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed).
* `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided
(or throws an error), e.g. `{coerce: {foo: function (arg) {return modifiedArg}}}`.
* `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`.
* `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`.
* `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed.
* `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`.
* `opts.normalize`: `path.normalize()` will be applied to values set to this key.
* `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`).
* `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)).
* `opts.number`: keys should be treated as numbers.
* `opts['--']`: arguments after the end-of-options flag `--` will be set to the `argv.['--']` array instead of being set to the `argv._` array.
**returns:**
* `obj`: an object representing the parsed value of `args`
* `key/value`: key value pairs for each argument and their aliases.
* `_`: an array representing the positional arguments.
* [optional] `--`: an array with arguments after the end-of-options flag `--`.
### require('yargs-parser').detailed(args, opts={})
Parses a command line string, returning detailed information required by the
yargs engine.
**expects:**
* `args`: a string or array of strings representing options to parse.
* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`.
**returns:**
* `argv`: an object representing the parsed value of `args`
* `key/value`: key value pairs for each argument and their aliases.
* `_`: an array representing the positional arguments.
* `error`: populated with an error object if an exception occurred during parsing.
* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`.
* `newAliases`: any new aliases added via camel-case expansion.
* `configuration`: the configuration loaded from the `yargs` stanza in package.json.
<a name="configuration"></a>
### Configuration
The yargs-parser applies several automated transformations on the keys provided
in `args`. These features can be turned on and off using the `configuration` field
of `opts`.
```js
var parsed = parser(['--no-dice'], {
configuration: {
'boolean-negation': false
}
})
```
### short option groups
* default: `true`.
* key: `short-option-groups`.
Should a group of short-options be treated as boolean flags?
```sh
node example.js -abc
{ _: [], a: true, b: true, c: true }
```
_if disabled:_
```sh
node example.js -abc
{ _: [], abc: true }
```
### camel-case expansion
* default: `true`.
* key: `camel-case-expansion`.
Should hyphenated arguments be expanded into camel-case aliases?
```sh
node example.js --foo-bar
{ _: [], 'foo-bar': true, fooBar: true }
```
_if disabled:_
```sh
node example.js --foo-bar
{ _: [], 'foo-bar': true }
```
### dot-notation
* default: `true`
* key: `dot-notation`
Should keys that contain `.` be treated as objects?
```sh
node example.js --foo.bar
{ _: [], foo: { bar: true } }
```
_if disabled:_
```sh
node example.js --foo.bar
{ _: [], "foo.bar": true }
```
### parse numbers
* default: `true`
* key: `parse-numbers`
Should keys that look like numbers be treated as such?
```sh
node example.js --foo=99.3
{ _: [], foo: 99.3 }
```
_if disabled:_
```sh
node example.js --foo=99.3
{ _: [], foo: "99.3" }
```
### boolean negation
* default: `true`
* key: `boolean-negation`
Should variables prefixed with `--no` be treated as negations?
```sh
node example.js --no-foo
{ _: [], foo: false }
```
_if disabled:_
```sh
node example.js --no-foo
{ _: [], "no-foo": true }
```
### combine arrays
* default: `false`
* key: `combine-arrays`
Should arrays be combined when provided by both command line arguments and
a configuration file.
### duplicate arguments array
* default: `true`
* key: `duplicate-arguments-array`
Should arguments be coerced into an array when duplicated:
```sh
node example.js -x 1 -x 2
{ _: [], x: [1, 2] }
```
_if disabled:_
```sh
node example.js -x 1 -x 2
{ _: [], x: 2 }
```
### flatten duplicate arrays
* default: `true`
* key: `flatten-duplicate-arrays`
Should array arguments be coerced into a single array when duplicated:
```sh
node example.js -x 1 2 -x 3 4
{ _: [], x: [1, 2, 3, 4] }
```
_if disabled:_
```sh
node example.js -x 1 2 -x 3 4
{ _: [], x: [[1, 2], [3, 4]] }
```
### negation prefix
* default: `no-`
* key: `negation-prefix`
The prefix to use for negated boolean variables.
```sh
node example.js --no-foo
{ _: [], foo: false }
```
_if set to `quux`:_
```sh
node example.js --quuxfoo
{ _: [], foo: false }
```
### populate --
* default: `false`.
* key: `populate--`
Should unparsed flags be stored in `--` or `_`.
_If disabled:_
```sh
node example.js a -b -- x y
{ _: [ 'a', 'x', 'y' ], b: true }
```
_If enabled:_
```sh
node example.js a -b -- x y
{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true }
```
### set placeholder key
* default: `false`.
* key: `set-placeholder-key`.
Should a placeholder be added for keys not set via the corresponding CLI argument?
_If disabled:_
```sh
node example.js -a 1 -c 2
{ _: [], a: 1, c: 2 }
```
_If enabled:_
```sh
node example.js -a 1 -c 2
{ _: [], a: 1, b: undefined, c: 2 }
```
## Special Thanks
The yargs project evolves from optimist and minimist. It owes its
existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/
## License
ISC

833
node_modules/yargs-parser/index.js generated vendored 100644
View File

@ -0,0 +1,833 @@
var camelCase = require('camelcase')
var path = require('path')
var tokenizeArgString = require('./lib/tokenize-arg-string')
var util = require('util')
function parse (args, opts) {
if (!opts) opts = {}
// allow a string argument to be passed in rather
// than an argv array.
args = tokenizeArgString(args)
// aliases might have transitive relationships, normalize this.
var aliases = combineAliases(opts.alias || {})
var configuration = assign({
'short-option-groups': true,
'camel-case-expansion': true,
'dot-notation': true,
'parse-numbers': true,
'boolean-negation': true,
'negation-prefix': 'no-',
'duplicate-arguments-array': true,
'flatten-duplicate-arrays': true,
'populate--': false,
'combine-arrays': false,
'set-placeholder-key': false
}, opts.configuration)
var defaults = opts.default || {}
var configObjects = opts.configObjects || []
var envPrefix = opts.envPrefix
var notFlagsOption = configuration['populate--']
var notFlagsArgv = notFlagsOption ? '--' : '_'
var newAliases = {}
// allow a i18n handler to be passed in, default to a fake one (util.format).
var __ = opts.__ || function (str) {
return util.format.apply(util, Array.prototype.slice.call(arguments))
}
var error = null
var flags = {
aliases: {},
arrays: {},
bools: {},
strings: {},
numbers: {},
counts: {},
normalize: {},
configs: {},
defaulted: {},
nargs: {},
coercions: {},
keys: []
}
var negative = /^-[0-9]+(\.[0-9]+)?/
var negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)')
;[].concat(opts.array).filter(Boolean).forEach(function (key) {
flags.arrays[key] = true
flags.keys.push(key)
})
;[].concat(opts.boolean).filter(Boolean).forEach(function (key) {
flags.bools[key] = true
flags.keys.push(key)
})
;[].concat(opts.string).filter(Boolean).forEach(function (key) {
flags.strings[key] = true
flags.keys.push(key)
})
;[].concat(opts.number).filter(Boolean).forEach(function (key) {
flags.numbers[key] = true
flags.keys.push(key)
})
;[].concat(opts.count).filter(Boolean).forEach(function (key) {
flags.counts[key] = true
flags.keys.push(key)
})
;[].concat(opts.normalize).filter(Boolean).forEach(function (key) {
flags.normalize[key] = true
flags.keys.push(key)
})
Object.keys(opts.narg || {}).forEach(function (k) {
flags.nargs[k] = opts.narg[k]
flags.keys.push(k)
})
Object.keys(opts.coerce || {}).forEach(function (k) {
flags.coercions[k] = opts.coerce[k]
flags.keys.push(k)
})
if (Array.isArray(opts.config) || typeof opts.config === 'string') {
;[].concat(opts.config).filter(Boolean).forEach(function (key) {
flags.configs[key] = true
})
} else {
Object.keys(opts.config || {}).forEach(function (k) {
flags.configs[k] = opts.config[k]
})
}
// create a lookup table that takes into account all
// combinations of aliases: {f: ['foo'], foo: ['f']}
extendAliases(opts.key, aliases, opts.default, flags.arrays)
// apply default values to all aliases.
Object.keys(defaults).forEach(function (key) {
(flags.aliases[key] || []).forEach(function (alias) {
defaults[alias] = defaults[key]
})
})
var argv = { _: [] }
Object.keys(flags.bools).forEach(function (key) {
if (Object.prototype.hasOwnProperty.call(defaults, key)) {
setArg(key, defaults[key])
setDefaulted(key)
}
})
var notFlags = []
if (args.indexOf('--') !== -1) {
notFlags = args.slice(args.indexOf('--') + 1)
args = args.slice(0, args.indexOf('--'))
}
for (var i = 0; i < args.length; i++) {
var arg = args[i]
var broken
var key
var letters
var m
var next
var value
// -- seperated by =
if (arg.match(/^--.+=/) || (
!configuration['short-option-groups'] && arg.match(/^-.+=/)
)) {
// Using [\s\S] instead of . because js doesn't support the
// 'dotall' regex modifier. See:
// http://stackoverflow.com/a/1068308/13216
m = arg.match(/^--?([^=]+)=([\s\S]*)$/)
// nargs format = '--f=monkey washing cat'
if (checkAllAliases(m[1], flags.nargs)) {
args.splice(i + 1, 0, m[2])
i = eatNargs(i, m[1], args)
// arrays format = '--f=a b c'
} else if (checkAllAliases(m[1], flags.arrays) && args.length > i + 1) {
args.splice(i + 1, 0, m[2])
i = eatArray(i, m[1], args)
} else {
setArg(m[1], m[2])
}
} else if (arg.match(negatedBoolean) && configuration['boolean-negation']) {
key = arg.match(negatedBoolean)[1]
setArg(key, false)
// -- seperated by space.
} else if (arg.match(/^--.+/) || (
!configuration['short-option-groups'] && arg.match(/^-.+/)
)) {
key = arg.match(/^--?(.+)/)[1]
// nargs format = '--foo a b c'
if (checkAllAliases(key, flags.nargs)) {
i = eatNargs(i, key, args)
// array format = '--foo a b c'
} else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) {
i = eatArray(i, key, args)
} else {
next = args[i + 1]
if (next !== undefined && (!next.match(/^-/) ||
next.match(negative)) &&
!checkAllAliases(key, flags.bools) &&
!checkAllAliases(key, flags.counts)) {
setArg(key, next)
i++
} else if (/^(true|false)$/.test(next)) {
setArg(key, next)
i++
} else {
setArg(key, defaultForType(guessType(key, flags)))
}
}
// dot-notation flag seperated by '='.
} else if (arg.match(/^-.\..+=/)) {
m = arg.match(/^-([^=]+)=([\s\S]*)$/)
setArg(m[1], m[2])
// dot-notation flag seperated by space.
} else if (arg.match(/^-.\..+/)) {
next = args[i + 1]
key = arg.match(/^-(.\..+)/)[1]
if (next !== undefined && !next.match(/^-/) &&
!checkAllAliases(key, flags.bools) &&
!checkAllAliases(key, flags.counts)) {
setArg(key, next)
i++
} else {
setArg(key, defaultForType(guessType(key, flags)))
}
} else if (arg.match(/^-[^-]+/) && !arg.match(negative)) {
letters = arg.slice(1, -1).split('')
broken = false
for (var j = 0; j < letters.length; j++) {
next = arg.slice(j + 2)
if (letters[j + 1] && letters[j + 1] === '=') {
value = arg.slice(j + 3)
key = letters[j]
// nargs format = '-f=monkey washing cat'
if (checkAllAliases(key, flags.nargs)) {
args.splice(i + 1, 0, value)
i = eatNargs(i, key, args)
// array format = '-f=a b c'
} else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) {
args.splice(i + 1, 0, value)
i = eatArray(i, key, args)
} else {
setArg(key, value)
}
broken = true
break
}
if (next === '-') {
setArg(letters[j], next)
continue
}
// current letter is an alphabetic character and next value is a number
if (/[A-Za-z]/.test(letters[j]) &&
/^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
setArg(letters[j], next)
broken = true
break
}
if (letters[j + 1] && letters[j + 1].match(/\W/)) {
setArg(letters[j], next)
broken = true
break
} else {
setArg(letters[j], defaultForType(guessType(letters[j], flags)))
}
}
key = arg.slice(-1)[0]
if (!broken && key !== '-') {
// nargs format = '-f a b c'
if (checkAllAliases(key, flags.nargs)) {
i = eatNargs(i, key, args)
// array format = '-f a b c'
} else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) {
i = eatArray(i, key, args)
} else {
next = args[i + 1]
if (next !== undefined && (!/^(-|--)[^-]/.test(next) ||
next.match(negative)) &&
!checkAllAliases(key, flags.bools) &&
!checkAllAliases(key, flags.counts)) {
setArg(key, next)
i++
} else if (/^(true|false)$/.test(next)) {
setArg(key, next)
i++
} else {
setArg(key, defaultForType(guessType(key, flags)))
}
}
}
} else {
argv._.push(maybeCoerceNumber('_', arg))
}
}
// order of precedence:
// 1. command line arg
// 2. value from env var
// 3. value from config file
// 4. value from config objects
// 5. configured default value
applyEnvVars(argv, true) // special case: check env vars that point to config file
applyEnvVars(argv, false)
setConfig(argv)
setConfigObjects()
applyDefaultsAndAliases(argv, flags.aliases, defaults)
applyCoercions(argv)
if (configuration['set-placeholder-key']) setPlaceholderKeys(argv)
// for any counts either not in args or without an explicit default, set to 0
Object.keys(flags.counts).forEach(function (key) {
if (!hasKey(argv, key.split('.'))) setArg(key, 0)
})
// '--' defaults to undefined.
if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = []
notFlags.forEach(function (key) {
argv[notFlagsArgv].push(key)
})
// how many arguments should we consume, based
// on the nargs option?
function eatNargs (i, key, args) {
var ii
const toEat = checkAllAliases(key, flags.nargs)
// nargs will not consume flag arguments, e.g., -abc, --foo,
// and terminates when one is observed.
var available = 0
for (ii = i + 1; ii < args.length; ii++) {
if (!args[ii].match(/^-[^0-9]/)) available++
else break
}
if (available < toEat) error = Error(__('Not enough arguments following: %s', key))
const consumed = Math.min(available, toEat)
for (ii = i + 1; ii < (consumed + i + 1); ii++) {
setArg(key, args[ii])
}
return (i + consumed)
}
// if an option is an array, eat all non-hyphenated arguments
// following it... YUM!
// e.g., --foo apple banana cat becomes ["apple", "banana", "cat"]
function eatArray (i, key, args) {
var start = i + 1
var argsToSet = []
var multipleArrayFlag = i > 0
for (var ii = i + 1; ii < args.length; ii++) {
if (/^-/.test(args[ii]) && !negative.test(args[ii])) {
if (ii === start) {
setArg(key, defaultForType('array'))
}
multipleArrayFlag = true
break
}
i = ii
argsToSet.push(args[ii])
}
if (multipleArrayFlag) {
setArg(key, argsToSet.map(function (arg) {
return processValue(key, arg)
}))
} else {
argsToSet.forEach(function (arg) {
setArg(key, arg)
})
}
return i
}
function setArg (key, val) {
unsetDefaulted(key)
if (/-/.test(key) && configuration['camel-case-expansion']) {
addNewAlias(key, camelCase(key))
}
var value = processValue(key, val)
var splitKey = key.split('.')
setKey(argv, splitKey, value)
// handle populating aliases of the full key
if (flags.aliases[key]) {
flags.aliases[key].forEach(function (x) {
x = x.split('.')
setKey(argv, x, value)
})
}
// handle populating aliases of the first element of the dot-notation key
if (splitKey.length > 1 && configuration['dot-notation']) {
;(flags.aliases[splitKey[0]] || []).forEach(function (x) {
x = x.split('.')
// expand alias with nested objects in key
var a = [].concat(splitKey)
a.shift() // nuke the old key.
x = x.concat(a)
setKey(argv, x, value)
})
}
// Set normalize getter and setter when key is in 'normalize' but isn't an array
if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) {
var keys = [key].concat(flags.aliases[key] || [])
keys.forEach(function (key) {
argv.__defineSetter__(key, function (v) {
val = path.normalize(v)
})
argv.__defineGetter__(key, function () {
return typeof val === 'string' ? path.normalize(val) : val
})
})
}
}
function addNewAlias (key, alias) {
if (!(flags.aliases[key] && flags.aliases[key].length)) {
flags.aliases[key] = [alias]
newAliases[alias] = true
}
if (!(flags.aliases[alias] && flags.aliases[alias].length)) {
addNewAlias(alias, key)
}
}
function processValue (key, val) {
// handle parsing boolean arguments --foo=true --bar false.
if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {
if (typeof val === 'string') val = val === 'true'
}
var value = maybeCoerceNumber(key, val)
// increment a count given as arg (either no value or value parsed as boolean)
if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) {
value = increment
}
// Set normalized value when key is in 'normalize' and in 'arrays'
if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) {
if (Array.isArray(val)) value = val.map(path.normalize)
else value = path.normalize(val)
}
return value
}
function maybeCoerceNumber (key, value) {
if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.coercions)) {
const shouldCoerceNumber = isNumber(value) && configuration['parse-numbers'] && (
Number.isSafeInteger(Math.floor(value))
)
if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) value = Number(value)
}
return value
}
// set args from config.json file, this should be
// applied last so that defaults can be applied.
function setConfig (argv) {
var configLookup = {}
// expand defaults/aliases, in-case any happen to reference
// the config.json file.
applyDefaultsAndAliases(configLookup, flags.aliases, defaults)
Object.keys(flags.configs).forEach(function (configKey) {
var configPath = argv[configKey] || configLookup[configKey]
if (configPath) {
try {
var config = null
var resolvedConfigPath = path.resolve(process.cwd(), configPath)
if (typeof flags.configs[configKey] === 'function') {
try {
config = flags.configs[configKey](resolvedConfigPath)
} catch (e) {
config = e
}
if (config instanceof Error) {
error = config
return
}
} else {
config = require(resolvedConfigPath)
}
setConfigObject(config)
} catch (ex) {
if (argv[configKey]) error = Error(__('Invalid JSON config file: %s', configPath))
}
}
})
}
// set args from config object.
// it recursively checks nested objects.
function setConfigObject (config, prev) {
Object.keys(config).forEach(function (key) {
var value = config[key]
var fullKey = prev ? prev + '.' + key : key
// if the value is an inner object and we have dot-notation
// enabled, treat inner objects in config the same as
// heavily nested dot notations (foo.bar.apple).
if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) {
// if the value is an object but not an array, check nested object
setConfigObject(value, fullKey)
} else {
// setting arguments via CLI takes precedence over
// values within the config file.
if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey]) || (flags.arrays[fullKey] && configuration['combine-arrays'])) {
setArg(fullKey, value)
}
}
})
}
// set all config objects passed in opts
function setConfigObjects () {
if (typeof configObjects === 'undefined') return
configObjects.forEach(function (configObject) {
setConfigObject(configObject)
})
}
function applyEnvVars (argv, configOnly) {
if (typeof envPrefix === 'undefined') return
var prefix = typeof envPrefix === 'string' ? envPrefix : ''
Object.keys(process.env).forEach(function (envVar) {
if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) {
// get array of nested keys and convert them to camel case
var keys = envVar.split('__').map(function (key, i) {
if (i === 0) {
key = key.substring(prefix.length)
}
return camelCase(key)
})
if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && (!hasKey(argv, keys) || flags.defaulted[keys.join('.')])) {
setArg(keys.join('.'), process.env[envVar])
}
}
})
}
function applyCoercions (argv) {
var coerce
var applied = {}
Object.keys(argv).forEach(function (key) {
if (!applied.hasOwnProperty(key)) { // If we haven't already coerced this option via one of its aliases
coerce = checkAllAliases(key, flags.coercions)
if (typeof coerce === 'function') {
try {
var value = coerce(argv[key])
;([].concat(flags.aliases[key] || [], key)).forEach(ali => {
applied[ali] = argv[ali] = value
})
} catch (err) {
error = err
}
}
}
})
}
function setPlaceholderKeys (argv) {
flags.keys.forEach((key) => {
// don't set placeholder keys for dot notation options 'foo.bar'.
if (~key.indexOf('.')) return
if (typeof argv[key] === 'undefined') argv[key] = undefined
})
return argv
}
function applyDefaultsAndAliases (obj, aliases, defaults) {
Object.keys(defaults).forEach(function (key) {
if (!hasKey(obj, key.split('.'))) {
setKey(obj, key.split('.'), defaults[key])
;(aliases[key] || []).forEach(function (x) {
if (hasKey(obj, x.split('.'))) return
setKey(obj, x.split('.'), defaults[key])
})
}
})
}
function hasKey (obj, keys) {
var o = obj
if (!configuration['dot-notation']) keys = [keys.join('.')]
keys.slice(0, -1).forEach(function (key) {
o = (o[key] || {})
})
var key = keys[keys.length - 1]
if (typeof o !== 'object') return false
else return key in o
}
function setKey (obj, keys, value) {
var o = obj
if (!configuration['dot-notation']) keys = [keys.join('.')]
keys.slice(0, -1).forEach(function (key, index) {
if (typeof o === 'object' && o[key] === undefined) {
o[key] = {}
}
if (typeof o[key] !== 'object' || Array.isArray(o[key])) {
// ensure that o[key] is an array, and that the last item is an empty object.
if (Array.isArray(o[key])) {
o[key].push({})
} else {
o[key] = [o[key], {}]
}
// we want to update the empty object at the end of the o[key] array, so set o to that object
o = o[key][o[key].length - 1]
} else {
o = o[key]
}
})
var key = keys[keys.length - 1]
var isTypeArray = checkAllAliases(keys.join('.'), flags.arrays)
var isValueArray = Array.isArray(value)
var duplicate = configuration['duplicate-arguments-array']
if (value === increment) {
o[key] = increment(o[key])
} else if (Array.isArray(o[key])) {
if (duplicate && isTypeArray && isValueArray) {
o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : [o[key]].concat([value])
} else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) {
o[key] = value
} else {
o[key] = o[key].concat([value])
}
} else if (o[key] === undefined && isTypeArray) {
o[key] = isValueArray ? value : [value]
} else if (duplicate && !(o[key] === undefined || checkAllAliases(key, flags.bools) || checkAllAliases(keys.join('.'), flags.bools) || checkAllAliases(key, flags.counts))) {
o[key] = [ o[key], value ]
} else {
o[key] = value
}
}
// extend the aliases list with inferred aliases.
function extendAliases () {
Array.prototype.slice.call(arguments).forEach(function (obj) {
Object.keys(obj || {}).forEach(function (key) {
// short-circuit if we've already added a key
// to the aliases array, for example it might
// exist in both 'opts.default' and 'opts.key'.
if (flags.aliases[key]) return
flags.aliases[key] = [].concat(aliases[key] || [])
// For "--option-name", also set argv.optionName
flags.aliases[key].concat(key).forEach(function (x) {
if (/-/.test(x) && configuration['camel-case-expansion']) {
var c = camelCase(x)
if (c !== key && flags.aliases[key].indexOf(c) === -1) {
flags.aliases[key].push(c)
newAliases[c] = true
}
}
})
flags.aliases[key].forEach(function (x) {
flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {
return x !== y
}))
})
})
})
}
// check if a flag is set for any of a key's aliases.
function checkAllAliases (key, flag) {
var isSet = false
var toCheck = [].concat(flags.aliases[key] || [], key)
toCheck.forEach(function (key) {
if (flag[key]) isSet = flag[key]
})
return isSet
}
function setDefaulted (key) {
[].concat(flags.aliases[key] || [], key).forEach(function (k) {
flags.defaulted[k] = true
})
}
function unsetDefaulted (key) {
[].concat(flags.aliases[key] || [], key).forEach(function (k) {
delete flags.defaulted[k]
})
}
// return a default value, given the type of a flag.,
// e.g., key of type 'string' will default to '', rather than 'true'.
function defaultForType (type) {
var def = {
boolean: true,
string: '',
number: undefined,
array: []
}
return def[type]
}
// given a flag, enforce a default type.
function guessType (key, flags) {
var type = 'boolean'
if (checkAllAliases(key, flags.strings)) type = 'string'
else if (checkAllAliases(key, flags.numbers)) type = 'number'
else if (checkAllAliases(key, flags.arrays)) type = 'array'
return type
}
function isNumber (x) {
if (typeof x === 'number') return true
if (/^0x[0-9a-f]+$/i.test(x)) return true
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x)
}
function isUndefined (num) {
return num === undefined
}
return {
argv: argv,
error: error,
aliases: flags.aliases,
newAliases: newAliases,
configuration: configuration
}
}
// if any aliases reference each other, we should
// merge them together.
function combineAliases (aliases) {
var aliasArrays = []
var change = true
var combined = {}
// turn alias lookup hash {key: ['alias1', 'alias2']} into
// a simple array ['key', 'alias1', 'alias2']
Object.keys(aliases).forEach(function (key) {
aliasArrays.push(
[].concat(aliases[key], key)
)
})
// combine arrays until zero changes are
// made in an iteration.
while (change) {
change = false
for (var i = 0; i < aliasArrays.length; i++) {
for (var ii = i + 1; ii < aliasArrays.length; ii++) {
var intersect = aliasArrays[i].filter(function (v) {
return aliasArrays[ii].indexOf(v) !== -1
})
if (intersect.length) {
aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii])
aliasArrays.splice(ii, 1)
change = true
break
}
}
}
}
// map arrays back to the hash-lookup (de-dupe while
// we're at it).
aliasArrays.forEach(function (aliasArray) {
aliasArray = aliasArray.filter(function (v, i, self) {
return self.indexOf(v) === i
})
combined[aliasArray.pop()] = aliasArray
})
return combined
}
function assign (defaults, configuration) {
var o = {}
configuration = configuration || {}
Object.keys(defaults).forEach(function (k) {
o[k] = defaults[k]
})
Object.keys(configuration).forEach(function (k) {
o[k] = configuration[k]
})
return o
}
// this function should only be called when a count is given as an arg
// it is NOT called to set a default value
// thus we can start the count at 1 instead of 0
function increment (orig) {
return orig !== undefined ? orig + 1 : 1
}
function Parser (args, opts) {
var result = parse(args.slice(), opts)
return result.argv
}
// parse arguments and return detailed
// meta information, aliases, etc.
Parser.detailed = function (args, opts) {
return parse(args.slice(), opts)
}
module.exports = Parser

View File

@ -0,0 +1,40 @@
// take an un-split argv string and tokenize it.
module.exports = function (argString) {
if (Array.isArray(argString)) return argString
argString = argString.trim()
var i = 0
var prevC = null
var c = null
var opening = null
var args = []
for (var ii = 0; ii < argString.length; ii++) {
prevC = c
c = argString.charAt(ii)
// split on spaces unless we're in quotes.
if (c === ' ' && !opening) {
if (!(prevC === ' ')) {
i++
}
continue
}
// don't split the string if we're in matching
// opening or closing single and double quotes.
if (c === opening) {
opening = null
continue
} else if ((c === "'" || c === '"') && !opening) {
opening = c
continue
}
if (!args[i]) args[i] = ''
args[i] += c
}
return args
}

43
node_modules/yargs-parser/package.json generated vendored 100644
View File

@ -0,0 +1,43 @@
{
"name": "yargs-parser",
"version": "10.1.0",
"description": "the mighty option parser used by yargs",
"main": "index.js",
"scripts": {
"test": "nyc mocha test/*.js",
"posttest": "standard",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"release": "standard-version"
},
"repository": {
"url": "git@github.com:yargs/yargs-parser.git"
},
"keywords": [
"argument",
"parser",
"yargs",
"command",
"cli",
"parsing",
"option",
"args",
"argument"
],
"author": "Ben Coe <ben@npmjs.com>",
"license": "ISC",
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.12",
"mocha": "^3.0.1",
"nyc": "^11.4.1",
"standard": "^10.0.2",
"standard-version": "^4.3.0"
},
"dependencies": {
"camelcase": "^4.1.0"
},
"files": [
"lib",
"index.js"
]
}

View File

@ -1,6 +1,6 @@
{
"name": "conventional-changelog-action",
"version": "1.3.0",
"version": "2.0.0",
"description": "",
"main": "index.js",
"scripts": {